From d5a04846cedab61a0b7c897af0548af0d8fb14fb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 20 Feb 2023 19:03:21 +0000 Subject: [PATCH] Automatic compilation --- .eslintrc.json | 18 - .github/PULL_REQUEST_TEMPLATE.md | 10 - .github/workflows/ci-unit-tests.yaml | 18 - .github/workflows/publish.yaml | 33 - .gitignore | 4 - .prettierignore | 1 - CODE_OF_CONDUCT.md | 5 - CONTRIBUTING.md | 59 - LICENSE | 175 - NOTICE | 1 - README.md | 309 - code-build.js | 306 - dist/index.js | 131732 +++++++++++------------- index.js | 31 - local.js | 141 - package-lock.json | 7540 -- package.json | 52 - test/code-build-test.js | 626 - 18 files changed, 62307 insertions(+), 78754 deletions(-) delete mode 100644 .eslintrc.json delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/ci-unit-tests.yaml delete mode 100644 .github/workflows/publish.yaml delete mode 100644 .gitignore delete mode 100644 .prettierignore delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 LICENSE delete mode 100644 NOTICE delete mode 100644 README.md delete mode 100644 code-build.js delete mode 100644 index.js delete mode 100644 local.js delete mode 100644 package-lock.json delete mode 100644 package.json delete mode 100644 test/code-build-test.js diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index 316b044..0000000 --- a/.eslintrc.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "env": { - "commonjs": true, - "es6": true, - "node": true, - "mocha": true - }, - "extends": ["eslint:recommended", "prettier"], - "globals": { - "Atomics": "readonly", - "SharedArrayBuffer": "readonly" - }, - "parserOptions": { - "ecmaVersion": 2018 - }, - "ignorePatterns": ["dist/**"], - "rules": {} -} diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 176df02..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,10 +0,0 @@ -*Issue #, if available:* - -*Description of changes:* - - -By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. - -# Check any applicable: -- [ ] Were any files moved? Moving files changes their URL, which breaks all hyperlinks to the files. - diff --git a/.github/workflows/ci-unit-tests.yaml b/.github/workflows/ci-unit-tests.yaml deleted file mode 100644 index 82477be..0000000 --- a/.github/workflows/ci-unit-tests.yaml +++ /dev/null @@ -1,18 +0,0 @@ -name: Unit tests - -on: [pull_request, push] - -jobs: - ci-unit-tests: - permissions: - contents: read - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - # This should match the using value in `actions.yaml` - node-version: 16 - - run: npm ci - - run: npm run lint - - run: npm run test diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml deleted file mode 100644 index 684557e..0000000 --- a/.github/workflows/publish.yaml +++ /dev/null @@ -1,33 +0,0 @@ -name: Publish - -on: - release: - types: [published, edited] - -jobs: - publish: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - ref: ${{ github.event.release.tag_name }} - - name: Use node.js 16.x - uses: actions/setup-node@v3 - with: - node-version: 16 - - name: NPM Install - run: npm ci - - name: Check Format - run: npm run format:check - - name: Lint - run: npm run lint - - name: Build - run: npm run build - - name: Test - run: npm run test - - uses: JasonEtco/build-and-tag-action@v2 - env: - GITHUB_TOKEN: ${{ github.token }} - with: - tag_name: ${{ github.event.release.tag_name }} diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 785de3d..0000000 --- a/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -/node_modules -/.DS_Store -/.history -.idea/ diff --git a/.prettierignore b/.prettierignore deleted file mode 100644 index 849ddff..0000000 --- a/.prettierignore +++ /dev/null @@ -1 +0,0 @@ -dist/ diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md deleted file mode 100644 index ec98f2b..0000000 --- a/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,5 +0,0 @@ -## Code of Conduct - -This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct). -For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact -opensource-codeofconduct@amazon.com with any additional questions or comments. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index a047948..0000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,59 +0,0 @@ -# Contributing Guidelines - -Thank you for your interest in contributing to our project. Whether it's a bug report, new feature, correction, or additional -documentation, we greatly value feedback and contributions from our community. - -Please read through this document before submitting any issues or pull requests to ensure we have all the necessary -information to effectively respond to your bug report or contribution. - -## Reporting Bugs/Feature Requests - -We welcome you to use the GitHub issue tracker to report bugs or suggest features. - -When filing an issue, please check existing open, or recently closed, issues to make sure somebody else hasn't already -reported the issue. Please try to include as much information as you can. Details like these are incredibly useful: - -- A reproducible test case or series of steps -- The version of our code being used -- Any modifications you've made relevant to the bug -- Anything unusual about your environment or deployment - -## Contributing via Pull Requests - -Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that: - -1. You are working against the latest source on the _master_ branch. -2. You check existing open, and recently merged, pull requests to make sure someone else hasn't addressed the problem already. -3. You open an issue to discuss any significant work - we would hate for your time to be wasted. - -To send us a pull request, please: - -1. Fork the repository. -2. Modify the source; please focus on the specific change you are contributing. If you also reformat all the code, it will be hard for us to focus on your change. -3. Ensure local tests pass. -4. Commit to your fork using clear commit messages. -5. Send us a pull request, answering any default questions in the pull request interface. -6. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation. - -GitHub provides additional document on [forking a repository](https://help.github.com/articles/fork-a-repo/) and -[creating a pull request](https://help.github.com/articles/creating-a-pull-request/). - -## Finding contributions to work on - -Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels (enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any 'help wanted' issues is a great place to start. - -## Code of Conduct - -This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct). -For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact -opensource-codeofconduct@amazon.com with any additional questions or comments. - -## Security issue notifications - -If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/). Please do **not** create a public github issue. - -## Licensing - -See the [LICENSE](LICENSE) file for our project's licensing. We will ask you to confirm the licensing of your contribution. - -We may ask you to sign a [Contributor License Agreement (CLA)](http://en.wikipedia.org/wiki/Contributor_License_Agreement) for larger changes. diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 67db858..0000000 --- a/LICENSE +++ /dev/null @@ -1,175 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. diff --git a/NOTICE b/NOTICE deleted file mode 100644 index 0fca886..0000000 --- a/NOTICE +++ /dev/null @@ -1 +0,0 @@ -Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/README.md b/README.md deleted file mode 100644 index 5fe969e..0000000 --- a/README.md +++ /dev/null @@ -1,309 +0,0 @@ -## AWS CodeBuild Run Build for GitHub Actions - -This action runs a [AWS CodeBuild][codebuild] [project][codebuild project] -as a step in a GitHub Actions workflow job. - -The action builds the CodeBuild project, collects the build logs, and prints them as they are written. -The user experience is the same as it would be if the logic were executed -in the GitHub Actions job runner. - -[Security issue notifications](./CONTRIBUTING.md#security-issue-notifications) - -## Usage - -### Inputs - -This action offers three inputs that you can use to configure its behavior. -The only required input is `project-name`. - -1. **project-name** (required) : The name of CodeBuild project you want to run. -1. **buildspec-override** (optional) : - The location (in this repository) of the [buildspec file][codebuild buildspec] - that CodeBuild requires. - By default, the action uses the buildspec file location - that you configured in the CodeBuild project. -1. **compute-type-override** (optional) : - The name of a compute type for this build that overrides the one specified - in the build project. -1. **environment-type-override** (optional) : - A container type for this build that overrides the one specified in the - build project. -1. **image-override** (optional) : - The name of an image for this build that overrides the one specified - in the build project. -1. **disable-source-override** (optional) : - Set to `true` if you want to disable providing `sourceVersion`, - `sourceTypeOverride` and `sourceLocationOverride` to CodeBuild. -1. **env-vars-for-codebuild** (optional) : - A comma-separated list of the names of environment variables - that the action passes from GitHub Actions to CodeBuild. - - The action passes these environment variables to CodeBuild - along with any environment variables that have a `github` prefix. - - This list is often the same or a subset of the list of environment variables - that you define for GitHub actions in the `env` property. - - Note: If you specify an environment variable - with the same name as one defined in your CodeBuild project, - the one defined here replaces the one in the CodeBuild project. - For a list of CodeBuild environment variables, see - -1. **update-interval** (optional) : - Update interval as seconds for how often the API is called to check on the status. - - A higher value mitigates the chance of hitting API rate-limiting especially when - running many instances of this action in parallel, but also introduces a larger - potential time overhead (ranging from 0 to update interval) for the action to - fetch the build result and finish. - - Lower value limits the potential time overhead worst case but it may hit the API - rate-limit more often, depending on the use-case. - - The default value is 30. - -1. **update-back-off** (optional) : - Base back-off time in seconds for the update interval. - - When API rate-limiting is hit the back-off time, augmented with jitter, will be - added to the next update interval. - E.g. with update interval of 30 and back-off time of 15, upon hitting the rate-limit - the next interval for the update call will be 30 + random*between(0, 15 * 2 \*\* 0)) - seconds and if the rate-limit is hit again the next interval will be - 30 + random*between(0, 15 * 2 \*\* 1) and so on. - - The default value is 15. - -1. **hide-cloudwatch-logs** (optional) : - Set to `true` if you do not want CloudWatch Logs to be streamed to GitHub Action. - -### Outputs - -1. **aws-build-id** : The CodeBuild build ID of the build that the action ran. - -## Purpose - -This action is designed to give you the power of GitHub Actions -with options available in [AWS CodeBuild][codebuild] for more CPU and memory, -and access to other resources. - -GitHub Actions provides a powerful system of event-based workflows, -but the hosted job runners cannot exceed the defined computing and memory limits, -and might prevent you from accessing resources that you need for your project. - -[AWS CodeBuild][codebuild] is a fully managed continuous integration service -that can compile source code, run tests, and produce software packages that are ready to deploy. -It supports more environment options than standard GitHub Actions, -including a selection of powerful computing environments with additional memory. - -### Resources and Architecture - -[GitHub Actions job runners][github actions job runners] have 2 x86_64 CPU cores and 7 GB RAM. - -This is enough for the most common activities, -but some large or complex builds need more resources, -and some builds need access to special CPU architectures or hardware. - -[CodeBuild compute types][codebuild compute types] offer options including: - -- up to 72 x86_64 vCPUs -- up to 255 GB RAM -- up to 8 ARM64 vCPUs -- GPU hardware devices - -### Access - -Your workflow might require access to assets, configuration, or resources -that are impossible, difficult, or simply expensive -to access from GitHub's hosted job runners -but are easy or cheap to access from CodeBuild. - -## Credentials and Permissions - -In order for the action to run your CodeBuild project, -you need to provide AWS credentials. -We recommend using [aws-actions/configure-aws-credentials] -to configure your credentials for a job. - -**NOTE: -GitHub Secrets are not passed to the runner when a workflow is triggered from a forked repository. -This means that you cannot use this action directly in a workflow -that is triggered by pull requests from a fork. -See the [GitHub Secrets docs][github secrets access] for more information.** - -The credentials that you provide need to have the following permissions: - -- `codebuild:StartBuild` -- `codebuild:BatchGetBuilds` -- `logs:GetLogEvents` - -For example: - -```json -{ - "Version": "2012-10-17", - "Statement": [ - { - "Effect": "Allow", - "Action": ["codebuild:StartBuild", "codebuild:BatchGetBuilds"], - "Resource": ["arn:aws:codebuild:REGION:ACCOUNT_ID:project/PROJECT_NAME"] - }, - { - "Effect": "Allow", - "Action": ["logs:GetLogEvents"], - "Resource": [ - "arn:aws:logs:REGION:ACCOUNT_ID:log-group:/aws/codebuild/PROJECT_NAME:*" - ] - } - ] -} -``` - -## Examples - -These examples show how you can define a step in a workflow job. -For more information about GitHub Actions workflow syntax, -see the [GitHub docs][github workflow syntax]. - -If your CodeBuild project is already configured the way you want it, -the only CodeBuild Run input you need to provide is the project name. - -```yaml -- name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v1 - with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: us-east-2 -- name: Run CodeBuild - uses: aws-actions/aws-codebuild-run-build@v1 - with: - project-name: CodeBuildProjectName -``` - -If you reuse a project in multiple jobs or repositories, -you might want to provide a bit more configuration. -For example, the following configuration -specifies an alternate location for the buildspec file. -It also tells AWS CodeBuild Run Build -to send all of the environment variables defined in the `env:` list to CodeBuild. -If any of these environment variables are defined in the CodeBuild project, -this will overwrite them. - -```yaml -- name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v1 - with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: us-east-2 -- name: Run CodeBuild - uses: aws-actions/aws-codebuild-run-build@v1 - with: - project-name: CodeBuildProjectName - buildspec-override: path/to/buildspec.yaml - compute-type-override: compute-type - environment-type-override: environment-type - image-override: ecr-image-uri - env-vars-for-codebuild: | - custom, - requester, - event-name - env: - custom: my environment variable - requester: ${{ github.actor }} - event-name: ${{ github.event_name }} -``` - -### Running Locally - -It can be useful to run a build outside of CI. -So, this action can also be installed locally -to kick off a CodeBuild project from your git sandbox. -You could push your changes to an open PR, -but if you only want to test one project this may be faster. -In order to use this tool, -you must first `git checkout` the commit that you want to test. - -``` -npx @aws-actions/codebuild-run-build -p ProjectName -r remoteName -``` - -This will use whatever commit you have checked out -and push to a temporary branch in the specified remote. -Then kick off the build -and delete the remote branch when complete. - -You can also install the project globally or locally -and execute it that way. - -## Implementation Notes - -### What we did - -We call the [CodeBuild `StartBuild` API][codebuild startbuild], -checking out the commit that triggered the workflow. - -The action waits for the build to complete while logging everything written to the build's -[Amazon CloudWatch Logs][cloudwatch logs] [logstream][cloudwatch logs concepts]. -If the `buildStatus` value in the StartBuild response is `SUCCEEDED`, the action succeeds. -Otherwise, it fails. - -In the call to StartBuild, we pass in all -`GITHUB_` [environment variables][github environment variables] in the GitHub Actions environment, -plus any environment variables that you specified in the `env-passthrough` input value. - -By default, regardless of the project configuration in CodeBuild or GitHub Actions, -we always pass the following parameters and values to CodeBuild in the StartBuild API call. - -| CodeBuild value | GitHub value | -| ------------------------ | -------------------------------------- | -| `sourceVersion` | The commit that triggered the workflow | -| `sourceTypeOverride` | The string `'GITHUB'` | -| `sourceLocationOverride` | The `HTTPS` git url for `context.repo` | - -If you want to disable sending the parameters `sourceVersion`, `sourceTypeOverride` and `sourceLocationOverride` you can use `disable-source-override` input. - -### What we did not do - -This action intentionally does not let you specify every option -in the [CodeBuild::StartBuild][codebuild startbuild] API. - -Because all GitHub Actions input values are passed through environment variables, -they must be simple strings. -This makes it difficult to pass complex structures as inputs. - -Also, providing an input for every parameter in the `StartBuild` API -would have made it much more difficult to use and maintain this tool. -We would have to add many more inputs or require string values, -while hoping that all supported configurations -conformed to the environment variable length limits. - -For this reason, and to simplify what we expect to be the most common use-cases, -we chose to start with the simplest possible configuration. -If you find that these options don't meet your needs, please open an issue to let us know. - -## Release Process - -By creating a new Release a workflow is triggered creating a new commit which only contains `dist` and the `action.yml`. The necessary tags, i.e. for the release v1.0.7, the tag v1.0.7 is created and the v1.0 and v1 tags are updated. - -For the tagging and building the [build-and-tag](https://github.com/JasonEtco/build-and-tag-action) action by [Jason Etcovitch](https://github.com/JasonEtco) is used. It expects to have the main attribute and a build script to be set in the `package.json`. It then builds the code with the ncc compiler and creates the new tag/ updates existing tags for minor and major versions automatically. - -## License - -This SDK is distributed under the -[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0), -see LICENSE and NOTICE for more information. - -[codebuild]: https://docs.aws.amazon.com/codebuild/latest/userguide/welcome.html -[codebuild project]: https://docs.aws.amazon.com/codebuild/latest/userguide/working-with-build-projects.html -[codebuild startbuild]: https://docs.aws.amazon.com/codebuild/latest/APIReference/API_StartBuild.html -[codebuild compute types]: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html -[codebuild buildspec]: https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html -[cloudwatch logs]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/WhatIsCloudWatchLogs.html -[cloudwatch logs concepts]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatchLogsConcepts.html -[github environment variables]: https://help.github.com/en/actions/automating-your-workflow-with-github-actions/using-environment-variables#default-environment-variables -[github actions job runners]: https://help.github.com/en/actions/automating-your-workflow-with-github-actions/virtual-environments-for-github-hosted-runners#supported-runners-and-hardware-resources -[github workflow syntax]: https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions -[github secrets access]: https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets#using-encrypted-secrets-in-a-workflow -[aws-actions/configure-aws-credentials]: https://github.com/aws-actions/configure-aws-credentials diff --git a/code-build.js b/code-build.js deleted file mode 100644 index b2f702a..0000000 --- a/code-build.js +++ /dev/null @@ -1,306 +0,0 @@ -// Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -const core = require("@actions/core"); -const github = require("@actions/github"); -const aws = require("aws-sdk"); -const assert = require("assert"); - -module.exports = { - runBuild, - build, - waitForBuildEndTime, - inputs2Parameters, - githubInputs, - buildSdk, - logName, -}; - -function runBuild() { - // get a codeBuild instance from the SDK - const sdk = buildSdk(); - - const inputs = githubInputs(); - - const config = (({ updateInterval, updateBackOff, hideCloudWatchLogs }) => ({ - updateInterval, - updateBackOff, - hideCloudWatchLogs, - }))(inputs); - - // Get input options for startBuild - const params = inputs2Parameters(inputs); - - return build(sdk, params, config); -} - -async function build(sdk, params, config) { - // Start the build - const start = await sdk.codeBuild.startBuild(params).promise(); - - // Wait for the build to "complete" - return waitForBuildEndTime(sdk, start.build, config); -} - -async function waitForBuildEndTime( - sdk, - { id, logs }, - { updateInterval, updateBackOff, hideCloudWatchLogs }, - seqEmptyLogs, - totalEvents, - throttleCount, - nextToken -) { - const { codeBuild, cloudWatchLogs } = sdk; - - totalEvents = totalEvents || 0; - seqEmptyLogs = seqEmptyLogs || 0; - throttleCount = throttleCount || 0; - - // Get the CloudWatchLog info - const startFromHead = true; - const { cloudWatchLogsArn } = logs; - const { logGroupName, logStreamName } = logName(cloudWatchLogsArn); - - let errObject = false; - // Check the state - const [batch, cloudWatch = {}] = await Promise.all([ - codeBuild.batchGetBuilds({ ids: [id] }).promise(), - !hideCloudWatchLogs && - logGroupName && - cloudWatchLogs // only make the call if hideCloudWatchLogs is not enabled and a logGroupName exists - .getLogEvents({ - logGroupName, - logStreamName, - startFromHead, - nextToken, - }) - .promise(), - ]).catch((err) => { - errObject = err; - /* Returning [] here so that the assignment above - * does not throw `TypeError: undefined is not iterable`. - * The error is handled below, - * since it might be a rate limit. - */ - return []; - }); - - if (errObject) { - //We caught an error in trying to make the AWS api call, and are now checking to see if it was just a rate limiting error - if (errObject.message && errObject.message.search("Rate exceeded") !== -1) { - // We were rate-limited, so add backoff with Full Jitter, ref: https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/ - let jitteredBackOff = Math.floor( - Math.random() * (updateBackOff * 2 ** throttleCount) - ); - let newWait = updateInterval + jitteredBackOff; - throttleCount++; - - //Sleep before trying again - await new Promise((resolve) => setTimeout(resolve, newWait)); - - // Try again from the same token position - return waitForBuildEndTime( - { ...sdk }, - { id, logs }, - { updateInterval: newWait, updateBackOff }, - seqEmptyLogs, - totalEvents, - throttleCount, - nextToken - ); - } else { - //The error returned from the API wasn't about rate limiting, so throw it as an actual error and fail the job - throw errObject; - } - } - - // Pluck off the relevant state - const [current] = batch.builds; - const { nextForwardToken, events = [] } = cloudWatch; - - // GetLogEvents can return partial/empty responses even when there is data. - // We wait for two consecutive empty log responses to minimize false positive on EOF. - // Empty response counter starts after any logs have been received, or when the build completes. - if (events.length == 0 && (totalEvents > 0 || current.endTime)) { - seqEmptyLogs++; - } else { - seqEmptyLogs = 0; - } - totalEvents += events.length; - - // stdout the CloudWatchLog (everyone likes progress...) - // CloudWatchLogs have line endings. - // I trim and then log each line - // to ensure that the line ending is OS specific. - events.forEach(({ message }) => console.log(message.trimEnd())); - - // Stop after the build is ended and we've received two consecutive empty log responses - if (current.endTime && seqEmptyLogs >= 2) { - return current; - } - - // More to do: Sleep for a few seconds to avoid rate limiting - // If never throttled and build is complete, halve CWL polling delay to minimize latency - await new Promise((resolve) => - setTimeout( - resolve, - current.endTime && throttleCount == 0 - ? updateInterval / 2 - : updateInterval - ) - ); - - // Try again - return waitForBuildEndTime( - sdk, - current, - { updateInterval, updateBackOff, hideCloudWatchLogs }, - seqEmptyLogs, - totalEvents, - throttleCount, - nextForwardToken - ); -} - -function githubInputs() { - const projectName = core.getInput("project-name", { required: true }); - const disableSourceOverride = - core.getInput("disable-source-override", { required: false }) === "true"; - const { owner, repo } = github.context.repo; - const { payload } = github.context; - // The github.context.sha is evaluated on import. - // This makes it hard to test. - // So I use the raw ENV. - // There is a complexity here because for pull request - // the GITHUB_SHA value is NOT the correct value. - // See: https://github.com/aws-actions/aws-codebuild-run-build/issues/36 - const sourceVersion = - process.env[`GITHUB_EVENT_NAME`] === "pull_request" - ? (((payload || {}).pull_request || {}).head || {}).sha - : process.env[`GITHUB_SHA`]; - - assert(sourceVersion, "No source version could be evaluated."); - const buildspecOverride = - core.getInput("buildspec-override", { required: false }) || undefined; - - const computeTypeOverride = - core.getInput("compute-type-override", { required: false }) || undefined; - - const environmentTypeOverride = - core.getInput("environment-type-override", { required: false }) || - undefined; - const imageOverride = - core.getInput("image-override", { required: false }) || undefined; - - const envPassthrough = core - .getInput("env-vars-for-codebuild", { required: false }) - .split(",") - .map((i) => i.trim()) - .filter((i) => i !== ""); - - const updateInterval = - parseInt( - core.getInput("update-interval", { required: false }) || "30", - 10 - ) * 1000; - const updateBackOff = - parseInt( - core.getInput("update-back-off", { required: false }) || "15", - 10 - ) * 1000; - - const hideCloudWatchLogs = - core.getInput("hide-cloudwatch-logs", { required: false }) === "true"; - - return { - projectName, - owner, - repo, - sourceVersion, - buildspecOverride, - computeTypeOverride, - environmentTypeOverride, - imageOverride, - envPassthrough, - updateInterval, - updateBackOff, - disableSourceOverride, - hideCloudWatchLogs, - }; -} - -function inputs2Parameters(inputs) { - const { - projectName, - owner, - repo, - sourceVersion, - buildspecOverride, - computeTypeOverride, - environmentTypeOverride, - imageOverride, - envPassthrough = [], - disableSourceOverride, - } = inputs; - - const sourceOverride = !disableSourceOverride - ? { - sourceVersion: sourceVersion, - sourceTypeOverride: "GITHUB", - sourceLocationOverride: `https://github.com/${owner}/${repo}.git`, - } - : {}; - - const environmentVariablesOverride = Object.entries(process.env) - .filter( - ([key]) => key.startsWith("GITHUB_") || envPassthrough.includes(key) - ) - .map(([name, value]) => ({ name, value, type: "PLAINTEXT" })); - - // The idempotencyToken is intentionally not set. - // This way the GitHub events can manage the builds. - return { - projectName, - ...sourceOverride, - buildspecOverride, - computeTypeOverride, - environmentTypeOverride, - imageOverride, - environmentVariablesOverride, - }; -} - -function buildSdk() { - const codeBuild = new aws.CodeBuild({ - customUserAgent: "aws-actions/aws-codebuild-run-build", - }); - - const cloudWatchLogs = new aws.CloudWatchLogs({ - customUserAgent: "aws-actions/aws-codebuild-run-build", - }); - - assert( - codeBuild.config.credentials && cloudWatchLogs.config.credentials, - "No credentials. Try adding @aws-actions/configure-aws-credentials earlier in your job to set up AWS credentials." - ); - - return { codeBuild, cloudWatchLogs }; -} - -function logName(Arn) { - const logs = { - logGroupName: undefined, - logStreamName: undefined, - }; - if (Arn) { - const [logGroupName, logStreamName] = Arn.split(":log-group:") - .pop() - .split(":log-stream:"); - if (logGroupName !== "null" && logStreamName !== "null") { - logs.logGroupName = logGroupName; - logs.logStreamName = logStreamName; - } - } - return logs; -} diff --git a/dist/index.js b/dist/index.js index e9fa014..5559738 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,74047 +1,66929 @@ -/******/ (() => { - // webpackBootstrap - /******/ var __webpack_modules__ = { - /***/ 72496: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - // Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. - // SPDX-License-Identifier: Apache-2.0 - - const core = __nccwpck_require__(42186); - const github = __nccwpck_require__(95438); - const aws = __nccwpck_require__(71786); - const assert = __nccwpck_require__(39491); - - module.exports = { - runBuild, - build, - waitForBuildEndTime, - inputs2Parameters, - githubInputs, - buildSdk, - logName, - }; - - function runBuild() { - // get a codeBuild instance from the SDK - const sdk = buildSdk(); - - const inputs = githubInputs(); - - const config = (({ - updateInterval, - updateBackOff, - hideCloudWatchLogs, - }) => ({ - updateInterval, - updateBackOff, - hideCloudWatchLogs, - }))(inputs); - - // Get input options for startBuild - const params = inputs2Parameters(inputs); - - return build(sdk, params, config); - } +/******/ (() => { // webpackBootstrap +/******/ var __webpack_modules__ = ({ + +/***/ 72496: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +const core = __nccwpck_require__(42186); +const github = __nccwpck_require__(95438); +const aws = __nccwpck_require__(71786); +const assert = __nccwpck_require__(39491); + +module.exports = { + runBuild, + build, + waitForBuildEndTime, + inputs2Parameters, + githubInputs, + buildSdk, + logName, +}; + +function runBuild() { + // get a codeBuild instance from the SDK + const sdk = buildSdk(); + + const inputs = githubInputs(); + + const config = (({ updateInterval, updateBackOff, hideCloudWatchLogs }) => ({ + updateInterval, + updateBackOff, + hideCloudWatchLogs, + }))(inputs); + + // Get input options for startBuild + const params = inputs2Parameters(inputs); + + return build(sdk, params, config); +} + +async function build(sdk, params, config) { + // Start the build + const start = await sdk.codeBuild.startBuild(params).promise(); + + // Wait for the build to "complete" + return waitForBuildEndTime(sdk, start.build, config); +} + +async function waitForBuildEndTime( + sdk, + { id, logs }, + { updateInterval, updateBackOff, hideCloudWatchLogs }, + seqEmptyLogs, + totalEvents, + throttleCount, + nextToken +) { + const { codeBuild, cloudWatchLogs } = sdk; + + totalEvents = totalEvents || 0; + seqEmptyLogs = seqEmptyLogs || 0; + throttleCount = throttleCount || 0; + + // Get the CloudWatchLog info + const startFromHead = true; + const { cloudWatchLogsArn } = logs; + const { logGroupName, logStreamName } = logName(cloudWatchLogsArn); + + let errObject = false; + // Check the state + const [batch, cloudWatch = {}] = await Promise.all([ + codeBuild.batchGetBuilds({ ids: [id] }).promise(), + !hideCloudWatchLogs && + logGroupName && + cloudWatchLogs // only make the call if hideCloudWatchLogs is not enabled and a logGroupName exists + .getLogEvents({ + logGroupName, + logStreamName, + startFromHead, + nextToken, + }) + .promise(), + ]).catch((err) => { + errObject = err; + /* Returning [] here so that the assignment above + * does not throw `TypeError: undefined is not iterable`. + * The error is handled below, + * since it might be a rate limit. + */ + return []; + }); - async function build(sdk, params, config) { - // Start the build - const start = await sdk.codeBuild.startBuild(params).promise(); + if (errObject) { + //We caught an error in trying to make the AWS api call, and are now checking to see if it was just a rate limiting error + if (errObject.message && errObject.message.search("Rate exceeded") !== -1) { + // We were rate-limited, so add backoff with Full Jitter, ref: https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/ + let jitteredBackOff = Math.floor( + Math.random() * (updateBackOff * 2 ** throttleCount) + ); + let newWait = updateInterval + jitteredBackOff; + throttleCount++; - // Wait for the build to "complete" - return waitForBuildEndTime(sdk, start.build, config); - } + //Sleep before trying again + await new Promise((resolve) => setTimeout(resolve, newWait)); - async function waitForBuildEndTime( - sdk, + // Try again from the same token position + return waitForBuildEndTime( + { ...sdk }, { id, logs }, - { updateInterval, updateBackOff, hideCloudWatchLogs }, + { updateInterval: newWait, updateBackOff }, seqEmptyLogs, totalEvents, throttleCount, nextToken - ) { - const { codeBuild, cloudWatchLogs } = sdk; - - totalEvents = totalEvents || 0; - seqEmptyLogs = seqEmptyLogs || 0; - throttleCount = throttleCount || 0; - - // Get the CloudWatchLog info - const startFromHead = true; - const { cloudWatchLogsArn } = logs; - const { logGroupName, logStreamName } = logName(cloudWatchLogsArn); - - let errObject = false; - // Check the state - const [batch, cloudWatch = {}] = await Promise.all([ - codeBuild.batchGetBuilds({ ids: [id] }).promise(), - !hideCloudWatchLogs && - logGroupName && - cloudWatchLogs // only make the call if hideCloudWatchLogs is not enabled and a logGroupName exists - .getLogEvents({ - logGroupName, - logStreamName, - startFromHead, - nextToken, - }) - .promise(), - ]).catch((err) => { - errObject = err; - /* Returning [] here so that the assignment above - * does not throw `TypeError: undefined is not iterable`. - * The error is handled below, - * since it might be a rate limit. - */ - return []; - }); - - if (errObject) { - //We caught an error in trying to make the AWS api call, and are now checking to see if it was just a rate limiting error - if ( - errObject.message && - errObject.message.search("Rate exceeded") !== -1 - ) { - // We were rate-limited, so add backoff with Full Jitter, ref: https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/ - let jitteredBackOff = Math.floor( - Math.random() * (updateBackOff * 2 ** throttleCount) - ); - let newWait = updateInterval + jitteredBackOff; - throttleCount++; - - //Sleep before trying again - await new Promise((resolve) => setTimeout(resolve, newWait)); - - // Try again from the same token position - return waitForBuildEndTime( - { ...sdk }, - { id, logs }, - { updateInterval: newWait, updateBackOff }, - seqEmptyLogs, - totalEvents, - throttleCount, - nextToken - ); - } else { - //The error returned from the API wasn't about rate limiting, so throw it as an actual error and fail the job - throw errObject; - } - } - - // Pluck off the relevant state - const [current] = batch.builds; - const { nextForwardToken, events = [] } = cloudWatch; - - // GetLogEvents can return partial/empty responses even when there is data. - // We wait for two consecutive empty log responses to minimize false positive on EOF. - // Empty response counter starts after any logs have been received, or when the build completes. - if (events.length == 0 && (totalEvents > 0 || current.endTime)) { - seqEmptyLogs++; - } else { - seqEmptyLogs = 0; - } - totalEvents += events.length; - - // stdout the CloudWatchLog (everyone likes progress...) - // CloudWatchLogs have line endings. - // I trim and then log each line - // to ensure that the line ending is OS specific. - events.forEach(({ message }) => console.log(message.trimEnd())); - - // Stop after the build is ended and we've received two consecutive empty log responses - if (current.endTime && seqEmptyLogs >= 2) { - return current; - } - - // More to do: Sleep for a few seconds to avoid rate limiting - // If never throttled and build is complete, halve CWL polling delay to minimize latency - await new Promise((resolve) => - setTimeout( - resolve, - current.endTime && throttleCount == 0 - ? updateInterval / 2 - : updateInterval - ) - ); - - // Try again - return waitForBuildEndTime( - sdk, - current, - { updateInterval, updateBackOff, hideCloudWatchLogs }, - seqEmptyLogs, - totalEvents, - throttleCount, - nextForwardToken - ); - } + ); + } else { + //The error returned from the API wasn't about rate limiting, so throw it as an actual error and fail the job + throw errObject; + } + } + + // Pluck off the relevant state + const [current] = batch.builds; + const { nextForwardToken, events = [] } = cloudWatch; + + // GetLogEvents can return partial/empty responses even when there is data. + // We wait for two consecutive empty log responses to minimize false positive on EOF. + // Empty response counter starts after any logs have been received, or when the build completes. + if (events.length == 0 && (totalEvents > 0 || current.endTime)) { + seqEmptyLogs++; + } else { + seqEmptyLogs = 0; + } + totalEvents += events.length; + + // stdout the CloudWatchLog (everyone likes progress...) + // CloudWatchLogs have line endings. + // I trim and then log each line + // to ensure that the line ending is OS specific. + events.forEach(({ message }) => console.log(message.trimEnd())); + + // Stop after the build is ended and we've received two consecutive empty log responses + if (current.endTime && seqEmptyLogs >= 2) { + return current; + } + + // More to do: Sleep for a few seconds to avoid rate limiting + // If never throttled and build is complete, halve CWL polling delay to minimize latency + await new Promise((resolve) => + setTimeout( + resolve, + current.endTime && throttleCount == 0 + ? updateInterval / 2 + : updateInterval + ) + ); - function githubInputs() { - const projectName = core.getInput("project-name", { required: true }); - const disableSourceOverride = - core.getInput("disable-source-override", { required: false }) === - "true"; - const { owner, repo } = github.context.repo; - const { payload } = github.context; - // The github.context.sha is evaluated on import. - // This makes it hard to test. - // So I use the raw ENV. - // There is a complexity here because for pull request - // the GITHUB_SHA value is NOT the correct value. - // See: https://github.com/aws-actions/aws-codebuild-run-build/issues/36 - const sourceVersion = - process.env[`GITHUB_EVENT_NAME`] === "pull_request" - ? (((payload || {}).pull_request || {}).head || {}).sha - : process.env[`GITHUB_SHA`]; - - assert(sourceVersion, "No source version could be evaluated."); - const buildspecOverride = - core.getInput("buildspec-override", { required: false }) || undefined; - - const computeTypeOverride = - core.getInput("compute-type-override", { required: false }) || - undefined; - - const environmentTypeOverride = - core.getInput("environment-type-override", { required: false }) || - undefined; - const imageOverride = - core.getInput("image-override", { required: false }) || undefined; - - const envPassthrough = core - .getInput("env-vars-for-codebuild", { required: false }) - .split(",") - .map((i) => i.trim()) - .filter((i) => i !== ""); - - const updateInterval = - parseInt( - core.getInput("update-interval", { required: false }) || "30", - 10 - ) * 1000; - const updateBackOff = - parseInt( - core.getInput("update-back-off", { required: false }) || "15", - 10 - ) * 1000; - - const hideCloudWatchLogs = - core.getInput("hide-cloudwatch-logs", { required: false }) === "true"; - - return { - projectName, - owner, - repo, - sourceVersion, - buildspecOverride, - computeTypeOverride, - environmentTypeOverride, - imageOverride, - envPassthrough, - updateInterval, - updateBackOff, - disableSourceOverride, - hideCloudWatchLogs, - }; - } + // Try again + return waitForBuildEndTime( + sdk, + current, + { updateInterval, updateBackOff, hideCloudWatchLogs }, + seqEmptyLogs, + totalEvents, + throttleCount, + nextForwardToken + ); +} + +function githubInputs() { + const projectName = core.getInput("project-name", { required: true }); + const disableSourceOverride = + core.getInput("disable-source-override", { required: false }) === "true"; + const { owner, repo } = github.context.repo; + const { payload } = github.context; + // The github.context.sha is evaluated on import. + // This makes it hard to test. + // So I use the raw ENV. + // There is a complexity here because for pull request + // the GITHUB_SHA value is NOT the correct value. + // See: https://github.com/aws-actions/aws-codebuild-run-build/issues/36 + const sourceVersion = + process.env[`GITHUB_EVENT_NAME`] === "pull_request" + ? (((payload || {}).pull_request || {}).head || {}).sha + : process.env[`GITHUB_SHA`]; + + assert(sourceVersion, "No source version could be evaluated."); + const buildspecOverride = + core.getInput("buildspec-override", { required: false }) || undefined; + + const computeTypeOverride = + core.getInput("compute-type-override", { required: false }) || undefined; + + const environmentTypeOverride = + core.getInput("environment-type-override", { required: false }) || + undefined; + const imageOverride = + core.getInput("image-override", { required: false }) || undefined; + + const envPassthrough = core + .getInput("env-vars-for-codebuild", { required: false }) + .split(",") + .map((i) => i.trim()) + .filter((i) => i !== ""); + + const updateInterval = + parseInt( + core.getInput("update-interval", { required: false }) || "30", + 10 + ) * 1000; + const updateBackOff = + parseInt( + core.getInput("update-back-off", { required: false }) || "15", + 10 + ) * 1000; + + const hideCloudWatchLogs = + core.getInput("hide-cloudwatch-logs", { required: false }) === "true"; + + return { + projectName, + owner, + repo, + sourceVersion, + buildspecOverride, + computeTypeOverride, + environmentTypeOverride, + imageOverride, + envPassthrough, + updateInterval, + updateBackOff, + disableSourceOverride, + hideCloudWatchLogs, + }; +} + +function inputs2Parameters(inputs) { + const { + projectName, + owner, + repo, + sourceVersion, + buildspecOverride, + computeTypeOverride, + environmentTypeOverride, + imageOverride, + envPassthrough = [], + disableSourceOverride, + } = inputs; + + const sourceOverride = !disableSourceOverride + ? { + sourceVersion: sourceVersion, + sourceTypeOverride: "GITHUB", + sourceLocationOverride: `https://github.com/${owner}/${repo}.git`, + } + : {}; + + const environmentVariablesOverride = Object.entries(process.env) + .filter( + ([key]) => key.startsWith("GITHUB_") || envPassthrough.includes(key) + ) + .map(([name, value]) => ({ name, value, type: "PLAINTEXT" })); + + // The idempotencyToken is intentionally not set. + // This way the GitHub events can manage the builds. + return { + projectName, + ...sourceOverride, + buildspecOverride, + computeTypeOverride, + environmentTypeOverride, + imageOverride, + environmentVariablesOverride, + }; +} + +function buildSdk() { + const codeBuild = new aws.CodeBuild({ + customUserAgent: "aws-actions/aws-codebuild-run-build", + }); + + const cloudWatchLogs = new aws.CloudWatchLogs({ + customUserAgent: "aws-actions/aws-codebuild-run-build", + }); + + assert( + codeBuild.config.credentials && cloudWatchLogs.config.credentials, + "No credentials. Try adding @aws-actions/configure-aws-credentials earlier in your job to set up AWS credentials." + ); - function inputs2Parameters(inputs) { - const { - projectName, - owner, - repo, - sourceVersion, - buildspecOverride, - computeTypeOverride, - environmentTypeOverride, - imageOverride, - envPassthrough = [], - disableSourceOverride, - } = inputs; - - const sourceOverride = !disableSourceOverride - ? { - sourceVersion: sourceVersion, - sourceTypeOverride: "GITHUB", - sourceLocationOverride: `https://github.com/${owner}/${repo}.git`, + return { codeBuild, cloudWatchLogs }; +} + +function logName(Arn) { + const logs = { + logGroupName: undefined, + logStreamName: undefined, + }; + if (Arn) { + const [logGroupName, logStreamName] = Arn.split(":log-group:") + .pop() + .split(":log-stream:"); + if (logGroupName !== "null" && logStreamName !== "null") { + logs.logGroupName = logGroupName; + logs.logStreamName = logStreamName; + } + } + return logs; +} + + +/***/ }), + +/***/ 32932: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +const core = __nccwpck_require__(42186); +const { runBuild } = __nccwpck_require__(72496); +const assert = __nccwpck_require__(39491); + +/* istanbul ignore next */ +if (require.main === require.cache[eval('__filename')]) { + run(); +} + +module.exports = run; + +async function run() { + console.log("*****STARTING CODEBUILD*****"); + try { + const build = await runBuild(); + core.setOutput("aws-build-id", build.id); + + // Signal the outcome + assert( + build.buildStatus === "SUCCEEDED", + `Build status: ${build.buildStatus}` + ); + } catch (error) { + core.setFailed(error.message); + } finally { + console.log("*****CODEBUILD COMPLETE*****"); + } +} + + +/***/ }), + +/***/ 87351: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.issue = exports.issueCommand = void 0; +const os = __importStar(__nccwpck_require__(22037)); +const utils_1 = __nccwpck_require__(5278); +/** + * Commands + * + * Command Format: + * ::name key=value,key=value::message + * + * Examples: + * ::warning::This is the message + * ::set-env name=MY_VAR::some value + */ +function issueCommand(command, properties, message) { + const cmd = new Command(command, properties, message); + process.stdout.write(cmd.toString() + os.EOL); +} +exports.issueCommand = issueCommand; +function issue(name, message = '') { + issueCommand(name, {}, message); +} +exports.issue = issue; +const CMD_STRING = '::'; +class Command { + constructor(command, properties, message) { + if (!command) { + command = 'missing.command'; + } + this.command = command; + this.properties = properties; + this.message = message; + } + toString() { + let cmdStr = CMD_STRING + this.command; + if (this.properties && Object.keys(this.properties).length > 0) { + cmdStr += ' '; + let first = true; + for (const key in this.properties) { + if (this.properties.hasOwnProperty(key)) { + const val = this.properties[key]; + if (val) { + if (first) { + first = false; + } + else { + cmdStr += ','; + } + cmdStr += `${key}=${escapeProperty(val)}`; + } + } } - : {}; - - const environmentVariablesOverride = Object.entries(process.env) - .filter( - ([key]) => key.startsWith("GITHUB_") || envPassthrough.includes(key) - ) - .map(([name, value]) => ({ name, value, type: "PLAINTEXT" })); - - // The idempotencyToken is intentionally not set. - // This way the GitHub events can manage the builds. - return { - projectName, - ...sourceOverride, - buildspecOverride, - computeTypeOverride, - environmentTypeOverride, - imageOverride, - environmentVariablesOverride, - }; - } - - function buildSdk() { - const codeBuild = new aws.CodeBuild({ - customUserAgent: "aws-actions/aws-codebuild-run-build", - }); - - const cloudWatchLogs = new aws.CloudWatchLogs({ - customUserAgent: "aws-actions/aws-codebuild-run-build", - }); - - assert( - codeBuild.config.credentials && cloudWatchLogs.config.credentials, - "No credentials. Try adding @aws-actions/configure-aws-credentials earlier in your job to set up AWS credentials." - ); - - return { codeBuild, cloudWatchLogs }; - } - - function logName(Arn) { - const logs = { - logGroupName: undefined, - logStreamName: undefined, - }; - if (Arn) { - const [logGroupName, logStreamName] = Arn.split(":log-group:") - .pop() - .split(":log-stream:"); - if (logGroupName !== "null" && logStreamName !== "null") { - logs.logGroupName = logGroupName; - logs.logStreamName = logStreamName; - } } - return logs; - } - - /***/ - }, - - /***/ 32932: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - // Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. - // SPDX-License-Identifier: Apache-2.0 - - const core = __nccwpck_require__(42186); - const { runBuild } = __nccwpck_require__(72496); - const assert = __nccwpck_require__(39491); - - /* istanbul ignore next */ - if (require.main === require.cache[eval("__filename")]) { - run(); - } - - module.exports = run; - - async function run() { - console.log("*****STARTING CODEBUILD*****"); + cmdStr += `${CMD_STRING}${escapeData(this.message)}`; + return cmdStr; + } +} +function escapeData(s) { + return utils_1.toCommandValue(s) + .replace(/%/g, '%25') + .replace(/\r/g, '%0D') + .replace(/\n/g, '%0A'); +} +function escapeProperty(s) { + return utils_1.toCommandValue(s) + .replace(/%/g, '%25') + .replace(/\r/g, '%0D') + .replace(/\n/g, '%0A') + .replace(/:/g, '%3A') + .replace(/,/g, '%2C'); +} +//# sourceMappingURL=command.js.map + +/***/ }), + +/***/ 42186: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0; +const command_1 = __nccwpck_require__(87351); +const file_command_1 = __nccwpck_require__(717); +const utils_1 = __nccwpck_require__(5278); +const os = __importStar(__nccwpck_require__(22037)); +const path = __importStar(__nccwpck_require__(71017)); +const oidc_utils_1 = __nccwpck_require__(98041); +/** + * The code to exit an action + */ +var ExitCode; +(function (ExitCode) { + /** + * A code indicating that the action was successful + */ + ExitCode[ExitCode["Success"] = 0] = "Success"; + /** + * A code indicating that the action was a failure + */ + ExitCode[ExitCode["Failure"] = 1] = "Failure"; +})(ExitCode = exports.ExitCode || (exports.ExitCode = {})); +//----------------------------------------------------------------------- +// Variables +//----------------------------------------------------------------------- +/** + * Sets env variable for this action and future actions in the job + * @param name the name of the variable to set + * @param val the value of the variable. Non-string values will be converted to a string via JSON.stringify + */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function exportVariable(name, val) { + const convertedVal = utils_1.toCommandValue(val); + process.env[name] = convertedVal; + const filePath = process.env['GITHUB_ENV'] || ''; + if (filePath) { + return file_command_1.issueFileCommand('ENV', file_command_1.prepareKeyValueMessage(name, val)); + } + command_1.issueCommand('set-env', { name }, convertedVal); +} +exports.exportVariable = exportVariable; +/** + * Registers a secret which will get masked from logs + * @param secret value of the secret + */ +function setSecret(secret) { + command_1.issueCommand('add-mask', {}, secret); +} +exports.setSecret = setSecret; +/** + * Prepends inputPath to the PATH (for this action and future actions) + * @param inputPath + */ +function addPath(inputPath) { + const filePath = process.env['GITHUB_PATH'] || ''; + if (filePath) { + file_command_1.issueFileCommand('PATH', inputPath); + } + else { + command_1.issueCommand('add-path', {}, inputPath); + } + process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`; +} +exports.addPath = addPath; +/** + * Gets the value of an input. + * Unless trimWhitespace is set to false in InputOptions, the value is also trimmed. + * Returns an empty string if the value is not defined. + * + * @param name name of the input to get + * @param options optional. See InputOptions. + * @returns string + */ +function getInput(name, options) { + const val = process.env[`INPUT_${name.replace(/ /g, '_').toUpperCase()}`] || ''; + if (options && options.required && !val) { + throw new Error(`Input required and not supplied: ${name}`); + } + if (options && options.trimWhitespace === false) { + return val; + } + return val.trim(); +} +exports.getInput = getInput; +/** + * Gets the values of an multiline input. Each value is also trimmed. + * + * @param name name of the input to get + * @param options optional. See InputOptions. + * @returns string[] + * + */ +function getMultilineInput(name, options) { + const inputs = getInput(name, options) + .split('\n') + .filter(x => x !== ''); + if (options && options.trimWhitespace === false) { + return inputs; + } + return inputs.map(input => input.trim()); +} +exports.getMultilineInput = getMultilineInput; +/** + * Gets the input value of the boolean type in the YAML 1.2 "core schema" specification. + * Support boolean input list: `true | True | TRUE | false | False | FALSE` . + * The return value is also in boolean type. + * ref: https://yaml.org/spec/1.2/spec.html#id2804923 + * + * @param name name of the input to get + * @param options optional. See InputOptions. + * @returns boolean + */ +function getBooleanInput(name, options) { + const trueValue = ['true', 'True', 'TRUE']; + const falseValue = ['false', 'False', 'FALSE']; + const val = getInput(name, options); + if (trueValue.includes(val)) + return true; + if (falseValue.includes(val)) + return false; + throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name}\n` + + `Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); +} +exports.getBooleanInput = getBooleanInput; +/** + * Sets the value of an output. + * + * @param name name of the output to set + * @param value value to store. Non-string values will be converted to a string via JSON.stringify + */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function setOutput(name, value) { + const filePath = process.env['GITHUB_OUTPUT'] || ''; + if (filePath) { + return file_command_1.issueFileCommand('OUTPUT', file_command_1.prepareKeyValueMessage(name, value)); + } + process.stdout.write(os.EOL); + command_1.issueCommand('set-output', { name }, utils_1.toCommandValue(value)); +} +exports.setOutput = setOutput; +/** + * Enables or disables the echoing of commands into stdout for the rest of the step. + * Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set. + * + */ +function setCommandEcho(enabled) { + command_1.issue('echo', enabled ? 'on' : 'off'); +} +exports.setCommandEcho = setCommandEcho; +//----------------------------------------------------------------------- +// Results +//----------------------------------------------------------------------- +/** + * Sets the action status to failed. + * When the action exits it will be with an exit code of 1 + * @param message add error issue message + */ +function setFailed(message) { + process.exitCode = ExitCode.Failure; + error(message); +} +exports.setFailed = setFailed; +//----------------------------------------------------------------------- +// Logging Commands +//----------------------------------------------------------------------- +/** + * Gets whether Actions Step Debug is on or not + */ +function isDebug() { + return process.env['RUNNER_DEBUG'] === '1'; +} +exports.isDebug = isDebug; +/** + * Writes debug message to user log + * @param message debug message + */ +function debug(message) { + command_1.issueCommand('debug', {}, message); +} +exports.debug = debug; +/** + * Adds an error issue + * @param message error issue message. Errors will be converted to string via toString() + * @param properties optional properties to add to the annotation. + */ +function error(message, properties = {}) { + command_1.issueCommand('error', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); +} +exports.error = error; +/** + * Adds a warning issue + * @param message warning issue message. Errors will be converted to string via toString() + * @param properties optional properties to add to the annotation. + */ +function warning(message, properties = {}) { + command_1.issueCommand('warning', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); +} +exports.warning = warning; +/** + * Adds a notice issue + * @param message notice issue message. Errors will be converted to string via toString() + * @param properties optional properties to add to the annotation. + */ +function notice(message, properties = {}) { + command_1.issueCommand('notice', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); +} +exports.notice = notice; +/** + * Writes info to log with console.log. + * @param message info message + */ +function info(message) { + process.stdout.write(message + os.EOL); +} +exports.info = info; +/** + * Begin an output group. + * + * Output until the next `groupEnd` will be foldable in this group + * + * @param name The name of the output group + */ +function startGroup(name) { + command_1.issue('group', name); +} +exports.startGroup = startGroup; +/** + * End an output group. + */ +function endGroup() { + command_1.issue('endgroup'); +} +exports.endGroup = endGroup; +/** + * Wrap an asynchronous function call in a group. + * + * Returns the same type as the function itself. + * + * @param name The name of the group + * @param fn The function to wrap in the group + */ +function group(name, fn) { + return __awaiter(this, void 0, void 0, function* () { + startGroup(name); + let result; try { - const build = await runBuild(); - core.setOutput("aws-build-id", build.id); - - // Signal the outcome - assert( - build.buildStatus === "SUCCEEDED", - `Build status: ${build.buildStatus}` - ); - } catch (error) { - core.setFailed(error.message); - } finally { - console.log("*****CODEBUILD COMPLETE*****"); + result = yield fn(); } - } - - /***/ - }, - - /***/ 87351: /***/ function ( - __unused_webpack_module, - exports, - __nccwpck_require__ - ) { - "use strict"; - - var __createBinding = - (this && this.__createBinding) || - (Object.create - ? function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { - enumerable: true, - get: function () { - return m[k]; - }, - }); - } - : function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; + finally { + endGroup(); + } + return result; + }); +} +exports.group = group; +//----------------------------------------------------------------------- +// Wrapper action state +//----------------------------------------------------------------------- +/** + * Saves state for current action, the state can only be retrieved by this action's post job execution. + * + * @param name name of the state to store + * @param value value to store. Non-string values will be converted to a string via JSON.stringify + */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function saveState(name, value) { + const filePath = process.env['GITHUB_STATE'] || ''; + if (filePath) { + return file_command_1.issueFileCommand('STATE', file_command_1.prepareKeyValueMessage(name, value)); + } + command_1.issueCommand('save-state', { name }, utils_1.toCommandValue(value)); +} +exports.saveState = saveState; +/** + * Gets the value of an state set by this action's main execution. + * + * @param name name of the state to get + * @returns string + */ +function getState(name) { + return process.env[`STATE_${name}`] || ''; +} +exports.getState = getState; +function getIDToken(aud) { + return __awaiter(this, void 0, void 0, function* () { + return yield oidc_utils_1.OidcClient.getIDToken(aud); + }); +} +exports.getIDToken = getIDToken; +/** + * Summary exports + */ +var summary_1 = __nccwpck_require__(81327); +Object.defineProperty(exports, "summary", ({ enumerable: true, get: function () { return summary_1.summary; } })); +/** + * @deprecated use core.summary + */ +var summary_2 = __nccwpck_require__(81327); +Object.defineProperty(exports, "markdownSummary", ({ enumerable: true, get: function () { return summary_2.markdownSummary; } })); +/** + * Path exports + */ +var path_utils_1 = __nccwpck_require__(2981); +Object.defineProperty(exports, "toPosixPath", ({ enumerable: true, get: function () { return path_utils_1.toPosixPath; } })); +Object.defineProperty(exports, "toWin32Path", ({ enumerable: true, get: function () { return path_utils_1.toWin32Path; } })); +Object.defineProperty(exports, "toPlatformPath", ({ enumerable: true, get: function () { return path_utils_1.toPlatformPath; } })); +//# sourceMappingURL=core.js.map + +/***/ }), + +/***/ 717: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +// For internal use, subject to change. +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.prepareKeyValueMessage = exports.issueFileCommand = void 0; +// We use any as a valid input type +/* eslint-disable @typescript-eslint/no-explicit-any */ +const fs = __importStar(__nccwpck_require__(57147)); +const os = __importStar(__nccwpck_require__(22037)); +const uuid_1 = __nccwpck_require__(78974); +const utils_1 = __nccwpck_require__(5278); +function issueFileCommand(command, message) { + const filePath = process.env[`GITHUB_${command}`]; + if (!filePath) { + throw new Error(`Unable to find environment variable for file command ${command}`); + } + if (!fs.existsSync(filePath)) { + throw new Error(`Missing file at path: ${filePath}`); + } + fs.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os.EOL}`, { + encoding: 'utf8' + }); +} +exports.issueFileCommand = issueFileCommand; +function prepareKeyValueMessage(key, value) { + const delimiter = `ghadelimiter_${uuid_1.v4()}`; + const convertedValue = utils_1.toCommandValue(value); + // These should realistically never happen, but just in case someone finds a + // way to exploit uuid generation let's not allow keys or values that contain + // the delimiter. + if (key.includes(delimiter)) { + throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); + } + if (convertedValue.includes(delimiter)) { + throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); + } + return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`; +} +exports.prepareKeyValueMessage = prepareKeyValueMessage; +//# sourceMappingURL=file-command.js.map + +/***/ }), + +/***/ 98041: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.OidcClient = void 0; +const http_client_1 = __nccwpck_require__(11404); +const auth_1 = __nccwpck_require__(36758); +const core_1 = __nccwpck_require__(42186); +class OidcClient { + static createHttpClient(allowRetry = true, maxRetry = 10) { + const requestOptions = { + allowRetries: allowRetry, + maxRetries: maxRetry + }; + return new http_client_1.HttpClient('actions/oidc-client', [new auth_1.BearerCredentialHandler(OidcClient.getRequestToken())], requestOptions); + } + static getRequestToken() { + const token = process.env['ACTIONS_ID_TOKEN_REQUEST_TOKEN']; + if (!token) { + throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable'); + } + return token; + } + static getIDTokenUrl() { + const runtimeUrl = process.env['ACTIONS_ID_TOKEN_REQUEST_URL']; + if (!runtimeUrl) { + throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable'); + } + return runtimeUrl; + } + static getCall(id_token_url) { + var _a; + return __awaiter(this, void 0, void 0, function* () { + const httpclient = OidcClient.createHttpClient(); + const res = yield httpclient + .getJson(id_token_url) + .catch(error => { + throw new Error(`Failed to get ID Token. \n + Error Code : ${error.statusCode}\n + Error Message: ${error.result.message}`); }); - var __setModuleDefault = - (this && this.__setModuleDefault) || - (Object.create - ? function (o, v) { - Object.defineProperty(o, "default", { - enumerable: true, - value: v, - }); + const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; + if (!id_token) { + throw new Error('Response json body do not have ID Token field'); } - : function (o, v) { - o["default"] = v; - }); - var __importStar = - (this && this.__importStar) || - function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) - for (var k in mod) - if (k !== "default" && Object.hasOwnProperty.call(mod, k)) - __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; - }; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.issue = exports.issueCommand = void 0; - const os = __importStar(__nccwpck_require__(22037)); - const utils_1 = __nccwpck_require__(5278); - /** - * Commands - * - * Command Format: - * ::name key=value,key=value::message - * - * Examples: - * ::warning::This is the message - * ::set-env name=MY_VAR::some value - */ - function issueCommand(command, properties, message) { - const cmd = new Command(command, properties, message); - process.stdout.write(cmd.toString() + os.EOL); - } - exports.issueCommand = issueCommand; - function issue(name, message = "") { - issueCommand(name, {}, message); - } - exports.issue = issue; - const CMD_STRING = "::"; - class Command { - constructor(command, properties, message) { - if (!command) { - command = "missing.command"; - } - this.command = command; - this.properties = properties; - this.message = message; - } - toString() { - let cmdStr = CMD_STRING + this.command; - if (this.properties && Object.keys(this.properties).length > 0) { - cmdStr += " "; - let first = true; - for (const key in this.properties) { - if (this.properties.hasOwnProperty(key)) { - const val = this.properties[key]; - if (val) { - if (first) { - first = false; - } else { - cmdStr += ","; - } - cmdStr += `${key}=${escapeProperty(val)}`; + return id_token; + }); + } + static getIDToken(audience) { + return __awaiter(this, void 0, void 0, function* () { + try { + // New ID Token is requested from action service + let id_token_url = OidcClient.getIDTokenUrl(); + if (audience) { + const encodedAudience = encodeURIComponent(audience); + id_token_url = `${id_token_url}&audience=${encodedAudience}`; } - } + core_1.debug(`ID token url is ${id_token_url}`); + const id_token = yield OidcClient.getCall(id_token_url); + core_1.setSecret(id_token); + return id_token; } - } - cmdStr += `${CMD_STRING}${escapeData(this.message)}`; - return cmdStr; - } - } - function escapeData(s) { - return utils_1 - .toCommandValue(s) - .replace(/%/g, "%25") - .replace(/\r/g, "%0D") - .replace(/\n/g, "%0A"); - } - function escapeProperty(s) { - return utils_1 - .toCommandValue(s) - .replace(/%/g, "%25") - .replace(/\r/g, "%0D") - .replace(/\n/g, "%0A") - .replace(/:/g, "%3A") - .replace(/,/g, "%2C"); - } - //# sourceMappingURL=command.js.map - - /***/ - }, - - /***/ 42186: /***/ function ( - __unused_webpack_module, - exports, - __nccwpck_require__ - ) { - "use strict"; - - var __createBinding = - (this && this.__createBinding) || - (Object.create - ? function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { - enumerable: true, - get: function () { - return m[k]; - }, - }); + catch (error) { + throw new Error(`Error message: ${error.message}`); } - : function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; - }); - var __setModuleDefault = - (this && this.__setModuleDefault) || - (Object.create - ? function (o, v) { - Object.defineProperty(o, "default", { - enumerable: true, - value: v, - }); + }); + } +} +exports.OidcClient = OidcClient; +//# sourceMappingURL=oidc-utils.js.map + +/***/ }), + +/***/ 2981: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = void 0; +const path = __importStar(__nccwpck_require__(71017)); +/** + * toPosixPath converts the given path to the posix form. On Windows, \\ will be + * replaced with /. + * + * @param pth. Path to transform. + * @return string Posix path. + */ +function toPosixPath(pth) { + return pth.replace(/[\\]/g, '/'); +} +exports.toPosixPath = toPosixPath; +/** + * toWin32Path converts the given path to the win32 form. On Linux, / will be + * replaced with \\. + * + * @param pth. Path to transform. + * @return string Win32 path. + */ +function toWin32Path(pth) { + return pth.replace(/[/]/g, '\\'); +} +exports.toWin32Path = toWin32Path; +/** + * toPlatformPath converts the given path to a platform-specific path. It does + * this by replacing instances of / and \ with the platform-specific path + * separator. + * + * @param pth The path to platformize. + * @return string The platform-specific path. + */ +function toPlatformPath(pth) { + return pth.replace(/[/\\]/g, path.sep); +} +exports.toPlatformPath = toPlatformPath; +//# sourceMappingURL=path-utils.js.map + +/***/ }), + +/***/ 81327: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.summary = exports.markdownSummary = exports.SUMMARY_DOCS_URL = exports.SUMMARY_ENV_VAR = void 0; +const os_1 = __nccwpck_require__(22037); +const fs_1 = __nccwpck_require__(57147); +const { access, appendFile, writeFile } = fs_1.promises; +exports.SUMMARY_ENV_VAR = 'GITHUB_STEP_SUMMARY'; +exports.SUMMARY_DOCS_URL = 'https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary'; +class Summary { + constructor() { + this._buffer = ''; + } + /** + * Finds the summary file path from the environment, rejects if env var is not found or file does not exist + * Also checks r/w permissions. + * + * @returns step summary file path + */ + filePath() { + return __awaiter(this, void 0, void 0, function* () { + if (this._filePath) { + return this._filePath; } - : function (o, v) { - o["default"] = v; - }); - var __importStar = - (this && this.__importStar) || - function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) - for (var k in mod) - if (k !== "default" && Object.hasOwnProperty.call(mod, k)) - __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; - }; - var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } + const pathFromEnv = process.env[exports.SUMMARY_ENV_VAR]; + if (!pathFromEnv) { + throw new Error(`Unable to find environment variable for $${exports.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } + try { + yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK); } - function step(result) { - result.done - ? resolve(result.value) - : adopt(result.value).then(fulfilled, rejected); + catch (_a) { + throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); } - step( - (generator = generator.apply(thisArg, _arguments || [])).next() - ); - }); - }; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0; - const command_1 = __nccwpck_require__(87351); - const file_command_1 = __nccwpck_require__(717); - const utils_1 = __nccwpck_require__(5278); - const os = __importStar(__nccwpck_require__(22037)); - const path = __importStar(__nccwpck_require__(71017)); - const oidc_utils_1 = __nccwpck_require__(98041); - /** - * The code to exit an action - */ - var ExitCode; - (function (ExitCode) { - /** - * A code indicating that the action was successful - */ - ExitCode[(ExitCode["Success"] = 0)] = "Success"; - /** - * A code indicating that the action was a failure - */ - ExitCode[(ExitCode["Failure"] = 1)] = "Failure"; - })((ExitCode = exports.ExitCode || (exports.ExitCode = {}))); - //----------------------------------------------------------------------- - // Variables - //----------------------------------------------------------------------- - /** - * Sets env variable for this action and future actions in the job - * @param name the name of the variable to set - * @param val the value of the variable. Non-string values will be converted to a string via JSON.stringify - */ - // eslint-disable-next-line @typescript-eslint/no-explicit-any - function exportVariable(name, val) { - const convertedVal = utils_1.toCommandValue(val); - process.env[name] = convertedVal; - const filePath = process.env["GITHUB_ENV"] || ""; - if (filePath) { - return file_command_1.issueFileCommand( - "ENV", - file_command_1.prepareKeyValueMessage(name, val) - ); - } - command_1.issueCommand("set-env", { name }, convertedVal); - } - exports.exportVariable = exportVariable; - /** - * Registers a secret which will get masked from logs - * @param secret value of the secret - */ - function setSecret(secret) { - command_1.issueCommand("add-mask", {}, secret); - } - exports.setSecret = setSecret; - /** - * Prepends inputPath to the PATH (for this action and future actions) - * @param inputPath - */ - function addPath(inputPath) { - const filePath = process.env["GITHUB_PATH"] || ""; - if (filePath) { - file_command_1.issueFileCommand("PATH", inputPath); - } else { - command_1.issueCommand("add-path", {}, inputPath); - } - process.env[ - "PATH" - ] = `${inputPath}${path.delimiter}${process.env["PATH"]}`; - } - exports.addPath = addPath; - /** - * Gets the value of an input. - * Unless trimWhitespace is set to false in InputOptions, the value is also trimmed. - * Returns an empty string if the value is not defined. - * - * @param name name of the input to get - * @param options optional. See InputOptions. - * @returns string - */ - function getInput(name, options) { - const val = - process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; - if (options && options.required && !val) { - throw new Error(`Input required and not supplied: ${name}`); - } - if (options && options.trimWhitespace === false) { - return val; - } - return val.trim(); - } - exports.getInput = getInput; - /** - * Gets the values of an multiline input. Each value is also trimmed. - * - * @param name name of the input to get - * @param options optional. See InputOptions. - * @returns string[] - * - */ - function getMultilineInput(name, options) { - const inputs = getInput(name, options) - .split("\n") - .filter((x) => x !== ""); - if (options && options.trimWhitespace === false) { - return inputs; - } - return inputs.map((input) => input.trim()); - } - exports.getMultilineInput = getMultilineInput; - /** - * Gets the input value of the boolean type in the YAML 1.2 "core schema" specification. - * Support boolean input list: `true | True | TRUE | false | False | FALSE` . - * The return value is also in boolean type. - * ref: https://yaml.org/spec/1.2/spec.html#id2804923 - * - * @param name name of the input to get - * @param options optional. See InputOptions. - * @returns boolean - */ - function getBooleanInput(name, options) { - const trueValue = ["true", "True", "TRUE"]; - const falseValue = ["false", "False", "FALSE"]; - const val = getInput(name, options); - if (trueValue.includes(val)) return true; - if (falseValue.includes(val)) return false; - throw new TypeError( - `Input does not meet YAML 1.2 "Core Schema" specification: ${name}\n` + - `Support boolean input list: \`true | True | TRUE | false | False | FALSE\`` - ); - } - exports.getBooleanInput = getBooleanInput; - /** - * Sets the value of an output. - * - * @param name name of the output to set - * @param value value to store. Non-string values will be converted to a string via JSON.stringify - */ - // eslint-disable-next-line @typescript-eslint/no-explicit-any - function setOutput(name, value) { - const filePath = process.env["GITHUB_OUTPUT"] || ""; - if (filePath) { - return file_command_1.issueFileCommand( - "OUTPUT", - file_command_1.prepareKeyValueMessage(name, value) - ); + this._filePath = pathFromEnv; + return this._filePath; + }); + } + /** + * Wraps content in an HTML tag, adding any HTML attributes + * + * @param {string} tag HTML tag to wrap + * @param {string | null} content content within the tag + * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add + * + * @returns {string} content wrapped in HTML element + */ + wrap(tag, content, attrs = {}) { + const htmlAttrs = Object.entries(attrs) + .map(([key, value]) => ` ${key}="${value}"`) + .join(''); + if (!content) { + return `<${tag}${htmlAttrs}>`; } - process.stdout.write(os.EOL); - command_1.issueCommand( - "set-output", - { name }, - utils_1.toCommandValue(value) - ); - } - exports.setOutput = setOutput; - /** - * Enables or disables the echoing of commands into stdout for the rest of the step. - * Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set. - * - */ - function setCommandEcho(enabled) { - command_1.issue("echo", enabled ? "on" : "off"); - } - exports.setCommandEcho = setCommandEcho; - //----------------------------------------------------------------------- - // Results - //----------------------------------------------------------------------- - /** - * Sets the action status to failed. - * When the action exits it will be with an exit code of 1 - * @param message add error issue message - */ - function setFailed(message) { - process.exitCode = ExitCode.Failure; - error(message); - } - exports.setFailed = setFailed; - //----------------------------------------------------------------------- - // Logging Commands - //----------------------------------------------------------------------- - /** - * Gets whether Actions Step Debug is on or not - */ - function isDebug() { - return process.env["RUNNER_DEBUG"] === "1"; - } - exports.isDebug = isDebug; - /** - * Writes debug message to user log - * @param message debug message - */ - function debug(message) { - command_1.issueCommand("debug", {}, message); - } - exports.debug = debug; - /** - * Adds an error issue - * @param message error issue message. Errors will be converted to string via toString() - * @param properties optional properties to add to the annotation. - */ - function error(message, properties = {}) { - command_1.issueCommand( - "error", - utils_1.toCommandProperties(properties), - message instanceof Error ? message.toString() : message - ); - } - exports.error = error; - /** - * Adds a warning issue - * @param message warning issue message. Errors will be converted to string via toString() - * @param properties optional properties to add to the annotation. - */ - function warning(message, properties = {}) { - command_1.issueCommand( - "warning", - utils_1.toCommandProperties(properties), - message instanceof Error ? message.toString() : message - ); - } - exports.warning = warning; - /** - * Adds a notice issue - * @param message notice issue message. Errors will be converted to string via toString() - * @param properties optional properties to add to the annotation. - */ - function notice(message, properties = {}) { - command_1.issueCommand( - "notice", - utils_1.toCommandProperties(properties), - message instanceof Error ? message.toString() : message - ); - } - exports.notice = notice; - /** - * Writes info to log with console.log. - * @param message info message - */ - function info(message) { - process.stdout.write(message + os.EOL); - } - exports.info = info; - /** - * Begin an output group. - * - * Output until the next `groupEnd` will be foldable in this group - * - * @param name The name of the output group - */ - function startGroup(name) { - command_1.issue("group", name); - } - exports.startGroup = startGroup; - /** - * End an output group. - */ - function endGroup() { - command_1.issue("endgroup"); - } - exports.endGroup = endGroup; - /** - * Wrap an asynchronous function call in a group. - * - * Returns the same type as the function itself. - * - * @param name The name of the group - * @param fn The function to wrap in the group - */ - function group(name, fn) { + return `<${tag}${htmlAttrs}>${content}`; + } + /** + * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. + * + * @param {SummaryWriteOptions} [options] (optional) options for write operation + * + * @returns {Promise} summary instance + */ + write(options) { return __awaiter(this, void 0, void 0, function* () { - startGroup(name); - let result; - try { - result = yield fn(); - } finally { - endGroup(); - } - return result; + const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); + const filePath = yield this.filePath(); + const writeFunc = overwrite ? writeFile : appendFile; + yield writeFunc(filePath, this._buffer, { encoding: 'utf8' }); + return this.emptyBuffer(); }); - } - exports.group = group; - //----------------------------------------------------------------------- - // Wrapper action state - //----------------------------------------------------------------------- - /** - * Saves state for current action, the state can only be retrieved by this action's post job execution. - * - * @param name name of the state to store - * @param value value to store. Non-string values will be converted to a string via JSON.stringify - */ - // eslint-disable-next-line @typescript-eslint/no-explicit-any - function saveState(name, value) { - const filePath = process.env["GITHUB_STATE"] || ""; - if (filePath) { - return file_command_1.issueFileCommand( - "STATE", - file_command_1.prepareKeyValueMessage(name, value) - ); - } - command_1.issueCommand( - "save-state", - { name }, - utils_1.toCommandValue(value) - ); - } - exports.saveState = saveState; - /** - * Gets the value of an state set by this action's main execution. - * - * @param name name of the state to get - * @returns string - */ - function getState(name) { - return process.env[`STATE_${name}`] || ""; - } - exports.getState = getState; - function getIDToken(aud) { + } + /** + * Clears the summary buffer and wipes the summary file + * + * @returns {Summary} summary instance + */ + clear() { return __awaiter(this, void 0, void 0, function* () { - return yield oidc_utils_1.OidcClient.getIDToken(aud); + return this.emptyBuffer().write({ overwrite: true }); }); - } - exports.getIDToken = getIDToken; - /** - * Summary exports - */ - var summary_1 = __nccwpck_require__(81327); - Object.defineProperty(exports, "summary", { - enumerable: true, - get: function () { - return summary_1.summary; - }, - }); - /** - * @deprecated use core.summary - */ - var summary_2 = __nccwpck_require__(81327); - Object.defineProperty(exports, "markdownSummary", { - enumerable: true, - get: function () { - return summary_2.markdownSummary; - }, - }); - /** - * Path exports - */ - var path_utils_1 = __nccwpck_require__(2981); - Object.defineProperty(exports, "toPosixPath", { - enumerable: true, - get: function () { - return path_utils_1.toPosixPath; - }, - }); - Object.defineProperty(exports, "toWin32Path", { - enumerable: true, - get: function () { - return path_utils_1.toWin32Path; - }, - }); - Object.defineProperty(exports, "toPlatformPath", { - enumerable: true, - get: function () { - return path_utils_1.toPlatformPath; - }, - }); - //# sourceMappingURL=core.js.map + } + /** + * Returns the current summary buffer as a string + * + * @returns {string} string of summary buffer + */ + stringify() { + return this._buffer; + } + /** + * If the summary buffer is empty + * + * @returns {boolen} true if the buffer is empty + */ + isEmptyBuffer() { + return this._buffer.length === 0; + } + /** + * Resets the summary buffer without writing to summary file + * + * @returns {Summary} summary instance + */ + emptyBuffer() { + this._buffer = ''; + return this; + } + /** + * Adds raw text to the summary buffer + * + * @param {string} text content to add + * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) + * + * @returns {Summary} summary instance + */ + addRaw(text, addEOL = false) { + this._buffer += text; + return addEOL ? this.addEOL() : this; + } + /** + * Adds the operating system-specific end-of-line marker to the buffer + * + * @returns {Summary} summary instance + */ + addEOL() { + return this.addRaw(os_1.EOL); + } + /** + * Adds an HTML codeblock to the summary buffer + * + * @param {string} code content to render within fenced code block + * @param {string} lang (optional) language to syntax highlight code + * + * @returns {Summary} summary instance + */ + addCodeBlock(code, lang) { + const attrs = Object.assign({}, (lang && { lang })); + const element = this.wrap('pre', this.wrap('code', code), attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML list to the summary buffer + * + * @param {string[]} items list of items to render + * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) + * + * @returns {Summary} summary instance + */ + addList(items, ordered = false) { + const tag = ordered ? 'ol' : 'ul'; + const listItems = items.map(item => this.wrap('li', item)).join(''); + const element = this.wrap(tag, listItems); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML table to the summary buffer + * + * @param {SummaryTableCell[]} rows table rows + * + * @returns {Summary} summary instance + */ + addTable(rows) { + const tableBody = rows + .map(row => { + const cells = row + .map(cell => { + if (typeof cell === 'string') { + return this.wrap('td', cell); + } + const { header, data, colspan, rowspan } = cell; + const tag = header ? 'th' : 'td'; + const attrs = Object.assign(Object.assign({}, (colspan && { colspan })), (rowspan && { rowspan })); + return this.wrap(tag, data, attrs); + }) + .join(''); + return this.wrap('tr', cells); + }) + .join(''); + const element = this.wrap('table', tableBody); + return this.addRaw(element).addEOL(); + } + /** + * Adds a collapsable HTML details element to the summary buffer + * + * @param {string} label text for the closed state + * @param {string} content collapsable content + * + * @returns {Summary} summary instance + */ + addDetails(label, content) { + const element = this.wrap('details', this.wrap('summary', label) + content); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML image tag to the summary buffer + * + * @param {string} src path to the image you to embed + * @param {string} alt text description of the image + * @param {SummaryImageOptions} options (optional) addition image attributes + * + * @returns {Summary} summary instance + */ + addImage(src, alt, options) { + const { width, height } = options || {}; + const attrs = Object.assign(Object.assign({}, (width && { width })), (height && { height })); + const element = this.wrap('img', null, Object.assign({ src, alt }, attrs)); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML section heading element + * + * @param {string} text heading text + * @param {number | string} [level=1] (optional) the heading level, default: 1 + * + * @returns {Summary} summary instance + */ + addHeading(text, level) { + const tag = `h${level}`; + const allowedTag = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'].includes(tag) + ? tag + : 'h1'; + const element = this.wrap(allowedTag, text); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML thematic break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addSeparator() { + const element = this.wrap('hr', null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML line break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addBreak() { + const element = this.wrap('br', null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML blockquote to the summary buffer + * + * @param {string} text quote text + * @param {string} cite (optional) citation url + * + * @returns {Summary} summary instance + */ + addQuote(text, cite) { + const attrs = Object.assign({}, (cite && { cite })); + const element = this.wrap('blockquote', text, attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML anchor tag to the summary buffer + * + * @param {string} text link text/content + * @param {string} href hyperlink + * + * @returns {Summary} summary instance + */ + addLink(text, href) { + const element = this.wrap('a', text, { href }); + return this.addRaw(element).addEOL(); + } +} +const _summary = new Summary(); +/** + * @deprecated use `core.summary` + */ +exports.markdownSummary = _summary; +exports.summary = _summary; +//# sourceMappingURL=summary.js.map - /***/ - }, +/***/ }), - /***/ 717: /***/ function ( - __unused_webpack_module, - exports, - __nccwpck_require__ - ) { - "use strict"; - - // For internal use, subject to change. - var __createBinding = - (this && this.__createBinding) || - (Object.create - ? function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { - enumerable: true, - get: function () { - return m[k]; - }, - }); - } - : function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; - }); - var __setModuleDefault = - (this && this.__setModuleDefault) || - (Object.create - ? function (o, v) { - Object.defineProperty(o, "default", { - enumerable: true, - value: v, - }); - } - : function (o, v) { - o["default"] = v; - }); - var __importStar = - (this && this.__importStar) || - function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) - for (var k in mod) - if (k !== "default" && Object.hasOwnProperty.call(mod, k)) - __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; - }; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.prepareKeyValueMessage = exports.issueFileCommand = void 0; - // We use any as a valid input type - /* eslint-disable @typescript-eslint/no-explicit-any */ - const fs = __importStar(__nccwpck_require__(57147)); - const os = __importStar(__nccwpck_require__(22037)); - const uuid_1 = __nccwpck_require__(78974); - const utils_1 = __nccwpck_require__(5278); - function issueFileCommand(command, message) { - const filePath = process.env[`GITHUB_${command}`]; - if (!filePath) { - throw new Error( - `Unable to find environment variable for file command ${command}` - ); - } - if (!fs.existsSync(filePath)) { - throw new Error(`Missing file at path: ${filePath}`); - } - fs.appendFileSync( - filePath, - `${utils_1.toCommandValue(message)}${os.EOL}`, - { - encoding: "utf8", - } - ); - } - exports.issueFileCommand = issueFileCommand; - function prepareKeyValueMessage(key, value) { - const delimiter = `ghadelimiter_${uuid_1.v4()}`; - const convertedValue = utils_1.toCommandValue(value); - // These should realistically never happen, but just in case someone finds a - // way to exploit uuid generation let's not allow keys or values that contain - // the delimiter. - if (key.includes(delimiter)) { - throw new Error( - `Unexpected input: name should not contain the delimiter "${delimiter}"` - ); - } - if (convertedValue.includes(delimiter)) { - throw new Error( - `Unexpected input: value should not contain the delimiter "${delimiter}"` - ); - } - return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`; - } - exports.prepareKeyValueMessage = prepareKeyValueMessage; - //# sourceMappingURL=file-command.js.map - - /***/ - }, - - /***/ 98041: /***/ function ( - __unused_webpack_module, - exports, - __nccwpck_require__ - ) { - "use strict"; - - var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done - ? resolve(result.value) - : adopt(result.value).then(fulfilled, rejected); - } - step( - (generator = generator.apply(thisArg, _arguments || [])).next() - ); - }); - }; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.OidcClient = void 0; - const http_client_1 = __nccwpck_require__(11404); - const auth_1 = __nccwpck_require__(36758); - const core_1 = __nccwpck_require__(42186); - class OidcClient { - static createHttpClient(allowRetry = true, maxRetry = 10) { - const requestOptions = { - allowRetries: allowRetry, - maxRetries: maxRetry, - }; - return new http_client_1.HttpClient( - "actions/oidc-client", - [new auth_1.BearerCredentialHandler(OidcClient.getRequestToken())], - requestOptions - ); - } - static getRequestToken() { - const token = process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"]; - if (!token) { - throw new Error( - "Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable" - ); - } - return token; - } - static getIDTokenUrl() { - const runtimeUrl = process.env["ACTIONS_ID_TOKEN_REQUEST_URL"]; - if (!runtimeUrl) { - throw new Error( - "Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable" - ); - } - return runtimeUrl; - } - static getCall(id_token_url) { - var _a; - return __awaiter(this, void 0, void 0, function* () { - const httpclient = OidcClient.createHttpClient(); - const res = yield httpclient - .getJson(id_token_url) - .catch((error) => { - throw new Error(`Failed to get ID Token. \n - Error Code : ${error.statusCode}\n - Error Message: ${error.result.message}`); - }); - const id_token = - (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; - if (!id_token) { - throw new Error("Response json body do not have ID Token field"); - } - return id_token; - }); - } - static getIDToken(audience) { - return __awaiter(this, void 0, void 0, function* () { - try { - // New ID Token is requested from action service - let id_token_url = OidcClient.getIDTokenUrl(); - if (audience) { - const encodedAudience = encodeURIComponent(audience); - id_token_url = `${id_token_url}&audience=${encodedAudience}`; - } - core_1.debug(`ID token url is ${id_token_url}`); - const id_token = yield OidcClient.getCall(id_token_url); - core_1.setSecret(id_token); - return id_token; - } catch (error) { - throw new Error(`Error message: ${error.message}`); - } - }); - } - } - exports.OidcClient = OidcClient; - //# sourceMappingURL=oidc-utils.js.map - - /***/ - }, - - /***/ 2981: /***/ function ( - __unused_webpack_module, - exports, - __nccwpck_require__ - ) { - "use strict"; - - var __createBinding = - (this && this.__createBinding) || - (Object.create - ? function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { - enumerable: true, - get: function () { - return m[k]; - }, - }); - } - : function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; - }); - var __setModuleDefault = - (this && this.__setModuleDefault) || - (Object.create - ? function (o, v) { - Object.defineProperty(o, "default", { - enumerable: true, - value: v, - }); - } - : function (o, v) { - o["default"] = v; - }); - var __importStar = - (this && this.__importStar) || - function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) - for (var k in mod) - if (k !== "default" && Object.hasOwnProperty.call(mod, k)) - __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; - }; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = void 0; - const path = __importStar(__nccwpck_require__(71017)); - /** - * toPosixPath converts the given path to the posix form. On Windows, \\ will be - * replaced with /. - * - * @param pth. Path to transform. - * @return string Posix path. - */ - function toPosixPath(pth) { - return pth.replace(/[\\]/g, "/"); - } - exports.toPosixPath = toPosixPath; - /** - * toWin32Path converts the given path to the win32 form. On Linux, / will be - * replaced with \\. - * - * @param pth. Path to transform. - * @return string Win32 path. - */ - function toWin32Path(pth) { - return pth.replace(/[/]/g, "\\"); - } - exports.toWin32Path = toWin32Path; - /** - * toPlatformPath converts the given path to a platform-specific path. It does - * this by replacing instances of / and \ with the platform-specific path - * separator. - * - * @param pth The path to platformize. - * @return string The platform-specific path. - */ - function toPlatformPath(pth) { - return pth.replace(/[/\\]/g, path.sep); - } - exports.toPlatformPath = toPlatformPath; - //# sourceMappingURL=path-utils.js.map - - /***/ - }, - - /***/ 81327: /***/ function ( - __unused_webpack_module, - exports, - __nccwpck_require__ - ) { - "use strict"; - - var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done - ? resolve(result.value) - : adopt(result.value).then(fulfilled, rejected); - } - step( - (generator = generator.apply(thisArg, _arguments || [])).next() - ); - }); - }; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.summary = exports.markdownSummary = exports.SUMMARY_DOCS_URL = exports.SUMMARY_ENV_VAR = void 0; - const os_1 = __nccwpck_require__(22037); - const fs_1 = __nccwpck_require__(57147); - const { access, appendFile, writeFile } = fs_1.promises; - exports.SUMMARY_ENV_VAR = "GITHUB_STEP_SUMMARY"; - exports.SUMMARY_DOCS_URL = - "https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary"; - class Summary { - constructor() { - this._buffer = ""; - } - /** - * Finds the summary file path from the environment, rejects if env var is not found or file does not exist - * Also checks r/w permissions. - * - * @returns step summary file path - */ - filePath() { - return __awaiter(this, void 0, void 0, function* () { - if (this._filePath) { - return this._filePath; - } - const pathFromEnv = process.env[exports.SUMMARY_ENV_VAR]; - if (!pathFromEnv) { - throw new Error( - `Unable to find environment variable for $${exports.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.` - ); - } - try { - yield access( - pathFromEnv, - fs_1.constants.R_OK | fs_1.constants.W_OK - ); - } catch (_a) { - throw new Error( - `Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.` - ); - } - this._filePath = pathFromEnv; - return this._filePath; - }); - } - /** - * Wraps content in an HTML tag, adding any HTML attributes - * - * @param {string} tag HTML tag to wrap - * @param {string | null} content content within the tag - * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add - * - * @returns {string} content wrapped in HTML element - */ - wrap(tag, content, attrs = {}) { - const htmlAttrs = Object.entries(attrs) - .map(([key, value]) => ` ${key}="${value}"`) - .join(""); - if (!content) { - return `<${tag}${htmlAttrs}>`; - } - return `<${tag}${htmlAttrs}>${content}`; - } - /** - * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. - * - * @param {SummaryWriteOptions} [options] (optional) options for write operation - * - * @returns {Promise} summary instance - */ - write(options) { - return __awaiter(this, void 0, void 0, function* () { - const overwrite = !!(options === null || options === void 0 - ? void 0 - : options.overwrite); - const filePath = yield this.filePath(); - const writeFunc = overwrite ? writeFile : appendFile; - yield writeFunc(filePath, this._buffer, { encoding: "utf8" }); - return this.emptyBuffer(); - }); - } - /** - * Clears the summary buffer and wipes the summary file - * - * @returns {Summary} summary instance - */ - clear() { - return __awaiter(this, void 0, void 0, function* () { - return this.emptyBuffer().write({ overwrite: true }); - }); - } - /** - * Returns the current summary buffer as a string - * - * @returns {string} string of summary buffer - */ - stringify() { - return this._buffer; - } - /** - * If the summary buffer is empty - * - * @returns {boolen} true if the buffer is empty - */ - isEmptyBuffer() { - return this._buffer.length === 0; - } - /** - * Resets the summary buffer without writing to summary file - * - * @returns {Summary} summary instance - */ - emptyBuffer() { - this._buffer = ""; - return this; - } - /** - * Adds raw text to the summary buffer - * - * @param {string} text content to add - * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) - * - * @returns {Summary} summary instance - */ - addRaw(text, addEOL = false) { - this._buffer += text; - return addEOL ? this.addEOL() : this; - } - /** - * Adds the operating system-specific end-of-line marker to the buffer - * - * @returns {Summary} summary instance - */ - addEOL() { - return this.addRaw(os_1.EOL); - } - /** - * Adds an HTML codeblock to the summary buffer - * - * @param {string} code content to render within fenced code block - * @param {string} lang (optional) language to syntax highlight code - * - * @returns {Summary} summary instance - */ - addCodeBlock(code, lang) { - const attrs = Object.assign({}, lang && { lang }); - const element = this.wrap("pre", this.wrap("code", code), attrs); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML list to the summary buffer - * - * @param {string[]} items list of items to render - * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) - * - * @returns {Summary} summary instance - */ - addList(items, ordered = false) { - const tag = ordered ? "ol" : "ul"; - const listItems = items.map((item) => this.wrap("li", item)).join(""); - const element = this.wrap(tag, listItems); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML table to the summary buffer - * - * @param {SummaryTableCell[]} rows table rows - * - * @returns {Summary} summary instance - */ - addTable(rows) { - const tableBody = rows - .map((row) => { - const cells = row - .map((cell) => { - if (typeof cell === "string") { - return this.wrap("td", cell); - } - const { header, data, colspan, rowspan } = cell; - const tag = header ? "th" : "td"; - const attrs = Object.assign( - Object.assign({}, colspan && { colspan }), - rowspan && { rowspan } - ); - return this.wrap(tag, data, attrs); - }) - .join(""); - return this.wrap("tr", cells); - }) - .join(""); - const element = this.wrap("table", tableBody); - return this.addRaw(element).addEOL(); - } - /** - * Adds a collapsable HTML details element to the summary buffer - * - * @param {string} label text for the closed state - * @param {string} content collapsable content - * - * @returns {Summary} summary instance - */ - addDetails(label, content) { - const element = this.wrap( - "details", - this.wrap("summary", label) + content - ); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML image tag to the summary buffer - * - * @param {string} src path to the image you to embed - * @param {string} alt text description of the image - * @param {SummaryImageOptions} options (optional) addition image attributes - * - * @returns {Summary} summary instance - */ - addImage(src, alt, options) { - const { width, height } = options || {}; - const attrs = Object.assign( - Object.assign({}, width && { width }), - height && { height } - ); - const element = this.wrap( - "img", - null, - Object.assign({ src, alt }, attrs) - ); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML section heading element - * - * @param {string} text heading text - * @param {number | string} [level=1] (optional) the heading level, default: 1 - * - * @returns {Summary} summary instance - */ - addHeading(text, level) { - const tag = `h${level}`; - const allowedTag = ["h1", "h2", "h3", "h4", "h5", "h6"].includes(tag) - ? tag - : "h1"; - const element = this.wrap(allowedTag, text); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML thematic break (
) to the summary buffer - * - * @returns {Summary} summary instance - */ - addSeparator() { - const element = this.wrap("hr", null); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML line break (
) to the summary buffer - * - * @returns {Summary} summary instance - */ - addBreak() { - const element = this.wrap("br", null); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML blockquote to the summary buffer - * - * @param {string} text quote text - * @param {string} cite (optional) citation url - * - * @returns {Summary} summary instance - */ - addQuote(text, cite) { - const attrs = Object.assign({}, cite && { cite }); - const element = this.wrap("blockquote", text, attrs); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML anchor tag to the summary buffer - * - * @param {string} text link text/content - * @param {string} href hyperlink - * - * @returns {Summary} summary instance - */ - addLink(text, href) { - const element = this.wrap("a", text, { href }); - return this.addRaw(element).addEOL(); - } - } - const _summary = new Summary(); - /** - * @deprecated use `core.summary` - */ - exports.markdownSummary = _summary; - exports.summary = _summary; - //# sourceMappingURL=summary.js.map - - /***/ - }, - - /***/ 5278: /***/ (__unused_webpack_module, exports) => { - "use strict"; - - // We use any as a valid input type - /* eslint-disable @typescript-eslint/no-explicit-any */ - Object.defineProperty(exports, "__esModule", { value: true }); - exports.toCommandProperties = exports.toCommandValue = void 0; - /** - * Sanitizes an input into a string so it can be passed into issueCommand safely - * @param input input to sanitize into a string - */ - function toCommandValue(input) { - if (input === null || input === undefined) { - return ""; - } else if (typeof input === "string" || input instanceof String) { - return input; - } - return JSON.stringify(input); - } - exports.toCommandValue = toCommandValue; - /** - * - * @param annotationProperties - * @returns The command properties to send with the actual annotation command - * See IssueCommandProperties: https://github.com/actions/runner/blob/main/src/Runner.Worker/ActionCommandManager.cs#L646 - */ - function toCommandProperties(annotationProperties) { - if (!Object.keys(annotationProperties).length) { - return {}; - } - return { - title: annotationProperties.title, - file: annotationProperties.file, - line: annotationProperties.startLine, - endLine: annotationProperties.endLine, - col: annotationProperties.startColumn, - endColumn: annotationProperties.endColumn, - }; - } - exports.toCommandProperties = toCommandProperties; - //# sourceMappingURL=utils.js.map +/***/ 5278: +/***/ ((__unused_webpack_module, exports) => { - /***/ - }, - - /***/ 36758: /***/ function (__unused_webpack_module, exports) { - "use strict"; - - var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done - ? resolve(result.value) - : adopt(result.value).then(fulfilled, rejected); - } - step( - (generator = generator.apply(thisArg, _arguments || [])).next() - ); - }); - }; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.PersonalAccessTokenCredentialHandler = exports.BearerCredentialHandler = exports.BasicCredentialHandler = void 0; - class BasicCredentialHandler { - constructor(username, password) { - this.username = username; - this.password = password; - } - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Basic ${Buffer.from( - `${this.username}:${this.password}` - ).toString("base64")}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - } - exports.BasicCredentialHandler = BasicCredentialHandler; - class BearerCredentialHandler { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Bearer ${this.token}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - } - exports.BearerCredentialHandler = BearerCredentialHandler; - class PersonalAccessTokenCredentialHandler { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Basic ${Buffer.from( - `PAT:${this.token}` - ).toString("base64")}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - } - exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; - //# sourceMappingURL=auth.js.map +"use strict"; - /***/ - }, - - /***/ 11404: /***/ function ( - __unused_webpack_module, - exports, - __nccwpck_require__ - ) { - "use strict"; - - /* eslint-disable @typescript-eslint/no-explicit-any */ - var __createBinding = - (this && this.__createBinding) || - (Object.create - ? function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { - enumerable: true, - get: function () { - return m[k]; - }, - }); - } - : function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; - }); - var __setModuleDefault = - (this && this.__setModuleDefault) || - (Object.create - ? function (o, v) { - Object.defineProperty(o, "default", { - enumerable: true, - value: v, - }); - } - : function (o, v) { - o["default"] = v; - }); - var __importStar = - (this && this.__importStar) || - function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) - for (var k in mod) - if (k !== "default" && Object.hasOwnProperty.call(mod, k)) - __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; - }; - var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done - ? resolve(result.value) - : adopt(result.value).then(fulfilled, rejected); - } - step( - (generator = generator.apply(thisArg, _arguments || [])).next() - ); - }); - }; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.HttpClient = exports.isHttps = exports.HttpClientResponse = exports.HttpClientError = exports.getProxyUrl = exports.MediaTypes = exports.Headers = exports.HttpCodes = void 0; - const http = __importStar(__nccwpck_require__(13685)); - const https = __importStar(__nccwpck_require__(95687)); - const pm = __importStar(__nccwpck_require__(72843)); - const tunnel = __importStar(__nccwpck_require__(74294)); - var HttpCodes; - (function (HttpCodes) { - HttpCodes[(HttpCodes["OK"] = 200)] = "OK"; - HttpCodes[(HttpCodes["MultipleChoices"] = 300)] = "MultipleChoices"; - HttpCodes[(HttpCodes["MovedPermanently"] = 301)] = "MovedPermanently"; - HttpCodes[(HttpCodes["ResourceMoved"] = 302)] = "ResourceMoved"; - HttpCodes[(HttpCodes["SeeOther"] = 303)] = "SeeOther"; - HttpCodes[(HttpCodes["NotModified"] = 304)] = "NotModified"; - HttpCodes[(HttpCodes["UseProxy"] = 305)] = "UseProxy"; - HttpCodes[(HttpCodes["SwitchProxy"] = 306)] = "SwitchProxy"; - HttpCodes[(HttpCodes["TemporaryRedirect"] = 307)] = "TemporaryRedirect"; - HttpCodes[(HttpCodes["PermanentRedirect"] = 308)] = "PermanentRedirect"; - HttpCodes[(HttpCodes["BadRequest"] = 400)] = "BadRequest"; - HttpCodes[(HttpCodes["Unauthorized"] = 401)] = "Unauthorized"; - HttpCodes[(HttpCodes["PaymentRequired"] = 402)] = "PaymentRequired"; - HttpCodes[(HttpCodes["Forbidden"] = 403)] = "Forbidden"; - HttpCodes[(HttpCodes["NotFound"] = 404)] = "NotFound"; - HttpCodes[(HttpCodes["MethodNotAllowed"] = 405)] = "MethodNotAllowed"; - HttpCodes[(HttpCodes["NotAcceptable"] = 406)] = "NotAcceptable"; - HttpCodes[(HttpCodes["ProxyAuthenticationRequired"] = 407)] = - "ProxyAuthenticationRequired"; - HttpCodes[(HttpCodes["RequestTimeout"] = 408)] = "RequestTimeout"; - HttpCodes[(HttpCodes["Conflict"] = 409)] = "Conflict"; - HttpCodes[(HttpCodes["Gone"] = 410)] = "Gone"; - HttpCodes[(HttpCodes["TooManyRequests"] = 429)] = "TooManyRequests"; - HttpCodes[(HttpCodes["InternalServerError"] = 500)] = - "InternalServerError"; - HttpCodes[(HttpCodes["NotImplemented"] = 501)] = "NotImplemented"; - HttpCodes[(HttpCodes["BadGateway"] = 502)] = "BadGateway"; - HttpCodes[(HttpCodes["ServiceUnavailable"] = 503)] = - "ServiceUnavailable"; - HttpCodes[(HttpCodes["GatewayTimeout"] = 504)] = "GatewayTimeout"; - })((HttpCodes = exports.HttpCodes || (exports.HttpCodes = {}))); - var Headers; - (function (Headers) { - Headers["Accept"] = "accept"; - Headers["ContentType"] = "content-type"; - })((Headers = exports.Headers || (exports.Headers = {}))); - var MediaTypes; - (function (MediaTypes) { - MediaTypes["ApplicationJson"] = "application/json"; - })((MediaTypes = exports.MediaTypes || (exports.MediaTypes = {}))); - /** - * Returns the proxy URL, depending upon the supplied url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ - function getProxyUrl(serverUrl) { - const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); - return proxyUrl ? proxyUrl.href : ""; - } - exports.getProxyUrl = getProxyUrl; - const HttpRedirectCodes = [ - HttpCodes.MovedPermanently, - HttpCodes.ResourceMoved, - HttpCodes.SeeOther, - HttpCodes.TemporaryRedirect, - HttpCodes.PermanentRedirect, - ]; - const HttpResponseRetryCodes = [ - HttpCodes.BadGateway, - HttpCodes.ServiceUnavailable, - HttpCodes.GatewayTimeout, - ]; - const RetryableHttpVerbs = ["OPTIONS", "GET", "DELETE", "HEAD"]; - const ExponentialBackoffCeiling = 10; - const ExponentialBackoffTimeSlice = 5; - class HttpClientError extends Error { - constructor(message, statusCode) { - super(message); - this.name = "HttpClientError"; - this.statusCode = statusCode; - Object.setPrototypeOf(this, HttpClientError.prototype); - } - } - exports.HttpClientError = HttpClientError; - class HttpClientResponse { - constructor(message) { - this.message = message; - } - readBody() { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve) => - __awaiter(this, void 0, void 0, function* () { +// We use any as a valid input type +/* eslint-disable @typescript-eslint/no-explicit-any */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.toCommandProperties = exports.toCommandValue = void 0; +/** + * Sanitizes an input into a string so it can be passed into issueCommand safely + * @param input input to sanitize into a string + */ +function toCommandValue(input) { + if (input === null || input === undefined) { + return ''; + } + else if (typeof input === 'string' || input instanceof String) { + return input; + } + return JSON.stringify(input); +} +exports.toCommandValue = toCommandValue; +/** + * + * @param annotationProperties + * @returns The command properties to send with the actual annotation command + * See IssueCommandProperties: https://github.com/actions/runner/blob/main/src/Runner.Worker/ActionCommandManager.cs#L646 + */ +function toCommandProperties(annotationProperties) { + if (!Object.keys(annotationProperties).length) { + return {}; + } + return { + title: annotationProperties.title, + file: annotationProperties.file, + line: annotationProperties.startLine, + endLine: annotationProperties.endLine, + col: annotationProperties.startColumn, + endColumn: annotationProperties.endColumn + }; +} +exports.toCommandProperties = toCommandProperties; +//# sourceMappingURL=utils.js.map + +/***/ }), + +/***/ 36758: +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; + +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.PersonalAccessTokenCredentialHandler = exports.BearerCredentialHandler = exports.BasicCredentialHandler = void 0; +class BasicCredentialHandler { + constructor(username, password) { + this.username = username; + this.password = password; + } + prepareRequest(options) { + if (!options.headers) { + throw Error('The request has no headers'); + } + options.headers['Authorization'] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString('base64')}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter(this, void 0, void 0, function* () { + throw new Error('not implemented'); + }); + } +} +exports.BasicCredentialHandler = BasicCredentialHandler; +class BearerCredentialHandler { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error('The request has no headers'); + } + options.headers['Authorization'] = `Bearer ${this.token}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter(this, void 0, void 0, function* () { + throw new Error('not implemented'); + }); + } +} +exports.BearerCredentialHandler = BearerCredentialHandler; +class PersonalAccessTokenCredentialHandler { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error('The request has no headers'); + } + options.headers['Authorization'] = `Basic ${Buffer.from(`PAT:${this.token}`).toString('base64')}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter(this, void 0, void 0, function* () { + throw new Error('not implemented'); + }); + } +} +exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; +//# sourceMappingURL=auth.js.map + +/***/ }), + +/***/ 11404: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +/* eslint-disable @typescript-eslint/no-explicit-any */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.HttpClient = exports.isHttps = exports.HttpClientResponse = exports.HttpClientError = exports.getProxyUrl = exports.MediaTypes = exports.Headers = exports.HttpCodes = void 0; +const http = __importStar(__nccwpck_require__(13685)); +const https = __importStar(__nccwpck_require__(95687)); +const pm = __importStar(__nccwpck_require__(72843)); +const tunnel = __importStar(__nccwpck_require__(74294)); +var HttpCodes; +(function (HttpCodes) { + HttpCodes[HttpCodes["OK"] = 200] = "OK"; + HttpCodes[HttpCodes["MultipleChoices"] = 300] = "MultipleChoices"; + HttpCodes[HttpCodes["MovedPermanently"] = 301] = "MovedPermanently"; + HttpCodes[HttpCodes["ResourceMoved"] = 302] = "ResourceMoved"; + HttpCodes[HttpCodes["SeeOther"] = 303] = "SeeOther"; + HttpCodes[HttpCodes["NotModified"] = 304] = "NotModified"; + HttpCodes[HttpCodes["UseProxy"] = 305] = "UseProxy"; + HttpCodes[HttpCodes["SwitchProxy"] = 306] = "SwitchProxy"; + HttpCodes[HttpCodes["TemporaryRedirect"] = 307] = "TemporaryRedirect"; + HttpCodes[HttpCodes["PermanentRedirect"] = 308] = "PermanentRedirect"; + HttpCodes[HttpCodes["BadRequest"] = 400] = "BadRequest"; + HttpCodes[HttpCodes["Unauthorized"] = 401] = "Unauthorized"; + HttpCodes[HttpCodes["PaymentRequired"] = 402] = "PaymentRequired"; + HttpCodes[HttpCodes["Forbidden"] = 403] = "Forbidden"; + HttpCodes[HttpCodes["NotFound"] = 404] = "NotFound"; + HttpCodes[HttpCodes["MethodNotAllowed"] = 405] = "MethodNotAllowed"; + HttpCodes[HttpCodes["NotAcceptable"] = 406] = "NotAcceptable"; + HttpCodes[HttpCodes["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; + HttpCodes[HttpCodes["RequestTimeout"] = 408] = "RequestTimeout"; + HttpCodes[HttpCodes["Conflict"] = 409] = "Conflict"; + HttpCodes[HttpCodes["Gone"] = 410] = "Gone"; + HttpCodes[HttpCodes["TooManyRequests"] = 429] = "TooManyRequests"; + HttpCodes[HttpCodes["InternalServerError"] = 500] = "InternalServerError"; + HttpCodes[HttpCodes["NotImplemented"] = 501] = "NotImplemented"; + HttpCodes[HttpCodes["BadGateway"] = 502] = "BadGateway"; + HttpCodes[HttpCodes["ServiceUnavailable"] = 503] = "ServiceUnavailable"; + HttpCodes[HttpCodes["GatewayTimeout"] = 504] = "GatewayTimeout"; +})(HttpCodes = exports.HttpCodes || (exports.HttpCodes = {})); +var Headers; +(function (Headers) { + Headers["Accept"] = "accept"; + Headers["ContentType"] = "content-type"; +})(Headers = exports.Headers || (exports.Headers = {})); +var MediaTypes; +(function (MediaTypes) { + MediaTypes["ApplicationJson"] = "application/json"; +})(MediaTypes = exports.MediaTypes || (exports.MediaTypes = {})); +/** + * Returns the proxy URL, depending upon the supplied url and proxy environment variables. + * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com + */ +function getProxyUrl(serverUrl) { + const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); + return proxyUrl ? proxyUrl.href : ''; +} +exports.getProxyUrl = getProxyUrl; +const HttpRedirectCodes = [ + HttpCodes.MovedPermanently, + HttpCodes.ResourceMoved, + HttpCodes.SeeOther, + HttpCodes.TemporaryRedirect, + HttpCodes.PermanentRedirect +]; +const HttpResponseRetryCodes = [ + HttpCodes.BadGateway, + HttpCodes.ServiceUnavailable, + HttpCodes.GatewayTimeout +]; +const RetryableHttpVerbs = ['OPTIONS', 'GET', 'DELETE', 'HEAD']; +const ExponentialBackoffCeiling = 10; +const ExponentialBackoffTimeSlice = 5; +class HttpClientError extends Error { + constructor(message, statusCode) { + super(message); + this.name = 'HttpClientError'; + this.statusCode = statusCode; + Object.setPrototypeOf(this, HttpClientError.prototype); + } +} +exports.HttpClientError = HttpClientError; +class HttpClientResponse { + constructor(message) { + this.message = message; + } + readBody() { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { let output = Buffer.alloc(0); - this.message.on("data", (chunk) => { - output = Buffer.concat([output, chunk]); + this.message.on('data', (chunk) => { + output = Buffer.concat([output, chunk]); }); - this.message.on("end", () => { - resolve(output.toString()); + this.message.on('end', () => { + resolve(output.toString()); }); - }) - ); - }); - } - } - exports.HttpClientResponse = HttpClientResponse; - function isHttps(requestUrl) { - const parsedUrl = new URL(requestUrl); - return parsedUrl.protocol === "https:"; - } - exports.isHttps = isHttps; - class HttpClient { - constructor(userAgent, handlers, requestOptions) { - this._ignoreSslError = false; - this._allowRedirects = true; - this._allowRedirectDowngrade = false; - this._maxRedirects = 50; - this._allowRetries = false; - this._maxRetries = 1; - this._keepAlive = false; - this._disposed = false; - this.userAgent = userAgent; - this.handlers = handlers || []; - this.requestOptions = requestOptions; - if (requestOptions) { + })); + }); + } +} +exports.HttpClientResponse = HttpClientResponse; +function isHttps(requestUrl) { + const parsedUrl = new URL(requestUrl); + return parsedUrl.protocol === 'https:'; +} +exports.isHttps = isHttps; +class HttpClient { + constructor(userAgent, handlers, requestOptions) { + this._ignoreSslError = false; + this._allowRedirects = true; + this._allowRedirectDowngrade = false; + this._maxRedirects = 50; + this._allowRetries = false; + this._maxRetries = 1; + this._keepAlive = false; + this._disposed = false; + this.userAgent = userAgent; + this.handlers = handlers || []; + this.requestOptions = requestOptions; + if (requestOptions) { if (requestOptions.ignoreSslError != null) { - this._ignoreSslError = requestOptions.ignoreSslError; + this._ignoreSslError = requestOptions.ignoreSslError; } this._socketTimeout = requestOptions.socketTimeout; if (requestOptions.allowRedirects != null) { - this._allowRedirects = requestOptions.allowRedirects; + this._allowRedirects = requestOptions.allowRedirects; } if (requestOptions.allowRedirectDowngrade != null) { - this._allowRedirectDowngrade = - requestOptions.allowRedirectDowngrade; + this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; } if (requestOptions.maxRedirects != null) { - this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); + this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); } if (requestOptions.keepAlive != null) { - this._keepAlive = requestOptions.keepAlive; + this._keepAlive = requestOptions.keepAlive; } if (requestOptions.allowRetries != null) { - this._allowRetries = requestOptions.allowRetries; + this._allowRetries = requestOptions.allowRetries; } if (requestOptions.maxRetries != null) { - this._maxRetries = requestOptions.maxRetries; + this._maxRetries = requestOptions.maxRetries; } - } - } - options(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request( - "OPTIONS", - requestUrl, - null, - additionalHeaders || {} - ); - }); - } - get(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request( - "GET", - requestUrl, - null, - additionalHeaders || {} - ); - }); - } - del(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request( - "DELETE", - requestUrl, - null, - additionalHeaders || {} - ); - }); - } - post(requestUrl, data, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request( - "POST", - requestUrl, - data, - additionalHeaders || {} - ); - }); - } - patch(requestUrl, data, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request( - "PATCH", - requestUrl, - data, - additionalHeaders || {} - ); - }); - } - put(requestUrl, data, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request( - "PUT", - requestUrl, - data, - additionalHeaders || {} - ); - }); - } - head(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request( - "HEAD", - requestUrl, - null, - additionalHeaders || {} - ); - }); } - sendStream(verb, requestUrl, stream, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { + } + options(requestUrl, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('OPTIONS', requestUrl, null, additionalHeaders || {}); + }); + } + get(requestUrl, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('GET', requestUrl, null, additionalHeaders || {}); + }); + } + del(requestUrl, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('DELETE', requestUrl, null, additionalHeaders || {}); + }); + } + post(requestUrl, data, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('POST', requestUrl, data, additionalHeaders || {}); + }); + } + patch(requestUrl, data, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('PATCH', requestUrl, data, additionalHeaders || {}); + }); + } + put(requestUrl, data, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('PUT', requestUrl, data, additionalHeaders || {}); + }); + } + head(requestUrl, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('HEAD', requestUrl, null, additionalHeaders || {}); + }); + } + sendStream(verb, requestUrl, stream, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { return this.request(verb, requestUrl, stream, additionalHeaders); - }); - } - /** - * Gets a typed object from an endpoint - * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise - */ - getJson(requestUrl, additionalHeaders = {}) { - return __awaiter(this, void 0, void 0, function* () { - additionalHeaders[ - Headers.Accept - ] = this._getExistingOrDefaultHeader( - additionalHeaders, - Headers.Accept, - MediaTypes.ApplicationJson - ); + }); + } + /** + * Gets a typed object from an endpoint + * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise + */ + getJson(requestUrl, additionalHeaders = {}) { + return __awaiter(this, void 0, void 0, function* () { + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); const res = yield this.get(requestUrl, additionalHeaders); return this._processResponse(res, this.requestOptions); - }); - } - postJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter(this, void 0, void 0, function* () { + }); + } + postJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); - additionalHeaders[ - Headers.Accept - ] = this._getExistingOrDefaultHeader( - additionalHeaders, - Headers.Accept, - MediaTypes.ApplicationJson - ); - additionalHeaders[ - Headers.ContentType - ] = this._getExistingOrDefaultHeader( - additionalHeaders, - Headers.ContentType, - MediaTypes.ApplicationJson - ); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); const res = yield this.post(requestUrl, data, additionalHeaders); return this._processResponse(res, this.requestOptions); - }); - } - putJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter(this, void 0, void 0, function* () { + }); + } + putJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); - additionalHeaders[ - Headers.Accept - ] = this._getExistingOrDefaultHeader( - additionalHeaders, - Headers.Accept, - MediaTypes.ApplicationJson - ); - additionalHeaders[ - Headers.ContentType - ] = this._getExistingOrDefaultHeader( - additionalHeaders, - Headers.ContentType, - MediaTypes.ApplicationJson - ); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); const res = yield this.put(requestUrl, data, additionalHeaders); return this._processResponse(res, this.requestOptions); - }); - } - patchJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter(this, void 0, void 0, function* () { + }); + } + patchJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); - additionalHeaders[ - Headers.Accept - ] = this._getExistingOrDefaultHeader( - additionalHeaders, - Headers.Accept, - MediaTypes.ApplicationJson - ); - additionalHeaders[ - Headers.ContentType - ] = this._getExistingOrDefaultHeader( - additionalHeaders, - Headers.ContentType, - MediaTypes.ApplicationJson - ); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); const res = yield this.patch(requestUrl, data, additionalHeaders); return this._processResponse(res, this.requestOptions); - }); - } - /** - * Makes a raw http request. - * All other methods such as get, post, patch, and request ultimately call this. - * Prefer get, del, post and patch - */ - request(verb, requestUrl, data, headers) { - return __awaiter(this, void 0, void 0, function* () { + }); + } + /** + * Makes a raw http request. + * All other methods such as get, post, patch, and request ultimately call this. + * Prefer get, del, post and patch + */ + request(verb, requestUrl, data, headers) { + return __awaiter(this, void 0, void 0, function* () { if (this._disposed) { - throw new Error("Client has already been disposed."); + throw new Error('Client has already been disposed.'); } const parsedUrl = new URL(requestUrl); let info = this._prepareRequest(verb, parsedUrl, headers); // Only perform retries on reads since writes may not be idempotent. - const maxTries = - this._allowRetries && RetryableHttpVerbs.includes(verb) + const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; let numTries = 0; let response; do { - response = yield this.requestRaw(info, data); - // Check if it's an authentication challenge - if ( - response && - response.message && - response.message.statusCode === HttpCodes.Unauthorized - ) { - let authenticationHandler; - for (const handler of this.handlers) { - if (handler.canHandleAuthentication(response)) { - authenticationHandler = handler; - break; - } - } - if (authenticationHandler) { - return authenticationHandler.handleAuthentication( - this, - info, - data - ); - } else { - // We have received an unauthorized response but have no handlers to handle it. - // Let the response return to the caller. - return response; + response = yield this.requestRaw(info, data); + // Check if it's an authentication challenge + if (response && + response.message && + response.message.statusCode === HttpCodes.Unauthorized) { + let authenticationHandler; + for (const handler of this.handlers) { + if (handler.canHandleAuthentication(response)) { + authenticationHandler = handler; + break; + } + } + if (authenticationHandler) { + return authenticationHandler.handleAuthentication(this, info, data); + } + else { + // We have received an unauthorized response but have no handlers to handle it. + // Let the response return to the caller. + return response; + } } - } - let redirectsRemaining = this._maxRedirects; - while ( - response.message.statusCode && - HttpRedirectCodes.includes(response.message.statusCode) && - this._allowRedirects && - redirectsRemaining > 0 - ) { - const redirectUrl = response.message.headers["location"]; - if (!redirectUrl) { - // if there's no location to redirect to, we won't - break; + let redirectsRemaining = this._maxRedirects; + while (response.message.statusCode && + HttpRedirectCodes.includes(response.message.statusCode) && + this._allowRedirects && + redirectsRemaining > 0) { + const redirectUrl = response.message.headers['location']; + if (!redirectUrl) { + // if there's no location to redirect to, we won't + break; + } + const parsedRedirectUrl = new URL(redirectUrl); + if (parsedUrl.protocol === 'https:' && + parsedUrl.protocol !== parsedRedirectUrl.protocol && + !this._allowRedirectDowngrade) { + throw new Error('Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.'); + } + // we need to finish reading the response before reassigning response + // which will leak the open socket. + yield response.readBody(); + // strip authorization header if redirected to a different hostname + if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { + for (const header in headers) { + // header names are case insensitive + if (header.toLowerCase() === 'authorization') { + delete headers[header]; + } + } + } + // let's make the request with the new redirectUrl + info = this._prepareRequest(verb, parsedRedirectUrl, headers); + response = yield this.requestRaw(info, data); + redirectsRemaining--; } - const parsedRedirectUrl = new URL(redirectUrl); - if ( - parsedUrl.protocol === "https:" && - parsedUrl.protocol !== parsedRedirectUrl.protocol && - !this._allowRedirectDowngrade - ) { - throw new Error( - "Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true." - ); + if (!response.message.statusCode || + !HttpResponseRetryCodes.includes(response.message.statusCode)) { + // If not a retry code, return immediately instead of retrying + return response; } - // we need to finish reading the response before reassigning response - // which will leak the open socket. - yield response.readBody(); - // strip authorization header if redirected to a different hostname - if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { - for (const header in headers) { - // header names are case insensitive - if (header.toLowerCase() === "authorization") { - delete headers[header]; - } - } + numTries += 1; + if (numTries < maxTries) { + yield response.readBody(); + yield this._performExponentialBackoff(numTries); } - // let's make the request with the new redirectUrl - info = this._prepareRequest(verb, parsedRedirectUrl, headers); - response = yield this.requestRaw(info, data); - redirectsRemaining--; - } - if ( - !response.message.statusCode || - !HttpResponseRetryCodes.includes(response.message.statusCode) - ) { - // If not a retry code, return immediately instead of retrying - return response; - } - numTries += 1; - if (numTries < maxTries) { - yield response.readBody(); - yield this._performExponentialBackoff(numTries); - } } while (numTries < maxTries); return response; - }); - } - /** - * Needs to be called if keepAlive is set to true in request options. - */ - dispose() { - if (this._agent) { + }); + } + /** + * Needs to be called if keepAlive is set to true in request options. + */ + dispose() { + if (this._agent) { this._agent.destroy(); - } - this._disposed = true; - } - /** - * Raw request. - * @param info - * @param data - */ - requestRaw(info, data) { - return __awaiter(this, void 0, void 0, function* () { + } + this._disposed = true; + } + /** + * Raw request. + * @param info + * @param data + */ + requestRaw(info, data) { + return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => { - function callbackForResult(err, res) { - if (err) { - reject(err); - } else if (!res) { - // If `err` is not passed, then `res` must be passed. - reject(new Error("Unknown error")); - } else { - resolve(res); + function callbackForResult(err, res) { + if (err) { + reject(err); + } + else if (!res) { + // If `err` is not passed, then `res` must be passed. + reject(new Error('Unknown error')); + } + else { + resolve(res); + } } - } - this.requestRawWithCallback(info, data, callbackForResult); + this.requestRawWithCallback(info, data, callbackForResult); }); - }); - } - /** - * Raw request with callback. - * @param info - * @param data - * @param onResult - */ - requestRawWithCallback(info, data, onResult) { - if (typeof data === "string") { + }); + } + /** + * Raw request with callback. + * @param info + * @param data + * @param onResult + */ + requestRawWithCallback(info, data, onResult) { + if (typeof data === 'string') { if (!info.options.headers) { - info.options.headers = {}; + info.options.headers = {}; } - info.options.headers["Content-Length"] = Buffer.byteLength( - data, - "utf8" - ); - } - let callbackCalled = false; - function handleResult(err, res) { + info.options.headers['Content-Length'] = Buffer.byteLength(data, 'utf8'); + } + let callbackCalled = false; + function handleResult(err, res) { if (!callbackCalled) { - callbackCalled = true; - onResult(err, res); + callbackCalled = true; + onResult(err, res); } - } - const req = info.httpModule.request(info.options, (msg) => { + } + const req = info.httpModule.request(info.options, (msg) => { const res = new HttpClientResponse(msg); handleResult(undefined, res); - }); - let socket; - req.on("socket", (sock) => { + }); + let socket; + req.on('socket', sock => { socket = sock; - }); - // If we ever get disconnected, we want the socket to timeout eventually - req.setTimeout(this._socketTimeout || 3 * 60000, () => { + }); + // If we ever get disconnected, we want the socket to timeout eventually + req.setTimeout(this._socketTimeout || 3 * 60000, () => { if (socket) { - socket.end(); + socket.end(); } handleResult(new Error(`Request timeout: ${info.options.path}`)); - }); - req.on("error", function (err) { + }); + req.on('error', function (err) { // err has statusCode property // res should have headers handleResult(err); - }); - if (data && typeof data === "string") { - req.write(data, "utf8"); - } - if (data && typeof data !== "string") { - data.on("close", function () { - req.end(); + }); + if (data && typeof data === 'string') { + req.write(data, 'utf8'); + } + if (data && typeof data !== 'string') { + data.on('close', function () { + req.end(); }); data.pipe(req); - } else { + } + else { req.end(); - } } - /** - * Gets an http agent. This function is useful when you need an http agent that handles - * routing through a proxy server - depending upon the url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ - getAgent(serverUrl) { - const parsedUrl = new URL(serverUrl); - return this._getAgent(parsedUrl); - } - _prepareRequest(method, requestUrl, headers) { - const info = {}; - info.parsedUrl = requestUrl; - const usingSsl = info.parsedUrl.protocol === "https:"; - info.httpModule = usingSsl ? https : http; - const defaultPort = usingSsl ? 443 : 80; - info.options = {}; - info.options.host = info.parsedUrl.hostname; - info.options.port = info.parsedUrl.port + } + /** + * Gets an http agent. This function is useful when you need an http agent that handles + * routing through a proxy server - depending upon the url and proxy environment variables. + * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com + */ + getAgent(serverUrl) { + const parsedUrl = new URL(serverUrl); + return this._getAgent(parsedUrl); + } + _prepareRequest(method, requestUrl, headers) { + const info = {}; + info.parsedUrl = requestUrl; + const usingSsl = info.parsedUrl.protocol === 'https:'; + info.httpModule = usingSsl ? https : http; + const defaultPort = usingSsl ? 443 : 80; + info.options = {}; + info.options.host = info.parsedUrl.hostname; + info.options.port = info.parsedUrl.port ? parseInt(info.parsedUrl.port) : defaultPort; - info.options.path = - (info.parsedUrl.pathname || "") + (info.parsedUrl.search || ""); - info.options.method = method; - info.options.headers = this._mergeHeaders(headers); - if (this.userAgent != null) { - info.options.headers["user-agent"] = this.userAgent; - } - info.options.agent = this._getAgent(info.parsedUrl); - // gives handlers an opportunity to participate - if (this.handlers) { + info.options.path = + (info.parsedUrl.pathname || '') + (info.parsedUrl.search || ''); + info.options.method = method; + info.options.headers = this._mergeHeaders(headers); + if (this.userAgent != null) { + info.options.headers['user-agent'] = this.userAgent; + } + info.options.agent = this._getAgent(info.parsedUrl); + // gives handlers an opportunity to participate + if (this.handlers) { for (const handler of this.handlers) { - handler.prepareRequest(info.options); + handler.prepareRequest(info.options); } - } - return info; - } - _mergeHeaders(headers) { - if (this.requestOptions && this.requestOptions.headers) { - return Object.assign( - {}, - lowercaseKeys(this.requestOptions.headers), - lowercaseKeys(headers || {}) - ); - } - return lowercaseKeys(headers || {}); } - _getExistingOrDefaultHeader(additionalHeaders, header, _default) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { + return info; + } + _mergeHeaders(headers) { + if (this.requestOptions && this.requestOptions.headers) { + return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); + } + return lowercaseKeys(headers || {}); + } + _getExistingOrDefaultHeader(additionalHeaders, header, _default) { + let clientHeader; + if (this.requestOptions && this.requestOptions.headers) { clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; - } - return additionalHeaders[header] || clientHeader || _default; } - _getAgent(parsedUrl) { - let agent; - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (this._keepAlive && useProxy) { + return additionalHeaders[header] || clientHeader || _default; + } + _getAgent(parsedUrl) { + let agent; + const proxyUrl = pm.getProxyUrl(parsedUrl); + const useProxy = proxyUrl && proxyUrl.hostname; + if (this._keepAlive && useProxy) { agent = this._proxyAgent; - } - if (this._keepAlive && !useProxy) { + } + if (this._keepAlive && !useProxy) { agent = this._agent; - } - // if agent is already assigned use that agent. - if (agent) { + } + // if agent is already assigned use that agent. + if (agent) { return agent; - } - const usingSsl = parsedUrl.protocol === "https:"; - let maxSockets = 100; - if (this.requestOptions) { - maxSockets = - this.requestOptions.maxSockets || http.globalAgent.maxSockets; - } - // This is `useProxy` again, but we need to check `proxyURl` directly for TypeScripts's flow analysis. - if (proxyUrl && proxyUrl.hostname) { + } + const usingSsl = parsedUrl.protocol === 'https:'; + let maxSockets = 100; + if (this.requestOptions) { + maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; + } + // This is `useProxy` again, but we need to check `proxyURl` directly for TypeScripts's flow analysis. + if (proxyUrl && proxyUrl.hostname) { const agentOptions = { - maxSockets, - keepAlive: this._keepAlive, - proxy: Object.assign( - Object.assign( - {}, - (proxyUrl.username || proxyUrl.password) && { - proxyAuth: `${proxyUrl.username}:${proxyUrl.password}`, - } - ), - { host: proxyUrl.hostname, port: proxyUrl.port } - ), + maxSockets, + keepAlive: this._keepAlive, + proxy: Object.assign(Object.assign({}, ((proxyUrl.username || proxyUrl.password) && { + proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` + })), { host: proxyUrl.hostname, port: proxyUrl.port }) }; let tunnelAgent; - const overHttps = proxyUrl.protocol === "https:"; + const overHttps = proxyUrl.protocol === 'https:'; if (usingSsl) { - tunnelAgent = overHttps - ? tunnel.httpsOverHttps - : tunnel.httpsOverHttp; - } else { - tunnelAgent = overHttps - ? tunnel.httpOverHttps - : tunnel.httpOverHttp; + tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; + } + else { + tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; } agent = tunnelAgent(agentOptions); this._proxyAgent = agent; - } - // if reusing agent across request and tunneling agent isn't assigned create a new agent - if (this._keepAlive && !agent) { + } + // if reusing agent across request and tunneling agent isn't assigned create a new agent + if (this._keepAlive && !agent) { const options = { keepAlive: this._keepAlive, maxSockets }; - agent = usingSsl - ? new https.Agent(options) - : new http.Agent(options); + agent = usingSsl ? new https.Agent(options) : new http.Agent(options); this._agent = agent; - } - // if not using private agent and tunnel agent isn't setup then use global agent - if (!agent) { + } + // if not using private agent and tunnel agent isn't setup then use global agent + if (!agent) { agent = usingSsl ? https.globalAgent : http.globalAgent; - } - if (usingSsl && this._ignoreSslError) { + } + if (usingSsl && this._ignoreSslError) { // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options // we have to cast it to any and change it directly agent.options = Object.assign(agent.options || {}, { - rejectUnauthorized: false, + rejectUnauthorized: false }); - } - return agent; } - _performExponentialBackoff(retryNumber) { - return __awaiter(this, void 0, void 0, function* () { + return agent; + } + _performExponentialBackoff(retryNumber) { + return __awaiter(this, void 0, void 0, function* () { retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); - return new Promise((resolve) => setTimeout(() => resolve(), ms)); - }); - } - _processResponse(res, options) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => - __awaiter(this, void 0, void 0, function* () { + return new Promise(resolve => setTimeout(() => resolve(), ms)); + }); + } + _processResponse(res, options) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { const statusCode = res.message.statusCode || 0; const response = { - statusCode, - result: null, - headers: {}, + statusCode, + result: null, + headers: {} }; // not found leads to null obj returned if (statusCode === HttpCodes.NotFound) { - resolve(response); + resolve(response); } // get the result from the body function dateTimeDeserializer(key, value) { - if (typeof value === "string") { - const a = new Date(value); - if (!isNaN(a.valueOf())) { - return a; + if (typeof value === 'string') { + const a = new Date(value); + if (!isNaN(a.valueOf())) { + return a; + } } - } - return value; + return value; } let obj; let contents; try { - contents = yield res.readBody(); - if (contents && contents.length > 0) { - if (options && options.deserializeDates) { - obj = JSON.parse(contents, dateTimeDeserializer); - } else { - obj = JSON.parse(contents); + contents = yield res.readBody(); + if (contents && contents.length > 0) { + if (options && options.deserializeDates) { + obj = JSON.parse(contents, dateTimeDeserializer); + } + else { + obj = JSON.parse(contents); + } + response.result = obj; } - response.result = obj; - } - response.headers = res.message.headers; - } catch (err) { - // Invalid resource (contents not json); leaving result obj null + response.headers = res.message.headers; + } + catch (err) { + // Invalid resource (contents not json); leaving result obj null } // note that 3xx redirects are handled by the http layer. if (statusCode > 299) { - let msg; - // if exception/error in body, attempt to get better error - if (obj && obj.message) { - msg = obj.message; - } else if (contents && contents.length > 0) { - // it may be the case that the exception is in the body message as string - msg = contents; - } else { - msg = `Failed request: (${statusCode})`; - } - const err = new HttpClientError(msg, statusCode); - err.result = response.result; - reject(err); - } else { - resolve(response); + let msg; + // if exception/error in body, attempt to get better error + if (obj && obj.message) { + msg = obj.message; + } + else if (contents && contents.length > 0) { + // it may be the case that the exception is in the body message as string + msg = contents; + } + else { + msg = `Failed request: (${statusCode})`; + } + const err = new HttpClientError(msg, statusCode); + err.result = response.result; + reject(err); } - }) - ); - }); - } - } - exports.HttpClient = HttpClient; - const lowercaseKeys = (obj) => - Object.keys(obj).reduce( - (c, k) => ((c[k.toLowerCase()] = obj[k]), c), - {} - ); - //# sourceMappingURL=index.js.map + else { + resolve(response); + } + })); + }); + } +} +exports.HttpClient = HttpClient; +const lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {}); +//# sourceMappingURL=index.js.map - /***/ - }, +/***/ }), - /***/ 72843: /***/ (__unused_webpack_module, exports) => { - "use strict"; +/***/ 72843: +/***/ ((__unused_webpack_module, exports) => { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.checkBypass = exports.getProxyUrl = void 0; - function getProxyUrl(reqUrl) { - const usingSsl = reqUrl.protocol === "https:"; - if (checkBypass(reqUrl)) { - return undefined; - } - const proxyVar = (() => { - if (usingSsl) { - return process.env["https_proxy"] || process.env["HTTPS_PROXY"]; - } else { - return process.env["http_proxy"] || process.env["HTTP_PROXY"]; - } - })(); - if (proxyVar) { - return new URL(proxyVar); - } else { - return undefined; - } - } - exports.getProxyUrl = getProxyUrl; - function checkBypass(reqUrl) { - if (!reqUrl.hostname) { - return false; +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.checkBypass = exports.getProxyUrl = void 0; +function getProxyUrl(reqUrl) { + const usingSsl = reqUrl.protocol === 'https:'; + if (checkBypass(reqUrl)) { + return undefined; + } + const proxyVar = (() => { + if (usingSsl) { + return process.env['https_proxy'] || process.env['HTTPS_PROXY']; } - const noProxy = - process.env["no_proxy"] || process.env["NO_PROXY"] || ""; - if (!noProxy) { - return false; + else { + return process.env['http_proxy'] || process.env['HTTP_PROXY']; } - // Determine the request port - let reqPort; - if (reqUrl.port) { - reqPort = Number(reqUrl.port); - } else if (reqUrl.protocol === "http:") { - reqPort = 80; - } else if (reqUrl.protocol === "https:") { - reqPort = 443; - } - // Format the request hostname and hostname with port - const upperReqHosts = [reqUrl.hostname.toUpperCase()]; - if (typeof reqPort === "number") { - upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); - } - // Compare request host against noproxy - for (const upperNoProxyItem of noProxy - .split(",") - .map((x) => x.trim().toUpperCase()) - .filter((x) => x)) { - if (upperReqHosts.some((x) => x === upperNoProxyItem)) { + })(); + if (proxyVar) { + return new URL(proxyVar); + } + else { + return undefined; + } +} +exports.getProxyUrl = getProxyUrl; +function checkBypass(reqUrl) { + if (!reqUrl.hostname) { + return false; + } + const noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || ''; + if (!noProxy) { + return false; + } + // Determine the request port + let reqPort; + if (reqUrl.port) { + reqPort = Number(reqUrl.port); + } + else if (reqUrl.protocol === 'http:') { + reqPort = 80; + } + else if (reqUrl.protocol === 'https:') { + reqPort = 443; + } + // Format the request hostname and hostname with port + const upperReqHosts = [reqUrl.hostname.toUpperCase()]; + if (typeof reqPort === 'number') { + upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); + } + // Compare request host against noproxy + for (const upperNoProxyItem of noProxy + .split(',') + .map(x => x.trim().toUpperCase()) + .filter(x => x)) { + if (upperReqHosts.some(x => x === upperNoProxyItem)) { return true; - } } - return false; - } - exports.checkBypass = checkBypass; - //# sourceMappingURL=proxy.js.map + } + return false; +} +exports.checkBypass = checkBypass; +//# sourceMappingURL=proxy.js.map + +/***/ }), + +/***/ 78974: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +Object.defineProperty(exports, "v1", ({ + enumerable: true, + get: function () { + return _v.default; + } +})); +Object.defineProperty(exports, "v3", ({ + enumerable: true, + get: function () { + return _v2.default; + } +})); +Object.defineProperty(exports, "v4", ({ + enumerable: true, + get: function () { + return _v3.default; + } +})); +Object.defineProperty(exports, "v5", ({ + enumerable: true, + get: function () { + return _v4.default; + } +})); +Object.defineProperty(exports, "NIL", ({ + enumerable: true, + get: function () { + return _nil.default; + } +})); +Object.defineProperty(exports, "version", ({ + enumerable: true, + get: function () { + return _version.default; + } +})); +Object.defineProperty(exports, "validate", ({ + enumerable: true, + get: function () { + return _validate.default; + } +})); +Object.defineProperty(exports, "stringify", ({ + enumerable: true, + get: function () { + return _stringify.default; + } +})); +Object.defineProperty(exports, "parse", ({ + enumerable: true, + get: function () { + return _parse.default; + } +})); - /***/ - }, +var _v = _interopRequireDefault(__nccwpck_require__(81595)); - /***/ 78974: /***/ ( - __unused_webpack_module, - exports, - __nccwpck_require__ - ) => { - "use strict"; +var _v2 = _interopRequireDefault(__nccwpck_require__(26993)); - Object.defineProperty(exports, "__esModule", { - value: true, - }); - Object.defineProperty(exports, "v1", { - enumerable: true, - get: function () { - return _v.default; - }, - }); - Object.defineProperty(exports, "v3", { - enumerable: true, - get: function () { - return _v2.default; - }, - }); - Object.defineProperty(exports, "v4", { - enumerable: true, - get: function () { - return _v3.default; - }, - }); - Object.defineProperty(exports, "v5", { - enumerable: true, - get: function () { - return _v4.default; - }, - }); - Object.defineProperty(exports, "NIL", { - enumerable: true, - get: function () { - return _nil.default; - }, - }); - Object.defineProperty(exports, "version", { - enumerable: true, - get: function () { - return _version.default; - }, - }); - Object.defineProperty(exports, "validate", { - enumerable: true, - get: function () { - return _validate.default; - }, - }); - Object.defineProperty(exports, "stringify", { - enumerable: true, - get: function () { - return _stringify.default; - }, - }); - Object.defineProperty(exports, "parse", { - enumerable: true, - get: function () { - return _parse.default; - }, - }); +var _v3 = _interopRequireDefault(__nccwpck_require__(51472)); - var _v = _interopRequireDefault(__nccwpck_require__(81595)); +var _v4 = _interopRequireDefault(__nccwpck_require__(16217)); - var _v2 = _interopRequireDefault(__nccwpck_require__(26993)); +var _nil = _interopRequireDefault(__nccwpck_require__(32381)); - var _v3 = _interopRequireDefault(__nccwpck_require__(51472)); +var _version = _interopRequireDefault(__nccwpck_require__(40427)); + +var _validate = _interopRequireDefault(__nccwpck_require__(92609)); - var _v4 = _interopRequireDefault(__nccwpck_require__(16217)); +var _stringify = _interopRequireDefault(__nccwpck_require__(61458)); + +var _parse = _interopRequireDefault(__nccwpck_require__(26385)); - var _nil = _interopRequireDefault(__nccwpck_require__(32381)); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - var _version = _interopRequireDefault(__nccwpck_require__(40427)); +/***/ }), - var _validate = _interopRequireDefault(__nccwpck_require__(92609)); +/***/ 5842: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - var _stringify = _interopRequireDefault(__nccwpck_require__(61458)); +"use strict"; - var _parse = _interopRequireDefault(__nccwpck_require__(26385)); - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; - /***/ - }, +var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); - /***/ 5842: /***/ ( - __unused_webpack_module, - exports, - __nccwpck_require__ - ) => { - "use strict"; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - Object.defineProperty(exports, "__esModule", { - value: true, - }); - exports["default"] = void 0; +function md5(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === 'string') { + bytes = Buffer.from(bytes, 'utf8'); + } - var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); + return _crypto.default.createHash('md5').update(bytes).digest(); +} - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } +var _default = md5; +exports["default"] = _default; - function md5(bytes) { - if (Array.isArray(bytes)) { - bytes = Buffer.from(bytes); - } else if (typeof bytes === "string") { - bytes = Buffer.from(bytes, "utf8"); - } +/***/ }), - return _crypto.default.createHash("md5").update(bytes).digest(); - } +/***/ 32381: +/***/ ((__unused_webpack_module, exports) => { - var _default = md5; - exports["default"] = _default; +"use strict"; - /***/ - }, - /***/ 32381: /***/ (__unused_webpack_module, exports) => { - "use strict"; +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; +var _default = '00000000-0000-0000-0000-000000000000'; +exports["default"] = _default; - Object.defineProperty(exports, "__esModule", { - value: true, - }); - exports["default"] = void 0; - var _default = "00000000-0000-0000-0000-000000000000"; - exports["default"] = _default; +/***/ }), - /***/ - }, +/***/ 26385: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - /***/ 26385: /***/ ( - __unused_webpack_module, - exports, - __nccwpck_require__ - ) => { - "use strict"; +"use strict"; - Object.defineProperty(exports, "__esModule", { - value: true, - }); - exports["default"] = void 0; - var _validate = _interopRequireDefault(__nccwpck_require__(92609)); +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } +var _validate = _interopRequireDefault(__nccwpck_require__(92609)); - function parse(uuid) { - if (!(0, _validate.default)(uuid)) { - throw TypeError("Invalid UUID"); - } +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - let v; - const arr = new Uint8Array(16); // Parse ########-....-....-....-............ +function parse(uuid) { + if (!(0, _validate.default)(uuid)) { + throw TypeError('Invalid UUID'); + } - arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; - arr[1] = (v >>> 16) & 0xff; - arr[2] = (v >>> 8) & 0xff; - arr[3] = v & 0xff; // Parse ........-####-....-....-............ + let v; + const arr = new Uint8Array(16); // Parse ########-....-....-....-............ - arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; - arr[5] = v & 0xff; // Parse ........-....-####-....-............ + arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; + arr[1] = v >>> 16 & 0xff; + arr[2] = v >>> 8 & 0xff; + arr[3] = v & 0xff; // Parse ........-####-....-....-............ - arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; - arr[7] = v & 0xff; // Parse ........-....-....-####-............ + arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; + arr[5] = v & 0xff; // Parse ........-....-####-....-............ - arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; - arr[9] = v & 0xff; // Parse ........-....-....-....-############ - // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes) + arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; + arr[7] = v & 0xff; // Parse ........-....-....-####-............ - arr[10] = - ((v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000) & 0xff; - arr[11] = (v / 0x100000000) & 0xff; - arr[12] = (v >>> 24) & 0xff; - arr[13] = (v >>> 16) & 0xff; - arr[14] = (v >>> 8) & 0xff; - arr[15] = v & 0xff; - return arr; - } + arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; + arr[9] = v & 0xff; // Parse ........-....-....-....-############ + // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes) - var _default = parse; - exports["default"] = _default; + arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff; + arr[11] = v / 0x100000000 & 0xff; + arr[12] = v >>> 24 & 0xff; + arr[13] = v >>> 16 & 0xff; + arr[14] = v >>> 8 & 0xff; + arr[15] = v & 0xff; + return arr; +} - /***/ - }, +var _default = parse; +exports["default"] = _default; - /***/ 86230: /***/ (__unused_webpack_module, exports) => { - "use strict"; +/***/ }), - Object.defineProperty(exports, "__esModule", { - value: true, - }); - exports["default"] = void 0; - var _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; - exports["default"] = _default; +/***/ 86230: +/***/ ((__unused_webpack_module, exports) => { - /***/ - }, +"use strict"; - /***/ 9784: /***/ ( - __unused_webpack_module, - exports, - __nccwpck_require__ - ) => { - "use strict"; - Object.defineProperty(exports, "__esModule", { - value: true, - }); - exports["default"] = rng; +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; +var _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; +exports["default"] = _default; - var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); +/***/ }), - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } +/***/ 9784: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate +"use strict"; - let poolPtr = rnds8Pool.length; - function rng() { - if (poolPtr > rnds8Pool.length - 16) { - _crypto.default.randomFillSync(rnds8Pool); +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = rng; - poolPtr = 0; - } +var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); - return rnds8Pool.slice(poolPtr, (poolPtr += 16)); - } +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - /***/ - }, +const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate - /***/ 38844: /***/ ( - __unused_webpack_module, - exports, - __nccwpck_require__ - ) => { - "use strict"; +let poolPtr = rnds8Pool.length; - Object.defineProperty(exports, "__esModule", { - value: true, - }); - exports["default"] = void 0; +function rng() { + if (poolPtr > rnds8Pool.length - 16) { + _crypto.default.randomFillSync(rnds8Pool); - var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); + poolPtr = 0; + } - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } + return rnds8Pool.slice(poolPtr, poolPtr += 16); +} - function sha1(bytes) { - if (Array.isArray(bytes)) { - bytes = Buffer.from(bytes); - } else if (typeof bytes === "string") { - bytes = Buffer.from(bytes, "utf8"); - } +/***/ }), - return _crypto.default.createHash("sha1").update(bytes).digest(); - } +/***/ 38844: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - var _default = sha1; - exports["default"] = _default; +"use strict"; - /***/ - }, - /***/ 61458: /***/ ( - __unused_webpack_module, - exports, - __nccwpck_require__ - ) => { - "use strict"; +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; - Object.defineProperty(exports, "__esModule", { - value: true, - }); - exports["default"] = void 0; +var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); - var _validate = _interopRequireDefault(__nccwpck_require__(92609)); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } +function sha1(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === 'string') { + bytes = Buffer.from(bytes, 'utf8'); + } - /** - * Convert array of 16 byte values to UUID string format of the form: - * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX - */ - const byteToHex = []; + return _crypto.default.createHash('sha1').update(bytes).digest(); +} - for (let i = 0; i < 256; ++i) { - byteToHex.push((i + 0x100).toString(16).substr(1)); - } +var _default = sha1; +exports["default"] = _default; - function stringify(arr, offset = 0) { - // Note: Be careful editing this code! It's been tuned for performance - // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434 - const uuid = ( - byteToHex[arr[offset + 0]] + - byteToHex[arr[offset + 1]] + - byteToHex[arr[offset + 2]] + - byteToHex[arr[offset + 3]] + - "-" + - byteToHex[arr[offset + 4]] + - byteToHex[arr[offset + 5]] + - "-" + - byteToHex[arr[offset + 6]] + - byteToHex[arr[offset + 7]] + - "-" + - byteToHex[arr[offset + 8]] + - byteToHex[arr[offset + 9]] + - "-" + - byteToHex[arr[offset + 10]] + - byteToHex[arr[offset + 11]] + - byteToHex[arr[offset + 12]] + - byteToHex[arr[offset + 13]] + - byteToHex[arr[offset + 14]] + - byteToHex[arr[offset + 15]] - ).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one - // of the following: - // - One or more input array values don't map to a hex octet (leading to - // "undefined" in the uuid) - // - Invalid input values for the RFC `version` or `variant` fields - - if (!(0, _validate.default)(uuid)) { - throw TypeError("Stringified UUID is invalid"); - } - - return uuid; - } +/***/ }), - var _default = stringify; - exports["default"] = _default; +/***/ 61458: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - /***/ - }, +"use strict"; - /***/ 81595: /***/ ( - __unused_webpack_module, - exports, - __nccwpck_require__ - ) => { - "use strict"; - Object.defineProperty(exports, "__esModule", { - value: true, - }); - exports["default"] = void 0; +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; - var _rng = _interopRequireDefault(__nccwpck_require__(9784)); +var _validate = _interopRequireDefault(__nccwpck_require__(92609)); - var _stringify = _interopRequireDefault(__nccwpck_require__(61458)); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } +/** + * Convert array of 16 byte values to UUID string format of the form: + * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX + */ +const byteToHex = []; - // **`v1()` - Generate time-based UUID** - // - // Inspired by https://github.com/LiosK/UUID.js - // and http://docs.python.org/library/uuid.html - let _nodeId; +for (let i = 0; i < 256; ++i) { + byteToHex.push((i + 0x100).toString(16).substr(1)); +} - let _clockseq; // Previous uuid creation time +function stringify(arr, offset = 0) { + // Note: Be careful editing this code! It's been tuned for performance + // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434 + const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one + // of the following: + // - One or more input array values don't map to a hex octet (leading to + // "undefined" in the uuid) + // - Invalid input values for the RFC `version` or `variant` fields - let _lastMSecs = 0; - let _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details + if (!(0, _validate.default)(uuid)) { + throw TypeError('Stringified UUID is invalid'); + } - function v1(options, buf, offset) { - let i = (buf && offset) || 0; - const b = buf || new Array(16); - options = options || {}; - let node = options.node || _nodeId; - let clockseq = - options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not - // specified. We do this lazily to minimize issues related to insufficient - // system entropy. See #189 - - if (node == null || clockseq == null) { - const seedBytes = options.random || (options.rng || _rng.default)(); - - if (node == null) { - // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) - node = _nodeId = [ - seedBytes[0] | 0x01, - seedBytes[1], - seedBytes[2], - seedBytes[3], - seedBytes[4], - seedBytes[5], - ]; - } + return uuid; +} - if (clockseq == null) { - // Per 4.2.2, randomize (14 bit) clockseq - clockseq = _clockseq = - ((seedBytes[6] << 8) | seedBytes[7]) & 0x3fff; - } - } // UUID timestamps are 100 nano-second units since the Gregorian epoch, - // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so - // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' - // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. +var _default = stringify; +exports["default"] = _default; - let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock - // cycle to simulate higher resolution clock +/***/ }), - let nsecs = - options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs) +/***/ 81595: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression +"use strict"; - if (dt < 0 && options.clockseq === undefined) { - clockseq = (clockseq + 1) & 0x3fff; - } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new - // time interval - if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { - nsecs = 0; - } // Per 4.2.1.2 Throw error if too many uuids are requested +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; - if (nsecs >= 10000) { - throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); - } +var _rng = _interopRequireDefault(__nccwpck_require__(9784)); - _lastMSecs = msecs; - _lastNSecs = nsecs; - _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch +var _stringify = _interopRequireDefault(__nccwpck_require__(61458)); - msecs += 12219292800000; // `time_low` +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; - b[i++] = (tl >>> 24) & 0xff; - b[i++] = (tl >>> 16) & 0xff; - b[i++] = (tl >>> 8) & 0xff; - b[i++] = tl & 0xff; // `time_mid` +// **`v1()` - Generate time-based UUID** +// +// Inspired by https://github.com/LiosK/UUID.js +// and http://docs.python.org/library/uuid.html +let _nodeId; - const tmh = ((msecs / 0x100000000) * 10000) & 0xfffffff; - b[i++] = (tmh >>> 8) & 0xff; - b[i++] = tmh & 0xff; // `time_high_and_version` +let _clockseq; // Previous uuid creation time - b[i++] = ((tmh >>> 24) & 0xf) | 0x10; // include version - b[i++] = (tmh >>> 16) & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) +let _lastMSecs = 0; +let _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details - b[i++] = (clockseq >>> 8) | 0x80; // `clock_seq_low` +function v1(options, buf, offset) { + let i = buf && offset || 0; + const b = buf || new Array(16); + options = options || {}; + let node = options.node || _nodeId; + let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not + // specified. We do this lazily to minimize issues related to insufficient + // system entropy. See #189 - b[i++] = clockseq & 0xff; // `node` + if (node == null || clockseq == null) { + const seedBytes = options.random || (options.rng || _rng.default)(); - for (let n = 0; n < 6; ++n) { - b[i + n] = node[n]; - } + if (node == null) { + // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) + node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; + } - return buf || (0, _stringify.default)(b); - } + if (clockseq == null) { + // Per 4.2.2, randomize (14 bit) clockseq + clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; + } + } // UUID timestamps are 100 nano-second units since the Gregorian epoch, + // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so + // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' + // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. - var _default = v1; - exports["default"] = _default; - /***/ - }, + let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock + // cycle to simulate higher resolution clock - /***/ 26993: /***/ ( - __unused_webpack_module, - exports, - __nccwpck_require__ - ) => { - "use strict"; + let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs) - Object.defineProperty(exports, "__esModule", { - value: true, - }); - exports["default"] = void 0; + const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression - var _v = _interopRequireDefault(__nccwpck_require__(65920)); + if (dt < 0 && options.clockseq === undefined) { + clockseq = clockseq + 1 & 0x3fff; + } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new + // time interval - var _md = _interopRequireDefault(__nccwpck_require__(5842)); - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } + if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { + nsecs = 0; + } // Per 4.2.1.2 Throw error if too many uuids are requested - const v3 = (0, _v.default)("v3", 0x30, _md.default); - var _default = v3; - exports["default"] = _default; - /***/ - }, + if (nsecs >= 10000) { + throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); + } - /***/ 65920: /***/ ( - __unused_webpack_module, - exports, - __nccwpck_require__ - ) => { - "use strict"; + _lastMSecs = msecs; + _lastNSecs = nsecs; + _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch - Object.defineProperty(exports, "__esModule", { - value: true, - }); - exports["default"] = _default; - exports.URL = exports.DNS = void 0; + msecs += 12219292800000; // `time_low` - var _stringify = _interopRequireDefault(__nccwpck_require__(61458)); + const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; + b[i++] = tl >>> 24 & 0xff; + b[i++] = tl >>> 16 & 0xff; + b[i++] = tl >>> 8 & 0xff; + b[i++] = tl & 0xff; // `time_mid` - var _parse = _interopRequireDefault(__nccwpck_require__(26385)); + const tmh = msecs / 0x100000000 * 10000 & 0xfffffff; + b[i++] = tmh >>> 8 & 0xff; + b[i++] = tmh & 0xff; // `time_high_and_version` - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } + b[i++] = tmh >>> 24 & 0xf | 0x10; // include version - function stringToBytes(str) { - str = unescape(encodeURIComponent(str)); // UTF8 escape + b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) - const bytes = []; + b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low` - for (let i = 0; i < str.length; ++i) { - bytes.push(str.charCodeAt(i)); - } + b[i++] = clockseq & 0xff; // `node` - return bytes; - } + for (let n = 0; n < 6; ++n) { + b[i + n] = node[n]; + } - const DNS = "6ba7b810-9dad-11d1-80b4-00c04fd430c8"; - exports.DNS = DNS; - const URL = "6ba7b811-9dad-11d1-80b4-00c04fd430c8"; - exports.URL = URL; + return buf || (0, _stringify.default)(b); +} - function _default(name, version, hashfunc) { - function generateUUID(value, namespace, buf, offset) { - if (typeof value === "string") { - value = stringToBytes(value); - } +var _default = v1; +exports["default"] = _default; - if (typeof namespace === "string") { - namespace = (0, _parse.default)(namespace); - } +/***/ }), - if (namespace.length !== 16) { - throw TypeError( - "Namespace must be array-like (16 iterable integer values, 0-255)" - ); - } // Compute hash of namespace and value, Per 4.3 - // Future: Use spread syntax when supported on all platforms, e.g. `bytes = - // hashfunc([...namespace, ... value])` - - let bytes = new Uint8Array(16 + value.length); - bytes.set(namespace); - bytes.set(value, namespace.length); - bytes = hashfunc(bytes); - bytes[6] = (bytes[6] & 0x0f) | version; - bytes[8] = (bytes[8] & 0x3f) | 0x80; - - if (buf) { - offset = offset || 0; - - for (let i = 0; i < 16; ++i) { - buf[offset + i] = bytes[i]; - } +/***/ 26993: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - return buf; - } +"use strict"; - return (0, _stringify.default)(bytes); - } // Function#name is not settable on some platforms (#270) - try { - generateUUID.name = name; // eslint-disable-next-line no-empty - } catch (err) {} // For CommonJS default export support +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; - generateUUID.DNS = DNS; - generateUUID.URL = URL; - return generateUUID; - } +var _v = _interopRequireDefault(__nccwpck_require__(65920)); - /***/ - }, +var _md = _interopRequireDefault(__nccwpck_require__(5842)); - /***/ 51472: /***/ ( - __unused_webpack_module, - exports, - __nccwpck_require__ - ) => { - "use strict"; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - Object.defineProperty(exports, "__esModule", { - value: true, - }); - exports["default"] = void 0; +const v3 = (0, _v.default)('v3', 0x30, _md.default); +var _default = v3; +exports["default"] = _default; - var _rng = _interopRequireDefault(__nccwpck_require__(9784)); +/***/ }), - var _stringify = _interopRequireDefault(__nccwpck_require__(61458)); +/***/ 65920: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } +"use strict"; - function v4(options, buf, offset) { - options = options || {}; - const rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = _default; +exports.URL = exports.DNS = void 0; - rnds[6] = (rnds[6] & 0x0f) | 0x40; - rnds[8] = (rnds[8] & 0x3f) | 0x80; // Copy bytes to buffer, if provided +var _stringify = _interopRequireDefault(__nccwpck_require__(61458)); - if (buf) { - offset = offset || 0; +var _parse = _interopRequireDefault(__nccwpck_require__(26385)); - for (let i = 0; i < 16; ++i) { - buf[offset + i] = rnds[i]; - } +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - return buf; - } +function stringToBytes(str) { + str = unescape(encodeURIComponent(str)); // UTF8 escape - return (0, _stringify.default)(rnds); - } + const bytes = []; - var _default = v4; - exports["default"] = _default; + for (let i = 0; i < str.length; ++i) { + bytes.push(str.charCodeAt(i)); + } - /***/ - }, + return bytes; +} - /***/ 16217: /***/ ( - __unused_webpack_module, - exports, - __nccwpck_require__ - ) => { - "use strict"; +const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; +exports.DNS = DNS; +const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; +exports.URL = URL; - Object.defineProperty(exports, "__esModule", { - value: true, - }); - exports["default"] = void 0; +function _default(name, version, hashfunc) { + function generateUUID(value, namespace, buf, offset) { + if (typeof value === 'string') { + value = stringToBytes(value); + } - var _v = _interopRequireDefault(__nccwpck_require__(65920)); + if (typeof namespace === 'string') { + namespace = (0, _parse.default)(namespace); + } - var _sha = _interopRequireDefault(__nccwpck_require__(38844)); + if (namespace.length !== 16) { + throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)'); + } // Compute hash of namespace and value, Per 4.3 + // Future: Use spread syntax when supported on all platforms, e.g. `bytes = + // hashfunc([...namespace, ... value])` - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; + + let bytes = new Uint8Array(16 + value.length); + bytes.set(namespace); + bytes.set(value, namespace.length); + bytes = hashfunc(bytes); + bytes[6] = bytes[6] & 0x0f | version; + bytes[8] = bytes[8] & 0x3f | 0x80; + + if (buf) { + offset = offset || 0; + + for (let i = 0; i < 16; ++i) { + buf[offset + i] = bytes[i]; } - const v5 = (0, _v.default)("v5", 0x50, _sha.default); - var _default = v5; - exports["default"] = _default; + return buf; + } - /***/ - }, + return (0, _stringify.default)(bytes); + } // Function#name is not settable on some platforms (#270) - /***/ 92609: /***/ ( - __unused_webpack_module, - exports, - __nccwpck_require__ - ) => { - "use strict"; - Object.defineProperty(exports, "__esModule", { - value: true, - }); - exports["default"] = void 0; + try { + generateUUID.name = name; // eslint-disable-next-line no-empty + } catch (err) {} // For CommonJS default export support - var _regex = _interopRequireDefault(__nccwpck_require__(86230)); - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } + generateUUID.DNS = DNS; + generateUUID.URL = URL; + return generateUUID; +} - function validate(uuid) { - return typeof uuid === "string" && _regex.default.test(uuid); - } +/***/ }), - var _default = validate; - exports["default"] = _default; +/***/ 51472: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - /***/ - }, +"use strict"; - /***/ 40427: /***/ ( - __unused_webpack_module, - exports, - __nccwpck_require__ - ) => { - "use strict"; - Object.defineProperty(exports, "__esModule", { - value: true, - }); - exports["default"] = void 0; +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; - var _validate = _interopRequireDefault(__nccwpck_require__(92609)); +var _rng = _interopRequireDefault(__nccwpck_require__(9784)); - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } +var _stringify = _interopRequireDefault(__nccwpck_require__(61458)); - function version(uuid) { - if (!(0, _validate.default)(uuid)) { - throw TypeError("Invalid UUID"); - } +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - return parseInt(uuid.substr(14, 1), 16); - } +function v4(options, buf, offset) { + options = options || {}; + + const rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` + + + rnds[6] = rnds[6] & 0x0f | 0x40; + rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided + + if (buf) { + offset = offset || 0; + + for (let i = 0; i < 16; ++i) { + buf[offset + i] = rnds[i]; + } + + return buf; + } + + return (0, _stringify.default)(rnds); +} + +var _default = v4; +exports["default"] = _default; + +/***/ }), + +/***/ 16217: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _v = _interopRequireDefault(__nccwpck_require__(65920)); + +var _sha = _interopRequireDefault(__nccwpck_require__(38844)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const v5 = (0, _v.default)('v5', 0x50, _sha.default); +var _default = v5; +exports["default"] = _default; + +/***/ }), + +/***/ 92609: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _regex = _interopRequireDefault(__nccwpck_require__(86230)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function validate(uuid) { + return typeof uuid === 'string' && _regex.default.test(uuid); +} + +var _default = validate; +exports["default"] = _default; + +/***/ }), + +/***/ 40427: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _validate = _interopRequireDefault(__nccwpck_require__(92609)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function version(uuid) { + if (!(0, _validate.default)(uuid)) { + throw TypeError('Invalid UUID'); + } + + return parseInt(uuid.substr(14, 1), 16); +} + +var _default = version; +exports["default"] = _default; - var _default = version; - exports["default"] = _default; - - /***/ - }, - - /***/ 74087: /***/ ( - __unused_webpack_module, - exports, - __nccwpck_require__ - ) => { - "use strict"; - - Object.defineProperty(exports, "__esModule", { value: true }); - const fs_1 = __nccwpck_require__(57147); - const os_1 = __nccwpck_require__(22037); - class Context { - /** - * Hydrate the context from the environment - */ - constructor() { - this.payload = {}; - if (process.env.GITHUB_EVENT_PATH) { +/***/ }), + +/***/ 74087: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const fs_1 = __nccwpck_require__(57147); +const os_1 = __nccwpck_require__(22037); +class Context { + /** + * Hydrate the context from the environment + */ + constructor() { + this.payload = {}; + if (process.env.GITHUB_EVENT_PATH) { if (fs_1.existsSync(process.env.GITHUB_EVENT_PATH)) { - this.payload = JSON.parse( - fs_1.readFileSync(process.env.GITHUB_EVENT_PATH, { - encoding: "utf8", - }) - ); - } else { - const path = process.env.GITHUB_EVENT_PATH; - process.stdout.write( - `GITHUB_EVENT_PATH ${path} does not exist${os_1.EOL}` - ); + this.payload = JSON.parse(fs_1.readFileSync(process.env.GITHUB_EVENT_PATH, { encoding: 'utf8' })); } - } - this.eventName = process.env.GITHUB_EVENT_NAME; - this.sha = process.env.GITHUB_SHA; - this.ref = process.env.GITHUB_REF; - this.workflow = process.env.GITHUB_WORKFLOW; - this.action = process.env.GITHUB_ACTION; - this.actor = process.env.GITHUB_ACTOR; - } - get issue() { - const payload = this.payload; - return Object.assign(Object.assign({}, this.repo), { - number: (payload.issue || payload.pull_request || payload).number, - }); - } - get repo() { - if (process.env.GITHUB_REPOSITORY) { - const [owner, repo] = process.env.GITHUB_REPOSITORY.split("/"); + else { + const path = process.env.GITHUB_EVENT_PATH; + process.stdout.write(`GITHUB_EVENT_PATH ${path} does not exist${os_1.EOL}`); + } + } + this.eventName = process.env.GITHUB_EVENT_NAME; + this.sha = process.env.GITHUB_SHA; + this.ref = process.env.GITHUB_REF; + this.workflow = process.env.GITHUB_WORKFLOW; + this.action = process.env.GITHUB_ACTION; + this.actor = process.env.GITHUB_ACTOR; + } + get issue() { + const payload = this.payload; + return Object.assign(Object.assign({}, this.repo), { number: (payload.issue || payload.pull_request || payload).number }); + } + get repo() { + if (process.env.GITHUB_REPOSITORY) { + const [owner, repo] = process.env.GITHUB_REPOSITORY.split('/'); return { owner, repo }; - } - if (this.payload.repository) { + } + if (this.payload.repository) { return { - owner: this.payload.repository.owner.login, - repo: this.payload.repository.name, + owner: this.payload.repository.owner.login, + repo: this.payload.repository.name }; - } - throw new Error( - "context.repo requires a GITHUB_REPOSITORY environment variable like 'owner/repo'" - ); } - } - exports.Context = Context; - //# sourceMappingURL=context.js.map - - /***/ - }, - - /***/ 95438: /***/ function ( - __unused_webpack_module, - exports, - __nccwpck_require__ - ) { - "use strict"; - - var __importStar = - (this && this.__importStar) || - function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) - for (var k in mod) - if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; - result["default"] = mod; - return result; - }; - Object.defineProperty(exports, "__esModule", { value: true }); - // Originally pulled from https://github.com/JasonEtco/actions-toolkit/blob/master/src/github.ts - const graphql_1 = __nccwpck_require__(88467); - const rest_1 = __nccwpck_require__(29351); - const Context = __importStar(__nccwpck_require__(74087)); - const httpClient = __importStar(__nccwpck_require__(39925)); - // We need this in order to extend Octokit - rest_1.Octokit.prototype = new rest_1.Octokit(); - exports.context = new Context.Context(); - class GitHub extends rest_1.Octokit { - constructor(token, opts) { - super(GitHub.getOctokitOptions(GitHub.disambiguate(token, opts))); - this.graphql = GitHub.getGraphQL(GitHub.disambiguate(token, opts)); - } - /** - * Disambiguates the constructor overload parameters - */ - static disambiguate(token, opts) { - return [ - typeof token === "string" ? token : "", - typeof token === "object" ? token : opts || {}, - ]; - } - static getOctokitOptions(args) { - const token = args[0]; - const options = Object.assign({}, args[1]); // Shallow clone - don't mutate the object provided by the caller - // Auth - const auth = GitHub.getAuthString(token, options); - if (auth) { + throw new Error("context.repo requires a GITHUB_REPOSITORY environment variable like 'owner/repo'"); + } +} +exports.Context = Context; +//# sourceMappingURL=context.js.map + +/***/ }), + +/***/ 95438: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +// Originally pulled from https://github.com/JasonEtco/actions-toolkit/blob/master/src/github.ts +const graphql_1 = __nccwpck_require__(88467); +const rest_1 = __nccwpck_require__(29351); +const Context = __importStar(__nccwpck_require__(74087)); +const httpClient = __importStar(__nccwpck_require__(39925)); +// We need this in order to extend Octokit +rest_1.Octokit.prototype = new rest_1.Octokit(); +exports.context = new Context.Context(); +class GitHub extends rest_1.Octokit { + constructor(token, opts) { + super(GitHub.getOctokitOptions(GitHub.disambiguate(token, opts))); + this.graphql = GitHub.getGraphQL(GitHub.disambiguate(token, opts)); + } + /** + * Disambiguates the constructor overload parameters + */ + static disambiguate(token, opts) { + return [ + typeof token === 'string' ? token : '', + typeof token === 'object' ? token : opts || {} + ]; + } + static getOctokitOptions(args) { + const token = args[0]; + const options = Object.assign({}, args[1]); // Shallow clone - don't mutate the object provided by the caller + // Auth + const auth = GitHub.getAuthString(token, options); + if (auth) { options.auth = auth; - } - // Proxy - const agent = GitHub.getProxyAgent(options); - if (agent) { + } + // Proxy + const agent = GitHub.getProxyAgent(options); + if (agent) { // Shallow clone - don't mutate the object provided by the caller - options.request = options.request - ? Object.assign({}, options.request) - : {}; + options.request = options.request ? Object.assign({}, options.request) : {}; // Set the agent options.request.agent = agent; - } - return options; - } - static getGraphQL(args) { - const defaults = {}; - const token = args[0]; - const options = args[1]; - // Authorization - const auth = this.getAuthString(token, options); - if (auth) { + } + return options; + } + static getGraphQL(args) { + const defaults = {}; + const token = args[0]; + const options = args[1]; + // Authorization + const auth = this.getAuthString(token, options); + if (auth) { defaults.headers = { - authorization: auth, + authorization: auth }; - } - // Proxy - const agent = GitHub.getProxyAgent(options); - if (agent) { + } + // Proxy + const agent = GitHub.getProxyAgent(options); + if (agent) { defaults.request = { agent }; - } - return graphql_1.graphql.defaults(defaults); - } - static getAuthString(token, options) { - // Validate args - if (!token && !options.auth) { - throw new Error("Parameter token or opts.auth is required"); - } else if (token && options.auth) { - throw new Error( - "Parameters token and opts.auth may not both be specified" - ); - } - return typeof options.auth === "string" - ? options.auth - : `token ${token}`; } - static getProxyAgent(options) { - var _a; - if ( - !((_a = options.request) === null || _a === void 0 - ? void 0 - : _a.agent) - ) { - const serverUrl = "https://api.github.com"; + return graphql_1.graphql.defaults(defaults); + } + static getAuthString(token, options) { + // Validate args + if (!token && !options.auth) { + throw new Error('Parameter token or opts.auth is required'); + } + else if (token && options.auth) { + throw new Error('Parameters token and opts.auth may not both be specified'); + } + return typeof options.auth === 'string' ? options.auth : `token ${token}`; + } + static getProxyAgent(options) { + var _a; + if (!((_a = options.request) === null || _a === void 0 ? void 0 : _a.agent)) { + const serverUrl = 'https://api.github.com'; if (httpClient.getProxyUrl(serverUrl)) { - const hc = new httpClient.HttpClient(); - return hc.getAgent(serverUrl); + const hc = new httpClient.HttpClient(); + return hc.getAgent(serverUrl); } - } - return undefined; } - } - exports.GitHub = GitHub; - //# sourceMappingURL=github.js.map - - /***/ - }, - - /***/ 39925: /***/ ( - __unused_webpack_module, - exports, - __nccwpck_require__ - ) => { - "use strict"; - - Object.defineProperty(exports, "__esModule", { value: true }); - const url = __nccwpck_require__(57310); - const http = __nccwpck_require__(13685); - const https = __nccwpck_require__(95687); - const pm = __nccwpck_require__(16443); - let tunnel; - var HttpCodes; - (function (HttpCodes) { - HttpCodes[(HttpCodes["OK"] = 200)] = "OK"; - HttpCodes[(HttpCodes["MultipleChoices"] = 300)] = "MultipleChoices"; - HttpCodes[(HttpCodes["MovedPermanently"] = 301)] = "MovedPermanently"; - HttpCodes[(HttpCodes["ResourceMoved"] = 302)] = "ResourceMoved"; - HttpCodes[(HttpCodes["SeeOther"] = 303)] = "SeeOther"; - HttpCodes[(HttpCodes["NotModified"] = 304)] = "NotModified"; - HttpCodes[(HttpCodes["UseProxy"] = 305)] = "UseProxy"; - HttpCodes[(HttpCodes["SwitchProxy"] = 306)] = "SwitchProxy"; - HttpCodes[(HttpCodes["TemporaryRedirect"] = 307)] = "TemporaryRedirect"; - HttpCodes[(HttpCodes["PermanentRedirect"] = 308)] = "PermanentRedirect"; - HttpCodes[(HttpCodes["BadRequest"] = 400)] = "BadRequest"; - HttpCodes[(HttpCodes["Unauthorized"] = 401)] = "Unauthorized"; - HttpCodes[(HttpCodes["PaymentRequired"] = 402)] = "PaymentRequired"; - HttpCodes[(HttpCodes["Forbidden"] = 403)] = "Forbidden"; - HttpCodes[(HttpCodes["NotFound"] = 404)] = "NotFound"; - HttpCodes[(HttpCodes["MethodNotAllowed"] = 405)] = "MethodNotAllowed"; - HttpCodes[(HttpCodes["NotAcceptable"] = 406)] = "NotAcceptable"; - HttpCodes[(HttpCodes["ProxyAuthenticationRequired"] = 407)] = - "ProxyAuthenticationRequired"; - HttpCodes[(HttpCodes["RequestTimeout"] = 408)] = "RequestTimeout"; - HttpCodes[(HttpCodes["Conflict"] = 409)] = "Conflict"; - HttpCodes[(HttpCodes["Gone"] = 410)] = "Gone"; - HttpCodes[(HttpCodes["TooManyRequests"] = 429)] = "TooManyRequests"; - HttpCodes[(HttpCodes["InternalServerError"] = 500)] = - "InternalServerError"; - HttpCodes[(HttpCodes["NotImplemented"] = 501)] = "NotImplemented"; - HttpCodes[(HttpCodes["BadGateway"] = 502)] = "BadGateway"; - HttpCodes[(HttpCodes["ServiceUnavailable"] = 503)] = - "ServiceUnavailable"; - HttpCodes[(HttpCodes["GatewayTimeout"] = 504)] = "GatewayTimeout"; - })((HttpCodes = exports.HttpCodes || (exports.HttpCodes = {}))); - var Headers; - (function (Headers) { - Headers["Accept"] = "accept"; - Headers["ContentType"] = "content-type"; - })((Headers = exports.Headers || (exports.Headers = {}))); - var MediaTypes; - (function (MediaTypes) { - MediaTypes["ApplicationJson"] = "application/json"; - })((MediaTypes = exports.MediaTypes || (exports.MediaTypes = {}))); - /** - * Returns the proxy URL, depending upon the supplied url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ - function getProxyUrl(serverUrl) { - let proxyUrl = pm.getProxyUrl(url.parse(serverUrl)); - return proxyUrl ? proxyUrl.href : ""; - } - exports.getProxyUrl = getProxyUrl; - const HttpRedirectCodes = [ - HttpCodes.MovedPermanently, - HttpCodes.ResourceMoved, - HttpCodes.SeeOther, - HttpCodes.TemporaryRedirect, - HttpCodes.PermanentRedirect, - ]; - const HttpResponseRetryCodes = [ - HttpCodes.BadGateway, - HttpCodes.ServiceUnavailable, - HttpCodes.GatewayTimeout, - ]; - const RetryableHttpVerbs = ["OPTIONS", "GET", "DELETE", "HEAD"]; - const ExponentialBackoffCeiling = 10; - const ExponentialBackoffTimeSlice = 5; - class HttpClientResponse { - constructor(message) { - this.message = message; - } - readBody() { - return new Promise(async (resolve, reject) => { + return undefined; + } +} +exports.GitHub = GitHub; +//# sourceMappingURL=github.js.map + +/***/ }), + +/***/ 39925: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const url = __nccwpck_require__(57310); +const http = __nccwpck_require__(13685); +const https = __nccwpck_require__(95687); +const pm = __nccwpck_require__(16443); +let tunnel; +var HttpCodes; +(function (HttpCodes) { + HttpCodes[HttpCodes["OK"] = 200] = "OK"; + HttpCodes[HttpCodes["MultipleChoices"] = 300] = "MultipleChoices"; + HttpCodes[HttpCodes["MovedPermanently"] = 301] = "MovedPermanently"; + HttpCodes[HttpCodes["ResourceMoved"] = 302] = "ResourceMoved"; + HttpCodes[HttpCodes["SeeOther"] = 303] = "SeeOther"; + HttpCodes[HttpCodes["NotModified"] = 304] = "NotModified"; + HttpCodes[HttpCodes["UseProxy"] = 305] = "UseProxy"; + HttpCodes[HttpCodes["SwitchProxy"] = 306] = "SwitchProxy"; + HttpCodes[HttpCodes["TemporaryRedirect"] = 307] = "TemporaryRedirect"; + HttpCodes[HttpCodes["PermanentRedirect"] = 308] = "PermanentRedirect"; + HttpCodes[HttpCodes["BadRequest"] = 400] = "BadRequest"; + HttpCodes[HttpCodes["Unauthorized"] = 401] = "Unauthorized"; + HttpCodes[HttpCodes["PaymentRequired"] = 402] = "PaymentRequired"; + HttpCodes[HttpCodes["Forbidden"] = 403] = "Forbidden"; + HttpCodes[HttpCodes["NotFound"] = 404] = "NotFound"; + HttpCodes[HttpCodes["MethodNotAllowed"] = 405] = "MethodNotAllowed"; + HttpCodes[HttpCodes["NotAcceptable"] = 406] = "NotAcceptable"; + HttpCodes[HttpCodes["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; + HttpCodes[HttpCodes["RequestTimeout"] = 408] = "RequestTimeout"; + HttpCodes[HttpCodes["Conflict"] = 409] = "Conflict"; + HttpCodes[HttpCodes["Gone"] = 410] = "Gone"; + HttpCodes[HttpCodes["TooManyRequests"] = 429] = "TooManyRequests"; + HttpCodes[HttpCodes["InternalServerError"] = 500] = "InternalServerError"; + HttpCodes[HttpCodes["NotImplemented"] = 501] = "NotImplemented"; + HttpCodes[HttpCodes["BadGateway"] = 502] = "BadGateway"; + HttpCodes[HttpCodes["ServiceUnavailable"] = 503] = "ServiceUnavailable"; + HttpCodes[HttpCodes["GatewayTimeout"] = 504] = "GatewayTimeout"; +})(HttpCodes = exports.HttpCodes || (exports.HttpCodes = {})); +var Headers; +(function (Headers) { + Headers["Accept"] = "accept"; + Headers["ContentType"] = "content-type"; +})(Headers = exports.Headers || (exports.Headers = {})); +var MediaTypes; +(function (MediaTypes) { + MediaTypes["ApplicationJson"] = "application/json"; +})(MediaTypes = exports.MediaTypes || (exports.MediaTypes = {})); +/** + * Returns the proxy URL, depending upon the supplied url and proxy environment variables. + * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com + */ +function getProxyUrl(serverUrl) { + let proxyUrl = pm.getProxyUrl(url.parse(serverUrl)); + return proxyUrl ? proxyUrl.href : ''; +} +exports.getProxyUrl = getProxyUrl; +const HttpRedirectCodes = [ + HttpCodes.MovedPermanently, + HttpCodes.ResourceMoved, + HttpCodes.SeeOther, + HttpCodes.TemporaryRedirect, + HttpCodes.PermanentRedirect +]; +const HttpResponseRetryCodes = [ + HttpCodes.BadGateway, + HttpCodes.ServiceUnavailable, + HttpCodes.GatewayTimeout +]; +const RetryableHttpVerbs = ['OPTIONS', 'GET', 'DELETE', 'HEAD']; +const ExponentialBackoffCeiling = 10; +const ExponentialBackoffTimeSlice = 5; +class HttpClientResponse { + constructor(message) { + this.message = message; + } + readBody() { + return new Promise(async (resolve, reject) => { let output = Buffer.alloc(0); - this.message.on("data", (chunk) => { - output = Buffer.concat([output, chunk]); + this.message.on('data', (chunk) => { + output = Buffer.concat([output, chunk]); }); - this.message.on("end", () => { - resolve(output.toString()); + this.message.on('end', () => { + resolve(output.toString()); }); - }); - } - } - exports.HttpClientResponse = HttpClientResponse; - function isHttps(requestUrl) { - let parsedUrl = url.parse(requestUrl); - return parsedUrl.protocol === "https:"; - } - exports.isHttps = isHttps; - class HttpClient { - constructor(userAgent, handlers, requestOptions) { - this._ignoreSslError = false; - this._allowRedirects = true; - this._allowRedirectDowngrade = false; - this._maxRedirects = 50; - this._allowRetries = false; - this._maxRetries = 1; - this._keepAlive = false; - this._disposed = false; - this.userAgent = userAgent; - this.handlers = handlers || []; - this.requestOptions = requestOptions; - if (requestOptions) { + }); + } +} +exports.HttpClientResponse = HttpClientResponse; +function isHttps(requestUrl) { + let parsedUrl = url.parse(requestUrl); + return parsedUrl.protocol === 'https:'; +} +exports.isHttps = isHttps; +class HttpClient { + constructor(userAgent, handlers, requestOptions) { + this._ignoreSslError = false; + this._allowRedirects = true; + this._allowRedirectDowngrade = false; + this._maxRedirects = 50; + this._allowRetries = false; + this._maxRetries = 1; + this._keepAlive = false; + this._disposed = false; + this.userAgent = userAgent; + this.handlers = handlers || []; + this.requestOptions = requestOptions; + if (requestOptions) { if (requestOptions.ignoreSslError != null) { - this._ignoreSslError = requestOptions.ignoreSslError; + this._ignoreSslError = requestOptions.ignoreSslError; } this._socketTimeout = requestOptions.socketTimeout; if (requestOptions.allowRedirects != null) { - this._allowRedirects = requestOptions.allowRedirects; + this._allowRedirects = requestOptions.allowRedirects; } if (requestOptions.allowRedirectDowngrade != null) { - this._allowRedirectDowngrade = - requestOptions.allowRedirectDowngrade; + this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; } if (requestOptions.maxRedirects != null) { - this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); + this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); } if (requestOptions.keepAlive != null) { - this._keepAlive = requestOptions.keepAlive; + this._keepAlive = requestOptions.keepAlive; } if (requestOptions.allowRetries != null) { - this._allowRetries = requestOptions.allowRetries; + this._allowRetries = requestOptions.allowRetries; } if (requestOptions.maxRetries != null) { - this._maxRetries = requestOptions.maxRetries; - } - } - } - options(requestUrl, additionalHeaders) { - return this.request( - "OPTIONS", - requestUrl, - null, - additionalHeaders || {} - ); - } - get(requestUrl, additionalHeaders) { - return this.request("GET", requestUrl, null, additionalHeaders || {}); - } - del(requestUrl, additionalHeaders) { - return this.request( - "DELETE", - requestUrl, - null, - additionalHeaders || {} - ); - } - post(requestUrl, data, additionalHeaders) { - return this.request( - "POST", - requestUrl, - data, - additionalHeaders || {} - ); - } - patch(requestUrl, data, additionalHeaders) { - return this.request( - "PATCH", - requestUrl, - data, - additionalHeaders || {} - ); - } - put(requestUrl, data, additionalHeaders) { - return this.request("PUT", requestUrl, data, additionalHeaders || {}); - } - head(requestUrl, additionalHeaders) { - return this.request( - "HEAD", - requestUrl, - null, - additionalHeaders || {} - ); + this._maxRetries = requestOptions.maxRetries; + } + } + } + options(requestUrl, additionalHeaders) { + return this.request('OPTIONS', requestUrl, null, additionalHeaders || {}); + } + get(requestUrl, additionalHeaders) { + return this.request('GET', requestUrl, null, additionalHeaders || {}); + } + del(requestUrl, additionalHeaders) { + return this.request('DELETE', requestUrl, null, additionalHeaders || {}); + } + post(requestUrl, data, additionalHeaders) { + return this.request('POST', requestUrl, data, additionalHeaders || {}); + } + patch(requestUrl, data, additionalHeaders) { + return this.request('PATCH', requestUrl, data, additionalHeaders || {}); + } + put(requestUrl, data, additionalHeaders) { + return this.request('PUT', requestUrl, data, additionalHeaders || {}); + } + head(requestUrl, additionalHeaders) { + return this.request('HEAD', requestUrl, null, additionalHeaders || {}); + } + sendStream(verb, requestUrl, stream, additionalHeaders) { + return this.request(verb, requestUrl, stream, additionalHeaders); + } + /** + * Gets a typed object from an endpoint + * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise + */ + async getJson(requestUrl, additionalHeaders = {}) { + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + let res = await this.get(requestUrl, additionalHeaders); + return this._processResponse(res, this.requestOptions); + } + async postJson(requestUrl, obj, additionalHeaders = {}) { + let data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + let res = await this.post(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + } + async putJson(requestUrl, obj, additionalHeaders = {}) { + let data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + let res = await this.put(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + } + async patchJson(requestUrl, obj, additionalHeaders = {}) { + let data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + let res = await this.patch(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + } + /** + * Makes a raw http request. + * All other methods such as get, post, patch, and request ultimately call this. + * Prefer get, del, post and patch + */ + async request(verb, requestUrl, data, headers) { + if (this._disposed) { + throw new Error('Client has already been disposed.'); } - sendStream(verb, requestUrl, stream, additionalHeaders) { - return this.request(verb, requestUrl, stream, additionalHeaders); - } - /** - * Gets a typed object from an endpoint - * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise - */ - async getJson(requestUrl, additionalHeaders = {}) { - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader( - additionalHeaders, - Headers.Accept, - MediaTypes.ApplicationJson - ); - let res = await this.get(requestUrl, additionalHeaders); - return this._processResponse(res, this.requestOptions); - } - async postJson(requestUrl, obj, additionalHeaders = {}) { - let data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader( - additionalHeaders, - Headers.Accept, - MediaTypes.ApplicationJson - ); - additionalHeaders[ - Headers.ContentType - ] = this._getExistingOrDefaultHeader( - additionalHeaders, - Headers.ContentType, - MediaTypes.ApplicationJson - ); - let res = await this.post(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - } - async putJson(requestUrl, obj, additionalHeaders = {}) { - let data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader( - additionalHeaders, - Headers.Accept, - MediaTypes.ApplicationJson - ); - additionalHeaders[ - Headers.ContentType - ] = this._getExistingOrDefaultHeader( - additionalHeaders, - Headers.ContentType, - MediaTypes.ApplicationJson - ); - let res = await this.put(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - } - async patchJson(requestUrl, obj, additionalHeaders = {}) { - let data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader( - additionalHeaders, - Headers.Accept, - MediaTypes.ApplicationJson - ); - additionalHeaders[ - Headers.ContentType - ] = this._getExistingOrDefaultHeader( - additionalHeaders, - Headers.ContentType, - MediaTypes.ApplicationJson - ); - let res = await this.patch(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - } - /** - * Makes a raw http request. - * All other methods such as get, post, patch, and request ultimately call this. - * Prefer get, del, post and patch - */ - async request(verb, requestUrl, data, headers) { - if (this._disposed) { - throw new Error("Client has already been disposed."); - } - let parsedUrl = url.parse(requestUrl); - let info = this._prepareRequest(verb, parsedUrl, headers); - // Only perform retries on reads since writes may not be idempotent. - let maxTries = - this._allowRetries && RetryableHttpVerbs.indexOf(verb) != -1 - ? this._maxRetries + 1 - : 1; - let numTries = 0; - let response; - while (numTries < maxTries) { + let parsedUrl = url.parse(requestUrl); + let info = this._prepareRequest(verb, parsedUrl, headers); + // Only perform retries on reads since writes may not be idempotent. + let maxTries = this._allowRetries && RetryableHttpVerbs.indexOf(verb) != -1 + ? this._maxRetries + 1 + : 1; + let numTries = 0; + let response; + while (numTries < maxTries) { response = await this.requestRaw(info, data); // Check if it's an authentication challenge - if ( - response && - response.message && - response.message.statusCode === HttpCodes.Unauthorized - ) { - let authenticationHandler; - for (let i = 0; i < this.handlers.length; i++) { - if (this.handlers[i].canHandleAuthentication(response)) { - authenticationHandler = this.handlers[i]; - break; + if (response && + response.message && + response.message.statusCode === HttpCodes.Unauthorized) { + let authenticationHandler; + for (let i = 0; i < this.handlers.length; i++) { + if (this.handlers[i].canHandleAuthentication(response)) { + authenticationHandler = this.handlers[i]; + break; + } + } + if (authenticationHandler) { + return authenticationHandler.handleAuthentication(this, info, data); + } + else { + // We have received an unauthorized response but have no handlers to handle it. + // Let the response return to the caller. + return response; } - } - if (authenticationHandler) { - return authenticationHandler.handleAuthentication( - this, - info, - data - ); - } else { - // We have received an unauthorized response but have no handlers to handle it. - // Let the response return to the caller. - return response; - } } let redirectsRemaining = this._maxRedirects; - while ( - HttpRedirectCodes.indexOf(response.message.statusCode) != -1 && - this._allowRedirects && - redirectsRemaining > 0 - ) { - const redirectUrl = response.message.headers["location"]; - if (!redirectUrl) { - // if there's no location to redirect to, we won't - break; - } - let parsedRedirectUrl = url.parse(redirectUrl); - if ( - parsedUrl.protocol == "https:" && - parsedUrl.protocol != parsedRedirectUrl.protocol && - !this._allowRedirectDowngrade - ) { - throw new Error( - "Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true." - ); - } - // we need to finish reading the response before reassigning response - // which will leak the open socket. - await response.readBody(); - // strip authorization header if redirected to a different hostname - if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { - for (let header in headers) { - // header names are case insensitive - if (header.toLowerCase() === "authorization") { - delete headers[header]; - } + while (HttpRedirectCodes.indexOf(response.message.statusCode) != -1 && + this._allowRedirects && + redirectsRemaining > 0) { + const redirectUrl = response.message.headers['location']; + if (!redirectUrl) { + // if there's no location to redirect to, we won't + break; } - } - // let's make the request with the new redirectUrl - info = this._prepareRequest(verb, parsedRedirectUrl, headers); - response = await this.requestRaw(info, data); - redirectsRemaining--; + let parsedRedirectUrl = url.parse(redirectUrl); + if (parsedUrl.protocol == 'https:' && + parsedUrl.protocol != parsedRedirectUrl.protocol && + !this._allowRedirectDowngrade) { + throw new Error('Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.'); + } + // we need to finish reading the response before reassigning response + // which will leak the open socket. + await response.readBody(); + // strip authorization header if redirected to a different hostname + if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { + for (let header in headers) { + // header names are case insensitive + if (header.toLowerCase() === 'authorization') { + delete headers[header]; + } + } + } + // let's make the request with the new redirectUrl + info = this._prepareRequest(verb, parsedRedirectUrl, headers); + response = await this.requestRaw(info, data); + redirectsRemaining--; } - if ( - HttpResponseRetryCodes.indexOf(response.message.statusCode) == -1 - ) { - // If not a retry code, return immediately instead of retrying - return response; + if (HttpResponseRetryCodes.indexOf(response.message.statusCode) == -1) { + // If not a retry code, return immediately instead of retrying + return response; } numTries += 1; if (numTries < maxTries) { - await response.readBody(); - await this._performExponentialBackoff(numTries); + await response.readBody(); + await this._performExponentialBackoff(numTries); } - } - return response; } - /** - * Needs to be called if keepAlive is set to true in request options. - */ - dispose() { - if (this._agent) { + return response; + } + /** + * Needs to be called if keepAlive is set to true in request options. + */ + dispose() { + if (this._agent) { this._agent.destroy(); - } - this._disposed = true; - } - /** - * Raw request. - * @param info - * @param data - */ - requestRaw(info, data) { - return new Promise((resolve, reject) => { + } + this._disposed = true; + } + /** + * Raw request. + * @param info + * @param data + */ + requestRaw(info, data) { + return new Promise((resolve, reject) => { let callbackForResult = function (err, res) { - if (err) { - reject(err); - } - resolve(res); + if (err) { + reject(err); + } + resolve(res); }; this.requestRawWithCallback(info, data, callbackForResult); - }); + }); + } + /** + * Raw request with callback. + * @param info + * @param data + * @param onResult + */ + requestRawWithCallback(info, data, onResult) { + let socket; + if (typeof data === 'string') { + info.options.headers['Content-Length'] = Buffer.byteLength(data, 'utf8'); } - /** - * Raw request with callback. - * @param info - * @param data - * @param onResult - */ - requestRawWithCallback(info, data, onResult) { - let socket; - if (typeof data === "string") { - info.options.headers["Content-Length"] = Buffer.byteLength( - data, - "utf8" - ); - } - let callbackCalled = false; - let handleResult = (err, res) => { + let callbackCalled = false; + let handleResult = (err, res) => { if (!callbackCalled) { - callbackCalled = true; - onResult(err, res); + callbackCalled = true; + onResult(err, res); } - }; - let req = info.httpModule.request(info.options, (msg) => { + }; + let req = info.httpModule.request(info.options, (msg) => { let res = new HttpClientResponse(msg); handleResult(null, res); - }); - req.on("socket", (sock) => { + }); + req.on('socket', sock => { socket = sock; - }); - // If we ever get disconnected, we want the socket to timeout eventually - req.setTimeout(this._socketTimeout || 3 * 60000, () => { + }); + // If we ever get disconnected, we want the socket to timeout eventually + req.setTimeout(this._socketTimeout || 3 * 60000, () => { if (socket) { - socket.end(); + socket.end(); } - handleResult( - new Error("Request timeout: " + info.options.path), - null - ); - }); - req.on("error", function (err) { + handleResult(new Error('Request timeout: ' + info.options.path), null); + }); + req.on('error', function (err) { // err has statusCode property // res should have headers handleResult(err, null); - }); - if (data && typeof data === "string") { - req.write(data, "utf8"); - } - if (data && typeof data !== "string") { - data.on("close", function () { - req.end(); + }); + if (data && typeof data === 'string') { + req.write(data, 'utf8'); + } + if (data && typeof data !== 'string') { + data.on('close', function () { + req.end(); }); data.pipe(req); - } else { + } + else { req.end(); - } } - /** - * Gets an http agent. This function is useful when you need an http agent that handles - * routing through a proxy server - depending upon the url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ - getAgent(serverUrl) { - let parsedUrl = url.parse(serverUrl); - return this._getAgent(parsedUrl); - } - _prepareRequest(method, requestUrl, headers) { - const info = {}; - info.parsedUrl = requestUrl; - const usingSsl = info.parsedUrl.protocol === "https:"; - info.httpModule = usingSsl ? https : http; - const defaultPort = usingSsl ? 443 : 80; - info.options = {}; - info.options.host = info.parsedUrl.hostname; - info.options.port = info.parsedUrl.port + } + /** + * Gets an http agent. This function is useful when you need an http agent that handles + * routing through a proxy server - depending upon the url and proxy environment variables. + * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com + */ + getAgent(serverUrl) { + let parsedUrl = url.parse(serverUrl); + return this._getAgent(parsedUrl); + } + _prepareRequest(method, requestUrl, headers) { + const info = {}; + info.parsedUrl = requestUrl; + const usingSsl = info.parsedUrl.protocol === 'https:'; + info.httpModule = usingSsl ? https : http; + const defaultPort = usingSsl ? 443 : 80; + info.options = {}; + info.options.host = info.parsedUrl.hostname; + info.options.port = info.parsedUrl.port ? parseInt(info.parsedUrl.port) : defaultPort; - info.options.path = - (info.parsedUrl.pathname || "") + (info.parsedUrl.search || ""); - info.options.method = method; - info.options.headers = this._mergeHeaders(headers); - if (this.userAgent != null) { - info.options.headers["user-agent"] = this.userAgent; - } - info.options.agent = this._getAgent(info.parsedUrl); - // gives handlers an opportunity to participate - if (this.handlers) { - this.handlers.forEach((handler) => { - handler.prepareRequest(info.options); + info.options.path = + (info.parsedUrl.pathname || '') + (info.parsedUrl.search || ''); + info.options.method = method; + info.options.headers = this._mergeHeaders(headers); + if (this.userAgent != null) { + info.options.headers['user-agent'] = this.userAgent; + } + info.options.agent = this._getAgent(info.parsedUrl); + // gives handlers an opportunity to participate + if (this.handlers) { + this.handlers.forEach(handler => { + handler.prepareRequest(info.options); }); - } - return info; - } - _mergeHeaders(headers) { - const lowercaseKeys = (obj) => - Object.keys(obj).reduce( - (c, k) => ((c[k.toLowerCase()] = obj[k]), c), - {} - ); - if (this.requestOptions && this.requestOptions.headers) { - return Object.assign( - {}, - lowercaseKeys(this.requestOptions.headers), - lowercaseKeys(headers) - ); - } - return lowercaseKeys(headers || {}); } - _getExistingOrDefaultHeader(additionalHeaders, header, _default) { - const lowercaseKeys = (obj) => - Object.keys(obj).reduce( - (c, k) => ((c[k.toLowerCase()] = obj[k]), c), - {} - ); - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { + return info; + } + _mergeHeaders(headers) { + const lowercaseKeys = obj => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {}); + if (this.requestOptions && this.requestOptions.headers) { + return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers)); + } + return lowercaseKeys(headers || {}); + } + _getExistingOrDefaultHeader(additionalHeaders, header, _default) { + const lowercaseKeys = obj => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {}); + let clientHeader; + if (this.requestOptions && this.requestOptions.headers) { clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; - } - return additionalHeaders[header] || clientHeader || _default; } - _getAgent(parsedUrl) { - let agent; - let proxyUrl = pm.getProxyUrl(parsedUrl); - let useProxy = proxyUrl && proxyUrl.hostname; - if (this._keepAlive && useProxy) { + return additionalHeaders[header] || clientHeader || _default; + } + _getAgent(parsedUrl) { + let agent; + let proxyUrl = pm.getProxyUrl(parsedUrl); + let useProxy = proxyUrl && proxyUrl.hostname; + if (this._keepAlive && useProxy) { agent = this._proxyAgent; - } - if (this._keepAlive && !useProxy) { + } + if (this._keepAlive && !useProxy) { agent = this._agent; - } - // if agent is already assigned use that agent. - if (!!agent) { + } + // if agent is already assigned use that agent. + if (!!agent) { return agent; - } - const usingSsl = parsedUrl.protocol === "https:"; - let maxSockets = 100; - if (!!this.requestOptions) { - maxSockets = - this.requestOptions.maxSockets || http.globalAgent.maxSockets; - } - if (useProxy) { + } + const usingSsl = parsedUrl.protocol === 'https:'; + let maxSockets = 100; + if (!!this.requestOptions) { + maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; + } + if (useProxy) { // If using proxy, need tunnel if (!tunnel) { - tunnel = __nccwpck_require__(74294); + tunnel = __nccwpck_require__(74294); } const agentOptions = { - maxSockets: maxSockets, - keepAlive: this._keepAlive, - proxy: { - proxyAuth: proxyUrl.auth, - host: proxyUrl.hostname, - port: proxyUrl.port, - }, + maxSockets: maxSockets, + keepAlive: this._keepAlive, + proxy: { + proxyAuth: proxyUrl.auth, + host: proxyUrl.hostname, + port: proxyUrl.port + } }; let tunnelAgent; - const overHttps = proxyUrl.protocol === "https:"; + const overHttps = proxyUrl.protocol === 'https:'; if (usingSsl) { - tunnelAgent = overHttps - ? tunnel.httpsOverHttps - : tunnel.httpsOverHttp; - } else { - tunnelAgent = overHttps - ? tunnel.httpOverHttps - : tunnel.httpOverHttp; + tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; + } + else { + tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; } agent = tunnelAgent(agentOptions); this._proxyAgent = agent; - } - // if reusing agent across request and tunneling agent isn't assigned create a new agent - if (this._keepAlive && !agent) { - const options = { - keepAlive: this._keepAlive, - maxSockets: maxSockets, - }; - agent = usingSsl - ? new https.Agent(options) - : new http.Agent(options); + } + // if reusing agent across request and tunneling agent isn't assigned create a new agent + if (this._keepAlive && !agent) { + const options = { keepAlive: this._keepAlive, maxSockets: maxSockets }; + agent = usingSsl ? new https.Agent(options) : new http.Agent(options); this._agent = agent; - } - // if not using private agent and tunnel agent isn't setup then use global agent - if (!agent) { + } + // if not using private agent and tunnel agent isn't setup then use global agent + if (!agent) { agent = usingSsl ? https.globalAgent : http.globalAgent; - } - if (usingSsl && this._ignoreSslError) { + } + if (usingSsl && this._ignoreSslError) { // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options // we have to cast it to any and change it directly agent.options = Object.assign(agent.options || {}, { - rejectUnauthorized: false, + rejectUnauthorized: false }); - } - return agent; } - _performExponentialBackoff(retryNumber) { - retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); - const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); - return new Promise((resolve) => setTimeout(() => resolve(), ms)); - } - static dateTimeDeserializer(key, value) { - if (typeof value === "string") { + return agent; + } + _performExponentialBackoff(retryNumber) { + retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); + const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); + return new Promise(resolve => setTimeout(() => resolve(), ms)); + } + static dateTimeDeserializer(key, value) { + if (typeof value === 'string') { let a = new Date(value); if (!isNaN(a.valueOf())) { - return a; + return a; } - } - return value; } - async _processResponse(res, options) { - return new Promise(async (resolve, reject) => { + return value; + } + async _processResponse(res, options) { + return new Promise(async (resolve, reject) => { const statusCode = res.message.statusCode; const response = { - statusCode: statusCode, - result: null, - headers: {}, + statusCode: statusCode, + result: null, + headers: {} }; // not found leads to null obj returned if (statusCode == HttpCodes.NotFound) { - resolve(response); + resolve(response); } let obj; let contents; // get the result from the body try { - contents = await res.readBody(); - if (contents && contents.length > 0) { - if (options && options.deserializeDates) { - obj = JSON.parse(contents, HttpClient.dateTimeDeserializer); - } else { - obj = JSON.parse(contents); + contents = await res.readBody(); + if (contents && contents.length > 0) { + if (options && options.deserializeDates) { + obj = JSON.parse(contents, HttpClient.dateTimeDeserializer); + } + else { + obj = JSON.parse(contents); + } + response.result = obj; } - response.result = obj; - } - response.headers = res.message.headers; - } catch (err) { - // Invalid resource (contents not json); leaving result obj null + response.headers = res.message.headers; + } + catch (err) { + // Invalid resource (contents not json); leaving result obj null } // note that 3xx redirects are handled by the http layer. if (statusCode > 299) { - let msg; - // if exception/error in body, attempt to get better error - if (obj && obj.message) { - msg = obj.message; - } else if (contents && contents.length > 0) { - // it may be the case that the exception is in the body message as string - msg = contents; - } else { - msg = "Failed request: (" + statusCode + ")"; - } - let err = new Error(msg); - // attach statusCode and body obj (if available) to the error object - err["statusCode"] = statusCode; - if (response.result) { - err["result"] = response.result; - } - reject(err); - } else { - resolve(response); + let msg; + // if exception/error in body, attempt to get better error + if (obj && obj.message) { + msg = obj.message; + } + else if (contents && contents.length > 0) { + // it may be the case that the exception is in the body message as string + msg = contents; + } + else { + msg = 'Failed request: (' + statusCode + ')'; + } + let err = new Error(msg); + // attach statusCode and body obj (if available) to the error object + err['statusCode'] = statusCode; + if (response.result) { + err['result'] = response.result; + } + reject(err); } - }); - } - } - exports.HttpClient = HttpClient; - - /***/ - }, - - /***/ 16443: /***/ ( - __unused_webpack_module, - exports, - __nccwpck_require__ - ) => { - "use strict"; - - Object.defineProperty(exports, "__esModule", { value: true }); - const url = __nccwpck_require__(57310); - function getProxyUrl(reqUrl) { - let usingSsl = reqUrl.protocol === "https:"; - let proxyUrl; - if (checkBypass(reqUrl)) { - return proxyUrl; - } - let proxyVar; - if (usingSsl) { - proxyVar = process.env["https_proxy"] || process.env["HTTPS_PROXY"]; - } else { - proxyVar = process.env["http_proxy"] || process.env["HTTP_PROXY"]; - } - if (proxyVar) { - proxyUrl = url.parse(proxyVar); - } - return proxyUrl; - } - exports.getProxyUrl = getProxyUrl; - function checkBypass(reqUrl) { - if (!reqUrl.hostname) { - return false; - } - let noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || ""; - if (!noProxy) { - return false; - } - // Determine the request port - let reqPort; - if (reqUrl.port) { - reqPort = Number(reqUrl.port); - } else if (reqUrl.protocol === "http:") { - reqPort = 80; - } else if (reqUrl.protocol === "https:") { - reqPort = 443; - } - // Format the request hostname and hostname with port - let upperReqHosts = [reqUrl.hostname.toUpperCase()]; - if (typeof reqPort === "number") { - upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); - } - // Compare request host against noproxy - for (let upperNoProxyItem of noProxy - .split(",") - .map((x) => x.trim().toUpperCase()) - .filter((x) => x)) { - if (upperReqHosts.some((x) => x === upperNoProxyItem)) { - return true; - } - } - return false; - } - exports.checkBypass = checkBypass; + else { + resolve(response); + } + }); + } +} +exports.HttpClient = HttpClient; - /***/ - }, - /***/ 40334: /***/ (__unused_webpack_module, exports) => { - "use strict"; +/***/ }), - Object.defineProperty(exports, "__esModule", { value: true }); +/***/ 16443: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - async function auth(token) { - const tokenType = - token.split(/\./).length === 3 - ? "app" - : /^v\d+\./.test(token) - ? "installation" - : "oauth"; - return { - type: "token", - token: token, - tokenType, - }; - } +"use strict"; - /** - * Prefix token for usage in the Authorization header - * - * @param token OAuth token or JSON Web Token - */ - function withAuthorizationPrefix(token) { - if (token.split(/\./).length === 3) { - return `bearer ${token}`; +Object.defineProperty(exports, "__esModule", ({ value: true })); +const url = __nccwpck_require__(57310); +function getProxyUrl(reqUrl) { + let usingSsl = reqUrl.protocol === 'https:'; + let proxyUrl; + if (checkBypass(reqUrl)) { + return proxyUrl; + } + let proxyVar; + if (usingSsl) { + proxyVar = process.env['https_proxy'] || process.env['HTTPS_PROXY']; + } + else { + proxyVar = process.env['http_proxy'] || process.env['HTTP_PROXY']; + } + if (proxyVar) { + proxyUrl = url.parse(proxyVar); + } + return proxyUrl; +} +exports.getProxyUrl = getProxyUrl; +function checkBypass(reqUrl) { + if (!reqUrl.hostname) { + return false; + } + let noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || ''; + if (!noProxy) { + return false; + } + // Determine the request port + let reqPort; + if (reqUrl.port) { + reqPort = Number(reqUrl.port); + } + else if (reqUrl.protocol === 'http:') { + reqPort = 80; + } + else if (reqUrl.protocol === 'https:') { + reqPort = 443; + } + // Format the request hostname and hostname with port + let upperReqHosts = [reqUrl.hostname.toUpperCase()]; + if (typeof reqPort === 'number') { + upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); + } + // Compare request host against noproxy + for (let upperNoProxyItem of noProxy + .split(',') + .map(x => x.trim().toUpperCase()) + .filter(x => x)) { + if (upperReqHosts.some(x => x === upperNoProxyItem)) { + return true; } + } + return false; +} +exports.checkBypass = checkBypass; - return `token ${token}`; - } - - async function hook(token, request, route, parameters) { - const endpoint = request.endpoint.merge(route, parameters); - endpoint.headers.authorization = withAuthorizationPrefix(token); - return request(endpoint); - } - const createTokenAuth = function createTokenAuth(token) { - if (!token) { - throw new Error( - "[@octokit/auth-token] No token passed to createTokenAuth" - ); - } +/***/ }), - if (typeof token !== "string") { - throw new Error( - "[@octokit/auth-token] Token passed to createTokenAuth is not a string" - ); - } +/***/ 40334: +/***/ ((__unused_webpack_module, exports) => { - token = token.replace(/^(token|bearer) +/i, ""); - return Object.assign(auth.bind(null, token), { - hook: hook.bind(null, token), - }); - }; +"use strict"; - exports.createTokenAuth = createTokenAuth; - //# sourceMappingURL=index.js.map - /***/ - }, +Object.defineProperty(exports, "__esModule", ({ value: true })); - /***/ 59440: /***/ ( - __unused_webpack_module, - exports, - __nccwpck_require__ - ) => { - "use strict"; +async function auth(token) { + const tokenType = token.split(/\./).length === 3 ? "app" : /^v\d+\./.test(token) ? "installation" : "oauth"; + return { + type: "token", + token: token, + tokenType + }; +} - Object.defineProperty(exports, "__esModule", { value: true }); +/** + * Prefix token for usage in the Authorization header + * + * @param token OAuth token or JSON Web Token + */ +function withAuthorizationPrefix(token) { + if (token.split(/\./).length === 3) { + return `bearer ${token}`; + } - function _interopDefault(ex) { - return ex && typeof ex === "object" && "default" in ex - ? ex["default"] - : ex; - } + return `token ${token}`; +} - var isPlainObject = _interopDefault(__nccwpck_require__(48840)); - var universalUserAgent = __nccwpck_require__(11292); +async function hook(token, request, route, parameters) { + const endpoint = request.endpoint.merge(route, parameters); + endpoint.headers.authorization = withAuthorizationPrefix(token); + return request(endpoint); +} - function lowercaseKeys(object) { - if (!object) { - return {}; - } +const createTokenAuth = function createTokenAuth(token) { + if (!token) { + throw new Error("[@octokit/auth-token] No token passed to createTokenAuth"); + } - return Object.keys(object).reduce((newObj, key) => { - newObj[key.toLowerCase()] = object[key]; - return newObj; - }, {}); - } + if (typeof token !== "string") { + throw new Error("[@octokit/auth-token] Token passed to createTokenAuth is not a string"); + } - function mergeDeep(defaults, options) { - const result = Object.assign({}, defaults); - Object.keys(options).forEach((key) => { - if (isPlainObject(options[key])) { - if (!(key in defaults)) - Object.assign(result, { - [key]: options[key], - }); - else result[key] = mergeDeep(defaults[key], options[key]); - } else { - Object.assign(result, { - [key]: options[key], - }); - } - }); - return result; - } + token = token.replace(/^(token|bearer) +/i, ""); + return Object.assign(auth.bind(null, token), { + hook: hook.bind(null, token) + }); +}; - function merge(defaults, route, options) { - if (typeof route === "string") { - let [method, url] = route.split(" "); - options = Object.assign( - url - ? { - method, - url, - } - : { - url: method, - }, - options - ); - } else { - options = Object.assign({}, route); - } // lowercase header names before merging with defaults to avoid duplicates +exports.createTokenAuth = createTokenAuth; +//# sourceMappingURL=index.js.map - options.headers = lowercaseKeys(options.headers); - const mergedOptions = mergeDeep(defaults || {}, options); // mediaType.previews arrays are merged, instead of overwritten - if (defaults && defaults.mediaType.previews.length) { - mergedOptions.mediaType.previews = defaults.mediaType.previews - .filter( - (preview) => !mergedOptions.mediaType.previews.includes(preview) - ) - .concat(mergedOptions.mediaType.previews); - } +/***/ }), - mergedOptions.mediaType.previews = mergedOptions.mediaType.previews.map( - (preview) => preview.replace(/-preview/, "") - ); - return mergedOptions; - } +/***/ 59440: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - function addQueryParameters(url, parameters) { - const separator = /\?/.test(url) ? "&" : "?"; - const names = Object.keys(parameters); +"use strict"; - if (names.length === 0) { - return url; - } - return ( - url + - separator + - names - .map((name) => { - if (name === "q") { - return ( - "q=" + - parameters.q.split("+").map(encodeURIComponent).join("+") - ); - } +Object.defineProperty(exports, "__esModule", ({ value: true })); - return `${name}=${encodeURIComponent(parameters[name])}`; - }) - .join("&") - ); - } +function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } - const urlVariableRegex = /\{[^}]+\}/g; +var isPlainObject = _interopDefault(__nccwpck_require__(48840)); +var universalUserAgent = __nccwpck_require__(11292); - function removeNonChars(variableName) { - return variableName.replace(/^\W+|\W+$/g, "").split(/,/); - } +function lowercaseKeys(object) { + if (!object) { + return {}; + } - function extractUrlVariableNames(url) { - const matches = url.match(urlVariableRegex); + return Object.keys(object).reduce((newObj, key) => { + newObj[key.toLowerCase()] = object[key]; + return newObj; + }, {}); +} - if (!matches) { - return []; +function mergeDeep(defaults, options) { + const result = Object.assign({}, defaults); + Object.keys(options).forEach(key => { + if (isPlainObject(options[key])) { + if (!(key in defaults)) Object.assign(result, { + [key]: options[key] + });else result[key] = mergeDeep(defaults[key], options[key]); + } else { + Object.assign(result, { + [key]: options[key] + }); + } + }); + return result; +} + +function merge(defaults, route, options) { + if (typeof route === "string") { + let [method, url] = route.split(" "); + options = Object.assign(url ? { + method, + url + } : { + url: method + }, options); + } else { + options = Object.assign({}, route); + } // lowercase header names before merging with defaults to avoid duplicates + + + options.headers = lowercaseKeys(options.headers); + const mergedOptions = mergeDeep(defaults || {}, options); // mediaType.previews arrays are merged, instead of overwritten + + if (defaults && defaults.mediaType.previews.length) { + mergedOptions.mediaType.previews = defaults.mediaType.previews.filter(preview => !mergedOptions.mediaType.previews.includes(preview)).concat(mergedOptions.mediaType.previews); + } + + mergedOptions.mediaType.previews = mergedOptions.mediaType.previews.map(preview => preview.replace(/-preview/, "")); + return mergedOptions; +} + +function addQueryParameters(url, parameters) { + const separator = /\?/.test(url) ? "&" : "?"; + const names = Object.keys(parameters); + + if (names.length === 0) { + return url; + } + + return url + separator + names.map(name => { + if (name === "q") { + return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+"); + } + + return `${name}=${encodeURIComponent(parameters[name])}`; + }).join("&"); +} + +const urlVariableRegex = /\{[^}]+\}/g; + +function removeNonChars(variableName) { + return variableName.replace(/^\W+|\W+$/g, "").split(/,/); +} + +function extractUrlVariableNames(url) { + const matches = url.match(urlVariableRegex); + + if (!matches) { + return []; + } + + return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []); +} + +function omit(object, keysToOmit) { + return Object.keys(object).filter(option => !keysToOmit.includes(option)).reduce((obj, key) => { + obj[key] = object[key]; + return obj; + }, {}); +} + +// Based on https://github.com/bramstein/url-template, licensed under BSD +// TODO: create separate package. +// +// Copyright (c) 2012-2014, Bram Stein +// All rights reserved. +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 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. +// 3. The name of the author may not be used to endorse or promote products +// derived from this software without specific prior written permission. +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR "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 OWNER 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. + +/* istanbul ignore file */ +function encodeReserved(str) { + return str.split(/(%[0-9A-Fa-f]{2})/g).map(function (part) { + if (!/%[0-9A-Fa-f]/.test(part)) { + part = encodeURI(part).replace(/%5B/g, "[").replace(/%5D/g, "]"); + } + + return part; + }).join(""); +} + +function encodeUnreserved(str) { + return encodeURIComponent(str).replace(/[!'()*]/g, function (c) { + return "%" + c.charCodeAt(0).toString(16).toUpperCase(); + }); +} + +function encodeValue(operator, value, key) { + value = operator === "+" || operator === "#" ? encodeReserved(value) : encodeUnreserved(value); + + if (key) { + return encodeUnreserved(key) + "=" + value; + } else { + return value; + } +} + +function isDefined(value) { + return value !== undefined && value !== null; +} + +function isKeyOperator(operator) { + return operator === ";" || operator === "&" || operator === "?"; +} + +function getValues(context, operator, key, modifier) { + var value = context[key], + result = []; + + if (isDefined(value) && value !== "") { + if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") { + value = value.toString(); + + if (modifier && modifier !== "*") { + value = value.substring(0, parseInt(modifier, 10)); + } + + result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : "")); + } else { + if (modifier === "*") { + if (Array.isArray(value)) { + value.filter(isDefined).forEach(function (value) { + result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : "")); + }); + } else { + Object.keys(value).forEach(function (k) { + if (isDefined(value[k])) { + result.push(encodeValue(operator, value[k], k)); + } + }); } + } else { + const tmp = []; - return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []); - } - - function omit(object, keysToOmit) { - return Object.keys(object) - .filter((option) => !keysToOmit.includes(option)) - .reduce((obj, key) => { - obj[key] = object[key]; - return obj; - }, {}); - } - - // Based on https://github.com/bramstein/url-template, licensed under BSD - // TODO: create separate package. - // - // Copyright (c) 2012-2014, Bram Stein - // All rights reserved. - // Redistribution and use in source and binary forms, with or without - // modification, are permitted provided that the following conditions - // are met: - // 1. Redistributions of source code must retain the above copyright - // notice, this list of conditions and the following disclaimer. - // 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. - // 3. The name of the author may not be used to endorse or promote products - // derived from this software without specific prior written permission. - // THIS SOFTWARE IS PROVIDED BY THE AUTHOR "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 OWNER 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. - - /* istanbul ignore file */ - function encodeReserved(str) { - return str - .split(/(%[0-9A-Fa-f]{2})/g) - .map(function (part) { - if (!/%[0-9A-Fa-f]/.test(part)) { - part = encodeURI(part).replace(/%5B/g, "[").replace(/%5D/g, "]"); + if (Array.isArray(value)) { + value.filter(isDefined).forEach(function (value) { + tmp.push(encodeValue(operator, value)); + }); + } else { + Object.keys(value).forEach(function (k) { + if (isDefined(value[k])) { + tmp.push(encodeUnreserved(k)); + tmp.push(encodeValue(operator, value[k].toString())); } + }); + } - return part; - }) - .join(""); - } - - function encodeUnreserved(str) { - return encodeURIComponent(str).replace(/[!'()*]/g, function (c) { - return "%" + c.charCodeAt(0).toString(16).toUpperCase(); - }); - } - - function encodeValue(operator, value, key) { - value = - operator === "+" || operator === "#" - ? encodeReserved(value) - : encodeUnreserved(value); - - if (key) { - return encodeUnreserved(key) + "=" + value; - } else { - return value; + if (isKeyOperator(operator)) { + result.push(encodeUnreserved(key) + "=" + tmp.join(",")); + } else if (tmp.length !== 0) { + result.push(tmp.join(",")); } } - - function isDefined(value) { - return value !== undefined && value !== null; + } + } else { + if (operator === ";") { + if (isDefined(value)) { + result.push(encodeUnreserved(key)); } + } else if (value === "" && (operator === "&" || operator === "?")) { + result.push(encodeUnreserved(key) + "="); + } else if (value === "") { + result.push(""); + } + } - function isKeyOperator(operator) { - return operator === ";" || operator === "&" || operator === "?"; - } + return result; +} - function getValues(context, operator, key, modifier) { - var value = context[key], - result = []; +function parseUrl(template) { + return { + expand: expand.bind(null, template) + }; +} - if (isDefined(value) && value !== "") { - if ( - typeof value === "string" || - typeof value === "number" || - typeof value === "boolean" - ) { - value = value.toString(); +function expand(template, context) { + var operators = ["+", "#", ".", "/", ";", "?", "&"]; + return template.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g, function (_, expression, literal) { + if (expression) { + let operator = ""; + const values = []; - if (modifier && modifier !== "*") { - value = value.substring(0, parseInt(modifier, 10)); - } + if (operators.indexOf(expression.charAt(0)) !== -1) { + operator = expression.charAt(0); + expression = expression.substr(1); + } - result.push( - encodeValue(operator, value, isKeyOperator(operator) ? key : "") - ); - } else { - if (modifier === "*") { - if (Array.isArray(value)) { - value.filter(isDefined).forEach(function (value) { - result.push( - encodeValue( - operator, - value, - isKeyOperator(operator) ? key : "" - ) - ); - }); - } else { - Object.keys(value).forEach(function (k) { - if (isDefined(value[k])) { - result.push(encodeValue(operator, value[k], k)); - } - }); - } - } else { - const tmp = []; + expression.split(/,/g).forEach(function (variable) { + var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable); + values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3])); + }); - if (Array.isArray(value)) { - value.filter(isDefined).forEach(function (value) { - tmp.push(encodeValue(operator, value)); - }); - } else { - Object.keys(value).forEach(function (k) { - if (isDefined(value[k])) { - tmp.push(encodeUnreserved(k)); - tmp.push(encodeValue(operator, value[k].toString())); - } - }); - } + if (operator && operator !== "+") { + var separator = ","; - if (isKeyOperator(operator)) { - result.push(encodeUnreserved(key) + "=" + tmp.join(",")); - } else if (tmp.length !== 0) { - result.push(tmp.join(",")); - } - } - } - } else { - if (operator === ";") { - if (isDefined(value)) { - result.push(encodeUnreserved(key)); - } - } else if (value === "" && (operator === "&" || operator === "?")) { - result.push(encodeUnreserved(key) + "="); - } else if (value === "") { - result.push(""); - } + if (operator === "?") { + separator = "&"; + } else if (operator !== "#") { + separator = operator; } - return result; - } - - function parseUrl(template) { - return { - expand: expand.bind(null, template), - }; + return (values.length !== 0 ? operator : "") + values.join(separator); + } else { + return values.join(","); + } + } else { + return encodeReserved(literal); + } + }); +} + +function parse(options) { + // https://fetch.spec.whatwg.org/#methods + let method = options.method.toUpperCase(); // replace :varname with {varname} to make it RFC 6570 compatible + + let url = (options.url || "/").replace(/:([a-z]\w+)/g, "{+$1}"); + let headers = Object.assign({}, options.headers); + let body; + let parameters = omit(options, ["method", "baseUrl", "url", "headers", "request", "mediaType"]); // extract variable names from URL to calculate remaining variables later + + const urlVariableNames = extractUrlVariableNames(url); + url = parseUrl(url).expand(parameters); + + if (!/^http/.test(url)) { + url = options.baseUrl + url; + } + + const omittedParameters = Object.keys(options).filter(option => urlVariableNames.includes(option)).concat("baseUrl"); + const remainingParameters = omit(parameters, omittedParameters); + const isBinaryRequset = /application\/octet-stream/i.test(headers.accept); + + if (!isBinaryRequset) { + if (options.mediaType.format) { + // e.g. application/vnd.github.v3+json => application/vnd.github.v3.raw + headers.accept = headers.accept.split(/,/).map(preview => preview.replace(/application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/, `application/vnd$1$2.${options.mediaType.format}`)).join(","); + } + + if (options.mediaType.previews.length) { + const previewsFromAcceptHeader = headers.accept.match(/[\w-]+(?=-preview)/g) || []; + headers.accept = previewsFromAcceptHeader.concat(options.mediaType.previews).map(preview => { + const format = options.mediaType.format ? `.${options.mediaType.format}` : "+json"; + return `application/vnd.github.${preview}-preview${format}`; + }).join(","); + } + } // for GET/HEAD requests, set URL query parameters from remaining parameters + // for PATCH/POST/PUT/DELETE requests, set request body from remaining parameters + + + if (["GET", "HEAD"].includes(method)) { + url = addQueryParameters(url, remainingParameters); + } else { + if ("data" in remainingParameters) { + body = remainingParameters.data; + } else { + if (Object.keys(remainingParameters).length) { + body = remainingParameters; + } else { + headers["content-length"] = 0; } + } + } // default content-type for JSON if body is set - function expand(template, context) { - var operators = ["+", "#", ".", "/", ";", "?", "&"]; - return template.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g, function ( - _, - expression, - literal - ) { - if (expression) { - let operator = ""; - const values = []; - - if (operators.indexOf(expression.charAt(0)) !== -1) { - operator = expression.charAt(0); - expression = expression.substr(1); - } - - expression.split(/,/g).forEach(function (variable) { - var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable); - values.push( - getValues(context, operator, tmp[1], tmp[2] || tmp[3]) - ); - }); - - if (operator && operator !== "+") { - var separator = ","; - - if (operator === "?") { - separator = "&"; - } else if (operator !== "#") { - separator = operator; - } - - return ( - (values.length !== 0 ? operator : "") + values.join(separator) - ); - } else { - return values.join(","); - } - } else { - return encodeReserved(literal); - } - }); - } - function parse(options) { - // https://fetch.spec.whatwg.org/#methods - let method = options.method.toUpperCase(); // replace :varname with {varname} to make it RFC 6570 compatible - - let url = (options.url || "/").replace(/:([a-z]\w+)/g, "{+$1}"); - let headers = Object.assign({}, options.headers); - let body; - let parameters = omit(options, [ - "method", - "baseUrl", - "url", - "headers", - "request", - "mediaType", - ]); // extract variable names from URL to calculate remaining variables later - - const urlVariableNames = extractUrlVariableNames(url); - url = parseUrl(url).expand(parameters); - - if (!/^http/.test(url)) { - url = options.baseUrl + url; - } - - const omittedParameters = Object.keys(options) - .filter((option) => urlVariableNames.includes(option)) - .concat("baseUrl"); - const remainingParameters = omit(parameters, omittedParameters); - const isBinaryRequset = /application\/octet-stream/i.test( - headers.accept - ); + if (!headers["content-type"] && typeof body !== "undefined") { + headers["content-type"] = "application/json; charset=utf-8"; + } // GitHub expects 'content-length: 0' header for PUT/PATCH requests without body. + // fetch does not allow to set `content-length` header, but we can set body to an empty string - if (!isBinaryRequset) { - if (options.mediaType.format) { - // e.g. application/vnd.github.v3+json => application/vnd.github.v3.raw - headers.accept = headers.accept - .split(/,/) - .map((preview) => - preview.replace( - /application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/, - `application/vnd$1$2.${options.mediaType.format}` - ) - ) - .join(","); - } - if (options.mediaType.previews.length) { - const previewsFromAcceptHeader = - headers.accept.match(/[\w-]+(?=-preview)/g) || []; - headers.accept = previewsFromAcceptHeader - .concat(options.mediaType.previews) - .map((preview) => { - const format = options.mediaType.format - ? `.${options.mediaType.format}` - : "+json"; - return `application/vnd.github.${preview}-preview${format}`; - }) - .join(","); - } - } // for GET/HEAD requests, set URL query parameters from remaining parameters - // for PATCH/POST/PUT/DELETE requests, set request body from remaining parameters + if (["PATCH", "PUT"].includes(method) && typeof body === "undefined") { + body = ""; + } // Only return body/request keys if present - if (["GET", "HEAD"].includes(method)) { - url = addQueryParameters(url, remainingParameters); - } else { - if ("data" in remainingParameters) { - body = remainingParameters.data; - } else { - if (Object.keys(remainingParameters).length) { - body = remainingParameters; - } else { - headers["content-length"] = 0; - } - } - } // default content-type for JSON if body is set - if (!headers["content-type"] && typeof body !== "undefined") { - headers["content-type"] = "application/json; charset=utf-8"; - } // GitHub expects 'content-length: 0' header for PUT/PATCH requests without body. - // fetch does not allow to set `content-length` header, but we can set body to an empty string + return Object.assign({ + method, + url, + headers + }, typeof body !== "undefined" ? { + body + } : null, options.request ? { + request: options.request + } : null); +} - if (["PATCH", "PUT"].includes(method) && typeof body === "undefined") { - body = ""; - } // Only return body/request keys if present +function endpointWithDefaults(defaults, route, options) { + return parse(merge(defaults, route, options)); +} - return Object.assign( - { - method, - url, - headers, - }, - typeof body !== "undefined" - ? { - body, - } - : null, - options.request - ? { - request: options.request, - } - : null - ); - } +function withDefaults(oldDefaults, newDefaults) { + const DEFAULTS = merge(oldDefaults, newDefaults); + const endpoint = endpointWithDefaults.bind(null, DEFAULTS); + return Object.assign(endpoint, { + DEFAULTS, + defaults: withDefaults.bind(null, DEFAULTS), + merge: merge.bind(null, DEFAULTS), + parse + }); +} - function endpointWithDefaults(defaults, route, options) { - return parse(merge(defaults, route, options)); - } +const VERSION = "6.0.0"; - function withDefaults(oldDefaults, newDefaults) { - const DEFAULTS = merge(oldDefaults, newDefaults); - const endpoint = endpointWithDefaults.bind(null, DEFAULTS); - return Object.assign(endpoint, { - DEFAULTS, - defaults: withDefaults.bind(null, DEFAULTS), - merge: merge.bind(null, DEFAULTS), - parse, - }); - } +const userAgent = `octokit-endpoint.js/${VERSION} ${universalUserAgent.getUserAgent()}`; // DEFAULTS has all properties set that EndpointOptions has, except url. +// So we use RequestParameters and add method as additional required property. - const VERSION = "6.0.0"; +const DEFAULTS = { + method: "GET", + baseUrl: "https://api.github.com", + headers: { + accept: "application/vnd.github.v3+json", + "user-agent": userAgent + }, + mediaType: { + format: "", + previews: [] + } +}; - const userAgent = `octokit-endpoint.js/${VERSION} ${universalUserAgent.getUserAgent()}`; // DEFAULTS has all properties set that EndpointOptions has, except url. - // So we use RequestParameters and add method as additional required property. +const endpoint = withDefaults(null, DEFAULTS); - const DEFAULTS = { - method: "GET", - baseUrl: "https://api.github.com", - headers: { - accept: "application/vnd.github.v3+json", - "user-agent": userAgent, - }, - mediaType: { - format: "", - previews: [], - }, - }; +exports.endpoint = endpoint; +//# sourceMappingURL=index.js.map - const endpoint = withDefaults(null, DEFAULTS); - exports.endpoint = endpoint; - //# sourceMappingURL=index.js.map +/***/ }), - /***/ - }, +/***/ 11292: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - /***/ 11292: /***/ ( - __unused_webpack_module, - exports, - __nccwpck_require__ - ) => { - "use strict"; +"use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - function _interopDefault(ex) { - return ex && typeof ex === "object" && "default" in ex - ? ex["default"] - : ex; - } +Object.defineProperty(exports, "__esModule", ({ value: true })); - var osName = _interopDefault(__nccwpck_require__(54824)); +function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } - function getUserAgent() { - try { - return `Node.js/${process.version.substr(1)} (${osName()}; ${ - process.arch - })`; - } catch (error) { - if (/wmic os get Caption/.test(error.message)) { - return "Windows "; - } +var osName = _interopDefault(__nccwpck_require__(54824)); - return ""; - } - } +function getUserAgent() { + try { + return `Node.js/${process.version.substr(1)} (${osName()}; ${process.arch})`; + } catch (error) { + if (/wmic os get Caption/.test(error.message)) { + return "Windows "; + } - exports.getUserAgent = getUserAgent; - //# sourceMappingURL=index.js.map + return ""; + } +} - /***/ - }, +exports.getUserAgent = getUserAgent; +//# sourceMappingURL=index.js.map - /***/ 88467: /***/ ( - __unused_webpack_module, - exports, - __nccwpck_require__ - ) => { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); +/***/ }), - var request = __nccwpck_require__(36234); - var universalUserAgent = __nccwpck_require__(45030); +/***/ 88467: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - const VERSION = "4.3.1"; +"use strict"; - class GraphqlError extends Error { - constructor(request, response) { - const message = response.data.errors[0].message; - super(message); - Object.assign(this, response.data); - this.name = "GraphqlError"; - this.request = request; // Maintains proper stack trace (only available on V8) - /* istanbul ignore next */ +Object.defineProperty(exports, "__esModule", ({ value: true })); - if (Error.captureStackTrace) { - Error.captureStackTrace(this, this.constructor); - } - } - } +var request = __nccwpck_require__(36234); +var universalUserAgent = __nccwpck_require__(45030); - const NON_VARIABLE_OPTIONS = [ - "method", - "baseUrl", - "url", - "headers", - "request", - "query", - ]; - function graphql(request, query, options) { - options = - typeof query === "string" - ? (options = Object.assign( - { - query, - }, - options - )) - : (options = query); - const requestOptions = Object.keys(options).reduce((result, key) => { - if (NON_VARIABLE_OPTIONS.includes(key)) { - result[key] = options[key]; - return result; - } +const VERSION = "4.3.1"; - if (!result.variables) { - result.variables = {}; - } +class GraphqlError extends Error { + constructor(request, response) { + const message = response.data.errors[0].message; + super(message); + Object.assign(this, response.data); + this.name = "GraphqlError"; + this.request = request; // Maintains proper stack trace (only available on V8) - result.variables[key] = options[key]; - return result; - }, {}); - return request(requestOptions).then((response) => { - if (response.data.errors) { - throw new GraphqlError(requestOptions, { - data: response.data, - }); - } + /* istanbul ignore next */ - return response.data.data; - }); - } + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } + } - function withDefaults(request$1, newDefaults) { - const newRequest = request$1.defaults(newDefaults); +} - const newApi = (query, options) => { - return graphql(newRequest, query, options); - }; +const NON_VARIABLE_OPTIONS = ["method", "baseUrl", "url", "headers", "request", "query"]; +function graphql(request, query, options) { + options = typeof query === "string" ? options = Object.assign({ + query + }, options) : options = query; + const requestOptions = Object.keys(options).reduce((result, key) => { + if (NON_VARIABLE_OPTIONS.includes(key)) { + result[key] = options[key]; + return result; + } - return Object.assign(newApi, { - defaults: withDefaults.bind(null, newRequest), - endpoint: request.request.endpoint, - }); - } + if (!result.variables) { + result.variables = {}; + } - const graphql$1 = withDefaults(request.request, { - headers: { - "user-agent": `octokit-graphql.js/${VERSION} ${universalUserAgent.getUserAgent()}`, - }, - method: "POST", - url: "/graphql", + result.variables[key] = options[key]; + return result; + }, {}); + return request(requestOptions).then(response => { + if (response.data.errors) { + throw new GraphqlError(requestOptions, { + data: response.data }); - function withCustomRequest(customRequest) { - return withDefaults(customRequest, { - method: "POST", - url: "/graphql", - }); - } - - exports.graphql = graphql$1; - exports.withCustomRequest = withCustomRequest; - //# sourceMappingURL=index.js.map - - /***/ - }, - - /***/ 64193: /***/ (__unused_webpack_module, exports) => { - "use strict"; - - Object.defineProperty(exports, "__esModule", { value: true }); - - const VERSION = "1.1.2"; - - /** - * Some “list” response that can be paginated have a different response structure - * - * They have a `total_count` key in the response (search also has `incomplete_results`, - * /installation/repositories also has `repository_selection`), as well as a key with - * the list of the items which name varies from endpoint to endpoint: - * - * - https://developer.github.com/v3/search/#example (key `items`) - * - https://developer.github.com/v3/checks/runs/#response-3 (key: `check_runs`) - * - https://developer.github.com/v3/checks/suites/#response-1 (key: `check_suites`) - * - https://developer.github.com/v3/apps/installations/#list-repositories (key: `repositories`) - * - https://developer.github.com/v3/apps/installations/#list-installations-for-a-user (key `installations`) - * - * Octokit normalizes these responses so that paginated results are always returned following - * the same structure. One challenge is that if the list response has only one page, no Link - * header is provided, so this header alone is not sufficient to check wether a response is - * paginated or not. For the exceptions with the namespace, a fallback check for the route - * paths has to be added in order to normalize the response. We cannot check for the total_count - * property because it also exists in the response of Get the combined status for a specific ref. - */ - const REGEX = [ - /^\/search\//, - /^\/repos\/[^/]+\/[^/]+\/commits\/[^/]+\/(check-runs|check-suites)([^/]|$)/, - /^\/installation\/repositories([^/]|$)/, - /^\/user\/installations([^/]|$)/, - /^\/repos\/[^/]+\/[^/]+\/actions\/secrets([^/]|$)/, - /^\/repos\/[^/]+\/[^/]+\/actions\/workflows(\/[^/]+\/runs)?([^/]|$)/, - /^\/repos\/[^/]+\/[^/]+\/actions\/runs(\/[^/]+\/(artifacts|jobs))?([^/]|$)/, - ]; - function normalizePaginatedListResponse(octokit, url, response) { - const path = url.replace(octokit.request.endpoint.DEFAULTS.baseUrl, ""); - const responseNeedsNormalization = REGEX.find((regex) => - regex.test(path) - ); - if (!responseNeedsNormalization) return; // keep the additional properties intact as there is currently no other way - // to retrieve the same information. - - const incompleteResults = response.data.incomplete_results; - const repositorySelection = response.data.repository_selection; - const totalCount = response.data.total_count; - delete response.data.incomplete_results; - delete response.data.repository_selection; - delete response.data.total_count; - const namespaceKey = Object.keys(response.data)[0]; - const data = response.data[namespaceKey]; - response.data = data; - - if (typeof incompleteResults !== "undefined") { - response.data.incomplete_results = incompleteResults; + } + + return response.data.data; + }); +} + +function withDefaults(request$1, newDefaults) { + const newRequest = request$1.defaults(newDefaults); + + const newApi = (query, options) => { + return graphql(newRequest, query, options); + }; + + return Object.assign(newApi, { + defaults: withDefaults.bind(null, newRequest), + endpoint: request.request.endpoint + }); +} + +const graphql$1 = withDefaults(request.request, { + headers: { + "user-agent": `octokit-graphql.js/${VERSION} ${universalUserAgent.getUserAgent()}` + }, + method: "POST", + url: "/graphql" +}); +function withCustomRequest(customRequest) { + return withDefaults(customRequest, { + method: "POST", + url: "/graphql" + }); +} + +exports.graphql = graphql$1; +exports.withCustomRequest = withCustomRequest; +//# sourceMappingURL=index.js.map + + +/***/ }), + +/***/ 64193: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +const VERSION = "1.1.2"; + +/** + * Some “list” response that can be paginated have a different response structure + * + * They have a `total_count` key in the response (search also has `incomplete_results`, + * /installation/repositories also has `repository_selection`), as well as a key with + * the list of the items which name varies from endpoint to endpoint: + * + * - https://developer.github.com/v3/search/#example (key `items`) + * - https://developer.github.com/v3/checks/runs/#response-3 (key: `check_runs`) + * - https://developer.github.com/v3/checks/suites/#response-1 (key: `check_suites`) + * - https://developer.github.com/v3/apps/installations/#list-repositories (key: `repositories`) + * - https://developer.github.com/v3/apps/installations/#list-installations-for-a-user (key `installations`) + * + * Octokit normalizes these responses so that paginated results are always returned following + * the same structure. One challenge is that if the list response has only one page, no Link + * header is provided, so this header alone is not sufficient to check wether a response is + * paginated or not. For the exceptions with the namespace, a fallback check for the route + * paths has to be added in order to normalize the response. We cannot check for the total_count + * property because it also exists in the response of Get the combined status for a specific ref. + */ +const REGEX = [/^\/search\//, /^\/repos\/[^/]+\/[^/]+\/commits\/[^/]+\/(check-runs|check-suites)([^/]|$)/, /^\/installation\/repositories([^/]|$)/, /^\/user\/installations([^/]|$)/, /^\/repos\/[^/]+\/[^/]+\/actions\/secrets([^/]|$)/, /^\/repos\/[^/]+\/[^/]+\/actions\/workflows(\/[^/]+\/runs)?([^/]|$)/, /^\/repos\/[^/]+\/[^/]+\/actions\/runs(\/[^/]+\/(artifacts|jobs))?([^/]|$)/]; +function normalizePaginatedListResponse(octokit, url, response) { + const path = url.replace(octokit.request.endpoint.DEFAULTS.baseUrl, ""); + const responseNeedsNormalization = REGEX.find(regex => regex.test(path)); + if (!responseNeedsNormalization) return; // keep the additional properties intact as there is currently no other way + // to retrieve the same information. + + const incompleteResults = response.data.incomplete_results; + const repositorySelection = response.data.repository_selection; + const totalCount = response.data.total_count; + delete response.data.incomplete_results; + delete response.data.repository_selection; + delete response.data.total_count; + const namespaceKey = Object.keys(response.data)[0]; + const data = response.data[namespaceKey]; + response.data = data; + + if (typeof incompleteResults !== "undefined") { + response.data.incomplete_results = incompleteResults; + } + + if (typeof repositorySelection !== "undefined") { + response.data.repository_selection = repositorySelection; + } + + response.data.total_count = totalCount; + Object.defineProperty(response.data, namespaceKey, { + get() { + octokit.log.warn(`[@octokit/paginate-rest] "response.data.${namespaceKey}" is deprecated for "GET ${path}". Get the results directly from "response.data"`); + return Array.from(data); + } + + }); +} + +function iterator(octokit, route, parameters) { + const options = octokit.request.endpoint(route, parameters); + const method = options.method; + const headers = options.headers; + let url = options.url; + return { + [Symbol.asyncIterator]: () => ({ + next() { + if (!url) { + return Promise.resolve({ + done: true + }); } - if (typeof repositorySelection !== "undefined") { - response.data.repository_selection = repositorySelection; - } + return octokit.request({ + method, + url, + headers + }).then(response => { + normalizePaginatedListResponse(octokit, url, response); // `response.headers.link` format: + // '; rel="next", ; rel="last"' + // sets `url` to undefined if "next" URL is not present or `link` header is not set - response.data.total_count = totalCount; - Object.defineProperty(response.data, namespaceKey, { - get() { - octokit.log.warn( - `[@octokit/paginate-rest] "response.data.${namespaceKey}" is deprecated for "GET ${path}". Get the results directly from "response.data"` - ); - return Array.from(data); - }, + url = ((response.headers.link || "").match(/<([^>]+)>;\s*rel="next"/) || [])[1]; + return { + value: response + }; }); } - function iterator(octokit, route, parameters) { - const options = octokit.request.endpoint(route, parameters); - const method = options.method; - const headers = options.headers; - let url = options.url; - return { - [Symbol.asyncIterator]: () => ({ - next() { - if (!url) { - return Promise.resolve({ - done: true, - }); - } + }) + }; +} - return octokit - .request({ - method, - url, - headers, - }) - .then((response) => { - normalizePaginatedListResponse(octokit, url, response); // `response.headers.link` format: - // '; rel="next", ; rel="last"' - // sets `url` to undefined if "next" URL is not present or `link` header is not set - - url = ((response.headers.link || "").match( - /<([^>]+)>;\s*rel="next"/ - ) || [])[1]; - return { - value: response, - }; - }); - }, - }), - }; - } +function paginate(octokit, route, parameters, mapFn) { + if (typeof parameters === "function") { + mapFn = parameters; + parameters = undefined; + } - function paginate(octokit, route, parameters, mapFn) { - if (typeof parameters === "function") { - mapFn = parameters; - parameters = undefined; - } + return gather(octokit, [], iterator(octokit, route, parameters)[Symbol.asyncIterator](), mapFn); +} - return gather( - octokit, - [], - iterator(octokit, route, parameters)[Symbol.asyncIterator](), - mapFn - ); - } +function gather(octokit, results, iterator, mapFn) { + return iterator.next().then(result => { + if (result.done) { + return results; + } - function gather(octokit, results, iterator, mapFn) { - return iterator.next().then((result) => { - if (result.done) { - return results; - } + let earlyExit = false; - let earlyExit = false; + function done() { + earlyExit = true; + } - function done() { - earlyExit = true; - } + results = results.concat(mapFn ? mapFn(result.value, done) : result.value.data); - results = results.concat( - mapFn ? mapFn(result.value, done) : result.value.data - ); + if (earlyExit) { + return results; + } - if (earlyExit) { - return results; - } + return gather(octokit, results, iterator, mapFn); + }); +} - return gather(octokit, results, iterator, mapFn); - }); - } +/** + * @param octokit Octokit instance + * @param options Options passed to Octokit constructor + */ - /** - * @param octokit Octokit instance - * @param options Options passed to Octokit constructor - */ +function paginateRest(octokit) { + return { + paginate: Object.assign(paginate.bind(null, octokit), { + iterator: iterator.bind(null, octokit) + }) + }; +} +paginateRest.VERSION = VERSION; - function paginateRest(octokit) { - return { - paginate: Object.assign(paginate.bind(null, octokit), { - iterator: iterator.bind(null, octokit), - }), - }; - } - paginateRest.VERSION = VERSION; +exports.paginateRest = paginateRest; +//# sourceMappingURL=index.js.map - exports.paginateRest = paginateRest; - //# sourceMappingURL=index.js.map - /***/ - }, +/***/ }), - /***/ 68883: /***/ (__unused_webpack_module, exports) => { - "use strict"; +/***/ 68883: +/***/ ((__unused_webpack_module, exports) => { - Object.defineProperty(exports, "__esModule", { value: true }); +"use strict"; - const VERSION = "1.0.0"; - /** - * @param octokit Octokit instance - * @param options Options passed to Octokit constructor - */ +Object.defineProperty(exports, "__esModule", ({ value: true })); - function requestLog(octokit) { - octokit.hook.wrap("request", (request, options) => { - octokit.log.debug("request", options); - const start = Date.now(); - const requestOptions = octokit.request.endpoint.parse(options); - const path = requestOptions.url.replace(options.baseUrl, ""); - return request(options) - .then((response) => { - octokit.log.info( - `${requestOptions.method} ${path} - ${response.status} in ${ - Date.now() - start - }ms` - ); - return response; - }) - .catch((error) => { - octokit.log.info( - `${requestOptions.method} ${path} - ${error.status} in ${ - Date.now() - start - }ms` - ); - throw error; - }); - }); - } - requestLog.VERSION = VERSION; +const VERSION = "1.0.0"; - exports.requestLog = requestLog; - //# sourceMappingURL=index.js.map +/** + * @param octokit Octokit instance + * @param options Options passed to Octokit constructor + */ - /***/ +function requestLog(octokit) { + octokit.hook.wrap("request", (request, options) => { + octokit.log.debug("request", options); + const start = Date.now(); + const requestOptions = octokit.request.endpoint.parse(options); + const path = requestOptions.url.replace(options.baseUrl, ""); + return request(options).then(response => { + octokit.log.info(`${requestOptions.method} ${path} - ${response.status} in ${Date.now() - start}ms`); + return response; + }).catch(error => { + octokit.log.info(`${requestOptions.method} ${path} - ${error.status} in ${Date.now() - start}ms`); + throw error; + }); + }); +} +requestLog.VERSION = VERSION; + +exports.requestLog = requestLog; +//# sourceMappingURL=index.js.map + + +/***/ }), + +/***/ 83044: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var deprecation = __nccwpck_require__(58932); + +var endpointsByScope = { + actions: { + cancelWorkflowRun: { + method: "POST", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + run_id: { + required: true, + type: "integer" + } + }, + url: "/repos/:owner/:repo/actions/runs/:run_id/cancel" + }, + createOrUpdateSecretForRepo: { + method: "PUT", + params: { + encrypted_value: { + type: "string" + }, + key_id: { + type: "string" + }, + name: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/actions/secrets/:name" + }, + createRegistrationToken: { + method: "POST", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/actions/runners/registration-token" + }, + createRemoveToken: { + method: "POST", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/actions/runners/remove-token" + }, + deleteArtifact: { + method: "DELETE", + params: { + artifact_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/actions/artifacts/:artifact_id" + }, + deleteSecretFromRepo: { + method: "DELETE", + params: { + name: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/actions/secrets/:name" + }, + downloadArtifact: { + method: "GET", + params: { + archive_format: { + required: true, + type: "string" + }, + artifact_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/actions/artifacts/:artifact_id/:archive_format" + }, + getArtifact: { + method: "GET", + params: { + artifact_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/actions/artifacts/:artifact_id" + }, + getPublicKey: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/actions/secrets/public-key" + }, + getSecret: { + method: "GET", + params: { + name: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/actions/secrets/:name" + }, + getSelfHostedRunner: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + runner_id: { + required: true, + type: "integer" + } + }, + url: "/repos/:owner/:repo/actions/runners/:runner_id" + }, + getWorkflow: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + workflow_id: { + required: true, + type: "integer" + } + }, + url: "/repos/:owner/:repo/actions/workflows/:workflow_id" + }, + getWorkflowJob: { + method: "GET", + params: { + job_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/actions/jobs/:job_id" + }, + getWorkflowRun: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + run_id: { + required: true, + type: "integer" + } + }, + url: "/repos/:owner/:repo/actions/runs/:run_id" + }, + listDownloadsForSelfHostedRunnerApplication: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/actions/runners/downloads" + }, + listJobsForWorkflowRun: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + }, + run_id: { + required: true, + type: "integer" + } + }, + url: "/repos/:owner/:repo/actions/runs/:run_id/jobs" + }, + listRepoWorkflowRuns: { + method: "GET", + params: { + actor: { + type: "string" + }, + branch: { + type: "string" + }, + event: { + type: "string" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + }, + status: { + enum: ["completed", "status", "conclusion"], + type: "string" + } + }, + url: "/repos/:owner/:repo/actions/runs" }, - - /***/ 83044: /***/ ( - __unused_webpack_module, - exports, - __nccwpck_require__ - ) => { - "use strict"; - - Object.defineProperty(exports, "__esModule", { value: true }); - - var deprecation = __nccwpck_require__(58932); - - var endpointsByScope = { - actions: { - cancelWorkflowRun: { - method: "POST", - params: { - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - run_id: { - required: true, - type: "integer", - }, - }, - url: "/repos/:owner/:repo/actions/runs/:run_id/cancel", - }, - createOrUpdateSecretForRepo: { - method: "PUT", - params: { - encrypted_value: { - type: "string", - }, - key_id: { - type: "string", - }, - name: { - required: true, - type: "string", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/actions/secrets/:name", - }, - createRegistrationToken: { - method: "POST", - params: { - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/actions/runners/registration-token", - }, - createRemoveToken: { - method: "POST", - params: { - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/actions/runners/remove-token", - }, - deleteArtifact: { - method: "DELETE", - params: { - artifact_id: { - required: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/actions/artifacts/:artifact_id", - }, - deleteSecretFromRepo: { - method: "DELETE", - params: { - name: { - required: true, - type: "string", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/actions/secrets/:name", - }, - downloadArtifact: { - method: "GET", - params: { - archive_format: { - required: true, - type: "string", - }, - artifact_id: { - required: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: - "/repos/:owner/:repo/actions/artifacts/:artifact_id/:archive_format", - }, - getArtifact: { - method: "GET", - params: { - artifact_id: { - required: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/actions/artifacts/:artifact_id", - }, - getPublicKey: { - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/actions/secrets/public-key", - }, - getSecret: { - method: "GET", - params: { - name: { - required: true, - type: "string", - }, - owner: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/actions/secrets/:name", - }, - getSelfHostedRunner: { - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - runner_id: { - required: true, - type: "integer", - }, - }, - url: "/repos/:owner/:repo/actions/runners/:runner_id", - }, - getWorkflow: { - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - workflow_id: { - required: true, - type: "integer", - }, - }, - url: "/repos/:owner/:repo/actions/workflows/:workflow_id", - }, - getWorkflowJob: { - method: "GET", - params: { - job_id: { - required: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/actions/jobs/:job_id", - }, - getWorkflowRun: { - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - run_id: { - required: true, - type: "integer", - }, - }, - url: "/repos/:owner/:repo/actions/runs/:run_id", - }, - listDownloadsForSelfHostedRunnerApplication: { - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/actions/runners/downloads", - }, - listJobsForWorkflowRun: { - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - run_id: { - required: true, - type: "integer", - }, - }, - url: "/repos/:owner/:repo/actions/runs/:run_id/jobs", - }, - listRepoWorkflowRuns: { - method: "GET", - params: { - actor: { - type: "string", - }, - branch: { - type: "string", - }, - event: { - type: "string", - }, - owner: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - status: { - enum: ["completed", "status", "conclusion"], - type: "string", - }, - }, - url: "/repos/:owner/:repo/actions/runs", - }, - listRepoWorkflows: { - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/actions/workflows", - }, - listSecretsForRepo: { - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/actions/secrets", - }, - listSelfHostedRunnersForRepo: { - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/actions/runners", - }, - listWorkflowJobLogs: { - method: "GET", - params: { - job_id: { - required: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/actions/jobs/:job_id/logs", - }, - listWorkflowRunArtifacts: { - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - run_id: { - required: true, - type: "integer", - }, - }, - url: "/repos/:owner/:repo/actions/runs/:run_id/artifacts", - }, - listWorkflowRunLogs: { - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - run_id: { - required: true, - type: "integer", - }, - }, - url: "/repos/:owner/:repo/actions/runs/:run_id/logs", - }, - listWorkflowRuns: { - method: "GET", - params: { - actor: { - type: "string", - }, - branch: { - type: "string", - }, - event: { - type: "string", - }, - owner: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - status: { - enum: ["completed", "status", "conclusion"], - type: "string", - }, - workflow_id: { - required: true, - type: "integer", - }, - }, - url: "/repos/:owner/:repo/actions/workflows/:workflow_id/runs", - }, - reRunWorkflow: { - method: "POST", - params: { - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - run_id: { - required: true, - type: "integer", - }, - }, - url: "/repos/:owner/:repo/actions/runs/:run_id/rerun", - }, - removeSelfHostedRunner: { - method: "DELETE", - params: { - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - runner_id: { - required: true, - type: "integer", - }, - }, - url: "/repos/:owner/:repo/actions/runners/:runner_id", - }, + listRepoWorkflows: { + method: "GET", + params: { + owner: { + required: true, + type: "string" }, - activity: { - checkStarringRepo: { - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/user/starred/:owner/:repo", - }, - deleteRepoSubscription: { - method: "DELETE", - params: { - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/subscription", - }, - deleteThreadSubscription: { - method: "DELETE", - params: { - thread_id: { - required: true, - type: "integer", - }, - }, - url: "/notifications/threads/:thread_id/subscription", - }, - getRepoSubscription: { - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/subscription", - }, - getThread: { - method: "GET", - params: { - thread_id: { - required: true, - type: "integer", - }, - }, - url: "/notifications/threads/:thread_id", - }, - getThreadSubscription: { - method: "GET", - params: { - thread_id: { - required: true, - type: "integer", - }, - }, - url: "/notifications/threads/:thread_id/subscription", - }, - listEventsForOrg: { - method: "GET", - params: { - org: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - username: { - required: true, - type: "string", - }, - }, - url: "/users/:username/events/orgs/:org", - }, - listEventsForUser: { - method: "GET", - params: { - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - username: { - required: true, - type: "string", - }, - }, - url: "/users/:username/events", - }, - listFeeds: { - method: "GET", - params: {}, - url: "/feeds", - }, - listNotifications: { - method: "GET", - params: { - all: { - type: "boolean", - }, - before: { - type: "string", - }, - page: { - type: "integer", - }, - participating: { - type: "boolean", - }, - per_page: { - type: "integer", - }, - since: { - type: "string", - }, - }, - url: "/notifications", - }, - listNotificationsForRepo: { - method: "GET", - params: { - all: { - type: "boolean", - }, - before: { - type: "string", - }, - owner: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - participating: { - type: "boolean", - }, - per_page: { - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - since: { - type: "string", - }, - }, - url: "/repos/:owner/:repo/notifications", - }, - listPublicEvents: { - method: "GET", - params: { - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - }, - url: "/events", - }, - listPublicEventsForOrg: { - method: "GET", - params: { - org: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - }, - url: "/orgs/:org/events", - }, - listPublicEventsForRepoNetwork: { - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/networks/:owner/:repo/events", - }, - listPublicEventsForUser: { - method: "GET", - params: { - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - username: { - required: true, - type: "string", - }, - }, - url: "/users/:username/events/public", - }, - listReceivedEventsForUser: { - method: "GET", - params: { - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - username: { - required: true, - type: "string", - }, - }, - url: "/users/:username/received_events", - }, - listReceivedPublicEventsForUser: { - method: "GET", - params: { - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - username: { - required: true, - type: "string", - }, - }, - url: "/users/:username/received_events/public", - }, - listRepoEvents: { - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/events", - }, - listReposStarredByAuthenticatedUser: { - method: "GET", - params: { - direction: { - enum: ["asc", "desc"], - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - sort: { - enum: ["created", "updated"], - type: "string", - }, - }, - url: "/user/starred", - }, - listReposStarredByUser: { - method: "GET", - params: { - direction: { - enum: ["asc", "desc"], - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - sort: { - enum: ["created", "updated"], - type: "string", - }, - username: { - required: true, - type: "string", - }, - }, - url: "/users/:username/starred", - }, - listReposWatchedByUser: { - method: "GET", - params: { - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - username: { - required: true, - type: "string", - }, - }, - url: "/users/:username/subscriptions", - }, - listStargazersForRepo: { - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/stargazers", - }, - listWatchedReposForAuthenticatedUser: { - method: "GET", - params: { - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - }, - url: "/user/subscriptions", - }, - listWatchersForRepo: { - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/subscribers", - }, - markAsRead: { - method: "PUT", - params: { - last_read_at: { - type: "string", - }, - }, - url: "/notifications", - }, - markNotificationsAsReadForRepo: { - method: "PUT", - params: { - last_read_at: { - type: "string", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/notifications", - }, - markThreadAsRead: { - method: "PATCH", - params: { - thread_id: { - required: true, - type: "integer", - }, - }, - url: "/notifications/threads/:thread_id", - }, - setRepoSubscription: { - method: "PUT", - params: { - ignored: { - type: "boolean", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - subscribed: { - type: "boolean", - }, - }, - url: "/repos/:owner/:repo/subscription", - }, - setThreadSubscription: { - method: "PUT", - params: { - ignored: { - type: "boolean", - }, - thread_id: { - required: true, - type: "integer", - }, - }, - url: "/notifications/threads/:thread_id/subscription", - }, - starRepo: { - method: "PUT", - params: { - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/user/starred/:owner/:repo", - }, - unstarRepo: { - method: "DELETE", - params: { - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/user/starred/:owner/:repo", - }, - }, - apps: { - addRepoToInstallation: { - headers: { - accept: "application/vnd.github.machine-man-preview+json", - }, - method: "PUT", - params: { - installation_id: { - required: true, - type: "integer", - }, - repository_id: { - required: true, - type: "integer", - }, - }, - url: - "/user/installations/:installation_id/repositories/:repository_id", - }, - checkAccountIsAssociatedWithAny: { - method: "GET", - params: { - account_id: { - required: true, - type: "integer", - }, - }, - url: "/marketplace_listing/accounts/:account_id", - }, - checkAccountIsAssociatedWithAnyStubbed: { - method: "GET", - params: { - account_id: { - required: true, - type: "integer", - }, - }, - url: "/marketplace_listing/stubbed/accounts/:account_id", - }, - checkAuthorization: { - deprecated: - "octokit.apps.checkAuthorization() is deprecated, see https://developer.github.com/v3/apps/oauth_applications/#check-an-authorization", - method: "GET", - params: { - access_token: { - required: true, - type: "string", - }, - client_id: { - required: true, - type: "string", - }, - }, - url: "/applications/:client_id/tokens/:access_token", - }, - checkToken: { - headers: { - accept: "application/vnd.github.doctor-strange-preview+json", - }, - method: "POST", - params: { - access_token: { - type: "string", - }, - client_id: { - required: true, - type: "string", - }, - }, - url: "/applications/:client_id/token", - }, - createContentAttachment: { - headers: { - accept: "application/vnd.github.corsair-preview+json", - }, - method: "POST", - params: { - body: { - required: true, - type: "string", - }, - content_reference_id: { - required: true, - type: "integer", - }, - title: { - required: true, - type: "string", - }, - }, - url: "/content_references/:content_reference_id/attachments", - }, - createFromManifest: { - headers: { - accept: "application/vnd.github.fury-preview+json", - }, - method: "POST", - params: { - code: { - required: true, - type: "string", - }, - }, - url: "/app-manifests/:code/conversions", - }, - createInstallationToken: { - headers: { - accept: "application/vnd.github.machine-man-preview+json", - }, - method: "POST", - params: { - installation_id: { - required: true, - type: "integer", - }, - permissions: { - type: "object", - }, - repository_ids: { - type: "integer[]", - }, - }, - url: "/app/installations/:installation_id/access_tokens", - }, - deleteAuthorization: { - headers: { - accept: "application/vnd.github.doctor-strange-preview+json", - }, - method: "DELETE", - params: { - access_token: { - type: "string", - }, - client_id: { - required: true, - type: "string", - }, - }, - url: "/applications/:client_id/grant", - }, - deleteInstallation: { - headers: { - accept: - "application/vnd.github.gambit-preview+json,application/vnd.github.machine-man-preview+json", - }, - method: "DELETE", - params: { - installation_id: { - required: true, - type: "integer", - }, - }, - url: "/app/installations/:installation_id", - }, - deleteToken: { - headers: { - accept: "application/vnd.github.doctor-strange-preview+json", - }, - method: "DELETE", - params: { - access_token: { - type: "string", - }, - client_id: { - required: true, - type: "string", - }, - }, - url: "/applications/:client_id/token", - }, - findOrgInstallation: { - deprecated: - "octokit.apps.findOrgInstallation() has been renamed to octokit.apps.getOrgInstallation() (2019-04-10)", - headers: { - accept: "application/vnd.github.machine-man-preview+json", - }, - method: "GET", - params: { - org: { - required: true, - type: "string", - }, - }, - url: "/orgs/:org/installation", - }, - findRepoInstallation: { - deprecated: - "octokit.apps.findRepoInstallation() has been renamed to octokit.apps.getRepoInstallation() (2019-04-10)", - headers: { - accept: "application/vnd.github.machine-man-preview+json", - }, - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/installation", - }, - findUserInstallation: { - deprecated: - "octokit.apps.findUserInstallation() has been renamed to octokit.apps.getUserInstallation() (2019-04-10)", - headers: { - accept: "application/vnd.github.machine-man-preview+json", - }, - method: "GET", - params: { - username: { - required: true, - type: "string", - }, - }, - url: "/users/:username/installation", - }, - getAuthenticated: { - headers: { - accept: "application/vnd.github.machine-man-preview+json", - }, - method: "GET", - params: {}, - url: "/app", - }, - getBySlug: { - headers: { - accept: "application/vnd.github.machine-man-preview+json", - }, - method: "GET", - params: { - app_slug: { - required: true, - type: "string", - }, - }, - url: "/apps/:app_slug", - }, - getInstallation: { - headers: { - accept: "application/vnd.github.machine-man-preview+json", - }, - method: "GET", - params: { - installation_id: { - required: true, - type: "integer", - }, - }, - url: "/app/installations/:installation_id", - }, - getOrgInstallation: { - headers: { - accept: "application/vnd.github.machine-man-preview+json", - }, - method: "GET", - params: { - org: { - required: true, - type: "string", - }, - }, - url: "/orgs/:org/installation", - }, - getRepoInstallation: { - headers: { - accept: "application/vnd.github.machine-man-preview+json", - }, - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/installation", - }, - getUserInstallation: { - headers: { - accept: "application/vnd.github.machine-man-preview+json", - }, - method: "GET", - params: { - username: { - required: true, - type: "string", - }, - }, - url: "/users/:username/installation", - }, - listAccountsUserOrOrgOnPlan: { - method: "GET", - params: { - direction: { - enum: ["asc", "desc"], - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - plan_id: { - required: true, - type: "integer", - }, - sort: { - enum: ["created", "updated"], - type: "string", - }, - }, - url: "/marketplace_listing/plans/:plan_id/accounts", - }, - listAccountsUserOrOrgOnPlanStubbed: { - method: "GET", - params: { - direction: { - enum: ["asc", "desc"], - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - plan_id: { - required: true, - type: "integer", - }, - sort: { - enum: ["created", "updated"], - type: "string", - }, - }, - url: "/marketplace_listing/stubbed/plans/:plan_id/accounts", - }, - listInstallationReposForAuthenticatedUser: { - headers: { - accept: "application/vnd.github.machine-man-preview+json", - }, - method: "GET", - params: { - installation_id: { - required: true, - type: "integer", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - }, - url: "/user/installations/:installation_id/repositories", - }, - listInstallations: { - headers: { - accept: "application/vnd.github.machine-man-preview+json", - }, - method: "GET", - params: { - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - }, - url: "/app/installations", - }, - listInstallationsForAuthenticatedUser: { - headers: { - accept: "application/vnd.github.machine-man-preview+json", - }, - method: "GET", - params: { - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - }, - url: "/user/installations", - }, - listMarketplacePurchasesForAuthenticatedUser: { - method: "GET", - params: { - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - }, - url: "/user/marketplace_purchases", - }, - listMarketplacePurchasesForAuthenticatedUserStubbed: { - method: "GET", - params: { - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - }, - url: "/user/marketplace_purchases/stubbed", - }, - listPlans: { - method: "GET", - params: { - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - }, - url: "/marketplace_listing/plans", - }, - listPlansStubbed: { - method: "GET", - params: { - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - }, - url: "/marketplace_listing/stubbed/plans", - }, - listRepos: { - headers: { - accept: "application/vnd.github.machine-man-preview+json", - }, - method: "GET", - params: { - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - }, - url: "/installation/repositories", - }, - removeRepoFromInstallation: { - headers: { - accept: "application/vnd.github.machine-man-preview+json", - }, - method: "DELETE", - params: { - installation_id: { - required: true, - type: "integer", - }, - repository_id: { - required: true, - type: "integer", - }, - }, - url: - "/user/installations/:installation_id/repositories/:repository_id", - }, - resetAuthorization: { - deprecated: - "octokit.apps.resetAuthorization() is deprecated, see https://developer.github.com/v3/apps/oauth_applications/#reset-an-authorization", - method: "POST", - params: { - access_token: { - required: true, - type: "string", - }, - client_id: { - required: true, - type: "string", - }, - }, - url: "/applications/:client_id/tokens/:access_token", - }, - resetToken: { - headers: { - accept: "application/vnd.github.doctor-strange-preview+json", - }, - method: "PATCH", - params: { - access_token: { - type: "string", - }, - client_id: { - required: true, - type: "string", - }, - }, - url: "/applications/:client_id/token", - }, - revokeAuthorizationForApplication: { - deprecated: - "octokit.apps.revokeAuthorizationForApplication() is deprecated, see https://developer.github.com/v3/apps/oauth_applications/#revoke-an-authorization-for-an-application", - method: "DELETE", - params: { - access_token: { - required: true, - type: "string", - }, - client_id: { - required: true, - type: "string", - }, - }, - url: "/applications/:client_id/tokens/:access_token", - }, - revokeGrantForApplication: { - deprecated: - "octokit.apps.revokeGrantForApplication() is deprecated, see https://developer.github.com/v3/apps/oauth_applications/#revoke-a-grant-for-an-application", - method: "DELETE", - params: { - access_token: { - required: true, - type: "string", - }, - client_id: { - required: true, - type: "string", - }, - }, - url: "/applications/:client_id/grants/:access_token", - }, - revokeInstallationToken: { - headers: { - accept: "application/vnd.github.gambit-preview+json", - }, - method: "DELETE", - params: {}, - url: "/installation/token", - }, - }, - checks: { - create: { - headers: { - accept: "application/vnd.github.antiope-preview+json", - }, - method: "POST", - params: { - actions: { - type: "object[]", - }, - "actions[].description": { - required: true, - type: "string", - }, - "actions[].identifier": { - required: true, - type: "string", - }, - "actions[].label": { - required: true, - type: "string", - }, - completed_at: { - type: "string", - }, - conclusion: { - enum: [ - "success", - "failure", - "neutral", - "cancelled", - "timed_out", - "action_required", - ], - type: "string", - }, - details_url: { - type: "string", - }, - external_id: { - type: "string", - }, - head_sha: { - required: true, - type: "string", - }, - name: { - required: true, - type: "string", - }, - output: { - type: "object", - }, - "output.annotations": { - type: "object[]", - }, - "output.annotations[].annotation_level": { - enum: ["notice", "warning", "failure"], - required: true, - type: "string", - }, - "output.annotations[].end_column": { - type: "integer", - }, - "output.annotations[].end_line": { - required: true, - type: "integer", - }, - "output.annotations[].message": { - required: true, - type: "string", - }, - "output.annotations[].path": { - required: true, - type: "string", - }, - "output.annotations[].raw_details": { - type: "string", - }, - "output.annotations[].start_column": { - type: "integer", - }, - "output.annotations[].start_line": { - required: true, - type: "integer", - }, - "output.annotations[].title": { - type: "string", - }, - "output.images": { - type: "object[]", - }, - "output.images[].alt": { - required: true, - type: "string", - }, - "output.images[].caption": { - type: "string", - }, - "output.images[].image_url": { - required: true, - type: "string", - }, - "output.summary": { - required: true, - type: "string", - }, - "output.text": { - type: "string", - }, - "output.title": { - required: true, - type: "string", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - started_at: { - type: "string", - }, - status: { - enum: ["queued", "in_progress", "completed"], - type: "string", - }, - }, - url: "/repos/:owner/:repo/check-runs", - }, - createSuite: { - headers: { - accept: "application/vnd.github.antiope-preview+json", - }, - method: "POST", - params: { - head_sha: { - required: true, - type: "string", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/check-suites", - }, - get: { - headers: { - accept: "application/vnd.github.antiope-preview+json", - }, - method: "GET", - params: { - check_run_id: { - required: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/check-runs/:check_run_id", - }, - getSuite: { - headers: { - accept: "application/vnd.github.antiope-preview+json", - }, - method: "GET", - params: { - check_suite_id: { - required: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/check-suites/:check_suite_id", - }, - listAnnotations: { - headers: { - accept: "application/vnd.github.antiope-preview+json", - }, - method: "GET", - params: { - check_run_id: { - required: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/check-runs/:check_run_id/annotations", - }, - listForRef: { - headers: { - accept: "application/vnd.github.antiope-preview+json", - }, - method: "GET", - params: { - check_name: { - type: "string", - }, - filter: { - enum: ["latest", "all"], - type: "string", - }, - owner: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - ref: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - status: { - enum: ["queued", "in_progress", "completed"], - type: "string", - }, - }, - url: "/repos/:owner/:repo/commits/:ref/check-runs", - }, - listForSuite: { - headers: { - accept: "application/vnd.github.antiope-preview+json", - }, - method: "GET", - params: { - check_name: { - type: "string", - }, - check_suite_id: { - required: true, - type: "integer", - }, - filter: { - enum: ["latest", "all"], - type: "string", - }, - owner: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - status: { - enum: ["queued", "in_progress", "completed"], - type: "string", - }, - }, - url: "/repos/:owner/:repo/check-suites/:check_suite_id/check-runs", - }, - listSuitesForRef: { - headers: { - accept: "application/vnd.github.antiope-preview+json", - }, - method: "GET", - params: { - app_id: { - type: "integer", - }, - check_name: { - type: "string", - }, - owner: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - ref: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/commits/:ref/check-suites", - }, - rerequestSuite: { - headers: { - accept: "application/vnd.github.antiope-preview+json", - }, - method: "POST", - params: { - check_suite_id: { - required: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/check-suites/:check_suite_id/rerequest", - }, - setSuitesPreferences: { - headers: { - accept: "application/vnd.github.antiope-preview+json", - }, - method: "PATCH", - params: { - auto_trigger_checks: { - type: "object[]", - }, - "auto_trigger_checks[].app_id": { - required: true, - type: "integer", - }, - "auto_trigger_checks[].setting": { - required: true, - type: "boolean", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/check-suites/preferences", - }, - update: { - headers: { - accept: "application/vnd.github.antiope-preview+json", - }, - method: "PATCH", - params: { - actions: { - type: "object[]", - }, - "actions[].description": { - required: true, - type: "string", - }, - "actions[].identifier": { - required: true, - type: "string", - }, - "actions[].label": { - required: true, - type: "string", - }, - check_run_id: { - required: true, - type: "integer", - }, - completed_at: { - type: "string", - }, - conclusion: { - enum: [ - "success", - "failure", - "neutral", - "cancelled", - "timed_out", - "action_required", - ], - type: "string", - }, - details_url: { - type: "string", - }, - external_id: { - type: "string", - }, - name: { - type: "string", - }, - output: { - type: "object", - }, - "output.annotations": { - type: "object[]", - }, - "output.annotations[].annotation_level": { - enum: ["notice", "warning", "failure"], - required: true, - type: "string", - }, - "output.annotations[].end_column": { - type: "integer", - }, - "output.annotations[].end_line": { - required: true, - type: "integer", - }, - "output.annotations[].message": { - required: true, - type: "string", - }, - "output.annotations[].path": { - required: true, - type: "string", - }, - "output.annotations[].raw_details": { - type: "string", - }, - "output.annotations[].start_column": { - type: "integer", - }, - "output.annotations[].start_line": { - required: true, - type: "integer", - }, - "output.annotations[].title": { - type: "string", - }, - "output.images": { - type: "object[]", - }, - "output.images[].alt": { - required: true, - type: "string", - }, - "output.images[].caption": { - type: "string", - }, - "output.images[].image_url": { - required: true, - type: "string", - }, - "output.summary": { - required: true, - type: "string", - }, - "output.text": { - type: "string", - }, - "output.title": { - type: "string", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - started_at: { - type: "string", - }, - status: { - enum: ["queued", "in_progress", "completed"], - type: "string", - }, - }, - url: "/repos/:owner/:repo/check-runs/:check_run_id", - }, - }, - codesOfConduct: { - getConductCode: { - headers: { - accept: "application/vnd.github.scarlet-witch-preview+json", - }, - method: "GET", - params: { - key: { - required: true, - type: "string", - }, - }, - url: "/codes_of_conduct/:key", - }, - getForRepo: { - headers: { - accept: "application/vnd.github.scarlet-witch-preview+json", - }, - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/community/code_of_conduct", - }, - listConductCodes: { - headers: { - accept: "application/vnd.github.scarlet-witch-preview+json", - }, - method: "GET", - params: {}, - url: "/codes_of_conduct", - }, - }, - emojis: { - get: { - method: "GET", - params: {}, - url: "/emojis", - }, - }, - gists: { - checkIsStarred: { - method: "GET", - params: { - gist_id: { - required: true, - type: "string", - }, - }, - url: "/gists/:gist_id/star", - }, - create: { - method: "POST", - params: { - description: { - type: "string", - }, - files: { - required: true, - type: "object", - }, - "files.content": { - type: "string", - }, - public: { - type: "boolean", - }, - }, - url: "/gists", - }, - createComment: { - method: "POST", - params: { - body: { - required: true, - type: "string", - }, - gist_id: { - required: true, - type: "string", - }, - }, - url: "/gists/:gist_id/comments", - }, - delete: { - method: "DELETE", - params: { - gist_id: { - required: true, - type: "string", - }, - }, - url: "/gists/:gist_id", - }, - deleteComment: { - method: "DELETE", - params: { - comment_id: { - required: true, - type: "integer", - }, - gist_id: { - required: true, - type: "string", - }, - }, - url: "/gists/:gist_id/comments/:comment_id", - }, - fork: { - method: "POST", - params: { - gist_id: { - required: true, - type: "string", - }, - }, - url: "/gists/:gist_id/forks", - }, - get: { - method: "GET", - params: { - gist_id: { - required: true, - type: "string", - }, - }, - url: "/gists/:gist_id", - }, - getComment: { - method: "GET", - params: { - comment_id: { - required: true, - type: "integer", - }, - gist_id: { - required: true, - type: "string", - }, - }, - url: "/gists/:gist_id/comments/:comment_id", - }, - getRevision: { - method: "GET", - params: { - gist_id: { - required: true, - type: "string", - }, - sha: { - required: true, - type: "string", - }, - }, - url: "/gists/:gist_id/:sha", - }, - list: { - method: "GET", - params: { - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - since: { - type: "string", - }, - }, - url: "/gists", - }, - listComments: { - method: "GET", - params: { - gist_id: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - }, - url: "/gists/:gist_id/comments", - }, - listCommits: { - method: "GET", - params: { - gist_id: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - }, - url: "/gists/:gist_id/commits", - }, - listForks: { - method: "GET", - params: { - gist_id: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - }, - url: "/gists/:gist_id/forks", - }, - listPublic: { - method: "GET", - params: { - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - since: { - type: "string", - }, - }, - url: "/gists/public", - }, - listPublicForUser: { - method: "GET", - params: { - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - since: { - type: "string", - }, - username: { - required: true, - type: "string", - }, - }, - url: "/users/:username/gists", - }, - listStarred: { - method: "GET", - params: { - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - since: { - type: "string", - }, - }, - url: "/gists/starred", - }, - star: { - method: "PUT", - params: { - gist_id: { - required: true, - type: "string", - }, - }, - url: "/gists/:gist_id/star", - }, - unstar: { - method: "DELETE", - params: { - gist_id: { - required: true, - type: "string", - }, - }, - url: "/gists/:gist_id/star", - }, - update: { - method: "PATCH", - params: { - description: { - type: "string", - }, - files: { - type: "object", - }, - "files.content": { - type: "string", - }, - "files.filename": { - type: "string", - }, - gist_id: { - required: true, - type: "string", - }, - }, - url: "/gists/:gist_id", - }, - updateComment: { - method: "PATCH", - params: { - body: { - required: true, - type: "string", - }, - comment_id: { - required: true, - type: "integer", - }, - gist_id: { - required: true, - type: "string", - }, - }, - url: "/gists/:gist_id/comments/:comment_id", - }, - }, - git: { - createBlob: { - method: "POST", - params: { - content: { - required: true, - type: "string", - }, - encoding: { - type: "string", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/git/blobs", - }, - createCommit: { - method: "POST", - params: { - author: { - type: "object", - }, - "author.date": { - type: "string", - }, - "author.email": { - type: "string", - }, - "author.name": { - type: "string", - }, - committer: { - type: "object", - }, - "committer.date": { - type: "string", - }, - "committer.email": { - type: "string", - }, - "committer.name": { - type: "string", - }, - message: { - required: true, - type: "string", - }, - owner: { - required: true, - type: "string", - }, - parents: { - required: true, - type: "string[]", - }, - repo: { - required: true, - type: "string", - }, - signature: { - type: "string", - }, - tree: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/git/commits", - }, - createRef: { - method: "POST", - params: { - owner: { - required: true, - type: "string", - }, - ref: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - sha: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/git/refs", - }, - createTag: { - method: "POST", - params: { - message: { - required: true, - type: "string", - }, - object: { - required: true, - type: "string", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - tag: { - required: true, - type: "string", - }, - tagger: { - type: "object", - }, - "tagger.date": { - type: "string", - }, - "tagger.email": { - type: "string", - }, - "tagger.name": { - type: "string", - }, - type: { - enum: ["commit", "tree", "blob"], - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/git/tags", - }, - createTree: { - method: "POST", - params: { - base_tree: { - type: "string", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - tree: { - required: true, - type: "object[]", - }, - "tree[].content": { - type: "string", - }, - "tree[].mode": { - enum: ["100644", "100755", "040000", "160000", "120000"], - type: "string", - }, - "tree[].path": { - type: "string", - }, - "tree[].sha": { - allowNull: true, - type: "string", - }, - "tree[].type": { - enum: ["blob", "tree", "commit"], - type: "string", - }, - }, - url: "/repos/:owner/:repo/git/trees", - }, - deleteRef: { - method: "DELETE", - params: { - owner: { - required: true, - type: "string", - }, - ref: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/git/refs/:ref", - }, - getBlob: { - method: "GET", - params: { - file_sha: { - required: true, - type: "string", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/git/blobs/:file_sha", - }, - getCommit: { - method: "GET", - params: { - commit_sha: { - required: true, - type: "string", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/git/commits/:commit_sha", - }, - getRef: { - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - ref: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/git/ref/:ref", - }, - getTag: { - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - tag_sha: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/git/tags/:tag_sha", - }, - getTree: { - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - recursive: { - enum: ["1"], - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - tree_sha: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/git/trees/:tree_sha", - }, - listMatchingRefs: { - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - ref: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/git/matching-refs/:ref", - }, - listRefs: { - method: "GET", - params: { - namespace: { - type: "string", - }, - owner: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/git/refs/:namespace", - }, - updateRef: { - method: "PATCH", - params: { - force: { - type: "boolean", - }, - owner: { - required: true, - type: "string", - }, - ref: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - sha: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/git/refs/:ref", - }, - }, - gitignore: { - getTemplate: { - method: "GET", - params: { - name: { - required: true, - type: "string", - }, - }, - url: "/gitignore/templates/:name", - }, - listTemplates: { - method: "GET", - params: {}, - url: "/gitignore/templates", - }, - }, - interactions: { - addOrUpdateRestrictionsForOrg: { - headers: { - accept: "application/vnd.github.sombra-preview+json", - }, - method: "PUT", - params: { - limit: { - enum: [ - "existing_users", - "contributors_only", - "collaborators_only", - ], - required: true, - type: "string", - }, - org: { - required: true, - type: "string", - }, - }, - url: "/orgs/:org/interaction-limits", - }, - addOrUpdateRestrictionsForRepo: { - headers: { - accept: "application/vnd.github.sombra-preview+json", - }, - method: "PUT", - params: { - limit: { - enum: [ - "existing_users", - "contributors_only", - "collaborators_only", - ], - required: true, - type: "string", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/interaction-limits", - }, - getRestrictionsForOrg: { - headers: { - accept: "application/vnd.github.sombra-preview+json", - }, - method: "GET", - params: { - org: { - required: true, - type: "string", - }, - }, - url: "/orgs/:org/interaction-limits", - }, - getRestrictionsForRepo: { - headers: { - accept: "application/vnd.github.sombra-preview+json", - }, - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/interaction-limits", - }, - removeRestrictionsForOrg: { - headers: { - accept: "application/vnd.github.sombra-preview+json", - }, - method: "DELETE", - params: { - org: { - required: true, - type: "string", - }, - }, - url: "/orgs/:org/interaction-limits", - }, - removeRestrictionsForRepo: { - headers: { - accept: "application/vnd.github.sombra-preview+json", - }, - method: "DELETE", - params: { - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/interaction-limits", - }, - }, - issues: { - addAssignees: { - method: "POST", - params: { - assignees: { - type: "string[]", - }, - issue_number: { - required: true, - type: "integer", - }, - number: { - alias: "issue_number", - deprecated: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/issues/:issue_number/assignees", - }, - addLabels: { - method: "POST", - params: { - issue_number: { - required: true, - type: "integer", - }, - labels: { - required: true, - type: "string[]", - }, - number: { - alias: "issue_number", - deprecated: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/issues/:issue_number/labels", - }, - checkAssignee: { - method: "GET", - params: { - assignee: { - required: true, - type: "string", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/assignees/:assignee", - }, - create: { - method: "POST", - params: { - assignee: { - type: "string", - }, - assignees: { - type: "string[]", - }, - body: { - type: "string", - }, - labels: { - type: "string[]", - }, - milestone: { - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - title: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/issues", - }, - createComment: { - method: "POST", - params: { - body: { - required: true, - type: "string", - }, - issue_number: { - required: true, - type: "integer", - }, - number: { - alias: "issue_number", - deprecated: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/issues/:issue_number/comments", - }, - createLabel: { - method: "POST", - params: { - color: { - required: true, - type: "string", - }, - description: { - type: "string", - }, - name: { - required: true, - type: "string", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/labels", - }, - createMilestone: { - method: "POST", - params: { - description: { - type: "string", - }, - due_on: { - type: "string", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - state: { - enum: ["open", "closed"], - type: "string", - }, - title: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/milestones", - }, - deleteComment: { - method: "DELETE", - params: { - comment_id: { - required: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/issues/comments/:comment_id", - }, - deleteLabel: { - method: "DELETE", - params: { - name: { - required: true, - type: "string", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/labels/:name", - }, - deleteMilestone: { - method: "DELETE", - params: { - milestone_number: { - required: true, - type: "integer", - }, - number: { - alias: "milestone_number", - deprecated: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/milestones/:milestone_number", - }, - get: { - method: "GET", - params: { - issue_number: { - required: true, - type: "integer", - }, - number: { - alias: "issue_number", - deprecated: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/issues/:issue_number", - }, - getComment: { - method: "GET", - params: { - comment_id: { - required: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/issues/comments/:comment_id", - }, - getEvent: { - method: "GET", - params: { - event_id: { - required: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/issues/events/:event_id", - }, - getLabel: { - method: "GET", - params: { - name: { - required: true, - type: "string", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/labels/:name", - }, - getMilestone: { - method: "GET", - params: { - milestone_number: { - required: true, - type: "integer", - }, - number: { - alias: "milestone_number", - deprecated: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/milestones/:milestone_number", - }, - list: { - method: "GET", - params: { - direction: { - enum: ["asc", "desc"], - type: "string", - }, - filter: { - enum: ["assigned", "created", "mentioned", "subscribed", "all"], - type: "string", - }, - labels: { - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - since: { - type: "string", - }, - sort: { - enum: ["created", "updated", "comments"], - type: "string", - }, - state: { - enum: ["open", "closed", "all"], - type: "string", - }, - }, - url: "/issues", - }, - listAssignees: { - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/assignees", - }, - listComments: { - method: "GET", - params: { - issue_number: { - required: true, - type: "integer", - }, - number: { - alias: "issue_number", - deprecated: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - since: { - type: "string", - }, - }, - url: "/repos/:owner/:repo/issues/:issue_number/comments", - }, - listCommentsForRepo: { - method: "GET", - params: { - direction: { - enum: ["asc", "desc"], - type: "string", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - since: { - type: "string", - }, - sort: { - enum: ["created", "updated"], - type: "string", - }, - }, - url: "/repos/:owner/:repo/issues/comments", - }, - listEvents: { - method: "GET", - params: { - issue_number: { - required: true, - type: "integer", - }, - number: { - alias: "issue_number", - deprecated: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/issues/:issue_number/events", - }, - listEventsForRepo: { - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/issues/events", - }, - listEventsForTimeline: { - headers: { - accept: "application/vnd.github.mockingbird-preview+json", - }, - method: "GET", - params: { - issue_number: { - required: true, - type: "integer", - }, - number: { - alias: "issue_number", - deprecated: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/issues/:issue_number/timeline", - }, - listForAuthenticatedUser: { - method: "GET", - params: { - direction: { - enum: ["asc", "desc"], - type: "string", - }, - filter: { - enum: ["assigned", "created", "mentioned", "subscribed", "all"], - type: "string", - }, - labels: { - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - since: { - type: "string", - }, - sort: { - enum: ["created", "updated", "comments"], - type: "string", - }, - state: { - enum: ["open", "closed", "all"], - type: "string", - }, - }, - url: "/user/issues", - }, - listForOrg: { - method: "GET", - params: { - direction: { - enum: ["asc", "desc"], - type: "string", - }, - filter: { - enum: ["assigned", "created", "mentioned", "subscribed", "all"], - type: "string", - }, - labels: { - type: "string", - }, - org: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - since: { - type: "string", - }, - sort: { - enum: ["created", "updated", "comments"], - type: "string", - }, - state: { - enum: ["open", "closed", "all"], - type: "string", - }, - }, - url: "/orgs/:org/issues", - }, - listForRepo: { - method: "GET", - params: { - assignee: { - type: "string", - }, - creator: { - type: "string", - }, - direction: { - enum: ["asc", "desc"], - type: "string", - }, - labels: { - type: "string", - }, - mentioned: { - type: "string", - }, - milestone: { - type: "string", - }, - owner: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - since: { - type: "string", - }, - sort: { - enum: ["created", "updated", "comments"], - type: "string", - }, - state: { - enum: ["open", "closed", "all"], - type: "string", - }, - }, - url: "/repos/:owner/:repo/issues", - }, - listLabelsForMilestone: { - method: "GET", - params: { - milestone_number: { - required: true, - type: "integer", - }, - number: { - alias: "milestone_number", - deprecated: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/milestones/:milestone_number/labels", - }, - listLabelsForRepo: { - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/labels", - }, - listLabelsOnIssue: { - method: "GET", - params: { - issue_number: { - required: true, - type: "integer", - }, - number: { - alias: "issue_number", - deprecated: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/issues/:issue_number/labels", - }, - listMilestonesForRepo: { - method: "GET", - params: { - direction: { - enum: ["asc", "desc"], - type: "string", - }, - owner: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - sort: { - enum: ["due_on", "completeness"], - type: "string", - }, - state: { - enum: ["open", "closed", "all"], - type: "string", - }, - }, - url: "/repos/:owner/:repo/milestones", - }, - lock: { - method: "PUT", - params: { - issue_number: { - required: true, - type: "integer", - }, - lock_reason: { - enum: ["off-topic", "too heated", "resolved", "spam"], - type: "string", - }, - number: { - alias: "issue_number", - deprecated: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/issues/:issue_number/lock", - }, - removeAssignees: { - method: "DELETE", - params: { - assignees: { - type: "string[]", - }, - issue_number: { - required: true, - type: "integer", - }, - number: { - alias: "issue_number", - deprecated: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/issues/:issue_number/assignees", - }, - removeLabel: { - method: "DELETE", - params: { - issue_number: { - required: true, - type: "integer", - }, - name: { - required: true, - type: "string", - }, - number: { - alias: "issue_number", - deprecated: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/issues/:issue_number/labels/:name", - }, - removeLabels: { - method: "DELETE", - params: { - issue_number: { - required: true, - type: "integer", - }, - number: { - alias: "issue_number", - deprecated: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/issues/:issue_number/labels", - }, - replaceLabels: { - method: "PUT", - params: { - issue_number: { - required: true, - type: "integer", - }, - labels: { - type: "string[]", - }, - number: { - alias: "issue_number", - deprecated: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/issues/:issue_number/labels", - }, - unlock: { - method: "DELETE", - params: { - issue_number: { - required: true, - type: "integer", - }, - number: { - alias: "issue_number", - deprecated: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/issues/:issue_number/lock", - }, - update: { - method: "PATCH", - params: { - assignee: { - type: "string", - }, - assignees: { - type: "string[]", - }, - body: { - type: "string", - }, - issue_number: { - required: true, - type: "integer", - }, - labels: { - type: "string[]", - }, - milestone: { - allowNull: true, - type: "integer", - }, - number: { - alias: "issue_number", - deprecated: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - state: { - enum: ["open", "closed"], - type: "string", - }, - title: { - type: "string", - }, - }, - url: "/repos/:owner/:repo/issues/:issue_number", - }, - updateComment: { - method: "PATCH", - params: { - body: { - required: true, - type: "string", - }, - comment_id: { - required: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/issues/comments/:comment_id", - }, - updateLabel: { - method: "PATCH", - params: { - color: { - type: "string", - }, - current_name: { - required: true, - type: "string", - }, - description: { - type: "string", - }, - name: { - type: "string", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/labels/:current_name", - }, - updateMilestone: { - method: "PATCH", - params: { - description: { - type: "string", - }, - due_on: { - type: "string", - }, - milestone_number: { - required: true, - type: "integer", - }, - number: { - alias: "milestone_number", - deprecated: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - state: { - enum: ["open", "closed"], - type: "string", - }, - title: { - type: "string", - }, - }, - url: "/repos/:owner/:repo/milestones/:milestone_number", - }, - }, - licenses: { - get: { - method: "GET", - params: { - license: { - required: true, - type: "string", - }, - }, - url: "/licenses/:license", - }, - getForRepo: { - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/license", - }, - list: { - deprecated: - "octokit.licenses.list() has been renamed to octokit.licenses.listCommonlyUsed() (2019-03-05)", - method: "GET", - params: {}, - url: "/licenses", - }, - listCommonlyUsed: { - method: "GET", - params: {}, - url: "/licenses", - }, - }, - markdown: { - render: { - method: "POST", - params: { - context: { - type: "string", - }, - mode: { - enum: ["markdown", "gfm"], - type: "string", - }, - text: { - required: true, - type: "string", - }, - }, - url: "/markdown", - }, - renderRaw: { - headers: { - "content-type": "text/plain; charset=utf-8", - }, - method: "POST", - params: { - data: { - mapTo: "data", - required: true, - type: "string", - }, - }, - url: "/markdown/raw", - }, - }, - meta: { - get: { - method: "GET", - params: {}, - url: "/meta", - }, - }, - migrations: { - cancelImport: { - method: "DELETE", - params: { - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/import", - }, - deleteArchiveForAuthenticatedUser: { - headers: { - accept: "application/vnd.github.wyandotte-preview+json", - }, - method: "DELETE", - params: { - migration_id: { - required: true, - type: "integer", - }, - }, - url: "/user/migrations/:migration_id/archive", - }, - deleteArchiveForOrg: { - headers: { - accept: "application/vnd.github.wyandotte-preview+json", - }, - method: "DELETE", - params: { - migration_id: { - required: true, - type: "integer", - }, - org: { - required: true, - type: "string", - }, - }, - url: "/orgs/:org/migrations/:migration_id/archive", - }, - downloadArchiveForOrg: { - headers: { - accept: "application/vnd.github.wyandotte-preview+json", - }, - method: "GET", - params: { - migration_id: { - required: true, - type: "integer", - }, - org: { - required: true, - type: "string", - }, - }, - url: "/orgs/:org/migrations/:migration_id/archive", - }, - getArchiveForAuthenticatedUser: { - headers: { - accept: "application/vnd.github.wyandotte-preview+json", - }, - method: "GET", - params: { - migration_id: { - required: true, - type: "integer", - }, - }, - url: "/user/migrations/:migration_id/archive", - }, - getArchiveForOrg: { - deprecated: - "octokit.migrations.getArchiveForOrg() has been renamed to octokit.migrations.downloadArchiveForOrg() (2020-01-27)", - headers: { - accept: "application/vnd.github.wyandotte-preview+json", - }, - method: "GET", - params: { - migration_id: { - required: true, - type: "integer", - }, - org: { - required: true, - type: "string", - }, - }, - url: "/orgs/:org/migrations/:migration_id/archive", - }, - getCommitAuthors: { - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - since: { - type: "string", - }, - }, - url: "/repos/:owner/:repo/import/authors", - }, - getImportProgress: { - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/import", - }, - getLargeFiles: { - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/import/large_files", - }, - getStatusForAuthenticatedUser: { - headers: { - accept: "application/vnd.github.wyandotte-preview+json", - }, - method: "GET", - params: { - migration_id: { - required: true, - type: "integer", - }, - }, - url: "/user/migrations/:migration_id", - }, - getStatusForOrg: { - headers: { - accept: "application/vnd.github.wyandotte-preview+json", - }, - method: "GET", - params: { - migration_id: { - required: true, - type: "integer", - }, - org: { - required: true, - type: "string", - }, - }, - url: "/orgs/:org/migrations/:migration_id", - }, - listForAuthenticatedUser: { - headers: { - accept: "application/vnd.github.wyandotte-preview+json", - }, - method: "GET", - params: { - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - }, - url: "/user/migrations", - }, - listForOrg: { - headers: { - accept: "application/vnd.github.wyandotte-preview+json", - }, - method: "GET", - params: { - org: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - }, - url: "/orgs/:org/migrations", - }, - listReposForOrg: { - headers: { - accept: "application/vnd.github.wyandotte-preview+json", - }, - method: "GET", - params: { - migration_id: { - required: true, - type: "integer", - }, - org: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - }, - url: "/orgs/:org/migrations/:migration_id/repositories", - }, - listReposForUser: { - headers: { - accept: "application/vnd.github.wyandotte-preview+json", - }, - method: "GET", - params: { - migration_id: { - required: true, - type: "integer", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - }, - url: "/user/:migration_id/repositories", - }, - mapCommitAuthor: { - method: "PATCH", - params: { - author_id: { - required: true, - type: "integer", - }, - email: { - type: "string", - }, - name: { - type: "string", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/import/authors/:author_id", - }, - setLfsPreference: { - method: "PATCH", - params: { - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - use_lfs: { - enum: ["opt_in", "opt_out"], - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/import/lfs", - }, - startForAuthenticatedUser: { - method: "POST", - params: { - exclude_attachments: { - type: "boolean", - }, - lock_repositories: { - type: "boolean", - }, - repositories: { - required: true, - type: "string[]", - }, - }, - url: "/user/migrations", - }, - startForOrg: { - method: "POST", - params: { - exclude_attachments: { - type: "boolean", - }, - lock_repositories: { - type: "boolean", - }, - org: { - required: true, - type: "string", - }, - repositories: { - required: true, - type: "string[]", - }, - }, - url: "/orgs/:org/migrations", - }, - startImport: { - method: "PUT", - params: { - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - tfvc_project: { - type: "string", - }, - vcs: { - enum: ["subversion", "git", "mercurial", "tfvc"], - type: "string", - }, - vcs_password: { - type: "string", - }, - vcs_url: { - required: true, - type: "string", - }, - vcs_username: { - type: "string", - }, - }, - url: "/repos/:owner/:repo/import", - }, - unlockRepoForAuthenticatedUser: { - headers: { - accept: "application/vnd.github.wyandotte-preview+json", - }, - method: "DELETE", - params: { - migration_id: { - required: true, - type: "integer", - }, - repo_name: { - required: true, - type: "string", - }, - }, - url: "/user/migrations/:migration_id/repos/:repo_name/lock", - }, - unlockRepoForOrg: { - headers: { - accept: "application/vnd.github.wyandotte-preview+json", - }, - method: "DELETE", - params: { - migration_id: { - required: true, - type: "integer", - }, - org: { - required: true, - type: "string", - }, - repo_name: { - required: true, - type: "string", - }, - }, - url: "/orgs/:org/migrations/:migration_id/repos/:repo_name/lock", - }, - updateImport: { - method: "PATCH", - params: { - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - vcs_password: { - type: "string", - }, - vcs_username: { - type: "string", - }, - }, - url: "/repos/:owner/:repo/import", - }, - }, - oauthAuthorizations: { - checkAuthorization: { - deprecated: - "octokit.oauthAuthorizations.checkAuthorization() has been renamed to octokit.apps.checkAuthorization() (2019-11-05)", - method: "GET", - params: { - access_token: { - required: true, - type: "string", - }, - client_id: { - required: true, - type: "string", - }, - }, - url: "/applications/:client_id/tokens/:access_token", - }, - createAuthorization: { - deprecated: - "octokit.oauthAuthorizations.createAuthorization() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#create-a-new-authorization", - method: "POST", - params: { - client_id: { - type: "string", - }, - client_secret: { - type: "string", - }, - fingerprint: { - type: "string", - }, - note: { - required: true, - type: "string", - }, - note_url: { - type: "string", - }, - scopes: { - type: "string[]", - }, - }, - url: "/authorizations", - }, - deleteAuthorization: { - deprecated: - "octokit.oauthAuthorizations.deleteAuthorization() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#delete-an-authorization", - method: "DELETE", - params: { - authorization_id: { - required: true, - type: "integer", - }, - }, - url: "/authorizations/:authorization_id", - }, - deleteGrant: { - deprecated: - "octokit.oauthAuthorizations.deleteGrant() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#delete-a-grant", - method: "DELETE", - params: { - grant_id: { - required: true, - type: "integer", - }, - }, - url: "/applications/grants/:grant_id", - }, - getAuthorization: { - deprecated: - "octokit.oauthAuthorizations.getAuthorization() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#get-a-single-authorization", - method: "GET", - params: { - authorization_id: { - required: true, - type: "integer", - }, - }, - url: "/authorizations/:authorization_id", - }, - getGrant: { - deprecated: - "octokit.oauthAuthorizations.getGrant() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#get-a-single-grant", - method: "GET", - params: { - grant_id: { - required: true, - type: "integer", - }, - }, - url: "/applications/grants/:grant_id", - }, - getOrCreateAuthorizationForApp: { - deprecated: - "octokit.oauthAuthorizations.getOrCreateAuthorizationForApp() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#get-or-create-an-authorization-for-a-specific-app", - method: "PUT", - params: { - client_id: { - required: true, - type: "string", - }, - client_secret: { - required: true, - type: "string", - }, - fingerprint: { - type: "string", - }, - note: { - type: "string", - }, - note_url: { - type: "string", - }, - scopes: { - type: "string[]", - }, - }, - url: "/authorizations/clients/:client_id", - }, - getOrCreateAuthorizationForAppAndFingerprint: { - deprecated: - "octokit.oauthAuthorizations.getOrCreateAuthorizationForAppAndFingerprint() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#get-or-create-an-authorization-for-a-specific-app-and-fingerprint", - method: "PUT", - params: { - client_id: { - required: true, - type: "string", - }, - client_secret: { - required: true, - type: "string", - }, - fingerprint: { - required: true, - type: "string", - }, - note: { - type: "string", - }, - note_url: { - type: "string", - }, - scopes: { - type: "string[]", - }, - }, - url: "/authorizations/clients/:client_id/:fingerprint", - }, - getOrCreateAuthorizationForAppFingerprint: { - deprecated: - "octokit.oauthAuthorizations.getOrCreateAuthorizationForAppFingerprint() has been renamed to octokit.oauthAuthorizations.getOrCreateAuthorizationForAppAndFingerprint() (2018-12-27)", - method: "PUT", - params: { - client_id: { - required: true, - type: "string", - }, - client_secret: { - required: true, - type: "string", - }, - fingerprint: { - required: true, - type: "string", - }, - note: { - type: "string", - }, - note_url: { - type: "string", - }, - scopes: { - type: "string[]", - }, - }, - url: "/authorizations/clients/:client_id/:fingerprint", - }, - listAuthorizations: { - deprecated: - "octokit.oauthAuthorizations.listAuthorizations() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#list-your-authorizations", - method: "GET", - params: { - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - }, - url: "/authorizations", - }, - listGrants: { - deprecated: - "octokit.oauthAuthorizations.listGrants() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#list-your-grants", - method: "GET", - params: { - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - }, - url: "/applications/grants", - }, - resetAuthorization: { - deprecated: - "octokit.oauthAuthorizations.resetAuthorization() has been renamed to octokit.apps.resetAuthorization() (2019-11-05)", - method: "POST", - params: { - access_token: { - required: true, - type: "string", - }, - client_id: { - required: true, - type: "string", - }, - }, - url: "/applications/:client_id/tokens/:access_token", - }, - revokeAuthorizationForApplication: { - deprecated: - "octokit.oauthAuthorizations.revokeAuthorizationForApplication() has been renamed to octokit.apps.revokeAuthorizationForApplication() (2019-11-05)", - method: "DELETE", - params: { - access_token: { - required: true, - type: "string", - }, - client_id: { - required: true, - type: "string", - }, - }, - url: "/applications/:client_id/tokens/:access_token", - }, - revokeGrantForApplication: { - deprecated: - "octokit.oauthAuthorizations.revokeGrantForApplication() has been renamed to octokit.apps.revokeGrantForApplication() (2019-11-05)", - method: "DELETE", - params: { - access_token: { - required: true, - type: "string", - }, - client_id: { - required: true, - type: "string", - }, - }, - url: "/applications/:client_id/grants/:access_token", - }, - updateAuthorization: { - deprecated: - "octokit.oauthAuthorizations.updateAuthorization() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#update-an-existing-authorization", - method: "PATCH", - params: { - add_scopes: { - type: "string[]", - }, - authorization_id: { - required: true, - type: "integer", - }, - fingerprint: { - type: "string", - }, - note: { - type: "string", - }, - note_url: { - type: "string", - }, - remove_scopes: { - type: "string[]", - }, - scopes: { - type: "string[]", - }, - }, - url: "/authorizations/:authorization_id", - }, - }, - orgs: { - addOrUpdateMembership: { - method: "PUT", - params: { - org: { - required: true, - type: "string", - }, - role: { - enum: ["admin", "member"], - type: "string", - }, - username: { - required: true, - type: "string", - }, - }, - url: "/orgs/:org/memberships/:username", - }, - blockUser: { - method: "PUT", - params: { - org: { - required: true, - type: "string", - }, - username: { - required: true, - type: "string", - }, - }, - url: "/orgs/:org/blocks/:username", - }, - checkBlockedUser: { - method: "GET", - params: { - org: { - required: true, - type: "string", - }, - username: { - required: true, - type: "string", - }, - }, - url: "/orgs/:org/blocks/:username", - }, - checkMembership: { - method: "GET", - params: { - org: { - required: true, - type: "string", - }, - username: { - required: true, - type: "string", - }, - }, - url: "/orgs/:org/members/:username", - }, - checkPublicMembership: { - method: "GET", - params: { - org: { - required: true, - type: "string", - }, - username: { - required: true, - type: "string", - }, - }, - url: "/orgs/:org/public_members/:username", - }, - concealMembership: { - method: "DELETE", - params: { - org: { - required: true, - type: "string", - }, - username: { - required: true, - type: "string", - }, - }, - url: "/orgs/:org/public_members/:username", - }, - convertMemberToOutsideCollaborator: { - method: "PUT", - params: { - org: { - required: true, - type: "string", - }, - username: { - required: true, - type: "string", - }, - }, - url: "/orgs/:org/outside_collaborators/:username", - }, - createHook: { - method: "POST", - params: { - active: { - type: "boolean", - }, - config: { - required: true, - type: "object", - }, - "config.content_type": { - type: "string", - }, - "config.insecure_ssl": { - type: "string", - }, - "config.secret": { - type: "string", - }, - "config.url": { - required: true, - type: "string", - }, - events: { - type: "string[]", - }, - name: { - required: true, - type: "string", - }, - org: { - required: true, - type: "string", - }, - }, - url: "/orgs/:org/hooks", - }, - createInvitation: { - method: "POST", - params: { - email: { - type: "string", - }, - invitee_id: { - type: "integer", - }, - org: { - required: true, - type: "string", - }, - role: { - enum: ["admin", "direct_member", "billing_manager"], - type: "string", - }, - team_ids: { - type: "integer[]", - }, - }, - url: "/orgs/:org/invitations", - }, - deleteHook: { - method: "DELETE", - params: { - hook_id: { - required: true, - type: "integer", - }, - org: { - required: true, - type: "string", - }, - }, - url: "/orgs/:org/hooks/:hook_id", - }, - get: { - method: "GET", - params: { - org: { - required: true, - type: "string", - }, - }, - url: "/orgs/:org", - }, - getHook: { - method: "GET", - params: { - hook_id: { - required: true, - type: "integer", - }, - org: { - required: true, - type: "string", - }, - }, - url: "/orgs/:org/hooks/:hook_id", - }, - getMembership: { - method: "GET", - params: { - org: { - required: true, - type: "string", - }, - username: { - required: true, - type: "string", - }, - }, - url: "/orgs/:org/memberships/:username", - }, - getMembershipForAuthenticatedUser: { - method: "GET", - params: { - org: { - required: true, - type: "string", - }, - }, - url: "/user/memberships/orgs/:org", - }, - list: { - method: "GET", - params: { - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - since: { - type: "integer", - }, - }, - url: "/organizations", - }, - listBlockedUsers: { - method: "GET", - params: { - org: { - required: true, - type: "string", - }, - }, - url: "/orgs/:org/blocks", - }, - listForAuthenticatedUser: { - method: "GET", - params: { - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - }, - url: "/user/orgs", - }, - listForUser: { - method: "GET", - params: { - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - username: { - required: true, - type: "string", - }, - }, - url: "/users/:username/orgs", - }, - listHooks: { - method: "GET", - params: { - org: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - }, - url: "/orgs/:org/hooks", - }, - listInstallations: { - headers: { - accept: "application/vnd.github.machine-man-preview+json", - }, - method: "GET", - params: { - org: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - }, - url: "/orgs/:org/installations", - }, - listInvitationTeams: { - method: "GET", - params: { - invitation_id: { - required: true, - type: "integer", - }, - org: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - }, - url: "/orgs/:org/invitations/:invitation_id/teams", - }, - listMembers: { - method: "GET", - params: { - filter: { - enum: ["2fa_disabled", "all"], - type: "string", - }, - org: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - role: { - enum: ["all", "admin", "member"], - type: "string", - }, - }, - url: "/orgs/:org/members", - }, - listMemberships: { - method: "GET", - params: { - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - state: { - enum: ["active", "pending"], - type: "string", - }, - }, - url: "/user/memberships/orgs", - }, - listOutsideCollaborators: { - method: "GET", - params: { - filter: { - enum: ["2fa_disabled", "all"], - type: "string", - }, - org: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - }, - url: "/orgs/:org/outside_collaborators", - }, - listPendingInvitations: { - method: "GET", - params: { - org: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - }, - url: "/orgs/:org/invitations", - }, - listPublicMembers: { - method: "GET", - params: { - org: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - }, - url: "/orgs/:org/public_members", - }, - pingHook: { - method: "POST", - params: { - hook_id: { - required: true, - type: "integer", - }, - org: { - required: true, - type: "string", - }, - }, - url: "/orgs/:org/hooks/:hook_id/pings", - }, - publicizeMembership: { - method: "PUT", - params: { - org: { - required: true, - type: "string", - }, - username: { - required: true, - type: "string", - }, - }, - url: "/orgs/:org/public_members/:username", - }, - removeMember: { - method: "DELETE", - params: { - org: { - required: true, - type: "string", - }, - username: { - required: true, - type: "string", - }, - }, - url: "/orgs/:org/members/:username", - }, - removeMembership: { - method: "DELETE", - params: { - org: { - required: true, - type: "string", - }, - username: { - required: true, - type: "string", - }, - }, - url: "/orgs/:org/memberships/:username", - }, - removeOutsideCollaborator: { - method: "DELETE", - params: { - org: { - required: true, - type: "string", - }, - username: { - required: true, - type: "string", - }, - }, - url: "/orgs/:org/outside_collaborators/:username", - }, - unblockUser: { - method: "DELETE", - params: { - org: { - required: true, - type: "string", - }, - username: { - required: true, - type: "string", - }, - }, - url: "/orgs/:org/blocks/:username", - }, - update: { - method: "PATCH", - params: { - billing_email: { - type: "string", - }, - company: { - type: "string", - }, - default_repository_permission: { - enum: ["read", "write", "admin", "none"], - type: "string", - }, - description: { - type: "string", - }, - email: { - type: "string", - }, - has_organization_projects: { - type: "boolean", - }, - has_repository_projects: { - type: "boolean", - }, - location: { - type: "string", - }, - members_allowed_repository_creation_type: { - enum: ["all", "private", "none"], - type: "string", - }, - members_can_create_internal_repositories: { - type: "boolean", - }, - members_can_create_private_repositories: { - type: "boolean", - }, - members_can_create_public_repositories: { - type: "boolean", - }, - members_can_create_repositories: { - type: "boolean", - }, - name: { - type: "string", - }, - org: { - required: true, - type: "string", - }, - }, - url: "/orgs/:org", - }, - updateHook: { - method: "PATCH", - params: { - active: { - type: "boolean", - }, - config: { - type: "object", - }, - "config.content_type": { - type: "string", - }, - "config.insecure_ssl": { - type: "string", - }, - "config.secret": { - type: "string", - }, - "config.url": { - required: true, - type: "string", - }, - events: { - type: "string[]", - }, - hook_id: { - required: true, - type: "integer", - }, - org: { - required: true, - type: "string", - }, - }, - url: "/orgs/:org/hooks/:hook_id", - }, - updateMembership: { - method: "PATCH", - params: { - org: { - required: true, - type: "string", - }, - state: { - enum: ["active"], - required: true, - type: "string", - }, - }, - url: "/user/memberships/orgs/:org", - }, - }, - projects: { - addCollaborator: { - headers: { - accept: "application/vnd.github.inertia-preview+json", - }, - method: "PUT", - params: { - permission: { - enum: ["read", "write", "admin"], - type: "string", - }, - project_id: { - required: true, - type: "integer", - }, - username: { - required: true, - type: "string", - }, - }, - url: "/projects/:project_id/collaborators/:username", - }, - createCard: { - headers: { - accept: "application/vnd.github.inertia-preview+json", - }, - method: "POST", - params: { - column_id: { - required: true, - type: "integer", - }, - content_id: { - type: "integer", - }, - content_type: { - type: "string", - }, - note: { - type: "string", - }, - }, - url: "/projects/columns/:column_id/cards", - }, - createColumn: { - headers: { - accept: "application/vnd.github.inertia-preview+json", - }, - method: "POST", - params: { - name: { - required: true, - type: "string", - }, - project_id: { - required: true, - type: "integer", - }, - }, - url: "/projects/:project_id/columns", - }, - createForAuthenticatedUser: { - headers: { - accept: "application/vnd.github.inertia-preview+json", - }, - method: "POST", - params: { - body: { - type: "string", - }, - name: { - required: true, - type: "string", - }, - }, - url: "/user/projects", - }, - createForOrg: { - headers: { - accept: "application/vnd.github.inertia-preview+json", - }, - method: "POST", - params: { - body: { - type: "string", - }, - name: { - required: true, - type: "string", - }, - org: { - required: true, - type: "string", - }, - }, - url: "/orgs/:org/projects", - }, - createForRepo: { - headers: { - accept: "application/vnd.github.inertia-preview+json", - }, - method: "POST", - params: { - body: { - type: "string", - }, - name: { - required: true, - type: "string", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/projects", - }, - delete: { - headers: { - accept: "application/vnd.github.inertia-preview+json", - }, - method: "DELETE", - params: { - project_id: { - required: true, - type: "integer", - }, - }, - url: "/projects/:project_id", - }, - deleteCard: { - headers: { - accept: "application/vnd.github.inertia-preview+json", - }, - method: "DELETE", - params: { - card_id: { - required: true, - type: "integer", - }, - }, - url: "/projects/columns/cards/:card_id", - }, - deleteColumn: { - headers: { - accept: "application/vnd.github.inertia-preview+json", - }, - method: "DELETE", - params: { - column_id: { - required: true, - type: "integer", - }, - }, - url: "/projects/columns/:column_id", - }, - get: { - headers: { - accept: "application/vnd.github.inertia-preview+json", - }, - method: "GET", - params: { - project_id: { - required: true, - type: "integer", - }, - }, - url: "/projects/:project_id", - }, - getCard: { - headers: { - accept: "application/vnd.github.inertia-preview+json", - }, - method: "GET", - params: { - card_id: { - required: true, - type: "integer", - }, - }, - url: "/projects/columns/cards/:card_id", - }, - getColumn: { - headers: { - accept: "application/vnd.github.inertia-preview+json", - }, - method: "GET", - params: { - column_id: { - required: true, - type: "integer", - }, - }, - url: "/projects/columns/:column_id", - }, - listCards: { - headers: { - accept: "application/vnd.github.inertia-preview+json", - }, - method: "GET", - params: { - archived_state: { - enum: ["all", "archived", "not_archived"], - type: "string", - }, - column_id: { - required: true, - type: "integer", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - }, - url: "/projects/columns/:column_id/cards", - }, - listCollaborators: { - headers: { - accept: "application/vnd.github.inertia-preview+json", - }, - method: "GET", - params: { - affiliation: { - enum: ["outside", "direct", "all"], - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - project_id: { - required: true, - type: "integer", - }, - }, - url: "/projects/:project_id/collaborators", - }, - listColumns: { - headers: { - accept: "application/vnd.github.inertia-preview+json", - }, - method: "GET", - params: { - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - project_id: { - required: true, - type: "integer", - }, - }, - url: "/projects/:project_id/columns", - }, - listForOrg: { - headers: { - accept: "application/vnd.github.inertia-preview+json", - }, - method: "GET", - params: { - org: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - state: { - enum: ["open", "closed", "all"], - type: "string", - }, - }, - url: "/orgs/:org/projects", - }, - listForRepo: { - headers: { - accept: "application/vnd.github.inertia-preview+json", - }, - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - state: { - enum: ["open", "closed", "all"], - type: "string", - }, - }, - url: "/repos/:owner/:repo/projects", - }, - listForUser: { - headers: { - accept: "application/vnd.github.inertia-preview+json", - }, - method: "GET", - params: { - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - state: { - enum: ["open", "closed", "all"], - type: "string", - }, - username: { - required: true, - type: "string", - }, - }, - url: "/users/:username/projects", - }, - moveCard: { - headers: { - accept: "application/vnd.github.inertia-preview+json", - }, - method: "POST", - params: { - card_id: { - required: true, - type: "integer", - }, - column_id: { - type: "integer", - }, - position: { - required: true, - type: "string", - validation: "^(top|bottom|after:\\d+)$", - }, - }, - url: "/projects/columns/cards/:card_id/moves", - }, - moveColumn: { - headers: { - accept: "application/vnd.github.inertia-preview+json", - }, - method: "POST", - params: { - column_id: { - required: true, - type: "integer", - }, - position: { - required: true, - type: "string", - validation: "^(first|last|after:\\d+)$", - }, - }, - url: "/projects/columns/:column_id/moves", - }, - removeCollaborator: { - headers: { - accept: "application/vnd.github.inertia-preview+json", - }, - method: "DELETE", - params: { - project_id: { - required: true, - type: "integer", - }, - username: { - required: true, - type: "string", - }, - }, - url: "/projects/:project_id/collaborators/:username", - }, - reviewUserPermissionLevel: { - headers: { - accept: "application/vnd.github.inertia-preview+json", - }, - method: "GET", - params: { - project_id: { - required: true, - type: "integer", - }, - username: { - required: true, - type: "string", - }, - }, - url: "/projects/:project_id/collaborators/:username/permission", - }, - update: { - headers: { - accept: "application/vnd.github.inertia-preview+json", - }, - method: "PATCH", - params: { - body: { - type: "string", - }, - name: { - type: "string", - }, - organization_permission: { - type: "string", - }, - private: { - type: "boolean", - }, - project_id: { - required: true, - type: "integer", - }, - state: { - enum: ["open", "closed"], - type: "string", - }, - }, - url: "/projects/:project_id", - }, - updateCard: { - headers: { - accept: "application/vnd.github.inertia-preview+json", - }, - method: "PATCH", - params: { - archived: { - type: "boolean", - }, - card_id: { - required: true, - type: "integer", - }, - note: { - type: "string", - }, - }, - url: "/projects/columns/cards/:card_id", - }, - updateColumn: { - headers: { - accept: "application/vnd.github.inertia-preview+json", - }, - method: "PATCH", - params: { - column_id: { - required: true, - type: "integer", - }, - name: { - required: true, - type: "string", - }, - }, - url: "/projects/columns/:column_id", - }, - }, - pulls: { - checkIfMerged: { - method: "GET", - params: { - number: { - alias: "pull_number", - deprecated: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - pull_number: { - required: true, - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/pulls/:pull_number/merge", - }, - create: { - method: "POST", - params: { - base: { - required: true, - type: "string", - }, - body: { - type: "string", - }, - draft: { - type: "boolean", - }, - head: { - required: true, - type: "string", - }, - maintainer_can_modify: { - type: "boolean", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - title: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/pulls", - }, - createComment: { - method: "POST", - params: { - body: { - required: true, - type: "string", - }, - commit_id: { - required: true, - type: "string", - }, - in_reply_to: { - deprecated: true, - description: - "The comment ID to reply to. **Note**: This must be the ID of a top-level comment, not a reply to that comment. Replies to replies are not supported.", - type: "integer", - }, - line: { - type: "integer", - }, - number: { - alias: "pull_number", - deprecated: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - path: { - required: true, - type: "string", - }, - position: { - type: "integer", - }, - pull_number: { - required: true, - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - side: { - enum: ["LEFT", "RIGHT"], - type: "string", - }, - start_line: { - type: "integer", - }, - start_side: { - enum: ["LEFT", "RIGHT", "side"], - type: "string", - }, - }, - url: "/repos/:owner/:repo/pulls/:pull_number/comments", - }, - createCommentReply: { - deprecated: - "octokit.pulls.createCommentReply() has been renamed to octokit.pulls.createComment() (2019-09-09)", - method: "POST", - params: { - body: { - required: true, - type: "string", - }, - commit_id: { - required: true, - type: "string", - }, - in_reply_to: { - deprecated: true, - description: - "The comment ID to reply to. **Note**: This must be the ID of a top-level comment, not a reply to that comment. Replies to replies are not supported.", - type: "integer", - }, - line: { - type: "integer", - }, - number: { - alias: "pull_number", - deprecated: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - path: { - required: true, - type: "string", - }, - position: { - type: "integer", - }, - pull_number: { - required: true, - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - side: { - enum: ["LEFT", "RIGHT"], - type: "string", - }, - start_line: { - type: "integer", - }, - start_side: { - enum: ["LEFT", "RIGHT", "side"], - type: "string", - }, - }, - url: "/repos/:owner/:repo/pulls/:pull_number/comments", - }, - createFromIssue: { - deprecated: - "octokit.pulls.createFromIssue() is deprecated, see https://developer.github.com/v3/pulls/#create-a-pull-request", - method: "POST", - params: { - base: { - required: true, - type: "string", - }, - draft: { - type: "boolean", - }, - head: { - required: true, - type: "string", - }, - issue: { - required: true, - type: "integer", - }, - maintainer_can_modify: { - type: "boolean", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/pulls", - }, - createReview: { - method: "POST", - params: { - body: { - type: "string", - }, - comments: { - type: "object[]", - }, - "comments[].body": { - required: true, - type: "string", - }, - "comments[].path": { - required: true, - type: "string", - }, - "comments[].position": { - required: true, - type: "integer", - }, - commit_id: { - type: "string", - }, - event: { - enum: ["APPROVE", "REQUEST_CHANGES", "COMMENT"], - type: "string", - }, - number: { - alias: "pull_number", - deprecated: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - pull_number: { - required: true, - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/pulls/:pull_number/reviews", - }, - createReviewCommentReply: { - method: "POST", - params: { - body: { - required: true, - type: "string", - }, - comment_id: { - required: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - pull_number: { - required: true, - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - }, - url: - "/repos/:owner/:repo/pulls/:pull_number/comments/:comment_id/replies", - }, - createReviewRequest: { - method: "POST", - params: { - number: { - alias: "pull_number", - deprecated: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - pull_number: { - required: true, - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - reviewers: { - type: "string[]", - }, - team_reviewers: { - type: "string[]", - }, - }, - url: "/repos/:owner/:repo/pulls/:pull_number/requested_reviewers", - }, - deleteComment: { - method: "DELETE", - params: { - comment_id: { - required: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/pulls/comments/:comment_id", - }, - deletePendingReview: { - method: "DELETE", - params: { - number: { - alias: "pull_number", - deprecated: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - pull_number: { - required: true, - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - review_id: { - required: true, - type: "integer", - }, - }, - url: "/repos/:owner/:repo/pulls/:pull_number/reviews/:review_id", - }, - deleteReviewRequest: { - method: "DELETE", - params: { - number: { - alias: "pull_number", - deprecated: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - pull_number: { - required: true, - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - reviewers: { - type: "string[]", - }, - team_reviewers: { - type: "string[]", - }, - }, - url: "/repos/:owner/:repo/pulls/:pull_number/requested_reviewers", - }, - dismissReview: { - method: "PUT", - params: { - message: { - required: true, - type: "string", - }, - number: { - alias: "pull_number", - deprecated: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - pull_number: { - required: true, - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - review_id: { - required: true, - type: "integer", - }, - }, - url: - "/repos/:owner/:repo/pulls/:pull_number/reviews/:review_id/dismissals", - }, - get: { - method: "GET", - params: { - number: { - alias: "pull_number", - deprecated: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - pull_number: { - required: true, - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/pulls/:pull_number", - }, - getComment: { - method: "GET", - params: { - comment_id: { - required: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/pulls/comments/:comment_id", - }, - getCommentsForReview: { - method: "GET", - params: { - number: { - alias: "pull_number", - deprecated: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - pull_number: { - required: true, - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - review_id: { - required: true, - type: "integer", - }, - }, - url: - "/repos/:owner/:repo/pulls/:pull_number/reviews/:review_id/comments", - }, - getReview: { - method: "GET", - params: { - number: { - alias: "pull_number", - deprecated: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - pull_number: { - required: true, - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - review_id: { - required: true, - type: "integer", - }, - }, - url: "/repos/:owner/:repo/pulls/:pull_number/reviews/:review_id", - }, - list: { - method: "GET", - params: { - base: { - type: "string", - }, - direction: { - enum: ["asc", "desc"], - type: "string", - }, - head: { - type: "string", - }, - owner: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - sort: { - enum: ["created", "updated", "popularity", "long-running"], - type: "string", - }, - state: { - enum: ["open", "closed", "all"], - type: "string", - }, - }, - url: "/repos/:owner/:repo/pulls", - }, - listComments: { - method: "GET", - params: { - direction: { - enum: ["asc", "desc"], - type: "string", - }, - number: { - alias: "pull_number", - deprecated: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - pull_number: { - required: true, - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - since: { - type: "string", - }, - sort: { - enum: ["created", "updated"], - type: "string", - }, - }, - url: "/repos/:owner/:repo/pulls/:pull_number/comments", - }, - listCommentsForRepo: { - method: "GET", - params: { - direction: { - enum: ["asc", "desc"], - type: "string", - }, - owner: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - since: { - type: "string", - }, - sort: { - enum: ["created", "updated"], - type: "string", - }, - }, - url: "/repos/:owner/:repo/pulls/comments", - }, - listCommits: { - method: "GET", - params: { - number: { - alias: "pull_number", - deprecated: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - pull_number: { - required: true, - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/pulls/:pull_number/commits", - }, - listFiles: { - method: "GET", - params: { - number: { - alias: "pull_number", - deprecated: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - pull_number: { - required: true, - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/pulls/:pull_number/files", - }, - listReviewRequests: { - method: "GET", - params: { - number: { - alias: "pull_number", - deprecated: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - pull_number: { - required: true, - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/pulls/:pull_number/requested_reviewers", - }, - listReviews: { - method: "GET", - params: { - number: { - alias: "pull_number", - deprecated: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - pull_number: { - required: true, - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/pulls/:pull_number/reviews", - }, - merge: { - method: "PUT", - params: { - commit_message: { - type: "string", - }, - commit_title: { - type: "string", - }, - merge_method: { - enum: ["merge", "squash", "rebase"], - type: "string", - }, - number: { - alias: "pull_number", - deprecated: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - pull_number: { - required: true, - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - sha: { - type: "string", - }, - }, - url: "/repos/:owner/:repo/pulls/:pull_number/merge", - }, - submitReview: { - method: "POST", - params: { - body: { - type: "string", - }, - event: { - enum: ["APPROVE", "REQUEST_CHANGES", "COMMENT"], - required: true, - type: "string", - }, - number: { - alias: "pull_number", - deprecated: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - pull_number: { - required: true, - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - review_id: { - required: true, - type: "integer", - }, - }, - url: - "/repos/:owner/:repo/pulls/:pull_number/reviews/:review_id/events", - }, - update: { - method: "PATCH", - params: { - base: { - type: "string", - }, - body: { - type: "string", - }, - maintainer_can_modify: { - type: "boolean", - }, - number: { - alias: "pull_number", - deprecated: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - pull_number: { - required: true, - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - state: { - enum: ["open", "closed"], - type: "string", - }, - title: { - type: "string", - }, - }, - url: "/repos/:owner/:repo/pulls/:pull_number", - }, - updateBranch: { - headers: { - accept: "application/vnd.github.lydian-preview+json", - }, - method: "PUT", - params: { - expected_head_sha: { - type: "string", - }, - owner: { - required: true, - type: "string", - }, - pull_number: { - required: true, - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/pulls/:pull_number/update-branch", - }, - updateComment: { - method: "PATCH", - params: { - body: { - required: true, - type: "string", - }, - comment_id: { - required: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/pulls/comments/:comment_id", - }, - updateReview: { - method: "PUT", - params: { - body: { - required: true, - type: "string", - }, - number: { - alias: "pull_number", - deprecated: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - pull_number: { - required: true, - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - review_id: { - required: true, - type: "integer", - }, - }, - url: "/repos/:owner/:repo/pulls/:pull_number/reviews/:review_id", - }, - }, - rateLimit: { - get: { - method: "GET", - params: {}, - url: "/rate_limit", - }, - }, - reactions: { - createForCommitComment: { - headers: { - accept: "application/vnd.github.squirrel-girl-preview+json", - }, - method: "POST", - params: { - comment_id: { - required: true, - type: "integer", - }, - content: { - enum: [ - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "rocket", - "eyes", - ], - required: true, - type: "string", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/comments/:comment_id/reactions", - }, - createForIssue: { - headers: { - accept: "application/vnd.github.squirrel-girl-preview+json", - }, - method: "POST", - params: { - content: { - enum: [ - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "rocket", - "eyes", - ], - required: true, - type: "string", - }, - issue_number: { - required: true, - type: "integer", - }, - number: { - alias: "issue_number", - deprecated: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/issues/:issue_number/reactions", - }, - createForIssueComment: { - headers: { - accept: "application/vnd.github.squirrel-girl-preview+json", - }, - method: "POST", - params: { - comment_id: { - required: true, - type: "integer", - }, - content: { - enum: [ - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "rocket", - "eyes", - ], - required: true, - type: "string", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/issues/comments/:comment_id/reactions", - }, - createForPullRequestReviewComment: { - headers: { - accept: "application/vnd.github.squirrel-girl-preview+json", - }, - method: "POST", - params: { - comment_id: { - required: true, - type: "integer", - }, - content: { - enum: [ - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "rocket", - "eyes", - ], - required: true, - type: "string", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/pulls/comments/:comment_id/reactions", - }, - createForTeamDiscussion: { - deprecated: - "octokit.reactions.createForTeamDiscussion() has been renamed to octokit.reactions.createForTeamDiscussionLegacy() (2020-01-16)", - headers: { - accept: "application/vnd.github.squirrel-girl-preview+json", - }, - method: "POST", - params: { - content: { - enum: [ - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "rocket", - "eyes", - ], - required: true, - type: "string", - }, - discussion_number: { - required: true, - type: "integer", - }, - team_id: { - required: true, - type: "integer", - }, - }, - url: "/teams/:team_id/discussions/:discussion_number/reactions", - }, - createForTeamDiscussionComment: { - deprecated: - "octokit.reactions.createForTeamDiscussionComment() has been renamed to octokit.reactions.createForTeamDiscussionCommentLegacy() (2020-01-16)", - headers: { - accept: "application/vnd.github.squirrel-girl-preview+json", - }, - method: "POST", - params: { - comment_number: { - required: true, - type: "integer", - }, - content: { - enum: [ - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "rocket", - "eyes", - ], - required: true, - type: "string", - }, - discussion_number: { - required: true, - type: "integer", - }, - team_id: { - required: true, - type: "integer", - }, - }, - url: - "/teams/:team_id/discussions/:discussion_number/comments/:comment_number/reactions", - }, - createForTeamDiscussionCommentInOrg: { - headers: { - accept: "application/vnd.github.squirrel-girl-preview+json", - }, - method: "POST", - params: { - comment_number: { - required: true, - type: "integer", - }, - content: { - enum: [ - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "rocket", - "eyes", - ], - required: true, - type: "string", - }, - discussion_number: { - required: true, - type: "integer", - }, - org: { - required: true, - type: "string", - }, - team_slug: { - required: true, - type: "string", - }, - }, - url: - "/orgs/:org/teams/:team_slug/discussions/:discussion_number/comments/:comment_number/reactions", - }, - createForTeamDiscussionCommentLegacy: { - deprecated: - "octokit.reactions.createForTeamDiscussionCommentLegacy() is deprecated, see https://developer.github.com/v3/reactions/#create-reaction-for-a-team-discussion-comment-legacy", - headers: { - accept: "application/vnd.github.squirrel-girl-preview+json", - }, - method: "POST", - params: { - comment_number: { - required: true, - type: "integer", - }, - content: { - enum: [ - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "rocket", - "eyes", - ], - required: true, - type: "string", - }, - discussion_number: { - required: true, - type: "integer", - }, - team_id: { - required: true, - type: "integer", - }, - }, - url: - "/teams/:team_id/discussions/:discussion_number/comments/:comment_number/reactions", - }, - createForTeamDiscussionInOrg: { - headers: { - accept: "application/vnd.github.squirrel-girl-preview+json", - }, - method: "POST", - params: { - content: { - enum: [ - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "rocket", - "eyes", - ], - required: true, - type: "string", - }, - discussion_number: { - required: true, - type: "integer", - }, - org: { - required: true, - type: "string", - }, - team_slug: { - required: true, - type: "string", - }, - }, - url: - "/orgs/:org/teams/:team_slug/discussions/:discussion_number/reactions", - }, - createForTeamDiscussionLegacy: { - deprecated: - "octokit.reactions.createForTeamDiscussionLegacy() is deprecated, see https://developer.github.com/v3/reactions/#create-reaction-for-a-team-discussion-legacy", - headers: { - accept: "application/vnd.github.squirrel-girl-preview+json", - }, - method: "POST", - params: { - content: { - enum: [ - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "rocket", - "eyes", - ], - required: true, - type: "string", - }, - discussion_number: { - required: true, - type: "integer", - }, - team_id: { - required: true, - type: "integer", - }, - }, - url: "/teams/:team_id/discussions/:discussion_number/reactions", - }, - delete: { - headers: { - accept: "application/vnd.github.squirrel-girl-preview+json", - }, - method: "DELETE", - params: { - reaction_id: { - required: true, - type: "integer", - }, - }, - url: "/reactions/:reaction_id", - }, - listForCommitComment: { - headers: { - accept: "application/vnd.github.squirrel-girl-preview+json", - }, - method: "GET", - params: { - comment_id: { - required: true, - type: "integer", - }, - content: { - enum: [ - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "rocket", - "eyes", - ], - type: "string", - }, - owner: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/comments/:comment_id/reactions", - }, - listForIssue: { - headers: { - accept: "application/vnd.github.squirrel-girl-preview+json", - }, - method: "GET", - params: { - content: { - enum: [ - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "rocket", - "eyes", - ], - type: "string", - }, - issue_number: { - required: true, - type: "integer", - }, - number: { - alias: "issue_number", - deprecated: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/issues/:issue_number/reactions", - }, - listForIssueComment: { - headers: { - accept: "application/vnd.github.squirrel-girl-preview+json", - }, - method: "GET", - params: { - comment_id: { - required: true, - type: "integer", - }, - content: { - enum: [ - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "rocket", - "eyes", - ], - type: "string", - }, - owner: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/issues/comments/:comment_id/reactions", - }, - listForPullRequestReviewComment: { - headers: { - accept: "application/vnd.github.squirrel-girl-preview+json", - }, - method: "GET", - params: { - comment_id: { - required: true, - type: "integer", - }, - content: { - enum: [ - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "rocket", - "eyes", - ], - type: "string", - }, - owner: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/pulls/comments/:comment_id/reactions", - }, - listForTeamDiscussion: { - deprecated: - "octokit.reactions.listForTeamDiscussion() has been renamed to octokit.reactions.listForTeamDiscussionLegacy() (2020-01-16)", - headers: { - accept: "application/vnd.github.squirrel-girl-preview+json", - }, - method: "GET", - params: { - content: { - enum: [ - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "rocket", - "eyes", - ], - type: "string", - }, - discussion_number: { - required: true, - type: "integer", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - team_id: { - required: true, - type: "integer", - }, - }, - url: "/teams/:team_id/discussions/:discussion_number/reactions", - }, - listForTeamDiscussionComment: { - deprecated: - "octokit.reactions.listForTeamDiscussionComment() has been renamed to octokit.reactions.listForTeamDiscussionCommentLegacy() (2020-01-16)", - headers: { - accept: "application/vnd.github.squirrel-girl-preview+json", - }, - method: "GET", - params: { - comment_number: { - required: true, - type: "integer", - }, - content: { - enum: [ - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "rocket", - "eyes", - ], - type: "string", - }, - discussion_number: { - required: true, - type: "integer", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - team_id: { - required: true, - type: "integer", - }, - }, - url: - "/teams/:team_id/discussions/:discussion_number/comments/:comment_number/reactions", - }, - listForTeamDiscussionCommentInOrg: { - headers: { - accept: "application/vnd.github.squirrel-girl-preview+json", - }, - method: "GET", - params: { - comment_number: { - required: true, - type: "integer", - }, - content: { - enum: [ - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "rocket", - "eyes", - ], - type: "string", - }, - discussion_number: { - required: true, - type: "integer", - }, - org: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - team_slug: { - required: true, - type: "string", - }, - }, - url: - "/orgs/:org/teams/:team_slug/discussions/:discussion_number/comments/:comment_number/reactions", - }, - listForTeamDiscussionCommentLegacy: { - deprecated: - "octokit.reactions.listForTeamDiscussionCommentLegacy() is deprecated, see https://developer.github.com/v3/reactions/#list-reactions-for-a-team-discussion-comment-legacy", - headers: { - accept: "application/vnd.github.squirrel-girl-preview+json", - }, - method: "GET", - params: { - comment_number: { - required: true, - type: "integer", - }, - content: { - enum: [ - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "rocket", - "eyes", - ], - type: "string", - }, - discussion_number: { - required: true, - type: "integer", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - team_id: { - required: true, - type: "integer", - }, - }, - url: - "/teams/:team_id/discussions/:discussion_number/comments/:comment_number/reactions", - }, - listForTeamDiscussionInOrg: { - headers: { - accept: "application/vnd.github.squirrel-girl-preview+json", - }, - method: "GET", - params: { - content: { - enum: [ - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "rocket", - "eyes", - ], - type: "string", - }, - discussion_number: { - required: true, - type: "integer", - }, - org: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - team_slug: { - required: true, - type: "string", - }, - }, - url: - "/orgs/:org/teams/:team_slug/discussions/:discussion_number/reactions", - }, - listForTeamDiscussionLegacy: { - deprecated: - "octokit.reactions.listForTeamDiscussionLegacy() is deprecated, see https://developer.github.com/v3/reactions/#list-reactions-for-a-team-discussion-legacy", - headers: { - accept: "application/vnd.github.squirrel-girl-preview+json", - }, - method: "GET", - params: { - content: { - enum: [ - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "rocket", - "eyes", - ], - type: "string", - }, - discussion_number: { - required: true, - type: "integer", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - team_id: { - required: true, - type: "integer", - }, - }, - url: "/teams/:team_id/discussions/:discussion_number/reactions", - }, - }, - repos: { - acceptInvitation: { - method: "PATCH", - params: { - invitation_id: { - required: true, - type: "integer", - }, - }, - url: "/user/repository_invitations/:invitation_id", - }, - addCollaborator: { - method: "PUT", - params: { - owner: { - required: true, - type: "string", - }, - permission: { - enum: ["pull", "push", "admin"], - type: "string", - }, - repo: { - required: true, - type: "string", - }, - username: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/collaborators/:username", - }, - addDeployKey: { - method: "POST", - params: { - key: { - required: true, - type: "string", - }, - owner: { - required: true, - type: "string", - }, - read_only: { - type: "boolean", - }, - repo: { - required: true, - type: "string", - }, - title: { - type: "string", - }, - }, - url: "/repos/:owner/:repo/keys", - }, - addProtectedBranchAdminEnforcement: { - method: "POST", - params: { - branch: { - required: true, - type: "string", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: - "/repos/:owner/:repo/branches/:branch/protection/enforce_admins", - }, - addProtectedBranchAppRestrictions: { - method: "POST", - params: { - apps: { - mapTo: "data", - required: true, - type: "string[]", - }, - branch: { - required: true, - type: "string", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: - "/repos/:owner/:repo/branches/:branch/protection/restrictions/apps", - }, - addProtectedBranchRequiredSignatures: { - headers: { - accept: "application/vnd.github.zzzax-preview+json", - }, - method: "POST", - params: { - branch: { - required: true, - type: "string", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: - "/repos/:owner/:repo/branches/:branch/protection/required_signatures", - }, - addProtectedBranchRequiredStatusChecksContexts: { - method: "POST", - params: { - branch: { - required: true, - type: "string", - }, - contexts: { - mapTo: "data", - required: true, - type: "string[]", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: - "/repos/:owner/:repo/branches/:branch/protection/required_status_checks/contexts", - }, - addProtectedBranchTeamRestrictions: { - method: "POST", - params: { - branch: { - required: true, - type: "string", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - teams: { - mapTo: "data", - required: true, - type: "string[]", - }, - }, - url: - "/repos/:owner/:repo/branches/:branch/protection/restrictions/teams", - }, - addProtectedBranchUserRestrictions: { - method: "POST", - params: { - branch: { - required: true, - type: "string", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - users: { - mapTo: "data", - required: true, - type: "string[]", - }, - }, - url: - "/repos/:owner/:repo/branches/:branch/protection/restrictions/users", - }, - checkCollaborator: { - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - username: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/collaborators/:username", - }, - checkVulnerabilityAlerts: { - headers: { - accept: "application/vnd.github.dorian-preview+json", - }, - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/vulnerability-alerts", - }, - compareCommits: { - method: "GET", - params: { - base: { - required: true, - type: "string", - }, - head: { - required: true, - type: "string", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/compare/:base...:head", - }, - createCommitComment: { - method: "POST", - params: { - body: { - required: true, - type: "string", - }, - commit_sha: { - required: true, - type: "string", - }, - line: { - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - path: { - type: "string", - }, - position: { - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - sha: { - alias: "commit_sha", - deprecated: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/commits/:commit_sha/comments", - }, - createDeployment: { - method: "POST", - params: { - auto_merge: { - type: "boolean", - }, - description: { - type: "string", - }, - environment: { - type: "string", - }, - owner: { - required: true, - type: "string", - }, - payload: { - type: "string", - }, - production_environment: { - type: "boolean", - }, - ref: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - required_contexts: { - type: "string[]", - }, - task: { - type: "string", - }, - transient_environment: { - type: "boolean", - }, - }, - url: "/repos/:owner/:repo/deployments", - }, - createDeploymentStatus: { - method: "POST", - params: { - auto_inactive: { - type: "boolean", - }, - deployment_id: { - required: true, - type: "integer", - }, - description: { - type: "string", - }, - environment: { - enum: ["production", "staging", "qa"], - type: "string", - }, - environment_url: { - type: "string", - }, - log_url: { - type: "string", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - state: { - enum: [ - "error", - "failure", - "inactive", - "in_progress", - "queued", - "pending", - "success", - ], - required: true, - type: "string", - }, - target_url: { - type: "string", - }, - }, - url: "/repos/:owner/:repo/deployments/:deployment_id/statuses", - }, - createDispatchEvent: { - method: "POST", - params: { - client_payload: { - type: "object", - }, - event_type: { - type: "string", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/dispatches", - }, - createFile: { - deprecated: - "octokit.repos.createFile() has been renamed to octokit.repos.createOrUpdateFile() (2019-06-07)", - method: "PUT", - params: { - author: { - type: "object", - }, - "author.email": { - required: true, - type: "string", - }, - "author.name": { - required: true, - type: "string", - }, - branch: { - type: "string", - }, - committer: { - type: "object", - }, - "committer.email": { - required: true, - type: "string", - }, - "committer.name": { - required: true, - type: "string", - }, - content: { - required: true, - type: "string", - }, - message: { - required: true, - type: "string", - }, - owner: { - required: true, - type: "string", - }, - path: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - sha: { - type: "string", - }, - }, - url: "/repos/:owner/:repo/contents/:path", - }, - createForAuthenticatedUser: { - method: "POST", - params: { - allow_merge_commit: { - type: "boolean", - }, - allow_rebase_merge: { - type: "boolean", - }, - allow_squash_merge: { - type: "boolean", - }, - auto_init: { - type: "boolean", - }, - delete_branch_on_merge: { - type: "boolean", - }, - description: { - type: "string", - }, - gitignore_template: { - type: "string", - }, - has_issues: { - type: "boolean", - }, - has_projects: { - type: "boolean", - }, - has_wiki: { - type: "boolean", - }, - homepage: { - type: "string", - }, - is_template: { - type: "boolean", - }, - license_template: { - type: "string", - }, - name: { - required: true, - type: "string", - }, - private: { - type: "boolean", - }, - team_id: { - type: "integer", - }, - visibility: { - enum: ["public", "private", "visibility", "internal"], - type: "string", - }, - }, - url: "/user/repos", - }, - createFork: { - method: "POST", - params: { - organization: { - type: "string", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/forks", - }, - createHook: { - method: "POST", - params: { - active: { - type: "boolean", - }, - config: { - required: true, - type: "object", - }, - "config.content_type": { - type: "string", - }, - "config.insecure_ssl": { - type: "string", - }, - "config.secret": { - type: "string", - }, - "config.url": { - required: true, - type: "string", - }, - events: { - type: "string[]", - }, - name: { - type: "string", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/hooks", - }, - createInOrg: { - method: "POST", - params: { - allow_merge_commit: { - type: "boolean", - }, - allow_rebase_merge: { - type: "boolean", - }, - allow_squash_merge: { - type: "boolean", - }, - auto_init: { - type: "boolean", - }, - delete_branch_on_merge: { - type: "boolean", - }, - description: { - type: "string", - }, - gitignore_template: { - type: "string", - }, - has_issues: { - type: "boolean", - }, - has_projects: { - type: "boolean", - }, - has_wiki: { - type: "boolean", - }, - homepage: { - type: "string", - }, - is_template: { - type: "boolean", - }, - license_template: { - type: "string", - }, - name: { - required: true, - type: "string", - }, - org: { - required: true, - type: "string", - }, - private: { - type: "boolean", - }, - team_id: { - type: "integer", - }, - visibility: { - enum: ["public", "private", "visibility", "internal"], - type: "string", - }, - }, - url: "/orgs/:org/repos", - }, - createOrUpdateFile: { - method: "PUT", - params: { - author: { - type: "object", - }, - "author.email": { - required: true, - type: "string", - }, - "author.name": { - required: true, - type: "string", - }, - branch: { - type: "string", - }, - committer: { - type: "object", - }, - "committer.email": { - required: true, - type: "string", - }, - "committer.name": { - required: true, - type: "string", - }, - content: { - required: true, - type: "string", - }, - message: { - required: true, - type: "string", - }, - owner: { - required: true, - type: "string", - }, - path: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - sha: { - type: "string", - }, - }, - url: "/repos/:owner/:repo/contents/:path", - }, - createRelease: { - method: "POST", - params: { - body: { - type: "string", - }, - draft: { - type: "boolean", - }, - name: { - type: "string", - }, - owner: { - required: true, - type: "string", - }, - prerelease: { - type: "boolean", - }, - repo: { - required: true, - type: "string", - }, - tag_name: { - required: true, - type: "string", - }, - target_commitish: { - type: "string", - }, - }, - url: "/repos/:owner/:repo/releases", - }, - createStatus: { - method: "POST", - params: { - context: { - type: "string", - }, - description: { - type: "string", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - sha: { - required: true, - type: "string", - }, - state: { - enum: ["error", "failure", "pending", "success"], - required: true, - type: "string", - }, - target_url: { - type: "string", - }, - }, - url: "/repos/:owner/:repo/statuses/:sha", - }, - createUsingTemplate: { - headers: { - accept: "application/vnd.github.baptiste-preview+json", - }, - method: "POST", - params: { - description: { - type: "string", - }, - name: { - required: true, - type: "string", - }, - owner: { - type: "string", - }, - private: { - type: "boolean", - }, - template_owner: { - required: true, - type: "string", - }, - template_repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:template_owner/:template_repo/generate", - }, - declineInvitation: { - method: "DELETE", - params: { - invitation_id: { - required: true, - type: "integer", - }, - }, - url: "/user/repository_invitations/:invitation_id", - }, - delete: { - method: "DELETE", - params: { - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo", - }, - deleteCommitComment: { - method: "DELETE", - params: { - comment_id: { - required: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/comments/:comment_id", - }, - deleteDownload: { - method: "DELETE", - params: { - download_id: { - required: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/downloads/:download_id", - }, - deleteFile: { - method: "DELETE", - params: { - author: { - type: "object", - }, - "author.email": { - type: "string", - }, - "author.name": { - type: "string", - }, - branch: { - type: "string", - }, - committer: { - type: "object", - }, - "committer.email": { - type: "string", - }, - "committer.name": { - type: "string", - }, - message: { - required: true, - type: "string", - }, - owner: { - required: true, - type: "string", - }, - path: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - sha: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/contents/:path", - }, - deleteHook: { - method: "DELETE", - params: { - hook_id: { - required: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/hooks/:hook_id", - }, - deleteInvitation: { - method: "DELETE", - params: { - invitation_id: { - required: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/invitations/:invitation_id", - }, - deleteRelease: { - method: "DELETE", - params: { - owner: { - required: true, - type: "string", - }, - release_id: { - required: true, - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/releases/:release_id", - }, - deleteReleaseAsset: { - method: "DELETE", - params: { - asset_id: { - required: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/releases/assets/:asset_id", - }, - disableAutomatedSecurityFixes: { - headers: { - accept: "application/vnd.github.london-preview+json", - }, - method: "DELETE", - params: { - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/automated-security-fixes", - }, - disablePagesSite: { - headers: { - accept: "application/vnd.github.switcheroo-preview+json", - }, - method: "DELETE", - params: { - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/pages", - }, - disableVulnerabilityAlerts: { - headers: { - accept: "application/vnd.github.dorian-preview+json", - }, - method: "DELETE", - params: { - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/vulnerability-alerts", - }, - enableAutomatedSecurityFixes: { - headers: { - accept: "application/vnd.github.london-preview+json", - }, - method: "PUT", - params: { - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/automated-security-fixes", - }, - enablePagesSite: { - headers: { - accept: "application/vnd.github.switcheroo-preview+json", - }, - method: "POST", - params: { - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - source: { - type: "object", - }, - "source.branch": { - enum: ["master", "gh-pages"], - type: "string", - }, - "source.path": { - type: "string", - }, - }, - url: "/repos/:owner/:repo/pages", - }, - enableVulnerabilityAlerts: { - headers: { - accept: "application/vnd.github.dorian-preview+json", - }, - method: "PUT", - params: { - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/vulnerability-alerts", - }, - get: { - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo", - }, - getAppsWithAccessToProtectedBranch: { - method: "GET", - params: { - branch: { - required: true, - type: "string", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: - "/repos/:owner/:repo/branches/:branch/protection/restrictions/apps", - }, - getArchiveLink: { - method: "GET", - params: { - archive_format: { - required: true, - type: "string", - }, - owner: { - required: true, - type: "string", - }, - ref: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/:archive_format/:ref", - }, - getBranch: { - method: "GET", - params: { - branch: { - required: true, - type: "string", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/branches/:branch", - }, - getBranchProtection: { - method: "GET", - params: { - branch: { - required: true, - type: "string", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/branches/:branch/protection", - }, - getClones: { - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - per: { - enum: ["day", "week"], - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/traffic/clones", - }, - getCodeFrequencyStats: { - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/stats/code_frequency", - }, - getCollaboratorPermissionLevel: { - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - username: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/collaborators/:username/permission", - }, - getCombinedStatusForRef: { - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - ref: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/commits/:ref/status", - }, - getCommit: { - method: "GET", - params: { - commit_sha: { - alias: "ref", - deprecated: true, - type: "string", - }, - owner: { - required: true, - type: "string", - }, - ref: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - sha: { - alias: "ref", - deprecated: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/commits/:ref", - }, - getCommitActivityStats: { - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/stats/commit_activity", - }, - getCommitComment: { - method: "GET", - params: { - comment_id: { - required: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/comments/:comment_id", - }, - getCommitRefSha: { - deprecated: - "octokit.repos.getCommitRefSha() is deprecated, see https://developer.github.com/v3/repos/commits/#get-a-single-commit", - headers: { - accept: "application/vnd.github.v3.sha", - }, - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - ref: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/commits/:ref", - }, - getContents: { - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - path: { - required: true, - type: "string", - }, - ref: { - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/contents/:path", - }, - getContributorsStats: { - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/stats/contributors", - }, - getDeployKey: { - method: "GET", - params: { - key_id: { - required: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/keys/:key_id", - }, - getDeployment: { - method: "GET", - params: { - deployment_id: { - required: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/deployments/:deployment_id", - }, - getDeploymentStatus: { - method: "GET", - params: { - deployment_id: { - required: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - status_id: { - required: true, - type: "integer", - }, - }, - url: - "/repos/:owner/:repo/deployments/:deployment_id/statuses/:status_id", - }, - getDownload: { - method: "GET", - params: { - download_id: { - required: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/downloads/:download_id", - }, - getHook: { - method: "GET", - params: { - hook_id: { - required: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/hooks/:hook_id", - }, - getLatestPagesBuild: { - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/pages/builds/latest", - }, - getLatestRelease: { - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/releases/latest", - }, - getPages: { - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/pages", - }, - getPagesBuild: { - method: "GET", - params: { - build_id: { - required: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/pages/builds/:build_id", - }, - getParticipationStats: { - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/stats/participation", - }, - getProtectedBranchAdminEnforcement: { - method: "GET", - params: { - branch: { - required: true, - type: "string", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: - "/repos/:owner/:repo/branches/:branch/protection/enforce_admins", - }, - getProtectedBranchPullRequestReviewEnforcement: { - method: "GET", - params: { - branch: { - required: true, - type: "string", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: - "/repos/:owner/:repo/branches/:branch/protection/required_pull_request_reviews", - }, - getProtectedBranchRequiredSignatures: { - headers: { - accept: "application/vnd.github.zzzax-preview+json", - }, - method: "GET", - params: { - branch: { - required: true, - type: "string", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: - "/repos/:owner/:repo/branches/:branch/protection/required_signatures", - }, - getProtectedBranchRequiredStatusChecks: { - method: "GET", - params: { - branch: { - required: true, - type: "string", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: - "/repos/:owner/:repo/branches/:branch/protection/required_status_checks", - }, - getProtectedBranchRestrictions: { - method: "GET", - params: { - branch: { - required: true, - type: "string", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/branches/:branch/protection/restrictions", - }, - getPunchCardStats: { - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/stats/punch_card", - }, - getReadme: { - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - ref: { - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/readme", - }, - getRelease: { - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - release_id: { - required: true, - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/releases/:release_id", - }, - getReleaseAsset: { - method: "GET", - params: { - asset_id: { - required: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/releases/assets/:asset_id", - }, - getReleaseByTag: { - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - tag: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/releases/tags/:tag", - }, - getTeamsWithAccessToProtectedBranch: { - method: "GET", - params: { - branch: { - required: true, - type: "string", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: - "/repos/:owner/:repo/branches/:branch/protection/restrictions/teams", - }, - getTopPaths: { - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/traffic/popular/paths", - }, - getTopReferrers: { - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/traffic/popular/referrers", - }, - getUsersWithAccessToProtectedBranch: { - method: "GET", - params: { - branch: { - required: true, - type: "string", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: - "/repos/:owner/:repo/branches/:branch/protection/restrictions/users", - }, - getViews: { - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - per: { - enum: ["day", "week"], - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/traffic/views", - }, - list: { - method: "GET", - params: { - affiliation: { - type: "string", - }, - direction: { - enum: ["asc", "desc"], - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - sort: { - enum: ["created", "updated", "pushed", "full_name"], - type: "string", - }, - type: { - enum: ["all", "owner", "public", "private", "member"], - type: "string", - }, - visibility: { - enum: ["all", "public", "private"], - type: "string", - }, - }, - url: "/user/repos", - }, - listAppsWithAccessToProtectedBranch: { - deprecated: - "octokit.repos.listAppsWithAccessToProtectedBranch() has been renamed to octokit.repos.getAppsWithAccessToProtectedBranch() (2019-09-13)", - method: "GET", - params: { - branch: { - required: true, - type: "string", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: - "/repos/:owner/:repo/branches/:branch/protection/restrictions/apps", - }, - listAssetsForRelease: { - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - release_id: { - required: true, - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/releases/:release_id/assets", - }, - listBranches: { - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - protected: { - type: "boolean", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/branches", - }, - listBranchesForHeadCommit: { - headers: { - accept: "application/vnd.github.groot-preview+json", - }, - method: "GET", - params: { - commit_sha: { - required: true, - type: "string", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/commits/:commit_sha/branches-where-head", - }, - listCollaborators: { - method: "GET", - params: { - affiliation: { - enum: ["outside", "direct", "all"], - type: "string", - }, - owner: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/collaborators", - }, - listCommentsForCommit: { - method: "GET", - params: { - commit_sha: { - required: true, - type: "string", - }, - owner: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - ref: { - alias: "commit_sha", - deprecated: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/commits/:commit_sha/comments", - }, - listCommitComments: { - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/comments", - }, - listCommits: { - method: "GET", - params: { - author: { - type: "string", - }, - owner: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - path: { - type: "string", - }, - per_page: { - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - sha: { - type: "string", - }, - since: { - type: "string", - }, - until: { - type: "string", - }, - }, - url: "/repos/:owner/:repo/commits", - }, - listContributors: { - method: "GET", - params: { - anon: { - type: "string", - }, - owner: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/contributors", - }, - listDeployKeys: { - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/keys", - }, - listDeploymentStatuses: { - method: "GET", - params: { - deployment_id: { - required: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/deployments/:deployment_id/statuses", - }, - listDeployments: { - method: "GET", - params: { - environment: { - type: "string", - }, - owner: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - ref: { - type: "string", - }, - repo: { - required: true, - type: "string", - }, - sha: { - type: "string", - }, - task: { - type: "string", - }, - }, - url: "/repos/:owner/:repo/deployments", - }, - listDownloads: { - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/downloads", - }, - listForOrg: { - method: "GET", - params: { - direction: { - enum: ["asc", "desc"], - type: "string", - }, - org: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - sort: { - enum: ["created", "updated", "pushed", "full_name"], - type: "string", - }, - type: { - enum: [ - "all", - "public", - "private", - "forks", - "sources", - "member", - "internal", - ], - type: "string", - }, - }, - url: "/orgs/:org/repos", - }, - listForUser: { - method: "GET", - params: { - direction: { - enum: ["asc", "desc"], - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - sort: { - enum: ["created", "updated", "pushed", "full_name"], - type: "string", - }, - type: { - enum: ["all", "owner", "member"], - type: "string", - }, - username: { - required: true, - type: "string", - }, - }, - url: "/users/:username/repos", - }, - listForks: { - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - sort: { - enum: ["newest", "oldest", "stargazers"], - type: "string", - }, - }, - url: "/repos/:owner/:repo/forks", - }, - listHooks: { - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/hooks", - }, - listInvitations: { - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/invitations", - }, - listInvitationsForAuthenticatedUser: { - method: "GET", - params: { - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - }, - url: "/user/repository_invitations", - }, - listLanguages: { - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/languages", - }, - listPagesBuilds: { - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/pages/builds", - }, - listProtectedBranchRequiredStatusChecksContexts: { - method: "GET", - params: { - branch: { - required: true, - type: "string", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: - "/repos/:owner/:repo/branches/:branch/protection/required_status_checks/contexts", - }, - listProtectedBranchTeamRestrictions: { - deprecated: - "octokit.repos.listProtectedBranchTeamRestrictions() has been renamed to octokit.repos.getTeamsWithAccessToProtectedBranch() (2019-09-09)", - method: "GET", - params: { - branch: { - required: true, - type: "string", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: - "/repos/:owner/:repo/branches/:branch/protection/restrictions/teams", - }, - listProtectedBranchUserRestrictions: { - deprecated: - "octokit.repos.listProtectedBranchUserRestrictions() has been renamed to octokit.repos.getUsersWithAccessToProtectedBranch() (2019-09-09)", - method: "GET", - params: { - branch: { - required: true, - type: "string", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: - "/repos/:owner/:repo/branches/:branch/protection/restrictions/users", - }, - listPublic: { - method: "GET", - params: { - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - since: { - type: "integer", - }, - }, - url: "/repositories", - }, - listPullRequestsAssociatedWithCommit: { - headers: { - accept: "application/vnd.github.groot-preview+json", - }, - method: "GET", - params: { - commit_sha: { - required: true, - type: "string", - }, - owner: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/commits/:commit_sha/pulls", - }, - listReleases: { - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/releases", - }, - listStatusesForRef: { - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - ref: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/commits/:ref/statuses", - }, - listTags: { - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/tags", - }, - listTeams: { - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/teams", - }, - listTeamsWithAccessToProtectedBranch: { - deprecated: - "octokit.repos.listTeamsWithAccessToProtectedBranch() has been renamed to octokit.repos.getTeamsWithAccessToProtectedBranch() (2019-09-13)", - method: "GET", - params: { - branch: { - required: true, - type: "string", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: - "/repos/:owner/:repo/branches/:branch/protection/restrictions/teams", - }, - listTopics: { - headers: { - accept: "application/vnd.github.mercy-preview+json", - }, - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/topics", - }, - listUsersWithAccessToProtectedBranch: { - deprecated: - "octokit.repos.listUsersWithAccessToProtectedBranch() has been renamed to octokit.repos.getUsersWithAccessToProtectedBranch() (2019-09-13)", - method: "GET", - params: { - branch: { - required: true, - type: "string", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: - "/repos/:owner/:repo/branches/:branch/protection/restrictions/users", - }, - merge: { - method: "POST", - params: { - base: { - required: true, - type: "string", - }, - commit_message: { - type: "string", - }, - head: { - required: true, - type: "string", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/merges", - }, - pingHook: { - method: "POST", - params: { - hook_id: { - required: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/hooks/:hook_id/pings", - }, - removeBranchProtection: { - method: "DELETE", - params: { - branch: { - required: true, - type: "string", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/branches/:branch/protection", - }, - removeCollaborator: { - method: "DELETE", - params: { - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - username: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/collaborators/:username", - }, - removeDeployKey: { - method: "DELETE", - params: { - key_id: { - required: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/keys/:key_id", - }, - removeProtectedBranchAdminEnforcement: { - method: "DELETE", - params: { - branch: { - required: true, - type: "string", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: - "/repos/:owner/:repo/branches/:branch/protection/enforce_admins", - }, - removeProtectedBranchAppRestrictions: { - method: "DELETE", - params: { - apps: { - mapTo: "data", - required: true, - type: "string[]", - }, - branch: { - required: true, - type: "string", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: - "/repos/:owner/:repo/branches/:branch/protection/restrictions/apps", - }, - removeProtectedBranchPullRequestReviewEnforcement: { - method: "DELETE", - params: { - branch: { - required: true, - type: "string", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: - "/repos/:owner/:repo/branches/:branch/protection/required_pull_request_reviews", - }, - removeProtectedBranchRequiredSignatures: { - headers: { - accept: "application/vnd.github.zzzax-preview+json", - }, - method: "DELETE", - params: { - branch: { - required: true, - type: "string", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: - "/repos/:owner/:repo/branches/:branch/protection/required_signatures", - }, - removeProtectedBranchRequiredStatusChecks: { - method: "DELETE", - params: { - branch: { - required: true, - type: "string", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: - "/repos/:owner/:repo/branches/:branch/protection/required_status_checks", - }, - removeProtectedBranchRequiredStatusChecksContexts: { - method: "DELETE", - params: { - branch: { - required: true, - type: "string", - }, - contexts: { - mapTo: "data", - required: true, - type: "string[]", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: - "/repos/:owner/:repo/branches/:branch/protection/required_status_checks/contexts", - }, - removeProtectedBranchRestrictions: { - method: "DELETE", - params: { - branch: { - required: true, - type: "string", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/branches/:branch/protection/restrictions", - }, - removeProtectedBranchTeamRestrictions: { - method: "DELETE", - params: { - branch: { - required: true, - type: "string", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - teams: { - mapTo: "data", - required: true, - type: "string[]", - }, - }, - url: - "/repos/:owner/:repo/branches/:branch/protection/restrictions/teams", - }, - removeProtectedBranchUserRestrictions: { - method: "DELETE", - params: { - branch: { - required: true, - type: "string", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - users: { - mapTo: "data", - required: true, - type: "string[]", - }, - }, - url: - "/repos/:owner/:repo/branches/:branch/protection/restrictions/users", - }, - replaceProtectedBranchAppRestrictions: { - method: "PUT", - params: { - apps: { - mapTo: "data", - required: true, - type: "string[]", - }, - branch: { - required: true, - type: "string", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: - "/repos/:owner/:repo/branches/:branch/protection/restrictions/apps", - }, - replaceProtectedBranchRequiredStatusChecksContexts: { - method: "PUT", - params: { - branch: { - required: true, - type: "string", - }, - contexts: { - mapTo: "data", - required: true, - type: "string[]", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: - "/repos/:owner/:repo/branches/:branch/protection/required_status_checks/contexts", - }, - replaceProtectedBranchTeamRestrictions: { - method: "PUT", - params: { - branch: { - required: true, - type: "string", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - teams: { - mapTo: "data", - required: true, - type: "string[]", - }, - }, - url: - "/repos/:owner/:repo/branches/:branch/protection/restrictions/teams", - }, - replaceProtectedBranchUserRestrictions: { - method: "PUT", - params: { - branch: { - required: true, - type: "string", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - users: { - mapTo: "data", - required: true, - type: "string[]", - }, - }, - url: - "/repos/:owner/:repo/branches/:branch/protection/restrictions/users", - }, - replaceTopics: { - headers: { - accept: "application/vnd.github.mercy-preview+json", - }, - method: "PUT", - params: { - names: { - required: true, - type: "string[]", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/topics", - }, - requestPageBuild: { - method: "POST", - params: { - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/pages/builds", - }, - retrieveCommunityProfileMetrics: { - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/community/profile", - }, - testPushHook: { - method: "POST", - params: { - hook_id: { - required: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/hooks/:hook_id/tests", - }, - transfer: { - method: "POST", - params: { - new_owner: { - type: "string", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - team_ids: { - type: "integer[]", - }, - }, - url: "/repos/:owner/:repo/transfer", - }, - update: { - method: "PATCH", - params: { - allow_merge_commit: { - type: "boolean", - }, - allow_rebase_merge: { - type: "boolean", - }, - allow_squash_merge: { - type: "boolean", - }, - archived: { - type: "boolean", - }, - default_branch: { - type: "string", - }, - delete_branch_on_merge: { - type: "boolean", - }, - description: { - type: "string", - }, - has_issues: { - type: "boolean", - }, - has_projects: { - type: "boolean", - }, - has_wiki: { - type: "boolean", - }, - homepage: { - type: "string", - }, - is_template: { - type: "boolean", - }, - name: { - type: "string", - }, - owner: { - required: true, - type: "string", - }, - private: { - type: "boolean", - }, - repo: { - required: true, - type: "string", - }, - visibility: { - enum: ["public", "private", "visibility", "internal"], - type: "string", - }, - }, - url: "/repos/:owner/:repo", - }, - updateBranchProtection: { - method: "PUT", - params: { - allow_deletions: { - type: "boolean", - }, - allow_force_pushes: { - allowNull: true, - type: "boolean", - }, - branch: { - required: true, - type: "string", - }, - enforce_admins: { - allowNull: true, - required: true, - type: "boolean", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - required_linear_history: { - type: "boolean", - }, - required_pull_request_reviews: { - allowNull: true, - required: true, - type: "object", - }, - "required_pull_request_reviews.dismiss_stale_reviews": { - type: "boolean", - }, - "required_pull_request_reviews.dismissal_restrictions": { - type: "object", - }, - "required_pull_request_reviews.dismissal_restrictions.teams": { - type: "string[]", - }, - "required_pull_request_reviews.dismissal_restrictions.users": { - type: "string[]", - }, - "required_pull_request_reviews.require_code_owner_reviews": { - type: "boolean", - }, - "required_pull_request_reviews.required_approving_review_count": { - type: "integer", - }, - required_status_checks: { - allowNull: true, - required: true, - type: "object", - }, - "required_status_checks.contexts": { - required: true, - type: "string[]", - }, - "required_status_checks.strict": { - required: true, - type: "boolean", - }, - restrictions: { - allowNull: true, - required: true, - type: "object", - }, - "restrictions.apps": { - type: "string[]", - }, - "restrictions.teams": { - required: true, - type: "string[]", - }, - "restrictions.users": { - required: true, - type: "string[]", - }, - }, - url: "/repos/:owner/:repo/branches/:branch/protection", - }, - updateCommitComment: { - method: "PATCH", - params: { - body: { - required: true, - type: "string", - }, - comment_id: { - required: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/comments/:comment_id", - }, - updateFile: { - deprecated: - "octokit.repos.updateFile() has been renamed to octokit.repos.createOrUpdateFile() (2019-06-07)", - method: "PUT", - params: { - author: { - type: "object", - }, - "author.email": { - required: true, - type: "string", - }, - "author.name": { - required: true, - type: "string", - }, - branch: { - type: "string", - }, - committer: { - type: "object", - }, - "committer.email": { - required: true, - type: "string", - }, - "committer.name": { - required: true, - type: "string", - }, - content: { - required: true, - type: "string", - }, - message: { - required: true, - type: "string", - }, - owner: { - required: true, - type: "string", - }, - path: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - sha: { - type: "string", - }, - }, - url: "/repos/:owner/:repo/contents/:path", - }, - updateHook: { - method: "PATCH", - params: { - active: { - type: "boolean", - }, - add_events: { - type: "string[]", - }, - config: { - type: "object", - }, - "config.content_type": { - type: "string", - }, - "config.insecure_ssl": { - type: "string", - }, - "config.secret": { - type: "string", - }, - "config.url": { - required: true, - type: "string", - }, - events: { - type: "string[]", - }, - hook_id: { - required: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - remove_events: { - type: "string[]", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/hooks/:hook_id", - }, - updateInformationAboutPagesSite: { - method: "PUT", - params: { - cname: { - type: "string", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - source: { - enum: ['"gh-pages"', '"master"', '"master /docs"'], - type: "string", - }, - }, - url: "/repos/:owner/:repo/pages", - }, - updateInvitation: { - method: "PATCH", - params: { - invitation_id: { - required: true, - type: "integer", - }, - owner: { - required: true, - type: "string", - }, - permissions: { - enum: ["read", "write", "admin"], - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/invitations/:invitation_id", - }, - updateProtectedBranchPullRequestReviewEnforcement: { - method: "PATCH", - params: { - branch: { - required: true, - type: "string", - }, - dismiss_stale_reviews: { - type: "boolean", - }, - dismissal_restrictions: { - type: "object", - }, - "dismissal_restrictions.teams": { - type: "string[]", - }, - "dismissal_restrictions.users": { - type: "string[]", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - require_code_owner_reviews: { - type: "boolean", - }, - required_approving_review_count: { - type: "integer", - }, - }, - url: - "/repos/:owner/:repo/branches/:branch/protection/required_pull_request_reviews", - }, - updateProtectedBranchRequiredStatusChecks: { - method: "PATCH", - params: { - branch: { - required: true, - type: "string", - }, - contexts: { - type: "string[]", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - strict: { - type: "boolean", - }, - }, - url: - "/repos/:owner/:repo/branches/:branch/protection/required_status_checks", - }, - updateRelease: { - method: "PATCH", - params: { - body: { - type: "string", - }, - draft: { - type: "boolean", - }, - name: { - type: "string", - }, - owner: { - required: true, - type: "string", - }, - prerelease: { - type: "boolean", - }, - release_id: { - required: true, - type: "integer", - }, - repo: { - required: true, - type: "string", - }, - tag_name: { - type: "string", - }, - target_commitish: { - type: "string", - }, - }, - url: "/repos/:owner/:repo/releases/:release_id", - }, - updateReleaseAsset: { - method: "PATCH", - params: { - asset_id: { - required: true, - type: "integer", - }, - label: { - type: "string", - }, - name: { - type: "string", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - }, - url: "/repos/:owner/:repo/releases/assets/:asset_id", - }, - uploadReleaseAsset: { - method: "POST", - params: { - data: { - mapTo: "data", - required: true, - type: "string | object", - }, - file: { - alias: "data", - deprecated: true, - type: "string | object", - }, - headers: { - required: true, - type: "object", - }, - "headers.content-length": { - required: true, - type: "integer", - }, - "headers.content-type": { - required: true, - type: "string", - }, - label: { - type: "string", - }, - name: { - required: true, - type: "string", - }, - url: { - required: true, - type: "string", - }, - }, - url: ":url", - }, - }, - search: { - code: { - method: "GET", - params: { - order: { - enum: ["desc", "asc"], - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - q: { - required: true, - type: "string", - }, - sort: { - enum: ["indexed"], - type: "string", - }, - }, - url: "/search/code", - }, - commits: { - headers: { - accept: "application/vnd.github.cloak-preview+json", - }, - method: "GET", - params: { - order: { - enum: ["desc", "asc"], - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - q: { - required: true, - type: "string", - }, - sort: { - enum: ["author-date", "committer-date"], - type: "string", - }, - }, - url: "/search/commits", - }, - issues: { - deprecated: - "octokit.search.issues() has been renamed to octokit.search.issuesAndPullRequests() (2018-12-27)", - method: "GET", - params: { - order: { - enum: ["desc", "asc"], - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - q: { - required: true, - type: "string", - }, - sort: { - enum: [ - "comments", - "reactions", - "reactions-+1", - "reactions--1", - "reactions-smile", - "reactions-thinking_face", - "reactions-heart", - "reactions-tada", - "interactions", - "created", - "updated", - ], - type: "string", - }, - }, - url: "/search/issues", - }, - issuesAndPullRequests: { - method: "GET", - params: { - order: { - enum: ["desc", "asc"], - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - q: { - required: true, - type: "string", - }, - sort: { - enum: [ - "comments", - "reactions", - "reactions-+1", - "reactions--1", - "reactions-smile", - "reactions-thinking_face", - "reactions-heart", - "reactions-tada", - "interactions", - "created", - "updated", - ], - type: "string", - }, - }, - url: "/search/issues", - }, - labels: { - method: "GET", - params: { - order: { - enum: ["desc", "asc"], - type: "string", - }, - q: { - required: true, - type: "string", - }, - repository_id: { - required: true, - type: "integer", - }, - sort: { - enum: ["created", "updated"], - type: "string", - }, - }, - url: "/search/labels", - }, - repos: { - method: "GET", - params: { - order: { - enum: ["desc", "asc"], - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - q: { - required: true, - type: "string", - }, - sort: { - enum: ["stars", "forks", "help-wanted-issues", "updated"], - type: "string", - }, - }, - url: "/search/repositories", - }, - topics: { - method: "GET", - params: { - q: { - required: true, - type: "string", - }, - }, - url: "/search/topics", - }, - users: { - method: "GET", - params: { - order: { - enum: ["desc", "asc"], - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - q: { - required: true, - type: "string", - }, - sort: { - enum: ["followers", "repositories", "joined"], - type: "string", - }, - }, - url: "/search/users", - }, - }, - teams: { - addMember: { - deprecated: - "octokit.teams.addMember() has been renamed to octokit.teams.addMemberLegacy() (2020-01-16)", - method: "PUT", - params: { - team_id: { - required: true, - type: "integer", - }, - username: { - required: true, - type: "string", - }, - }, - url: "/teams/:team_id/members/:username", - }, - addMemberLegacy: { - deprecated: - "octokit.teams.addMemberLegacy() is deprecated, see https://developer.github.com/v3/teams/members/#add-team-member-legacy", - method: "PUT", - params: { - team_id: { - required: true, - type: "integer", - }, - username: { - required: true, - type: "string", - }, - }, - url: "/teams/:team_id/members/:username", - }, - addOrUpdateMembership: { - deprecated: - "octokit.teams.addOrUpdateMembership() has been renamed to octokit.teams.addOrUpdateMembershipLegacy() (2020-01-16)", - method: "PUT", - params: { - role: { - enum: ["member", "maintainer"], - type: "string", - }, - team_id: { - required: true, - type: "integer", - }, - username: { - required: true, - type: "string", - }, - }, - url: "/teams/:team_id/memberships/:username", - }, - addOrUpdateMembershipInOrg: { - method: "PUT", - params: { - org: { - required: true, - type: "string", - }, - role: { - enum: ["member", "maintainer"], - type: "string", - }, - team_slug: { - required: true, - type: "string", - }, - username: { - required: true, - type: "string", - }, - }, - url: "/orgs/:org/teams/:team_slug/memberships/:username", - }, - addOrUpdateMembershipLegacy: { - deprecated: - "octokit.teams.addOrUpdateMembershipLegacy() is deprecated, see https://developer.github.com/v3/teams/members/#add-or-update-team-membership-legacy", - method: "PUT", - params: { - role: { - enum: ["member", "maintainer"], - type: "string", - }, - team_id: { - required: true, - type: "integer", - }, - username: { - required: true, - type: "string", - }, - }, - url: "/teams/:team_id/memberships/:username", - }, - addOrUpdateProject: { - deprecated: - "octokit.teams.addOrUpdateProject() has been renamed to octokit.teams.addOrUpdateProjectLegacy() (2020-01-16)", - headers: { - accept: "application/vnd.github.inertia-preview+json", - }, - method: "PUT", - params: { - permission: { - enum: ["read", "write", "admin"], - type: "string", - }, - project_id: { - required: true, - type: "integer", - }, - team_id: { - required: true, - type: "integer", - }, - }, - url: "/teams/:team_id/projects/:project_id", - }, - addOrUpdateProjectInOrg: { - headers: { - accept: "application/vnd.github.inertia-preview+json", - }, - method: "PUT", - params: { - org: { - required: true, - type: "string", - }, - permission: { - enum: ["read", "write", "admin"], - type: "string", - }, - project_id: { - required: true, - type: "integer", - }, - team_slug: { - required: true, - type: "string", - }, - }, - url: "/orgs/:org/teams/:team_slug/projects/:project_id", - }, - addOrUpdateProjectLegacy: { - deprecated: - "octokit.teams.addOrUpdateProjectLegacy() is deprecated, see https://developer.github.com/v3/teams/#add-or-update-team-project-legacy", - headers: { - accept: "application/vnd.github.inertia-preview+json", - }, - method: "PUT", - params: { - permission: { - enum: ["read", "write", "admin"], - type: "string", - }, - project_id: { - required: true, - type: "integer", - }, - team_id: { - required: true, - type: "integer", - }, - }, - url: "/teams/:team_id/projects/:project_id", - }, - addOrUpdateRepo: { - deprecated: - "octokit.teams.addOrUpdateRepo() has been renamed to octokit.teams.addOrUpdateRepoLegacy() (2020-01-16)", - method: "PUT", - params: { - owner: { - required: true, - type: "string", - }, - permission: { - enum: ["pull", "push", "admin"], - type: "string", - }, - repo: { - required: true, - type: "string", - }, - team_id: { - required: true, - type: "integer", - }, - }, - url: "/teams/:team_id/repos/:owner/:repo", - }, - addOrUpdateRepoInOrg: { - method: "PUT", - params: { - org: { - required: true, - type: "string", - }, - owner: { - required: true, - type: "string", - }, - permission: { - enum: ["pull", "push", "admin"], - type: "string", - }, - repo: { - required: true, - type: "string", - }, - team_slug: { - required: true, - type: "string", - }, - }, - url: "/orgs/:org/teams/:team_slug/repos/:owner/:repo", - }, - addOrUpdateRepoLegacy: { - deprecated: - "octokit.teams.addOrUpdateRepoLegacy() is deprecated, see https://developer.github.com/v3/teams/#add-or-update-team-repository-legacy", - method: "PUT", - params: { - owner: { - required: true, - type: "string", - }, - permission: { - enum: ["pull", "push", "admin"], - type: "string", - }, - repo: { - required: true, - type: "string", - }, - team_id: { - required: true, - type: "integer", - }, - }, - url: "/teams/:team_id/repos/:owner/:repo", - }, - checkManagesRepo: { - deprecated: - "octokit.teams.checkManagesRepo() has been renamed to octokit.teams.checkManagesRepoLegacy() (2020-01-16)", - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - team_id: { - required: true, - type: "integer", - }, - }, - url: "/teams/:team_id/repos/:owner/:repo", - }, - checkManagesRepoInOrg: { - method: "GET", - params: { - org: { - required: true, - type: "string", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - team_slug: { - required: true, - type: "string", - }, - }, - url: "/orgs/:org/teams/:team_slug/repos/:owner/:repo", - }, - checkManagesRepoLegacy: { - deprecated: - "octokit.teams.checkManagesRepoLegacy() is deprecated, see https://developer.github.com/v3/teams/#check-if-a-team-manages-a-repository-legacy", - method: "GET", - params: { - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - team_id: { - required: true, - type: "integer", - }, - }, - url: "/teams/:team_id/repos/:owner/:repo", - }, - create: { - method: "POST", - params: { - description: { - type: "string", - }, - maintainers: { - type: "string[]", - }, - name: { - required: true, - type: "string", - }, - org: { - required: true, - type: "string", - }, - parent_team_id: { - type: "integer", - }, - permission: { - enum: ["pull", "push", "admin"], - type: "string", - }, - privacy: { - enum: ["secret", "closed"], - type: "string", - }, - repo_names: { - type: "string[]", - }, - }, - url: "/orgs/:org/teams", - }, - createDiscussion: { - deprecated: - "octokit.teams.createDiscussion() has been renamed to octokit.teams.createDiscussionLegacy() (2020-01-16)", - method: "POST", - params: { - body: { - required: true, - type: "string", - }, - private: { - type: "boolean", - }, - team_id: { - required: true, - type: "integer", - }, - title: { - required: true, - type: "string", - }, - }, - url: "/teams/:team_id/discussions", - }, - createDiscussionComment: { - deprecated: - "octokit.teams.createDiscussionComment() has been renamed to octokit.teams.createDiscussionCommentLegacy() (2020-01-16)", - method: "POST", - params: { - body: { - required: true, - type: "string", - }, - discussion_number: { - required: true, - type: "integer", - }, - team_id: { - required: true, - type: "integer", - }, - }, - url: "/teams/:team_id/discussions/:discussion_number/comments", - }, - createDiscussionCommentInOrg: { - method: "POST", - params: { - body: { - required: true, - type: "string", - }, - discussion_number: { - required: true, - type: "integer", - }, - org: { - required: true, - type: "string", - }, - team_slug: { - required: true, - type: "string", - }, - }, - url: - "/orgs/:org/teams/:team_slug/discussions/:discussion_number/comments", - }, - createDiscussionCommentLegacy: { - deprecated: - "octokit.teams.createDiscussionCommentLegacy() is deprecated, see https://developer.github.com/v3/teams/discussion_comments/#create-a-comment-legacy", - method: "POST", - params: { - body: { - required: true, - type: "string", - }, - discussion_number: { - required: true, - type: "integer", - }, - team_id: { - required: true, - type: "integer", - }, - }, - url: "/teams/:team_id/discussions/:discussion_number/comments", - }, - createDiscussionInOrg: { - method: "POST", - params: { - body: { - required: true, - type: "string", - }, - org: { - required: true, - type: "string", - }, - private: { - type: "boolean", - }, - team_slug: { - required: true, - type: "string", - }, - title: { - required: true, - type: "string", - }, - }, - url: "/orgs/:org/teams/:team_slug/discussions", - }, - createDiscussionLegacy: { - deprecated: - "octokit.teams.createDiscussionLegacy() is deprecated, see https://developer.github.com/v3/teams/discussions/#create-a-discussion-legacy", - method: "POST", - params: { - body: { - required: true, - type: "string", - }, - private: { - type: "boolean", - }, - team_id: { - required: true, - type: "integer", - }, - title: { - required: true, - type: "string", - }, - }, - url: "/teams/:team_id/discussions", - }, - delete: { - deprecated: - "octokit.teams.delete() has been renamed to octokit.teams.deleteLegacy() (2020-01-16)", - method: "DELETE", - params: { - team_id: { - required: true, - type: "integer", - }, - }, - url: "/teams/:team_id", - }, - deleteDiscussion: { - deprecated: - "octokit.teams.deleteDiscussion() has been renamed to octokit.teams.deleteDiscussionLegacy() (2020-01-16)", - method: "DELETE", - params: { - discussion_number: { - required: true, - type: "integer", - }, - team_id: { - required: true, - type: "integer", - }, - }, - url: "/teams/:team_id/discussions/:discussion_number", - }, - deleteDiscussionComment: { - deprecated: - "octokit.teams.deleteDiscussionComment() has been renamed to octokit.teams.deleteDiscussionCommentLegacy() (2020-01-16)", - method: "DELETE", - params: { - comment_number: { - required: true, - type: "integer", - }, - discussion_number: { - required: true, - type: "integer", - }, - team_id: { - required: true, - type: "integer", - }, - }, - url: - "/teams/:team_id/discussions/:discussion_number/comments/:comment_number", - }, - deleteDiscussionCommentInOrg: { - method: "DELETE", - params: { - comment_number: { - required: true, - type: "integer", - }, - discussion_number: { - required: true, - type: "integer", - }, - org: { - required: true, - type: "string", - }, - team_slug: { - required: true, - type: "string", - }, - }, - url: - "/orgs/:org/teams/:team_slug/discussions/:discussion_number/comments/:comment_number", - }, - deleteDiscussionCommentLegacy: { - deprecated: - "octokit.teams.deleteDiscussionCommentLegacy() is deprecated, see https://developer.github.com/v3/teams/discussion_comments/#delete-a-comment-legacy", - method: "DELETE", - params: { - comment_number: { - required: true, - type: "integer", - }, - discussion_number: { - required: true, - type: "integer", - }, - team_id: { - required: true, - type: "integer", - }, - }, - url: - "/teams/:team_id/discussions/:discussion_number/comments/:comment_number", - }, - deleteDiscussionInOrg: { - method: "DELETE", - params: { - discussion_number: { - required: true, - type: "integer", - }, - org: { - required: true, - type: "string", - }, - team_slug: { - required: true, - type: "string", - }, - }, - url: "/orgs/:org/teams/:team_slug/discussions/:discussion_number", - }, - deleteDiscussionLegacy: { - deprecated: - "octokit.teams.deleteDiscussionLegacy() is deprecated, see https://developer.github.com/v3/teams/discussions/#delete-a-discussion-legacy", - method: "DELETE", - params: { - discussion_number: { - required: true, - type: "integer", - }, - team_id: { - required: true, - type: "integer", - }, - }, - url: "/teams/:team_id/discussions/:discussion_number", - }, - deleteInOrg: { - method: "DELETE", - params: { - org: { - required: true, - type: "string", - }, - team_slug: { - required: true, - type: "string", - }, - }, - url: "/orgs/:org/teams/:team_slug", - }, - deleteLegacy: { - deprecated: - "octokit.teams.deleteLegacy() is deprecated, see https://developer.github.com/v3/teams/#delete-team-legacy", - method: "DELETE", - params: { - team_id: { - required: true, - type: "integer", - }, - }, - url: "/teams/:team_id", - }, - get: { - deprecated: - "octokit.teams.get() has been renamed to octokit.teams.getLegacy() (2020-01-16)", - method: "GET", - params: { - team_id: { - required: true, - type: "integer", - }, - }, - url: "/teams/:team_id", - }, - getByName: { - method: "GET", - params: { - org: { - required: true, - type: "string", - }, - team_slug: { - required: true, - type: "string", - }, - }, - url: "/orgs/:org/teams/:team_slug", - }, - getDiscussion: { - deprecated: - "octokit.teams.getDiscussion() has been renamed to octokit.teams.getDiscussionLegacy() (2020-01-16)", - method: "GET", - params: { - discussion_number: { - required: true, - type: "integer", - }, - team_id: { - required: true, - type: "integer", - }, - }, - url: "/teams/:team_id/discussions/:discussion_number", - }, - getDiscussionComment: { - deprecated: - "octokit.teams.getDiscussionComment() has been renamed to octokit.teams.getDiscussionCommentLegacy() (2020-01-16)", - method: "GET", - params: { - comment_number: { - required: true, - type: "integer", - }, - discussion_number: { - required: true, - type: "integer", - }, - team_id: { - required: true, - type: "integer", - }, - }, - url: - "/teams/:team_id/discussions/:discussion_number/comments/:comment_number", - }, - getDiscussionCommentInOrg: { - method: "GET", - params: { - comment_number: { - required: true, - type: "integer", - }, - discussion_number: { - required: true, - type: "integer", - }, - org: { - required: true, - type: "string", - }, - team_slug: { - required: true, - type: "string", - }, - }, - url: - "/orgs/:org/teams/:team_slug/discussions/:discussion_number/comments/:comment_number", - }, - getDiscussionCommentLegacy: { - deprecated: - "octokit.teams.getDiscussionCommentLegacy() is deprecated, see https://developer.github.com/v3/teams/discussion_comments/#get-a-single-comment-legacy", - method: "GET", - params: { - comment_number: { - required: true, - type: "integer", - }, - discussion_number: { - required: true, - type: "integer", - }, - team_id: { - required: true, - type: "integer", - }, - }, - url: - "/teams/:team_id/discussions/:discussion_number/comments/:comment_number", - }, - getDiscussionInOrg: { - method: "GET", - params: { - discussion_number: { - required: true, - type: "integer", - }, - org: { - required: true, - type: "string", - }, - team_slug: { - required: true, - type: "string", - }, - }, - url: "/orgs/:org/teams/:team_slug/discussions/:discussion_number", - }, - getDiscussionLegacy: { - deprecated: - "octokit.teams.getDiscussionLegacy() is deprecated, see https://developer.github.com/v3/teams/discussions/#get-a-single-discussion-legacy", - method: "GET", - params: { - discussion_number: { - required: true, - type: "integer", - }, - team_id: { - required: true, - type: "integer", - }, - }, - url: "/teams/:team_id/discussions/:discussion_number", - }, - getLegacy: { - deprecated: - "octokit.teams.getLegacy() is deprecated, see https://developer.github.com/v3/teams/#get-team-legacy", - method: "GET", - params: { - team_id: { - required: true, - type: "integer", - }, - }, - url: "/teams/:team_id", - }, - getMember: { - deprecated: - "octokit.teams.getMember() has been renamed to octokit.teams.getMemberLegacy() (2020-01-16)", - method: "GET", - params: { - team_id: { - required: true, - type: "integer", - }, - username: { - required: true, - type: "string", - }, - }, - url: "/teams/:team_id/members/:username", - }, - getMemberLegacy: { - deprecated: - "octokit.teams.getMemberLegacy() is deprecated, see https://developer.github.com/v3/teams/members/#get-team-member-legacy", - method: "GET", - params: { - team_id: { - required: true, - type: "integer", - }, - username: { - required: true, - type: "string", - }, - }, - url: "/teams/:team_id/members/:username", - }, - getMembership: { - deprecated: - "octokit.teams.getMembership() has been renamed to octokit.teams.getMembershipLegacy() (2020-01-16)", - method: "GET", - params: { - team_id: { - required: true, - type: "integer", - }, - username: { - required: true, - type: "string", - }, - }, - url: "/teams/:team_id/memberships/:username", - }, - getMembershipInOrg: { - method: "GET", - params: { - org: { - required: true, - type: "string", - }, - team_slug: { - required: true, - type: "string", - }, - username: { - required: true, - type: "string", - }, - }, - url: "/orgs/:org/teams/:team_slug/memberships/:username", - }, - getMembershipLegacy: { - deprecated: - "octokit.teams.getMembershipLegacy() is deprecated, see https://developer.github.com/v3/teams/members/#get-team-membership-legacy", - method: "GET", - params: { - team_id: { - required: true, - type: "integer", - }, - username: { - required: true, - type: "string", - }, - }, - url: "/teams/:team_id/memberships/:username", - }, - list: { - method: "GET", - params: { - org: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - }, - url: "/orgs/:org/teams", - }, - listChild: { - deprecated: - "octokit.teams.listChild() has been renamed to octokit.teams.listChildLegacy() (2020-01-16)", - method: "GET", - params: { - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - team_id: { - required: true, - type: "integer", - }, - }, - url: "/teams/:team_id/teams", - }, - listChildInOrg: { - method: "GET", - params: { - org: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - team_slug: { - required: true, - type: "string", - }, - }, - url: "/orgs/:org/teams/:team_slug/teams", - }, - listChildLegacy: { - deprecated: - "octokit.teams.listChildLegacy() is deprecated, see https://developer.github.com/v3/teams/#list-child-teams-legacy", - method: "GET", - params: { - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - team_id: { - required: true, - type: "integer", - }, - }, - url: "/teams/:team_id/teams", - }, - listDiscussionComments: { - deprecated: - "octokit.teams.listDiscussionComments() has been renamed to octokit.teams.listDiscussionCommentsLegacy() (2020-01-16)", - method: "GET", - params: { - direction: { - enum: ["asc", "desc"], - type: "string", - }, - discussion_number: { - required: true, - type: "integer", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - team_id: { - required: true, - type: "integer", - }, - }, - url: "/teams/:team_id/discussions/:discussion_number/comments", - }, - listDiscussionCommentsInOrg: { - method: "GET", - params: { - direction: { - enum: ["asc", "desc"], - type: "string", - }, - discussion_number: { - required: true, - type: "integer", - }, - org: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - team_slug: { - required: true, - type: "string", - }, - }, - url: - "/orgs/:org/teams/:team_slug/discussions/:discussion_number/comments", - }, - listDiscussionCommentsLegacy: { - deprecated: - "octokit.teams.listDiscussionCommentsLegacy() is deprecated, see https://developer.github.com/v3/teams/discussion_comments/#list-comments-legacy", - method: "GET", - params: { - direction: { - enum: ["asc", "desc"], - type: "string", - }, - discussion_number: { - required: true, - type: "integer", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - team_id: { - required: true, - type: "integer", - }, - }, - url: "/teams/:team_id/discussions/:discussion_number/comments", - }, - listDiscussions: { - deprecated: - "octokit.teams.listDiscussions() has been renamed to octokit.teams.listDiscussionsLegacy() (2020-01-16)", - method: "GET", - params: { - direction: { - enum: ["asc", "desc"], - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - team_id: { - required: true, - type: "integer", - }, - }, - url: "/teams/:team_id/discussions", - }, - listDiscussionsInOrg: { - method: "GET", - params: { - direction: { - enum: ["asc", "desc"], - type: "string", - }, - org: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - team_slug: { - required: true, - type: "string", - }, - }, - url: "/orgs/:org/teams/:team_slug/discussions", - }, - listDiscussionsLegacy: { - deprecated: - "octokit.teams.listDiscussionsLegacy() is deprecated, see https://developer.github.com/v3/teams/discussions/#list-discussions-legacy", - method: "GET", - params: { - direction: { - enum: ["asc", "desc"], - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - team_id: { - required: true, - type: "integer", - }, - }, - url: "/teams/:team_id/discussions", - }, - listForAuthenticatedUser: { - method: "GET", - params: { - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - }, - url: "/user/teams", - }, - listMembers: { - deprecated: - "octokit.teams.listMembers() has been renamed to octokit.teams.listMembersLegacy() (2020-01-16)", - method: "GET", - params: { - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - role: { - enum: ["member", "maintainer", "all"], - type: "string", - }, - team_id: { - required: true, - type: "integer", - }, - }, - url: "/teams/:team_id/members", - }, - listMembersInOrg: { - method: "GET", - params: { - org: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - role: { - enum: ["member", "maintainer", "all"], - type: "string", - }, - team_slug: { - required: true, - type: "string", - }, - }, - url: "/orgs/:org/teams/:team_slug/members", - }, - listMembersLegacy: { - deprecated: - "octokit.teams.listMembersLegacy() is deprecated, see https://developer.github.com/v3/teams/members/#list-team-members-legacy", - method: "GET", - params: { - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - role: { - enum: ["member", "maintainer", "all"], - type: "string", - }, - team_id: { - required: true, - type: "integer", - }, - }, - url: "/teams/:team_id/members", - }, - listPendingInvitations: { - deprecated: - "octokit.teams.listPendingInvitations() has been renamed to octokit.teams.listPendingInvitationsLegacy() (2020-01-16)", - method: "GET", - params: { - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - team_id: { - required: true, - type: "integer", - }, - }, - url: "/teams/:team_id/invitations", - }, - listPendingInvitationsInOrg: { - method: "GET", - params: { - org: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - team_slug: { - required: true, - type: "string", - }, - }, - url: "/orgs/:org/teams/:team_slug/invitations", - }, - listPendingInvitationsLegacy: { - deprecated: - "octokit.teams.listPendingInvitationsLegacy() is deprecated, see https://developer.github.com/v3/teams/members/#list-pending-team-invitations-legacy", - method: "GET", - params: { - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - team_id: { - required: true, - type: "integer", - }, - }, - url: "/teams/:team_id/invitations", - }, - listProjects: { - deprecated: - "octokit.teams.listProjects() has been renamed to octokit.teams.listProjectsLegacy() (2020-01-16)", - headers: { - accept: "application/vnd.github.inertia-preview+json", - }, - method: "GET", - params: { - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - team_id: { - required: true, - type: "integer", - }, - }, - url: "/teams/:team_id/projects", - }, - listProjectsInOrg: { - headers: { - accept: "application/vnd.github.inertia-preview+json", - }, - method: "GET", - params: { - org: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - team_slug: { - required: true, - type: "string", - }, - }, - url: "/orgs/:org/teams/:team_slug/projects", - }, - listProjectsLegacy: { - deprecated: - "octokit.teams.listProjectsLegacy() is deprecated, see https://developer.github.com/v3/teams/#list-team-projects-legacy", - headers: { - accept: "application/vnd.github.inertia-preview+json", - }, - method: "GET", - params: { - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - team_id: { - required: true, - type: "integer", - }, - }, - url: "/teams/:team_id/projects", - }, - listRepos: { - deprecated: - "octokit.teams.listRepos() has been renamed to octokit.teams.listReposLegacy() (2020-01-16)", - method: "GET", - params: { - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - team_id: { - required: true, - type: "integer", - }, - }, - url: "/teams/:team_id/repos", - }, - listReposInOrg: { - method: "GET", - params: { - org: { - required: true, - type: "string", - }, - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - team_slug: { - required: true, - type: "string", - }, - }, - url: "/orgs/:org/teams/:team_slug/repos", - }, - listReposLegacy: { - deprecated: - "octokit.teams.listReposLegacy() is deprecated, see https://developer.github.com/v3/teams/#list-team-repos-legacy", - method: "GET", - params: { - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - team_id: { - required: true, - type: "integer", - }, - }, - url: "/teams/:team_id/repos", - }, - removeMember: { - deprecated: - "octokit.teams.removeMember() has been renamed to octokit.teams.removeMemberLegacy() (2020-01-16)", - method: "DELETE", - params: { - team_id: { - required: true, - type: "integer", - }, - username: { - required: true, - type: "string", - }, - }, - url: "/teams/:team_id/members/:username", - }, - removeMemberLegacy: { - deprecated: - "octokit.teams.removeMemberLegacy() is deprecated, see https://developer.github.com/v3/teams/members/#remove-team-member-legacy", - method: "DELETE", - params: { - team_id: { - required: true, - type: "integer", - }, - username: { - required: true, - type: "string", - }, - }, - url: "/teams/:team_id/members/:username", - }, - removeMembership: { - deprecated: - "octokit.teams.removeMembership() has been renamed to octokit.teams.removeMembershipLegacy() (2020-01-16)", - method: "DELETE", - params: { - team_id: { - required: true, - type: "integer", - }, - username: { - required: true, - type: "string", - }, - }, - url: "/teams/:team_id/memberships/:username", - }, - removeMembershipInOrg: { - method: "DELETE", - params: { - org: { - required: true, - type: "string", - }, - team_slug: { - required: true, - type: "string", - }, - username: { - required: true, - type: "string", - }, - }, - url: "/orgs/:org/teams/:team_slug/memberships/:username", - }, - removeMembershipLegacy: { - deprecated: - "octokit.teams.removeMembershipLegacy() is deprecated, see https://developer.github.com/v3/teams/members/#remove-team-membership-legacy", - method: "DELETE", - params: { - team_id: { - required: true, - type: "integer", - }, - username: { - required: true, - type: "string", - }, - }, - url: "/teams/:team_id/memberships/:username", - }, - removeProject: { - deprecated: - "octokit.teams.removeProject() has been renamed to octokit.teams.removeProjectLegacy() (2020-01-16)", - method: "DELETE", - params: { - project_id: { - required: true, - type: "integer", - }, - team_id: { - required: true, - type: "integer", - }, - }, - url: "/teams/:team_id/projects/:project_id", - }, - removeProjectInOrg: { - method: "DELETE", - params: { - org: { - required: true, - type: "string", - }, - project_id: { - required: true, - type: "integer", - }, - team_slug: { - required: true, - type: "string", - }, - }, - url: "/orgs/:org/teams/:team_slug/projects/:project_id", - }, - removeProjectLegacy: { - deprecated: - "octokit.teams.removeProjectLegacy() is deprecated, see https://developer.github.com/v3/teams/#remove-team-project-legacy", - method: "DELETE", - params: { - project_id: { - required: true, - type: "integer", - }, - team_id: { - required: true, - type: "integer", - }, - }, - url: "/teams/:team_id/projects/:project_id", - }, - removeRepo: { - deprecated: - "octokit.teams.removeRepo() has been renamed to octokit.teams.removeRepoLegacy() (2020-01-16)", - method: "DELETE", - params: { - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - team_id: { - required: true, - type: "integer", - }, - }, - url: "/teams/:team_id/repos/:owner/:repo", - }, - removeRepoInOrg: { - method: "DELETE", - params: { - org: { - required: true, - type: "string", - }, - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - team_slug: { - required: true, - type: "string", - }, - }, - url: "/orgs/:org/teams/:team_slug/repos/:owner/:repo", - }, - removeRepoLegacy: { - deprecated: - "octokit.teams.removeRepoLegacy() is deprecated, see https://developer.github.com/v3/teams/#remove-team-repository-legacy", - method: "DELETE", - params: { - owner: { - required: true, - type: "string", - }, - repo: { - required: true, - type: "string", - }, - team_id: { - required: true, - type: "integer", - }, - }, - url: "/teams/:team_id/repos/:owner/:repo", - }, - reviewProject: { - deprecated: - "octokit.teams.reviewProject() has been renamed to octokit.teams.reviewProjectLegacy() (2020-01-16)", - headers: { - accept: "application/vnd.github.inertia-preview+json", - }, - method: "GET", - params: { - project_id: { - required: true, - type: "integer", - }, - team_id: { - required: true, - type: "integer", - }, - }, - url: "/teams/:team_id/projects/:project_id", - }, - reviewProjectInOrg: { - headers: { - accept: "application/vnd.github.inertia-preview+json", - }, - method: "GET", - params: { - org: { - required: true, - type: "string", - }, - project_id: { - required: true, - type: "integer", - }, - team_slug: { - required: true, - type: "string", - }, - }, - url: "/orgs/:org/teams/:team_slug/projects/:project_id", - }, - reviewProjectLegacy: { - deprecated: - "octokit.teams.reviewProjectLegacy() is deprecated, see https://developer.github.com/v3/teams/#review-a-team-project-legacy", - headers: { - accept: "application/vnd.github.inertia-preview+json", - }, - method: "GET", - params: { - project_id: { - required: true, - type: "integer", - }, - team_id: { - required: true, - type: "integer", - }, - }, - url: "/teams/:team_id/projects/:project_id", - }, - update: { - deprecated: - "octokit.teams.update() has been renamed to octokit.teams.updateLegacy() (2020-01-16)", - method: "PATCH", - params: { - description: { - type: "string", - }, - name: { - required: true, - type: "string", - }, - parent_team_id: { - type: "integer", - }, - permission: { - enum: ["pull", "push", "admin"], - type: "string", - }, - privacy: { - enum: ["secret", "closed"], - type: "string", - }, - team_id: { - required: true, - type: "integer", - }, - }, - url: "/teams/:team_id", - }, - updateDiscussion: { - deprecated: - "octokit.teams.updateDiscussion() has been renamed to octokit.teams.updateDiscussionLegacy() (2020-01-16)", - method: "PATCH", - params: { - body: { - type: "string", - }, - discussion_number: { - required: true, - type: "integer", - }, - team_id: { - required: true, - type: "integer", - }, - title: { - type: "string", - }, - }, - url: "/teams/:team_id/discussions/:discussion_number", - }, - updateDiscussionComment: { - deprecated: - "octokit.teams.updateDiscussionComment() has been renamed to octokit.teams.updateDiscussionCommentLegacy() (2020-01-16)", - method: "PATCH", - params: { - body: { - required: true, - type: "string", - }, - comment_number: { - required: true, - type: "integer", - }, - discussion_number: { - required: true, - type: "integer", - }, - team_id: { - required: true, - type: "integer", - }, - }, - url: - "/teams/:team_id/discussions/:discussion_number/comments/:comment_number", - }, - updateDiscussionCommentInOrg: { - method: "PATCH", - params: { - body: { - required: true, - type: "string", - }, - comment_number: { - required: true, - type: "integer", - }, - discussion_number: { - required: true, - type: "integer", - }, - org: { - required: true, - type: "string", - }, - team_slug: { - required: true, - type: "string", - }, - }, - url: - "/orgs/:org/teams/:team_slug/discussions/:discussion_number/comments/:comment_number", - }, - updateDiscussionCommentLegacy: { - deprecated: - "octokit.teams.updateDiscussionCommentLegacy() is deprecated, see https://developer.github.com/v3/teams/discussion_comments/#edit-a-comment-legacy", - method: "PATCH", - params: { - body: { - required: true, - type: "string", - }, - comment_number: { - required: true, - type: "integer", - }, - discussion_number: { - required: true, - type: "integer", - }, - team_id: { - required: true, - type: "integer", - }, - }, - url: - "/teams/:team_id/discussions/:discussion_number/comments/:comment_number", - }, - updateDiscussionInOrg: { - method: "PATCH", - params: { - body: { - type: "string", - }, - discussion_number: { - required: true, - type: "integer", - }, - org: { - required: true, - type: "string", - }, - team_slug: { - required: true, - type: "string", - }, - title: { - type: "string", - }, - }, - url: "/orgs/:org/teams/:team_slug/discussions/:discussion_number", - }, - updateDiscussionLegacy: { - deprecated: - "octokit.teams.updateDiscussionLegacy() is deprecated, see https://developer.github.com/v3/teams/discussions/#edit-a-discussion-legacy", - method: "PATCH", - params: { - body: { - type: "string", - }, - discussion_number: { - required: true, - type: "integer", - }, - team_id: { - required: true, - type: "integer", - }, - title: { - type: "string", - }, - }, - url: "/teams/:team_id/discussions/:discussion_number", - }, - updateInOrg: { - method: "PATCH", - params: { - description: { - type: "string", - }, - name: { - required: true, - type: "string", - }, - org: { - required: true, - type: "string", - }, - parent_team_id: { - type: "integer", - }, - permission: { - enum: ["pull", "push", "admin"], - type: "string", - }, - privacy: { - enum: ["secret", "closed"], - type: "string", - }, - team_slug: { - required: true, - type: "string", - }, - }, - url: "/orgs/:org/teams/:team_slug", - }, - updateLegacy: { - deprecated: - "octokit.teams.updateLegacy() is deprecated, see https://developer.github.com/v3/teams/#edit-team-legacy", - method: "PATCH", - params: { - description: { - type: "string", - }, - name: { - required: true, - type: "string", - }, - parent_team_id: { - type: "integer", - }, - permission: { - enum: ["pull", "push", "admin"], - type: "string", - }, - privacy: { - enum: ["secret", "closed"], - type: "string", - }, - team_id: { - required: true, - type: "integer", - }, - }, - url: "/teams/:team_id", - }, - }, - users: { - addEmails: { - method: "POST", - params: { - emails: { - required: true, - type: "string[]", - }, - }, - url: "/user/emails", - }, - block: { - method: "PUT", - params: { - username: { - required: true, - type: "string", - }, - }, - url: "/user/blocks/:username", - }, - checkBlocked: { - method: "GET", - params: { - username: { - required: true, - type: "string", - }, - }, - url: "/user/blocks/:username", - }, - checkFollowing: { - method: "GET", - params: { - username: { - required: true, - type: "string", - }, - }, - url: "/user/following/:username", - }, - checkFollowingForUser: { - method: "GET", - params: { - target_user: { - required: true, - type: "string", - }, - username: { - required: true, - type: "string", - }, - }, - url: "/users/:username/following/:target_user", - }, - createGpgKey: { - method: "POST", - params: { - armored_public_key: { - type: "string", - }, - }, - url: "/user/gpg_keys", - }, - createPublicKey: { - method: "POST", - params: { - key: { - type: "string", - }, - title: { - type: "string", - }, - }, - url: "/user/keys", - }, - deleteEmails: { - method: "DELETE", - params: { - emails: { - required: true, - type: "string[]", - }, - }, - url: "/user/emails", - }, - deleteGpgKey: { - method: "DELETE", - params: { - gpg_key_id: { - required: true, - type: "integer", - }, - }, - url: "/user/gpg_keys/:gpg_key_id", - }, - deletePublicKey: { - method: "DELETE", - params: { - key_id: { - required: true, - type: "integer", - }, - }, - url: "/user/keys/:key_id", - }, - follow: { - method: "PUT", - params: { - username: { - required: true, - type: "string", - }, - }, - url: "/user/following/:username", - }, - getAuthenticated: { - method: "GET", - params: {}, - url: "/user", - }, - getByUsername: { - method: "GET", - params: { - username: { - required: true, - type: "string", - }, - }, - url: "/users/:username", - }, - getContextForUser: { - method: "GET", - params: { - subject_id: { - type: "string", - }, - subject_type: { - enum: ["organization", "repository", "issue", "pull_request"], - type: "string", - }, - username: { - required: true, - type: "string", - }, - }, - url: "/users/:username/hovercard", - }, - getGpgKey: { - method: "GET", - params: { - gpg_key_id: { - required: true, - type: "integer", - }, - }, - url: "/user/gpg_keys/:gpg_key_id", - }, - getPublicKey: { - method: "GET", - params: { - key_id: { - required: true, - type: "integer", - }, - }, - url: "/user/keys/:key_id", - }, - list: { - method: "GET", - params: { - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - since: { - type: "string", - }, - }, - url: "/users", - }, - listBlocked: { - method: "GET", - params: {}, - url: "/user/blocks", - }, - listEmails: { - method: "GET", - params: { - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - }, - url: "/user/emails", - }, - listFollowersForAuthenticatedUser: { - method: "GET", - params: { - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - }, - url: "/user/followers", - }, - listFollowersForUser: { - method: "GET", - params: { - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - username: { - required: true, - type: "string", - }, - }, - url: "/users/:username/followers", - }, - listFollowingForAuthenticatedUser: { - method: "GET", - params: { - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - }, - url: "/user/following", - }, - listFollowingForUser: { - method: "GET", - params: { - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - username: { - required: true, - type: "string", - }, - }, - url: "/users/:username/following", - }, - listGpgKeys: { - method: "GET", - params: { - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - }, - url: "/user/gpg_keys", - }, - listGpgKeysForUser: { - method: "GET", - params: { - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - username: { - required: true, - type: "string", - }, - }, - url: "/users/:username/gpg_keys", - }, - listPublicEmails: { - method: "GET", - params: { - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - }, - url: "/user/public_emails", - }, - listPublicKeys: { - method: "GET", - params: { - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - }, - url: "/user/keys", - }, - listPublicKeysForUser: { - method: "GET", - params: { - page: { - type: "integer", - }, - per_page: { - type: "integer", - }, - username: { - required: true, - type: "string", - }, - }, - url: "/users/:username/keys", - }, - togglePrimaryEmailVisibility: { - method: "PATCH", - params: { - email: { - required: true, - type: "string", - }, - visibility: { - required: true, - type: "string", - }, - }, - url: "/user/email/visibility", - }, - unblock: { - method: "DELETE", - params: { - username: { - required: true, - type: "string", - }, - }, - url: "/user/blocks/:username", - }, - unfollow: { - method: "DELETE", - params: { - username: { - required: true, - type: "string", - }, - }, - url: "/user/following/:username", - }, - updateAuthenticated: { - method: "PATCH", - params: { - bio: { - type: "string", - }, - blog: { - type: "string", - }, - company: { - type: "string", - }, - email: { - type: "string", - }, - hireable: { - type: "boolean", - }, - location: { - type: "string", - }, - name: { - type: "string", - }, - }, - url: "/user", - }, - }, - }; - - const VERSION = "2.4.0"; - - function registerEndpoints(octokit, routes) { - Object.keys(routes).forEach((namespaceName) => { - if (!octokit[namespaceName]) { - octokit[namespaceName] = {}; - } - - Object.keys(routes[namespaceName]).forEach((apiName) => { - const apiOptions = routes[namespaceName][apiName]; - const endpointDefaults = ["method", "url", "headers"].reduce( - (map, key) => { - if (typeof apiOptions[key] !== "undefined") { - map[key] = apiOptions[key]; - } - - return map; - }, - {} - ); - endpointDefaults.request = { - validate: apiOptions.params, - }; - let request = octokit.request.defaults(endpointDefaults); // patch request & endpoint methods to support deprecated parameters. - // Not the most elegant solution, but we don’t want to move deprecation - // logic into octokit/endpoint.js as it’s out of scope - - const hasDeprecatedParam = Object.keys( - apiOptions.params || {} - ).find((key) => apiOptions.params[key].deprecated); - - if (hasDeprecatedParam) { - const patch = patchForDeprecation.bind(null, octokit, apiOptions); - request = patch( - octokit.request.defaults(endpointDefaults), - `.${namespaceName}.${apiName}()` - ); - request.endpoint = patch( - request.endpoint, - `.${namespaceName}.${apiName}.endpoint()` - ); - request.endpoint.merge = patch( - request.endpoint.merge, - `.${namespaceName}.${apiName}.endpoint.merge()` - ); - } - - if (apiOptions.deprecated) { - octokit[namespaceName][apiName] = Object.assign( - function deprecatedEndpointMethod() { - octokit.log.warn( - new deprecation.Deprecation( - `[@octokit/rest] ${apiOptions.deprecated}` - ) - ); - octokit[namespaceName][apiName] = request; - return request.apply(null, arguments); - }, - request - ); - return; - } - - octokit[namespaceName][apiName] = request; - }); - }); - } - - function patchForDeprecation(octokit, apiOptions, method, methodName) { - const patchedMethod = (options) => { - options = Object.assign({}, options); - Object.keys(options).forEach((key) => { - if (apiOptions.params[key] && apiOptions.params[key].deprecated) { - const aliasKey = apiOptions.params[key].alias; - octokit.log.warn( - new deprecation.Deprecation( - `[@octokit/rest] "${key}" parameter is deprecated for "${methodName}". Use "${aliasKey}" instead` - ) - ); - - if (!(aliasKey in options)) { - options[aliasKey] = options[key]; - } - - delete options[key]; - } - }); - return method(options); - }; - - Object.keys(method).forEach((key) => { - patchedMethod[key] = method[key]; - }); - return patchedMethod; - } - - /** - * This plugin is a 1:1 copy of internal @octokit/rest plugins. The primary - * goal is to rebuild @octokit/rest on top of @octokit/core. Once that is - * done, we will remove the registerEndpoints methods and return the methods - * directly as with the other plugins. At that point we will also remove the - * legacy workarounds and deprecations. - * - * See the plan at - * https://github.com/octokit/plugin-rest-endpoint-methods.js/pull/1 - */ - - function restEndpointMethods(octokit) { - // @ts-ignore - octokit.registerEndpoints = registerEndpoints.bind(null, octokit); - registerEndpoints(octokit, endpointsByScope); // Aliasing scopes for backward compatibility - // See https://github.com/octokit/rest.js/pull/1134 - - [ - ["gitdata", "git"], - ["authorization", "oauthAuthorizations"], - ["pullRequests", "pulls"], - ].forEach(([deprecatedScope, scope]) => { - Object.defineProperty(octokit, deprecatedScope, { - get() { - octokit.log.warn( - // @ts-ignore - new deprecation.Deprecation( - `[@octokit/plugin-rest-endpoint-methods] "octokit.${deprecatedScope}.*" methods are deprecated, use "octokit.${scope}.*" instead` - ) - ); // @ts-ignore - - return octokit[scope]; - }, - }); - }); - return {}; - } - restEndpointMethods.VERSION = VERSION; - - exports.restEndpointMethods = restEndpointMethods; - //# sourceMappingURL=index.js.map - - /***/ - }, - - /***/ 10537: /***/ ( - __unused_webpack_module, - exports, - __nccwpck_require__ - ) => { - "use strict"; - - Object.defineProperty(exports, "__esModule", { value: true }); - - function _interopDefault(ex) { - return ex && typeof ex === "object" && "default" in ex - ? ex["default"] - : ex; - } - - var deprecation = __nccwpck_require__(58932); - var once = _interopDefault(__nccwpck_require__(1223)); - - const logOnce = once((deprecation) => console.warn(deprecation)); - /** - * Error with extra properties to help with debugging - */ - - class RequestError extends Error { - constructor(message, statusCode, options) { - super(message); // Maintains proper stack trace (only available on V8) - - /* istanbul ignore next */ - - if (Error.captureStackTrace) { - Error.captureStackTrace(this, this.constructor); - } - - this.name = "HttpError"; - this.status = statusCode; - Object.defineProperty(this, "code", { - get() { - logOnce( - new deprecation.Deprecation( - "[@octokit/request-error] `error.code` is deprecated, use `error.status`." - ) - ); - return statusCode; - }, - }); - this.headers = options.headers || {}; // redact request credentials without mutating original request options - - const requestCopy = Object.assign({}, options.request); - - if (options.request.headers.authorization) { - requestCopy.headers = Object.assign({}, options.request.headers, { - authorization: options.request.headers.authorization.replace( - / .*$/, - " [REDACTED]" - ), - }); - } - - requestCopy.url = requestCopy.url // client_id & client_secret can be passed as URL query parameters to increase rate limit - // see https://developer.github.com/v3/#increasing-the-unauthenticated-rate-limit-for-oauth-applications - .replace(/\bclient_secret=\w+/g, "client_secret=[REDACTED]") // OAuth tokens can be passed as URL query parameters, although it is not recommended - // see https://developer.github.com/v3/#oauth2-token-sent-in-a-header - .replace(/\baccess_token=\w+/g, "access_token=[REDACTED]"); - this.request = requestCopy; - } - } - - exports.RequestError = RequestError; - //# sourceMappingURL=index.js.map - - /***/ - }, - - /***/ 36234: /***/ ( - __unused_webpack_module, - exports, - __nccwpck_require__ - ) => { - "use strict"; - - Object.defineProperty(exports, "__esModule", { value: true }); - - function _interopDefault(ex) { - return ex && typeof ex === "object" && "default" in ex - ? ex["default"] - : ex; - } - - var endpoint = __nccwpck_require__(59440); - var universalUserAgent = __nccwpck_require__(41441); - var isPlainObject = _interopDefault(__nccwpck_require__(48840)); - var nodeFetch = _interopDefault(__nccwpck_require__(80467)); - var requestError = __nccwpck_require__(10537); - - const VERSION = "5.3.4"; - - function getBufferResponse(response) { - return response.arrayBuffer(); - } - - function fetchWrapper(requestOptions) { - if ( - isPlainObject(requestOptions.body) || - Array.isArray(requestOptions.body) - ) { - requestOptions.body = JSON.stringify(requestOptions.body); - } - - let headers = {}; - let status; - let url; - const fetch = - (requestOptions.request && requestOptions.request.fetch) || nodeFetch; - return fetch( - requestOptions.url, - Object.assign( - { - method: requestOptions.method, - body: requestOptions.body, - headers: requestOptions.headers, - redirect: requestOptions.redirect, - }, - requestOptions.request - ) - ) - .then((response) => { - url = response.url; - status = response.status; - - for (const keyAndValue of response.headers) { - headers[keyAndValue[0]] = keyAndValue[1]; - } - - if (status === 204 || status === 205) { - return; - } // GitHub API returns 200 for HEAD requests - - if (requestOptions.method === "HEAD") { - if (status < 400) { - return; - } - - throw new requestError.RequestError(response.statusText, status, { - headers, - request: requestOptions, - }); - } - - if (status === 304) { - throw new requestError.RequestError("Not modified", status, { - headers, - request: requestOptions, - }); - } - - if (status >= 400) { - return response.text().then((message) => { - const error = new requestError.RequestError(message, status, { - headers, - request: requestOptions, - }); - - try { - let responseBody = JSON.parse(error.message); - Object.assign(error, responseBody); - let errors = responseBody.errors; // Assumption `errors` would always be in Array format - - error.message = - error.message + - ": " + - errors.map(JSON.stringify).join(", "); - } catch (e) { - // ignore, see octokit/rest.js#684 - } - - throw error; - }); - } - - const contentType = response.headers.get("content-type"); - - if (/application\/json/.test(contentType)) { - return response.json(); - } - - if (!contentType || /^text\/|charset=utf-8$/.test(contentType)) { - return response.text(); - } - - return getBufferResponse(response); - }) - .then((data) => { - return { - status, - url, - headers, - data, - }; - }) - .catch((error) => { - if (error instanceof requestError.RequestError) { - throw error; - } - - throw new requestError.RequestError(error.message, 500, { - headers, - request: requestOptions, - }); - }); - } - - function withDefaults(oldEndpoint, newDefaults) { - const endpoint = oldEndpoint.defaults(newDefaults); - - const newApi = function (route, parameters) { - const endpointOptions = endpoint.merge(route, parameters); - - if (!endpointOptions.request || !endpointOptions.request.hook) { - return fetchWrapper(endpoint.parse(endpointOptions)); - } - - const request = (route, parameters) => { - return fetchWrapper( - endpoint.parse(endpoint.merge(route, parameters)) - ); - }; - - Object.assign(request, { - endpoint, - defaults: withDefaults.bind(null, endpoint), - }); - return endpointOptions.request.hook(request, endpointOptions); - }; - - return Object.assign(newApi, { - endpoint, - defaults: withDefaults.bind(null, endpoint), - }); - } - - const request = withDefaults(endpoint.endpoint, { - headers: { - "user-agent": `octokit-request.js/${VERSION} ${universalUserAgent.getUserAgent()}`, - }, - }); - - exports.request = request; - //# sourceMappingURL=index.js.map - - /***/ - }, - - /***/ 41441: /***/ ( - __unused_webpack_module, - exports, - __nccwpck_require__ - ) => { - "use strict"; - - Object.defineProperty(exports, "__esModule", { value: true }); - - function _interopDefault(ex) { - return ex && typeof ex === "object" && "default" in ex - ? ex["default"] - : ex; - } - - var osName = _interopDefault(__nccwpck_require__(54824)); - - function getUserAgent() { - try { - return `Node.js/${process.version.substr(1)} (${osName()}; ${ - process.arch - })`; - } catch (error) { - if (/wmic os get Caption/.test(error.message)) { - return "Windows "; - } - - return ""; - } - } - - exports.getUserAgent = getUserAgent; - //# sourceMappingURL=index.js.map - - /***/ - }, - - /***/ 29351: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - const { requestLog } = __nccwpck_require__(68883); - const { restEndpointMethods } = __nccwpck_require__(83044); - - const Core = __nccwpck_require__(29833); - - const CORE_PLUGINS = [ - __nccwpck_require__(64555), - __nccwpck_require__(33691), // deprecated: remove in v17 - requestLog, - __nccwpck_require__(18579), - restEndpointMethods, - __nccwpck_require__(42657), - - __nccwpck_require__(82072), // deprecated: remove in v17 - ]; - - const OctokitRest = Core.plugin(CORE_PLUGINS); - - function DeprecatedOctokit(options) { - const warn = - options && options.log && options.log.warn - ? options.log.warn - : console.warn; - warn( - '[@octokit/rest] `const Octokit = require("@octokit/rest")` is deprecated. Use `const { Octokit } = require("@octokit/rest")` instead' - ); - return new OctokitRest(options); - } - - const Octokit = Object.assign(DeprecatedOctokit, { - Octokit: OctokitRest, - }); - - Object.keys(OctokitRest).forEach((key) => { - /* istanbul ignore else */ - if (OctokitRest.hasOwnProperty(key)) { - Octokit[key] = OctokitRest[key]; - } - }); - - module.exports = Octokit; - - /***/ - }, - - /***/ 30823: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - module.exports = Octokit; - - const { request } = __nccwpck_require__(36234); - const Hook = __nccwpck_require__(83682); - - const parseClientOptions = __nccwpck_require__(64613); - - function Octokit(plugins, options) { - options = options || {}; - const hook = new Hook.Collection(); - const log = Object.assign( - { - debug: () => {}, - info: () => {}, - warn: console.warn, - error: console.error, - }, - options && options.log - ); - const api = { - hook, - log, - request: request.defaults(parseClientOptions(options, log, hook)), - }; - - plugins.forEach((pluginFunction) => pluginFunction(api, options)); - - return api; - } - - /***/ - }, - - /***/ 29833: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - const factory = __nccwpck_require__(35320); - - module.exports = factory(); - - /***/ - }, - - /***/ 35320: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - module.exports = factory; - - const Octokit = __nccwpck_require__(30823); - const registerPlugin = __nccwpck_require__(77826); - - function factory(plugins) { - const Api = Octokit.bind(null, plugins || []); - Api.plugin = registerPlugin.bind(null, plugins || []); - return Api; - } - - /***/ - }, - - /***/ 64613: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - module.exports = parseOptions; - - const { Deprecation } = __nccwpck_require__(58932); - const { getUserAgent } = __nccwpck_require__(45030); - const once = __nccwpck_require__(1223); - - const pkg = __nccwpck_require__(51322); - - const deprecateOptionsTimeout = once((log, deprecation) => - log.warn(deprecation) - ); - const deprecateOptionsAgent = once((log, deprecation) => - log.warn(deprecation) - ); - const deprecateOptionsHeaders = once((log, deprecation) => - log.warn(deprecation) - ); - - function parseOptions(options, log, hook) { - if (options.headers) { - options.headers = Object.keys(options.headers).reduce( - (newObj, key) => { - newObj[key.toLowerCase()] = options.headers[key]; - return newObj; - }, - {} - ); - } - - const clientDefaults = { - headers: options.headers || {}, - request: options.request || {}, - mediaType: { - previews: [], - format: "", - }, - }; - - if (options.baseUrl) { - clientDefaults.baseUrl = options.baseUrl; - } - - if (options.userAgent) { - clientDefaults.headers["user-agent"] = options.userAgent; - } - - if (options.previews) { - clientDefaults.mediaType.previews = options.previews; - } - - if (options.timeZone) { - clientDefaults.headers["time-zone"] = options.timeZone; - } - - if (options.timeout) { - deprecateOptionsTimeout( - log, - new Deprecation( - "[@octokit/rest] new Octokit({timeout}) is deprecated. Use {request: {timeout}} instead. See https://github.com/octokit/request.js#request" - ) - ); - clientDefaults.request.timeout = options.timeout; - } - - if (options.agent) { - deprecateOptionsAgent( - log, - new Deprecation( - "[@octokit/rest] new Octokit({agent}) is deprecated. Use {request: {agent}} instead. See https://github.com/octokit/request.js#request" - ) - ); - clientDefaults.request.agent = options.agent; - } - - if (options.headers) { - deprecateOptionsHeaders( - log, - new Deprecation( - "[@octokit/rest] new Octokit({headers}) is deprecated. Use {userAgent, previews} instead. See https://github.com/octokit/request.js#request" - ) - ); - } - - const userAgentOption = clientDefaults.headers["user-agent"]; - const defaultUserAgent = `octokit.js/${pkg.version} ${getUserAgent()}`; - - clientDefaults.headers["user-agent"] = [ - userAgentOption, - defaultUserAgent, - ] - .filter(Boolean) - .join(" "); - - clientDefaults.request.hook = hook.bind(null, "request"); - - return clientDefaults; - } - - /***/ - }, - - /***/ 77826: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - module.exports = registerPlugin; - - const factory = __nccwpck_require__(35320); - - function registerPlugin(plugins, pluginFunction) { - return factory( - plugins.includes(pluginFunction) - ? plugins - : plugins.concat(pluginFunction) - ); - } - - /***/ - }, - - /***/ 96239: /***/ ( - __unused_webpack_module, - exports, - __nccwpck_require__ - ) => { - "use strict"; - - Object.defineProperty(exports, "__esModule", { value: true }); - - function _interopDefault(ex) { - return ex && typeof ex === "object" && "default" in ex - ? ex["default"] - : ex; - } - - var deprecation = __nccwpck_require__(58932); - var once = _interopDefault(__nccwpck_require__(1223)); - - const logOnce = once((deprecation) => console.warn(deprecation)); - /** - * Error with extra properties to help with debugging - */ - - class RequestError extends Error { - constructor(message, statusCode, options) { - super(message); // Maintains proper stack trace (only available on V8) - - /* istanbul ignore next */ - - if (Error.captureStackTrace) { - Error.captureStackTrace(this, this.constructor); - } - - this.name = "HttpError"; - this.status = statusCode; - Object.defineProperty(this, "code", { - get() { - logOnce( - new deprecation.Deprecation( - "[@octokit/request-error] `error.code` is deprecated, use `error.status`." - ) - ); - return statusCode; - }, - }); - this.headers = options.headers || {}; // redact request credentials without mutating original request options - - const requestCopy = Object.assign({}, options.request); - - if (options.request.headers.authorization) { - requestCopy.headers = Object.assign({}, options.request.headers, { - authorization: options.request.headers.authorization.replace( - / .*$/, - " [REDACTED]" - ), - }); - } - - requestCopy.url = requestCopy.url // client_id & client_secret can be passed as URL query parameters to increase rate limit - // see https://developer.github.com/v3/#increasing-the-unauthenticated-rate-limit-for-oauth-applications - .replace(/\bclient_secret=\w+/g, "client_secret=[REDACTED]") // OAuth tokens can be passed as URL query parameters, although it is not recommended - // see https://developer.github.com/v3/#oauth2-token-sent-in-a-header - .replace(/\baccess_token=\w+/g, "access_token=[REDACTED]"); - this.request = requestCopy; - } - } - - exports.RequestError = RequestError; - //# sourceMappingURL=index.js.map - - /***/ - }, - - /***/ 795: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - module.exports = authenticate; - - const { Deprecation } = __nccwpck_require__(58932); - const once = __nccwpck_require__(1223); - - const deprecateAuthenticate = once((log, deprecation) => - log.warn(deprecation) - ); - - function authenticate(state, options) { - deprecateAuthenticate( - state.octokit.log, - new Deprecation( - '[@octokit/rest] octokit.authenticate() is deprecated. Use "auth" constructor option instead.' - ) - ); - - if (!options) { - state.auth = false; - return; - } - - switch (options.type) { - case "basic": - if (!options.username || !options.password) { - throw new Error( - "Basic authentication requires both a username and password to be set" - ); - } - break; - - case "oauth": - if (!options.token && !(options.key && options.secret)) { - throw new Error( - "OAuth2 authentication requires a token or key & secret to be set" - ); - } - break; - - case "token": - case "app": - if (!options.token) { - throw new Error( - "Token authentication requires a token to be set" - ); - } - break; - - default: - throw new Error( - "Invalid authentication type, must be 'basic', 'oauth', 'token' or 'app'" - ); - } - - state.auth = options; - } - - /***/ - }, - - /***/ 47578: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - module.exports = authenticationBeforeRequest; - - const btoa = __nccwpck_require__(72358); - const uniq = __nccwpck_require__(78216); - - function authenticationBeforeRequest(state, options) { - if (!state.auth.type) { - return; - } - - if (state.auth.type === "basic") { - const hash = btoa(`${state.auth.username}:${state.auth.password}`); - options.headers.authorization = `Basic ${hash}`; - return; - } - - if (state.auth.type === "token") { - options.headers.authorization = `token ${state.auth.token}`; - return; - } - - if (state.auth.type === "app") { - options.headers.authorization = `Bearer ${state.auth.token}`; - const acceptHeaders = options.headers.accept - .split(",") - .concat("application/vnd.github.machine-man-preview+json"); - options.headers.accept = uniq(acceptHeaders) - .filter(Boolean) - .join(","); - return; - } - - options.url += options.url.indexOf("?") === -1 ? "?" : "&"; - - if (state.auth.token) { - options.url += `access_token=${encodeURIComponent(state.auth.token)}`; - return; - } - - const key = encodeURIComponent(state.auth.key); - const secret = encodeURIComponent(state.auth.secret); - options.url += `client_id=${key}&client_secret=${secret}`; - } - - /***/ - }, - - /***/ 33691: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - module.exports = authenticationPlugin; - - const { Deprecation } = __nccwpck_require__(58932); - const once = __nccwpck_require__(1223); - - const deprecateAuthenticate = once((log, deprecation) => - log.warn(deprecation) - ); - - const authenticate = __nccwpck_require__(795); - const beforeRequest = __nccwpck_require__(47578); - const requestError = __nccwpck_require__(54275); - - function authenticationPlugin(octokit, options) { - if (options.auth) { - octokit.authenticate = () => { - deprecateAuthenticate( - octokit.log, - new Deprecation( - '[@octokit/rest] octokit.authenticate() is deprecated and has no effect when "auth" option is set on Octokit constructor' - ) - ); - }; - return; - } - const state = { - octokit, - auth: false, - }; - octokit.authenticate = authenticate.bind(null, state); - octokit.hook.before("request", beforeRequest.bind(null, state)); - octokit.hook.error("request", requestError.bind(null, state)); - } - - /***/ - }, - - /***/ 54275: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - module.exports = authenticationRequestError; - - const { RequestError } = __nccwpck_require__(96239); - - function authenticationRequestError(state, error, options) { - /* istanbul ignore next */ - if (!error.headers) throw error; - - const otpRequired = /required/.test( - error.headers["x-github-otp"] || "" - ); - // handle "2FA required" error only - if (error.status !== 401 || !otpRequired) { - throw error; - } - - if ( - error.status === 401 && - otpRequired && - error.request && - error.request.headers["x-github-otp"] - ) { - throw new RequestError( - "Invalid one-time password for two-factor authentication", - 401, - { - headers: error.headers, - request: options, - } - ); - } - - if (typeof state.auth.on2fa !== "function") { - throw new RequestError( - "2FA required, but options.on2fa is not a function. See https://github.com/octokit/rest.js#authentication", - 401, - { - headers: error.headers, - request: options, - } - ); - } - - return Promise.resolve() - .then(() => { - return state.auth.on2fa(); - }) - .then((oneTimePassword) => { - const newOptions = Object.assign(options, { - headers: Object.assign( - { "x-github-otp": oneTimePassword }, - options.headers - ), - }); - return state.octokit.request(newOptions); - }); - } - - /***/ - }, - - /***/ 99733: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - module.exports = authenticationBeforeRequest; - - const btoa = __nccwpck_require__(72358); - - const withAuthorizationPrefix = __nccwpck_require__(19603); - - function authenticationBeforeRequest(state, options) { - if (typeof state.auth === "string") { - options.headers.authorization = withAuthorizationPrefix(state.auth); - return; - } - - if (state.auth.username) { - const hash = btoa(`${state.auth.username}:${state.auth.password}`); - options.headers.authorization = `Basic ${hash}`; - if (state.otp) { - options.headers["x-github-otp"] = state.otp; - } - return; - } - - if (state.auth.clientId) { - // There is a special case for OAuth applications, when `clientId` and `clientSecret` is passed as - // Basic Authorization instead of query parameters. The only routes where that applies share the same - // URL though: `/applications/:client_id/tokens/:access_token`. - // - // 1. [Check an authorization](https://developer.github.com/v3/oauth_authorizations/#check-an-authorization) - // 2. [Reset an authorization](https://developer.github.com/v3/oauth_authorizations/#reset-an-authorization) - // 3. [Revoke an authorization for an application](https://developer.github.com/v3/oauth_authorizations/#revoke-an-authorization-for-an-application) - // - // We identify by checking the URL. It must merge both "/applications/:client_id/tokens/:access_token" - // as well as "/applications/123/tokens/token456" - if ( - /\/applications\/:?[\w_]+\/tokens\/:?[\w_]+($|\?)/.test(options.url) - ) { - const hash = btoa( - `${state.auth.clientId}:${state.auth.clientSecret}` - ); - options.headers.authorization = `Basic ${hash}`; - return; - } - - options.url += options.url.indexOf("?") === -1 ? "?" : "&"; - options.url += `client_id=${state.auth.clientId}&client_secret=${state.auth.clientSecret}`; - return; - } - - return Promise.resolve() - - .then(() => { - return state.auth(); - }) - - .then((authorization) => { - options.headers.authorization = withAuthorizationPrefix( - authorization - ); - }); - } - - /***/ - }, - - /***/ 64555: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - module.exports = authenticationPlugin; - - const { createTokenAuth } = __nccwpck_require__(40334); - const { Deprecation } = __nccwpck_require__(58932); - const once = __nccwpck_require__(1223); - - const beforeRequest = __nccwpck_require__(99733); - const requestError = __nccwpck_require__(3217); - const validate = __nccwpck_require__(18997); - const withAuthorizationPrefix = __nccwpck_require__(19603); - - const deprecateAuthBasic = once((log, deprecation) => - log.warn(deprecation) - ); - const deprecateAuthObject = once((log, deprecation) => - log.warn(deprecation) - ); - - function authenticationPlugin(octokit, options) { - // If `options.authStrategy` is set then use it and pass in `options.auth` - if (options.authStrategy) { - const auth = options.authStrategy(options.auth); - octokit.hook.wrap("request", auth.hook); - octokit.auth = auth; - return; - } - - // If neither `options.authStrategy` nor `options.auth` are set, the `octokit` instance - // is unauthenticated. The `octokit.auth()` method is a no-op and no request hook is registred. - if (!options.auth) { - octokit.auth = () => - Promise.resolve({ - type: "unauthenticated", - }); - return; - } - - const isBasicAuthString = - typeof options.auth === "string" && - /^basic/.test(withAuthorizationPrefix(options.auth)); - - // If only `options.auth` is set to a string, use the default token authentication strategy. - if (typeof options.auth === "string" && !isBasicAuthString) { - const auth = createTokenAuth(options.auth); - octokit.hook.wrap("request", auth.hook); - octokit.auth = auth; - return; - } - - // Otherwise log a deprecation message - const [deprecationMethod, deprecationMessapge] = isBasicAuthString - ? [ - deprecateAuthBasic, - 'Setting the "new Octokit({ auth })" option to a Basic Auth string is deprecated. Use https://github.com/octokit/auth-basic.js instead. See (https://octokit.github.io/rest.js/#authentication)', - ] - : [ - deprecateAuthObject, - 'Setting the "new Octokit({ auth })" option to an object without also setting the "authStrategy" option is deprecated and will be removed in v17. See (https://octokit.github.io/rest.js/#authentication)', - ]; - deprecationMethod( - octokit.log, - new Deprecation("[@octokit/rest] " + deprecationMessapge) - ); - - octokit.auth = () => - Promise.resolve({ - type: "deprecated", - message: deprecationMessapge, - }); - - validate(options.auth); - - const state = { - octokit, - auth: options.auth, - }; - - octokit.hook.before("request", beforeRequest.bind(null, state)); - octokit.hook.error("request", requestError.bind(null, state)); - } - - /***/ - }, - - /***/ 3217: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - module.exports = authenticationRequestError; - - const { RequestError } = __nccwpck_require__(96239); - - function authenticationRequestError(state, error, options) { - if (!error.headers) throw error; - - const otpRequired = /required/.test( - error.headers["x-github-otp"] || "" - ); - // handle "2FA required" error only - if (error.status !== 401 || !otpRequired) { - throw error; - } - - if ( - error.status === 401 && - otpRequired && - error.request && - error.request.headers["x-github-otp"] - ) { - if (state.otp) { - delete state.otp; // no longer valid, request again - } else { - throw new RequestError( - "Invalid one-time password for two-factor authentication", - 401, - { - headers: error.headers, - request: options, - } - ); - } - } - - if (typeof state.auth.on2fa !== "function") { - throw new RequestError( - "2FA required, but options.on2fa is not a function. See https://github.com/octokit/rest.js#authentication", - 401, - { - headers: error.headers, - request: options, - } - ); - } - - return Promise.resolve() - .then(() => { - return state.auth.on2fa(); - }) - .then((oneTimePassword) => { - const newOptions = Object.assign(options, { - headers: Object.assign(options.headers, { - "x-github-otp": oneTimePassword, - }), - }); - return state.octokit.request(newOptions).then((response) => { - // If OTP still valid, then persist it for following requests - state.otp = oneTimePassword; - return response; - }); - }); - } - - /***/ - }, - - /***/ 18997: /***/ (module) => { - module.exports = validateAuth; - - function validateAuth(auth) { - if (typeof auth === "string") { - return; - } - - if (typeof auth === "function") { - return; - } - - if (auth.username && auth.password) { - return; - } - - if (auth.clientId && auth.clientSecret) { - return; - } - - throw new Error(`Invalid "auth" option: ${JSON.stringify(auth)}`); - } - - /***/ - }, - - /***/ 19603: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - module.exports = withAuthorizationPrefix; - - const atob = __nccwpck_require__(55224); - - const REGEX_IS_BASIC_AUTH = /^[\w-]+:/; - - function withAuthorizationPrefix(authorization) { - if (/^(basic|bearer|token) /i.test(authorization)) { - return authorization; - } - - try { - if (REGEX_IS_BASIC_AUTH.test(atob(authorization))) { - return `basic ${authorization}`; - } - } catch (error) {} - - if (authorization.split(/\./).length === 3) { - return `bearer ${authorization}`; - } - - return `token ${authorization}`; - } - - /***/ - }, - - /***/ 18579: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - module.exports = paginatePlugin; - - const { paginateRest } = __nccwpck_require__(64193); - - function paginatePlugin(octokit) { - Object.assign(octokit, paginateRest(octokit)); - } - - /***/ - }, - - /***/ 42657: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - module.exports = octokitValidate; - - const validate = __nccwpck_require__(6132); - - function octokitValidate(octokit) { - octokit.hook.before("request", validate.bind(null, octokit)); - } - - /***/ - }, - - /***/ 6132: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - "use strict"; - - module.exports = validate; - - const { RequestError } = __nccwpck_require__(96239); - const get = __nccwpck_require__(99197); - const set = __nccwpck_require__(51552); - - function validate(octokit, options) { - if (!options.request.validate) { - return; - } - const { validate: params } = options.request; - - Object.keys(params).forEach((parameterName) => { - const parameter = get(params, parameterName); - - const expectedType = parameter.type; - let parentParameterName; - let parentValue; - let parentParamIsPresent = true; - let parentParameterIsArray = false; - - if (/\./.test(parameterName)) { - parentParameterName = parameterName.replace(/\.[^.]+$/, ""); - parentParameterIsArray = parentParameterName.slice(-2) === "[]"; - if (parentParameterIsArray) { - parentParameterName = parentParameterName.slice(0, -2); - } - parentValue = get(options, parentParameterName); - parentParamIsPresent = - parentParameterName === "headers" || - (typeof parentValue === "object" && parentValue !== null); - } - - const values = parentParameterIsArray - ? (get(options, parentParameterName) || []).map( - (value) => value[parameterName.split(/\./).pop()] - ) - : [get(options, parameterName)]; - - values.forEach((value, i) => { - const valueIsPresent = typeof value !== "undefined"; - const valueIsNull = value === null; - const currentParameterName = parentParameterIsArray - ? parameterName.replace(/\[\]/, `[${i}]`) - : parameterName; - - if (!parameter.required && !valueIsPresent) { - return; - } - - // if the parent parameter is of type object but allows null - // then the child parameters can be ignored - if (!parentParamIsPresent) { - return; - } - - if (parameter.allowNull && valueIsNull) { - return; - } - - if (!parameter.allowNull && valueIsNull) { - throw new RequestError( - `'${currentParameterName}' cannot be null`, - 400, - { - request: options, - } - ); - } - - if (parameter.required && !valueIsPresent) { - throw new RequestError( - `Empty value for parameter '${currentParameterName}': ${JSON.stringify( - value - )}`, - 400, - { - request: options, - } - ); - } - - // parse to integer before checking for enum - // so that string "1" will match enum with number 1 - if (expectedType === "integer") { - const unparsedValue = value; - value = parseInt(value, 10); - if (isNaN(value)) { - throw new RequestError( - `Invalid value for parameter '${currentParameterName}': ${JSON.stringify( - unparsedValue - )} is NaN`, - 400, - { - request: options, - } - ); - } - } - - if ( - parameter.enum && - parameter.enum.indexOf(String(value)) === -1 - ) { - throw new RequestError( - `Invalid value for parameter '${currentParameterName}': ${JSON.stringify( - value - )}`, - 400, - { - request: options, - } - ); - } - - if (parameter.validation) { - const regex = new RegExp(parameter.validation); - if (!regex.test(value)) { - throw new RequestError( - `Invalid value for parameter '${currentParameterName}': ${JSON.stringify( - value - )}`, - 400, - { - request: options, - } - ); - } - } - - if (expectedType === "object" && typeof value === "string") { - try { - value = JSON.parse(value); - } catch (exception) { - throw new RequestError( - `JSON parse error of value for parameter '${currentParameterName}': ${JSON.stringify( - value - )}`, - 400, - { - request: options, - } - ); - } - } - - set(options, parameter.mapTo || currentParameterName, value); - }); - }); - - return options; - } - - /***/ - }, - - /***/ 55224: /***/ (module) => { - module.exports = function atob(str) { - return Buffer.from(str, "base64").toString("binary"); - }; - - /***/ - }, - - /***/ 20940: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["accessanalyzer"] = {}; - AWS.AccessAnalyzer = Service.defineService("accessanalyzer", [ - "2019-11-01", - ]); - Object.defineProperty( - apiLoader.services["accessanalyzer"], - "2019-11-01", - { - get: function get() { - var model = __nccwpck_require__(30590); - model.paginators = __nccwpck_require__(63080) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.AccessAnalyzer; - - /***/ - }, - - /***/ 30838: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["acm"] = {}; - AWS.ACM = Service.defineService("acm", ["2015-12-08"]); - Object.defineProperty(apiLoader.services["acm"], "2015-12-08", { - get: function get() { - var model = __nccwpck_require__(34662); - model.paginators = __nccwpck_require__(42680) /* .pagination */.o; - model.waiters = __nccwpck_require__(85678) /* .waiters */.V; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.ACM; - - /***/ - }, - - /***/ 18450: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["acmpca"] = {}; - AWS.ACMPCA = Service.defineService("acmpca", ["2017-08-22"]); - Object.defineProperty(apiLoader.services["acmpca"], "2017-08-22", { - get: function get() { - var model = __nccwpck_require__(33004); - model.paginators = __nccwpck_require__(21209) /* .pagination */.o; - model.waiters = __nccwpck_require__(89217) /* .waiters */.V; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.ACMPCA; - - /***/ - }, - - /***/ 14578: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["alexaforbusiness"] = {}; - AWS.AlexaForBusiness = Service.defineService("alexaforbusiness", [ - "2017-11-09", - ]); - Object.defineProperty( - apiLoader.services["alexaforbusiness"], - "2017-11-09", - { - get: function get() { - var model = __nccwpck_require__(69786); - model.paginators = __nccwpck_require__(21009) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.AlexaForBusiness; - - /***/ - }, - - /***/ 26296: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - module.exports = { - ACM: __nccwpck_require__(30838), - APIGateway: __nccwpck_require__(91759), - ApplicationAutoScaling: __nccwpck_require__(25598), - AppStream: __nccwpck_require__(21730), - AutoScaling: __nccwpck_require__(31652), - Batch: __nccwpck_require__(10000), - Budgets: __nccwpck_require__(43923), - CloudDirectory: __nccwpck_require__(56231), - CloudFormation: __nccwpck_require__(74643), - CloudFront: __nccwpck_require__(48058), - CloudHSM: __nccwpck_require__(59976), - CloudSearch: __nccwpck_require__(72321), - CloudSearchDomain: __nccwpck_require__(64072), - CloudTrail: __nccwpck_require__(65512), - CloudWatch: __nccwpck_require__(6763), - CloudWatchEvents: __nccwpck_require__(38124), - CloudWatchLogs: __nccwpck_require__(96693), - CodeBuild: __nccwpck_require__(60450), - CodeCommit: __nccwpck_require__(71323), - CodeDeploy: __nccwpck_require__(54599), - CodePipeline: __nccwpck_require__(22938), - CognitoIdentity: __nccwpck_require__(58291), - CognitoIdentityServiceProvider: __nccwpck_require__(31379), - CognitoSync: __nccwpck_require__(74770), - ConfigService: __nccwpck_require__(34061), - CUR: __nccwpck_require__(5026), - DataPipeline: __nccwpck_require__(65688), - DeviceFarm: __nccwpck_require__(26272), - DirectConnect: __nccwpck_require__(73783), - DirectoryService: __nccwpck_require__(83908), - Discovery: __nccwpck_require__(81690), - DMS: __nccwpck_require__(69868), - DynamoDB: __nccwpck_require__(14347), - DynamoDBStreams: __nccwpck_require__(88090), - EC2: __nccwpck_require__(7778), - ECR: __nccwpck_require__(15211), - ECS: __nccwpck_require__(16615), - EFS: __nccwpck_require__(34375), - ElastiCache: __nccwpck_require__(81065), - ElasticBeanstalk: __nccwpck_require__(14897), - ELB: __nccwpck_require__(10907), - ELBv2: __nccwpck_require__(44311), - EMR: __nccwpck_require__(50470), - ES: __nccwpck_require__(84462), - ElasticTranscoder: __nccwpck_require__(40745), - Firehose: __nccwpck_require__(92831), - GameLift: __nccwpck_require__(8085), - Glacier: __nccwpck_require__(63249), - Health: __nccwpck_require__(21834), - IAM: __nccwpck_require__(50058), - ImportExport: __nccwpck_require__(6769), - Inspector: __nccwpck_require__(89439), - Iot: __nccwpck_require__(98392), - IotData: __nccwpck_require__(6564), - Kinesis: __nccwpck_require__(49876), - KinesisAnalytics: __nccwpck_require__(90042), - KMS: __nccwpck_require__(56782), - Lambda: __nccwpck_require__(13321), - LexRuntime: __nccwpck_require__(62716), - Lightsail: __nccwpck_require__(22718), - MachineLearning: __nccwpck_require__(82907), - MarketplaceCommerceAnalytics: __nccwpck_require__(4540), - MarketplaceMetering: __nccwpck_require__(39297), - MTurk: __nccwpck_require__(79954), - MobileAnalytics: __nccwpck_require__(66690), - OpsWorks: __nccwpck_require__(75691), - OpsWorksCM: __nccwpck_require__(80388), - Organizations: __nccwpck_require__(52560), - Pinpoint: __nccwpck_require__(18388), - Polly: __nccwpck_require__(97332), - RDS: __nccwpck_require__(71578), - Redshift: __nccwpck_require__(84853), - Rekognition: __nccwpck_require__(65470), - ResourceGroupsTaggingAPI: __nccwpck_require__(7385), - Route53: __nccwpck_require__(44968), - Route53Domains: __nccwpck_require__(51994), - S3: __nccwpck_require__(83256), - S3Control: __nccwpck_require__(99817), - ServiceCatalog: __nccwpck_require__(822), - SES: __nccwpck_require__(46816), - Shield: __nccwpck_require__(20271), - SimpleDB: __nccwpck_require__(10120), - SMS: __nccwpck_require__(57719), - Snowball: __nccwpck_require__(510), - SNS: __nccwpck_require__(28581), - SQS: __nccwpck_require__(63172), - SSM: __nccwpck_require__(83380), - StorageGateway: __nccwpck_require__(89190), - StepFunctions: __nccwpck_require__(8136), - STS: __nccwpck_require__(57513), - Support: __nccwpck_require__(1099), - SWF: __nccwpck_require__(32327), - XRay: __nccwpck_require__(41548), - WAF: __nccwpck_require__(72742), - WAFRegional: __nccwpck_require__(23153), - WorkDocs: __nccwpck_require__(38835), - WorkSpaces: __nccwpck_require__(25513), - CodeStar: __nccwpck_require__(98336), - LexModelBuildingService: __nccwpck_require__(37397), - MarketplaceEntitlementService: __nccwpck_require__(53707), - Athena: __nccwpck_require__(29434), - Greengrass: __nccwpck_require__(20690), - DAX: __nccwpck_require__(71398), - MigrationHub: __nccwpck_require__(14688), - CloudHSMV2: __nccwpck_require__(70889), - Glue: __nccwpck_require__(31658), - Mobile: __nccwpck_require__(39782), - Pricing: __nccwpck_require__(92765), - CostExplorer: __nccwpck_require__(79523), - MediaConvert: __nccwpck_require__(57220), - MediaLive: __nccwpck_require__(7509), - MediaPackage: __nccwpck_require__(91620), - MediaStore: __nccwpck_require__(83748), - MediaStoreData: __nccwpck_require__(98703), - AppSync: __nccwpck_require__(12402), - GuardDuty: __nccwpck_require__(40755), - MQ: __nccwpck_require__(23093), - Comprehend: __nccwpck_require__(62878), - IoTJobsDataPlane: __nccwpck_require__(42332), - KinesisVideoArchivedMedia: __nccwpck_require__(5580), - KinesisVideoMedia: __nccwpck_require__(81308), - KinesisVideo: __nccwpck_require__(89927), - SageMakerRuntime: __nccwpck_require__(85044), - SageMaker: __nccwpck_require__(77657), - Translate: __nccwpck_require__(72544), - ResourceGroups: __nccwpck_require__(58756), - AlexaForBusiness: __nccwpck_require__(14578), - Cloud9: __nccwpck_require__(85473), - ServerlessApplicationRepository: __nccwpck_require__(62402), - ServiceDiscovery: __nccwpck_require__(91569), - WorkMail: __nccwpck_require__(38374), - AutoScalingPlans: __nccwpck_require__(2554), - TranscribeService: __nccwpck_require__(75811), - Connect: __nccwpck_require__(13879), - ACMPCA: __nccwpck_require__(18450), - FMS: __nccwpck_require__(11316), - SecretsManager: __nccwpck_require__(85131), - IoTAnalytics: __nccwpck_require__(67409), - IoT1ClickDevicesService: __nccwpck_require__(39474), - IoT1ClickProjects: __nccwpck_require__(4686), - PI: __nccwpck_require__(15505), - Neptune: __nccwpck_require__(30047), - MediaTailor: __nccwpck_require__(99658), - EKS: __nccwpck_require__(23337), - Macie: __nccwpck_require__(86427), - DLM: __nccwpck_require__(24958), - Signer: __nccwpck_require__(71596), - Chime: __nccwpck_require__(84646), - PinpointEmail: __nccwpck_require__(83060), - RAM: __nccwpck_require__(94394), - Route53Resolver: __nccwpck_require__(25894), - PinpointSMSVoice: __nccwpck_require__(46605), - QuickSight: __nccwpck_require__(29898), - RDSDataService: __nccwpck_require__(30147), - Amplify: __nccwpck_require__(38090), - DataSync: __nccwpck_require__(25308), - RoboMaker: __nccwpck_require__(18068), - Transfer: __nccwpck_require__(51585), - GlobalAccelerator: __nccwpck_require__(19306), - ComprehendMedical: __nccwpck_require__(32349), - KinesisAnalyticsV2: __nccwpck_require__(74631), - MediaConnect: __nccwpck_require__(67639), - FSx: __nccwpck_require__(60642), - SecurityHub: __nccwpck_require__(21550), - AppMesh: __nccwpck_require__(69226), - LicenseManager: __nccwpck_require__(34693), - Kafka: __nccwpck_require__(56775), - ApiGatewayManagementApi: __nccwpck_require__(31762), - ApiGatewayV2: __nccwpck_require__(44987), - DocDB: __nccwpck_require__(55129), - Backup: __nccwpck_require__(82455), - WorkLink: __nccwpck_require__(48579), - Textract: __nccwpck_require__(58523), - ManagedBlockchain: __nccwpck_require__(85143), - MediaPackageVod: __nccwpck_require__(14962), - GroundStation: __nccwpck_require__(80494), - IoTThingsGraph: __nccwpck_require__(58905), - IoTEvents: __nccwpck_require__(88065), - IoTEventsData: __nccwpck_require__(56973), - Personalize: __nccwpck_require__(33696), - PersonalizeEvents: __nccwpck_require__(88170), - PersonalizeRuntime: __nccwpck_require__(66184), - ApplicationInsights: __nccwpck_require__(83972), - ServiceQuotas: __nccwpck_require__(57800), - EC2InstanceConnect: __nccwpck_require__(92209), - EventBridge: __nccwpck_require__(898), - LakeFormation: __nccwpck_require__(6726), - ForecastService: __nccwpck_require__(12942), - ForecastQueryService: __nccwpck_require__(36822), - QLDB: __nccwpck_require__(71266), - QLDBSession: __nccwpck_require__(55423), - WorkMailMessageFlow: __nccwpck_require__(67025), - CodeStarNotifications: __nccwpck_require__(15141), - SavingsPlans: __nccwpck_require__(62825), - SSO: __nccwpck_require__(71096), - SSOOIDC: __nccwpck_require__(49870), - MarketplaceCatalog: __nccwpck_require__(2609), - DataExchange: __nccwpck_require__(11024), - SESV2: __nccwpck_require__(20142), - MigrationHubConfig: __nccwpck_require__(62658), - ConnectParticipant: __nccwpck_require__(94198), - AppConfig: __nccwpck_require__(78606), - IoTSecureTunneling: __nccwpck_require__(98562), - WAFV2: __nccwpck_require__(50353), - ElasticInference: __nccwpck_require__(37708), - Imagebuilder: __nccwpck_require__(57511), - Schemas: __nccwpck_require__(55713), - AccessAnalyzer: __nccwpck_require__(20940), - CodeGuruReviewer: __nccwpck_require__(60070), - CodeGuruProfiler: __nccwpck_require__(65704), - ComputeOptimizer: __nccwpck_require__(64459), - FraudDetector: __nccwpck_require__(99830), - Kendra: __nccwpck_require__(66122), - NetworkManager: __nccwpck_require__(37610), - Outposts: __nccwpck_require__(27551), - AugmentedAIRuntime: __nccwpck_require__(33960), - EBS: __nccwpck_require__(62837), - KinesisVideoSignalingChannels: __nccwpck_require__(12710), - Detective: __nccwpck_require__(60674), - CodeStarconnections: __nccwpck_require__(78270), - Synthetics: __nccwpck_require__(25910), - IoTSiteWise: __nccwpck_require__(89690), - Macie2: __nccwpck_require__(57330), - CodeArtifact: __nccwpck_require__(91983), - Honeycode: __nccwpck_require__(38889), - IVS: __nccwpck_require__(67701), - Braket: __nccwpck_require__(35429), - IdentityStore: __nccwpck_require__(60222), - Appflow: __nccwpck_require__(60844), - RedshiftData: __nccwpck_require__(203), - SSOAdmin: __nccwpck_require__(66644), - TimestreamQuery: __nccwpck_require__(24529), - TimestreamWrite: __nccwpck_require__(1573), - S3Outposts: __nccwpck_require__(90493), - DataBrew: __nccwpck_require__(35846), - ServiceCatalogAppRegistry: __nccwpck_require__(79068), - NetworkFirewall: __nccwpck_require__(84626), - MWAA: __nccwpck_require__(32712), - AmplifyBackend: __nccwpck_require__(2806), - AppIntegrations: __nccwpck_require__(85479), - ConnectContactLens: __nccwpck_require__(41847), - DevOpsGuru: __nccwpck_require__(90673), - ECRPUBLIC: __nccwpck_require__(90244), - LookoutVision: __nccwpck_require__(65046), - SageMakerFeatureStoreRuntime: __nccwpck_require__(67644), - CustomerProfiles: __nccwpck_require__(28379), - AuditManager: __nccwpck_require__(20472), - EMRcontainers: __nccwpck_require__(49984), - HealthLake: __nccwpck_require__(64254), - SagemakerEdge: __nccwpck_require__(38966), - Amp: __nccwpck_require__(96881), - GreengrassV2: __nccwpck_require__(45126), - IotDeviceAdvisor: __nccwpck_require__(97569), - IoTFleetHub: __nccwpck_require__(42513), - IoTWireless: __nccwpck_require__(8226), - Location: __nccwpck_require__(44594), - WellArchitected: __nccwpck_require__(86263), - }; - - /***/ - }, - - /***/ 96881: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["amp"] = {}; - AWS.Amp = Service.defineService("amp", ["2020-08-01"]); - Object.defineProperty(apiLoader.services["amp"], "2020-08-01", { - get: function get() { - var model = __nccwpck_require__(78362); - model.paginators = __nccwpck_require__(75928) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.Amp; - - /***/ - }, - - /***/ 38090: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["amplify"] = {}; - AWS.Amplify = Service.defineService("amplify", ["2017-07-25"]); - Object.defineProperty(apiLoader.services["amplify"], "2017-07-25", { - get: function get() { - var model = __nccwpck_require__(36813); - model.paginators = __nccwpck_require__(53733) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.Amplify; - - /***/ - }, - - /***/ 2806: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["amplifybackend"] = {}; - AWS.AmplifyBackend = Service.defineService("amplifybackend", [ - "2020-08-11", - ]); - Object.defineProperty( - apiLoader.services["amplifybackend"], - "2020-08-11", - { - get: function get() { - var model = __nccwpck_require__(23939); - model.paginators = __nccwpck_require__(27232) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.AmplifyBackend; - - /***/ - }, - - /***/ 91759: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["apigateway"] = {}; - AWS.APIGateway = Service.defineService("apigateway", ["2015-07-09"]); - __nccwpck_require__(4338); - Object.defineProperty(apiLoader.services["apigateway"], "2015-07-09", { - get: function get() { - var model = __nccwpck_require__(59463); - model.paginators = __nccwpck_require__(25878) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.APIGateway; - - /***/ - }, - - /***/ 31762: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["apigatewaymanagementapi"] = {}; - AWS.ApiGatewayManagementApi = Service.defineService( - "apigatewaymanagementapi", - ["2018-11-29"] - ); - Object.defineProperty( - apiLoader.services["apigatewaymanagementapi"], - "2018-11-29", - { - get: function get() { - var model = __nccwpck_require__(57832); - model.paginators = __nccwpck_require__(2787) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.ApiGatewayManagementApi; - - /***/ - }, - - /***/ 44987: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["apigatewayv2"] = {}; - AWS.ApiGatewayV2 = Service.defineService("apigatewayv2", ["2018-11-29"]); - Object.defineProperty(apiLoader.services["apigatewayv2"], "2018-11-29", { - get: function get() { - var model = __nccwpck_require__(59326); - model.paginators = __nccwpck_require__(90171) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.ApiGatewayV2; - - /***/ - }, - - /***/ 78606: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["appconfig"] = {}; - AWS.AppConfig = Service.defineService("appconfig", ["2019-10-09"]); - Object.defineProperty(apiLoader.services["appconfig"], "2019-10-09", { - get: function get() { - var model = __nccwpck_require__(44701); - model.paginators = __nccwpck_require__(41789) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.AppConfig; - - /***/ - }, - - /***/ 60844: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["appflow"] = {}; - AWS.Appflow = Service.defineService("appflow", ["2020-08-23"]); - Object.defineProperty(apiLoader.services["appflow"], "2020-08-23", { - get: function get() { - var model = __nccwpck_require__(32840); - model.paginators = __nccwpck_require__(16916) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.Appflow; - - /***/ - }, - - /***/ 85479: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["appintegrations"] = {}; - AWS.AppIntegrations = Service.defineService("appintegrations", [ - "2020-07-29", - ]); - Object.defineProperty( - apiLoader.services["appintegrations"], - "2020-07-29", - { - get: function get() { - var model = __nccwpck_require__(62033); - model.paginators = __nccwpck_require__(61866) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.AppIntegrations; - - /***/ - }, - - /***/ 25598: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["applicationautoscaling"] = {}; - AWS.ApplicationAutoScaling = Service.defineService( - "applicationautoscaling", - ["2016-02-06"] - ); - Object.defineProperty( - apiLoader.services["applicationautoscaling"], - "2016-02-06", - { - get: function get() { - var model = __nccwpck_require__(47320); - model.paginators = __nccwpck_require__(40322) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.ApplicationAutoScaling; - - /***/ - }, - - /***/ 83972: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["applicationinsights"] = {}; - AWS.ApplicationInsights = Service.defineService("applicationinsights", [ - "2018-11-25", - ]); - Object.defineProperty( - apiLoader.services["applicationinsights"], - "2018-11-25", - { - get: function get() { - var model = __nccwpck_require__(96143); - model.paginators = __nccwpck_require__(22242) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.ApplicationInsights; - - /***/ - }, - - /***/ 69226: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["appmesh"] = {}; - AWS.AppMesh = Service.defineService("appmesh", [ - "2018-10-01", - "2018-10-01*", - "2019-01-25", - ]); - Object.defineProperty(apiLoader.services["appmesh"], "2018-10-01", { - get: function get() { - var model = __nccwpck_require__(64780); - model.paginators = __nccwpck_require__(54936) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - Object.defineProperty(apiLoader.services["appmesh"], "2019-01-25", { - get: function get() { - var model = __nccwpck_require__(78066); - model.paginators = __nccwpck_require__(37698) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.AppMesh; - - /***/ - }, - - /***/ 21730: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["appstream"] = {}; - AWS.AppStream = Service.defineService("appstream", ["2016-12-01"]); - Object.defineProperty(apiLoader.services["appstream"], "2016-12-01", { - get: function get() { - var model = __nccwpck_require__(85538); - model.paginators = __nccwpck_require__(32191) /* .pagination */.o; - model.waiters = __nccwpck_require__(21134) /* .waiters */.V; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.AppStream; - - /***/ - }, - - /***/ 12402: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["appsync"] = {}; - AWS.AppSync = Service.defineService("appsync", ["2017-07-25"]); - Object.defineProperty(apiLoader.services["appsync"], "2017-07-25", { - get: function get() { - var model = __nccwpck_require__(94937); - model.paginators = __nccwpck_require__(50233) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.AppSync; - - /***/ - }, - - /***/ 29434: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["athena"] = {}; - AWS.Athena = Service.defineService("athena", ["2017-05-18"]); - Object.defineProperty(apiLoader.services["athena"], "2017-05-18", { - get: function get() { - var model = __nccwpck_require__(28680); - model.paginators = __nccwpck_require__(44417) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.Athena; - - /***/ - }, - - /***/ 20472: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["auditmanager"] = {}; - AWS.AuditManager = Service.defineService("auditmanager", ["2017-07-25"]); - Object.defineProperty(apiLoader.services["auditmanager"], "2017-07-25", { - get: function get() { - var model = __nccwpck_require__(41672); - model.paginators = __nccwpck_require__(41321) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.AuditManager; - - /***/ - }, - - /***/ 33960: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["augmentedairuntime"] = {}; - AWS.AugmentedAIRuntime = Service.defineService("augmentedairuntime", [ - "2019-11-07", - ]); - Object.defineProperty( - apiLoader.services["augmentedairuntime"], - "2019-11-07", - { - get: function get() { - var model = __nccwpck_require__(57704); - model.paginators = __nccwpck_require__(13201) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.AugmentedAIRuntime; - - /***/ - }, - - /***/ 31652: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["autoscaling"] = {}; - AWS.AutoScaling = Service.defineService("autoscaling", ["2011-01-01"]); - Object.defineProperty(apiLoader.services["autoscaling"], "2011-01-01", { - get: function get() { - var model = __nccwpck_require__(55394); - model.paginators = __nccwpck_require__(81436) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.AutoScaling; - - /***/ - }, - - /***/ 2554: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["autoscalingplans"] = {}; - AWS.AutoScalingPlans = Service.defineService("autoscalingplans", [ - "2018-01-06", - ]); - Object.defineProperty( - apiLoader.services["autoscalingplans"], - "2018-01-06", - { - get: function get() { - var model = __nccwpck_require__(53216); - model.paginators = __nccwpck_require__(64985) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.AutoScalingPlans; - - /***/ - }, - - /***/ 82455: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["backup"] = {}; - AWS.Backup = Service.defineService("backup", ["2018-11-15"]); - Object.defineProperty(apiLoader.services["backup"], "2018-11-15", { - get: function get() { - var model = __nccwpck_require__(77990); - model.paginators = __nccwpck_require__(54869) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.Backup; - - /***/ - }, - - /***/ 10000: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["batch"] = {}; - AWS.Batch = Service.defineService("batch", ["2016-08-10"]); - Object.defineProperty(apiLoader.services["batch"], "2016-08-10", { - get: function get() { - var model = __nccwpck_require__(12617); - model.paginators = __nccwpck_require__(36988) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.Batch; - - /***/ - }, - - /***/ 35429: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["braket"] = {}; - AWS.Braket = Service.defineService("braket", ["2019-09-01"]); - Object.defineProperty(apiLoader.services["braket"], "2019-09-01", { - get: function get() { - var model = __nccwpck_require__(23332); - model.paginators = __nccwpck_require__(15732) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.Braket; - - /***/ - }, - - /***/ 43923: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["budgets"] = {}; - AWS.Budgets = Service.defineService("budgets", ["2016-10-20"]); - Object.defineProperty(apiLoader.services["budgets"], "2016-10-20", { - get: function get() { - var model = __nccwpck_require__(11978); - model.paginators = __nccwpck_require__(23694) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.Budgets; - - /***/ - }, - - /***/ 84646: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["chime"] = {}; - AWS.Chime = Service.defineService("chime", ["2018-05-01"]); - Object.defineProperty(apiLoader.services["chime"], "2018-05-01", { - get: function get() { - var model = __nccwpck_require__(44811); - model.paginators = __nccwpck_require__(31890) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.Chime; - - /***/ - }, - - /***/ 85473: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["cloud9"] = {}; - AWS.Cloud9 = Service.defineService("cloud9", ["2017-09-23"]); - Object.defineProperty(apiLoader.services["cloud9"], "2017-09-23", { - get: function get() { - var model = __nccwpck_require__(82981); - model.paginators = __nccwpck_require__(9313) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.Cloud9; - - /***/ - }, - - /***/ 56231: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["clouddirectory"] = {}; - AWS.CloudDirectory = Service.defineService("clouddirectory", [ - "2016-05-10", - "2016-05-10*", - "2017-01-11", - ]); - Object.defineProperty( - apiLoader.services["clouddirectory"], - "2016-05-10", - { - get: function get() { - var model = __nccwpck_require__(72862); - model.paginators = __nccwpck_require__(87597) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - Object.defineProperty( - apiLoader.services["clouddirectory"], - "2017-01-11", - { - get: function get() { - var model = __nccwpck_require__(88729); - model.paginators = __nccwpck_require__(10156) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.CloudDirectory; - - /***/ - }, - - /***/ 74643: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["cloudformation"] = {}; - AWS.CloudFormation = Service.defineService("cloudformation", [ - "2010-05-15", - ]); - Object.defineProperty( - apiLoader.services["cloudformation"], - "2010-05-15", - { - get: function get() { - var model = __nccwpck_require__(31930); - model.paginators = __nccwpck_require__(10611) /* .pagination */.o; - model.waiters = __nccwpck_require__(53732) /* .waiters */.V; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.CloudFormation; - - /***/ - }, - - /***/ 48058: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["cloudfront"] = {}; - AWS.CloudFront = Service.defineService("cloudfront", [ - "2013-05-12*", - "2013-11-11*", - "2014-05-31*", - "2014-10-21*", - "2014-11-06*", - "2015-04-17*", - "2015-07-27*", - "2015-09-17*", - "2016-01-13*", - "2016-01-28*", - "2016-08-01*", - "2016-08-20*", - "2016-09-07*", - "2016-09-29*", - "2016-11-25", - "2016-11-25*", - "2017-03-25", - "2017-03-25*", - "2017-10-30", - "2017-10-30*", - "2018-06-18", - "2018-06-18*", - "2018-11-05", - "2018-11-05*", - "2019-03-26", - "2019-03-26*", - "2020-05-31", - ]); - __nccwpck_require__(95483); - Object.defineProperty(apiLoader.services["cloudfront"], "2016-11-25", { - get: function get() { - var model = __nccwpck_require__(64908); - model.paginators = __nccwpck_require__(57305) /* .pagination */.o; - model.waiters = __nccwpck_require__(71106) /* .waiters */.V; - return model; - }, - enumerable: true, - configurable: true, - }); - Object.defineProperty(apiLoader.services["cloudfront"], "2017-03-25", { - get: function get() { - var model = __nccwpck_require__(76944); - model.paginators = __nccwpck_require__(83654) /* .pagination */.o; - model.waiters = __nccwpck_require__(83406) /* .waiters */.V; - return model; - }, - enumerable: true, - configurable: true, - }); - Object.defineProperty(apiLoader.services["cloudfront"], "2017-10-30", { - get: function get() { - var model = __nccwpck_require__(80198); - model.paginators = __nccwpck_require__(52915) /* .pagination */.o; - model.waiters = __nccwpck_require__(13399) /* .waiters */.V; - return model; - }, - enumerable: true, - configurable: true, - }); - Object.defineProperty(apiLoader.services["cloudfront"], "2018-06-18", { - get: function get() { - var model = __nccwpck_require__(29549); - model.paginators = __nccwpck_require__(7805) /* .pagination */.o; - model.waiters = __nccwpck_require__(2353) /* .waiters */.V; - return model; - }, - enumerable: true, - configurable: true, - }); - Object.defineProperty(apiLoader.services["cloudfront"], "2018-11-05", { - get: function get() { - var model = __nccwpck_require__(22253); - model.paginators = __nccwpck_require__(29533) /* .pagination */.o; - model.waiters = __nccwpck_require__(36883) /* .waiters */.V; - return model; - }, - enumerable: true, - configurable: true, - }); - Object.defineProperty(apiLoader.services["cloudfront"], "2019-03-26", { - get: function get() { - var model = __nccwpck_require__(29574); - model.paginators = __nccwpck_require__(35556) /* .pagination */.o; - model.waiters = __nccwpck_require__(97142) /* .waiters */.V; - return model; - }, - enumerable: true, - configurable: true, - }); - Object.defineProperty(apiLoader.services["cloudfront"], "2020-05-31", { - get: function get() { - var model = __nccwpck_require__(66310); - model.paginators = __nccwpck_require__(48335) /* .pagination */.o; - model.waiters = __nccwpck_require__(83517) /* .waiters */.V; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.CloudFront; - - /***/ - }, - - /***/ 59976: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["cloudhsm"] = {}; - AWS.CloudHSM = Service.defineService("cloudhsm", ["2014-05-30"]); - Object.defineProperty(apiLoader.services["cloudhsm"], "2014-05-30", { - get: function get() { - var model = __nccwpck_require__(18637); - model.paginators = __nccwpck_require__(18988) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.CloudHSM; - - /***/ - }, - - /***/ 70889: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["cloudhsmv2"] = {}; - AWS.CloudHSMV2 = Service.defineService("cloudhsmv2", ["2017-04-28"]); - Object.defineProperty(apiLoader.services["cloudhsmv2"], "2017-04-28", { - get: function get() { - var model = __nccwpck_require__(90554); - model.paginators = __nccwpck_require__(77334) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.CloudHSMV2; - - /***/ - }, - - /***/ 72321: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["cloudsearch"] = {}; - AWS.CloudSearch = Service.defineService("cloudsearch", [ - "2011-02-01", - "2013-01-01", - ]); - Object.defineProperty(apiLoader.services["cloudsearch"], "2011-02-01", { - get: function get() { - var model = __nccwpck_require__(11732); - model.paginators = __nccwpck_require__(51357) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - Object.defineProperty(apiLoader.services["cloudsearch"], "2013-01-01", { - get: function get() { - var model = __nccwpck_require__(56880); - model.paginators = __nccwpck_require__(81127) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.CloudSearch; - - /***/ - }, - - /***/ 64072: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["cloudsearchdomain"] = {}; - AWS.CloudSearchDomain = Service.defineService("cloudsearchdomain", [ - "2013-01-01", - ]); - __nccwpck_require__(48571); - Object.defineProperty( - apiLoader.services["cloudsearchdomain"], - "2013-01-01", - { - get: function get() { - var model = __nccwpck_require__(78255); - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.CloudSearchDomain; - - /***/ - }, - - /***/ 65512: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["cloudtrail"] = {}; - AWS.CloudTrail = Service.defineService("cloudtrail", ["2013-11-01"]); - Object.defineProperty(apiLoader.services["cloudtrail"], "2013-11-01", { - get: function get() { - var model = __nccwpck_require__(11506); - model.paginators = __nccwpck_require__(27523) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.CloudTrail; - - /***/ - }, - - /***/ 6763: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["cloudwatch"] = {}; - AWS.CloudWatch = Service.defineService("cloudwatch", ["2010-08-01"]); - Object.defineProperty(apiLoader.services["cloudwatch"], "2010-08-01", { - get: function get() { - var model = __nccwpck_require__(16363); - model.paginators = __nccwpck_require__(46675) /* .pagination */.o; - model.waiters = __nccwpck_require__(21466) /* .waiters */.V; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.CloudWatch; - - /***/ - }, - - /***/ 38124: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["cloudwatchevents"] = {}; - AWS.CloudWatchEvents = Service.defineService("cloudwatchevents", [ - "2014-02-03*", - "2015-10-07", - ]); - Object.defineProperty( - apiLoader.services["cloudwatchevents"], - "2015-10-07", - { - get: function get() { - var model = __nccwpck_require__(40299); - model.paginators = __nccwpck_require__(54031) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.CloudWatchEvents; - - /***/ - }, - - /***/ 96693: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["cloudwatchlogs"] = {}; - AWS.CloudWatchLogs = Service.defineService("cloudwatchlogs", [ - "2014-03-28", - ]); - Object.defineProperty( - apiLoader.services["cloudwatchlogs"], - "2014-03-28", - { - get: function get() { - var model = __nccwpck_require__(73044); - model.paginators = __nccwpck_require__(15472) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.CloudWatchLogs; - - /***/ - }, - - /***/ 91983: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["codeartifact"] = {}; - AWS.CodeArtifact = Service.defineService("codeartifact", ["2018-09-22"]); - Object.defineProperty(apiLoader.services["codeartifact"], "2018-09-22", { - get: function get() { - var model = __nccwpck_require__(87923); - model.paginators = __nccwpck_require__(40983) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.CodeArtifact; - - /***/ - }, - - /***/ 60450: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["codebuild"] = {}; - AWS.CodeBuild = Service.defineService("codebuild", ["2016-10-06"]); - Object.defineProperty(apiLoader.services["codebuild"], "2016-10-06", { - get: function get() { - var model = __nccwpck_require__(40893); - model.paginators = __nccwpck_require__(23010) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.CodeBuild; - - /***/ - }, - - /***/ 71323: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["codecommit"] = {}; - AWS.CodeCommit = Service.defineService("codecommit", ["2015-04-13"]); - Object.defineProperty(apiLoader.services["codecommit"], "2015-04-13", { - get: function get() { - var model = __nccwpck_require__(57144); - model.paginators = __nccwpck_require__(62599) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.CodeCommit; - - /***/ - }, - - /***/ 54599: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["codedeploy"] = {}; - AWS.CodeDeploy = Service.defineService("codedeploy", ["2014-10-06"]); - Object.defineProperty(apiLoader.services["codedeploy"], "2014-10-06", { - get: function get() { - var model = __nccwpck_require__(10967); - model.paginators = __nccwpck_require__(1917) /* .pagination */.o; - model.waiters = __nccwpck_require__(52416) /* .waiters */.V; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.CodeDeploy; - - /***/ - }, - - /***/ 65704: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["codeguruprofiler"] = {}; - AWS.CodeGuruProfiler = Service.defineService("codeguruprofiler", [ - "2019-07-18", - ]); - Object.defineProperty( - apiLoader.services["codeguruprofiler"], - "2019-07-18", - { - get: function get() { - var model = __nccwpck_require__(34890); - model.paginators = __nccwpck_require__(25274) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.CodeGuruProfiler; - - /***/ - }, - - /***/ 60070: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["codegurureviewer"] = {}; - AWS.CodeGuruReviewer = Service.defineService("codegurureviewer", [ - "2019-09-19", - ]); - Object.defineProperty( - apiLoader.services["codegurureviewer"], - "2019-09-19", - { - get: function get() { - var model = __nccwpck_require__(66739); - model.paginators = __nccwpck_require__(37775) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.CodeGuruReviewer; - - /***/ - }, - - /***/ 22938: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["codepipeline"] = {}; - AWS.CodePipeline = Service.defineService("codepipeline", ["2015-07-09"]); - Object.defineProperty(apiLoader.services["codepipeline"], "2015-07-09", { - get: function get() { - var model = __nccwpck_require__(4039); - model.paginators = __nccwpck_require__(78953) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.CodePipeline; - - /***/ - }, - - /***/ 98336: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["codestar"] = {}; - AWS.CodeStar = Service.defineService("codestar", ["2017-04-19"]); - Object.defineProperty(apiLoader.services["codestar"], "2017-04-19", { - get: function get() { - var model = __nccwpck_require__(12425); - model.paginators = __nccwpck_require__(70046) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.CodeStar; - - /***/ - }, - - /***/ 78270: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["codestarconnections"] = {}; - AWS.CodeStarconnections = Service.defineService("codestarconnections", [ - "2019-12-01", - ]); - Object.defineProperty( - apiLoader.services["codestarconnections"], - "2019-12-01", - { - get: function get() { - var model = __nccwpck_require__(88428); - model.paginators = __nccwpck_require__(31506) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.CodeStarconnections; - - /***/ - }, - - /***/ 15141: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["codestarnotifications"] = {}; - AWS.CodeStarNotifications = Service.defineService( - "codestarnotifications", - ["2019-10-15"] - ); - Object.defineProperty( - apiLoader.services["codestarnotifications"], - "2019-10-15", - { - get: function get() { - var model = __nccwpck_require__(33362); - model.paginators = __nccwpck_require__(44301) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.CodeStarNotifications; - - /***/ - }, - - /***/ 58291: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["cognitoidentity"] = {}; - AWS.CognitoIdentity = Service.defineService("cognitoidentity", [ - "2014-06-30", - ]); - Object.defineProperty( - apiLoader.services["cognitoidentity"], - "2014-06-30", - { - get: function get() { - var model = __nccwpck_require__(57377); - model.paginators = __nccwpck_require__(85010) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.CognitoIdentity; - - /***/ - }, - - /***/ 31379: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["cognitoidentityserviceprovider"] = {}; - AWS.CognitoIdentityServiceProvider = Service.defineService( - "cognitoidentityserviceprovider", - ["2016-04-18"] - ); - Object.defineProperty( - apiLoader.services["cognitoidentityserviceprovider"], - "2016-04-18", - { - get: function get() { - var model = __nccwpck_require__(53166); - model.paginators = __nccwpck_require__(17149) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.CognitoIdentityServiceProvider; - - /***/ - }, - - /***/ 74770: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["cognitosync"] = {}; - AWS.CognitoSync = Service.defineService("cognitosync", ["2014-06-30"]); - Object.defineProperty(apiLoader.services["cognitosync"], "2014-06-30", { - get: function get() { - var model = __nccwpck_require__(29128); - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.CognitoSync; - - /***/ - }, - - /***/ 62878: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["comprehend"] = {}; - AWS.Comprehend = Service.defineService("comprehend", ["2017-11-27"]); - Object.defineProperty(apiLoader.services["comprehend"], "2017-11-27", { - get: function get() { - var model = __nccwpck_require__(24433); - model.paginators = __nccwpck_require__(82518) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.Comprehend; - - /***/ - }, - - /***/ 32349: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["comprehendmedical"] = {}; - AWS.ComprehendMedical = Service.defineService("comprehendmedical", [ - "2018-10-30", - ]); - Object.defineProperty( - apiLoader.services["comprehendmedical"], - "2018-10-30", - { - get: function get() { - var model = __nccwpck_require__(96649); - model.paginators = __nccwpck_require__(43172) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.ComprehendMedical; - - /***/ - }, - - /***/ 64459: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["computeoptimizer"] = {}; - AWS.ComputeOptimizer = Service.defineService("computeoptimizer", [ - "2019-11-01", - ]); - Object.defineProperty( - apiLoader.services["computeoptimizer"], - "2019-11-01", - { - get: function get() { - var model = __nccwpck_require__(85802); - model.paginators = __nccwpck_require__(6831) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.ComputeOptimizer; - - /***/ - }, - - /***/ 34061: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["configservice"] = {}; - AWS.ConfigService = Service.defineService("configservice", [ - "2014-11-12", - ]); - Object.defineProperty(apiLoader.services["configservice"], "2014-11-12", { - get: function get() { - var model = __nccwpck_require__(47124); - model.paginators = __nccwpck_require__(85980) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.ConfigService; - - /***/ - }, - - /***/ 13879: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["connect"] = {}; - AWS.Connect = Service.defineService("connect", ["2017-08-08"]); - Object.defineProperty(apiLoader.services["connect"], "2017-08-08", { - get: function get() { - var model = __nccwpck_require__(54511); - model.paginators = __nccwpck_require__(19742) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.Connect; - - /***/ - }, - - /***/ 41847: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["connectcontactlens"] = {}; - AWS.ConnectContactLens = Service.defineService("connectcontactlens", [ - "2020-08-21", - ]); - Object.defineProperty( - apiLoader.services["connectcontactlens"], - "2020-08-21", - { - get: function get() { - var model = __nccwpck_require__(16527); - model.paginators = __nccwpck_require__(76658) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.ConnectContactLens; - - /***/ - }, - - /***/ 94198: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["connectparticipant"] = {}; - AWS.ConnectParticipant = Service.defineService("connectparticipant", [ - "2018-09-07", - ]); - Object.defineProperty( - apiLoader.services["connectparticipant"], - "2018-09-07", - { - get: function get() { - var model = __nccwpck_require__(70132); - model.paginators = __nccwpck_require__(29947) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.ConnectParticipant; - - /***/ - }, - - /***/ 79523: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["costexplorer"] = {}; - AWS.CostExplorer = Service.defineService("costexplorer", ["2017-10-25"]); - Object.defineProperty(apiLoader.services["costexplorer"], "2017-10-25", { - get: function get() { - var model = __nccwpck_require__(4060); - model.paginators = __nccwpck_require__(75642) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.CostExplorer; - - /***/ - }, - - /***/ 5026: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["cur"] = {}; - AWS.CUR = Service.defineService("cur", ["2017-01-06"]); - Object.defineProperty(apiLoader.services["cur"], "2017-01-06", { - get: function get() { - var model = __nccwpck_require__(46858); - model.paginators = __nccwpck_require__(40528) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.CUR; - - /***/ - }, - - /***/ 28379: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["customerprofiles"] = {}; - AWS.CustomerProfiles = Service.defineService("customerprofiles", [ - "2020-08-15", - ]); - Object.defineProperty( - apiLoader.services["customerprofiles"], - "2020-08-15", - { - get: function get() { - var model = __nccwpck_require__(56793); - model.paginators = __nccwpck_require__(53892) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.CustomerProfiles; - - /***/ - }, - - /***/ 35846: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["databrew"] = {}; - AWS.DataBrew = Service.defineService("databrew", ["2017-07-25"]); - Object.defineProperty(apiLoader.services["databrew"], "2017-07-25", { - get: function get() { - var model = __nccwpck_require__(96089); - model.paginators = __nccwpck_require__(92224) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.DataBrew; - - /***/ - }, - - /***/ 11024: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["dataexchange"] = {}; - AWS.DataExchange = Service.defineService("dataexchange", ["2017-07-25"]); - Object.defineProperty(apiLoader.services["dataexchange"], "2017-07-25", { - get: function get() { - var model = __nccwpck_require__(42346); - model.paginators = __nccwpck_require__(55607) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.DataExchange; - - /***/ - }, - - /***/ 65688: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["datapipeline"] = {}; - AWS.DataPipeline = Service.defineService("datapipeline", ["2012-10-29"]); - Object.defineProperty(apiLoader.services["datapipeline"], "2012-10-29", { - get: function get() { - var model = __nccwpck_require__(79908); - model.paginators = __nccwpck_require__(89659) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.DataPipeline; - - /***/ - }, - - /***/ 25308: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["datasync"] = {}; - AWS.DataSync = Service.defineService("datasync", ["2018-11-09"]); - Object.defineProperty(apiLoader.services["datasync"], "2018-11-09", { - get: function get() { - var model = __nccwpck_require__(93640); - model.paginators = __nccwpck_require__(80063) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.DataSync; - - /***/ - }, - - /***/ 71398: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["dax"] = {}; - AWS.DAX = Service.defineService("dax", ["2017-04-19"]); - Object.defineProperty(apiLoader.services["dax"], "2017-04-19", { - get: function get() { - var model = __nccwpck_require__(24709); - model.paginators = __nccwpck_require__(87564) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.DAX; - - /***/ - }, - - /***/ 60674: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["detective"] = {}; - AWS.Detective = Service.defineService("detective", ["2018-10-26"]); - Object.defineProperty(apiLoader.services["detective"], "2018-10-26", { - get: function get() { - var model = __nccwpck_require__(25236); - model.paginators = __nccwpck_require__(46384) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.Detective; - - /***/ - }, - - /***/ 26272: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["devicefarm"] = {}; - AWS.DeviceFarm = Service.defineService("devicefarm", ["2015-06-23"]); - Object.defineProperty(apiLoader.services["devicefarm"], "2015-06-23", { - get: function get() { - var model = __nccwpck_require__(34023); - model.paginators = __nccwpck_require__(37161) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.DeviceFarm; - - /***/ - }, - - /***/ 90673: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["devopsguru"] = {}; - AWS.DevOpsGuru = Service.defineService("devopsguru", ["2020-12-01"]); - Object.defineProperty(apiLoader.services["devopsguru"], "2020-12-01", { - get: function get() { - var model = __nccwpck_require__(36592); - model.paginators = __nccwpck_require__(95551) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.DevOpsGuru; - - /***/ - }, - - /***/ 73783: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["directconnect"] = {}; - AWS.DirectConnect = Service.defineService("directconnect", [ - "2012-10-25", - ]); - Object.defineProperty(apiLoader.services["directconnect"], "2012-10-25", { - get: function get() { - var model = __nccwpck_require__(45125); - model.paginators = __nccwpck_require__(26404) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.DirectConnect; - - /***/ - }, - - /***/ 83908: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["directoryservice"] = {}; - AWS.DirectoryService = Service.defineService("directoryservice", [ - "2015-04-16", - ]); - Object.defineProperty( - apiLoader.services["directoryservice"], - "2015-04-16", - { - get: function get() { - var model = __nccwpck_require__(47357); - model.paginators = __nccwpck_require__(93412) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.DirectoryService; - - /***/ - }, - - /***/ 81690: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["discovery"] = {}; - AWS.Discovery = Service.defineService("discovery", ["2015-11-01"]); - Object.defineProperty(apiLoader.services["discovery"], "2015-11-01", { - get: function get() { - var model = __nccwpck_require__(68951); - model.paginators = __nccwpck_require__(19822) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.Discovery; - - /***/ - }, - - /***/ 24958: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["dlm"] = {}; - AWS.DLM = Service.defineService("dlm", ["2018-01-12"]); - Object.defineProperty(apiLoader.services["dlm"], "2018-01-12", { - get: function get() { - var model = __nccwpck_require__(75485); - model.paginators = __nccwpck_require__(98881) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.DLM; - - /***/ - }, - - /***/ 69868: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["dms"] = {}; - AWS.DMS = Service.defineService("dms", ["2016-01-01"]); - Object.defineProperty(apiLoader.services["dms"], "2016-01-01", { - get: function get() { - var model = __nccwpck_require__(77953); - model.paginators = __nccwpck_require__(36772) /* .pagination */.o; - model.waiters = __nccwpck_require__(3500) /* .waiters */.V; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.DMS; - - /***/ - }, - - /***/ 55129: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["docdb"] = {}; - AWS.DocDB = Service.defineService("docdb", ["2014-10-31"]); - Object.defineProperty(apiLoader.services["docdb"], "2014-10-31", { - get: function get() { - var model = __nccwpck_require__(4932); - model.paginators = __nccwpck_require__(41408) /* .pagination */.o; - model.waiters = __nccwpck_require__(36607) /* .waiters */.V; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.DocDB; - - /***/ - }, - - /***/ 14347: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["dynamodb"] = {}; - AWS.DynamoDB = Service.defineService("dynamodb", [ - "2011-12-05", - "2012-08-10", - ]); - __nccwpck_require__(17101); - Object.defineProperty(apiLoader.services["dynamodb"], "2011-12-05", { - get: function get() { - var model = __nccwpck_require__(46148); - model.paginators = __nccwpck_require__(86884) /* .pagination */.o; - model.waiters = __nccwpck_require__(24864) /* .waiters */.V; - return model; - }, - enumerable: true, - configurable: true, - }); - Object.defineProperty(apiLoader.services["dynamodb"], "2012-08-10", { - get: function get() { - var model = __nccwpck_require__(54047); - model.paginators = __nccwpck_require__(30482) /* .pagination */.o; - model.waiters = __nccwpck_require__(48411) /* .waiters */.V; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.DynamoDB; - - /***/ - }, - - /***/ 88090: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["dynamodbstreams"] = {}; - AWS.DynamoDBStreams = Service.defineService("dynamodbstreams", [ - "2012-08-10", - ]); - Object.defineProperty( - apiLoader.services["dynamodbstreams"], - "2012-08-10", - { - get: function get() { - var model = __nccwpck_require__(26098); - model.paginators = __nccwpck_require__(40549) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.DynamoDBStreams; - - /***/ - }, - - /***/ 62837: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["ebs"] = {}; - AWS.EBS = Service.defineService("ebs", ["2019-11-02"]); - Object.defineProperty(apiLoader.services["ebs"], "2019-11-02", { - get: function get() { - var model = __nccwpck_require__(72220); - model.paginators = __nccwpck_require__(85366) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.EBS; - - /***/ - }, - - /***/ 7778: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["ec2"] = {}; - AWS.EC2 = Service.defineService("ec2", [ - "2013-06-15*", - "2013-10-15*", - "2014-02-01*", - "2014-05-01*", - "2014-06-15*", - "2014-09-01*", - "2014-10-01*", - "2015-03-01*", - "2015-04-15*", - "2015-10-01*", - "2016-04-01*", - "2016-09-15*", - "2016-11-15", - ]); - __nccwpck_require__(92501); - Object.defineProperty(apiLoader.services["ec2"], "2016-11-15", { - get: function get() { - var model = __nccwpck_require__(2658); - model.paginators = __nccwpck_require__(82477) /* .pagination */.o; - model.waiters = __nccwpck_require__(19153) /* .waiters */.V; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.EC2; - - /***/ - }, - - /***/ 92209: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["ec2instanceconnect"] = {}; - AWS.EC2InstanceConnect = Service.defineService("ec2instanceconnect", [ - "2018-04-02", - ]); - Object.defineProperty( - apiLoader.services["ec2instanceconnect"], - "2018-04-02", - { - get: function get() { - var model = __nccwpck_require__(36007); - model.paginators = __nccwpck_require__(38333) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.EC2InstanceConnect; - - /***/ - }, - - /***/ 15211: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["ecr"] = {}; - AWS.ECR = Service.defineService("ecr", ["2015-09-21"]); - Object.defineProperty(apiLoader.services["ecr"], "2015-09-21", { - get: function get() { - var model = __nccwpck_require__(92405); - model.paginators = __nccwpck_require__(25504) /* .pagination */.o; - model.waiters = __nccwpck_require__(78925) /* .waiters */.V; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.ECR; - - /***/ - }, - - /***/ 90244: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["ecrpublic"] = {}; - AWS.ECRPUBLIC = Service.defineService("ecrpublic", ["2020-10-30"]); - Object.defineProperty(apiLoader.services["ecrpublic"], "2020-10-30", { - get: function get() { - var model = __nccwpck_require__(9668); - model.paginators = __nccwpck_require__(81193) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.ECRPUBLIC; - - /***/ - }, - - /***/ 16615: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["ecs"] = {}; - AWS.ECS = Service.defineService("ecs", ["2014-11-13"]); - Object.defineProperty(apiLoader.services["ecs"], "2014-11-13", { - get: function get() { - var model = __nccwpck_require__(44208); - model.paginators = __nccwpck_require__(15738) /* .pagination */.o; - model.waiters = __nccwpck_require__(1299) /* .waiters */.V; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.ECS; - - /***/ - }, - - /***/ 34375: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["efs"] = {}; - AWS.EFS = Service.defineService("efs", ["2015-02-01"]); - Object.defineProperty(apiLoader.services["efs"], "2015-02-01", { - get: function get() { - var model = __nccwpck_require__(54784); - model.paginators = __nccwpck_require__(40174) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.EFS; - - /***/ - }, - - /***/ 23337: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["eks"] = {}; - AWS.EKS = Service.defineService("eks", ["2017-11-01"]); - Object.defineProperty(apiLoader.services["eks"], "2017-11-01", { - get: function get() { - var model = __nccwpck_require__(51370); - model.paginators = __nccwpck_require__(36490) /* .pagination */.o; - model.waiters = __nccwpck_require__(88058) /* .waiters */.V; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.EKS; - - /***/ - }, - - /***/ 81065: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["elasticache"] = {}; - AWS.ElastiCache = Service.defineService("elasticache", [ - "2012-11-15*", - "2014-03-24*", - "2014-07-15*", - "2014-09-30*", - "2015-02-02", - ]); - Object.defineProperty(apiLoader.services["elasticache"], "2015-02-02", { - get: function get() { - var model = __nccwpck_require__(58426); - model.paginators = __nccwpck_require__(79559) /* .pagination */.o; - model.waiters = __nccwpck_require__(29787) /* .waiters */.V; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.ElastiCache; - - /***/ - }, - - /***/ 14897: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["elasticbeanstalk"] = {}; - AWS.ElasticBeanstalk = Service.defineService("elasticbeanstalk", [ - "2010-12-01", - ]); - Object.defineProperty( - apiLoader.services["elasticbeanstalk"], - "2010-12-01", - { - get: function get() { - var model = __nccwpck_require__(72508); - model.paginators = __nccwpck_require__(72305) /* .pagination */.o; - model.waiters = __nccwpck_require__(62534) /* .waiters */.V; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.ElasticBeanstalk; - - /***/ - }, - - /***/ 37708: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["elasticinference"] = {}; - AWS.ElasticInference = Service.defineService("elasticinference", [ - "2017-07-25", - ]); - Object.defineProperty( - apiLoader.services["elasticinference"], - "2017-07-25", - { - get: function get() { - var model = __nccwpck_require__(83967); - model.paginators = __nccwpck_require__(64906) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.ElasticInference; - - /***/ - }, - - /***/ 40745: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["elastictranscoder"] = {}; - AWS.ElasticTranscoder = Service.defineService("elastictranscoder", [ - "2012-09-25", - ]); - Object.defineProperty( - apiLoader.services["elastictranscoder"], - "2012-09-25", - { - get: function get() { - var model = __nccwpck_require__(23463); - model.paginators = __nccwpck_require__(36121) /* .pagination */.o; - model.waiters = __nccwpck_require__(59345) /* .waiters */.V; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.ElasticTranscoder; - - /***/ - }, - - /***/ 10907: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["elb"] = {}; - AWS.ELB = Service.defineService("elb", ["2012-06-01"]); - Object.defineProperty(apiLoader.services["elb"], "2012-06-01", { - get: function get() { - var model = __nccwpck_require__(66258); - model.paginators = __nccwpck_require__(77372) /* .pagination */.o; - model.waiters = __nccwpck_require__(56717) /* .waiters */.V; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.ELB; - - /***/ - }, - - /***/ 44311: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["elbv2"] = {}; - AWS.ELBv2 = Service.defineService("elbv2", ["2015-12-01"]); - Object.defineProperty(apiLoader.services["elbv2"], "2015-12-01", { - get: function get() { - var model = __nccwpck_require__(42628); - model.paginators = __nccwpck_require__(12274) /* .pagination */.o; - model.waiters = __nccwpck_require__(56106) /* .waiters */.V; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.ELBv2; - - /***/ - }, - - /***/ 50470: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["emr"] = {}; - AWS.EMR = Service.defineService("emr", ["2009-03-31"]); - Object.defineProperty(apiLoader.services["emr"], "2009-03-31", { - get: function get() { - var model = __nccwpck_require__(91298); - model.paginators = __nccwpck_require__(62965) /* .pagination */.o; - model.waiters = __nccwpck_require__(86792) /* .waiters */.V; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.EMR; - - /***/ - }, - - /***/ 49984: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["emrcontainers"] = {}; - AWS.EMRcontainers = Service.defineService("emrcontainers", [ - "2020-10-01", - ]); - Object.defineProperty(apiLoader.services["emrcontainers"], "2020-10-01", { - get: function get() { - var model = __nccwpck_require__(33922); - model.paginators = __nccwpck_require__(87789) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.EMRcontainers; - - /***/ - }, - - /***/ 84462: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["es"] = {}; - AWS.ES = Service.defineService("es", ["2015-01-01"]); - Object.defineProperty(apiLoader.services["es"], "2015-01-01", { - get: function get() { - var model = __nccwpck_require__(33943); - model.paginators = __nccwpck_require__(78836) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.ES; - - /***/ - }, - - /***/ 898: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["eventbridge"] = {}; - AWS.EventBridge = Service.defineService("eventbridge", ["2015-10-07"]); - Object.defineProperty(apiLoader.services["eventbridge"], "2015-10-07", { - get: function get() { - var model = __nccwpck_require__(9659); - model.paginators = __nccwpck_require__(10871) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.EventBridge; - - /***/ - }, - - /***/ 92831: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["firehose"] = {}; - AWS.Firehose = Service.defineService("firehose", ["2015-08-04"]); - Object.defineProperty(apiLoader.services["firehose"], "2015-08-04", { - get: function get() { - var model = __nccwpck_require__(48886); - model.paginators = __nccwpck_require__(47400) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.Firehose; - - /***/ - }, - - /***/ 11316: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["fms"] = {}; - AWS.FMS = Service.defineService("fms", ["2018-01-01"]); - Object.defineProperty(apiLoader.services["fms"], "2018-01-01", { - get: function get() { - var model = __nccwpck_require__(22212); - model.paginators = __nccwpck_require__(49570) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.FMS; - - /***/ - }, - - /***/ 36822: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["forecastqueryservice"] = {}; - AWS.ForecastQueryService = Service.defineService("forecastqueryservice", [ - "2018-06-26", - ]); - Object.defineProperty( - apiLoader.services["forecastqueryservice"], - "2018-06-26", - { - get: function get() { - var model = __nccwpck_require__(23865); - model.paginators = __nccwpck_require__(98135) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.ForecastQueryService; - - /***/ - }, - - /***/ 12942: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["forecastservice"] = {}; - AWS.ForecastService = Service.defineService("forecastservice", [ - "2018-06-26", - ]); - Object.defineProperty( - apiLoader.services["forecastservice"], - "2018-06-26", - { - get: function get() { - var model = __nccwpck_require__(6468); - model.paginators = __nccwpck_require__(45338) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.ForecastService; - - /***/ - }, - - /***/ 99830: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["frauddetector"] = {}; - AWS.FraudDetector = Service.defineService("frauddetector", [ - "2019-11-15", - ]); - Object.defineProperty(apiLoader.services["frauddetector"], "2019-11-15", { - get: function get() { - var model = __nccwpck_require__(96105); - model.paginators = __nccwpck_require__(9177) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.FraudDetector; - - /***/ - }, - - /***/ 60642: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["fsx"] = {}; - AWS.FSx = Service.defineService("fsx", ["2018-03-01"]); - Object.defineProperty(apiLoader.services["fsx"], "2018-03-01", { - get: function get() { - var model = __nccwpck_require__(58245); - model.paginators = __nccwpck_require__(19882) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.FSx; - - /***/ - }, - - /***/ 8085: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["gamelift"] = {}; - AWS.GameLift = Service.defineService("gamelift", ["2015-10-01"]); - Object.defineProperty(apiLoader.services["gamelift"], "2015-10-01", { - get: function get() { - var model = __nccwpck_require__(69257); - model.paginators = __nccwpck_require__(88381) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.GameLift; - - /***/ - }, - - /***/ 63249: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["glacier"] = {}; - AWS.Glacier = Service.defineService("glacier", ["2012-06-01"]); - __nccwpck_require__(14472); - Object.defineProperty(apiLoader.services["glacier"], "2012-06-01", { - get: function get() { - var model = __nccwpck_require__(11545); - model.paginators = __nccwpck_require__(54145) /* .pagination */.o; - model.waiters = __nccwpck_require__(65182) /* .waiters */.V; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.Glacier; - - /***/ - }, - - /***/ 19306: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["globalaccelerator"] = {}; - AWS.GlobalAccelerator = Service.defineService("globalaccelerator", [ - "2018-08-08", - ]); - Object.defineProperty( - apiLoader.services["globalaccelerator"], - "2018-08-08", - { - get: function get() { - var model = __nccwpck_require__(35365); - model.paginators = __nccwpck_require__(14796) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.GlobalAccelerator; - - /***/ - }, - - /***/ 31658: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["glue"] = {}; - AWS.Glue = Service.defineService("glue", ["2017-03-31"]); - Object.defineProperty(apiLoader.services["glue"], "2017-03-31", { - get: function get() { - var model = __nccwpck_require__(72268); - model.paginators = __nccwpck_require__(26545) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.Glue; - - /***/ - }, - - /***/ 20690: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["greengrass"] = {}; - AWS.Greengrass = Service.defineService("greengrass", ["2017-06-07"]); - Object.defineProperty(apiLoader.services["greengrass"], "2017-06-07", { - get: function get() { - var model = __nccwpck_require__(72575); - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.Greengrass; - - /***/ - }, - - /***/ 45126: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["greengrassv2"] = {}; - AWS.GreengrassV2 = Service.defineService("greengrassv2", ["2020-11-30"]); - Object.defineProperty(apiLoader.services["greengrassv2"], "2020-11-30", { - get: function get() { - var model = __nccwpck_require__(57546); - model.paginators = __nccwpck_require__(47961) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.GreengrassV2; - - /***/ - }, - - /***/ 80494: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["groundstation"] = {}; - AWS.GroundStation = Service.defineService("groundstation", [ - "2019-05-23", - ]); - Object.defineProperty(apiLoader.services["groundstation"], "2019-05-23", { - get: function get() { - var model = __nccwpck_require__(27733); - model.paginators = __nccwpck_require__(55974) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.GroundStation; - - /***/ - }, - - /***/ 40755: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["guardduty"] = {}; - AWS.GuardDuty = Service.defineService("guardduty", ["2017-11-28"]); - Object.defineProperty(apiLoader.services["guardduty"], "2017-11-28", { - get: function get() { - var model = __nccwpck_require__(37793); - model.paginators = __nccwpck_require__(87510) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.GuardDuty; - - /***/ - }, - - /***/ 21834: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["health"] = {}; - AWS.Health = Service.defineService("health", ["2016-08-04"]); - Object.defineProperty(apiLoader.services["health"], "2016-08-04", { - get: function get() { - var model = __nccwpck_require__(8618); - model.paginators = __nccwpck_require__(46725) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.Health; - - /***/ - }, - - /***/ 64254: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["healthlake"] = {}; - AWS.HealthLake = Service.defineService("healthlake", ["2017-07-01"]); - Object.defineProperty(apiLoader.services["healthlake"], "2017-07-01", { - get: function get() { - var model = __nccwpck_require__(13637); - model.paginators = __nccwpck_require__(92834) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.HealthLake; - - /***/ - }, - - /***/ 38889: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["honeycode"] = {}; - AWS.Honeycode = Service.defineService("honeycode", ["2020-03-01"]); - Object.defineProperty(apiLoader.services["honeycode"], "2020-03-01", { - get: function get() { - var model = __nccwpck_require__(27577); - model.paginators = __nccwpck_require__(12243) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.Honeycode; - - /***/ - }, - - /***/ 50058: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["iam"] = {}; - AWS.IAM = Service.defineService("iam", ["2010-05-08"]); - Object.defineProperty(apiLoader.services["iam"], "2010-05-08", { - get: function get() { - var model = __nccwpck_require__(27041); - model.paginators = __nccwpck_require__(97583) /* .pagination */.o; - model.waiters = __nccwpck_require__(37757) /* .waiters */.V; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.IAM; - - /***/ - }, - - /***/ 60222: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["identitystore"] = {}; - AWS.IdentityStore = Service.defineService("identitystore", [ - "2020-06-15", - ]); - Object.defineProperty(apiLoader.services["identitystore"], "2020-06-15", { - get: function get() { - var model = __nccwpck_require__(75797); - model.paginators = __nccwpck_require__(44872) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.IdentityStore; - - /***/ - }, - - /***/ 57511: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["imagebuilder"] = {}; - AWS.Imagebuilder = Service.defineService("imagebuilder", ["2019-12-02"]); - Object.defineProperty(apiLoader.services["imagebuilder"], "2019-12-02", { - get: function get() { - var model = __nccwpck_require__(98139); - model.paginators = __nccwpck_require__(60410) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.Imagebuilder; - - /***/ - }, - - /***/ 6769: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["importexport"] = {}; - AWS.ImportExport = Service.defineService("importexport", ["2010-06-01"]); - Object.defineProperty(apiLoader.services["importexport"], "2010-06-01", { - get: function get() { - var model = __nccwpck_require__(80317); - model.paginators = __nccwpck_require__(58037) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.ImportExport; - - /***/ - }, - - /***/ 89439: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["inspector"] = {}; - AWS.Inspector = Service.defineService("inspector", [ - "2015-08-18*", - "2016-02-16", - ]); - Object.defineProperty(apiLoader.services["inspector"], "2016-02-16", { - get: function get() { - var model = __nccwpck_require__(71649); - model.paginators = __nccwpck_require__(69242) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.Inspector; - - /***/ - }, - - /***/ 98392: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["iot"] = {}; - AWS.Iot = Service.defineService("iot", ["2015-05-28"]); - Object.defineProperty(apiLoader.services["iot"], "2015-05-28", { - get: function get() { - var model = __nccwpck_require__(40063); - model.paginators = __nccwpck_require__(43999) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.Iot; - - /***/ - }, - - /***/ 39474: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["iot1clickdevicesservice"] = {}; - AWS.IoT1ClickDevicesService = Service.defineService( - "iot1clickdevicesservice", - ["2018-05-14"] - ); - Object.defineProperty( - apiLoader.services["iot1clickdevicesservice"], - "2018-05-14", - { - get: function get() { - var model = __nccwpck_require__(26663); - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.IoT1ClickDevicesService; - - /***/ - }, - - /***/ 4686: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["iot1clickprojects"] = {}; - AWS.IoT1ClickProjects = Service.defineService("iot1clickprojects", [ - "2018-05-14", - ]); - Object.defineProperty( - apiLoader.services["iot1clickprojects"], - "2018-05-14", - { - get: function get() { - var model = __nccwpck_require__(17364); - model.paginators = __nccwpck_require__(54033) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.IoT1ClickProjects; - - /***/ - }, - - /***/ 67409: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["iotanalytics"] = {}; - AWS.IoTAnalytics = Service.defineService("iotanalytics", ["2017-11-27"]); - Object.defineProperty(apiLoader.services["iotanalytics"], "2017-11-27", { - get: function get() { - var model = __nccwpck_require__(84609); - model.paginators = __nccwpck_require__(45498) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.IoTAnalytics; - - /***/ - }, - - /***/ 6564: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["iotdata"] = {}; - AWS.IotData = Service.defineService("iotdata", ["2015-05-28"]); - __nccwpck_require__(27062); - Object.defineProperty(apiLoader.services["iotdata"], "2015-05-28", { - get: function get() { - var model = __nccwpck_require__(21717); - model.paginators = __nccwpck_require__(31896) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.IotData; - - /***/ - }, - - /***/ 97569: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["iotdeviceadvisor"] = {}; - AWS.IotDeviceAdvisor = Service.defineService("iotdeviceadvisor", [ - "2020-09-18", - ]); - Object.defineProperty( - apiLoader.services["iotdeviceadvisor"], - "2020-09-18", - { - get: function get() { - var model = __nccwpck_require__(71394); - model.paginators = __nccwpck_require__(49057) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.IotDeviceAdvisor; - - /***/ - }, - - /***/ 88065: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["iotevents"] = {}; - AWS.IoTEvents = Service.defineService("iotevents", ["2018-07-27"]); - Object.defineProperty(apiLoader.services["iotevents"], "2018-07-27", { - get: function get() { - var model = __nccwpck_require__(4483); - model.paginators = __nccwpck_require__(39844) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.IoTEvents; - - /***/ - }, - - /***/ 56973: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["ioteventsdata"] = {}; - AWS.IoTEventsData = Service.defineService("ioteventsdata", [ - "2018-10-23", - ]); - Object.defineProperty(apiLoader.services["ioteventsdata"], "2018-10-23", { - get: function get() { - var model = __nccwpck_require__(94282); - model.paginators = __nccwpck_require__(11632) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.IoTEventsData; - - /***/ - }, - - /***/ 42513: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["iotfleethub"] = {}; - AWS.IoTFleetHub = Service.defineService("iotfleethub", ["2020-11-03"]); - Object.defineProperty(apiLoader.services["iotfleethub"], "2020-11-03", { - get: function get() { - var model = __nccwpck_require__(56534); - model.paginators = __nccwpck_require__(76120) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.IoTFleetHub; - - /***/ - }, - - /***/ 42332: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["iotjobsdataplane"] = {}; - AWS.IoTJobsDataPlane = Service.defineService("iotjobsdataplane", [ - "2017-09-29", - ]); - Object.defineProperty( - apiLoader.services["iotjobsdataplane"], - "2017-09-29", - { - get: function get() { - var model = __nccwpck_require__(12147); - model.paginators = __nccwpck_require__(58593) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.IoTJobsDataPlane; - - /***/ - }, - - /***/ 98562: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["iotsecuretunneling"] = {}; - AWS.IoTSecureTunneling = Service.defineService("iotsecuretunneling", [ - "2018-10-05", - ]); - Object.defineProperty( - apiLoader.services["iotsecuretunneling"], - "2018-10-05", - { - get: function get() { - var model = __nccwpck_require__(99946); - model.paginators = __nccwpck_require__(97884) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.IoTSecureTunneling; - - /***/ - }, - - /***/ 89690: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["iotsitewise"] = {}; - AWS.IoTSiteWise = Service.defineService("iotsitewise", ["2019-12-02"]); - Object.defineProperty(apiLoader.services["iotsitewise"], "2019-12-02", { - get: function get() { - var model = __nccwpck_require__(44429); - model.paginators = __nccwpck_require__(27558) /* .pagination */.o; - model.waiters = __nccwpck_require__(80458) /* .waiters */.V; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.IoTSiteWise; - - /***/ - }, - - /***/ 58905: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["iotthingsgraph"] = {}; - AWS.IoTThingsGraph = Service.defineService("iotthingsgraph", [ - "2018-09-06", - ]); - Object.defineProperty( - apiLoader.services["iotthingsgraph"], - "2018-09-06", - { - get: function get() { - var model = __nccwpck_require__(84893); - model.paginators = __nccwpck_require__(99418) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.IoTThingsGraph; - - /***/ - }, - - /***/ 8226: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["iotwireless"] = {}; - AWS.IoTWireless = Service.defineService("iotwireless", ["2020-11-22"]); - Object.defineProperty(apiLoader.services["iotwireless"], "2020-11-22", { - get: function get() { - var model = __nccwpck_require__(78052); - model.paginators = __nccwpck_require__(13156) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.IoTWireless; - - /***/ - }, - - /***/ 67701: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["ivs"] = {}; - AWS.IVS = Service.defineService("ivs", ["2020-07-14"]); - Object.defineProperty(apiLoader.services["ivs"], "2020-07-14", { - get: function get() { - var model = __nccwpck_require__(34175); - model.paginators = __nccwpck_require__(45289) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.IVS; - - /***/ - }, - - /***/ 56775: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["kafka"] = {}; - AWS.Kafka = Service.defineService("kafka", ["2018-11-14"]); - Object.defineProperty(apiLoader.services["kafka"], "2018-11-14", { - get: function get() { - var model = __nccwpck_require__(38473); - model.paginators = __nccwpck_require__(79729) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.Kafka; - - /***/ - }, - - /***/ 66122: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["kendra"] = {}; - AWS.Kendra = Service.defineService("kendra", ["2019-02-03"]); - Object.defineProperty(apiLoader.services["kendra"], "2019-02-03", { - get: function get() { - var model = __nccwpck_require__(80100); - model.paginators = __nccwpck_require__(64519) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.Kendra; - - /***/ - }, - - /***/ 49876: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["kinesis"] = {}; - AWS.Kinesis = Service.defineService("kinesis", ["2013-12-02"]); - Object.defineProperty(apiLoader.services["kinesis"], "2013-12-02", { - get: function get() { - var model = __nccwpck_require__(648); - model.paginators = __nccwpck_require__(10424) /* .pagination */.o; - model.waiters = __nccwpck_require__(54059) /* .waiters */.V; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.Kinesis; - - /***/ - }, - - /***/ 90042: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["kinesisanalytics"] = {}; - AWS.KinesisAnalytics = Service.defineService("kinesisanalytics", [ - "2015-08-14", - ]); - Object.defineProperty( - apiLoader.services["kinesisanalytics"], - "2015-08-14", - { - get: function get() { - var model = __nccwpck_require__(72653); - model.paginators = __nccwpck_require__(73535) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.KinesisAnalytics; - - /***/ - }, - - /***/ 74631: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["kinesisanalyticsv2"] = {}; - AWS.KinesisAnalyticsV2 = Service.defineService("kinesisanalyticsv2", [ - "2018-05-23", - ]); - Object.defineProperty( - apiLoader.services["kinesisanalyticsv2"], - "2018-05-23", - { - get: function get() { - var model = __nccwpck_require__(56485); - model.paginators = __nccwpck_require__(52495) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.KinesisAnalyticsV2; - - /***/ - }, - - /***/ 89927: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["kinesisvideo"] = {}; - AWS.KinesisVideo = Service.defineService("kinesisvideo", ["2017-09-30"]); - Object.defineProperty(apiLoader.services["kinesisvideo"], "2017-09-30", { - get: function get() { - var model = __nccwpck_require__(96305); - model.paginators = __nccwpck_require__(50061) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.KinesisVideo; - - /***/ - }, - - /***/ 5580: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["kinesisvideoarchivedmedia"] = {}; - AWS.KinesisVideoArchivedMedia = Service.defineService( - "kinesisvideoarchivedmedia", - ["2017-09-30"] - ); - Object.defineProperty( - apiLoader.services["kinesisvideoarchivedmedia"], - "2017-09-30", - { - get: function get() { - var model = __nccwpck_require__(78868); - model.paginators = __nccwpck_require__(27352) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.KinesisVideoArchivedMedia; - - /***/ - }, - - /***/ 81308: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["kinesisvideomedia"] = {}; - AWS.KinesisVideoMedia = Service.defineService("kinesisvideomedia", [ - "2017-09-30", - ]); - Object.defineProperty( - apiLoader.services["kinesisvideomedia"], - "2017-09-30", - { - get: function get() { - var model = __nccwpck_require__(18898); - model.paginators = __nccwpck_require__(85061) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.KinesisVideoMedia; - - /***/ - }, - - /***/ 12710: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["kinesisvideosignalingchannels"] = {}; - AWS.KinesisVideoSignalingChannels = Service.defineService( - "kinesisvideosignalingchannels", - ["2019-12-04"] - ); - Object.defineProperty( - apiLoader.services["kinesisvideosignalingchannels"], - "2019-12-04", - { - get: function get() { - var model = __nccwpck_require__(89769); - model.paginators = __nccwpck_require__(41939) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.KinesisVideoSignalingChannels; - - /***/ - }, - - /***/ 56782: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["kms"] = {}; - AWS.KMS = Service.defineService("kms", ["2014-11-01"]); - Object.defineProperty(apiLoader.services["kms"], "2014-11-01", { - get: function get() { - var model = __nccwpck_require__(1219); - model.paginators = __nccwpck_require__(71402) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.KMS; - - /***/ - }, - - /***/ 6726: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["lakeformation"] = {}; - AWS.LakeFormation = Service.defineService("lakeformation", [ - "2017-03-31", - ]); - Object.defineProperty(apiLoader.services["lakeformation"], "2017-03-31", { - get: function get() { - var model = __nccwpck_require__(82210); - model.paginators = __nccwpck_require__(61488) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.LakeFormation; - - /***/ - }, - - /***/ 13321: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["lambda"] = {}; - AWS.Lambda = Service.defineService("lambda", [ - "2014-11-11", - "2015-03-31", - ]); - __nccwpck_require__(8452); - Object.defineProperty(apiLoader.services["lambda"], "2014-11-11", { - get: function get() { - var model = __nccwpck_require__(91251); - model.paginators = __nccwpck_require__(79210) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - Object.defineProperty(apiLoader.services["lambda"], "2015-03-31", { - get: function get() { - var model = __nccwpck_require__(29103); - model.paginators = __nccwpck_require__(32057) /* .pagination */.o; - model.waiters = __nccwpck_require__(40626) /* .waiters */.V; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.Lambda; - - /***/ - }, - - /***/ 37397: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["lexmodelbuildingservice"] = {}; - AWS.LexModelBuildingService = Service.defineService( - "lexmodelbuildingservice", - ["2017-04-19"] - ); - Object.defineProperty( - apiLoader.services["lexmodelbuildingservice"], - "2017-04-19", - { - get: function get() { - var model = __nccwpck_require__(96327); - model.paginators = __nccwpck_require__(12348) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.LexModelBuildingService; - - /***/ - }, - - /***/ 62716: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["lexruntime"] = {}; - AWS.LexRuntime = Service.defineService("lexruntime", ["2016-11-28"]); - Object.defineProperty(apiLoader.services["lexruntime"], "2016-11-28", { - get: function get() { - var model = __nccwpck_require__(11059); - model.paginators = __nccwpck_require__(97715) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.LexRuntime; - - /***/ - }, - - /***/ 34693: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["licensemanager"] = {}; - AWS.LicenseManager = Service.defineService("licensemanager", [ - "2018-08-01", - ]); - Object.defineProperty( - apiLoader.services["licensemanager"], - "2018-08-01", - { - get: function get() { - var model = __nccwpck_require__(19160); - model.paginators = __nccwpck_require__(77552) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.LicenseManager; - - /***/ - }, - - /***/ 22718: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["lightsail"] = {}; - AWS.Lightsail = Service.defineService("lightsail", ["2016-11-28"]); - Object.defineProperty(apiLoader.services["lightsail"], "2016-11-28", { - get: function get() { - var model = __nccwpck_require__(94784); - model.paginators = __nccwpck_require__(17528) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.Lightsail; - - /***/ - }, - - /***/ 44594: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["location"] = {}; - AWS.Location = Service.defineService("location", ["2020-11-19"]); - Object.defineProperty(apiLoader.services["location"], "2020-11-19", { - get: function get() { - var model = __nccwpck_require__(79257); - model.paginators = __nccwpck_require__(53350) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.Location; - - /***/ - }, - - /***/ 65046: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["lookoutvision"] = {}; - AWS.LookoutVision = Service.defineService("lookoutvision", [ - "2020-11-20", - ]); - Object.defineProperty(apiLoader.services["lookoutvision"], "2020-11-20", { - get: function get() { - var model = __nccwpck_require__(15110); - model.paginators = __nccwpck_require__(45644) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.LookoutVision; - - /***/ - }, - - /***/ 82907: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["machinelearning"] = {}; - AWS.MachineLearning = Service.defineService("machinelearning", [ - "2014-12-12", - ]); - __nccwpck_require__(19174); - Object.defineProperty( - apiLoader.services["machinelearning"], - "2014-12-12", - { - get: function get() { - var model = __nccwpck_require__(4069); - model.paginators = __nccwpck_require__(95535) /* .pagination */.o; - model.waiters = __nccwpck_require__(23194) /* .waiters */.V; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.MachineLearning; - - /***/ - }, - - /***/ 86427: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["macie"] = {}; - AWS.Macie = Service.defineService("macie", ["2017-12-19"]); - Object.defineProperty(apiLoader.services["macie"], "2017-12-19", { - get: function get() { - var model = __nccwpck_require__(99366); - model.paginators = __nccwpck_require__(34091) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.Macie; - - /***/ - }, - - /***/ 57330: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["macie2"] = {}; - AWS.Macie2 = Service.defineService("macie2", ["2020-01-01"]); - Object.defineProperty(apiLoader.services["macie2"], "2020-01-01", { - get: function get() { - var model = __nccwpck_require__(50847); - model.paginators = __nccwpck_require__(25947) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.Macie2; - - /***/ - }, - - /***/ 85143: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["managedblockchain"] = {}; - AWS.ManagedBlockchain = Service.defineService("managedblockchain", [ - "2018-09-24", - ]); - Object.defineProperty( - apiLoader.services["managedblockchain"], - "2018-09-24", - { - get: function get() { - var model = __nccwpck_require__(31229); - model.paginators = __nccwpck_require__(57358) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.ManagedBlockchain; - - /***/ - }, - - /***/ 2609: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["marketplacecatalog"] = {}; - AWS.MarketplaceCatalog = Service.defineService("marketplacecatalog", [ - "2018-09-17", - ]); - Object.defineProperty( - apiLoader.services["marketplacecatalog"], - "2018-09-17", - { - get: function get() { - var model = __nccwpck_require__(87122); - model.paginators = __nccwpck_require__(30187) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.MarketplaceCatalog; - - /***/ - }, - - /***/ 4540: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["marketplacecommerceanalytics"] = {}; - AWS.MarketplaceCommerceAnalytics = Service.defineService( - "marketplacecommerceanalytics", - ["2015-07-01"] - ); - Object.defineProperty( - apiLoader.services["marketplacecommerceanalytics"], - "2015-07-01", - { - get: function get() { - var model = __nccwpck_require__(96696); - model.paginators = __nccwpck_require__(43265) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.MarketplaceCommerceAnalytics; - - /***/ - }, - - /***/ 53707: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["marketplaceentitlementservice"] = {}; - AWS.MarketplaceEntitlementService = Service.defineService( - "marketplaceentitlementservice", - ["2017-01-11"] - ); - Object.defineProperty( - apiLoader.services["marketplaceentitlementservice"], - "2017-01-11", - { - get: function get() { - var model = __nccwpck_require__(64253); - model.paginators = __nccwpck_require__(67012) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.MarketplaceEntitlementService; - - /***/ - }, - - /***/ 39297: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["marketplacemetering"] = {}; - AWS.MarketplaceMetering = Service.defineService("marketplacemetering", [ - "2016-01-14", - ]); - Object.defineProperty( - apiLoader.services["marketplacemetering"], - "2016-01-14", - { - get: function get() { - var model = __nccwpck_require__(43027); - model.paginators = __nccwpck_require__(4843) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.MarketplaceMetering; - - /***/ - }, - - /***/ 67639: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["mediaconnect"] = {}; - AWS.MediaConnect = Service.defineService("mediaconnect", ["2018-11-14"]); - Object.defineProperty(apiLoader.services["mediaconnect"], "2018-11-14", { - get: function get() { - var model = __nccwpck_require__(85245); - model.paginators = __nccwpck_require__(68160) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.MediaConnect; - - /***/ - }, - - /***/ 57220: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["mediaconvert"] = {}; - AWS.MediaConvert = Service.defineService("mediaconvert", ["2017-08-29"]); - Object.defineProperty(apiLoader.services["mediaconvert"], "2017-08-29", { - get: function get() { - var model = __nccwpck_require__(41924); - model.paginators = __nccwpck_require__(14179) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.MediaConvert; - - /***/ - }, - - /***/ 7509: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["medialive"] = {}; - AWS.MediaLive = Service.defineService("medialive", ["2017-10-14"]); - Object.defineProperty(apiLoader.services["medialive"], "2017-10-14", { - get: function get() { - var model = __nccwpck_require__(32326); - model.paginators = __nccwpck_require__(84652) /* .pagination */.o; - model.waiters = __nccwpck_require__(17259) /* .waiters */.V; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.MediaLive; - - /***/ - }, - - /***/ 91620: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["mediapackage"] = {}; - AWS.MediaPackage = Service.defineService("mediapackage", ["2017-10-12"]); - Object.defineProperty(apiLoader.services["mediapackage"], "2017-10-12", { - get: function get() { - var model = __nccwpck_require__(51261); - model.paginators = __nccwpck_require__(48933) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.MediaPackage; - - /***/ - }, - - /***/ 14962: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["mediapackagevod"] = {}; - AWS.MediaPackageVod = Service.defineService("mediapackagevod", [ - "2018-11-07", - ]); - Object.defineProperty( - apiLoader.services["mediapackagevod"], - "2018-11-07", - { - get: function get() { - var model = __nccwpck_require__(98877); - model.paginators = __nccwpck_require__(48422) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.MediaPackageVod; - - /***/ - }, - - /***/ 83748: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["mediastore"] = {}; - AWS.MediaStore = Service.defineService("mediastore", ["2017-09-01"]); - Object.defineProperty(apiLoader.services["mediastore"], "2017-09-01", { - get: function get() { - var model = __nccwpck_require__(68901); - model.paginators = __nccwpck_require__(5848) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.MediaStore; - - /***/ - }, - - /***/ 98703: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["mediastoredata"] = {}; - AWS.MediaStoreData = Service.defineService("mediastoredata", [ - "2017-09-01", - ]); - Object.defineProperty( - apiLoader.services["mediastoredata"], - "2017-09-01", - { - get: function get() { - var model = __nccwpck_require__(55081); - model.paginators = __nccwpck_require__(97948) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.MediaStoreData; - - /***/ - }, - - /***/ 99658: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["mediatailor"] = {}; - AWS.MediaTailor = Service.defineService("mediatailor", ["2018-04-23"]); - Object.defineProperty(apiLoader.services["mediatailor"], "2018-04-23", { - get: function get() { - var model = __nccwpck_require__(77511); - model.paginators = __nccwpck_require__(68557) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.MediaTailor; - - /***/ - }, - - /***/ 14688: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["migrationhub"] = {}; - AWS.MigrationHub = Service.defineService("migrationhub", ["2017-05-31"]); - Object.defineProperty(apiLoader.services["migrationhub"], "2017-05-31", { - get: function get() { - var model = __nccwpck_require__(99161); - model.paginators = __nccwpck_require__(27903) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.MigrationHub; - - /***/ - }, - - /***/ 62658: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["migrationhubconfig"] = {}; - AWS.MigrationHubConfig = Service.defineService("migrationhubconfig", [ - "2019-06-30", - ]); - Object.defineProperty( - apiLoader.services["migrationhubconfig"], - "2019-06-30", - { - get: function get() { - var model = __nccwpck_require__(59734); - model.paginators = __nccwpck_require__(51497) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.MigrationHubConfig; - - /***/ - }, - - /***/ 39782: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["mobile"] = {}; - AWS.Mobile = Service.defineService("mobile", ["2017-07-01"]); - Object.defineProperty(apiLoader.services["mobile"], "2017-07-01", { - get: function get() { - var model = __nccwpck_require__(51691); - model.paginators = __nccwpck_require__(43522) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.Mobile; - - /***/ - }, - - /***/ 66690: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["mobileanalytics"] = {}; - AWS.MobileAnalytics = Service.defineService("mobileanalytics", [ - "2014-06-05", - ]); - Object.defineProperty( - apiLoader.services["mobileanalytics"], - "2014-06-05", - { - get: function get() { - var model = __nccwpck_require__(90338); - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.MobileAnalytics; - - /***/ - }, - - /***/ 23093: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["mq"] = {}; - AWS.MQ = Service.defineService("mq", ["2017-11-27"]); - Object.defineProperty(apiLoader.services["mq"], "2017-11-27", { - get: function get() { - var model = __nccwpck_require__(35102); - model.paginators = __nccwpck_require__(46095) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.MQ; - - /***/ - }, - - /***/ 79954: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["mturk"] = {}; - AWS.MTurk = Service.defineService("mturk", ["2017-01-17"]); - Object.defineProperty(apiLoader.services["mturk"], "2017-01-17", { - get: function get() { - var model = __nccwpck_require__(73064); - model.paginators = __nccwpck_require__(42409) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.MTurk; - - /***/ - }, - - /***/ 32712: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["mwaa"] = {}; - AWS.MWAA = Service.defineService("mwaa", ["2020-07-01"]); - Object.defineProperty(apiLoader.services["mwaa"], "2020-07-01", { - get: function get() { - var model = __nccwpck_require__(56612); - model.paginators = __nccwpck_require__(11793) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.MWAA; - - /***/ - }, - - /***/ 30047: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["neptune"] = {}; - AWS.Neptune = Service.defineService("neptune", ["2014-10-31"]); - Object.defineProperty(apiLoader.services["neptune"], "2014-10-31", { - get: function get() { - var model = __nccwpck_require__(50018); - model.paginators = __nccwpck_require__(62952) /* .pagination */.o; - model.waiters = __nccwpck_require__(8127) /* .waiters */.V; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.Neptune; - - /***/ - }, - - /***/ 84626: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["networkfirewall"] = {}; - AWS.NetworkFirewall = Service.defineService("networkfirewall", [ - "2020-11-12", - ]); - Object.defineProperty( - apiLoader.services["networkfirewall"], - "2020-11-12", - { - get: function get() { - var model = __nccwpck_require__(63757); - model.paginators = __nccwpck_require__(74798) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.NetworkFirewall; - - /***/ - }, - - /***/ 37610: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["networkmanager"] = {}; - AWS.NetworkManager = Service.defineService("networkmanager", [ - "2019-07-05", - ]); - Object.defineProperty( - apiLoader.services["networkmanager"], - "2019-07-05", - { - get: function get() { - var model = __nccwpck_require__(10151); - model.paginators = __nccwpck_require__(68278) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.NetworkManager; - - /***/ - }, - - /***/ 75691: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["opsworks"] = {}; - AWS.OpsWorks = Service.defineService("opsworks", ["2013-02-18"]); - Object.defineProperty(apiLoader.services["opsworks"], "2013-02-18", { - get: function get() { - var model = __nccwpck_require__(22805); - model.paginators = __nccwpck_require__(24750) /* .pagination */.o; - model.waiters = __nccwpck_require__(74961) /* .waiters */.V; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.OpsWorks; - - /***/ - }, - - /***/ 80388: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["opsworkscm"] = {}; - AWS.OpsWorksCM = Service.defineService("opsworkscm", ["2016-11-01"]); - Object.defineProperty(apiLoader.services["opsworkscm"], "2016-11-01", { - get: function get() { - var model = __nccwpck_require__(56705); - model.paginators = __nccwpck_require__(49463) /* .pagination */.o; - model.waiters = __nccwpck_require__(65003) /* .waiters */.V; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.OpsWorksCM; - - /***/ - }, - - /***/ 52560: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["organizations"] = {}; - AWS.Organizations = Service.defineService("organizations", [ - "2016-11-28", - ]); - Object.defineProperty(apiLoader.services["organizations"], "2016-11-28", { - get: function get() { - var model = __nccwpck_require__(58874); - model.paginators = __nccwpck_require__(43261) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.Organizations; - - /***/ - }, - - /***/ 27551: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["outposts"] = {}; - AWS.Outposts = Service.defineService("outposts", ["2019-12-03"]); - Object.defineProperty(apiLoader.services["outposts"], "2019-12-03", { - get: function get() { - var model = __nccwpck_require__(4807); - model.paginators = __nccwpck_require__(3364) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.Outposts; - - /***/ - }, - - /***/ 33696: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["personalize"] = {}; - AWS.Personalize = Service.defineService("personalize", ["2018-05-22"]); - Object.defineProperty(apiLoader.services["personalize"], "2018-05-22", { - get: function get() { - var model = __nccwpck_require__(70169); - model.paginators = __nccwpck_require__(64441) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.Personalize; - - /***/ - }, - - /***/ 88170: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["personalizeevents"] = {}; - AWS.PersonalizeEvents = Service.defineService("personalizeevents", [ - "2018-03-22", - ]); - Object.defineProperty( - apiLoader.services["personalizeevents"], - "2018-03-22", - { - get: function get() { - var model = __nccwpck_require__(3606); - model.paginators = __nccwpck_require__(94507) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.PersonalizeEvents; - - /***/ - }, - - /***/ 66184: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["personalizeruntime"] = {}; - AWS.PersonalizeRuntime = Service.defineService("personalizeruntime", [ - "2018-05-22", - ]); - Object.defineProperty( - apiLoader.services["personalizeruntime"], - "2018-05-22", - { - get: function get() { - var model = __nccwpck_require__(18824); - model.paginators = __nccwpck_require__(8069) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.PersonalizeRuntime; - - /***/ - }, - - /***/ 15505: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["pi"] = {}; - AWS.PI = Service.defineService("pi", ["2018-02-27"]); - Object.defineProperty(apiLoader.services["pi"], "2018-02-27", { - get: function get() { - var model = __nccwpck_require__(18761); - model.paginators = __nccwpck_require__(84882) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.PI; - - /***/ - }, - - /***/ 18388: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["pinpoint"] = {}; - AWS.Pinpoint = Service.defineService("pinpoint", ["2016-12-01"]); - Object.defineProperty(apiLoader.services["pinpoint"], "2016-12-01", { - get: function get() { - var model = __nccwpck_require__(40605); - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.Pinpoint; - - /***/ - }, - - /***/ 83060: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["pinpointemail"] = {}; - AWS.PinpointEmail = Service.defineService("pinpointemail", [ - "2018-07-26", - ]); - Object.defineProperty(apiLoader.services["pinpointemail"], "2018-07-26", { - get: function get() { - var model = __nccwpck_require__(55228); - model.paginators = __nccwpck_require__(45172) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.PinpointEmail; - - /***/ - }, - - /***/ 46605: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["pinpointsmsvoice"] = {}; - AWS.PinpointSMSVoice = Service.defineService("pinpointsmsvoice", [ - "2018-09-05", - ]); - Object.defineProperty( - apiLoader.services["pinpointsmsvoice"], - "2018-09-05", - { - get: function get() { - var model = __nccwpck_require__(98689); - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.PinpointSMSVoice; - - /***/ - }, - - /***/ 97332: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["polly"] = {}; - AWS.Polly = Service.defineService("polly", ["2016-06-10"]); - __nccwpck_require__(53199); - Object.defineProperty(apiLoader.services["polly"], "2016-06-10", { - get: function get() { - var model = __nccwpck_require__(55078); - model.paginators = __nccwpck_require__(77060) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.Polly; - - /***/ - }, - - /***/ 92765: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["pricing"] = {}; - AWS.Pricing = Service.defineService("pricing", ["2017-10-15"]); - Object.defineProperty(apiLoader.services["pricing"], "2017-10-15", { - get: function get() { - var model = __nccwpck_require__(22484); - model.paginators = __nccwpck_require__(60369) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.Pricing; - - /***/ - }, - - /***/ 71266: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["qldb"] = {}; - AWS.QLDB = Service.defineService("qldb", ["2019-01-02"]); - Object.defineProperty(apiLoader.services["qldb"], "2019-01-02", { - get: function get() { - var model = __nccwpck_require__(71346); - model.paginators = __nccwpck_require__(34265) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.QLDB; - - /***/ - }, - - /***/ 55423: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["qldbsession"] = {}; - AWS.QLDBSession = Service.defineService("qldbsession", ["2019-07-11"]); - Object.defineProperty(apiLoader.services["qldbsession"], "2019-07-11", { - get: function get() { - var model = __nccwpck_require__(60040); - model.paginators = __nccwpck_require__(61051) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.QLDBSession; - - /***/ - }, - - /***/ 29898: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["quicksight"] = {}; - AWS.QuickSight = Service.defineService("quicksight", ["2018-04-01"]); - Object.defineProperty(apiLoader.services["quicksight"], "2018-04-01", { - get: function get() { - var model = __nccwpck_require__(8419); - model.paginators = __nccwpck_require__(43387) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.QuickSight; - - /***/ - }, - - /***/ 94394: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["ram"] = {}; - AWS.RAM = Service.defineService("ram", ["2018-01-04"]); - Object.defineProperty(apiLoader.services["ram"], "2018-01-04", { - get: function get() { - var model = __nccwpck_require__(61375); - model.paginators = __nccwpck_require__(85336) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.RAM; - - /***/ - }, - - /***/ 71578: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["rds"] = {}; - AWS.RDS = Service.defineService("rds", [ - "2013-01-10", - "2013-02-12", - "2013-09-09", - "2014-09-01", - "2014-09-01*", - "2014-10-31", - ]); - __nccwpck_require__(71928); - Object.defineProperty(apiLoader.services["rds"], "2013-01-10", { - get: function get() { - var model = __nccwpck_require__(59989); - model.paginators = __nccwpck_require__(978) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - Object.defineProperty(apiLoader.services["rds"], "2013-02-12", { - get: function get() { - var model = __nccwpck_require__(55061); - model.paginators = __nccwpck_require__(39581) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - Object.defineProperty(apiLoader.services["rds"], "2013-09-09", { - get: function get() { - var model = __nccwpck_require__(36331); - model.paginators = __nccwpck_require__(14485) /* .pagination */.o; - model.waiters = __nccwpck_require__(36851) /* .waiters */.V; - return model; - }, - enumerable: true, - configurable: true, - }); - Object.defineProperty(apiLoader.services["rds"], "2014-09-01", { - get: function get() { - var model = __nccwpck_require__(19226); - model.paginators = __nccwpck_require__(49863) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - Object.defineProperty(apiLoader.services["rds"], "2014-10-31", { - get: function get() { - var model = __nccwpck_require__(91916); - model.paginators = __nccwpck_require__(85082) /* .pagination */.o; - model.waiters = __nccwpck_require__(20371) /* .waiters */.V; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.RDS; - - /***/ - }, - - /***/ 30147: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["rdsdataservice"] = {}; - AWS.RDSDataService = Service.defineService("rdsdataservice", [ - "2018-08-01", - ]); - __nccwpck_require__(64070); - Object.defineProperty( - apiLoader.services["rdsdataservice"], - "2018-08-01", - { - get: function get() { - var model = __nccwpck_require__(13559); - model.paginators = __nccwpck_require__(41160) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.RDSDataService; - - /***/ - }, - - /***/ 84853: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["redshift"] = {}; - AWS.Redshift = Service.defineService("redshift", ["2012-12-01"]); - Object.defineProperty(apiLoader.services["redshift"], "2012-12-01", { - get: function get() { - var model = __nccwpck_require__(24827); - model.paginators = __nccwpck_require__(88012) /* .pagination */.o; - model.waiters = __nccwpck_require__(79011) /* .waiters */.V; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.Redshift; - - /***/ - }, - - /***/ 203: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["redshiftdata"] = {}; - AWS.RedshiftData = Service.defineService("redshiftdata", ["2019-12-20"]); - Object.defineProperty(apiLoader.services["redshiftdata"], "2019-12-20", { - get: function get() { - var model = __nccwpck_require__(85203); - model.paginators = __nccwpck_require__(27797) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.RedshiftData; - - /***/ - }, - - /***/ 65470: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["rekognition"] = {}; - AWS.Rekognition = Service.defineService("rekognition", ["2016-06-27"]); - Object.defineProperty(apiLoader.services["rekognition"], "2016-06-27", { - get: function get() { - var model = __nccwpck_require__(66442); - model.paginators = __nccwpck_require__(37753) /* .pagination */.o; - model.waiters = __nccwpck_require__(78910) /* .waiters */.V; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.Rekognition; - - /***/ - }, - - /***/ 58756: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["resourcegroups"] = {}; - AWS.ResourceGroups = Service.defineService("resourcegroups", [ - "2017-11-27", - ]); - Object.defineProperty( - apiLoader.services["resourcegroups"], - "2017-11-27", - { - get: function get() { - var model = __nccwpck_require__(73621); - model.paginators = __nccwpck_require__(24085) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.ResourceGroups; - - /***/ - }, - - /***/ 7385: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["resourcegroupstaggingapi"] = {}; - AWS.ResourceGroupsTaggingAPI = Service.defineService( - "resourcegroupstaggingapi", - ["2017-01-26"] - ); - Object.defineProperty( - apiLoader.services["resourcegroupstaggingapi"], - "2017-01-26", - { - get: function get() { - var model = __nccwpck_require__(71720); - model.paginators = __nccwpck_require__(36635) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.ResourceGroupsTaggingAPI; - - /***/ - }, - - /***/ 18068: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["robomaker"] = {}; - AWS.RoboMaker = Service.defineService("robomaker", ["2018-06-29"]); - Object.defineProperty(apiLoader.services["robomaker"], "2018-06-29", { - get: function get() { - var model = __nccwpck_require__(6904); - model.paginators = __nccwpck_require__(43495) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.RoboMaker; - - /***/ - }, - - /***/ 44968: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["route53"] = {}; - AWS.Route53 = Service.defineService("route53", ["2013-04-01"]); - __nccwpck_require__(69627); - Object.defineProperty(apiLoader.services["route53"], "2013-04-01", { - get: function get() { - var model = __nccwpck_require__(20959); - model.paginators = __nccwpck_require__(46456) /* .pagination */.o; - model.waiters = __nccwpck_require__(28347) /* .waiters */.V; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.Route53; - - /***/ - }, - - /***/ 51994: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["route53domains"] = {}; - AWS.Route53Domains = Service.defineService("route53domains", [ - "2014-05-15", - ]); - Object.defineProperty( - apiLoader.services["route53domains"], - "2014-05-15", - { - get: function get() { - var model = __nccwpck_require__(57598); - model.paginators = __nccwpck_require__(52189) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.Route53Domains; - - /***/ - }, - - /***/ 25894: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["route53resolver"] = {}; - AWS.Route53Resolver = Service.defineService("route53resolver", [ - "2018-04-01", - ]); - Object.defineProperty( - apiLoader.services["route53resolver"], - "2018-04-01", - { - get: function get() { - var model = __nccwpck_require__(89229); - model.paginators = __nccwpck_require__(95050) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.Route53Resolver; - - /***/ - }, - - /***/ 83256: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["s3"] = {}; - AWS.S3 = Service.defineService("s3", ["2006-03-01"]); - __nccwpck_require__(26543); - Object.defineProperty(apiLoader.services["s3"], "2006-03-01", { - get: function get() { - var model = __nccwpck_require__(1129); - model.paginators = __nccwpck_require__(7265) /* .pagination */.o; - model.waiters = __nccwpck_require__(74048) /* .waiters */.V; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.S3; - - /***/ - }, - - /***/ 99817: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["s3control"] = {}; - AWS.S3Control = Service.defineService("s3control", ["2018-08-20"]); - __nccwpck_require__(71207); - Object.defineProperty(apiLoader.services["s3control"], "2018-08-20", { - get: function get() { - var model = __nccwpck_require__(1201); - model.paginators = __nccwpck_require__(55527) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.S3Control; - - /***/ - }, - - /***/ 90493: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["s3outposts"] = {}; - AWS.S3Outposts = Service.defineService("s3outposts", ["2017-07-25"]); - Object.defineProperty(apiLoader.services["s3outposts"], "2017-07-25", { - get: function get() { - var model = __nccwpck_require__(79971); - model.paginators = __nccwpck_require__(32505) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.S3Outposts; - - /***/ - }, - - /***/ 77657: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["sagemaker"] = {}; - AWS.SageMaker = Service.defineService("sagemaker", ["2017-07-24"]); - Object.defineProperty(apiLoader.services["sagemaker"], "2017-07-24", { - get: function get() { - var model = __nccwpck_require__(71132); - model.paginators = __nccwpck_require__(69254) /* .pagination */.o; - model.waiters = __nccwpck_require__(80824) /* .waiters */.V; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.SageMaker; - - /***/ - }, - - /***/ 38966: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["sagemakeredge"] = {}; - AWS.SagemakerEdge = Service.defineService("sagemakeredge", [ - "2020-09-23", - ]); - Object.defineProperty(apiLoader.services["sagemakeredge"], "2020-09-23", { - get: function get() { - var model = __nccwpck_require__(97093); - model.paginators = __nccwpck_require__(71636) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.SagemakerEdge; - - /***/ - }, - - /***/ 67644: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["sagemakerfeaturestoreruntime"] = {}; - AWS.SageMakerFeatureStoreRuntime = Service.defineService( - "sagemakerfeaturestoreruntime", - ["2020-07-01"] - ); - Object.defineProperty( - apiLoader.services["sagemakerfeaturestoreruntime"], - "2020-07-01", - { - get: function get() { - var model = __nccwpck_require__(75546); - model.paginators = __nccwpck_require__(12151) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.SageMakerFeatureStoreRuntime; - - /***/ - }, - - /***/ 85044: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["sagemakerruntime"] = {}; - AWS.SageMakerRuntime = Service.defineService("sagemakerruntime", [ - "2017-05-13", - ]); - Object.defineProperty( - apiLoader.services["sagemakerruntime"], - "2017-05-13", - { - get: function get() { - var model = __nccwpck_require__(27032); - model.paginators = __nccwpck_require__(7570) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.SageMakerRuntime; - - /***/ - }, - - /***/ 62825: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["savingsplans"] = {}; - AWS.SavingsPlans = Service.defineService("savingsplans", ["2019-06-28"]); - Object.defineProperty(apiLoader.services["savingsplans"], "2019-06-28", { - get: function get() { - var model = __nccwpck_require__(46879); - model.paginators = __nccwpck_require__(78998) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.SavingsPlans; - - /***/ - }, - - /***/ 55713: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["schemas"] = {}; - AWS.Schemas = Service.defineService("schemas", ["2019-12-02"]); - Object.defineProperty(apiLoader.services["schemas"], "2019-12-02", { - get: function get() { - var model = __nccwpck_require__(76626); - model.paginators = __nccwpck_require__(34227) /* .pagination */.o; - model.waiters = __nccwpck_require__(62213) /* .waiters */.V; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.Schemas; - - /***/ - }, - - /***/ 85131: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["secretsmanager"] = {}; - AWS.SecretsManager = Service.defineService("secretsmanager", [ - "2017-10-17", - ]); - Object.defineProperty( - apiLoader.services["secretsmanager"], - "2017-10-17", - { - get: function get() { - var model = __nccwpck_require__(89470); - model.paginators = __nccwpck_require__(25613) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.SecretsManager; - - /***/ - }, - - /***/ 21550: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["securityhub"] = {}; - AWS.SecurityHub = Service.defineService("securityhub", ["2018-10-26"]); - Object.defineProperty(apiLoader.services["securityhub"], "2018-10-26", { - get: function get() { - var model = __nccwpck_require__(29208); - model.paginators = __nccwpck_require__(85595) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.SecurityHub; - - /***/ - }, - - /***/ 62402: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["serverlessapplicationrepository"] = {}; - AWS.ServerlessApplicationRepository = Service.defineService( - "serverlessapplicationrepository", - ["2017-09-08"] - ); - Object.defineProperty( - apiLoader.services["serverlessapplicationrepository"], - "2017-09-08", - { - get: function get() { - var model = __nccwpck_require__(68422); - model.paginators = __nccwpck_require__(34864) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.ServerlessApplicationRepository; - - /***/ - }, - - /***/ 822: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["servicecatalog"] = {}; - AWS.ServiceCatalog = Service.defineService("servicecatalog", [ - "2015-12-10", - ]); - Object.defineProperty( - apiLoader.services["servicecatalog"], - "2015-12-10", - { - get: function get() { - var model = __nccwpck_require__(95500); - model.paginators = __nccwpck_require__(21687) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.ServiceCatalog; - - /***/ - }, - - /***/ 79068: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["servicecatalogappregistry"] = {}; - AWS.ServiceCatalogAppRegistry = Service.defineService( - "servicecatalogappregistry", - ["2020-06-24"] - ); - Object.defineProperty( - apiLoader.services["servicecatalogappregistry"], - "2020-06-24", - { - get: function get() { - var model = __nccwpck_require__(25697); - model.paginators = __nccwpck_require__(28893) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.ServiceCatalogAppRegistry; - - /***/ - }, - - /***/ 91569: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["servicediscovery"] = {}; - AWS.ServiceDiscovery = Service.defineService("servicediscovery", [ - "2017-03-14", - ]); - Object.defineProperty( - apiLoader.services["servicediscovery"], - "2017-03-14", - { - get: function get() { - var model = __nccwpck_require__(22361); - model.paginators = __nccwpck_require__(37798) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.ServiceDiscovery; - - /***/ - }, - - /***/ 57800: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["servicequotas"] = {}; - AWS.ServiceQuotas = Service.defineService("servicequotas", [ - "2019-06-24", - ]); - Object.defineProperty(apiLoader.services["servicequotas"], "2019-06-24", { - get: function get() { - var model = __nccwpck_require__(68850); - model.paginators = __nccwpck_require__(63074) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.ServiceQuotas; - - /***/ - }, - - /***/ 46816: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["ses"] = {}; - AWS.SES = Service.defineService("ses", ["2010-12-01"]); - Object.defineProperty(apiLoader.services["ses"], "2010-12-01", { - get: function get() { - var model = __nccwpck_require__(56693); - model.paginators = __nccwpck_require__(9399) /* .pagination */.o; - model.waiters = __nccwpck_require__(98229) /* .waiters */.V; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.SES; - - /***/ - }, - - /***/ 20142: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["sesv2"] = {}; - AWS.SESV2 = Service.defineService("sesv2", ["2019-09-27"]); - Object.defineProperty(apiLoader.services["sesv2"], "2019-09-27", { - get: function get() { - var model = __nccwpck_require__(69754); - model.paginators = __nccwpck_require__(72405) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.SESV2; - - /***/ - }, - - /***/ 20271: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["shield"] = {}; - AWS.Shield = Service.defineService("shield", ["2016-06-02"]); - Object.defineProperty(apiLoader.services["shield"], "2016-06-02", { - get: function get() { - var model = __nccwpck_require__(47061); - model.paginators = __nccwpck_require__(54893) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.Shield; - - /***/ - }, - - /***/ 71596: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["signer"] = {}; - AWS.Signer = Service.defineService("signer", ["2017-08-25"]); - Object.defineProperty(apiLoader.services["signer"], "2017-08-25", { - get: function get() { - var model = __nccwpck_require__(97116); - model.paginators = __nccwpck_require__(81027) /* .pagination */.o; - model.waiters = __nccwpck_require__(48215) /* .waiters */.V; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.Signer; - - /***/ - }, - - /***/ 10120: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["simpledb"] = {}; - AWS.SimpleDB = Service.defineService("simpledb", ["2009-04-15"]); - Object.defineProperty(apiLoader.services["simpledb"], "2009-04-15", { - get: function get() { - var model = __nccwpck_require__(45164); - model.paginators = __nccwpck_require__(55255) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.SimpleDB; - - /***/ - }, - - /***/ 57719: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["sms"] = {}; - AWS.SMS = Service.defineService("sms", ["2016-10-24"]); - Object.defineProperty(apiLoader.services["sms"], "2016-10-24", { - get: function get() { - var model = __nccwpck_require__(26534); - model.paginators = __nccwpck_require__(98730) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.SMS; - - /***/ - }, - - /***/ 510: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["snowball"] = {}; - AWS.Snowball = Service.defineService("snowball", ["2016-06-30"]); - Object.defineProperty(apiLoader.services["snowball"], "2016-06-30", { - get: function get() { - var model = __nccwpck_require__(96822); - model.paginators = __nccwpck_require__(45219) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.Snowball; - - /***/ - }, - - /***/ 28581: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["sns"] = {}; - AWS.SNS = Service.defineService("sns", ["2010-03-31"]); - Object.defineProperty(apiLoader.services["sns"], "2010-03-31", { - get: function get() { - var model = __nccwpck_require__(64387); - model.paginators = __nccwpck_require__(58054) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.SNS; - - /***/ - }, - - /***/ 63172: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["sqs"] = {}; - AWS.SQS = Service.defineService("sqs", ["2012-11-05"]); - __nccwpck_require__(94571); - Object.defineProperty(apiLoader.services["sqs"], "2012-11-05", { - get: function get() { - var model = __nccwpck_require__(53974); - model.paginators = __nccwpck_require__(17249) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.SQS; - - /***/ - }, - - /***/ 83380: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["ssm"] = {}; - AWS.SSM = Service.defineService("ssm", ["2014-11-06"]); - Object.defineProperty(apiLoader.services["ssm"], "2014-11-06", { - get: function get() { - var model = __nccwpck_require__(44596); - model.paginators = __nccwpck_require__(5135) /* .pagination */.o; - model.waiters = __nccwpck_require__(98523) /* .waiters */.V; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.SSM; - - /***/ - }, - - /***/ 71096: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["sso"] = {}; - AWS.SSO = Service.defineService("sso", ["2019-06-10"]); - Object.defineProperty(apiLoader.services["sso"], "2019-06-10", { - get: function get() { - var model = __nccwpck_require__(8027); - model.paginators = __nccwpck_require__(36610) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.SSO; - - /***/ - }, - - /***/ 66644: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["ssoadmin"] = {}; - AWS.SSOAdmin = Service.defineService("ssoadmin", ["2020-07-20"]); - Object.defineProperty(apiLoader.services["ssoadmin"], "2020-07-20", { - get: function get() { - var model = __nccwpck_require__(7239); - model.paginators = __nccwpck_require__(49402) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.SSOAdmin; - - /***/ - }, - - /***/ 49870: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["ssooidc"] = {}; - AWS.SSOOIDC = Service.defineService("ssooidc", ["2019-06-10"]); - Object.defineProperty(apiLoader.services["ssooidc"], "2019-06-10", { - get: function get() { - var model = __nccwpck_require__(62343); - model.paginators = __nccwpck_require__(50215) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.SSOOIDC; - - /***/ - }, - - /***/ 8136: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["stepfunctions"] = {}; - AWS.StepFunctions = Service.defineService("stepfunctions", [ - "2016-11-23", - ]); - Object.defineProperty(apiLoader.services["stepfunctions"], "2016-11-23", { - get: function get() { - var model = __nccwpck_require__(85693); - model.paginators = __nccwpck_require__(24818) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.StepFunctions; - - /***/ - }, - - /***/ 89190: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["storagegateway"] = {}; - AWS.StorageGateway = Service.defineService("storagegateway", [ - "2013-06-30", - ]); - Object.defineProperty( - apiLoader.services["storagegateway"], - "2013-06-30", - { - get: function get() { - var model = __nccwpck_require__(11069); - model.paginators = __nccwpck_require__(33999) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.StorageGateway; - - /***/ - }, - - /***/ 57513: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["sts"] = {}; - AWS.STS = Service.defineService("sts", ["2011-06-15"]); - __nccwpck_require__(91055); - Object.defineProperty(apiLoader.services["sts"], "2011-06-15", { - get: function get() { - var model = __nccwpck_require__(80753); - model.paginators = __nccwpck_require__(93639) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.STS; - - /***/ - }, - - /***/ 1099: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["support"] = {}; - AWS.Support = Service.defineService("support", ["2013-04-15"]); - Object.defineProperty(apiLoader.services["support"], "2013-04-15", { - get: function get() { - var model = __nccwpck_require__(20767); - model.paginators = __nccwpck_require__(62491) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.Support; - - /***/ - }, - - /***/ 32327: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["swf"] = {}; - AWS.SWF = Service.defineService("swf", ["2012-01-25"]); - __nccwpck_require__(31987); - Object.defineProperty(apiLoader.services["swf"], "2012-01-25", { - get: function get() { - var model = __nccwpck_require__(11144); - model.paginators = __nccwpck_require__(48039) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.SWF; - - /***/ - }, - - /***/ 25910: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["synthetics"] = {}; - AWS.Synthetics = Service.defineService("synthetics", ["2017-10-11"]); - Object.defineProperty(apiLoader.services["synthetics"], "2017-10-11", { - get: function get() { - var model = __nccwpck_require__(78752); - model.paginators = __nccwpck_require__(61615) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.Synthetics; - - /***/ - }, - - /***/ 58523: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["textract"] = {}; - AWS.Textract = Service.defineService("textract", ["2018-06-27"]); - Object.defineProperty(apiLoader.services["textract"], "2018-06-27", { - get: function get() { - var model = __nccwpck_require__(49753); - model.paginators = __nccwpck_require__(16270) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.Textract; - - /***/ - }, - - /***/ 24529: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["timestreamquery"] = {}; - AWS.TimestreamQuery = Service.defineService("timestreamquery", [ - "2018-11-01", - ]); - Object.defineProperty( - apiLoader.services["timestreamquery"], - "2018-11-01", - { - get: function get() { - var model = __nccwpck_require__(70457); - model.paginators = __nccwpck_require__(97217) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.TimestreamQuery; - - /***/ - }, - - /***/ 1573: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["timestreamwrite"] = {}; - AWS.TimestreamWrite = Service.defineService("timestreamwrite", [ - "2018-11-01", - ]); - Object.defineProperty( - apiLoader.services["timestreamwrite"], - "2018-11-01", - { - get: function get() { - var model = __nccwpck_require__(8368); - model.paginators = __nccwpck_require__(89653) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.TimestreamWrite; - - /***/ - }, - - /***/ 75811: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["transcribeservice"] = {}; - AWS.TranscribeService = Service.defineService("transcribeservice", [ - "2017-10-26", - ]); - Object.defineProperty( - apiLoader.services["transcribeservice"], - "2017-10-26", - { - get: function get() { - var model = __nccwpck_require__(47294); - model.paginators = __nccwpck_require__(25395) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.TranscribeService; - - /***/ - }, - - /***/ 51585: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["transfer"] = {}; - AWS.Transfer = Service.defineService("transfer", ["2018-11-05"]); - Object.defineProperty(apiLoader.services["transfer"], "2018-11-05", { - get: function get() { - var model = __nccwpck_require__(93419); - model.paginators = __nccwpck_require__(65803) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.Transfer; - - /***/ - }, - - /***/ 72544: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["translate"] = {}; - AWS.Translate = Service.defineService("translate", ["2017-07-01"]); - Object.defineProperty(apiLoader.services["translate"], "2017-07-01", { - get: function get() { - var model = __nccwpck_require__(61084); - model.paginators = __nccwpck_require__(40304) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.Translate; - - /***/ - }, - - /***/ 72742: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["waf"] = {}; - AWS.WAF = Service.defineService("waf", ["2015-08-24"]); - Object.defineProperty(apiLoader.services["waf"], "2015-08-24", { - get: function get() { - var model = __nccwpck_require__(37925); - model.paginators = __nccwpck_require__(65794) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.WAF; - - /***/ - }, - - /***/ 23153: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["wafregional"] = {}; - AWS.WAFRegional = Service.defineService("wafregional", ["2016-11-28"]); - Object.defineProperty(apiLoader.services["wafregional"], "2016-11-28", { - get: function get() { - var model = __nccwpck_require__(20014); - model.paginators = __nccwpck_require__(66829) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.WAFRegional; - - /***/ - }, - - /***/ 50353: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["wafv2"] = {}; - AWS.WAFV2 = Service.defineService("wafv2", ["2019-07-29"]); - Object.defineProperty(apiLoader.services["wafv2"], "2019-07-29", { - get: function get() { - var model = __nccwpck_require__(51872); - model.paginators = __nccwpck_require__(33900) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.WAFV2; - - /***/ - }, - - /***/ 86263: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["wellarchitected"] = {}; - AWS.WellArchitected = Service.defineService("wellarchitected", [ - "2020-03-31", - ]); - Object.defineProperty( - apiLoader.services["wellarchitected"], - "2020-03-31", - { - get: function get() { - var model = __nccwpck_require__(19249); - model.paginators = __nccwpck_require__(54693) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.WellArchitected; - - /***/ - }, - - /***/ 38835: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["workdocs"] = {}; - AWS.WorkDocs = Service.defineService("workdocs", ["2016-05-01"]); - Object.defineProperty(apiLoader.services["workdocs"], "2016-05-01", { - get: function get() { - var model = __nccwpck_require__(41052); - model.paginators = __nccwpck_require__(94768) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.WorkDocs; - - /***/ - }, - - /***/ 48579: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["worklink"] = {}; - AWS.WorkLink = Service.defineService("worklink", ["2018-09-25"]); - Object.defineProperty(apiLoader.services["worklink"], "2018-09-25", { - get: function get() { - var model = __nccwpck_require__(37178); - model.paginators = __nccwpck_require__(74073) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.WorkLink; - - /***/ - }, - - /***/ 38374: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["workmail"] = {}; - AWS.WorkMail = Service.defineService("workmail", ["2017-10-01"]); - Object.defineProperty(apiLoader.services["workmail"], "2017-10-01", { - get: function get() { - var model = __nccwpck_require__(93150); - model.paginators = __nccwpck_require__(5158) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.WorkMail; - - /***/ - }, - - /***/ 67025: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["workmailmessageflow"] = {}; - AWS.WorkMailMessageFlow = Service.defineService("workmailmessageflow", [ - "2019-05-01", - ]); - Object.defineProperty( - apiLoader.services["workmailmessageflow"], - "2019-05-01", - { - get: function get() { - var model = __nccwpck_require__(57733); - model.paginators = __nccwpck_require__(85646) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - } - ); - - module.exports = AWS.WorkMailMessageFlow; - - /***/ - }, - - /***/ 25513: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["workspaces"] = {}; - AWS.WorkSpaces = Service.defineService("workspaces", ["2015-04-08"]); - Object.defineProperty(apiLoader.services["workspaces"], "2015-04-08", { - get: function get() { - var model = __nccwpck_require__(97805); - model.paginators = __nccwpck_require__(27769) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.WorkSpaces; - - /***/ - }, - - /***/ 41548: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - var AWS = __nccwpck_require__(28437); - var Service = AWS.Service; - var apiLoader = AWS.apiLoader; - - apiLoader.services["xray"] = {}; - AWS.XRay = Service.defineService("xray", ["2016-04-12"]); - Object.defineProperty(apiLoader.services["xray"], "2016-04-12", { - get: function get() { - var model = __nccwpck_require__(97355); - model.paginators = __nccwpck_require__(97949) /* .pagination */.o; - return model; - }, - enumerable: true, - configurable: true, - }); - - module.exports = AWS.XRay; - - /***/ - }, - - /***/ 52793: /***/ (module) => { - function apiLoader(svc, version) { - if (!apiLoader.services.hasOwnProperty(svc)) { - throw new Error("InvalidService: Failed to load api for " + svc); - } - return apiLoader.services[svc][version]; - } - - /** - * @api private - * - * This member of AWS.apiLoader is private, but changing it will necessitate a - * change to ../scripts/services-table-generator.ts - */ - apiLoader.services = {}; - - /** - * @api private - */ - module.exports = apiLoader; - - /***/ - }, - - /***/ 71786: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(73639); - - var AWS = __nccwpck_require__(28437); - - // Load all service classes - __nccwpck_require__(26296); - - /** - * @api private - */ - module.exports = AWS; - - /***/ - }, - - /***/ 93260: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var AWS = __nccwpck_require__(28437), - url = AWS.util.url, - crypto = AWS.util.crypto.lib, - base64Encode = AWS.util.base64.encode, - inherit = AWS.util.inherit; - - var queryEncode = function (string) { - var replacements = { - "+": "-", - "=": "_", - "/": "~", - }; - return string.replace(/[\+=\/]/g, function (match) { - return replacements[match]; - }); - }; - - var signPolicy = function (policy, privateKey) { - var sign = crypto.createSign("RSA-SHA1"); - sign.write(policy); - return queryEncode(sign.sign(privateKey, "base64")); - }; - - var signWithCannedPolicy = function ( - url, - expires, - keyPairId, - privateKey - ) { - var policy = JSON.stringify({ - Statement: [ - { - Resource: url, - Condition: { DateLessThan: { "AWS:EpochTime": expires } }, - }, - ], - }); - - return { - Expires: expires, - "Key-Pair-Id": keyPairId, - Signature: signPolicy(policy.toString(), privateKey), - }; - }; - - var signWithCustomPolicy = function (policy, keyPairId, privateKey) { - policy = policy.replace(/\s/gm, ""); - - return { - Policy: queryEncode(base64Encode(policy)), - "Key-Pair-Id": keyPairId, - Signature: signPolicy(policy, privateKey), - }; - }; - - var determineScheme = function (url) { - var parts = url.split("://"); - if (parts.length < 2) { - throw new Error("Invalid URL."); - } - - return parts[0].replace("*", ""); - }; - - var getRtmpUrl = function (rtmpUrl) { - var parsed = url.parse(rtmpUrl); - return parsed.path.replace(/^\//, "") + (parsed.hash || ""); - }; - - var getResource = function (url) { - switch (determineScheme(url)) { - case "http": - case "https": - return url; - case "rtmp": - return getRtmpUrl(url); - default: - throw new Error( - "Invalid URI scheme. Scheme must be one of" + - " http, https, or rtmp" - ); - } - }; - - var handleError = function (err, callback) { - if (!callback || typeof callback !== "function") { - throw err; - } - - callback(err); - }; - - var handleSuccess = function (result, callback) { - if (!callback || typeof callback !== "function") { - return result; - } - - callback(null, result); - }; - - AWS.CloudFront.Signer = inherit({ - /** - * A signer object can be used to generate signed URLs and cookies for granting - * access to content on restricted CloudFront distributions. - * - * @see http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html - * - * @param keyPairId [String] (Required) The ID of the CloudFront key pair - * being used. - * @param privateKey [String] (Required) A private key in RSA format. - */ - constructor: function Signer(keyPairId, privateKey) { - if (keyPairId === void 0 || privateKey === void 0) { - throw new Error("A key pair ID and private key are required"); - } - - this.keyPairId = keyPairId; - this.privateKey = privateKey; - }, - - /** - * Create a signed Amazon CloudFront Cookie. - * - * @param options [Object] The options to create a signed cookie. - * @option options url [String] The URL to which the signature will grant - * access. Required unless you pass in a full - * policy. - * @option options expires [Number] A Unix UTC timestamp indicating when the - * signature should expire. Required unless you - * pass in a full policy. - * @option options policy [String] A CloudFront JSON policy. Required unless - * you pass in a url and an expiry time. - * - * @param cb [Function] if a callback is provided, this function will - * pass the hash as the second parameter (after the error parameter) to - * the callback function. - * - * @return [Object] if called synchronously (with no callback), returns the - * signed cookie parameters. - * @return [null] nothing is returned if a callback is provided. - */ - getSignedCookie: function (options, cb) { - var signatureHash = - "policy" in options - ? signWithCustomPolicy( - options.policy, - this.keyPairId, - this.privateKey - ) - : signWithCannedPolicy( - options.url, - options.expires, - this.keyPairId, - this.privateKey - ); - - var cookieHash = {}; - for (var key in signatureHash) { - if (Object.prototype.hasOwnProperty.call(signatureHash, key)) { - cookieHash["CloudFront-" + key] = signatureHash[key]; - } - } - - return handleSuccess(cookieHash, cb); - }, - - /** - * Create a signed Amazon CloudFront URL. - * - * Keep in mind that URLs meant for use in media/flash players may have - * different requirements for URL formats (e.g. some require that the - * extension be removed, some require the file name to be prefixed - * - mp4:, some require you to add "/cfx/st" into your URL). - * - * @param options [Object] The options to create a signed URL. - * @option options url [String] The URL to which the signature will grant - * access. Any query params included with - * the URL should be encoded. Required. - * @option options expires [Number] A Unix UTC timestamp indicating when the - * signature should expire. Required unless you - * pass in a full policy. - * @option options policy [String] A CloudFront JSON policy. Required unless - * you pass in a url and an expiry time. - * - * @param cb [Function] if a callback is provided, this function will - * pass the URL as the second parameter (after the error parameter) to - * the callback function. - * - * @return [String] if called synchronously (with no callback), returns the - * signed URL. - * @return [null] nothing is returned if a callback is provided. - */ - getSignedUrl: function (options, cb) { - try { - var resource = getResource(options.url); - } catch (err) { - return handleError(err, cb); - } - - var parsedUrl = url.parse(options.url, true), - signatureHash = Object.prototype.hasOwnProperty.call( - options, - "policy" - ) - ? signWithCustomPolicy( - options.policy, - this.keyPairId, - this.privateKey - ) - : signWithCannedPolicy( - resource, - options.expires, - this.keyPairId, - this.privateKey - ); - - parsedUrl.search = null; - for (var key in signatureHash) { - if (Object.prototype.hasOwnProperty.call(signatureHash, key)) { - parsedUrl.query[key] = signatureHash[key]; - } - } - - try { - var signedUrl = - determineScheme(options.url) === "rtmp" - ? getRtmpUrl(url.format(parsedUrl)) - : url.format(parsedUrl); - } catch (err) { - return handleError(err, cb); - } - - return handleSuccess(signedUrl, cb); - }, - }); - - /** - * @api private - */ - module.exports = AWS.CloudFront.Signer; - - /***/ - }, - - /***/ 38110: /***/ ( - __unused_webpack_module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var AWS = __nccwpck_require__(28437); - __nccwpck_require__(53819); - __nccwpck_require__(36965); - var PromisesDependency; - - /** - * The main configuration class used by all service objects to set - * the region, credentials, and other options for requests. - * - * By default, credentials and region settings are left unconfigured. - * This should be configured by the application before using any - * AWS service APIs. - * - * In order to set global configuration options, properties should - * be assigned to the global {AWS.config} object. - * - * @see AWS.config - * - * @!group General Configuration Options - * - * @!attribute credentials - * @return [AWS.Credentials] the AWS credentials to sign requests with. - * - * @!attribute region - * @example Set the global region setting to us-west-2 - * AWS.config.update({region: 'us-west-2'}); - * @return [AWS.Credentials] The region to send service requests to. - * @see http://docs.amazonwebservices.com/general/latest/gr/rande.html - * A list of available endpoints for each AWS service - * - * @!attribute maxRetries - * @return [Integer] the maximum amount of retries to perform for a - * service request. By default this value is calculated by the specific - * service object that the request is being made to. - * - * @!attribute maxRedirects - * @return [Integer] the maximum amount of redirects to follow for a - * service request. Defaults to 10. - * - * @!attribute paramValidation - * @return [Boolean|map] whether input parameters should be validated against - * the operation description before sending the request. Defaults to true. - * Pass a map to enable any of the following specific validation features: - * - * * **min** [Boolean] — Validates that a value meets the min - * constraint. This is enabled by default when paramValidation is set - * to `true`. - * * **max** [Boolean] — Validates that a value meets the max - * constraint. - * * **pattern** [Boolean] — Validates that a string value matches a - * regular expression. - * * **enum** [Boolean] — Validates that a string value matches one - * of the allowable enum values. - * - * @!attribute computeChecksums - * @return [Boolean] whether to compute checksums for payload bodies when - * the service accepts it (currently supported in S3 only). - * - * @!attribute convertResponseTypes - * @return [Boolean] whether types are converted when parsing response data. - * Currently only supported for JSON based services. Turning this off may - * improve performance on large response payloads. Defaults to `true`. - * - * @!attribute correctClockSkew - * @return [Boolean] whether to apply a clock skew correction and retry - * requests that fail because of an skewed client clock. Defaults to - * `false`. - * - * @!attribute sslEnabled - * @return [Boolean] whether SSL is enabled for requests - * - * @!attribute s3ForcePathStyle - * @return [Boolean] whether to force path style URLs for S3 objects - * - * @!attribute s3BucketEndpoint - * @note Setting this configuration option requires an `endpoint` to be - * provided explicitly to the service constructor. - * @return [Boolean] whether the provided endpoint addresses an individual - * bucket (false if it addresses the root API endpoint). - * - * @!attribute s3DisableBodySigning - * @return [Boolean] whether to disable S3 body signing when using signature version `v4`. - * Body signing can only be disabled when using https. Defaults to `true`. - * - * @!attribute s3UsEast1RegionalEndpoint - * @return ['legacy'|'regional'] when region is set to 'us-east-1', whether to send s3 - * request to global endpoints or 'us-east-1' regional endpoints. This config is only - * applicable to S3 client; - * Defaults to 'legacy' - * @!attribute s3UseArnRegion - * @return [Boolean] whether to override the request region with the region inferred - * from requested resource's ARN. Only available for S3 buckets - * Defaults to `true` - * - * @!attribute useAccelerateEndpoint - * @note This configuration option is only compatible with S3 while accessing - * dns-compatible buckets. - * @return [Boolean] Whether to use the Accelerate endpoint with the S3 service. - * Defaults to `false`. - * - * @!attribute retryDelayOptions - * @example Set the base retry delay for all services to 300 ms - * AWS.config.update({retryDelayOptions: {base: 300}}); - * // Delays with maxRetries = 3: 300, 600, 1200 - * @example Set a custom backoff function to provide delay values on retries - * AWS.config.update({retryDelayOptions: {customBackoff: function(retryCount, err) { - * // returns delay in ms - * }}}); - * @return [map] A set of options to configure the retry delay on retryable errors. - * Currently supported options are: - * - * * **base** [Integer] — The base number of milliseconds to use in the - * exponential backoff for operation retries. Defaults to 100 ms for all services except - * DynamoDB, where it defaults to 50ms. - * - * * **customBackoff ** [function] — A custom function that accepts a - * retry count and error and returns the amount of time to delay in - * milliseconds. If the result is a non-zero negative value, no further - * retry attempts will be made. The `base` option will be ignored if this - * option is supplied. The function is only called for retryable errors. - * - * @!attribute httpOptions - * @return [map] A set of options to pass to the low-level HTTP request. - * Currently supported options are: - * - * * **proxy** [String] — the URL to proxy requests through - * * **agent** [http.Agent, https.Agent] — the Agent object to perform - * HTTP requests with. Used for connection pooling. Note that for - * SSL connections, a special Agent object is used in order to enable - * peer certificate verification. This feature is only supported in the - * Node.js environment. - * * **connectTimeout** [Integer] — Sets the socket to timeout after - * failing to establish a connection with the server after - * `connectTimeout` milliseconds. This timeout has no effect once a socket - * connection has been established. - * * **timeout** [Integer] — The number of milliseconds a request can - * take before automatically being terminated. - * Defaults to two minutes (120000). - * * **xhrAsync** [Boolean] — Whether the SDK will send asynchronous - * HTTP requests. Used in the browser environment only. Set to false to - * send requests synchronously. Defaults to true (async on). - * * **xhrWithCredentials** [Boolean] — Sets the "withCredentials" - * property of an XMLHttpRequest object. Used in the browser environment - * only. Defaults to false. - * @!attribute logger - * @return [#write,#log] an object that responds to .write() (like a stream) - * or .log() (like the console object) in order to log information about - * requests - * - * @!attribute systemClockOffset - * @return [Number] an offset value in milliseconds to apply to all signing - * times. Use this to compensate for clock skew when your system may be - * out of sync with the service time. Note that this configuration option - * can only be applied to the global `AWS.config` object and cannot be - * overridden in service-specific configuration. Defaults to 0 milliseconds. - * - * @!attribute signatureVersion - * @return [String] the signature version to sign requests with (overriding - * the API configuration). Possible values are: 'v2', 'v3', 'v4'. - * - * @!attribute signatureCache - * @return [Boolean] whether the signature to sign requests with (overriding - * the API configuration) is cached. Only applies to the signature version 'v4'. - * Defaults to `true`. - * - * @!attribute endpointDiscoveryEnabled - * @return [Boolean|undefined] whether to call operations with endpoints - * given by service dynamically. Setting this config to `true` will enable - * endpoint discovery for all applicable operations. Setting it to `false` - * will explicitly disable endpoint discovery even though operations that - * require endpoint discovery will presumably fail. Leaving it to - * `undefined` means SDK only do endpoint discovery when it's required. - * Defaults to `undefined` - * - * @!attribute endpointCacheSize - * @return [Number] the size of the global cache storing endpoints from endpoint - * discovery operations. Once endpoint cache is created, updating this setting - * cannot change existing cache size. - * Defaults to 1000 - * - * @!attribute hostPrefixEnabled - * @return [Boolean] whether to marshal request parameters to the prefix of - * hostname. Defaults to `true`. - * - * @!attribute stsRegionalEndpoints - * @return ['legacy'|'regional'] whether to send sts request to global endpoints or - * regional endpoints. - * Defaults to 'legacy' - */ - AWS.Config = AWS.util.inherit({ - /** - * @!endgroup - */ - - /** - * Creates a new configuration object. This is the object that passes - * option data along to service requests, including credentials, security, - * region information, and some service specific settings. - * - * @example Creating a new configuration object with credentials and region - * var config = new AWS.Config({ - * accessKeyId: 'AKID', secretAccessKey: 'SECRET', region: 'us-west-2' - * }); - * @option options accessKeyId [String] your AWS access key ID. - * @option options secretAccessKey [String] your AWS secret access key. - * @option options sessionToken [AWS.Credentials] the optional AWS - * session token to sign requests with. - * @option options credentials [AWS.Credentials] the AWS credentials - * to sign requests with. You can either specify this object, or - * specify the accessKeyId and secretAccessKey options directly. - * @option options credentialProvider [AWS.CredentialProviderChain] the - * provider chain used to resolve credentials if no static `credentials` - * property is set. - * @option options region [String] the region to send service requests to. - * See {region} for more information. - * @option options maxRetries [Integer] the maximum amount of retries to - * attempt with a request. See {maxRetries} for more information. - * @option options maxRedirects [Integer] the maximum amount of redirects to - * follow with a request. See {maxRedirects} for more information. - * @option options sslEnabled [Boolean] whether to enable SSL for - * requests. - * @option options paramValidation [Boolean|map] whether input parameters - * should be validated against the operation description before sending - * the request. Defaults to true. Pass a map to enable any of the - * following specific validation features: - * - * * **min** [Boolean] — Validates that a value meets the min - * constraint. This is enabled by default when paramValidation is set - * to `true`. - * * **max** [Boolean] — Validates that a value meets the max - * constraint. - * * **pattern** [Boolean] — Validates that a string value matches a - * regular expression. - * * **enum** [Boolean] — Validates that a string value matches one - * of the allowable enum values. - * @option options computeChecksums [Boolean] whether to compute checksums - * for payload bodies when the service accepts it (currently supported - * in S3 only) - * @option options convertResponseTypes [Boolean] whether types are converted - * when parsing response data. Currently only supported for JSON based - * services. Turning this off may improve performance on large response - * payloads. Defaults to `true`. - * @option options correctClockSkew [Boolean] whether to apply a clock skew - * correction and retry requests that fail because of an skewed client - * clock. Defaults to `false`. - * @option options s3ForcePathStyle [Boolean] whether to force path - * style URLs for S3 objects. - * @option options s3BucketEndpoint [Boolean] whether the provided endpoint - * addresses an individual bucket (false if it addresses the root API - * endpoint). Note that setting this configuration option requires an - * `endpoint` to be provided explicitly to the service constructor. - * @option options s3DisableBodySigning [Boolean] whether S3 body signing - * should be disabled when using signature version `v4`. Body signing - * can only be disabled when using https. Defaults to `true`. - * @option options s3UsEast1RegionalEndpoint ['legacy'|'regional'] when region - * is set to 'us-east-1', whether to send s3 request to global endpoints or - * 'us-east-1' regional endpoints. This config is only applicable to S3 client. - * Defaults to `legacy` - * @option options s3UseArnRegion [Boolean] whether to override the request region - * with the region inferred from requested resource's ARN. Only available for S3 buckets - * Defaults to `true` - * - * @option options retryDelayOptions [map] A set of options to configure - * the retry delay on retryable errors. Currently supported options are: - * - * * **base** [Integer] — The base number of milliseconds to use in the - * exponential backoff for operation retries. Defaults to 100 ms for all - * services except DynamoDB, where it defaults to 50ms. - * * **customBackoff ** [function] — A custom function that accepts a - * retry count and error and returns the amount of time to delay in - * milliseconds. If the result is a non-zero negative value, no further - * retry attempts will be made. The `base` option will be ignored if this - * option is supplied. The function is only called for retryable errors. - * @option options httpOptions [map] A set of options to pass to the low-level - * HTTP request. Currently supported options are: - * - * * **proxy** [String] — the URL to proxy requests through - * * **agent** [http.Agent, https.Agent] — the Agent object to perform - * HTTP requests with. Used for connection pooling. Defaults to the global - * agent (`http.globalAgent`) for non-SSL connections. Note that for - * SSL connections, a special Agent object is used in order to enable - * peer certificate verification. This feature is only available in the - * Node.js environment. - * * **connectTimeout** [Integer] — Sets the socket to timeout after - * failing to establish a connection with the server after - * `connectTimeout` milliseconds. This timeout has no effect once a socket - * connection has been established. - * * **timeout** [Integer] — Sets the socket to timeout after timeout - * milliseconds of inactivity on the socket. Defaults to two minutes - * (120000). - * * **xhrAsync** [Boolean] — Whether the SDK will send asynchronous - * HTTP requests. Used in the browser environment only. Set to false to - * send requests synchronously. Defaults to true (async on). - * * **xhrWithCredentials** [Boolean] — Sets the "withCredentials" - * property of an XMLHttpRequest object. Used in the browser environment - * only. Defaults to false. - * @option options apiVersion [String, Date] a String in YYYY-MM-DD format - * (or a date) that represents the latest possible API version that can be - * used in all services (unless overridden by `apiVersions`). Specify - * 'latest' to use the latest possible version. - * @option options apiVersions [map] a map of service - * identifiers (the lowercase service class name) with the API version to - * use when instantiating a service. Specify 'latest' for each individual - * that can use the latest available version. - * @option options logger [#write,#log] an object that responds to .write() - * (like a stream) or .log() (like the console object) in order to log - * information about requests - * @option options systemClockOffset [Number] an offset value in milliseconds - * to apply to all signing times. Use this to compensate for clock skew - * when your system may be out of sync with the service time. Note that - * this configuration option can only be applied to the global `AWS.config` - * object and cannot be overridden in service-specific configuration. - * Defaults to 0 milliseconds. - * @option options signatureVersion [String] the signature version to sign - * requests with (overriding the API configuration). Possible values are: - * 'v2', 'v3', 'v4'. - * @option options signatureCache [Boolean] whether the signature to sign - * requests with (overriding the API configuration) is cached. Only applies - * to the signature version 'v4'. Defaults to `true`. - * @option options dynamoDbCrc32 [Boolean] whether to validate the CRC32 - * checksum of HTTP response bodies returned by DynamoDB. Default: `true`. - * @option options useAccelerateEndpoint [Boolean] Whether to use the - * S3 Transfer Acceleration endpoint with the S3 service. Default: `false`. - * @option options clientSideMonitoring [Boolean] whether to collect and - * publish this client's performance metrics of all its API requests. - * @option options endpointDiscoveryEnabled [Boolean|undefined] whether to - * call operations with endpoints given by service dynamically. Setting this - * config to `true` will enable endpoint discovery for all applicable operations. - * Setting it to `false` will explicitly disable endpoint discovery even though - * operations that require endpoint discovery will presumably fail. Leaving it - * to `undefined` means SDK will only do endpoint discovery when it's required. - * Defaults to `undefined` - * @option options endpointCacheSize [Number] the size of the global cache storing - * endpoints from endpoint discovery operations. Once endpoint cache is created, - * updating this setting cannot change existing cache size. - * Defaults to 1000 - * @option options hostPrefixEnabled [Boolean] whether to marshal request - * parameters to the prefix of hostname. - * Defaults to `true`. - * @option options stsRegionalEndpoints ['legacy'|'regional'] whether to send sts request - * to global endpoints or regional endpoints. - * Defaults to 'legacy'. - */ - constructor: function Config(options) { - if (options === undefined) options = {}; - options = this.extractCredentials(options); - - AWS.util.each.call(this, this.keys, function (key, value) { - this.set(key, options[key], value); - }); - }, - - /** - * @!group Managing Credentials - */ - - /** - * Loads credentials from the configuration object. This is used internally - * by the SDK to ensure that refreshable {Credentials} objects are properly - * refreshed and loaded when sending a request. If you want to ensure that - * your credentials are loaded prior to a request, you can use this method - * directly to provide accurate credential data stored in the object. - * - * @note If you configure the SDK with static or environment credentials, - * the credential data should already be present in {credentials} attribute. - * This method is primarily necessary to load credentials from asynchronous - * sources, or sources that can refresh credentials periodically. - * @example Getting your access key - * AWS.config.getCredentials(function(err) { - * if (err) console.log(err.stack); // credentials not loaded - * else console.log("Access Key:", AWS.config.credentials.accessKeyId); - * }) - * @callback callback function(err) - * Called when the {credentials} have been properly set on the configuration - * object. - * - * @param err [Error] if this is set, credentials were not successfully - * loaded and this error provides information why. - * @see credentials - * @see Credentials - */ - getCredentials: function getCredentials(callback) { - var self = this; - - function finish(err) { - callback(err, err ? null : self.credentials); - } - - function credError(msg, err) { - return new AWS.util.error(err || new Error(), { - code: "CredentialsError", - message: msg, - name: "CredentialsError", - }); - } - - function getAsyncCredentials() { - self.credentials.get(function (err) { - if (err) { - var msg = - "Could not load credentials from " + - self.credentials.constructor.name; - err = credError(msg, err); - } - finish(err); - }); - } - - function getStaticCredentials() { - var err = null; - if ( - !self.credentials.accessKeyId || - !self.credentials.secretAccessKey - ) { - err = credError("Missing credentials"); - } - finish(err); - } - - if (self.credentials) { - if (typeof self.credentials.get === "function") { - getAsyncCredentials(); - } else { - // static credentials - getStaticCredentials(); - } - } else if (self.credentialProvider) { - self.credentialProvider.resolve(function (err, creds) { - if (err) { - err = credError( - "Could not load credentials from any providers", - err - ); - } - self.credentials = creds; - finish(err); - }); - } else { - finish(credError("No credentials to load")); - } - }, - - /** - * @!group Loading and Setting Configuration Options - */ - - /** - * @overload update(options, allowUnknownKeys = false) - * Updates the current configuration object with new options. - * - * @example Update maxRetries property of a configuration object - * config.update({maxRetries: 10}); - * @param [Object] options a map of option keys and values. - * @param [Boolean] allowUnknownKeys whether unknown keys can be set on - * the configuration object. Defaults to `false`. - * @see constructor - */ - update: function update(options, allowUnknownKeys) { - allowUnknownKeys = allowUnknownKeys || false; - options = this.extractCredentials(options); - AWS.util.each.call(this, options, function (key, value) { - if ( - allowUnknownKeys || - Object.prototype.hasOwnProperty.call(this.keys, key) || - AWS.Service.hasService(key) - ) { - this.set(key, value); - } - }); - }, - - /** - * Loads configuration data from a JSON file into this config object. - * @note Loading configuration will reset all existing configuration - * on the object. - * @!macro nobrowser - * @param path [String] the path relative to your process's current - * working directory to load configuration from. - * @return [AWS.Config] the same configuration object - */ - loadFromPath: function loadFromPath(path) { - this.clear(); - - var options = JSON.parse(AWS.util.readFileSync(path)); - var fileSystemCreds = new AWS.FileSystemCredentials(path); - var chain = new AWS.CredentialProviderChain(); - chain.providers.unshift(fileSystemCreds); - chain.resolve(function (err, creds) { - if (err) throw err; - else options.credentials = creds; - }); - - this.constructor(options); - - return this; - }, - - /** - * Clears configuration data on this object - * - * @api private - */ - clear: function clear() { - /*jshint forin:false */ - AWS.util.each.call(this, this.keys, function (key) { - delete this[key]; - }); - - // reset credential provider - this.set("credentials", undefined); - this.set("credentialProvider", undefined); - }, - - /** - * Sets a property on the configuration object, allowing for a - * default value - * @api private - */ - set: function set(property, value, defaultValue) { - if (value === undefined) { - if (defaultValue === undefined) { - defaultValue = this.keys[property]; - } - if (typeof defaultValue === "function") { - this[property] = defaultValue.call(this); - } else { - this[property] = defaultValue; - } - } else if (property === "httpOptions" && this[property]) { - // deep merge httpOptions - this[property] = AWS.util.merge(this[property], value); - } else { - this[property] = value; - } - }, - - /** - * All of the keys with their default values. - * - * @constant - * @api private - */ - keys: { - credentials: null, - credentialProvider: null, - region: null, - logger: null, - apiVersions: {}, - apiVersion: null, - endpoint: undefined, - httpOptions: { - timeout: 120000, - }, - maxRetries: undefined, - maxRedirects: 10, - paramValidation: true, - sslEnabled: true, - s3ForcePathStyle: false, - s3BucketEndpoint: false, - s3DisableBodySigning: true, - s3UsEast1RegionalEndpoint: "legacy", - s3UseArnRegion: undefined, - computeChecksums: true, - convertResponseTypes: true, - correctClockSkew: false, - customUserAgent: null, - dynamoDbCrc32: true, - systemClockOffset: 0, - signatureVersion: null, - signatureCache: true, - retryDelayOptions: {}, - useAccelerateEndpoint: false, - clientSideMonitoring: false, - endpointDiscoveryEnabled: undefined, - endpointCacheSize: 1000, - hostPrefixEnabled: true, - stsRegionalEndpoints: "legacy", - }, - - /** - * Extracts accessKeyId, secretAccessKey and sessionToken - * from a configuration hash. - * - * @api private - */ - extractCredentials: function extractCredentials(options) { - if (options.accessKeyId && options.secretAccessKey) { - options = AWS.util.copy(options); - options.credentials = new AWS.Credentials(options); - } - return options; - }, - - /** - * Sets the promise dependency the SDK will use wherever Promises are returned. - * Passing `null` will force the SDK to use native Promises if they are available. - * If native Promises are not available, passing `null` will have no effect. - * @param [Constructor] dep A reference to a Promise constructor - */ - setPromisesDependency: function setPromisesDependency(dep) { - PromisesDependency = dep; - // if null was passed in, we should try to use native promises - if (dep === null && typeof Promise === "function") { - PromisesDependency = Promise; - } - var constructors = [ - AWS.Request, - AWS.Credentials, - AWS.CredentialProviderChain, - ]; - if (AWS.S3) { - constructors.push(AWS.S3); - if (AWS.S3.ManagedUpload) { - constructors.push(AWS.S3.ManagedUpload); - } - } - AWS.util.addPromises(constructors, PromisesDependency); - }, - - /** - * Gets the promise dependency set by `AWS.config.setPromisesDependency`. - */ - getPromisesDependency: function getPromisesDependency() { - return PromisesDependency; - }, - }); - - /** - * @return [AWS.Config] The global configuration object singleton instance - * @readonly - * @see AWS.Config - */ - AWS.config = new AWS.Config(); - - /***/ - }, - - /***/ 85566: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var AWS = __nccwpck_require__(28437); - /** - * @api private - */ - function validateRegionalEndpointsFlagValue(configValue, errorOptions) { - if (typeof configValue !== "string") return undefined; - else if ( - ["legacy", "regional"].indexOf(configValue.toLowerCase()) >= 0 - ) { - return configValue.toLowerCase(); - } else { - throw AWS.util.error(new Error(), errorOptions); - } - } - - /** - * Resolve the configuration value for regional endpoint from difference sources: client - * config, environmental variable, shared config file. Value can be case-insensitive - * 'legacy' or 'reginal'. - * @param originalConfig user-supplied config object to resolve - * @param options a map of config property names from individual configuration source - * - env: name of environmental variable that refers to the config - * - sharedConfig: name of shared configuration file property that refers to the config - * - clientConfig: name of client configuration property that refers to the config - * - * @api private - */ - function resolveRegionalEndpointsFlag(originalConfig, options) { - originalConfig = originalConfig || {}; - //validate config value - var resolved; - if (originalConfig[options.clientConfig]) { - resolved = validateRegionalEndpointsFlagValue( - originalConfig[options.clientConfig], - { - code: "InvalidConfiguration", - message: - 'invalid "' + - options.clientConfig + - '" configuration. Expect "legacy" ' + - ' or "regional". Got "' + - originalConfig[options.clientConfig] + - '".', - } - ); - if (resolved) return resolved; - } - if (!AWS.util.isNode()) return resolved; - //validate environmental variable - if (Object.prototype.hasOwnProperty.call(process.env, options.env)) { - var envFlag = process.env[options.env]; - resolved = validateRegionalEndpointsFlagValue(envFlag, { - code: "InvalidEnvironmentalVariable", - message: - "invalid " + - options.env + - ' environmental variable. Expect "legacy" ' + - ' or "regional". Got "' + - process.env[options.env] + - '".', - }); - if (resolved) return resolved; - } - //validate shared config file - var profile = {}; - try { - var profiles = AWS.util.getProfilesFromSharedConfig( - AWS.util.iniLoader - ); - profile = - profiles[process.env.AWS_PROFILE || AWS.util.defaultProfile]; - } catch (e) {} - if ( - profile && - Object.prototype.hasOwnProperty.call(profile, options.sharedConfig) - ) { - var fileFlag = profile[options.sharedConfig]; - resolved = validateRegionalEndpointsFlagValue(fileFlag, { - code: "InvalidConfiguration", - message: - "invalid " + - options.sharedConfig + - ' profile config. Expect "legacy" ' + - ' or "regional". Got "' + - profile[options.sharedConfig] + - '".', - }); - if (resolved) return resolved; - } - return resolved; - } - - module.exports = resolveRegionalEndpointsFlag; - - /***/ - }, - - /***/ 28437: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - /** - * The main AWS namespace - */ - var AWS = { util: __nccwpck_require__(77985) }; - - /** - * @api private - * @!macro [new] nobrowser - * @note This feature is not supported in the browser environment of the SDK. - */ - var _hidden = {}; - _hidden.toString(); // hack to parse macro - - /** - * @api private - */ - module.exports = AWS; - - AWS.util.update(AWS, { - /** - * @constant - */ - VERSION: "2.814.0", - - /** - * @api private - */ - Signers: {}, - - /** - * @api private - */ - Protocol: { - Json: __nccwpck_require__(30083), - Query: __nccwpck_require__(90761), - Rest: __nccwpck_require__(98200), - RestJson: __nccwpck_require__(5883), - RestXml: __nccwpck_require__(15143), - }, - - /** - * @api private - */ - XML: { - Builder: __nccwpck_require__(23546), - Parser: null, // conditionally set based on environment - }, - - /** - * @api private - */ - JSON: { - Builder: __nccwpck_require__(47495), - Parser: __nccwpck_require__(5474), - }, - - /** - * @api private - */ - Model: { - Api: __nccwpck_require__(17657), - Operation: __nccwpck_require__(28083), - Shape: __nccwpck_require__(71349), - Paginator: __nccwpck_require__(45938), - ResourceWaiter: __nccwpck_require__(41368), - }, - - /** - * @api private - */ - apiLoader: __nccwpck_require__(52793), - - /** - * @api private - */ - EndpointCache: __nccwpck_require__(96323) /* .EndpointCache */.$, - }); - __nccwpck_require__(55948); - __nccwpck_require__(68903); - __nccwpck_require__(38110); - __nccwpck_require__(1556); - __nccwpck_require__(54995); - __nccwpck_require__(78652); - __nccwpck_require__(58743); - __nccwpck_require__(7246); - __nccwpck_require__(9897); - __nccwpck_require__(99127); - - /** - * @readonly - * @return [AWS.SequentialExecutor] a collection of global event listeners that - * are attached to every sent request. - * @see AWS.Request AWS.Request for a list of events to listen for - * @example Logging the time taken to send a request - * AWS.events.on('send', function startSend(resp) { - * resp.startTime = new Date().getTime(); - * }).on('complete', function calculateTime(resp) { - * var time = (new Date().getTime() - resp.startTime) / 1000; - * console.log('Request took ' + time + ' seconds'); - * }); - * - * new AWS.S3().listBuckets(); // prints 'Request took 0.285 seconds' - */ - AWS.events = new AWS.SequentialExecutor(); - - //create endpoint cache lazily - AWS.util.memoizedProperty( - AWS, - "endpointCache", - function () { - return new AWS.EndpointCache(AWS.config.endpointCacheSize); - }, - true - ); - - /***/ - }, - - /***/ 53819: /***/ ( - __unused_webpack_module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var AWS = __nccwpck_require__(28437); - - /** - * Represents your AWS security credentials, specifically the - * {accessKeyId}, {secretAccessKey}, and optional {sessionToken}. - * Creating a `Credentials` object allows you to pass around your - * security information to configuration and service objects. - * - * Note that this class typically does not need to be constructed manually, - * as the {AWS.Config} and {AWS.Service} classes both accept simple - * options hashes with the three keys. These structures will be converted - * into Credentials objects automatically. - * - * ## Expiring and Refreshing Credentials - * - * Occasionally credentials can expire in the middle of a long-running - * application. In this case, the SDK will automatically attempt to - * refresh the credentials from the storage location if the Credentials - * class implements the {refresh} method. - * - * If you are implementing a credential storage location, you - * will want to create a subclass of the `Credentials` class and - * override the {refresh} method. This method allows credentials to be - * retrieved from the backing store, be it a file system, database, or - * some network storage. The method should reset the credential attributes - * on the object. - * - * @!attribute expired - * @return [Boolean] whether the credentials have been expired and - * require a refresh. Used in conjunction with {expireTime}. - * @!attribute expireTime - * @return [Date] a time when credentials should be considered expired. Used - * in conjunction with {expired}. - * @!attribute accessKeyId - * @return [String] the AWS access key ID - * @!attribute secretAccessKey - * @return [String] the AWS secret access key - * @!attribute sessionToken - * @return [String] an optional AWS session token - */ - AWS.Credentials = AWS.util.inherit({ - /** - * A credentials object can be created using positional arguments or an options - * hash. - * - * @overload AWS.Credentials(accessKeyId, secretAccessKey, sessionToken=null) - * Creates a Credentials object with a given set of credential information - * as positional arguments. - * @param accessKeyId [String] the AWS access key ID - * @param secretAccessKey [String] the AWS secret access key - * @param sessionToken [String] the optional AWS session token - * @example Create a credentials object with AWS credentials - * var creds = new AWS.Credentials('akid', 'secret', 'session'); - * @overload AWS.Credentials(options) - * Creates a Credentials object with a given set of credential information - * as an options hash. - * @option options accessKeyId [String] the AWS access key ID - * @option options secretAccessKey [String] the AWS secret access key - * @option options sessionToken [String] the optional AWS session token - * @example Create a credentials object with AWS credentials - * var creds = new AWS.Credentials({ - * accessKeyId: 'akid', secretAccessKey: 'secret', sessionToken: 'session' - * }); - */ - constructor: function Credentials() { - // hide secretAccessKey from being displayed with util.inspect - AWS.util.hideProperties(this, ["secretAccessKey"]); - - this.expired = false; - this.expireTime = null; - this.refreshCallbacks = []; - if (arguments.length === 1 && typeof arguments[0] === "object") { - var creds = arguments[0].credentials || arguments[0]; - this.accessKeyId = creds.accessKeyId; - this.secretAccessKey = creds.secretAccessKey; - this.sessionToken = creds.sessionToken; - } else { - this.accessKeyId = arguments[0]; - this.secretAccessKey = arguments[1]; - this.sessionToken = arguments[2]; - } - }, - - /** - * @return [Integer] the number of seconds before {expireTime} during which - * the credentials will be considered expired. - */ - expiryWindow: 15, - - /** - * @return [Boolean] whether the credentials object should call {refresh} - * @note Subclasses should override this method to provide custom refresh - * logic. - */ - needsRefresh: function needsRefresh() { - var currentTime = AWS.util.date.getDate().getTime(); - var adjustedTime = new Date(currentTime + this.expiryWindow * 1000); - - if (this.expireTime && adjustedTime > this.expireTime) { - return true; - } else { - return this.expired || !this.accessKeyId || !this.secretAccessKey; - } - }, - - /** - * Gets the existing credentials, refreshing them if they are not yet loaded - * or have expired. Users should call this method before using {refresh}, - * as this will not attempt to reload credentials when they are already - * loaded into the object. - * - * @callback callback function(err) - * When this callback is called with no error, it means either credentials - * do not need to be refreshed or refreshed credentials information has - * been loaded into the object (as the `accessKeyId`, `secretAccessKey`, - * and `sessionToken` properties). - * @param err [Error] if an error occurred, this value will be filled - */ - get: function get(callback) { - var self = this; - if (this.needsRefresh()) { - this.refresh(function (err) { - if (!err) self.expired = false; // reset expired flag - if (callback) callback(err); - }); - } else if (callback) { - callback(); - } - }, - - /** - * @!method getPromise() - * Returns a 'thenable' promise. - * Gets the existing credentials, refreshing them if they are not yet loaded - * or have expired. Users should call this method before using {refresh}, - * as this will not attempt to reload credentials when they are already - * loaded into the object. - * - * Two callbacks can be provided to the `then` method on the returned promise. - * The first callback will be called if the promise is fulfilled, and the second - * callback will be called if the promise is rejected. - * @callback fulfilledCallback function() - * Called if the promise is fulfilled. When this callback is called, it - * means either credentials do not need to be refreshed or refreshed - * credentials information has been loaded into the object (as the - * `accessKeyId`, `secretAccessKey`, and `sessionToken` properties). - * @callback rejectedCallback function(err) - * Called if the promise is rejected. - * @param err [Error] if an error occurred, this value will be filled - * @return [Promise] A promise that represents the state of the `get` call. - * @example Calling the `getPromise` method. - * var promise = credProvider.getPromise(); - * promise.then(function() { ... }, function(err) { ... }); - */ - - /** - * @!method refreshPromise() - * Returns a 'thenable' promise. - * Refreshes the credentials. Users should call {get} before attempting - * to forcibly refresh credentials. - * - * Two callbacks can be provided to the `then` method on the returned promise. - * The first callback will be called if the promise is fulfilled, and the second - * callback will be called if the promise is rejected. - * @callback fulfilledCallback function() - * Called if the promise is fulfilled. When this callback is called, it - * means refreshed credentials information has been loaded into the object - * (as the `accessKeyId`, `secretAccessKey`, and `sessionToken` properties). - * @callback rejectedCallback function(err) - * Called if the promise is rejected. - * @param err [Error] if an error occurred, this value will be filled - * @return [Promise] A promise that represents the state of the `refresh` call. - * @example Calling the `refreshPromise` method. - * var promise = credProvider.refreshPromise(); - * promise.then(function() { ... }, function(err) { ... }); - */ - - /** - * Refreshes the credentials. Users should call {get} before attempting - * to forcibly refresh credentials. - * - * @callback callback function(err) - * When this callback is called with no error, it means refreshed - * credentials information has been loaded into the object (as the - * `accessKeyId`, `secretAccessKey`, and `sessionToken` properties). - * @param err [Error] if an error occurred, this value will be filled - * @note Subclasses should override this class to reset the - * {accessKeyId}, {secretAccessKey} and optional {sessionToken} - * on the credentials object and then call the callback with - * any error information. - * @see get - */ - refresh: function refresh(callback) { - this.expired = false; - callback(); - }, - - /** - * @api private - * @param callback - */ - coalesceRefresh: function coalesceRefresh(callback, sync) { - var self = this; - if (self.refreshCallbacks.push(callback) === 1) { - self.load(function onLoad(err) { - AWS.util.arrayEach(self.refreshCallbacks, function (callback) { - if (sync) { - callback(err); - } else { - // callback could throw, so defer to ensure all callbacks are notified - AWS.util.defer(function () { - callback(err); - }); - } - }); - self.refreshCallbacks.length = 0; - }); - } - }, - - /** - * @api private - * @param callback - */ - load: function load(callback) { - callback(); - }, - }); - - /** - * @api private - */ - AWS.Credentials.addPromisesToClass = function addPromisesToClass( - PromiseDependency - ) { - this.prototype.getPromise = AWS.util.promisifyMethod( - "get", - PromiseDependency - ); - this.prototype.refreshPromise = AWS.util.promisifyMethod( - "refresh", - PromiseDependency - ); - }; - - /** - * @api private - */ - AWS.Credentials.deletePromisesFromClass = function deletePromisesFromClass() { - delete this.prototype.getPromise; - delete this.prototype.refreshPromise; - }; - - AWS.util.addPromises(AWS.Credentials); - - /***/ - }, - - /***/ 57083: /***/ ( - __unused_webpack_module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var AWS = __nccwpck_require__(28437); - var STS = __nccwpck_require__(57513); - - /** - * Represents temporary credentials retrieved from {AWS.STS}. Without any - * extra parameters, credentials will be fetched from the - * {AWS.STS.getSessionToken} operation. If an IAM role is provided, the - * {AWS.STS.assumeRole} operation will be used to fetch credentials for the - * role instead. - * - * AWS.ChainableTemporaryCredentials differs from AWS.TemporaryCredentials in - * the way masterCredentials and refreshes are handled. - * AWS.ChainableTemporaryCredentials refreshes expired credentials using the - * masterCredentials passed by the user to support chaining of STS credentials. - * However, AWS.TemporaryCredentials recursively collapses the masterCredentials - * during instantiation, precluding the ability to refresh credentials which - * require intermediate, temporary credentials. - * - * For example, if the application should use RoleA, which must be assumed from - * RoleB, and the environment provides credentials which can assume RoleB, then - * AWS.ChainableTemporaryCredentials must be used to support refreshing the - * temporary credentials for RoleA: - * - * ```javascript - * var roleACreds = new AWS.ChainableTemporaryCredentials({ - * params: {RoleArn: 'RoleA'}, - * masterCredentials: new AWS.ChainableTemporaryCredentials({ - * params: {RoleArn: 'RoleB'}, - * masterCredentials: new AWS.EnvironmentCredentials('AWS') - * }) - * }); - * ``` - * - * If AWS.TemporaryCredentials had been used in the previous example, - * `roleACreds` would fail to refresh because `roleACreds` would - * use the environment credentials for the AssumeRole request. - * - * Another difference is that AWS.ChainableTemporaryCredentials creates the STS - * service instance during instantiation while AWS.TemporaryCredentials creates - * the STS service instance during the first refresh. Creating the service - * instance during instantiation effectively captures the master credentials - * from the global config, so that subsequent changes to the global config do - * not affect the master credentials used to refresh the temporary credentials. - * - * This allows an instance of AWS.ChainableTemporaryCredentials to be assigned - * to AWS.config.credentials: - * - * ```javascript - * var envCreds = new AWS.EnvironmentCredentials('AWS'); - * AWS.config.credentials = envCreds; - * // masterCredentials will be envCreds - * AWS.config.credentials = new AWS.ChainableTemporaryCredentials({ - * params: {RoleArn: '...'} - * }); - * ``` - * - * Similarly, to use the CredentialProviderChain's default providers as the - * master credentials, simply create a new instance of - * AWS.ChainableTemporaryCredentials: - * - * ```javascript - * AWS.config.credentials = new ChainableTemporaryCredentials({ - * params: {RoleArn: '...'} - * }); - * ``` - * - * @!attribute service - * @return [AWS.STS] the STS service instance used to - * get and refresh temporary credentials from AWS STS. - * @note (see constructor) - */ - AWS.ChainableTemporaryCredentials = AWS.util.inherit(AWS.Credentials, { - /** - * Creates a new temporary credentials object. - * - * @param options [map] a set of options - * @option options params [map] ({}) a map of options that are passed to the - * {AWS.STS.assumeRole} or {AWS.STS.getSessionToken} operations. - * If a `RoleArn` parameter is passed in, credentials will be based on the - * IAM role. If a `SerialNumber` parameter is passed in, {tokenCodeFn} must - * also be passed in or an error will be thrown. - * @option options masterCredentials [AWS.Credentials] the master credentials - * used to get and refresh temporary credentials from AWS STS. By default, - * AWS.config.credentials or AWS.config.credentialProvider will be used. - * @option options tokenCodeFn [Function] (null) Function to provide - * `TokenCode`, if `SerialNumber` is provided for profile in {params}. Function - * is called with value of `SerialNumber` and `callback`, and should provide - * the `TokenCode` or an error to the callback in the format - * `callback(err, token)`. - * @example Creating a new credentials object for generic temporary credentials - * AWS.config.credentials = new AWS.ChainableTemporaryCredentials(); - * @example Creating a new credentials object for an IAM role - * AWS.config.credentials = new AWS.ChainableTemporaryCredentials({ - * params: { - * RoleArn: 'arn:aws:iam::1234567890:role/TemporaryCredentials' - * } - * }); - * @see AWS.STS.assumeRole - * @see AWS.STS.getSessionToken - */ - constructor: function ChainableTemporaryCredentials(options) { - AWS.Credentials.call(this); - options = options || {}; - this.errorCode = "ChainableTemporaryCredentialsProviderFailure"; - this.expired = true; - this.tokenCodeFn = null; - - var params = AWS.util.copy(options.params) || {}; - if (params.RoleArn) { - params.RoleSessionName = - params.RoleSessionName || "temporary-credentials"; - } - if (params.SerialNumber) { - if ( - !options.tokenCodeFn || - typeof options.tokenCodeFn !== "function" - ) { - throw new AWS.util.error( - new Error( - "tokenCodeFn must be a function when params.SerialNumber is given" - ), - { code: this.errorCode } - ); - } else { - this.tokenCodeFn = options.tokenCodeFn; - } - } - var config = AWS.util.merge( - { - params: params, - credentials: options.masterCredentials || AWS.config.credentials, - }, - options.stsConfig || {} - ); - this.service = new STS(config); - }, - - /** - * Refreshes credentials using {AWS.STS.assumeRole} or - * {AWS.STS.getSessionToken}, depending on whether an IAM role ARN was passed - * to the credentials {constructor}. - * - * @callback callback function(err) - * Called when the STS service responds (or fails). When - * this callback is called with no error, it means that the credentials - * information has been loaded into the object (as the `accessKeyId`, - * `secretAccessKey`, and `sessionToken` properties). - * @param err [Error] if an error occurred, this value will be filled - * @see AWS.Credentials.get - */ - refresh: function refresh(callback) { - this.coalesceRefresh(callback || AWS.util.fn.callback); - }, - - /** - * @api private - * @param callback - */ - load: function load(callback) { - var self = this; - var operation = self.service.config.params.RoleArn - ? "assumeRole" - : "getSessionToken"; - this.getTokenCode(function (err, tokenCode) { - var params = {}; - if (err) { - callback(err); - return; - } - if (tokenCode) { - params.TokenCode = tokenCode; - } - self.service[operation](params, function (err, data) { - if (!err) { - self.service.credentialsFrom(data, self); - } - callback(err); - }); - }); - }, - - /** - * @api private - */ - getTokenCode: function getTokenCode(callback) { - var self = this; - if (this.tokenCodeFn) { - this.tokenCodeFn(this.service.config.params.SerialNumber, function ( - err, - token - ) { - if (err) { - var message = err; - if (err instanceof Error) { - message = err.message; - } - callback( - AWS.util.error( - new Error("Error fetching MFA token: " + message), - { code: self.errorCode } - ) - ); - return; - } - callback(null, token); - }); - } else { - callback(null); - } - }, - }); - - /***/ - }, - - /***/ 3498: /***/ ( - __unused_webpack_module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var AWS = __nccwpck_require__(28437); - var CognitoIdentity = __nccwpck_require__(58291); - var STS = __nccwpck_require__(57513); - - /** - * Represents credentials retrieved from STS Web Identity Federation using - * the Amazon Cognito Identity service. - * - * By default this provider gets credentials using the - * {AWS.CognitoIdentity.getCredentialsForIdentity} service operation, which - * requires either an `IdentityId` or an `IdentityPoolId` (Amazon Cognito - * Identity Pool ID), which is used to call {AWS.CognitoIdentity.getId} to - * obtain an `IdentityId`. If the identity or identity pool is not configured in - * the Amazon Cognito Console to use IAM roles with the appropriate permissions, - * then additionally a `RoleArn` is required containing the ARN of the IAM trust - * policy for the Amazon Cognito role that the user will log into. If a `RoleArn` - * is provided, then this provider gets credentials using the - * {AWS.STS.assumeRoleWithWebIdentity} service operation, after first getting an - * Open ID token from {AWS.CognitoIdentity.getOpenIdToken}. - * - * In addition, if this credential provider is used to provide authenticated - * login, the `Logins` map may be set to the tokens provided by the respective - * identity providers. See {constructor} for an example on creating a credentials - * object with proper property values. - * - * ## Refreshing Credentials from Identity Service - * - * In addition to AWS credentials expiring after a given amount of time, the - * login token from the identity provider will also expire. Once this token - * expires, it will not be usable to refresh AWS credentials, and another - * token will be needed. The SDK does not manage refreshing of the token value, - * but this can be done through a "refresh token" supported by most identity - * providers. Consult the documentation for the identity provider for refreshing - * tokens. Once the refreshed token is acquired, you should make sure to update - * this new token in the credentials object's {params} property. The following - * code will update the WebIdentityToken, assuming you have retrieved an updated - * token from the identity provider: - * - * ```javascript - * AWS.config.credentials.params.Logins['graph.facebook.com'] = updatedToken; - * ``` - * - * Future calls to `credentials.refresh()` will now use the new token. - * - * @!attribute params - * @return [map] the map of params passed to - * {AWS.CognitoIdentity.getId}, - * {AWS.CognitoIdentity.getOpenIdToken}, and - * {AWS.STS.assumeRoleWithWebIdentity}. To update the token, set the - * `params.WebIdentityToken` property. - * @!attribute data - * @return [map] the raw data response from the call to - * {AWS.CognitoIdentity.getCredentialsForIdentity}, or - * {AWS.STS.assumeRoleWithWebIdentity}. Use this if you want to get - * access to other properties from the response. - * @!attribute identityId - * @return [String] the Cognito ID returned by the last call to - * {AWS.CognitoIdentity.getOpenIdToken}. This ID represents the actual - * final resolved identity ID from Amazon Cognito. - */ - AWS.CognitoIdentityCredentials = AWS.util.inherit(AWS.Credentials, { - /** - * @api private - */ - localStorageKey: { - id: "aws.cognito.identity-id.", - providers: "aws.cognito.identity-providers.", - }, - - /** - * Creates a new credentials object. - * @example Creating a new credentials object - * AWS.config.credentials = new AWS.CognitoIdentityCredentials({ - * - * // either IdentityPoolId or IdentityId is required - * // See the IdentityPoolId param for AWS.CognitoIdentity.getID (linked below) - * // See the IdentityId param for AWS.CognitoIdentity.getCredentialsForIdentity - * // or AWS.CognitoIdentity.getOpenIdToken (linked below) - * IdentityPoolId: 'us-east-1:1699ebc0-7900-4099-b910-2df94f52a030', - * IdentityId: 'us-east-1:128d0a74-c82f-4553-916d-90053e4a8b0f' - * - * // optional, only necessary when the identity pool is not configured - * // to use IAM roles in the Amazon Cognito Console - * // See the RoleArn param for AWS.STS.assumeRoleWithWebIdentity (linked below) - * RoleArn: 'arn:aws:iam::1234567890:role/MYAPP-CognitoIdentity', - * - * // optional tokens, used for authenticated login - * // See the Logins param for AWS.CognitoIdentity.getID (linked below) - * Logins: { - * 'graph.facebook.com': 'FBTOKEN', - * 'www.amazon.com': 'AMAZONTOKEN', - * 'accounts.google.com': 'GOOGLETOKEN', - * 'api.twitter.com': 'TWITTERTOKEN', - * 'www.digits.com': 'DIGITSTOKEN' - * }, - * - * // optional name, defaults to web-identity - * // See the RoleSessionName param for AWS.STS.assumeRoleWithWebIdentity (linked below) - * RoleSessionName: 'web', - * - * // optional, only necessary when application runs in a browser - * // and multiple users are signed in at once, used for caching - * LoginId: 'example@gmail.com' - * - * }, { - * // optionally provide configuration to apply to the underlying service clients - * // if configuration is not provided, then configuration will be pulled from AWS.config - * - * // region should match the region your identity pool is located in - * region: 'us-east-1', - * - * // specify timeout options - * httpOptions: { - * timeout: 100 - * } - * }); - * @see AWS.CognitoIdentity.getId - * @see AWS.CognitoIdentity.getCredentialsForIdentity - * @see AWS.STS.assumeRoleWithWebIdentity - * @see AWS.CognitoIdentity.getOpenIdToken - * @see AWS.Config - * @note If a region is not provided in the global AWS.config, or - * specified in the `clientConfig` to the CognitoIdentityCredentials - * constructor, you may encounter a 'Missing credentials in config' error - * when calling making a service call. - */ - constructor: function CognitoIdentityCredentials(params, clientConfig) { - AWS.Credentials.call(this); - this.expired = true; - this.params = params; - this.data = null; - this._identityId = null; - this._clientConfig = AWS.util.copy(clientConfig || {}); - this.loadCachedId(); - var self = this; - Object.defineProperty(this, "identityId", { - get: function () { - self.loadCachedId(); - return self._identityId || self.params.IdentityId; - }, - set: function (identityId) { - self._identityId = identityId; - }, - }); - }, - - /** - * Refreshes credentials using {AWS.CognitoIdentity.getCredentialsForIdentity}, - * or {AWS.STS.assumeRoleWithWebIdentity}. - * - * @callback callback function(err) - * Called when the STS service responds (or fails). When - * this callback is called with no error, it means that the credentials - * information has been loaded into the object (as the `accessKeyId`, - * `secretAccessKey`, and `sessionToken` properties). - * @param err [Error] if an error occurred, this value will be filled - * @see AWS.Credentials.get - */ - refresh: function refresh(callback) { - this.coalesceRefresh(callback || AWS.util.fn.callback); - }, - - /** - * @api private - * @param callback - */ - load: function load(callback) { - var self = this; - self.createClients(); - self.data = null; - self._identityId = null; - self.getId(function (err) { - if (!err) { - if (!self.params.RoleArn) { - self.getCredentialsForIdentity(callback); - } else { - self.getCredentialsFromSTS(callback); - } - } else { - self.clearIdOnNotAuthorized(err); - callback(err); - } - }); - }, - - /** - * Clears the cached Cognito ID associated with the currently configured - * identity pool ID. Use this to manually invalidate your cache if - * the identity pool ID was deleted. - */ - clearCachedId: function clearCache() { - this._identityId = null; - delete this.params.IdentityId; - - var poolId = this.params.IdentityPoolId; - var loginId = this.params.LoginId || ""; - delete this.storage[this.localStorageKey.id + poolId + loginId]; - delete this.storage[ - this.localStorageKey.providers + poolId + loginId - ]; - }, - - /** - * @api private - */ - clearIdOnNotAuthorized: function clearIdOnNotAuthorized(err) { - var self = this; - if (err.code == "NotAuthorizedException") { - self.clearCachedId(); - } - }, - - /** - * Retrieves a Cognito ID, loading from cache if it was already retrieved - * on this device. - * - * @callback callback function(err, identityId) - * @param err [Error, null] an error object if the call failed or null if - * it succeeded. - * @param identityId [String, null] if successful, the callback will return - * the Cognito ID. - * @note If not loaded explicitly, the Cognito ID is loaded and stored in - * localStorage in the browser environment of a device. - * @api private - */ - getId: function getId(callback) { - var self = this; - if (typeof self.params.IdentityId === "string") { - return callback(null, self.params.IdentityId); - } - - self.cognito.getId(function (err, data) { - if (!err && data.IdentityId) { - self.params.IdentityId = data.IdentityId; - callback(null, data.IdentityId); - } else { - callback(err); - } - }); - }, - - /** - * @api private - */ - loadCredentials: function loadCredentials(data, credentials) { - if (!data || !credentials) return; - credentials.expired = false; - credentials.accessKeyId = data.Credentials.AccessKeyId; - credentials.secretAccessKey = data.Credentials.SecretKey; - credentials.sessionToken = data.Credentials.SessionToken; - credentials.expireTime = data.Credentials.Expiration; - }, - - /** - * @api private - */ - getCredentialsForIdentity: function getCredentialsForIdentity( - callback - ) { - var self = this; - self.cognito.getCredentialsForIdentity(function (err, data) { - if (!err) { - self.cacheId(data); - self.data = data; - self.loadCredentials(self.data, self); - } else { - self.clearIdOnNotAuthorized(err); - } - callback(err); - }); - }, - - /** - * @api private - */ - getCredentialsFromSTS: function getCredentialsFromSTS(callback) { - var self = this; - self.cognito.getOpenIdToken(function (err, data) { - if (!err) { - self.cacheId(data); - self.params.WebIdentityToken = data.Token; - self.webIdentityCredentials.refresh(function (webErr) { - if (!webErr) { - self.data = self.webIdentityCredentials.data; - self.sts.credentialsFrom(self.data, self); - } - callback(webErr); - }); - } else { - self.clearIdOnNotAuthorized(err); - callback(err); - } - }); - }, - - /** - * @api private - */ - loadCachedId: function loadCachedId() { - var self = this; - - // in the browser we source default IdentityId from localStorage - if (AWS.util.isBrowser() && !self.params.IdentityId) { - var id = self.getStorage("id"); - if (id && self.params.Logins) { - var actualProviders = Object.keys(self.params.Logins); - var cachedProviders = (self.getStorage("providers") || "").split( - "," - ); - - // only load ID if at least one provider used this ID before - var intersect = cachedProviders.filter(function (n) { - return actualProviders.indexOf(n) !== -1; - }); - if (intersect.length !== 0) { - self.params.IdentityId = id; - } - } else if (id) { - self.params.IdentityId = id; - } - } - }, - - /** - * @api private - */ - createClients: function () { - var clientConfig = this._clientConfig; - this.webIdentityCredentials = - this.webIdentityCredentials || - new AWS.WebIdentityCredentials(this.params, clientConfig); - if (!this.cognito) { - var cognitoConfig = AWS.util.merge({}, clientConfig); - cognitoConfig.params = this.params; - this.cognito = new CognitoIdentity(cognitoConfig); - } - this.sts = this.sts || new STS(clientConfig); - }, - - /** - * @api private - */ - cacheId: function cacheId(data) { - this._identityId = data.IdentityId; - this.params.IdentityId = this._identityId; - - // cache this IdentityId in browser localStorage if possible - if (AWS.util.isBrowser()) { - this.setStorage("id", data.IdentityId); - - if (this.params.Logins) { - this.setStorage( - "providers", - Object.keys(this.params.Logins).join(",") - ); - } - } - }, - - /** - * @api private - */ - getStorage: function getStorage(key) { - return this.storage[ - this.localStorageKey[key] + - this.params.IdentityPoolId + - (this.params.LoginId || "") - ]; - }, - - /** - * @api private - */ - setStorage: function setStorage(key, val) { - try { - this.storage[ - this.localStorageKey[key] + - this.params.IdentityPoolId + - (this.params.LoginId || "") - ] = val; - } catch (_) {} - }, - - /** - * @api private - */ - storage: (function () { - try { - var storage = - AWS.util.isBrowser() && - window.localStorage !== null && - typeof window.localStorage === "object" - ? window.localStorage - : {}; - - // Test set/remove which would throw an error in Safari's private browsing - storage["aws.test-storage"] = "foobar"; - delete storage["aws.test-storage"]; - - return storage; - } catch (_) { - return {}; - } - })(), - }); - - /***/ - }, - - /***/ 36965: /***/ ( - __unused_webpack_module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var AWS = __nccwpck_require__(28437); - - /** - * Creates a credential provider chain that searches for AWS credentials - * in a list of credential providers specified by the {providers} property. - * - * By default, the chain will use the {defaultProviders} to resolve credentials. - * These providers will look in the environment using the - * {AWS.EnvironmentCredentials} class with the 'AWS' and 'AMAZON' prefixes. - * - * ## Setting Providers - * - * Each provider in the {providers} list should be a function that returns - * a {AWS.Credentials} object, or a hardcoded credentials object. The function - * form allows for delayed execution of the credential construction. - * - * ## Resolving Credentials from a Chain - * - * Call {resolve} to return the first valid credential object that can be - * loaded by the provider chain. - * - * For example, to resolve a chain with a custom provider that checks a file - * on disk after the set of {defaultProviders}: - * - * ```javascript - * var diskProvider = new AWS.FileSystemCredentials('./creds.json'); - * var chain = new AWS.CredentialProviderChain(); - * chain.providers.push(diskProvider); - * chain.resolve(); - * ``` - * - * The above code will return the `diskProvider` object if the - * file contains credentials and the `defaultProviders` do not contain - * any credential settings. - * - * @!attribute providers - * @return [Array] - * a list of credentials objects or functions that return credentials - * objects. If the provider is a function, the function will be - * executed lazily when the provider needs to be checked for valid - * credentials. By default, this object will be set to the - * {defaultProviders}. - * @see defaultProviders - */ - AWS.CredentialProviderChain = AWS.util.inherit(AWS.Credentials, { - /** - * Creates a new CredentialProviderChain with a default set of providers - * specified by {defaultProviders}. - */ - constructor: function CredentialProviderChain(providers) { - if (providers) { - this.providers = providers; - } else { - this.providers = AWS.CredentialProviderChain.defaultProviders.slice( - 0 - ); - } - this.resolveCallbacks = []; - }, - - /** - * @!method resolvePromise() - * Returns a 'thenable' promise. - * Resolves the provider chain by searching for the first set of - * credentials in {providers}. - * - * Two callbacks can be provided to the `then` method on the returned promise. - * The first callback will be called if the promise is fulfilled, and the second - * callback will be called if the promise is rejected. - * @callback fulfilledCallback function(credentials) - * Called if the promise is fulfilled and the provider resolves the chain - * to a credentials object - * @param credentials [AWS.Credentials] the credentials object resolved - * by the provider chain. - * @callback rejectedCallback function(error) - * Called if the promise is rejected. - * @param err [Error] the error object returned if no credentials are found. - * @return [Promise] A promise that represents the state of the `resolve` method call. - * @example Calling the `resolvePromise` method. - * var promise = chain.resolvePromise(); - * promise.then(function(credentials) { ... }, function(err) { ... }); - */ - - /** - * Resolves the provider chain by searching for the first set of - * credentials in {providers}. - * - * @callback callback function(err, credentials) - * Called when the provider resolves the chain to a credentials object - * or null if no credentials can be found. - * - * @param err [Error] the error object returned if no credentials are - * found. - * @param credentials [AWS.Credentials] the credentials object resolved - * by the provider chain. - * @return [AWS.CredentialProviderChain] the provider, for chaining. - */ - resolve: function resolve(callback) { - var self = this; - if (self.providers.length === 0) { - callback(new Error("No providers")); - return self; - } - - if (self.resolveCallbacks.push(callback) === 1) { - var index = 0; - var providers = self.providers.slice(0); - - function resolveNext(err, creds) { - if ((!err && creds) || index === providers.length) { - AWS.util.arrayEach(self.resolveCallbacks, function (callback) { - callback(err, creds); - }); - self.resolveCallbacks.length = 0; - return; - } - - var provider = providers[index++]; - if (typeof provider === "function") { - creds = provider.call(); - } else { - creds = provider; - } - - if (creds.get) { - creds.get(function (getErr) { - resolveNext(getErr, getErr ? null : creds); - }); - } else { - resolveNext(null, creds); - } - } - - resolveNext(); - } - - return self; - }, - }); - - /** - * The default set of providers used by a vanilla CredentialProviderChain. - * - * In the browser: - * - * ```javascript - * AWS.CredentialProviderChain.defaultProviders = [] - * ``` - * - * In Node.js: - * - * ```javascript - * AWS.CredentialProviderChain.defaultProviders = [ - * function () { return new AWS.EnvironmentCredentials('AWS'); }, - * function () { return new AWS.EnvironmentCredentials('AMAZON'); }, - * function () { return new AWS.SharedIniFileCredentials(); }, - * function () { return new AWS.ECSCredentials(); }, - * function () { return new AWS.ProcessCredentials(); }, - * function () { return new AWS.TokenFileWebIdentityCredentials(); }, - * function () { return new AWS.EC2MetadataCredentials() } - * ] - * ``` - */ - AWS.CredentialProviderChain.defaultProviders = []; - - /** - * @api private - */ - AWS.CredentialProviderChain.addPromisesToClass = function addPromisesToClass( - PromiseDependency - ) { - this.prototype.resolvePromise = AWS.util.promisifyMethod( - "resolve", - PromiseDependency - ); - }; - - /** - * @api private - */ - AWS.CredentialProviderChain.deletePromisesFromClass = function deletePromisesFromClass() { - delete this.prototype.resolvePromise; - }; - - AWS.util.addPromises(AWS.CredentialProviderChain); - - /***/ - }, - - /***/ 73379: /***/ ( - __unused_webpack_module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var AWS = __nccwpck_require__(28437); - __nccwpck_require__(25768); - - /** - * Represents credentials received from the metadata service on an EC2 instance. - * - * By default, this class will connect to the metadata service using - * {AWS.MetadataService} and attempt to load any available credentials. If it - * can connect, and credentials are available, these will be used with zero - * configuration. - * - * This credentials class will by default timeout after 1 second of inactivity - * and retry 3 times. - * If your requests to the EC2 metadata service are timing out, you can increase - * these values by configuring them directly: - * - * ```javascript - * AWS.config.credentials = new AWS.EC2MetadataCredentials({ - * httpOptions: { timeout: 5000 }, // 5 second timeout - * maxRetries: 10, // retry 10 times - * retryDelayOptions: { base: 200 } // see AWS.Config for information - * }); - * - * If your requests are timing out in connecting to the metadata service, such - * as when testing on a development machine, you can use the connectTimeout - * option, specified in milliseconds, which also defaults to 1 second. - * ``` - * - * @see AWS.Config.retryDelayOptions - * - * @!macro nobrowser - */ - AWS.EC2MetadataCredentials = AWS.util.inherit(AWS.Credentials, { - constructor: function EC2MetadataCredentials(options) { - AWS.Credentials.call(this); - - options = options ? AWS.util.copy(options) : {}; - options = AWS.util.merge( - { maxRetries: this.defaultMaxRetries }, - options - ); - if (!options.httpOptions) options.httpOptions = {}; - options.httpOptions = AWS.util.merge( - { - timeout: this.defaultTimeout, - connectTimeout: this.defaultConnectTimeout, - }, - options.httpOptions - ); - - this.metadataService = new AWS.MetadataService(options); - this.metadata = {}; - }, - - /** - * @api private - */ - defaultTimeout: 1000, - - /** - * @api private - */ - defaultConnectTimeout: 1000, - - /** - * @api private - */ - defaultMaxRetries: 3, - - /** - * Loads the credentials from the instance metadata service - * - * @callback callback function(err) - * Called when the instance metadata service responds (or fails). When - * this callback is called with no error, it means that the credentials - * information has been loaded into the object (as the `accessKeyId`, - * `secretAccessKey`, and `sessionToken` properties). - * @param err [Error] if an error occurred, this value will be filled - * @see get - */ - refresh: function refresh(callback) { - this.coalesceRefresh(callback || AWS.util.fn.callback); - }, - - /** - * @api private - * @param callback - */ - load: function load(callback) { - var self = this; - self.metadataService.loadCredentials(function (err, creds) { - if (!err) { - var currentTime = AWS.util.date.getDate(); - var expireTime = new Date(creds.Expiration); - if (expireTime < currentTime) { - err = AWS.util.error( - new Error( - "EC2 Instance Metadata Serivce provided expired credentials" - ), - { code: "EC2MetadataCredentialsProviderFailure" } - ); - } else { - self.expired = false; - self.metadata = creds; - self.accessKeyId = creds.AccessKeyId; - self.secretAccessKey = creds.SecretAccessKey; - self.sessionToken = creds.Token; - self.expireTime = expireTime; - } - } - callback(err); - }); - }, - }); - - /***/ - }, - - /***/ 10645: /***/ ( - __unused_webpack_module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var AWS = __nccwpck_require__(28437); - - /** - * Represents credentials received from relative URI specified in the ECS container. - * - * This class will request refreshable credentials from the relative URI - * specified by the AWS_CONTAINER_CREDENTIALS_RELATIVE_URI or the - * AWS_CONTAINER_CREDENTIALS_FULL_URI environment variable. If valid credentials - * are returned in the response, these will be used with zero configuration. - * - * This credentials class will by default timeout after 1 second of inactivity - * and retry 3 times. - * If your requests to the relative URI are timing out, you can increase - * the value by configuring them directly: - * - * ```javascript - * AWS.config.credentials = new AWS.ECSCredentials({ - * httpOptions: { timeout: 5000 }, // 5 second timeout - * maxRetries: 10, // retry 10 times - * retryDelayOptions: { base: 200 } // see AWS.Config for information - * }); - * ``` - * - * @see AWS.Config.retryDelayOptions - * - * @!macro nobrowser - */ - AWS.ECSCredentials = AWS.RemoteCredentials; - - /***/ - }, - - /***/ 57714: /***/ ( - __unused_webpack_module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var AWS = __nccwpck_require__(28437); - - /** - * Represents credentials from the environment. - * - * By default, this class will look for the matching environment variables - * prefixed by a given {envPrefix}. The un-prefixed environment variable names - * for each credential value is listed below: - * - * ```javascript - * accessKeyId: ACCESS_KEY_ID - * secretAccessKey: SECRET_ACCESS_KEY - * sessionToken: SESSION_TOKEN - * ``` - * - * With the default prefix of 'AWS', the environment variables would be: - * - * AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN - * - * @!attribute envPrefix - * @readonly - * @return [String] the prefix for the environment variable names excluding - * the separating underscore ('_'). - */ - AWS.EnvironmentCredentials = AWS.util.inherit(AWS.Credentials, { - /** - * Creates a new EnvironmentCredentials class with a given variable - * prefix {envPrefix}. For example, to load credentials using the 'AWS' - * prefix: - * - * ```javascript - * var creds = new AWS.EnvironmentCredentials('AWS'); - * creds.accessKeyId == 'AKID' // from AWS_ACCESS_KEY_ID env var - * ``` - * - * @param envPrefix [String] the prefix to use (e.g., 'AWS') for environment - * variables. Do not include the separating underscore. - */ - constructor: function EnvironmentCredentials(envPrefix) { - AWS.Credentials.call(this); - this.envPrefix = envPrefix; - this.get(function () {}); - }, - - /** - * Loads credentials from the environment using the prefixed - * environment variables. - * - * @callback callback function(err) - * Called after the (prefixed) ACCESS_KEY_ID, SECRET_ACCESS_KEY, and - * SESSION_TOKEN environment variables are read. When this callback is - * called with no error, it means that the credentials information has - * been loaded into the object (as the `accessKeyId`, `secretAccessKey`, - * and `sessionToken` properties). - * @param err [Error] if an error occurred, this value will be filled - * @see get - */ - refresh: function refresh(callback) { - if (!callback) callback = AWS.util.fn.callback; - - if (!process || !process.env) { - callback( - AWS.util.error( - new Error("No process info or environment variables available"), - { code: "EnvironmentCredentialsProviderFailure" } - ) - ); - return; - } - - var keys = ["ACCESS_KEY_ID", "SECRET_ACCESS_KEY", "SESSION_TOKEN"]; - var values = []; - - for (var i = 0; i < keys.length; i++) { - var prefix = ""; - if (this.envPrefix) prefix = this.envPrefix + "_"; - values[i] = process.env[prefix + keys[i]]; - if (!values[i] && keys[i] !== "SESSION_TOKEN") { - callback( - AWS.util.error( - new Error("Variable " + prefix + keys[i] + " not set."), - { code: "EnvironmentCredentialsProviderFailure" } - ) - ); - return; - } - } - - this.expired = false; - AWS.Credentials.apply(this, values); - callback(); - }, - }); - - /***/ - }, - - /***/ 27454: /***/ ( - __unused_webpack_module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var AWS = __nccwpck_require__(28437); - - /** - * Represents credentials from a JSON file on disk. - * If the credentials expire, the SDK can {refresh} the credentials - * from the file. - * - * The format of the file should be similar to the options passed to - * {AWS.Config}: - * - * ```javascript - * {accessKeyId: 'akid', secretAccessKey: 'secret', sessionToken: 'optional'} - * ``` - * - * @example Loading credentials from disk - * var creds = new AWS.FileSystemCredentials('./configuration.json'); - * creds.accessKeyId == 'AKID' - * - * @!attribute filename - * @readonly - * @return [String] the path to the JSON file on disk containing the - * credentials. - * @!macro nobrowser - */ - AWS.FileSystemCredentials = AWS.util.inherit(AWS.Credentials, { - /** - * @overload AWS.FileSystemCredentials(filename) - * Creates a new FileSystemCredentials object from a filename - * - * @param filename [String] the path on disk to the JSON file to load. - */ - constructor: function FileSystemCredentials(filename) { - AWS.Credentials.call(this); - this.filename = filename; - this.get(function () {}); - }, - - /** - * Loads the credentials from the {filename} on disk. - * - * @callback callback function(err) - * Called after the JSON file on disk is read and parsed. When this callback - * is called with no error, it means that the credentials information - * has been loaded into the object (as the `accessKeyId`, `secretAccessKey`, - * and `sessionToken` properties). - * @param err [Error] if an error occurred, this value will be filled - * @see get - */ - refresh: function refresh(callback) { - if (!callback) callback = AWS.util.fn.callback; - try { - var creds = JSON.parse(AWS.util.readFileSync(this.filename)); - AWS.Credentials.call(this, creds); - if (!this.accessKeyId || !this.secretAccessKey) { - throw AWS.util.error( - new Error("Credentials not set in " + this.filename), - { code: "FileSystemCredentialsProviderFailure" } - ); - } - this.expired = false; - callback(); - } catch (err) { - callback(err); - } - }, - }); - - /***/ - }, - - /***/ 80371: /***/ ( - __unused_webpack_module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var AWS = __nccwpck_require__(28437); - var proc = __nccwpck_require__(32081); - var iniLoader = AWS.util.iniLoader; - - /** - * Represents credentials loaded from shared credentials file - * (defaulting to ~/.aws/credentials or defined by the - * `AWS_SHARED_CREDENTIALS_FILE` environment variable). - * - * ## Using process credentials - * - * The credentials file can specify a credential provider that executes - * a given process and attempts to read its stdout to recieve a JSON payload - * containing the credentials: - * - * [default] - * credential_process = /usr/bin/credential_proc - * - * Automatically handles refreshing credentials if an Expiration time is - * provided in the credentials payload. Credentials supplied in the same profile - * will take precedence over the credential_process. - * - * Sourcing credentials from an external process can potentially be dangerous, - * so proceed with caution. Other credential providers should be preferred if - * at all possible. If using this option, you should make sure that the shared - * credentials file is as locked down as possible using security best practices - * for your operating system. - * - * ## Using custom profiles - * - * The SDK supports loading credentials for separate profiles. This can be done - * in two ways: - * - * 1. Set the `AWS_PROFILE` environment variable in your process prior to - * loading the SDK. - * 2. Directly load the AWS.ProcessCredentials provider: - * - * ```javascript - * var creds = new AWS.ProcessCredentials({profile: 'myprofile'}); - * AWS.config.credentials = creds; - * ``` - * - * @!macro nobrowser - */ - AWS.ProcessCredentials = AWS.util.inherit(AWS.Credentials, { - /** - * Creates a new ProcessCredentials object. - * - * @param options [map] a set of options - * @option options profile [String] (AWS_PROFILE env var or 'default') - * the name of the profile to load. - * @option options filename [String] ('~/.aws/credentials' or defined by - * AWS_SHARED_CREDENTIALS_FILE process env var) - * the filename to use when loading credentials. - * @option options callback [Function] (err) Credentials are eagerly loaded - * by the constructor. When the callback is called with no error, the - * credentials have been loaded successfully. - */ - constructor: function ProcessCredentials(options) { - AWS.Credentials.call(this); - - options = options || {}; - - this.filename = options.filename; - this.profile = - options.profile || - process.env.AWS_PROFILE || - AWS.util.defaultProfile; - this.get(options.callback || AWS.util.fn.noop); - }, - - /** - * @api private - */ - load: function load(callback) { - var self = this; - try { - var profiles = AWS.util.getProfilesFromSharedConfig( - iniLoader, - this.filename - ); - var profile = profiles[this.profile] || {}; - - if (Object.keys(profile).length === 0) { - throw AWS.util.error( - new Error("Profile " + this.profile + " not found"), - { code: "ProcessCredentialsProviderFailure" } - ); - } - - if (profile["credential_process"]) { - this.loadViaCredentialProcess(profile, function (err, data) { - if (err) { - callback(err, null); - } else { - self.expired = false; - self.accessKeyId = data.AccessKeyId; - self.secretAccessKey = data.SecretAccessKey; - self.sessionToken = data.SessionToken; - if (data.Expiration) { - self.expireTime = new Date(data.Expiration); - } - callback(null); - } - }); - } else { - throw AWS.util.error( - new Error( - "Profile " + - this.profile + - " did not include credential process" - ), - { code: "ProcessCredentialsProviderFailure" } - ); - } - } catch (err) { - callback(err); - } - }, - - /** - * Executes the credential_process and retrieves - * credentials from the output - * @api private - * @param profile [map] credentials profile - * @throws ProcessCredentialsProviderFailure - */ - loadViaCredentialProcess: function loadViaCredentialProcess( - profile, - callback - ) { - proc.exec(profile["credential_process"], function ( - err, - stdOut, - stdErr - ) { - if (err) { - callback( - AWS.util.error(new Error("credential_process returned error"), { - code: "ProcessCredentialsProviderFailure", - }), - null - ); - } else { - try { - var credData = JSON.parse(stdOut); - if (credData.Expiration) { - var currentTime = AWS.util.date.getDate(); - var expireTime = new Date(credData.Expiration); - if (expireTime < currentTime) { - throw Error( - "credential_process returned expired credentials" - ); - } - } - - if (credData.Version !== 1) { - throw Error( - "credential_process does not return Version == 1" - ); - } - callback(null, credData); - } catch (err) { - callback( - AWS.util.error(new Error(err.message), { - code: "ProcessCredentialsProviderFailure", - }), - null - ); - } - } - }); - }, - - /** - * Loads the credentials from the credential process - * - * @callback callback function(err) - * Called after the credential process has been executed. When this - * callback is called with no error, it means that the credentials - * information has been loaded into the object (as the `accessKeyId`, - * `secretAccessKey`, and `sessionToken` properties). - * @param err [Error] if an error occurred, this value will be filled - * @see get - */ - refresh: function refresh(callback) { - iniLoader.clearCachedFiles(); - this.coalesceRefresh(callback || AWS.util.fn.callback); - }, - }); - - /***/ - }, - - /***/ 88764: /***/ ( - __unused_webpack_module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var AWS = __nccwpck_require__(28437), - ENV_RELATIVE_URI = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI", - ENV_FULL_URI = "AWS_CONTAINER_CREDENTIALS_FULL_URI", - ENV_AUTH_TOKEN = "AWS_CONTAINER_AUTHORIZATION_TOKEN", - FULL_URI_UNRESTRICTED_PROTOCOLS = ["https:"], - FULL_URI_ALLOWED_PROTOCOLS = ["http:", "https:"], - FULL_URI_ALLOWED_HOSTNAMES = ["localhost", "127.0.0.1"], - RELATIVE_URI_HOST = "169.254.170.2"; - - /** - * Represents credentials received from specified URI. - * - * This class will request refreshable credentials from the relative URI - * specified by the AWS_CONTAINER_CREDENTIALS_RELATIVE_URI or the - * AWS_CONTAINER_CREDENTIALS_FULL_URI environment variable. If valid credentials - * are returned in the response, these will be used with zero configuration. - * - * This credentials class will by default timeout after 1 second of inactivity - * and retry 3 times. - * If your requests to the relative URI are timing out, you can increase - * the value by configuring them directly: - * - * ```javascript - * AWS.config.credentials = new AWS.RemoteCredentials({ - * httpOptions: { timeout: 5000 }, // 5 second timeout - * maxRetries: 10, // retry 10 times - * retryDelayOptions: { base: 200 } // see AWS.Config for information - * }); - * ``` - * - * @see AWS.Config.retryDelayOptions - * - * @!macro nobrowser - */ - AWS.RemoteCredentials = AWS.util.inherit(AWS.Credentials, { - constructor: function RemoteCredentials(options) { - AWS.Credentials.call(this); - options = options ? AWS.util.copy(options) : {}; - if (!options.httpOptions) options.httpOptions = {}; - options.httpOptions = AWS.util.merge( - this.httpOptions, - options.httpOptions - ); - AWS.util.update(this, options); - }, - - /** - * @api private - */ - httpOptions: { timeout: 1000 }, - - /** - * @api private - */ - maxRetries: 3, - - /** - * @api private - */ - isConfiguredForEcsCredentials: function isConfiguredForEcsCredentials() { - return Boolean( - process && - process.env && - (process.env[ENV_RELATIVE_URI] || process.env[ENV_FULL_URI]) - ); - }, - - /** - * @api private - */ - getECSFullUri: function getECSFullUri() { - if (process && process.env) { - var relative = process.env[ENV_RELATIVE_URI], - full = process.env[ENV_FULL_URI]; - if (relative) { - return "http://" + RELATIVE_URI_HOST + relative; - } else if (full) { - var parsed = AWS.util.urlParse(full); - if (FULL_URI_ALLOWED_PROTOCOLS.indexOf(parsed.protocol) < 0) { - throw AWS.util.error( - new Error( - "Unsupported protocol: AWS.RemoteCredentials supports " + - FULL_URI_ALLOWED_PROTOCOLS.join(",") + - " only; " + - parsed.protocol + - " requested." - ), - { code: "ECSCredentialsProviderFailure" } - ); - } - - if ( - FULL_URI_UNRESTRICTED_PROTOCOLS.indexOf(parsed.protocol) < 0 && - FULL_URI_ALLOWED_HOSTNAMES.indexOf(parsed.hostname) < 0 - ) { - throw AWS.util.error( - new Error( - "Unsupported hostname: AWS.RemoteCredentials only supports " + - FULL_URI_ALLOWED_HOSTNAMES.join(",") + - " for " + - parsed.protocol + - "; " + - parsed.protocol + - "//" + - parsed.hostname + - " requested." - ), - { code: "ECSCredentialsProviderFailure" } - ); - } - - return full; - } else { - throw AWS.util.error( - new Error( - "Variable " + - ENV_RELATIVE_URI + - " or " + - ENV_FULL_URI + - " must be set to use AWS.RemoteCredentials." - ), - { code: "ECSCredentialsProviderFailure" } - ); - } - } else { - throw AWS.util.error(new Error("No process info available"), { - code: "ECSCredentialsProviderFailure", - }); - } - }, - - /** - * @api private - */ - getECSAuthToken: function getECSAuthToken() { - if (process && process.env && process.env[ENV_FULL_URI]) { - return process.env[ENV_AUTH_TOKEN]; - } - }, - - /** - * @api private - */ - credsFormatIsValid: function credsFormatIsValid(credData) { - return ( - !!credData.accessKeyId && - !!credData.secretAccessKey && - !!credData.sessionToken && - !!credData.expireTime - ); - }, - - /** - * @api private - */ - formatCreds: function formatCreds(credData) { - if (!!credData.credentials) { - credData = credData.credentials; - } - - return { - expired: false, - accessKeyId: credData.accessKeyId || credData.AccessKeyId, - secretAccessKey: - credData.secretAccessKey || credData.SecretAccessKey, - sessionToken: credData.sessionToken || credData.Token, - expireTime: new Date(credData.expiration || credData.Expiration), - }; - }, - - /** - * @api private - */ - request: function request(url, callback) { - var httpRequest = new AWS.HttpRequest(url); - httpRequest.method = "GET"; - httpRequest.headers.Accept = "application/json"; - var token = this.getECSAuthToken(); - if (token) { - httpRequest.headers.Authorization = token; - } - AWS.util.handleRequestWithRetries(httpRequest, this, callback); - }, - - /** - * Loads the credentials from the relative URI specified by container - * - * @callback callback function(err) - * Called when the request to the relative URI responds (or fails). When - * this callback is called with no error, it means that the credentials - * information has been loaded into the object (as the `accessKeyId`, - * `secretAccessKey`, `sessionToken`, and `expireTime` properties). - * @param err [Error] if an error occurred, this value will be filled - * @see get - */ - refresh: function refresh(callback) { - this.coalesceRefresh(callback || AWS.util.fn.callback); - }, - - /** - * @api private - */ - load: function load(callback) { - var self = this; - var fullUri; - - try { - fullUri = this.getECSFullUri(); - } catch (err) { - callback(err); - return; - } - - this.request(fullUri, function (err, data) { - if (!err) { - try { - data = JSON.parse(data); - var creds = self.formatCreds(data); - if (!self.credsFormatIsValid(creds)) { - throw AWS.util.error( - new Error("Response data is not in valid format"), - { code: "ECSCredentialsProviderFailure" } - ); - } - AWS.util.update(self, creds); - } catch (dataError) { - err = dataError; - } - } - callback(err, creds); - }); - }, - }); - - /***/ - }, - - /***/ 15037: /***/ ( - __unused_webpack_module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var AWS = __nccwpck_require__(28437); - var STS = __nccwpck_require__(57513); - - /** - * Represents credentials retrieved from STS SAML support. - * - * By default this provider gets credentials using the - * {AWS.STS.assumeRoleWithSAML} service operation. This operation - * requires a `RoleArn` containing the ARN of the IAM trust policy for the - * application for which credentials will be given, as well as a `PrincipalArn` - * representing the ARN for the SAML identity provider. In addition, the - * `SAMLAssertion` must be set to the token provided by the identity - * provider. See {constructor} for an example on creating a credentials - * object with proper `RoleArn`, `PrincipalArn`, and `SAMLAssertion` values. - * - * ## Refreshing Credentials from Identity Service - * - * In addition to AWS credentials expiring after a given amount of time, the - * login token from the identity provider will also expire. Once this token - * expires, it will not be usable to refresh AWS credentials, and another - * token will be needed. The SDK does not manage refreshing of the token value, - * but this can be done through a "refresh token" supported by most identity - * providers. Consult the documentation for the identity provider for refreshing - * tokens. Once the refreshed token is acquired, you should make sure to update - * this new token in the credentials object's {params} property. The following - * code will update the SAMLAssertion, assuming you have retrieved an updated - * token from the identity provider: - * - * ```javascript - * AWS.config.credentials.params.SAMLAssertion = updatedToken; - * ``` - * - * Future calls to `credentials.refresh()` will now use the new token. - * - * @!attribute params - * @return [map] the map of params passed to - * {AWS.STS.assumeRoleWithSAML}. To update the token, set the - * `params.SAMLAssertion` property. - */ - AWS.SAMLCredentials = AWS.util.inherit(AWS.Credentials, { - /** - * Creates a new credentials object. - * @param (see AWS.STS.assumeRoleWithSAML) - * @example Creating a new credentials object - * AWS.config.credentials = new AWS.SAMLCredentials({ - * RoleArn: 'arn:aws:iam::1234567890:role/SAMLRole', - * PrincipalArn: 'arn:aws:iam::1234567890:role/SAMLPrincipal', - * SAMLAssertion: 'base64-token', // base64-encoded token from IdP - * }); - * @see AWS.STS.assumeRoleWithSAML - */ - constructor: function SAMLCredentials(params) { - AWS.Credentials.call(this); - this.expired = true; - this.params = params; - }, - - /** - * Refreshes credentials using {AWS.STS.assumeRoleWithSAML} - * - * @callback callback function(err) - * Called when the STS service responds (or fails). When - * this callback is called with no error, it means that the credentials - * information has been loaded into the object (as the `accessKeyId`, - * `secretAccessKey`, and `sessionToken` properties). - * @param err [Error] if an error occurred, this value will be filled - * @see get - */ - refresh: function refresh(callback) { - this.coalesceRefresh(callback || AWS.util.fn.callback); - }, - - /** - * @api private - */ - load: function load(callback) { - var self = this; - self.createClients(); - self.service.assumeRoleWithSAML(function (err, data) { - if (!err) { - self.service.credentialsFrom(data, self); - } - callback(err); - }); - }, - - /** - * @api private - */ - createClients: function () { - this.service = this.service || new STS({ params: this.params }); - }, - }); - - /***/ - }, - - /***/ 13754: /***/ ( - __unused_webpack_module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var AWS = __nccwpck_require__(28437); - var STS = __nccwpck_require__(57513); - var iniLoader = AWS.util.iniLoader; - - var ASSUME_ROLE_DEFAULT_REGION = "us-east-1"; - - /** - * Represents credentials loaded from shared credentials file - * (defaulting to ~/.aws/credentials or defined by the - * `AWS_SHARED_CREDENTIALS_FILE` environment variable). - * - * ## Using the shared credentials file - * - * This provider is checked by default in the Node.js environment. To use the - * credentials file provider, simply add your access and secret keys to the - * ~/.aws/credentials file in the following format: - * - * [default] - * aws_access_key_id = AKID... - * aws_secret_access_key = YOUR_SECRET_KEY - * - * ## Using custom profiles - * - * The SDK supports loading credentials for separate profiles. This can be done - * in two ways: - * - * 1. Set the `AWS_PROFILE` environment variable in your process prior to - * loading the SDK. - * 2. Directly load the AWS.SharedIniFileCredentials provider: - * - * ```javascript - * var creds = new AWS.SharedIniFileCredentials({profile: 'myprofile'}); - * AWS.config.credentials = creds; - * ``` - * - * @!macro nobrowser - */ - AWS.SharedIniFileCredentials = AWS.util.inherit(AWS.Credentials, { - /** - * Creates a new SharedIniFileCredentials object. - * - * @param options [map] a set of options - * @option options profile [String] (AWS_PROFILE env var or 'default') - * the name of the profile to load. - * @option options filename [String] ('~/.aws/credentials' or defined by - * AWS_SHARED_CREDENTIALS_FILE process env var) - * the filename to use when loading credentials. - * @option options disableAssumeRole [Boolean] (false) True to disable - * support for profiles that assume an IAM role. If true, and an assume - * role profile is selected, an error is raised. - * @option options preferStaticCredentials [Boolean] (false) True to - * prefer static credentials to role_arn if both are present. - * @option options tokenCodeFn [Function] (null) Function to provide - * STS Assume Role TokenCode, if mfa_serial is provided for profile in ini - * file. Function is called with value of mfa_serial and callback, and - * should provide the TokenCode or an error to the callback in the format - * callback(err, token) - * @option options callback [Function] (err) Credentials are eagerly loaded - * by the constructor. When the callback is called with no error, the - * credentials have been loaded successfully. - * @option options httpOptions [map] A set of options to pass to the low-level - * HTTP request. Currently supported options are: - * * **proxy** [String] — the URL to proxy requests through - * * **agent** [http.Agent, https.Agent] — the Agent object to perform - * HTTP requests with. Used for connection pooling. Defaults to the global - * agent (`http.globalAgent`) for non-SSL connections. Note that for - * SSL connections, a special Agent object is used in order to enable - * peer certificate verification. This feature is only available in the - * Node.js environment. - * * **connectTimeout** [Integer] — Sets the socket to timeout after - * failing to establish a connection with the server after - * `connectTimeout` milliseconds. This timeout has no effect once a socket - * connection has been established. - * * **timeout** [Integer] — The number of milliseconds a request can - * take before automatically being terminated. - * Defaults to two minutes (120000). - */ - constructor: function SharedIniFileCredentials(options) { - AWS.Credentials.call(this); - - options = options || {}; - - this.filename = options.filename; - this.profile = - options.profile || - process.env.AWS_PROFILE || - AWS.util.defaultProfile; - this.disableAssumeRole = Boolean(options.disableAssumeRole); - this.preferStaticCredentials = Boolean( - options.preferStaticCredentials - ); - this.tokenCodeFn = options.tokenCodeFn || null; - this.httpOptions = options.httpOptions || null; - this.get(options.callback || AWS.util.fn.noop); - }, - - /** - * @api private - */ - load: function load(callback) { - var self = this; - try { - var profiles = AWS.util.getProfilesFromSharedConfig( - iniLoader, - this.filename - ); - var profile = profiles[this.profile] || {}; - - if (Object.keys(profile).length === 0) { - throw AWS.util.error( - new Error("Profile " + this.profile + " not found"), - { code: "SharedIniFileCredentialsProviderFailure" } - ); - } - - /* - In the CLI, the presence of both a role_arn and static credentials have - different meanings depending on how many profiles have been visited. For - the first profile processed, role_arn takes precedence over any static - credentials, but for all subsequent profiles, static credentials are - used if present, and only in their absence will the profile's - source_profile and role_arn keys be used to load another set of - credentials. This var is intended to yield compatible behaviour in this - sdk. - */ - var preferStaticCredentialsToRoleArn = Boolean( - this.preferStaticCredentials && - profile["aws_access_key_id"] && - profile["aws_secret_access_key"] - ); - - if (profile["role_arn"] && !preferStaticCredentialsToRoleArn) { - this.loadRoleProfile(profiles, profile, function (err, data) { - if (err) { - callback(err); - } else { - self.expired = false; - self.accessKeyId = data.Credentials.AccessKeyId; - self.secretAccessKey = data.Credentials.SecretAccessKey; - self.sessionToken = data.Credentials.SessionToken; - self.expireTime = data.Credentials.Expiration; - callback(null); - } - }); - return; - } - - this.accessKeyId = profile["aws_access_key_id"]; - this.secretAccessKey = profile["aws_secret_access_key"]; - this.sessionToken = profile["aws_session_token"]; - - if (!this.accessKeyId || !this.secretAccessKey) { - throw AWS.util.error( - new Error("Credentials not set for profile " + this.profile), - { code: "SharedIniFileCredentialsProviderFailure" } - ); - } - this.expired = false; - callback(null); - } catch (err) { - callback(err); - } - }, - - /** - * Loads the credentials from the shared credentials file - * - * @callback callback function(err) - * Called after the shared INI file on disk is read and parsed. When this - * callback is called with no error, it means that the credentials - * information has been loaded into the object (as the `accessKeyId`, - * `secretAccessKey`, and `sessionToken` properties). - * @param err [Error] if an error occurred, this value will be filled - * @see get - */ - refresh: function refresh(callback) { - iniLoader.clearCachedFiles(); - this.coalesceRefresh( - callback || AWS.util.fn.callback, - this.disableAssumeRole - ); - }, - - /** - * @api private - */ - loadRoleProfile: function loadRoleProfile( - creds, - roleProfile, - callback - ) { - if (this.disableAssumeRole) { - throw AWS.util.error( - new Error( - "Role assumption profiles are disabled. " + - "Failed to load profile " + - this.profile + - " from " + - creds.filename - ), - { code: "SharedIniFileCredentialsProviderFailure" } - ); - } - - var self = this; - var roleArn = roleProfile["role_arn"]; - var roleSessionName = roleProfile["role_session_name"]; - var externalId = roleProfile["external_id"]; - var mfaSerial = roleProfile["mfa_serial"]; - var sourceProfileName = roleProfile["source_profile"]; - - // From experimentation, the following behavior mimics the AWS CLI: - // - // 1. Use region from the profile if present. - // 2. Otherwise fall back to N. Virginia (global endpoint). - // - // It is necessary to do the fallback explicitly, because if - // 'AWS_STS_REGIONAL_ENDPOINTS=regional', the underlying STS client will - // otherwise throw an error if region is left 'undefined'. - // - // Experimentation shows that the AWS CLI (tested at version 1.18.136) - // ignores the following potential sources of a region for the purposes of - // this AssumeRole call: - // - // - The [default] profile - // - The AWS_REGION environment variable - // - // Ignoring the [default] profile for the purposes of AssumeRole is arguably - // a bug in the CLI since it does use the [default] region for service - // calls... but right now we're matching behavior of the other tool. - var profileRegion = - roleProfile["region"] || ASSUME_ROLE_DEFAULT_REGION; - - if (!sourceProfileName) { - throw AWS.util.error( - new Error( - "source_profile is not set using profile " + this.profile - ), - { code: "SharedIniFileCredentialsProviderFailure" } - ); - } - - var sourceProfileExistanceTest = creds[sourceProfileName]; - - if (typeof sourceProfileExistanceTest !== "object") { - throw AWS.util.error( - new Error( - "source_profile " + - sourceProfileName + - " using profile " + - this.profile + - " does not exist" - ), - { code: "SharedIniFileCredentialsProviderFailure" } - ); - } - - var sourceCredentials = new AWS.SharedIniFileCredentials( - AWS.util.merge(this.options || {}, { - profile: sourceProfileName, - preferStaticCredentials: true, - }) - ); - - this.roleArn = roleArn; - var sts = new STS({ - credentials: sourceCredentials, - region: profileRegion, - httpOptions: this.httpOptions, - }); - - var roleParams = { - RoleArn: roleArn, - RoleSessionName: roleSessionName || "aws-sdk-js-" + Date.now(), - }; - - if (externalId) { - roleParams.ExternalId = externalId; - } - - if (mfaSerial && self.tokenCodeFn) { - roleParams.SerialNumber = mfaSerial; - self.tokenCodeFn(mfaSerial, function (err, token) { - if (err) { - var message; - if (err instanceof Error) { - message = err.message; - } else { - message = err; - } - callback( - AWS.util.error( - new Error("Error fetching MFA token: " + message), - { code: "SharedIniFileCredentialsProviderFailure" } - ) - ); - return; - } - - roleParams.TokenCode = token; - sts.assumeRole(roleParams, callback); - }); - return; - } - sts.assumeRole(roleParams, callback); - }, - }); - - /***/ - }, - - /***/ 77360: /***/ ( - __unused_webpack_module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var AWS = __nccwpck_require__(28437); - var STS = __nccwpck_require__(57513); - - /** - * Represents temporary credentials retrieved from {AWS.STS}. Without any - * extra parameters, credentials will be fetched from the - * {AWS.STS.getSessionToken} operation. If an IAM role is provided, the - * {AWS.STS.assumeRole} operation will be used to fetch credentials for the - * role instead. - * - * @note AWS.TemporaryCredentials is deprecated, but remains available for - * backwards compatibility. {AWS.ChainableTemporaryCredentials} is the - * preferred class for temporary credentials. - * - * To setup temporary credentials, configure a set of master credentials - * using the standard credentials providers (environment, EC2 instance metadata, - * or from the filesystem), then set the global credentials to a new - * temporary credentials object: - * - * ```javascript - * // Note that environment credentials are loaded by default, - * // the following line is shown for clarity: - * AWS.config.credentials = new AWS.EnvironmentCredentials('AWS'); - * - * // Now set temporary credentials seeded from the master credentials - * AWS.config.credentials = new AWS.TemporaryCredentials(); - * - * // subsequent requests will now use temporary credentials from AWS STS. - * new AWS.S3().listBucket(function(err, data) { ... }); - * ``` - * - * @!attribute masterCredentials - * @return [AWS.Credentials] the master (non-temporary) credentials used to - * get and refresh temporary credentials from AWS STS. - * @note (see constructor) - */ - AWS.TemporaryCredentials = AWS.util.inherit(AWS.Credentials, { - /** - * Creates a new temporary credentials object. - * - * @note In order to create temporary credentials, you first need to have - * "master" credentials configured in {AWS.Config.credentials}. These - * master credentials are necessary to retrieve the temporary credentials, - * as well as refresh the credentials when they expire. - * @param params [map] a map of options that are passed to the - * {AWS.STS.assumeRole} or {AWS.STS.getSessionToken} operations. - * If a `RoleArn` parameter is passed in, credentials will be based on the - * IAM role. - * @param masterCredentials [AWS.Credentials] the master (non-temporary) credentials - * used to get and refresh temporary credentials from AWS STS. - * @example Creating a new credentials object for generic temporary credentials - * AWS.config.credentials = new AWS.TemporaryCredentials(); - * @example Creating a new credentials object for an IAM role - * AWS.config.credentials = new AWS.TemporaryCredentials({ - * RoleArn: 'arn:aws:iam::1234567890:role/TemporaryCredentials', - * }); - * @see AWS.STS.assumeRole - * @see AWS.STS.getSessionToken - */ - constructor: function TemporaryCredentials(params, masterCredentials) { - AWS.Credentials.call(this); - this.loadMasterCredentials(masterCredentials); - this.expired = true; - - this.params = params || {}; - if (this.params.RoleArn) { - this.params.RoleSessionName = - this.params.RoleSessionName || "temporary-credentials"; - } - }, - - /** - * Refreshes credentials using {AWS.STS.assumeRole} or - * {AWS.STS.getSessionToken}, depending on whether an IAM role ARN was passed - * to the credentials {constructor}. - * - * @callback callback function(err) - * Called when the STS service responds (or fails). When - * this callback is called with no error, it means that the credentials - * information has been loaded into the object (as the `accessKeyId`, - * `secretAccessKey`, and `sessionToken` properties). - * @param err [Error] if an error occurred, this value will be filled - * @see get - */ - refresh: function refresh(callback) { - this.coalesceRefresh(callback || AWS.util.fn.callback); - }, - - /** - * @api private - */ - load: function load(callback) { - var self = this; - self.createClients(); - self.masterCredentials.get(function () { - self.service.config.credentials = self.masterCredentials; - var operation = self.params.RoleArn - ? self.service.assumeRole - : self.service.getSessionToken; - operation.call(self.service, function (err, data) { - if (!err) { - self.service.credentialsFrom(data, self); - } - callback(err); - }); - }); - }, - - /** - * @api private - */ - loadMasterCredentials: function loadMasterCredentials( - masterCredentials - ) { - this.masterCredentials = masterCredentials || AWS.config.credentials; - while (this.masterCredentials.masterCredentials) { - this.masterCredentials = this.masterCredentials.masterCredentials; - } - - if (typeof this.masterCredentials.get !== "function") { - this.masterCredentials = new AWS.Credentials( - this.masterCredentials - ); - } - }, - - /** - * @api private - */ - createClients: function () { - this.service = this.service || new STS({ params: this.params }); - }, - }); - - /***/ - }, - - /***/ 11017: /***/ ( - __unused_webpack_module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var AWS = __nccwpck_require__(28437); - var fs = __nccwpck_require__(57147); - var STS = __nccwpck_require__(57513); - var iniLoader = AWS.util.iniLoader; - - /** - * Represents OIDC credentials from a file on disk - * If the credentials expire, the SDK can {refresh} the credentials - * from the file. - * - * ## Using the web identity token file - * - * This provider is checked by default in the Node.js environment. To use - * the provider simply add your OIDC token to a file (ASCII encoding) and - * share the filename in either AWS_WEB_IDENTITY_TOKEN_FILE environment - * variable or web_identity_token_file shared config variable - * - * The file contains encoded OIDC token and the characters are - * ASCII encoded. OIDC tokens are JSON Web Tokens (JWT). - * JWT's are 3 base64 encoded strings joined by the '.' character. - * - * This class will read filename from AWS_WEB_IDENTITY_TOKEN_FILE - * environment variable or web_identity_token_file shared config variable, - * and get the OIDC token from filename. - * It will also read IAM role to be assumed from AWS_ROLE_ARN - * environment variable or role_arn shared config variable. - * This provider gets credetials using the {AWS.STS.assumeRoleWithWebIdentity} - * service operation - * - * @!macro nobrowser - */ - AWS.TokenFileWebIdentityCredentials = AWS.util.inherit(AWS.Credentials, { - /** - * @example Creating a new credentials object - * AWS.config.credentials = new AWS.TokenFileWebIdentityCredentials( - * // optionally provide configuration to apply to the underlying AWS.STS service client - * // if configuration is not provided, then configuration will be pulled from AWS.config - * { - * // specify timeout options - * httpOptions: { - * timeout: 100 - * } - * }); - * @see AWS.Config - */ - constructor: function TokenFileWebIdentityCredentials(clientConfig) { - AWS.Credentials.call(this); - this.data = null; - this.clientConfig = AWS.util.copy(clientConfig || {}); - }, - - /** - * Returns params from environment variables - * - * @api private - */ - getParamsFromEnv: function getParamsFromEnv() { - var ENV_TOKEN_FILE = "AWS_WEB_IDENTITY_TOKEN_FILE", - ENV_ROLE_ARN = "AWS_ROLE_ARN"; - if (process.env[ENV_TOKEN_FILE] && process.env[ENV_ROLE_ARN]) { - return [ - { - envTokenFile: process.env[ENV_TOKEN_FILE], - roleArn: process.env[ENV_ROLE_ARN], - roleSessionName: process.env["AWS_ROLE_SESSION_NAME"], - }, - ]; - } - }, - - /** - * Returns params from shared config variables - * - * @api private - */ - getParamsFromSharedConfig: function getParamsFromSharedConfig() { - var profiles = AWS.util.getProfilesFromSharedConfig(iniLoader); - var profileName = process.env.AWS_PROFILE || AWS.util.defaultProfile; - var profile = profiles[profileName] || {}; - - if (Object.keys(profile).length === 0) { - throw AWS.util.error( - new Error("Profile " + profileName + " not found"), - { code: "TokenFileWebIdentityCredentialsProviderFailure" } - ); - } - - var paramsArray = []; - - while ( - !profile["web_identity_token_file"] && - profile["source_profile"] - ) { - paramsArray.unshift({ - roleArn: profile["role_arn"], - roleSessionName: profile["role_session_name"], - }); - var sourceProfile = profile["source_profile"]; - profile = profiles[sourceProfile]; - } - - paramsArray.unshift({ - envTokenFile: profile["web_identity_token_file"], - roleArn: profile["role_arn"], - roleSessionName: profile["role_session_name"], - }); - - return paramsArray; - }, - - /** - * Refreshes credentials using {AWS.STS.assumeRoleWithWebIdentity} - * - * @callback callback function(err) - * Called when the STS service responds (or fails). When - * this callback is called with no error, it means that the credentials - * information has been loaded into the object (as the `accessKeyId`, - * `secretAccessKey`, and `sessionToken` properties). - * @param err [Error] if an error occurred, this value will be filled - * @see AWS.Credentials.get - */ - refresh: function refresh(callback) { - this.coalesceRefresh(callback || AWS.util.fn.callback); - }, - - /** - * @api private - */ - assumeRoleChaining: function assumeRoleChaining(paramsArray, callback) { - var self = this; - if (paramsArray.length === 0) { - self.service.credentialsFrom(self.data, self); - callback(); - } else { - var params = paramsArray.shift(); - self.service.config.credentials = self.service.credentialsFrom( - self.data, - self - ); - self.service.assumeRole( - { - RoleArn: params.roleArn, - RoleSessionName: - params.roleSessionName || "token-file-web-identity", - }, - function (err, data) { - self.data = null; - if (err) { - callback(err); - } else { - self.data = data; - self.assumeRoleChaining(paramsArray, callback); - } - } - ); - } - }, - - /** - * @api private - */ - load: function load(callback) { - var self = this; - try { - var paramsArray = self.getParamsFromEnv(); - if (!paramsArray) { - paramsArray = self.getParamsFromSharedConfig(); - } - if (paramsArray) { - var params = paramsArray.shift(); - var oidcToken = fs.readFileSync(params.envTokenFile, { - encoding: "ascii", - }); - if (!self.service) { - self.createClients(); - } - self.service.assumeRoleWithWebIdentity( - { - WebIdentityToken: oidcToken, - RoleArn: params.roleArn, - RoleSessionName: - params.roleSessionName || "token-file-web-identity", - }, - function (err, data) { - self.data = null; - if (err) { - callback(err); - } else { - self.data = data; - self.assumeRoleChaining(paramsArray, callback); - } - } - ); - } - } catch (err) { - callback(err); - } - }, - - /** - * @api private - */ - createClients: function () { - if (!this.service) { - var stsConfig = AWS.util.merge({}, this.clientConfig); - this.service = new STS(stsConfig); - - // Retry in case of IDPCommunicationErrorException or InvalidIdentityToken - this.service.retryableError = function (error) { - if ( - error.code === "IDPCommunicationErrorException" || - error.code === "InvalidIdentityToken" - ) { - return true; - } else { - return AWS.Service.prototype.retryableError.call(this, error); - } - }; - } - }, - }); - - /***/ - }, - - /***/ 74998: /***/ ( - __unused_webpack_module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var AWS = __nccwpck_require__(28437); - var STS = __nccwpck_require__(57513); - - /** - * Represents credentials retrieved from STS Web Identity Federation support. - * - * By default this provider gets credentials using the - * {AWS.STS.assumeRoleWithWebIdentity} service operation. This operation - * requires a `RoleArn` containing the ARN of the IAM trust policy for the - * application for which credentials will be given. In addition, the - * `WebIdentityToken` must be set to the token provided by the identity - * provider. See {constructor} for an example on creating a credentials - * object with proper `RoleArn` and `WebIdentityToken` values. - * - * ## Refreshing Credentials from Identity Service - * - * In addition to AWS credentials expiring after a given amount of time, the - * login token from the identity provider will also expire. Once this token - * expires, it will not be usable to refresh AWS credentials, and another - * token will be needed. The SDK does not manage refreshing of the token value, - * but this can be done through a "refresh token" supported by most identity - * providers. Consult the documentation for the identity provider for refreshing - * tokens. Once the refreshed token is acquired, you should make sure to update - * this new token in the credentials object's {params} property. The following - * code will update the WebIdentityToken, assuming you have retrieved an updated - * token from the identity provider: - * - * ```javascript - * AWS.config.credentials.params.WebIdentityToken = updatedToken; - * ``` - * - * Future calls to `credentials.refresh()` will now use the new token. - * - * @!attribute params - * @return [map] the map of params passed to - * {AWS.STS.assumeRoleWithWebIdentity}. To update the token, set the - * `params.WebIdentityToken` property. - * @!attribute data - * @return [map] the raw data response from the call to - * {AWS.STS.assumeRoleWithWebIdentity}. Use this if you want to get - * access to other properties from the response. - */ - AWS.WebIdentityCredentials = AWS.util.inherit(AWS.Credentials, { - /** - * Creates a new credentials object. - * @param (see AWS.STS.assumeRoleWithWebIdentity) - * @example Creating a new credentials object - * AWS.config.credentials = new AWS.WebIdentityCredentials({ - * RoleArn: 'arn:aws:iam::1234567890:role/WebIdentity', - * WebIdentityToken: 'ABCDEFGHIJKLMNOP', // token from identity service - * RoleSessionName: 'web' // optional name, defaults to web-identity - * }, { - * // optionally provide configuration to apply to the underlying AWS.STS service client - * // if configuration is not provided, then configuration will be pulled from AWS.config - * - * // specify timeout options - * httpOptions: { - * timeout: 100 - * } - * }); - * @see AWS.STS.assumeRoleWithWebIdentity - * @see AWS.Config - */ - constructor: function WebIdentityCredentials(params, clientConfig) { - AWS.Credentials.call(this); - this.expired = true; - this.params = params; - this.params.RoleSessionName = - this.params.RoleSessionName || "web-identity"; - this.data = null; - this._clientConfig = AWS.util.copy(clientConfig || {}); - }, - - /** - * Refreshes credentials using {AWS.STS.assumeRoleWithWebIdentity} - * - * @callback callback function(err) - * Called when the STS service responds (or fails). When - * this callback is called with no error, it means that the credentials - * information has been loaded into the object (as the `accessKeyId`, - * `secretAccessKey`, and `sessionToken` properties). - * @param err [Error] if an error occurred, this value will be filled - * @see get - */ - refresh: function refresh(callback) { - this.coalesceRefresh(callback || AWS.util.fn.callback); - }, - - /** - * @api private - */ - load: function load(callback) { - var self = this; - self.createClients(); - self.service.assumeRoleWithWebIdentity(function (err, data) { - self.data = null; - if (!err) { - self.data = data; - self.service.credentialsFrom(data, self); - } - callback(err); - }); - }, - - /** - * @api private - */ - createClients: function () { - if (!this.service) { - var stsConfig = AWS.util.merge({}, this._clientConfig); - stsConfig.params = this.params; - this.service = new STS(stsConfig); - } - }, - }); - - /***/ - }, - - /***/ 45313: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var AWS = __nccwpck_require__(28437); - var util = __nccwpck_require__(77985); - var endpointDiscoveryEnabledEnvs = [ - "AWS_ENABLE_ENDPOINT_DISCOVERY", - "AWS_ENDPOINT_DISCOVERY_ENABLED", - ]; - - /** - * Generate key (except resources and operation part) to index the endpoints in the cache - * If input shape has endpointdiscoveryid trait then use - * accessKey + operation + resources + region + service as cache key - * If input shape doesn't have endpointdiscoveryid trait then use - * accessKey + region + service as cache key - * @return [map] object with keys to index endpoints. - * @api private - */ - function getCacheKey(request) { - var service = request.service; - var api = service.api || {}; - var operations = api.operations; - var identifiers = {}; - if (service.config.region) { - identifiers.region = service.config.region; - } - if (api.serviceId) { - identifiers.serviceId = api.serviceId; - } - if (service.config.credentials.accessKeyId) { - identifiers.accessKeyId = service.config.credentials.accessKeyId; - } - return identifiers; - } - - /** - * Recursive helper for marshallCustomIdentifiers(). - * Looks for required string input members that have 'endpointdiscoveryid' trait. - * @api private - */ - function marshallCustomIdentifiersHelper(result, params, shape) { - if (!shape || params === undefined || params === null) return; - if ( - shape.type === "structure" && - shape.required && - shape.required.length > 0 - ) { - util.arrayEach(shape.required, function (name) { - var memberShape = shape.members[name]; - if (memberShape.endpointDiscoveryId === true) { - var locationName = memberShape.isLocationName - ? memberShape.name - : name; - result[locationName] = String(params[name]); - } else { - marshallCustomIdentifiersHelper( - result, - params[name], - memberShape - ); - } - }); - } - } - - /** - * Get custom identifiers for cache key. - * Identifies custom identifiers by checking each shape's `endpointDiscoveryId` trait. - * @param [object] request object - * @param [object] input shape of the given operation's api - * @api private - */ - function marshallCustomIdentifiers(request, shape) { - var identifiers = {}; - marshallCustomIdentifiersHelper(identifiers, request.params, shape); - return identifiers; - } - - /** - * Call endpoint discovery operation when it's optional. - * When endpoint is available in cache then use the cached endpoints. If endpoints - * are unavailable then use regional endpoints and call endpoint discovery operation - * asynchronously. This is turned off by default. - * @param [object] request object - * @api private - */ - function optionalDiscoverEndpoint(request) { - var service = request.service; - var api = service.api; - var operationModel = api.operations - ? api.operations[request.operation] - : undefined; - var inputShape = operationModel ? operationModel.input : undefined; - - var identifiers = marshallCustomIdentifiers(request, inputShape); - var cacheKey = getCacheKey(request); - if (Object.keys(identifiers).length > 0) { - cacheKey = util.update(cacheKey, identifiers); - if (operationModel) cacheKey.operation = operationModel.name; - } - var endpoints = AWS.endpointCache.get(cacheKey); - if ( - endpoints && - endpoints.length === 1 && - endpoints[0].Address === "" - ) { - //endpoint operation is being made but response not yet received - //or endpoint operation just failed in 1 minute - return; - } else if (endpoints && endpoints.length > 0) { - //found endpoint record from cache - request.httpRequest.updateEndpoint(endpoints[0].Address); - } else { - //endpoint record not in cache or outdated. make discovery operation - var endpointRequest = service.makeRequest(api.endpointOperation, { - Operation: operationModel.name, - Identifiers: identifiers, - }); - addApiVersionHeader(endpointRequest); - endpointRequest.removeListener( - "validate", - AWS.EventListeners.Core.VALIDATE_PARAMETERS - ); - endpointRequest.removeListener( - "retry", - AWS.EventListeners.Core.RETRY_CHECK - ); - //put in a placeholder for endpoints already requested, prevent - //too much in-flight calls - AWS.endpointCache.put(cacheKey, [ - { - Address: "", - CachePeriodInMinutes: 1, - }, - ]); - endpointRequest.send(function (err, data) { - if (data && data.Endpoints) { - AWS.endpointCache.put(cacheKey, data.Endpoints); - } else if (err) { - AWS.endpointCache.put(cacheKey, [ - { - Address: "", - CachePeriodInMinutes: 1, //not to make more endpoint operation in next 1 minute - }, - ]); - } - }); - } - } - - var requestQueue = {}; - - /** - * Call endpoint discovery operation when it's required. - * When endpoint is available in cache then use cached ones. If endpoints are - * unavailable then SDK should call endpoint operation then use returned new - * endpoint for the api call. SDK will automatically attempt to do endpoint - * discovery. This is turned off by default - * @param [object] request object - * @api private - */ - function requiredDiscoverEndpoint(request, done) { - var service = request.service; - var api = service.api; - var operationModel = api.operations - ? api.operations[request.operation] - : undefined; - var inputShape = operationModel ? operationModel.input : undefined; - - var identifiers = marshallCustomIdentifiers(request, inputShape); - var cacheKey = getCacheKey(request); - if (Object.keys(identifiers).length > 0) { - cacheKey = util.update(cacheKey, identifiers); - if (operationModel) cacheKey.operation = operationModel.name; - } - var cacheKeyStr = AWS.EndpointCache.getKeyString(cacheKey); - var endpoints = AWS.endpointCache.get(cacheKeyStr); //endpoint cache also accepts string keys - if ( - endpoints && - endpoints.length === 1 && - endpoints[0].Address === "" - ) { - //endpoint operation is being made but response not yet received - //push request object to a pending queue - if (!requestQueue[cacheKeyStr]) requestQueue[cacheKeyStr] = []; - requestQueue[cacheKeyStr].push({ request: request, callback: done }); - return; - } else if (endpoints && endpoints.length > 0) { - request.httpRequest.updateEndpoint(endpoints[0].Address); - done(); - } else { - var endpointRequest = service.makeRequest(api.endpointOperation, { - Operation: operationModel.name, - Identifiers: identifiers, - }); - endpointRequest.removeListener( - "validate", - AWS.EventListeners.Core.VALIDATE_PARAMETERS - ); - addApiVersionHeader(endpointRequest); - - //put in a placeholder for endpoints already requested, prevent - //too much in-flight calls - AWS.endpointCache.put(cacheKeyStr, [ - { - Address: "", - CachePeriodInMinutes: 60, //long-live cache - }, - ]); - endpointRequest.send(function (err, data) { - if (err) { - request.response.error = util.error(err, { retryable: false }); - AWS.endpointCache.remove(cacheKey); - - //fail all the pending requests in batch - if (requestQueue[cacheKeyStr]) { - var pendingRequests = requestQueue[cacheKeyStr]; - util.arrayEach(pendingRequests, function (requestContext) { - requestContext.request.response.error = util.error(err, { - retryable: false, - }); - requestContext.callback(); - }); - delete requestQueue[cacheKeyStr]; - } - } else if (data) { - AWS.endpointCache.put(cacheKeyStr, data.Endpoints); - request.httpRequest.updateEndpoint(data.Endpoints[0].Address); - - //update the endpoint for all the pending requests in batch - if (requestQueue[cacheKeyStr]) { - var pendingRequests = requestQueue[cacheKeyStr]; - util.arrayEach(pendingRequests, function (requestContext) { - requestContext.request.httpRequest.updateEndpoint( - data.Endpoints[0].Address - ); - requestContext.callback(); - }); - delete requestQueue[cacheKeyStr]; - } - } - done(); - }); - } - } - - /** - * add api version header to endpoint operation - * @api private - */ - function addApiVersionHeader(endpointRequest) { - var api = endpointRequest.service.api; - var apiVersion = api.apiVersion; - if ( - apiVersion && - !endpointRequest.httpRequest.headers["x-amz-api-version"] - ) { - endpointRequest.httpRequest.headers["x-amz-api-version"] = apiVersion; - } - } - - /** - * If api call gets invalid endpoint exception, SDK should attempt to remove the invalid - * endpoint from cache. - * @api private - */ - function invalidateCachedEndpoints(response) { - var error = response.error; - var httpResponse = response.httpResponse; - if ( - error && - (error.code === "InvalidEndpointException" || - httpResponse.statusCode === 421) - ) { - var request = response.request; - var operations = request.service.api.operations || {}; - var inputShape = operations[request.operation] - ? operations[request.operation].input - : undefined; - var identifiers = marshallCustomIdentifiers(request, inputShape); - var cacheKey = getCacheKey(request); - if (Object.keys(identifiers).length > 0) { - cacheKey = util.update(cacheKey, identifiers); - if (operations[request.operation]) - cacheKey.operation = operations[request.operation].name; - } - AWS.endpointCache.remove(cacheKey); - } - } - - /** - * If endpoint is explicitly configured, SDK should not do endpoint discovery in anytime. - * @param [object] client Service client object. - * @api private - */ - function hasCustomEndpoint(client) { - //if set endpoint is set for specific client, enable endpoint discovery will raise an error. - if ( - client._originalConfig && - client._originalConfig.endpoint && - client._originalConfig.endpointDiscoveryEnabled === true - ) { - throw util.error(new Error(), { - code: "ConfigurationException", - message: - "Custom endpoint is supplied; endpointDiscoveryEnabled must not be true.", - }); - } - var svcConfig = AWS.config[client.serviceIdentifier] || {}; - return Boolean( - AWS.config.endpoint || - svcConfig.endpoint || - (client._originalConfig && client._originalConfig.endpoint) - ); - } - - /** - * @api private - */ - function isFalsy(value) { - return ["false", "0"].indexOf(value) >= 0; - } - - /** - * If endpoint discovery should perform for this request when no operation requires endpoint - * discovery for the given service. - * SDK performs config resolution in order like below: - * 1. If set in client configuration. - * 2. If set in env AWS_ENABLE_ENDPOINT_DISCOVERY. - * 3. If set in shared ini config file with key 'endpoint_discovery_enabled'. - * @param [object] request request object. - * @returns [boolean|undefined] if endpoint discovery config is not set in any source, this - * function returns undefined - * @api private - */ - function resolveEndpointDiscoveryConfig(request) { - var service = request.service || {}; - if (service.config.endpointDiscoveryEnabled !== undefined) { - return service.config.endpointDiscoveryEnabled; - } - - //shared ini file is only available in Node - //not to check env in browser - if (util.isBrowser()) return undefined; - - // If any of recognized endpoint discovery config env is set - for (var i = 0; i < endpointDiscoveryEnabledEnvs.length; i++) { - var env = endpointDiscoveryEnabledEnvs[i]; - if (Object.prototype.hasOwnProperty.call(process.env, env)) { - if (process.env[env] === "" || process.env[env] === undefined) { - throw util.error(new Error(), { - code: "ConfigurationException", - message: - "environmental variable " + env + " cannot be set to nothing", - }); - } - return !isFalsy(process.env[env]); - } - } - - var configFile = {}; - try { - configFile = AWS.util.iniLoader - ? AWS.util.iniLoader.loadFrom({ - isConfig: true, - filename: process.env[AWS.util.sharedConfigFileEnv], - }) - : {}; - } catch (e) {} - var sharedFileConfig = - configFile[process.env.AWS_PROFILE || AWS.util.defaultProfile] || {}; - if ( - Object.prototype.hasOwnProperty.call( - sharedFileConfig, - "endpoint_discovery_enabled" - ) - ) { - if (sharedFileConfig.endpoint_discovery_enabled === undefined) { - throw util.error(new Error(), { - code: "ConfigurationException", - message: - "config file entry 'endpoint_discovery_enabled' cannot be set to nothing", - }); - } - return !isFalsy(sharedFileConfig.endpoint_discovery_enabled); - } - return undefined; - } - - /** - * attach endpoint discovery logic to request object - * @param [object] request - * @api private - */ - function discoverEndpoint(request, done) { - var service = request.service || {}; - if (hasCustomEndpoint(service) || request.isPresigned()) return done(); - - var operations = service.api.operations || {}; - var operationModel = operations[request.operation]; - var isEndpointDiscoveryRequired = operationModel - ? operationModel.endpointDiscoveryRequired - : "NULL"; - var isEnabled = resolveEndpointDiscoveryConfig(request); - var hasRequiredEndpointDiscovery = - service.api.hasRequiredEndpointDiscovery; - if (isEnabled || hasRequiredEndpointDiscovery) { - // Once a customer enables endpoint discovery, the SDK should start appending - // the string endpoint-discovery to the user-agent on all requests. - request.httpRequest.appendToUserAgent("endpoint-discovery"); - } - switch (isEndpointDiscoveryRequired) { - case "OPTIONAL": - if (isEnabled || hasRequiredEndpointDiscovery) { - // For a given service; if at least one operation requires endpoint discovery then the SDK must enable endpoint discovery - // by default for all operations of that service, including operations where endpoint discovery is optional. - optionalDiscoverEndpoint(request); - request.addNamedListener( - "INVALIDATE_CACHED_ENDPOINTS", - "extractError", - invalidateCachedEndpoints - ); - } - done(); - break; - case "REQUIRED": - if (isEnabled === false) { - // For a given operation; if endpoint discovery is required and it has been disabled on the SDK client, - // then the SDK must return a clear and actionable exception. - request.response.error = util.error(new Error(), { - code: "ConfigurationException", - message: - "Endpoint Discovery is disabled but " + - service.api.className + - "." + - request.operation + - "() requires it. Please check your configurations.", - }); - done(); - break; - } - request.addNamedListener( - "INVALIDATE_CACHED_ENDPOINTS", - "extractError", - invalidateCachedEndpoints - ); - requiredDiscoverEndpoint(request, done); - break; - case "NULL": - default: - done(); - break; - } - } - - module.exports = { - discoverEndpoint: discoverEndpoint, - requiredDiscoverEndpoint: requiredDiscoverEndpoint, - optionalDiscoverEndpoint: optionalDiscoverEndpoint, - marshallCustomIdentifiers: marshallCustomIdentifiers, - getCacheKey: getCacheKey, - invalidateCachedEndpoint: invalidateCachedEndpoints, - }; - - /***/ - }, - - /***/ 76663: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var AWS = __nccwpck_require__(28437); - var util = AWS.util; - var typeOf = __nccwpck_require__(48084).typeOf; - var DynamoDBSet = __nccwpck_require__(20304); - var NumberValue = __nccwpck_require__(91593); - - AWS.DynamoDB.Converter = { - /** - * Convert a JavaScript value to its equivalent DynamoDB AttributeValue type - * - * @param data [any] The data to convert to a DynamoDB AttributeValue - * @param options [map] - * @option options convertEmptyValues [Boolean] Whether to automatically - * convert empty strings, blobs, - * and sets to `null` - * @option options wrapNumbers [Boolean] Whether to return numbers as a - * NumberValue object instead of - * converting them to native JavaScript - * numbers. This allows for the safe - * round-trip transport of numbers of - * arbitrary size. - * @return [map] An object in the Amazon DynamoDB AttributeValue format - * - * @see AWS.DynamoDB.Converter.marshall AWS.DynamoDB.Converter.marshall to - * convert entire records (rather than individual attributes) - */ - input: function convertInput(data, options) { - options = options || {}; - var type = typeOf(data); - if (type === "Object") { - return formatMap(data, options); - } else if (type === "Array") { - return formatList(data, options); - } else if (type === "Set") { - return formatSet(data, options); - } else if (type === "String") { - if (data.length === 0 && options.convertEmptyValues) { - return convertInput(null); - } - return { S: data }; - } else if (type === "Number" || type === "NumberValue") { - return { N: data.toString() }; - } else if (type === "Binary") { - if (data.length === 0 && options.convertEmptyValues) { - return convertInput(null); - } - return { B: data }; - } else if (type === "Boolean") { - return { BOOL: data }; - } else if (type === "null") { - return { NULL: true }; - } else if (type !== "undefined" && type !== "Function") { - // this value has a custom constructor - return formatMap(data, options); - } - }, - - /** - * Convert a JavaScript object into a DynamoDB record. - * - * @param data [any] The data to convert to a DynamoDB record - * @param options [map] - * @option options convertEmptyValues [Boolean] Whether to automatically - * convert empty strings, blobs, - * and sets to `null` - * @option options wrapNumbers [Boolean] Whether to return numbers as a - * NumberValue object instead of - * converting them to native JavaScript - * numbers. This allows for the safe - * round-trip transport of numbers of - * arbitrary size. - * - * @return [map] An object in the DynamoDB record format. - * - * @example Convert a JavaScript object into a DynamoDB record - * var marshalled = AWS.DynamoDB.Converter.marshall({ - * string: 'foo', - * list: ['fizz', 'buzz', 'pop'], - * map: { - * nestedMap: { - * key: 'value', - * } - * }, - * number: 123, - * nullValue: null, - * boolValue: true, - * stringSet: new DynamoDBSet(['foo', 'bar', 'baz']) - * }); - */ - marshall: function marshallItem(data, options) { - return AWS.DynamoDB.Converter.input(data, options).M; - }, - - /** - * Convert a DynamoDB AttributeValue object to its equivalent JavaScript type. - * - * @param data [map] An object in the Amazon DynamoDB AttributeValue format - * @param options [map] - * @option options convertEmptyValues [Boolean] Whether to automatically - * convert empty strings, blobs, - * and sets to `null` - * @option options wrapNumbers [Boolean] Whether to return numbers as a - * NumberValue object instead of - * converting them to native JavaScript - * numbers. This allows for the safe - * round-trip transport of numbers of - * arbitrary size. - * - * @return [Object|Array|String|Number|Boolean|null] - * - * @see AWS.DynamoDB.Converter.unmarshall AWS.DynamoDB.Converter.unmarshall to - * convert entire records (rather than individual attributes) - */ - output: function convertOutput(data, options) { - options = options || {}; - var list, map, i; - for (var type in data) { - var values = data[type]; - if (type === "M") { - map = {}; - for (var key in values) { - map[key] = convertOutput(values[key], options); - } - return map; - } else if (type === "L") { - list = []; - for (i = 0; i < values.length; i++) { - list.push(convertOutput(values[i], options)); - } - return list; - } else if (type === "SS") { - list = []; - for (i = 0; i < values.length; i++) { - list.push(values[i] + ""); - } - return new DynamoDBSet(list); - } else if (type === "NS") { - list = []; - for (i = 0; i < values.length; i++) { - list.push(convertNumber(values[i], options.wrapNumbers)); - } - return new DynamoDBSet(list); - } else if (type === "BS") { - list = []; - for (i = 0; i < values.length; i++) { - list.push(AWS.util.buffer.toBuffer(values[i])); - } - return new DynamoDBSet(list); - } else if (type === "S") { - return values + ""; - } else if (type === "N") { - return convertNumber(values, options.wrapNumbers); - } else if (type === "B") { - return util.buffer.toBuffer(values); - } else if (type === "BOOL") { - return values === "true" || values === "TRUE" || values === true; - } else if (type === "NULL") { - return null; - } - } - }, - - /** - * Convert a DynamoDB record into a JavaScript object. - * - * @param data [any] The DynamoDB record - * @param options [map] - * @option options convertEmptyValues [Boolean] Whether to automatically - * convert empty strings, blobs, - * and sets to `null` - * @option options wrapNumbers [Boolean] Whether to return numbers as a - * NumberValue object instead of - * converting them to native JavaScript - * numbers. This allows for the safe - * round-trip transport of numbers of - * arbitrary size. - * - * @return [map] An object whose properties have been converted from - * DynamoDB's AttributeValue format into their corresponding native - * JavaScript types. - * - * @example Convert a record received from a DynamoDB stream - * var unmarshalled = AWS.DynamoDB.Converter.unmarshall({ - * string: {S: 'foo'}, - * list: {L: [{S: 'fizz'}, {S: 'buzz'}, {S: 'pop'}]}, - * map: { - * M: { - * nestedMap: { - * M: { - * key: {S: 'value'} - * } - * } - * } - * }, - * number: {N: '123'}, - * nullValue: {NULL: true}, - * boolValue: {BOOL: true} - * }); - */ - unmarshall: function unmarshall(data, options) { - return AWS.DynamoDB.Converter.output({ M: data }, options); - }, - }; - - /** - * @api private - * @param data [Array] - * @param options [map] - */ - function formatList(data, options) { - var list = { L: [] }; - for (var i = 0; i < data.length; i++) { - list["L"].push(AWS.DynamoDB.Converter.input(data[i], options)); - } - return list; - } - - /** - * @api private - * @param value [String] - * @param wrapNumbers [Boolean] - */ - function convertNumber(value, wrapNumbers) { - return wrapNumbers ? new NumberValue(value) : Number(value); - } - - /** - * @api private - * @param data [map] - * @param options [map] - */ - function formatMap(data, options) { - var map = { M: {} }; - for (var key in data) { - var formatted = AWS.DynamoDB.Converter.input(data[key], options); - if (formatted !== void 0) { - map["M"][key] = formatted; - } - } - return map; - } - - /** - * @api private - */ - function formatSet(data, options) { - options = options || {}; - var values = data.values; - if (options.convertEmptyValues) { - values = filterEmptySetValues(data); - if (values.length === 0) { - return AWS.DynamoDB.Converter.input(null); - } - } - - var map = {}; - switch (data.type) { - case "String": - map["SS"] = values; - break; - case "Binary": - map["BS"] = values; - break; - case "Number": - map["NS"] = values.map(function (value) { - return value.toString(); - }); - } - return map; - } - - /** - * @api private - */ - function filterEmptySetValues(set) { - var nonEmptyValues = []; - var potentiallyEmptyTypes = { - String: true, - Binary: true, - Number: false, - }; - if (potentiallyEmptyTypes[set.type]) { - for (var i = 0; i < set.values.length; i++) { - if (set.values[i].length === 0) { - continue; - } - nonEmptyValues.push(set.values[i]); - } - - return nonEmptyValues; - } - - return set.values; - } - - /** - * @api private - */ - module.exports = AWS.DynamoDB.Converter; - - /***/ - }, - - /***/ 90030: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var AWS = __nccwpck_require__(28437); - var Translator = __nccwpck_require__(34222); - var DynamoDBSet = __nccwpck_require__(20304); - - /** - * The document client simplifies working with items in Amazon DynamoDB - * by abstracting away the notion of attribute values. This abstraction - * annotates native JavaScript types supplied as input parameters, as well - * as converts annotated response data to native JavaScript types. - * - * ## Marshalling Input and Unmarshalling Response Data - * - * The document client affords developers the use of native JavaScript types - * instead of `AttributeValue`s to simplify the JavaScript development - * experience with Amazon DynamoDB. JavaScript objects passed in as parameters - * are marshalled into `AttributeValue` shapes required by Amazon DynamoDB. - * Responses from DynamoDB are unmarshalled into plain JavaScript objects - * by the `DocumentClient`. The `DocumentClient`, does not accept - * `AttributeValue`s in favor of native JavaScript types. - * - * | JavaScript Type | DynamoDB AttributeValue | - * |:----------------------------------------------------------------------:|-------------------------| - * | String | S | - * | Number | N | - * | Boolean | BOOL | - * | null | NULL | - * | Array | L | - * | Object | M | - * | Buffer, File, Blob, ArrayBuffer, DataView, and JavaScript typed arrays | B | - * - * ## Support for Sets - * - * The `DocumentClient` offers a convenient way to create sets from - * JavaScript Arrays. The type of set is inferred from the first element - * in the array. DynamoDB supports string, number, and binary sets. To - * learn more about supported types see the - * [Amazon DynamoDB Data Model Documentation](http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DataModel.html) - * For more information see {AWS.DynamoDB.DocumentClient.createSet} - * - */ - AWS.DynamoDB.DocumentClient = AWS.util.inherit({ - /** - * Creates a DynamoDB document client with a set of configuration options. - * - * @option options params [map] An optional map of parameters to bind to every - * request sent by this service object. - * @option options service [AWS.DynamoDB] An optional pre-configured instance - * of the AWS.DynamoDB service object to use for requests. The object may - * bound parameters used by the document client. - * @option options convertEmptyValues [Boolean] set to true if you would like - * the document client to convert empty values (0-length strings, binary - * buffers, and sets) to be converted to NULL types when persisting to - * DynamoDB. - * @option options wrapNumbers [Boolean] Set to true to return numbers as a - * NumberValue object instead of converting them to native JavaScript numbers. - * This allows for the safe round-trip transport of numbers of arbitrary size. - * @see AWS.DynamoDB.constructor - * - */ - constructor: function DocumentClient(options) { - var self = this; - self.options = options || {}; - self.configure(self.options); - }, - - /** - * @api private - */ - configure: function configure(options) { - var self = this; - self.service = options.service; - self.bindServiceObject(options); - self.attrValue = options.attrValue = - self.service.api.operations.putItem.input.members.Item.value.shape; - }, - - /** - * @api private - */ - bindServiceObject: function bindServiceObject(options) { - var self = this; - options = options || {}; - - if (!self.service) { - self.service = new AWS.DynamoDB(options); - } else { - var config = AWS.util.copy(self.service.config); - self.service = new self.service.constructor.__super__(config); - self.service.config.params = AWS.util.merge( - self.service.config.params || {}, - options.params - ); - } - }, - - /** - * @api private - */ - makeServiceRequest: function (operation, params, callback) { - var self = this; - var request = self.service[operation](params); - self.setupRequest(request); - self.setupResponse(request); - if (typeof callback === "function") { - request.send(callback); - } - return request; - }, - - /** - * @api private - */ - serviceClientOperationsMap: { - batchGet: "batchGetItem", - batchWrite: "batchWriteItem", - delete: "deleteItem", - get: "getItem", - put: "putItem", - query: "query", - scan: "scan", - update: "updateItem", - transactGet: "transactGetItems", - transactWrite: "transactWriteItems", - }, - - /** - * Returns the attributes of one or more items from one or more tables - * by delegating to `AWS.DynamoDB.batchGetItem()`. - * - * Supply the same parameters as {AWS.DynamoDB.batchGetItem} with - * `AttributeValue`s substituted by native JavaScript types. - * - * @see AWS.DynamoDB.batchGetItem - * @example Get items from multiple tables - * var params = { - * RequestItems: { - * 'Table-1': { - * Keys: [ - * { - * HashKey: 'haskey', - * NumberRangeKey: 1 - * } - * ] - * }, - * 'Table-2': { - * Keys: [ - * { foo: 'bar' }, - * ] - * } - * } - * }; - * - * var documentClient = new AWS.DynamoDB.DocumentClient(); - * - * documentClient.batchGet(params, function(err, data) { - * if (err) console.log(err); - * else console.log(data); - * }); - * - */ - batchGet: function (params, callback) { - var operation = this.serviceClientOperationsMap["batchGet"]; - return this.makeServiceRequest(operation, params, callback); - }, - - /** - * Puts or deletes multiple items in one or more tables by delegating - * to `AWS.DynamoDB.batchWriteItem()`. - * - * Supply the same parameters as {AWS.DynamoDB.batchWriteItem} with - * `AttributeValue`s substituted by native JavaScript types. - * - * @see AWS.DynamoDB.batchWriteItem - * @example Write to and delete from a table - * var params = { - * RequestItems: { - * 'Table-1': [ - * { - * DeleteRequest: { - * Key: { HashKey: 'someKey' } - * } - * }, - * { - * PutRequest: { - * Item: { - * HashKey: 'anotherKey', - * NumAttribute: 1, - * BoolAttribute: true, - * ListAttribute: [1, 'two', false], - * MapAttribute: { foo: 'bar' } - * } - * } - * } - * ] - * } - * }; - * - * var documentClient = new AWS.DynamoDB.DocumentClient(); - * - * documentClient.batchWrite(params, function(err, data) { - * if (err) console.log(err); - * else console.log(data); - * }); - * - */ - batchWrite: function (params, callback) { - var operation = this.serviceClientOperationsMap["batchWrite"]; - return this.makeServiceRequest(operation, params, callback); - }, - - /** - * Deletes a single item in a table by primary key by delegating to - * `AWS.DynamoDB.deleteItem()` - * - * Supply the same parameters as {AWS.DynamoDB.deleteItem} with - * `AttributeValue`s substituted by native JavaScript types. - * - * @see AWS.DynamoDB.deleteItem - * @example Delete an item from a table - * var params = { - * TableName : 'Table', - * Key: { - * HashKey: 'hashkey', - * NumberRangeKey: 1 - * } - * }; - * - * var documentClient = new AWS.DynamoDB.DocumentClient(); - * - * documentClient.delete(params, function(err, data) { - * if (err) console.log(err); - * else console.log(data); - * }); - * - */ - delete: function (params, callback) { - var operation = this.serviceClientOperationsMap["delete"]; - return this.makeServiceRequest(operation, params, callback); - }, - - /** - * Returns a set of attributes for the item with the given primary key - * by delegating to `AWS.DynamoDB.getItem()`. - * - * Supply the same parameters as {AWS.DynamoDB.getItem} with - * `AttributeValue`s substituted by native JavaScript types. - * - * @see AWS.DynamoDB.getItem - * @example Get an item from a table - * var params = { - * TableName : 'Table', - * Key: { - * HashKey: 'hashkey' - * } - * }; - * - * var documentClient = new AWS.DynamoDB.DocumentClient(); - * - * documentClient.get(params, function(err, data) { - * if (err) console.log(err); - * else console.log(data); - * }); - * - */ - get: function (params, callback) { - var operation = this.serviceClientOperationsMap["get"]; - return this.makeServiceRequest(operation, params, callback); - }, - - /** - * Creates a new item, or replaces an old item with a new item by - * delegating to `AWS.DynamoDB.putItem()`. - * - * Supply the same parameters as {AWS.DynamoDB.putItem} with - * `AttributeValue`s substituted by native JavaScript types. - * - * @see AWS.DynamoDB.putItem - * @example Create a new item in a table - * var params = { - * TableName : 'Table', - * Item: { - * HashKey: 'haskey', - * NumAttribute: 1, - * BoolAttribute: true, - * ListAttribute: [1, 'two', false], - * MapAttribute: { foo: 'bar'}, - * NullAttribute: null - * } - * }; - * - * var documentClient = new AWS.DynamoDB.DocumentClient(); - * - * documentClient.put(params, function(err, data) { - * if (err) console.log(err); - * else console.log(data); - * }); - * - */ - put: function (params, callback) { - var operation = this.serviceClientOperationsMap["put"]; - return this.makeServiceRequest(operation, params, callback); - }, - - /** - * Edits an existing item's attributes, or adds a new item to the table if - * it does not already exist by delegating to `AWS.DynamoDB.updateItem()`. - * - * Supply the same parameters as {AWS.DynamoDB.updateItem} with - * `AttributeValue`s substituted by native JavaScript types. - * - * @see AWS.DynamoDB.updateItem - * @example Update an item with expressions - * var params = { - * TableName: 'Table', - * Key: { HashKey : 'hashkey' }, - * UpdateExpression: 'set #a = :x + :y', - * ConditionExpression: '#a < :MAX', - * ExpressionAttributeNames: {'#a' : 'Sum'}, - * ExpressionAttributeValues: { - * ':x' : 20, - * ':y' : 45, - * ':MAX' : 100, - * } - * }; - * - * var documentClient = new AWS.DynamoDB.DocumentClient(); - * - * documentClient.update(params, function(err, data) { - * if (err) console.log(err); - * else console.log(data); - * }); - * - */ - update: function (params, callback) { - var operation = this.serviceClientOperationsMap["update"]; - return this.makeServiceRequest(operation, params, callback); - }, - - /** - * Returns one or more items and item attributes by accessing every item - * in a table or a secondary index. - * - * Supply the same parameters as {AWS.DynamoDB.scan} with - * `AttributeValue`s substituted by native JavaScript types. - * - * @see AWS.DynamoDB.scan - * @example Scan the table with a filter expression - * var params = { - * TableName : 'Table', - * FilterExpression : 'Year = :this_year', - * ExpressionAttributeValues : {':this_year' : 2015} - * }; - * - * var documentClient = new AWS.DynamoDB.DocumentClient(); - * - * documentClient.scan(params, function(err, data) { - * if (err) console.log(err); - * else console.log(data); - * }); - * - */ - scan: function (params, callback) { - var operation = this.serviceClientOperationsMap["scan"]; - return this.makeServiceRequest(operation, params, callback); - }, - - /** - * Directly access items from a table by primary key or a secondary index. - * - * Supply the same parameters as {AWS.DynamoDB.query} with - * `AttributeValue`s substituted by native JavaScript types. - * - * @see AWS.DynamoDB.query - * @example Query an index - * var params = { - * TableName: 'Table', - * IndexName: 'Index', - * KeyConditionExpression: 'HashKey = :hkey and RangeKey > :rkey', - * ExpressionAttributeValues: { - * ':hkey': 'key', - * ':rkey': 2015 - * } - * }; - * - * var documentClient = new AWS.DynamoDB.DocumentClient(); - * - * documentClient.query(params, function(err, data) { - * if (err) console.log(err); - * else console.log(data); - * }); - * - */ - query: function (params, callback) { - var operation = this.serviceClientOperationsMap["query"]; - return this.makeServiceRequest(operation, params, callback); - }, - - /** - * Synchronous write operation that groups up to 10 action requests - * - * Supply the same parameters as {AWS.DynamoDB.transactWriteItems} with - * `AttributeValue`s substituted by native JavaScript types. - * - * @see AWS.DynamoDB.transactWriteItems - * @example Get items from multiple tables - * var params = { - * TransactItems: [{ - * Put: { - * TableName : 'Table0', - * Item: { - * HashKey: 'haskey', - * NumAttribute: 1, - * BoolAttribute: true, - * ListAttribute: [1, 'two', false], - * MapAttribute: { foo: 'bar'}, - * NullAttribute: null - * } - * } - * }, { - * Update: { - * TableName: 'Table1', - * Key: { HashKey : 'hashkey' }, - * UpdateExpression: 'set #a = :x + :y', - * ConditionExpression: '#a < :MAX', - * ExpressionAttributeNames: {'#a' : 'Sum'}, - * ExpressionAttributeValues: { - * ':x' : 20, - * ':y' : 45, - * ':MAX' : 100, - * } - * } - * }] - * }; - * - * documentClient.transactWrite(params, function(err, data) { - * if (err) console.log(err); - * else console.log(data); - * }); - */ - transactWrite: function (params, callback) { - var operation = this.serviceClientOperationsMap["transactWrite"]; - return this.makeServiceRequest(operation, params, callback); - }, - - /** - * Atomically retrieves multiple items from one or more tables (but not from indexes) - * in a single account and region. - * - * Supply the same parameters as {AWS.DynamoDB.transactGetItems} with - * `AttributeValue`s substituted by native JavaScript types. - * - * @see AWS.DynamoDB.transactGetItems - * @example Get items from multiple tables - * var params = { - * TransactItems: [{ - * Get: { - * TableName : 'Table0', - * Key: { - * HashKey: 'hashkey0' - * } - * } - * }, { - * Get: { - * TableName : 'Table1', - * Key: { - * HashKey: 'hashkey1' - * } - * } - * }] - * }; - * - * documentClient.transactGet(params, function(err, data) { - * if (err) console.log(err); - * else console.log(data); - * }); - */ - transactGet: function (params, callback) { - var operation = this.serviceClientOperationsMap["transactGet"]; - return this.makeServiceRequest(operation, params, callback); - }, - - /** - * Creates a set of elements inferring the type of set from - * the type of the first element. Amazon DynamoDB currently supports - * the number sets, string sets, and binary sets. For more information - * about DynamoDB data types see the documentation on the - * [Amazon DynamoDB Data Model](http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DataModel.html#DataModel.DataTypes). - * - * @param list [Array] Collection to represent your DynamoDB Set - * @param options [map] - * * **validate** [Boolean] set to true if you want to validate the type - * of each element in the set. Defaults to `false`. - * @example Creating a number set - * var documentClient = new AWS.DynamoDB.DocumentClient(); - * - * var params = { - * Item: { - * hashkey: 'hashkey' - * numbers: documentClient.createSet([1, 2, 3]); - * } - * }; - * - * documentClient.put(params, function(err, data) { - * if (err) console.log(err); - * else console.log(data); - * }); - * - */ - createSet: function (list, options) { - options = options || {}; - return new DynamoDBSet(list, options); - }, - - /** - * @api private - */ - getTranslator: function () { - return new Translator(this.options); - }, - - /** - * @api private - */ - setupRequest: function setupRequest(request) { - var self = this; - var translator = self.getTranslator(); - var operation = request.operation; - var inputShape = request.service.api.operations[operation].input; - request._events.validate.unshift(function (req) { - req.rawParams = AWS.util.copy(req.params); - req.params = translator.translateInput(req.rawParams, inputShape); - }); - }, - - /** - * @api private - */ - setupResponse: function setupResponse(request) { - var self = this; - var translator = self.getTranslator(); - var outputShape = - self.service.api.operations[request.operation].output; - request.on("extractData", function (response) { - response.data = translator.translateOutput( - response.data, - outputShape - ); - }); - - var response = request.response; - response.nextPage = function (cb) { - var resp = this; - var req = resp.request; - var config; - var service = req.service; - var operation = req.operation; - try { - config = service.paginationConfig(operation, true); - } catch (e) { - resp.error = e; - } - - if (!resp.hasNextPage()) { - if (cb) cb(resp.error, null); - else if (resp.error) throw resp.error; - return null; - } - - var params = AWS.util.copy(req.rawParams); - if (!resp.nextPageTokens) { - return cb ? cb(null, null) : null; - } else { - var inputTokens = config.inputToken; - if (typeof inputTokens === "string") inputTokens = [inputTokens]; - for (var i = 0; i < inputTokens.length; i++) { - params[inputTokens[i]] = resp.nextPageTokens[i]; - } - return self[operation](params, cb); - } - }; - }, - }); - - /** - * @api private - */ - module.exports = AWS.DynamoDB.DocumentClient; - - /***/ - }, - - /***/ 91593: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var util = __nccwpck_require__(28437).util; - - /** - * An object recognizable as a numeric value that stores the underlying number - * as a string. - * - * Intended to be a deserialization target for the DynamoDB Document Client when - * the `wrapNumbers` flag is set. This allows for numeric values that lose - * precision when converted to JavaScript's `number` type. - */ - var DynamoDBNumberValue = util.inherit({ - constructor: function NumberValue(value) { - this.wrapperName = "NumberValue"; - this.value = value.toString(); - }, - - /** - * Render the underlying value as a number when converting to JSON. - */ - toJSON: function () { - return this.toNumber(); - }, - - /** - * Convert the underlying value to a JavaScript number. - */ - toNumber: function () { - return Number(this.value); - }, - - /** - * Return a string representing the unaltered value provided to the - * constructor. - */ - toString: function () { - return this.value; - }, - }); - - /** - * @api private - */ - module.exports = DynamoDBNumberValue; - - /***/ - }, - - /***/ 20304: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var util = __nccwpck_require__(28437).util; - var typeOf = __nccwpck_require__(48084).typeOf; - - /** - * @api private - */ - var memberTypeToSetType = { - String: "String", - Number: "Number", - NumberValue: "Number", - Binary: "Binary", - }; - - /** - * @api private - */ - var DynamoDBSet = util.inherit({ - constructor: function Set(list, options) { - options = options || {}; - this.wrapperName = "Set"; - this.initialize(list, options.validate); - }, - - initialize: function (list, validate) { - var self = this; - self.values = [].concat(list); - self.detectType(); - if (validate) { - self.validate(); - } - }, - - detectType: function () { - this.type = memberTypeToSetType[typeOf(this.values[0])]; - if (!this.type) { - throw util.error(new Error(), { - code: "InvalidSetType", - message: "Sets can contain string, number, or binary values", - }); - } - }, - - validate: function () { - var self = this; - var length = self.values.length; - var values = self.values; - for (var i = 0; i < length; i++) { - if (memberTypeToSetType[typeOf(values[i])] !== self.type) { - throw util.error(new Error(), { - code: "InvalidType", - message: - self.type + " Set contains " + typeOf(values[i]) + " value", - }); - } - } - }, - - /** - * Render the underlying values only when converting to JSON. - */ - toJSON: function () { - var self = this; - return self.values; - }, - }); - - /** - * @api private - */ - module.exports = DynamoDBSet; - - /***/ - }, - - /***/ 34222: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var util = __nccwpck_require__(28437).util; - var convert = __nccwpck_require__(76663); - - var Translator = function (options) { - options = options || {}; - this.attrValue = options.attrValue; - this.convertEmptyValues = Boolean(options.convertEmptyValues); - this.wrapNumbers = Boolean(options.wrapNumbers); - }; - - Translator.prototype.translateInput = function (value, shape) { - this.mode = "input"; - return this.translate(value, shape); - }; - - Translator.prototype.translateOutput = function (value, shape) { - this.mode = "output"; - return this.translate(value, shape); - }; - - Translator.prototype.translate = function (value, shape) { - var self = this; - if (!shape || value === undefined) return undefined; - - if (shape.shape === self.attrValue) { - return convert[self.mode](value, { - convertEmptyValues: self.convertEmptyValues, - wrapNumbers: self.wrapNumbers, - }); - } - switch (shape.type) { - case "structure": - return self.translateStructure(value, shape); - case "map": - return self.translateMap(value, shape); - case "list": - return self.translateList(value, shape); - default: - return self.translateScalar(value, shape); - } - }; - - Translator.prototype.translateStructure = function (structure, shape) { - var self = this; - if (structure == null) return undefined; - - var struct = {}; - util.each(structure, function (name, value) { - var memberShape = shape.members[name]; - if (memberShape) { - var result = self.translate(value, memberShape); - if (result !== undefined) struct[name] = result; - } - }); - return struct; - }; - - Translator.prototype.translateList = function (list, shape) { - var self = this; - if (list == null) return undefined; - - var out = []; - util.arrayEach(list, function (value) { - var result = self.translate(value, shape.member); - if (result === undefined) out.push(null); - else out.push(result); - }); - return out; - }; - - Translator.prototype.translateMap = function (map, shape) { - var self = this; - if (map == null) return undefined; - - var out = {}; - util.each(map, function (key, value) { - var result = self.translate(value, shape.value); - if (result === undefined) out[key] = null; - else out[key] = result; - }); - return out; - }; - - Translator.prototype.translateScalar = function (value, shape) { - return shape.toType(value); - }; - - /** - * @api private - */ - module.exports = Translator; - - /***/ - }, - - /***/ 48084: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var util = __nccwpck_require__(28437).util; - - function typeOf(data) { - if (data === null && typeof data === "object") { - return "null"; - } else if (data !== undefined && isBinary(data)) { - return "Binary"; - } else if (data !== undefined && data.constructor) { - return data.wrapperName || util.typeName(data.constructor); - } else if (data !== undefined && typeof data === "object") { - // this object is the result of Object.create(null), hence the absence of a - // defined constructor - return "Object"; - } else { - return "undefined"; - } - } - - function isBinary(data) { - var types = [ - "Buffer", - "File", - "Blob", - "ArrayBuffer", - "DataView", - "Int8Array", - "Uint8Array", - "Uint8ClampedArray", - "Int16Array", - "Uint16Array", - "Int32Array", - "Uint32Array", - "Float32Array", - "Float64Array", - ]; - if (util.isNode()) { - var Stream = util.stream.Stream; - if (util.Buffer.isBuffer(data) || data instanceof Stream) { - return true; - } - } - - for (var i = 0; i < types.length; i++) { - if (data !== undefined && data.constructor) { - if (util.isType(data, types[i])) return true; - if (util.typeName(data.constructor) === types[i]) return true; - } - } - - return false; - } - - /** - * @api private - */ - module.exports = { - typeOf: typeOf, - isBinary: isBinary, - }; - - /***/ - }, - - /***/ 63727: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var eventMessageChunker = __nccwpck_require__(73630).eventMessageChunker; - var parseEvent = __nccwpck_require__(52123).parseEvent; - - function createEventStream(body, parser, model) { - var eventMessages = eventMessageChunker(body); - - var events = []; - - for (var i = 0; i < eventMessages.length; i++) { - events.push(parseEvent(parser, eventMessages[i], model)); - } - - return events; - } - - /** - * @api private - */ - module.exports = { - createEventStream: createEventStream, - }; - - /***/ - }, - - /***/ 18518: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var util = __nccwpck_require__(28437).util; - var Transform = __nccwpck_require__(12781).Transform; - var allocBuffer = util.buffer.alloc; - - /** @type {Transform} */ - function EventMessageChunkerStream(options) { - Transform.call(this, options); - - this.currentMessageTotalLength = 0; - this.currentMessagePendingLength = 0; - /** @type {Buffer} */ - this.currentMessage = null; - - /** @type {Buffer} */ - this.messageLengthBuffer = null; - } - - EventMessageChunkerStream.prototype = Object.create(Transform.prototype); - - /** - * - * @param {Buffer} chunk - * @param {string} encoding - * @param {*} callback - */ - EventMessageChunkerStream.prototype._transform = function ( - chunk, - encoding, - callback - ) { - var chunkLength = chunk.length; - var currentOffset = 0; - - while (currentOffset < chunkLength) { - // create new message if necessary - if (!this.currentMessage) { - // working on a new message, determine total length - var bytesRemaining = chunkLength - currentOffset; - // prevent edge case where total length spans 2 chunks - if (!this.messageLengthBuffer) { - this.messageLengthBuffer = allocBuffer(4); - } - var numBytesForTotal = Math.min( - 4 - this.currentMessagePendingLength, // remaining bytes to fill the messageLengthBuffer - bytesRemaining // bytes left in chunk - ); - - chunk.copy( - this.messageLengthBuffer, - this.currentMessagePendingLength, - currentOffset, - currentOffset + numBytesForTotal - ); - - this.currentMessagePendingLength += numBytesForTotal; - currentOffset += numBytesForTotal; - - if (this.currentMessagePendingLength < 4) { - // not enough information to create the current message - break; - } - this.allocateMessage(this.messageLengthBuffer.readUInt32BE(0)); - this.messageLengthBuffer = null; - } - - // write data into current message - var numBytesToWrite = Math.min( - this.currentMessageTotalLength - this.currentMessagePendingLength, // number of bytes left to complete message - chunkLength - currentOffset // number of bytes left in the original chunk - ); - chunk.copy( - this.currentMessage, // target buffer - this.currentMessagePendingLength, // target offset - currentOffset, // chunk offset - currentOffset + numBytesToWrite // chunk end to write - ); - this.currentMessagePendingLength += numBytesToWrite; - currentOffset += numBytesToWrite; - - // check if a message is ready to be pushed - if ( - this.currentMessageTotalLength && - this.currentMessageTotalLength === this.currentMessagePendingLength - ) { - // push out the message - this.push(this.currentMessage); - // cleanup - this.currentMessage = null; - this.currentMessageTotalLength = 0; - this.currentMessagePendingLength = 0; - } - } - - callback(); - }; - - EventMessageChunkerStream.prototype._flush = function (callback) { - if (this.currentMessageTotalLength) { - if ( - this.currentMessageTotalLength === this.currentMessagePendingLength - ) { - callback(null, this.currentMessage); - } else { - callback(new Error("Truncated event message received.")); - } - } else { - callback(); - } - }; - - /** - * @param {number} size Size of the message to be allocated. - * @api private - */ - EventMessageChunkerStream.prototype.allocateMessage = function (size) { - if (typeof size !== "number") { - throw new Error( - "Attempted to allocate an event message where size was not a number: " + - size - ); - } - this.currentMessageTotalLength = size; - this.currentMessagePendingLength = 4; - this.currentMessage = allocBuffer(size); - this.currentMessage.writeUInt32BE(size, 0); - }; - - /** - * @api private - */ - module.exports = { - EventMessageChunkerStream: EventMessageChunkerStream, - }; - - /***/ - }, - - /***/ 73630: /***/ (module) => { - /** - * Takes in a buffer of event messages and splits them into individual messages. - * @param {Buffer} buffer - * @api private - */ - function eventMessageChunker(buffer) { - /** @type Buffer[] */ - var messages = []; - var offset = 0; - - while (offset < buffer.length) { - var totalLength = buffer.readInt32BE(offset); - - // create new buffer for individual message (shares memory with original) - var message = buffer.slice(offset, totalLength + offset); - // increment offset to it starts at the next message - offset += totalLength; - - messages.push(message); - } - - return messages; - } - - /** - * @api private - */ - module.exports = { - eventMessageChunker: eventMessageChunker, - }; - - /***/ - }, - - /***/ 93773: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var Transform = __nccwpck_require__(12781).Transform; - var parseEvent = __nccwpck_require__(52123).parseEvent; - - /** @type {Transform} */ - function EventUnmarshallerStream(options) { - options = options || {}; - // set output to object mode - options.readableObjectMode = true; - Transform.call(this, options); - this._readableState.objectMode = true; - - this.parser = options.parser; - this.eventStreamModel = options.eventStreamModel; - } - - EventUnmarshallerStream.prototype = Object.create(Transform.prototype); - - /** - * - * @param {Buffer} chunk - * @param {string} encoding - * @param {*} callback - */ - EventUnmarshallerStream.prototype._transform = function ( - chunk, - encoding, - callback - ) { - try { - var event = parseEvent(this.parser, chunk, this.eventStreamModel); - this.push(event); - return callback(); - } catch (err) { - callback(err); - } - }; - - /** - * @api private - */ - module.exports = { - EventUnmarshallerStream: EventUnmarshallerStream, - }; - - /***/ - }, - - /***/ 48583: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var util = __nccwpck_require__(28437).util; - var toBuffer = util.buffer.toBuffer; - - /** - * A lossless representation of a signed, 64-bit integer. Instances of this - * class may be used in arithmetic expressions as if they were numeric - * primitives, but the binary representation will be preserved unchanged as the - * `bytes` property of the object. The bytes should be encoded as big-endian, - * two's complement integers. - * @param {Buffer} bytes - * - * @api private - */ - function Int64(bytes) { - if (bytes.length !== 8) { - throw new Error("Int64 buffers must be exactly 8 bytes"); - } - if (!util.Buffer.isBuffer(bytes)) bytes = toBuffer(bytes); - - this.bytes = bytes; - } - - /** - * @param {number} number - * @returns {Int64} - * - * @api private - */ - Int64.fromNumber = function (number) { - if (number > 9223372036854775807 || number < -9223372036854775808) { - throw new Error( - number + - " is too large (or, if negative, too small) to represent as an Int64" - ); - } - - var bytes = new Uint8Array(8); - for ( - var i = 7, remaining = Math.abs(Math.round(number)); - i > -1 && remaining > 0; - i--, remaining /= 256 - ) { - bytes[i] = remaining; - } - - if (number < 0) { - negate(bytes); - } - - return new Int64(bytes); - }; - - /** - * @returns {number} - * - * @api private - */ - Int64.prototype.valueOf = function () { - var bytes = this.bytes.slice(0); - var negative = bytes[0] & 128; - if (negative) { - negate(bytes); - } - - return parseInt(bytes.toString("hex"), 16) * (negative ? -1 : 1); - }; - - Int64.prototype.toString = function () { - return String(this.valueOf()); - }; - - /** - * @param {Buffer} bytes - * - * @api private - */ - function negate(bytes) { - for (var i = 0; i < 8; i++) { - bytes[i] ^= 0xff; - } - for (var i = 7; i > -1; i--) { - bytes[i]++; - if (bytes[i] !== 0) { - break; - } - } - } - - /** - * @api private - */ - module.exports = { - Int64: Int64, - }; - - /***/ - }, - - /***/ 52123: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var parseMessage = __nccwpck_require__(30866).parseMessage; - - /** - * - * @param {*} parser - * @param {Buffer} message - * @param {*} shape - * @api private - */ - function parseEvent(parser, message, shape) { - var parsedMessage = parseMessage(message); - - // check if message is an event or error - var messageType = parsedMessage.headers[":message-type"]; - if (messageType) { - if (messageType.value === "error") { - throw parseError(parsedMessage); - } else if (messageType.value !== "event") { - // not sure how to parse non-events/non-errors, ignore for now - return; - } - } - - // determine event type - var eventType = parsedMessage.headers[":event-type"]; - // check that the event type is modeled - var eventModel = shape.members[eventType.value]; - if (!eventModel) { - return; - } - - var result = {}; - // check if an event payload exists - var eventPayloadMemberName = eventModel.eventPayloadMemberName; - if (eventPayloadMemberName) { - var payloadShape = eventModel.members[eventPayloadMemberName]; - // if the shape is binary, return the byte array - if (payloadShape.type === "binary") { - result[eventPayloadMemberName] = parsedMessage.body; - } else { - result[eventPayloadMemberName] = parser.parse( - parsedMessage.body.toString(), - payloadShape - ); - } - } - - // read event headers - var eventHeaderNames = eventModel.eventHeaderMemberNames; - for (var i = 0; i < eventHeaderNames.length; i++) { - var name = eventHeaderNames[i]; - if (parsedMessage.headers[name]) { - // parse the header! - result[name] = eventModel.members[name].toType( - parsedMessage.headers[name].value - ); - } - } - - var output = {}; - output[eventType.value] = result; - return output; - } - - function parseError(message) { - var errorCode = message.headers[":error-code"]; - var errorMessage = message.headers[":error-message"]; - var error = new Error(errorMessage.value || errorMessage); - error.code = error.name = errorCode.value || errorCode; - return error; - } - - /** - * @api private - */ - module.exports = { - parseEvent: parseEvent, - }; - - /***/ - }, - - /***/ 30866: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var Int64 = __nccwpck_require__(48583).Int64; - - var splitMessage = __nccwpck_require__(71765).splitMessage; - - var BOOLEAN_TAG = "boolean"; - var BYTE_TAG = "byte"; - var SHORT_TAG = "short"; - var INT_TAG = "integer"; - var LONG_TAG = "long"; - var BINARY_TAG = "binary"; - var STRING_TAG = "string"; - var TIMESTAMP_TAG = "timestamp"; - var UUID_TAG = "uuid"; - - /** - * @api private - * - * @param {Buffer} headers - */ - function parseHeaders(headers) { - var out = {}; - var position = 0; - while (position < headers.length) { - var nameLength = headers.readUInt8(position++); - var name = headers.slice(position, position + nameLength).toString(); - position += nameLength; - switch (headers.readUInt8(position++)) { - case 0 /* boolTrue */: - out[name] = { - type: BOOLEAN_TAG, - value: true, - }; - break; - case 1 /* boolFalse */: - out[name] = { - type: BOOLEAN_TAG, - value: false, - }; - break; - case 2 /* byte */: - out[name] = { - type: BYTE_TAG, - value: headers.readInt8(position++), - }; - break; - case 3 /* short */: - out[name] = { - type: SHORT_TAG, - value: headers.readInt16BE(position), - }; - position += 2; - break; - case 4 /* integer */: - out[name] = { - type: INT_TAG, - value: headers.readInt32BE(position), - }; - position += 4; - break; - case 5 /* long */: - out[name] = { - type: LONG_TAG, - value: new Int64(headers.slice(position, position + 8)), - }; - position += 8; - break; - case 6 /* byteArray */: - var binaryLength = headers.readUInt16BE(position); - position += 2; - out[name] = { - type: BINARY_TAG, - value: headers.slice(position, position + binaryLength), - }; - position += binaryLength; - break; - case 7 /* string */: - var stringLength = headers.readUInt16BE(position); - position += 2; - out[name] = { - type: STRING_TAG, - value: headers - .slice(position, position + stringLength) - .toString(), - }; - position += stringLength; - break; - case 8 /* timestamp */: - out[name] = { - type: TIMESTAMP_TAG, - value: new Date( - new Int64(headers.slice(position, position + 8)).valueOf() - ), - }; - position += 8; - break; - case 9 /* uuid */: - var uuidChars = headers - .slice(position, position + 16) - .toString("hex"); - position += 16; - out[name] = { - type: UUID_TAG, - value: - uuidChars.substr(0, 8) + - "-" + - uuidChars.substr(8, 4) + - "-" + - uuidChars.substr(12, 4) + - "-" + - uuidChars.substr(16, 4) + - "-" + - uuidChars.substr(20), - }; - break; - default: - throw new Error("Unrecognized header type tag"); - } - } - return out; - } - - function parseMessage(message) { - var parsed = splitMessage(message); - return { headers: parseHeaders(parsed.headers), body: parsed.body }; - } - - /** - * @api private - */ - module.exports = { - parseMessage: parseMessage, - }; - - /***/ - }, - - /***/ 71765: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var util = __nccwpck_require__(28437).util; - var toBuffer = util.buffer.toBuffer; - - // All prelude components are unsigned, 32-bit integers - var PRELUDE_MEMBER_LENGTH = 4; - // The prelude consists of two components - var PRELUDE_LENGTH = PRELUDE_MEMBER_LENGTH * 2; - // Checksums are always CRC32 hashes. - var CHECKSUM_LENGTH = 4; - // Messages must include a full prelude, a prelude checksum, and a message checksum - var MINIMUM_MESSAGE_LENGTH = PRELUDE_LENGTH + CHECKSUM_LENGTH * 2; - - /** - * @api private - * - * @param {Buffer} message - */ - function splitMessage(message) { - if (!util.Buffer.isBuffer(message)) message = toBuffer(message); - - if (message.length < MINIMUM_MESSAGE_LENGTH) { - throw new Error( - "Provided message too short to accommodate event stream message overhead" - ); - } - - if (message.length !== message.readUInt32BE(0)) { - throw new Error( - "Reported message length does not match received message length" - ); - } - - var expectedPreludeChecksum = message.readUInt32BE(PRELUDE_LENGTH); - - if ( - expectedPreludeChecksum !== - util.crypto.crc32(message.slice(0, PRELUDE_LENGTH)) - ) { - throw new Error( - "The prelude checksum specified in the message (" + - expectedPreludeChecksum + - ") does not match the calculated CRC32 checksum." - ); - } - - var expectedMessageChecksum = message.readUInt32BE( - message.length - CHECKSUM_LENGTH - ); - - if ( - expectedMessageChecksum !== - util.crypto.crc32(message.slice(0, message.length - CHECKSUM_LENGTH)) - ) { - throw new Error( - "The message checksum did not match the expected value of " + - expectedMessageChecksum - ); - } - - var headersStart = PRELUDE_LENGTH + CHECKSUM_LENGTH; - var headersEnd = - headersStart + message.readUInt32BE(PRELUDE_MEMBER_LENGTH); - - return { - headers: message.slice(headersStart, headersEnd), - body: message.slice(headersEnd, message.length - CHECKSUM_LENGTH), - }; - } - - /** - * @api private - */ - module.exports = { - splitMessage: splitMessage, - }; - - /***/ - }, - - /***/ 69643: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - /** - * What is necessary to create an event stream in node? - * - http response stream - * - parser - * - event stream model - */ - - var EventMessageChunkerStream = __nccwpck_require__(18518) - .EventMessageChunkerStream; - var EventUnmarshallerStream = __nccwpck_require__(93773) - .EventUnmarshallerStream; - - function createEventStream(stream, parser, model) { - var eventStream = new EventUnmarshallerStream({ - parser: parser, - eventStreamModel: model, - }); - - var eventMessageChunker = new EventMessageChunkerStream(); - - stream.pipe(eventMessageChunker).pipe(eventStream); - - stream.on("error", function (err) { - eventMessageChunker.emit("error", err); - }); - - eventMessageChunker.on("error", function (err) { - eventStream.emit("error", err); - }); - - return eventStream; - } - - /** - * @api private - */ - module.exports = { - createEventStream: createEventStream, - }; - - /***/ - }, - - /***/ 54995: /***/ ( - __unused_webpack_module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var AWS = __nccwpck_require__(28437); - var SequentialExecutor = __nccwpck_require__(55948); - var DISCOVER_ENDPOINT = __nccwpck_require__(45313).discoverEndpoint; - /** - * The namespace used to register global event listeners for request building - * and sending. - */ - AWS.EventListeners = { - /** - * @!attribute VALIDATE_CREDENTIALS - * A request listener that validates whether the request is being - * sent with credentials. - * Handles the {AWS.Request~validate 'validate' Request event} - * @example Sending a request without validating credentials - * var listener = AWS.EventListeners.Core.VALIDATE_CREDENTIALS; - * request.removeListener('validate', listener); - * @readonly - * @return [Function] - * @!attribute VALIDATE_REGION - * A request listener that validates whether the region is set - * for a request. - * Handles the {AWS.Request~validate 'validate' Request event} - * @example Sending a request without validating region configuration - * var listener = AWS.EventListeners.Core.VALIDATE_REGION; - * request.removeListener('validate', listener); - * @readonly - * @return [Function] - * @!attribute VALIDATE_PARAMETERS - * A request listener that validates input parameters in a request. - * Handles the {AWS.Request~validate 'validate' Request event} - * @example Sending a request without validating parameters - * var listener = AWS.EventListeners.Core.VALIDATE_PARAMETERS; - * request.removeListener('validate', listener); - * @example Disable parameter validation globally - * AWS.EventListeners.Core.removeListener('validate', - * AWS.EventListeners.Core.VALIDATE_REGION); - * @readonly - * @return [Function] - * @!attribute SEND - * A request listener that initiates the HTTP connection for a - * request being sent. Handles the {AWS.Request~send 'send' Request event} - * @example Replacing the HTTP handler - * var listener = AWS.EventListeners.Core.SEND; - * request.removeListener('send', listener); - * request.on('send', function(response) { - * customHandler.send(response); - * }); - * @return [Function] - * @readonly - * @!attribute HTTP_DATA - * A request listener that reads data from the HTTP connection in order - * to build the response data. - * Handles the {AWS.Request~httpData 'httpData' Request event}. - * Remove this handler if you are overriding the 'httpData' event and - * do not want extra data processing and buffering overhead. - * @example Disabling default data processing - * var listener = AWS.EventListeners.Core.HTTP_DATA; - * request.removeListener('httpData', listener); - * @return [Function] - * @readonly - */ - Core: {} /* doc hack */, - }; - - /** - * @api private - */ - function getOperationAuthtype(req) { - if (!req.service.api.operations) { - return ""; - } - var operation = req.service.api.operations[req.operation]; - return operation ? operation.authtype : ""; - } - - AWS.EventListeners = { - Core: new SequentialExecutor().addNamedListeners(function ( - add, - addAsync - ) { - addAsync( - "VALIDATE_CREDENTIALS", - "validate", - function VALIDATE_CREDENTIALS(req, done) { - if ( - !req.service.api.signatureVersion && - !req.service.config.signatureVersion - ) - return done(); // none - req.service.config.getCredentials(function (err) { - if (err) { - req.response.error = AWS.util.error(err, { - code: "CredentialsError", - message: - "Missing credentials in config, if using AWS_CONFIG_FILE, set AWS_SDK_LOAD_CONFIG=1", - }); - } - done(); - }); - } - ); - - add("VALIDATE_REGION", "validate", function VALIDATE_REGION(req) { - if (!req.service.isGlobalEndpoint) { - var dnsHostRegex = new RegExp( - /^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/ - ); - if (!req.service.config.region) { - req.response.error = AWS.util.error(new Error(), { - code: "ConfigError", - message: "Missing region in config", - }); - } else if (!dnsHostRegex.test(req.service.config.region)) { - req.response.error = AWS.util.error(new Error(), { - code: "ConfigError", - message: "Invalid region in config", - }); - } - } - }); - - add( - "BUILD_IDEMPOTENCY_TOKENS", - "validate", - function BUILD_IDEMPOTENCY_TOKENS(req) { - if (!req.service.api.operations) { - return; - } - var operation = req.service.api.operations[req.operation]; - if (!operation) { - return; - } - var idempotentMembers = operation.idempotentMembers; - if (!idempotentMembers.length) { - return; - } - // creates a copy of params so user's param object isn't mutated - var params = AWS.util.copy(req.params); - for (var i = 0, iLen = idempotentMembers.length; i < iLen; i++) { - if (!params[idempotentMembers[i]]) { - // add the member - params[idempotentMembers[i]] = AWS.util.uuid.v4(); - } - } - req.params = params; - } - ); - - add("VALIDATE_PARAMETERS", "validate", function VALIDATE_PARAMETERS( - req - ) { - if (!req.service.api.operations) { - return; - } - var rules = req.service.api.operations[req.operation].input; - var validation = req.service.config.paramValidation; - new AWS.ParamValidator(validation).validate(rules, req.params); - }); - - addAsync("COMPUTE_SHA256", "afterBuild", function COMPUTE_SHA256( - req, - done - ) { - req.haltHandlersOnError(); - if (!req.service.api.operations) { - return; - } - var operation = req.service.api.operations[req.operation]; - var authtype = operation ? operation.authtype : ""; - if ( - !req.service.api.signatureVersion && - !authtype && - !req.service.config.signatureVersion - ) - return done(); // none - if (req.service.getSignerClass(req) === AWS.Signers.V4) { - var body = req.httpRequest.body || ""; - if (authtype.indexOf("unsigned-body") >= 0) { - req.httpRequest.headers["X-Amz-Content-Sha256"] = - "UNSIGNED-PAYLOAD"; - return done(); - } - AWS.util.computeSha256(body, function (err, sha) { - if (err) { - done(err); - } else { - req.httpRequest.headers["X-Amz-Content-Sha256"] = sha; - done(); - } - }); - } else { - done(); - } - }); - - add("SET_CONTENT_LENGTH", "afterBuild", function SET_CONTENT_LENGTH( - req - ) { - var authtype = getOperationAuthtype(req); - var payloadMember = AWS.util.getRequestPayloadShape(req); - if (req.httpRequest.headers["Content-Length"] === undefined) { - try { - var length = AWS.util.string.byteLength(req.httpRequest.body); - req.httpRequest.headers["Content-Length"] = length; - } catch (err) { - if (payloadMember && payloadMember.isStreaming) { - if (payloadMember.requiresLength) { - //streaming payload requires length(s3, glacier) - throw err; - } else if (authtype.indexOf("unsigned-body") >= 0) { - //unbounded streaming payload(lex, mediastore) - req.httpRequest.headers["Transfer-Encoding"] = "chunked"; - return; - } else { - throw err; - } - } - throw err; - } - } - }); - - add("SET_HTTP_HOST", "afterBuild", function SET_HTTP_HOST(req) { - req.httpRequest.headers["Host"] = req.httpRequest.endpoint.host; - }); - - add("RESTART", "restart", function RESTART() { - var err = this.response.error; - if (!err || !err.retryable) return; - - this.httpRequest = new AWS.HttpRequest( - this.service.endpoint, - this.service.region - ); - - if (this.response.retryCount < this.service.config.maxRetries) { - this.response.retryCount++; - } else { - this.response.error = null; - } - }); - - var addToHead = true; - addAsync("DISCOVER_ENDPOINT", "sign", DISCOVER_ENDPOINT, addToHead); - - addAsync("SIGN", "sign", function SIGN(req, done) { - var service = req.service; - var operations = req.service.api.operations || {}; - var operation = operations[req.operation]; - var authtype = operation ? operation.authtype : ""; - if ( - !service.api.signatureVersion && - !authtype && - !service.config.signatureVersion - ) - return done(); // none - - service.config.getCredentials(function (err, credentials) { - if (err) { - req.response.error = err; - return done(); - } - - try { - var date = service.getSkewCorrectedDate(); - var SignerClass = service.getSignerClass(req); - var signer = new SignerClass( - req.httpRequest, - service.getSigningName(), - { - signatureCache: service.config.signatureCache, - operation: operation, - signatureVersion: service.api.signatureVersion, - } - ); - signer.setServiceClientId(service._clientId); - - // clear old authorization headers - delete req.httpRequest.headers["Authorization"]; - delete req.httpRequest.headers["Date"]; - delete req.httpRequest.headers["X-Amz-Date"]; - - // add new authorization - signer.addAuthorization(credentials, date); - req.signedAt = date; - } catch (e) { - req.response.error = e; - } - done(); - }); - }); - - add( - "VALIDATE_RESPONSE", - "validateResponse", - function VALIDATE_RESPONSE(resp) { - if (this.service.successfulResponse(resp, this)) { - resp.data = {}; - resp.error = null; - } else { - resp.data = null; - resp.error = AWS.util.error(new Error(), { - code: "UnknownError", - message: "An unknown error occurred.", - }); - } - } - ); - - addAsync("SEND", "send", function SEND(resp, done) { - resp.httpResponse._abortCallback = done; - resp.error = null; - resp.data = null; - - function callback(httpResp) { - resp.httpResponse.stream = httpResp; - var stream = resp.request.httpRequest.stream; - var service = resp.request.service; - var api = service.api; - var operationName = resp.request.operation; - var operation = api.operations[operationName] || {}; - - httpResp.on("headers", function onHeaders( - statusCode, - headers, - statusMessage - ) { - resp.request.emit("httpHeaders", [ - statusCode, - headers, - resp, - statusMessage, - ]); - - if (!resp.httpResponse.streaming) { - if (AWS.HttpClient.streamsApiVersion === 2) { - // streams2 API check - // if we detect event streams, we're going to have to - // return the stream immediately - if ( - operation.hasEventOutput && - service.successfulResponse(resp) - ) { - // skip reading the IncomingStream - resp.request.emit("httpDone"); - done(); - return; - } - - httpResp.on("readable", function onReadable() { - var data = httpResp.read(); - if (data !== null) { - resp.request.emit("httpData", [data, resp]); - } - }); - } else { - // legacy streams API - httpResp.on("data", function onData(data) { - resp.request.emit("httpData", [data, resp]); - }); - } - } - }); - - httpResp.on("end", function onEnd() { - if (!stream || !stream.didCallback) { - if ( - AWS.HttpClient.streamsApiVersion === 2 && - operation.hasEventOutput && - service.successfulResponse(resp) - ) { - // don't concatenate response chunks when streaming event stream data when response is successful - return; - } - resp.request.emit("httpDone"); - done(); - } - }); - } - - function progress(httpResp) { - httpResp.on("sendProgress", function onSendProgress(value) { - resp.request.emit("httpUploadProgress", [value, resp]); - }); - - httpResp.on("receiveProgress", function onReceiveProgress(value) { - resp.request.emit("httpDownloadProgress", [value, resp]); - }); - } - - function error(err) { - if (err.code !== "RequestAbortedError") { - var errCode = - err.code === "TimeoutError" ? err.code : "NetworkingError"; - err = AWS.util.error(err, { - code: errCode, - region: resp.request.httpRequest.region, - hostname: resp.request.httpRequest.endpoint.hostname, - retryable: true, - }); - } - resp.error = err; - resp.request.emit("httpError", [resp.error, resp], function () { - done(); - }); - } - - function executeSend() { - var http = AWS.HttpClient.getInstance(); - var httpOptions = resp.request.service.config.httpOptions || {}; - try { - var stream = http.handleRequest( - resp.request.httpRequest, - httpOptions, - callback, - error - ); - progress(stream); - } catch (err) { - error(err); - } - } - var timeDiff = - (resp.request.service.getSkewCorrectedDate() - this.signedAt) / - 1000; - if (timeDiff >= 60 * 10) { - // if we signed 10min ago, re-sign - this.emit("sign", [this], function (err) { - if (err) done(err); - else executeSend(); - }); - } else { - executeSend(); - } - }); - - add("HTTP_HEADERS", "httpHeaders", function HTTP_HEADERS( - statusCode, - headers, - resp, - statusMessage - ) { - resp.httpResponse.statusCode = statusCode; - resp.httpResponse.statusMessage = statusMessage; - resp.httpResponse.headers = headers; - resp.httpResponse.body = AWS.util.buffer.toBuffer(""); - resp.httpResponse.buffers = []; - resp.httpResponse.numBytes = 0; - var dateHeader = headers.date || headers.Date; - var service = resp.request.service; - if (dateHeader) { - var serverTime = Date.parse(dateHeader); - if ( - service.config.correctClockSkew && - service.isClockSkewed(serverTime) - ) { - service.applyClockOffset(serverTime); - } - } - }); - - add("HTTP_DATA", "httpData", function HTTP_DATA(chunk, resp) { - if (chunk) { - if (AWS.util.isNode()) { - resp.httpResponse.numBytes += chunk.length; - - var total = resp.httpResponse.headers["content-length"]; - var progress = { - loaded: resp.httpResponse.numBytes, - total: total, - }; - resp.request.emit("httpDownloadProgress", [progress, resp]); - } - - resp.httpResponse.buffers.push(AWS.util.buffer.toBuffer(chunk)); - } - }); - - add("HTTP_DONE", "httpDone", function HTTP_DONE(resp) { - // convert buffers array into single buffer - if ( - resp.httpResponse.buffers && - resp.httpResponse.buffers.length > 0 - ) { - var body = AWS.util.buffer.concat(resp.httpResponse.buffers); - resp.httpResponse.body = body; - } - delete resp.httpResponse.numBytes; - delete resp.httpResponse.buffers; - }); - - add("FINALIZE_ERROR", "retry", function FINALIZE_ERROR(resp) { - if (resp.httpResponse.statusCode) { - resp.error.statusCode = resp.httpResponse.statusCode; - if (resp.error.retryable === undefined) { - resp.error.retryable = this.service.retryableError( - resp.error, - this - ); - } - } - }); - - add( - "INVALIDATE_CREDENTIALS", - "retry", - function INVALIDATE_CREDENTIALS(resp) { - if (!resp.error) return; - switch (resp.error.code) { - case "RequestExpired": // EC2 only - case "ExpiredTokenException": - case "ExpiredToken": - resp.error.retryable = true; - resp.request.service.config.credentials.expired = true; - } - } - ); - - add("EXPIRED_SIGNATURE", "retry", function EXPIRED_SIGNATURE(resp) { - var err = resp.error; - if (!err) return; - if ( - typeof err.code === "string" && - typeof err.message === "string" - ) { - if (err.code.match(/Signature/) && err.message.match(/expired/)) { - resp.error.retryable = true; - } - } - }); - - add("CLOCK_SKEWED", "retry", function CLOCK_SKEWED(resp) { - if (!resp.error) return; - if ( - this.service.clockSkewError(resp.error) && - this.service.config.correctClockSkew - ) { - resp.error.retryable = true; - } - }); - - add("REDIRECT", "retry", function REDIRECT(resp) { - if ( - resp.error && - resp.error.statusCode >= 300 && - resp.error.statusCode < 400 && - resp.httpResponse.headers["location"] - ) { - this.httpRequest.endpoint = new AWS.Endpoint( - resp.httpResponse.headers["location"] - ); - this.httpRequest.headers["Host"] = this.httpRequest.endpoint.host; - resp.error.redirect = true; - resp.error.retryable = true; - } - }); - - add("RETRY_CHECK", "retry", function RETRY_CHECK(resp) { - if (resp.error) { - if ( - resp.error.redirect && - resp.redirectCount < resp.maxRedirects - ) { - resp.error.retryDelay = 0; - } else if (resp.retryCount < resp.maxRetries) { - resp.error.retryDelay = - this.service.retryDelays(resp.retryCount, resp.error) || 0; - } - } - }); - - addAsync( - "RESET_RETRY_STATE", - "afterRetry", - function RESET_RETRY_STATE(resp, done) { - var delay, - willRetry = false; - - if (resp.error) { - delay = resp.error.retryDelay || 0; - if (resp.error.retryable && resp.retryCount < resp.maxRetries) { - resp.retryCount++; - willRetry = true; - } else if ( - resp.error.redirect && - resp.redirectCount < resp.maxRedirects - ) { - resp.redirectCount++; - willRetry = true; - } - } - - // delay < 0 is a signal from customBackoff to skip retries - if (willRetry && delay >= 0) { - resp.error = null; - setTimeout(done, delay); - } else { - done(); - } - } - ); - }), - - CorePost: new SequentialExecutor().addNamedListeners(function (add) { - add("EXTRACT_REQUEST_ID", "extractData", AWS.util.extractRequestId); - add("EXTRACT_REQUEST_ID", "extractError", AWS.util.extractRequestId); - - add("ENOTFOUND_ERROR", "httpError", function ENOTFOUND_ERROR(err) { - function isDNSError(err) { - return ( - err.errno === "ENOTFOUND" || - (typeof err.errno === "number" && - typeof AWS.util.getSystemErrorName === "function" && - ["EAI_NONAME", "EAI_NODATA"].indexOf( - AWS.util.getSystemErrorName(err.errno) >= 0 - )) - ); - } - if (err.code === "NetworkingError" && isDNSError(err)) { - var message = - "Inaccessible host: `" + - err.hostname + - "'. This service may not be available in the `" + - err.region + - "' region."; - this.response.error = AWS.util.error(new Error(message), { - code: "UnknownEndpoint", - region: err.region, - hostname: err.hostname, - retryable: true, - originalError: err, - }); - } - }); - }), - - Logger: new SequentialExecutor().addNamedListeners(function (add) { - add("LOG_REQUEST", "complete", function LOG_REQUEST(resp) { - var req = resp.request; - var logger = req.service.config.logger; - if (!logger) return; - function filterSensitiveLog(inputShape, shape) { - if (!shape) { - return shape; - } - if (inputShape.isSensitive) { - return "***SensitiveInformation***"; - } - switch (inputShape.type) { - case "structure": - var struct = {}; - AWS.util.each(shape, function (subShapeName, subShape) { - if ( - Object.prototype.hasOwnProperty.call( - inputShape.members, - subShapeName - ) - ) { - struct[subShapeName] = filterSensitiveLog( - inputShape.members[subShapeName], - subShape - ); - } else { - struct[subShapeName] = subShape; - } - }); - return struct; - case "list": - var list = []; - AWS.util.arrayEach(shape, function (subShape, index) { - list.push(filterSensitiveLog(inputShape.member, subShape)); - }); - return list; - case "map": - var map = {}; - AWS.util.each(shape, function (key, value) { - map[key] = filterSensitiveLog(inputShape.value, value); - }); - return map; - default: - return shape; - } - } - - function buildMessage() { - var time = resp.request.service.getSkewCorrectedDate().getTime(); - var delta = (time - req.startTime.getTime()) / 1000; - var ansi = logger.isTTY ? true : false; - var status = resp.httpResponse.statusCode; - var censoredParams = req.params; - if ( - req.service.api.operations && - req.service.api.operations[req.operation] && - req.service.api.operations[req.operation].input - ) { - var inputShape = - req.service.api.operations[req.operation].input; - censoredParams = filterSensitiveLog(inputShape, req.params); - } - var params = __nccwpck_require__(73837).inspect( - censoredParams, - true, - null - ); - var message = ""; - if (ansi) message += "\x1B[33m"; - message += "[AWS " + req.service.serviceIdentifier + " " + status; - message += - " " + delta.toString() + "s " + resp.retryCount + " retries]"; - if (ansi) message += "\x1B[0;1m"; - message += " " + AWS.util.string.lowerFirst(req.operation); - message += "(" + params + ")"; - if (ansi) message += "\x1B[0m"; - return message; - } - - var line = buildMessage(); - if (typeof logger.log === "function") { - logger.log(line); - } else if (typeof logger.write === "function") { - logger.write(line + "\n"); - } - }); - }), - - Json: new SequentialExecutor().addNamedListeners(function (add) { - var svc = __nccwpck_require__(30083); - add("BUILD", "build", svc.buildRequest); - add("EXTRACT_DATA", "extractData", svc.extractData); - add("EXTRACT_ERROR", "extractError", svc.extractError); - }), - - Rest: new SequentialExecutor().addNamedListeners(function (add) { - var svc = __nccwpck_require__(98200); - add("BUILD", "build", svc.buildRequest); - add("EXTRACT_DATA", "extractData", svc.extractData); - add("EXTRACT_ERROR", "extractError", svc.extractError); - }), - - RestJson: new SequentialExecutor().addNamedListeners(function (add) { - var svc = __nccwpck_require__(5883); - add("BUILD", "build", svc.buildRequest); - add("EXTRACT_DATA", "extractData", svc.extractData); - add("EXTRACT_ERROR", "extractError", svc.extractError); - }), - - RestXml: new SequentialExecutor().addNamedListeners(function (add) { - var svc = __nccwpck_require__(15143); - add("BUILD", "build", svc.buildRequest); - add("EXTRACT_DATA", "extractData", svc.extractData); - add("EXTRACT_ERROR", "extractError", svc.extractError); - }), - - Query: new SequentialExecutor().addNamedListeners(function (add) { - var svc = __nccwpck_require__(90761); - add("BUILD", "build", svc.buildRequest); - add("EXTRACT_DATA", "extractData", svc.extractData); - add("EXTRACT_ERROR", "extractError", svc.extractError); - }), - }; - - /***/ - }, - - /***/ 1556: /***/ ( - __unused_webpack_module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var AWS = __nccwpck_require__(28437); - var inherit = AWS.util.inherit; - - /** - * The endpoint that a service will talk to, for example, - * `'https://ec2.ap-southeast-1.amazonaws.com'`. If - * you need to override an endpoint for a service, you can - * set the endpoint on a service by passing the endpoint - * object with the `endpoint` option key: - * - * ```javascript - * var ep = new AWS.Endpoint('awsproxy.example.com'); - * var s3 = new AWS.S3({endpoint: ep}); - * s3.service.endpoint.hostname == 'awsproxy.example.com' - * ``` - * - * Note that if you do not specify a protocol, the protocol will - * be selected based on your current {AWS.config} configuration. - * - * @!attribute protocol - * @return [String] the protocol (http or https) of the endpoint - * URL - * @!attribute hostname - * @return [String] the host portion of the endpoint, e.g., - * example.com - * @!attribute host - * @return [String] the host portion of the endpoint including - * the port, e.g., example.com:80 - * @!attribute port - * @return [Integer] the port of the endpoint - * @!attribute href - * @return [String] the full URL of the endpoint - */ - AWS.Endpoint = inherit({ - /** - * @overload Endpoint(endpoint) - * Constructs a new endpoint given an endpoint URL. If the - * URL omits a protocol (http or https), the default protocol - * set in the global {AWS.config} will be used. - * @param endpoint [String] the URL to construct an endpoint from - */ - constructor: function Endpoint(endpoint, config) { - AWS.util.hideProperties(this, [ - "slashes", - "auth", - "hash", - "search", - "query", - ]); - - if (typeof endpoint === "undefined" || endpoint === null) { - throw new Error("Invalid endpoint: " + endpoint); - } else if (typeof endpoint !== "string") { - return AWS.util.copy(endpoint); - } - - if (!endpoint.match(/^http/)) { - var useSSL = - config && config.sslEnabled !== undefined - ? config.sslEnabled - : AWS.config.sslEnabled; - endpoint = (useSSL ? "https" : "http") + "://" + endpoint; - } - - AWS.util.update(this, AWS.util.urlParse(endpoint)); - - // Ensure the port property is set as an integer - if (this.port) { - this.port = parseInt(this.port, 10); - } else { - this.port = this.protocol === "https:" ? 443 : 80; - } + page: { + type: "integer" }, - }); - - /** - * The low level HTTP request object, encapsulating all HTTP header - * and body data sent by a service request. - * - * @!attribute method - * @return [String] the HTTP method of the request - * @!attribute path - * @return [String] the path portion of the URI, e.g., - * "/list/?start=5&num=10" - * @!attribute headers - * @return [map] - * a map of header keys and their respective values - * @!attribute body - * @return [String] the request body payload - * @!attribute endpoint - * @return [AWS.Endpoint] the endpoint for the request - * @!attribute region - * @api private - * @return [String] the region, for signing purposes only. - */ - AWS.HttpRequest = inherit({ - /** - * @api private - */ - constructor: function HttpRequest(endpoint, region) { - endpoint = new AWS.Endpoint(endpoint); - this.method = "POST"; - this.path = endpoint.path || "/"; - this.headers = {}; - this.body = ""; - this.endpoint = endpoint; - this.region = region; - this._userAgent = ""; - this.setUserAgent(); - }, - - /** - * @api private - */ - setUserAgent: function setUserAgent() { - this._userAgent = this.headers[ - this.getUserAgentHeaderName() - ] = AWS.util.userAgent(); - }, - - getUserAgentHeaderName: function getUserAgentHeaderName() { - var prefix = AWS.util.isBrowser() ? "X-Amz-" : ""; - return prefix + "User-Agent"; - }, - - /** - * @api private - */ - appendToUserAgent: function appendToUserAgent(agentPartial) { - if (typeof agentPartial === "string" && agentPartial) { - this._userAgent += " " + agentPartial; - } - this.headers[this.getUserAgentHeaderName()] = this._userAgent; + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/actions/workflows" + }, + listSecretsForRepo: { + method: "GET", + params: { + owner: { + required: true, + type: "string" }, - - /** - * @api private - */ - getUserAgent: function getUserAgent() { - return this._userAgent; + page: { + type: "integer" }, - - /** - * @return [String] the part of the {path} excluding the - * query string - */ - pathname: function pathname() { - return this.path.split("?", 1)[0]; + per_page: { + type: "integer" }, - - /** - * @return [String] the query string portion of the {path} - */ - search: function search() { - var query = this.path.split("?", 2)[1]; - if (query) { - query = AWS.util.queryStringParse(query); - return AWS.util.queryParamsToString(query); - } - return ""; - }, - - /** - * @api private - * update httpRequest endpoint with endpoint string - */ - updateEndpoint: function updateEndpoint(endpointStr) { - var newEndpoint = new AWS.Endpoint(endpointStr); - this.endpoint = newEndpoint; - this.path = newEndpoint.path || "/"; - if (this.headers["Host"]) { - this.headers["Host"] = newEndpoint.host; - } + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/actions/secrets" + }, + listSelfHostedRunnersForRepo: { + method: "GET", + params: { + owner: { + required: true, + type: "string" }, - }); - - /** - * The low level HTTP response object, encapsulating all HTTP header - * and body data returned from the request. - * - * @!attribute statusCode - * @return [Integer] the HTTP status code of the response (e.g., 200, 404) - * @!attribute headers - * @return [map] - * a map of response header keys and their respective values - * @!attribute body - * @return [String] the response body payload - * @!attribute [r] streaming - * @return [Boolean] whether this response is being streamed at a low-level. - * Defaults to `false` (buffered reads). Do not modify this manually, use - * {createUnbufferedStream} to convert the stream to unbuffered mode - * instead. - */ - AWS.HttpResponse = inherit({ - /** - * @api private - */ - constructor: function HttpResponse() { - this.statusCode = undefined; - this.headers = {}; - this.body = undefined; - this.streaming = false; - this.stream = null; - }, - - /** - * Disables buffering on the HTTP response and returns the stream for reading. - * @return [Stream, XMLHttpRequest, null] the underlying stream object. - * Use this object to directly read data off of the stream. - * @note This object is only available after the {AWS.Request~httpHeaders} - * event has fired. This method must be called prior to - * {AWS.Request~httpData}. - * @example Taking control of a stream - * request.on('httpHeaders', function(statusCode, headers) { - * if (statusCode < 300) { - * if (headers.etag === 'xyz') { - * // pipe the stream, disabling buffering - * var stream = this.response.httpResponse.createUnbufferedStream(); - * stream.pipe(process.stdout); - * } else { // abort this request and set a better error message - * this.abort(); - * this.response.error = new Error('Invalid ETag'); - * } - * } - * }).send(console.log); - */ - createUnbufferedStream: function createUnbufferedStream() { - this.streaming = true; - return this.stream; + page: { + type: "integer" }, - }); - - AWS.HttpClient = inherit({}); - - /** - * @api private - */ - AWS.HttpClient.getInstance = function getInstance() { - if (this.singleton === undefined) { - this.singleton = new this(); + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" } - return this.singleton; - }; - - /***/ + }, + url: "/repos/:owner/:repo/actions/runners" }, - - /***/ 2310: /***/ ( - __unused_webpack_module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var AWS = __nccwpck_require__(28437); - var Stream = AWS.util.stream.Stream; - var TransformStream = AWS.util.stream.Transform; - var ReadableStream = AWS.util.stream.Readable; - __nccwpck_require__(1556); - var CONNECTION_REUSE_ENV_NAME = "AWS_NODEJS_CONNECTION_REUSE_ENABLED"; - - /** - * @api private - */ - AWS.NodeHttpClient = AWS.util.inherit({ - handleRequest: function handleRequest( - httpRequest, - httpOptions, - callback, - errCallback - ) { - var self = this; - var endpoint = httpRequest.endpoint; - var pathPrefix = ""; - if (!httpOptions) httpOptions = {}; - if (httpOptions.proxy) { - pathPrefix = endpoint.protocol + "//" + endpoint.hostname; - if (endpoint.port !== 80 && endpoint.port !== 443) { - pathPrefix += ":" + endpoint.port; - } - endpoint = new AWS.Endpoint(httpOptions.proxy); - } - - var useSSL = endpoint.protocol === "https:"; - var http = useSSL - ? __nccwpck_require__(95687) - : __nccwpck_require__(13685); - var options = { - host: endpoint.hostname, - port: endpoint.port, - method: httpRequest.method, - headers: httpRequest.headers, - path: pathPrefix + httpRequest.path, - }; - - if (!httpOptions.agent) { - options.agent = this.getAgent(useSSL, { - keepAlive: - process.env[CONNECTION_REUSE_ENV_NAME] === "1" ? true : false, - }); - } - - AWS.util.update(options, httpOptions); - delete options.proxy; // proxy isn't an HTTP option - delete options.timeout; // timeout isn't an HTTP option - - var stream = http.request(options, function (httpResp) { - if (stream.didCallback) return; - - callback(httpResp); - httpResp.emit( - "headers", - httpResp.statusCode, - httpResp.headers, - httpResp.statusMessage - ); - }); - httpRequest.stream = stream; // attach stream to httpRequest - stream.didCallback = false; - - // connection timeout support - if (httpOptions.connectTimeout) { - var connectTimeoutId; - stream.on("socket", function (socket) { - if (socket.connecting) { - connectTimeoutId = setTimeout(function connectTimeout() { - if (stream.didCallback) return; - stream.didCallback = true; - - stream.abort(); - errCallback( - AWS.util.error( - new Error( - "Socket timed out without establishing a connection" - ), - { code: "TimeoutError" } - ) - ); - }, httpOptions.connectTimeout); - socket.on("connect", function () { - clearTimeout(connectTimeoutId); - connectTimeoutId = null; - }); - } - }); - } - - // timeout support - stream.setTimeout(httpOptions.timeout || 0, function () { - if (stream.didCallback) return; - stream.didCallback = true; - - var msg = - "Connection timed out after " + httpOptions.timeout + "ms"; - errCallback( - AWS.util.error(new Error(msg), { code: "TimeoutError" }) - ); - stream.abort(); - }); - - stream.on("error", function () { - if (connectTimeoutId) { - clearTimeout(connectTimeoutId); - connectTimeoutId = null; - } - if (stream.didCallback) return; - stream.didCallback = true; - errCallback.apply(stream, arguments); - }); - - var expect = httpRequest.headers.Expect || httpRequest.headers.expect; - if (expect === "100-continue") { - stream.on("continue", function () { - self.writeBody(stream, httpRequest); - }); - } else { - this.writeBody(stream, httpRequest); - } - - return stream; + listWorkflowJobLogs: { + method: "GET", + params: { + job_id: { + required: true, + type: "integer" }, - - writeBody: function writeBody(stream, httpRequest) { - var body = httpRequest.body; - var totalBytes = parseInt(httpRequest.headers["Content-Length"], 10); - - if (body instanceof Stream) { - // For progress support of streaming content - - // pipe the data through a transform stream to emit 'sendProgress' events - var progressStream = this.progressStream(stream, totalBytes); - if (progressStream) { - body.pipe(progressStream).pipe(stream); - } else { - body.pipe(stream); - } - } else if (body) { - // The provided body is a buffer/string and is already fully available in memory - - // For performance it's best to send it as a whole by calling stream.end(body), - // Callers expect a 'sendProgress' event which is best emitted once - // the http request stream has been fully written and all data flushed. - // The use of totalBytes is important over body.length for strings where - // length is char length and not byte length. - stream.once("finish", function () { - stream.emit("sendProgress", { - loaded: totalBytes, - total: totalBytes, - }); - }); - stream.end(body); - } else { - // no request body - stream.end(); - } + owner: { + required: true, + type: "string" }, - - /** - * Create the https.Agent or http.Agent according to the request schema. - */ - getAgent: function getAgent(useSSL, agentOptions) { - var http = useSSL - ? __nccwpck_require__(95687) - : __nccwpck_require__(13685); - if (useSSL) { - if (!AWS.NodeHttpClient.sslAgent) { - AWS.NodeHttpClient.sslAgent = new http.Agent( - AWS.util.merge( - { - rejectUnauthorized: - process.env.NODE_TLS_REJECT_UNAUTHORIZED === "0" - ? false - : true, - }, - agentOptions || {} - ) - ); - AWS.NodeHttpClient.sslAgent.setMaxListeners(0); - - // delegate maxSockets to globalAgent, set a default limit of 50 if current value is Infinity. - // Users can bypass this default by supplying their own Agent as part of SDK configuration. - Object.defineProperty(AWS.NodeHttpClient.sslAgent, "maxSockets", { - enumerable: true, - get: function () { - var defaultMaxSockets = 50; - var globalAgent = http.globalAgent; - if ( - globalAgent && - globalAgent.maxSockets !== Infinity && - typeof globalAgent.maxSockets === "number" - ) { - return globalAgent.maxSockets; - } - return defaultMaxSockets; - }, - }); - } - return AWS.NodeHttpClient.sslAgent; - } else { - if (!AWS.NodeHttpClient.agent) { - AWS.NodeHttpClient.agent = new http.Agent(agentOptions); - } - return AWS.NodeHttpClient.agent; - } + page: { + type: "integer" }, - - progressStream: function progressStream(stream, totalBytes) { - if (typeof TransformStream === "undefined") { - // for node 0.8 there is no streaming progress - return; - } - var loadedBytes = 0; - var reporter = new TransformStream(); - reporter._transform = function (chunk, encoding, callback) { - if (chunk) { - loadedBytes += chunk.length; - stream.emit("sendProgress", { - loaded: loadedBytes, - total: totalBytes, - }); - } - callback(null, chunk); - }; - return reporter; + per_page: { + type: "integer" }, - - emitter: null, - }); - - /** - * @!ignore - */ - - /** - * @api private - */ - AWS.HttpClient.prototype = AWS.NodeHttpClient.prototype; - - /** - * @api private - */ - AWS.HttpClient.streamsApiVersion = ReadableStream ? 2 : 1; - - /***/ + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/actions/jobs/:job_id/logs" }, - - /***/ 47495: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var util = __nccwpck_require__(77985); - - function JsonBuilder() {} - - JsonBuilder.prototype.build = function (value, shape) { - return JSON.stringify(translate(value, shape)); - }; - - function translate(value, shape) { - if (!shape || value === undefined || value === null) return undefined; - - switch (shape.type) { - case "structure": - return translateStructure(value, shape); - case "map": - return translateMap(value, shape); - case "list": - return translateList(value, shape); - default: - return translateScalar(value, shape); + listWorkflowRunArtifacts: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + }, + run_id: { + required: true, + type: "integer" } - } - - function translateStructure(structure, shape) { - var struct = {}; - util.each(structure, function (name, value) { - var memberShape = shape.members[name]; - if (memberShape) { - if (memberShape.location !== "body") return; - var locationName = memberShape.isLocationName - ? memberShape.name - : name; - var result = translate(value, memberShape); - if (result !== undefined) struct[locationName] = result; - } - }); - return struct; - } - - function translateList(list, shape) { - var out = []; - util.arrayEach(list, function (value) { - var result = translate(value, shape.member); - if (result !== undefined) out.push(result); - }); - return out; - } - - function translateMap(map, shape) { - var out = {}; - util.each(map, function (key, value) { - var result = translate(value, shape.value); - if (result !== undefined) out[key] = result; - }); - return out; - } - - function translateScalar(value, shape) { - return shape.toWireFormat(value); - } - - /** - * @api private - */ - module.exports = JsonBuilder; - - /***/ + }, + url: "/repos/:owner/:repo/actions/runs/:run_id/artifacts" + }, + listWorkflowRunLogs: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + }, + run_id: { + required: true, + type: "integer" + } + }, + url: "/repos/:owner/:repo/actions/runs/:run_id/logs" + }, + listWorkflowRuns: { + method: "GET", + params: { + actor: { + type: "string" + }, + branch: { + type: "string" + }, + event: { + type: "string" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + }, + status: { + enum: ["completed", "status", "conclusion"], + type: "string" + }, + workflow_id: { + required: true, + type: "integer" + } + }, + url: "/repos/:owner/:repo/actions/workflows/:workflow_id/runs" + }, + reRunWorkflow: { + method: "POST", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + run_id: { + required: true, + type: "integer" + } + }, + url: "/repos/:owner/:repo/actions/runs/:run_id/rerun" + }, + removeSelfHostedRunner: { + method: "DELETE", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + runner_id: { + required: true, + type: "integer" + } + }, + url: "/repos/:owner/:repo/actions/runners/:runner_id" + } + }, + activity: { + checkStarringRepo: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/user/starred/:owner/:repo" + }, + deleteRepoSubscription: { + method: "DELETE", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/subscription" + }, + deleteThreadSubscription: { + method: "DELETE", + params: { + thread_id: { + required: true, + type: "integer" + } + }, + url: "/notifications/threads/:thread_id/subscription" + }, + getRepoSubscription: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/subscription" + }, + getThread: { + method: "GET", + params: { + thread_id: { + required: true, + type: "integer" + } + }, + url: "/notifications/threads/:thread_id" + }, + getThreadSubscription: { + method: "GET", + params: { + thread_id: { + required: true, + type: "integer" + } + }, + url: "/notifications/threads/:thread_id/subscription" + }, + listEventsForOrg: { + method: "GET", + params: { + org: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + username: { + required: true, + type: "string" + } + }, + url: "/users/:username/events/orgs/:org" + }, + listEventsForUser: { + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + username: { + required: true, + type: "string" + } + }, + url: "/users/:username/events" + }, + listFeeds: { + method: "GET", + params: {}, + url: "/feeds" + }, + listNotifications: { + method: "GET", + params: { + all: { + type: "boolean" + }, + before: { + type: "string" + }, + page: { + type: "integer" + }, + participating: { + type: "boolean" + }, + per_page: { + type: "integer" + }, + since: { + type: "string" + } + }, + url: "/notifications" }, - - /***/ 5474: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var util = __nccwpck_require__(77985); - - function JsonParser() {} - - JsonParser.prototype.parse = function (value, shape) { - return translate(JSON.parse(value), shape); - }; - - function translate(value, shape) { - if (!shape || value === undefined) return undefined; - - switch (shape.type) { - case "structure": - return translateStructure(value, shape); - case "map": - return translateMap(value, shape); - case "list": - return translateList(value, shape); - default: - return translateScalar(value, shape); + listNotificationsForRepo: { + method: "GET", + params: { + all: { + type: "boolean" + }, + before: { + type: "string" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + participating: { + type: "boolean" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + }, + since: { + type: "string" } - } - - function translateStructure(structure, shape) { - if (structure == null) return undefined; - - var struct = {}; - var shapeMembers = shape.members; - util.each(shapeMembers, function (name, memberShape) { - var locationName = memberShape.isLocationName - ? memberShape.name - : name; - if (Object.prototype.hasOwnProperty.call(structure, locationName)) { - var value = structure[locationName]; - var result = translate(value, memberShape); - if (result !== undefined) struct[name] = result; - } - }); - return struct; - } - - function translateList(list, shape) { - if (list == null) return undefined; - - var out = []; - util.arrayEach(list, function (value) { - var result = translate(value, shape.member); - if (result === undefined) out.push(null); - else out.push(result); - }); - return out; - } - - function translateMap(map, shape) { - if (map == null) return undefined; - - var out = {}; - util.each(map, function (key, value) { - var result = translate(value, shape.value); - if (result === undefined) out[key] = null; - else out[key] = result; - }); - return out; - } - - function translateScalar(value, shape) { - return shape.toType(value); - } - - /** - * @api private - */ - module.exports = JsonParser; - - /***/ - }, - - /***/ 25768: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var AWS = __nccwpck_require__(28437); - __nccwpck_require__(1556); - var inherit = AWS.util.inherit; - - /** - * Represents a metadata service available on EC2 instances. Using the - * {request} method, you can receieve metadata about any available resource - * on the metadata service. - * - * You can disable the use of the IMDS by setting the AWS_EC2_METADATA_DISABLED - * environment variable to a truthy value. - * - * @!attribute [r] httpOptions - * @return [map] a map of options to pass to the underlying HTTP request: - * - * * **timeout** (Number) — a timeout value in milliseconds to wait - * before aborting the connection. Set to 0 for no timeout. - * - * @!macro nobrowser - */ - AWS.MetadataService = inherit({ - /** - * @return [String] the hostname of the instance metadata service - */ - host: "169.254.169.254", - - /** - * @!ignore - */ - - /** - * Default HTTP options. By default, the metadata service is set to not - * timeout on long requests. This means that on non-EC2 machines, this - * request will never return. If you are calling this operation from an - * environment that may not always run on EC2, set a `timeout` value so - * the SDK will abort the request after a given number of milliseconds. - */ - httpOptions: { timeout: 0 }, - - /** - * when enabled, metadata service will not fetch token - */ - disableFetchToken: false, - - /** - * Creates a new MetadataService object with a given set of options. - * - * @option options host [String] the hostname of the instance metadata - * service - * @option options httpOptions [map] a map of options to pass to the - * underlying HTTP request: - * - * * **timeout** (Number) — a timeout value in milliseconds to wait - * before aborting the connection. Set to 0 for no timeout. - * @option options maxRetries [Integer] the maximum number of retries to - * perform for timeout errors - * @option options retryDelayOptions [map] A set of options to configure the - * retry delay on retryable errors. See AWS.Config for details. - */ - constructor: function MetadataService(options) { - AWS.util.update(this, options); - }, - - /** - * Sends a request to the instance metadata service for a given resource. - * - * @param path [String] the path of the resource to get - * - * @param options [map] an optional map used to make request - * - * * **method** (String) — HTTP request method - * - * * **headers** (map) — a map of response header keys and their respective values - * - * @callback callback function(err, data) - * Called when a response is available from the service. - * @param err [Error, null] if an error occurred, this value will be set - * @param data [String, null] if the request was successful, the body of - * the response - */ - request: function request(path, options, callback) { - if (arguments.length === 2) { - callback = options; - options = {}; - } - - if (process.env[AWS.util.imdsDisabledEnv]) { - callback( - new Error("EC2 Instance Metadata Service access disabled") - ); - return; - } - - path = path || "/"; - var httpRequest = new AWS.HttpRequest("http://" + this.host + path); - httpRequest.method = options.method || "GET"; - if (options.headers) { - httpRequest.headers = options.headers; - } - AWS.util.handleRequestWithRetries(httpRequest, this, callback); - }, - - /** - * @api private - */ - loadCredentialsCallbacks: [], - - /** - * Fetches metadata token used for getting credentials - * - * @api private - * @callback callback function(err, token) - * Called when token is loaded from the resource - */ - fetchMetadataToken: function fetchMetadataToken(callback) { - var self = this; - var tokenFetchPath = "/latest/api/token"; - self.request( - tokenFetchPath, - { - method: "PUT", - headers: { - "x-aws-ec2-metadata-token-ttl-seconds": "21600", - }, - }, - callback - ); + }, + url: "/repos/:owner/:repo/notifications" + }, + listPublicEvents: { + method: "GET", + params: { + page: { + type: "integer" }, - - /** - * Fetches credentials - * - * @api private - * @callback cb function(err, creds) - * Called when credentials are loaded from the resource - */ - fetchCredentials: function fetchCredentials(options, cb) { - var self = this; - var basePath = "/latest/meta-data/iam/security-credentials/"; - - self.request(basePath, options, function (err, roleName) { - if (err) { - self.disableFetchToken = !(err.statusCode === 401); - cb( - AWS.util.error(err, { - message: "EC2 Metadata roleName request returned error", - }) - ); - return; - } - roleName = roleName.split("\n")[0]; // grab first (and only) role - self.request(basePath + roleName, options, function ( - credErr, - credData - ) { - if (credErr) { - self.disableFetchToken = !(credErr.statusCode === 401); - cb( - AWS.util.error(credErr, { - message: "EC2 Metadata creds request returned error", - }) - ); - return; - } - try { - var credentials = JSON.parse(credData); - cb(null, credentials); - } catch (parseError) { - cb(parseError); - } - }); - }); + per_page: { + type: "integer" + } + }, + url: "/events" + }, + listPublicEventsForOrg: { + method: "GET", + params: { + org: { + required: true, + type: "string" }, - - /** - * Loads a set of credentials stored in the instance metadata service - * - * @api private - * @callback callback function(err, credentials) - * Called when credentials are loaded from the resource - * @param err [Error] if an error occurred, this value will be set - * @param credentials [Object] the raw JSON object containing all - * metadata from the credentials resource - */ - loadCredentials: function loadCredentials(callback) { - var self = this; - self.loadCredentialsCallbacks.push(callback); - if (self.loadCredentialsCallbacks.length > 1) { - return; - } - - function callbacks(err, creds) { - var cb; - while ((cb = self.loadCredentialsCallbacks.shift()) !== undefined) { - cb(err, creds); - } - } - - if (self.disableFetchToken) { - self.fetchCredentials({}, callbacks); - } else { - self.fetchMetadataToken(function (tokenError, token) { - if (tokenError) { - if (tokenError.code === "TimeoutError") { - self.disableFetchToken = true; - } else if (tokenError.retryable === true) { - callbacks( - AWS.util.error(tokenError, { - message: "EC2 Metadata token request returned error", - }) - ); - return; - } else if (tokenError.statusCode === 400) { - callbacks( - AWS.util.error(tokenError, { - message: "EC2 Metadata token request returned 400", - }) - ); - return; - } - } - var options = {}; - if (token) { - options.headers = { - "x-aws-ec2-metadata-token": token, - }; - } - self.fetchCredentials(options, callbacks); - }); - } + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/orgs/:org/events" + }, + listPublicEventsForRepoNetwork: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/networks/:owner/:repo/events" + }, + listPublicEventsForUser: { + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + username: { + required: true, + type: "string" + } + }, + url: "/users/:username/events/public" + }, + listReceivedEventsForUser: { + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + username: { + required: true, + type: "string" + } + }, + url: "/users/:username/received_events" + }, + listReceivedPublicEventsForUser: { + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + username: { + required: true, + type: "string" + } + }, + url: "/users/:username/received_events/public" + }, + listRepoEvents: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/events" + }, + listReposStarredByAuthenticatedUser: { + method: "GET", + params: { + direction: { + enum: ["asc", "desc"], + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + sort: { + enum: ["created", "updated"], + type: "string" + } + }, + url: "/user/starred" + }, + listReposStarredByUser: { + method: "GET", + params: { + direction: { + enum: ["asc", "desc"], + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + sort: { + enum: ["created", "updated"], + type: "string" + }, + username: { + required: true, + type: "string" + } + }, + url: "/users/:username/starred" + }, + listReposWatchedByUser: { + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + username: { + required: true, + type: "string" + } + }, + url: "/users/:username/subscriptions" + }, + listStargazersForRepo: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/stargazers" + }, + listWatchedReposForAuthenticatedUser: { + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/user/subscriptions" + }, + listWatchersForRepo: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/subscribers" + }, + markAsRead: { + method: "PUT", + params: { + last_read_at: { + type: "string" + } + }, + url: "/notifications" + }, + markNotificationsAsReadForRepo: { + method: "PUT", + params: { + last_read_at: { + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/notifications" + }, + markThreadAsRead: { + method: "PATCH", + params: { + thread_id: { + required: true, + type: "integer" + } + }, + url: "/notifications/threads/:thread_id" + }, + setRepoSubscription: { + method: "PUT", + params: { + ignored: { + type: "boolean" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + subscribed: { + type: "boolean" + } + }, + url: "/repos/:owner/:repo/subscription" + }, + setThreadSubscription: { + method: "PUT", + params: { + ignored: { + type: "boolean" + }, + thread_id: { + required: true, + type: "integer" + } + }, + url: "/notifications/threads/:thread_id/subscription" + }, + starRepo: { + method: "PUT", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/user/starred/:owner/:repo" + }, + unstarRepo: { + method: "DELETE", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/user/starred/:owner/:repo" + } + }, + apps: { + addRepoToInstallation: { + headers: { + accept: "application/vnd.github.machine-man-preview+json" + }, + method: "PUT", + params: { + installation_id: { + required: true, + type: "integer" + }, + repository_id: { + required: true, + type: "integer" + } + }, + url: "/user/installations/:installation_id/repositories/:repository_id" + }, + checkAccountIsAssociatedWithAny: { + method: "GET", + params: { + account_id: { + required: true, + type: "integer" + } + }, + url: "/marketplace_listing/accounts/:account_id" + }, + checkAccountIsAssociatedWithAnyStubbed: { + method: "GET", + params: { + account_id: { + required: true, + type: "integer" + } + }, + url: "/marketplace_listing/stubbed/accounts/:account_id" + }, + checkAuthorization: { + deprecated: "octokit.apps.checkAuthorization() is deprecated, see https://developer.github.com/v3/apps/oauth_applications/#check-an-authorization", + method: "GET", + params: { + access_token: { + required: true, + type: "string" + }, + client_id: { + required: true, + type: "string" + } + }, + url: "/applications/:client_id/tokens/:access_token" + }, + checkToken: { + headers: { + accept: "application/vnd.github.doctor-strange-preview+json" + }, + method: "POST", + params: { + access_token: { + type: "string" + }, + client_id: { + required: true, + type: "string" + } + }, + url: "/applications/:client_id/token" + }, + createContentAttachment: { + headers: { + accept: "application/vnd.github.corsair-preview+json" + }, + method: "POST", + params: { + body: { + required: true, + type: "string" + }, + content_reference_id: { + required: true, + type: "integer" + }, + title: { + required: true, + type: "string" + } + }, + url: "/content_references/:content_reference_id/attachments" + }, + createFromManifest: { + headers: { + accept: "application/vnd.github.fury-preview+json" + }, + method: "POST", + params: { + code: { + required: true, + type: "string" + } + }, + url: "/app-manifests/:code/conversions" + }, + createInstallationToken: { + headers: { + accept: "application/vnd.github.machine-man-preview+json" + }, + method: "POST", + params: { + installation_id: { + required: true, + type: "integer" + }, + permissions: { + type: "object" + }, + repository_ids: { + type: "integer[]" + } + }, + url: "/app/installations/:installation_id/access_tokens" + }, + deleteAuthorization: { + headers: { + accept: "application/vnd.github.doctor-strange-preview+json" + }, + method: "DELETE", + params: { + access_token: { + type: "string" + }, + client_id: { + required: true, + type: "string" + } + }, + url: "/applications/:client_id/grant" + }, + deleteInstallation: { + headers: { + accept: "application/vnd.github.gambit-preview+json,application/vnd.github.machine-man-preview+json" + }, + method: "DELETE", + params: { + installation_id: { + required: true, + type: "integer" + } + }, + url: "/app/installations/:installation_id" + }, + deleteToken: { + headers: { + accept: "application/vnd.github.doctor-strange-preview+json" + }, + method: "DELETE", + params: { + access_token: { + type: "string" + }, + client_id: { + required: true, + type: "string" + } + }, + url: "/applications/:client_id/token" + }, + findOrgInstallation: { + deprecated: "octokit.apps.findOrgInstallation() has been renamed to octokit.apps.getOrgInstallation() (2019-04-10)", + headers: { + accept: "application/vnd.github.machine-man-preview+json" + }, + method: "GET", + params: { + org: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/installation" + }, + findRepoInstallation: { + deprecated: "octokit.apps.findRepoInstallation() has been renamed to octokit.apps.getRepoInstallation() (2019-04-10)", + headers: { + accept: "application/vnd.github.machine-man-preview+json" + }, + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/installation" + }, + findUserInstallation: { + deprecated: "octokit.apps.findUserInstallation() has been renamed to octokit.apps.getUserInstallation() (2019-04-10)", + headers: { + accept: "application/vnd.github.machine-man-preview+json" + }, + method: "GET", + params: { + username: { + required: true, + type: "string" + } + }, + url: "/users/:username/installation" + }, + getAuthenticated: { + headers: { + accept: "application/vnd.github.machine-man-preview+json" + }, + method: "GET", + params: {}, + url: "/app" + }, + getBySlug: { + headers: { + accept: "application/vnd.github.machine-man-preview+json" + }, + method: "GET", + params: { + app_slug: { + required: true, + type: "string" + } + }, + url: "/apps/:app_slug" + }, + getInstallation: { + headers: { + accept: "application/vnd.github.machine-man-preview+json" + }, + method: "GET", + params: { + installation_id: { + required: true, + type: "integer" + } + }, + url: "/app/installations/:installation_id" + }, + getOrgInstallation: { + headers: { + accept: "application/vnd.github.machine-man-preview+json" + }, + method: "GET", + params: { + org: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/installation" + }, + getRepoInstallation: { + headers: { + accept: "application/vnd.github.machine-man-preview+json" + }, + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/installation" + }, + getUserInstallation: { + headers: { + accept: "application/vnd.github.machine-man-preview+json" + }, + method: "GET", + params: { + username: { + required: true, + type: "string" + } + }, + url: "/users/:username/installation" + }, + listAccountsUserOrOrgOnPlan: { + method: "GET", + params: { + direction: { + enum: ["asc", "desc"], + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + plan_id: { + required: true, + type: "integer" + }, + sort: { + enum: ["created", "updated"], + type: "string" + } + }, + url: "/marketplace_listing/plans/:plan_id/accounts" + }, + listAccountsUserOrOrgOnPlanStubbed: { + method: "GET", + params: { + direction: { + enum: ["asc", "desc"], + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + plan_id: { + required: true, + type: "integer" + }, + sort: { + enum: ["created", "updated"], + type: "string" + } + }, + url: "/marketplace_listing/stubbed/plans/:plan_id/accounts" + }, + listInstallationReposForAuthenticatedUser: { + headers: { + accept: "application/vnd.github.machine-man-preview+json" + }, + method: "GET", + params: { + installation_id: { + required: true, + type: "integer" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/user/installations/:installation_id/repositories" + }, + listInstallations: { + headers: { + accept: "application/vnd.github.machine-man-preview+json" + }, + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/app/installations" + }, + listInstallationsForAuthenticatedUser: { + headers: { + accept: "application/vnd.github.machine-man-preview+json" + }, + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/user/installations" + }, + listMarketplacePurchasesForAuthenticatedUser: { + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/user/marketplace_purchases" + }, + listMarketplacePurchasesForAuthenticatedUserStubbed: { + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/user/marketplace_purchases/stubbed" + }, + listPlans: { + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/marketplace_listing/plans" + }, + listPlansStubbed: { + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/marketplace_listing/stubbed/plans" + }, + listRepos: { + headers: { + accept: "application/vnd.github.machine-man-preview+json" + }, + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/installation/repositories" + }, + removeRepoFromInstallation: { + headers: { + accept: "application/vnd.github.machine-man-preview+json" + }, + method: "DELETE", + params: { + installation_id: { + required: true, + type: "integer" + }, + repository_id: { + required: true, + type: "integer" + } + }, + url: "/user/installations/:installation_id/repositories/:repository_id" + }, + resetAuthorization: { + deprecated: "octokit.apps.resetAuthorization() is deprecated, see https://developer.github.com/v3/apps/oauth_applications/#reset-an-authorization", + method: "POST", + params: { + access_token: { + required: true, + type: "string" + }, + client_id: { + required: true, + type: "string" + } + }, + url: "/applications/:client_id/tokens/:access_token" + }, + resetToken: { + headers: { + accept: "application/vnd.github.doctor-strange-preview+json" + }, + method: "PATCH", + params: { + access_token: { + type: "string" + }, + client_id: { + required: true, + type: "string" + } + }, + url: "/applications/:client_id/token" + }, + revokeAuthorizationForApplication: { + deprecated: "octokit.apps.revokeAuthorizationForApplication() is deprecated, see https://developer.github.com/v3/apps/oauth_applications/#revoke-an-authorization-for-an-application", + method: "DELETE", + params: { + access_token: { + required: true, + type: "string" + }, + client_id: { + required: true, + type: "string" + } + }, + url: "/applications/:client_id/tokens/:access_token" + }, + revokeGrantForApplication: { + deprecated: "octokit.apps.revokeGrantForApplication() is deprecated, see https://developer.github.com/v3/apps/oauth_applications/#revoke-a-grant-for-an-application", + method: "DELETE", + params: { + access_token: { + required: true, + type: "string" + }, + client_id: { + required: true, + type: "string" + } + }, + url: "/applications/:client_id/grants/:access_token" + }, + revokeInstallationToken: { + headers: { + accept: "application/vnd.github.gambit-preview+json" + }, + method: "DELETE", + params: {}, + url: "/installation/token" + } + }, + checks: { + create: { + headers: { + accept: "application/vnd.github.antiope-preview+json" + }, + method: "POST", + params: { + actions: { + type: "object[]" + }, + "actions[].description": { + required: true, + type: "string" + }, + "actions[].identifier": { + required: true, + type: "string" + }, + "actions[].label": { + required: true, + type: "string" + }, + completed_at: { + type: "string" + }, + conclusion: { + enum: ["success", "failure", "neutral", "cancelled", "timed_out", "action_required"], + type: "string" + }, + details_url: { + type: "string" + }, + external_id: { + type: "string" + }, + head_sha: { + required: true, + type: "string" + }, + name: { + required: true, + type: "string" + }, + output: { + type: "object" + }, + "output.annotations": { + type: "object[]" + }, + "output.annotations[].annotation_level": { + enum: ["notice", "warning", "failure"], + required: true, + type: "string" + }, + "output.annotations[].end_column": { + type: "integer" + }, + "output.annotations[].end_line": { + required: true, + type: "integer" + }, + "output.annotations[].message": { + required: true, + type: "string" + }, + "output.annotations[].path": { + required: true, + type: "string" + }, + "output.annotations[].raw_details": { + type: "string" + }, + "output.annotations[].start_column": { + type: "integer" + }, + "output.annotations[].start_line": { + required: true, + type: "integer" + }, + "output.annotations[].title": { + type: "string" + }, + "output.images": { + type: "object[]" + }, + "output.images[].alt": { + required: true, + type: "string" + }, + "output.images[].caption": { + type: "string" + }, + "output.images[].image_url": { + required: true, + type: "string" + }, + "output.summary": { + required: true, + type: "string" + }, + "output.text": { + type: "string" + }, + "output.title": { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + started_at: { + type: "string" + }, + status: { + enum: ["queued", "in_progress", "completed"], + type: "string" + } + }, + url: "/repos/:owner/:repo/check-runs" + }, + createSuite: { + headers: { + accept: "application/vnd.github.antiope-preview+json" + }, + method: "POST", + params: { + head_sha: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/check-suites" + }, + get: { + headers: { + accept: "application/vnd.github.antiope-preview+json" + }, + method: "GET", + params: { + check_run_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/check-runs/:check_run_id" + }, + getSuite: { + headers: { + accept: "application/vnd.github.antiope-preview+json" + }, + method: "GET", + params: { + check_suite_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/check-suites/:check_suite_id" + }, + listAnnotations: { + headers: { + accept: "application/vnd.github.antiope-preview+json" + }, + method: "GET", + params: { + check_run_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/check-runs/:check_run_id/annotations" + }, + listForRef: { + headers: { + accept: "application/vnd.github.antiope-preview+json" + }, + method: "GET", + params: { + check_name: { + type: "string" + }, + filter: { + enum: ["latest", "all"], + type: "string" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + ref: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + status: { + enum: ["queued", "in_progress", "completed"], + type: "string" + } + }, + url: "/repos/:owner/:repo/commits/:ref/check-runs" + }, + listForSuite: { + headers: { + accept: "application/vnd.github.antiope-preview+json" + }, + method: "GET", + params: { + check_name: { + type: "string" + }, + check_suite_id: { + required: true, + type: "integer" + }, + filter: { + enum: ["latest", "all"], + type: "string" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + }, + status: { + enum: ["queued", "in_progress", "completed"], + type: "string" + } + }, + url: "/repos/:owner/:repo/check-suites/:check_suite_id/check-runs" + }, + listSuitesForRef: { + headers: { + accept: "application/vnd.github.antiope-preview+json" + }, + method: "GET", + params: { + app_id: { + type: "integer" + }, + check_name: { + type: "string" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + ref: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/commits/:ref/check-suites" + }, + rerequestSuite: { + headers: { + accept: "application/vnd.github.antiope-preview+json" + }, + method: "POST", + params: { + check_suite_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/check-suites/:check_suite_id/rerequest" + }, + setSuitesPreferences: { + headers: { + accept: "application/vnd.github.antiope-preview+json" + }, + method: "PATCH", + params: { + auto_trigger_checks: { + type: "object[]" + }, + "auto_trigger_checks[].app_id": { + required: true, + type: "integer" + }, + "auto_trigger_checks[].setting": { + required: true, + type: "boolean" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/check-suites/preferences" + }, + update: { + headers: { + accept: "application/vnd.github.antiope-preview+json" + }, + method: "PATCH", + params: { + actions: { + type: "object[]" + }, + "actions[].description": { + required: true, + type: "string" + }, + "actions[].identifier": { + required: true, + type: "string" + }, + "actions[].label": { + required: true, + type: "string" + }, + check_run_id: { + required: true, + type: "integer" + }, + completed_at: { + type: "string" + }, + conclusion: { + enum: ["success", "failure", "neutral", "cancelled", "timed_out", "action_required"], + type: "string" + }, + details_url: { + type: "string" + }, + external_id: { + type: "string" }, - }); - - /** - * @api private - */ - module.exports = AWS.MetadataService; - - /***/ + name: { + type: "string" + }, + output: { + type: "object" + }, + "output.annotations": { + type: "object[]" + }, + "output.annotations[].annotation_level": { + enum: ["notice", "warning", "failure"], + required: true, + type: "string" + }, + "output.annotations[].end_column": { + type: "integer" + }, + "output.annotations[].end_line": { + required: true, + type: "integer" + }, + "output.annotations[].message": { + required: true, + type: "string" + }, + "output.annotations[].path": { + required: true, + type: "string" + }, + "output.annotations[].raw_details": { + type: "string" + }, + "output.annotations[].start_column": { + type: "integer" + }, + "output.annotations[].start_line": { + required: true, + type: "integer" + }, + "output.annotations[].title": { + type: "string" + }, + "output.images": { + type: "object[]" + }, + "output.images[].alt": { + required: true, + type: "string" + }, + "output.images[].caption": { + type: "string" + }, + "output.images[].image_url": { + required: true, + type: "string" + }, + "output.summary": { + required: true, + type: "string" + }, + "output.text": { + type: "string" + }, + "output.title": { + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + started_at: { + type: "string" + }, + status: { + enum: ["queued", "in_progress", "completed"], + type: "string" + } + }, + url: "/repos/:owner/:repo/check-runs/:check_run_id" + } + }, + codesOfConduct: { + getConductCode: { + headers: { + accept: "application/vnd.github.scarlet-witch-preview+json" + }, + method: "GET", + params: { + key: { + required: true, + type: "string" + } + }, + url: "/codes_of_conduct/:key" + }, + getForRepo: { + headers: { + accept: "application/vnd.github.scarlet-witch-preview+json" + }, + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/community/code_of_conduct" + }, + listConductCodes: { + headers: { + accept: "application/vnd.github.scarlet-witch-preview+json" + }, + method: "GET", + params: {}, + url: "/codes_of_conduct" + } + }, + emojis: { + get: { + method: "GET", + params: {}, + url: "/emojis" + } + }, + gists: { + checkIsStarred: { + method: "GET", + params: { + gist_id: { + required: true, + type: "string" + } + }, + url: "/gists/:gist_id/star" + }, + create: { + method: "POST", + params: { + description: { + type: "string" + }, + files: { + required: true, + type: "object" + }, + "files.content": { + type: "string" + }, + public: { + type: "boolean" + } + }, + url: "/gists" + }, + createComment: { + method: "POST", + params: { + body: { + required: true, + type: "string" + }, + gist_id: { + required: true, + type: "string" + } + }, + url: "/gists/:gist_id/comments" + }, + delete: { + method: "DELETE", + params: { + gist_id: { + required: true, + type: "string" + } + }, + url: "/gists/:gist_id" + }, + deleteComment: { + method: "DELETE", + params: { + comment_id: { + required: true, + type: "integer" + }, + gist_id: { + required: true, + type: "string" + } + }, + url: "/gists/:gist_id/comments/:comment_id" + }, + fork: { + method: "POST", + params: { + gist_id: { + required: true, + type: "string" + } + }, + url: "/gists/:gist_id/forks" + }, + get: { + method: "GET", + params: { + gist_id: { + required: true, + type: "string" + } + }, + url: "/gists/:gist_id" + }, + getComment: { + method: "GET", + params: { + comment_id: { + required: true, + type: "integer" + }, + gist_id: { + required: true, + type: "string" + } + }, + url: "/gists/:gist_id/comments/:comment_id" + }, + getRevision: { + method: "GET", + params: { + gist_id: { + required: true, + type: "string" + }, + sha: { + required: true, + type: "string" + } + }, + url: "/gists/:gist_id/:sha" + }, + list: { + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + since: { + type: "string" + } + }, + url: "/gists" + }, + listComments: { + method: "GET", + params: { + gist_id: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/gists/:gist_id/comments" + }, + listCommits: { + method: "GET", + params: { + gist_id: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/gists/:gist_id/commits" + }, + listForks: { + method: "GET", + params: { + gist_id: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/gists/:gist_id/forks" + }, + listPublic: { + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + since: { + type: "string" + } + }, + url: "/gists/public" + }, + listPublicForUser: { + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + since: { + type: "string" + }, + username: { + required: true, + type: "string" + } + }, + url: "/users/:username/gists" + }, + listStarred: { + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + since: { + type: "string" + } + }, + url: "/gists/starred" + }, + star: { + method: "PUT", + params: { + gist_id: { + required: true, + type: "string" + } + }, + url: "/gists/:gist_id/star" }, - - /***/ 17657: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var Collection = __nccwpck_require__(71965); - var Operation = __nccwpck_require__(28083); - var Shape = __nccwpck_require__(71349); - var Paginator = __nccwpck_require__(45938); - var ResourceWaiter = __nccwpck_require__(41368); - var metadata = __nccwpck_require__(17752); - - var util = __nccwpck_require__(77985); - var property = util.property; - var memoizedProperty = util.memoizedProperty; - - function Api(api, options) { - var self = this; - api = api || {}; - options = options || {}; - options.api = this; - - api.metadata = api.metadata || {}; - - var serviceIdentifier = options.serviceIdentifier; - delete options.serviceIdentifier; - - property(this, "isApi", true, false); - property(this, "apiVersion", api.metadata.apiVersion); - property(this, "endpointPrefix", api.metadata.endpointPrefix); - property(this, "signingName", api.metadata.signingName); - property(this, "globalEndpoint", api.metadata.globalEndpoint); - property(this, "signatureVersion", api.metadata.signatureVersion); - property(this, "jsonVersion", api.metadata.jsonVersion); - property(this, "targetPrefix", api.metadata.targetPrefix); - property(this, "protocol", api.metadata.protocol); - property(this, "timestampFormat", api.metadata.timestampFormat); - property(this, "xmlNamespaceUri", api.metadata.xmlNamespace); - property(this, "abbreviation", api.metadata.serviceAbbreviation); - property(this, "fullName", api.metadata.serviceFullName); - property(this, "serviceId", api.metadata.serviceId); - if (serviceIdentifier && metadata[serviceIdentifier]) { - property( - this, - "xmlNoDefaultLists", - metadata[serviceIdentifier].xmlNoDefaultLists, - false - ); + unstar: { + method: "DELETE", + params: { + gist_id: { + required: true, + type: "string" + } + }, + url: "/gists/:gist_id/star" + }, + update: { + method: "PATCH", + params: { + description: { + type: "string" + }, + files: { + type: "object" + }, + "files.content": { + type: "string" + }, + "files.filename": { + type: "string" + }, + gist_id: { + required: true, + type: "string" } - - memoizedProperty(this, "className", function () { - var name = - api.metadata.serviceAbbreviation || api.metadata.serviceFullName; - if (!name) return null; - - name = name.replace(/^Amazon|AWS\s*|\(.*|\s+|\W+/g, ""); - if (name === "ElasticLoadBalancing") name = "ELB"; - return name; - }); - - function addEndpointOperation(name, operation) { - if (operation.endpointoperation === true) { - property(self, "endpointOperation", util.string.lowerFirst(name)); - } - if ( - operation.endpointdiscovery && - !self.hasRequiredEndpointDiscovery - ) { - property( - self, - "hasRequiredEndpointDiscovery", - operation.endpointdiscovery.required === true - ); - } + }, + url: "/gists/:gist_id" + }, + updateComment: { + method: "PATCH", + params: { + body: { + required: true, + type: "string" + }, + comment_id: { + required: true, + type: "integer" + }, + gist_id: { + required: true, + type: "string" } - - property( - this, - "operations", - new Collection( - api.operations, - options, - function (name, operation) { - return new Operation(name, operation, options); - }, - util.string.lowerFirst, - addEndpointOperation - ) - ); - - property( - this, - "shapes", - new Collection(api.shapes, options, function (name, shape) { - return Shape.create(shape, options); - }) - ); - - property( - this, - "paginators", - new Collection(api.paginators, options, function (name, paginator) { - return new Paginator(name, paginator, options); - }) - ); - - property( - this, - "waiters", - new Collection( - api.waiters, - options, - function (name, waiter) { - return new ResourceWaiter(name, waiter, options); - }, - util.string.lowerFirst - ) - ); - - if (options.documentation) { - property(this, "documentation", api.documentation); - property(this, "documentationUrl", api.documentationUrl); + }, + url: "/gists/:gist_id/comments/:comment_id" + } + }, + git: { + createBlob: { + method: "POST", + params: { + content: { + required: true, + type: "string" + }, + encoding: { + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/git/blobs" + }, + createCommit: { + method: "POST", + params: { + author: { + type: "object" + }, + "author.date": { + type: "string" + }, + "author.email": { + type: "string" + }, + "author.name": { + type: "string" + }, + committer: { + type: "object" + }, + "committer.date": { + type: "string" + }, + "committer.email": { + type: "string" + }, + "committer.name": { + type: "string" + }, + message: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + parents: { + required: true, + type: "string[]" + }, + repo: { + required: true, + type: "string" + }, + signature: { + type: "string" + }, + tree: { + required: true, + type: "string" } - } - - /** - * @api private - */ - module.exports = Api; - - /***/ + }, + url: "/repos/:owner/:repo/git/commits" + }, + createRef: { + method: "POST", + params: { + owner: { + required: true, + type: "string" + }, + ref: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + sha: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/git/refs" }, - - /***/ 71965: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var memoizedProperty = __nccwpck_require__(77985).memoizedProperty; - - function memoize(name, value, factory, nameTr) { - memoizedProperty(this, nameTr(name), function () { - return factory(name, value); - }); - } - - function Collection(iterable, options, factory, nameTr, callback) { - nameTr = nameTr || String; - var self = this; - - for (var id in iterable) { - if (Object.prototype.hasOwnProperty.call(iterable, id)) { - memoize.call(self, id, iterable[id], factory, nameTr); - if (callback) callback(id, iterable[id]); - } + createTag: { + method: "POST", + params: { + message: { + required: true, + type: "string" + }, + object: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + tag: { + required: true, + type: "string" + }, + tagger: { + type: "object" + }, + "tagger.date": { + type: "string" + }, + "tagger.email": { + type: "string" + }, + "tagger.name": { + type: "string" + }, + type: { + enum: ["commit", "tree", "blob"], + required: true, + type: "string" } - } - - /** - * @api private - */ - module.exports = Collection; - - /***/ + }, + url: "/repos/:owner/:repo/git/tags" }, - - /***/ 28083: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var Shape = __nccwpck_require__(71349); - - var util = __nccwpck_require__(77985); - var property = util.property; - var memoizedProperty = util.memoizedProperty; - - function Operation(name, operation, options) { - var self = this; - options = options || {}; - - property(this, "name", operation.name || name); - property(this, "api", options.api, false); - - operation.http = operation.http || {}; - property(this, "endpoint", operation.endpoint); - property(this, "httpMethod", operation.http.method || "POST"); - property(this, "httpPath", operation.http.requestUri || "/"); - property(this, "authtype", operation.authtype || ""); - property( - this, - "endpointDiscoveryRequired", - operation.endpointdiscovery - ? operation.endpointdiscovery.required - ? "REQUIRED" - : "OPTIONAL" - : "NULL" - ); - - memoizedProperty(this, "input", function () { - if (!operation.input) { - return new Shape.create({ type: "structure" }, options); - } - return Shape.create(operation.input, options); - }); - - memoizedProperty(this, "output", function () { - if (!operation.output) { - return new Shape.create({ type: "structure" }, options); - } - return Shape.create(operation.output, options); - }); - - memoizedProperty(this, "errors", function () { - var list = []; - if (!operation.errors) return null; - - for (var i = 0; i < operation.errors.length; i++) { - list.push(Shape.create(operation.errors[i], options)); - } - - return list; - }); - - memoizedProperty(this, "paginator", function () { - return options.api.paginators[name]; - }); - - if (options.documentation) { - property(this, "documentation", operation.documentation); - property(this, "documentationUrl", operation.documentationUrl); + createTree: { + method: "POST", + params: { + base_tree: { + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + tree: { + required: true, + type: "object[]" + }, + "tree[].content": { + type: "string" + }, + "tree[].mode": { + enum: ["100644", "100755", "040000", "160000", "120000"], + type: "string" + }, + "tree[].path": { + type: "string" + }, + "tree[].sha": { + allowNull: true, + type: "string" + }, + "tree[].type": { + enum: ["blob", "tree", "commit"], + type: "string" + } + }, + url: "/repos/:owner/:repo/git/trees" + }, + deleteRef: { + method: "DELETE", + params: { + owner: { + required: true, + type: "string" + }, + ref: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/git/refs/:ref" + }, + getBlob: { + method: "GET", + params: { + file_sha: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/git/blobs/:file_sha" + }, + getCommit: { + method: "GET", + params: { + commit_sha: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/git/commits/:commit_sha" + }, + getRef: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + ref: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/git/ref/:ref" + }, + getTag: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + tag_sha: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/git/tags/:tag_sha" + }, + getTree: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + recursive: { + enum: ["1"], + type: "integer" + }, + repo: { + required: true, + type: "string" + }, + tree_sha: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/git/trees/:tree_sha" + }, + listMatchingRefs: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + ref: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/git/matching-refs/:ref" + }, + listRefs: { + method: "GET", + params: { + namespace: { + type: "string" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/git/refs/:namespace" + }, + updateRef: { + method: "PATCH", + params: { + force: { + type: "boolean" + }, + owner: { + required: true, + type: "string" + }, + ref: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + sha: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/git/refs/:ref" + } + }, + gitignore: { + getTemplate: { + method: "GET", + params: { + name: { + required: true, + type: "string" + } + }, + url: "/gitignore/templates/:name" + }, + listTemplates: { + method: "GET", + params: {}, + url: "/gitignore/templates" + } + }, + interactions: { + addOrUpdateRestrictionsForOrg: { + headers: { + accept: "application/vnd.github.sombra-preview+json" + }, + method: "PUT", + params: { + limit: { + enum: ["existing_users", "contributors_only", "collaborators_only"], + required: true, + type: "string" + }, + org: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/interaction-limits" + }, + addOrUpdateRestrictionsForRepo: { + headers: { + accept: "application/vnd.github.sombra-preview+json" + }, + method: "PUT", + params: { + limit: { + enum: ["existing_users", "contributors_only", "collaborators_only"], + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/interaction-limits" + }, + getRestrictionsForOrg: { + headers: { + accept: "application/vnd.github.sombra-preview+json" + }, + method: "GET", + params: { + org: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/interaction-limits" + }, + getRestrictionsForRepo: { + headers: { + accept: "application/vnd.github.sombra-preview+json" + }, + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/interaction-limits" + }, + removeRestrictionsForOrg: { + headers: { + accept: "application/vnd.github.sombra-preview+json" + }, + method: "DELETE", + params: { + org: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/interaction-limits" + }, + removeRestrictionsForRepo: { + headers: { + accept: "application/vnd.github.sombra-preview+json" + }, + method: "DELETE", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/interaction-limits" + } + }, + issues: { + addAssignees: { + method: "POST", + params: { + assignees: { + type: "string[]" + }, + issue_number: { + required: true, + type: "integer" + }, + number: { + alias: "issue_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/issues/:issue_number/assignees" + }, + addLabels: { + method: "POST", + params: { + issue_number: { + required: true, + type: "integer" + }, + labels: { + required: true, + type: "string[]" + }, + number: { + alias: "issue_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/issues/:issue_number/labels" + }, + checkAssignee: { + method: "GET", + params: { + assignee: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/assignees/:assignee" + }, + create: { + method: "POST", + params: { + assignee: { + type: "string" + }, + assignees: { + type: "string[]" + }, + body: { + type: "string" + }, + labels: { + type: "string[]" + }, + milestone: { + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + title: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/issues" + }, + createComment: { + method: "POST", + params: { + body: { + required: true, + type: "string" + }, + issue_number: { + required: true, + type: "integer" + }, + number: { + alias: "issue_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/issues/:issue_number/comments" + }, + createLabel: { + method: "POST", + params: { + color: { + required: true, + type: "string" + }, + description: { + type: "string" + }, + name: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/labels" + }, + createMilestone: { + method: "POST", + params: { + description: { + type: "string" + }, + due_on: { + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + state: { + enum: ["open", "closed"], + type: "string" + }, + title: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/milestones" + }, + deleteComment: { + method: "DELETE", + params: { + comment_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/issues/comments/:comment_id" + }, + deleteLabel: { + method: "DELETE", + params: { + name: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/labels/:name" + }, + deleteMilestone: { + method: "DELETE", + params: { + milestone_number: { + required: true, + type: "integer" + }, + number: { + alias: "milestone_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/milestones/:milestone_number" + }, + get: { + method: "GET", + params: { + issue_number: { + required: true, + type: "integer" + }, + number: { + alias: "issue_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/issues/:issue_number" + }, + getComment: { + method: "GET", + params: { + comment_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/issues/comments/:comment_id" + }, + getEvent: { + method: "GET", + params: { + event_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/issues/events/:event_id" + }, + getLabel: { + method: "GET", + params: { + name: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/labels/:name" + }, + getMilestone: { + method: "GET", + params: { + milestone_number: { + required: true, + type: "integer" + }, + number: { + alias: "milestone_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/milestones/:milestone_number" + }, + list: { + method: "GET", + params: { + direction: { + enum: ["asc", "desc"], + type: "string" + }, + filter: { + enum: ["assigned", "created", "mentioned", "subscribed", "all"], + type: "string" + }, + labels: { + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + since: { + type: "string" + }, + sort: { + enum: ["created", "updated", "comments"], + type: "string" + }, + state: { + enum: ["open", "closed", "all"], + type: "string" + } + }, + url: "/issues" + }, + listAssignees: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/assignees" + }, + listComments: { + method: "GET", + params: { + issue_number: { + required: true, + type: "integer" + }, + number: { + alias: "issue_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + }, + since: { + type: "string" + } + }, + url: "/repos/:owner/:repo/issues/:issue_number/comments" + }, + listCommentsForRepo: { + method: "GET", + params: { + direction: { + enum: ["asc", "desc"], + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + since: { + type: "string" + }, + sort: { + enum: ["created", "updated"], + type: "string" + } + }, + url: "/repos/:owner/:repo/issues/comments" + }, + listEvents: { + method: "GET", + params: { + issue_number: { + required: true, + type: "integer" + }, + number: { + alias: "issue_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/issues/:issue_number/events" + }, + listEventsForRepo: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" } - - // idempotentMembers only tracks top-level input shapes - memoizedProperty(this, "idempotentMembers", function () { - var idempotentMembers = []; - var input = self.input; - var members = input.members; - if (!input.members) { - return idempotentMembers; - } - for (var name in members) { - if (!members.hasOwnProperty(name)) { - continue; - } - if (members[name].isIdempotent === true) { - idempotentMembers.push(name); - } - } - return idempotentMembers; - }); - - memoizedProperty(this, "hasEventOutput", function () { - var output = self.output; - return hasEventStream(output); - }); - } - - function hasEventStream(topLevelShape) { - var members = topLevelShape.members; - var payload = topLevelShape.payload; - - if (!topLevelShape.members) { - return false; + }, + url: "/repos/:owner/:repo/issues/events" + }, + listEventsForTimeline: { + headers: { + accept: "application/vnd.github.mockingbird-preview+json" + }, + method: "GET", + params: { + issue_number: { + required: true, + type: "integer" + }, + number: { + alias: "issue_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" } - - if (payload) { - var payloadMember = members[payload]; - return payloadMember.isEventStream; + }, + url: "/repos/:owner/:repo/issues/:issue_number/timeline" + }, + listForAuthenticatedUser: { + method: "GET", + params: { + direction: { + enum: ["asc", "desc"], + type: "string" + }, + filter: { + enum: ["assigned", "created", "mentioned", "subscribed", "all"], + type: "string" + }, + labels: { + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + since: { + type: "string" + }, + sort: { + enum: ["created", "updated", "comments"], + type: "string" + }, + state: { + enum: ["open", "closed", "all"], + type: "string" } - - // check if any member is an event stream - for (var name in members) { - if (!members.hasOwnProperty(name)) { - if (members[name].isEventStream === true) { - return true; - } - } + }, + url: "/user/issues" + }, + listForOrg: { + method: "GET", + params: { + direction: { + enum: ["asc", "desc"], + type: "string" + }, + filter: { + enum: ["assigned", "created", "mentioned", "subscribed", "all"], + type: "string" + }, + labels: { + type: "string" + }, + org: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + since: { + type: "string" + }, + sort: { + enum: ["created", "updated", "comments"], + type: "string" + }, + state: { + enum: ["open", "closed", "all"], + type: "string" } - return false; - } - - /** - * @api private - */ - module.exports = Operation; - - /***/ + }, + url: "/orgs/:org/issues" }, - - /***/ 45938: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var property = __nccwpck_require__(77985).property; - - function Paginator(name, paginator) { - property(this, "inputToken", paginator.input_token); - property(this, "limitKey", paginator.limit_key); - property(this, "moreResults", paginator.more_results); - property(this, "outputToken", paginator.output_token); - property(this, "resultKey", paginator.result_key); - } - - /** - * @api private - */ - module.exports = Paginator; - - /***/ + listForRepo: { + method: "GET", + params: { + assignee: { + type: "string" + }, + creator: { + type: "string" + }, + direction: { + enum: ["asc", "desc"], + type: "string" + }, + labels: { + type: "string" + }, + mentioned: { + type: "string" + }, + milestone: { + type: "string" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + }, + since: { + type: "string" + }, + sort: { + enum: ["created", "updated", "comments"], + type: "string" + }, + state: { + enum: ["open", "closed", "all"], + type: "string" + } + }, + url: "/repos/:owner/:repo/issues" }, - - /***/ 41368: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var util = __nccwpck_require__(77985); - var property = util.property; - - function ResourceWaiter(name, waiter, options) { - options = options || {}; - property(this, "name", name); - property(this, "api", options.api, false); - - if (waiter.operation) { - property(this, "operation", util.string.lowerFirst(waiter.operation)); + listLabelsForMilestone: { + method: "GET", + params: { + milestone_number: { + required: true, + type: "integer" + }, + number: { + alias: "milestone_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" } - - var self = this; - var keys = ["type", "description", "delay", "maxAttempts", "acceptors"]; - - keys.forEach(function (key) { - var value = waiter[key]; - if (value) { - property(self, key, value); - } - }); - } - - /** - * @api private - */ - module.exports = ResourceWaiter; - - /***/ + }, + url: "/repos/:owner/:repo/milestones/:milestone_number/labels" }, - - /***/ 71349: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var Collection = __nccwpck_require__(71965); - - var util = __nccwpck_require__(77985); - - function property(obj, name, value) { - if (value !== null && value !== undefined) { - util.property.apply(this, arguments); + listLabelsForRepo: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" } - } - - function memoizedProperty(obj, name) { - if (!obj.constructor.prototype[name]) { - util.memoizedProperty.apply(this, arguments); + }, + url: "/repos/:owner/:repo/labels" + }, + listLabelsOnIssue: { + method: "GET", + params: { + issue_number: { + required: true, + type: "integer" + }, + number: { + alias: "issue_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/issues/:issue_number/labels" + }, + listMilestonesForRepo: { + method: "GET", + params: { + direction: { + enum: ["asc", "desc"], + type: "string" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + }, + sort: { + enum: ["due_on", "completeness"], + type: "string" + }, + state: { + enum: ["open", "closed", "all"], + type: "string" + } + }, + url: "/repos/:owner/:repo/milestones" + }, + lock: { + method: "PUT", + params: { + issue_number: { + required: true, + type: "integer" + }, + lock_reason: { + enum: ["off-topic", "too heated", "resolved", "spam"], + type: "string" + }, + number: { + alias: "issue_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/issues/:issue_number/lock" + }, + removeAssignees: { + method: "DELETE", + params: { + assignees: { + type: "string[]" + }, + issue_number: { + required: true, + type: "integer" + }, + number: { + alias: "issue_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/issues/:issue_number/assignees" + }, + removeLabel: { + method: "DELETE", + params: { + issue_number: { + required: true, + type: "integer" + }, + name: { + required: true, + type: "string" + }, + number: { + alias: "issue_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/issues/:issue_number/labels/:name" + }, + removeLabels: { + method: "DELETE", + params: { + issue_number: { + required: true, + type: "integer" + }, + number: { + alias: "issue_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/issues/:issue_number/labels" + }, + replaceLabels: { + method: "PUT", + params: { + issue_number: { + required: true, + type: "integer" + }, + labels: { + type: "string[]" + }, + number: { + alias: "issue_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/issues/:issue_number/labels" + }, + unlock: { + method: "DELETE", + params: { + issue_number: { + required: true, + type: "integer" + }, + number: { + alias: "issue_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/issues/:issue_number/lock" + }, + update: { + method: "PATCH", + params: { + assignee: { + type: "string" + }, + assignees: { + type: "string[]" + }, + body: { + type: "string" + }, + issue_number: { + required: true, + type: "integer" + }, + labels: { + type: "string[]" + }, + milestone: { + allowNull: true, + type: "integer" + }, + number: { + alias: "issue_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + state: { + enum: ["open", "closed"], + type: "string" + }, + title: { + type: "string" + } + }, + url: "/repos/:owner/:repo/issues/:issue_number" + }, + updateComment: { + method: "PATCH", + params: { + body: { + required: true, + type: "string" + }, + comment_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/issues/comments/:comment_id" + }, + updateLabel: { + method: "PATCH", + params: { + color: { + type: "string" + }, + current_name: { + required: true, + type: "string" + }, + description: { + type: "string" + }, + name: { + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/labels/:current_name" + }, + updateMilestone: { + method: "PATCH", + params: { + description: { + type: "string" + }, + due_on: { + type: "string" + }, + milestone_number: { + required: true, + type: "integer" + }, + number: { + alias: "milestone_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + state: { + enum: ["open", "closed"], + type: "string" + }, + title: { + type: "string" + } + }, + url: "/repos/:owner/:repo/milestones/:milestone_number" + } + }, + licenses: { + get: { + method: "GET", + params: { + license: { + required: true, + type: "string" + } + }, + url: "/licenses/:license" + }, + getForRepo: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/license" + }, + list: { + deprecated: "octokit.licenses.list() has been renamed to octokit.licenses.listCommonlyUsed() (2019-03-05)", + method: "GET", + params: {}, + url: "/licenses" + }, + listCommonlyUsed: { + method: "GET", + params: {}, + url: "/licenses" + } + }, + markdown: { + render: { + method: "POST", + params: { + context: { + type: "string" + }, + mode: { + enum: ["markdown", "gfm"], + type: "string" + }, + text: { + required: true, + type: "string" + } + }, + url: "/markdown" + }, + renderRaw: { + headers: { + "content-type": "text/plain; charset=utf-8" + }, + method: "POST", + params: { + data: { + mapTo: "data", + required: true, + type: "string" + } + }, + url: "/markdown/raw" + } + }, + meta: { + get: { + method: "GET", + params: {}, + url: "/meta" + } + }, + migrations: { + cancelImport: { + method: "DELETE", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/import" + }, + deleteArchiveForAuthenticatedUser: { + headers: { + accept: "application/vnd.github.wyandotte-preview+json" + }, + method: "DELETE", + params: { + migration_id: { + required: true, + type: "integer" + } + }, + url: "/user/migrations/:migration_id/archive" + }, + deleteArchiveForOrg: { + headers: { + accept: "application/vnd.github.wyandotte-preview+json" + }, + method: "DELETE", + params: { + migration_id: { + required: true, + type: "integer" + }, + org: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/migrations/:migration_id/archive" + }, + downloadArchiveForOrg: { + headers: { + accept: "application/vnd.github.wyandotte-preview+json" + }, + method: "GET", + params: { + migration_id: { + required: true, + type: "integer" + }, + org: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/migrations/:migration_id/archive" + }, + getArchiveForAuthenticatedUser: { + headers: { + accept: "application/vnd.github.wyandotte-preview+json" + }, + method: "GET", + params: { + migration_id: { + required: true, + type: "integer" + } + }, + url: "/user/migrations/:migration_id/archive" + }, + getArchiveForOrg: { + deprecated: "octokit.migrations.getArchiveForOrg() has been renamed to octokit.migrations.downloadArchiveForOrg() (2020-01-27)", + headers: { + accept: "application/vnd.github.wyandotte-preview+json" + }, + method: "GET", + params: { + migration_id: { + required: true, + type: "integer" + }, + org: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/migrations/:migration_id/archive" + }, + getCommitAuthors: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + since: { + type: "string" + } + }, + url: "/repos/:owner/:repo/import/authors" + }, + getImportProgress: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/import" + }, + getLargeFiles: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/import/large_files" + }, + getStatusForAuthenticatedUser: { + headers: { + accept: "application/vnd.github.wyandotte-preview+json" + }, + method: "GET", + params: { + migration_id: { + required: true, + type: "integer" + } + }, + url: "/user/migrations/:migration_id" + }, + getStatusForOrg: { + headers: { + accept: "application/vnd.github.wyandotte-preview+json" + }, + method: "GET", + params: { + migration_id: { + required: true, + type: "integer" + }, + org: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/migrations/:migration_id" + }, + listForAuthenticatedUser: { + headers: { + accept: "application/vnd.github.wyandotte-preview+json" + }, + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/user/migrations" + }, + listForOrg: { + headers: { + accept: "application/vnd.github.wyandotte-preview+json" + }, + method: "GET", + params: { + org: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/orgs/:org/migrations" + }, + listReposForOrg: { + headers: { + accept: "application/vnd.github.wyandotte-preview+json" + }, + method: "GET", + params: { + migration_id: { + required: true, + type: "integer" + }, + org: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/orgs/:org/migrations/:migration_id/repositories" + }, + listReposForUser: { + headers: { + accept: "application/vnd.github.wyandotte-preview+json" + }, + method: "GET", + params: { + migration_id: { + required: true, + type: "integer" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/user/:migration_id/repositories" + }, + mapCommitAuthor: { + method: "PATCH", + params: { + author_id: { + required: true, + type: "integer" + }, + email: { + type: "string" + }, + name: { + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/import/authors/:author_id" + }, + setLfsPreference: { + method: "PATCH", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + use_lfs: { + enum: ["opt_in", "opt_out"], + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/import/lfs" + }, + startForAuthenticatedUser: { + method: "POST", + params: { + exclude_attachments: { + type: "boolean" + }, + lock_repositories: { + type: "boolean" + }, + repositories: { + required: true, + type: "string[]" + } + }, + url: "/user/migrations" + }, + startForOrg: { + method: "POST", + params: { + exclude_attachments: { + type: "boolean" + }, + lock_repositories: { + type: "boolean" + }, + org: { + required: true, + type: "string" + }, + repositories: { + required: true, + type: "string[]" + } + }, + url: "/orgs/:org/migrations" + }, + startImport: { + method: "PUT", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + tfvc_project: { + type: "string" + }, + vcs: { + enum: ["subversion", "git", "mercurial", "tfvc"], + type: "string" + }, + vcs_password: { + type: "string" + }, + vcs_url: { + required: true, + type: "string" + }, + vcs_username: { + type: "string" + } + }, + url: "/repos/:owner/:repo/import" + }, + unlockRepoForAuthenticatedUser: { + headers: { + accept: "application/vnd.github.wyandotte-preview+json" + }, + method: "DELETE", + params: { + migration_id: { + required: true, + type: "integer" + }, + repo_name: { + required: true, + type: "string" + } + }, + url: "/user/migrations/:migration_id/repos/:repo_name/lock" + }, + unlockRepoForOrg: { + headers: { + accept: "application/vnd.github.wyandotte-preview+json" + }, + method: "DELETE", + params: { + migration_id: { + required: true, + type: "integer" + }, + org: { + required: true, + type: "string" + }, + repo_name: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/migrations/:migration_id/repos/:repo_name/lock" + }, + updateImport: { + method: "PATCH", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + vcs_password: { + type: "string" + }, + vcs_username: { + type: "string" + } + }, + url: "/repos/:owner/:repo/import" + } + }, + oauthAuthorizations: { + checkAuthorization: { + deprecated: "octokit.oauthAuthorizations.checkAuthorization() has been renamed to octokit.apps.checkAuthorization() (2019-11-05)", + method: "GET", + params: { + access_token: { + required: true, + type: "string" + }, + client_id: { + required: true, + type: "string" + } + }, + url: "/applications/:client_id/tokens/:access_token" + }, + createAuthorization: { + deprecated: "octokit.oauthAuthorizations.createAuthorization() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#create-a-new-authorization", + method: "POST", + params: { + client_id: { + type: "string" + }, + client_secret: { + type: "string" + }, + fingerprint: { + type: "string" + }, + note: { + required: true, + type: "string" + }, + note_url: { + type: "string" + }, + scopes: { + type: "string[]" + } + }, + url: "/authorizations" + }, + deleteAuthorization: { + deprecated: "octokit.oauthAuthorizations.deleteAuthorization() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#delete-an-authorization", + method: "DELETE", + params: { + authorization_id: { + required: true, + type: "integer" + } + }, + url: "/authorizations/:authorization_id" + }, + deleteGrant: { + deprecated: "octokit.oauthAuthorizations.deleteGrant() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#delete-a-grant", + method: "DELETE", + params: { + grant_id: { + required: true, + type: "integer" + } + }, + url: "/applications/grants/:grant_id" + }, + getAuthorization: { + deprecated: "octokit.oauthAuthorizations.getAuthorization() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#get-a-single-authorization", + method: "GET", + params: { + authorization_id: { + required: true, + type: "integer" + } + }, + url: "/authorizations/:authorization_id" + }, + getGrant: { + deprecated: "octokit.oauthAuthorizations.getGrant() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#get-a-single-grant", + method: "GET", + params: { + grant_id: { + required: true, + type: "integer" + } + }, + url: "/applications/grants/:grant_id" + }, + getOrCreateAuthorizationForApp: { + deprecated: "octokit.oauthAuthorizations.getOrCreateAuthorizationForApp() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#get-or-create-an-authorization-for-a-specific-app", + method: "PUT", + params: { + client_id: { + required: true, + type: "string" + }, + client_secret: { + required: true, + type: "string" + }, + fingerprint: { + type: "string" + }, + note: { + type: "string" + }, + note_url: { + type: "string" + }, + scopes: { + type: "string[]" + } + }, + url: "/authorizations/clients/:client_id" + }, + getOrCreateAuthorizationForAppAndFingerprint: { + deprecated: "octokit.oauthAuthorizations.getOrCreateAuthorizationForAppAndFingerprint() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#get-or-create-an-authorization-for-a-specific-app-and-fingerprint", + method: "PUT", + params: { + client_id: { + required: true, + type: "string" + }, + client_secret: { + required: true, + type: "string" + }, + fingerprint: { + required: true, + type: "string" + }, + note: { + type: "string" + }, + note_url: { + type: "string" + }, + scopes: { + type: "string[]" + } + }, + url: "/authorizations/clients/:client_id/:fingerprint" + }, + getOrCreateAuthorizationForAppFingerprint: { + deprecated: "octokit.oauthAuthorizations.getOrCreateAuthorizationForAppFingerprint() has been renamed to octokit.oauthAuthorizations.getOrCreateAuthorizationForAppAndFingerprint() (2018-12-27)", + method: "PUT", + params: { + client_id: { + required: true, + type: "string" + }, + client_secret: { + required: true, + type: "string" + }, + fingerprint: { + required: true, + type: "string" + }, + note: { + type: "string" + }, + note_url: { + type: "string" + }, + scopes: { + type: "string[]" + } + }, + url: "/authorizations/clients/:client_id/:fingerprint" + }, + listAuthorizations: { + deprecated: "octokit.oauthAuthorizations.listAuthorizations() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#list-your-authorizations", + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/authorizations" + }, + listGrants: { + deprecated: "octokit.oauthAuthorizations.listGrants() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#list-your-grants", + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/applications/grants" + }, + resetAuthorization: { + deprecated: "octokit.oauthAuthorizations.resetAuthorization() has been renamed to octokit.apps.resetAuthorization() (2019-11-05)", + method: "POST", + params: { + access_token: { + required: true, + type: "string" + }, + client_id: { + required: true, + type: "string" + } + }, + url: "/applications/:client_id/tokens/:access_token" + }, + revokeAuthorizationForApplication: { + deprecated: "octokit.oauthAuthorizations.revokeAuthorizationForApplication() has been renamed to octokit.apps.revokeAuthorizationForApplication() (2019-11-05)", + method: "DELETE", + params: { + access_token: { + required: true, + type: "string" + }, + client_id: { + required: true, + type: "string" + } + }, + url: "/applications/:client_id/tokens/:access_token" + }, + revokeGrantForApplication: { + deprecated: "octokit.oauthAuthorizations.revokeGrantForApplication() has been renamed to octokit.apps.revokeGrantForApplication() (2019-11-05)", + method: "DELETE", + params: { + access_token: { + required: true, + type: "string" + }, + client_id: { + required: true, + type: "string" + } + }, + url: "/applications/:client_id/grants/:access_token" + }, + updateAuthorization: { + deprecated: "octokit.oauthAuthorizations.updateAuthorization() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#update-an-existing-authorization", + method: "PATCH", + params: { + add_scopes: { + type: "string[]" + }, + authorization_id: { + required: true, + type: "integer" + }, + fingerprint: { + type: "string" + }, + note: { + type: "string" + }, + note_url: { + type: "string" + }, + remove_scopes: { + type: "string[]" + }, + scopes: { + type: "string[]" + } + }, + url: "/authorizations/:authorization_id" + } + }, + orgs: { + addOrUpdateMembership: { + method: "PUT", + params: { + org: { + required: true, + type: "string" + }, + role: { + enum: ["admin", "member"], + type: "string" + }, + username: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/memberships/:username" + }, + blockUser: { + method: "PUT", + params: { + org: { + required: true, + type: "string" + }, + username: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/blocks/:username" + }, + checkBlockedUser: { + method: "GET", + params: { + org: { + required: true, + type: "string" + }, + username: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/blocks/:username" + }, + checkMembership: { + method: "GET", + params: { + org: { + required: true, + type: "string" + }, + username: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/members/:username" + }, + checkPublicMembership: { + method: "GET", + params: { + org: { + required: true, + type: "string" + }, + username: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/public_members/:username" + }, + concealMembership: { + method: "DELETE", + params: { + org: { + required: true, + type: "string" + }, + username: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/public_members/:username" + }, + convertMemberToOutsideCollaborator: { + method: "PUT", + params: { + org: { + required: true, + type: "string" + }, + username: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/outside_collaborators/:username" + }, + createHook: { + method: "POST", + params: { + active: { + type: "boolean" + }, + config: { + required: true, + type: "object" + }, + "config.content_type": { + type: "string" + }, + "config.insecure_ssl": { + type: "string" + }, + "config.secret": { + type: "string" + }, + "config.url": { + required: true, + type: "string" + }, + events: { + type: "string[]" + }, + name: { + required: true, + type: "string" + }, + org: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/hooks" + }, + createInvitation: { + method: "POST", + params: { + email: { + type: "string" + }, + invitee_id: { + type: "integer" + }, + org: { + required: true, + type: "string" + }, + role: { + enum: ["admin", "direct_member", "billing_manager"], + type: "string" + }, + team_ids: { + type: "integer[]" + } + }, + url: "/orgs/:org/invitations" + }, + deleteHook: { + method: "DELETE", + params: { + hook_id: { + required: true, + type: "integer" + }, + org: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/hooks/:hook_id" + }, + get: { + method: "GET", + params: { + org: { + required: true, + type: "string" + } + }, + url: "/orgs/:org" + }, + getHook: { + method: "GET", + params: { + hook_id: { + required: true, + type: "integer" + }, + org: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/hooks/:hook_id" + }, + getMembership: { + method: "GET", + params: { + org: { + required: true, + type: "string" + }, + username: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/memberships/:username" + }, + getMembershipForAuthenticatedUser: { + method: "GET", + params: { + org: { + required: true, + type: "string" + } + }, + url: "/user/memberships/orgs/:org" + }, + list: { + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + since: { + type: "integer" + } + }, + url: "/organizations" + }, + listBlockedUsers: { + method: "GET", + params: { + org: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/blocks" + }, + listForAuthenticatedUser: { + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/user/orgs" + }, + listForUser: { + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + username: { + required: true, + type: "string" + } + }, + url: "/users/:username/orgs" + }, + listHooks: { + method: "GET", + params: { + org: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/orgs/:org/hooks" + }, + listInstallations: { + headers: { + accept: "application/vnd.github.machine-man-preview+json" + }, + method: "GET", + params: { + org: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/orgs/:org/installations" + }, + listInvitationTeams: { + method: "GET", + params: { + invitation_id: { + required: true, + type: "integer" + }, + org: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/orgs/:org/invitations/:invitation_id/teams" + }, + listMembers: { + method: "GET", + params: { + filter: { + enum: ["2fa_disabled", "all"], + type: "string" + }, + org: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + role: { + enum: ["all", "admin", "member"], + type: "string" + } + }, + url: "/orgs/:org/members" + }, + listMemberships: { + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + state: { + enum: ["active", "pending"], + type: "string" + } + }, + url: "/user/memberships/orgs" + }, + listOutsideCollaborators: { + method: "GET", + params: { + filter: { + enum: ["2fa_disabled", "all"], + type: "string" + }, + org: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/orgs/:org/outside_collaborators" + }, + listPendingInvitations: { + method: "GET", + params: { + org: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/orgs/:org/invitations" + }, + listPublicMembers: { + method: "GET", + params: { + org: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/orgs/:org/public_members" + }, + pingHook: { + method: "POST", + params: { + hook_id: { + required: true, + type: "integer" + }, + org: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/hooks/:hook_id/pings" + }, + publicizeMembership: { + method: "PUT", + params: { + org: { + required: true, + type: "string" + }, + username: { + required: true, + type: "string" } - } - - function Shape(shape, options, memberName) { - options = options || {}; - - property(this, "shape", shape.shape); - property(this, "api", options.api, false); - property(this, "type", shape.type); - property(this, "enum", shape.enum); - property(this, "min", shape.min); - property(this, "max", shape.max); - property(this, "pattern", shape.pattern); - property(this, "location", shape.location || this.location || "body"); - property( - this, - "name", - this.name || - shape.xmlName || - shape.queryName || - shape.locationName || - memberName - ); - property( - this, - "isStreaming", - shape.streaming || this.isStreaming || false - ); - property(this, "requiresLength", shape.requiresLength, false); - property(this, "isComposite", shape.isComposite || false); - property(this, "isShape", true, false); - property(this, "isQueryName", Boolean(shape.queryName), false); - property(this, "isLocationName", Boolean(shape.locationName), false); - property(this, "isIdempotent", shape.idempotencyToken === true); - property(this, "isJsonValue", shape.jsonvalue === true); - property( - this, - "isSensitive", - shape.sensitive === true || - (shape.prototype && shape.prototype.sensitive === true) - ); - property(this, "isEventStream", Boolean(shape.eventstream), false); - property(this, "isEvent", Boolean(shape.event), false); - property(this, "isEventPayload", Boolean(shape.eventpayload), false); - property(this, "isEventHeader", Boolean(shape.eventheader), false); - property( - this, - "isTimestampFormatSet", - Boolean(shape.timestampFormat) || - (shape.prototype && shape.prototype.isTimestampFormatSet === true), - false - ); - property( - this, - "endpointDiscoveryId", - Boolean(shape.endpointdiscoveryid), - false - ); - property(this, "hostLabel", Boolean(shape.hostLabel), false); - - if (options.documentation) { - property(this, "documentation", shape.documentation); - property(this, "documentationUrl", shape.documentationUrl); + }, + url: "/orgs/:org/public_members/:username" + }, + removeMember: { + method: "DELETE", + params: { + org: { + required: true, + type: "string" + }, + username: { + required: true, + type: "string" } - - if (shape.xmlAttribute) { - property(this, "isXmlAttribute", shape.xmlAttribute || false); + }, + url: "/orgs/:org/members/:username" + }, + removeMembership: { + method: "DELETE", + params: { + org: { + required: true, + type: "string" + }, + username: { + required: true, + type: "string" } - - // type conversion and parsing - property(this, "defaultValue", null); - this.toWireFormat = function (value) { - if (value === null || value === undefined) return ""; - return value; - }; - this.toType = function (value) { - return value; - }; - } - - /** - * @api private - */ - Shape.normalizedTypes = { - character: "string", - double: "float", - long: "integer", - short: "integer", - biginteger: "integer", - bigdecimal: "float", - blob: "binary", - }; - - /** - * @api private - */ - Shape.types = { - structure: StructureShape, - list: ListShape, - map: MapShape, - boolean: BooleanShape, - timestamp: TimestampShape, - float: FloatShape, - integer: IntegerShape, - string: StringShape, - base64: Base64Shape, - binary: BinaryShape, - }; - - Shape.resolve = function resolve(shape, options) { - if (shape.shape) { - var refShape = options.api.shapes[shape.shape]; - if (!refShape) { - throw new Error("Cannot find shape reference: " + shape.shape); - } - - return refShape; - } else { - return null; + }, + url: "/orgs/:org/memberships/:username" + }, + removeOutsideCollaborator: { + method: "DELETE", + params: { + org: { + required: true, + type: "string" + }, + username: { + required: true, + type: "string" } - }; - - Shape.create = function create(shape, options, memberName) { - if (shape.isShape) return shape; - - var refShape = Shape.resolve(shape, options); - if (refShape) { - var filteredKeys = Object.keys(shape); - if (!options.documentation) { - filteredKeys = filteredKeys.filter(function (name) { - return !name.match(/documentation/); - }); - } - - // create an inline shape with extra members - var InlineShape = function () { - refShape.constructor.call(this, shape, options, memberName); - }; - InlineShape.prototype = refShape; - return new InlineShape(); - } else { - // set type if not set - if (!shape.type) { - if (shape.members) shape.type = "structure"; - else if (shape.member) shape.type = "list"; - else if (shape.key) shape.type = "map"; - else shape.type = "string"; - } - - // normalize types - var origType = shape.type; - if (Shape.normalizedTypes[shape.type]) { - shape.type = Shape.normalizedTypes[shape.type]; - } - - if (Shape.types[shape.type]) { - return new Shape.types[shape.type](shape, options, memberName); - } else { - throw new Error("Unrecognized shape type: " + origType); - } + }, + url: "/orgs/:org/outside_collaborators/:username" + }, + unblockUser: { + method: "DELETE", + params: { + org: { + required: true, + type: "string" + }, + username: { + required: true, + type: "string" } - }; - - function CompositeShape(shape) { - Shape.apply(this, arguments); - property(this, "isComposite", true); - - if (shape.flattened) { - property(this, "flattened", shape.flattened || false); + }, + url: "/orgs/:org/blocks/:username" + }, + update: { + method: "PATCH", + params: { + billing_email: { + type: "string" + }, + company: { + type: "string" + }, + default_repository_permission: { + enum: ["read", "write", "admin", "none"], + type: "string" + }, + description: { + type: "string" + }, + email: { + type: "string" + }, + has_organization_projects: { + type: "boolean" + }, + has_repository_projects: { + type: "boolean" + }, + location: { + type: "string" + }, + members_allowed_repository_creation_type: { + enum: ["all", "private", "none"], + type: "string" + }, + members_can_create_internal_repositories: { + type: "boolean" + }, + members_can_create_private_repositories: { + type: "boolean" + }, + members_can_create_public_repositories: { + type: "boolean" + }, + members_can_create_repositories: { + type: "boolean" + }, + name: { + type: "string" + }, + org: { + required: true, + type: "string" + } + }, + url: "/orgs/:org" + }, + updateHook: { + method: "PATCH", + params: { + active: { + type: "boolean" + }, + config: { + type: "object" + }, + "config.content_type": { + type: "string" + }, + "config.insecure_ssl": { + type: "string" + }, + "config.secret": { + type: "string" + }, + "config.url": { + required: true, + type: "string" + }, + events: { + type: "string[]" + }, + hook_id: { + required: true, + type: "integer" + }, + org: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/hooks/:hook_id" + }, + updateMembership: { + method: "PATCH", + params: { + org: { + required: true, + type: "string" + }, + state: { + enum: ["active"], + required: true, + type: "string" + } + }, + url: "/user/memberships/orgs/:org" + } + }, + projects: { + addCollaborator: { + headers: { + accept: "application/vnd.github.inertia-preview+json" + }, + method: "PUT", + params: { + permission: { + enum: ["read", "write", "admin"], + type: "string" + }, + project_id: { + required: true, + type: "integer" + }, + username: { + required: true, + type: "string" + } + }, + url: "/projects/:project_id/collaborators/:username" + }, + createCard: { + headers: { + accept: "application/vnd.github.inertia-preview+json" + }, + method: "POST", + params: { + column_id: { + required: true, + type: "integer" + }, + content_id: { + type: "integer" + }, + content_type: { + type: "string" + }, + note: { + type: "string" + } + }, + url: "/projects/columns/:column_id/cards" + }, + createColumn: { + headers: { + accept: "application/vnd.github.inertia-preview+json" + }, + method: "POST", + params: { + name: { + required: true, + type: "string" + }, + project_id: { + required: true, + type: "integer" + } + }, + url: "/projects/:project_id/columns" + }, + createForAuthenticatedUser: { + headers: { + accept: "application/vnd.github.inertia-preview+json" + }, + method: "POST", + params: { + body: { + type: "string" + }, + name: { + required: true, + type: "string" + } + }, + url: "/user/projects" + }, + createForOrg: { + headers: { + accept: "application/vnd.github.inertia-preview+json" + }, + method: "POST", + params: { + body: { + type: "string" + }, + name: { + required: true, + type: "string" + }, + org: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/projects" + }, + createForRepo: { + headers: { + accept: "application/vnd.github.inertia-preview+json" + }, + method: "POST", + params: { + body: { + type: "string" + }, + name: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/projects" + }, + delete: { + headers: { + accept: "application/vnd.github.inertia-preview+json" + }, + method: "DELETE", + params: { + project_id: { + required: true, + type: "integer" + } + }, + url: "/projects/:project_id" + }, + deleteCard: { + headers: { + accept: "application/vnd.github.inertia-preview+json" + }, + method: "DELETE", + params: { + card_id: { + required: true, + type: "integer" + } + }, + url: "/projects/columns/cards/:card_id" + }, + deleteColumn: { + headers: { + accept: "application/vnd.github.inertia-preview+json" + }, + method: "DELETE", + params: { + column_id: { + required: true, + type: "integer" + } + }, + url: "/projects/columns/:column_id" + }, + get: { + headers: { + accept: "application/vnd.github.inertia-preview+json" + }, + method: "GET", + params: { + project_id: { + required: true, + type: "integer" + } + }, + url: "/projects/:project_id" + }, + getCard: { + headers: { + accept: "application/vnd.github.inertia-preview+json" + }, + method: "GET", + params: { + card_id: { + required: true, + type: "integer" + } + }, + url: "/projects/columns/cards/:card_id" + }, + getColumn: { + headers: { + accept: "application/vnd.github.inertia-preview+json" + }, + method: "GET", + params: { + column_id: { + required: true, + type: "integer" + } + }, + url: "/projects/columns/:column_id" + }, + listCards: { + headers: { + accept: "application/vnd.github.inertia-preview+json" + }, + method: "GET", + params: { + archived_state: { + enum: ["all", "archived", "not_archived"], + type: "string" + }, + column_id: { + required: true, + type: "integer" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/projects/columns/:column_id/cards" + }, + listCollaborators: { + headers: { + accept: "application/vnd.github.inertia-preview+json" + }, + method: "GET", + params: { + affiliation: { + enum: ["outside", "direct", "all"], + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + project_id: { + required: true, + type: "integer" + } + }, + url: "/projects/:project_id/collaborators" + }, + listColumns: { + headers: { + accept: "application/vnd.github.inertia-preview+json" + }, + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + project_id: { + required: true, + type: "integer" + } + }, + url: "/projects/:project_id/columns" + }, + listForOrg: { + headers: { + accept: "application/vnd.github.inertia-preview+json" + }, + method: "GET", + params: { + org: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + state: { + enum: ["open", "closed", "all"], + type: "string" + } + }, + url: "/orgs/:org/projects" + }, + listForRepo: { + headers: { + accept: "application/vnd.github.inertia-preview+json" + }, + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + }, + state: { + enum: ["open", "closed", "all"], + type: "string" + } + }, + url: "/repos/:owner/:repo/projects" + }, + listForUser: { + headers: { + accept: "application/vnd.github.inertia-preview+json" + }, + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + state: { + enum: ["open", "closed", "all"], + type: "string" + }, + username: { + required: true, + type: "string" + } + }, + url: "/users/:username/projects" + }, + moveCard: { + headers: { + accept: "application/vnd.github.inertia-preview+json" + }, + method: "POST", + params: { + card_id: { + required: true, + type: "integer" + }, + column_id: { + type: "integer" + }, + position: { + required: true, + type: "string", + validation: "^(top|bottom|after:\\d+)$" + } + }, + url: "/projects/columns/cards/:card_id/moves" + }, + moveColumn: { + headers: { + accept: "application/vnd.github.inertia-preview+json" + }, + method: "POST", + params: { + column_id: { + required: true, + type: "integer" + }, + position: { + required: true, + type: "string", + validation: "^(first|last|after:\\d+)$" + } + }, + url: "/projects/columns/:column_id/moves" + }, + removeCollaborator: { + headers: { + accept: "application/vnd.github.inertia-preview+json" + }, + method: "DELETE", + params: { + project_id: { + required: true, + type: "integer" + }, + username: { + required: true, + type: "string" + } + }, + url: "/projects/:project_id/collaborators/:username" + }, + reviewUserPermissionLevel: { + headers: { + accept: "application/vnd.github.inertia-preview+json" + }, + method: "GET", + params: { + project_id: { + required: true, + type: "integer" + }, + username: { + required: true, + type: "string" + } + }, + url: "/projects/:project_id/collaborators/:username/permission" + }, + update: { + headers: { + accept: "application/vnd.github.inertia-preview+json" + }, + method: "PATCH", + params: { + body: { + type: "string" + }, + name: { + type: "string" + }, + organization_permission: { + type: "string" + }, + private: { + type: "boolean" + }, + project_id: { + required: true, + type: "integer" + }, + state: { + enum: ["open", "closed"], + type: "string" + } + }, + url: "/projects/:project_id" + }, + updateCard: { + headers: { + accept: "application/vnd.github.inertia-preview+json" + }, + method: "PATCH", + params: { + archived: { + type: "boolean" + }, + card_id: { + required: true, + type: "integer" + }, + note: { + type: "string" + } + }, + url: "/projects/columns/cards/:card_id" + }, + updateColumn: { + headers: { + accept: "application/vnd.github.inertia-preview+json" + }, + method: "PATCH", + params: { + column_id: { + required: true, + type: "integer" + }, + name: { + required: true, + type: "string" + } + }, + url: "/projects/columns/:column_id" + } + }, + pulls: { + checkIfMerged: { + method: "GET", + params: { + number: { + alias: "pull_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + pull_number: { + required: true, + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/pulls/:pull_number/merge" + }, + create: { + method: "POST", + params: { + base: { + required: true, + type: "string" + }, + body: { + type: "string" + }, + draft: { + type: "boolean" + }, + head: { + required: true, + type: "string" + }, + maintainer_can_modify: { + type: "boolean" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + title: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/pulls" + }, + createComment: { + method: "POST", + params: { + body: { + required: true, + type: "string" + }, + commit_id: { + required: true, + type: "string" + }, + in_reply_to: { + deprecated: true, + description: "The comment ID to reply to. **Note**: This must be the ID of a top-level comment, not a reply to that comment. Replies to replies are not supported.", + type: "integer" + }, + line: { + type: "integer" + }, + number: { + alias: "pull_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + path: { + required: true, + type: "string" + }, + position: { + type: "integer" + }, + pull_number: { + required: true, + type: "integer" + }, + repo: { + required: true, + type: "string" + }, + side: { + enum: ["LEFT", "RIGHT"], + type: "string" + }, + start_line: { + type: "integer" + }, + start_side: { + enum: ["LEFT", "RIGHT", "side"], + type: "string" + } + }, + url: "/repos/:owner/:repo/pulls/:pull_number/comments" + }, + createCommentReply: { + deprecated: "octokit.pulls.createCommentReply() has been renamed to octokit.pulls.createComment() (2019-09-09)", + method: "POST", + params: { + body: { + required: true, + type: "string" + }, + commit_id: { + required: true, + type: "string" + }, + in_reply_to: { + deprecated: true, + description: "The comment ID to reply to. **Note**: This must be the ID of a top-level comment, not a reply to that comment. Replies to replies are not supported.", + type: "integer" + }, + line: { + type: "integer" + }, + number: { + alias: "pull_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + path: { + required: true, + type: "string" + }, + position: { + type: "integer" + }, + pull_number: { + required: true, + type: "integer" + }, + repo: { + required: true, + type: "string" + }, + side: { + enum: ["LEFT", "RIGHT"], + type: "string" + }, + start_line: { + type: "integer" + }, + start_side: { + enum: ["LEFT", "RIGHT", "side"], + type: "string" + } + }, + url: "/repos/:owner/:repo/pulls/:pull_number/comments" + }, + createFromIssue: { + deprecated: "octokit.pulls.createFromIssue() is deprecated, see https://developer.github.com/v3/pulls/#create-a-pull-request", + method: "POST", + params: { + base: { + required: true, + type: "string" + }, + draft: { + type: "boolean" + }, + head: { + required: true, + type: "string" + }, + issue: { + required: true, + type: "integer" + }, + maintainer_can_modify: { + type: "boolean" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/pulls" + }, + createReview: { + method: "POST", + params: { + body: { + type: "string" + }, + comments: { + type: "object[]" + }, + "comments[].body": { + required: true, + type: "string" + }, + "comments[].path": { + required: true, + type: "string" + }, + "comments[].position": { + required: true, + type: "integer" + }, + commit_id: { + type: "string" + }, + event: { + enum: ["APPROVE", "REQUEST_CHANGES", "COMMENT"], + type: "string" + }, + number: { + alias: "pull_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + pull_number: { + required: true, + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/pulls/:pull_number/reviews" + }, + createReviewCommentReply: { + method: "POST", + params: { + body: { + required: true, + type: "string" + }, + comment_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + pull_number: { + required: true, + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/pulls/:pull_number/comments/:comment_id/replies" + }, + createReviewRequest: { + method: "POST", + params: { + number: { + alias: "pull_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + pull_number: { + required: true, + type: "integer" + }, + repo: { + required: true, + type: "string" + }, + reviewers: { + type: "string[]" + }, + team_reviewers: { + type: "string[]" + } + }, + url: "/repos/:owner/:repo/pulls/:pull_number/requested_reviewers" + }, + deleteComment: { + method: "DELETE", + params: { + comment_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/pulls/comments/:comment_id" + }, + deletePendingReview: { + method: "DELETE", + params: { + number: { + alias: "pull_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + pull_number: { + required: true, + type: "integer" + }, + repo: { + required: true, + type: "string" + }, + review_id: { + required: true, + type: "integer" + } + }, + url: "/repos/:owner/:repo/pulls/:pull_number/reviews/:review_id" + }, + deleteReviewRequest: { + method: "DELETE", + params: { + number: { + alias: "pull_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + pull_number: { + required: true, + type: "integer" + }, + repo: { + required: true, + type: "string" + }, + reviewers: { + type: "string[]" + }, + team_reviewers: { + type: "string[]" + } + }, + url: "/repos/:owner/:repo/pulls/:pull_number/requested_reviewers" + }, + dismissReview: { + method: "PUT", + params: { + message: { + required: true, + type: "string" + }, + number: { + alias: "pull_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + pull_number: { + required: true, + type: "integer" + }, + repo: { + required: true, + type: "string" + }, + review_id: { + required: true, + type: "integer" + } + }, + url: "/repos/:owner/:repo/pulls/:pull_number/reviews/:review_id/dismissals" + }, + get: { + method: "GET", + params: { + number: { + alias: "pull_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + pull_number: { + required: true, + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/pulls/:pull_number" + }, + getComment: { + method: "GET", + params: { + comment_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/pulls/comments/:comment_id" + }, + getCommentsForReview: { + method: "GET", + params: { + number: { + alias: "pull_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + pull_number: { + required: true, + type: "integer" + }, + repo: { + required: true, + type: "string" + }, + review_id: { + required: true, + type: "integer" + } + }, + url: "/repos/:owner/:repo/pulls/:pull_number/reviews/:review_id/comments" + }, + getReview: { + method: "GET", + params: { + number: { + alias: "pull_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + pull_number: { + required: true, + type: "integer" + }, + repo: { + required: true, + type: "string" + }, + review_id: { + required: true, + type: "integer" + } + }, + url: "/repos/:owner/:repo/pulls/:pull_number/reviews/:review_id" + }, + list: { + method: "GET", + params: { + base: { + type: "string" + }, + direction: { + enum: ["asc", "desc"], + type: "string" + }, + head: { + type: "string" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + }, + sort: { + enum: ["created", "updated", "popularity", "long-running"], + type: "string" + }, + state: { + enum: ["open", "closed", "all"], + type: "string" } - } - - function StructureShape(shape, options) { - var self = this; - var requiredMap = null, - firstInit = !this.isShape; - - CompositeShape.apply(this, arguments); - - if (firstInit) { - property(this, "defaultValue", function () { - return {}; - }); - property(this, "members", {}); - property(this, "memberNames", []); - property(this, "required", []); - property(this, "isRequired", function () { - return false; - }); + }, + url: "/repos/:owner/:repo/pulls" + }, + listComments: { + method: "GET", + params: { + direction: { + enum: ["asc", "desc"], + type: "string" + }, + number: { + alias: "pull_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + pull_number: { + required: true, + type: "integer" + }, + repo: { + required: true, + type: "string" + }, + since: { + type: "string" + }, + sort: { + enum: ["created", "updated"], + type: "string" + } + }, + url: "/repos/:owner/:repo/pulls/:pull_number/comments" + }, + listCommentsForRepo: { + method: "GET", + params: { + direction: { + enum: ["asc", "desc"], + type: "string" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + }, + since: { + type: "string" + }, + sort: { + enum: ["created", "updated"], + type: "string" } - - if (shape.members) { - property( - this, - "members", - new Collection(shape.members, options, function (name, member) { - return Shape.create(member, options, name); - }) - ); - memoizedProperty(this, "memberNames", function () { - return shape.xmlOrder || Object.keys(shape.members); - }); - - if (shape.event) { - memoizedProperty(this, "eventPayloadMemberName", function () { - var members = self.members; - var memberNames = self.memberNames; - // iterate over members to find ones that are event payloads - for (var i = 0, iLen = memberNames.length; i < iLen; i++) { - if (members[memberNames[i]].isEventPayload) { - return memberNames[i]; - } - } - }); - - memoizedProperty(this, "eventHeaderMemberNames", function () { - var members = self.members; - var memberNames = self.memberNames; - var eventHeaderMemberNames = []; - // iterate over members to find ones that are event headers - for (var i = 0, iLen = memberNames.length; i < iLen; i++) { - if (members[memberNames[i]].isEventHeader) { - eventHeaderMemberNames.push(memberNames[i]); - } - } - return eventHeaderMemberNames; - }); - } + }, + url: "/repos/:owner/:repo/pulls/comments" + }, + listCommits: { + method: "GET", + params: { + number: { + alias: "pull_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + pull_number: { + required: true, + type: "integer" + }, + repo: { + required: true, + type: "string" } - - if (shape.required) { - property(this, "required", shape.required); - property( - this, - "isRequired", - function (name) { - if (!requiredMap) { - requiredMap = {}; - for (var i = 0; i < shape.required.length; i++) { - requiredMap[shape.required[i]] = true; - } - } - - return requiredMap[name]; - }, - false, - true - ); + }, + url: "/repos/:owner/:repo/pulls/:pull_number/commits" + }, + listFiles: { + method: "GET", + params: { + number: { + alias: "pull_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + pull_number: { + required: true, + type: "integer" + }, + repo: { + required: true, + type: "string" } - - property(this, "resultWrapper", shape.resultWrapper || null); - - if (shape.payload) { - property(this, "payload", shape.payload); + }, + url: "/repos/:owner/:repo/pulls/:pull_number/files" + }, + listReviewRequests: { + method: "GET", + params: { + number: { + alias: "pull_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + pull_number: { + required: true, + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/pulls/:pull_number/requested_reviewers" + }, + listReviews: { + method: "GET", + params: { + number: { + alias: "pull_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + pull_number: { + required: true, + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/pulls/:pull_number/reviews" + }, + merge: { + method: "PUT", + params: { + commit_message: { + type: "string" + }, + commit_title: { + type: "string" + }, + merge_method: { + enum: ["merge", "squash", "rebase"], + type: "string" + }, + number: { + alias: "pull_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + pull_number: { + required: true, + type: "integer" + }, + repo: { + required: true, + type: "string" + }, + sha: { + type: "string" + } + }, + url: "/repos/:owner/:repo/pulls/:pull_number/merge" + }, + submitReview: { + method: "POST", + params: { + body: { + type: "string" + }, + event: { + enum: ["APPROVE", "REQUEST_CHANGES", "COMMENT"], + required: true, + type: "string" + }, + number: { + alias: "pull_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + pull_number: { + required: true, + type: "integer" + }, + repo: { + required: true, + type: "string" + }, + review_id: { + required: true, + type: "integer" + } + }, + url: "/repos/:owner/:repo/pulls/:pull_number/reviews/:review_id/events" + }, + update: { + method: "PATCH", + params: { + base: { + type: "string" + }, + body: { + type: "string" + }, + maintainer_can_modify: { + type: "boolean" + }, + number: { + alias: "pull_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + pull_number: { + required: true, + type: "integer" + }, + repo: { + required: true, + type: "string" + }, + state: { + enum: ["open", "closed"], + type: "string" + }, + title: { + type: "string" + } + }, + url: "/repos/:owner/:repo/pulls/:pull_number" + }, + updateBranch: { + headers: { + accept: "application/vnd.github.lydian-preview+json" + }, + method: "PUT", + params: { + expected_head_sha: { + type: "string" + }, + owner: { + required: true, + type: "string" + }, + pull_number: { + required: true, + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/pulls/:pull_number/update-branch" + }, + updateComment: { + method: "PATCH", + params: { + body: { + required: true, + type: "string" + }, + comment_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/pulls/comments/:comment_id" + }, + updateReview: { + method: "PUT", + params: { + body: { + required: true, + type: "string" + }, + number: { + alias: "pull_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + pull_number: { + required: true, + type: "integer" + }, + repo: { + required: true, + type: "string" + }, + review_id: { + required: true, + type: "integer" + } + }, + url: "/repos/:owner/:repo/pulls/:pull_number/reviews/:review_id" + } + }, + rateLimit: { + get: { + method: "GET", + params: {}, + url: "/rate_limit" + } + }, + reactions: { + createForCommitComment: { + headers: { + accept: "application/vnd.github.squirrel-girl-preview+json" + }, + method: "POST", + params: { + comment_id: { + required: true, + type: "integer" + }, + content: { + enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"], + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/comments/:comment_id/reactions" + }, + createForIssue: { + headers: { + accept: "application/vnd.github.squirrel-girl-preview+json" + }, + method: "POST", + params: { + content: { + enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"], + required: true, + type: "string" + }, + issue_number: { + required: true, + type: "integer" + }, + number: { + alias: "issue_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/issues/:issue_number/reactions" + }, + createForIssueComment: { + headers: { + accept: "application/vnd.github.squirrel-girl-preview+json" + }, + method: "POST", + params: { + comment_id: { + required: true, + type: "integer" + }, + content: { + enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"], + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/issues/comments/:comment_id/reactions" + }, + createForPullRequestReviewComment: { + headers: { + accept: "application/vnd.github.squirrel-girl-preview+json" + }, + method: "POST", + params: { + comment_id: { + required: true, + type: "integer" + }, + content: { + enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"], + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/pulls/comments/:comment_id/reactions" + }, + createForTeamDiscussion: { + deprecated: "octokit.reactions.createForTeamDiscussion() has been renamed to octokit.reactions.createForTeamDiscussionLegacy() (2020-01-16)", + headers: { + accept: "application/vnd.github.squirrel-girl-preview+json" + }, + method: "POST", + params: { + content: { + enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"], + required: true, + type: "string" + }, + discussion_number: { + required: true, + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/discussions/:discussion_number/reactions" + }, + createForTeamDiscussionComment: { + deprecated: "octokit.reactions.createForTeamDiscussionComment() has been renamed to octokit.reactions.createForTeamDiscussionCommentLegacy() (2020-01-16)", + headers: { + accept: "application/vnd.github.squirrel-girl-preview+json" + }, + method: "POST", + params: { + comment_number: { + required: true, + type: "integer" + }, + content: { + enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"], + required: true, + type: "string" + }, + discussion_number: { + required: true, + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/discussions/:discussion_number/comments/:comment_number/reactions" + }, + createForTeamDiscussionCommentInOrg: { + headers: { + accept: "application/vnd.github.squirrel-girl-preview+json" + }, + method: "POST", + params: { + comment_number: { + required: true, + type: "integer" + }, + content: { + enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"], + required: true, + type: "string" + }, + discussion_number: { + required: true, + type: "integer" + }, + org: { + required: true, + type: "string" + }, + team_slug: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/teams/:team_slug/discussions/:discussion_number/comments/:comment_number/reactions" + }, + createForTeamDiscussionCommentLegacy: { + deprecated: "octokit.reactions.createForTeamDiscussionCommentLegacy() is deprecated, see https://developer.github.com/v3/reactions/#create-reaction-for-a-team-discussion-comment-legacy", + headers: { + accept: "application/vnd.github.squirrel-girl-preview+json" + }, + method: "POST", + params: { + comment_number: { + required: true, + type: "integer" + }, + content: { + enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"], + required: true, + type: "string" + }, + discussion_number: { + required: true, + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/discussions/:discussion_number/comments/:comment_number/reactions" + }, + createForTeamDiscussionInOrg: { + headers: { + accept: "application/vnd.github.squirrel-girl-preview+json" + }, + method: "POST", + params: { + content: { + enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"], + required: true, + type: "string" + }, + discussion_number: { + required: true, + type: "integer" + }, + org: { + required: true, + type: "string" + }, + team_slug: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/teams/:team_slug/discussions/:discussion_number/reactions" + }, + createForTeamDiscussionLegacy: { + deprecated: "octokit.reactions.createForTeamDiscussionLegacy() is deprecated, see https://developer.github.com/v3/reactions/#create-reaction-for-a-team-discussion-legacy", + headers: { + accept: "application/vnd.github.squirrel-girl-preview+json" + }, + method: "POST", + params: { + content: { + enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"], + required: true, + type: "string" + }, + discussion_number: { + required: true, + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/discussions/:discussion_number/reactions" + }, + delete: { + headers: { + accept: "application/vnd.github.squirrel-girl-preview+json" + }, + method: "DELETE", + params: { + reaction_id: { + required: true, + type: "integer" + } + }, + url: "/reactions/:reaction_id" + }, + listForCommitComment: { + headers: { + accept: "application/vnd.github.squirrel-girl-preview+json" + }, + method: "GET", + params: { + comment_id: { + required: true, + type: "integer" + }, + content: { + enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"], + type: "string" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/comments/:comment_id/reactions" + }, + listForIssue: { + headers: { + accept: "application/vnd.github.squirrel-girl-preview+json" + }, + method: "GET", + params: { + content: { + enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"], + type: "string" + }, + issue_number: { + required: true, + type: "integer" + }, + number: { + alias: "issue_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/issues/:issue_number/reactions" + }, + listForIssueComment: { + headers: { + accept: "application/vnd.github.squirrel-girl-preview+json" + }, + method: "GET", + params: { + comment_id: { + required: true, + type: "integer" + }, + content: { + enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"], + type: "string" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/issues/comments/:comment_id/reactions" + }, + listForPullRequestReviewComment: { + headers: { + accept: "application/vnd.github.squirrel-girl-preview+json" + }, + method: "GET", + params: { + comment_id: { + required: true, + type: "integer" + }, + content: { + enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"], + type: "string" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/pulls/comments/:comment_id/reactions" + }, + listForTeamDiscussion: { + deprecated: "octokit.reactions.listForTeamDiscussion() has been renamed to octokit.reactions.listForTeamDiscussionLegacy() (2020-01-16)", + headers: { + accept: "application/vnd.github.squirrel-girl-preview+json" + }, + method: "GET", + params: { + content: { + enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"], + type: "string" + }, + discussion_number: { + required: true, + type: "integer" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/discussions/:discussion_number/reactions" + }, + listForTeamDiscussionComment: { + deprecated: "octokit.reactions.listForTeamDiscussionComment() has been renamed to octokit.reactions.listForTeamDiscussionCommentLegacy() (2020-01-16)", + headers: { + accept: "application/vnd.github.squirrel-girl-preview+json" + }, + method: "GET", + params: { + comment_number: { + required: true, + type: "integer" + }, + content: { + enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"], + type: "string" + }, + discussion_number: { + required: true, + type: "integer" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/discussions/:discussion_number/comments/:comment_number/reactions" + }, + listForTeamDiscussionCommentInOrg: { + headers: { + accept: "application/vnd.github.squirrel-girl-preview+json" + }, + method: "GET", + params: { + comment_number: { + required: true, + type: "integer" + }, + content: { + enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"], + type: "string" + }, + discussion_number: { + required: true, + type: "integer" + }, + org: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + team_slug: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/teams/:team_slug/discussions/:discussion_number/comments/:comment_number/reactions" + }, + listForTeamDiscussionCommentLegacy: { + deprecated: "octokit.reactions.listForTeamDiscussionCommentLegacy() is deprecated, see https://developer.github.com/v3/reactions/#list-reactions-for-a-team-discussion-comment-legacy", + headers: { + accept: "application/vnd.github.squirrel-girl-preview+json" + }, + method: "GET", + params: { + comment_number: { + required: true, + type: "integer" + }, + content: { + enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"], + type: "string" + }, + discussion_number: { + required: true, + type: "integer" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/discussions/:discussion_number/comments/:comment_number/reactions" + }, + listForTeamDiscussionInOrg: { + headers: { + accept: "application/vnd.github.squirrel-girl-preview+json" + }, + method: "GET", + params: { + content: { + enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"], + type: "string" + }, + discussion_number: { + required: true, + type: "integer" + }, + org: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + team_slug: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/teams/:team_slug/discussions/:discussion_number/reactions" + }, + listForTeamDiscussionLegacy: { + deprecated: "octokit.reactions.listForTeamDiscussionLegacy() is deprecated, see https://developer.github.com/v3/reactions/#list-reactions-for-a-team-discussion-legacy", + headers: { + accept: "application/vnd.github.squirrel-girl-preview+json" + }, + method: "GET", + params: { + content: { + enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"], + type: "string" + }, + discussion_number: { + required: true, + type: "integer" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/discussions/:discussion_number/reactions" + } + }, + repos: { + acceptInvitation: { + method: "PATCH", + params: { + invitation_id: { + required: true, + type: "integer" + } + }, + url: "/user/repository_invitations/:invitation_id" + }, + addCollaborator: { + method: "PUT", + params: { + owner: { + required: true, + type: "string" + }, + permission: { + enum: ["pull", "push", "admin"], + type: "string" + }, + repo: { + required: true, + type: "string" + }, + username: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/collaborators/:username" + }, + addDeployKey: { + method: "POST", + params: { + key: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + read_only: { + type: "boolean" + }, + repo: { + required: true, + type: "string" + }, + title: { + type: "string" + } + }, + url: "/repos/:owner/:repo/keys" + }, + addProtectedBranchAdminEnforcement: { + method: "POST", + params: { + branch: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection/enforce_admins" + }, + addProtectedBranchAppRestrictions: { + method: "POST", + params: { + apps: { + mapTo: "data", + required: true, + type: "string[]" + }, + branch: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection/restrictions/apps" + }, + addProtectedBranchRequiredSignatures: { + headers: { + accept: "application/vnd.github.zzzax-preview+json" + }, + method: "POST", + params: { + branch: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection/required_signatures" + }, + addProtectedBranchRequiredStatusChecksContexts: { + method: "POST", + params: { + branch: { + required: true, + type: "string" + }, + contexts: { + mapTo: "data", + required: true, + type: "string[]" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection/required_status_checks/contexts" + }, + addProtectedBranchTeamRestrictions: { + method: "POST", + params: { + branch: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + teams: { + mapTo: "data", + required: true, + type: "string[]" } - - if (typeof shape.xmlNamespace === "string") { - property(this, "xmlNamespaceUri", shape.xmlNamespace); - } else if (typeof shape.xmlNamespace === "object") { - property(this, "xmlNamespacePrefix", shape.xmlNamespace.prefix); - property(this, "xmlNamespaceUri", shape.xmlNamespace.uri); + }, + url: "/repos/:owner/:repo/branches/:branch/protection/restrictions/teams" + }, + addProtectedBranchUserRestrictions: { + method: "POST", + params: { + branch: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + users: { + mapTo: "data", + required: true, + type: "string[]" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection/restrictions/users" + }, + checkCollaborator: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + username: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/collaborators/:username" + }, + checkVulnerabilityAlerts: { + headers: { + accept: "application/vnd.github.dorian-preview+json" + }, + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" } - } - - function ListShape(shape, options) { - var self = this, - firstInit = !this.isShape; - CompositeShape.apply(this, arguments); - - if (firstInit) { - property(this, "defaultValue", function () { - return []; - }); + }, + url: "/repos/:owner/:repo/vulnerability-alerts" + }, + compareCommits: { + method: "GET", + params: { + base: { + required: true, + type: "string" + }, + head: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/compare/:base...:head" + }, + createCommitComment: { + method: "POST", + params: { + body: { + required: true, + type: "string" + }, + commit_sha: { + required: true, + type: "string" + }, + line: { + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + path: { + type: "string" + }, + position: { + type: "integer" + }, + repo: { + required: true, + type: "string" + }, + sha: { + alias: "commit_sha", + deprecated: true, + type: "string" } - - if (shape.member) { - memoizedProperty(this, "member", function () { - return Shape.create(shape.member, options); - }); + }, + url: "/repos/:owner/:repo/commits/:commit_sha/comments" + }, + createDeployment: { + method: "POST", + params: { + auto_merge: { + type: "boolean" + }, + description: { + type: "string" + }, + environment: { + type: "string" + }, + owner: { + required: true, + type: "string" + }, + payload: { + type: "string" + }, + production_environment: { + type: "boolean" + }, + ref: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + required_contexts: { + type: "string[]" + }, + task: { + type: "string" + }, + transient_environment: { + type: "boolean" } - - if (this.flattened) { - var oldName = this.name; - memoizedProperty(this, "name", function () { - return self.member.name || oldName; - }); + }, + url: "/repos/:owner/:repo/deployments" + }, + createDeploymentStatus: { + method: "POST", + params: { + auto_inactive: { + type: "boolean" + }, + deployment_id: { + required: true, + type: "integer" + }, + description: { + type: "string" + }, + environment: { + enum: ["production", "staging", "qa"], + type: "string" + }, + environment_url: { + type: "string" + }, + log_url: { + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + state: { + enum: ["error", "failure", "inactive", "in_progress", "queued", "pending", "success"], + required: true, + type: "string" + }, + target_url: { + type: "string" } - } - - function MapShape(shape, options) { - var firstInit = !this.isShape; - CompositeShape.apply(this, arguments); - - if (firstInit) { - property(this, "defaultValue", function () { - return {}; - }); - property(this, "key", Shape.create({ type: "string" }, options)); - property(this, "value", Shape.create({ type: "string" }, options)); + }, + url: "/repos/:owner/:repo/deployments/:deployment_id/statuses" + }, + createDispatchEvent: { + method: "POST", + params: { + client_payload: { + type: "object" + }, + event_type: { + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" } - - if (shape.key) { - memoizedProperty(this, "key", function () { - return Shape.create(shape.key, options); - }); + }, + url: "/repos/:owner/:repo/dispatches" + }, + createFile: { + deprecated: "octokit.repos.createFile() has been renamed to octokit.repos.createOrUpdateFile() (2019-06-07)", + method: "PUT", + params: { + author: { + type: "object" + }, + "author.email": { + required: true, + type: "string" + }, + "author.name": { + required: true, + type: "string" + }, + branch: { + type: "string" + }, + committer: { + type: "object" + }, + "committer.email": { + required: true, + type: "string" + }, + "committer.name": { + required: true, + type: "string" + }, + content: { + required: true, + type: "string" + }, + message: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + path: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + sha: { + type: "string" } - if (shape.value) { - memoizedProperty(this, "value", function () { - return Shape.create(shape.value, options); - }); + }, + url: "/repos/:owner/:repo/contents/:path" + }, + createForAuthenticatedUser: { + method: "POST", + params: { + allow_merge_commit: { + type: "boolean" + }, + allow_rebase_merge: { + type: "boolean" + }, + allow_squash_merge: { + type: "boolean" + }, + auto_init: { + type: "boolean" + }, + delete_branch_on_merge: { + type: "boolean" + }, + description: { + type: "string" + }, + gitignore_template: { + type: "string" + }, + has_issues: { + type: "boolean" + }, + has_projects: { + type: "boolean" + }, + has_wiki: { + type: "boolean" + }, + homepage: { + type: "string" + }, + is_template: { + type: "boolean" + }, + license_template: { + type: "string" + }, + name: { + required: true, + type: "string" + }, + private: { + type: "boolean" + }, + team_id: { + type: "integer" + }, + visibility: { + enum: ["public", "private", "visibility", "internal"], + type: "string" } - } - - function TimestampShape(shape) { - var self = this; - Shape.apply(this, arguments); - - if (shape.timestampFormat) { - property(this, "timestampFormat", shape.timestampFormat); - } else if (self.isTimestampFormatSet && this.timestampFormat) { - property(this, "timestampFormat", this.timestampFormat); - } else if (this.location === "header") { - property(this, "timestampFormat", "rfc822"); - } else if (this.location === "querystring") { - property(this, "timestampFormat", "iso8601"); - } else if (this.api) { - switch (this.api.protocol) { - case "json": - case "rest-json": - property(this, "timestampFormat", "unixTimestamp"); - break; - case "rest-xml": - case "query": - case "ec2": - property(this, "timestampFormat", "iso8601"); - break; - } + }, + url: "/user/repos" + }, + createFork: { + method: "POST", + params: { + organization: { + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" } - - this.toType = function (value) { - if (value === null || value === undefined) return null; - if (typeof value.toUTCString === "function") return value; - return typeof value === "string" || typeof value === "number" - ? util.date.parseTimestamp(value) - : null; - }; - - this.toWireFormat = function (value) { - return util.date.format(value, self.timestampFormat); - }; - } - - function StringShape() { - Shape.apply(this, arguments); - - var nullLessProtocols = ["rest-xml", "query", "ec2"]; - this.toType = function (value) { - value = - this.api && nullLessProtocols.indexOf(this.api.protocol) > -1 - ? value || "" - : value; - if (this.isJsonValue) { - return JSON.parse(value); - } - - return value && typeof value.toString === "function" - ? value.toString() - : value; - }; - - this.toWireFormat = function (value) { - return this.isJsonValue ? JSON.stringify(value) : value; - }; - } - - function FloatShape() { - Shape.apply(this, arguments); - - this.toType = function (value) { - if (value === null || value === undefined) return null; - return parseFloat(value); - }; - this.toWireFormat = this.toType; - } - - function IntegerShape() { - Shape.apply(this, arguments); - - this.toType = function (value) { - if (value === null || value === undefined) return null; - return parseInt(value, 10); - }; - this.toWireFormat = this.toType; - } - - function BinaryShape() { - Shape.apply(this, arguments); - this.toType = function (value) { - var buf = util.base64.decode(value); - if ( - this.isSensitive && - util.isNode() && - typeof util.Buffer.alloc === "function" - ) { - /* Node.js can create a Buffer that is not isolated. - * i.e. buf.byteLength !== buf.buffer.byteLength - * This means that the sensitive data is accessible to anyone with access to buf.buffer. - * If this is the node shared Buffer, then other code within this process _could_ find this secret. - * Copy sensitive data to an isolated Buffer and zero the sensitive data. - * While this is safe to do here, copying this code somewhere else may produce unexpected results. - */ - var secureBuf = util.Buffer.alloc(buf.length, buf); - buf.fill(0); - buf = secureBuf; - } - return buf; - }; - this.toWireFormat = util.base64.encode; - } - - function Base64Shape() { - BinaryShape.apply(this, arguments); - } - - function BooleanShape() { - Shape.apply(this, arguments); - - this.toType = function (value) { - if (typeof value === "boolean") return value; - if (value === null || value === undefined) return null; - return value === "true"; - }; - } - - /** - * @api private - */ - Shape.shapes = { - StructureShape: StructureShape, - ListShape: ListShape, - MapShape: MapShape, - StringShape: StringShape, - BooleanShape: BooleanShape, - Base64Shape: Base64Shape, - }; - - /** - * @api private - */ - module.exports = Shape; - - /***/ + }, + url: "/repos/:owner/:repo/forks" }, - - /***/ 73639: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var util = __nccwpck_require__(77985); - - util.isBrowser = function () { - return false; - }; - util.isNode = function () { - return true; - }; - - // node.js specific modules - util.crypto.lib = __nccwpck_require__(6113); - util.Buffer = __nccwpck_require__(14300).Buffer; - util.domain = __nccwpck_require__(13639); - util.stream = __nccwpck_require__(12781); - util.url = __nccwpck_require__(57310); - util.querystring = __nccwpck_require__(63477); - util.environment = "nodejs"; - util.createEventStream = util.stream.Readable - ? __nccwpck_require__(69643).createEventStream - : __nccwpck_require__(63727).createEventStream; - util.realClock = __nccwpck_require__(81370); - util.clientSideMonitoring = { - Publisher: __nccwpck_require__(66807).Publisher, - configProvider: __nccwpck_require__(91822), - }; - util.iniLoader = __nccwpck_require__(29697) /* .iniLoader */.b; - util.getSystemErrorName = __nccwpck_require__(73837).getSystemErrorName; - - var AWS; - - /** - * @api private - */ - module.exports = AWS = __nccwpck_require__(28437); - - __nccwpck_require__(53819); - __nccwpck_require__(36965); - __nccwpck_require__(77360); - __nccwpck_require__(57083); - __nccwpck_require__(74998); - __nccwpck_require__(3498); - __nccwpck_require__(15037); - __nccwpck_require__(80371); - - // Load the xml2js XML parser - AWS.XML.Parser = __nccwpck_require__(96752); - - // Load Node HTTP client - __nccwpck_require__(2310); - - __nccwpck_require__(95417); - - // Load custom credential providers - __nccwpck_require__(11017); - __nccwpck_require__(73379); - __nccwpck_require__(88764); - __nccwpck_require__(10645); - __nccwpck_require__(57714); - __nccwpck_require__(27454); - __nccwpck_require__(13754); - __nccwpck_require__(80371); - - // Setup default chain providers - // If this changes, please update documentation for - // AWS.CredentialProviderChain.defaultProviders in - // credentials/credential_provider_chain.js - AWS.CredentialProviderChain.defaultProviders = [ - function () { - return new AWS.EnvironmentCredentials("AWS"); + createHook: { + method: "POST", + params: { + active: { + type: "boolean" }, - function () { - return new AWS.EnvironmentCredentials("AMAZON"); + config: { + required: true, + type: "object" }, - function () { - return new AWS.SharedIniFileCredentials(); + "config.content_type": { + type: "string" }, - function () { - return new AWS.ECSCredentials(); + "config.insecure_ssl": { + type: "string" }, - function () { - return new AWS.ProcessCredentials(); + "config.secret": { + type: "string" }, - function () { - return new AWS.TokenFileWebIdentityCredentials(); + "config.url": { + required: true, + type: "string" }, - function () { - return new AWS.EC2MetadataCredentials(); + events: { + type: "string[]" }, - ]; - - // Update configuration keys - AWS.util.update(AWS.Config.prototype.keys, { - credentials: function () { - var credentials = null; - new AWS.CredentialProviderChain([ - function () { - return new AWS.EnvironmentCredentials("AWS"); - }, - function () { - return new AWS.EnvironmentCredentials("AMAZON"); - }, - function () { - return new AWS.SharedIniFileCredentials({ - disableAssumeRole: true, - }); - }, - ]).resolve(function (err, creds) { - if (!err) credentials = creds; - }); - return credentials; - }, - credentialProvider: function () { - return new AWS.CredentialProviderChain(); - }, - logger: function () { - return process.env.AWSJS_DEBUG ? console : null; - }, - region: function () { - var env = process.env; - var region = env.AWS_REGION || env.AMAZON_REGION; - if (env[AWS.util.configOptInEnv]) { - var toCheck = [ - { filename: env[AWS.util.sharedCredentialsFileEnv] }, - { isConfig: true, filename: env[AWS.util.sharedConfigFileEnv] }, - ]; - var iniLoader = AWS.util.iniLoader; - while (!region && toCheck.length) { - var configFile = iniLoader.loadFrom(toCheck.shift()); - var profile = - configFile[env.AWS_PROFILE || AWS.util.defaultProfile]; - region = profile && profile.region; - } - } - return region; + name: { + type: "string" }, - }); - - // Reset configuration - AWS.config = new AWS.Config(); - - /***/ - }, - - /***/ 99127: /***/ ( - __unused_webpack_module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var AWS = __nccwpck_require__(28437); - - /** - * @api private - */ - AWS.ParamValidator = AWS.util.inherit({ - /** - * Create a new validator object. - * - * @param validation [Boolean|map] whether input parameters should be - * validated against the operation description before sending the - * request. Pass a map to enable any of the following specific - * validation features: - * - * * **min** [Boolean] — Validates that a value meets the min - * constraint. This is enabled by default when paramValidation is set - * to `true`. - * * **max** [Boolean] — Validates that a value meets the max - * constraint. - * * **pattern** [Boolean] — Validates that a string value matches a - * regular expression. - * * **enum** [Boolean] — Validates that a string value matches one - * of the allowable enum values. - */ - constructor: function ParamValidator(validation) { - if (validation === true || validation === undefined) { - validation = { min: true }; - } - this.validation = validation; - }, - - validate: function validate(shape, params, context) { - this.errors = []; - this.validateMember(shape, params || {}, context || "params"); - - if (this.errors.length > 1) { - var msg = this.errors.join("\n* "); - msg = - "There were " + - this.errors.length + - " validation errors:\n* " + - msg; - throw AWS.util.error(new Error(msg), { - code: "MultipleValidationErrors", - errors: this.errors, - }); - } else if (this.errors.length === 1) { - throw this.errors[0]; - } else { - return true; - } + owner: { + required: true, + type: "string" }, - - fail: function fail(code, message) { - this.errors.push(AWS.util.error(new Error(message), { code: code })); + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/hooks" + }, + createInOrg: { + method: "POST", + params: { + allow_merge_commit: { + type: "boolean" }, - - validateStructure: function validateStructure(shape, params, context) { - this.validateType(params, context, ["object"], "structure"); - - var paramName; - for (var i = 0; shape.required && i < shape.required.length; i++) { - paramName = shape.required[i]; - var value = params[paramName]; - if (value === undefined || value === null) { - this.fail( - "MissingRequiredParameter", - "Missing required key '" + paramName + "' in " + context - ); - } - } - - // validate hash members - for (paramName in params) { - if (!Object.prototype.hasOwnProperty.call(params, paramName)) - continue; - - var paramValue = params[paramName], - memberShape = shape.members[paramName]; - - if (memberShape !== undefined) { - var memberContext = [context, paramName].join("."); - this.validateMember(memberShape, paramValue, memberContext); - } else { - this.fail( - "UnexpectedParameter", - "Unexpected key '" + paramName + "' found in " + context - ); - } - } - - return true; + allow_rebase_merge: { + type: "boolean" }, - - validateMember: function validateMember(shape, param, context) { - switch (shape.type) { - case "structure": - return this.validateStructure(shape, param, context); - case "list": - return this.validateList(shape, param, context); - case "map": - return this.validateMap(shape, param, context); - default: - return this.validateScalar(shape, param, context); - } + allow_squash_merge: { + type: "boolean" }, - - validateList: function validateList(shape, params, context) { - if (this.validateType(params, context, [Array])) { - this.validateRange( - shape, - params.length, - context, - "list member count" - ); - // validate array members - for (var i = 0; i < params.length; i++) { - this.validateMember( - shape.member, - params[i], - context + "[" + i + "]" - ); - } - } + auto_init: { + type: "boolean" }, - - validateMap: function validateMap(shape, params, context) { - if (this.validateType(params, context, ["object"], "map")) { - // Build up a count of map members to validate range traits. - var mapCount = 0; - for (var param in params) { - if (!Object.prototype.hasOwnProperty.call(params, param)) - continue; - // Validate any map key trait constraints - this.validateMember( - shape.key, - param, - context + "[key='" + param + "']" - ); - this.validateMember( - shape.value, - params[param], - context + "['" + param + "']" - ); - mapCount++; - } - this.validateRange(shape, mapCount, context, "map member count"); - } + delete_branch_on_merge: { + type: "boolean" }, - - validateScalar: function validateScalar(shape, value, context) { - switch (shape.type) { - case null: - case undefined: - case "string": - return this.validateString(shape, value, context); - case "base64": - case "binary": - return this.validatePayload(value, context); - case "integer": - case "float": - return this.validateNumber(shape, value, context); - case "boolean": - return this.validateType(value, context, ["boolean"]); - case "timestamp": - return this.validateType( - value, - context, - [ - Date, - /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?Z$/, - "number", - ], - "Date object, ISO-8601 string, or a UNIX timestamp" - ); - default: - return this.fail( - "UnkownType", - "Unhandled type " + shape.type + " for " + context - ); - } + description: { + type: "string" }, - - validateString: function validateString(shape, value, context) { - var validTypes = ["string"]; - if (shape.isJsonValue) { - validTypes = validTypes.concat(["number", "object", "boolean"]); - } - if (value !== null && this.validateType(value, context, validTypes)) { - this.validateEnum(shape, value, context); - this.validateRange(shape, value.length, context, "string length"); - this.validatePattern(shape, value, context); - this.validateUri(shape, value, context); - } + gitignore_template: { + type: "string" + }, + has_issues: { + type: "boolean" + }, + has_projects: { + type: "boolean" + }, + has_wiki: { + type: "boolean" + }, + homepage: { + type: "string" + }, + is_template: { + type: "boolean" + }, + license_template: { + type: "string" + }, + name: { + required: true, + type: "string" + }, + org: { + required: true, + type: "string" + }, + private: { + type: "boolean" + }, + team_id: { + type: "integer" + }, + visibility: { + enum: ["public", "private", "visibility", "internal"], + type: "string" + } + }, + url: "/orgs/:org/repos" + }, + createOrUpdateFile: { + method: "PUT", + params: { + author: { + type: "object" + }, + "author.email": { + required: true, + type: "string" }, - - validateUri: function validateUri(shape, value, context) { - if (shape["location"] === "uri") { - if (value.length === 0) { - this.fail( - "UriParameterError", - "Expected uri parameter to have length >= 1," + - ' but found "' + - value + - '" for ' + - context - ); - } - } + "author.name": { + required: true, + type: "string" }, - - validatePattern: function validatePattern(shape, value, context) { - if (this.validation["pattern"] && shape["pattern"] !== undefined) { - if (!new RegExp(shape["pattern"]).test(value)) { - this.fail( - "PatternMatchError", - 'Provided value "' + - value + - '" ' + - "does not match regex pattern /" + - shape["pattern"] + - "/ for " + - context - ); - } - } + branch: { + type: "string" }, - - validateRange: function validateRange( - shape, - value, - context, - descriptor - ) { - if (this.validation["min"]) { - if (shape["min"] !== undefined && value < shape["min"]) { - this.fail( - "MinRangeError", - "Expected " + - descriptor + - " >= " + - shape["min"] + - ", but found " + - value + - " for " + - context - ); - } - } - if (this.validation["max"]) { - if (shape["max"] !== undefined && value > shape["max"]) { - this.fail( - "MaxRangeError", - "Expected " + - descriptor + - " <= " + - shape["max"] + - ", but found " + - value + - " for " + - context - ); - } - } + committer: { + type: "object" }, - - validateEnum: function validateRange(shape, value, context) { - if (this.validation["enum"] && shape["enum"] !== undefined) { - // Fail if the string value is not present in the enum list - if (shape["enum"].indexOf(value) === -1) { - this.fail( - "EnumError", - "Found string value of " + - value + - ", but " + - "expected " + - shape["enum"].join("|") + - " for " + - context - ); - } - } + "committer.email": { + required: true, + type: "string" }, - - validateType: function validateType( - value, - context, - acceptedTypes, - type - ) { - // We will not log an error for null or undefined, but we will return - // false so that callers know that the expected type was not strictly met. - if (value === null || value === undefined) return false; - - var foundInvalidType = false; - for (var i = 0; i < acceptedTypes.length; i++) { - if (typeof acceptedTypes[i] === "string") { - if (typeof value === acceptedTypes[i]) return true; - } else if (acceptedTypes[i] instanceof RegExp) { - if ((value || "").toString().match(acceptedTypes[i])) return true; - } else { - if (value instanceof acceptedTypes[i]) return true; - if (AWS.util.isType(value, acceptedTypes[i])) return true; - if (!type && !foundInvalidType) - acceptedTypes = acceptedTypes.slice(); - acceptedTypes[i] = AWS.util.typeName(acceptedTypes[i]); - } - foundInvalidType = true; - } - - var acceptedType = type; - if (!acceptedType) { - acceptedType = acceptedTypes - .join(", ") - .replace(/,([^,]+)$/, ", or$1"); - } - - var vowel = acceptedType.match(/^[aeiou]/i) ? "n" : ""; - this.fail( - "InvalidParameterType", - "Expected " + context + " to be a" + vowel + " " + acceptedType - ); - return false; + "committer.name": { + required: true, + type: "string" }, - - validateNumber: function validateNumber(shape, value, context) { - if (value === null || value === undefined) return; - if (typeof value === "string") { - var castedValue = parseFloat(value); - if (castedValue.toString() === value) value = castedValue; - } - if (this.validateType(value, context, ["number"])) { - this.validateRange(shape, value, context, "numeric value"); - } + content: { + required: true, + type: "string" }, - - validatePayload: function validatePayload(value, context) { - if (value === null || value === undefined) return; - if (typeof value === "string") return; - if (value && typeof value.byteLength === "number") return; // typed arrays - if (AWS.util.isNode()) { - // special check for buffer/stream in Node.js - var Stream = AWS.util.stream.Stream; - if (AWS.util.Buffer.isBuffer(value) || value instanceof Stream) - return; - } else { - if (typeof Blob !== void 0 && value instanceof Blob) return; - } - - var types = [ - "Buffer", - "Stream", - "File", - "Blob", - "ArrayBuffer", - "DataView", - ]; - if (value) { - for (var i = 0; i < types.length; i++) { - if (AWS.util.isType(value, types[i])) return; - if (AWS.util.typeName(value.constructor) === types[i]) return; - } - } - - this.fail( - "InvalidParameterType", - "Expected " + - context + - " to be a " + - "string, Buffer, Stream, Blob, or typed array object" - ); + message: { + required: true, + type: "string" }, - }); - - /***/ - }, - - /***/ 44086: /***/ ( - __unused_webpack_module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var AWS = __nccwpck_require__(28437); - var rest = AWS.Protocol.Rest; - - /** - * A presigner object can be used to generate presigned urls for the Polly service. - */ - AWS.Polly.Presigner = AWS.util.inherit({ - /** - * Creates a presigner object with a set of configuration options. - * - * @option options params [map] An optional map of parameters to bind to every - * request sent by this service object. - * @option options service [AWS.Polly] An optional pre-configured instance - * of the AWS.Polly service object to use for requests. The object may - * bound parameters used by the presigner. - * @see AWS.Polly.constructor - */ - constructor: function Signer(options) { - options = options || {}; - this.options = options; - this.service = options.service; - this.bindServiceObject(options); - this._operations = {}; - }, - - /** - * @api private - */ - bindServiceObject: function bindServiceObject(options) { - options = options || {}; - if (!this.service) { - this.service = new AWS.Polly(options); - } else { - var config = AWS.util.copy(this.service.config); - this.service = new this.service.constructor.__super__(config); - this.service.config.params = AWS.util.merge( - this.service.config.params || {}, - options.params - ); - } + owner: { + required: true, + type: "string" }, - - /** - * @api private - */ - modifyInputMembers: function modifyInputMembers(input) { - // make copies of the input so we don't overwrite the api - // need to be careful to copy anything we access/modify - var modifiedInput = AWS.util.copy(input); - modifiedInput.members = AWS.util.copy(input.members); - AWS.util.each(input.members, function (name, member) { - modifiedInput.members[name] = AWS.util.copy(member); - // update location and locationName - if (!member.location || member.location === "body") { - modifiedInput.members[name].location = "querystring"; - modifiedInput.members[name].locationName = name; - } - }); - return modifiedInput; + path: { + required: true, + type: "string" }, - - /** - * @api private - */ - convertPostToGet: function convertPostToGet(req) { - // convert method - req.httpRequest.method = "GET"; - - var operation = req.service.api.operations[req.operation]; - // get cached operation input first - var input = this._operations[req.operation]; - if (!input) { - // modify the original input - this._operations[req.operation] = input = this.modifyInputMembers( - operation.input - ); - } - - var uri = rest.generateURI( - req.httpRequest.endpoint.path, - operation.httpPath, - input, - req.params - ); - - req.httpRequest.path = uri; - req.httpRequest.body = ""; - - // don't need these headers on a GET request - delete req.httpRequest.headers["Content-Length"]; - delete req.httpRequest.headers["Content-Type"]; - }, - - /** - * @overload getSynthesizeSpeechUrl(params = {}, [expires = 3600], [callback]) - * Generate a presigned url for {AWS.Polly.synthesizeSpeech}. - * @note You must ensure that you have static or previously resolved - * credentials if you call this method synchronously (with no callback), - * otherwise it may not properly sign the request. If you cannot guarantee - * this (you are using an asynchronous credential provider, i.e., EC2 - * IAM roles), you should always call this method with an asynchronous - * callback. - * @param params [map] parameters to pass to the operation. See the {AWS.Polly.synthesizeSpeech} - * operation for the expected operation parameters. - * @param expires [Integer] (3600) the number of seconds to expire the pre-signed URL operation in. - * Defaults to 1 hour. - * @return [string] if called synchronously (with no callback), returns the signed URL. - * @return [null] nothing is returned if a callback is provided. - * @callback callback function (err, url) - * If a callback is supplied, it is called when a signed URL has been generated. - * @param err [Error] the error object returned from the presigner. - * @param url [String] the signed URL. - * @see AWS.Polly.synthesizeSpeech - */ - getSynthesizeSpeechUrl: function getSynthesizeSpeechUrl( - params, - expires, - callback - ) { - var self = this; - var request = this.service.makeRequest("synthesizeSpeech", params); - // remove existing build listeners - request.removeAllListeners("build"); - request.on("build", function (req) { - self.convertPostToGet(req); - }); - return request.presign(expires, callback); + repo: { + required: true, + type: "string" }, - }); - - /***/ - }, - - /***/ 97969: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var util = __nccwpck_require__(77985); - var AWS = __nccwpck_require__(28437); - - /** - * Prepend prefix defined by API model to endpoint that's already - * constructed. This feature does not apply to operations using - * endpoint discovery and can be disabled. - * @api private - */ - function populateHostPrefix(request) { - var enabled = request.service.config.hostPrefixEnabled; - if (!enabled) return request; - var operationModel = request.service.api.operations[request.operation]; - //don't marshal host prefix when operation has endpoint discovery traits - if (hasEndpointDiscover(request)) return request; - if (operationModel.endpoint && operationModel.endpoint.hostPrefix) { - var hostPrefixNotation = operationModel.endpoint.hostPrefix; - var hostPrefix = expandHostPrefix( - hostPrefixNotation, - request.params, - operationModel.input - ); - prependEndpointPrefix(request.httpRequest.endpoint, hostPrefix); - validateHostname(request.httpRequest.endpoint.hostname); + sha: { + type: "string" } - return request; - } - - /** - * @api private - */ - function hasEndpointDiscover(request) { - var api = request.service.api; - var operationModel = api.operations[request.operation]; - var isEndpointOperation = - api.endpointOperation && - api.endpointOperation === util.string.lowerFirst(operationModel.name); - return ( - operationModel.endpointDiscoveryRequired !== "NULL" || - isEndpointOperation === true - ); - } - - /** - * @api private - */ - function expandHostPrefix(hostPrefixNotation, params, shape) { - util.each(shape.members, function (name, member) { - if (member.hostLabel === true) { - if (typeof params[name] !== "string" || params[name] === "") { - throw util.error(new Error(), { - message: "Parameter " + name + " should be a non-empty string.", - code: "InvalidParameter", - }); - } - var regex = new RegExp("\\{" + name + "\\}", "g"); - hostPrefixNotation = hostPrefixNotation.replace( - regex, - params[name] - ); - } - }); - return hostPrefixNotation; - } - - /** - * @api private - */ - function prependEndpointPrefix(endpoint, prefix) { - if (endpoint.host) { - endpoint.host = prefix + endpoint.host; - } - if (endpoint.hostname) { - endpoint.hostname = prefix + endpoint.hostname; - } - } - - /** - * @api private - */ - function validateHostname(hostname) { - var labels = hostname.split("."); - //Reference: https://tools.ietf.org/html/rfc1123#section-2 - var hostPattern = /^[a-zA-Z0-9]{1}$|^[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9]$/; - util.arrayEach(labels, function (label) { - if (!label.length || label.length < 1 || label.length > 63) { - throw util.error(new Error(), { - code: "ValidationError", - message: - "Hostname label length should be between 1 to 63 characters, inclusive.", - }); - } - if (!hostPattern.test(label)) { - throw AWS.util.error(new Error(), { - code: "ValidationError", - message: label + " is not hostname compatible.", - }); - } - }); - } - - module.exports = { - populateHostPrefix: populateHostPrefix, - }; - - /***/ - }, - - /***/ 30083: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var util = __nccwpck_require__(77985); - var JsonBuilder = __nccwpck_require__(47495); - var JsonParser = __nccwpck_require__(5474); - var populateHostPrefix = __nccwpck_require__(97969).populateHostPrefix; - - function buildRequest(req) { - var httpRequest = req.httpRequest; - var api = req.service.api; - var target = - api.targetPrefix + "." + api.operations[req.operation].name; - var version = api.jsonVersion || "1.0"; - var input = api.operations[req.operation].input; - var builder = new JsonBuilder(); - - if (version === 1) version = "1.0"; - httpRequest.body = builder.build(req.params || {}, input); - httpRequest.headers["Content-Type"] = - "application/x-amz-json-" + version; - httpRequest.headers["X-Amz-Target"] = target; - - populateHostPrefix(req); - } - - function extractError(resp) { - var error = {}; - var httpResponse = resp.httpResponse; - - error.code = httpResponse.headers["x-amzn-errortype"] || "UnknownError"; - if (typeof error.code === "string") { - error.code = error.code.split(":")[0]; - } - - if (httpResponse.body.length > 0) { - try { - var e = JSON.parse(httpResponse.body.toString()); - var code = e.__type || e.code || e.Code; - if (code) { - error.code = code.split("#").pop(); - } - if (error.code === "RequestEntityTooLarge") { - error.message = "Request body must be less than 1 MB"; - } else { - error.message = e.message || e.Message || null; - } - } catch (e) { - error.statusCode = httpResponse.statusCode; - error.message = httpResponse.statusMessage; - } - } else { - error.statusCode = httpResponse.statusCode; - error.message = httpResponse.statusCode.toString(); - } - - resp.error = util.error(new Error(), error); - } - - function extractData(resp) { - var body = resp.httpResponse.body.toString() || "{}"; - if (resp.request.service.config.convertResponseTypes === false) { - resp.data = JSON.parse(body); - } else { - var operation = - resp.request.service.api.operations[resp.request.operation]; - var shape = operation.output || {}; - var parser = new JsonParser(); - resp.data = parser.parse(body, shape); - } - } - - /** - * @api private - */ - module.exports = { - buildRequest: buildRequest, - extractError: extractError, - extractData: extractData, - }; - - /***/ + }, + url: "/repos/:owner/:repo/contents/:path" }, - - /***/ 90761: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var AWS = __nccwpck_require__(28437); - var util = __nccwpck_require__(77985); - var QueryParamSerializer = __nccwpck_require__(45175); - var Shape = __nccwpck_require__(71349); - var populateHostPrefix = __nccwpck_require__(97969).populateHostPrefix; - - function buildRequest(req) { - var operation = req.service.api.operations[req.operation]; - var httpRequest = req.httpRequest; - httpRequest.headers["Content-Type"] = - "application/x-www-form-urlencoded; charset=utf-8"; - httpRequest.params = { - Version: req.service.api.apiVersion, - Action: operation.name, - }; - - // convert the request parameters into a list of query params, - // e.g. Deeply.NestedParam.0.Name=value - var builder = new QueryParamSerializer(); - builder.serialize(req.params, operation.input, function (name, value) { - httpRequest.params[name] = value; - }); - httpRequest.body = util.queryParamsToString(httpRequest.params); - - populateHostPrefix(req); - } - - function extractError(resp) { - var data, - body = resp.httpResponse.body.toString(); - if (body.match(" { - var util = __nccwpck_require__(77985); - var populateHostPrefix = __nccwpck_require__(97969).populateHostPrefix; - - function populateMethod(req) { - req.httpRequest.method = - req.service.api.operations[req.operation].httpMethod; - } - - function generateURI(endpointPath, operationPath, input, params) { - var uri = [endpointPath, operationPath].join("/"); - uri = uri.replace(/\/+/g, "/"); - - var queryString = {}, - queryStringSet = false; - util.each(input.members, function (name, member) { - var paramValue = params[name]; - if (paramValue === null || paramValue === undefined) return; - if (member.location === "uri") { - var regex = new RegExp("\\{" + member.name + "(\\+)?\\}"); - uri = uri.replace(regex, function (_, plus) { - var fn = plus ? util.uriEscapePath : util.uriEscape; - return fn(String(paramValue)); - }); - } else if (member.location === "querystring") { - queryStringSet = true; - - if (member.type === "list") { - queryString[member.name] = paramValue.map(function (val) { - return util.uriEscape( - member.member.toWireFormat(val).toString() - ); - }); - } else if (member.type === "map") { - util.each(paramValue, function (key, value) { - if (Array.isArray(value)) { - queryString[key] = value.map(function (val) { - return util.uriEscape(String(val)); - }); - } else { - queryString[key] = util.uriEscape(String(value)); - } - }); - } else { - queryString[member.name] = util.uriEscape( - member.toWireFormat(paramValue).toString() - ); - } - } - }); - - if (queryStringSet) { - uri += uri.indexOf("?") >= 0 ? "&" : "?"; - var parts = []; - util.arrayEach(Object.keys(queryString).sort(), function (key) { - if (!Array.isArray(queryString[key])) { - queryString[key] = [queryString[key]]; - } - for (var i = 0; i < queryString[key].length; i++) { - parts.push( - util.uriEscape(String(key)) + "=" + queryString[key][i] - ); - } - }); - uri += parts.join("&"); + declineInvitation: { + method: "DELETE", + params: { + invitation_id: { + required: true, + type: "integer" } - - return uri; - } - - function populateURI(req) { - var operation = req.service.api.operations[req.operation]; - var input = operation.input; - - var uri = generateURI( - req.httpRequest.endpoint.path, - operation.httpPath, - input, - req.params - ); - req.httpRequest.path = uri; - } - - function populateHeaders(req) { - var operation = req.service.api.operations[req.operation]; - util.each(operation.input.members, function (name, member) { - var value = req.params[name]; - if (value === null || value === undefined) return; - - if (member.location === "headers" && member.type === "map") { - util.each(value, function (key, memberValue) { - req.httpRequest.headers[member.name + key] = memberValue; - }); - } else if (member.location === "header") { - value = member.toWireFormat(value).toString(); - if (member.isJsonValue) { - value = util.base64.encode(value); - } - req.httpRequest.headers[member.name] = value; - } - }); - } - - function buildRequest(req) { - populateMethod(req); - populateURI(req); - populateHeaders(req); - populateHostPrefix(req); - } - - function extractError() {} - - function extractData(resp) { - var req = resp.request; - var data = {}; - var r = resp.httpResponse; - var operation = req.service.api.operations[req.operation]; - var output = operation.output; - - // normalize headers names to lower-cased keys for matching - var headers = {}; - util.each(r.headers, function (k, v) { - headers[k.toLowerCase()] = v; - }); - - util.each(output.members, function (name, member) { - var header = (member.name || name).toLowerCase(); - if (member.location === "headers" && member.type === "map") { - data[name] = {}; - var location = member.isLocationName ? member.name : ""; - var pattern = new RegExp("^" + location + "(.+)", "i"); - util.each(r.headers, function (k, v) { - var result = k.match(pattern); - if (result !== null) { - data[name][result[1]] = v; - } - }); - } else if (member.location === "header") { - if (headers[header] !== undefined) { - var value = member.isJsonValue - ? util.base64.decode(headers[header]) - : headers[header]; - data[name] = member.toType(value); - } - } else if (member.location === "statusCode") { - data[name] = parseInt(r.statusCode, 10); - } - }); - - resp.data = data; - } - - /** - * @api private - */ - module.exports = { - buildRequest: buildRequest, - extractError: extractError, - extractData: extractData, - generateURI: generateURI, - }; - - /***/ - }, - - /***/ 5883: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var util = __nccwpck_require__(77985); - var Rest = __nccwpck_require__(98200); - var Json = __nccwpck_require__(30083); - var JsonBuilder = __nccwpck_require__(47495); - var JsonParser = __nccwpck_require__(5474); - - function populateBody(req) { - var builder = new JsonBuilder(); - var input = req.service.api.operations[req.operation].input; - - if (input.payload) { - var params = {}; - var payloadShape = input.members[input.payload]; - params = req.params[input.payload]; - if (params === undefined) return; - - if (payloadShape.type === "structure") { - req.httpRequest.body = builder.build(params, payloadShape); - applyContentTypeHeader(req); - } else { - // non-JSON payload - req.httpRequest.body = params; - if (payloadShape.type === "binary" || payloadShape.isStreaming) { - applyContentTypeHeader(req, true); - } - } - } else { - var body = builder.build(req.params, input); - if (body !== "{}" || req.httpRequest.method !== "GET") { - //don't send empty body for GET method - req.httpRequest.body = body; - } - applyContentTypeHeader(req); + }, + url: "/user/repository_invitations/:invitation_id" + }, + delete: { + method: "DELETE", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo" + }, + deleteCommitComment: { + method: "DELETE", + params: { + comment_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/comments/:comment_id" + }, + deleteDownload: { + method: "DELETE", + params: { + download_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/downloads/:download_id" + }, + deleteFile: { + method: "DELETE", + params: { + author: { + type: "object" + }, + "author.email": { + type: "string" + }, + "author.name": { + type: "string" + }, + branch: { + type: "string" + }, + committer: { + type: "object" + }, + "committer.email": { + type: "string" + }, + "committer.name": { + type: "string" + }, + message: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + path: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + sha: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/contents/:path" + }, + deleteHook: { + method: "DELETE", + params: { + hook_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/hooks/:hook_id" + }, + deleteInvitation: { + method: "DELETE", + params: { + invitation_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/invitations/:invitation_id" + }, + deleteRelease: { + method: "DELETE", + params: { + owner: { + required: true, + type: "string" + }, + release_id: { + required: true, + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/releases/:release_id" + }, + deleteReleaseAsset: { + method: "DELETE", + params: { + asset_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/releases/assets/:asset_id" + }, + disableAutomatedSecurityFixes: { + headers: { + accept: "application/vnd.github.london-preview+json" + }, + method: "DELETE", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/automated-security-fixes" + }, + disablePagesSite: { + headers: { + accept: "application/vnd.github.switcheroo-preview+json" + }, + method: "DELETE", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/pages" + }, + disableVulnerabilityAlerts: { + headers: { + accept: "application/vnd.github.dorian-preview+json" + }, + method: "DELETE", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/vulnerability-alerts" + }, + enableAutomatedSecurityFixes: { + headers: { + accept: "application/vnd.github.london-preview+json" + }, + method: "PUT", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/automated-security-fixes" + }, + enablePagesSite: { + headers: { + accept: "application/vnd.github.switcheroo-preview+json" + }, + method: "POST", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + source: { + type: "object" + }, + "source.branch": { + enum: ["master", "gh-pages"], + type: "string" + }, + "source.path": { + type: "string" + } + }, + url: "/repos/:owner/:repo/pages" + }, + enableVulnerabilityAlerts: { + headers: { + accept: "application/vnd.github.dorian-preview+json" + }, + method: "PUT", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/vulnerability-alerts" + }, + get: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo" + }, + getAppsWithAccessToProtectedBranch: { + method: "GET", + params: { + branch: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection/restrictions/apps" + }, + getArchiveLink: { + method: "GET", + params: { + archive_format: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + ref: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/:archive_format/:ref" + }, + getBranch: { + method: "GET", + params: { + branch: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/branches/:branch" + }, + getBranchProtection: { + method: "GET", + params: { + branch: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection" + }, + getClones: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + per: { + enum: ["day", "week"], + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/traffic/clones" + }, + getCodeFrequencyStats: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/stats/code_frequency" + }, + getCollaboratorPermissionLevel: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + username: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/collaborators/:username/permission" + }, + getCombinedStatusForRef: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + ref: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/commits/:ref/status" + }, + getCommit: { + method: "GET", + params: { + commit_sha: { + alias: "ref", + deprecated: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + ref: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + sha: { + alias: "ref", + deprecated: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/commits/:ref" + }, + getCommitActivityStats: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/stats/commit_activity" + }, + getCommitComment: { + method: "GET", + params: { + comment_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/comments/:comment_id" + }, + getCommitRefSha: { + deprecated: "octokit.repos.getCommitRefSha() is deprecated, see https://developer.github.com/v3/repos/commits/#get-a-single-commit", + headers: { + accept: "application/vnd.github.v3.sha" + }, + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + ref: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/commits/:ref" + }, + getContents: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + path: { + required: true, + type: "string" + }, + ref: { + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/contents/:path" + }, + getContributorsStats: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/stats/contributors" + }, + getDeployKey: { + method: "GET", + params: { + key_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/keys/:key_id" + }, + getDeployment: { + method: "GET", + params: { + deployment_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/deployments/:deployment_id" + }, + getDeploymentStatus: { + method: "GET", + params: { + deployment_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + status_id: { + required: true, + type: "integer" + } + }, + url: "/repos/:owner/:repo/deployments/:deployment_id/statuses/:status_id" + }, + getDownload: { + method: "GET", + params: { + download_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/downloads/:download_id" + }, + getHook: { + method: "GET", + params: { + hook_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/hooks/:hook_id" + }, + getLatestPagesBuild: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/pages/builds/latest" + }, + getLatestRelease: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/releases/latest" + }, + getPages: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/pages" + }, + getPagesBuild: { + method: "GET", + params: { + build_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/pages/builds/:build_id" + }, + getParticipationStats: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/stats/participation" + }, + getProtectedBranchAdminEnforcement: { + method: "GET", + params: { + branch: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection/enforce_admins" + }, + getProtectedBranchPullRequestReviewEnforcement: { + method: "GET", + params: { + branch: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection/required_pull_request_reviews" + }, + getProtectedBranchRequiredSignatures: { + headers: { + accept: "application/vnd.github.zzzax-preview+json" + }, + method: "GET", + params: { + branch: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection/required_signatures" + }, + getProtectedBranchRequiredStatusChecks: { + method: "GET", + params: { + branch: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection/required_status_checks" + }, + getProtectedBranchRestrictions: { + method: "GET", + params: { + branch: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection/restrictions" + }, + getPunchCardStats: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/stats/punch_card" + }, + getReadme: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + ref: { + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/readme" + }, + getRelease: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + release_id: { + required: true, + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/releases/:release_id" + }, + getReleaseAsset: { + method: "GET", + params: { + asset_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/releases/assets/:asset_id" + }, + getReleaseByTag: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + tag: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/releases/tags/:tag" + }, + getTeamsWithAccessToProtectedBranch: { + method: "GET", + params: { + branch: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection/restrictions/teams" + }, + getTopPaths: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/traffic/popular/paths" + }, + getTopReferrers: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/traffic/popular/referrers" + }, + getUsersWithAccessToProtectedBranch: { + method: "GET", + params: { + branch: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection/restrictions/users" + }, + getViews: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + per: { + enum: ["day", "week"], + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/traffic/views" + }, + list: { + method: "GET", + params: { + affiliation: { + type: "string" + }, + direction: { + enum: ["asc", "desc"], + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + sort: { + enum: ["created", "updated", "pushed", "full_name"], + type: "string" + }, + type: { + enum: ["all", "owner", "public", "private", "member"], + type: "string" + }, + visibility: { + enum: ["all", "public", "private"], + type: "string" + } + }, + url: "/user/repos" + }, + listAppsWithAccessToProtectedBranch: { + deprecated: "octokit.repos.listAppsWithAccessToProtectedBranch() has been renamed to octokit.repos.getAppsWithAccessToProtectedBranch() (2019-09-13)", + method: "GET", + params: { + branch: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection/restrictions/apps" + }, + listAssetsForRelease: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + release_id: { + required: true, + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/releases/:release_id/assets" + }, + listBranches: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + protected: { + type: "boolean" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/branches" + }, + listBranchesForHeadCommit: { + headers: { + accept: "application/vnd.github.groot-preview+json" + }, + method: "GET", + params: { + commit_sha: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/commits/:commit_sha/branches-where-head" + }, + listCollaborators: { + method: "GET", + params: { + affiliation: { + enum: ["outside", "direct", "all"], + type: "string" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" } - } - - function applyContentTypeHeader(req, isBinary) { - var operation = req.service.api.operations[req.operation]; - var input = operation.input; - - if (!req.httpRequest.headers["Content-Type"]) { - var type = isBinary ? "binary/octet-stream" : "application/json"; - req.httpRequest.headers["Content-Type"] = type; + }, + url: "/repos/:owner/:repo/collaborators" + }, + listCommentsForCommit: { + method: "GET", + params: { + commit_sha: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + ref: { + alias: "commit_sha", + deprecated: true, + type: "string" + }, + repo: { + required: true, + type: "string" } - } - - function buildRequest(req) { - Rest.buildRequest(req); - - // never send body payload on HEAD/DELETE - if (["HEAD", "DELETE"].indexOf(req.httpRequest.method) < 0) { - populateBody(req); + }, + url: "/repos/:owner/:repo/commits/:commit_sha/comments" + }, + listCommitComments: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" } - } - - function extractError(resp) { - Json.extractError(resp); - } - - function extractData(resp) { - Rest.extractData(resp); - - var req = resp.request; - var operation = req.service.api.operations[req.operation]; - var rules = req.service.api.operations[req.operation].output || {}; - var parser; - var hasEventOutput = operation.hasEventOutput; - - if (rules.payload) { - var payloadMember = rules.members[rules.payload]; - var body = resp.httpResponse.body; - if (payloadMember.isEventStream) { - parser = new JsonParser(); - resp.data[payload] = util.createEventStream( - AWS.HttpClient.streamsApiVersion === 2 - ? resp.httpResponse.stream - : body, - parser, - payloadMember - ); - } else if ( - payloadMember.type === "structure" || - payloadMember.type === "list" - ) { - var parser = new JsonParser(); - resp.data[rules.payload] = parser.parse(body, payloadMember); - } else if ( - payloadMember.type === "binary" || - payloadMember.isStreaming - ) { - resp.data[rules.payload] = body; - } else { - resp.data[rules.payload] = payloadMember.toType(body); - } - } else { - var data = resp.data; - Json.extractData(resp); - resp.data = util.merge(data, resp.data); + }, + url: "/repos/:owner/:repo/comments" + }, + listCommits: { + method: "GET", + params: { + author: { + type: "string" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + path: { + type: "string" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + }, + sha: { + type: "string" + }, + since: { + type: "string" + }, + until: { + type: "string" } - } - - /** - * @api private - */ - module.exports = { - buildRequest: buildRequest, - extractError: extractError, - extractData: extractData, - }; - - /***/ - }, - - /***/ 15143: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var AWS = __nccwpck_require__(28437); - var util = __nccwpck_require__(77985); - var Rest = __nccwpck_require__(98200); - - function populateBody(req) { - var input = req.service.api.operations[req.operation].input; - var builder = new AWS.XML.Builder(); - var params = req.params; - - var payload = input.payload; - if (payload) { - var payloadMember = input.members[payload]; - params = params[payload]; - if (params === undefined) return; - - if (payloadMember.type === "structure") { - var rootElement = payloadMember.name; - req.httpRequest.body = builder.toXML( - params, - payloadMember, - rootElement, - true - ); - } else { - // non-xml payload - req.httpRequest.body = params; - } - } else { - req.httpRequest.body = builder.toXML( - params, - input, - input.name || - input.shape || - util.string.upperFirst(req.operation) + "Request" - ); + }, + url: "/repos/:owner/:repo/commits" + }, + listContributors: { + method: "GET", + params: { + anon: { + type: "string" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" } - } - - function buildRequest(req) { - Rest.buildRequest(req); - - // never send body payload on GET/HEAD - if (["GET", "HEAD"].indexOf(req.httpRequest.method) < 0) { - populateBody(req); + }, + url: "/repos/:owner/:repo/contributors" + }, + listDeployKeys: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" } - } - - function extractError(resp) { - Rest.extractError(resp); - - var data; - try { - data = new AWS.XML.Parser().parse(resp.httpResponse.body.toString()); - } catch (e) { - data = { - Code: resp.httpResponse.statusCode, - Message: resp.httpResponse.statusMessage, - }; + }, + url: "/repos/:owner/:repo/keys" + }, + listDeploymentStatuses: { + method: "GET", + params: { + deployment_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" } - - if (data.Errors) data = data.Errors; - if (data.Error) data = data.Error; - if (data.Code) { - resp.error = util.error(new Error(), { - code: data.Code, - message: data.Message, - }); - } else { - resp.error = util.error(new Error(), { - code: resp.httpResponse.statusCode, - message: null, - }); + }, + url: "/repos/:owner/:repo/deployments/:deployment_id/statuses" + }, + listDeployments: { + method: "GET", + params: { + environment: { + type: "string" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + ref: { + type: "string" + }, + repo: { + required: true, + type: "string" + }, + sha: { + type: "string" + }, + task: { + type: "string" } - } - - function extractData(resp) { - Rest.extractData(resp); - - var parser; - var req = resp.request; - var body = resp.httpResponse.body; - var operation = req.service.api.operations[req.operation]; - var output = operation.output; - - var hasEventOutput = operation.hasEventOutput; - - var payload = output.payload; - if (payload) { - var payloadMember = output.members[payload]; - if (payloadMember.isEventStream) { - parser = new AWS.XML.Parser(); - resp.data[payload] = util.createEventStream( - AWS.HttpClient.streamsApiVersion === 2 - ? resp.httpResponse.stream - : resp.httpResponse.body, - parser, - payloadMember - ); - } else if (payloadMember.type === "structure") { - parser = new AWS.XML.Parser(); - resp.data[payload] = parser.parse(body.toString(), payloadMember); - } else if ( - payloadMember.type === "binary" || - payloadMember.isStreaming - ) { - resp.data[payload] = body; - } else { - resp.data[payload] = payloadMember.toType(body); - } - } else if (body.length > 0) { - parser = new AWS.XML.Parser(); - var data = parser.parse(body.toString(), output); - util.update(resp.data, data); + }, + url: "/repos/:owner/:repo/deployments" + }, + listDownloads: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" } - } - - /** - * @api private - */ - module.exports = { - buildRequest: buildRequest, - extractError: extractError, - extractData: extractData, - }; - - /***/ - }, - - /***/ 91822: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var AWS = __nccwpck_require__(28437); - - /** - * Resolve client-side monitoring configuration from either environmental variables - * or shared config file. Configurations from environmental variables have higher priority - * than those from shared config file. The resolver will try to read the shared config file - * no matter whether the AWS_SDK_LOAD_CONFIG variable is set. - * @api private - */ - function resolveMonitoringConfig() { - var config = { - port: undefined, - clientId: undefined, - enabled: undefined, - host: undefined, - }; - if (fromEnvironment(config) || fromConfigFile(config)) - return toJSType(config); - return toJSType(config); - } - - /** - * Resolve configurations from environmental variables. - * @param {object} client side monitoring config object needs to be resolved - * @returns {boolean} whether resolving configurations is done - * @api private - */ - function fromEnvironment(config) { - config.port = config.port || process.env.AWS_CSM_PORT; - config.enabled = config.enabled || process.env.AWS_CSM_ENABLED; - config.clientId = config.clientId || process.env.AWS_CSM_CLIENT_ID; - config.host = config.host || process.env.AWS_CSM_HOST; - return ( - (config.port && config.enabled && config.clientId && config.host) || - ["false", "0"].indexOf(config.enabled) >= 0 - ); //no need to read shared config file if explicitely disabled - } - - /** - * Resolve cofigurations from shared config file with specified role name - * @param {object} client side monitoring config object needs to be resolved - * @returns {boolean} whether resolving configurations is done - * @api private - */ - function fromConfigFile(config) { - var sharedFileConfig; - try { - var configFile = AWS.util.iniLoader.loadFrom({ - isConfig: true, - filename: process.env[AWS.util.sharedConfigFileEnv], - }); - var sharedFileConfig = - configFile[process.env.AWS_PROFILE || AWS.util.defaultProfile]; - } catch (err) { - return false; + }, + url: "/repos/:owner/:repo/downloads" + }, + listForOrg: { + method: "GET", + params: { + direction: { + enum: ["asc", "desc"], + type: "string" + }, + org: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + sort: { + enum: ["created", "updated", "pushed", "full_name"], + type: "string" + }, + type: { + enum: ["all", "public", "private", "forks", "sources", "member", "internal"], + type: "string" } - if (!sharedFileConfig) return config; - config.port = config.port || sharedFileConfig.csm_port; - config.enabled = config.enabled || sharedFileConfig.csm_enabled; - config.clientId = config.clientId || sharedFileConfig.csm_client_id; - config.host = config.host || sharedFileConfig.csm_host; - return config.port && config.enabled && config.clientId && config.host; - } - - /** - * Transfer the resolved configuration value to proper types: port as number, enabled - * as boolean and clientId as string. The 'enabled' flag is valued to false when set - * to 'false' or '0'. - * @param {object} resolved client side monitoring config - * @api private - */ - function toJSType(config) { - //config.XXX is either undefined or string - var falsyNotations = ["false", "0", undefined]; - if ( - !config.enabled || - falsyNotations.indexOf(config.enabled.toLowerCase()) >= 0 - ) { - config.enabled = false; - } else { - config.enabled = true; + }, + url: "/orgs/:org/repos" + }, + listForUser: { + method: "GET", + params: { + direction: { + enum: ["asc", "desc"], + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + sort: { + enum: ["created", "updated", "pushed", "full_name"], + type: "string" + }, + type: { + enum: ["all", "owner", "member"], + type: "string" + }, + username: { + required: true, + type: "string" } - config.port = config.port ? parseInt(config.port, 10) : undefined; - return config; - } - - module.exports = resolveMonitoringConfig; - - /***/ + }, + url: "/users/:username/repos" }, - - /***/ 66807: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var util = __nccwpck_require__(28437).util; - var dgram = __nccwpck_require__(71891); - var stringToBuffer = util.buffer.toBuffer; - - var MAX_MESSAGE_SIZE = 1024 * 8; // 8 KB - - /** - * Publishes metrics via udp. - * @param {object} options Paramters for Publisher constructor - * @param {number} [options.port = 31000] Port number - * @param {string} [options.clientId = ''] Client Identifier - * @param {boolean} [options.enabled = false] enable sending metrics datagram - * @api private - */ - function Publisher(options) { - // handle configuration - options = options || {}; - this.enabled = options.enabled || false; - this.port = options.port || 31000; - this.clientId = options.clientId || ""; - this.address = options.host || "127.0.0.1"; - if (this.clientId.length > 255) { - // ClientId has a max length of 255 - this.clientId = this.clientId.substr(0, 255); - } - this.messagesInFlight = 0; - } - - Publisher.prototype.fieldsToTrim = { - UserAgent: 256, - SdkException: 128, - SdkExceptionMessage: 512, - AwsException: 128, - AwsExceptionMessage: 512, - FinalSdkException: 128, - FinalSdkExceptionMessage: 512, - FinalAwsException: 128, - FinalAwsExceptionMessage: 512, - }; - - /** - * Trims fields that have a specified max length. - * @param {object} event ApiCall or ApiCallAttempt event. - * @returns {object} - * @api private - */ - Publisher.prototype.trimFields = function (event) { - var trimmableFields = Object.keys(this.fieldsToTrim); - for (var i = 0, iLen = trimmableFields.length; i < iLen; i++) { - var field = trimmableFields[i]; - if (event.hasOwnProperty(field)) { - var maxLength = this.fieldsToTrim[field]; - var value = event[field]; - if (value && value.length > maxLength) { - event[field] = value.substr(0, maxLength); - } - } + listForks: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + }, + sort: { + enum: ["newest", "oldest", "stargazers"], + type: "string" } - return event; - }; - - /** - * Handles ApiCall and ApiCallAttempt events. - * @param {Object} event apiCall or apiCallAttempt event. - * @api private - */ - Publisher.prototype.eventHandler = function (event) { - // set the clientId - event.ClientId = this.clientId; - - this.trimFields(event); - - var message = stringToBuffer(JSON.stringify(event)); - if (!this.enabled || message.length > MAX_MESSAGE_SIZE) { - // drop the message if publisher not enabled or it is too large - return; + }, + url: "/repos/:owner/:repo/forks" + }, + listHooks: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/hooks" + }, + listInvitations: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/invitations" + }, + listInvitationsForAuthenticatedUser: { + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/user/repository_invitations" + }, + listLanguages: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/languages" + }, + listPagesBuilds: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/pages/builds" + }, + listProtectedBranchRequiredStatusChecksContexts: { + method: "GET", + params: { + branch: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection/required_status_checks/contexts" + }, + listProtectedBranchTeamRestrictions: { + deprecated: "octokit.repos.listProtectedBranchTeamRestrictions() has been renamed to octokit.repos.getTeamsWithAccessToProtectedBranch() (2019-09-09)", + method: "GET", + params: { + branch: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection/restrictions/teams" + }, + listProtectedBranchUserRestrictions: { + deprecated: "octokit.repos.listProtectedBranchUserRestrictions() has been renamed to octokit.repos.getUsersWithAccessToProtectedBranch() (2019-09-09)", + method: "GET", + params: { + branch: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection/restrictions/users" + }, + listPublic: { + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + since: { + type: "integer" + } + }, + url: "/repositories" + }, + listPullRequestsAssociatedWithCommit: { + headers: { + accept: "application/vnd.github.groot-preview+json" + }, + method: "GET", + params: { + commit_sha: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/commits/:commit_sha/pulls" + }, + listReleases: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/releases" + }, + listStatusesForRef: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + ref: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/commits/:ref/statuses" + }, + listTags: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/tags" + }, + listTeams: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/teams" + }, + listTeamsWithAccessToProtectedBranch: { + deprecated: "octokit.repos.listTeamsWithAccessToProtectedBranch() has been renamed to octokit.repos.getTeamsWithAccessToProtectedBranch() (2019-09-13)", + method: "GET", + params: { + branch: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection/restrictions/teams" + }, + listTopics: { + headers: { + accept: "application/vnd.github.mercy-preview+json" + }, + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/topics" + }, + listUsersWithAccessToProtectedBranch: { + deprecated: "octokit.repos.listUsersWithAccessToProtectedBranch() has been renamed to octokit.repos.getUsersWithAccessToProtectedBranch() (2019-09-13)", + method: "GET", + params: { + branch: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection/restrictions/users" + }, + merge: { + method: "POST", + params: { + base: { + required: true, + type: "string" + }, + commit_message: { + type: "string" + }, + head: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/merges" + }, + pingHook: { + method: "POST", + params: { + hook_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/hooks/:hook_id/pings" + }, + removeBranchProtection: { + method: "DELETE", + params: { + branch: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection" + }, + removeCollaborator: { + method: "DELETE", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + username: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/collaborators/:username" + }, + removeDeployKey: { + method: "DELETE", + params: { + key_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/keys/:key_id" + }, + removeProtectedBranchAdminEnforcement: { + method: "DELETE", + params: { + branch: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection/enforce_admins" + }, + removeProtectedBranchAppRestrictions: { + method: "DELETE", + params: { + apps: { + mapTo: "data", + required: true, + type: "string[]" + }, + branch: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection/restrictions/apps" + }, + removeProtectedBranchPullRequestReviewEnforcement: { + method: "DELETE", + params: { + branch: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection/required_pull_request_reviews" + }, + removeProtectedBranchRequiredSignatures: { + headers: { + accept: "application/vnd.github.zzzax-preview+json" + }, + method: "DELETE", + params: { + branch: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection/required_signatures" + }, + removeProtectedBranchRequiredStatusChecks: { + method: "DELETE", + params: { + branch: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection/required_status_checks" + }, + removeProtectedBranchRequiredStatusChecksContexts: { + method: "DELETE", + params: { + branch: { + required: true, + type: "string" + }, + contexts: { + mapTo: "data", + required: true, + type: "string[]" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection/required_status_checks/contexts" + }, + removeProtectedBranchRestrictions: { + method: "DELETE", + params: { + branch: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection/restrictions" + }, + removeProtectedBranchTeamRestrictions: { + method: "DELETE", + params: { + branch: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + teams: { + mapTo: "data", + required: true, + type: "string[]" } - - this.publishDatagram(message); - }; - - /** - * Publishes message to an agent. - * @param {Buffer} message JSON message to send to agent. - * @api private - */ - Publisher.prototype.publishDatagram = function (message) { - var self = this; - var client = this.getClient(); - - this.messagesInFlight++; - this.client.send( - message, - 0, - message.length, - this.port, - this.address, - function (err, bytes) { - if (--self.messagesInFlight <= 0) { - // destroy existing client so the event loop isn't kept open - self.destroyClient(); - } - } - ); - }; - - /** - * Returns an existing udp socket, or creates one if it doesn't already exist. - * @api private - */ - Publisher.prototype.getClient = function () { - if (!this.client) { - this.client = dgram.createSocket("udp4"); + }, + url: "/repos/:owner/:repo/branches/:branch/protection/restrictions/teams" + }, + removeProtectedBranchUserRestrictions: { + method: "DELETE", + params: { + branch: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + users: { + mapTo: "data", + required: true, + type: "string[]" } - return this.client; - }; - - /** - * Destroys the udp socket. - * @api private - */ - Publisher.prototype.destroyClient = function () { - if (this.client) { - this.client.close(); - this.client = void 0; + }, + url: "/repos/:owner/:repo/branches/:branch/protection/restrictions/users" + }, + replaceProtectedBranchAppRestrictions: { + method: "PUT", + params: { + apps: { + mapTo: "data", + required: true, + type: "string[]" + }, + branch: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection/restrictions/apps" + }, + replaceProtectedBranchRequiredStatusChecksContexts: { + method: "PUT", + params: { + branch: { + required: true, + type: "string" + }, + contexts: { + mapTo: "data", + required: true, + type: "string[]" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection/required_status_checks/contexts" + }, + replaceProtectedBranchTeamRestrictions: { + method: "PUT", + params: { + branch: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + teams: { + mapTo: "data", + required: true, + type: "string[]" } - }; - - module.exports = { - Publisher: Publisher, - }; - - /***/ + }, + url: "/repos/:owner/:repo/branches/:branch/protection/restrictions/teams" }, - - /***/ 45175: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var util = __nccwpck_require__(77985); - - function QueryParamSerializer() {} - - QueryParamSerializer.prototype.serialize = function (params, shape, fn) { - serializeStructure("", params, shape, fn); - }; - - function ucfirst(shape) { - if (shape.isQueryName || shape.api.protocol !== "ec2") { - return shape.name; - } else { - return shape.name[0].toUpperCase() + shape.name.substr(1); + replaceProtectedBranchUserRestrictions: { + method: "PUT", + params: { + branch: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + users: { + mapTo: "data", + required: true, + type: "string[]" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection/restrictions/users" + }, + replaceTopics: { + headers: { + accept: "application/vnd.github.mercy-preview+json" + }, + method: "PUT", + params: { + names: { + required: true, + type: "string[]" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/topics" + }, + requestPageBuild: { + method: "POST", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" } - } - - function serializeStructure(prefix, struct, rules, fn) { - util.each(rules.members, function (name, member) { - var value = struct[name]; - if (value === null || value === undefined) return; - - var memberName = ucfirst(member); - memberName = prefix ? prefix + "." + memberName : memberName; - serializeMember(memberName, value, member, fn); - }); - } - - function serializeMap(name, map, rules, fn) { - var i = 1; - util.each(map, function (key, value) { - var prefix = rules.flattened ? "." : ".entry."; - var position = prefix + i++ + "."; - var keyName = position + (rules.key.name || "key"); - var valueName = position + (rules.value.name || "value"); - serializeMember(name + keyName, key, rules.key, fn); - serializeMember(name + valueName, value, rules.value, fn); - }); - } - - function serializeList(name, list, rules, fn) { - var memberRules = rules.member || {}; - - if (list.length === 0) { - fn.call(this, name, null); - return; + }, + url: "/repos/:owner/:repo/pages/builds" + }, + retrieveCommunityProfileMetrics: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" } - - util.arrayEach(list, function (v, n) { - var suffix = "." + (n + 1); - if (rules.api.protocol === "ec2") { - // Do nothing for EC2 - suffix = suffix + ""; // make linter happy - } else if (rules.flattened) { - if (memberRules.name) { - var parts = name.split("."); - parts.pop(); - parts.push(ucfirst(memberRules)); - name = parts.join("."); - } - } else { - suffix = - "." + (memberRules.name ? memberRules.name : "member") + suffix; - } - serializeMember(name + suffix, v, memberRules, fn); - }); - } - - function serializeMember(name, value, rules, fn) { - if (value === null || value === undefined) return; - if (rules.type === "structure") { - serializeStructure(name, value, rules, fn); - } else if (rules.type === "list") { - serializeList(name, value, rules, fn); - } else if (rules.type === "map") { - serializeMap(name, value, rules, fn); - } else { - fn(name, rules.toWireFormat(value).toString()); + }, + url: "/repos/:owner/:repo/community/profile" + }, + testPushHook: { + method: "POST", + params: { + hook_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" } - } - - /** - * @api private - */ - module.exports = QueryParamSerializer; - - /***/ - }, - - /***/ 16612: /***/ ( - __unused_webpack_module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var AWS = __nccwpck_require__(28437); - - /** - * @api private - */ - var service = null; - - /** - * @api private - */ - var api = { - signatureVersion: "v4", - signingName: "rds-db", - operations: {}, - }; - - /** - * @api private - */ - var requiredAuthTokenOptions = { - region: "string", - hostname: "string", - port: "number", - username: "string", - }; - - /** - * A signer object can be used to generate an auth token to a database. - */ - AWS.RDS.Signer = AWS.util.inherit({ - /** - * Creates a signer object can be used to generate an auth token. - * - * @option options credentials [AWS.Credentials] the AWS credentials - * to sign requests with. Uses the default credential provider chain - * if not specified. - * @option options hostname [String] the hostname of the database to connect to. - * @option options port [Number] the port number the database is listening on. - * @option options region [String] the region the database is located in. - * @option options username [String] the username to login as. - * @example Passing in options to constructor - * var signer = new AWS.RDS.Signer({ - * credentials: new AWS.SharedIniFileCredentials({profile: 'default'}), - * region: 'us-east-1', - * hostname: 'db.us-east-1.rds.amazonaws.com', - * port: 8000, - * username: 'name' - * }); - */ - constructor: function Signer(options) { - this.options = options || {}; - }, - - /** - * @api private - * Strips the protocol from a url. - */ - convertUrlToAuthToken: function convertUrlToAuthToken(url) { - // we are always using https as the protocol - var protocol = "https://"; - if (url.indexOf(protocol) === 0) { - return url.substring(protocol.length); - } + }, + url: "/repos/:owner/:repo/hooks/:hook_id/tests" + }, + transfer: { + method: "POST", + params: { + new_owner: { + type: "string" + }, + owner: { + required: true, + type: "string" }, - - /** - * @overload getAuthToken(options = {}, [callback]) - * Generate an auth token to a database. - * @note You must ensure that you have static or previously resolved - * credentials if you call this method synchronously (with no callback), - * otherwise it may not properly sign the request. If you cannot guarantee - * this (you are using an asynchronous credential provider, i.e., EC2 - * IAM roles), you should always call this method with an asynchronous - * callback. - * - * @param options [map] The fields to use when generating an auth token. - * Any options specified here will be merged on top of any options passed - * to AWS.RDS.Signer: - * - * * **credentials** (AWS.Credentials) — the AWS credentials - * to sign requests with. Uses the default credential provider chain - * if not specified. - * * **hostname** (String) — the hostname of the database to connect to. - * * **port** (Number) — the port number the database is listening on. - * * **region** (String) — the region the database is located in. - * * **username** (String) — the username to login as. - * @return [String] if called synchronously (with no callback), returns the - * auth token. - * @return [null] nothing is returned if a callback is provided. - * @callback callback function (err, token) - * If a callback is supplied, it is called when an auth token has been generated. - * @param err [Error] the error object returned from the signer. - * @param token [String] the auth token. - * - * @example Generating an auth token synchronously - * var signer = new AWS.RDS.Signer({ - * // configure options - * region: 'us-east-1', - * username: 'default', - * hostname: 'db.us-east-1.amazonaws.com', - * port: 8000 - * }); - * var token = signer.getAuthToken({ - * // these options are merged with those defined when creating the signer, overriding in the case of a duplicate option - * // credentials are not specified here or when creating the signer, so default credential provider will be used - * username: 'test' // overriding username - * }); - * @example Generating an auth token asynchronously - * var signer = new AWS.RDS.Signer({ - * // configure options - * region: 'us-east-1', - * username: 'default', - * hostname: 'db.us-east-1.amazonaws.com', - * port: 8000 - * }); - * signer.getAuthToken({ - * // these options are merged with those defined when creating the signer, overriding in the case of a duplicate option - * // credentials are not specified here or when creating the signer, so default credential provider will be used - * username: 'test' // overriding username - * }, function(err, token) { - * if (err) { - * // handle error - * } else { - * // use token - * } - * }); - * - */ - getAuthToken: function getAuthToken(options, callback) { - if (typeof options === "function" && callback === undefined) { - callback = options; - options = {}; - } - var self = this; - var hasCallback = typeof callback === "function"; - // merge options with existing options - options = AWS.util.merge(this.options, options); - // validate options - var optionsValidation = this.validateAuthTokenOptions(options); - if (optionsValidation !== true) { - if (hasCallback) { - return callback(optionsValidation, null); - } - throw optionsValidation; - } - - // 15 minutes - var expires = 900; - // create service to generate a request from - var serviceOptions = { - region: options.region, - endpoint: new AWS.Endpoint(options.hostname + ":" + options.port), - paramValidation: false, - signatureVersion: "v4", - }; - if (options.credentials) { - serviceOptions.credentials = options.credentials; - } - service = new AWS.Service(serviceOptions); - // ensure the SDK is using sigv4 signing (config is not enough) - service.api = api; - - var request = service.makeRequest(); - // add listeners to request to properly build auth token - this.modifyRequestForAuthToken(request, options); - - if (hasCallback) { - request.presign(expires, function (err, url) { - if (url) { - url = self.convertUrlToAuthToken(url); - } - callback(err, url); - }); - } else { - var url = request.presign(expires); - return this.convertUrlToAuthToken(url); - } + repo: { + required: true, + type: "string" + }, + team_ids: { + type: "integer[]" + } + }, + url: "/repos/:owner/:repo/transfer" + }, + update: { + method: "PATCH", + params: { + allow_merge_commit: { + type: "boolean" }, - - /** - * @api private - * Modifies a request to allow the presigner to generate an auth token. - */ - modifyRequestForAuthToken: function modifyRequestForAuthToken( - request, - options - ) { - request.on("build", request.buildAsGet); - var httpRequest = request.httpRequest; - httpRequest.body = AWS.util.queryParamsToString({ - Action: "connect", - DBUser: options.username, - }); + allow_rebase_merge: { + type: "boolean" }, - - /** - * @api private - * Validates that the options passed in contain all the keys with values of the correct type that - * are needed to generate an auth token. - */ - validateAuthTokenOptions: function validateAuthTokenOptions(options) { - // iterate over all keys in options - var message = ""; - options = options || {}; - for (var key in requiredAuthTokenOptions) { - if ( - !Object.prototype.hasOwnProperty.call( - requiredAuthTokenOptions, - key - ) - ) { - continue; - } - if (typeof options[key] !== requiredAuthTokenOptions[key]) { - message += - "option '" + - key + - "' should have been type '" + - requiredAuthTokenOptions[key] + - "', was '" + - typeof options[key] + - "'.\n"; - } - } - if (message.length) { - return AWS.util.error(new Error(), { - code: "InvalidParameter", - message: message, - }); - } - return true; + allow_squash_merge: { + type: "boolean" }, - }); - - /***/ + archived: { + type: "boolean" + }, + default_branch: { + type: "string" + }, + delete_branch_on_merge: { + type: "boolean" + }, + description: { + type: "string" + }, + has_issues: { + type: "boolean" + }, + has_projects: { + type: "boolean" + }, + has_wiki: { + type: "boolean" + }, + homepage: { + type: "string" + }, + is_template: { + type: "boolean" + }, + name: { + type: "string" + }, + owner: { + required: true, + type: "string" + }, + private: { + type: "boolean" + }, + repo: { + required: true, + type: "string" + }, + visibility: { + enum: ["public", "private", "visibility", "internal"], + type: "string" + } + }, + url: "/repos/:owner/:repo" }, - - /***/ 81370: /***/ (module) => { - module.exports = { - //provide realtime clock for performance measurement - now: function now() { - var second = process.hrtime(); - return second[0] * 1000 + second[1] / 1000000; + updateBranchProtection: { + method: "PUT", + params: { + allow_deletions: { + type: "boolean" }, - }; - - /***/ + allow_force_pushes: { + allowNull: true, + type: "boolean" + }, + branch: { + required: true, + type: "string" + }, + enforce_admins: { + allowNull: true, + required: true, + type: "boolean" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + required_linear_history: { + type: "boolean" + }, + required_pull_request_reviews: { + allowNull: true, + required: true, + type: "object" + }, + "required_pull_request_reviews.dismiss_stale_reviews": { + type: "boolean" + }, + "required_pull_request_reviews.dismissal_restrictions": { + type: "object" + }, + "required_pull_request_reviews.dismissal_restrictions.teams": { + type: "string[]" + }, + "required_pull_request_reviews.dismissal_restrictions.users": { + type: "string[]" + }, + "required_pull_request_reviews.require_code_owner_reviews": { + type: "boolean" + }, + "required_pull_request_reviews.required_approving_review_count": { + type: "integer" + }, + required_status_checks: { + allowNull: true, + required: true, + type: "object" + }, + "required_status_checks.contexts": { + required: true, + type: "string[]" + }, + "required_status_checks.strict": { + required: true, + type: "boolean" + }, + restrictions: { + allowNull: true, + required: true, + type: "object" + }, + "restrictions.apps": { + type: "string[]" + }, + "restrictions.teams": { + required: true, + type: "string[]" + }, + "restrictions.users": { + required: true, + type: "string[]" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection" }, - - /***/ 18262: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var util = __nccwpck_require__(77985); - var regionConfig = __nccwpck_require__(80738); - - function generateRegionPrefix(region) { - if (!region) return null; - - var parts = region.split("-"); - if (parts.length < 3) return null; - return parts.slice(0, parts.length - 2).join("-") + "-*"; - } - - function derivedKeys(service) { - var region = service.config.region; - var regionPrefix = generateRegionPrefix(region); - var endpointPrefix = service.api.endpointPrefix; - - return [ - [region, endpointPrefix], - [regionPrefix, endpointPrefix], - [region, "*"], - [regionPrefix, "*"], - ["*", endpointPrefix], - ["*", "*"], - ].map(function (item) { - return item[0] && item[1] ? item.join("/") : null; - }); - } - - function applyConfig(service, config) { - util.each(config, function (key, value) { - if (key === "globalEndpoint") return; - if ( - service.config[key] === undefined || - service.config[key] === null - ) { - service.config[key] = value; - } - }); - } - - function configureEndpoint(service) { - var keys = derivedKeys(service); - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - if (!key) continue; - - if (Object.prototype.hasOwnProperty.call(regionConfig.rules, key)) { - var config = regionConfig.rules[key]; - if (typeof config === "string") { - config = regionConfig.patterns[config]; - } - - // set dualstack endpoint - if ( - service.config.useDualstack && - util.isDualstackAvailable(service) - ) { - config = util.copy(config); - config.endpoint = config.endpoint.replace( - /{service}\.({region}\.)?/, - "{service}.dualstack.{region}." - ); - } - - // set global endpoint - service.isGlobalEndpoint = !!config.globalEndpoint; - if (config.signingRegion) { - service.signingRegion = config.signingRegion; - } - - // signature version - if (!config.signatureVersion) config.signatureVersion = "v4"; - - // merge config - applyConfig(service, config); - return; - } + updateCommitComment: { + method: "PATCH", + params: { + body: { + required: true, + type: "string" + }, + comment_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" } - } - - function getEndpointSuffix(region) { - var regionRegexes = { - "^(us|eu|ap|sa|ca|me)\\-\\w+\\-\\d+$": "amazonaws.com", - "^cn\\-\\w+\\-\\d+$": "amazonaws.com.cn", - "^us\\-gov\\-\\w+\\-\\d+$": "amazonaws.com", - "^us\\-iso\\-\\w+\\-\\d+$": "c2s.ic.gov", - "^us\\-isob\\-\\w+\\-\\d+$": "sc2s.sgov.gov", - }; - var defaultSuffix = "amazonaws.com"; - var regexes = Object.keys(regionRegexes); - for (var i = 0; i < regexes.length; i++) { - var regionPattern = RegExp(regexes[i]); - var dnsSuffix = regionRegexes[regexes[i]]; - if (regionPattern.test(region)) return dnsSuffix; - } - return defaultSuffix; - } - - /** - * @api private - */ - module.exports = { - configureEndpoint: configureEndpoint, - getEndpointSuffix: getEndpointSuffix, - }; - - /***/ - }, - - /***/ 78652: /***/ ( - __unused_webpack_module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var AWS = __nccwpck_require__(28437); - var AcceptorStateMachine = __nccwpck_require__(68118); - var inherit = AWS.util.inherit; - var domain = AWS.util.domain; - var jmespath = __nccwpck_require__(87783); - - /** - * @api private - */ - var hardErrorStates = { success: 1, error: 1, complete: 1 }; - - function isTerminalState(machine) { - return Object.prototype.hasOwnProperty.call( - hardErrorStates, - machine._asm.currentState - ); - } - - var fsm = new AcceptorStateMachine(); - fsm.setupStates = function () { - var transition = function (_, done) { - var self = this; - self._haltHandlersOnError = false; - - self.emit(self._asm.currentState, function (err) { - if (err) { - if (isTerminalState(self)) { - if (domain && self.domain instanceof domain.Domain) { - err.domainEmitter = self; - err.domain = self.domain; - err.domainThrown = false; - self.domain.emit("error", err); - } else { - throw err; - } - } else { - self.response.error = err; - done(err); - } - } else { - done(self.response.error); - } - }); - }; - - this.addState("validate", "build", "error", transition); - this.addState("build", "afterBuild", "restart", transition); - this.addState("afterBuild", "sign", "restart", transition); - this.addState("sign", "send", "retry", transition); - this.addState("retry", "afterRetry", "afterRetry", transition); - this.addState("afterRetry", "sign", "error", transition); - this.addState("send", "validateResponse", "retry", transition); - this.addState( - "validateResponse", - "extractData", - "extractError", - transition - ); - this.addState("extractError", "extractData", "retry", transition); - this.addState("extractData", "success", "retry", transition); - this.addState("restart", "build", "error", transition); - this.addState("success", "complete", "complete", transition); - this.addState("error", "complete", "complete", transition); - this.addState("complete", null, null, transition); - }; - fsm.setupStates(); - - /** - * ## Asynchronous Requests - * - * All requests made through the SDK are asynchronous and use a - * callback interface. Each service method that kicks off a request - * returns an `AWS.Request` object that you can use to register - * callbacks. - * - * For example, the following service method returns the request - * object as "request", which can be used to register callbacks: - * - * ```javascript - * // request is an AWS.Request object - * var request = ec2.describeInstances(); - * - * // register callbacks on request to retrieve response data - * request.on('success', function(response) { - * console.log(response.data); - * }); - * ``` - * - * When a request is ready to be sent, the {send} method should - * be called: - * - * ```javascript - * request.send(); - * ``` - * - * Since registered callbacks may or may not be idempotent, requests should only - * be sent once. To perform the same operation multiple times, you will need to - * create multiple request objects, each with its own registered callbacks. - * - * ## Removing Default Listeners for Events - * - * Request objects are built with default listeners for the various events, - * depending on the service type. In some cases, you may want to remove - * some built-in listeners to customize behaviour. Doing this requires - * access to the built-in listener functions, which are exposed through - * the {AWS.EventListeners.Core} namespace. For instance, you may - * want to customize the HTTP handler used when sending a request. In this - * case, you can remove the built-in listener associated with the 'send' - * event, the {AWS.EventListeners.Core.SEND} listener and add your own. - * - * ## Multiple Callbacks and Chaining - * - * You can register multiple callbacks on any request object. The - * callbacks can be registered for different events, or all for the - * same event. In addition, you can chain callback registration, for - * example: - * - * ```javascript - * request. - * on('success', function(response) { - * console.log("Success!"); - * }). - * on('error', function(error, response) { - * console.log("Error!"); - * }). - * on('complete', function(response) { - * console.log("Always!"); - * }). - * send(); - * ``` - * - * The above example will print either "Success! Always!", or "Error! Always!", - * depending on whether the request succeeded or not. - * - * @!attribute httpRequest - * @readonly - * @!group HTTP Properties - * @return [AWS.HttpRequest] the raw HTTP request object - * containing request headers and body information - * sent by the service. - * - * @!attribute startTime - * @readonly - * @!group Operation Properties - * @return [Date] the time that the request started - * - * @!group Request Building Events - * - * @!event validate(request) - * Triggered when a request is being validated. Listeners - * should throw an error if the request should not be sent. - * @param request [Request] the request object being sent - * @see AWS.EventListeners.Core.VALIDATE_CREDENTIALS - * @see AWS.EventListeners.Core.VALIDATE_REGION - * @example Ensuring that a certain parameter is set before sending a request - * var req = s3.putObject(params); - * req.on('validate', function() { - * if (!req.params.Body.match(/^Hello\s/)) { - * throw new Error('Body must start with "Hello "'); - * } - * }); - * req.send(function(err, data) { ... }); - * - * @!event build(request) - * Triggered when the request payload is being built. Listeners - * should fill the necessary information to send the request - * over HTTP. - * @param (see AWS.Request~validate) - * @example Add a custom HTTP header to a request - * var req = s3.putObject(params); - * req.on('build', function() { - * req.httpRequest.headers['Custom-Header'] = 'value'; - * }); - * req.send(function(err, data) { ... }); - * - * @!event sign(request) - * Triggered when the request is being signed. Listeners should - * add the correct authentication headers and/or adjust the body, - * depending on the authentication mechanism being used. - * @param (see AWS.Request~validate) - * - * @!group Request Sending Events - * - * @!event send(response) - * Triggered when the request is ready to be sent. Listeners - * should call the underlying transport layer to initiate - * the sending of the request. - * @param response [Response] the response object - * @context [Request] the request object that was sent - * @see AWS.EventListeners.Core.SEND - * - * @!event retry(response) - * Triggered when a request failed and might need to be retried or redirected. - * If the response is retryable, the listener should set the - * `response.error.retryable` property to `true`, and optionally set - * `response.error.retryDelay` to the millisecond delay for the next attempt. - * In the case of a redirect, `response.error.redirect` should be set to - * `true` with `retryDelay` set to an optional delay on the next request. - * - * If a listener decides that a request should not be retried, - * it should set both `retryable` and `redirect` to false. - * - * Note that a retryable error will be retried at most - * {AWS.Config.maxRetries} times (based on the service object's config). - * Similarly, a request that is redirected will only redirect at most - * {AWS.Config.maxRedirects} times. - * - * @param (see AWS.Request~send) - * @context (see AWS.Request~send) - * @example Adding a custom retry for a 404 response - * request.on('retry', function(response) { - * // this resource is not yet available, wait 10 seconds to get it again - * if (response.httpResponse.statusCode === 404 && response.error) { - * response.error.retryable = true; // retry this error - * response.error.retryDelay = 10000; // wait 10 seconds - * } - * }); - * - * @!group Data Parsing Events - * - * @!event extractError(response) - * Triggered on all non-2xx requests so that listeners can extract - * error details from the response body. Listeners to this event - * should set the `response.error` property. - * @param (see AWS.Request~send) - * @context (see AWS.Request~send) - * - * @!event extractData(response) - * Triggered in successful requests to allow listeners to - * de-serialize the response body into `response.data`. - * @param (see AWS.Request~send) - * @context (see AWS.Request~send) - * - * @!group Completion Events - * - * @!event success(response) - * Triggered when the request completed successfully. - * `response.data` will contain the response data and - * `response.error` will be null. - * @param (see AWS.Request~send) - * @context (see AWS.Request~send) - * - * @!event error(error, response) - * Triggered when an error occurs at any point during the - * request. `response.error` will contain details about the error - * that occurred. `response.data` will be null. - * @param error [Error] the error object containing details about - * the error that occurred. - * @param (see AWS.Request~send) - * @context (see AWS.Request~send) - * - * @!event complete(response) - * Triggered whenever a request cycle completes. `response.error` - * should be checked, since the request may have failed. - * @param (see AWS.Request~send) - * @context (see AWS.Request~send) - * - * @!group HTTP Events - * - * @!event httpHeaders(statusCode, headers, response, statusMessage) - * Triggered when headers are sent by the remote server - * @param statusCode [Integer] the HTTP response code - * @param headers [map] the response headers - * @param (see AWS.Request~send) - * @param statusMessage [String] A status message corresponding to the HTTP - * response code - * @context (see AWS.Request~send) - * - * @!event httpData(chunk, response) - * Triggered when data is sent by the remote server - * @param chunk [Buffer] the buffer data containing the next data chunk - * from the server - * @param (see AWS.Request~send) - * @context (see AWS.Request~send) - * @see AWS.EventListeners.Core.HTTP_DATA - * - * @!event httpUploadProgress(progress, response) - * Triggered when the HTTP request has uploaded more data - * @param progress [map] An object containing the `loaded` and `total` bytes - * of the request. - * @param (see AWS.Request~send) - * @context (see AWS.Request~send) - * @note This event will not be emitted in Node.js 0.8.x. - * - * @!event httpDownloadProgress(progress, response) - * Triggered when the HTTP request has downloaded more data - * @param progress [map] An object containing the `loaded` and `total` bytes - * of the request. - * @param (see AWS.Request~send) - * @context (see AWS.Request~send) - * @note This event will not be emitted in Node.js 0.8.x. - * - * @!event httpError(error, response) - * Triggered when the HTTP request failed - * @param error [Error] the error object that was thrown - * @param (see AWS.Request~send) - * @context (see AWS.Request~send) - * - * @!event httpDone(response) - * Triggered when the server is finished sending data - * @param (see AWS.Request~send) - * @context (see AWS.Request~send) - * - * @see AWS.Response - */ - AWS.Request = inherit({ - /** - * Creates a request for an operation on a given service with - * a set of input parameters. - * - * @param service [AWS.Service] the service to perform the operation on - * @param operation [String] the operation to perform on the service - * @param params [Object] parameters to send to the operation. - * See the operation's documentation for the format of the - * parameters. - */ - constructor: function Request(service, operation, params) { - var endpoint = service.endpoint; - var region = service.config.region; - var customUserAgent = service.config.customUserAgent; - - if (service.isGlobalEndpoint) { - if (service.signingRegion) { - region = service.signingRegion; - } else { - region = "us-east-1"; - } - } - - this.domain = domain && domain.active; - this.service = service; - this.operation = operation; - this.params = params || {}; - this.httpRequest = new AWS.HttpRequest(endpoint, region); - this.httpRequest.appendToUserAgent(customUserAgent); - this.startTime = service.getSkewCorrectedDate(); - - this.response = new AWS.Response(this); - this._asm = new AcceptorStateMachine(fsm.states, "validate"); - this._haltHandlersOnError = false; - - AWS.SequentialExecutor.call(this); - this.emit = this.emitEvent; - }, - - /** - * @!group Sending a Request - */ - - /** - * @overload send(callback = null) - * Sends the request object. - * - * @callback callback function(err, data) - * If a callback is supplied, it is called when a response is returned - * from the service. - * @context [AWS.Request] the request object being sent. - * @param err [Error] the error object returned from the request. - * Set to `null` if the request is successful. - * @param data [Object] the de-serialized data returned from - * the request. Set to `null` if a request error occurs. - * @example Sending a request with a callback - * request = s3.putObject({Bucket: 'bucket', Key: 'key'}); - * request.send(function(err, data) { console.log(err, data); }); - * @example Sending a request with no callback (using event handlers) - * request = s3.putObject({Bucket: 'bucket', Key: 'key'}); - * request.on('complete', function(response) { ... }); // register a callback - * request.send(); - */ - send: function send(callback) { - if (callback) { - // append to user agent - this.httpRequest.appendToUserAgent("callback"); - this.on("complete", function (resp) { - callback.call(resp, resp.error, resp.data); - }); - } - this.runTo(); - - return this.response; - }, - - /** - * @!method promise() - * Sends the request and returns a 'thenable' promise. - * - * Two callbacks can be provided to the `then` method on the returned promise. - * The first callback will be called if the promise is fulfilled, and the second - * callback will be called if the promise is rejected. - * @callback fulfilledCallback function(data) - * Called if the promise is fulfilled. - * @param data [Object] the de-serialized data returned from the request. - * @callback rejectedCallback function(error) - * Called if the promise is rejected. - * @param error [Error] the error object returned from the request. - * @return [Promise] A promise that represents the state of the request. - * @example Sending a request using promises. - * var request = s3.putObject({Bucket: 'bucket', Key: 'key'}); - * var result = request.promise(); - * result.then(function(data) { ... }, function(error) { ... }); - */ - - /** - * @api private - */ - build: function build(callback) { - return this.runTo("send", callback); - }, - - /** - * @api private - */ - runTo: function runTo(state, done) { - this._asm.runTo(state, done, this); - return this; - }, - - /** - * Aborts a request, emitting the error and complete events. - * - * @!macro nobrowser - * @example Aborting a request after sending - * var params = { - * Bucket: 'bucket', Key: 'key', - * Body: Buffer.alloc(1024 * 1024 * 5) // 5MB payload - * }; - * var request = s3.putObject(params); - * request.send(function (err, data) { - * if (err) console.log("Error:", err.code, err.message); - * else console.log(data); - * }); - * - * // abort request in 1 second - * setTimeout(request.abort.bind(request), 1000); - * - * // prints "Error: RequestAbortedError Request aborted by user" - * @return [AWS.Request] the same request object, for chaining. - * @since v1.4.0 - */ - abort: function abort() { - this.removeAllListeners("validateResponse"); - this.removeAllListeners("extractError"); - this.on("validateResponse", function addAbortedError(resp) { - resp.error = AWS.util.error(new Error("Request aborted by user"), { - code: "RequestAbortedError", - retryable: false, - }); - }); - - if (this.httpRequest.stream && !this.httpRequest.stream.didCallback) { - // abort HTTP stream - this.httpRequest.stream.abort(); - if (this.httpRequest._abortCallback) { - this.httpRequest._abortCallback(); - } else { - this.removeAllListeners("send"); // haven't sent yet, so let's not - } - } - - return this; - }, - - /** - * Iterates over each page of results given a pageable request, calling - * the provided callback with each page of data. After all pages have been - * retrieved, the callback is called with `null` data. - * - * @note This operation can generate multiple requests to a service. - * @example Iterating over multiple pages of objects in an S3 bucket - * var pages = 1; - * s3.listObjects().eachPage(function(err, data) { - * if (err) return; - * console.log("Page", pages++); - * console.log(data); - * }); - * @example Iterating over multiple pages with an asynchronous callback - * s3.listObjects(params).eachPage(function(err, data, done) { - * doSomethingAsyncAndOrExpensive(function() { - * // The next page of results isn't fetched until done is called - * done(); - * }); - * }); - * @callback callback function(err, data, [doneCallback]) - * Called with each page of resulting data from the request. If the - * optional `doneCallback` is provided in the function, it must be called - * when the callback is complete. - * - * @param err [Error] an error object, if an error occurred. - * @param data [Object] a single page of response data. If there is no - * more data, this object will be `null`. - * @param doneCallback [Function] an optional done callback. If this - * argument is defined in the function declaration, it should be called - * when the next page is ready to be retrieved. This is useful for - * controlling serial pagination across asynchronous operations. - * @return [Boolean] if the callback returns `false`, pagination will - * stop. - * - * @see AWS.Request.eachItem - * @see AWS.Response.nextPage - * @since v1.4.0 - */ - eachPage: function eachPage(callback) { - // Make all callbacks async-ish - callback = AWS.util.fn.makeAsync(callback, 3); - - function wrappedCallback(response) { - callback.call(response, response.error, response.data, function ( - result - ) { - if (result === false) return; - - if (response.hasNextPage()) { - response.nextPage().on("complete", wrappedCallback).send(); - } else { - callback.call(response, null, null, AWS.util.fn.noop); - } - }); - } - - this.on("complete", wrappedCallback).send(); - }, - - /** - * Enumerates over individual items of a request, paging the responses if - * necessary. - * - * @api experimental - * @since v1.4.0 - */ - eachItem: function eachItem(callback) { - var self = this; - function wrappedCallback(err, data) { - if (err) return callback(err, null); - if (data === null) return callback(null, null); - - var config = self.service.paginationConfig(self.operation); - var resultKey = config.resultKey; - if (Array.isArray(resultKey)) resultKey = resultKey[0]; - var items = jmespath.search(data, resultKey); - var continueIteration = true; - AWS.util.arrayEach(items, function (item) { - continueIteration = callback(null, item); - if (continueIteration === false) { - return AWS.util.abort; - } - }); - return continueIteration; - } - - this.eachPage(wrappedCallback); - }, - - /** - * @return [Boolean] whether the operation can return multiple pages of - * response data. - * @see AWS.Response.eachPage - * @since v1.4.0 - */ - isPageable: function isPageable() { - return this.service.paginationConfig(this.operation) ? true : false; - }, - - /** - * Sends the request and converts the request object into a readable stream - * that can be read from or piped into a writable stream. - * - * @note The data read from a readable stream contains only - * the raw HTTP body contents. - * @example Manually reading from a stream - * request.createReadStream().on('data', function(data) { - * console.log("Got data:", data.toString()); - * }); - * @example Piping a request body into a file - * var out = fs.createWriteStream('/path/to/outfile.jpg'); - * s3.service.getObject(params).createReadStream().pipe(out); - * @return [Stream] the readable stream object that can be piped - * or read from (by registering 'data' event listeners). - * @!macro nobrowser - */ - createReadStream: function createReadStream() { - var streams = AWS.util.stream; - var req = this; - var stream = null; - - if (AWS.HttpClient.streamsApiVersion === 2) { - stream = new streams.PassThrough(); - process.nextTick(function () { - req.send(); - }); - } else { - stream = new streams.Stream(); - stream.readable = true; - - stream.sent = false; - stream.on("newListener", function (event) { - if (!stream.sent && event === "data") { - stream.sent = true; - process.nextTick(function () { - req.send(); - }); - } - }); - } - - this.on("error", function (err) { - stream.emit("error", err); - }); - - this.on("httpHeaders", function streamHeaders( - statusCode, - headers, - resp - ) { - if (statusCode < 300) { - req.removeListener("httpData", AWS.EventListeners.Core.HTTP_DATA); - req.removeListener( - "httpError", - AWS.EventListeners.Core.HTTP_ERROR - ); - req.on("httpError", function streamHttpError(error) { - resp.error = error; - resp.error.retryable = false; - }); - - var shouldCheckContentLength = false; - var expectedLen; - if (req.httpRequest.method !== "HEAD") { - expectedLen = parseInt(headers["content-length"], 10); - } - if ( - expectedLen !== undefined && - !isNaN(expectedLen) && - expectedLen >= 0 - ) { - shouldCheckContentLength = true; - var receivedLen = 0; - } - - var checkContentLengthAndEmit = function checkContentLengthAndEmit() { - if (shouldCheckContentLength && receivedLen !== expectedLen) { - stream.emit( - "error", - AWS.util.error( - new Error( - "Stream content length mismatch. Received " + - receivedLen + - " of " + - expectedLen + - " bytes." - ), - { code: "StreamContentLengthMismatch" } - ) - ); - } else if (AWS.HttpClient.streamsApiVersion === 2) { - stream.end(); - } else { - stream.emit("end"); - } - }; - - var httpStream = resp.httpResponse.createUnbufferedStream(); - - if (AWS.HttpClient.streamsApiVersion === 2) { - if (shouldCheckContentLength) { - var lengthAccumulator = new streams.PassThrough(); - lengthAccumulator._write = function (chunk) { - if (chunk && chunk.length) { - receivedLen += chunk.length; - } - return streams.PassThrough.prototype._write.apply( - this, - arguments - ); - }; - - lengthAccumulator.on("end", checkContentLengthAndEmit); - stream.on("error", function (err) { - shouldCheckContentLength = false; - httpStream.unpipe(lengthAccumulator); - lengthAccumulator.emit("end"); - lengthAccumulator.end(); - }); - httpStream - .pipe(lengthAccumulator) - .pipe(stream, { end: false }); - } else { - httpStream.pipe(stream); - } - } else { - if (shouldCheckContentLength) { - httpStream.on("data", function (arg) { - if (arg && arg.length) { - receivedLen += arg.length; - } - }); - } - - httpStream.on("data", function (arg) { - stream.emit("data", arg); - }); - httpStream.on("end", checkContentLengthAndEmit); - } - - httpStream.on("error", function (err) { - shouldCheckContentLength = false; - stream.emit("error", err); - }); - } - }); - - return stream; + }, + url: "/repos/:owner/:repo/comments/:comment_id" + }, + updateFile: { + deprecated: "octokit.repos.updateFile() has been renamed to octokit.repos.createOrUpdateFile() (2019-06-07)", + method: "PUT", + params: { + author: { + type: "object" }, - - /** - * @param [Array,Response] args This should be the response object, - * or an array of args to send to the event. - * @api private - */ - emitEvent: function emit(eventName, args, done) { - if (typeof args === "function") { - done = args; - args = null; - } - if (!done) done = function () {}; - if (!args) args = this.eventParameters(eventName, this.response); - - var origEmit = AWS.SequentialExecutor.prototype.emit; - origEmit.call(this, eventName, args, function (err) { - if (err) this.response.error = err; - done.call(this, err); - }); + "author.email": { + required: true, + type: "string" }, - - /** - * @api private - */ - eventParameters: function eventParameters(eventName) { - switch (eventName) { - case "restart": - case "validate": - case "sign": - case "build": - case "afterValidate": - case "afterBuild": - return [this]; - case "error": - return [this.response.error, this.response]; - default: - return [this.response]; - } + "author.name": { + required: true, + type: "string" }, - - /** - * @api private - */ - presign: function presign(expires, callback) { - if (!callback && typeof expires === "function") { - callback = expires; - expires = null; - } - return new AWS.Signers.Presign().sign( - this.toGet(), - expires, - callback - ); + branch: { + type: "string" }, - - /** - * @api private - */ - isPresigned: function isPresigned() { - return Object.prototype.hasOwnProperty.call( - this.httpRequest.headers, - "presigned-expires" - ); + committer: { + type: "object" }, - - /** - * @api private - */ - toUnauthenticated: function toUnauthenticated() { - this._unAuthenticated = true; - this.removeListener( - "validate", - AWS.EventListeners.Core.VALIDATE_CREDENTIALS - ); - this.removeListener("sign", AWS.EventListeners.Core.SIGN); - return this; + "committer.email": { + required: true, + type: "string" }, - - /** - * @api private - */ - toGet: function toGet() { - if ( - this.service.api.protocol === "query" || - this.service.api.protocol === "ec2" - ) { - this.removeListener("build", this.buildAsGet); - this.addListener("build", this.buildAsGet); - } - return this; + "committer.name": { + required: true, + type: "string" }, - - /** - * @api private - */ - buildAsGet: function buildAsGet(request) { - request.httpRequest.method = "GET"; - request.httpRequest.path = - request.service.endpoint.path + "?" + request.httpRequest.body; - request.httpRequest.body = ""; - - // don't need these headers on a GET request - delete request.httpRequest.headers["Content-Length"]; - delete request.httpRequest.headers["Content-Type"]; + content: { + required: true, + type: "string" }, - - /** - * @api private - */ - haltHandlersOnError: function haltHandlersOnError() { - this._haltHandlersOnError = true; + message: { + required: true, + type: "string" }, - }); - - /** - * @api private - */ - AWS.Request.addPromisesToClass = function addPromisesToClass( - PromiseDependency - ) { - this.prototype.promise = function promise() { - var self = this; - // append to user agent - this.httpRequest.appendToUserAgent("promise"); - return new PromiseDependency(function (resolve, reject) { - self.on("complete", function (resp) { - if (resp.error) { - reject(resp.error); - } else { - // define $response property so that it is not enumerable - // this prevents circular reference errors when stringifying the JSON object - resolve( - Object.defineProperty(resp.data || {}, "$response", { - value: resp, - }) - ); - } - }); - self.runTo(); - }); - }; - }; - - /** - * @api private - */ - AWS.Request.deletePromisesFromClass = function deletePromisesFromClass() { - delete this.prototype.promise; - }; - - AWS.util.addPromises(AWS.Request); - - AWS.util.mixin(AWS.Request, AWS.SequentialExecutor); - - /***/ - }, - - /***/ 7246: /***/ ( - __unused_webpack_module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - /** - * Copyright 2012-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). You - * may not use this file except in compliance with the License. A copy of - * the License is located at - * - * http://aws.amazon.com/apache2.0/ - * - * or in the "license" file accompanying this file. This file is - * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF - * ANY KIND, either express or implied. See the License for the specific - * language governing permissions and limitations under the License. - */ - - var AWS = __nccwpck_require__(28437); - var inherit = AWS.util.inherit; - var jmespath = __nccwpck_require__(87783); - - /** - * @api private - */ - function CHECK_ACCEPTORS(resp) { - var waiter = resp.request._waiter; - var acceptors = waiter.config.acceptors; - var acceptorMatched = false; - var state = "retry"; - - acceptors.forEach(function (acceptor) { - if (!acceptorMatched) { - var matcher = waiter.matchers[acceptor.matcher]; - if ( - matcher && - matcher(resp, acceptor.expected, acceptor.argument) - ) { - acceptorMatched = true; - state = acceptor.state; - } - } - }); - - if (!acceptorMatched && resp.error) state = "failure"; - - if (state === "success") { - waiter.setSuccess(resp); - } else { - waiter.setError(resp, state === "retry"); + owner: { + required: true, + type: "string" + }, + path: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + sha: { + type: "string" } - } - - /** - * @api private - */ - AWS.ResourceWaiter = inherit({ - /** - * Waits for a given state on a service object - * @param service [Service] the service object to wait on - * @param state [String] the state (defined in waiter configuration) to wait - * for. - * @example Create a waiter for running EC2 instances - * var ec2 = new AWS.EC2; - * var waiter = new AWS.ResourceWaiter(ec2, 'instanceRunning'); - */ - constructor: function constructor(service, state) { - this.service = service; - this.state = state; - this.loadWaiterConfig(this.state); - }, - - service: null, - - state: null, - - config: null, - - matchers: { - path: function (resp, expected, argument) { - try { - var result = jmespath.search(resp.data, argument); - } catch (err) { - return false; - } - - return jmespath.strictDeepEqual(result, expected); - }, - - pathAll: function (resp, expected, argument) { - try { - var results = jmespath.search(resp.data, argument); - } catch (err) { - return false; - } - - if (!Array.isArray(results)) results = [results]; - var numResults = results.length; - if (!numResults) return false; - for (var ind = 0; ind < numResults; ind++) { - if (!jmespath.strictDeepEqual(results[ind], expected)) { - return false; - } - } - return true; - }, - - pathAny: function (resp, expected, argument) { - try { - var results = jmespath.search(resp.data, argument); - } catch (err) { - return false; - } - - if (!Array.isArray(results)) results = [results]; - var numResults = results.length; - for (var ind = 0; ind < numResults; ind++) { - if (jmespath.strictDeepEqual(results[ind], expected)) { - return true; - } - } - return false; - }, - - status: function (resp, expected) { - var statusCode = resp.httpResponse.statusCode; - return typeof statusCode === "number" && statusCode === expected; - }, - - error: function (resp, expected) { - if (typeof expected === "string" && resp.error) { - return expected === resp.error.code; - } - // if expected is not string, can be boolean indicating presence of error - return expected === !!resp.error; - }, + }, + url: "/repos/:owner/:repo/contents/:path" + }, + updateHook: { + method: "PATCH", + params: { + active: { + type: "boolean" }, - - listeners: new AWS.SequentialExecutor().addNamedListeners(function ( - add - ) { - add("RETRY_CHECK", "retry", function (resp) { - var waiter = resp.request._waiter; - if (resp.error && resp.error.code === "ResourceNotReady") { - resp.error.retryDelay = (waiter.config.delay || 0) * 1000; - } - }); - - add("CHECK_OUTPUT", "extractData", CHECK_ACCEPTORS); - - add("CHECK_ERROR", "extractError", CHECK_ACCEPTORS); - }), - - /** - * @return [AWS.Request] - */ - wait: function wait(params, callback) { - if (typeof params === "function") { - callback = params; - params = undefined; - } - - if (params && params.$waiter) { - params = AWS.util.copy(params); - if (typeof params.$waiter.delay === "number") { - this.config.delay = params.$waiter.delay; - } - if (typeof params.$waiter.maxAttempts === "number") { - this.config.maxAttempts = params.$waiter.maxAttempts; - } - delete params.$waiter; - } - - var request = this.service.makeRequest(this.config.operation, params); - request._waiter = this; - request.response.maxRetries = this.config.maxAttempts; - request.addListeners(this.listeners); - - if (callback) request.send(callback); - return request; + add_events: { + type: "string[]" }, - - setSuccess: function setSuccess(resp) { - resp.error = null; - resp.data = resp.data || {}; - resp.request.removeAllListeners("extractData"); + config: { + type: "object" }, - - setError: function setError(resp, retryable) { - resp.data = null; - resp.error = AWS.util.error(resp.error || new Error(), { - code: "ResourceNotReady", - message: "Resource is not in the state " + this.state, - retryable: retryable, - }); + "config.content_type": { + type: "string" }, - - /** - * Loads waiter configuration from API configuration - * - * @api private - */ - loadWaiterConfig: function loadWaiterConfig(state) { - if (!this.service.api.waiters[state]) { - throw new AWS.util.error(new Error(), { - code: "StateNotFoundError", - message: "State " + state + " not found.", - }); - } - - this.config = AWS.util.copy(this.service.api.waiters[state]); + "config.insecure_ssl": { + type: "string" }, - }); - - /***/ - }, - - /***/ 58743: /***/ ( - __unused_webpack_module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var AWS = __nccwpck_require__(28437); - var inherit = AWS.util.inherit; - var jmespath = __nccwpck_require__(87783); - - /** - * This class encapsulates the response information - * from a service request operation sent through {AWS.Request}. - * The response object has two main properties for getting information - * back from a request: - * - * ## The `data` property - * - * The `response.data` property contains the serialized object data - * retrieved from the service request. For instance, for an - * Amazon DynamoDB `listTables` method call, the response data might - * look like: - * - * ``` - * > resp.data - * { TableNames: - * [ 'table1', 'table2', ... ] } - * ``` - * - * The `data` property can be null if an error occurs (see below). - * - * ## The `error` property - * - * In the event of a service error (or transfer error), the - * `response.error` property will be filled with the given - * error data in the form: - * - * ``` - * { code: 'SHORT_UNIQUE_ERROR_CODE', - * message: 'Some human readable error message' } - * ``` - * - * In the case of an error, the `data` property will be `null`. - * Note that if you handle events that can be in a failure state, - * you should always check whether `response.error` is set - * before attempting to access the `response.data` property. - * - * @!attribute data - * @readonly - * @!group Data Properties - * @note Inside of a {AWS.Request~httpData} event, this - * property contains a single raw packet instead of the - * full de-serialized service response. - * @return [Object] the de-serialized response data - * from the service. - * - * @!attribute error - * An structure containing information about a service - * or networking error. - * @readonly - * @!group Data Properties - * @note This attribute is only filled if a service or - * networking error occurs. - * @return [Error] - * * code [String] a unique short code representing the - * error that was emitted. - * * message [String] a longer human readable error message - * * retryable [Boolean] whether the error message is - * retryable. - * * statusCode [Numeric] in the case of a request that reached the service, - * this value contains the response status code. - * * time [Date] the date time object when the error occurred. - * * hostname [String] set when a networking error occurs to easily - * identify the endpoint of the request. - * * region [String] set when a networking error occurs to easily - * identify the region of the request. - * - * @!attribute requestId - * @readonly - * @!group Data Properties - * @return [String] the unique request ID associated with the response. - * Log this value when debugging requests for AWS support. - * - * @!attribute retryCount - * @readonly - * @!group Operation Properties - * @return [Integer] the number of retries that were - * attempted before the request was completed. - * - * @!attribute redirectCount - * @readonly - * @!group Operation Properties - * @return [Integer] the number of redirects that were - * followed before the request was completed. - * - * @!attribute httpResponse - * @readonly - * @!group HTTP Properties - * @return [AWS.HttpResponse] the raw HTTP response object - * containing the response headers and body information - * from the server. - * - * @see AWS.Request - */ - AWS.Response = inherit({ - /** - * @api private - */ - constructor: function Response(request) { - this.request = request; - this.data = null; - this.error = null; - this.retryCount = 0; - this.redirectCount = 0; - this.httpResponse = new AWS.HttpResponse(); - if (request) { - this.maxRetries = request.service.numRetries(); - this.maxRedirects = request.service.config.maxRedirects; - } + "config.secret": { + type: "string" }, - - /** - * Creates a new request for the next page of response data, calling the - * callback with the page data if a callback is provided. - * - * @callback callback function(err, data) - * Called when a page of data is returned from the next request. - * - * @param err [Error] an error object, if an error occurred in the request - * @param data [Object] the next page of data, or null, if there are no - * more pages left. - * @return [AWS.Request] the request object for the next page of data - * @return [null] if no callback is provided and there are no pages left - * to retrieve. - * @since v1.4.0 - */ - nextPage: function nextPage(callback) { - var config; - var service = this.request.service; - var operation = this.request.operation; - try { - config = service.paginationConfig(operation, true); - } catch (e) { - this.error = e; - } - - if (!this.hasNextPage()) { - if (callback) callback(this.error, null); - else if (this.error) throw this.error; - return null; - } - - var params = AWS.util.copy(this.request.params); - if (!this.nextPageTokens) { - return callback ? callback(null, null) : null; - } else { - var inputTokens = config.inputToken; - if (typeof inputTokens === "string") inputTokens = [inputTokens]; - for (var i = 0; i < inputTokens.length; i++) { - params[inputTokens[i]] = this.nextPageTokens[i]; - } - return service.makeRequest( - this.request.operation, - params, - callback - ); - } + "config.url": { + required: true, + type: "string" }, - - /** - * @return [Boolean] whether more pages of data can be returned by further - * requests - * @since v1.4.0 - */ - hasNextPage: function hasNextPage() { - this.cacheNextPageTokens(); - if (this.nextPageTokens) return true; - if (this.nextPageTokens === undefined) return undefined; - else return false; - }, - - /** - * @api private - */ - cacheNextPageTokens: function cacheNextPageTokens() { - if (Object.prototype.hasOwnProperty.call(this, "nextPageTokens")) - return this.nextPageTokens; - this.nextPageTokens = undefined; - - var config = this.request.service.paginationConfig( - this.request.operation - ); - if (!config) return this.nextPageTokens; - - this.nextPageTokens = null; - if (config.moreResults) { - if (!jmespath.search(this.data, config.moreResults)) { - return this.nextPageTokens; - } - } - - var exprs = config.outputToken; - if (typeof exprs === "string") exprs = [exprs]; - AWS.util.arrayEach.call(this, exprs, function (expr) { - var output = jmespath.search(this.data, expr); - if (output) { - this.nextPageTokens = this.nextPageTokens || []; - this.nextPageTokens.push(output); - } - }); - - return this.nextPageTokens; + events: { + type: "string[]" }, - }); - - /***/ - }, - - /***/ 81600: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var AWS = __nccwpck_require__(28437); - var byteLength = AWS.util.string.byteLength; - var Buffer = AWS.util.Buffer; - - /** - * The managed uploader allows for easy and efficient uploading of buffers, - * blobs, or streams, using a configurable amount of concurrency to perform - * multipart uploads where possible. This abstraction also enables uploading - * streams of unknown size due to the use of multipart uploads. - * - * To construct a managed upload object, see the {constructor} function. - * - * ## Tracking upload progress - * - * The managed upload object can also track progress by attaching an - * 'httpUploadProgress' listener to the upload manager. This event is similar - * to {AWS.Request~httpUploadProgress} but groups all concurrent upload progress - * into a single event. See {AWS.S3.ManagedUpload~httpUploadProgress} for more - * information. - * - * ## Handling Multipart Cleanup - * - * By default, this class will automatically clean up any multipart uploads - * when an individual part upload fails. This behavior can be disabled in order - * to manually handle failures by setting the `leavePartsOnError` configuration - * option to `true` when initializing the upload object. - * - * @!event httpUploadProgress(progress) - * Triggered when the uploader has uploaded more data. - * @note The `total` property may not be set if the stream being uploaded has - * not yet finished chunking. In this case the `total` will be undefined - * until the total stream size is known. - * @note This event will not be emitted in Node.js 0.8.x. - * @param progress [map] An object containing the `loaded` and `total` bytes - * of the request and the `key` of the S3 object. Note that `total` may be undefined until the payload - * size is known. - * @context (see AWS.Request~send) - */ - AWS.S3.ManagedUpload = AWS.util.inherit({ - /** - * Creates a managed upload object with a set of configuration options. - * - * @note A "Body" parameter is required to be set prior to calling {send}. - * @note In Node.js, sending "Body" as {https://nodejs.org/dist/latest/docs/api/stream.html#stream_object_mode object-mode stream} - * may result in upload hangs. Using buffer stream is preferable. - * @option options params [map] a map of parameters to pass to the upload - * requests. The "Body" parameter is required to be specified either on - * the service or in the params option. - * @note ContentMD5 should not be provided when using the managed upload object. - * Instead, setting "computeChecksums" to true will enable automatic ContentMD5 generation - * by the managed upload object. - * @option options queueSize [Number] (4) the size of the concurrent queue - * manager to upload parts in parallel. Set to 1 for synchronous uploading - * of parts. Note that the uploader will buffer at most queueSize * partSize - * bytes into memory at any given time. - * @option options partSize [Number] (5mb) the size in bytes for each - * individual part to be uploaded. Adjust the part size to ensure the number - * of parts does not exceed {maxTotalParts}. See {minPartSize} for the - * minimum allowed part size. - * @option options leavePartsOnError [Boolean] (false) whether to abort the - * multipart upload if an error occurs. Set to true if you want to handle - * failures manually. - * @option options service [AWS.S3] an optional S3 service object to use for - * requests. This object might have bound parameters used by the uploader. - * @option options tags [Array] The tags to apply to the uploaded object. - * Each tag should have a `Key` and `Value` keys. - * @example Creating a default uploader for a stream object - * var upload = new AWS.S3.ManagedUpload({ - * params: {Bucket: 'bucket', Key: 'key', Body: stream} - * }); - * @example Creating an uploader with concurrency of 1 and partSize of 10mb - * var upload = new AWS.S3.ManagedUpload({ - * partSize: 10 * 1024 * 1024, queueSize: 1, - * params: {Bucket: 'bucket', Key: 'key', Body: stream} - * }); - * @example Creating an uploader with tags - * var upload = new AWS.S3.ManagedUpload({ - * params: {Bucket: 'bucket', Key: 'key', Body: stream}, - * tags: [{Key: 'tag1', Value: 'value1'}, {Key: 'tag2', Value: 'value2'}] - * }); - * @see send - */ - constructor: function ManagedUpload(options) { - var self = this; - AWS.SequentialExecutor.call(self); - self.body = null; - self.sliceFn = null; - self.callback = null; - self.parts = {}; - self.completeInfo = []; - self.fillQueue = function () { - self.callback( - new Error("Unsupported body payload " + typeof self.body) - ); - }; - - self.configure(options); + hook_id: { + required: true, + type: "integer" }, - - /** - * @api private - */ - configure: function configure(options) { - options = options || {}; - this.partSize = this.minPartSize; - - if (options.queueSize) this.queueSize = options.queueSize; - if (options.partSize) this.partSize = options.partSize; - if (options.leavePartsOnError) this.leavePartsOnError = true; - if (options.tags) { - if (!Array.isArray(options.tags)) { - throw new Error( - "Tags must be specified as an array; " + - typeof options.tags + - " provided." - ); - } - this.tags = options.tags; - } - - if (this.partSize < this.minPartSize) { - throw new Error( - "partSize must be greater than " + this.minPartSize - ); - } - - this.service = options.service; - this.bindServiceObject(options.params); - this.validateBody(); - this.adjustTotalBytes(); - }, - - /** - * @api private - */ - leavePartsOnError: false, - - /** - * @api private - */ - queueSize: 4, - - /** - * @api private - */ - partSize: null, - - /** - * @readonly - * @return [Number] the minimum number of bytes for an individual part - * upload. - */ - minPartSize: 1024 * 1024 * 5, - - /** - * @readonly - * @return [Number] the maximum allowed number of parts in a multipart upload. - */ - maxTotalParts: 10000, - - /** - * Initiates the managed upload for the payload. - * - * @callback callback function(err, data) - * @param err [Error] an error or null if no error occurred. - * @param data [map] The response data from the successful upload: - * * `Location` (String) the URL of the uploaded object - * * `ETag` (String) the ETag of the uploaded object - * * `Bucket` (String) the bucket to which the object was uploaded - * * `Key` (String) the key to which the object was uploaded - * @example Sending a managed upload object - * var params = {Bucket: 'bucket', Key: 'key', Body: stream}; - * var upload = new AWS.S3.ManagedUpload({params: params}); - * upload.send(function(err, data) { - * console.log(err, data); - * }); - */ - send: function (callback) { - var self = this; - self.failed = false; - self.callback = - callback || - function (err) { - if (err) throw err; - }; - - var runFill = true; - if (self.sliceFn) { - self.fillQueue = self.fillBuffer; - } else if (AWS.util.isNode()) { - var Stream = AWS.util.stream.Stream; - if (self.body instanceof Stream) { - runFill = false; - self.fillQueue = self.fillStream; - self.partBuffers = []; - self.body - .on("error", function (err) { - self.cleanup(err); - }) - .on("readable", function () { - self.fillQueue(); - }) - .on("end", function () { - self.isDoneChunking = true; - self.numParts = self.totalPartNumbers; - self.fillQueue.call(self); - - if ( - self.isDoneChunking && - self.totalPartNumbers >= 1 && - self.doneParts === self.numParts - ) { - self.finishMultiPart(); - } - }); - } - } - - if (runFill) self.fillQueue.call(self); - }, - - /** - * @!method promise() - * Returns a 'thenable' promise. - * - * Two callbacks can be provided to the `then` method on the returned promise. - * The first callback will be called if the promise is fulfilled, and the second - * callback will be called if the promise is rejected. - * @callback fulfilledCallback function(data) - * Called if the promise is fulfilled. - * @param data [map] The response data from the successful upload: - * `Location` (String) the URL of the uploaded object - * `ETag` (String) the ETag of the uploaded object - * `Bucket` (String) the bucket to which the object was uploaded - * `Key` (String) the key to which the object was uploaded - * @callback rejectedCallback function(err) - * Called if the promise is rejected. - * @param err [Error] an error or null if no error occurred. - * @return [Promise] A promise that represents the state of the upload request. - * @example Sending an upload request using promises. - * var upload = s3.upload({Bucket: 'bucket', Key: 'key', Body: stream}); - * var promise = upload.promise(); - * promise.then(function(data) { ... }, function(err) { ... }); - */ - - /** - * Aborts a managed upload, including all concurrent upload requests. - * @note By default, calling this function will cleanup a multipart upload - * if one was created. To leave the multipart upload around after aborting - * a request, configure `leavePartsOnError` to `true` in the {constructor}. - * @note Calling {abort} in the browser environment will not abort any requests - * that are already in flight. If a multipart upload was created, any parts - * not yet uploaded will not be sent, and the multipart upload will be cleaned up. - * @example Aborting an upload - * var params = { - * Bucket: 'bucket', Key: 'key', - * Body: Buffer.alloc(1024 * 1024 * 25) // 25MB payload - * }; - * var upload = s3.upload(params); - * upload.send(function (err, data) { - * if (err) console.log("Error:", err.code, err.message); - * else console.log(data); - * }); - * - * // abort request in 1 second - * setTimeout(upload.abort.bind(upload), 1000); - */ - abort: function () { - var self = this; - //abort putObject request - if ( - self.isDoneChunking === true && - self.totalPartNumbers === 1 && - self.singlePart - ) { - self.singlePart.abort(); - } else { - self.cleanup( - AWS.util.error(new Error("Request aborted by user"), { - code: "RequestAbortedError", - retryable: false, - }) - ); - } + owner: { + required: true, + type: "string" + }, + remove_events: { + type: "string[]" }, - - /** - * @api private - */ - validateBody: function validateBody() { - var self = this; - self.body = self.service.config.params.Body; - if (typeof self.body === "string") { - self.body = AWS.util.buffer.toBuffer(self.body); - } else if (!self.body) { - throw new Error("params.Body is required"); - } - self.sliceFn = AWS.util.arraySliceFn(self.body); - }, - - /** - * @api private - */ - bindServiceObject: function bindServiceObject(params) { - params = params || {}; - var self = this; - // bind parameters to new service object - if (!self.service) { - self.service = new AWS.S3({ params: params }); - } else { - var service = self.service; - var config = AWS.util.copy(service._originalConfig || {}); - config.signatureVersion = service.getSignatureVersion(); - self.service = new service.constructor.__super__(config); - self.service.config.params = AWS.util.merge( - self.service.config.params || {}, - params - ); - } + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/hooks/:hook_id" + }, + updateInformationAboutPagesSite: { + method: "PUT", + params: { + cname: { + type: "string" }, - - /** - * @api private - */ - adjustTotalBytes: function adjustTotalBytes() { - var self = this; - try { - // try to get totalBytes - self.totalBytes = byteLength(self.body); - } catch (e) {} - - // try to adjust partSize if we know payload length - if (self.totalBytes) { - var newPartSize = Math.ceil(self.totalBytes / self.maxTotalParts); - if (newPartSize > self.partSize) self.partSize = newPartSize; - } else { - self.totalBytes = undefined; - } + owner: { + required: true, + type: "string" }, - - /** - * @api private - */ - isDoneChunking: false, - - /** - * @api private - */ - partPos: 0, - - /** - * @api private - */ - totalChunkedBytes: 0, - - /** - * @api private - */ - totalUploadedBytes: 0, - - /** - * @api private - */ - totalBytes: undefined, - - /** - * @api private - */ - numParts: 0, - - /** - * @api private - */ - totalPartNumbers: 0, - - /** - * @api private - */ - activeParts: 0, - - /** - * @api private - */ - doneParts: 0, - - /** - * @api private - */ - parts: null, - - /** - * @api private - */ - completeInfo: null, - - /** - * @api private - */ - failed: false, - - /** - * @api private - */ - multipartReq: null, - - /** - * @api private - */ - partBuffers: null, - - /** - * @api private - */ - partBufferLength: 0, - - /** - * @api private - */ - fillBuffer: function fillBuffer() { - var self = this; - var bodyLen = byteLength(self.body); - - if (bodyLen === 0) { - self.isDoneChunking = true; - self.numParts = 1; - self.nextChunk(self.body); - return; - } - - while (self.activeParts < self.queueSize && self.partPos < bodyLen) { - var endPos = Math.min(self.partPos + self.partSize, bodyLen); - var buf = self.sliceFn.call(self.body, self.partPos, endPos); - self.partPos += self.partSize; - - if (byteLength(buf) < self.partSize || self.partPos === bodyLen) { - self.isDoneChunking = true; - self.numParts = self.totalPartNumbers + 1; - } - self.nextChunk(buf); - } + repo: { + required: true, + type: "string" }, - - /** - * @api private - */ - fillStream: function fillStream() { - var self = this; - if (self.activeParts >= self.queueSize) return; - - var buf = - self.body.read(self.partSize - self.partBufferLength) || - self.body.read(); - if (buf) { - self.partBuffers.push(buf); - self.partBufferLength += buf.length; - self.totalChunkedBytes += buf.length; - } - - if (self.partBufferLength >= self.partSize) { - // if we have single buffer we avoid copyfull concat - var pbuf = - self.partBuffers.length === 1 - ? self.partBuffers[0] - : Buffer.concat(self.partBuffers); - self.partBuffers = []; - self.partBufferLength = 0; - - // if we have more than partSize, push the rest back on the queue - if (pbuf.length > self.partSize) { - var rest = pbuf.slice(self.partSize); - self.partBuffers.push(rest); - self.partBufferLength += rest.length; - pbuf = pbuf.slice(0, self.partSize); - } - - self.nextChunk(pbuf); - } - - if (self.isDoneChunking && !self.isDoneSending) { - // if we have single buffer we avoid copyfull concat - pbuf = - self.partBuffers.length === 1 - ? self.partBuffers[0] - : Buffer.concat(self.partBuffers); - self.partBuffers = []; - self.partBufferLength = 0; - self.totalBytes = self.totalChunkedBytes; - self.isDoneSending = true; - - if (self.numParts === 0 || pbuf.length > 0) { - self.numParts++; - self.nextChunk(pbuf); - } - } - - self.body.read(0); + source: { + enum: ['"gh-pages"', '"master"', '"master /docs"'], + type: "string" + } + }, + url: "/repos/:owner/:repo/pages" + }, + updateInvitation: { + method: "PATCH", + params: { + invitation_id: { + required: true, + type: "integer" }, - - /** - * @api private - */ - nextChunk: function nextChunk(chunk) { - var self = this; - if (self.failed) return null; - - var partNumber = ++self.totalPartNumbers; - if (self.isDoneChunking && partNumber === 1) { - var params = { Body: chunk }; - if (this.tags) { - params.Tagging = this.getTaggingHeader(); - } - var req = self.service.putObject(params); - req._managedUpload = self; - req - .on("httpUploadProgress", self.progress) - .send(self.finishSinglePart); - self.singlePart = req; //save the single part request - return null; - } else if (self.service.config.params.ContentMD5) { - var err = AWS.util.error( - new Error( - "The Content-MD5 you specified is invalid for multi-part uploads." - ), - { - code: "InvalidDigest", - retryable: false, - } - ); - - self.cleanup(err); - return null; - } - - if ( - self.completeInfo[partNumber] && - self.completeInfo[partNumber].ETag !== null - ) { - return null; // Already uploaded this part. - } - - self.activeParts++; - if (!self.service.config.params.UploadId) { - if (!self.multipartReq) { - // create multipart - self.multipartReq = self.service.createMultipartUpload(); - self.multipartReq.on("success", function (resp) { - self.service.config.params.UploadId = resp.data.UploadId; - self.multipartReq = null; - }); - self.queueChunks(chunk, partNumber); - self.multipartReq.on("error", function (err) { - self.cleanup(err); - }); - self.multipartReq.send(); - } else { - self.queueChunks(chunk, partNumber); - } - } else { - // multipart is created, just send - self.uploadPart(chunk, partNumber); - } + owner: { + required: true, + type: "string" }, - - /** - * @api private - */ - getTaggingHeader: function getTaggingHeader() { - var kvPairStrings = []; - for (var i = 0; i < this.tags.length; i++) { - kvPairStrings.push( - AWS.util.uriEscape(this.tags[i].Key) + - "=" + - AWS.util.uriEscape(this.tags[i].Value) - ); - } - - return kvPairStrings.join("&"); + permissions: { + enum: ["read", "write", "admin"], + type: "string" }, - - /** - * @api private - */ - uploadPart: function uploadPart(chunk, partNumber) { - var self = this; - - var partParams = { - Body: chunk, - ContentLength: AWS.util.string.byteLength(chunk), - PartNumber: partNumber, - }; - - var partInfo = { ETag: null, PartNumber: partNumber }; - self.completeInfo[partNumber] = partInfo; - - var req = self.service.uploadPart(partParams); - self.parts[partNumber] = req; - req._lastUploadedBytes = 0; - req._managedUpload = self; - req.on("httpUploadProgress", self.progress); - req.send(function (err, data) { - delete self.parts[partParams.PartNumber]; - self.activeParts--; - - if (!err && (!data || !data.ETag)) { - var message = "No access to ETag property on response."; - if (AWS.util.isBrowser()) { - message += " Check CORS configuration to expose ETag header."; - } - - err = AWS.util.error(new Error(message), { - code: "ETagMissing", - retryable: false, - }); - } - if (err) return self.cleanup(err); - //prevent sending part being returned twice (https://github.com/aws/aws-sdk-js/issues/2304) - if ( - self.completeInfo[partNumber] && - self.completeInfo[partNumber].ETag !== null - ) - return null; - partInfo.ETag = data.ETag; - self.doneParts++; - if (self.isDoneChunking && self.doneParts === self.numParts) { - self.finishMultiPart(); - } else { - self.fillQueue.call(self); - } - }); + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/invitations/:invitation_id" + }, + updateProtectedBranchPullRequestReviewEnforcement: { + method: "PATCH", + params: { + branch: { + required: true, + type: "string" }, - - /** - * @api private - */ - queueChunks: function queueChunks(chunk, partNumber) { - var self = this; - self.multipartReq.on("success", function () { - self.uploadPart(chunk, partNumber); - }); + dismiss_stale_reviews: { + type: "boolean" }, - - /** - * @api private - */ - cleanup: function cleanup(err) { - var self = this; - if (self.failed) return; - - // clean up stream - if ( - typeof self.body.removeAllListeners === "function" && - typeof self.body.resume === "function" - ) { - self.body.removeAllListeners("readable"); - self.body.removeAllListeners("end"); - self.body.resume(); - } - - // cleanup multipartReq listeners - if (self.multipartReq) { - self.multipartReq.removeAllListeners("success"); - self.multipartReq.removeAllListeners("error"); - self.multipartReq.removeAllListeners("complete"); - delete self.multipartReq; - } - - if (self.service.config.params.UploadId && !self.leavePartsOnError) { - self.service.abortMultipartUpload().send(); - } else if (self.leavePartsOnError) { - self.isDoneChunking = false; - } - - AWS.util.each(self.parts, function (partNumber, part) { - part.removeAllListeners("complete"); - part.abort(); - }); - - self.activeParts = 0; - self.partPos = 0; - self.numParts = 0; - self.totalPartNumbers = 0; - self.parts = {}; - self.failed = true; - self.callback(err); - }, - - /** - * @api private - */ - finishMultiPart: function finishMultiPart() { - var self = this; - var completeParams = { - MultipartUpload: { Parts: self.completeInfo.slice(1) }, - }; - self.service.completeMultipartUpload(completeParams, function ( - err, - data - ) { - if (err) { - return self.cleanup(err); - } - - if (data && typeof data.Location === "string") { - data.Location = data.Location.replace(/%2F/g, "/"); - } - - if (Array.isArray(self.tags)) { - for (var i = 0; i < self.tags.length; i++) { - self.tags[i].Value = String(self.tags[i].Value); - } - self.service.putObjectTagging( - { Tagging: { TagSet: self.tags } }, - function (e, d) { - if (e) { - self.callback(e); - } else { - self.callback(e, data); - } - } - ); - } else { - self.callback(err, data); - } - }); + dismissal_restrictions: { + type: "object" }, - - /** - * @api private - */ - finishSinglePart: function finishSinglePart(err, data) { - var upload = this.request._managedUpload; - var httpReq = this.request.httpRequest; - var endpoint = httpReq.endpoint; - if (err) return upload.callback(err); - data.Location = [ - endpoint.protocol, - "//", - endpoint.host, - httpReq.path, - ].join(""); - data.key = this.request.params.Key; // will stay undocumented - data.Key = this.request.params.Key; - data.Bucket = this.request.params.Bucket; - upload.callback(err, data); - }, - - /** - * @api private - */ - progress: function progress(info) { - var upload = this._managedUpload; - if (this.operation === "putObject") { - info.part = 1; - info.key = this.params.Key; - } else { - upload.totalUploadedBytes += info.loaded - this._lastUploadedBytes; - this._lastUploadedBytes = info.loaded; - info = { - loaded: upload.totalUploadedBytes, - total: upload.totalBytes, - part: this.params.PartNumber, - key: this.params.Key, - }; - } - upload.emit("httpUploadProgress", [info]); + "dismissal_restrictions.teams": { + type: "string[]" }, - }); - - AWS.util.mixin(AWS.S3.ManagedUpload, AWS.SequentialExecutor); - - /** - * @api private - */ - AWS.S3.ManagedUpload.addPromisesToClass = function addPromisesToClass( - PromiseDependency - ) { - this.prototype.promise = AWS.util.promisifyMethod( - "send", - PromiseDependency - ); - }; - - /** - * @api private - */ - AWS.S3.ManagedUpload.deletePromisesFromClass = function deletePromisesFromClass() { - delete this.prototype.promise; - }; - - AWS.util.addPromises(AWS.S3.ManagedUpload); - - /** - * @api private - */ - module.exports = AWS.S3.ManagedUpload; - - /***/ - }, - - /***/ 55948: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var AWS = __nccwpck_require__(28437); - - /** - * @api private - * @!method on(eventName, callback) - * Registers an event listener callback for the event given by `eventName`. - * Parameters passed to the callback function depend on the individual event - * being triggered. See the event documentation for those parameters. - * - * @param eventName [String] the event name to register the listener for - * @param callback [Function] the listener callback function - * @param toHead [Boolean] attach the listener callback to the head of callback array if set to true. - * Default to be false. - * @return [AWS.SequentialExecutor] the same object for chaining - */ - AWS.SequentialExecutor = AWS.util.inherit({ - constructor: function SequentialExecutor() { - this._events = {}; - }, - - /** - * @api private - */ - listeners: function listeners(eventName) { - return this._events[eventName] - ? this._events[eventName].slice(0) - : []; - }, - - on: function on(eventName, listener, toHead) { - if (this._events[eventName]) { - toHead - ? this._events[eventName].unshift(listener) - : this._events[eventName].push(listener); - } else { - this._events[eventName] = [listener]; - } - return this; + "dismissal_restrictions.users": { + type: "string[]" }, - - onAsync: function onAsync(eventName, listener, toHead) { - listener._isAsync = true; - return this.on(eventName, listener, toHead); + owner: { + required: true, + type: "string" }, - - removeListener: function removeListener(eventName, listener) { - var listeners = this._events[eventName]; - if (listeners) { - var length = listeners.length; - var position = -1; - for (var i = 0; i < length; ++i) { - if (listeners[i] === listener) { - position = i; - } - } - if (position > -1) { - listeners.splice(position, 1); - } - } - return this; + repo: { + required: true, + type: "string" }, - - removeAllListeners: function removeAllListeners(eventName) { - if (eventName) { - delete this._events[eventName]; - } else { - this._events = {}; - } - return this; - }, - - /** - * @api private - */ - emit: function emit(eventName, eventArgs, doneCallback) { - if (!doneCallback) doneCallback = function () {}; - var listeners = this.listeners(eventName); - var count = listeners.length; - this.callListeners(listeners, eventArgs, doneCallback); - return count > 0; - }, - - /** - * @api private - */ - callListeners: function callListeners( - listeners, - args, - doneCallback, - prevError - ) { - var self = this; - var error = prevError || null; - - function callNextListener(err) { - if (err) { - error = AWS.util.error(error || new Error(), err); - if (self._haltHandlersOnError) { - return doneCallback.call(self, error); - } - } - self.callListeners(listeners, args, doneCallback, error); - } - - while (listeners.length > 0) { - var listener = listeners.shift(); - if (listener._isAsync) { - // asynchronous listener - listener.apply(self, args.concat([callNextListener])); - return; // stop here, callNextListener will continue - } else { - // synchronous listener - try { - listener.apply(self, args); - } catch (err) { - error = AWS.util.error(error || new Error(), err); - } - if (error && self._haltHandlersOnError) { - doneCallback.call(self, error); - return; - } - } - } - doneCallback.call(self, error); + require_code_owner_reviews: { + type: "boolean" }, - - /** - * Adds or copies a set of listeners from another list of - * listeners or SequentialExecutor object. - * - * @param listeners [map>, AWS.SequentialExecutor] - * a list of events and callbacks, or an event emitter object - * containing listeners to add to this emitter object. - * @return [AWS.SequentialExecutor] the emitter object, for chaining. - * @example Adding listeners from a map of listeners - * emitter.addListeners({ - * event1: [function() { ... }, function() { ... }], - * event2: [function() { ... }] - * }); - * emitter.emit('event1'); // emitter has event1 - * emitter.emit('event2'); // emitter has event2 - * @example Adding listeners from another emitter object - * var emitter1 = new AWS.SequentialExecutor(); - * emitter1.on('event1', function() { ... }); - * emitter1.on('event2', function() { ... }); - * var emitter2 = new AWS.SequentialExecutor(); - * emitter2.addListeners(emitter1); - * emitter2.emit('event1'); // emitter2 has event1 - * emitter2.emit('event2'); // emitter2 has event2 - */ - addListeners: function addListeners(listeners) { - var self = this; - - // extract listeners if parameter is an SequentialExecutor object - if (listeners._events) listeners = listeners._events; - - AWS.util.each(listeners, function (event, callbacks) { - if (typeof callbacks === "function") callbacks = [callbacks]; - AWS.util.arrayEach(callbacks, function (callback) { - self.on(event, callback); - }); - }); - - return self; - }, - - /** - * Registers an event with {on} and saves the callback handle function - * as a property on the emitter object using a given `name`. - * - * @param name [String] the property name to set on this object containing - * the callback function handle so that the listener can be removed in - * the future. - * @param (see on) - * @return (see on) - * @example Adding a named listener DATA_CALLBACK - * var listener = function() { doSomething(); }; - * emitter.addNamedListener('DATA_CALLBACK', 'data', listener); - * - * // the following prints: true - * console.log(emitter.DATA_CALLBACK == listener); - */ - addNamedListener: function addNamedListener( - name, - eventName, - callback, - toHead - ) { - this[name] = callback; - this.addListener(eventName, callback, toHead); - return this; - }, - - /** - * @api private - */ - addNamedAsyncListener: function addNamedAsyncListener( - name, - eventName, - callback, - toHead - ) { - callback._isAsync = true; - return this.addNamedListener(name, eventName, callback, toHead); - }, - - /** - * Helper method to add a set of named listeners using - * {addNamedListener}. The callback contains a parameter - * with a handle to the `addNamedListener` method. - * - * @callback callback function(add) - * The callback function is called immediately in order to provide - * the `add` function to the block. This simplifies the addition of - * a large group of named listeners. - * @param add [Function] the {addNamedListener} function to call - * when registering listeners. - * @example Adding a set of named listeners - * emitter.addNamedListeners(function(add) { - * add('DATA_CALLBACK', 'data', function() { ... }); - * add('OTHER', 'otherEvent', function() { ... }); - * add('LAST', 'lastEvent', function() { ... }); - * }); - * - * // these properties are now set: - * emitter.DATA_CALLBACK; - * emitter.OTHER; - * emitter.LAST; - */ - addNamedListeners: function addNamedListeners(callback) { - var self = this; - callback( - function () { - self.addNamedListener.apply(self, arguments); - }, - function () { - self.addNamedAsyncListener.apply(self, arguments); - } - ); - return this; + required_approving_review_count: { + type: "integer" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection/required_pull_request_reviews" + }, + updateProtectedBranchRequiredStatusChecks: { + method: "PATCH", + params: { + branch: { + required: true, + type: "string" }, - }); - - /** - * {on} is the prefered method. - * @api private - */ - AWS.SequentialExecutor.prototype.addListener = - AWS.SequentialExecutor.prototype.on; - - /** - * @api private - */ - module.exports = AWS.SequentialExecutor; - - /***/ - }, - - /***/ 68903: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var AWS = __nccwpck_require__(28437); - var Api = __nccwpck_require__(17657); - var regionConfig = __nccwpck_require__(18262); - - var inherit = AWS.util.inherit; - var clientCount = 0; - - /** - * The service class representing an AWS service. - * - * @class_abstract This class is an abstract class. - * - * @!attribute apiVersions - * @return [Array] the list of API versions supported by this service. - * @readonly - */ - AWS.Service = inherit({ - /** - * Create a new service object with a configuration object - * - * @param config [map] a map of configuration options - */ - constructor: function Service(config) { - if (!this.loadServiceClass) { - throw AWS.util.error( - new Error(), - "Service must be constructed with `new' operator" - ); - } - var ServiceClass = this.loadServiceClass(config || {}); - if (ServiceClass) { - var originalConfig = AWS.util.copy(config); - var svc = new ServiceClass(config); - Object.defineProperty(svc, "_originalConfig", { - get: function () { - return originalConfig; - }, - enumerable: false, - configurable: true, - }); - svc._clientId = ++clientCount; - return svc; - } - this.initialize(config); + contexts: { + type: "string[]" }, - - /** - * @api private - */ - initialize: function initialize(config) { - var svcConfig = AWS.config[this.serviceIdentifier]; - this.config = new AWS.Config(AWS.config); - if (svcConfig) this.config.update(svcConfig, true); - if (config) this.config.update(config, true); - - this.validateService(); - if (!this.config.endpoint) regionConfig.configureEndpoint(this); - - this.config.endpoint = this.endpointFromTemplate( - this.config.endpoint - ); - this.setEndpoint(this.config.endpoint); - //enable attaching listeners to service client - AWS.SequentialExecutor.call(this); - AWS.Service.addDefaultMonitoringListeners(this); - if ( - (this.config.clientSideMonitoring || - AWS.Service._clientSideMonitoring) && - this.publisher - ) { - var publisher = this.publisher; - this.addNamedListener( - "PUBLISH_API_CALL", - "apiCall", - function PUBLISH_API_CALL(event) { - process.nextTick(function () { - publisher.eventHandler(event); - }); - } - ); - this.addNamedListener( - "PUBLISH_API_ATTEMPT", - "apiCallAttempt", - function PUBLISH_API_ATTEMPT(event) { - process.nextTick(function () { - publisher.eventHandler(event); - }); - } - ); - } + owner: { + required: true, + type: "string" }, - - /** - * @api private - */ - validateService: function validateService() {}, - - /** - * @api private - */ - loadServiceClass: function loadServiceClass(serviceConfig) { - var config = serviceConfig; - if (!AWS.util.isEmpty(this.api)) { - return null; - } else if (config.apiConfig) { - return AWS.Service.defineServiceApi( - this.constructor, - config.apiConfig - ); - } else if (!this.constructor.services) { - return null; - } else { - config = new AWS.Config(AWS.config); - config.update(serviceConfig, true); - var version = - config.apiVersions[this.constructor.serviceIdentifier]; - version = version || config.apiVersion; - return this.getLatestServiceClass(version); - } + repo: { + required: true, + type: "string" }, - - /** - * @api private - */ - getLatestServiceClass: function getLatestServiceClass(version) { - version = this.getLatestServiceVersion(version); - if (this.constructor.services[version] === null) { - AWS.Service.defineServiceApi(this.constructor, version); - } - - return this.constructor.services[version]; + strict: { + type: "boolean" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection/required_status_checks" + }, + updateRelease: { + method: "PATCH", + params: { + body: { + type: "string" }, - - /** - * @api private - */ - getLatestServiceVersion: function getLatestServiceVersion(version) { - if ( - !this.constructor.services || - this.constructor.services.length === 0 - ) { - throw new Error( - "No services defined on " + this.constructor.serviceIdentifier - ); - } - - if (!version) { - version = "latest"; - } else if (AWS.util.isType(version, Date)) { - version = AWS.util.date.iso8601(version).split("T")[0]; - } - - if (Object.hasOwnProperty(this.constructor.services, version)) { - return version; - } - - var keys = Object.keys(this.constructor.services).sort(); - var selectedVersion = null; - for (var i = keys.length - 1; i >= 0; i--) { - // versions that end in "*" are not available on disk and can be - // skipped, so do not choose these as selectedVersions - if (keys[i][keys[i].length - 1] !== "*") { - selectedVersion = keys[i]; - } - if (keys[i].substr(0, 10) <= version) { - return selectedVersion; - } - } - - throw new Error( - "Could not find " + - this.constructor.serviceIdentifier + - " API to satisfy version constraint `" + - version + - "'" - ); + draft: { + type: "boolean" }, - - /** - * @api private - */ - api: {}, - - /** - * @api private - */ - defaultRetryCount: 3, - - /** - * @api private - */ - customizeRequests: function customizeRequests(callback) { - if (!callback) { - this.customRequestHandler = null; - } else if (typeof callback === "function") { - this.customRequestHandler = callback; - } else { - throw new Error( - "Invalid callback type '" + - typeof callback + - "' provided in customizeRequests" - ); - } + name: { + type: "string" }, - - /** - * Calls an operation on a service with the given input parameters. - * - * @param operation [String] the name of the operation to call on the service. - * @param params [map] a map of input options for the operation - * @callback callback function(err, data) - * If a callback is supplied, it is called when a response is returned - * from the service. - * @param err [Error] the error object returned from the request. - * Set to `null` if the request is successful. - * @param data [Object] the de-serialized data returned from - * the request. Set to `null` if a request error occurs. - */ - makeRequest: function makeRequest(operation, params, callback) { - if (typeof params === "function") { - callback = params; - params = null; - } - - params = params || {}; - if (this.config.params) { - // copy only toplevel bound params - var rules = this.api.operations[operation]; - if (rules) { - params = AWS.util.copy(params); - AWS.util.each(this.config.params, function (key, value) { - if (rules.input.members[key]) { - if (params[key] === undefined || params[key] === null) { - params[key] = value; - } - } - }); - } - } - - var request = new AWS.Request(this, operation, params); - this.addAllRequestListeners(request); - this.attachMonitoringEmitter(request); - if (callback) request.send(callback); - return request; - }, - - /** - * Calls an operation on a service with the given input parameters, without - * any authentication data. This method is useful for "public" API operations. - * - * @param operation [String] the name of the operation to call on the service. - * @param params [map] a map of input options for the operation - * @callback callback function(err, data) - * If a callback is supplied, it is called when a response is returned - * from the service. - * @param err [Error] the error object returned from the request. - * Set to `null` if the request is successful. - * @param data [Object] the de-serialized data returned from - * the request. Set to `null` if a request error occurs. - */ - makeUnauthenticatedRequest: function makeUnauthenticatedRequest( - operation, - params, - callback - ) { - if (typeof params === "function") { - callback = params; - params = {}; - } - - var request = this.makeRequest(operation, params).toUnauthenticated(); - return callback ? request.send(callback) : request; - }, - - /** - * Waits for a given state - * - * @param state [String] the state on the service to wait for - * @param params [map] a map of parameters to pass with each request - * @option params $waiter [map] a map of configuration options for the waiter - * @option params $waiter.delay [Number] The number of seconds to wait between - * requests - * @option params $waiter.maxAttempts [Number] The maximum number of requests - * to send while waiting - * @callback callback function(err, data) - * If a callback is supplied, it is called when a response is returned - * from the service. - * @param err [Error] the error object returned from the request. - * Set to `null` if the request is successful. - * @param data [Object] the de-serialized data returned from - * the request. Set to `null` if a request error occurs. - */ - waitFor: function waitFor(state, params, callback) { - var waiter = new AWS.ResourceWaiter(this, state); - return waiter.wait(params, callback); - }, - - /** - * @api private - */ - addAllRequestListeners: function addAllRequestListeners(request) { - var list = [ - AWS.events, - AWS.EventListeners.Core, - this.serviceInterface(), - AWS.EventListeners.CorePost, - ]; - for (var i = 0; i < list.length; i++) { - if (list[i]) request.addListeners(list[i]); - } - - // disable parameter validation - if (!this.config.paramValidation) { - request.removeListener( - "validate", - AWS.EventListeners.Core.VALIDATE_PARAMETERS - ); - } - - if (this.config.logger) { - // add logging events - request.addListeners(AWS.EventListeners.Logger); - } - - this.setupRequestListeners(request); - // call prototype's customRequestHandler - if ( - typeof this.constructor.prototype.customRequestHandler === - "function" - ) { - this.constructor.prototype.customRequestHandler(request); - } - // call instance's customRequestHandler - if ( - Object.prototype.hasOwnProperty.call( - this, - "customRequestHandler" - ) && - typeof this.customRequestHandler === "function" - ) { - this.customRequestHandler(request); - } + owner: { + required: true, + type: "string" }, - - /** - * Event recording metrics for a whole API call. - * @returns {object} a subset of api call metrics - * @api private - */ - apiCallEvent: function apiCallEvent(request) { - var api = request.service.api.operations[request.operation]; - var monitoringEvent = { - Type: "ApiCall", - Api: api ? api.name : request.operation, - Version: 1, - Service: - request.service.api.serviceId || - request.service.api.endpointPrefix, - Region: request.httpRequest.region, - MaxRetriesExceeded: 0, - UserAgent: request.httpRequest.getUserAgent(), - }; - var response = request.response; - if (response.httpResponse.statusCode) { - monitoringEvent.FinalHttpStatusCode = - response.httpResponse.statusCode; - } - if (response.error) { - var error = response.error; - var statusCode = response.httpResponse.statusCode; - if (statusCode > 299) { - if (error.code) monitoringEvent.FinalAwsException = error.code; - if (error.message) - monitoringEvent.FinalAwsExceptionMessage = error.message; - } else { - if (error.code || error.name) - monitoringEvent.FinalSdkException = error.code || error.name; - if (error.message) - monitoringEvent.FinalSdkExceptionMessage = error.message; - } - } - return monitoringEvent; - }, - - /** - * Event recording metrics for an API call attempt. - * @returns {object} a subset of api call attempt metrics - * @api private - */ - apiAttemptEvent: function apiAttemptEvent(request) { - var api = request.service.api.operations[request.operation]; - var monitoringEvent = { - Type: "ApiCallAttempt", - Api: api ? api.name : request.operation, - Version: 1, - Service: - request.service.api.serviceId || - request.service.api.endpointPrefix, - Fqdn: request.httpRequest.endpoint.hostname, - UserAgent: request.httpRequest.getUserAgent(), - }; - var response = request.response; - if (response.httpResponse.statusCode) { - monitoringEvent.HttpStatusCode = response.httpResponse.statusCode; - } - if ( - !request._unAuthenticated && - request.service.config.credentials && - request.service.config.credentials.accessKeyId - ) { - monitoringEvent.AccessKey = - request.service.config.credentials.accessKeyId; - } - if (!response.httpResponse.headers) return monitoringEvent; - if (request.httpRequest.headers["x-amz-security-token"]) { - monitoringEvent.SessionToken = - request.httpRequest.headers["x-amz-security-token"]; - } - if (response.httpResponse.headers["x-amzn-requestid"]) { - monitoringEvent.XAmznRequestId = - response.httpResponse.headers["x-amzn-requestid"]; - } - if (response.httpResponse.headers["x-amz-request-id"]) { - monitoringEvent.XAmzRequestId = - response.httpResponse.headers["x-amz-request-id"]; - } - if (response.httpResponse.headers["x-amz-id-2"]) { - monitoringEvent.XAmzId2 = - response.httpResponse.headers["x-amz-id-2"]; - } - return monitoringEvent; - }, - - /** - * Add metrics of failed request. - * @api private - */ - attemptFailEvent: function attemptFailEvent(request) { - var monitoringEvent = this.apiAttemptEvent(request); - var response = request.response; - var error = response.error; - if (response.httpResponse.statusCode > 299) { - if (error.code) monitoringEvent.AwsException = error.code; - if (error.message) - monitoringEvent.AwsExceptionMessage = error.message; - } else { - if (error.code || error.name) - monitoringEvent.SdkException = error.code || error.name; - if (error.message) - monitoringEvent.SdkExceptionMessage = error.message; - } - return monitoringEvent; - }, - - /** - * Attach listeners to request object to fetch metrics of each request - * and emit data object through \'ApiCall\' and \'ApiCallAttempt\' events. - * @api private - */ - attachMonitoringEmitter: function attachMonitoringEmitter(request) { - var attemptTimestamp; //timestamp marking the beginning of a request attempt - var attemptStartRealTime; //Start time of request attempt. Used to calculating attemptLatency - var attemptLatency; //latency from request sent out to http response reaching SDK - var callStartRealTime; //Start time of API call. Used to calculating API call latency - var attemptCount = 0; //request.retryCount is not reliable here - var region; //region cache region for each attempt since it can be updated in plase (e.g. s3) - var callTimestamp; //timestamp when the request is created - var self = this; - var addToHead = true; - - request.on( - "validate", - function () { - callStartRealTime = AWS.util.realClock.now(); - callTimestamp = Date.now(); - }, - addToHead - ); - request.on( - "sign", - function () { - attemptStartRealTime = AWS.util.realClock.now(); - attemptTimestamp = Date.now(); - region = request.httpRequest.region; - attemptCount++; - }, - addToHead - ); - request.on("validateResponse", function () { - attemptLatency = Math.round( - AWS.util.realClock.now() - attemptStartRealTime - ); - }); - request.addNamedListener( - "API_CALL_ATTEMPT", - "success", - function API_CALL_ATTEMPT() { - var apiAttemptEvent = self.apiAttemptEvent(request); - apiAttemptEvent.Timestamp = attemptTimestamp; - apiAttemptEvent.AttemptLatency = - attemptLatency >= 0 ? attemptLatency : 0; - apiAttemptEvent.Region = region; - self.emit("apiCallAttempt", [apiAttemptEvent]); - } - ); - request.addNamedListener( - "API_CALL_ATTEMPT_RETRY", - "retry", - function API_CALL_ATTEMPT_RETRY() { - var apiAttemptEvent = self.attemptFailEvent(request); - apiAttemptEvent.Timestamp = attemptTimestamp; - //attemptLatency may not be available if fail before response - attemptLatency = - attemptLatency || - Math.round(AWS.util.realClock.now() - attemptStartRealTime); - apiAttemptEvent.AttemptLatency = - attemptLatency >= 0 ? attemptLatency : 0; - apiAttemptEvent.Region = region; - self.emit("apiCallAttempt", [apiAttemptEvent]); - } - ); - request.addNamedListener("API_CALL", "complete", function API_CALL() { - var apiCallEvent = self.apiCallEvent(request); - apiCallEvent.AttemptCount = attemptCount; - if (apiCallEvent.AttemptCount <= 0) return; - apiCallEvent.Timestamp = callTimestamp; - var latency = Math.round( - AWS.util.realClock.now() - callStartRealTime - ); - apiCallEvent.Latency = latency >= 0 ? latency : 0; - var response = request.response; - if ( - response.error && - response.error.retryable && - typeof response.retryCount === "number" && - typeof response.maxRetries === "number" && - response.retryCount >= response.maxRetries - ) { - apiCallEvent.MaxRetriesExceeded = 1; - } - self.emit("apiCall", [apiCallEvent]); - }); + prerelease: { + type: "boolean" + }, + release_id: { + required: true, + type: "integer" + }, + repo: { + required: true, + type: "string" + }, + tag_name: { + type: "string" + }, + target_commitish: { + type: "string" + } + }, + url: "/repos/:owner/:repo/releases/:release_id" + }, + updateReleaseAsset: { + method: "PATCH", + params: { + asset_id: { + required: true, + type: "integer" }, - - /** - * Override this method to setup any custom request listeners for each - * new request to the service. - * - * @method_abstract This is an abstract method. - */ - setupRequestListeners: function setupRequestListeners(request) {}, - - /** - * Gets the signing name for a given request - * @api private - */ - getSigningName: function getSigningName() { - return this.api.signingName || this.api.endpointPrefix; - }, - - /** - * Gets the signer class for a given request - * @api private - */ - getSignerClass: function getSignerClass(request) { - var version; - // get operation authtype if present - var operation = null; - var authtype = ""; - if (request) { - var operations = request.service.api.operations || {}; - operation = operations[request.operation] || null; - authtype = operation ? operation.authtype : ""; - } - if (this.config.signatureVersion) { - version = this.config.signatureVersion; - } else if (authtype === "v4" || authtype === "v4-unsigned-body") { - version = "v4"; - } else { - version = this.api.signatureVersion; - } - return AWS.Signers.RequestSigner.getVersion(version); - }, - - /** - * @api private - */ - serviceInterface: function serviceInterface() { - switch (this.api.protocol) { - case "ec2": - return AWS.EventListeners.Query; - case "query": - return AWS.EventListeners.Query; - case "json": - return AWS.EventListeners.Json; - case "rest-json": - return AWS.EventListeners.RestJson; - case "rest-xml": - return AWS.EventListeners.RestXml; - } - if (this.api.protocol) { - throw new Error( - "Invalid service `protocol' " + - this.api.protocol + - " in API config" - ); - } + label: { + type: "string" }, - - /** - * @api private - */ - successfulResponse: function successfulResponse(resp) { - return resp.httpResponse.statusCode < 300; + name: { + type: "string" }, - - /** - * How many times a failed request should be retried before giving up. - * the defaultRetryCount can be overriden by service classes. - * - * @api private - */ - numRetries: function numRetries() { - if (this.config.maxRetries !== undefined) { - return this.config.maxRetries; - } else { - return this.defaultRetryCount; - } + owner: { + required: true, + type: "string" }, - - /** - * @api private - */ - retryDelays: function retryDelays(retryCount, err) { - return AWS.util.calculateRetryDelay( - retryCount, - this.config.retryDelayOptions, - err - ); + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/releases/assets/:asset_id" + }, + uploadReleaseAsset: { + method: "POST", + params: { + data: { + mapTo: "data", + required: true, + type: "string | object" }, - - /** - * @api private - */ - retryableError: function retryableError(error) { - if (this.timeoutError(error)) return true; - if (this.networkingError(error)) return true; - if (this.expiredCredentialsError(error)) return true; - if (this.throttledError(error)) return true; - if (error.statusCode >= 500) return true; - return false; + file: { + alias: "data", + deprecated: true, + type: "string | object" }, - - /** - * @api private - */ - networkingError: function networkingError(error) { - return error.code === "NetworkingError"; + headers: { + required: true, + type: "object" + }, + "headers.content-length": { + required: true, + type: "integer" + }, + "headers.content-type": { + required: true, + type: "string" + }, + label: { + type: "string" + }, + name: { + required: true, + type: "string" + }, + url: { + required: true, + type: "string" + } + }, + url: ":url" + } + }, + search: { + code: { + method: "GET", + params: { + order: { + enum: ["desc", "asc"], + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + q: { + required: true, + type: "string" + }, + sort: { + enum: ["indexed"], + type: "string" + } + }, + url: "/search/code" + }, + commits: { + headers: { + accept: "application/vnd.github.cloak-preview+json" + }, + method: "GET", + params: { + order: { + enum: ["desc", "asc"], + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + q: { + required: true, + type: "string" + }, + sort: { + enum: ["author-date", "committer-date"], + type: "string" + } + }, + url: "/search/commits" + }, + issues: { + deprecated: "octokit.search.issues() has been renamed to octokit.search.issuesAndPullRequests() (2018-12-27)", + method: "GET", + params: { + order: { + enum: ["desc", "asc"], + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + q: { + required: true, + type: "string" + }, + sort: { + enum: ["comments", "reactions", "reactions-+1", "reactions--1", "reactions-smile", "reactions-thinking_face", "reactions-heart", "reactions-tada", "interactions", "created", "updated"], + type: "string" + } + }, + url: "/search/issues" + }, + issuesAndPullRequests: { + method: "GET", + params: { + order: { + enum: ["desc", "asc"], + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + q: { + required: true, + type: "string" + }, + sort: { + enum: ["comments", "reactions", "reactions-+1", "reactions--1", "reactions-smile", "reactions-thinking_face", "reactions-heart", "reactions-tada", "interactions", "created", "updated"], + type: "string" + } + }, + url: "/search/issues" + }, + labels: { + method: "GET", + params: { + order: { + enum: ["desc", "asc"], + type: "string" + }, + q: { + required: true, + type: "string" + }, + repository_id: { + required: true, + type: "integer" + }, + sort: { + enum: ["created", "updated"], + type: "string" + } + }, + url: "/search/labels" + }, + repos: { + method: "GET", + params: { + order: { + enum: ["desc", "asc"], + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + q: { + required: true, + type: "string" + }, + sort: { + enum: ["stars", "forks", "help-wanted-issues", "updated"], + type: "string" + } + }, + url: "/search/repositories" + }, + topics: { + method: "GET", + params: { + q: { + required: true, + type: "string" + } + }, + url: "/search/topics" + }, + users: { + method: "GET", + params: { + order: { + enum: ["desc", "asc"], + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + q: { + required: true, + type: "string" + }, + sort: { + enum: ["followers", "repositories", "joined"], + type: "string" + } + }, + url: "/search/users" + } + }, + teams: { + addMember: { + deprecated: "octokit.teams.addMember() has been renamed to octokit.teams.addMemberLegacy() (2020-01-16)", + method: "PUT", + params: { + team_id: { + required: true, + type: "integer" + }, + username: { + required: true, + type: "string" + } + }, + url: "/teams/:team_id/members/:username" + }, + addMemberLegacy: { + deprecated: "octokit.teams.addMemberLegacy() is deprecated, see https://developer.github.com/v3/teams/members/#add-team-member-legacy", + method: "PUT", + params: { + team_id: { + required: true, + type: "integer" + }, + username: { + required: true, + type: "string" + } + }, + url: "/teams/:team_id/members/:username" + }, + addOrUpdateMembership: { + deprecated: "octokit.teams.addOrUpdateMembership() has been renamed to octokit.teams.addOrUpdateMembershipLegacy() (2020-01-16)", + method: "PUT", + params: { + role: { + enum: ["member", "maintainer"], + type: "string" + }, + team_id: { + required: true, + type: "integer" + }, + username: { + required: true, + type: "string" + } + }, + url: "/teams/:team_id/memberships/:username" + }, + addOrUpdateMembershipInOrg: { + method: "PUT", + params: { + org: { + required: true, + type: "string" + }, + role: { + enum: ["member", "maintainer"], + type: "string" + }, + team_slug: { + required: true, + type: "string" + }, + username: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/teams/:team_slug/memberships/:username" + }, + addOrUpdateMembershipLegacy: { + deprecated: "octokit.teams.addOrUpdateMembershipLegacy() is deprecated, see https://developer.github.com/v3/teams/members/#add-or-update-team-membership-legacy", + method: "PUT", + params: { + role: { + enum: ["member", "maintainer"], + type: "string" + }, + team_id: { + required: true, + type: "integer" + }, + username: { + required: true, + type: "string" + } + }, + url: "/teams/:team_id/memberships/:username" + }, + addOrUpdateProject: { + deprecated: "octokit.teams.addOrUpdateProject() has been renamed to octokit.teams.addOrUpdateProjectLegacy() (2020-01-16)", + headers: { + accept: "application/vnd.github.inertia-preview+json" + }, + method: "PUT", + params: { + permission: { + enum: ["read", "write", "admin"], + type: "string" + }, + project_id: { + required: true, + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/projects/:project_id" + }, + addOrUpdateProjectInOrg: { + headers: { + accept: "application/vnd.github.inertia-preview+json" + }, + method: "PUT", + params: { + org: { + required: true, + type: "string" + }, + permission: { + enum: ["read", "write", "admin"], + type: "string" + }, + project_id: { + required: true, + type: "integer" + }, + team_slug: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/teams/:team_slug/projects/:project_id" + }, + addOrUpdateProjectLegacy: { + deprecated: "octokit.teams.addOrUpdateProjectLegacy() is deprecated, see https://developer.github.com/v3/teams/#add-or-update-team-project-legacy", + headers: { + accept: "application/vnd.github.inertia-preview+json" + }, + method: "PUT", + params: { + permission: { + enum: ["read", "write", "admin"], + type: "string" + }, + project_id: { + required: true, + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/projects/:project_id" + }, + addOrUpdateRepo: { + deprecated: "octokit.teams.addOrUpdateRepo() has been renamed to octokit.teams.addOrUpdateRepoLegacy() (2020-01-16)", + method: "PUT", + params: { + owner: { + required: true, + type: "string" + }, + permission: { + enum: ["pull", "push", "admin"], + type: "string" + }, + repo: { + required: true, + type: "string" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/repos/:owner/:repo" + }, + addOrUpdateRepoInOrg: { + method: "PUT", + params: { + org: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + permission: { + enum: ["pull", "push", "admin"], + type: "string" + }, + repo: { + required: true, + type: "string" + }, + team_slug: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/teams/:team_slug/repos/:owner/:repo" + }, + addOrUpdateRepoLegacy: { + deprecated: "octokit.teams.addOrUpdateRepoLegacy() is deprecated, see https://developer.github.com/v3/teams/#add-or-update-team-repository-legacy", + method: "PUT", + params: { + owner: { + required: true, + type: "string" + }, + permission: { + enum: ["pull", "push", "admin"], + type: "string" + }, + repo: { + required: true, + type: "string" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/repos/:owner/:repo" + }, + checkManagesRepo: { + deprecated: "octokit.teams.checkManagesRepo() has been renamed to octokit.teams.checkManagesRepoLegacy() (2020-01-16)", + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/repos/:owner/:repo" + }, + checkManagesRepoInOrg: { + method: "GET", + params: { + org: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + team_slug: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/teams/:team_slug/repos/:owner/:repo" + }, + checkManagesRepoLegacy: { + deprecated: "octokit.teams.checkManagesRepoLegacy() is deprecated, see https://developer.github.com/v3/teams/#check-if-a-team-manages-a-repository-legacy", + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/repos/:owner/:repo" + }, + create: { + method: "POST", + params: { + description: { + type: "string" + }, + maintainers: { + type: "string[]" + }, + name: { + required: true, + type: "string" + }, + org: { + required: true, + type: "string" + }, + parent_team_id: { + type: "integer" + }, + permission: { + enum: ["pull", "push", "admin"], + type: "string" + }, + privacy: { + enum: ["secret", "closed"], + type: "string" + }, + repo_names: { + type: "string[]" + } + }, + url: "/orgs/:org/teams" + }, + createDiscussion: { + deprecated: "octokit.teams.createDiscussion() has been renamed to octokit.teams.createDiscussionLegacy() (2020-01-16)", + method: "POST", + params: { + body: { + required: true, + type: "string" + }, + private: { + type: "boolean" + }, + team_id: { + required: true, + type: "integer" + }, + title: { + required: true, + type: "string" + } + }, + url: "/teams/:team_id/discussions" + }, + createDiscussionComment: { + deprecated: "octokit.teams.createDiscussionComment() has been renamed to octokit.teams.createDiscussionCommentLegacy() (2020-01-16)", + method: "POST", + params: { + body: { + required: true, + type: "string" + }, + discussion_number: { + required: true, + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/discussions/:discussion_number/comments" + }, + createDiscussionCommentInOrg: { + method: "POST", + params: { + body: { + required: true, + type: "string" + }, + discussion_number: { + required: true, + type: "integer" + }, + org: { + required: true, + type: "string" + }, + team_slug: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/teams/:team_slug/discussions/:discussion_number/comments" + }, + createDiscussionCommentLegacy: { + deprecated: "octokit.teams.createDiscussionCommentLegacy() is deprecated, see https://developer.github.com/v3/teams/discussion_comments/#create-a-comment-legacy", + method: "POST", + params: { + body: { + required: true, + type: "string" + }, + discussion_number: { + required: true, + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/discussions/:discussion_number/comments" + }, + createDiscussionInOrg: { + method: "POST", + params: { + body: { + required: true, + type: "string" + }, + org: { + required: true, + type: "string" + }, + private: { + type: "boolean" + }, + team_slug: { + required: true, + type: "string" + }, + title: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/teams/:team_slug/discussions" + }, + createDiscussionLegacy: { + deprecated: "octokit.teams.createDiscussionLegacy() is deprecated, see https://developer.github.com/v3/teams/discussions/#create-a-discussion-legacy", + method: "POST", + params: { + body: { + required: true, + type: "string" + }, + private: { + type: "boolean" + }, + team_id: { + required: true, + type: "integer" + }, + title: { + required: true, + type: "string" + } + }, + url: "/teams/:team_id/discussions" + }, + delete: { + deprecated: "octokit.teams.delete() has been renamed to octokit.teams.deleteLegacy() (2020-01-16)", + method: "DELETE", + params: { + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id" + }, + deleteDiscussion: { + deprecated: "octokit.teams.deleteDiscussion() has been renamed to octokit.teams.deleteDiscussionLegacy() (2020-01-16)", + method: "DELETE", + params: { + discussion_number: { + required: true, + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/discussions/:discussion_number" + }, + deleteDiscussionComment: { + deprecated: "octokit.teams.deleteDiscussionComment() has been renamed to octokit.teams.deleteDiscussionCommentLegacy() (2020-01-16)", + method: "DELETE", + params: { + comment_number: { + required: true, + type: "integer" + }, + discussion_number: { + required: true, + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/discussions/:discussion_number/comments/:comment_number" + }, + deleteDiscussionCommentInOrg: { + method: "DELETE", + params: { + comment_number: { + required: true, + type: "integer" + }, + discussion_number: { + required: true, + type: "integer" + }, + org: { + required: true, + type: "string" + }, + team_slug: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/teams/:team_slug/discussions/:discussion_number/comments/:comment_number" + }, + deleteDiscussionCommentLegacy: { + deprecated: "octokit.teams.deleteDiscussionCommentLegacy() is deprecated, see https://developer.github.com/v3/teams/discussion_comments/#delete-a-comment-legacy", + method: "DELETE", + params: { + comment_number: { + required: true, + type: "integer" + }, + discussion_number: { + required: true, + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/discussions/:discussion_number/comments/:comment_number" + }, + deleteDiscussionInOrg: { + method: "DELETE", + params: { + discussion_number: { + required: true, + type: "integer" + }, + org: { + required: true, + type: "string" + }, + team_slug: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/teams/:team_slug/discussions/:discussion_number" + }, + deleteDiscussionLegacy: { + deprecated: "octokit.teams.deleteDiscussionLegacy() is deprecated, see https://developer.github.com/v3/teams/discussions/#delete-a-discussion-legacy", + method: "DELETE", + params: { + discussion_number: { + required: true, + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/discussions/:discussion_number" + }, + deleteInOrg: { + method: "DELETE", + params: { + org: { + required: true, + type: "string" + }, + team_slug: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/teams/:team_slug" + }, + deleteLegacy: { + deprecated: "octokit.teams.deleteLegacy() is deprecated, see https://developer.github.com/v3/teams/#delete-team-legacy", + method: "DELETE", + params: { + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id" + }, + get: { + deprecated: "octokit.teams.get() has been renamed to octokit.teams.getLegacy() (2020-01-16)", + method: "GET", + params: { + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id" + }, + getByName: { + method: "GET", + params: { + org: { + required: true, + type: "string" + }, + team_slug: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/teams/:team_slug" + }, + getDiscussion: { + deprecated: "octokit.teams.getDiscussion() has been renamed to octokit.teams.getDiscussionLegacy() (2020-01-16)", + method: "GET", + params: { + discussion_number: { + required: true, + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/discussions/:discussion_number" + }, + getDiscussionComment: { + deprecated: "octokit.teams.getDiscussionComment() has been renamed to octokit.teams.getDiscussionCommentLegacy() (2020-01-16)", + method: "GET", + params: { + comment_number: { + required: true, + type: "integer" + }, + discussion_number: { + required: true, + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/discussions/:discussion_number/comments/:comment_number" + }, + getDiscussionCommentInOrg: { + method: "GET", + params: { + comment_number: { + required: true, + type: "integer" + }, + discussion_number: { + required: true, + type: "integer" + }, + org: { + required: true, + type: "string" + }, + team_slug: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/teams/:team_slug/discussions/:discussion_number/comments/:comment_number" + }, + getDiscussionCommentLegacy: { + deprecated: "octokit.teams.getDiscussionCommentLegacy() is deprecated, see https://developer.github.com/v3/teams/discussion_comments/#get-a-single-comment-legacy", + method: "GET", + params: { + comment_number: { + required: true, + type: "integer" + }, + discussion_number: { + required: true, + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/discussions/:discussion_number/comments/:comment_number" + }, + getDiscussionInOrg: { + method: "GET", + params: { + discussion_number: { + required: true, + type: "integer" + }, + org: { + required: true, + type: "string" + }, + team_slug: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/teams/:team_slug/discussions/:discussion_number" + }, + getDiscussionLegacy: { + deprecated: "octokit.teams.getDiscussionLegacy() is deprecated, see https://developer.github.com/v3/teams/discussions/#get-a-single-discussion-legacy", + method: "GET", + params: { + discussion_number: { + required: true, + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/discussions/:discussion_number" + }, + getLegacy: { + deprecated: "octokit.teams.getLegacy() is deprecated, see https://developer.github.com/v3/teams/#get-team-legacy", + method: "GET", + params: { + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id" + }, + getMember: { + deprecated: "octokit.teams.getMember() has been renamed to octokit.teams.getMemberLegacy() (2020-01-16)", + method: "GET", + params: { + team_id: { + required: true, + type: "integer" + }, + username: { + required: true, + type: "string" + } + }, + url: "/teams/:team_id/members/:username" + }, + getMemberLegacy: { + deprecated: "octokit.teams.getMemberLegacy() is deprecated, see https://developer.github.com/v3/teams/members/#get-team-member-legacy", + method: "GET", + params: { + team_id: { + required: true, + type: "integer" + }, + username: { + required: true, + type: "string" + } + }, + url: "/teams/:team_id/members/:username" + }, + getMembership: { + deprecated: "octokit.teams.getMembership() has been renamed to octokit.teams.getMembershipLegacy() (2020-01-16)", + method: "GET", + params: { + team_id: { + required: true, + type: "integer" + }, + username: { + required: true, + type: "string" + } + }, + url: "/teams/:team_id/memberships/:username" + }, + getMembershipInOrg: { + method: "GET", + params: { + org: { + required: true, + type: "string" + }, + team_slug: { + required: true, + type: "string" + }, + username: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/teams/:team_slug/memberships/:username" + }, + getMembershipLegacy: { + deprecated: "octokit.teams.getMembershipLegacy() is deprecated, see https://developer.github.com/v3/teams/members/#get-team-membership-legacy", + method: "GET", + params: { + team_id: { + required: true, + type: "integer" + }, + username: { + required: true, + type: "string" + } + }, + url: "/teams/:team_id/memberships/:username" + }, + list: { + method: "GET", + params: { + org: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/orgs/:org/teams" + }, + listChild: { + deprecated: "octokit.teams.listChild() has been renamed to octokit.teams.listChildLegacy() (2020-01-16)", + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/teams" + }, + listChildInOrg: { + method: "GET", + params: { + org: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + team_slug: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/teams/:team_slug/teams" + }, + listChildLegacy: { + deprecated: "octokit.teams.listChildLegacy() is deprecated, see https://developer.github.com/v3/teams/#list-child-teams-legacy", + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/teams" + }, + listDiscussionComments: { + deprecated: "octokit.teams.listDiscussionComments() has been renamed to octokit.teams.listDiscussionCommentsLegacy() (2020-01-16)", + method: "GET", + params: { + direction: { + enum: ["asc", "desc"], + type: "string" + }, + discussion_number: { + required: true, + type: "integer" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/discussions/:discussion_number/comments" + }, + listDiscussionCommentsInOrg: { + method: "GET", + params: { + direction: { + enum: ["asc", "desc"], + type: "string" + }, + discussion_number: { + required: true, + type: "integer" + }, + org: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + team_slug: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/teams/:team_slug/discussions/:discussion_number/comments" + }, + listDiscussionCommentsLegacy: { + deprecated: "octokit.teams.listDiscussionCommentsLegacy() is deprecated, see https://developer.github.com/v3/teams/discussion_comments/#list-comments-legacy", + method: "GET", + params: { + direction: { + enum: ["asc", "desc"], + type: "string" + }, + discussion_number: { + required: true, + type: "integer" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/discussions/:discussion_number/comments" + }, + listDiscussions: { + deprecated: "octokit.teams.listDiscussions() has been renamed to octokit.teams.listDiscussionsLegacy() (2020-01-16)", + method: "GET", + params: { + direction: { + enum: ["asc", "desc"], + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/discussions" + }, + listDiscussionsInOrg: { + method: "GET", + params: { + direction: { + enum: ["asc", "desc"], + type: "string" + }, + org: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + team_slug: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/teams/:team_slug/discussions" + }, + listDiscussionsLegacy: { + deprecated: "octokit.teams.listDiscussionsLegacy() is deprecated, see https://developer.github.com/v3/teams/discussions/#list-discussions-legacy", + method: "GET", + params: { + direction: { + enum: ["asc", "desc"], + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/discussions" + }, + listForAuthenticatedUser: { + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/user/teams" + }, + listMembers: { + deprecated: "octokit.teams.listMembers() has been renamed to octokit.teams.listMembersLegacy() (2020-01-16)", + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + role: { + enum: ["member", "maintainer", "all"], + type: "string" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/members" + }, + listMembersInOrg: { + method: "GET", + params: { + org: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + role: { + enum: ["member", "maintainer", "all"], + type: "string" + }, + team_slug: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/teams/:team_slug/members" + }, + listMembersLegacy: { + deprecated: "octokit.teams.listMembersLegacy() is deprecated, see https://developer.github.com/v3/teams/members/#list-team-members-legacy", + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + role: { + enum: ["member", "maintainer", "all"], + type: "string" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/members" + }, + listPendingInvitations: { + deprecated: "octokit.teams.listPendingInvitations() has been renamed to octokit.teams.listPendingInvitationsLegacy() (2020-01-16)", + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/invitations" + }, + listPendingInvitationsInOrg: { + method: "GET", + params: { + org: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + team_slug: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/teams/:team_slug/invitations" + }, + listPendingInvitationsLegacy: { + deprecated: "octokit.teams.listPendingInvitationsLegacy() is deprecated, see https://developer.github.com/v3/teams/members/#list-pending-team-invitations-legacy", + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/invitations" + }, + listProjects: { + deprecated: "octokit.teams.listProjects() has been renamed to octokit.teams.listProjectsLegacy() (2020-01-16)", + headers: { + accept: "application/vnd.github.inertia-preview+json" + }, + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/projects" + }, + listProjectsInOrg: { + headers: { + accept: "application/vnd.github.inertia-preview+json" + }, + method: "GET", + params: { + org: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + team_slug: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/teams/:team_slug/projects" + }, + listProjectsLegacy: { + deprecated: "octokit.teams.listProjectsLegacy() is deprecated, see https://developer.github.com/v3/teams/#list-team-projects-legacy", + headers: { + accept: "application/vnd.github.inertia-preview+json" + }, + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/projects" + }, + listRepos: { + deprecated: "octokit.teams.listRepos() has been renamed to octokit.teams.listReposLegacy() (2020-01-16)", + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/repos" + }, + listReposInOrg: { + method: "GET", + params: { + org: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + team_slug: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/teams/:team_slug/repos" + }, + listReposLegacy: { + deprecated: "octokit.teams.listReposLegacy() is deprecated, see https://developer.github.com/v3/teams/#list-team-repos-legacy", + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/repos" + }, + removeMember: { + deprecated: "octokit.teams.removeMember() has been renamed to octokit.teams.removeMemberLegacy() (2020-01-16)", + method: "DELETE", + params: { + team_id: { + required: true, + type: "integer" + }, + username: { + required: true, + type: "string" + } + }, + url: "/teams/:team_id/members/:username" + }, + removeMemberLegacy: { + deprecated: "octokit.teams.removeMemberLegacy() is deprecated, see https://developer.github.com/v3/teams/members/#remove-team-member-legacy", + method: "DELETE", + params: { + team_id: { + required: true, + type: "integer" + }, + username: { + required: true, + type: "string" + } + }, + url: "/teams/:team_id/members/:username" + }, + removeMembership: { + deprecated: "octokit.teams.removeMembership() has been renamed to octokit.teams.removeMembershipLegacy() (2020-01-16)", + method: "DELETE", + params: { + team_id: { + required: true, + type: "integer" + }, + username: { + required: true, + type: "string" + } + }, + url: "/teams/:team_id/memberships/:username" + }, + removeMembershipInOrg: { + method: "DELETE", + params: { + org: { + required: true, + type: "string" + }, + team_slug: { + required: true, + type: "string" + }, + username: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/teams/:team_slug/memberships/:username" + }, + removeMembershipLegacy: { + deprecated: "octokit.teams.removeMembershipLegacy() is deprecated, see https://developer.github.com/v3/teams/members/#remove-team-membership-legacy", + method: "DELETE", + params: { + team_id: { + required: true, + type: "integer" + }, + username: { + required: true, + type: "string" + } + }, + url: "/teams/:team_id/memberships/:username" + }, + removeProject: { + deprecated: "octokit.teams.removeProject() has been renamed to octokit.teams.removeProjectLegacy() (2020-01-16)", + method: "DELETE", + params: { + project_id: { + required: true, + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/projects/:project_id" + }, + removeProjectInOrg: { + method: "DELETE", + params: { + org: { + required: true, + type: "string" + }, + project_id: { + required: true, + type: "integer" + }, + team_slug: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/teams/:team_slug/projects/:project_id" + }, + removeProjectLegacy: { + deprecated: "octokit.teams.removeProjectLegacy() is deprecated, see https://developer.github.com/v3/teams/#remove-team-project-legacy", + method: "DELETE", + params: { + project_id: { + required: true, + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/projects/:project_id" + }, + removeRepo: { + deprecated: "octokit.teams.removeRepo() has been renamed to octokit.teams.removeRepoLegacy() (2020-01-16)", + method: "DELETE", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/repos/:owner/:repo" + }, + removeRepoInOrg: { + method: "DELETE", + params: { + org: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + team_slug: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/teams/:team_slug/repos/:owner/:repo" + }, + removeRepoLegacy: { + deprecated: "octokit.teams.removeRepoLegacy() is deprecated, see https://developer.github.com/v3/teams/#remove-team-repository-legacy", + method: "DELETE", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/repos/:owner/:repo" + }, + reviewProject: { + deprecated: "octokit.teams.reviewProject() has been renamed to octokit.teams.reviewProjectLegacy() (2020-01-16)", + headers: { + accept: "application/vnd.github.inertia-preview+json" + }, + method: "GET", + params: { + project_id: { + required: true, + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/projects/:project_id" + }, + reviewProjectInOrg: { + headers: { + accept: "application/vnd.github.inertia-preview+json" + }, + method: "GET", + params: { + org: { + required: true, + type: "string" + }, + project_id: { + required: true, + type: "integer" + }, + team_slug: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/teams/:team_slug/projects/:project_id" + }, + reviewProjectLegacy: { + deprecated: "octokit.teams.reviewProjectLegacy() is deprecated, see https://developer.github.com/v3/teams/#review-a-team-project-legacy", + headers: { + accept: "application/vnd.github.inertia-preview+json" + }, + method: "GET", + params: { + project_id: { + required: true, + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/projects/:project_id" + }, + update: { + deprecated: "octokit.teams.update() has been renamed to octokit.teams.updateLegacy() (2020-01-16)", + method: "PATCH", + params: { + description: { + type: "string" + }, + name: { + required: true, + type: "string" + }, + parent_team_id: { + type: "integer" + }, + permission: { + enum: ["pull", "push", "admin"], + type: "string" + }, + privacy: { + enum: ["secret", "closed"], + type: "string" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id" + }, + updateDiscussion: { + deprecated: "octokit.teams.updateDiscussion() has been renamed to octokit.teams.updateDiscussionLegacy() (2020-01-16)", + method: "PATCH", + params: { + body: { + type: "string" + }, + discussion_number: { + required: true, + type: "integer" + }, + team_id: { + required: true, + type: "integer" + }, + title: { + type: "string" + } + }, + url: "/teams/:team_id/discussions/:discussion_number" + }, + updateDiscussionComment: { + deprecated: "octokit.teams.updateDiscussionComment() has been renamed to octokit.teams.updateDiscussionCommentLegacy() (2020-01-16)", + method: "PATCH", + params: { + body: { + required: true, + type: "string" + }, + comment_number: { + required: true, + type: "integer" + }, + discussion_number: { + required: true, + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/discussions/:discussion_number/comments/:comment_number" + }, + updateDiscussionCommentInOrg: { + method: "PATCH", + params: { + body: { + required: true, + type: "string" + }, + comment_number: { + required: true, + type: "integer" + }, + discussion_number: { + required: true, + type: "integer" + }, + org: { + required: true, + type: "string" + }, + team_slug: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/teams/:team_slug/discussions/:discussion_number/comments/:comment_number" + }, + updateDiscussionCommentLegacy: { + deprecated: "octokit.teams.updateDiscussionCommentLegacy() is deprecated, see https://developer.github.com/v3/teams/discussion_comments/#edit-a-comment-legacy", + method: "PATCH", + params: { + body: { + required: true, + type: "string" + }, + comment_number: { + required: true, + type: "integer" + }, + discussion_number: { + required: true, + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/discussions/:discussion_number/comments/:comment_number" + }, + updateDiscussionInOrg: { + method: "PATCH", + params: { + body: { + type: "string" + }, + discussion_number: { + required: true, + type: "integer" + }, + org: { + required: true, + type: "string" + }, + team_slug: { + required: true, + type: "string" + }, + title: { + type: "string" + } + }, + url: "/orgs/:org/teams/:team_slug/discussions/:discussion_number" + }, + updateDiscussionLegacy: { + deprecated: "octokit.teams.updateDiscussionLegacy() is deprecated, see https://developer.github.com/v3/teams/discussions/#edit-a-discussion-legacy", + method: "PATCH", + params: { + body: { + type: "string" + }, + discussion_number: { + required: true, + type: "integer" + }, + team_id: { + required: true, + type: "integer" + }, + title: { + type: "string" + } + }, + url: "/teams/:team_id/discussions/:discussion_number" + }, + updateInOrg: { + method: "PATCH", + params: { + description: { + type: "string" + }, + name: { + required: true, + type: "string" + }, + org: { + required: true, + type: "string" + }, + parent_team_id: { + type: "integer" + }, + permission: { + enum: ["pull", "push", "admin"], + type: "string" + }, + privacy: { + enum: ["secret", "closed"], + type: "string" + }, + team_slug: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/teams/:team_slug" + }, + updateLegacy: { + deprecated: "octokit.teams.updateLegacy() is deprecated, see https://developer.github.com/v3/teams/#edit-team-legacy", + method: "PATCH", + params: { + description: { + type: "string" + }, + name: { + required: true, + type: "string" + }, + parent_team_id: { + type: "integer" + }, + permission: { + enum: ["pull", "push", "admin"], + type: "string" + }, + privacy: { + enum: ["secret", "closed"], + type: "string" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id" + } + }, + users: { + addEmails: { + method: "POST", + params: { + emails: { + required: true, + type: "string[]" + } + }, + url: "/user/emails" + }, + block: { + method: "PUT", + params: { + username: { + required: true, + type: "string" + } + }, + url: "/user/blocks/:username" + }, + checkBlocked: { + method: "GET", + params: { + username: { + required: true, + type: "string" + } + }, + url: "/user/blocks/:username" + }, + checkFollowing: { + method: "GET", + params: { + username: { + required: true, + type: "string" + } + }, + url: "/user/following/:username" + }, + checkFollowingForUser: { + method: "GET", + params: { + target_user: { + required: true, + type: "string" + }, + username: { + required: true, + type: "string" + } + }, + url: "/users/:username/following/:target_user" + }, + createGpgKey: { + method: "POST", + params: { + armored_public_key: { + type: "string" + } + }, + url: "/user/gpg_keys" + }, + createPublicKey: { + method: "POST", + params: { + key: { + type: "string" + }, + title: { + type: "string" + } + }, + url: "/user/keys" + }, + deleteEmails: { + method: "DELETE", + params: { + emails: { + required: true, + type: "string[]" + } + }, + url: "/user/emails" + }, + deleteGpgKey: { + method: "DELETE", + params: { + gpg_key_id: { + required: true, + type: "integer" + } + }, + url: "/user/gpg_keys/:gpg_key_id" + }, + deletePublicKey: { + method: "DELETE", + params: { + key_id: { + required: true, + type: "integer" + } + }, + url: "/user/keys/:key_id" + }, + follow: { + method: "PUT", + params: { + username: { + required: true, + type: "string" + } + }, + url: "/user/following/:username" + }, + getAuthenticated: { + method: "GET", + params: {}, + url: "/user" + }, + getByUsername: { + method: "GET", + params: { + username: { + required: true, + type: "string" + } + }, + url: "/users/:username" + }, + getContextForUser: { + method: "GET", + params: { + subject_id: { + type: "string" + }, + subject_type: { + enum: ["organization", "repository", "issue", "pull_request"], + type: "string" + }, + username: { + required: true, + type: "string" + } + }, + url: "/users/:username/hovercard" + }, + getGpgKey: { + method: "GET", + params: { + gpg_key_id: { + required: true, + type: "integer" + } + }, + url: "/user/gpg_keys/:gpg_key_id" + }, + getPublicKey: { + method: "GET", + params: { + key_id: { + required: true, + type: "integer" + } + }, + url: "/user/keys/:key_id" + }, + list: { + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + since: { + type: "string" + } + }, + url: "/users" + }, + listBlocked: { + method: "GET", + params: {}, + url: "/user/blocks" + }, + listEmails: { + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/user/emails" + }, + listFollowersForAuthenticatedUser: { + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/user/followers" + }, + listFollowersForUser: { + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + username: { + required: true, + type: "string" + } + }, + url: "/users/:username/followers" + }, + listFollowingForAuthenticatedUser: { + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/user/following" + }, + listFollowingForUser: { + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + username: { + required: true, + type: "string" + } + }, + url: "/users/:username/following" + }, + listGpgKeys: { + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/user/gpg_keys" + }, + listGpgKeysForUser: { + method: "GET", + params: { + page: { + type: "integer" }, - - /** - * @api private - */ - timeoutError: function timeoutError(error) { - return error.code === "TimeoutError"; + per_page: { + type: "integer" }, - - /** - * @api private - */ - expiredCredentialsError: function expiredCredentialsError(error) { - // TODO : this only handles *one* of the expired credential codes - return error.code === "ExpiredTokenException"; + username: { + required: true, + type: "string" + } + }, + url: "/users/:username/gpg_keys" + }, + listPublicEmails: { + method: "GET", + params: { + page: { + type: "integer" }, - - /** - * @api private - */ - clockSkewError: function clockSkewError(error) { - switch (error.code) { - case "RequestTimeTooSkewed": - case "RequestExpired": - case "InvalidSignatureException": - case "SignatureDoesNotMatch": - case "AuthFailure": - case "RequestInTheFuture": - return true; - default: - return false; - } + per_page: { + type: "integer" + } + }, + url: "/user/public_emails" + }, + listPublicKeys: { + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/user/keys" + }, + listPublicKeysForUser: { + method: "GET", + params: { + page: { + type: "integer" }, - - /** - * @api private - */ - getSkewCorrectedDate: function getSkewCorrectedDate() { - return new Date(Date.now() + this.config.systemClockOffset); + per_page: { + type: "integer" }, - - /** - * @api private - */ - applyClockOffset: function applyClockOffset(newServerTime) { - if (newServerTime) { - this.config.systemClockOffset = newServerTime - Date.now(); - } + username: { + required: true, + type: "string" + } + }, + url: "/users/:username/keys" + }, + togglePrimaryEmailVisibility: { + method: "PATCH", + params: { + email: { + required: true, + type: "string" }, - - /** - * @api private - */ - isClockSkewed: function isClockSkewed(newServerTime) { - if (newServerTime) { - return ( - Math.abs(this.getSkewCorrectedDate().getTime() - newServerTime) >= - 300000 - ); - } + visibility: { + required: true, + type: "string" + } + }, + url: "/user/email/visibility" + }, + unblock: { + method: "DELETE", + params: { + username: { + required: true, + type: "string" + } + }, + url: "/user/blocks/:username" + }, + unfollow: { + method: "DELETE", + params: { + username: { + required: true, + type: "string" + } + }, + url: "/user/following/:username" + }, + updateAuthenticated: { + method: "PATCH", + params: { + bio: { + type: "string" }, - - /** - * @api private - */ - throttledError: function throttledError(error) { - // this logic varies between services - if (error.statusCode === 429) return true; - switch (error.code) { - case "ProvisionedThroughputExceededException": - case "Throttling": - case "ThrottlingException": - case "RequestLimitExceeded": - case "RequestThrottled": - case "RequestThrottledException": - case "TooManyRequestsException": - case "TransactionInProgressException": //dynamodb - case "EC2ThrottledException": - return true; - default: - return false; - } + blog: { + type: "string" }, - - /** - * @api private - */ - endpointFromTemplate: function endpointFromTemplate(endpoint) { - if (typeof endpoint !== "string") return endpoint; - - var e = endpoint; - e = e.replace(/\{service\}/g, this.api.endpointPrefix); - e = e.replace(/\{region\}/g, this.config.region); - e = e.replace( - /\{scheme\}/g, - this.config.sslEnabled ? "https" : "http" - ); - return e; - }, - - /** - * @api private - */ - setEndpoint: function setEndpoint(endpoint) { - this.endpoint = new AWS.Endpoint(endpoint, this.config); - }, - - /** - * @api private - */ - paginationConfig: function paginationConfig(operation, throwException) { - var paginator = this.api.operations[operation].paginator; - if (!paginator) { - if (throwException) { - var e = new Error(); - throw AWS.util.error( - e, - "No pagination configuration for " + operation - ); - } - return null; - } - - return paginator; + company: { + type: "string" }, - }); - - AWS.util.update(AWS.Service, { - /** - * Adds one method for each operation described in the api configuration - * - * @api private - */ - defineMethods: function defineMethods(svc) { - AWS.util.each(svc.prototype.api.operations, function iterator( - method - ) { - if (svc.prototype[method]) return; - var operation = svc.prototype.api.operations[method]; - if (operation.authtype === "none") { - svc.prototype[method] = function (params, callback) { - return this.makeUnauthenticatedRequest( - method, - params, - callback - ); - }; - } else { - svc.prototype[method] = function (params, callback) { - return this.makeRequest(method, params, callback); - }; - } - }); + email: { + type: "string" }, - - /** - * Defines a new Service class using a service identifier and list of versions - * including an optional set of features (functions) to apply to the class - * prototype. - * - * @param serviceIdentifier [String] the identifier for the service - * @param versions [Array] a list of versions that work with this - * service - * @param features [Object] an object to attach to the prototype - * @return [Class] the service class defined by this function. - */ - defineService: function defineService( - serviceIdentifier, - versions, - features - ) { - AWS.Service._serviceMap[serviceIdentifier] = true; - if (!Array.isArray(versions)) { - features = versions; - versions = []; - } - - var svc = inherit(AWS.Service, features || {}); - - if (typeof serviceIdentifier === "string") { - AWS.Service.addVersions(svc, versions); - - var identifier = svc.serviceIdentifier || serviceIdentifier; - svc.serviceIdentifier = identifier; - } else { - // defineService called with an API - svc.prototype.api = serviceIdentifier; - AWS.Service.defineMethods(svc); - } - AWS.SequentialExecutor.call(this.prototype); - //util.clientSideMonitoring is only available in node - if (!this.prototype.publisher && AWS.util.clientSideMonitoring) { - var Publisher = AWS.util.clientSideMonitoring.Publisher; - var configProvider = AWS.util.clientSideMonitoring.configProvider; - var publisherConfig = configProvider(); - this.prototype.publisher = new Publisher(publisherConfig); - if (publisherConfig.enabled) { - //if csm is enabled in environment, SDK should send all metrics - AWS.Service._clientSideMonitoring = true; - } - } - AWS.SequentialExecutor.call(svc.prototype); - AWS.Service.addDefaultMonitoringListeners(svc.prototype); - return svc; + hireable: { + type: "boolean" }, + location: { + type: "string" + }, + name: { + type: "string" + } + }, + url: "/user" + } + } +}; - /** - * @api private - */ - addVersions: function addVersions(svc, versions) { - if (!Array.isArray(versions)) versions = [versions]; - - svc.services = svc.services || {}; - for (var i = 0; i < versions.length; i++) { - if (svc.services[versions[i]] === undefined) { - svc.services[versions[i]] = null; - } - } +const VERSION = "2.4.0"; - svc.apiVersions = Object.keys(svc.services).sort(); - }, +function registerEndpoints(octokit, routes) { + Object.keys(routes).forEach(namespaceName => { + if (!octokit[namespaceName]) { + octokit[namespaceName] = {}; + } - /** - * @api private - */ - defineServiceApi: function defineServiceApi( - superclass, - version, - apiConfig - ) { - var svc = inherit(superclass, { - serviceIdentifier: superclass.serviceIdentifier, - }); + Object.keys(routes[namespaceName]).forEach(apiName => { + const apiOptions = routes[namespaceName][apiName]; + const endpointDefaults = ["method", "url", "headers"].reduce((map, key) => { + if (typeof apiOptions[key] !== "undefined") { + map[key] = apiOptions[key]; + } - function setApi(api) { - if (api.isApi) { - svc.prototype.api = api; - } else { - svc.prototype.api = new Api(api, { - serviceIdentifier: superclass.serviceIdentifier, - }); - } - } + return map; + }, {}); + endpointDefaults.request = { + validate: apiOptions.params + }; + let request = octokit.request.defaults(endpointDefaults); // patch request & endpoint methods to support deprecated parameters. + // Not the most elegant solution, but we don’t want to move deprecation + // logic into octokit/endpoint.js as it’s out of scope + + const hasDeprecatedParam = Object.keys(apiOptions.params || {}).find(key => apiOptions.params[key].deprecated); + + if (hasDeprecatedParam) { + const patch = patchForDeprecation.bind(null, octokit, apiOptions); + request = patch(octokit.request.defaults(endpointDefaults), `.${namespaceName}.${apiName}()`); + request.endpoint = patch(request.endpoint, `.${namespaceName}.${apiName}.endpoint()`); + request.endpoint.merge = patch(request.endpoint.merge, `.${namespaceName}.${apiName}.endpoint.merge()`); + } + + if (apiOptions.deprecated) { + octokit[namespaceName][apiName] = Object.assign(function deprecatedEndpointMethod() { + octokit.log.warn(new deprecation.Deprecation(`[@octokit/rest] ${apiOptions.deprecated}`)); + octokit[namespaceName][apiName] = request; + return request.apply(null, arguments); + }, request); + return; + } + + octokit[namespaceName][apiName] = request; + }); + }); +} + +function patchForDeprecation(octokit, apiOptions, method, methodName) { + const patchedMethod = options => { + options = Object.assign({}, options); + Object.keys(options).forEach(key => { + if (apiOptions.params[key] && apiOptions.params[key].deprecated) { + const aliasKey = apiOptions.params[key].alias; + octokit.log.warn(new deprecation.Deprecation(`[@octokit/rest] "${key}" parameter is deprecated for "${methodName}". Use "${aliasKey}" instead`)); + + if (!(aliasKey in options)) { + options[aliasKey] = options[key]; + } + + delete options[key]; + } + }); + return method(options); + }; + + Object.keys(method).forEach(key => { + patchedMethod[key] = method[key]; + }); + return patchedMethod; +} + +/** + * This plugin is a 1:1 copy of internal @octokit/rest plugins. The primary + * goal is to rebuild @octokit/rest on top of @octokit/core. Once that is + * done, we will remove the registerEndpoints methods and return the methods + * directly as with the other plugins. At that point we will also remove the + * legacy workarounds and deprecations. + * + * See the plan at + * https://github.com/octokit/plugin-rest-endpoint-methods.js/pull/1 + */ - if (typeof version === "string") { - if (apiConfig) { - setApi(apiConfig); - } else { - try { - setApi(AWS.apiLoader(superclass.serviceIdentifier, version)); - } catch (err) { - throw AWS.util.error(err, { - message: - "Could not find API configuration " + - superclass.serviceIdentifier + - "-" + - version, - }); - } - } - if ( - !Object.prototype.hasOwnProperty.call( - superclass.services, - version - ) - ) { - superclass.apiVersions = superclass.apiVersions - .concat(version) - .sort(); - } - superclass.services[version] = svc; - } else { - setApi(version); - } +function restEndpointMethods(octokit) { + // @ts-ignore + octokit.registerEndpoints = registerEndpoints.bind(null, octokit); + registerEndpoints(octokit, endpointsByScope); // Aliasing scopes for backward compatibility + // See https://github.com/octokit/rest.js/pull/1134 - AWS.Service.defineMethods(svc); - return svc; - }, + [["gitdata", "git"], ["authorization", "oauthAuthorizations"], ["pullRequests", "pulls"]].forEach(([deprecatedScope, scope]) => { + Object.defineProperty(octokit, deprecatedScope, { + get() { + octokit.log.warn( // @ts-ignore + new deprecation.Deprecation(`[@octokit/plugin-rest-endpoint-methods] "octokit.${deprecatedScope}.*" methods are deprecated, use "octokit.${scope}.*" instead`)); // @ts-ignore - /** - * @api private - */ - hasService: function (identifier) { - return Object.prototype.hasOwnProperty.call( - AWS.Service._serviceMap, - identifier - ); - }, + return octokit[scope]; + } - /** - * @param attachOn attach default monitoring listeners to object - * - * Each monitoring event should be emitted from service client to service constructor prototype and then - * to global service prototype like bubbling up. These default monitoring events listener will transfer - * the monitoring events to the upper layer. - * @api private - */ - addDefaultMonitoringListeners: function addDefaultMonitoringListeners( - attachOn - ) { - attachOn.addNamedListener( - "MONITOR_EVENTS_BUBBLE", - "apiCallAttempt", - function EVENTS_BUBBLE(event) { - var baseClass = Object.getPrototypeOf(attachOn); - if (baseClass._events) baseClass.emit("apiCallAttempt", [event]); - } - ); - attachOn.addNamedListener( - "CALL_EVENTS_BUBBLE", - "apiCall", - function CALL_EVENTS_BUBBLE(event) { - var baseClass = Object.getPrototypeOf(attachOn); - if (baseClass._events) baseClass.emit("apiCall", [event]); - } - ); - }, + }); + }); + return {}; +} +restEndpointMethods.VERSION = VERSION; - /** - * @api private - */ - _serviceMap: {}, - }); +exports.restEndpointMethods = restEndpointMethods; +//# sourceMappingURL=index.js.map - AWS.util.mixin(AWS.Service, AWS.SequentialExecutor); - - /** - * @api private - */ - module.exports = AWS.Service; - - /***/ - }, - - /***/ 4338: /***/ ( - __unused_webpack_module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var AWS = __nccwpck_require__(28437); - - AWS.util.update(AWS.APIGateway.prototype, { - /** - * Sets the Accept header to application/json. - * - * @api private - */ - setAcceptHeader: function setAcceptHeader(req) { - var httpRequest = req.httpRequest; - if (!httpRequest.headers.Accept) { - httpRequest.headers["Accept"] = "application/json"; - } - }, - /** - * @api private - */ - setupRequestListeners: function setupRequestListeners(request) { - request.addListener("build", this.setAcceptHeader); - if (request.operation === "getExport") { - var params = request.params || {}; - if (params.exportType === "swagger") { - request.addListener( - "extractData", - AWS.util.convertPayloadToString - ); - } - } - }, - }); +/***/ }), - /***/ - }, +/***/ 10537: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - /***/ 95483: /***/ ( - __unused_webpack_module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var AWS = __nccwpck_require__(28437); +"use strict"; - // pull in CloudFront signer - __nccwpck_require__(93260); - AWS.util.update(AWS.CloudFront.prototype, { - setupRequestListeners: function setupRequestListeners(request) { - request.addListener("extractData", AWS.util.hoistPayloadMember); - }, - }); +Object.defineProperty(exports, "__esModule", ({ value: true })); - /***/ - }, - - /***/ 48571: /***/ ( - __unused_webpack_module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var AWS = __nccwpck_require__(28437); - - /** - * Constructs a service interface object. Each API operation is exposed as a - * function on service. - * - * ### Sending a Request Using CloudSearchDomain - * - * ```javascript - * var csd = new AWS.CloudSearchDomain({endpoint: 'my.host.tld'}); - * csd.search(params, function (err, data) { - * if (err) console.log(err, err.stack); // an error occurred - * else console.log(data); // successful response - * }); - * ``` - * - * ### Locking the API Version - * - * In order to ensure that the CloudSearchDomain object uses this specific API, - * you can construct the object by passing the `apiVersion` option to the - * constructor: - * - * ```javascript - * var csd = new AWS.CloudSearchDomain({ - * endpoint: 'my.host.tld', - * apiVersion: '2013-01-01' - * }); - * ``` - * - * You can also set the API version globally in `AWS.config.apiVersions` using - * the **cloudsearchdomain** service identifier: - * - * ```javascript - * AWS.config.apiVersions = { - * cloudsearchdomain: '2013-01-01', - * // other service API versions - * }; - * - * var csd = new AWS.CloudSearchDomain({endpoint: 'my.host.tld'}); - * ``` - * - * @note You *must* provide an `endpoint` configuration parameter when - * constructing this service. See {constructor} for more information. - * - * @!method constructor(options = {}) - * Constructs a service object. This object has one method for each - * API operation. - * - * @example Constructing a CloudSearchDomain object - * var csd = new AWS.CloudSearchDomain({endpoint: 'my.host.tld'}); - * @note You *must* provide an `endpoint` when constructing this service. - * @option (see AWS.Config.constructor) - * - * @service cloudsearchdomain - * @version 2013-01-01 - */ - AWS.util.update(AWS.CloudSearchDomain.prototype, { - /** - * @api private - */ - validateService: function validateService() { - if (!this.config.endpoint || this.config.endpoint.indexOf("{") >= 0) { - var msg = - "AWS.CloudSearchDomain requires an explicit " + - "`endpoint' configuration option."; - throw AWS.util.error(new Error(), { - name: "InvalidEndpoint", - message: msg, - }); - } - }, +function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } - /** - * @api private - */ - setupRequestListeners: function setupRequestListeners(request) { - request.removeListener( - "validate", - AWS.EventListeners.Core.VALIDATE_CREDENTIALS - ); - request.onAsync("validate", this.validateCredentials); - request.addListener("validate", this.updateRegion); - if (request.operation === "search") { - request.addListener("build", this.convertGetToPost); - } - }, +var deprecation = __nccwpck_require__(58932); +var once = _interopDefault(__nccwpck_require__(1223)); - /** - * @api private - */ - validateCredentials: function (req, done) { - if (!req.service.api.signatureVersion) return done(); // none - req.service.config.getCredentials(function (err) { - if (err) { - req.removeListener("sign", AWS.EventListeners.Core.SIGN); - } - done(); - }); - }, +const logOnce = once(deprecation => console.warn(deprecation)); +/** + * Error with extra properties to help with debugging + */ - /** - * @api private - */ - convertGetToPost: function (request) { - var httpRequest = request.httpRequest; - // convert queries to POST to avoid length restrictions - var path = httpRequest.path.split("?"); - httpRequest.method = "POST"; - httpRequest.path = path[0]; - httpRequest.body = path[1]; - httpRequest.headers["Content-Length"] = httpRequest.body.length; - httpRequest.headers["Content-Type"] = - "application/x-www-form-urlencoded"; - }, - - /** - * @api private - */ - updateRegion: function updateRegion(request) { - var endpoint = request.httpRequest.endpoint.hostname; - var zones = endpoint.split("."); - request.httpRequest.region = zones[1] || request.httpRequest.region; - }, - }); +class RequestError extends Error { + constructor(message, statusCode, options) { + super(message); // Maintains proper stack trace (only available on V8) - /***/ - }, - - /***/ 17101: /***/ ( - __unused_webpack_module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var AWS = __nccwpck_require__(28437); - __nccwpck_require__(90030); - - AWS.util.update(AWS.DynamoDB.prototype, { - /** - * @api private - */ - setupRequestListeners: function setupRequestListeners(request) { - if (request.service.config.dynamoDbCrc32) { - request.removeListener( - "extractData", - AWS.EventListeners.Json.EXTRACT_DATA - ); - request.addListener("extractData", this.checkCrc32); - request.addListener( - "extractData", - AWS.EventListeners.Json.EXTRACT_DATA - ); - } - }, + /* istanbul ignore next */ - /** - * @api private - */ - checkCrc32: function checkCrc32(resp) { - if ( - !resp.httpResponse.streaming && - !resp.request.service.crc32IsValid(resp) - ) { - resp.data = null; - resp.error = AWS.util.error(new Error(), { - code: "CRC32CheckFailed", - message: "CRC32 integrity check failed", - retryable: true, - }); - resp.request.haltHandlersOnError(); - throw resp.error; - } - }, + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } - /** - * @api private - */ - crc32IsValid: function crc32IsValid(resp) { - var crc = resp.httpResponse.headers["x-amz-crc32"]; - if (!crc) return true; // no (valid) CRC32 header - return ( - parseInt(crc, 10) === AWS.util.crypto.crc32(resp.httpResponse.body) - ); - }, + this.name = "HttpError"; + this.status = statusCode; + Object.defineProperty(this, "code", { + get() { + logOnce(new deprecation.Deprecation("[@octokit/request-error] `error.code` is deprecated, use `error.status`.")); + return statusCode; + } - /** - * @api private - */ - defaultRetryCount: 10, + }); + this.headers = options.headers || {}; // redact request credentials without mutating original request options - /** - * @api private - */ - retryDelays: function retryDelays(retryCount, err) { - var retryDelayOptions = AWS.util.copy(this.config.retryDelayOptions); + const requestCopy = Object.assign({}, options.request); - if (typeof retryDelayOptions.base !== "number") { - retryDelayOptions.base = 50; // default for dynamodb - } - var delay = AWS.util.calculateRetryDelay( - retryCount, - retryDelayOptions, - err - ); - return delay; - }, + if (options.request.headers.authorization) { + requestCopy.headers = Object.assign({}, options.request.headers, { + authorization: options.request.headers.authorization.replace(/ .*$/, " [REDACTED]") }); + } - /***/ - }, + requestCopy.url = requestCopy.url // client_id & client_secret can be passed as URL query parameters to increase rate limit + // see https://developer.github.com/v3/#increasing-the-unauthenticated-rate-limit-for-oauth-applications + .replace(/\bclient_secret=\w+/g, "client_secret=[REDACTED]") // OAuth tokens can be passed as URL query parameters, although it is not recommended + // see https://developer.github.com/v3/#oauth2-token-sent-in-a-header + .replace(/\baccess_token=\w+/g, "access_token=[REDACTED]"); + this.request = requestCopy; + } - /***/ 92501: /***/ ( - __unused_webpack_module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var AWS = __nccwpck_require__(28437); +} - AWS.util.update(AWS.EC2.prototype, { - /** - * @api private - */ - setupRequestListeners: function setupRequestListeners(request) { - request.removeListener( - "extractError", - AWS.EventListeners.Query.EXTRACT_ERROR - ); - request.addListener("extractError", this.extractError); +exports.RequestError = RequestError; +//# sourceMappingURL=index.js.map - if (request.operation === "copySnapshot") { - request.onAsync("validate", this.buildCopySnapshotPresignedUrl); - } - }, - /** - * @api private - */ - buildCopySnapshotPresignedUrl: function buildCopySnapshotPresignedUrl( - req, - done - ) { - if (req.params.PresignedUrl || req._subRequest) { - return done(); - } +/***/ }), - req.params = AWS.util.copy(req.params); - req.params.DestinationRegion = req.service.config.region; - - var config = AWS.util.copy(req.service.config); - delete config.endpoint; - config.region = req.params.SourceRegion; - var svc = new req.service.constructor(config); - var newReq = svc[req.operation](req.params); - newReq._subRequest = true; - newReq.presign(function (err, url) { - if (err) done(err); - else { - req.params.PresignedUrl = url; - done(); - } - }); - }, +/***/ 36234: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - /** - * @api private - */ - extractError: function extractError(resp) { - // EC2 nests the error code and message deeper than other AWS Query services. - var httpResponse = resp.httpResponse; - var data = new AWS.XML.Parser().parse( - httpResponse.body.toString() || "" - ); - if (data.Errors) { - resp.error = AWS.util.error(new Error(), { - code: data.Errors.Error.Code, - message: data.Errors.Error.Message, - }); - } else { - resp.error = AWS.util.error(new Error(), { - code: httpResponse.statusCode, - message: null, - }); - } - resp.error.requestId = data.RequestID || null; - }, - }); +"use strict"; - /***/ - }, - /***/ 14472: /***/ ( - __unused_webpack_module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var AWS = __nccwpck_require__(28437); +Object.defineProperty(exports, "__esModule", ({ value: true })); - AWS.util.update(AWS.Glacier.prototype, { - /** - * @api private - */ - setupRequestListeners: function setupRequestListeners(request) { - if (Array.isArray(request._events.validate)) { - request._events.validate.unshift(this.validateAccountId); - } else { - request.on("validate", this.validateAccountId); - } - request.removeListener( - "afterBuild", - AWS.EventListeners.Core.COMPUTE_SHA256 - ); - request.on("build", this.addGlacierApiVersion); - request.on("build", this.addTreeHashHeaders); - }, +function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } - /** - * @api private - */ - validateAccountId: function validateAccountId(request) { - if (request.params.accountId !== undefined) return; - request.params = AWS.util.copy(request.params); - request.params.accountId = "-"; - }, +var endpoint = __nccwpck_require__(59440); +var universalUserAgent = __nccwpck_require__(41441); +var isPlainObject = _interopDefault(__nccwpck_require__(48840)); +var nodeFetch = _interopDefault(__nccwpck_require__(80467)); +var requestError = __nccwpck_require__(10537); - /** - * @api private - */ - addGlacierApiVersion: function addGlacierApiVersion(request) { - var version = request.service.api.apiVersion; - request.httpRequest.headers["x-amz-glacier-version"] = version; - }, +const VERSION = "5.3.4"; - /** - * @api private - */ - addTreeHashHeaders: function addTreeHashHeaders(request) { - if (request.params.body === undefined) return; +function getBufferResponse(response) { + return response.arrayBuffer(); +} - var hashes = request.service.computeChecksums(request.params.body); - request.httpRequest.headers["X-Amz-Content-Sha256"] = - hashes.linearHash; +function fetchWrapper(requestOptions) { + if (isPlainObject(requestOptions.body) || Array.isArray(requestOptions.body)) { + requestOptions.body = JSON.stringify(requestOptions.body); + } - if (!request.httpRequest.headers["x-amz-sha256-tree-hash"]) { - request.httpRequest.headers["x-amz-sha256-tree-hash"] = - hashes.treeHash; - } - }, + let headers = {}; + let status; + let url; + const fetch = requestOptions.request && requestOptions.request.fetch || nodeFetch; + return fetch(requestOptions.url, Object.assign({ + method: requestOptions.method, + body: requestOptions.body, + headers: requestOptions.headers, + redirect: requestOptions.redirect + }, requestOptions.request)).then(response => { + url = response.url; + status = response.status; - /** - * @!group Computing Checksums - */ - - /** - * Computes the SHA-256 linear and tree hash checksums for a given - * block of Buffer data. Pass the tree hash of the computed checksums - * as the checksum input to the {completeMultipartUpload} when performing - * a multi-part upload. - * - * @example Calculate checksum of 5.5MB data chunk - * var glacier = new AWS.Glacier(); - * var data = Buffer.alloc(5.5 * 1024 * 1024); - * data.fill('0'); // fill with zeros - * var results = glacier.computeChecksums(data); - * // Result: { linearHash: '68aff0c5a9...', treeHash: '154e26c78f...' } - * @param data [Buffer, String] data to calculate the checksum for - * @return [map] a map containing - * the linearHash and treeHash properties representing hex based digests - * of the respective checksums. - * @see completeMultipartUpload - */ - computeChecksums: function computeChecksums(data) { - if (!AWS.util.Buffer.isBuffer(data)) - data = AWS.util.buffer.toBuffer(data); - - var mb = 1024 * 1024; - var hashes = []; - var hash = AWS.util.crypto.createHash("sha256"); - - // build leaf nodes in 1mb chunks - for (var i = 0; i < data.length; i += mb) { - var chunk = data.slice(i, Math.min(i + mb, data.length)); - hash.update(chunk); - hashes.push(AWS.util.crypto.sha256(chunk)); - } + for (const keyAndValue of response.headers) { + headers[keyAndValue[0]] = keyAndValue[1]; + } - return { - linearHash: hash.digest("hex"), - treeHash: this.buildHashTree(hashes), - }; - }, + if (status === 204 || status === 205) { + return; + } // GitHub API returns 200 for HEAD requests - /** - * @api private - */ - buildHashTree: function buildHashTree(hashes) { - // merge leaf nodes - while (hashes.length > 1) { - var tmpHashes = []; - for (var i = 0; i < hashes.length; i += 2) { - if (hashes[i + 1]) { - var tmpHash = AWS.util.buffer.alloc(64); - tmpHash.write(hashes[i], 0, 32, "binary"); - tmpHash.write(hashes[i + 1], 32, 32, "binary"); - tmpHashes.push(AWS.util.crypto.sha256(tmpHash)); - } else { - tmpHashes.push(hashes[i]); - } - } - hashes = tmpHashes; - } - return AWS.util.crypto.toHex(hashes[0]); - }, - }); + if (requestOptions.method === "HEAD") { + if (status < 400) { + return; + } - /***/ - }, + throw new requestError.RequestError(response.statusText, status, { + headers, + request: requestOptions + }); + } - /***/ 27062: /***/ ( - __unused_webpack_module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var AWS = __nccwpck_require__(28437); + if (status === 304) { + throw new requestError.RequestError("Not modified", status, { + headers, + request: requestOptions + }); + } - /** - * @api private - */ - var blobPayloadOutputOps = [ - "deleteThingShadow", - "getThingShadow", - "updateThingShadow", - ]; + if (status >= 400) { + return response.text().then(message => { + const error = new requestError.RequestError(message, status, { + headers, + request: requestOptions + }); - /** - * Constructs a service interface object. Each API operation is exposed as a - * function on service. - * - * ### Sending a Request Using IotData - * - * ```javascript - * var iotdata = new AWS.IotData({endpoint: 'my.host.tld'}); - * iotdata.getThingShadow(params, function (err, data) { - * if (err) console.log(err, err.stack); // an error occurred - * else console.log(data); // successful response - * }); - * ``` - * - * ### Locking the API Version - * - * In order to ensure that the IotData object uses this specific API, - * you can construct the object by passing the `apiVersion` option to the - * constructor: - * - * ```javascript - * var iotdata = new AWS.IotData({ - * endpoint: 'my.host.tld', - * apiVersion: '2015-05-28' - * }); - * ``` - * - * You can also set the API version globally in `AWS.config.apiVersions` using - * the **iotdata** service identifier: - * - * ```javascript - * AWS.config.apiVersions = { - * iotdata: '2015-05-28', - * // other service API versions - * }; - * - * var iotdata = new AWS.IotData({endpoint: 'my.host.tld'}); - * ``` - * - * @note You *must* provide an `endpoint` configuration parameter when - * constructing this service. See {constructor} for more information. - * - * @!method constructor(options = {}) - * Constructs a service object. This object has one method for each - * API operation. - * - * @example Constructing a IotData object - * var iotdata = new AWS.IotData({endpoint: 'my.host.tld'}); - * @note You *must* provide an `endpoint` when constructing this service. - * @option (see AWS.Config.constructor) - * - * @service iotdata - * @version 2015-05-28 - */ - AWS.util.update(AWS.IotData.prototype, { - /** - * @api private - */ - validateService: function validateService() { - if (!this.config.endpoint || this.config.endpoint.indexOf("{") >= 0) { - var msg = - "AWS.IotData requires an explicit " + - "`endpoint' configuration option."; - throw AWS.util.error(new Error(), { - name: "InvalidEndpoint", - message: msg, - }); - } - }, + try { + let responseBody = JSON.parse(error.message); + Object.assign(error, responseBody); + let errors = responseBody.errors; // Assumption `errors` would always be in Array format - /** - * @api private - */ - setupRequestListeners: function setupRequestListeners(request) { - request.addListener("validateResponse", this.validateResponseBody); - if (blobPayloadOutputOps.indexOf(request.operation) > -1) { - request.addListener("extractData", AWS.util.convertPayloadToString); - } - }, + error.message = error.message + ": " + errors.map(JSON.stringify).join(", "); + } catch (e) {// ignore, see octokit/rest.js#684 + } - /** - * @api private - */ - validateResponseBody: function validateResponseBody(resp) { - var body = resp.httpResponse.body.toString() || "{}"; - var bodyCheck = body.trim(); - if (!bodyCheck || bodyCheck.charAt(0) !== "{") { - resp.httpResponse.body = ""; - } - }, + throw error; }); + } - /***/ - }, + const contentType = response.headers.get("content-type"); - /***/ 8452: /***/ ( - __unused_webpack_module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var AWS = __nccwpck_require__(28437); + if (/application\/json/.test(contentType)) { + return response.json(); + } - AWS.util.update(AWS.Lambda.prototype, { - /** - * @api private - */ - setupRequestListeners: function setupRequestListeners(request) { - if (request.operation === "invoke") { - request.addListener("extractData", AWS.util.convertPayloadToString); - } - }, - }); + if (!contentType || /^text\/|charset=utf-8$/.test(contentType)) { + return response.text(); + } - /***/ - }, + return getBufferResponse(response); + }).then(data => { + return { + status, + url, + headers, + data + }; + }).catch(error => { + if (error instanceof requestError.RequestError) { + throw error; + } - /***/ 19174: /***/ ( - __unused_webpack_module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var AWS = __nccwpck_require__(28437); + throw new requestError.RequestError(error.message, 500, { + headers, + request: requestOptions + }); + }); +} - AWS.util.update(AWS.MachineLearning.prototype, { - /** - * @api private - */ - setupRequestListeners: function setupRequestListeners(request) { - if (request.operation === "predict") { - request.addListener("build", this.buildEndpoint); - } - }, +function withDefaults(oldEndpoint, newDefaults) { + const endpoint = oldEndpoint.defaults(newDefaults); - /** - * Updates request endpoint from PredictEndpoint - * @api private - */ - buildEndpoint: function buildEndpoint(request) { - var url = request.params.PredictEndpoint; - if (url) { - request.httpRequest.endpoint = new AWS.Endpoint(url); - } - }, - }); + const newApi = function (route, parameters) { + const endpointOptions = endpoint.merge(route, parameters); - /***/ - }, - - /***/ 53199: /***/ ( - __unused_webpack_module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - __nccwpck_require__(44086); - - /***/ - }, - - /***/ 71928: /***/ ( - __unused_webpack_module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var AWS = __nccwpck_require__(28437); - __nccwpck_require__(16612); - /** - * @api private - */ - var crossRegionOperations = [ - "copyDBSnapshot", - "createDBInstanceReadReplica", - "createDBCluster", - "copyDBClusterSnapshot", - "startDBInstanceAutomatedBackupsReplication", - ]; + if (!endpointOptions.request || !endpointOptions.request.hook) { + return fetchWrapper(endpoint.parse(endpointOptions)); + } - AWS.util.update(AWS.RDS.prototype, { - /** - * @api private - */ - setupRequestListeners: function setupRequestListeners(request) { - if ( - crossRegionOperations.indexOf(request.operation) !== -1 && - request.params.SourceRegion - ) { - request.params = AWS.util.copy(request.params); - if ( - request.params.PreSignedUrl || - request.params.SourceRegion === this.config.region - ) { - delete request.params.SourceRegion; - } else { - var doesParamValidation = !!this.config.paramValidation; - // remove the validate parameters listener so we can re-add it after we build the URL - if (doesParamValidation) { - request.removeListener( - "validate", - AWS.EventListeners.Core.VALIDATE_PARAMETERS - ); - } - request.onAsync("validate", this.buildCrossRegionPresignedUrl); - if (doesParamValidation) { - request.addListener( - "validate", - AWS.EventListeners.Core.VALIDATE_PARAMETERS - ); - } - } - } - }, + const request = (route, parameters) => { + return fetchWrapper(endpoint.parse(endpoint.merge(route, parameters))); + }; - /** - * @api private - */ - buildCrossRegionPresignedUrl: function buildCrossRegionPresignedUrl( - req, - done - ) { - var config = AWS.util.copy(req.service.config); - config.region = req.params.SourceRegion; - delete req.params.SourceRegion; - delete config.endpoint; - // relevant params for the operation will already be in req.params - delete config.params; - config.signatureVersion = "v4"; - var destinationRegion = req.service.config.region; - - var svc = new req.service.constructor(config); - var newReq = svc[req.operation](AWS.util.copy(req.params)); - newReq.on("build", function addDestinationRegionParam(request) { - var httpRequest = request.httpRequest; - httpRequest.params.DestinationRegion = destinationRegion; - httpRequest.body = AWS.util.queryParamsToString(httpRequest.params); - }); - newReq.presign(function (err, url) { - if (err) done(err); - else { - req.params.PreSignedUrl = url; - done(); - } - }); - }, - }); + Object.assign(request, { + endpoint, + defaults: withDefaults.bind(null, endpoint) + }); + return endpointOptions.request.hook(request, endpointOptions); + }; - /***/ - }, + return Object.assign(newApi, { + endpoint, + defaults: withDefaults.bind(null, endpoint) + }); +} - /***/ 64070: /***/ ( - __unused_webpack_module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var AWS = __nccwpck_require__(28437); +const request = withDefaults(endpoint.endpoint, { + headers: { + "user-agent": `octokit-request.js/${VERSION} ${universalUserAgent.getUserAgent()}` + } +}); - AWS.util.update(AWS.RDSDataService.prototype, { - /** - * @return [Boolean] whether the error can be retried - * @api private - */ - retryableError: function retryableError(error) { - if ( - error.code === "BadRequestException" && - error.message && - error.message.match(/^Communications link failure/) && - error.statusCode === 400 - ) { - return true; - } else { - var _super = AWS.Service.prototype.retryableError; - return _super.call(this, error); - } - }, - }); +exports.request = request; +//# sourceMappingURL=index.js.map - /***/ - }, - /***/ 69627: /***/ ( - __unused_webpack_module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var AWS = __nccwpck_require__(28437); +/***/ }), - AWS.util.update(AWS.Route53.prototype, { - /** - * @api private - */ - setupRequestListeners: function setupRequestListeners(request) { - request.on("build", this.sanitizeUrl); - }, +/***/ 41441: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - /** - * @api private - */ - sanitizeUrl: function sanitizeUrl(request) { - var path = request.httpRequest.path; - request.httpRequest.path = path.replace(/\/%2F\w+%2F/, "/"); - }, +"use strict"; - /** - * @return [Boolean] whether the error can be retried - * @api private - */ - retryableError: function retryableError(error) { - if ( - error.code === "PriorRequestNotComplete" && - error.statusCode === 400 - ) { - return true; - } else { - var _super = AWS.Service.prototype.retryableError; - return _super.call(this, error); - } - }, - }); - /***/ - }, - - /***/ 26543: /***/ ( - __unused_webpack_module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var AWS = __nccwpck_require__(28437); - var v4Credentials = __nccwpck_require__(62660); - var resolveRegionalEndpointsFlag = __nccwpck_require__(85566); - var s3util = __nccwpck_require__(35895); - var regionUtil = __nccwpck_require__(18262); - - // Pull in managed upload extension - __nccwpck_require__(81600); - - /** - * @api private - */ - var operationsWith200StatusCodeError = { - completeMultipartUpload: true, - copyObject: true, - uploadPartCopy: true, - }; +Object.defineProperty(exports, "__esModule", ({ value: true })); - /** - * @api private - */ - var regionRedirectErrorCodes = [ - "AuthorizationHeaderMalformed", // non-head operations on virtual-hosted global bucket endpoints - "BadRequest", // head operations on virtual-hosted global bucket endpoints - "PermanentRedirect", // non-head operations on path-style or regional endpoints - 301, // head operations on path-style or regional endpoints - ]; +function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } - AWS.util.update(AWS.S3.prototype, { - /** - * @api private - */ - getSignatureVersion: function getSignatureVersion(request) { - var defaultApiVersion = this.api.signatureVersion; - var userDefinedVersion = this._originalConfig - ? this._originalConfig.signatureVersion - : null; - var regionDefinedVersion = this.config.signatureVersion; - var isPresigned = request ? request.isPresigned() : false; - /* - 1) User defined version specified: - a) always return user defined version - 2) No user defined version specified: - a) If not using presigned urls, default to V4 - b) If using presigned urls, default to lowest version the region supports - */ - if (userDefinedVersion) { - userDefinedVersion = - userDefinedVersion === "v2" ? "s3" : userDefinedVersion; - return userDefinedVersion; - } - if (isPresigned !== true) { - defaultApiVersion = "v4"; - } else if (regionDefinedVersion) { - defaultApiVersion = regionDefinedVersion; - } - return defaultApiVersion; - }, +var osName = _interopDefault(__nccwpck_require__(54824)); + +function getUserAgent() { + try { + return `Node.js/${process.version.substr(1)} (${osName()}; ${process.arch})`; + } catch (error) { + if (/wmic os get Caption/.test(error.message)) { + return "Windows "; + } - /** - * @api private - */ - getSigningName: function getSigningName() { - var _super = AWS.Service.prototype.getSigningName; - return this._parsedArn && this._parsedArn.service - ? this._parsedArn.service - : _super.call(this); - }, + return ""; + } +} - /** - * @api private - */ - getSignerClass: function getSignerClass(request) { - var signatureVersion = this.getSignatureVersion(request); - return AWS.Signers.RequestSigner.getVersion(signatureVersion); - }, +exports.getUserAgent = getUserAgent; +//# sourceMappingURL=index.js.map - /** - * @api private - */ - validateService: function validateService() { - var msg; - var messages = []; - // default to us-east-1 when no region is provided - if (!this.config.region) this.config.region = "us-east-1"; +/***/ }), - if (!this.config.endpoint && this.config.s3BucketEndpoint) { - messages.push( - "An endpoint must be provided when configuring " + - "`s3BucketEndpoint` to true." - ); - } - if (messages.length === 1) { - msg = messages[0]; - } else if (messages.length > 1) { - msg = "Multiple configuration errors:\n" + messages.join("\n"); - } - if (msg) { - throw AWS.util.error(new Error(), { - name: "InvalidEndpoint", - message: msg, - }); - } - }, +/***/ 29351: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - /** - * @api private - */ - shouldDisableBodySigning: function shouldDisableBodySigning(request) { - var signerClass = this.getSignerClass(); - if ( - this.config.s3DisableBodySigning === true && - signerClass === AWS.Signers.V4 && - request.httpRequest.endpoint.protocol === "https:" - ) { - return true; - } - return false; - }, +const { requestLog } = __nccwpck_require__(68883); +const { + restEndpointMethods +} = __nccwpck_require__(83044); - /** - * @api private - */ - setupRequestListeners: function setupRequestListeners(request) { - var prependListener = true; - request.addListener("validate", this.validateScheme); - request.addListener( - "validate", - this.validateBucketName, - prependListener - ); - request.addListener( - "validate", - this.optInUsEast1RegionalEndpoint, - prependListener - ); +const Core = __nccwpck_require__(29833); - request.removeListener( - "validate", - AWS.EventListeners.Core.VALIDATE_REGION - ); - request.addListener("build", this.addContentType); - request.addListener("build", this.computeContentMd5); - request.addListener("build", this.computeSseCustomerKeyMd5); - request.addListener("build", this.populateURI); - request.addListener("afterBuild", this.addExpect100Continue); - request.addListener("extractError", this.extractError); - request.addListener("extractData", AWS.util.hoistPayloadMember); - request.addListener("extractData", this.extractData); - request.addListener("extractData", this.extractErrorFrom200Response); - request.addListener("beforePresign", this.prepareSignedUrl); - if (this.shouldDisableBodySigning(request)) { - request.removeListener( - "afterBuild", - AWS.EventListeners.Core.COMPUTE_SHA256 - ); - request.addListener("afterBuild", this.disableBodySigning); - } - //deal with ARNs supplied to Bucket - if ( - request.operation !== "createBucket" && - s3util.isArnInParam(request, "Bucket") - ) { - // avoid duplicate parsing in the future - request.service._parsedArn = AWS.util.ARN.parse( - request.params.Bucket - ); +const CORE_PLUGINS = [ + __nccwpck_require__(64555), + __nccwpck_require__(33691), // deprecated: remove in v17 + requestLog, + __nccwpck_require__(18579), + restEndpointMethods, + __nccwpck_require__(42657), - request.removeListener("validate", this.validateBucketName); - request.removeListener("build", this.populateURI); - if (request.service._parsedArn.service === "s3") { - request.addListener("validate", s3util.validateS3AccessPointArn); - request.addListener("validate", this.validateArnResourceType); - } else if (request.service._parsedArn.service === "s3-outposts") { - request.addListener( - "validate", - s3util.validateOutpostsAccessPointArn - ); - request.addListener("validate", s3util.validateOutpostsArn); - } - request.addListener("validate", s3util.validateArnRegion); - request.addListener("validate", s3util.validateArnAccount); - request.addListener("validate", s3util.validateArnService); - request.addListener("build", this.populateUriFromAccessPointArn); - request.addListener("build", s3util.validatePopulateUriFromArn); - return; - } - //listeners regarding region inference - request.addListener("validate", this.validateBucketEndpoint); - request.addListener("validate", this.correctBucketRegionFromCache); - request.onAsync("extractError", this.requestBucketRegion); - if (AWS.util.isBrowser()) { - request.onAsync("retry", this.reqRegionForNetworkingError); - } - }, + __nccwpck_require__(82072) // deprecated: remove in v17 +]; - /** - * @api private - */ - validateScheme: function (req) { - var params = req.params, - scheme = req.httpRequest.endpoint.protocol, - sensitive = - params.SSECustomerKey || params.CopySourceSSECustomerKey; - if (sensitive && scheme !== "https:") { - var msg = - "Cannot send SSE keys over HTTP. Set 'sslEnabled'" + - "to 'true' in your configuration"; - throw AWS.util.error(new Error(), { - code: "ConfigError", - message: msg, - }); - } - }, +const OctokitRest = Core.plugin(CORE_PLUGINS); - /** - * @api private - */ - validateBucketEndpoint: function (req) { - if (!req.params.Bucket && req.service.config.s3BucketEndpoint) { - var msg = - "Cannot send requests to root API with `s3BucketEndpoint` set."; - throw AWS.util.error(new Error(), { - code: "ConfigError", - message: msg, - }); - } - }, +function DeprecatedOctokit(options) { + const warn = + options && options.log && options.log.warn + ? options.log.warn + : console.warn; + warn( + '[@octokit/rest] `const Octokit = require("@octokit/rest")` is deprecated. Use `const { Octokit } = require("@octokit/rest")` instead' + ); + return new OctokitRest(options); +} - /** - * Validate resource-type supplied in S3 ARN - */ - validateArnResourceType: function validateArnResourceType(req) { - var resource = req.service._parsedArn.resource; +const Octokit = Object.assign(DeprecatedOctokit, { + Octokit: OctokitRest +}); - if ( - resource.indexOf("accesspoint:") !== 0 && - resource.indexOf("accesspoint/") !== 0 - ) { - throw AWS.util.error(new Error(), { - code: "InvalidARN", - message: "ARN resource should begin with 'accesspoint/'", - }); - } - }, +Object.keys(OctokitRest).forEach(key => { + /* istanbul ignore else */ + if (OctokitRest.hasOwnProperty(key)) { + Octokit[key] = OctokitRest[key]; + } +}); - /** - * @api private - */ - validateBucketName: function validateBucketName(req) { - var service = req.service; - var signatureVersion = service.getSignatureVersion(req); - var bucket = req.params && req.params.Bucket; - var key = req.params && req.params.Key; - var slashIndex = bucket && bucket.indexOf("/"); - if (bucket && slashIndex >= 0) { - if (typeof key === "string" && slashIndex > 0) { - req.params = AWS.util.copy(req.params); - // Need to include trailing slash to match sigv2 behavior - var prefix = bucket.substr(slashIndex + 1) || ""; - req.params.Key = prefix + "/" + key; - req.params.Bucket = bucket.substr(0, slashIndex); - } else if (signatureVersion === "v4") { - var msg = - "Bucket names cannot contain forward slashes. Bucket: " + - bucket; - throw AWS.util.error(new Error(), { - code: "InvalidBucket", - message: msg, - }); - } - } - }, +module.exports = Octokit; - /** - * @api private - */ - isValidAccelerateOperation: function isValidAccelerateOperation( - operation - ) { - var invalidOperations = [ - "createBucket", - "deleteBucket", - "listBuckets", - ]; - return invalidOperations.indexOf(operation) === -1; - }, - - /** - * When us-east-1 region endpoint configuration is set, in stead of sending request to - * global endpoint(e.g. 's3.amazonaws.com'), we will send request to - * 's3.us-east-1.amazonaws.com'. - * @api private - */ - optInUsEast1RegionalEndpoint: function optInUsEast1RegionalEndpoint( - req - ) { - var service = req.service; - var config = service.config; - config.s3UsEast1RegionalEndpoint = resolveRegionalEndpointsFlag( - service._originalConfig, - { - env: "AWS_S3_US_EAST_1_REGIONAL_ENDPOINT", - sharedConfig: "s3_us_east_1_regional_endpoint", - clientConfig: "s3UsEast1RegionalEndpoint", - } - ); - if ( - !(service._originalConfig || {}).endpoint && - req.httpRequest.region === "us-east-1" && - config.s3UsEast1RegionalEndpoint === "regional" && - req.httpRequest.endpoint.hostname.indexOf("s3.amazonaws.com") >= 0 - ) { - var insertPoint = config.endpoint.indexOf(".amazonaws.com"); - regionalEndpoint = - config.endpoint.substring(0, insertPoint) + - ".us-east-1" + - config.endpoint.substring(insertPoint); - req.httpRequest.updateEndpoint(regionalEndpoint); - } - }, - /** - * S3 prefers dns-compatible bucket names to be moved from the uri path - * to the hostname as a sub-domain. This is not possible, even for dns-compat - * buckets when using SSL and the bucket name contains a dot ('.'). The - * ssl wildcard certificate is only 1-level deep. - * - * @api private - */ - populateURI: function populateURI(req) { - var httpRequest = req.httpRequest; - var b = req.params.Bucket; - var service = req.service; - var endpoint = httpRequest.endpoint; - if (b) { - if (!service.pathStyleBucketName(b)) { - if ( - service.config.useAccelerateEndpoint && - service.isValidAccelerateOperation(req.operation) - ) { - if (service.config.useDualstack) { - endpoint.hostname = - b + ".s3-accelerate.dualstack.amazonaws.com"; - } else { - endpoint.hostname = b + ".s3-accelerate.amazonaws.com"; - } - } else if (!service.config.s3BucketEndpoint) { - endpoint.hostname = b + "." + endpoint.hostname; - } +/***/ }), - var port = endpoint.port; - if (port !== 80 && port !== 443) { - endpoint.host = endpoint.hostname + ":" + endpoint.port; - } else { - endpoint.host = endpoint.hostname; - } +/***/ 30823: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - httpRequest.virtualHostedBucket = b; // needed for signing the request - service.removeVirtualHostedBucketFromPath(req); - } - } - }, +module.exports = Octokit; - /** - * Takes the bucket name out of the path if bucket is virtual-hosted - * - * @api private - */ - removeVirtualHostedBucketFromPath: function removeVirtualHostedBucketFromPath( - req - ) { - var httpRequest = req.httpRequest; - var bucket = httpRequest.virtualHostedBucket; - if (bucket && httpRequest.path) { - if (req.params && req.params.Key) { - var encodedS3Key = "/" + AWS.util.uriEscapePath(req.params.Key); - if ( - httpRequest.path.indexOf(encodedS3Key) === 0 && - (httpRequest.path.length === encodedS3Key.length || - httpRequest.path[encodedS3Key.length] === "?") - ) { - //path only contains key or path contains only key and querystring - return; - } - } - httpRequest.path = httpRequest.path.replace( - new RegExp("/" + bucket), - "" - ); - if (httpRequest.path[0] !== "/") { - httpRequest.path = "/" + httpRequest.path; - } - } - }, +const { request } = __nccwpck_require__(36234); +const Hook = __nccwpck_require__(83682); - /** - * When user supply an access point ARN in the Bucket parameter, we need to - * populate the URI according to the ARN. - */ - populateUriFromAccessPointArn: function populateUriFromAccessPointArn( - req - ) { - var accessPointArn = req.service._parsedArn; - - var isOutpostArn = accessPointArn.service === "s3-outposts"; - - var outpostsSuffix = isOutpostArn - ? "." + accessPointArn.outpostId - : ""; - var serviceName = isOutpostArn ? "s3-outposts" : "s3-accesspoint"; - var dualStackSuffix = - !isOutpostArn && req.service.config.useDualstack - ? ".dualstack" - : ""; - - var endpoint = req.httpRequest.endpoint; - var dnsSuffix = regionUtil.getEndpointSuffix(accessPointArn.region); - var useArnRegion = req.service.config.s3UseArnRegion; - - endpoint.hostname = [ - accessPointArn.accessPoint + - "-" + - accessPointArn.accountId + - outpostsSuffix, - serviceName + dualStackSuffix, - useArnRegion ? accessPointArn.region : req.service.config.region, - dnsSuffix, - ].join("."); - endpoint.host = endpoint.hostname; +const parseClientOptions = __nccwpck_require__(64613); - var encodedArn = AWS.util.uriEscape(req.params.Bucket); - var path = req.httpRequest.path; - //remove the Bucket value from path - req.httpRequest.path = path.replace(new RegExp("/" + encodedArn), ""); - if (req.httpRequest.path[0] !== "/") { - req.httpRequest.path = "/" + req.httpRequest.path; - } - req.httpRequest.region = accessPointArn.region; //region used to sign - }, +function Octokit(plugins, options) { + options = options || {}; + const hook = new Hook.Collection(); + const log = Object.assign( + { + debug: () => {}, + info: () => {}, + warn: console.warn, + error: console.error + }, + options && options.log + ); + const api = { + hook, + log, + request: request.defaults(parseClientOptions(options, log, hook)) + }; - /** - * Adds Expect: 100-continue header if payload is greater-or-equal 1MB - * @api private - */ - addExpect100Continue: function addExpect100Continue(req) { - var len = req.httpRequest.headers["Content-Length"]; - if ( - AWS.util.isNode() && - (len >= 1024 * 1024 || - req.params.Body instanceof AWS.util.stream.Stream) - ) { - req.httpRequest.headers["Expect"] = "100-continue"; - } - }, + plugins.forEach(pluginFunction => pluginFunction(api, options)); - /** - * Adds a default content type if none is supplied. - * - * @api private - */ - addContentType: function addContentType(req) { - var httpRequest = req.httpRequest; - if (httpRequest.method === "GET" || httpRequest.method === "HEAD") { - // Content-Type is not set in GET/HEAD requests - delete httpRequest.headers["Content-Type"]; - return; - } + return api; +} - if (!httpRequest.headers["Content-Type"]) { - // always have a Content-Type - httpRequest.headers["Content-Type"] = "application/octet-stream"; - } - var contentType = httpRequest.headers["Content-Type"]; - if (AWS.util.isBrowser()) { - if ( - typeof httpRequest.body === "string" && - !contentType.match(/;\s*charset=/) - ) { - var charset = "; charset=UTF-8"; - httpRequest.headers["Content-Type"] += charset; - } else { - var replaceFn = function (_, prefix, charsetName) { - return prefix + charsetName.toUpperCase(); - }; +/***/ }), - httpRequest.headers["Content-Type"] = contentType.replace( - /(;\s*charset=)(.+)$/, - replaceFn - ); - } - } - }, +/***/ 29833: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - /** - * @api private - */ - computableChecksumOperations: { - putBucketCors: true, - putBucketLifecycle: true, - putBucketLifecycleConfiguration: true, - putBucketTagging: true, - deleteObjects: true, - putBucketReplication: true, - putObjectLegalHold: true, - putObjectRetention: true, - putObjectLockConfiguration: true, - }, - - /** - * Checks whether checksums should be computed for the request. - * If the request requires checksums to be computed, this will always - * return true, otherwise it depends on whether {AWS.Config.computeChecksums} - * is set. - * - * @param req [AWS.Request] the request to check against - * @return [Boolean] whether to compute checksums for a request. - * @api private - */ - willComputeChecksums: function willComputeChecksums(req) { - if (this.computableChecksumOperations[req.operation]) return true; - if (!this.config.computeChecksums) return false; - - // TODO: compute checksums for Stream objects - if ( - !AWS.util.Buffer.isBuffer(req.httpRequest.body) && - typeof req.httpRequest.body !== "string" - ) { - return false; - } +const factory = __nccwpck_require__(35320); + +module.exports = factory(); - var rules = req.service.api.operations[req.operation].input.members; - // Sha256 signing disabled, and not a presigned url - if ( - req.service.shouldDisableBodySigning(req) && - !Object.prototype.hasOwnProperty.call( - req.httpRequest.headers, - "presigned-expires" - ) - ) { - if (rules.ContentMD5 && !req.params.ContentMD5) { - return true; - } - } +/***/ }), + +/***/ 35320: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - // V4 signer uses SHA256 signatures so only compute MD5 if it is required - if (req.service.getSignerClass(req) === AWS.Signers.V4) { - if (rules.ContentMD5 && !rules.ContentMD5.required) return false; - } +module.exports = factory; - if (rules.ContentMD5 && !req.params.ContentMD5) return true; - }, +const Octokit = __nccwpck_require__(30823); +const registerPlugin = __nccwpck_require__(77826); - /** - * A listener that computes the Content-MD5 and sets it in the header. - * @see AWS.S3.willComputeChecksums - * @api private - */ - computeContentMd5: function computeContentMd5(req) { - if (req.service.willComputeChecksums(req)) { - var md5 = AWS.util.crypto.md5(req.httpRequest.body, "base64"); - req.httpRequest.headers["Content-MD5"] = md5; - } - }, +function factory(plugins) { + const Api = Octokit.bind(null, plugins || []); + Api.plugin = registerPlugin.bind(null, plugins || []); + return Api; +} - /** - * @api private - */ - computeSseCustomerKeyMd5: function computeSseCustomerKeyMd5(req) { - var keys = { - SSECustomerKey: "x-amz-server-side-encryption-customer-key-MD5", - CopySourceSSECustomerKey: - "x-amz-copy-source-server-side-encryption-customer-key-MD5", - }; - AWS.util.each(keys, function (key, header) { - if (req.params[key]) { - var value = AWS.util.crypto.md5(req.params[key], "base64"); - req.httpRequest.headers[header] = value; - } - }); - }, - /** - * Returns true if the bucket name should be left in the URI path for - * a request to S3. This function takes into account the current - * endpoint protocol (e.g. http or https). - * - * @api private - */ - pathStyleBucketName: function pathStyleBucketName(bucketName) { - // user can force path style requests via the configuration - if (this.config.s3ForcePathStyle) return true; - if (this.config.s3BucketEndpoint) return false; - - if (s3util.dnsCompatibleBucketName(bucketName)) { - return this.config.sslEnabled && bucketName.match(/\./) - ? true - : false; - } else { - return true; // not dns compatible names must always use path style - } - }, +/***/ }), - /** - * For COPY operations, some can be error even with status code 200. - * SDK treats the response as exception when response body indicates - * an exception or body is empty. - * - * @api private - */ - extractErrorFrom200Response: function extractErrorFrom200Response( - resp - ) { - if (!operationsWith200StatusCodeError[resp.request.operation]) return; - var httpResponse = resp.httpResponse; - if ( - httpResponse.body && - httpResponse.body.toString().match("") - ) { - // Response body with '...' indicates an exception. - // Get S3 client object. In ManagedUpload, this.service refers to - // S3 client object. - resp.data = null; - var service = this.service ? this.service : this; - service.extractError(resp); - throw resp.error; - } else if ( - !httpResponse.body || - !httpResponse.body.toString().match(/<[\w_]/) - ) { - // When body is empty or incomplete, S3 might stop the request on detecting client - // side aborting the request. - resp.data = null; - throw AWS.util.error(new Error(), { - code: "InternalError", - message: "S3 aborted request", - }); - } - }, +/***/ 64613: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - /** - * @return [Boolean] whether the error can be retried - * @api private - */ - retryableError: function retryableError(error, request) { - if ( - operationsWith200StatusCodeError[request.operation] && - error.statusCode === 200 - ) { - return true; - } else if ( - request._requestRegionForBucket && - request.service.bucketRegionCache[request._requestRegionForBucket] - ) { - return false; - } else if (error && error.code === "RequestTimeout") { - return true; - } else if ( - error && - regionRedirectErrorCodes.indexOf(error.code) != -1 && - error.region && - error.region != request.httpRequest.region - ) { - request.httpRequest.region = error.region; - if (error.statusCode === 301) { - request.service.updateReqBucketRegion(request); - } - return true; - } else { - var _super = AWS.Service.prototype.retryableError; - return _super.call(this, error, request); - } - }, +module.exports = parseOptions; - /** - * Updates httpRequest with region. If region is not provided, then - * the httpRequest will be updated based on httpRequest.region - * - * @api private - */ - updateReqBucketRegion: function updateReqBucketRegion(request, region) { - var httpRequest = request.httpRequest; - if (typeof region === "string" && region.length) { - httpRequest.region = region; - } - if ( - !httpRequest.endpoint.host.match( - /s3(?!-accelerate).*\.amazonaws\.com$/ - ) - ) { - return; - } - var service = request.service; - var s3Config = service.config; - var s3BucketEndpoint = s3Config.s3BucketEndpoint; - if (s3BucketEndpoint) { - delete s3Config.s3BucketEndpoint; - } - var newConfig = AWS.util.copy(s3Config); - delete newConfig.endpoint; - newConfig.region = httpRequest.region; - - httpRequest.endpoint = new AWS.S3(newConfig).endpoint; - service.populateURI(request); - s3Config.s3BucketEndpoint = s3BucketEndpoint; - httpRequest.headers.Host = httpRequest.endpoint.host; - - if (request._asm.currentState === "validate") { - request.removeListener("build", service.populateURI); - request.addListener( - "build", - service.removeVirtualHostedBucketFromPath - ); - } - }, +const { Deprecation } = __nccwpck_require__(58932); +const { getUserAgent } = __nccwpck_require__(45030); +const once = __nccwpck_require__(1223); - /** - * Provides a specialized parser for getBucketLocation -- all other - * operations are parsed by the super class. - * - * @api private - */ - extractData: function extractData(resp) { - var req = resp.request; - if (req.operation === "getBucketLocation") { - var match = resp.httpResponse.body - .toString() - .match(/>(.+)<\/Location/); - delete resp.data["_"]; - if (match) { - resp.data.LocationConstraint = match[1]; - } else { - resp.data.LocationConstraint = ""; - } - } - var bucket = req.params.Bucket || null; - if ( - req.operation === "deleteBucket" && - typeof bucket === "string" && - !resp.error - ) { - req.service.clearBucketRegionCache(bucket); - } else { - var headers = resp.httpResponse.headers || {}; - var region = headers["x-amz-bucket-region"] || null; - if (!region && req.operation === "createBucket" && !resp.error) { - var createBucketConfiguration = - req.params.CreateBucketConfiguration; - if (!createBucketConfiguration) { - region = "us-east-1"; - } else if ( - createBucketConfiguration.LocationConstraint === "EU" - ) { - region = "eu-west-1"; - } else { - region = createBucketConfiguration.LocationConstraint; - } - } - if (region) { - if (bucket && region !== req.service.bucketRegionCache[bucket]) { - req.service.bucketRegionCache[bucket] = region; - } - } - } - req.service.extractRequestIds(resp); - }, - - /** - * Extracts an error object from the http response. - * - * @api private - */ - extractError: function extractError(resp) { - var codes = { - 304: "NotModified", - 403: "Forbidden", - 400: "BadRequest", - 404: "NotFound", - }; +const pkg = __nccwpck_require__(51322); - var req = resp.request; - var code = resp.httpResponse.statusCode; - var body = resp.httpResponse.body || ""; +const deprecateOptionsTimeout = once((log, deprecation) => + log.warn(deprecation) +); +const deprecateOptionsAgent = once((log, deprecation) => log.warn(deprecation)); +const deprecateOptionsHeaders = once((log, deprecation) => + log.warn(deprecation) +); - var headers = resp.httpResponse.headers || {}; - var region = headers["x-amz-bucket-region"] || null; - var bucket = req.params.Bucket || null; - var bucketRegionCache = req.service.bucketRegionCache; - if (region && bucket && region !== bucketRegionCache[bucket]) { - bucketRegionCache[bucket] = region; - } +function parseOptions(options, log, hook) { + if (options.headers) { + options.headers = Object.keys(options.headers).reduce((newObj, key) => { + newObj[key.toLowerCase()] = options.headers[key]; + return newObj; + }, {}); + } - var cachedRegion; - if (codes[code] && body.length === 0) { - if (bucket && !region) { - cachedRegion = bucketRegionCache[bucket] || null; - if (cachedRegion !== req.httpRequest.region) { - region = cachedRegion; - } - } - resp.error = AWS.util.error(new Error(), { - code: codes[code], - message: null, - region: region, - }); - } else { - var data = new AWS.XML.Parser().parse(body.toString()); + const clientDefaults = { + headers: options.headers || {}, + request: options.request || {}, + mediaType: { + previews: [], + format: "" + } + }; - if (data.Region && !region) { - region = data.Region; - if (bucket && region !== bucketRegionCache[bucket]) { - bucketRegionCache[bucket] = region; - } - } else if (bucket && !region && !data.Region) { - cachedRegion = bucketRegionCache[bucket] || null; - if (cachedRegion !== req.httpRequest.region) { - region = cachedRegion; - } - } + if (options.baseUrl) { + clientDefaults.baseUrl = options.baseUrl; + } - resp.error = AWS.util.error(new Error(), { - code: data.Code || code, - message: data.Message || null, - region: region, - }); - } - req.service.extractRequestIds(resp); - }, + if (options.userAgent) { + clientDefaults.headers["user-agent"] = options.userAgent; + } - /** - * If region was not obtained synchronously, then send async request - * to get bucket region for errors resulting from wrong region. - * - * @api private - */ - requestBucketRegion: function requestBucketRegion(resp, done) { - var error = resp.error; - var req = resp.request; - var bucket = req.params.Bucket || null; + if (options.previews) { + clientDefaults.mediaType.previews = options.previews; + } - if ( - !error || - !bucket || - error.region || - req.operation === "listObjects" || - (AWS.util.isNode() && req.operation === "headBucket") || - (error.statusCode === 400 && req.operation !== "headObject") || - regionRedirectErrorCodes.indexOf(error.code) === -1 - ) { - return done(); - } - var reqOperation = AWS.util.isNode() ? "headBucket" : "listObjects"; - var reqParams = { Bucket: bucket }; - if (reqOperation === "listObjects") reqParams.MaxKeys = 0; - var regionReq = req.service[reqOperation](reqParams); - regionReq._requestRegionForBucket = bucket; - regionReq.send(function () { - var region = req.service.bucketRegionCache[bucket] || null; - error.region = region; - done(); - }); - }, + if (options.timeZone) { + clientDefaults.headers["time-zone"] = options.timeZone; + } - /** - * For browser only. If NetworkingError received, will attempt to obtain - * the bucket region. - * - * @api private - */ - reqRegionForNetworkingError: function reqRegionForNetworkingError( - resp, - done - ) { - if (!AWS.util.isBrowser()) { - return done(); - } - var error = resp.error; - var request = resp.request; - var bucket = request.params.Bucket; - if ( - !error || - error.code !== "NetworkingError" || - !bucket || - request.httpRequest.region === "us-east-1" - ) { - return done(); - } - var service = request.service; - var bucketRegionCache = service.bucketRegionCache; - var cachedRegion = bucketRegionCache[bucket] || null; + if (options.timeout) { + deprecateOptionsTimeout( + log, + new Deprecation( + "[@octokit/rest] new Octokit({timeout}) is deprecated. Use {request: {timeout}} instead. See https://github.com/octokit/request.js#request" + ) + ); + clientDefaults.request.timeout = options.timeout; + } - if (cachedRegion && cachedRegion !== request.httpRequest.region) { - service.updateReqBucketRegion(request, cachedRegion); - done(); - } else if (!s3util.dnsCompatibleBucketName(bucket)) { - service.updateReqBucketRegion(request, "us-east-1"); - if (bucketRegionCache[bucket] !== "us-east-1") { - bucketRegionCache[bucket] = "us-east-1"; - } - done(); - } else if (request.httpRequest.virtualHostedBucket) { - var getRegionReq = service.listObjects({ - Bucket: bucket, - MaxKeys: 0, - }); - service.updateReqBucketRegion(getRegionReq, "us-east-1"); - getRegionReq._requestRegionForBucket = bucket; + if (options.agent) { + deprecateOptionsAgent( + log, + new Deprecation( + "[@octokit/rest] new Octokit({agent}) is deprecated. Use {request: {agent}} instead. See https://github.com/octokit/request.js#request" + ) + ); + clientDefaults.request.agent = options.agent; + } - getRegionReq.send(function () { - var region = service.bucketRegionCache[bucket] || null; - if (region && region !== request.httpRequest.region) { - service.updateReqBucketRegion(request, region); - } - done(); - }); - } else { - // DNS-compatible path-style - // (s3ForcePathStyle or bucket name with dot over https) - // Cannot obtain region information for this case - done(); - } - }, + if (options.headers) { + deprecateOptionsHeaders( + log, + new Deprecation( + "[@octokit/rest] new Octokit({headers}) is deprecated. Use {userAgent, previews} instead. See https://github.com/octokit/request.js#request" + ) + ); + } - /** - * Cache for bucket region. - * - * @api private - */ - bucketRegionCache: {}, - - /** - * Clears bucket region cache. - * - * @api private - */ - clearBucketRegionCache: function (buckets) { - var bucketRegionCache = this.bucketRegionCache; - if (!buckets) { - buckets = Object.keys(bucketRegionCache); - } else if (typeof buckets === "string") { - buckets = [buckets]; - } - for (var i = 0; i < buckets.length; i++) { - delete bucketRegionCache[buckets[i]]; - } - return bucketRegionCache; - }, + const userAgentOption = clientDefaults.headers["user-agent"]; + const defaultUserAgent = `octokit.js/${pkg.version} ${getUserAgent()}`; + + clientDefaults.headers["user-agent"] = [userAgentOption, defaultUserAgent] + .filter(Boolean) + .join(" "); + + clientDefaults.request.hook = hook.bind(null, "request"); + + return clientDefaults; +} + + +/***/ }), + +/***/ 77826: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +module.exports = registerPlugin; + +const factory = __nccwpck_require__(35320); + +function registerPlugin(plugins, pluginFunction) { + return factory( + plugins.includes(pluginFunction) ? plugins : plugins.concat(pluginFunction) + ); +} - /** - * Corrects request region if bucket's cached region is different - * - * @api private - */ - correctBucketRegionFromCache: function correctBucketRegionFromCache( - req - ) { - var bucket = req.params.Bucket || null; - if (bucket) { - var service = req.service; - var requestRegion = req.httpRequest.region; - var cachedRegion = service.bucketRegionCache[bucket]; - if (cachedRegion && cachedRegion !== requestRegion) { - service.updateReqBucketRegion(req, cachedRegion); - } - } - }, - /** - * Extracts S3 specific request ids from the http response. - * - * @api private - */ - extractRequestIds: function extractRequestIds(resp) { - var extendedRequestId = resp.httpResponse.headers - ? resp.httpResponse.headers["x-amz-id-2"] - : null; - var cfId = resp.httpResponse.headers - ? resp.httpResponse.headers["x-amz-cf-id"] - : null; - resp.extendedRequestId = extendedRequestId; - resp.cfId = cfId; - - if (resp.error) { - resp.error.requestId = resp.requestId || null; - resp.error.extendedRequestId = extendedRequestId; - resp.error.cfId = cfId; - } - }, +/***/ }), - /** - * Get a pre-signed URL for a given operation name. - * - * @note You must ensure that you have static or previously resolved - * credentials if you call this method synchronously (with no callback), - * otherwise it may not properly sign the request. If you cannot guarantee - * this (you are using an asynchronous credential provider, i.e., EC2 - * IAM roles), you should always call this method with an asynchronous - * callback. - * @note Not all operation parameters are supported when using pre-signed - * URLs. Certain parameters, such as `SSECustomerKey`, `ACL`, `Expires`, - * `ContentLength`, or `Tagging` must be provided as headers when sending a - * request. If you are using pre-signed URLs to upload from a browser and - * need to use these fields, see {createPresignedPost}. - * @note The default signer allows altering the request by adding corresponding - * headers to set some parameters (e.g. Range) and these added parameters - * won't be signed. You must use signatureVersion v4 to to include these - * parameters in the signed portion of the URL and enforce exact matching - * between headers and signed params in the URL. - * @note This operation cannot be used with a promise. See note above regarding - * asynchronous credentials and use with a callback. - * @param operation [String] the name of the operation to call - * @param params [map] parameters to pass to the operation. See the given - * operation for the expected operation parameters. In addition, you can - * also pass the "Expires" parameter to inform S3 how long the URL should - * work for. - * @option params Expires [Integer] (900) the number of seconds to expire - * the pre-signed URL operation in. Defaults to 15 minutes. - * @param callback [Function] if a callback is provided, this function will - * pass the URL as the second parameter (after the error parameter) to - * the callback function. - * @return [String] if called synchronously (with no callback), returns the - * signed URL. - * @return [null] nothing is returned if a callback is provided. - * @example Pre-signing a getObject operation (synchronously) - * var params = {Bucket: 'bucket', Key: 'key'}; - * var url = s3.getSignedUrl('getObject', params); - * console.log('The URL is', url); - * @example Pre-signing a putObject (asynchronously) - * var params = {Bucket: 'bucket', Key: 'key'}; - * s3.getSignedUrl('putObject', params, function (err, url) { - * console.log('The URL is', url); - * }); - * @example Pre-signing a putObject operation with a specific payload - * var params = {Bucket: 'bucket', Key: 'key', Body: 'body'}; - * var url = s3.getSignedUrl('putObject', params); - * console.log('The URL is', url); - * @example Passing in a 1-minute expiry time for a pre-signed URL - * var params = {Bucket: 'bucket', Key: 'key', Expires: 60}; - * var url = s3.getSignedUrl('getObject', params); - * console.log('The URL is', url); // expires in 60 seconds - */ - getSignedUrl: function getSignedUrl(operation, params, callback) { - params = AWS.util.copy(params || {}); - var expires = params.Expires || 900; - - if (typeof expires !== "number") { - throw AWS.util.error(new Error(), { - code: "InvalidParameterException", - message: - "The expiration must be a number, received " + typeof expires, - }); - } +/***/ 96239: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - delete params.Expires; // we can't validate this - var request = this.makeRequest(operation, params); +"use strict"; - if (callback) { - AWS.util.defer(function () { - request.presign(expires, callback); - }); - } else { - return request.presign(expires, callback); - } - }, - /** - * @!method getSignedUrlPromise() - * Returns a 'thenable' promise that will be resolved with a pre-signed URL - * for a given operation name. - * - * Two callbacks can be provided to the `then` method on the returned promise. - * The first callback will be called if the promise is fulfilled, and the second - * callback will be called if the promise is rejected. - * @note Not all operation parameters are supported when using pre-signed - * URLs. Certain parameters, such as `SSECustomerKey`, `ACL`, `Expires`, - * `ContentLength`, or `Tagging` must be provided as headers when sending a - * request. If you are using pre-signed URLs to upload from a browser and - * need to use these fields, see {createPresignedPost}. - * @param operation [String] the name of the operation to call - * @param params [map] parameters to pass to the operation. See the given - * operation for the expected operation parameters. In addition, you can - * also pass the "Expires" parameter to inform S3 how long the URL should - * work for. - * @option params Expires [Integer] (900) the number of seconds to expire - * the pre-signed URL operation in. Defaults to 15 minutes. - * @callback fulfilledCallback function(url) - * Called if the promise is fulfilled. - * @param url [String] the signed url - * @callback rejectedCallback function(err) - * Called if the promise is rejected. - * @param err [Error] if an error occurred, this value will be filled - * @return [Promise] A promise that represents the state of the `refresh` call. - * @example Pre-signing a getObject operation - * var params = {Bucket: 'bucket', Key: 'key'}; - * var promise = s3.getSignedUrlPromise('getObject', params); - * promise.then(function(url) { - * console.log('The URL is', url); - * }, function(err) { ... }); - * @example Pre-signing a putObject operation with a specific payload - * var params = {Bucket: 'bucket', Key: 'key', Body: 'body'}; - * var promise = s3.getSignedUrlPromise('putObject', params); - * promise.then(function(url) { - * console.log('The URL is', url); - * }, function(err) { ... }); - * @example Passing in a 1-minute expiry time for a pre-signed URL - * var params = {Bucket: 'bucket', Key: 'key', Expires: 60}; - * var promise = s3.getSignedUrlPromise('getObject', params); - * promise.then(function(url) { - * console.log('The URL is', url); - * }, function(err) { ... }); - */ - - /** - * Get a pre-signed POST policy to support uploading to S3 directly from an - * HTML form. - * - * @param params [map] - * @option params Bucket [String] The bucket to which the post should be - * uploaded - * @option params Expires [Integer] (3600) The number of seconds for which - * the presigned policy should be valid. - * @option params Conditions [Array] An array of conditions that must be met - * for the presigned policy to allow the - * upload. This can include required tags, - * the accepted range for content lengths, - * etc. - * @see http://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-HTTPPOSTConstructPolicy.html - * @option params Fields [map] Fields to include in the form. All - * values passed in as fields will be - * signed as exact match conditions. - * @param callback [Function] - * - * @note All fields passed in when creating presigned post data will be signed - * as exact match conditions. Any fields that will be interpolated by S3 - * must be added to the fields hash after signing, and an appropriate - * condition for such fields must be explicitly added to the Conditions - * array passed to this function before signing. - * - * @example Presiging post data with a known key - * var params = { - * Bucket: 'bucket', - * Fields: { - * key: 'key' - * } - * }; - * s3.createPresignedPost(params, function(err, data) { - * if (err) { - * console.error('Presigning post data encountered an error', err); - * } else { - * console.log('The post data is', data); - * } - * }); - * - * @example Presigning post data with an interpolated key - * var params = { - * Bucket: 'bucket', - * Conditions: [ - * ['starts-with', '$key', 'path/to/uploads/'] - * ] - * }; - * s3.createPresignedPost(params, function(err, data) { - * if (err) { - * console.error('Presigning post data encountered an error', err); - * } else { - * data.Fields.key = 'path/to/uploads/${filename}'; - * console.log('The post data is', data); - * } - * }); - * - * @note You must ensure that you have static or previously resolved - * credentials if you call this method synchronously (with no callback), - * otherwise it may not properly sign the request. If you cannot guarantee - * this (you are using an asynchronous credential provider, i.e., EC2 - * IAM roles), you should always call this method with an asynchronous - * callback. - * - * @return [map] If called synchronously (with no callback), returns a hash - * with the url to set as the form action and a hash of fields - * to include in the form. - * @return [null] Nothing is returned if a callback is provided. - * - * @callback callback function (err, data) - * @param err [Error] the error object returned from the policy signer - * @param data [map] The data necessary to construct an HTML form - * @param data.url [String] The URL to use as the action of the form - * @param data.fields [map] A hash of fields that must be included in the - * form for the upload to succeed. This hash will - * include the signed POST policy, your access key - * ID and security token (if present), etc. These - * may be safely included as input elements of type - * 'hidden.' - */ - createPresignedPost: function createPresignedPost(params, callback) { - if (typeof params === "function" && callback === undefined) { - callback = params; - params = null; - } +Object.defineProperty(exports, "__esModule", ({ value: true })); - params = AWS.util.copy(params || {}); - var boundParams = this.config.params || {}; - var bucket = params.Bucket || boundParams.Bucket, - self = this, - config = this.config, - endpoint = AWS.util.copy(this.endpoint); - if (!config.s3BucketEndpoint) { - endpoint.pathname = "/" + bucket; - } +function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } - function finalizePost() { - return { - url: AWS.util.urlFormat(endpoint), - fields: self.preparePostFields( - config.credentials, - config.region, - bucket, - params.Fields, - params.Conditions, - params.Expires - ), - }; - } +var deprecation = __nccwpck_require__(58932); +var once = _interopDefault(__nccwpck_require__(1223)); - if (callback) { - config.getCredentials(function (err) { - if (err) { - callback(err); - } else { - try { - callback(null, finalizePost()); - } catch (err) { - callback(err); - } - } - }); - } else { - return finalizePost(); - } - }, +const logOnce = once(deprecation => console.warn(deprecation)); +/** + * Error with extra properties to help with debugging + */ - /** - * @api private - */ - preparePostFields: function preparePostFields( - credentials, - region, - bucket, - fields, - conditions, - expiresInSeconds - ) { - var now = this.getSkewCorrectedDate(); - if (!credentials || !region || !bucket) { - throw new Error( - "Unable to create a POST object policy without a bucket," + - " region, and credentials" - ); - } - fields = AWS.util.copy(fields || {}); - conditions = (conditions || []).slice(0); - expiresInSeconds = expiresInSeconds || 3600; - - var signingDate = AWS.util.date - .iso8601(now) - .replace(/[:\-]|\.\d{3}/g, ""); - var shortDate = signingDate.substr(0, 8); - var scope = v4Credentials.createScope(shortDate, region, "s3"); - var credential = credentials.accessKeyId + "/" + scope; - - fields["bucket"] = bucket; - fields["X-Amz-Algorithm"] = "AWS4-HMAC-SHA256"; - fields["X-Amz-Credential"] = credential; - fields["X-Amz-Date"] = signingDate; - if (credentials.sessionToken) { - fields["X-Amz-Security-Token"] = credentials.sessionToken; - } - for (var field in fields) { - if (fields.hasOwnProperty(field)) { - var condition = {}; - condition[field] = fields[field]; - conditions.push(condition); - } - } +class RequestError extends Error { + constructor(message, statusCode, options) { + super(message); // Maintains proper stack trace (only available on V8) - fields.Policy = this.preparePostPolicy( - new Date(now.valueOf() + expiresInSeconds * 1000), - conditions - ); - fields["X-Amz-Signature"] = AWS.util.crypto.hmac( - v4Credentials.getSigningKey( - credentials, - shortDate, - region, - "s3", - true - ), - fields.Policy, - "hex" - ); + /* istanbul ignore next */ - return fields; - }, + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } - /** - * @api private - */ - preparePostPolicy: function preparePostPolicy(expiration, conditions) { - return AWS.util.base64.encode( - JSON.stringify({ - expiration: AWS.util.date.iso8601(expiration), - conditions: conditions, - }) - ); - }, + this.name = "HttpError"; + this.status = statusCode; + Object.defineProperty(this, "code", { + get() { + logOnce(new deprecation.Deprecation("[@octokit/request-error] `error.code` is deprecated, use `error.status`.")); + return statusCode; + } - /** - * @api private - */ - prepareSignedUrl: function prepareSignedUrl(request) { - request.addListener( - "validate", - request.service.noPresignedContentLength - ); - request.removeListener("build", request.service.addContentType); - if (!request.params.Body) { - // no Content-MD5/SHA-256 if body is not provided - request.removeListener("build", request.service.computeContentMd5); - } else { - request.addListener( - "afterBuild", - AWS.EventListeners.Core.COMPUTE_SHA256 - ); - } - }, + }); + this.headers = options.headers || {}; // redact request credentials without mutating original request options - /** - * @api private - * @param request - */ - disableBodySigning: function disableBodySigning(request) { - var headers = request.httpRequest.headers; - // Add the header to anything that isn't a presigned url, unless that presigned url had a body defined - if ( - !Object.prototype.hasOwnProperty.call(headers, "presigned-expires") - ) { - headers["X-Amz-Content-Sha256"] = "UNSIGNED-PAYLOAD"; - } - }, + const requestCopy = Object.assign({}, options.request); - /** - * @api private - */ - noPresignedContentLength: function noPresignedContentLength(request) { - if (request.params.ContentLength !== undefined) { - throw AWS.util.error(new Error(), { - code: "UnexpectedParameter", - message: "ContentLength is not supported in pre-signed URLs.", - }); - } - }, + if (options.request.headers.authorization) { + requestCopy.headers = Object.assign({}, options.request.headers, { + authorization: options.request.headers.authorization.replace(/ .*$/, " [REDACTED]") + }); + } - createBucket: function createBucket(params, callback) { - // When creating a bucket *outside* the classic region, the location - // constraint must be set for the bucket and it must match the endpoint. - // This chunk of code will set the location constraint param based - // on the region (when possible), but it will not override a passed-in - // location constraint. - if (typeof params === "function" || !params) { - callback = callback || params; - params = {}; - } - var hostname = this.endpoint.hostname; - // copy params so that appending keys does not unintentioinallly - // mutate params object argument passed in by user - var copiedParams = AWS.util.copy(params); + requestCopy.url = requestCopy.url // client_id & client_secret can be passed as URL query parameters to increase rate limit + // see https://developer.github.com/v3/#increasing-the-unauthenticated-rate-limit-for-oauth-applications + .replace(/\bclient_secret=\w+/g, "client_secret=[REDACTED]") // OAuth tokens can be passed as URL query parameters, although it is not recommended + // see https://developer.github.com/v3/#oauth2-token-sent-in-a-header + .replace(/\baccess_token=\w+/g, "access_token=[REDACTED]"); + this.request = requestCopy; + } - if ( - hostname !== this.api.globalEndpoint && - !params.CreateBucketConfiguration - ) { - copiedParams.CreateBucketConfiguration = { - LocationConstraint: this.config.region, - }; - } - return this.makeRequest("createBucket", copiedParams, callback); - }, - - /** - * @see AWS.S3.ManagedUpload - * @overload upload(params = {}, [options], [callback]) - * Uploads an arbitrarily sized buffer, blob, or stream, using intelligent - * concurrent handling of parts if the payload is large enough. You can - * configure the concurrent queue size by setting `options`. Note that this - * is the only operation for which the SDK can retry requests with stream - * bodies. - * - * @param (see AWS.S3.putObject) - * @option (see AWS.S3.ManagedUpload.constructor) - * @return [AWS.S3.ManagedUpload] the managed upload object that can call - * `send()` or track progress. - * @example Uploading a stream object - * var params = {Bucket: 'bucket', Key: 'key', Body: stream}; - * s3.upload(params, function(err, data) { - * console.log(err, data); - * }); - * @example Uploading a stream with concurrency of 1 and partSize of 10mb - * var params = {Bucket: 'bucket', Key: 'key', Body: stream}; - * var options = {partSize: 10 * 1024 * 1024, queueSize: 1}; - * s3.upload(params, options, function(err, data) { - * console.log(err, data); - * }); - * @callback callback function(err, data) - * @param err [Error] an error or null if no error occurred. - * @param data [map] The response data from the successful upload: - * @param data.Location [String] the URL of the uploaded object - * @param data.ETag [String] the ETag of the uploaded object - * @param data.Bucket [String] the bucket to which the object was uploaded - * @param data.Key [String] the key to which the object was uploaded - */ - upload: function upload(params, options, callback) { - if (typeof options === "function" && callback === undefined) { - callback = options; - options = null; - } +} + +exports.RequestError = RequestError; +//# sourceMappingURL=index.js.map + + +/***/ }), - options = options || {}; - options = AWS.util.merge(options || {}, { - service: this, - params: params, - }); +/***/ 795: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - var uploader = new AWS.S3.ManagedUpload(options); - if (typeof callback === "function") uploader.send(callback); - return uploader; - }, - }); +module.exports = authenticate; - /** - * @api private - */ - AWS.S3.addPromisesToClass = function addPromisesToClass( - PromiseDependency - ) { - this.prototype.getSignedUrlPromise = AWS.util.promisifyMethod( - "getSignedUrl", - PromiseDependency +const { Deprecation } = __nccwpck_require__(58932); +const once = __nccwpck_require__(1223); + +const deprecateAuthenticate = once((log, deprecation) => log.warn(deprecation)); + +function authenticate(state, options) { + deprecateAuthenticate( + state.octokit.log, + new Deprecation( + '[@octokit/rest] octokit.authenticate() is deprecated. Use "auth" constructor option instead.' + ) + ); + + if (!options) { + state.auth = false; + return; + } + + switch (options.type) { + case "basic": + if (!options.username || !options.password) { + throw new Error( + "Basic authentication requires both a username and password to be set" ); - }; + } + break; - /** - * @api private - */ - AWS.S3.deletePromisesFromClass = function deletePromisesFromClass() { - delete this.prototype.getSignedUrlPromise; - }; + case "oauth": + if (!options.token && !(options.key && options.secret)) { + throw new Error( + "OAuth2 authentication requires a token or key & secret to be set" + ); + } + break; - AWS.util.addPromises(AWS.S3); + case "token": + case "app": + if (!options.token) { + throw new Error("Token authentication requires a token to be set"); + } + break; - /***/ - }, + default: + throw new Error( + "Invalid authentication type, must be 'basic', 'oauth', 'token' or 'app'" + ); + } - /***/ 71207: /***/ ( - __unused_webpack_module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var AWS = __nccwpck_require__(28437); - var s3util = __nccwpck_require__(35895); - var regionUtil = __nccwpck_require__(18262); + state.auth = options; +} - AWS.util.update(AWS.S3Control.prototype, { - /** - * @api private - */ - setupRequestListeners: function setupRequestListeners(request) { - request.addListener("extractError", this.extractHostId); - request.addListener("extractData", this.extractHostId); - request.addListener("validate", this.validateAccountId); - var isArnInBucket = s3util.isArnInParam(request, "Bucket"); - var isArnInName = s3util.isArnInParam(request, "Name"); +/***/ }), - if (isArnInBucket) { - request.service._parsedArn = AWS.util.ARN.parse( - request.params["Bucket"] - ); - request.service.signingName = request.service._parsedArn.service; - request.addListener("validate", this.validateOutpostsBucketArn); - request.addListener("validate", s3util.validateOutpostsArn); - request.addListener("afterBuild", this.addOutpostIdHeader); - } else if (isArnInName) { - request.service._parsedArn = AWS.util.ARN.parse( - request.params["Name"] - ); - request.service.signingName = request.service._parsedArn.service; - request.addListener( - "validate", - s3util.validateOutpostsAccessPointArn - ); - request.addListener("validate", s3util.validateOutpostsArn); - request.addListener("afterBuild", this.addOutpostIdHeader); - } +/***/ 47578: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - if (isArnInBucket || isArnInName) { - request.addListener("validate", s3util.validateArnRegion); - request.addListener( - "validate", - this.validateArnAccountWithParams, - true - ); - request.addListener("validate", s3util.validateArnAccount); - request.addListener("validate", s3util.validateArnService); - request.addListener("build", this.populateParamFromArn, true); - request.addListener("build", this.populateUriFromArn); - request.addListener("build", s3util.validatePopulateUriFromArn); - } +module.exports = authenticationBeforeRequest; - if ( - request.params.OutpostId && - (request.operation === "createBucket" || - request.operation === "listRegionalBuckets") - ) { - request.service.signingName = "s3-outposts"; - request.addListener("build", this.populateEndpointForOutpostId); - } - }, +const btoa = __nccwpck_require__(72358); +const uniq = __nccwpck_require__(78216); - /** - * Adds outpostId header - */ - addOutpostIdHeader: function addOutpostIdHeader(req) { - req.httpRequest.headers["x-amz-outpost-id"] = - req.service._parsedArn.outpostId; - }, +function authenticationBeforeRequest(state, options) { + if (!state.auth.type) { + return; + } - /** - * Validate Outposts ARN supplied in Bucket parameter is a valid bucket name - */ - validateOutpostsBucketArn: function validateOutpostsBucketArn(req) { - var parsedArn = req.service._parsedArn; + if (state.auth.type === "basic") { + const hash = btoa(`${state.auth.username}:${state.auth.password}`); + options.headers.authorization = `Basic ${hash}`; + return; + } - //can be ':' or '/' - var delimiter = parsedArn.resource["outpost".length]; + if (state.auth.type === "token") { + options.headers.authorization = `token ${state.auth.token}`; + return; + } - if (parsedArn.resource.split(delimiter).length !== 4) { - throw AWS.util.error(new Error(), { - code: "InvalidARN", - message: - "Bucket ARN should have two resources outpost/{outpostId}/bucket/{accesspointName}", - }); - } + if (state.auth.type === "app") { + options.headers.authorization = `Bearer ${state.auth.token}`; + const acceptHeaders = options.headers.accept + .split(",") + .concat("application/vnd.github.machine-man-preview+json"); + options.headers.accept = uniq(acceptHeaders) + .filter(Boolean) + .join(","); + return; + } - var bucket = parsedArn.resource.split(delimiter)[3]; - if (!s3util.dnsCompatibleBucketName(bucket) || bucket.match(/\./)) { - throw AWS.util.error(new Error(), { - code: "InvalidARN", - message: "Bucket ARN is not DNS compatible. Got " + bucket, - }); - } + options.url += options.url.indexOf("?") === -1 ? "?" : "&"; - //set parsed valid bucket - req.service._parsedArn.bucket = bucket; - }, + if (state.auth.token) { + options.url += `access_token=${encodeURIComponent(state.auth.token)}`; + return; + } - /** - * @api private - */ - populateParamFromArn: function populateParamFromArn(req) { - var parsedArn = req.service._parsedArn; - if (s3util.isArnInParam(req, "Bucket")) { - req.params.Bucket = parsedArn.bucket; - } else if (s3util.isArnInParam(req, "Name")) { - req.params.Name = parsedArn.accessPoint; - } - }, + const key = encodeURIComponent(state.auth.key); + const secret = encodeURIComponent(state.auth.secret); + options.url += `client_id=${key}&client_secret=${secret}`; +} - /** - * Populate URI according to the ARN - */ - populateUriFromArn: function populateUriFromArn(req) { - var parsedArn = req.service._parsedArn; - var endpoint = req.httpRequest.endpoint; - var useArnRegion = req.service.config.s3UseArnRegion; +/***/ }), - endpoint.hostname = [ - "s3-outposts", - useArnRegion ? parsedArn.region : req.service.config.region, - "amazonaws.com", - ].join("."); - endpoint.host = endpoint.hostname; - }, +/***/ 33691: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - /** - * @api private - */ - populateEndpointForOutpostId: function populateEndpointForOutpostId( - req - ) { - var endpoint = req.httpRequest.endpoint; - endpoint.hostname = [ - "s3-outposts", - req.service.config.region, - "amazonaws.com", - ].join("."); - endpoint.host = endpoint.hostname; - }, +module.exports = authenticationPlugin; - /** - * @api private - */ - extractHostId: function (response) { - var hostId = response.httpResponse.headers - ? response.httpResponse.headers["x-amz-id-2"] - : null; - response.extendedRequestId = hostId; - if (response.error) { - response.error.extendedRequestId = hostId; - } - }, +const { Deprecation } = __nccwpck_require__(58932); +const once = __nccwpck_require__(1223); - /** - * @api private - */ - validateArnAccountWithParams: function validateArnAccountWithParams( - req - ) { - var params = req.params; - var inputModel = req.service.api.operations[req.operation].input; - if (inputModel.members.AccountId) { - var parsedArn = req.service._parsedArn; - if (parsedArn.accountId) { - if (params.AccountId) { - if (params.AccountId !== parsedArn.accountId) { - throw AWS.util.error(new Error(), { - code: "ValidationError", - message: - "AccountId in ARN and request params should be same.", - }); - } - } else { - // Store accountId from ARN in params - params.AccountId = parsedArn.accountId; - } - } - } - }, +const deprecateAuthenticate = once((log, deprecation) => log.warn(deprecation)); - /** - * @api private - */ - validateAccountId: function (request) { - var params = request.params; - if (!Object.prototype.hasOwnProperty.call(params, "AccountId")) - return; - var accountId = params.AccountId; - //validate type - if (typeof accountId !== "string") { - throw AWS.util.error(new Error(), { - code: "ValidationError", - message: "AccountId must be a string.", - }); - } - //validate length - if (accountId.length < 1 || accountId.length > 63) { - throw AWS.util.error(new Error(), { - code: "ValidationError", - message: - "AccountId length should be between 1 to 63 characters, inclusive.", - }); - } - //validate pattern - var hostPattern = /^[a-zA-Z0-9]{1}$|^[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9]$/; - if (!hostPattern.test(accountId)) { - throw AWS.util.error(new Error(), { - code: "ValidationError", - message: - "AccountId should be hostname compatible. AccountId: " + - accountId, - }); - } - }, +const authenticate = __nccwpck_require__(795); +const beforeRequest = __nccwpck_require__(47578); +const requestError = __nccwpck_require__(54275); - /** - * @api private - */ - getSigningName: function getSigningName() { - var _super = AWS.Service.prototype.getSigningName; - return this.signingName ? this.signingName : _super.call(this); - }, +function authenticationPlugin(octokit, options) { + if (options.auth) { + octokit.authenticate = () => { + deprecateAuthenticate( + octokit.log, + new Deprecation( + '[@octokit/rest] octokit.authenticate() is deprecated and has no effect when "auth" option is set on Octokit constructor' + ) + ); + }; + return; + } + const state = { + octokit, + auth: false + }; + octokit.authenticate = authenticate.bind(null, state); + octokit.hook.before("request", beforeRequest.bind(null, state)); + octokit.hook.error("request", requestError.bind(null, state)); +} + + +/***/ }), + +/***/ 54275: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +module.exports = authenticationRequestError; + +const { RequestError } = __nccwpck_require__(96239); + +function authenticationRequestError(state, error, options) { + /* istanbul ignore next */ + if (!error.headers) throw error; + + const otpRequired = /required/.test(error.headers["x-github-otp"] || ""); + // handle "2FA required" error only + if (error.status !== 401 || !otpRequired) { + throw error; + } + + if ( + error.status === 401 && + otpRequired && + error.request && + error.request.headers["x-github-otp"] + ) { + throw new RequestError( + "Invalid one-time password for two-factor authentication", + 401, + { + headers: error.headers, + request: options + } + ); + } + + if (typeof state.auth.on2fa !== "function") { + throw new RequestError( + "2FA required, but options.on2fa is not a function. See https://github.com/octokit/rest.js#authentication", + 401, + { + headers: error.headers, + request: options + } + ); + } + + return Promise.resolve() + .then(() => { + return state.auth.on2fa(); + }) + .then(oneTimePassword => { + const newOptions = Object.assign(options, { + headers: Object.assign( + { "x-github-otp": oneTimePassword }, + options.headers + ) }); + return state.octokit.request(newOptions); + }); +} + + +/***/ }), + +/***/ 99733: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +module.exports = authenticationBeforeRequest; + +const btoa = __nccwpck_require__(72358); + +const withAuthorizationPrefix = __nccwpck_require__(19603); + +function authenticationBeforeRequest(state, options) { + if (typeof state.auth === "string") { + options.headers.authorization = withAuthorizationPrefix(state.auth); + return; + } + + if (state.auth.username) { + const hash = btoa(`${state.auth.username}:${state.auth.password}`); + options.headers.authorization = `Basic ${hash}`; + if (state.otp) { + options.headers["x-github-otp"] = state.otp; + } + return; + } + + if (state.auth.clientId) { + // There is a special case for OAuth applications, when `clientId` and `clientSecret` is passed as + // Basic Authorization instead of query parameters. The only routes where that applies share the same + // URL though: `/applications/:client_id/tokens/:access_token`. + // + // 1. [Check an authorization](https://developer.github.com/v3/oauth_authorizations/#check-an-authorization) + // 2. [Reset an authorization](https://developer.github.com/v3/oauth_authorizations/#reset-an-authorization) + // 3. [Revoke an authorization for an application](https://developer.github.com/v3/oauth_authorizations/#revoke-an-authorization-for-an-application) + // + // We identify by checking the URL. It must merge both "/applications/:client_id/tokens/:access_token" + // as well as "/applications/123/tokens/token456" + if (/\/applications\/:?[\w_]+\/tokens\/:?[\w_]+($|\?)/.test(options.url)) { + const hash = btoa(`${state.auth.clientId}:${state.auth.clientSecret}`); + options.headers.authorization = `Basic ${hash}`; + return; + } + + options.url += options.url.indexOf("?") === -1 ? "?" : "&"; + options.url += `client_id=${state.auth.clientId}&client_secret=${state.auth.clientSecret}`; + return; + } + + return Promise.resolve() + + .then(() => { + return state.auth(); + }) + + .then(authorization => { + options.headers.authorization = withAuthorizationPrefix(authorization); + }); +} + + +/***/ }), + +/***/ 64555: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +module.exports = authenticationPlugin; + +const { createTokenAuth } = __nccwpck_require__(40334); +const { Deprecation } = __nccwpck_require__(58932); +const once = __nccwpck_require__(1223); + +const beforeRequest = __nccwpck_require__(99733); +const requestError = __nccwpck_require__(3217); +const validate = __nccwpck_require__(18997); +const withAuthorizationPrefix = __nccwpck_require__(19603); + +const deprecateAuthBasic = once((log, deprecation) => log.warn(deprecation)); +const deprecateAuthObject = once((log, deprecation) => log.warn(deprecation)); + +function authenticationPlugin(octokit, options) { + // If `options.authStrategy` is set then use it and pass in `options.auth` + if (options.authStrategy) { + const auth = options.authStrategy(options.auth); + octokit.hook.wrap("request", auth.hook); + octokit.auth = auth; + return; + } + + // If neither `options.authStrategy` nor `options.auth` are set, the `octokit` instance + // is unauthenticated. The `octokit.auth()` method is a no-op and no request hook is registred. + if (!options.auth) { + octokit.auth = () => + Promise.resolve({ + type: "unauthenticated" + }); + return; + } + + const isBasicAuthString = + typeof options.auth === "string" && + /^basic/.test(withAuthorizationPrefix(options.auth)); + + // If only `options.auth` is set to a string, use the default token authentication strategy. + if (typeof options.auth === "string" && !isBasicAuthString) { + const auth = createTokenAuth(options.auth); + octokit.hook.wrap("request", auth.hook); + octokit.auth = auth; + return; + } + + // Otherwise log a deprecation message + const [deprecationMethod, deprecationMessapge] = isBasicAuthString + ? [ + deprecateAuthBasic, + 'Setting the "new Octokit({ auth })" option to a Basic Auth string is deprecated. Use https://github.com/octokit/auth-basic.js instead. See (https://octokit.github.io/rest.js/#authentication)' + ] + : [ + deprecateAuthObject, + 'Setting the "new Octokit({ auth })" option to an object without also setting the "authStrategy" option is deprecated and will be removed in v17. See (https://octokit.github.io/rest.js/#authentication)' + ]; + deprecationMethod( + octokit.log, + new Deprecation("[@octokit/rest] " + deprecationMessapge) + ); - /***/ - }, + octokit.auth = () => + Promise.resolve({ + type: "deprecated", + message: deprecationMessapge + }); - /***/ 35895: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var AWS = __nccwpck_require__(28437); - var regionUtil = __nccwpck_require__(18262); + validate(options.auth); - var s3util = { - /** - * @api private - */ - isArnInParam: function isArnInParam(req, paramName) { - var inputShape = - (req.service.api.operations[req.operation] || {}).input || {}; - var inputMembers = inputShape.members || {}; - if (!req.params[paramName] || !inputMembers[paramName]) return false; - return AWS.util.ARN.validate(req.params[paramName]); - }, + const state = { + octokit, + auth: options.auth + }; - /** - * Validate service component from ARN supplied in Bucket parameter - */ - validateArnService: function validateArnService(req) { - var parsedArn = req.service._parsedArn; + octokit.hook.before("request", beforeRequest.bind(null, state)); + octokit.hook.error("request", requestError.bind(null, state)); +} - if ( - parsedArn.service !== "s3" && - parsedArn.service !== "s3-outposts" - ) { - throw AWS.util.error(new Error(), { - code: "InvalidARN", - message: "expect 's3' or 's3-outposts' in ARN service component", - }); - } - }, - /** - * Validate account ID from ARN supplied in Bucket parameter is a valid account - */ - validateArnAccount: function validateArnAccount(req) { - var parsedArn = req.service._parsedArn; +/***/ }), - if (!/[0-9]{12}/.exec(parsedArn.accountId)) { - throw AWS.util.error(new Error(), { - code: "InvalidARN", - message: 'ARN accountID does not match regex "[0-9]{12}"', - }); - } - }, +/***/ 3217: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - /** - * Validate ARN supplied in Bucket parameter is a valid access point ARN - */ - validateS3AccessPointArn: function validateS3AccessPointArn(req) { - var parsedArn = req.service._parsedArn; +module.exports = authenticationRequestError; - //can be ':' or '/' - var delimiter = parsedArn.resource["accesspoint".length]; +const { RequestError } = __nccwpck_require__(96239); - if (parsedArn.resource.split(delimiter).length !== 2) { - throw AWS.util.error(new Error(), { - code: "InvalidARN", - message: - "Access Point ARN should have one resource accesspoint/{accesspointName}", - }); - } +function authenticationRequestError(state, error, options) { + if (!error.headers) throw error; - var accessPoint = parsedArn.resource.split(delimiter)[1]; - var accessPointPrefix = accessPoint + "-" + parsedArn.accountId; - if ( - !s3util.dnsCompatibleBucketName(accessPointPrefix) || - accessPointPrefix.match(/\./) - ) { - throw AWS.util.error(new Error(), { - code: "InvalidARN", - message: - "Access point resource in ARN is not DNS compatible. Got " + - accessPoint, - }); - } + const otpRequired = /required/.test(error.headers["x-github-otp"] || ""); + // handle "2FA required" error only + if (error.status !== 401 || !otpRequired) { + throw error; + } - //set parsed valid access point - req.service._parsedArn.accessPoint = accessPoint; - }, + if ( + error.status === 401 && + otpRequired && + error.request && + error.request.headers["x-github-otp"] + ) { + if (state.otp) { + delete state.otp; // no longer valid, request again + } else { + throw new RequestError( + "Invalid one-time password for two-factor authentication", + 401, + { + headers: error.headers, + request: options + } + ); + } + } + + if (typeof state.auth.on2fa !== "function") { + throw new RequestError( + "2FA required, but options.on2fa is not a function. See https://github.com/octokit/rest.js#authentication", + 401, + { + headers: error.headers, + request: options + } + ); + } + + return Promise.resolve() + .then(() => { + return state.auth.on2fa(); + }) + .then(oneTimePassword => { + const newOptions = Object.assign(options, { + headers: Object.assign(options.headers, { + "x-github-otp": oneTimePassword + }) + }); + return state.octokit.request(newOptions).then(response => { + // If OTP still valid, then persist it for following requests + state.otp = oneTimePassword; + return response; + }); + }); +} - /** - * Validate Outposts ARN supplied in Bucket parameter is a valid outposts ARN - */ - validateOutpostsArn: function validateOutpostsArn(req) { - var parsedArn = req.service._parsedArn; - if ( - parsedArn.resource.indexOf("outpost:") !== 0 && - parsedArn.resource.indexOf("outpost/") !== 0 - ) { - throw AWS.util.error(new Error(), { - code: "InvalidARN", - message: "ARN resource should begin with 'outpost/'", - }); - } +/***/ }), - //can be ':' or '/' - var delimiter = parsedArn.resource["outpost".length]; - var outpostId = parsedArn.resource.split(delimiter)[1]; - var dnsHostRegex = new RegExp( - /^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/ - ); - if (!dnsHostRegex.test(outpostId)) { - throw AWS.util.error(new Error(), { - code: "InvalidARN", - message: - "Outpost resource in ARN is not DNS compatible. Got " + - outpostId, - }); - } - req.service._parsedArn.outpostId = outpostId; - }, +/***/ 18997: +/***/ ((module) => { - /** - * Validate Outposts ARN supplied in Bucket parameter is a valid outposts ARN - */ - validateOutpostsAccessPointArn: function validateOutpostsAccessPointArn( - req - ) { - var parsedArn = req.service._parsedArn; +module.exports = validateAuth; - //can be ':' or '/' - var delimiter = parsedArn.resource["outpost".length]; +function validateAuth(auth) { + if (typeof auth === "string") { + return; + } - if (parsedArn.resource.split(delimiter).length !== 4) { - throw AWS.util.error(new Error(), { - code: "InvalidARN", - message: - "Outposts ARN should have two resources outpost/{outpostId}/accesspoint/{accesspointName}", - }); - } + if (typeof auth === "function") { + return; + } - var accessPoint = parsedArn.resource.split(delimiter)[3]; - var accessPointPrefix = accessPoint + "-" + parsedArn.accountId; - if ( - !s3util.dnsCompatibleBucketName(accessPointPrefix) || - accessPointPrefix.match(/\./) - ) { - throw AWS.util.error(new Error(), { - code: "InvalidARN", - message: - "Access point resource in ARN is not DNS compatible. Got " + - accessPoint, - }); - } + if (auth.username && auth.password) { + return; + } - //set parsed valid access point - req.service._parsedArn.accessPoint = accessPoint; - }, + if (auth.clientId && auth.clientSecret) { + return; + } - /** - * Validate region field in ARN supplied in Bucket parameter is a valid region - */ - validateArnRegion: function validateArnRegion(req) { - var useArnRegion = s3util.loadUseArnRegionConfig(req); - var regionFromArn = req.service._parsedArn.region; - var clientRegion = req.service.config.region; + throw new Error(`Invalid "auth" option: ${JSON.stringify(auth)}`); +} - if (!regionFromArn) { - throw AWS.util.error(new Error(), { - code: "InvalidARN", - message: "ARN region is empty", - }); - } - if ( - clientRegion.indexOf("fips") >= 0 || - regionFromArn.indexOf("fips") >= 0 - ) { - throw AWS.util.error(new Error(), { - code: "InvalidConfiguration", - message: "ARN endpoint is not compatible with FIPS region", - }); - } +/***/ }), - if (!useArnRegion && regionFromArn !== clientRegion) { - throw AWS.util.error(new Error(), { - code: "InvalidConfiguration", - message: "Configured region conflicts with access point region", - }); - } else if ( - useArnRegion && - regionUtil.getEndpointSuffix(regionFromArn) !== - regionUtil.getEndpointSuffix(clientRegion) - ) { - throw AWS.util.error(new Error(), { - code: "InvalidConfiguration", - message: - "Configured region and access point region not in same partition", - }); - } +/***/ 19603: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - if (req.service.config.useAccelerateEndpoint) { - throw AWS.util.error(new Error(), { - code: "InvalidConfiguration", - message: - "useAccelerateEndpoint config is not supported with access point ARN", - }); - } +module.exports = withAuthorizationPrefix; - if ( - req.service._parsedArn.service === "s3-outposts" && - req.service.config.useDualstack - ) { - throw AWS.util.error(new Error(), { - code: "InvalidConfiguration", - message: - "useDualstack config is not supported with outposts access point ARN", - }); - } - }, +const atob = __nccwpck_require__(55224); - loadUseArnRegionConfig: function loadUseArnRegionConfig(req) { - var envName = "AWS_S3_USE_ARN_REGION"; - var configName = "s3_use_arn_region"; - var useArnRegion = true; - var originalConfig = req.service._originalConfig || {}; - if (req.service.config.s3UseArnRegion !== undefined) { - return req.service.config.s3UseArnRegion; - } else if (originalConfig.s3UseArnRegion !== undefined) { - useArnRegion = originalConfig.s3UseArnRegion === true; - } else if (AWS.util.isNode()) { - //load from environmental variable AWS_USE_ARN_REGION - if (process.env[envName]) { - var value = process.env[envName].trim().toLowerCase(); - if (["false", "true"].indexOf(value) < 0) { - throw AWS.util.error(new Error(), { - code: "InvalidConfiguration", - message: - envName + - " only accepts true or false. Got " + - process.env[envName], - retryable: false, - }); - } - useArnRegion = value === "true"; - } else { - //load from shared config property use_arn_region - var profiles = {}; - var profile = {}; - try { - profiles = AWS.util.getProfilesFromSharedConfig( - AWS.util.iniLoader - ); - profile = - profiles[process.env.AWS_PROFILE || AWS.util.defaultProfile]; - } catch (e) {} - if (profile[configName]) { - if ( - ["false", "true"].indexOf( - profile[configName].trim().toLowerCase() - ) < 0 - ) { - throw AWS.util.error(new Error(), { - code: "InvalidConfiguration", - message: - configName + - " only accepts true or false. Got " + - profile[configName], - retryable: false, - }); - } - useArnRegion = - profile[configName].trim().toLowerCase() === "true"; - } - } - } - req.service.config.s3UseArnRegion = useArnRegion; - return useArnRegion; - }, +const REGEX_IS_BASIC_AUTH = /^[\w-]+:/; - /** - * Validations before URI can be populated - */ - validatePopulateUriFromArn: function validatePopulateUriFromArn(req) { - if ( - req.service._originalConfig && - req.service._originalConfig.endpoint - ) { - throw AWS.util.error(new Error(), { - code: "InvalidConfiguration", - message: - "Custom endpoint is not compatible with access point ARN", - }); - } +function withAuthorizationPrefix(authorization) { + if (/^(basic|bearer|token) /i.test(authorization)) { + return authorization; + } - if (req.service.config.s3ForcePathStyle) { - throw AWS.util.error(new Error(), { - code: "InvalidConfiguration", - message: "Cannot construct path-style endpoint with access point", - }); - } - }, + try { + if (REGEX_IS_BASIC_AUTH.test(atob(authorization))) { + return `basic ${authorization}`; + } + } catch (error) {} - /** - * Returns true if the bucket name is DNS compatible. Buckets created - * outside of the classic region MUST be DNS compatible. - * - * @api private - */ - dnsCompatibleBucketName: function dnsCompatibleBucketName(bucketName) { - var b = bucketName; - var domain = new RegExp(/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/); - var ipAddress = new RegExp(/(\d+\.){3}\d+/); - var dots = new RegExp(/\.\./); - return b.match(domain) && !b.match(ipAddress) && !b.match(dots) - ? true - : false; - }, - }; + if (authorization.split(/\./).length === 3) { + return `bearer ${authorization}`; + } - /** - * @api private - */ - module.exports = s3util; - - /***/ - }, - - /***/ 94571: /***/ ( - __unused_webpack_module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var AWS = __nccwpck_require__(28437); - - AWS.util.update(AWS.SQS.prototype, { - /** - * @api private - */ - setupRequestListeners: function setupRequestListeners(request) { - request.addListener("build", this.buildEndpoint); - - if (request.service.config.computeChecksums) { - if (request.operation === "sendMessage") { - request.addListener( - "extractData", - this.verifySendMessageChecksum - ); - } else if (request.operation === "sendMessageBatch") { - request.addListener( - "extractData", - this.verifySendMessageBatchChecksum - ); - } else if (request.operation === "receiveMessage") { - request.addListener( - "extractData", - this.verifyReceiveMessageChecksum - ); - } - } - }, + return `token ${authorization}`; +} - /** - * @api private - */ - verifySendMessageChecksum: function verifySendMessageChecksum( - response - ) { - if (!response.data) return; - - var md5 = response.data.MD5OfMessageBody; - var body = this.params.MessageBody; - var calculatedMd5 = this.service.calculateChecksum(body); - if (calculatedMd5 !== md5) { - var msg = - 'Got "' + - response.data.MD5OfMessageBody + - '", expecting "' + - calculatedMd5 + - '".'; - this.service.throwInvalidChecksumError( - response, - [response.data.MessageId], - msg - ); - } - }, - /** - * @api private - */ - verifySendMessageBatchChecksum: function verifySendMessageBatchChecksum( - response - ) { - if (!response.data) return; - - var service = this.service; - var entries = {}; - var errors = []; - var messageIds = []; - AWS.util.arrayEach(response.data.Successful, function (entry) { - entries[entry.Id] = entry; - }); - AWS.util.arrayEach(this.params.Entries, function (entry) { - if (entries[entry.Id]) { - var md5 = entries[entry.Id].MD5OfMessageBody; - var body = entry.MessageBody; - if (!service.isChecksumValid(md5, body)) { - errors.push(entry.Id); - messageIds.push(entries[entry.Id].MessageId); - } - } - }); +/***/ }), - if (errors.length > 0) { - service.throwInvalidChecksumError( - response, - messageIds, - "Invalid messages: " + errors.join(", ") - ); - } - }, +/***/ 18579: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - /** - * @api private - */ - verifyReceiveMessageChecksum: function verifyReceiveMessageChecksum( - response - ) { - if (!response.data) return; - - var service = this.service; - var messageIds = []; - AWS.util.arrayEach(response.data.Messages, function (message) { - var md5 = message.MD5OfBody; - var body = message.Body; - if (!service.isChecksumValid(md5, body)) { - messageIds.push(message.MessageId); - } - }); +module.exports = paginatePlugin; - if (messageIds.length > 0) { - service.throwInvalidChecksumError( - response, - messageIds, - "Invalid messages: " + messageIds.join(", ") - ); - } - }, +const { paginateRest } = __nccwpck_require__(64193); - /** - * @api private - */ - throwInvalidChecksumError: function throwInvalidChecksumError( - response, - ids, - message - ) { - response.error = AWS.util.error(new Error(), { - retryable: true, - code: "InvalidChecksum", - messageIds: ids, - message: - response.request.operation + - " returned an invalid MD5 response. " + - message, - }); - }, +function paginatePlugin(octokit) { + Object.assign(octokit, paginateRest(octokit)); +} - /** - * @api private - */ - isChecksumValid: function isChecksumValid(checksum, data) { - return this.calculateChecksum(data) === checksum; - }, - /** - * @api private - */ - calculateChecksum: function calculateChecksum(data) { - return AWS.util.crypto.md5(data, "hex"); - }, +/***/ }), - /** - * @api private - */ - buildEndpoint: function buildEndpoint(request) { - var url = request.httpRequest.params.QueueUrl; - if (url) { - request.httpRequest.endpoint = new AWS.Endpoint(url); +/***/ 42657: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - // signature version 4 requires the region name to be set, - // sqs queue urls contain the region name - var matches = request.httpRequest.endpoint.host.match( - /^sqs\.(.+?)\./ - ); - if (matches) request.httpRequest.region = matches[1]; - } - }, - }); +module.exports = octokitValidate; - /***/ - }, - - /***/ 91055: /***/ ( - __unused_webpack_module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var AWS = __nccwpck_require__(28437); - var resolveRegionalEndpointsFlag = __nccwpck_require__(85566); - var ENV_REGIONAL_ENDPOINT_ENABLED = "AWS_STS_REGIONAL_ENDPOINTS"; - var CONFIG_REGIONAL_ENDPOINT_ENABLED = "sts_regional_endpoints"; - - AWS.util.update(AWS.STS.prototype, { - /** - * @overload credentialsFrom(data, credentials = null) - * Creates a credentials object from STS response data containing - * credentials information. Useful for quickly setting AWS credentials. - * - * @note This is a low-level utility function. If you want to load temporary - * credentials into your process for subsequent requests to AWS resources, - * you should use {AWS.TemporaryCredentials} instead. - * @param data [map] data retrieved from a call to {getFederatedToken}, - * {getSessionToken}, {assumeRole}, or {assumeRoleWithWebIdentity}. - * @param credentials [AWS.Credentials] an optional credentials object to - * fill instead of creating a new object. Useful when modifying an - * existing credentials object from a refresh call. - * @return [AWS.TemporaryCredentials] the set of temporary credentials - * loaded from a raw STS operation response. - * @example Using credentialsFrom to load global AWS credentials - * var sts = new AWS.STS(); - * sts.getSessionToken(function (err, data) { - * if (err) console.log("Error getting credentials"); - * else { - * AWS.config.credentials = sts.credentialsFrom(data); - * } - * }); - * @see AWS.TemporaryCredentials - */ - credentialsFrom: function credentialsFrom(data, credentials) { - if (!data) return null; - if (!credentials) credentials = new AWS.TemporaryCredentials(); - credentials.expired = false; - credentials.accessKeyId = data.Credentials.AccessKeyId; - credentials.secretAccessKey = data.Credentials.SecretAccessKey; - credentials.sessionToken = data.Credentials.SessionToken; - credentials.expireTime = data.Credentials.Expiration; - return credentials; - }, - - assumeRoleWithWebIdentity: function assumeRoleWithWebIdentity( - params, - callback - ) { - return this.makeUnauthenticatedRequest( - "assumeRoleWithWebIdentity", - params, - callback - ); - }, +const validate = __nccwpck_require__(6132); - assumeRoleWithSAML: function assumeRoleWithSAML(params, callback) { - return this.makeUnauthenticatedRequest( - "assumeRoleWithSAML", - params, - callback - ); - }, +function octokitValidate(octokit) { + octokit.hook.before("request", validate.bind(null, octokit)); +} - /** - * @api private - */ - setupRequestListeners: function setupRequestListeners(request) { - request.addListener("validate", this.optInRegionalEndpoint, true); - }, - /** - * @api private - */ - optInRegionalEndpoint: function optInRegionalEndpoint(req) { - var service = req.service; - var config = service.config; - config.stsRegionalEndpoints = resolveRegionalEndpointsFlag( - service._originalConfig, - { - env: ENV_REGIONAL_ENDPOINT_ENABLED, - sharedConfig: CONFIG_REGIONAL_ENDPOINT_ENABLED, - clientConfig: "stsRegionalEndpoints", - } - ); - if ( - config.stsRegionalEndpoints === "regional" && - service.isGlobalEndpoint - ) { - //client will throw if region is not supplied; request will be signed with specified region - if (!config.region) { - throw AWS.util.error(new Error(), { - code: "ConfigError", - message: "Missing region in config", - }); - } - var insertPoint = config.endpoint.indexOf(".amazonaws.com"); - var regionalEndpoint = - config.endpoint.substring(0, insertPoint) + - "." + - config.region + - config.endpoint.substring(insertPoint); - req.httpRequest.updateEndpoint(regionalEndpoint); - req.httpRequest.region = config.region; - } - }, - }); +/***/ }), - /***/ - }, - - /***/ 31987: /***/ ( - __unused_webpack_module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var AWS = __nccwpck_require__(28437); - - AWS.util.hideProperties(AWS, ["SimpleWorkflow"]); - - /** - * @constant - * @readonly - * Backwards compatibility for access to the {AWS.SWF} service class. - */ - AWS.SimpleWorkflow = AWS.SWF; - - /***/ - }, - - /***/ 29697: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var IniLoader = __nccwpck_require__(95417).IniLoader; - /** - * Singleton object to load specified config/credentials files. - * It will cache all the files ever loaded; - */ - module.exports.b = new IniLoader(); - - /***/ - }, - - /***/ 95417: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var AWS = __nccwpck_require__(28437); - var os = __nccwpck_require__(22037); - var path = __nccwpck_require__(71017); - - function parseFile(filename, isConfig) { - var content = AWS.util.ini.parse(AWS.util.readFileSync(filename)); - var tmpContent = {}; - Object.keys(content).forEach(function (profileName) { - var profileContent = content[profileName]; - profileName = isConfig - ? profileName.replace(/^profile\s/, "") - : profileName; - Object.defineProperty(tmpContent, profileName, { - value: profileContent, - enumerable: true, - }); - }); - return tmpContent; - } +/***/ 6132: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - /** - * Ini file loader class the same as that used in the SDK. It loads and - * parses config and credentials files in .ini format and cache the content - * to assure files are only read once. - * Note that calling operations on the instance instantiated from this class - * won't affect the behavior of SDK since SDK uses an internal singleton of - * this class. - * @!macro nobrowser - */ - AWS.IniLoader = AWS.util.inherit({ - constructor: function IniLoader() { - this.resolvedProfiles = {}; - }, - - /** Remove all cached files. Used after config files are updated. */ - clearCachedFiles: function clearCachedFiles() { - this.resolvedProfiles = {}; - }, - - /** - * Load configurations from config/credentials files and cache them - * for later use. If no file is specified it will try to load default - * files. - * @param options [map] information describing the file - * @option options filename [String] ('~/.aws/credentials' or defined by - * AWS_SHARED_CREDENTIALS_FILE process env var or '~/.aws/config' if - * isConfig is set to true) - * path to the file to be read. - * @option options isConfig [Boolean] (false) True to read config file. - * @return [map] object containing contents from file in key-value - * pairs. - */ - loadFrom: function loadFrom(options) { - options = options || {}; - var isConfig = options.isConfig === true; - var filename = options.filename || this.getDefaultFilePath(isConfig); - if (!this.resolvedProfiles[filename]) { - var fileContent = this.parseFile(filename, isConfig); - Object.defineProperty(this.resolvedProfiles, filename, { - value: fileContent, - }); - } - return this.resolvedProfiles[filename]; - }, - - /** - * @api private - */ - parseFile: parseFile, - - /** - * @api private - */ - getDefaultFilePath: function getDefaultFilePath(isConfig) { - return path.join( - this.getHomeDir(), - ".aws", - isConfig ? "config" : "credentials" - ); - }, +"use strict"; - /** - * @api private - */ - getHomeDir: function getHomeDir() { - var env = process.env; - var home = - env.HOME || - env.USERPROFILE || - (env.HOMEPATH ? (env.HOMEDRIVE || "C:/") + env.HOMEPATH : null); - if (home) { - return home; - } +module.exports = validate; - if (typeof os.homedir === "function") { - return os.homedir(); - } +const { RequestError } = __nccwpck_require__(96239); +const get = __nccwpck_require__(99197); +const set = __nccwpck_require__(51552); - throw AWS.util.error( - new Error("Cannot load credentials, HOME path not set") - ); - }, - }); +function validate(octokit, options) { + if (!options.request.validate) { + return; + } + const { validate: params } = options.request; - var IniLoader = AWS.IniLoader; + Object.keys(params).forEach(parameterName => { + const parameter = get(params, parameterName); - module.exports = { - IniLoader: IniLoader, - parseFile: parseFile, - }; + const expectedType = parameter.type; + let parentParameterName; + let parentValue; + let parentParamIsPresent = true; + let parentParameterIsArray = false; - /***/ - }, - - /***/ 60328: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var AWS = __nccwpck_require__(28437); - var inherit = AWS.util.inherit; - - /** - * @api private - */ - var expiresHeader = "presigned-expires"; - - /** - * @api private - */ - function signedUrlBuilder(request) { - var expires = request.httpRequest.headers[expiresHeader]; - var signerClass = request.service.getSignerClass(request); - - delete request.httpRequest.headers["User-Agent"]; - delete request.httpRequest.headers["X-Amz-User-Agent"]; - - if (signerClass === AWS.Signers.V4) { - if (expires > 604800) { - // one week expiry is invalid - var message = - "Presigning does not support expiry time greater " + - "than a week with SigV4 signing."; - throw AWS.util.error(new Error(), { - code: "InvalidExpiryTime", - message: message, - retryable: false, - }); - } - request.httpRequest.headers[expiresHeader] = expires; - } else if (signerClass === AWS.Signers.S3) { - var now = request.service - ? request.service.getSkewCorrectedDate() - : AWS.util.date.getDate(); - request.httpRequest.headers[expiresHeader] = parseInt( - AWS.util.date.unixTimestamp(now) + expires, - 10 - ).toString(); - } else { - throw AWS.util.error(new Error(), { - message: "Presigning only supports S3 or SigV4 signing.", - code: "UnsupportedSigner", - retryable: false, - }); - } + if (/\./.test(parameterName)) { + parentParameterName = parameterName.replace(/\.[^.]+$/, ""); + parentParameterIsArray = parentParameterName.slice(-2) === "[]"; + if (parentParameterIsArray) { + parentParameterName = parentParameterName.slice(0, -2); } + parentValue = get(options, parentParameterName); + parentParamIsPresent = + parentParameterName === "headers" || + (typeof parentValue === "object" && parentValue !== null); + } - /** - * @api private - */ - function signedUrlSigner(request) { - var endpoint = request.httpRequest.endpoint; - var parsedUrl = AWS.util.urlParse(request.httpRequest.path); - var queryParams = {}; - - if (parsedUrl.search) { - queryParams = AWS.util.queryStringParse(parsedUrl.search.substr(1)); - } - - var auth = request.httpRequest.headers["Authorization"].split(" "); - if (auth[0] === "AWS") { - auth = auth[1].split(":"); - queryParams["Signature"] = auth.pop(); - queryParams["AWSAccessKeyId"] = auth.join(":"); - - AWS.util.each(request.httpRequest.headers, function (key, value) { - if (key === expiresHeader) key = "Expires"; - if (key.indexOf("x-amz-meta-") === 0) { - // Delete existing, potentially not normalized key - delete queryParams[key]; - key = key.toLowerCase(); - } - queryParams[key] = value; - }); - delete request.httpRequest.headers[expiresHeader]; - delete queryParams["Authorization"]; - delete queryParams["Host"]; - } else if (auth[0] === "AWS4-HMAC-SHA256") { - // SigV4 signing - auth.shift(); - var rest = auth.join(" "); - var signature = rest.match(/Signature=(.*?)(?:,|\s|\r?\n|$)/)[1]; - queryParams["X-Amz-Signature"] = signature; - delete queryParams["Expires"]; - } - - // build URL - endpoint.pathname = parsedUrl.pathname; - endpoint.search = AWS.util.queryParamsToString(queryParams); + const values = parentParameterIsArray + ? (get(options, parentParameterName) || []).map( + value => value[parameterName.split(/\./).pop()] + ) + : [get(options, parameterName)]; + + values.forEach((value, i) => { + const valueIsPresent = typeof value !== "undefined"; + const valueIsNull = value === null; + const currentParameterName = parentParameterIsArray + ? parameterName.replace(/\[\]/, `[${i}]`) + : parameterName; + + if (!parameter.required && !valueIsPresent) { + return; } - /** - * @api private - */ - AWS.Signers.Presign = inherit({ - /** - * @api private - */ - sign: function sign(request, expireTime, callback) { - request.httpRequest.headers[expiresHeader] = expireTime || 3600; - request.on("build", signedUrlBuilder); - request.on("sign", signedUrlSigner); - request.removeListener( - "afterBuild", - AWS.EventListeners.Core.SET_CONTENT_LENGTH - ); - request.removeListener( - "afterBuild", - AWS.EventListeners.Core.COMPUTE_SHA256 - ); + // if the parent parameter is of type object but allows null + // then the child parameters can be ignored + if (!parentParamIsPresent) { + return; + } - request.emit("beforePresign", [request]); + if (parameter.allowNull && valueIsNull) { + return; + } - if (callback) { - request.build(function () { - if (this.response.error) callback(this.response.error); - else { - callback( - null, - AWS.util.urlFormat(request.httpRequest.endpoint) - ); - } - }); - } else { - request.build(); - if (request.response.error) throw request.response.error; - return AWS.util.urlFormat(request.httpRequest.endpoint); + if (!parameter.allowNull && valueIsNull) { + throw new RequestError( + `'${currentParameterName}' cannot be null`, + 400, + { + request: options } - }, - }); + ); + } - /** - * @api private - */ - module.exports = AWS.Signers.Presign; + if (parameter.required && !valueIsPresent) { + throw new RequestError( + `Empty value for parameter '${currentParameterName}': ${JSON.stringify( + value + )}`, + 400, + { + request: options + } + ); + } + + // parse to integer before checking for enum + // so that string "1" will match enum with number 1 + if (expectedType === "integer") { + const unparsedValue = value; + value = parseInt(value, 10); + if (isNaN(value)) { + throw new RequestError( + `Invalid value for parameter '${currentParameterName}': ${JSON.stringify( + unparsedValue + )} is NaN`, + 400, + { + request: options + } + ); + } + } + + if (parameter.enum && parameter.enum.indexOf(String(value)) === -1) { + throw new RequestError( + `Invalid value for parameter '${currentParameterName}': ${JSON.stringify( + value + )}`, + 400, + { + request: options + } + ); + } - /***/ - }, + if (parameter.validation) { + const regex = new RegExp(parameter.validation); + if (!regex.test(value)) { + throw new RequestError( + `Invalid value for parameter '${currentParameterName}': ${JSON.stringify( + value + )}`, + 400, + { + request: options + } + ); + } + } - /***/ 9897: /***/ ( - __unused_webpack_module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var AWS = __nccwpck_require__(28437); + if (expectedType === "object" && typeof value === "string") { + try { + value = JSON.parse(value); + } catch (exception) { + throw new RequestError( + `JSON parse error of value for parameter '${currentParameterName}': ${JSON.stringify( + value + )}`, + 400, + { + request: options + } + ); + } + } - var inherit = AWS.util.inherit; + set(options, parameter.mapTo || currentParameterName, value); + }); + }); - /** - * @api private - */ - AWS.Signers.RequestSigner = inherit({ - constructor: function RequestSigner(request) { - this.request = request; - }, + return options; +} - setServiceClientId: function setServiceClientId(id) { - this.serviceClientId = id; - }, - getServiceClientId: function getServiceClientId() { - return this.serviceClientId; - }, - }); +/***/ }), - AWS.Signers.RequestSigner.getVersion = function getVersion(version) { - switch (version) { - case "v2": - return AWS.Signers.V2; - case "v3": - return AWS.Signers.V3; - case "s3v4": - return AWS.Signers.V4; - case "v4": - return AWS.Signers.V4; - case "s3": - return AWS.Signers.S3; - case "v3https": - return AWS.Signers.V3Https; - } - throw new Error("Unknown signing version " + version); - }; +/***/ 55224: +/***/ ((module) => { - __nccwpck_require__(28489); - __nccwpck_require__(66458); - __nccwpck_require__(24473); - __nccwpck_require__(26529); - __nccwpck_require__(58616); - __nccwpck_require__(60328); - - /***/ - }, - - /***/ 58616: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var AWS = __nccwpck_require__(28437); - var inherit = AWS.util.inherit; - - /** - * @api private - */ - AWS.Signers.S3 = inherit(AWS.Signers.RequestSigner, { - /** - * When building the stringToSign, these sub resource params should be - * part of the canonical resource string with their NON-decoded values - */ - subResources: { - acl: 1, - accelerate: 1, - analytics: 1, - cors: 1, - lifecycle: 1, - delete: 1, - inventory: 1, - location: 1, - logging: 1, - metrics: 1, - notification: 1, - partNumber: 1, - policy: 1, - requestPayment: 1, - replication: 1, - restore: 1, - tagging: 1, - torrent: 1, - uploadId: 1, - uploads: 1, - versionId: 1, - versioning: 1, - versions: 1, - website: 1, - }, - - // when building the stringToSign, these querystring params should be - // part of the canonical resource string with their NON-encoded values - responseHeaders: { - "response-content-type": 1, - "response-content-language": 1, - "response-expires": 1, - "response-cache-control": 1, - "response-content-disposition": 1, - "response-content-encoding": 1, - }, - - addAuthorization: function addAuthorization(credentials, date) { - if (!this.request.headers["presigned-expires"]) { - this.request.headers["X-Amz-Date"] = AWS.util.date.rfc822(date); - } +module.exports = function atob(str) { + return Buffer.from(str, 'base64').toString('binary') +} - if (credentials.sessionToken) { - // presigned URLs require this header to be lowercased - this.request.headers["x-amz-security-token"] = - credentials.sessionToken; - } - var signature = this.sign( - credentials.secretAccessKey, - this.stringToSign() - ); - var auth = "AWS " + credentials.accessKeyId + ":" + signature; +/***/ }), - this.request.headers["Authorization"] = auth; - }, +/***/ 20940: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - stringToSign: function stringToSign() { - var r = this.request; +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; - var parts = []; - parts.push(r.method); - parts.push(r.headers["Content-MD5"] || ""); - parts.push(r.headers["Content-Type"] || ""); +apiLoader.services['accessanalyzer'] = {}; +AWS.AccessAnalyzer = Service.defineService('accessanalyzer', ['2019-11-01']); +Object.defineProperty(apiLoader.services['accessanalyzer'], '2019-11-01', { + get: function get() { + var model = __nccwpck_require__(30590); + model.paginators = (__nccwpck_require__(63080)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); - // This is the "Date" header, but we use X-Amz-Date. - // The S3 signing mechanism requires us to pass an empty - // string for this Date header regardless. - parts.push(r.headers["presigned-expires"] || ""); +module.exports = AWS.AccessAnalyzer; - var headers = this.canonicalizedAmzHeaders(); - if (headers) parts.push(headers); - parts.push(this.canonicalizedResource()); - return parts.join("\n"); - }, +/***/ }), + +/***/ 30838: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['acm'] = {}; +AWS.ACM = Service.defineService('acm', ['2015-12-08']); +Object.defineProperty(apiLoader.services['acm'], '2015-12-08', { + get: function get() { + var model = __nccwpck_require__(34662); + model.paginators = (__nccwpck_require__(42680)/* .pagination */ .o); + model.waiters = (__nccwpck_require__(85678)/* .waiters */ .V); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.ACM; + + +/***/ }), + +/***/ 18450: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['acmpca'] = {}; +AWS.ACMPCA = Service.defineService('acmpca', ['2017-08-22']); +Object.defineProperty(apiLoader.services['acmpca'], '2017-08-22', { + get: function get() { + var model = __nccwpck_require__(33004); + model.paginators = (__nccwpck_require__(21209)/* .pagination */ .o); + model.waiters = (__nccwpck_require__(89217)/* .waiters */ .V); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.ACMPCA; + + +/***/ }), + +/***/ 14578: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['alexaforbusiness'] = {}; +AWS.AlexaForBusiness = Service.defineService('alexaforbusiness', ['2017-11-09']); +Object.defineProperty(apiLoader.services['alexaforbusiness'], '2017-11-09', { + get: function get() { + var model = __nccwpck_require__(69786); + model.paginators = (__nccwpck_require__(21009)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.AlexaForBusiness; + + +/***/ }), + +/***/ 26296: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +module.exports = { + ACM: __nccwpck_require__(30838), + APIGateway: __nccwpck_require__(91759), + ApplicationAutoScaling: __nccwpck_require__(25598), + AppStream: __nccwpck_require__(21730), + AutoScaling: __nccwpck_require__(31652), + Batch: __nccwpck_require__(10000), + Budgets: __nccwpck_require__(43923), + CloudDirectory: __nccwpck_require__(56231), + CloudFormation: __nccwpck_require__(74643), + CloudFront: __nccwpck_require__(48058), + CloudHSM: __nccwpck_require__(59976), + CloudSearch: __nccwpck_require__(72321), + CloudSearchDomain: __nccwpck_require__(64072), + CloudTrail: __nccwpck_require__(65512), + CloudWatch: __nccwpck_require__(6763), + CloudWatchEvents: __nccwpck_require__(38124), + CloudWatchLogs: __nccwpck_require__(96693), + CodeBuild: __nccwpck_require__(60450), + CodeCommit: __nccwpck_require__(71323), + CodeDeploy: __nccwpck_require__(54599), + CodePipeline: __nccwpck_require__(22938), + CognitoIdentity: __nccwpck_require__(58291), + CognitoIdentityServiceProvider: __nccwpck_require__(31379), + CognitoSync: __nccwpck_require__(74770), + ConfigService: __nccwpck_require__(34061), + CUR: __nccwpck_require__(5026), + DataPipeline: __nccwpck_require__(65688), + DeviceFarm: __nccwpck_require__(26272), + DirectConnect: __nccwpck_require__(73783), + DirectoryService: __nccwpck_require__(83908), + Discovery: __nccwpck_require__(81690), + DMS: __nccwpck_require__(69868), + DynamoDB: __nccwpck_require__(14347), + DynamoDBStreams: __nccwpck_require__(88090), + EC2: __nccwpck_require__(7778), + ECR: __nccwpck_require__(15211), + ECS: __nccwpck_require__(16615), + EFS: __nccwpck_require__(34375), + ElastiCache: __nccwpck_require__(81065), + ElasticBeanstalk: __nccwpck_require__(14897), + ELB: __nccwpck_require__(10907), + ELBv2: __nccwpck_require__(44311), + EMR: __nccwpck_require__(50470), + ES: __nccwpck_require__(84462), + ElasticTranscoder: __nccwpck_require__(40745), + Firehose: __nccwpck_require__(92831), + GameLift: __nccwpck_require__(8085), + Glacier: __nccwpck_require__(63249), + Health: __nccwpck_require__(21834), + IAM: __nccwpck_require__(50058), + ImportExport: __nccwpck_require__(6769), + Inspector: __nccwpck_require__(89439), + Iot: __nccwpck_require__(98392), + IotData: __nccwpck_require__(6564), + Kinesis: __nccwpck_require__(49876), + KinesisAnalytics: __nccwpck_require__(90042), + KMS: __nccwpck_require__(56782), + Lambda: __nccwpck_require__(13321), + LexRuntime: __nccwpck_require__(62716), + Lightsail: __nccwpck_require__(22718), + MachineLearning: __nccwpck_require__(82907), + MarketplaceCommerceAnalytics: __nccwpck_require__(4540), + MarketplaceMetering: __nccwpck_require__(39297), + MTurk: __nccwpck_require__(79954), + MobileAnalytics: __nccwpck_require__(66690), + OpsWorks: __nccwpck_require__(75691), + OpsWorksCM: __nccwpck_require__(80388), + Organizations: __nccwpck_require__(52560), + Pinpoint: __nccwpck_require__(18388), + Polly: __nccwpck_require__(97332), + RDS: __nccwpck_require__(71578), + Redshift: __nccwpck_require__(84853), + Rekognition: __nccwpck_require__(65470), + ResourceGroupsTaggingAPI: __nccwpck_require__(7385), + Route53: __nccwpck_require__(44968), + Route53Domains: __nccwpck_require__(51994), + S3: __nccwpck_require__(83256), + S3Control: __nccwpck_require__(99817), + ServiceCatalog: __nccwpck_require__(822), + SES: __nccwpck_require__(46816), + Shield: __nccwpck_require__(20271), + SimpleDB: __nccwpck_require__(10120), + SMS: __nccwpck_require__(57719), + Snowball: __nccwpck_require__(510), + SNS: __nccwpck_require__(28581), + SQS: __nccwpck_require__(63172), + SSM: __nccwpck_require__(83380), + StorageGateway: __nccwpck_require__(89190), + StepFunctions: __nccwpck_require__(8136), + STS: __nccwpck_require__(57513), + Support: __nccwpck_require__(1099), + SWF: __nccwpck_require__(32327), + XRay: __nccwpck_require__(41548), + WAF: __nccwpck_require__(72742), + WAFRegional: __nccwpck_require__(23153), + WorkDocs: __nccwpck_require__(38835), + WorkSpaces: __nccwpck_require__(25513), + CodeStar: __nccwpck_require__(98336), + LexModelBuildingService: __nccwpck_require__(37397), + MarketplaceEntitlementService: __nccwpck_require__(53707), + Athena: __nccwpck_require__(29434), + Greengrass: __nccwpck_require__(20690), + DAX: __nccwpck_require__(71398), + MigrationHub: __nccwpck_require__(14688), + CloudHSMV2: __nccwpck_require__(70889), + Glue: __nccwpck_require__(31658), + Mobile: __nccwpck_require__(39782), + Pricing: __nccwpck_require__(92765), + CostExplorer: __nccwpck_require__(79523), + MediaConvert: __nccwpck_require__(57220), + MediaLive: __nccwpck_require__(7509), + MediaPackage: __nccwpck_require__(91620), + MediaStore: __nccwpck_require__(83748), + MediaStoreData: __nccwpck_require__(98703), + AppSync: __nccwpck_require__(12402), + GuardDuty: __nccwpck_require__(40755), + MQ: __nccwpck_require__(23093), + Comprehend: __nccwpck_require__(62878), + IoTJobsDataPlane: __nccwpck_require__(42332), + KinesisVideoArchivedMedia: __nccwpck_require__(5580), + KinesisVideoMedia: __nccwpck_require__(81308), + KinesisVideo: __nccwpck_require__(89927), + SageMakerRuntime: __nccwpck_require__(85044), + SageMaker: __nccwpck_require__(77657), + Translate: __nccwpck_require__(72544), + ResourceGroups: __nccwpck_require__(58756), + AlexaForBusiness: __nccwpck_require__(14578), + Cloud9: __nccwpck_require__(85473), + ServerlessApplicationRepository: __nccwpck_require__(62402), + ServiceDiscovery: __nccwpck_require__(91569), + WorkMail: __nccwpck_require__(38374), + AutoScalingPlans: __nccwpck_require__(2554), + TranscribeService: __nccwpck_require__(75811), + Connect: __nccwpck_require__(13879), + ACMPCA: __nccwpck_require__(18450), + FMS: __nccwpck_require__(11316), + SecretsManager: __nccwpck_require__(85131), + IoTAnalytics: __nccwpck_require__(67409), + IoT1ClickDevicesService: __nccwpck_require__(39474), + IoT1ClickProjects: __nccwpck_require__(4686), + PI: __nccwpck_require__(15505), + Neptune: __nccwpck_require__(30047), + MediaTailor: __nccwpck_require__(99658), + EKS: __nccwpck_require__(23337), + Macie: __nccwpck_require__(86427), + DLM: __nccwpck_require__(24958), + Signer: __nccwpck_require__(71596), + Chime: __nccwpck_require__(84646), + PinpointEmail: __nccwpck_require__(83060), + RAM: __nccwpck_require__(94394), + Route53Resolver: __nccwpck_require__(25894), + PinpointSMSVoice: __nccwpck_require__(46605), + QuickSight: __nccwpck_require__(29898), + RDSDataService: __nccwpck_require__(30147), + Amplify: __nccwpck_require__(38090), + DataSync: __nccwpck_require__(25308), + RoboMaker: __nccwpck_require__(18068), + Transfer: __nccwpck_require__(51585), + GlobalAccelerator: __nccwpck_require__(19306), + ComprehendMedical: __nccwpck_require__(32349), + KinesisAnalyticsV2: __nccwpck_require__(74631), + MediaConnect: __nccwpck_require__(67639), + FSx: __nccwpck_require__(60642), + SecurityHub: __nccwpck_require__(21550), + AppMesh: __nccwpck_require__(69226), + LicenseManager: __nccwpck_require__(34693), + Kafka: __nccwpck_require__(56775), + ApiGatewayManagementApi: __nccwpck_require__(31762), + ApiGatewayV2: __nccwpck_require__(44987), + DocDB: __nccwpck_require__(55129), + Backup: __nccwpck_require__(82455), + WorkLink: __nccwpck_require__(48579), + Textract: __nccwpck_require__(58523), + ManagedBlockchain: __nccwpck_require__(85143), + MediaPackageVod: __nccwpck_require__(14962), + GroundStation: __nccwpck_require__(80494), + IoTThingsGraph: __nccwpck_require__(58905), + IoTEvents: __nccwpck_require__(88065), + IoTEventsData: __nccwpck_require__(56973), + Personalize: __nccwpck_require__(33696), + PersonalizeEvents: __nccwpck_require__(88170), + PersonalizeRuntime: __nccwpck_require__(66184), + ApplicationInsights: __nccwpck_require__(83972), + ServiceQuotas: __nccwpck_require__(57800), + EC2InstanceConnect: __nccwpck_require__(92209), + EventBridge: __nccwpck_require__(898), + LakeFormation: __nccwpck_require__(6726), + ForecastService: __nccwpck_require__(12942), + ForecastQueryService: __nccwpck_require__(36822), + QLDB: __nccwpck_require__(71266), + QLDBSession: __nccwpck_require__(55423), + WorkMailMessageFlow: __nccwpck_require__(67025), + CodeStarNotifications: __nccwpck_require__(15141), + SavingsPlans: __nccwpck_require__(62825), + SSO: __nccwpck_require__(71096), + SSOOIDC: __nccwpck_require__(49870), + MarketplaceCatalog: __nccwpck_require__(2609), + DataExchange: __nccwpck_require__(11024), + SESV2: __nccwpck_require__(20142), + MigrationHubConfig: __nccwpck_require__(62658), + ConnectParticipant: __nccwpck_require__(94198), + AppConfig: __nccwpck_require__(78606), + IoTSecureTunneling: __nccwpck_require__(98562), + WAFV2: __nccwpck_require__(50353), + ElasticInference: __nccwpck_require__(37708), + Imagebuilder: __nccwpck_require__(57511), + Schemas: __nccwpck_require__(55713), + AccessAnalyzer: __nccwpck_require__(20940), + CodeGuruReviewer: __nccwpck_require__(60070), + CodeGuruProfiler: __nccwpck_require__(65704), + ComputeOptimizer: __nccwpck_require__(64459), + FraudDetector: __nccwpck_require__(99830), + Kendra: __nccwpck_require__(66122), + NetworkManager: __nccwpck_require__(37610), + Outposts: __nccwpck_require__(27551), + AugmentedAIRuntime: __nccwpck_require__(33960), + EBS: __nccwpck_require__(62837), + KinesisVideoSignalingChannels: __nccwpck_require__(12710), + Detective: __nccwpck_require__(60674), + CodeStarconnections: __nccwpck_require__(78270), + Synthetics: __nccwpck_require__(25910), + IoTSiteWise: __nccwpck_require__(89690), + Macie2: __nccwpck_require__(57330), + CodeArtifact: __nccwpck_require__(91983), + Honeycode: __nccwpck_require__(38889), + IVS: __nccwpck_require__(67701), + Braket: __nccwpck_require__(35429), + IdentityStore: __nccwpck_require__(60222), + Appflow: __nccwpck_require__(60844), + RedshiftData: __nccwpck_require__(203), + SSOAdmin: __nccwpck_require__(66644), + TimestreamQuery: __nccwpck_require__(24529), + TimestreamWrite: __nccwpck_require__(1573), + S3Outposts: __nccwpck_require__(90493), + DataBrew: __nccwpck_require__(35846), + ServiceCatalogAppRegistry: __nccwpck_require__(79068), + NetworkFirewall: __nccwpck_require__(84626), + MWAA: __nccwpck_require__(32712), + AmplifyBackend: __nccwpck_require__(2806), + AppIntegrations: __nccwpck_require__(85479), + ConnectContactLens: __nccwpck_require__(41847), + DevOpsGuru: __nccwpck_require__(90673), + ECRPUBLIC: __nccwpck_require__(90244), + LookoutVision: __nccwpck_require__(65046), + SageMakerFeatureStoreRuntime: __nccwpck_require__(67644), + CustomerProfiles: __nccwpck_require__(28379), + AuditManager: __nccwpck_require__(20472), + EMRcontainers: __nccwpck_require__(49984), + HealthLake: __nccwpck_require__(64254), + SagemakerEdge: __nccwpck_require__(38966), + Amp: __nccwpck_require__(96881), + GreengrassV2: __nccwpck_require__(45126), + IotDeviceAdvisor: __nccwpck_require__(97569), + IoTFleetHub: __nccwpck_require__(42513), + IoTWireless: __nccwpck_require__(8226), + Location: __nccwpck_require__(44594), + WellArchitected: __nccwpck_require__(86263) +}; + +/***/ }), + +/***/ 96881: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['amp'] = {}; +AWS.Amp = Service.defineService('amp', ['2020-08-01']); +Object.defineProperty(apiLoader.services['amp'], '2020-08-01', { + get: function get() { + var model = __nccwpck_require__(78362); + model.paginators = (__nccwpck_require__(75928)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.Amp; + + +/***/ }), + +/***/ 38090: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['amplify'] = {}; +AWS.Amplify = Service.defineService('amplify', ['2017-07-25']); +Object.defineProperty(apiLoader.services['amplify'], '2017-07-25', { + get: function get() { + var model = __nccwpck_require__(36813); + model.paginators = (__nccwpck_require__(53733)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.Amplify; + + +/***/ }), + +/***/ 2806: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['amplifybackend'] = {}; +AWS.AmplifyBackend = Service.defineService('amplifybackend', ['2020-08-11']); +Object.defineProperty(apiLoader.services['amplifybackend'], '2020-08-11', { + get: function get() { + var model = __nccwpck_require__(23939); + model.paginators = (__nccwpck_require__(27232)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.AmplifyBackend; + + +/***/ }), + +/***/ 91759: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['apigateway'] = {}; +AWS.APIGateway = Service.defineService('apigateway', ['2015-07-09']); +__nccwpck_require__(4338); +Object.defineProperty(apiLoader.services['apigateway'], '2015-07-09', { + get: function get() { + var model = __nccwpck_require__(59463); + model.paginators = (__nccwpck_require__(25878)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.APIGateway; + + +/***/ }), + +/***/ 31762: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['apigatewaymanagementapi'] = {}; +AWS.ApiGatewayManagementApi = Service.defineService('apigatewaymanagementapi', ['2018-11-29']); +Object.defineProperty(apiLoader.services['apigatewaymanagementapi'], '2018-11-29', { + get: function get() { + var model = __nccwpck_require__(57832); + model.paginators = (__nccwpck_require__(2787)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.ApiGatewayManagementApi; + + +/***/ }), + +/***/ 44987: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['apigatewayv2'] = {}; +AWS.ApiGatewayV2 = Service.defineService('apigatewayv2', ['2018-11-29']); +Object.defineProperty(apiLoader.services['apigatewayv2'], '2018-11-29', { + get: function get() { + var model = __nccwpck_require__(59326); + model.paginators = (__nccwpck_require__(90171)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.ApiGatewayV2; + + +/***/ }), + +/***/ 78606: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['appconfig'] = {}; +AWS.AppConfig = Service.defineService('appconfig', ['2019-10-09']); +Object.defineProperty(apiLoader.services['appconfig'], '2019-10-09', { + get: function get() { + var model = __nccwpck_require__(44701); + model.paginators = (__nccwpck_require__(41789)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.AppConfig; + + +/***/ }), + +/***/ 60844: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['appflow'] = {}; +AWS.Appflow = Service.defineService('appflow', ['2020-08-23']); +Object.defineProperty(apiLoader.services['appflow'], '2020-08-23', { + get: function get() { + var model = __nccwpck_require__(32840); + model.paginators = (__nccwpck_require__(16916)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.Appflow; + + +/***/ }), + +/***/ 85479: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['appintegrations'] = {}; +AWS.AppIntegrations = Service.defineService('appintegrations', ['2020-07-29']); +Object.defineProperty(apiLoader.services['appintegrations'], '2020-07-29', { + get: function get() { + var model = __nccwpck_require__(62033); + model.paginators = (__nccwpck_require__(61866)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.AppIntegrations; + + +/***/ }), + +/***/ 25598: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['applicationautoscaling'] = {}; +AWS.ApplicationAutoScaling = Service.defineService('applicationautoscaling', ['2016-02-06']); +Object.defineProperty(apiLoader.services['applicationautoscaling'], '2016-02-06', { + get: function get() { + var model = __nccwpck_require__(47320); + model.paginators = (__nccwpck_require__(40322)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.ApplicationAutoScaling; + + +/***/ }), + +/***/ 83972: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['applicationinsights'] = {}; +AWS.ApplicationInsights = Service.defineService('applicationinsights', ['2018-11-25']); +Object.defineProperty(apiLoader.services['applicationinsights'], '2018-11-25', { + get: function get() { + var model = __nccwpck_require__(96143); + model.paginators = (__nccwpck_require__(22242)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.ApplicationInsights; + + +/***/ }), + +/***/ 69226: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['appmesh'] = {}; +AWS.AppMesh = Service.defineService('appmesh', ['2018-10-01', '2018-10-01*', '2019-01-25']); +Object.defineProperty(apiLoader.services['appmesh'], '2018-10-01', { + get: function get() { + var model = __nccwpck_require__(64780); + model.paginators = (__nccwpck_require__(54936)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); +Object.defineProperty(apiLoader.services['appmesh'], '2019-01-25', { + get: function get() { + var model = __nccwpck_require__(78066); + model.paginators = (__nccwpck_require__(37698)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.AppMesh; + + +/***/ }), + +/***/ 21730: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['appstream'] = {}; +AWS.AppStream = Service.defineService('appstream', ['2016-12-01']); +Object.defineProperty(apiLoader.services['appstream'], '2016-12-01', { + get: function get() { + var model = __nccwpck_require__(85538); + model.paginators = (__nccwpck_require__(32191)/* .pagination */ .o); + model.waiters = (__nccwpck_require__(21134)/* .waiters */ .V); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.AppStream; + + +/***/ }), + +/***/ 12402: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['appsync'] = {}; +AWS.AppSync = Service.defineService('appsync', ['2017-07-25']); +Object.defineProperty(apiLoader.services['appsync'], '2017-07-25', { + get: function get() { + var model = __nccwpck_require__(94937); + model.paginators = (__nccwpck_require__(50233)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.AppSync; + + +/***/ }), + +/***/ 29434: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['athena'] = {}; +AWS.Athena = Service.defineService('athena', ['2017-05-18']); +Object.defineProperty(apiLoader.services['athena'], '2017-05-18', { + get: function get() { + var model = __nccwpck_require__(28680); + model.paginators = (__nccwpck_require__(44417)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.Athena; + + +/***/ }), + +/***/ 20472: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['auditmanager'] = {}; +AWS.AuditManager = Service.defineService('auditmanager', ['2017-07-25']); +Object.defineProperty(apiLoader.services['auditmanager'], '2017-07-25', { + get: function get() { + var model = __nccwpck_require__(41672); + model.paginators = (__nccwpck_require__(41321)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.AuditManager; + + +/***/ }), + +/***/ 33960: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['augmentedairuntime'] = {}; +AWS.AugmentedAIRuntime = Service.defineService('augmentedairuntime', ['2019-11-07']); +Object.defineProperty(apiLoader.services['augmentedairuntime'], '2019-11-07', { + get: function get() { + var model = __nccwpck_require__(57704); + model.paginators = (__nccwpck_require__(13201)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.AugmentedAIRuntime; + + +/***/ }), + +/***/ 31652: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['autoscaling'] = {}; +AWS.AutoScaling = Service.defineService('autoscaling', ['2011-01-01']); +Object.defineProperty(apiLoader.services['autoscaling'], '2011-01-01', { + get: function get() { + var model = __nccwpck_require__(55394); + model.paginators = (__nccwpck_require__(81436)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.AutoScaling; + + +/***/ }), + +/***/ 2554: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['autoscalingplans'] = {}; +AWS.AutoScalingPlans = Service.defineService('autoscalingplans', ['2018-01-06']); +Object.defineProperty(apiLoader.services['autoscalingplans'], '2018-01-06', { + get: function get() { + var model = __nccwpck_require__(53216); + model.paginators = (__nccwpck_require__(64985)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.AutoScalingPlans; + + +/***/ }), + +/***/ 82455: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['backup'] = {}; +AWS.Backup = Service.defineService('backup', ['2018-11-15']); +Object.defineProperty(apiLoader.services['backup'], '2018-11-15', { + get: function get() { + var model = __nccwpck_require__(77990); + model.paginators = (__nccwpck_require__(54869)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.Backup; + + +/***/ }), + +/***/ 10000: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['batch'] = {}; +AWS.Batch = Service.defineService('batch', ['2016-08-10']); +Object.defineProperty(apiLoader.services['batch'], '2016-08-10', { + get: function get() { + var model = __nccwpck_require__(12617); + model.paginators = (__nccwpck_require__(36988)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.Batch; + + +/***/ }), + +/***/ 35429: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['braket'] = {}; +AWS.Braket = Service.defineService('braket', ['2019-09-01']); +Object.defineProperty(apiLoader.services['braket'], '2019-09-01', { + get: function get() { + var model = __nccwpck_require__(23332); + model.paginators = (__nccwpck_require__(15732)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.Braket; + + +/***/ }), + +/***/ 43923: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['budgets'] = {}; +AWS.Budgets = Service.defineService('budgets', ['2016-10-20']); +Object.defineProperty(apiLoader.services['budgets'], '2016-10-20', { + get: function get() { + var model = __nccwpck_require__(11978); + model.paginators = (__nccwpck_require__(23694)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.Budgets; + + +/***/ }), + +/***/ 84646: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['chime'] = {}; +AWS.Chime = Service.defineService('chime', ['2018-05-01']); +Object.defineProperty(apiLoader.services['chime'], '2018-05-01', { + get: function get() { + var model = __nccwpck_require__(44811); + model.paginators = (__nccwpck_require__(31890)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.Chime; + + +/***/ }), + +/***/ 85473: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['cloud9'] = {}; +AWS.Cloud9 = Service.defineService('cloud9', ['2017-09-23']); +Object.defineProperty(apiLoader.services['cloud9'], '2017-09-23', { + get: function get() { + var model = __nccwpck_require__(82981); + model.paginators = (__nccwpck_require__(9313)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.Cloud9; + + +/***/ }), + +/***/ 56231: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['clouddirectory'] = {}; +AWS.CloudDirectory = Service.defineService('clouddirectory', ['2016-05-10', '2016-05-10*', '2017-01-11']); +Object.defineProperty(apiLoader.services['clouddirectory'], '2016-05-10', { + get: function get() { + var model = __nccwpck_require__(72862); + model.paginators = (__nccwpck_require__(87597)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); +Object.defineProperty(apiLoader.services['clouddirectory'], '2017-01-11', { + get: function get() { + var model = __nccwpck_require__(88729); + model.paginators = (__nccwpck_require__(10156)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.CloudDirectory; + + +/***/ }), + +/***/ 74643: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['cloudformation'] = {}; +AWS.CloudFormation = Service.defineService('cloudformation', ['2010-05-15']); +Object.defineProperty(apiLoader.services['cloudformation'], '2010-05-15', { + get: function get() { + var model = __nccwpck_require__(31930); + model.paginators = (__nccwpck_require__(10611)/* .pagination */ .o); + model.waiters = (__nccwpck_require__(53732)/* .waiters */ .V); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.CloudFormation; + + +/***/ }), + +/***/ 48058: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['cloudfront'] = {}; +AWS.CloudFront = Service.defineService('cloudfront', ['2013-05-12*', '2013-11-11*', '2014-05-31*', '2014-10-21*', '2014-11-06*', '2015-04-17*', '2015-07-27*', '2015-09-17*', '2016-01-13*', '2016-01-28*', '2016-08-01*', '2016-08-20*', '2016-09-07*', '2016-09-29*', '2016-11-25', '2016-11-25*', '2017-03-25', '2017-03-25*', '2017-10-30', '2017-10-30*', '2018-06-18', '2018-06-18*', '2018-11-05', '2018-11-05*', '2019-03-26', '2019-03-26*', '2020-05-31']); +__nccwpck_require__(95483); +Object.defineProperty(apiLoader.services['cloudfront'], '2016-11-25', { + get: function get() { + var model = __nccwpck_require__(64908); + model.paginators = (__nccwpck_require__(57305)/* .pagination */ .o); + model.waiters = (__nccwpck_require__(71106)/* .waiters */ .V); + return model; + }, + enumerable: true, + configurable: true +}); +Object.defineProperty(apiLoader.services['cloudfront'], '2017-03-25', { + get: function get() { + var model = __nccwpck_require__(76944); + model.paginators = (__nccwpck_require__(83654)/* .pagination */ .o); + model.waiters = (__nccwpck_require__(83406)/* .waiters */ .V); + return model; + }, + enumerable: true, + configurable: true +}); +Object.defineProperty(apiLoader.services['cloudfront'], '2017-10-30', { + get: function get() { + var model = __nccwpck_require__(80198); + model.paginators = (__nccwpck_require__(52915)/* .pagination */ .o); + model.waiters = (__nccwpck_require__(13399)/* .waiters */ .V); + return model; + }, + enumerable: true, + configurable: true +}); +Object.defineProperty(apiLoader.services['cloudfront'], '2018-06-18', { + get: function get() { + var model = __nccwpck_require__(29549); + model.paginators = (__nccwpck_require__(7805)/* .pagination */ .o); + model.waiters = (__nccwpck_require__(2353)/* .waiters */ .V); + return model; + }, + enumerable: true, + configurable: true +}); +Object.defineProperty(apiLoader.services['cloudfront'], '2018-11-05', { + get: function get() { + var model = __nccwpck_require__(22253); + model.paginators = (__nccwpck_require__(29533)/* .pagination */ .o); + model.waiters = (__nccwpck_require__(36883)/* .waiters */ .V); + return model; + }, + enumerable: true, + configurable: true +}); +Object.defineProperty(apiLoader.services['cloudfront'], '2019-03-26', { + get: function get() { + var model = __nccwpck_require__(29574); + model.paginators = (__nccwpck_require__(35556)/* .pagination */ .o); + model.waiters = (__nccwpck_require__(97142)/* .waiters */ .V); + return model; + }, + enumerable: true, + configurable: true +}); +Object.defineProperty(apiLoader.services['cloudfront'], '2020-05-31', { + get: function get() { + var model = __nccwpck_require__(66310); + model.paginators = (__nccwpck_require__(48335)/* .pagination */ .o); + model.waiters = (__nccwpck_require__(83517)/* .waiters */ .V); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.CloudFront; + + +/***/ }), + +/***/ 59976: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['cloudhsm'] = {}; +AWS.CloudHSM = Service.defineService('cloudhsm', ['2014-05-30']); +Object.defineProperty(apiLoader.services['cloudhsm'], '2014-05-30', { + get: function get() { + var model = __nccwpck_require__(18637); + model.paginators = (__nccwpck_require__(18988)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.CloudHSM; + + +/***/ }), + +/***/ 70889: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['cloudhsmv2'] = {}; +AWS.CloudHSMV2 = Service.defineService('cloudhsmv2', ['2017-04-28']); +Object.defineProperty(apiLoader.services['cloudhsmv2'], '2017-04-28', { + get: function get() { + var model = __nccwpck_require__(90554); + model.paginators = (__nccwpck_require__(77334)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.CloudHSMV2; + + +/***/ }), + +/***/ 72321: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['cloudsearch'] = {}; +AWS.CloudSearch = Service.defineService('cloudsearch', ['2011-02-01', '2013-01-01']); +Object.defineProperty(apiLoader.services['cloudsearch'], '2011-02-01', { + get: function get() { + var model = __nccwpck_require__(11732); + model.paginators = (__nccwpck_require__(51357)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); +Object.defineProperty(apiLoader.services['cloudsearch'], '2013-01-01', { + get: function get() { + var model = __nccwpck_require__(56880); + model.paginators = (__nccwpck_require__(81127)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.CloudSearch; + + +/***/ }), + +/***/ 64072: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['cloudsearchdomain'] = {}; +AWS.CloudSearchDomain = Service.defineService('cloudsearchdomain', ['2013-01-01']); +__nccwpck_require__(48571); +Object.defineProperty(apiLoader.services['cloudsearchdomain'], '2013-01-01', { + get: function get() { + var model = __nccwpck_require__(78255); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.CloudSearchDomain; + + +/***/ }), + +/***/ 65512: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['cloudtrail'] = {}; +AWS.CloudTrail = Service.defineService('cloudtrail', ['2013-11-01']); +Object.defineProperty(apiLoader.services['cloudtrail'], '2013-11-01', { + get: function get() { + var model = __nccwpck_require__(11506); + model.paginators = (__nccwpck_require__(27523)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.CloudTrail; + + +/***/ }), + +/***/ 6763: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['cloudwatch'] = {}; +AWS.CloudWatch = Service.defineService('cloudwatch', ['2010-08-01']); +Object.defineProperty(apiLoader.services['cloudwatch'], '2010-08-01', { + get: function get() { + var model = __nccwpck_require__(16363); + model.paginators = (__nccwpck_require__(46675)/* .pagination */ .o); + model.waiters = (__nccwpck_require__(21466)/* .waiters */ .V); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.CloudWatch; + + +/***/ }), + +/***/ 38124: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['cloudwatchevents'] = {}; +AWS.CloudWatchEvents = Service.defineService('cloudwatchevents', ['2014-02-03*', '2015-10-07']); +Object.defineProperty(apiLoader.services['cloudwatchevents'], '2015-10-07', { + get: function get() { + var model = __nccwpck_require__(40299); + model.paginators = (__nccwpck_require__(54031)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.CloudWatchEvents; + + +/***/ }), + +/***/ 96693: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['cloudwatchlogs'] = {}; +AWS.CloudWatchLogs = Service.defineService('cloudwatchlogs', ['2014-03-28']); +Object.defineProperty(apiLoader.services['cloudwatchlogs'], '2014-03-28', { + get: function get() { + var model = __nccwpck_require__(73044); + model.paginators = (__nccwpck_require__(15472)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.CloudWatchLogs; + + +/***/ }), + +/***/ 91983: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['codeartifact'] = {}; +AWS.CodeArtifact = Service.defineService('codeartifact', ['2018-09-22']); +Object.defineProperty(apiLoader.services['codeartifact'], '2018-09-22', { + get: function get() { + var model = __nccwpck_require__(87923); + model.paginators = (__nccwpck_require__(40983)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.CodeArtifact; + + +/***/ }), + +/***/ 60450: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['codebuild'] = {}; +AWS.CodeBuild = Service.defineService('codebuild', ['2016-10-06']); +Object.defineProperty(apiLoader.services['codebuild'], '2016-10-06', { + get: function get() { + var model = __nccwpck_require__(40893); + model.paginators = (__nccwpck_require__(23010)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.CodeBuild; + + +/***/ }), + +/***/ 71323: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['codecommit'] = {}; +AWS.CodeCommit = Service.defineService('codecommit', ['2015-04-13']); +Object.defineProperty(apiLoader.services['codecommit'], '2015-04-13', { + get: function get() { + var model = __nccwpck_require__(57144); + model.paginators = (__nccwpck_require__(62599)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.CodeCommit; + + +/***/ }), + +/***/ 54599: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['codedeploy'] = {}; +AWS.CodeDeploy = Service.defineService('codedeploy', ['2014-10-06']); +Object.defineProperty(apiLoader.services['codedeploy'], '2014-10-06', { + get: function get() { + var model = __nccwpck_require__(10967); + model.paginators = (__nccwpck_require__(1917)/* .pagination */ .o); + model.waiters = (__nccwpck_require__(52416)/* .waiters */ .V); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.CodeDeploy; + + +/***/ }), + +/***/ 65704: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['codeguruprofiler'] = {}; +AWS.CodeGuruProfiler = Service.defineService('codeguruprofiler', ['2019-07-18']); +Object.defineProperty(apiLoader.services['codeguruprofiler'], '2019-07-18', { + get: function get() { + var model = __nccwpck_require__(34890); + model.paginators = (__nccwpck_require__(25274)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.CodeGuruProfiler; + + +/***/ }), + +/***/ 60070: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['codegurureviewer'] = {}; +AWS.CodeGuruReviewer = Service.defineService('codegurureviewer', ['2019-09-19']); +Object.defineProperty(apiLoader.services['codegurureviewer'], '2019-09-19', { + get: function get() { + var model = __nccwpck_require__(66739); + model.paginators = (__nccwpck_require__(37775)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.CodeGuruReviewer; + + +/***/ }), + +/***/ 22938: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['codepipeline'] = {}; +AWS.CodePipeline = Service.defineService('codepipeline', ['2015-07-09']); +Object.defineProperty(apiLoader.services['codepipeline'], '2015-07-09', { + get: function get() { + var model = __nccwpck_require__(4039); + model.paginators = (__nccwpck_require__(78953)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.CodePipeline; + + +/***/ }), + +/***/ 98336: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['codestar'] = {}; +AWS.CodeStar = Service.defineService('codestar', ['2017-04-19']); +Object.defineProperty(apiLoader.services['codestar'], '2017-04-19', { + get: function get() { + var model = __nccwpck_require__(12425); + model.paginators = (__nccwpck_require__(70046)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.CodeStar; + + +/***/ }), + +/***/ 78270: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['codestarconnections'] = {}; +AWS.CodeStarconnections = Service.defineService('codestarconnections', ['2019-12-01']); +Object.defineProperty(apiLoader.services['codestarconnections'], '2019-12-01', { + get: function get() { + var model = __nccwpck_require__(88428); + model.paginators = (__nccwpck_require__(31506)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.CodeStarconnections; - canonicalizedAmzHeaders: function canonicalizedAmzHeaders() { - var amzHeaders = []; - AWS.util.each(this.request.headers, function (name) { - if (name.match(/^x-amz-/i)) amzHeaders.push(name); - }); +/***/ }), + +/***/ 15141: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['codestarnotifications'] = {}; +AWS.CodeStarNotifications = Service.defineService('codestarnotifications', ['2019-10-15']); +Object.defineProperty(apiLoader.services['codestarnotifications'], '2019-10-15', { + get: function get() { + var model = __nccwpck_require__(33362); + model.paginators = (__nccwpck_require__(44301)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.CodeStarNotifications; + + +/***/ }), + +/***/ 58291: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['cognitoidentity'] = {}; +AWS.CognitoIdentity = Service.defineService('cognitoidentity', ['2014-06-30']); +Object.defineProperty(apiLoader.services['cognitoidentity'], '2014-06-30', { + get: function get() { + var model = __nccwpck_require__(57377); + model.paginators = (__nccwpck_require__(85010)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.CognitoIdentity; - amzHeaders.sort(function (a, b) { - return a.toLowerCase() < b.toLowerCase() ? -1 : 1; - }); - var parts = []; - AWS.util.arrayEach.call(this, amzHeaders, function (name) { - parts.push( - name.toLowerCase() + ":" + String(this.request.headers[name]) - ); - }); +/***/ }), + +/***/ 31379: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['cognitoidentityserviceprovider'] = {}; +AWS.CognitoIdentityServiceProvider = Service.defineService('cognitoidentityserviceprovider', ['2016-04-18']); +Object.defineProperty(apiLoader.services['cognitoidentityserviceprovider'], '2016-04-18', { + get: function get() { + var model = __nccwpck_require__(53166); + model.paginators = (__nccwpck_require__(17149)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.CognitoIdentityServiceProvider; + + +/***/ }), + +/***/ 74770: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['cognitosync'] = {}; +AWS.CognitoSync = Service.defineService('cognitosync', ['2014-06-30']); +Object.defineProperty(apiLoader.services['cognitosync'], '2014-06-30', { + get: function get() { + var model = __nccwpck_require__(29128); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.CognitoSync; + + +/***/ }), + +/***/ 62878: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['comprehend'] = {}; +AWS.Comprehend = Service.defineService('comprehend', ['2017-11-27']); +Object.defineProperty(apiLoader.services['comprehend'], '2017-11-27', { + get: function get() { + var model = __nccwpck_require__(24433); + model.paginators = (__nccwpck_require__(82518)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.Comprehend; - return parts.join("\n"); - }, - canonicalizedResource: function canonicalizedResource() { - var r = this.request; +/***/ }), + +/***/ 32349: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['comprehendmedical'] = {}; +AWS.ComprehendMedical = Service.defineService('comprehendmedical', ['2018-10-30']); +Object.defineProperty(apiLoader.services['comprehendmedical'], '2018-10-30', { + get: function get() { + var model = __nccwpck_require__(96649); + model.paginators = (__nccwpck_require__(43172)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.ComprehendMedical; + + +/***/ }), + +/***/ 64459: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['computeoptimizer'] = {}; +AWS.ComputeOptimizer = Service.defineService('computeoptimizer', ['2019-11-01']); +Object.defineProperty(apiLoader.services['computeoptimizer'], '2019-11-01', { + get: function get() { + var model = __nccwpck_require__(85802); + model.paginators = (__nccwpck_require__(6831)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.ComputeOptimizer; - var parts = r.path.split("?"); - var path = parts[0]; - var querystring = parts[1]; - var resource = ""; +/***/ }), + +/***/ 34061: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['configservice'] = {}; +AWS.ConfigService = Service.defineService('configservice', ['2014-11-12']); +Object.defineProperty(apiLoader.services['configservice'], '2014-11-12', { + get: function get() { + var model = __nccwpck_require__(47124); + model.paginators = (__nccwpck_require__(85980)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.ConfigService; + + +/***/ }), + +/***/ 13879: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['connect'] = {}; +AWS.Connect = Service.defineService('connect', ['2017-08-08']); +Object.defineProperty(apiLoader.services['connect'], '2017-08-08', { + get: function get() { + var model = __nccwpck_require__(54511); + model.paginators = (__nccwpck_require__(19742)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.Connect; + + +/***/ }), + +/***/ 41847: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['connectcontactlens'] = {}; +AWS.ConnectContactLens = Service.defineService('connectcontactlens', ['2020-08-21']); +Object.defineProperty(apiLoader.services['connectcontactlens'], '2020-08-21', { + get: function get() { + var model = __nccwpck_require__(16527); + model.paginators = (__nccwpck_require__(76658)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.ConnectContactLens; + + +/***/ }), + +/***/ 94198: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['connectparticipant'] = {}; +AWS.ConnectParticipant = Service.defineService('connectparticipant', ['2018-09-07']); +Object.defineProperty(apiLoader.services['connectparticipant'], '2018-09-07', { + get: function get() { + var model = __nccwpck_require__(70132); + model.paginators = (__nccwpck_require__(29947)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.ConnectParticipant; + + +/***/ }), + +/***/ 79523: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['costexplorer'] = {}; +AWS.CostExplorer = Service.defineService('costexplorer', ['2017-10-25']); +Object.defineProperty(apiLoader.services['costexplorer'], '2017-10-25', { + get: function get() { + var model = __nccwpck_require__(4060); + model.paginators = (__nccwpck_require__(75642)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.CostExplorer; + + +/***/ }), + +/***/ 5026: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['cur'] = {}; +AWS.CUR = Service.defineService('cur', ['2017-01-06']); +Object.defineProperty(apiLoader.services['cur'], '2017-01-06', { + get: function get() { + var model = __nccwpck_require__(46858); + model.paginators = (__nccwpck_require__(40528)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.CUR; + + +/***/ }), + +/***/ 28379: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['customerprofiles'] = {}; +AWS.CustomerProfiles = Service.defineService('customerprofiles', ['2020-08-15']); +Object.defineProperty(apiLoader.services['customerprofiles'], '2020-08-15', { + get: function get() { + var model = __nccwpck_require__(56793); + model.paginators = (__nccwpck_require__(53892)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.CustomerProfiles; + + +/***/ }), + +/***/ 35846: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['databrew'] = {}; +AWS.DataBrew = Service.defineService('databrew', ['2017-07-25']); +Object.defineProperty(apiLoader.services['databrew'], '2017-07-25', { + get: function get() { + var model = __nccwpck_require__(96089); + model.paginators = (__nccwpck_require__(92224)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.DataBrew; + + +/***/ }), + +/***/ 11024: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['dataexchange'] = {}; +AWS.DataExchange = Service.defineService('dataexchange', ['2017-07-25']); +Object.defineProperty(apiLoader.services['dataexchange'], '2017-07-25', { + get: function get() { + var model = __nccwpck_require__(42346); + model.paginators = (__nccwpck_require__(55607)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.DataExchange; + + +/***/ }), + +/***/ 65688: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['datapipeline'] = {}; +AWS.DataPipeline = Service.defineService('datapipeline', ['2012-10-29']); +Object.defineProperty(apiLoader.services['datapipeline'], '2012-10-29', { + get: function get() { + var model = __nccwpck_require__(79908); + model.paginators = (__nccwpck_require__(89659)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.DataPipeline; + + +/***/ }), + +/***/ 25308: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['datasync'] = {}; +AWS.DataSync = Service.defineService('datasync', ['2018-11-09']); +Object.defineProperty(apiLoader.services['datasync'], '2018-11-09', { + get: function get() { + var model = __nccwpck_require__(93640); + model.paginators = (__nccwpck_require__(80063)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.DataSync; + + +/***/ }), + +/***/ 71398: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['dax'] = {}; +AWS.DAX = Service.defineService('dax', ['2017-04-19']); +Object.defineProperty(apiLoader.services['dax'], '2017-04-19', { + get: function get() { + var model = __nccwpck_require__(24709); + model.paginators = (__nccwpck_require__(87564)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.DAX; + + +/***/ }), + +/***/ 60674: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['detective'] = {}; +AWS.Detective = Service.defineService('detective', ['2018-10-26']); +Object.defineProperty(apiLoader.services['detective'], '2018-10-26', { + get: function get() { + var model = __nccwpck_require__(25236); + model.paginators = (__nccwpck_require__(46384)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.Detective; + + +/***/ }), + +/***/ 26272: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['devicefarm'] = {}; +AWS.DeviceFarm = Service.defineService('devicefarm', ['2015-06-23']); +Object.defineProperty(apiLoader.services['devicefarm'], '2015-06-23', { + get: function get() { + var model = __nccwpck_require__(34023); + model.paginators = (__nccwpck_require__(37161)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.DeviceFarm; + + +/***/ }), + +/***/ 90673: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['devopsguru'] = {}; +AWS.DevOpsGuru = Service.defineService('devopsguru', ['2020-12-01']); +Object.defineProperty(apiLoader.services['devopsguru'], '2020-12-01', { + get: function get() { + var model = __nccwpck_require__(36592); + model.paginators = (__nccwpck_require__(95551)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.DevOpsGuru; + + +/***/ }), + +/***/ 73783: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['directconnect'] = {}; +AWS.DirectConnect = Service.defineService('directconnect', ['2012-10-25']); +Object.defineProperty(apiLoader.services['directconnect'], '2012-10-25', { + get: function get() { + var model = __nccwpck_require__(45125); + model.paginators = (__nccwpck_require__(26404)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.DirectConnect; + + +/***/ }), + +/***/ 83908: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['directoryservice'] = {}; +AWS.DirectoryService = Service.defineService('directoryservice', ['2015-04-16']); +Object.defineProperty(apiLoader.services['directoryservice'], '2015-04-16', { + get: function get() { + var model = __nccwpck_require__(47357); + model.paginators = (__nccwpck_require__(93412)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.DirectoryService; + + +/***/ }), + +/***/ 81690: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['discovery'] = {}; +AWS.Discovery = Service.defineService('discovery', ['2015-11-01']); +Object.defineProperty(apiLoader.services['discovery'], '2015-11-01', { + get: function get() { + var model = __nccwpck_require__(68951); + model.paginators = (__nccwpck_require__(19822)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.Discovery; + + +/***/ }), + +/***/ 24958: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['dlm'] = {}; +AWS.DLM = Service.defineService('dlm', ['2018-01-12']); +Object.defineProperty(apiLoader.services['dlm'], '2018-01-12', { + get: function get() { + var model = __nccwpck_require__(75485); + model.paginators = (__nccwpck_require__(98881)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.DLM; + + +/***/ }), + +/***/ 69868: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['dms'] = {}; +AWS.DMS = Service.defineService('dms', ['2016-01-01']); +Object.defineProperty(apiLoader.services['dms'], '2016-01-01', { + get: function get() { + var model = __nccwpck_require__(77953); + model.paginators = (__nccwpck_require__(36772)/* .pagination */ .o); + model.waiters = (__nccwpck_require__(3500)/* .waiters */ .V); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.DMS; + + +/***/ }), + +/***/ 55129: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['docdb'] = {}; +AWS.DocDB = Service.defineService('docdb', ['2014-10-31']); +Object.defineProperty(apiLoader.services['docdb'], '2014-10-31', { + get: function get() { + var model = __nccwpck_require__(4932); + model.paginators = (__nccwpck_require__(41408)/* .pagination */ .o); + model.waiters = (__nccwpck_require__(36607)/* .waiters */ .V); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.DocDB; + + +/***/ }), + +/***/ 14347: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['dynamodb'] = {}; +AWS.DynamoDB = Service.defineService('dynamodb', ['2011-12-05', '2012-08-10']); +__nccwpck_require__(17101); +Object.defineProperty(apiLoader.services['dynamodb'], '2011-12-05', { + get: function get() { + var model = __nccwpck_require__(46148); + model.paginators = (__nccwpck_require__(86884)/* .pagination */ .o); + model.waiters = (__nccwpck_require__(24864)/* .waiters */ .V); + return model; + }, + enumerable: true, + configurable: true +}); +Object.defineProperty(apiLoader.services['dynamodb'], '2012-08-10', { + get: function get() { + var model = __nccwpck_require__(54047); + model.paginators = (__nccwpck_require__(30482)/* .pagination */ .o); + model.waiters = (__nccwpck_require__(48411)/* .waiters */ .V); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.DynamoDB; + + +/***/ }), + +/***/ 88090: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['dynamodbstreams'] = {}; +AWS.DynamoDBStreams = Service.defineService('dynamodbstreams', ['2012-08-10']); +Object.defineProperty(apiLoader.services['dynamodbstreams'], '2012-08-10', { + get: function get() { + var model = __nccwpck_require__(26098); + model.paginators = (__nccwpck_require__(40549)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.DynamoDBStreams; + + +/***/ }), + +/***/ 62837: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['ebs'] = {}; +AWS.EBS = Service.defineService('ebs', ['2019-11-02']); +Object.defineProperty(apiLoader.services['ebs'], '2019-11-02', { + get: function get() { + var model = __nccwpck_require__(72220); + model.paginators = (__nccwpck_require__(85366)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.EBS; + + +/***/ }), + +/***/ 7778: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['ec2'] = {}; +AWS.EC2 = Service.defineService('ec2', ['2013-06-15*', '2013-10-15*', '2014-02-01*', '2014-05-01*', '2014-06-15*', '2014-09-01*', '2014-10-01*', '2015-03-01*', '2015-04-15*', '2015-10-01*', '2016-04-01*', '2016-09-15*', '2016-11-15']); +__nccwpck_require__(92501); +Object.defineProperty(apiLoader.services['ec2'], '2016-11-15', { + get: function get() { + var model = __nccwpck_require__(2658); + model.paginators = (__nccwpck_require__(82477)/* .pagination */ .o); + model.waiters = (__nccwpck_require__(19153)/* .waiters */ .V); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.EC2; + + +/***/ }), + +/***/ 92209: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['ec2instanceconnect'] = {}; +AWS.EC2InstanceConnect = Service.defineService('ec2instanceconnect', ['2018-04-02']); +Object.defineProperty(apiLoader.services['ec2instanceconnect'], '2018-04-02', { + get: function get() { + var model = __nccwpck_require__(36007); + model.paginators = (__nccwpck_require__(38333)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.EC2InstanceConnect; + + +/***/ }), + +/***/ 15211: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['ecr'] = {}; +AWS.ECR = Service.defineService('ecr', ['2015-09-21']); +Object.defineProperty(apiLoader.services['ecr'], '2015-09-21', { + get: function get() { + var model = __nccwpck_require__(92405); + model.paginators = (__nccwpck_require__(25504)/* .pagination */ .o); + model.waiters = (__nccwpck_require__(78925)/* .waiters */ .V); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.ECR; + + +/***/ }), + +/***/ 90244: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['ecrpublic'] = {}; +AWS.ECRPUBLIC = Service.defineService('ecrpublic', ['2020-10-30']); +Object.defineProperty(apiLoader.services['ecrpublic'], '2020-10-30', { + get: function get() { + var model = __nccwpck_require__(9668); + model.paginators = (__nccwpck_require__(81193)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.ECRPUBLIC; + + +/***/ }), + +/***/ 16615: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['ecs'] = {}; +AWS.ECS = Service.defineService('ecs', ['2014-11-13']); +Object.defineProperty(apiLoader.services['ecs'], '2014-11-13', { + get: function get() { + var model = __nccwpck_require__(44208); + model.paginators = (__nccwpck_require__(15738)/* .pagination */ .o); + model.waiters = (__nccwpck_require__(1299)/* .waiters */ .V); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.ECS; + + +/***/ }), + +/***/ 34375: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['efs'] = {}; +AWS.EFS = Service.defineService('efs', ['2015-02-01']); +Object.defineProperty(apiLoader.services['efs'], '2015-02-01', { + get: function get() { + var model = __nccwpck_require__(54784); + model.paginators = (__nccwpck_require__(40174)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.EFS; + + +/***/ }), + +/***/ 23337: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['eks'] = {}; +AWS.EKS = Service.defineService('eks', ['2017-11-01']); +Object.defineProperty(apiLoader.services['eks'], '2017-11-01', { + get: function get() { + var model = __nccwpck_require__(51370); + model.paginators = (__nccwpck_require__(36490)/* .pagination */ .o); + model.waiters = (__nccwpck_require__(88058)/* .waiters */ .V); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.EKS; + + +/***/ }), + +/***/ 81065: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['elasticache'] = {}; +AWS.ElastiCache = Service.defineService('elasticache', ['2012-11-15*', '2014-03-24*', '2014-07-15*', '2014-09-30*', '2015-02-02']); +Object.defineProperty(apiLoader.services['elasticache'], '2015-02-02', { + get: function get() { + var model = __nccwpck_require__(58426); + model.paginators = (__nccwpck_require__(79559)/* .pagination */ .o); + model.waiters = (__nccwpck_require__(29787)/* .waiters */ .V); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.ElastiCache; + + +/***/ }), + +/***/ 14897: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['elasticbeanstalk'] = {}; +AWS.ElasticBeanstalk = Service.defineService('elasticbeanstalk', ['2010-12-01']); +Object.defineProperty(apiLoader.services['elasticbeanstalk'], '2010-12-01', { + get: function get() { + var model = __nccwpck_require__(72508); + model.paginators = (__nccwpck_require__(72305)/* .pagination */ .o); + model.waiters = (__nccwpck_require__(62534)/* .waiters */ .V); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.ElasticBeanstalk; + + +/***/ }), + +/***/ 37708: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['elasticinference'] = {}; +AWS.ElasticInference = Service.defineService('elasticinference', ['2017-07-25']); +Object.defineProperty(apiLoader.services['elasticinference'], '2017-07-25', { + get: function get() { + var model = __nccwpck_require__(83967); + model.paginators = (__nccwpck_require__(64906)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.ElasticInference; + + +/***/ }), + +/***/ 40745: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['elastictranscoder'] = {}; +AWS.ElasticTranscoder = Service.defineService('elastictranscoder', ['2012-09-25']); +Object.defineProperty(apiLoader.services['elastictranscoder'], '2012-09-25', { + get: function get() { + var model = __nccwpck_require__(23463); + model.paginators = (__nccwpck_require__(36121)/* .pagination */ .o); + model.waiters = (__nccwpck_require__(59345)/* .waiters */ .V); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.ElasticTranscoder; + + +/***/ }), + +/***/ 10907: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['elb'] = {}; +AWS.ELB = Service.defineService('elb', ['2012-06-01']); +Object.defineProperty(apiLoader.services['elb'], '2012-06-01', { + get: function get() { + var model = __nccwpck_require__(66258); + model.paginators = (__nccwpck_require__(77372)/* .pagination */ .o); + model.waiters = (__nccwpck_require__(56717)/* .waiters */ .V); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.ELB; + + +/***/ }), + +/***/ 44311: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['elbv2'] = {}; +AWS.ELBv2 = Service.defineService('elbv2', ['2015-12-01']); +Object.defineProperty(apiLoader.services['elbv2'], '2015-12-01', { + get: function get() { + var model = __nccwpck_require__(42628); + model.paginators = (__nccwpck_require__(12274)/* .pagination */ .o); + model.waiters = (__nccwpck_require__(56106)/* .waiters */ .V); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.ELBv2; + + +/***/ }), + +/***/ 50470: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['emr'] = {}; +AWS.EMR = Service.defineService('emr', ['2009-03-31']); +Object.defineProperty(apiLoader.services['emr'], '2009-03-31', { + get: function get() { + var model = __nccwpck_require__(91298); + model.paginators = (__nccwpck_require__(62965)/* .pagination */ .o); + model.waiters = (__nccwpck_require__(86792)/* .waiters */ .V); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.EMR; + + +/***/ }), + +/***/ 49984: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['emrcontainers'] = {}; +AWS.EMRcontainers = Service.defineService('emrcontainers', ['2020-10-01']); +Object.defineProperty(apiLoader.services['emrcontainers'], '2020-10-01', { + get: function get() { + var model = __nccwpck_require__(33922); + model.paginators = (__nccwpck_require__(87789)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.EMRcontainers; + + +/***/ }), + +/***/ 84462: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['es'] = {}; +AWS.ES = Service.defineService('es', ['2015-01-01']); +Object.defineProperty(apiLoader.services['es'], '2015-01-01', { + get: function get() { + var model = __nccwpck_require__(33943); + model.paginators = (__nccwpck_require__(78836)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.ES; + + +/***/ }), + +/***/ 898: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['eventbridge'] = {}; +AWS.EventBridge = Service.defineService('eventbridge', ['2015-10-07']); +Object.defineProperty(apiLoader.services['eventbridge'], '2015-10-07', { + get: function get() { + var model = __nccwpck_require__(9659); + model.paginators = (__nccwpck_require__(10871)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.EventBridge; + + +/***/ }), + +/***/ 92831: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['firehose'] = {}; +AWS.Firehose = Service.defineService('firehose', ['2015-08-04']); +Object.defineProperty(apiLoader.services['firehose'], '2015-08-04', { + get: function get() { + var model = __nccwpck_require__(48886); + model.paginators = (__nccwpck_require__(47400)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.Firehose; + + +/***/ }), + +/***/ 11316: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['fms'] = {}; +AWS.FMS = Service.defineService('fms', ['2018-01-01']); +Object.defineProperty(apiLoader.services['fms'], '2018-01-01', { + get: function get() { + var model = __nccwpck_require__(22212); + model.paginators = (__nccwpck_require__(49570)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.FMS; + + +/***/ }), + +/***/ 36822: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['forecastqueryservice'] = {}; +AWS.ForecastQueryService = Service.defineService('forecastqueryservice', ['2018-06-26']); +Object.defineProperty(apiLoader.services['forecastqueryservice'], '2018-06-26', { + get: function get() { + var model = __nccwpck_require__(23865); + model.paginators = (__nccwpck_require__(98135)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.ForecastQueryService; + + +/***/ }), + +/***/ 12942: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['forecastservice'] = {}; +AWS.ForecastService = Service.defineService('forecastservice', ['2018-06-26']); +Object.defineProperty(apiLoader.services['forecastservice'], '2018-06-26', { + get: function get() { + var model = __nccwpck_require__(6468); + model.paginators = (__nccwpck_require__(45338)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.ForecastService; + + +/***/ }), + +/***/ 99830: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['frauddetector'] = {}; +AWS.FraudDetector = Service.defineService('frauddetector', ['2019-11-15']); +Object.defineProperty(apiLoader.services['frauddetector'], '2019-11-15', { + get: function get() { + var model = __nccwpck_require__(96105); + model.paginators = (__nccwpck_require__(9177)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.FraudDetector; + + +/***/ }), + +/***/ 60642: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['fsx'] = {}; +AWS.FSx = Service.defineService('fsx', ['2018-03-01']); +Object.defineProperty(apiLoader.services['fsx'], '2018-03-01', { + get: function get() { + var model = __nccwpck_require__(58245); + model.paginators = (__nccwpck_require__(19882)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.FSx; + + +/***/ }), + +/***/ 8085: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['gamelift'] = {}; +AWS.GameLift = Service.defineService('gamelift', ['2015-10-01']); +Object.defineProperty(apiLoader.services['gamelift'], '2015-10-01', { + get: function get() { + var model = __nccwpck_require__(69257); + model.paginators = (__nccwpck_require__(88381)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.GameLift; + + +/***/ }), + +/***/ 63249: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['glacier'] = {}; +AWS.Glacier = Service.defineService('glacier', ['2012-06-01']); +__nccwpck_require__(14472); +Object.defineProperty(apiLoader.services['glacier'], '2012-06-01', { + get: function get() { + var model = __nccwpck_require__(11545); + model.paginators = (__nccwpck_require__(54145)/* .pagination */ .o); + model.waiters = (__nccwpck_require__(65182)/* .waiters */ .V); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.Glacier; + + +/***/ }), + +/***/ 19306: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['globalaccelerator'] = {}; +AWS.GlobalAccelerator = Service.defineService('globalaccelerator', ['2018-08-08']); +Object.defineProperty(apiLoader.services['globalaccelerator'], '2018-08-08', { + get: function get() { + var model = __nccwpck_require__(35365); + model.paginators = (__nccwpck_require__(14796)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.GlobalAccelerator; + + +/***/ }), + +/***/ 31658: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['glue'] = {}; +AWS.Glue = Service.defineService('glue', ['2017-03-31']); +Object.defineProperty(apiLoader.services['glue'], '2017-03-31', { + get: function get() { + var model = __nccwpck_require__(72268); + model.paginators = (__nccwpck_require__(26545)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.Glue; + + +/***/ }), + +/***/ 20690: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['greengrass'] = {}; +AWS.Greengrass = Service.defineService('greengrass', ['2017-06-07']); +Object.defineProperty(apiLoader.services['greengrass'], '2017-06-07', { + get: function get() { + var model = __nccwpck_require__(72575); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.Greengrass; + + +/***/ }), + +/***/ 45126: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['greengrassv2'] = {}; +AWS.GreengrassV2 = Service.defineService('greengrassv2', ['2020-11-30']); +Object.defineProperty(apiLoader.services['greengrassv2'], '2020-11-30', { + get: function get() { + var model = __nccwpck_require__(57546); + model.paginators = (__nccwpck_require__(47961)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.GreengrassV2; + + +/***/ }), + +/***/ 80494: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['groundstation'] = {}; +AWS.GroundStation = Service.defineService('groundstation', ['2019-05-23']); +Object.defineProperty(apiLoader.services['groundstation'], '2019-05-23', { + get: function get() { + var model = __nccwpck_require__(27733); + model.paginators = (__nccwpck_require__(55974)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.GroundStation; - if (r.virtualHostedBucket) resource += "/" + r.virtualHostedBucket; - resource += path; +/***/ }), + +/***/ 40755: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['guardduty'] = {}; +AWS.GuardDuty = Service.defineService('guardduty', ['2017-11-28']); +Object.defineProperty(apiLoader.services['guardduty'], '2017-11-28', { + get: function get() { + var model = __nccwpck_require__(37793); + model.paginators = (__nccwpck_require__(87510)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.GuardDuty; + + +/***/ }), + +/***/ 21834: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['health'] = {}; +AWS.Health = Service.defineService('health', ['2016-08-04']); +Object.defineProperty(apiLoader.services['health'], '2016-08-04', { + get: function get() { + var model = __nccwpck_require__(8618); + model.paginators = (__nccwpck_require__(46725)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.Health; + + +/***/ }), + +/***/ 64254: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['healthlake'] = {}; +AWS.HealthLake = Service.defineService('healthlake', ['2017-07-01']); +Object.defineProperty(apiLoader.services['healthlake'], '2017-07-01', { + get: function get() { + var model = __nccwpck_require__(13637); + model.paginators = (__nccwpck_require__(92834)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.HealthLake; + + +/***/ }), + +/***/ 38889: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['honeycode'] = {}; +AWS.Honeycode = Service.defineService('honeycode', ['2020-03-01']); +Object.defineProperty(apiLoader.services['honeycode'], '2020-03-01', { + get: function get() { + var model = __nccwpck_require__(27577); + model.paginators = (__nccwpck_require__(12243)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.Honeycode; + + +/***/ }), + +/***/ 50058: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['iam'] = {}; +AWS.IAM = Service.defineService('iam', ['2010-05-08']); +Object.defineProperty(apiLoader.services['iam'], '2010-05-08', { + get: function get() { + var model = __nccwpck_require__(27041); + model.paginators = (__nccwpck_require__(97583)/* .pagination */ .o); + model.waiters = (__nccwpck_require__(37757)/* .waiters */ .V); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.IAM; + + +/***/ }), + +/***/ 60222: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['identitystore'] = {}; +AWS.IdentityStore = Service.defineService('identitystore', ['2020-06-15']); +Object.defineProperty(apiLoader.services['identitystore'], '2020-06-15', { + get: function get() { + var model = __nccwpck_require__(75797); + model.paginators = (__nccwpck_require__(44872)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.IdentityStore; + + +/***/ }), + +/***/ 57511: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['imagebuilder'] = {}; +AWS.Imagebuilder = Service.defineService('imagebuilder', ['2019-12-02']); +Object.defineProperty(apiLoader.services['imagebuilder'], '2019-12-02', { + get: function get() { + var model = __nccwpck_require__(98139); + model.paginators = (__nccwpck_require__(60410)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.Imagebuilder; + + +/***/ }), + +/***/ 6769: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['importexport'] = {}; +AWS.ImportExport = Service.defineService('importexport', ['2010-06-01']); +Object.defineProperty(apiLoader.services['importexport'], '2010-06-01', { + get: function get() { + var model = __nccwpck_require__(80317); + model.paginators = (__nccwpck_require__(58037)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.ImportExport; + + +/***/ }), + +/***/ 89439: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['inspector'] = {}; +AWS.Inspector = Service.defineService('inspector', ['2015-08-18*', '2016-02-16']); +Object.defineProperty(apiLoader.services['inspector'], '2016-02-16', { + get: function get() { + var model = __nccwpck_require__(71649); + model.paginators = (__nccwpck_require__(69242)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.Inspector; - if (querystring) { - // collect a list of sub resources and query params that need to be signed - var resources = []; - AWS.util.arrayEach.call(this, querystring.split("&"), function ( - param - ) { - var name = param.split("=")[0]; - var value = param.split("=")[1]; - if (this.subResources[name] || this.responseHeaders[name]) { - var subresource = { name: name }; - if (value !== undefined) { - if (this.subResources[name]) { - subresource.value = value; - } else { - subresource.value = decodeURIComponent(value); - } - } - resources.push(subresource); - } - }); +/***/ }), + +/***/ 98392: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['iot'] = {}; +AWS.Iot = Service.defineService('iot', ['2015-05-28']); +Object.defineProperty(apiLoader.services['iot'], '2015-05-28', { + get: function get() { + var model = __nccwpck_require__(40063); + model.paginators = (__nccwpck_require__(43999)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.Iot; + + +/***/ }), + +/***/ 39474: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['iot1clickdevicesservice'] = {}; +AWS.IoT1ClickDevicesService = Service.defineService('iot1clickdevicesservice', ['2018-05-14']); +Object.defineProperty(apiLoader.services['iot1clickdevicesservice'], '2018-05-14', { + get: function get() { + var model = __nccwpck_require__(26663); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.IoT1ClickDevicesService; + + +/***/ }), + +/***/ 4686: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['iot1clickprojects'] = {}; +AWS.IoT1ClickProjects = Service.defineService('iot1clickprojects', ['2018-05-14']); +Object.defineProperty(apiLoader.services['iot1clickprojects'], '2018-05-14', { + get: function get() { + var model = __nccwpck_require__(17364); + model.paginators = (__nccwpck_require__(54033)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.IoT1ClickProjects; + + +/***/ }), + +/***/ 67409: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['iotanalytics'] = {}; +AWS.IoTAnalytics = Service.defineService('iotanalytics', ['2017-11-27']); +Object.defineProperty(apiLoader.services['iotanalytics'], '2017-11-27', { + get: function get() { + var model = __nccwpck_require__(84609); + model.paginators = (__nccwpck_require__(45498)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.IoTAnalytics; + + +/***/ }), + +/***/ 6564: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['iotdata'] = {}; +AWS.IotData = Service.defineService('iotdata', ['2015-05-28']); +__nccwpck_require__(27062); +Object.defineProperty(apiLoader.services['iotdata'], '2015-05-28', { + get: function get() { + var model = __nccwpck_require__(21717); + model.paginators = (__nccwpck_require__(31896)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.IotData; + + +/***/ }), + +/***/ 97569: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['iotdeviceadvisor'] = {}; +AWS.IotDeviceAdvisor = Service.defineService('iotdeviceadvisor', ['2020-09-18']); +Object.defineProperty(apiLoader.services['iotdeviceadvisor'], '2020-09-18', { + get: function get() { + var model = __nccwpck_require__(71394); + model.paginators = (__nccwpck_require__(49057)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.IotDeviceAdvisor; + + +/***/ }), + +/***/ 88065: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['iotevents'] = {}; +AWS.IoTEvents = Service.defineService('iotevents', ['2018-07-27']); +Object.defineProperty(apiLoader.services['iotevents'], '2018-07-27', { + get: function get() { + var model = __nccwpck_require__(4483); + model.paginators = (__nccwpck_require__(39844)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.IoTEvents; + + +/***/ }), + +/***/ 56973: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['ioteventsdata'] = {}; +AWS.IoTEventsData = Service.defineService('ioteventsdata', ['2018-10-23']); +Object.defineProperty(apiLoader.services['ioteventsdata'], '2018-10-23', { + get: function get() { + var model = __nccwpck_require__(94282); + model.paginators = (__nccwpck_require__(11632)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.IoTEventsData; + + +/***/ }), + +/***/ 42513: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['iotfleethub'] = {}; +AWS.IoTFleetHub = Service.defineService('iotfleethub', ['2020-11-03']); +Object.defineProperty(apiLoader.services['iotfleethub'], '2020-11-03', { + get: function get() { + var model = __nccwpck_require__(56534); + model.paginators = (__nccwpck_require__(76120)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.IoTFleetHub; + + +/***/ }), + +/***/ 42332: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['iotjobsdataplane'] = {}; +AWS.IoTJobsDataPlane = Service.defineService('iotjobsdataplane', ['2017-09-29']); +Object.defineProperty(apiLoader.services['iotjobsdataplane'], '2017-09-29', { + get: function get() { + var model = __nccwpck_require__(12147); + model.paginators = (__nccwpck_require__(58593)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.IoTJobsDataPlane; + + +/***/ }), + +/***/ 98562: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['iotsecuretunneling'] = {}; +AWS.IoTSecureTunneling = Service.defineService('iotsecuretunneling', ['2018-10-05']); +Object.defineProperty(apiLoader.services['iotsecuretunneling'], '2018-10-05', { + get: function get() { + var model = __nccwpck_require__(99946); + model.paginators = (__nccwpck_require__(97884)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.IoTSecureTunneling; + + +/***/ }), + +/***/ 89690: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['iotsitewise'] = {}; +AWS.IoTSiteWise = Service.defineService('iotsitewise', ['2019-12-02']); +Object.defineProperty(apiLoader.services['iotsitewise'], '2019-12-02', { + get: function get() { + var model = __nccwpck_require__(44429); + model.paginators = (__nccwpck_require__(27558)/* .pagination */ .o); + model.waiters = (__nccwpck_require__(80458)/* .waiters */ .V); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.IoTSiteWise; + + +/***/ }), + +/***/ 58905: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['iotthingsgraph'] = {}; +AWS.IoTThingsGraph = Service.defineService('iotthingsgraph', ['2018-09-06']); +Object.defineProperty(apiLoader.services['iotthingsgraph'], '2018-09-06', { + get: function get() { + var model = __nccwpck_require__(84893); + model.paginators = (__nccwpck_require__(99418)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.IoTThingsGraph; + + +/***/ }), + +/***/ 8226: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['iotwireless'] = {}; +AWS.IoTWireless = Service.defineService('iotwireless', ['2020-11-22']); +Object.defineProperty(apiLoader.services['iotwireless'], '2020-11-22', { + get: function get() { + var model = __nccwpck_require__(78052); + model.paginators = (__nccwpck_require__(13156)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.IoTWireless; + + +/***/ }), + +/***/ 67701: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['ivs'] = {}; +AWS.IVS = Service.defineService('ivs', ['2020-07-14']); +Object.defineProperty(apiLoader.services['ivs'], '2020-07-14', { + get: function get() { + var model = __nccwpck_require__(34175); + model.paginators = (__nccwpck_require__(45289)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.IVS; + + +/***/ }), + +/***/ 56775: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['kafka'] = {}; +AWS.Kafka = Service.defineService('kafka', ['2018-11-14']); +Object.defineProperty(apiLoader.services['kafka'], '2018-11-14', { + get: function get() { + var model = __nccwpck_require__(38473); + model.paginators = (__nccwpck_require__(79729)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.Kafka; + + +/***/ }), + +/***/ 66122: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['kendra'] = {}; +AWS.Kendra = Service.defineService('kendra', ['2019-02-03']); +Object.defineProperty(apiLoader.services['kendra'], '2019-02-03', { + get: function get() { + var model = __nccwpck_require__(80100); + model.paginators = (__nccwpck_require__(64519)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.Kendra; + + +/***/ }), + +/***/ 49876: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['kinesis'] = {}; +AWS.Kinesis = Service.defineService('kinesis', ['2013-12-02']); +Object.defineProperty(apiLoader.services['kinesis'], '2013-12-02', { + get: function get() { + var model = __nccwpck_require__(648); + model.paginators = (__nccwpck_require__(10424)/* .pagination */ .o); + model.waiters = (__nccwpck_require__(54059)/* .waiters */ .V); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.Kinesis; + + +/***/ }), + +/***/ 90042: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['kinesisanalytics'] = {}; +AWS.KinesisAnalytics = Service.defineService('kinesisanalytics', ['2015-08-14']); +Object.defineProperty(apiLoader.services['kinesisanalytics'], '2015-08-14', { + get: function get() { + var model = __nccwpck_require__(72653); + model.paginators = (__nccwpck_require__(73535)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.KinesisAnalytics; + + +/***/ }), + +/***/ 74631: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['kinesisanalyticsv2'] = {}; +AWS.KinesisAnalyticsV2 = Service.defineService('kinesisanalyticsv2', ['2018-05-23']); +Object.defineProperty(apiLoader.services['kinesisanalyticsv2'], '2018-05-23', { + get: function get() { + var model = __nccwpck_require__(56485); + model.paginators = (__nccwpck_require__(52495)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.KinesisAnalyticsV2; + + +/***/ }), + +/***/ 89927: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['kinesisvideo'] = {}; +AWS.KinesisVideo = Service.defineService('kinesisvideo', ['2017-09-30']); +Object.defineProperty(apiLoader.services['kinesisvideo'], '2017-09-30', { + get: function get() { + var model = __nccwpck_require__(96305); + model.paginators = (__nccwpck_require__(50061)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.KinesisVideo; + + +/***/ }), + +/***/ 5580: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['kinesisvideoarchivedmedia'] = {}; +AWS.KinesisVideoArchivedMedia = Service.defineService('kinesisvideoarchivedmedia', ['2017-09-30']); +Object.defineProperty(apiLoader.services['kinesisvideoarchivedmedia'], '2017-09-30', { + get: function get() { + var model = __nccwpck_require__(78868); + model.paginators = (__nccwpck_require__(27352)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.KinesisVideoArchivedMedia; + + +/***/ }), + +/***/ 81308: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['kinesisvideomedia'] = {}; +AWS.KinesisVideoMedia = Service.defineService('kinesisvideomedia', ['2017-09-30']); +Object.defineProperty(apiLoader.services['kinesisvideomedia'], '2017-09-30', { + get: function get() { + var model = __nccwpck_require__(18898); + model.paginators = (__nccwpck_require__(85061)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.KinesisVideoMedia; + + +/***/ }), + +/***/ 12710: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['kinesisvideosignalingchannels'] = {}; +AWS.KinesisVideoSignalingChannels = Service.defineService('kinesisvideosignalingchannels', ['2019-12-04']); +Object.defineProperty(apiLoader.services['kinesisvideosignalingchannels'], '2019-12-04', { + get: function get() { + var model = __nccwpck_require__(89769); + model.paginators = (__nccwpck_require__(41939)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.KinesisVideoSignalingChannels; + + +/***/ }), + +/***/ 56782: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['kms'] = {}; +AWS.KMS = Service.defineService('kms', ['2014-11-01']); +Object.defineProperty(apiLoader.services['kms'], '2014-11-01', { + get: function get() { + var model = __nccwpck_require__(1219); + model.paginators = (__nccwpck_require__(71402)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.KMS; + + +/***/ }), + +/***/ 6726: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['lakeformation'] = {}; +AWS.LakeFormation = Service.defineService('lakeformation', ['2017-03-31']); +Object.defineProperty(apiLoader.services['lakeformation'], '2017-03-31', { + get: function get() { + var model = __nccwpck_require__(82210); + model.paginators = (__nccwpck_require__(61488)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.LakeFormation; + + +/***/ }), + +/***/ 13321: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['lambda'] = {}; +AWS.Lambda = Service.defineService('lambda', ['2014-11-11', '2015-03-31']); +__nccwpck_require__(8452); +Object.defineProperty(apiLoader.services['lambda'], '2014-11-11', { + get: function get() { + var model = __nccwpck_require__(91251); + model.paginators = (__nccwpck_require__(79210)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); +Object.defineProperty(apiLoader.services['lambda'], '2015-03-31', { + get: function get() { + var model = __nccwpck_require__(29103); + model.paginators = (__nccwpck_require__(32057)/* .pagination */ .o); + model.waiters = (__nccwpck_require__(40626)/* .waiters */ .V); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.Lambda; + + +/***/ }), + +/***/ 37397: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['lexmodelbuildingservice'] = {}; +AWS.LexModelBuildingService = Service.defineService('lexmodelbuildingservice', ['2017-04-19']); +Object.defineProperty(apiLoader.services['lexmodelbuildingservice'], '2017-04-19', { + get: function get() { + var model = __nccwpck_require__(96327); + model.paginators = (__nccwpck_require__(12348)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.LexModelBuildingService; + + +/***/ }), + +/***/ 62716: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['lexruntime'] = {}; +AWS.LexRuntime = Service.defineService('lexruntime', ['2016-11-28']); +Object.defineProperty(apiLoader.services['lexruntime'], '2016-11-28', { + get: function get() { + var model = __nccwpck_require__(11059); + model.paginators = (__nccwpck_require__(97715)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.LexRuntime; + + +/***/ }), + +/***/ 34693: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['licensemanager'] = {}; +AWS.LicenseManager = Service.defineService('licensemanager', ['2018-08-01']); +Object.defineProperty(apiLoader.services['licensemanager'], '2018-08-01', { + get: function get() { + var model = __nccwpck_require__(19160); + model.paginators = (__nccwpck_require__(77552)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.LicenseManager; + + +/***/ }), + +/***/ 22718: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['lightsail'] = {}; +AWS.Lightsail = Service.defineService('lightsail', ['2016-11-28']); +Object.defineProperty(apiLoader.services['lightsail'], '2016-11-28', { + get: function get() { + var model = __nccwpck_require__(94784); + model.paginators = (__nccwpck_require__(17528)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.Lightsail; + + +/***/ }), + +/***/ 44594: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['location'] = {}; +AWS.Location = Service.defineService('location', ['2020-11-19']); +Object.defineProperty(apiLoader.services['location'], '2020-11-19', { + get: function get() { + var model = __nccwpck_require__(79257); + model.paginators = (__nccwpck_require__(53350)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.Location; + + +/***/ }), + +/***/ 65046: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['lookoutvision'] = {}; +AWS.LookoutVision = Service.defineService('lookoutvision', ['2020-11-20']); +Object.defineProperty(apiLoader.services['lookoutvision'], '2020-11-20', { + get: function get() { + var model = __nccwpck_require__(15110); + model.paginators = (__nccwpck_require__(45644)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.LookoutVision; + + +/***/ }), + +/***/ 82907: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['machinelearning'] = {}; +AWS.MachineLearning = Service.defineService('machinelearning', ['2014-12-12']); +__nccwpck_require__(19174); +Object.defineProperty(apiLoader.services['machinelearning'], '2014-12-12', { + get: function get() { + var model = __nccwpck_require__(4069); + model.paginators = (__nccwpck_require__(95535)/* .pagination */ .o); + model.waiters = (__nccwpck_require__(23194)/* .waiters */ .V); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.MachineLearning; + + +/***/ }), + +/***/ 86427: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['macie'] = {}; +AWS.Macie = Service.defineService('macie', ['2017-12-19']); +Object.defineProperty(apiLoader.services['macie'], '2017-12-19', { + get: function get() { + var model = __nccwpck_require__(99366); + model.paginators = (__nccwpck_require__(34091)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.Macie; + + +/***/ }), + +/***/ 57330: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['macie2'] = {}; +AWS.Macie2 = Service.defineService('macie2', ['2020-01-01']); +Object.defineProperty(apiLoader.services['macie2'], '2020-01-01', { + get: function get() { + var model = __nccwpck_require__(50847); + model.paginators = (__nccwpck_require__(25947)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.Macie2; + + +/***/ }), + +/***/ 85143: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['managedblockchain'] = {}; +AWS.ManagedBlockchain = Service.defineService('managedblockchain', ['2018-09-24']); +Object.defineProperty(apiLoader.services['managedblockchain'], '2018-09-24', { + get: function get() { + var model = __nccwpck_require__(31229); + model.paginators = (__nccwpck_require__(57358)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.ManagedBlockchain; + + +/***/ }), + +/***/ 2609: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['marketplacecatalog'] = {}; +AWS.MarketplaceCatalog = Service.defineService('marketplacecatalog', ['2018-09-17']); +Object.defineProperty(apiLoader.services['marketplacecatalog'], '2018-09-17', { + get: function get() { + var model = __nccwpck_require__(87122); + model.paginators = (__nccwpck_require__(30187)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.MarketplaceCatalog; + + +/***/ }), + +/***/ 4540: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['marketplacecommerceanalytics'] = {}; +AWS.MarketplaceCommerceAnalytics = Service.defineService('marketplacecommerceanalytics', ['2015-07-01']); +Object.defineProperty(apiLoader.services['marketplacecommerceanalytics'], '2015-07-01', { + get: function get() { + var model = __nccwpck_require__(96696); + model.paginators = (__nccwpck_require__(43265)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.MarketplaceCommerceAnalytics; + + +/***/ }), + +/***/ 53707: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['marketplaceentitlementservice'] = {}; +AWS.MarketplaceEntitlementService = Service.defineService('marketplaceentitlementservice', ['2017-01-11']); +Object.defineProperty(apiLoader.services['marketplaceentitlementservice'], '2017-01-11', { + get: function get() { + var model = __nccwpck_require__(64253); + model.paginators = (__nccwpck_require__(67012)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.MarketplaceEntitlementService; + + +/***/ }), + +/***/ 39297: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['marketplacemetering'] = {}; +AWS.MarketplaceMetering = Service.defineService('marketplacemetering', ['2016-01-14']); +Object.defineProperty(apiLoader.services['marketplacemetering'], '2016-01-14', { + get: function get() { + var model = __nccwpck_require__(43027); + model.paginators = (__nccwpck_require__(4843)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.MarketplaceMetering; + + +/***/ }), + +/***/ 67639: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['mediaconnect'] = {}; +AWS.MediaConnect = Service.defineService('mediaconnect', ['2018-11-14']); +Object.defineProperty(apiLoader.services['mediaconnect'], '2018-11-14', { + get: function get() { + var model = __nccwpck_require__(85245); + model.paginators = (__nccwpck_require__(68160)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.MediaConnect; + + +/***/ }), + +/***/ 57220: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['mediaconvert'] = {}; +AWS.MediaConvert = Service.defineService('mediaconvert', ['2017-08-29']); +Object.defineProperty(apiLoader.services['mediaconvert'], '2017-08-29', { + get: function get() { + var model = __nccwpck_require__(41924); + model.paginators = (__nccwpck_require__(14179)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.MediaConvert; + + +/***/ }), + +/***/ 7509: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['medialive'] = {}; +AWS.MediaLive = Service.defineService('medialive', ['2017-10-14']); +Object.defineProperty(apiLoader.services['medialive'], '2017-10-14', { + get: function get() { + var model = __nccwpck_require__(32326); + model.paginators = (__nccwpck_require__(84652)/* .pagination */ .o); + model.waiters = (__nccwpck_require__(17259)/* .waiters */ .V); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.MediaLive; + + +/***/ }), + +/***/ 91620: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['mediapackage'] = {}; +AWS.MediaPackage = Service.defineService('mediapackage', ['2017-10-12']); +Object.defineProperty(apiLoader.services['mediapackage'], '2017-10-12', { + get: function get() { + var model = __nccwpck_require__(51261); + model.paginators = (__nccwpck_require__(48933)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.MediaPackage; + + +/***/ }), + +/***/ 14962: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['mediapackagevod'] = {}; +AWS.MediaPackageVod = Service.defineService('mediapackagevod', ['2018-11-07']); +Object.defineProperty(apiLoader.services['mediapackagevod'], '2018-11-07', { + get: function get() { + var model = __nccwpck_require__(98877); + model.paginators = (__nccwpck_require__(48422)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.MediaPackageVod; + + +/***/ }), + +/***/ 83748: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['mediastore'] = {}; +AWS.MediaStore = Service.defineService('mediastore', ['2017-09-01']); +Object.defineProperty(apiLoader.services['mediastore'], '2017-09-01', { + get: function get() { + var model = __nccwpck_require__(68901); + model.paginators = (__nccwpck_require__(5848)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.MediaStore; + + +/***/ }), + +/***/ 98703: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['mediastoredata'] = {}; +AWS.MediaStoreData = Service.defineService('mediastoredata', ['2017-09-01']); +Object.defineProperty(apiLoader.services['mediastoredata'], '2017-09-01', { + get: function get() { + var model = __nccwpck_require__(55081); + model.paginators = (__nccwpck_require__(97948)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.MediaStoreData; + + +/***/ }), + +/***/ 99658: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['mediatailor'] = {}; +AWS.MediaTailor = Service.defineService('mediatailor', ['2018-04-23']); +Object.defineProperty(apiLoader.services['mediatailor'], '2018-04-23', { + get: function get() { + var model = __nccwpck_require__(77511); + model.paginators = (__nccwpck_require__(68557)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.MediaTailor; + + +/***/ }), + +/***/ 14688: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['migrationhub'] = {}; +AWS.MigrationHub = Service.defineService('migrationhub', ['2017-05-31']); +Object.defineProperty(apiLoader.services['migrationhub'], '2017-05-31', { + get: function get() { + var model = __nccwpck_require__(99161); + model.paginators = (__nccwpck_require__(27903)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.MigrationHub; - resources.sort(function (a, b) { - return a.name < b.name ? -1 : 1; - }); - if (resources.length) { - querystring = []; - AWS.util.arrayEach(resources, function (res) { - if (res.value === undefined) { - querystring.push(res.name); - } else { - querystring.push(res.name + "=" + res.value); - } - }); +/***/ }), + +/***/ 62658: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['migrationhubconfig'] = {}; +AWS.MigrationHubConfig = Service.defineService('migrationhubconfig', ['2019-06-30']); +Object.defineProperty(apiLoader.services['migrationhubconfig'], '2019-06-30', { + get: function get() { + var model = __nccwpck_require__(59734); + model.paginators = (__nccwpck_require__(51497)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.MigrationHubConfig; + + +/***/ }), + +/***/ 39782: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['mobile'] = {}; +AWS.Mobile = Service.defineService('mobile', ['2017-07-01']); +Object.defineProperty(apiLoader.services['mobile'], '2017-07-01', { + get: function get() { + var model = __nccwpck_require__(51691); + model.paginators = (__nccwpck_require__(43522)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.Mobile; - resource += "?" + querystring.join("&"); - } - } - return resource; - }, +/***/ }), + +/***/ 66690: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['mobileanalytics'] = {}; +AWS.MobileAnalytics = Service.defineService('mobileanalytics', ['2014-06-05']); +Object.defineProperty(apiLoader.services['mobileanalytics'], '2014-06-05', { + get: function get() { + var model = __nccwpck_require__(90338); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.MobileAnalytics; + + +/***/ }), + +/***/ 23093: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['mq'] = {}; +AWS.MQ = Service.defineService('mq', ['2017-11-27']); +Object.defineProperty(apiLoader.services['mq'], '2017-11-27', { + get: function get() { + var model = __nccwpck_require__(35102); + model.paginators = (__nccwpck_require__(46095)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.MQ; + + +/***/ }), + +/***/ 79954: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['mturk'] = {}; +AWS.MTurk = Service.defineService('mturk', ['2017-01-17']); +Object.defineProperty(apiLoader.services['mturk'], '2017-01-17', { + get: function get() { + var model = __nccwpck_require__(73064); + model.paginators = (__nccwpck_require__(42409)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.MTurk; + + +/***/ }), + +/***/ 32712: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['mwaa'] = {}; +AWS.MWAA = Service.defineService('mwaa', ['2020-07-01']); +Object.defineProperty(apiLoader.services['mwaa'], '2020-07-01', { + get: function get() { + var model = __nccwpck_require__(56612); + model.paginators = (__nccwpck_require__(11793)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.MWAA; + + +/***/ }), + +/***/ 30047: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['neptune'] = {}; +AWS.Neptune = Service.defineService('neptune', ['2014-10-31']); +Object.defineProperty(apiLoader.services['neptune'], '2014-10-31', { + get: function get() { + var model = __nccwpck_require__(50018); + model.paginators = (__nccwpck_require__(62952)/* .pagination */ .o); + model.waiters = (__nccwpck_require__(8127)/* .waiters */ .V); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.Neptune; + + +/***/ }), + +/***/ 84626: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['networkfirewall'] = {}; +AWS.NetworkFirewall = Service.defineService('networkfirewall', ['2020-11-12']); +Object.defineProperty(apiLoader.services['networkfirewall'], '2020-11-12', { + get: function get() { + var model = __nccwpck_require__(63757); + model.paginators = (__nccwpck_require__(74798)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.NetworkFirewall; + + +/***/ }), + +/***/ 37610: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['networkmanager'] = {}; +AWS.NetworkManager = Service.defineService('networkmanager', ['2019-07-05']); +Object.defineProperty(apiLoader.services['networkmanager'], '2019-07-05', { + get: function get() { + var model = __nccwpck_require__(10151); + model.paginators = (__nccwpck_require__(68278)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.NetworkManager; + + +/***/ }), + +/***/ 75691: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['opsworks'] = {}; +AWS.OpsWorks = Service.defineService('opsworks', ['2013-02-18']); +Object.defineProperty(apiLoader.services['opsworks'], '2013-02-18', { + get: function get() { + var model = __nccwpck_require__(22805); + model.paginators = (__nccwpck_require__(24750)/* .pagination */ .o); + model.waiters = (__nccwpck_require__(74961)/* .waiters */ .V); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.OpsWorks; + + +/***/ }), + +/***/ 80388: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['opsworkscm'] = {}; +AWS.OpsWorksCM = Service.defineService('opsworkscm', ['2016-11-01']); +Object.defineProperty(apiLoader.services['opsworkscm'], '2016-11-01', { + get: function get() { + var model = __nccwpck_require__(56705); + model.paginators = (__nccwpck_require__(49463)/* .pagination */ .o); + model.waiters = (__nccwpck_require__(65003)/* .waiters */ .V); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.OpsWorksCM; + + +/***/ }), + +/***/ 52560: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['organizations'] = {}; +AWS.Organizations = Service.defineService('organizations', ['2016-11-28']); +Object.defineProperty(apiLoader.services['organizations'], '2016-11-28', { + get: function get() { + var model = __nccwpck_require__(58874); + model.paginators = (__nccwpck_require__(43261)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.Organizations; + + +/***/ }), + +/***/ 27551: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['outposts'] = {}; +AWS.Outposts = Service.defineService('outposts', ['2019-12-03']); +Object.defineProperty(apiLoader.services['outposts'], '2019-12-03', { + get: function get() { + var model = __nccwpck_require__(4807); + model.paginators = (__nccwpck_require__(3364)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.Outposts; + + +/***/ }), + +/***/ 33696: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['personalize'] = {}; +AWS.Personalize = Service.defineService('personalize', ['2018-05-22']); +Object.defineProperty(apiLoader.services['personalize'], '2018-05-22', { + get: function get() { + var model = __nccwpck_require__(70169); + model.paginators = (__nccwpck_require__(64441)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.Personalize; + + +/***/ }), + +/***/ 88170: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['personalizeevents'] = {}; +AWS.PersonalizeEvents = Service.defineService('personalizeevents', ['2018-03-22']); +Object.defineProperty(apiLoader.services['personalizeevents'], '2018-03-22', { + get: function get() { + var model = __nccwpck_require__(3606); + model.paginators = (__nccwpck_require__(94507)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.PersonalizeEvents; + + +/***/ }), + +/***/ 66184: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['personalizeruntime'] = {}; +AWS.PersonalizeRuntime = Service.defineService('personalizeruntime', ['2018-05-22']); +Object.defineProperty(apiLoader.services['personalizeruntime'], '2018-05-22', { + get: function get() { + var model = __nccwpck_require__(18824); + model.paginators = (__nccwpck_require__(8069)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); - sign: function sign(secret, string) { - return AWS.util.crypto.hmac(secret, string, "base64", "sha1"); - }, - }); +module.exports = AWS.PersonalizeRuntime; - /** - * @api private - */ - module.exports = AWS.Signers.S3; - /***/ - }, +/***/ }), + +/***/ 15505: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['pi'] = {}; +AWS.PI = Service.defineService('pi', ['2018-02-27']); +Object.defineProperty(apiLoader.services['pi'], '2018-02-27', { + get: function get() { + var model = __nccwpck_require__(18761); + model.paginators = (__nccwpck_require__(84882)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.PI; + + +/***/ }), + +/***/ 18388: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['pinpoint'] = {}; +AWS.Pinpoint = Service.defineService('pinpoint', ['2016-12-01']); +Object.defineProperty(apiLoader.services['pinpoint'], '2016-12-01', { + get: function get() { + var model = __nccwpck_require__(40605); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.Pinpoint; - /***/ 28489: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var AWS = __nccwpck_require__(28437); - var inherit = AWS.util.inherit; - /** - * @api private - */ - AWS.Signers.V2 = inherit(AWS.Signers.RequestSigner, { - addAuthorization: function addAuthorization(credentials, date) { - if (!date) date = AWS.util.date.getDate(); +/***/ }), + +/***/ 83060: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['pinpointemail'] = {}; +AWS.PinpointEmail = Service.defineService('pinpointemail', ['2018-07-26']); +Object.defineProperty(apiLoader.services['pinpointemail'], '2018-07-26', { + get: function get() { + var model = __nccwpck_require__(55228); + model.paginators = (__nccwpck_require__(45172)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.PinpointEmail; + + +/***/ }), + +/***/ 46605: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['pinpointsmsvoice'] = {}; +AWS.PinpointSMSVoice = Service.defineService('pinpointsmsvoice', ['2018-09-05']); +Object.defineProperty(apiLoader.services['pinpointsmsvoice'], '2018-09-05', { + get: function get() { + var model = __nccwpck_require__(98689); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.PinpointSMSVoice; + + +/***/ }), + +/***/ 97332: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['polly'] = {}; +AWS.Polly = Service.defineService('polly', ['2016-06-10']); +__nccwpck_require__(53199); +Object.defineProperty(apiLoader.services['polly'], '2016-06-10', { + get: function get() { + var model = __nccwpck_require__(55078); + model.paginators = (__nccwpck_require__(77060)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.Polly; - var r = this.request; - r.params.Timestamp = AWS.util.date.iso8601(date); - r.params.SignatureVersion = "2"; - r.params.SignatureMethod = "HmacSHA256"; - r.params.AWSAccessKeyId = credentials.accessKeyId; +/***/ }), + +/***/ 92765: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['pricing'] = {}; +AWS.Pricing = Service.defineService('pricing', ['2017-10-15']); +Object.defineProperty(apiLoader.services['pricing'], '2017-10-15', { + get: function get() { + var model = __nccwpck_require__(22484); + model.paginators = (__nccwpck_require__(60369)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.Pricing; + + +/***/ }), + +/***/ 71266: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['qldb'] = {}; +AWS.QLDB = Service.defineService('qldb', ['2019-01-02']); +Object.defineProperty(apiLoader.services['qldb'], '2019-01-02', { + get: function get() { + var model = __nccwpck_require__(71346); + model.paginators = (__nccwpck_require__(34265)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.QLDB; + + +/***/ }), + +/***/ 55423: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['qldbsession'] = {}; +AWS.QLDBSession = Service.defineService('qldbsession', ['2019-07-11']); +Object.defineProperty(apiLoader.services['qldbsession'], '2019-07-11', { + get: function get() { + var model = __nccwpck_require__(60040); + model.paginators = (__nccwpck_require__(61051)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.QLDBSession; + + +/***/ }), + +/***/ 29898: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['quicksight'] = {}; +AWS.QuickSight = Service.defineService('quicksight', ['2018-04-01']); +Object.defineProperty(apiLoader.services['quicksight'], '2018-04-01', { + get: function get() { + var model = __nccwpck_require__(8419); + model.paginators = (__nccwpck_require__(43387)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.QuickSight; + + +/***/ }), + +/***/ 94394: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['ram'] = {}; +AWS.RAM = Service.defineService('ram', ['2018-01-04']); +Object.defineProperty(apiLoader.services['ram'], '2018-01-04', { + get: function get() { + var model = __nccwpck_require__(61375); + model.paginators = (__nccwpck_require__(85336)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.RAM; + + +/***/ }), + +/***/ 71578: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['rds'] = {}; +AWS.RDS = Service.defineService('rds', ['2013-01-10', '2013-02-12', '2013-09-09', '2014-09-01', '2014-09-01*', '2014-10-31']); +__nccwpck_require__(71928); +Object.defineProperty(apiLoader.services['rds'], '2013-01-10', { + get: function get() { + var model = __nccwpck_require__(59989); + model.paginators = (__nccwpck_require__(978)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); +Object.defineProperty(apiLoader.services['rds'], '2013-02-12', { + get: function get() { + var model = __nccwpck_require__(55061); + model.paginators = (__nccwpck_require__(39581)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); +Object.defineProperty(apiLoader.services['rds'], '2013-09-09', { + get: function get() { + var model = __nccwpck_require__(36331); + model.paginators = (__nccwpck_require__(14485)/* .pagination */ .o); + model.waiters = (__nccwpck_require__(36851)/* .waiters */ .V); + return model; + }, + enumerable: true, + configurable: true +}); +Object.defineProperty(apiLoader.services['rds'], '2014-09-01', { + get: function get() { + var model = __nccwpck_require__(19226); + model.paginators = (__nccwpck_require__(49863)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); +Object.defineProperty(apiLoader.services['rds'], '2014-10-31', { + get: function get() { + var model = __nccwpck_require__(91916); + model.paginators = (__nccwpck_require__(85082)/* .pagination */ .o); + model.waiters = (__nccwpck_require__(20371)/* .waiters */ .V); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.RDS; + + +/***/ }), + +/***/ 30147: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['rdsdataservice'] = {}; +AWS.RDSDataService = Service.defineService('rdsdataservice', ['2018-08-01']); +__nccwpck_require__(64070); +Object.defineProperty(apiLoader.services['rdsdataservice'], '2018-08-01', { + get: function get() { + var model = __nccwpck_require__(13559); + model.paginators = (__nccwpck_require__(41160)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.RDSDataService; + + +/***/ }), + +/***/ 84853: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['redshift'] = {}; +AWS.Redshift = Service.defineService('redshift', ['2012-12-01']); +Object.defineProperty(apiLoader.services['redshift'], '2012-12-01', { + get: function get() { + var model = __nccwpck_require__(24827); + model.paginators = (__nccwpck_require__(88012)/* .pagination */ .o); + model.waiters = (__nccwpck_require__(79011)/* .waiters */ .V); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.Redshift; + + +/***/ }), + +/***/ 203: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['redshiftdata'] = {}; +AWS.RedshiftData = Service.defineService('redshiftdata', ['2019-12-20']); +Object.defineProperty(apiLoader.services['redshiftdata'], '2019-12-20', { + get: function get() { + var model = __nccwpck_require__(85203); + model.paginators = (__nccwpck_require__(27797)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.RedshiftData; + + +/***/ }), + +/***/ 65470: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['rekognition'] = {}; +AWS.Rekognition = Service.defineService('rekognition', ['2016-06-27']); +Object.defineProperty(apiLoader.services['rekognition'], '2016-06-27', { + get: function get() { + var model = __nccwpck_require__(66442); + model.paginators = (__nccwpck_require__(37753)/* .pagination */ .o); + model.waiters = (__nccwpck_require__(78910)/* .waiters */ .V); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.Rekognition; + + +/***/ }), + +/***/ 58756: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['resourcegroups'] = {}; +AWS.ResourceGroups = Service.defineService('resourcegroups', ['2017-11-27']); +Object.defineProperty(apiLoader.services['resourcegroups'], '2017-11-27', { + get: function get() { + var model = __nccwpck_require__(73621); + model.paginators = (__nccwpck_require__(24085)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.ResourceGroups; + + +/***/ }), + +/***/ 7385: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['resourcegroupstaggingapi'] = {}; +AWS.ResourceGroupsTaggingAPI = Service.defineService('resourcegroupstaggingapi', ['2017-01-26']); +Object.defineProperty(apiLoader.services['resourcegroupstaggingapi'], '2017-01-26', { + get: function get() { + var model = __nccwpck_require__(71720); + model.paginators = (__nccwpck_require__(36635)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.ResourceGroupsTaggingAPI; + + +/***/ }), + +/***/ 18068: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['robomaker'] = {}; +AWS.RoboMaker = Service.defineService('robomaker', ['2018-06-29']); +Object.defineProperty(apiLoader.services['robomaker'], '2018-06-29', { + get: function get() { + var model = __nccwpck_require__(6904); + model.paginators = (__nccwpck_require__(43495)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.RoboMaker; + + +/***/ }), + +/***/ 44968: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['route53'] = {}; +AWS.Route53 = Service.defineService('route53', ['2013-04-01']); +__nccwpck_require__(69627); +Object.defineProperty(apiLoader.services['route53'], '2013-04-01', { + get: function get() { + var model = __nccwpck_require__(20959); + model.paginators = (__nccwpck_require__(46456)/* .pagination */ .o); + model.waiters = (__nccwpck_require__(28347)/* .waiters */ .V); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.Route53; + + +/***/ }), + +/***/ 51994: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['route53domains'] = {}; +AWS.Route53Domains = Service.defineService('route53domains', ['2014-05-15']); +Object.defineProperty(apiLoader.services['route53domains'], '2014-05-15', { + get: function get() { + var model = __nccwpck_require__(57598); + model.paginators = (__nccwpck_require__(52189)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.Route53Domains; + + +/***/ }), + +/***/ 25894: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['route53resolver'] = {}; +AWS.Route53Resolver = Service.defineService('route53resolver', ['2018-04-01']); +Object.defineProperty(apiLoader.services['route53resolver'], '2018-04-01', { + get: function get() { + var model = __nccwpck_require__(89229); + model.paginators = (__nccwpck_require__(95050)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.Route53Resolver; + + +/***/ }), + +/***/ 83256: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['s3'] = {}; +AWS.S3 = Service.defineService('s3', ['2006-03-01']); +__nccwpck_require__(26543); +Object.defineProperty(apiLoader.services['s3'], '2006-03-01', { + get: function get() { + var model = __nccwpck_require__(1129); + model.paginators = (__nccwpck_require__(7265)/* .pagination */ .o); + model.waiters = (__nccwpck_require__(74048)/* .waiters */ .V); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.S3; + + +/***/ }), + +/***/ 99817: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['s3control'] = {}; +AWS.S3Control = Service.defineService('s3control', ['2018-08-20']); +__nccwpck_require__(71207); +Object.defineProperty(apiLoader.services['s3control'], '2018-08-20', { + get: function get() { + var model = __nccwpck_require__(1201); + model.paginators = (__nccwpck_require__(55527)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.S3Control; + + +/***/ }), + +/***/ 90493: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['s3outposts'] = {}; +AWS.S3Outposts = Service.defineService('s3outposts', ['2017-07-25']); +Object.defineProperty(apiLoader.services['s3outposts'], '2017-07-25', { + get: function get() { + var model = __nccwpck_require__(79971); + model.paginators = (__nccwpck_require__(32505)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.S3Outposts; + + +/***/ }), + +/***/ 77657: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['sagemaker'] = {}; +AWS.SageMaker = Service.defineService('sagemaker', ['2017-07-24']); +Object.defineProperty(apiLoader.services['sagemaker'], '2017-07-24', { + get: function get() { + var model = __nccwpck_require__(71132); + model.paginators = (__nccwpck_require__(69254)/* .pagination */ .o); + model.waiters = (__nccwpck_require__(80824)/* .waiters */ .V); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.SageMaker; + + +/***/ }), + +/***/ 38966: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['sagemakeredge'] = {}; +AWS.SagemakerEdge = Service.defineService('sagemakeredge', ['2020-09-23']); +Object.defineProperty(apiLoader.services['sagemakeredge'], '2020-09-23', { + get: function get() { + var model = __nccwpck_require__(97093); + model.paginators = (__nccwpck_require__(71636)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.SagemakerEdge; + + +/***/ }), + +/***/ 67644: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['sagemakerfeaturestoreruntime'] = {}; +AWS.SageMakerFeatureStoreRuntime = Service.defineService('sagemakerfeaturestoreruntime', ['2020-07-01']); +Object.defineProperty(apiLoader.services['sagemakerfeaturestoreruntime'], '2020-07-01', { + get: function get() { + var model = __nccwpck_require__(75546); + model.paginators = (__nccwpck_require__(12151)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.SageMakerFeatureStoreRuntime; + + +/***/ }), + +/***/ 85044: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['sagemakerruntime'] = {}; +AWS.SageMakerRuntime = Service.defineService('sagemakerruntime', ['2017-05-13']); +Object.defineProperty(apiLoader.services['sagemakerruntime'], '2017-05-13', { + get: function get() { + var model = __nccwpck_require__(27032); + model.paginators = (__nccwpck_require__(7570)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.SageMakerRuntime; + + +/***/ }), + +/***/ 62825: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['savingsplans'] = {}; +AWS.SavingsPlans = Service.defineService('savingsplans', ['2019-06-28']); +Object.defineProperty(apiLoader.services['savingsplans'], '2019-06-28', { + get: function get() { + var model = __nccwpck_require__(46879); + model.paginators = (__nccwpck_require__(78998)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.SavingsPlans; + + +/***/ }), + +/***/ 55713: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['schemas'] = {}; +AWS.Schemas = Service.defineService('schemas', ['2019-12-02']); +Object.defineProperty(apiLoader.services['schemas'], '2019-12-02', { + get: function get() { + var model = __nccwpck_require__(76626); + model.paginators = (__nccwpck_require__(34227)/* .pagination */ .o); + model.waiters = (__nccwpck_require__(62213)/* .waiters */ .V); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.Schemas; + + +/***/ }), + +/***/ 85131: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['secretsmanager'] = {}; +AWS.SecretsManager = Service.defineService('secretsmanager', ['2017-10-17']); +Object.defineProperty(apiLoader.services['secretsmanager'], '2017-10-17', { + get: function get() { + var model = __nccwpck_require__(89470); + model.paginators = (__nccwpck_require__(25613)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.SecretsManager; + + +/***/ }), + +/***/ 21550: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['securityhub'] = {}; +AWS.SecurityHub = Service.defineService('securityhub', ['2018-10-26']); +Object.defineProperty(apiLoader.services['securityhub'], '2018-10-26', { + get: function get() { + var model = __nccwpck_require__(29208); + model.paginators = (__nccwpck_require__(85595)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.SecurityHub; + + +/***/ }), + +/***/ 62402: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['serverlessapplicationrepository'] = {}; +AWS.ServerlessApplicationRepository = Service.defineService('serverlessapplicationrepository', ['2017-09-08']); +Object.defineProperty(apiLoader.services['serverlessapplicationrepository'], '2017-09-08', { + get: function get() { + var model = __nccwpck_require__(68422); + model.paginators = (__nccwpck_require__(34864)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.ServerlessApplicationRepository; + + +/***/ }), + +/***/ 822: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['servicecatalog'] = {}; +AWS.ServiceCatalog = Service.defineService('servicecatalog', ['2015-12-10']); +Object.defineProperty(apiLoader.services['servicecatalog'], '2015-12-10', { + get: function get() { + var model = __nccwpck_require__(95500); + model.paginators = (__nccwpck_require__(21687)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.ServiceCatalog; + + +/***/ }), + +/***/ 79068: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['servicecatalogappregistry'] = {}; +AWS.ServiceCatalogAppRegistry = Service.defineService('servicecatalogappregistry', ['2020-06-24']); +Object.defineProperty(apiLoader.services['servicecatalogappregistry'], '2020-06-24', { + get: function get() { + var model = __nccwpck_require__(25697); + model.paginators = (__nccwpck_require__(28893)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.ServiceCatalogAppRegistry; + + +/***/ }), + +/***/ 91569: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['servicediscovery'] = {}; +AWS.ServiceDiscovery = Service.defineService('servicediscovery', ['2017-03-14']); +Object.defineProperty(apiLoader.services['servicediscovery'], '2017-03-14', { + get: function get() { + var model = __nccwpck_require__(22361); + model.paginators = (__nccwpck_require__(37798)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.ServiceDiscovery; + + +/***/ }), + +/***/ 57800: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['servicequotas'] = {}; +AWS.ServiceQuotas = Service.defineService('servicequotas', ['2019-06-24']); +Object.defineProperty(apiLoader.services['servicequotas'], '2019-06-24', { + get: function get() { + var model = __nccwpck_require__(68850); + model.paginators = (__nccwpck_require__(63074)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.ServiceQuotas; + + +/***/ }), + +/***/ 46816: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['ses'] = {}; +AWS.SES = Service.defineService('ses', ['2010-12-01']); +Object.defineProperty(apiLoader.services['ses'], '2010-12-01', { + get: function get() { + var model = __nccwpck_require__(56693); + model.paginators = (__nccwpck_require__(9399)/* .pagination */ .o); + model.waiters = (__nccwpck_require__(98229)/* .waiters */ .V); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.SES; + + +/***/ }), + +/***/ 20142: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['sesv2'] = {}; +AWS.SESV2 = Service.defineService('sesv2', ['2019-09-27']); +Object.defineProperty(apiLoader.services['sesv2'], '2019-09-27', { + get: function get() { + var model = __nccwpck_require__(69754); + model.paginators = (__nccwpck_require__(72405)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.SESV2; + + +/***/ }), + +/***/ 20271: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['shield'] = {}; +AWS.Shield = Service.defineService('shield', ['2016-06-02']); +Object.defineProperty(apiLoader.services['shield'], '2016-06-02', { + get: function get() { + var model = __nccwpck_require__(47061); + model.paginators = (__nccwpck_require__(54893)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.Shield; + + +/***/ }), + +/***/ 71596: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['signer'] = {}; +AWS.Signer = Service.defineService('signer', ['2017-08-25']); +Object.defineProperty(apiLoader.services['signer'], '2017-08-25', { + get: function get() { + var model = __nccwpck_require__(97116); + model.paginators = (__nccwpck_require__(81027)/* .pagination */ .o); + model.waiters = (__nccwpck_require__(48215)/* .waiters */ .V); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.Signer; + + +/***/ }), + +/***/ 10120: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['simpledb'] = {}; +AWS.SimpleDB = Service.defineService('simpledb', ['2009-04-15']); +Object.defineProperty(apiLoader.services['simpledb'], '2009-04-15', { + get: function get() { + var model = __nccwpck_require__(45164); + model.paginators = (__nccwpck_require__(55255)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.SimpleDB; + + +/***/ }), + +/***/ 57719: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['sms'] = {}; +AWS.SMS = Service.defineService('sms', ['2016-10-24']); +Object.defineProperty(apiLoader.services['sms'], '2016-10-24', { + get: function get() { + var model = __nccwpck_require__(26534); + model.paginators = (__nccwpck_require__(98730)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.SMS; + + +/***/ }), + +/***/ 510: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['snowball'] = {}; +AWS.Snowball = Service.defineService('snowball', ['2016-06-30']); +Object.defineProperty(apiLoader.services['snowball'], '2016-06-30', { + get: function get() { + var model = __nccwpck_require__(96822); + model.paginators = (__nccwpck_require__(45219)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.Snowball; + + +/***/ }), + +/***/ 28581: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['sns'] = {}; +AWS.SNS = Service.defineService('sns', ['2010-03-31']); +Object.defineProperty(apiLoader.services['sns'], '2010-03-31', { + get: function get() { + var model = __nccwpck_require__(64387); + model.paginators = (__nccwpck_require__(58054)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.SNS; + + +/***/ }), + +/***/ 63172: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['sqs'] = {}; +AWS.SQS = Service.defineService('sqs', ['2012-11-05']); +__nccwpck_require__(94571); +Object.defineProperty(apiLoader.services['sqs'], '2012-11-05', { + get: function get() { + var model = __nccwpck_require__(53974); + model.paginators = (__nccwpck_require__(17249)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.SQS; + + +/***/ }), + +/***/ 83380: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['ssm'] = {}; +AWS.SSM = Service.defineService('ssm', ['2014-11-06']); +Object.defineProperty(apiLoader.services['ssm'], '2014-11-06', { + get: function get() { + var model = __nccwpck_require__(44596); + model.paginators = (__nccwpck_require__(5135)/* .pagination */ .o); + model.waiters = (__nccwpck_require__(98523)/* .waiters */ .V); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.SSM; + + +/***/ }), + +/***/ 71096: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['sso'] = {}; +AWS.SSO = Service.defineService('sso', ['2019-06-10']); +Object.defineProperty(apiLoader.services['sso'], '2019-06-10', { + get: function get() { + var model = __nccwpck_require__(8027); + model.paginators = (__nccwpck_require__(36610)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.SSO; + + +/***/ }), + +/***/ 66644: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['ssoadmin'] = {}; +AWS.SSOAdmin = Service.defineService('ssoadmin', ['2020-07-20']); +Object.defineProperty(apiLoader.services['ssoadmin'], '2020-07-20', { + get: function get() { + var model = __nccwpck_require__(7239); + model.paginators = (__nccwpck_require__(49402)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.SSOAdmin; + + +/***/ }), + +/***/ 49870: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['ssooidc'] = {}; +AWS.SSOOIDC = Service.defineService('ssooidc', ['2019-06-10']); +Object.defineProperty(apiLoader.services['ssooidc'], '2019-06-10', { + get: function get() { + var model = __nccwpck_require__(62343); + model.paginators = (__nccwpck_require__(50215)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.SSOOIDC; + + +/***/ }), + +/***/ 8136: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['stepfunctions'] = {}; +AWS.StepFunctions = Service.defineService('stepfunctions', ['2016-11-23']); +Object.defineProperty(apiLoader.services['stepfunctions'], '2016-11-23', { + get: function get() { + var model = __nccwpck_require__(85693); + model.paginators = (__nccwpck_require__(24818)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.StepFunctions; + + +/***/ }), + +/***/ 89190: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['storagegateway'] = {}; +AWS.StorageGateway = Service.defineService('storagegateway', ['2013-06-30']); +Object.defineProperty(apiLoader.services['storagegateway'], '2013-06-30', { + get: function get() { + var model = __nccwpck_require__(11069); + model.paginators = (__nccwpck_require__(33999)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.StorageGateway; + + +/***/ }), + +/***/ 57513: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['sts'] = {}; +AWS.STS = Service.defineService('sts', ['2011-06-15']); +__nccwpck_require__(91055); +Object.defineProperty(apiLoader.services['sts'], '2011-06-15', { + get: function get() { + var model = __nccwpck_require__(80753); + model.paginators = (__nccwpck_require__(93639)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.STS; + + +/***/ }), + +/***/ 1099: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['support'] = {}; +AWS.Support = Service.defineService('support', ['2013-04-15']); +Object.defineProperty(apiLoader.services['support'], '2013-04-15', { + get: function get() { + var model = __nccwpck_require__(20767); + model.paginators = (__nccwpck_require__(62491)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.Support; + + +/***/ }), + +/***/ 32327: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['swf'] = {}; +AWS.SWF = Service.defineService('swf', ['2012-01-25']); +__nccwpck_require__(31987); +Object.defineProperty(apiLoader.services['swf'], '2012-01-25', { + get: function get() { + var model = __nccwpck_require__(11144); + model.paginators = (__nccwpck_require__(48039)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.SWF; + + +/***/ }), + +/***/ 25910: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['synthetics'] = {}; +AWS.Synthetics = Service.defineService('synthetics', ['2017-10-11']); +Object.defineProperty(apiLoader.services['synthetics'], '2017-10-11', { + get: function get() { + var model = __nccwpck_require__(78752); + model.paginators = (__nccwpck_require__(61615)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.Synthetics; + + +/***/ }), + +/***/ 58523: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['textract'] = {}; +AWS.Textract = Service.defineService('textract', ['2018-06-27']); +Object.defineProperty(apiLoader.services['textract'], '2018-06-27', { + get: function get() { + var model = __nccwpck_require__(49753); + model.paginators = (__nccwpck_require__(16270)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.Textract; + + +/***/ }), + +/***/ 24529: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['timestreamquery'] = {}; +AWS.TimestreamQuery = Service.defineService('timestreamquery', ['2018-11-01']); +Object.defineProperty(apiLoader.services['timestreamquery'], '2018-11-01', { + get: function get() { + var model = __nccwpck_require__(70457); + model.paginators = (__nccwpck_require__(97217)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.TimestreamQuery; + + +/***/ }), + +/***/ 1573: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['timestreamwrite'] = {}; +AWS.TimestreamWrite = Service.defineService('timestreamwrite', ['2018-11-01']); +Object.defineProperty(apiLoader.services['timestreamwrite'], '2018-11-01', { + get: function get() { + var model = __nccwpck_require__(8368); + model.paginators = (__nccwpck_require__(89653)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.TimestreamWrite; + + +/***/ }), + +/***/ 75811: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['transcribeservice'] = {}; +AWS.TranscribeService = Service.defineService('transcribeservice', ['2017-10-26']); +Object.defineProperty(apiLoader.services['transcribeservice'], '2017-10-26', { + get: function get() { + var model = __nccwpck_require__(47294); + model.paginators = (__nccwpck_require__(25395)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.TranscribeService; + + +/***/ }), + +/***/ 51585: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['transfer'] = {}; +AWS.Transfer = Service.defineService('transfer', ['2018-11-05']); +Object.defineProperty(apiLoader.services['transfer'], '2018-11-05', { + get: function get() { + var model = __nccwpck_require__(93419); + model.paginators = (__nccwpck_require__(65803)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.Transfer; + + +/***/ }), + +/***/ 72544: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['translate'] = {}; +AWS.Translate = Service.defineService('translate', ['2017-07-01']); +Object.defineProperty(apiLoader.services['translate'], '2017-07-01', { + get: function get() { + var model = __nccwpck_require__(61084); + model.paginators = (__nccwpck_require__(40304)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.Translate; + + +/***/ }), + +/***/ 72742: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['waf'] = {}; +AWS.WAF = Service.defineService('waf', ['2015-08-24']); +Object.defineProperty(apiLoader.services['waf'], '2015-08-24', { + get: function get() { + var model = __nccwpck_require__(37925); + model.paginators = (__nccwpck_require__(65794)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.WAF; + + +/***/ }), + +/***/ 23153: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['wafregional'] = {}; +AWS.WAFRegional = Service.defineService('wafregional', ['2016-11-28']); +Object.defineProperty(apiLoader.services['wafregional'], '2016-11-28', { + get: function get() { + var model = __nccwpck_require__(20014); + model.paginators = (__nccwpck_require__(66829)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.WAFRegional; + + +/***/ }), + +/***/ 50353: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['wafv2'] = {}; +AWS.WAFV2 = Service.defineService('wafv2', ['2019-07-29']); +Object.defineProperty(apiLoader.services['wafv2'], '2019-07-29', { + get: function get() { + var model = __nccwpck_require__(51872); + model.paginators = (__nccwpck_require__(33900)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.WAFV2; + + +/***/ }), + +/***/ 86263: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['wellarchitected'] = {}; +AWS.WellArchitected = Service.defineService('wellarchitected', ['2020-03-31']); +Object.defineProperty(apiLoader.services['wellarchitected'], '2020-03-31', { + get: function get() { + var model = __nccwpck_require__(19249); + model.paginators = (__nccwpck_require__(54693)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.WellArchitected; + + +/***/ }), + +/***/ 38835: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['workdocs'] = {}; +AWS.WorkDocs = Service.defineService('workdocs', ['2016-05-01']); +Object.defineProperty(apiLoader.services['workdocs'], '2016-05-01', { + get: function get() { + var model = __nccwpck_require__(41052); + model.paginators = (__nccwpck_require__(94768)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.WorkDocs; + + +/***/ }), + +/***/ 48579: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['worklink'] = {}; +AWS.WorkLink = Service.defineService('worklink', ['2018-09-25']); +Object.defineProperty(apiLoader.services['worklink'], '2018-09-25', { + get: function get() { + var model = __nccwpck_require__(37178); + model.paginators = (__nccwpck_require__(74073)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.WorkLink; + + +/***/ }), + +/***/ 38374: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['workmail'] = {}; +AWS.WorkMail = Service.defineService('workmail', ['2017-10-01']); +Object.defineProperty(apiLoader.services['workmail'], '2017-10-01', { + get: function get() { + var model = __nccwpck_require__(93150); + model.paginators = (__nccwpck_require__(5158)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); + +module.exports = AWS.WorkMail; + + +/***/ }), + +/***/ 67025: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['workmailmessageflow'] = {}; +AWS.WorkMailMessageFlow = Service.defineService('workmailmessageflow', ['2019-05-01']); +Object.defineProperty(apiLoader.services['workmailmessageflow'], '2019-05-01', { + get: function get() { + var model = __nccwpck_require__(57733); + model.paginators = (__nccwpck_require__(85646)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); - if (credentials.sessionToken) { - r.params.SecurityToken = credentials.sessionToken; - } +module.exports = AWS.WorkMailMessageFlow; + + +/***/ }), + +/***/ 25513: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['workspaces'] = {}; +AWS.WorkSpaces = Service.defineService('workspaces', ['2015-04-08']); +Object.defineProperty(apiLoader.services['workspaces'], '2015-04-08', { + get: function get() { + var model = __nccwpck_require__(97805); + model.paginators = (__nccwpck_require__(27769)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); - delete r.params.Signature; // delete old Signature for re-signing - r.params.Signature = this.signature(credentials); +module.exports = AWS.WorkSpaces; + + +/***/ }), + +/***/ 41548: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(73639); +var AWS = __nccwpck_require__(28437); +var Service = AWS.Service; +var apiLoader = AWS.apiLoader; + +apiLoader.services['xray'] = {}; +AWS.XRay = Service.defineService('xray', ['2016-04-12']); +Object.defineProperty(apiLoader.services['xray'], '2016-04-12', { + get: function get() { + var model = __nccwpck_require__(97355); + model.paginators = (__nccwpck_require__(97949)/* .pagination */ .o); + return model; + }, + enumerable: true, + configurable: true +}); - r.body = AWS.util.queryParamsToString(r.params); - r.headers["Content-Length"] = r.body.length; - }, +module.exports = AWS.XRay; - signature: function signature(credentials) { - return AWS.util.crypto.hmac( - credentials.secretAccessKey, - this.stringToSign(), - "base64" - ); - }, - stringToSign: function stringToSign() { - var parts = []; - parts.push(this.request.method); - parts.push(this.request.endpoint.host.toLowerCase()); - parts.push(this.request.pathname()); - parts.push(AWS.util.queryParamsToString(this.request.params)); - return parts.join("\n"); - }, - }); +/***/ }), + +/***/ 52793: +/***/ ((module) => { + +function apiLoader(svc, version) { + if (!apiLoader.services.hasOwnProperty(svc)) { + throw new Error('InvalidService: Failed to load api for ' + svc); + } + return apiLoader.services[svc][version]; +} + +/** + * @api private + * + * This member of AWS.apiLoader is private, but changing it will necessitate a + * change to ../scripts/services-table-generator.ts + */ +apiLoader.services = {}; + +/** + * @api private + */ +module.exports = apiLoader; - /** - * @api private - */ - module.exports = AWS.Signers.V2; - /***/ - }, +/***/ }), - /***/ 66458: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var AWS = __nccwpck_require__(28437); - var inherit = AWS.util.inherit; +/***/ 71786: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - /** - * @api private - */ - AWS.Signers.V3 = inherit(AWS.Signers.RequestSigner, { - addAuthorization: function addAuthorization(credentials, date) { - var datetime = AWS.util.date.rfc822(date); +__nccwpck_require__(73639); - this.request.headers["X-Amz-Date"] = datetime; +var AWS = __nccwpck_require__(28437); - if (credentials.sessionToken) { - this.request.headers["x-amz-security-token"] = - credentials.sessionToken; - } +// Load all service classes +__nccwpck_require__(26296); - this.request.headers["X-Amzn-Authorization"] = this.authorization( - credentials, - datetime - ); - }, +/** + * @api private + */ +module.exports = AWS; + + +/***/ }), + +/***/ 93260: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var AWS = __nccwpck_require__(28437), + url = AWS.util.url, + crypto = AWS.util.crypto.lib, + base64Encode = AWS.util.base64.encode, + inherit = AWS.util.inherit; + +var queryEncode = function (string) { + var replacements = { + '+': '-', + '=': '_', + '/': '~' + }; + return string.replace(/[\+=\/]/g, function (match) { + return replacements[match]; + }); +}; + +var signPolicy = function (policy, privateKey) { + var sign = crypto.createSign('RSA-SHA1'); + sign.write(policy); + return queryEncode(sign.sign(privateKey, 'base64')); +}; + +var signWithCannedPolicy = function (url, expires, keyPairId, privateKey) { + var policy = JSON.stringify({ + Statement: [ + { + Resource: url, + Condition: { DateLessThan: { 'AWS:EpochTime': expires } } + } + ] + }); + + return { + Expires: expires, + 'Key-Pair-Id': keyPairId, + Signature: signPolicy(policy.toString(), privateKey) + }; +}; + +var signWithCustomPolicy = function (policy, keyPairId, privateKey) { + policy = policy.replace(/\s/mg, ''); + + return { + Policy: queryEncode(base64Encode(policy)), + 'Key-Pair-Id': keyPairId, + Signature: signPolicy(policy, privateKey) + }; +}; + +var determineScheme = function (url) { + var parts = url.split('://'); + if (parts.length < 2) { + throw new Error('Invalid URL.'); + } + + return parts[0].replace('*', ''); +}; + +var getRtmpUrl = function (rtmpUrl) { + var parsed = url.parse(rtmpUrl); + return parsed.path.replace(/^\//, '') + (parsed.hash || ''); +}; + +var getResource = function (url) { + switch (determineScheme(url)) { + case 'http': + case 'https': + return url; + case 'rtmp': + return getRtmpUrl(url); + default: + throw new Error('Invalid URI scheme. Scheme must be one of' + + ' http, https, or rtmp'); + } +}; + +var handleError = function (err, callback) { + if (!callback || typeof callback !== 'function') { + throw err; + } + + callback(err); +}; + +var handleSuccess = function (result, callback) { + if (!callback || typeof callback !== 'function') { + return result; + } + + callback(null, result); +}; + +AWS.CloudFront.Signer = inherit({ + /** + * A signer object can be used to generate signed URLs and cookies for granting + * access to content on restricted CloudFront distributions. + * + * @see http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html + * + * @param keyPairId [String] (Required) The ID of the CloudFront key pair + * being used. + * @param privateKey [String] (Required) A private key in RSA format. + */ + constructor: function Signer(keyPairId, privateKey) { + if (keyPairId === void 0 || privateKey === void 0) { + throw new Error('A key pair ID and private key are required'); + } + + this.keyPairId = keyPairId; + this.privateKey = privateKey; + }, + + /** + * Create a signed Amazon CloudFront Cookie. + * + * @param options [Object] The options to create a signed cookie. + * @option options url [String] The URL to which the signature will grant + * access. Required unless you pass in a full + * policy. + * @option options expires [Number] A Unix UTC timestamp indicating when the + * signature should expire. Required unless you + * pass in a full policy. + * @option options policy [String] A CloudFront JSON policy. Required unless + * you pass in a url and an expiry time. + * + * @param cb [Function] if a callback is provided, this function will + * pass the hash as the second parameter (after the error parameter) to + * the callback function. + * + * @return [Object] if called synchronously (with no callback), returns the + * signed cookie parameters. + * @return [null] nothing is returned if a callback is provided. + */ + getSignedCookie: function (options, cb) { + var signatureHash = 'policy' in options + ? signWithCustomPolicy(options.policy, this.keyPairId, this.privateKey) + : signWithCannedPolicy(options.url, options.expires, this.keyPairId, this.privateKey); - authorization: function authorization(credentials) { - return ( - "AWS3 " + - "AWSAccessKeyId=" + - credentials.accessKeyId + - "," + - "Algorithm=HmacSHA256," + - "SignedHeaders=" + - this.signedHeaders() + - "," + - "Signature=" + - this.signature(credentials) - ); - }, + var cookieHash = {}; + for (var key in signatureHash) { + if (Object.prototype.hasOwnProperty.call(signatureHash, key)) { + cookieHash['CloudFront-' + key] = signatureHash[key]; + } + } + + return handleSuccess(cookieHash, cb); + }, + + /** + * Create a signed Amazon CloudFront URL. + * + * Keep in mind that URLs meant for use in media/flash players may have + * different requirements for URL formats (e.g. some require that the + * extension be removed, some require the file name to be prefixed + * - mp4:, some require you to add "/cfx/st" into your URL). + * + * @param options [Object] The options to create a signed URL. + * @option options url [String] The URL to which the signature will grant + * access. Any query params included with + * the URL should be encoded. Required. + * @option options expires [Number] A Unix UTC timestamp indicating when the + * signature should expire. Required unless you + * pass in a full policy. + * @option options policy [String] A CloudFront JSON policy. Required unless + * you pass in a url and an expiry time. + * + * @param cb [Function] if a callback is provided, this function will + * pass the URL as the second parameter (after the error parameter) to + * the callback function. + * + * @return [String] if called synchronously (with no callback), returns the + * signed URL. + * @return [null] nothing is returned if a callback is provided. + */ + getSignedUrl: function (options, cb) { + try { + var resource = getResource(options.url); + } catch (err) { + return handleError(err, cb); + } - signedHeaders: function signedHeaders() { - var headers = []; - AWS.util.arrayEach(this.headersToSign(), function iterator(h) { - headers.push(h.toLowerCase()); - }); - return headers.sort().join(";"); - }, + var parsedUrl = url.parse(options.url, true), + signatureHash = Object.prototype.hasOwnProperty.call(options, 'policy') + ? signWithCustomPolicy(options.policy, this.keyPairId, this.privateKey) + : signWithCannedPolicy(resource, options.expires, this.keyPairId, this.privateKey); - canonicalHeaders: function canonicalHeaders() { - var headers = this.request.headers; - var parts = []; - AWS.util.arrayEach(this.headersToSign(), function iterator(h) { - parts.push( - h.toLowerCase().trim() + ":" + String(headers[h]).trim() - ); - }); - return parts.sort().join("\n") + "\n"; - }, - - headersToSign: function headersToSign() { - var headers = []; - AWS.util.each(this.request.headers, function iterator(k) { - if ( - k === "Host" || - k === "Content-Encoding" || - k.match(/^X-Amz/i) - ) { - headers.push(k); + parsedUrl.search = null; + for (var key in signatureHash) { + if (Object.prototype.hasOwnProperty.call(signatureHash, key)) { + parsedUrl.query[key] = signatureHash[key]; } - }); - return headers; - }, + } - signature: function signature(credentials) { - return AWS.util.crypto.hmac( - credentials.secretAccessKey, - this.stringToSign(), - "base64" - ); - }, + try { + var signedUrl = determineScheme(options.url) === 'rtmp' + ? getRtmpUrl(url.format(parsedUrl)) + : url.format(parsedUrl); + } catch (err) { + return handleError(err, cb); + } - stringToSign: function stringToSign() { - var parts = []; - parts.push(this.request.method); - parts.push("/"); - parts.push(""); - parts.push(this.canonicalHeaders()); - parts.push(this.request.body); - return AWS.util.crypto.sha256(parts.join("\n")); - }, + return handleSuccess(signedUrl, cb); + } +}); + +/** + * @api private + */ +module.exports = AWS.CloudFront.Signer; + + +/***/ }), + +/***/ 38110: +/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { + +var AWS = __nccwpck_require__(28437); +__nccwpck_require__(53819); +__nccwpck_require__(36965); +var PromisesDependency; + +/** + * The main configuration class used by all service objects to set + * the region, credentials, and other options for requests. + * + * By default, credentials and region settings are left unconfigured. + * This should be configured by the application before using any + * AWS service APIs. + * + * In order to set global configuration options, properties should + * be assigned to the global {AWS.config} object. + * + * @see AWS.config + * + * @!group General Configuration Options + * + * @!attribute credentials + * @return [AWS.Credentials] the AWS credentials to sign requests with. + * + * @!attribute region + * @example Set the global region setting to us-west-2 + * AWS.config.update({region: 'us-west-2'}); + * @return [AWS.Credentials] The region to send service requests to. + * @see http://docs.amazonwebservices.com/general/latest/gr/rande.html + * A list of available endpoints for each AWS service + * + * @!attribute maxRetries + * @return [Integer] the maximum amount of retries to perform for a + * service request. By default this value is calculated by the specific + * service object that the request is being made to. + * + * @!attribute maxRedirects + * @return [Integer] the maximum amount of redirects to follow for a + * service request. Defaults to 10. + * + * @!attribute paramValidation + * @return [Boolean|map] whether input parameters should be validated against + * the operation description before sending the request. Defaults to true. + * Pass a map to enable any of the following specific validation features: + * + * * **min** [Boolean] — Validates that a value meets the min + * constraint. This is enabled by default when paramValidation is set + * to `true`. + * * **max** [Boolean] — Validates that a value meets the max + * constraint. + * * **pattern** [Boolean] — Validates that a string value matches a + * regular expression. + * * **enum** [Boolean] — Validates that a string value matches one + * of the allowable enum values. + * + * @!attribute computeChecksums + * @return [Boolean] whether to compute checksums for payload bodies when + * the service accepts it (currently supported in S3 only). + * + * @!attribute convertResponseTypes + * @return [Boolean] whether types are converted when parsing response data. + * Currently only supported for JSON based services. Turning this off may + * improve performance on large response payloads. Defaults to `true`. + * + * @!attribute correctClockSkew + * @return [Boolean] whether to apply a clock skew correction and retry + * requests that fail because of an skewed client clock. Defaults to + * `false`. + * + * @!attribute sslEnabled + * @return [Boolean] whether SSL is enabled for requests + * + * @!attribute s3ForcePathStyle + * @return [Boolean] whether to force path style URLs for S3 objects + * + * @!attribute s3BucketEndpoint + * @note Setting this configuration option requires an `endpoint` to be + * provided explicitly to the service constructor. + * @return [Boolean] whether the provided endpoint addresses an individual + * bucket (false if it addresses the root API endpoint). + * + * @!attribute s3DisableBodySigning + * @return [Boolean] whether to disable S3 body signing when using signature version `v4`. + * Body signing can only be disabled when using https. Defaults to `true`. + * + * @!attribute s3UsEast1RegionalEndpoint + * @return ['legacy'|'regional'] when region is set to 'us-east-1', whether to send s3 + * request to global endpoints or 'us-east-1' regional endpoints. This config is only + * applicable to S3 client; + * Defaults to 'legacy' + * @!attribute s3UseArnRegion + * @return [Boolean] whether to override the request region with the region inferred + * from requested resource's ARN. Only available for S3 buckets + * Defaults to `true` + * + * @!attribute useAccelerateEndpoint + * @note This configuration option is only compatible with S3 while accessing + * dns-compatible buckets. + * @return [Boolean] Whether to use the Accelerate endpoint with the S3 service. + * Defaults to `false`. + * + * @!attribute retryDelayOptions + * @example Set the base retry delay for all services to 300 ms + * AWS.config.update({retryDelayOptions: {base: 300}}); + * // Delays with maxRetries = 3: 300, 600, 1200 + * @example Set a custom backoff function to provide delay values on retries + * AWS.config.update({retryDelayOptions: {customBackoff: function(retryCount, err) { + * // returns delay in ms + * }}}); + * @return [map] A set of options to configure the retry delay on retryable errors. + * Currently supported options are: + * + * * **base** [Integer] — The base number of milliseconds to use in the + * exponential backoff for operation retries. Defaults to 100 ms for all services except + * DynamoDB, where it defaults to 50ms. + * + * * **customBackoff ** [function] — A custom function that accepts a + * retry count and error and returns the amount of time to delay in + * milliseconds. If the result is a non-zero negative value, no further + * retry attempts will be made. The `base` option will be ignored if this + * option is supplied. The function is only called for retryable errors. + * + * @!attribute httpOptions + * @return [map] A set of options to pass to the low-level HTTP request. + * Currently supported options are: + * + * * **proxy** [String] — the URL to proxy requests through + * * **agent** [http.Agent, https.Agent] — the Agent object to perform + * HTTP requests with. Used for connection pooling. Note that for + * SSL connections, a special Agent object is used in order to enable + * peer certificate verification. This feature is only supported in the + * Node.js environment. + * * **connectTimeout** [Integer] — Sets the socket to timeout after + * failing to establish a connection with the server after + * `connectTimeout` milliseconds. This timeout has no effect once a socket + * connection has been established. + * * **timeout** [Integer] — The number of milliseconds a request can + * take before automatically being terminated. + * Defaults to two minutes (120000). + * * **xhrAsync** [Boolean] — Whether the SDK will send asynchronous + * HTTP requests. Used in the browser environment only. Set to false to + * send requests synchronously. Defaults to true (async on). + * * **xhrWithCredentials** [Boolean] — Sets the "withCredentials" + * property of an XMLHttpRequest object. Used in the browser environment + * only. Defaults to false. + * @!attribute logger + * @return [#write,#log] an object that responds to .write() (like a stream) + * or .log() (like the console object) in order to log information about + * requests + * + * @!attribute systemClockOffset + * @return [Number] an offset value in milliseconds to apply to all signing + * times. Use this to compensate for clock skew when your system may be + * out of sync with the service time. Note that this configuration option + * can only be applied to the global `AWS.config` object and cannot be + * overridden in service-specific configuration. Defaults to 0 milliseconds. + * + * @!attribute signatureVersion + * @return [String] the signature version to sign requests with (overriding + * the API configuration). Possible values are: 'v2', 'v3', 'v4'. + * + * @!attribute signatureCache + * @return [Boolean] whether the signature to sign requests with (overriding + * the API configuration) is cached. Only applies to the signature version 'v4'. + * Defaults to `true`. + * + * @!attribute endpointDiscoveryEnabled + * @return [Boolean|undefined] whether to call operations with endpoints + * given by service dynamically. Setting this config to `true` will enable + * endpoint discovery for all applicable operations. Setting it to `false` + * will explicitly disable endpoint discovery even though operations that + * require endpoint discovery will presumably fail. Leaving it to + * `undefined` means SDK only do endpoint discovery when it's required. + * Defaults to `undefined` + * + * @!attribute endpointCacheSize + * @return [Number] the size of the global cache storing endpoints from endpoint + * discovery operations. Once endpoint cache is created, updating this setting + * cannot change existing cache size. + * Defaults to 1000 + * + * @!attribute hostPrefixEnabled + * @return [Boolean] whether to marshal request parameters to the prefix of + * hostname. Defaults to `true`. + * + * @!attribute stsRegionalEndpoints + * @return ['legacy'|'regional'] whether to send sts request to global endpoints or + * regional endpoints. + * Defaults to 'legacy' + */ +AWS.Config = AWS.util.inherit({ + /** + * @!endgroup + */ + + /** + * Creates a new configuration object. This is the object that passes + * option data along to service requests, including credentials, security, + * region information, and some service specific settings. + * + * @example Creating a new configuration object with credentials and region + * var config = new AWS.Config({ + * accessKeyId: 'AKID', secretAccessKey: 'SECRET', region: 'us-west-2' + * }); + * @option options accessKeyId [String] your AWS access key ID. + * @option options secretAccessKey [String] your AWS secret access key. + * @option options sessionToken [AWS.Credentials] the optional AWS + * session token to sign requests with. + * @option options credentials [AWS.Credentials] the AWS credentials + * to sign requests with. You can either specify this object, or + * specify the accessKeyId and secretAccessKey options directly. + * @option options credentialProvider [AWS.CredentialProviderChain] the + * provider chain used to resolve credentials if no static `credentials` + * property is set. + * @option options region [String] the region to send service requests to. + * See {region} for more information. + * @option options maxRetries [Integer] the maximum amount of retries to + * attempt with a request. See {maxRetries} for more information. + * @option options maxRedirects [Integer] the maximum amount of redirects to + * follow with a request. See {maxRedirects} for more information. + * @option options sslEnabled [Boolean] whether to enable SSL for + * requests. + * @option options paramValidation [Boolean|map] whether input parameters + * should be validated against the operation description before sending + * the request. Defaults to true. Pass a map to enable any of the + * following specific validation features: + * + * * **min** [Boolean] — Validates that a value meets the min + * constraint. This is enabled by default when paramValidation is set + * to `true`. + * * **max** [Boolean] — Validates that a value meets the max + * constraint. + * * **pattern** [Boolean] — Validates that a string value matches a + * regular expression. + * * **enum** [Boolean] — Validates that a string value matches one + * of the allowable enum values. + * @option options computeChecksums [Boolean] whether to compute checksums + * for payload bodies when the service accepts it (currently supported + * in S3 only) + * @option options convertResponseTypes [Boolean] whether types are converted + * when parsing response data. Currently only supported for JSON based + * services. Turning this off may improve performance on large response + * payloads. Defaults to `true`. + * @option options correctClockSkew [Boolean] whether to apply a clock skew + * correction and retry requests that fail because of an skewed client + * clock. Defaults to `false`. + * @option options s3ForcePathStyle [Boolean] whether to force path + * style URLs for S3 objects. + * @option options s3BucketEndpoint [Boolean] whether the provided endpoint + * addresses an individual bucket (false if it addresses the root API + * endpoint). Note that setting this configuration option requires an + * `endpoint` to be provided explicitly to the service constructor. + * @option options s3DisableBodySigning [Boolean] whether S3 body signing + * should be disabled when using signature version `v4`. Body signing + * can only be disabled when using https. Defaults to `true`. + * @option options s3UsEast1RegionalEndpoint ['legacy'|'regional'] when region + * is set to 'us-east-1', whether to send s3 request to global endpoints or + * 'us-east-1' regional endpoints. This config is only applicable to S3 client. + * Defaults to `legacy` + * @option options s3UseArnRegion [Boolean] whether to override the request region + * with the region inferred from requested resource's ARN. Only available for S3 buckets + * Defaults to `true` + * + * @option options retryDelayOptions [map] A set of options to configure + * the retry delay on retryable errors. Currently supported options are: + * + * * **base** [Integer] — The base number of milliseconds to use in the + * exponential backoff for operation retries. Defaults to 100 ms for all + * services except DynamoDB, where it defaults to 50ms. + * * **customBackoff ** [function] — A custom function that accepts a + * retry count and error and returns the amount of time to delay in + * milliseconds. If the result is a non-zero negative value, no further + * retry attempts will be made. The `base` option will be ignored if this + * option is supplied. The function is only called for retryable errors. + * @option options httpOptions [map] A set of options to pass to the low-level + * HTTP request. Currently supported options are: + * + * * **proxy** [String] — the URL to proxy requests through + * * **agent** [http.Agent, https.Agent] — the Agent object to perform + * HTTP requests with. Used for connection pooling. Defaults to the global + * agent (`http.globalAgent`) for non-SSL connections. Note that for + * SSL connections, a special Agent object is used in order to enable + * peer certificate verification. This feature is only available in the + * Node.js environment. + * * **connectTimeout** [Integer] — Sets the socket to timeout after + * failing to establish a connection with the server after + * `connectTimeout` milliseconds. This timeout has no effect once a socket + * connection has been established. + * * **timeout** [Integer] — Sets the socket to timeout after timeout + * milliseconds of inactivity on the socket. Defaults to two minutes + * (120000). + * * **xhrAsync** [Boolean] — Whether the SDK will send asynchronous + * HTTP requests. Used in the browser environment only. Set to false to + * send requests synchronously. Defaults to true (async on). + * * **xhrWithCredentials** [Boolean] — Sets the "withCredentials" + * property of an XMLHttpRequest object. Used in the browser environment + * only. Defaults to false. + * @option options apiVersion [String, Date] a String in YYYY-MM-DD format + * (or a date) that represents the latest possible API version that can be + * used in all services (unless overridden by `apiVersions`). Specify + * 'latest' to use the latest possible version. + * @option options apiVersions [map] a map of service + * identifiers (the lowercase service class name) with the API version to + * use when instantiating a service. Specify 'latest' for each individual + * that can use the latest available version. + * @option options logger [#write,#log] an object that responds to .write() + * (like a stream) or .log() (like the console object) in order to log + * information about requests + * @option options systemClockOffset [Number] an offset value in milliseconds + * to apply to all signing times. Use this to compensate for clock skew + * when your system may be out of sync with the service time. Note that + * this configuration option can only be applied to the global `AWS.config` + * object and cannot be overridden in service-specific configuration. + * Defaults to 0 milliseconds. + * @option options signatureVersion [String] the signature version to sign + * requests with (overriding the API configuration). Possible values are: + * 'v2', 'v3', 'v4'. + * @option options signatureCache [Boolean] whether the signature to sign + * requests with (overriding the API configuration) is cached. Only applies + * to the signature version 'v4'. Defaults to `true`. + * @option options dynamoDbCrc32 [Boolean] whether to validate the CRC32 + * checksum of HTTP response bodies returned by DynamoDB. Default: `true`. + * @option options useAccelerateEndpoint [Boolean] Whether to use the + * S3 Transfer Acceleration endpoint with the S3 service. Default: `false`. + * @option options clientSideMonitoring [Boolean] whether to collect and + * publish this client's performance metrics of all its API requests. + * @option options endpointDiscoveryEnabled [Boolean|undefined] whether to + * call operations with endpoints given by service dynamically. Setting this + * config to `true` will enable endpoint discovery for all applicable operations. + * Setting it to `false` will explicitly disable endpoint discovery even though + * operations that require endpoint discovery will presumably fail. Leaving it + * to `undefined` means SDK will only do endpoint discovery when it's required. + * Defaults to `undefined` + * @option options endpointCacheSize [Number] the size of the global cache storing + * endpoints from endpoint discovery operations. Once endpoint cache is created, + * updating this setting cannot change existing cache size. + * Defaults to 1000 + * @option options hostPrefixEnabled [Boolean] whether to marshal request + * parameters to the prefix of hostname. + * Defaults to `true`. + * @option options stsRegionalEndpoints ['legacy'|'regional'] whether to send sts request + * to global endpoints or regional endpoints. + * Defaults to 'legacy'. + */ + constructor: function Config(options) { + if (options === undefined) options = {}; + options = this.extractCredentials(options); + + AWS.util.each.call(this, this.keys, function (key, value) { + this.set(key, options[key], value); + }); + }, + + /** + * @!group Managing Credentials + */ + + /** + * Loads credentials from the configuration object. This is used internally + * by the SDK to ensure that refreshable {Credentials} objects are properly + * refreshed and loaded when sending a request. If you want to ensure that + * your credentials are loaded prior to a request, you can use this method + * directly to provide accurate credential data stored in the object. + * + * @note If you configure the SDK with static or environment credentials, + * the credential data should already be present in {credentials} attribute. + * This method is primarily necessary to load credentials from asynchronous + * sources, or sources that can refresh credentials periodically. + * @example Getting your access key + * AWS.config.getCredentials(function(err) { + * if (err) console.log(err.stack); // credentials not loaded + * else console.log("Access Key:", AWS.config.credentials.accessKeyId); + * }) + * @callback callback function(err) + * Called when the {credentials} have been properly set on the configuration + * object. + * + * @param err [Error] if this is set, credentials were not successfully + * loaded and this error provides information why. + * @see credentials + * @see Credentials + */ + getCredentials: function getCredentials(callback) { + var self = this; + + function finish(err) { + callback(err, err ? null : self.credentials); + } + + function credError(msg, err) { + return new AWS.util.error(err || new Error(), { + code: 'CredentialsError', + message: msg, + name: 'CredentialsError' }); + } - /** - * @api private - */ - module.exports = AWS.Signers.V3; - - /***/ - }, - - /***/ 24473: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var AWS = __nccwpck_require__(28437); - var inherit = AWS.util.inherit; - - __nccwpck_require__(66458); - - /** - * @api private - */ - AWS.Signers.V3Https = inherit(AWS.Signers.V3, { - authorization: function authorization(credentials) { - return ( - "AWS3-HTTPS " + - "AWSAccessKeyId=" + - credentials.accessKeyId + - "," + - "Algorithm=HmacSHA256," + - "Signature=" + - this.signature(credentials) - ); - }, + function getAsyncCredentials() { + self.credentials.get(function(err) { + if (err) { + var msg = 'Could not load credentials from ' + + self.credentials.constructor.name; + err = credError(msg, err); + } + finish(err); + }); + } - stringToSign: function stringToSign() { - return this.request.headers["X-Amz-Date"]; - }, + function getStaticCredentials() { + var err = null; + if (!self.credentials.accessKeyId || !self.credentials.secretAccessKey) { + err = credError('Missing credentials'); + } + finish(err); + } + + if (self.credentials) { + if (typeof self.credentials.get === 'function') { + getAsyncCredentials(); + } else { // static credentials + getStaticCredentials(); + } + } else if (self.credentialProvider) { + self.credentialProvider.resolve(function(err, creds) { + if (err) { + err = credError('Could not load credentials from any providers', err); + } + self.credentials = creds; + finish(err); }); + } else { + finish(credError('No credentials to load')); + } + }, + + /** + * @!group Loading and Setting Configuration Options + */ + + /** + * @overload update(options, allowUnknownKeys = false) + * Updates the current configuration object with new options. + * + * @example Update maxRetries property of a configuration object + * config.update({maxRetries: 10}); + * @param [Object] options a map of option keys and values. + * @param [Boolean] allowUnknownKeys whether unknown keys can be set on + * the configuration object. Defaults to `false`. + * @see constructor + */ + update: function update(options, allowUnknownKeys) { + allowUnknownKeys = allowUnknownKeys || false; + options = this.extractCredentials(options); + AWS.util.each.call(this, options, function (key, value) { + if (allowUnknownKeys || Object.prototype.hasOwnProperty.call(this.keys, key) || + AWS.Service.hasService(key)) { + this.set(key, value); + } + }); + }, + + /** + * Loads configuration data from a JSON file into this config object. + * @note Loading configuration will reset all existing configuration + * on the object. + * @!macro nobrowser + * @param path [String] the path relative to your process's current + * working directory to load configuration from. + * @return [AWS.Config] the same configuration object + */ + loadFromPath: function loadFromPath(path) { + this.clear(); + + var options = JSON.parse(AWS.util.readFileSync(path)); + var fileSystemCreds = new AWS.FileSystemCredentials(path); + var chain = new AWS.CredentialProviderChain(); + chain.providers.unshift(fileSystemCreds); + chain.resolve(function (err, creds) { + if (err) throw err; + else options.credentials = creds; + }); + + this.constructor(options); + + return this; + }, + + /** + * Clears configuration data on this object + * + * @api private + */ + clear: function clear() { + /*jshint forin:false */ + AWS.util.each.call(this, this.keys, function (key) { + delete this[key]; + }); + + // reset credential provider + this.set('credentials', undefined); + this.set('credentialProvider', undefined); + }, + + /** + * Sets a property on the configuration object, allowing for a + * default value + * @api private + */ + set: function set(property, value, defaultValue) { + if (value === undefined) { + if (defaultValue === undefined) { + defaultValue = this.keys[property]; + } + if (typeof defaultValue === 'function') { + this[property] = defaultValue.call(this); + } else { + this[property] = defaultValue; + } + } else if (property === 'httpOptions' && this[property]) { + // deep merge httpOptions + this[property] = AWS.util.merge(this[property], value); + } else { + this[property] = value; + } + }, + + /** + * All of the keys with their default values. + * + * @constant + * @api private + */ + keys: { + credentials: null, + credentialProvider: null, + region: null, + logger: null, + apiVersions: {}, + apiVersion: null, + endpoint: undefined, + httpOptions: { + timeout: 120000 + }, + maxRetries: undefined, + maxRedirects: 10, + paramValidation: true, + sslEnabled: true, + s3ForcePathStyle: false, + s3BucketEndpoint: false, + s3DisableBodySigning: true, + s3UsEast1RegionalEndpoint: 'legacy', + s3UseArnRegion: undefined, + computeChecksums: true, + convertResponseTypes: true, + correctClockSkew: false, + customUserAgent: null, + dynamoDbCrc32: true, + systemClockOffset: 0, + signatureVersion: null, + signatureCache: true, + retryDelayOptions: {}, + useAccelerateEndpoint: false, + clientSideMonitoring: false, + endpointDiscoveryEnabled: undefined, + endpointCacheSize: 1000, + hostPrefixEnabled: true, + stsRegionalEndpoints: 'legacy' + }, + + /** + * Extracts accessKeyId, secretAccessKey and sessionToken + * from a configuration hash. + * + * @api private + */ + extractCredentials: function extractCredentials(options) { + if (options.accessKeyId && options.secretAccessKey) { + options = AWS.util.copy(options); + options.credentials = new AWS.Credentials(options); + } + return options; + }, + + /** + * Sets the promise dependency the SDK will use wherever Promises are returned. + * Passing `null` will force the SDK to use native Promises if they are available. + * If native Promises are not available, passing `null` will have no effect. + * @param [Constructor] dep A reference to a Promise constructor + */ + setPromisesDependency: function setPromisesDependency(dep) { + PromisesDependency = dep; + // if null was passed in, we should try to use native promises + if (dep === null && typeof Promise === 'function') { + PromisesDependency = Promise; + } + var constructors = [AWS.Request, AWS.Credentials, AWS.CredentialProviderChain]; + if (AWS.S3) { + constructors.push(AWS.S3); + if (AWS.S3.ManagedUpload) { + constructors.push(AWS.S3.ManagedUpload); + } + } + AWS.util.addPromises(constructors, PromisesDependency); + }, + + /** + * Gets the promise dependency set by `AWS.config.setPromisesDependency`. + */ + getPromisesDependency: function getPromisesDependency() { + return PromisesDependency; + } +}); + +/** + * @return [AWS.Config] The global configuration object singleton instance + * @readonly + * @see AWS.Config + */ +AWS.config = new AWS.Config(); - /** - * @api private - */ - module.exports = AWS.Signers.V3Https; - - /***/ - }, - - /***/ 26529: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var AWS = __nccwpck_require__(28437); - var v4Credentials = __nccwpck_require__(62660); - var inherit = AWS.util.inherit; - - /** - * @api private - */ - var expiresHeader = "presigned-expires"; - - /** - * @api private - */ - AWS.Signers.V4 = inherit(AWS.Signers.RequestSigner, { - constructor: function V4(request, serviceName, options) { - AWS.Signers.RequestSigner.call(this, request); - this.serviceName = serviceName; - options = options || {}; - this.signatureCache = - typeof options.signatureCache === "boolean" - ? options.signatureCache - : true; - this.operation = options.operation; - this.signatureVersion = options.signatureVersion; - }, - - algorithm: "AWS4-HMAC-SHA256", - - addAuthorization: function addAuthorization(credentials, date) { - var datetime = AWS.util.date - .iso8601(date) - .replace(/[:\-]|\.\d{3}/g, ""); - - if (this.isPresigned()) { - this.updateForPresigned(credentials, datetime); - } else { - this.addHeaders(credentials, datetime); - } - this.request.headers["Authorization"] = this.authorization( - credentials, - datetime - ); - }, +/***/ }), - addHeaders: function addHeaders(credentials, datetime) { - this.request.headers["X-Amz-Date"] = datetime; - if (credentials.sessionToken) { - this.request.headers["x-amz-security-token"] = - credentials.sessionToken; - } - }, +/***/ 85566: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - updateForPresigned: function updateForPresigned(credentials, datetime) { - var credString = this.credentialString(datetime); - var qs = { - "X-Amz-Date": datetime, - "X-Amz-Algorithm": this.algorithm, - "X-Amz-Credential": credentials.accessKeyId + "/" + credString, - "X-Amz-Expires": this.request.headers[expiresHeader], - "X-Amz-SignedHeaders": this.signedHeaders(), - }; +var AWS = __nccwpck_require__(28437); +/** + * @api private + */ +function validateRegionalEndpointsFlagValue(configValue, errorOptions) { + if (typeof configValue !== 'string') return undefined; + else if (['legacy', 'regional'].indexOf(configValue.toLowerCase()) >= 0) { + return configValue.toLowerCase(); + } else { + throw AWS.util.error(new Error(), errorOptions); + } +} + +/** + * Resolve the configuration value for regional endpoint from difference sources: client + * config, environmental variable, shared config file. Value can be case-insensitive + * 'legacy' or 'reginal'. + * @param originalConfig user-supplied config object to resolve + * @param options a map of config property names from individual configuration source + * - env: name of environmental variable that refers to the config + * - sharedConfig: name of shared configuration file property that refers to the config + * - clientConfig: name of client configuration property that refers to the config + * + * @api private + */ +function resolveRegionalEndpointsFlag(originalConfig, options) { + originalConfig = originalConfig || {}; + //validate config value + var resolved; + if (originalConfig[options.clientConfig]) { + resolved = validateRegionalEndpointsFlagValue(originalConfig[options.clientConfig], { + code: 'InvalidConfiguration', + message: 'invalid "' + options.clientConfig + '" configuration. Expect "legacy" ' + + ' or "regional". Got "' + originalConfig[options.clientConfig] + '".' + }); + if (resolved) return resolved; + } + if (!AWS.util.isNode()) return resolved; + //validate environmental variable + if (Object.prototype.hasOwnProperty.call(process.env, options.env)) { + var envFlag = process.env[options.env]; + resolved = validateRegionalEndpointsFlagValue(envFlag, { + code: 'InvalidEnvironmentalVariable', + message: 'invalid ' + options.env + ' environmental variable. Expect "legacy" ' + + ' or "regional". Got "' + process.env[options.env] + '".' + }); + if (resolved) return resolved; + } + //validate shared config file + var profile = {}; + try { + var profiles = AWS.util.getProfilesFromSharedConfig(AWS.util.iniLoader); + profile = profiles[process.env.AWS_PROFILE || AWS.util.defaultProfile]; + } catch (e) {}; + if (profile && Object.prototype.hasOwnProperty.call(profile, options.sharedConfig)) { + var fileFlag = profile[options.sharedConfig]; + resolved = validateRegionalEndpointsFlagValue(fileFlag, { + code: 'InvalidConfiguration', + message: 'invalid ' + options.sharedConfig + ' profile config. Expect "legacy" ' + + ' or "regional". Got "' + profile[options.sharedConfig] + '".' + }); + if (resolved) return resolved; + } + return resolved; +} + +module.exports = resolveRegionalEndpointsFlag; + + +/***/ }), + +/***/ 28437: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/** + * The main AWS namespace + */ +var AWS = { util: __nccwpck_require__(77985) }; - if (credentials.sessionToken) { - qs["X-Amz-Security-Token"] = credentials.sessionToken; - } +/** + * @api private + * @!macro [new] nobrowser + * @note This feature is not supported in the browser environment of the SDK. + */ +var _hidden = {}; _hidden.toString(); // hack to parse macro - if (this.request.headers["Content-Type"]) { - qs["Content-Type"] = this.request.headers["Content-Type"]; - } - if (this.request.headers["Content-MD5"]) { - qs["Content-MD5"] = this.request.headers["Content-MD5"]; - } - if (this.request.headers["Cache-Control"]) { - qs["Cache-Control"] = this.request.headers["Cache-Control"]; +/** + * @api private + */ +module.exports = AWS; + +AWS.util.update(AWS, { + + /** + * @constant + */ + VERSION: '2.814.0', + + /** + * @api private + */ + Signers: {}, + + /** + * @api private + */ + Protocol: { + Json: __nccwpck_require__(30083), + Query: __nccwpck_require__(90761), + Rest: __nccwpck_require__(98200), + RestJson: __nccwpck_require__(5883), + RestXml: __nccwpck_require__(15143) + }, + + /** + * @api private + */ + XML: { + Builder: __nccwpck_require__(23546), + Parser: null // conditionally set based on environment + }, + + /** + * @api private + */ + JSON: { + Builder: __nccwpck_require__(47495), + Parser: __nccwpck_require__(5474) + }, + + /** + * @api private + */ + Model: { + Api: __nccwpck_require__(17657), + Operation: __nccwpck_require__(28083), + Shape: __nccwpck_require__(71349), + Paginator: __nccwpck_require__(45938), + ResourceWaiter: __nccwpck_require__(41368) + }, + + /** + * @api private + */ + apiLoader: __nccwpck_require__(52793), + + /** + * @api private + */ + EndpointCache: (__nccwpck_require__(96323)/* .EndpointCache */ .$) +}); +__nccwpck_require__(55948); +__nccwpck_require__(68903); +__nccwpck_require__(38110); +__nccwpck_require__(1556); +__nccwpck_require__(54995); +__nccwpck_require__(78652); +__nccwpck_require__(58743); +__nccwpck_require__(7246); +__nccwpck_require__(9897); +__nccwpck_require__(99127); + +/** + * @readonly + * @return [AWS.SequentialExecutor] a collection of global event listeners that + * are attached to every sent request. + * @see AWS.Request AWS.Request for a list of events to listen for + * @example Logging the time taken to send a request + * AWS.events.on('send', function startSend(resp) { + * resp.startTime = new Date().getTime(); + * }).on('complete', function calculateTime(resp) { + * var time = (new Date().getTime() - resp.startTime) / 1000; + * console.log('Request took ' + time + ' seconds'); + * }); + * + * new AWS.S3().listBuckets(); // prints 'Request took 0.285 seconds' + */ +AWS.events = new AWS.SequentialExecutor(); + +//create endpoint cache lazily +AWS.util.memoizedProperty(AWS, 'endpointCache', function() { + return new AWS.EndpointCache(AWS.config.endpointCacheSize); +}, true); + + +/***/ }), + +/***/ 53819: +/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { + +var AWS = __nccwpck_require__(28437); + +/** + * Represents your AWS security credentials, specifically the + * {accessKeyId}, {secretAccessKey}, and optional {sessionToken}. + * Creating a `Credentials` object allows you to pass around your + * security information to configuration and service objects. + * + * Note that this class typically does not need to be constructed manually, + * as the {AWS.Config} and {AWS.Service} classes both accept simple + * options hashes with the three keys. These structures will be converted + * into Credentials objects automatically. + * + * ## Expiring and Refreshing Credentials + * + * Occasionally credentials can expire in the middle of a long-running + * application. In this case, the SDK will automatically attempt to + * refresh the credentials from the storage location if the Credentials + * class implements the {refresh} method. + * + * If you are implementing a credential storage location, you + * will want to create a subclass of the `Credentials` class and + * override the {refresh} method. This method allows credentials to be + * retrieved from the backing store, be it a file system, database, or + * some network storage. The method should reset the credential attributes + * on the object. + * + * @!attribute expired + * @return [Boolean] whether the credentials have been expired and + * require a refresh. Used in conjunction with {expireTime}. + * @!attribute expireTime + * @return [Date] a time when credentials should be considered expired. Used + * in conjunction with {expired}. + * @!attribute accessKeyId + * @return [String] the AWS access key ID + * @!attribute secretAccessKey + * @return [String] the AWS secret access key + * @!attribute sessionToken + * @return [String] an optional AWS session token + */ +AWS.Credentials = AWS.util.inherit({ + /** + * A credentials object can be created using positional arguments or an options + * hash. + * + * @overload AWS.Credentials(accessKeyId, secretAccessKey, sessionToken=null) + * Creates a Credentials object with a given set of credential information + * as positional arguments. + * @param accessKeyId [String] the AWS access key ID + * @param secretAccessKey [String] the AWS secret access key + * @param sessionToken [String] the optional AWS session token + * @example Create a credentials object with AWS credentials + * var creds = new AWS.Credentials('akid', 'secret', 'session'); + * @overload AWS.Credentials(options) + * Creates a Credentials object with a given set of credential information + * as an options hash. + * @option options accessKeyId [String] the AWS access key ID + * @option options secretAccessKey [String] the AWS secret access key + * @option options sessionToken [String] the optional AWS session token + * @example Create a credentials object with AWS credentials + * var creds = new AWS.Credentials({ + * accessKeyId: 'akid', secretAccessKey: 'secret', sessionToken: 'session' + * }); + */ + constructor: function Credentials() { + // hide secretAccessKey from being displayed with util.inspect + AWS.util.hideProperties(this, ['secretAccessKey']); + + this.expired = false; + this.expireTime = null; + this.refreshCallbacks = []; + if (arguments.length === 1 && typeof arguments[0] === 'object') { + var creds = arguments[0].credentials || arguments[0]; + this.accessKeyId = creds.accessKeyId; + this.secretAccessKey = creds.secretAccessKey; + this.sessionToken = creds.sessionToken; + } else { + this.accessKeyId = arguments[0]; + this.secretAccessKey = arguments[1]; + this.sessionToken = arguments[2]; + } + }, + + /** + * @return [Integer] the number of seconds before {expireTime} during which + * the credentials will be considered expired. + */ + expiryWindow: 15, + + /** + * @return [Boolean] whether the credentials object should call {refresh} + * @note Subclasses should override this method to provide custom refresh + * logic. + */ + needsRefresh: function needsRefresh() { + var currentTime = AWS.util.date.getDate().getTime(); + var adjustedTime = new Date(currentTime + this.expiryWindow * 1000); + + if (this.expireTime && adjustedTime > this.expireTime) { + return true; + } else { + return this.expired || !this.accessKeyId || !this.secretAccessKey; + } + }, + + /** + * Gets the existing credentials, refreshing them if they are not yet loaded + * or have expired. Users should call this method before using {refresh}, + * as this will not attempt to reload credentials when they are already + * loaded into the object. + * + * @callback callback function(err) + * When this callback is called with no error, it means either credentials + * do not need to be refreshed or refreshed credentials information has + * been loaded into the object (as the `accessKeyId`, `secretAccessKey`, + * and `sessionToken` properties). + * @param err [Error] if an error occurred, this value will be filled + */ + get: function get(callback) { + var self = this; + if (this.needsRefresh()) { + this.refresh(function(err) { + if (!err) self.expired = false; // reset expired flag + if (callback) callback(err); + }); + } else if (callback) { + callback(); + } + }, + + /** + * @!method getPromise() + * Returns a 'thenable' promise. + * Gets the existing credentials, refreshing them if they are not yet loaded + * or have expired. Users should call this method before using {refresh}, + * as this will not attempt to reload credentials when they are already + * loaded into the object. + * + * Two callbacks can be provided to the `then` method on the returned promise. + * The first callback will be called if the promise is fulfilled, and the second + * callback will be called if the promise is rejected. + * @callback fulfilledCallback function() + * Called if the promise is fulfilled. When this callback is called, it + * means either credentials do not need to be refreshed or refreshed + * credentials information has been loaded into the object (as the + * `accessKeyId`, `secretAccessKey`, and `sessionToken` properties). + * @callback rejectedCallback function(err) + * Called if the promise is rejected. + * @param err [Error] if an error occurred, this value will be filled + * @return [Promise] A promise that represents the state of the `get` call. + * @example Calling the `getPromise` method. + * var promise = credProvider.getPromise(); + * promise.then(function() { ... }, function(err) { ... }); + */ + + /** + * @!method refreshPromise() + * Returns a 'thenable' promise. + * Refreshes the credentials. Users should call {get} before attempting + * to forcibly refresh credentials. + * + * Two callbacks can be provided to the `then` method on the returned promise. + * The first callback will be called if the promise is fulfilled, and the second + * callback will be called if the promise is rejected. + * @callback fulfilledCallback function() + * Called if the promise is fulfilled. When this callback is called, it + * means refreshed credentials information has been loaded into the object + * (as the `accessKeyId`, `secretAccessKey`, and `sessionToken` properties). + * @callback rejectedCallback function(err) + * Called if the promise is rejected. + * @param err [Error] if an error occurred, this value will be filled + * @return [Promise] A promise that represents the state of the `refresh` call. + * @example Calling the `refreshPromise` method. + * var promise = credProvider.refreshPromise(); + * promise.then(function() { ... }, function(err) { ... }); + */ + + /** + * Refreshes the credentials. Users should call {get} before attempting + * to forcibly refresh credentials. + * + * @callback callback function(err) + * When this callback is called with no error, it means refreshed + * credentials information has been loaded into the object (as the + * `accessKeyId`, `secretAccessKey`, and `sessionToken` properties). + * @param err [Error] if an error occurred, this value will be filled + * @note Subclasses should override this class to reset the + * {accessKeyId}, {secretAccessKey} and optional {sessionToken} + * on the credentials object and then call the callback with + * any error information. + * @see get + */ + refresh: function refresh(callback) { + this.expired = false; + callback(); + }, + + /** + * @api private + * @param callback + */ + coalesceRefresh: function coalesceRefresh(callback, sync) { + var self = this; + if (self.refreshCallbacks.push(callback) === 1) { + self.load(function onLoad(err) { + AWS.util.arrayEach(self.refreshCallbacks, function(callback) { + if (sync) { + callback(err); + } else { + // callback could throw, so defer to ensure all callbacks are notified + AWS.util.defer(function () { + callback(err); + }); } + }); + self.refreshCallbacks.length = 0; + }); + } + }, + + /** + * @api private + * @param callback + */ + load: function load(callback) { + callback(); + } +}); + +/** + * @api private + */ +AWS.Credentials.addPromisesToClass = function addPromisesToClass(PromiseDependency) { + this.prototype.getPromise = AWS.util.promisifyMethod('get', PromiseDependency); + this.prototype.refreshPromise = AWS.util.promisifyMethod('refresh', PromiseDependency); +}; - // need to pull in any other X-Amz-* headers - AWS.util.each.call(this, this.request.headers, function (key, value) { - if (key === expiresHeader) return; - if (this.isSignableHeader(key)) { - var lowerKey = key.toLowerCase(); - // Metadata should be normalized - if (lowerKey.indexOf("x-amz-meta-") === 0) { - qs[lowerKey] = value; - } else if (lowerKey.indexOf("x-amz-") === 0) { - qs[key] = value; - } - } +/** + * @api private + */ +AWS.Credentials.deletePromisesFromClass = function deletePromisesFromClass() { + delete this.prototype.getPromise; + delete this.prototype.refreshPromise; +}; + +AWS.util.addPromises(AWS.Credentials); + + +/***/ }), + +/***/ 57083: +/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { + +var AWS = __nccwpck_require__(28437); +var STS = __nccwpck_require__(57513); + +/** + * Represents temporary credentials retrieved from {AWS.STS}. Without any + * extra parameters, credentials will be fetched from the + * {AWS.STS.getSessionToken} operation. If an IAM role is provided, the + * {AWS.STS.assumeRole} operation will be used to fetch credentials for the + * role instead. + * + * AWS.ChainableTemporaryCredentials differs from AWS.TemporaryCredentials in + * the way masterCredentials and refreshes are handled. + * AWS.ChainableTemporaryCredentials refreshes expired credentials using the + * masterCredentials passed by the user to support chaining of STS credentials. + * However, AWS.TemporaryCredentials recursively collapses the masterCredentials + * during instantiation, precluding the ability to refresh credentials which + * require intermediate, temporary credentials. + * + * For example, if the application should use RoleA, which must be assumed from + * RoleB, and the environment provides credentials which can assume RoleB, then + * AWS.ChainableTemporaryCredentials must be used to support refreshing the + * temporary credentials for RoleA: + * + * ```javascript + * var roleACreds = new AWS.ChainableTemporaryCredentials({ + * params: {RoleArn: 'RoleA'}, + * masterCredentials: new AWS.ChainableTemporaryCredentials({ + * params: {RoleArn: 'RoleB'}, + * masterCredentials: new AWS.EnvironmentCredentials('AWS') + * }) + * }); + * ``` + * + * If AWS.TemporaryCredentials had been used in the previous example, + * `roleACreds` would fail to refresh because `roleACreds` would + * use the environment credentials for the AssumeRole request. + * + * Another difference is that AWS.ChainableTemporaryCredentials creates the STS + * service instance during instantiation while AWS.TemporaryCredentials creates + * the STS service instance during the first refresh. Creating the service + * instance during instantiation effectively captures the master credentials + * from the global config, so that subsequent changes to the global config do + * not affect the master credentials used to refresh the temporary credentials. + * + * This allows an instance of AWS.ChainableTemporaryCredentials to be assigned + * to AWS.config.credentials: + * + * ```javascript + * var envCreds = new AWS.EnvironmentCredentials('AWS'); + * AWS.config.credentials = envCreds; + * // masterCredentials will be envCreds + * AWS.config.credentials = new AWS.ChainableTemporaryCredentials({ + * params: {RoleArn: '...'} + * }); + * ``` + * + * Similarly, to use the CredentialProviderChain's default providers as the + * master credentials, simply create a new instance of + * AWS.ChainableTemporaryCredentials: + * + * ```javascript + * AWS.config.credentials = new ChainableTemporaryCredentials({ + * params: {RoleArn: '...'} + * }); + * ``` + * + * @!attribute service + * @return [AWS.STS] the STS service instance used to + * get and refresh temporary credentials from AWS STS. + * @note (see constructor) + */ +AWS.ChainableTemporaryCredentials = AWS.util.inherit(AWS.Credentials, { + /** + * Creates a new temporary credentials object. + * + * @param options [map] a set of options + * @option options params [map] ({}) a map of options that are passed to the + * {AWS.STS.assumeRole} or {AWS.STS.getSessionToken} operations. + * If a `RoleArn` parameter is passed in, credentials will be based on the + * IAM role. If a `SerialNumber` parameter is passed in, {tokenCodeFn} must + * also be passed in or an error will be thrown. + * @option options masterCredentials [AWS.Credentials] the master credentials + * used to get and refresh temporary credentials from AWS STS. By default, + * AWS.config.credentials or AWS.config.credentialProvider will be used. + * @option options tokenCodeFn [Function] (null) Function to provide + * `TokenCode`, if `SerialNumber` is provided for profile in {params}. Function + * is called with value of `SerialNumber` and `callback`, and should provide + * the `TokenCode` or an error to the callback in the format + * `callback(err, token)`. + * @example Creating a new credentials object for generic temporary credentials + * AWS.config.credentials = new AWS.ChainableTemporaryCredentials(); + * @example Creating a new credentials object for an IAM role + * AWS.config.credentials = new AWS.ChainableTemporaryCredentials({ + * params: { + * RoleArn: 'arn:aws:iam::1234567890:role/TemporaryCredentials' + * } + * }); + * @see AWS.STS.assumeRole + * @see AWS.STS.getSessionToken + */ + constructor: function ChainableTemporaryCredentials(options) { + AWS.Credentials.call(this); + options = options || {}; + this.errorCode = 'ChainableTemporaryCredentialsProviderFailure'; + this.expired = true; + this.tokenCodeFn = null; + + var params = AWS.util.copy(options.params) || {}; + if (params.RoleArn) { + params.RoleSessionName = params.RoleSessionName || 'temporary-credentials'; + } + if (params.SerialNumber) { + if (!options.tokenCodeFn || (typeof options.tokenCodeFn !== 'function')) { + throw new AWS.util.error( + new Error('tokenCodeFn must be a function when params.SerialNumber is given'), + {code: this.errorCode} + ); + } else { + this.tokenCodeFn = options.tokenCodeFn; + } + } + var config = AWS.util.merge( + { + params: params, + credentials: options.masterCredentials || AWS.config.credentials + }, + options.stsConfig || {} + ); + this.service = new STS(config); + }, + + /** + * Refreshes credentials using {AWS.STS.assumeRole} or + * {AWS.STS.getSessionToken}, depending on whether an IAM role ARN was passed + * to the credentials {constructor}. + * + * @callback callback function(err) + * Called when the STS service responds (or fails). When + * this callback is called with no error, it means that the credentials + * information has been loaded into the object (as the `accessKeyId`, + * `secretAccessKey`, and `sessionToken` properties). + * @param err [Error] if an error occurred, this value will be filled + * @see AWS.Credentials.get + */ + refresh: function refresh(callback) { + this.coalesceRefresh(callback || AWS.util.fn.callback); + }, + + /** + * @api private + * @param callback + */ + load: function load(callback) { + var self = this; + var operation = self.service.config.params.RoleArn ? 'assumeRole' : 'getSessionToken'; + this.getTokenCode(function (err, tokenCode) { + var params = {}; + if (err) { + callback(err); + return; + } + if (tokenCode) { + params.TokenCode = tokenCode; + } + self.service[operation](params, function (err, data) { + if (!err) { + self.service.credentialsFrom(data, self); + } + callback(err); + }); + }); + }, + + /** + * @api private + */ + getTokenCode: function getTokenCode(callback) { + var self = this; + if (this.tokenCodeFn) { + this.tokenCodeFn(this.service.config.params.SerialNumber, function (err, token) { + if (err) { + var message = err; + if (err instanceof Error) { + message = err.message; + } + callback( + AWS.util.error( + new Error('Error fetching MFA token: ' + message), + { code: self.errorCode} + ) + ); + return; + } + callback(null, token); + }); + } else { + callback(null); + } + } +}); + + +/***/ }), + +/***/ 3498: +/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { + +var AWS = __nccwpck_require__(28437); +var CognitoIdentity = __nccwpck_require__(58291); +var STS = __nccwpck_require__(57513); + +/** + * Represents credentials retrieved from STS Web Identity Federation using + * the Amazon Cognito Identity service. + * + * By default this provider gets credentials using the + * {AWS.CognitoIdentity.getCredentialsForIdentity} service operation, which + * requires either an `IdentityId` or an `IdentityPoolId` (Amazon Cognito + * Identity Pool ID), which is used to call {AWS.CognitoIdentity.getId} to + * obtain an `IdentityId`. If the identity or identity pool is not configured in + * the Amazon Cognito Console to use IAM roles with the appropriate permissions, + * then additionally a `RoleArn` is required containing the ARN of the IAM trust + * policy for the Amazon Cognito role that the user will log into. If a `RoleArn` + * is provided, then this provider gets credentials using the + * {AWS.STS.assumeRoleWithWebIdentity} service operation, after first getting an + * Open ID token from {AWS.CognitoIdentity.getOpenIdToken}. + * + * In addition, if this credential provider is used to provide authenticated + * login, the `Logins` map may be set to the tokens provided by the respective + * identity providers. See {constructor} for an example on creating a credentials + * object with proper property values. + * + * ## Refreshing Credentials from Identity Service + * + * In addition to AWS credentials expiring after a given amount of time, the + * login token from the identity provider will also expire. Once this token + * expires, it will not be usable to refresh AWS credentials, and another + * token will be needed. The SDK does not manage refreshing of the token value, + * but this can be done through a "refresh token" supported by most identity + * providers. Consult the documentation for the identity provider for refreshing + * tokens. Once the refreshed token is acquired, you should make sure to update + * this new token in the credentials object's {params} property. The following + * code will update the WebIdentityToken, assuming you have retrieved an updated + * token from the identity provider: + * + * ```javascript + * AWS.config.credentials.params.Logins['graph.facebook.com'] = updatedToken; + * ``` + * + * Future calls to `credentials.refresh()` will now use the new token. + * + * @!attribute params + * @return [map] the map of params passed to + * {AWS.CognitoIdentity.getId}, + * {AWS.CognitoIdentity.getOpenIdToken}, and + * {AWS.STS.assumeRoleWithWebIdentity}. To update the token, set the + * `params.WebIdentityToken` property. + * @!attribute data + * @return [map] the raw data response from the call to + * {AWS.CognitoIdentity.getCredentialsForIdentity}, or + * {AWS.STS.assumeRoleWithWebIdentity}. Use this if you want to get + * access to other properties from the response. + * @!attribute identityId + * @return [String] the Cognito ID returned by the last call to + * {AWS.CognitoIdentity.getOpenIdToken}. This ID represents the actual + * final resolved identity ID from Amazon Cognito. + */ +AWS.CognitoIdentityCredentials = AWS.util.inherit(AWS.Credentials, { + /** + * @api private + */ + localStorageKey: { + id: 'aws.cognito.identity-id.', + providers: 'aws.cognito.identity-providers.' + }, + + /** + * Creates a new credentials object. + * @example Creating a new credentials object + * AWS.config.credentials = new AWS.CognitoIdentityCredentials({ + * + * // either IdentityPoolId or IdentityId is required + * // See the IdentityPoolId param for AWS.CognitoIdentity.getID (linked below) + * // See the IdentityId param for AWS.CognitoIdentity.getCredentialsForIdentity + * // or AWS.CognitoIdentity.getOpenIdToken (linked below) + * IdentityPoolId: 'us-east-1:1699ebc0-7900-4099-b910-2df94f52a030', + * IdentityId: 'us-east-1:128d0a74-c82f-4553-916d-90053e4a8b0f' + * + * // optional, only necessary when the identity pool is not configured + * // to use IAM roles in the Amazon Cognito Console + * // See the RoleArn param for AWS.STS.assumeRoleWithWebIdentity (linked below) + * RoleArn: 'arn:aws:iam::1234567890:role/MYAPP-CognitoIdentity', + * + * // optional tokens, used for authenticated login + * // See the Logins param for AWS.CognitoIdentity.getID (linked below) + * Logins: { + * 'graph.facebook.com': 'FBTOKEN', + * 'www.amazon.com': 'AMAZONTOKEN', + * 'accounts.google.com': 'GOOGLETOKEN', + * 'api.twitter.com': 'TWITTERTOKEN', + * 'www.digits.com': 'DIGITSTOKEN' + * }, + * + * // optional name, defaults to web-identity + * // See the RoleSessionName param for AWS.STS.assumeRoleWithWebIdentity (linked below) + * RoleSessionName: 'web', + * + * // optional, only necessary when application runs in a browser + * // and multiple users are signed in at once, used for caching + * LoginId: 'example@gmail.com' + * + * }, { + * // optionally provide configuration to apply to the underlying service clients + * // if configuration is not provided, then configuration will be pulled from AWS.config + * + * // region should match the region your identity pool is located in + * region: 'us-east-1', + * + * // specify timeout options + * httpOptions: { + * timeout: 100 + * } + * }); + * @see AWS.CognitoIdentity.getId + * @see AWS.CognitoIdentity.getCredentialsForIdentity + * @see AWS.STS.assumeRoleWithWebIdentity + * @see AWS.CognitoIdentity.getOpenIdToken + * @see AWS.Config + * @note If a region is not provided in the global AWS.config, or + * specified in the `clientConfig` to the CognitoIdentityCredentials + * constructor, you may encounter a 'Missing credentials in config' error + * when calling making a service call. + */ + constructor: function CognitoIdentityCredentials(params, clientConfig) { + AWS.Credentials.call(this); + this.expired = true; + this.params = params; + this.data = null; + this._identityId = null; + this._clientConfig = AWS.util.copy(clientConfig || {}); + this.loadCachedId(); + var self = this; + Object.defineProperty(this, 'identityId', { + get: function() { + self.loadCachedId(); + return self._identityId || self.params.IdentityId; + }, + set: function(identityId) { + self._identityId = identityId; + } + }); + }, + + /** + * Refreshes credentials using {AWS.CognitoIdentity.getCredentialsForIdentity}, + * or {AWS.STS.assumeRoleWithWebIdentity}. + * + * @callback callback function(err) + * Called when the STS service responds (or fails). When + * this callback is called with no error, it means that the credentials + * information has been loaded into the object (as the `accessKeyId`, + * `secretAccessKey`, and `sessionToken` properties). + * @param err [Error] if an error occurred, this value will be filled + * @see AWS.Credentials.get + */ + refresh: function refresh(callback) { + this.coalesceRefresh(callback || AWS.util.fn.callback); + }, + + /** + * @api private + * @param callback + */ + load: function load(callback) { + var self = this; + self.createClients(); + self.data = null; + self._identityId = null; + self.getId(function(err) { + if (!err) { + if (!self.params.RoleArn) { + self.getCredentialsForIdentity(callback); + } else { + self.getCredentialsFromSTS(callback); + } + } else { + self.clearIdOnNotAuthorized(err); + callback(err); + } + }); + }, + + /** + * Clears the cached Cognito ID associated with the currently configured + * identity pool ID. Use this to manually invalidate your cache if + * the identity pool ID was deleted. + */ + clearCachedId: function clearCache() { + this._identityId = null; + delete this.params.IdentityId; + + var poolId = this.params.IdentityPoolId; + var loginId = this.params.LoginId || ''; + delete this.storage[this.localStorageKey.id + poolId + loginId]; + delete this.storage[this.localStorageKey.providers + poolId + loginId]; + }, + + /** + * @api private + */ + clearIdOnNotAuthorized: function clearIdOnNotAuthorized(err) { + var self = this; + if (err.code == 'NotAuthorizedException') { + self.clearCachedId(); + } + }, + + /** + * Retrieves a Cognito ID, loading from cache if it was already retrieved + * on this device. + * + * @callback callback function(err, identityId) + * @param err [Error, null] an error object if the call failed or null if + * it succeeded. + * @param identityId [String, null] if successful, the callback will return + * the Cognito ID. + * @note If not loaded explicitly, the Cognito ID is loaded and stored in + * localStorage in the browser environment of a device. + * @api private + */ + getId: function getId(callback) { + var self = this; + if (typeof self.params.IdentityId === 'string') { + return callback(null, self.params.IdentityId); + } + + self.cognito.getId(function(err, data) { + if (!err && data.IdentityId) { + self.params.IdentityId = data.IdentityId; + callback(null, data.IdentityId); + } else { + callback(err); + } + }); + }, + + + /** + * @api private + */ + loadCredentials: function loadCredentials(data, credentials) { + if (!data || !credentials) return; + credentials.expired = false; + credentials.accessKeyId = data.Credentials.AccessKeyId; + credentials.secretAccessKey = data.Credentials.SecretKey; + credentials.sessionToken = data.Credentials.SessionToken; + credentials.expireTime = data.Credentials.Expiration; + }, + + /** + * @api private + */ + getCredentialsForIdentity: function getCredentialsForIdentity(callback) { + var self = this; + self.cognito.getCredentialsForIdentity(function(err, data) { + if (!err) { + self.cacheId(data); + self.data = data; + self.loadCredentials(self.data, self); + } else { + self.clearIdOnNotAuthorized(err); + } + callback(err); + }); + }, + + /** + * @api private + */ + getCredentialsFromSTS: function getCredentialsFromSTS(callback) { + var self = this; + self.cognito.getOpenIdToken(function(err, data) { + if (!err) { + self.cacheId(data); + self.params.WebIdentityToken = data.Token; + self.webIdentityCredentials.refresh(function(webErr) { + if (!webErr) { + self.data = self.webIdentityCredentials.data; + self.sts.credentialsFrom(self.data, self); + } + callback(webErr); + }); + } else { + self.clearIdOnNotAuthorized(err); + callback(err); + } + }); + }, + + /** + * @api private + */ + loadCachedId: function loadCachedId() { + var self = this; + + // in the browser we source default IdentityId from localStorage + if (AWS.util.isBrowser() && !self.params.IdentityId) { + var id = self.getStorage('id'); + if (id && self.params.Logins) { + var actualProviders = Object.keys(self.params.Logins); + var cachedProviders = + (self.getStorage('providers') || '').split(','); + + // only load ID if at least one provider used this ID before + var intersect = cachedProviders.filter(function(n) { + return actualProviders.indexOf(n) !== -1; + }); + if (intersect.length !== 0) { + self.params.IdentityId = id; + } + } else if (id) { + self.params.IdentityId = id; + } + } + }, + + /** + * @api private + */ + createClients: function() { + var clientConfig = this._clientConfig; + this.webIdentityCredentials = this.webIdentityCredentials || + new AWS.WebIdentityCredentials(this.params, clientConfig); + if (!this.cognito) { + var cognitoConfig = AWS.util.merge({}, clientConfig); + cognitoConfig.params = this.params; + this.cognito = new CognitoIdentity(cognitoConfig); + } + this.sts = this.sts || new STS(clientConfig); + }, + + /** + * @api private + */ + cacheId: function cacheId(data) { + this._identityId = data.IdentityId; + this.params.IdentityId = this._identityId; + + // cache this IdentityId in browser localStorage if possible + if (AWS.util.isBrowser()) { + this.setStorage('id', data.IdentityId); + + if (this.params.Logins) { + this.setStorage('providers', Object.keys(this.params.Logins).join(',')); + } + } + }, + + /** + * @api private + */ + getStorage: function getStorage(key) { + return this.storage[this.localStorageKey[key] + this.params.IdentityPoolId + (this.params.LoginId || '')]; + }, + + /** + * @api private + */ + setStorage: function setStorage(key, val) { + try { + this.storage[this.localStorageKey[key] + this.params.IdentityPoolId + (this.params.LoginId || '')] = val; + } catch (_) {} + }, + + /** + * @api private + */ + storage: (function() { + try { + var storage = AWS.util.isBrowser() && window.localStorage !== null && typeof window.localStorage === 'object' ? + window.localStorage : {}; + + // Test set/remove which would throw an error in Safari's private browsing + storage['aws.test-storage'] = 'foobar'; + delete storage['aws.test-storage']; + + return storage; + } catch (_) { + return {}; + } + })() +}); + + +/***/ }), + +/***/ 36965: +/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { + +var AWS = __nccwpck_require__(28437); + +/** + * Creates a credential provider chain that searches for AWS credentials + * in a list of credential providers specified by the {providers} property. + * + * By default, the chain will use the {defaultProviders} to resolve credentials. + * These providers will look in the environment using the + * {AWS.EnvironmentCredentials} class with the 'AWS' and 'AMAZON' prefixes. + * + * ## Setting Providers + * + * Each provider in the {providers} list should be a function that returns + * a {AWS.Credentials} object, or a hardcoded credentials object. The function + * form allows for delayed execution of the credential construction. + * + * ## Resolving Credentials from a Chain + * + * Call {resolve} to return the first valid credential object that can be + * loaded by the provider chain. + * + * For example, to resolve a chain with a custom provider that checks a file + * on disk after the set of {defaultProviders}: + * + * ```javascript + * var diskProvider = new AWS.FileSystemCredentials('./creds.json'); + * var chain = new AWS.CredentialProviderChain(); + * chain.providers.push(diskProvider); + * chain.resolve(); + * ``` + * + * The above code will return the `diskProvider` object if the + * file contains credentials and the `defaultProviders` do not contain + * any credential settings. + * + * @!attribute providers + * @return [Array] + * a list of credentials objects or functions that return credentials + * objects. If the provider is a function, the function will be + * executed lazily when the provider needs to be checked for valid + * credentials. By default, this object will be set to the + * {defaultProviders}. + * @see defaultProviders + */ +AWS.CredentialProviderChain = AWS.util.inherit(AWS.Credentials, { + + /** + * Creates a new CredentialProviderChain with a default set of providers + * specified by {defaultProviders}. + */ + constructor: function CredentialProviderChain(providers) { + if (providers) { + this.providers = providers; + } else { + this.providers = AWS.CredentialProviderChain.defaultProviders.slice(0); + } + this.resolveCallbacks = []; + }, + + /** + * @!method resolvePromise() + * Returns a 'thenable' promise. + * Resolves the provider chain by searching for the first set of + * credentials in {providers}. + * + * Two callbacks can be provided to the `then` method on the returned promise. + * The first callback will be called if the promise is fulfilled, and the second + * callback will be called if the promise is rejected. + * @callback fulfilledCallback function(credentials) + * Called if the promise is fulfilled and the provider resolves the chain + * to a credentials object + * @param credentials [AWS.Credentials] the credentials object resolved + * by the provider chain. + * @callback rejectedCallback function(error) + * Called if the promise is rejected. + * @param err [Error] the error object returned if no credentials are found. + * @return [Promise] A promise that represents the state of the `resolve` method call. + * @example Calling the `resolvePromise` method. + * var promise = chain.resolvePromise(); + * promise.then(function(credentials) { ... }, function(err) { ... }); + */ + + /** + * Resolves the provider chain by searching for the first set of + * credentials in {providers}. + * + * @callback callback function(err, credentials) + * Called when the provider resolves the chain to a credentials object + * or null if no credentials can be found. + * + * @param err [Error] the error object returned if no credentials are + * found. + * @param credentials [AWS.Credentials] the credentials object resolved + * by the provider chain. + * @return [AWS.CredentialProviderChain] the provider, for chaining. + */ + resolve: function resolve(callback) { + var self = this; + if (self.providers.length === 0) { + callback(new Error('No providers')); + return self; + } + + if (self.resolveCallbacks.push(callback) === 1) { + var index = 0; + var providers = self.providers.slice(0); + + function resolveNext(err, creds) { + if ((!err && creds) || index === providers.length) { + AWS.util.arrayEach(self.resolveCallbacks, function (callback) { + callback(err, creds); }); + self.resolveCallbacks.length = 0; + return; + } - var sep = this.request.path.indexOf("?") >= 0 ? "&" : "?"; - this.request.path += sep + AWS.util.queryParamsToString(qs); - }, - - authorization: function authorization(credentials, datetime) { - var parts = []; - var credString = this.credentialString(datetime); - parts.push( - this.algorithm + - " Credential=" + - credentials.accessKeyId + - "/" + - credString - ); - parts.push("SignedHeaders=" + this.signedHeaders()); - parts.push("Signature=" + this.signature(credentials, datetime)); - return parts.join(", "); - }, - - signature: function signature(credentials, datetime) { - var signingKey = v4Credentials.getSigningKey( - credentials, - datetime.substr(0, 8), - this.request.region, - this.serviceName, - this.signatureCache - ); - return AWS.util.crypto.hmac( - signingKey, - this.stringToSign(datetime), - "hex" - ); - }, + var provider = providers[index++]; + if (typeof provider === 'function') { + creds = provider.call(); + } else { + creds = provider; + } - stringToSign: function stringToSign(datetime) { - var parts = []; - parts.push("AWS4-HMAC-SHA256"); - parts.push(datetime); - parts.push(this.credentialString(datetime)); - parts.push(this.hexEncodedHash(this.canonicalString())); - return parts.join("\n"); - }, + if (creds.get) { + creds.get(function (getErr) { + resolveNext(getErr, getErr ? null : creds); + }); + } else { + resolveNext(null, creds); + } + } + + resolveNext(); + } + + return self; + } +}); + +/** + * The default set of providers used by a vanilla CredentialProviderChain. + * + * In the browser: + * + * ```javascript + * AWS.CredentialProviderChain.defaultProviders = [] + * ``` + * + * In Node.js: + * + * ```javascript + * AWS.CredentialProviderChain.defaultProviders = [ + * function () { return new AWS.EnvironmentCredentials('AWS'); }, + * function () { return new AWS.EnvironmentCredentials('AMAZON'); }, + * function () { return new AWS.SharedIniFileCredentials(); }, + * function () { return new AWS.ECSCredentials(); }, + * function () { return new AWS.ProcessCredentials(); }, + * function () { return new AWS.TokenFileWebIdentityCredentials(); }, + * function () { return new AWS.EC2MetadataCredentials() } + * ] + * ``` + */ +AWS.CredentialProviderChain.defaultProviders = []; - canonicalString: function canonicalString() { - var parts = [], - pathname = this.request.pathname(); - if (this.serviceName !== "s3" && this.signatureVersion !== "s3v4") - pathname = AWS.util.uriEscapePath(pathname); +/** + * @api private + */ +AWS.CredentialProviderChain.addPromisesToClass = function addPromisesToClass(PromiseDependency) { + this.prototype.resolvePromise = AWS.util.promisifyMethod('resolve', PromiseDependency); +}; - parts.push(this.request.method); - parts.push(pathname); - parts.push(this.request.search()); - parts.push(this.canonicalHeaders() + "\n"); - parts.push(this.signedHeaders()); - parts.push(this.hexEncodedBodyHash()); - return parts.join("\n"); - }, +/** + * @api private + */ +AWS.CredentialProviderChain.deletePromisesFromClass = function deletePromisesFromClass() { + delete this.prototype.resolvePromise; +}; + +AWS.util.addPromises(AWS.CredentialProviderChain); + + +/***/ }), + +/***/ 73379: +/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { + +var AWS = __nccwpck_require__(28437); +__nccwpck_require__(25768); + +/** + * Represents credentials received from the metadata service on an EC2 instance. + * + * By default, this class will connect to the metadata service using + * {AWS.MetadataService} and attempt to load any available credentials. If it + * can connect, and credentials are available, these will be used with zero + * configuration. + * + * This credentials class will by default timeout after 1 second of inactivity + * and retry 3 times. + * If your requests to the EC2 metadata service are timing out, you can increase + * these values by configuring them directly: + * + * ```javascript + * AWS.config.credentials = new AWS.EC2MetadataCredentials({ + * httpOptions: { timeout: 5000 }, // 5 second timeout + * maxRetries: 10, // retry 10 times + * retryDelayOptions: { base: 200 } // see AWS.Config for information + * }); + * + * If your requests are timing out in connecting to the metadata service, such + * as when testing on a development machine, you can use the connectTimeout + * option, specified in milliseconds, which also defaults to 1 second. + * ``` + * + * @see AWS.Config.retryDelayOptions + * + * @!macro nobrowser + */ +AWS.EC2MetadataCredentials = AWS.util.inherit(AWS.Credentials, { + constructor: function EC2MetadataCredentials(options) { + AWS.Credentials.call(this); + + options = options ? AWS.util.copy(options) : {}; + options = AWS.util.merge( + {maxRetries: this.defaultMaxRetries}, options); + if (!options.httpOptions) options.httpOptions = {}; + options.httpOptions = AWS.util.merge( + {timeout: this.defaultTimeout, + connectTimeout: this.defaultConnectTimeout}, + options.httpOptions); + + this.metadataService = new AWS.MetadataService(options); + this.metadata = {}; + }, + + /** + * @api private + */ + defaultTimeout: 1000, + + /** + * @api private + */ + defaultConnectTimeout: 1000, + + /** + * @api private + */ + defaultMaxRetries: 3, + + /** + * Loads the credentials from the instance metadata service + * + * @callback callback function(err) + * Called when the instance metadata service responds (or fails). When + * this callback is called with no error, it means that the credentials + * information has been loaded into the object (as the `accessKeyId`, + * `secretAccessKey`, and `sessionToken` properties). + * @param err [Error] if an error occurred, this value will be filled + * @see get + */ + refresh: function refresh(callback) { + this.coalesceRefresh(callback || AWS.util.fn.callback); + }, + + /** + * @api private + * @param callback + */ + load: function load(callback) { + var self = this; + self.metadataService.loadCredentials(function(err, creds) { + if (!err) { + var currentTime = AWS.util.date.getDate(); + var expireTime = new Date(creds.Expiration); + if (expireTime < currentTime) { + err = AWS.util.error( + new Error('EC2 Instance Metadata Serivce provided expired credentials'), + { code: 'EC2MetadataCredentialsProviderFailure' } + ); + } else { + self.expired = false; + self.metadata = creds; + self.accessKeyId = creds.AccessKeyId; + self.secretAccessKey = creds.SecretAccessKey; + self.sessionToken = creds.Token; + self.expireTime = expireTime; + } + } + callback(err); + }); + } +}); + + +/***/ }), + +/***/ 10645: +/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { + +var AWS = __nccwpck_require__(28437); + +/** + * Represents credentials received from relative URI specified in the ECS container. + * + * This class will request refreshable credentials from the relative URI + * specified by the AWS_CONTAINER_CREDENTIALS_RELATIVE_URI or the + * AWS_CONTAINER_CREDENTIALS_FULL_URI environment variable. If valid credentials + * are returned in the response, these will be used with zero configuration. + * + * This credentials class will by default timeout after 1 second of inactivity + * and retry 3 times. + * If your requests to the relative URI are timing out, you can increase + * the value by configuring them directly: + * + * ```javascript + * AWS.config.credentials = new AWS.ECSCredentials({ + * httpOptions: { timeout: 5000 }, // 5 second timeout + * maxRetries: 10, // retry 10 times + * retryDelayOptions: { base: 200 } // see AWS.Config for information + * }); + * ``` + * + * @see AWS.Config.retryDelayOptions + * + * @!macro nobrowser + */ +AWS.ECSCredentials = AWS.RemoteCredentials; + + +/***/ }), + +/***/ 57714: +/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { + +var AWS = __nccwpck_require__(28437); + +/** + * Represents credentials from the environment. + * + * By default, this class will look for the matching environment variables + * prefixed by a given {envPrefix}. The un-prefixed environment variable names + * for each credential value is listed below: + * + * ```javascript + * accessKeyId: ACCESS_KEY_ID + * secretAccessKey: SECRET_ACCESS_KEY + * sessionToken: SESSION_TOKEN + * ``` + * + * With the default prefix of 'AWS', the environment variables would be: + * + * AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN + * + * @!attribute envPrefix + * @readonly + * @return [String] the prefix for the environment variable names excluding + * the separating underscore ('_'). + */ +AWS.EnvironmentCredentials = AWS.util.inherit(AWS.Credentials, { + + /** + * Creates a new EnvironmentCredentials class with a given variable + * prefix {envPrefix}. For example, to load credentials using the 'AWS' + * prefix: + * + * ```javascript + * var creds = new AWS.EnvironmentCredentials('AWS'); + * creds.accessKeyId == 'AKID' // from AWS_ACCESS_KEY_ID env var + * ``` + * + * @param envPrefix [String] the prefix to use (e.g., 'AWS') for environment + * variables. Do not include the separating underscore. + */ + constructor: function EnvironmentCredentials(envPrefix) { + AWS.Credentials.call(this); + this.envPrefix = envPrefix; + this.get(function() {}); + }, + + /** + * Loads credentials from the environment using the prefixed + * environment variables. + * + * @callback callback function(err) + * Called after the (prefixed) ACCESS_KEY_ID, SECRET_ACCESS_KEY, and + * SESSION_TOKEN environment variables are read. When this callback is + * called with no error, it means that the credentials information has + * been loaded into the object (as the `accessKeyId`, `secretAccessKey`, + * and `sessionToken` properties). + * @param err [Error] if an error occurred, this value will be filled + * @see get + */ + refresh: function refresh(callback) { + if (!callback) callback = AWS.util.fn.callback; + + if (!process || !process.env) { + callback(AWS.util.error( + new Error('No process info or environment variables available'), + { code: 'EnvironmentCredentialsProviderFailure' } + )); + return; + } + + var keys = ['ACCESS_KEY_ID', 'SECRET_ACCESS_KEY', 'SESSION_TOKEN']; + var values = []; + + for (var i = 0; i < keys.length; i++) { + var prefix = ''; + if (this.envPrefix) prefix = this.envPrefix + '_'; + values[i] = process.env[prefix + keys[i]]; + if (!values[i] && keys[i] !== 'SESSION_TOKEN') { + callback(AWS.util.error( + new Error('Variable ' + prefix + keys[i] + ' not set.'), + { code: 'EnvironmentCredentialsProviderFailure' } + )); + return; + } + } + + this.expired = false; + AWS.Credentials.apply(this, values); + callback(); + } + +}); + + +/***/ }), + +/***/ 27454: +/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { + +var AWS = __nccwpck_require__(28437); + +/** + * Represents credentials from a JSON file on disk. + * If the credentials expire, the SDK can {refresh} the credentials + * from the file. + * + * The format of the file should be similar to the options passed to + * {AWS.Config}: + * + * ```javascript + * {accessKeyId: 'akid', secretAccessKey: 'secret', sessionToken: 'optional'} + * ``` + * + * @example Loading credentials from disk + * var creds = new AWS.FileSystemCredentials('./configuration.json'); + * creds.accessKeyId == 'AKID' + * + * @!attribute filename + * @readonly + * @return [String] the path to the JSON file on disk containing the + * credentials. + * @!macro nobrowser + */ +AWS.FileSystemCredentials = AWS.util.inherit(AWS.Credentials, { + + /** + * @overload AWS.FileSystemCredentials(filename) + * Creates a new FileSystemCredentials object from a filename + * + * @param filename [String] the path on disk to the JSON file to load. + */ + constructor: function FileSystemCredentials(filename) { + AWS.Credentials.call(this); + this.filename = filename; + this.get(function() {}); + }, + + /** + * Loads the credentials from the {filename} on disk. + * + * @callback callback function(err) + * Called after the JSON file on disk is read and parsed. When this callback + * is called with no error, it means that the credentials information + * has been loaded into the object (as the `accessKeyId`, `secretAccessKey`, + * and `sessionToken` properties). + * @param err [Error] if an error occurred, this value will be filled + * @see get + */ + refresh: function refresh(callback) { + if (!callback) callback = AWS.util.fn.callback; + try { + var creds = JSON.parse(AWS.util.readFileSync(this.filename)); + AWS.Credentials.call(this, creds); + if (!this.accessKeyId || !this.secretAccessKey) { + throw AWS.util.error( + new Error('Credentials not set in ' + this.filename), + { code: 'FileSystemCredentialsProviderFailure' } + ); + } + this.expired = false; + callback(); + } catch (err) { + callback(err); + } + } + +}); + + +/***/ }), + +/***/ 80371: +/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { + +var AWS = __nccwpck_require__(28437); +var proc = __nccwpck_require__(32081); +var iniLoader = AWS.util.iniLoader; + +/** + * Represents credentials loaded from shared credentials file + * (defaulting to ~/.aws/credentials or defined by the + * `AWS_SHARED_CREDENTIALS_FILE` environment variable). + * + * ## Using process credentials + * + * The credentials file can specify a credential provider that executes + * a given process and attempts to read its stdout to recieve a JSON payload + * containing the credentials: + * + * [default] + * credential_process = /usr/bin/credential_proc + * + * Automatically handles refreshing credentials if an Expiration time is + * provided in the credentials payload. Credentials supplied in the same profile + * will take precedence over the credential_process. + * + * Sourcing credentials from an external process can potentially be dangerous, + * so proceed with caution. Other credential providers should be preferred if + * at all possible. If using this option, you should make sure that the shared + * credentials file is as locked down as possible using security best practices + * for your operating system. + * + * ## Using custom profiles + * + * The SDK supports loading credentials for separate profiles. This can be done + * in two ways: + * + * 1. Set the `AWS_PROFILE` environment variable in your process prior to + * loading the SDK. + * 2. Directly load the AWS.ProcessCredentials provider: + * + * ```javascript + * var creds = new AWS.ProcessCredentials({profile: 'myprofile'}); + * AWS.config.credentials = creds; + * ``` + * + * @!macro nobrowser + */ +AWS.ProcessCredentials = AWS.util.inherit(AWS.Credentials, { + /** + * Creates a new ProcessCredentials object. + * + * @param options [map] a set of options + * @option options profile [String] (AWS_PROFILE env var or 'default') + * the name of the profile to load. + * @option options filename [String] ('~/.aws/credentials' or defined by + * AWS_SHARED_CREDENTIALS_FILE process env var) + * the filename to use when loading credentials. + * @option options callback [Function] (err) Credentials are eagerly loaded + * by the constructor. When the callback is called with no error, the + * credentials have been loaded successfully. + */ + constructor: function ProcessCredentials(options) { + AWS.Credentials.call(this); + + options = options || {}; + + this.filename = options.filename; + this.profile = options.profile || process.env.AWS_PROFILE || AWS.util.defaultProfile; + this.get(options.callback || AWS.util.fn.noop); + }, + + /** + * @api private + */ + load: function load(callback) { + var self = this; + try { + var profiles = AWS.util.getProfilesFromSharedConfig(iniLoader, this.filename); + var profile = profiles[this.profile] || {}; + + if (Object.keys(profile).length === 0) { + throw AWS.util.error( + new Error('Profile ' + this.profile + ' not found'), + { code: 'ProcessCredentialsProviderFailure' } + ); + } - canonicalHeaders: function canonicalHeaders() { - var headers = []; - AWS.util.each.call(this, this.request.headers, function (key, item) { - headers.push([key, item]); - }); - headers.sort(function (a, b) { - return a[0].toLowerCase() < b[0].toLowerCase() ? -1 : 1; - }); - var parts = []; - AWS.util.arrayEach.call(this, headers, function (item) { - var key = item[0].toLowerCase(); - if (this.isSignableHeader(key)) { - var value = item[1]; - if ( - typeof value === "undefined" || - value === null || - typeof value.toString !== "function" - ) { - throw AWS.util.error( - new Error("Header " + key + " contains invalid value"), - { - code: "InvalidHeader", - } - ); - } - parts.push( - key + ":" + this.canonicalHeaderValues(value.toString()) - ); + if (profile['credential_process']) { + this.loadViaCredentialProcess(profile, function(err, data) { + if (err) { + callback(err, null); + } else { + self.expired = false; + self.accessKeyId = data.AccessKeyId; + self.secretAccessKey = data.SecretAccessKey; + self.sessionToken = data.SessionToken; + if (data.Expiration) { + self.expireTime = new Date(data.Expiration); } - }); - return parts.join("\n"); - }, - - canonicalHeaderValues: function canonicalHeaderValues(values) { - return values.replace(/\s+/g, " ").replace(/^\s+|\s+$/g, ""); - }, + callback(null); + } + }); + } else { + throw AWS.util.error( + new Error('Profile ' + this.profile + ' did not include credential process'), + { code: 'ProcessCredentialsProviderFailure' } + ); + } + } catch (err) { + callback(err); + } + }, + + /** + * Executes the credential_process and retrieves + * credentials from the output + * @api private + * @param profile [map] credentials profile + * @throws ProcessCredentialsProviderFailure + */ + loadViaCredentialProcess: function loadViaCredentialProcess(profile, callback) { + proc.exec(profile['credential_process'], function(err, stdOut, stdErr) { + if (err) { + callback(AWS.util.error( + new Error('credential_process returned error'), + { code: 'ProcessCredentialsProviderFailure'} + ), null); + } else { + try { + var credData = JSON.parse(stdOut); + if (credData.Expiration) { + var currentTime = AWS.util.date.getDate(); + var expireTime = new Date(credData.Expiration); + if (expireTime < currentTime) { + throw Error('credential_process returned expired credentials'); + } + } - signedHeaders: function signedHeaders() { - var keys = []; - AWS.util.each.call(this, this.request.headers, function (key) { - key = key.toLowerCase(); - if (this.isSignableHeader(key)) keys.push(key); - }); - return keys.sort().join(";"); - }, + if (credData.Version !== 1) { + throw Error('credential_process does not return Version == 1'); + } + callback(null, credData); + } catch (err) { + callback(AWS.util.error( + new Error(err.message), + { code: 'ProcessCredentialsProviderFailure'} + ), null); + } + } + }); + }, + + /** + * Loads the credentials from the credential process + * + * @callback callback function(err) + * Called after the credential process has been executed. When this + * callback is called with no error, it means that the credentials + * information has been loaded into the object (as the `accessKeyId`, + * `secretAccessKey`, and `sessionToken` properties). + * @param err [Error] if an error occurred, this value will be filled + * @see get + */ + refresh: function refresh(callback) { + iniLoader.clearCachedFiles(); + this.coalesceRefresh(callback || AWS.util.fn.callback); + } +}); + + +/***/ }), + +/***/ 88764: +/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { + +var AWS = __nccwpck_require__(28437), + ENV_RELATIVE_URI = 'AWS_CONTAINER_CREDENTIALS_RELATIVE_URI', + ENV_FULL_URI = 'AWS_CONTAINER_CREDENTIALS_FULL_URI', + ENV_AUTH_TOKEN = 'AWS_CONTAINER_AUTHORIZATION_TOKEN', + FULL_URI_UNRESTRICTED_PROTOCOLS = ['https:'], + FULL_URI_ALLOWED_PROTOCOLS = ['http:', 'https:'], + FULL_URI_ALLOWED_HOSTNAMES = ['localhost', '127.0.0.1'], + RELATIVE_URI_HOST = '169.254.170.2'; + +/** + * Represents credentials received from specified URI. + * + * This class will request refreshable credentials from the relative URI + * specified by the AWS_CONTAINER_CREDENTIALS_RELATIVE_URI or the + * AWS_CONTAINER_CREDENTIALS_FULL_URI environment variable. If valid credentials + * are returned in the response, these will be used with zero configuration. + * + * This credentials class will by default timeout after 1 second of inactivity + * and retry 3 times. + * If your requests to the relative URI are timing out, you can increase + * the value by configuring them directly: + * + * ```javascript + * AWS.config.credentials = new AWS.RemoteCredentials({ + * httpOptions: { timeout: 5000 }, // 5 second timeout + * maxRetries: 10, // retry 10 times + * retryDelayOptions: { base: 200 } // see AWS.Config for information + * }); + * ``` + * + * @see AWS.Config.retryDelayOptions + * + * @!macro nobrowser + */ +AWS.RemoteCredentials = AWS.util.inherit(AWS.Credentials, { + constructor: function RemoteCredentials(options) { + AWS.Credentials.call(this); + options = options ? AWS.util.copy(options) : {}; + if (!options.httpOptions) options.httpOptions = {}; + options.httpOptions = AWS.util.merge( + this.httpOptions, options.httpOptions); + AWS.util.update(this, options); + }, + + /** + * @api private + */ + httpOptions: { timeout: 1000 }, + + /** + * @api private + */ + maxRetries: 3, + + /** + * @api private + */ + isConfiguredForEcsCredentials: function isConfiguredForEcsCredentials() { + return Boolean( + process && + process.env && + (process.env[ENV_RELATIVE_URI] || process.env[ENV_FULL_URI]) + ); + }, + + /** + * @api private + */ + getECSFullUri: function getECSFullUri() { + if (process && process.env) { + var relative = process.env[ENV_RELATIVE_URI], + full = process.env[ENV_FULL_URI]; + if (relative) { + return 'http://' + RELATIVE_URI_HOST + relative; + } else if (full) { + var parsed = AWS.util.urlParse(full); + if (FULL_URI_ALLOWED_PROTOCOLS.indexOf(parsed.protocol) < 0) { + throw AWS.util.error( + new Error('Unsupported protocol: AWS.RemoteCredentials supports ' + + FULL_URI_ALLOWED_PROTOCOLS.join(',') + ' only; ' + + parsed.protocol + ' requested.'), + { code: 'ECSCredentialsProviderFailure' } + ); + } - credentialString: function credentialString(datetime) { - return v4Credentials.createScope( - datetime.substr(0, 8), - this.request.region, - this.serviceName + if (FULL_URI_UNRESTRICTED_PROTOCOLS.indexOf(parsed.protocol) < 0 && + FULL_URI_ALLOWED_HOSTNAMES.indexOf(parsed.hostname) < 0) { + throw AWS.util.error( + new Error('Unsupported hostname: AWS.RemoteCredentials only supports ' + + FULL_URI_ALLOWED_HOSTNAMES.join(',') + ' for ' + parsed.protocol + '; ' + + parsed.protocol + '//' + parsed.hostname + ' requested.'), + { code: 'ECSCredentialsProviderFailure' } ); - }, + } - hexEncodedHash: function hash(string) { - return AWS.util.crypto.sha256(string, "hex"); - }, + return full; + } else { + throw AWS.util.error( + new Error('Variable ' + ENV_RELATIVE_URI + ' or ' + ENV_FULL_URI + + ' must be set to use AWS.RemoteCredentials.'), + { code: 'ECSCredentialsProviderFailure' } + ); + } + } else { + throw AWS.util.error( + new Error('No process info available'), + { code: 'ECSCredentialsProviderFailure' } + ); + } + }, + + /** + * @api private + */ + getECSAuthToken: function getECSAuthToken() { + if (process && process.env && process.env[ENV_FULL_URI]) { + return process.env[ENV_AUTH_TOKEN]; + } + }, + + /** + * @api private + */ + credsFormatIsValid: function credsFormatIsValid(credData) { + return (!!credData.accessKeyId && !!credData.secretAccessKey && + !!credData.sessionToken && !!credData.expireTime); + }, + + /** + * @api private + */ + formatCreds: function formatCreds(credData) { + if (!!credData.credentials) { + credData = credData.credentials; + } + + return { + expired: false, + accessKeyId: credData.accessKeyId || credData.AccessKeyId, + secretAccessKey: credData.secretAccessKey || credData.SecretAccessKey, + sessionToken: credData.sessionToken || credData.Token, + expireTime: new Date(credData.expiration || credData.Expiration) + }; + }, + + /** + * @api private + */ + request: function request(url, callback) { + var httpRequest = new AWS.HttpRequest(url); + httpRequest.method = 'GET'; + httpRequest.headers.Accept = 'application/json'; + var token = this.getECSAuthToken(); + if (token) { + httpRequest.headers.Authorization = token; + } + AWS.util.handleRequestWithRetries(httpRequest, this, callback); + }, + + /** + * Loads the credentials from the relative URI specified by container + * + * @callback callback function(err) + * Called when the request to the relative URI responds (or fails). When + * this callback is called with no error, it means that the credentials + * information has been loaded into the object (as the `accessKeyId`, + * `secretAccessKey`, `sessionToken`, and `expireTime` properties). + * @param err [Error] if an error occurred, this value will be filled + * @see get + */ + refresh: function refresh(callback) { + this.coalesceRefresh(callback || AWS.util.fn.callback); + }, + + /** + * @api private + */ + load: function load(callback) { + var self = this; + var fullUri; + + try { + fullUri = this.getECSFullUri(); + } catch (err) { + callback(err); + return; + } + + this.request(fullUri, function(err, data) { + if (!err) { + try { + data = JSON.parse(data); + var creds = self.formatCreds(data); + if (!self.credsFormatIsValid(creds)) { + throw AWS.util.error( + new Error('Response data is not in valid format'), + { code: 'ECSCredentialsProviderFailure' } + ); + } + AWS.util.update(self, creds); + } catch (dataError) { + err = dataError; + } + } + callback(err, creds); + }); + } +}); + + +/***/ }), + +/***/ 15037: +/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { + +var AWS = __nccwpck_require__(28437); +var STS = __nccwpck_require__(57513); + +/** + * Represents credentials retrieved from STS SAML support. + * + * By default this provider gets credentials using the + * {AWS.STS.assumeRoleWithSAML} service operation. This operation + * requires a `RoleArn` containing the ARN of the IAM trust policy for the + * application for which credentials will be given, as well as a `PrincipalArn` + * representing the ARN for the SAML identity provider. In addition, the + * `SAMLAssertion` must be set to the token provided by the identity + * provider. See {constructor} for an example on creating a credentials + * object with proper `RoleArn`, `PrincipalArn`, and `SAMLAssertion` values. + * + * ## Refreshing Credentials from Identity Service + * + * In addition to AWS credentials expiring after a given amount of time, the + * login token from the identity provider will also expire. Once this token + * expires, it will not be usable to refresh AWS credentials, and another + * token will be needed. The SDK does not manage refreshing of the token value, + * but this can be done through a "refresh token" supported by most identity + * providers. Consult the documentation for the identity provider for refreshing + * tokens. Once the refreshed token is acquired, you should make sure to update + * this new token in the credentials object's {params} property. The following + * code will update the SAMLAssertion, assuming you have retrieved an updated + * token from the identity provider: + * + * ```javascript + * AWS.config.credentials.params.SAMLAssertion = updatedToken; + * ``` + * + * Future calls to `credentials.refresh()` will now use the new token. + * + * @!attribute params + * @return [map] the map of params passed to + * {AWS.STS.assumeRoleWithSAML}. To update the token, set the + * `params.SAMLAssertion` property. + */ +AWS.SAMLCredentials = AWS.util.inherit(AWS.Credentials, { + /** + * Creates a new credentials object. + * @param (see AWS.STS.assumeRoleWithSAML) + * @example Creating a new credentials object + * AWS.config.credentials = new AWS.SAMLCredentials({ + * RoleArn: 'arn:aws:iam::1234567890:role/SAMLRole', + * PrincipalArn: 'arn:aws:iam::1234567890:role/SAMLPrincipal', + * SAMLAssertion: 'base64-token', // base64-encoded token from IdP + * }); + * @see AWS.STS.assumeRoleWithSAML + */ + constructor: function SAMLCredentials(params) { + AWS.Credentials.call(this); + this.expired = true; + this.params = params; + }, + + /** + * Refreshes credentials using {AWS.STS.assumeRoleWithSAML} + * + * @callback callback function(err) + * Called when the STS service responds (or fails). When + * this callback is called with no error, it means that the credentials + * information has been loaded into the object (as the `accessKeyId`, + * `secretAccessKey`, and `sessionToken` properties). + * @param err [Error] if an error occurred, this value will be filled + * @see get + */ + refresh: function refresh(callback) { + this.coalesceRefresh(callback || AWS.util.fn.callback); + }, + + /** + * @api private + */ + load: function load(callback) { + var self = this; + self.createClients(); + self.service.assumeRoleWithSAML(function (err, data) { + if (!err) { + self.service.credentialsFrom(data, self); + } + callback(err); + }); + }, + + /** + * @api private + */ + createClients: function() { + this.service = this.service || new STS({params: this.params}); + } + +}); + + +/***/ }), + +/***/ 13754: +/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { + +var AWS = __nccwpck_require__(28437); +var STS = __nccwpck_require__(57513); +var iniLoader = AWS.util.iniLoader; + +var ASSUME_ROLE_DEFAULT_REGION = 'us-east-1'; + +/** + * Represents credentials loaded from shared credentials file + * (defaulting to ~/.aws/credentials or defined by the + * `AWS_SHARED_CREDENTIALS_FILE` environment variable). + * + * ## Using the shared credentials file + * + * This provider is checked by default in the Node.js environment. To use the + * credentials file provider, simply add your access and secret keys to the + * ~/.aws/credentials file in the following format: + * + * [default] + * aws_access_key_id = AKID... + * aws_secret_access_key = YOUR_SECRET_KEY + * + * ## Using custom profiles + * + * The SDK supports loading credentials for separate profiles. This can be done + * in two ways: + * + * 1. Set the `AWS_PROFILE` environment variable in your process prior to + * loading the SDK. + * 2. Directly load the AWS.SharedIniFileCredentials provider: + * + * ```javascript + * var creds = new AWS.SharedIniFileCredentials({profile: 'myprofile'}); + * AWS.config.credentials = creds; + * ``` + * + * @!macro nobrowser + */ +AWS.SharedIniFileCredentials = AWS.util.inherit(AWS.Credentials, { + /** + * Creates a new SharedIniFileCredentials object. + * + * @param options [map] a set of options + * @option options profile [String] (AWS_PROFILE env var or 'default') + * the name of the profile to load. + * @option options filename [String] ('~/.aws/credentials' or defined by + * AWS_SHARED_CREDENTIALS_FILE process env var) + * the filename to use when loading credentials. + * @option options disableAssumeRole [Boolean] (false) True to disable + * support for profiles that assume an IAM role. If true, and an assume + * role profile is selected, an error is raised. + * @option options preferStaticCredentials [Boolean] (false) True to + * prefer static credentials to role_arn if both are present. + * @option options tokenCodeFn [Function] (null) Function to provide + * STS Assume Role TokenCode, if mfa_serial is provided for profile in ini + * file. Function is called with value of mfa_serial and callback, and + * should provide the TokenCode or an error to the callback in the format + * callback(err, token) + * @option options callback [Function] (err) Credentials are eagerly loaded + * by the constructor. When the callback is called with no error, the + * credentials have been loaded successfully. + * @option options httpOptions [map] A set of options to pass to the low-level + * HTTP request. Currently supported options are: + * * **proxy** [String] — the URL to proxy requests through + * * **agent** [http.Agent, https.Agent] — the Agent object to perform + * HTTP requests with. Used for connection pooling. Defaults to the global + * agent (`http.globalAgent`) for non-SSL connections. Note that for + * SSL connections, a special Agent object is used in order to enable + * peer certificate verification. This feature is only available in the + * Node.js environment. + * * **connectTimeout** [Integer] — Sets the socket to timeout after + * failing to establish a connection with the server after + * `connectTimeout` milliseconds. This timeout has no effect once a socket + * connection has been established. + * * **timeout** [Integer] — The number of milliseconds a request can + * take before automatically being terminated. + * Defaults to two minutes (120000). + */ + constructor: function SharedIniFileCredentials(options) { + AWS.Credentials.call(this); + + options = options || {}; + + this.filename = options.filename; + this.profile = options.profile || process.env.AWS_PROFILE || AWS.util.defaultProfile; + this.disableAssumeRole = Boolean(options.disableAssumeRole); + this.preferStaticCredentials = Boolean(options.preferStaticCredentials); + this.tokenCodeFn = options.tokenCodeFn || null; + this.httpOptions = options.httpOptions || null; + this.get(options.callback || AWS.util.fn.noop); + }, + + /** + * @api private + */ + load: function load(callback) { + var self = this; + try { + var profiles = AWS.util.getProfilesFromSharedConfig(iniLoader, this.filename); + var profile = profiles[this.profile] || {}; + + if (Object.keys(profile).length === 0) { + throw AWS.util.error( + new Error('Profile ' + this.profile + ' not found'), + { code: 'SharedIniFileCredentialsProviderFailure' } + ); + } - hexEncodedBodyHash: function hexEncodedBodyHash() { - var request = this.request; - if ( - this.isPresigned() && - this.serviceName === "s3" && - !request.body - ) { - return "UNSIGNED-PAYLOAD"; - } else if (request.headers["X-Amz-Content-Sha256"]) { - return request.headers["X-Amz-Content-Sha256"]; + /* + In the CLI, the presence of both a role_arn and static credentials have + different meanings depending on how many profiles have been visited. For + the first profile processed, role_arn takes precedence over any static + credentials, but for all subsequent profiles, static credentials are + used if present, and only in their absence will the profile's + source_profile and role_arn keys be used to load another set of + credentials. This var is intended to yield compatible behaviour in this + sdk. + */ + var preferStaticCredentialsToRoleArn = Boolean( + this.preferStaticCredentials + && profile['aws_access_key_id'] + && profile['aws_secret_access_key'] + ); + + if (profile['role_arn'] && !preferStaticCredentialsToRoleArn) { + this.loadRoleProfile(profiles, profile, function(err, data) { + if (err) { + callback(err); } else { - return this.hexEncodedHash(this.request.body || ""); + self.expired = false; + self.accessKeyId = data.Credentials.AccessKeyId; + self.secretAccessKey = data.Credentials.SecretAccessKey; + self.sessionToken = data.Credentials.SessionToken; + self.expireTime = data.Credentials.Expiration; + callback(null); } - }, + }); + return; + } - unsignableHeaders: [ - "authorization", - "content-type", - "content-length", - "user-agent", - expiresHeader, - "expect", - "x-amzn-trace-id", - ], + this.accessKeyId = profile['aws_access_key_id']; + this.secretAccessKey = profile['aws_secret_access_key']; + this.sessionToken = profile['aws_session_token']; - isSignableHeader: function isSignableHeader(key) { - if (key.toLowerCase().indexOf("x-amz-") === 0) return true; - return this.unsignableHeaders.indexOf(key) < 0; - }, + if (!this.accessKeyId || !this.secretAccessKey) { + throw AWS.util.error( + new Error('Credentials not set for profile ' + this.profile), + { code: 'SharedIniFileCredentialsProviderFailure' } + ); + } + this.expired = false; + callback(null); + } catch (err) { + callback(err); + } + }, + + /** + * Loads the credentials from the shared credentials file + * + * @callback callback function(err) + * Called after the shared INI file on disk is read and parsed. When this + * callback is called with no error, it means that the credentials + * information has been loaded into the object (as the `accessKeyId`, + * `secretAccessKey`, and `sessionToken` properties). + * @param err [Error] if an error occurred, this value will be filled + * @see get + */ + refresh: function refresh(callback) { + iniLoader.clearCachedFiles(); + this.coalesceRefresh( + callback || AWS.util.fn.callback, + this.disableAssumeRole + ); + }, + + /** + * @api private + */ + loadRoleProfile: function loadRoleProfile(creds, roleProfile, callback) { + if (this.disableAssumeRole) { + throw AWS.util.error( + new Error('Role assumption profiles are disabled. ' + + 'Failed to load profile ' + this.profile + + ' from ' + creds.filename), + { code: 'SharedIniFileCredentialsProviderFailure' } + ); + } + + var self = this; + var roleArn = roleProfile['role_arn']; + var roleSessionName = roleProfile['role_session_name']; + var externalId = roleProfile['external_id']; + var mfaSerial = roleProfile['mfa_serial']; + var sourceProfileName = roleProfile['source_profile']; + + // From experimentation, the following behavior mimics the AWS CLI: + // + // 1. Use region from the profile if present. + // 2. Otherwise fall back to N. Virginia (global endpoint). + // + // It is necessary to do the fallback explicitly, because if + // 'AWS_STS_REGIONAL_ENDPOINTS=regional', the underlying STS client will + // otherwise throw an error if region is left 'undefined'. + // + // Experimentation shows that the AWS CLI (tested at version 1.18.136) + // ignores the following potential sources of a region for the purposes of + // this AssumeRole call: + // + // - The [default] profile + // - The AWS_REGION environment variable + // + // Ignoring the [default] profile for the purposes of AssumeRole is arguably + // a bug in the CLI since it does use the [default] region for service + // calls... but right now we're matching behavior of the other tool. + var profileRegion = roleProfile['region'] || ASSUME_ROLE_DEFAULT_REGION; + + if (!sourceProfileName) { + throw AWS.util.error( + new Error('source_profile is not set using profile ' + this.profile), + { code: 'SharedIniFileCredentialsProviderFailure' } + ); + } + + var sourceProfileExistanceTest = creds[sourceProfileName]; + + if (typeof sourceProfileExistanceTest !== 'object') { + throw AWS.util.error( + new Error('source_profile ' + sourceProfileName + ' using profile ' + + this.profile + ' does not exist'), + { code: 'SharedIniFileCredentialsProviderFailure' } + ); + } + + var sourceCredentials = new AWS.SharedIniFileCredentials( + AWS.util.merge(this.options || {}, { + profile: sourceProfileName, + preferStaticCredentials: true + }) + ); + + this.roleArn = roleArn; + var sts = new STS({ + credentials: sourceCredentials, + region: profileRegion, + httpOptions: this.httpOptions + }); + + var roleParams = { + RoleArn: roleArn, + RoleSessionName: roleSessionName || 'aws-sdk-js-' + Date.now() + }; + + if (externalId) { + roleParams.ExternalId = externalId; + } + + if (mfaSerial && self.tokenCodeFn) { + roleParams.SerialNumber = mfaSerial; + self.tokenCodeFn(mfaSerial, function(err, token) { + if (err) { + var message; + if (err instanceof Error) { + message = err.message; + } else { + message = err; + } + callback( + AWS.util.error( + new Error('Error fetching MFA token: ' + message), + { code: 'SharedIniFileCredentialsProviderFailure' } + )); + return; + } - isPresigned: function isPresigned() { - return this.request.headers[expiresHeader] ? true : false; - }, + roleParams.TokenCode = token; + sts.assumeRole(roleParams, callback); }); - - /** - * @api private - */ - module.exports = AWS.Signers.V4; - - /***/ - }, - - /***/ 62660: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var AWS = __nccwpck_require__(28437); - - /** - * @api private - */ - var cachedSecret = {}; - - /** - * @api private - */ - var cacheQueue = []; - - /** - * @api private - */ - var maxCacheEntries = 50; - - /** - * @api private - */ - var v4Identifier = "aws4_request"; - - /** - * @api private - */ - module.exports = { - /** - * @api private - * - * @param date [String] - * @param region [String] - * @param serviceName [String] - * @return [String] - */ - createScope: function createScope(date, region, serviceName) { - return [date.substr(0, 8), region, serviceName, v4Identifier].join( - "/" - ); + return; + } + sts.assumeRole(roleParams, callback); + } +}); + + +/***/ }), + +/***/ 77360: +/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { + +var AWS = __nccwpck_require__(28437); +var STS = __nccwpck_require__(57513); + +/** + * Represents temporary credentials retrieved from {AWS.STS}. Without any + * extra parameters, credentials will be fetched from the + * {AWS.STS.getSessionToken} operation. If an IAM role is provided, the + * {AWS.STS.assumeRole} operation will be used to fetch credentials for the + * role instead. + * + * @note AWS.TemporaryCredentials is deprecated, but remains available for + * backwards compatibility. {AWS.ChainableTemporaryCredentials} is the + * preferred class for temporary credentials. + * + * To setup temporary credentials, configure a set of master credentials + * using the standard credentials providers (environment, EC2 instance metadata, + * or from the filesystem), then set the global credentials to a new + * temporary credentials object: + * + * ```javascript + * // Note that environment credentials are loaded by default, + * // the following line is shown for clarity: + * AWS.config.credentials = new AWS.EnvironmentCredentials('AWS'); + * + * // Now set temporary credentials seeded from the master credentials + * AWS.config.credentials = new AWS.TemporaryCredentials(); + * + * // subsequent requests will now use temporary credentials from AWS STS. + * new AWS.S3().listBucket(function(err, data) { ... }); + * ``` + * + * @!attribute masterCredentials + * @return [AWS.Credentials] the master (non-temporary) credentials used to + * get and refresh temporary credentials from AWS STS. + * @note (see constructor) + */ +AWS.TemporaryCredentials = AWS.util.inherit(AWS.Credentials, { + /** + * Creates a new temporary credentials object. + * + * @note In order to create temporary credentials, you first need to have + * "master" credentials configured in {AWS.Config.credentials}. These + * master credentials are necessary to retrieve the temporary credentials, + * as well as refresh the credentials when they expire. + * @param params [map] a map of options that are passed to the + * {AWS.STS.assumeRole} or {AWS.STS.getSessionToken} operations. + * If a `RoleArn` parameter is passed in, credentials will be based on the + * IAM role. + * @param masterCredentials [AWS.Credentials] the master (non-temporary) credentials + * used to get and refresh temporary credentials from AWS STS. + * @example Creating a new credentials object for generic temporary credentials + * AWS.config.credentials = new AWS.TemporaryCredentials(); + * @example Creating a new credentials object for an IAM role + * AWS.config.credentials = new AWS.TemporaryCredentials({ + * RoleArn: 'arn:aws:iam::1234567890:role/TemporaryCredentials', + * }); + * @see AWS.STS.assumeRole + * @see AWS.STS.getSessionToken + */ + constructor: function TemporaryCredentials(params, masterCredentials) { + AWS.Credentials.call(this); + this.loadMasterCredentials(masterCredentials); + this.expired = true; + + this.params = params || {}; + if (this.params.RoleArn) { + this.params.RoleSessionName = + this.params.RoleSessionName || 'temporary-credentials'; + } + }, + + /** + * Refreshes credentials using {AWS.STS.assumeRole} or + * {AWS.STS.getSessionToken}, depending on whether an IAM role ARN was passed + * to the credentials {constructor}. + * + * @callback callback function(err) + * Called when the STS service responds (or fails). When + * this callback is called with no error, it means that the credentials + * information has been loaded into the object (as the `accessKeyId`, + * `secretAccessKey`, and `sessionToken` properties). + * @param err [Error] if an error occurred, this value will be filled + * @see get + */ + refresh: function refresh (callback) { + this.coalesceRefresh(callback || AWS.util.fn.callback); + }, + + /** + * @api private + */ + load: function load (callback) { + var self = this; + self.createClients(); + self.masterCredentials.get(function () { + self.service.config.credentials = self.masterCredentials; + var operation = self.params.RoleArn ? + self.service.assumeRole : self.service.getSessionToken; + operation.call(self.service, function (err, data) { + if (!err) { + self.service.credentialsFrom(data, self); + } + callback(err); + }); + }); + }, + + /** + * @api private + */ + loadMasterCredentials: function loadMasterCredentials (masterCredentials) { + this.masterCredentials = masterCredentials || AWS.config.credentials; + while (this.masterCredentials.masterCredentials) { + this.masterCredentials = this.masterCredentials.masterCredentials; + } + + if (typeof this.masterCredentials.get !== 'function') { + this.masterCredentials = new AWS.Credentials(this.masterCredentials); + } + }, + + /** + * @api private + */ + createClients: function () { + this.service = this.service || new STS({params: this.params}); + } + +}); + + +/***/ }), + +/***/ 11017: +/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { + +var AWS = __nccwpck_require__(28437); +var fs = __nccwpck_require__(57147); +var STS = __nccwpck_require__(57513); +var iniLoader = AWS.util.iniLoader; + +/** + * Represents OIDC credentials from a file on disk + * If the credentials expire, the SDK can {refresh} the credentials + * from the file. + * + * ## Using the web identity token file + * + * This provider is checked by default in the Node.js environment. To use + * the provider simply add your OIDC token to a file (ASCII encoding) and + * share the filename in either AWS_WEB_IDENTITY_TOKEN_FILE environment + * variable or web_identity_token_file shared config variable + * + * The file contains encoded OIDC token and the characters are + * ASCII encoded. OIDC tokens are JSON Web Tokens (JWT). + * JWT's are 3 base64 encoded strings joined by the '.' character. + * + * This class will read filename from AWS_WEB_IDENTITY_TOKEN_FILE + * environment variable or web_identity_token_file shared config variable, + * and get the OIDC token from filename. + * It will also read IAM role to be assumed from AWS_ROLE_ARN + * environment variable or role_arn shared config variable. + * This provider gets credetials using the {AWS.STS.assumeRoleWithWebIdentity} + * service operation + * + * @!macro nobrowser + */ +AWS.TokenFileWebIdentityCredentials = AWS.util.inherit(AWS.Credentials, { + + /** + * @example Creating a new credentials object + * AWS.config.credentials = new AWS.TokenFileWebIdentityCredentials( + * // optionally provide configuration to apply to the underlying AWS.STS service client + * // if configuration is not provided, then configuration will be pulled from AWS.config + * { + * // specify timeout options + * httpOptions: { + * timeout: 100 + * } + * }); + * @see AWS.Config + */ + constructor: function TokenFileWebIdentityCredentials(clientConfig) { + AWS.Credentials.call(this); + this.data = null; + this.clientConfig = AWS.util.copy(clientConfig || {}); + }, + + /** + * Returns params from environment variables + * + * @api private + */ + getParamsFromEnv: function getParamsFromEnv() { + var ENV_TOKEN_FILE = 'AWS_WEB_IDENTITY_TOKEN_FILE', + ENV_ROLE_ARN = 'AWS_ROLE_ARN'; + if (process.env[ENV_TOKEN_FILE] && process.env[ENV_ROLE_ARN]) { + return [{ + envTokenFile: process.env[ENV_TOKEN_FILE], + roleArn: process.env[ENV_ROLE_ARN], + roleSessionName: process.env['AWS_ROLE_SESSION_NAME'] + }]; + } + }, + + /** + * Returns params from shared config variables + * + * @api private + */ + getParamsFromSharedConfig: function getParamsFromSharedConfig() { + var profiles = AWS.util.getProfilesFromSharedConfig(iniLoader); + var profileName = process.env.AWS_PROFILE || AWS.util.defaultProfile; + var profile = profiles[profileName] || {}; + + if (Object.keys(profile).length === 0) { + throw AWS.util.error( + new Error('Profile ' + profileName + ' not found'), + { code: 'TokenFileWebIdentityCredentialsProviderFailure' } + ); + } + + var paramsArray = []; + + while (!profile['web_identity_token_file'] && profile['source_profile']) { + paramsArray.unshift({ + roleArn: profile['role_arn'], + roleSessionName: profile['role_session_name'] + }); + var sourceProfile = profile['source_profile']; + profile = profiles[sourceProfile]; + } + + paramsArray.unshift({ + envTokenFile: profile['web_identity_token_file'], + roleArn: profile['role_arn'], + roleSessionName: profile['role_session_name'] + }); + + return paramsArray; + }, + + /** + * Refreshes credentials using {AWS.STS.assumeRoleWithWebIdentity} + * + * @callback callback function(err) + * Called when the STS service responds (or fails). When + * this callback is called with no error, it means that the credentials + * information has been loaded into the object (as the `accessKeyId`, + * `secretAccessKey`, and `sessionToken` properties). + * @param err [Error] if an error occurred, this value will be filled + * @see AWS.Credentials.get + */ + refresh: function refresh(callback) { + this.coalesceRefresh(callback || AWS.util.fn.callback); + }, + + /** + * @api private + */ + assumeRoleChaining: function assumeRoleChaining(paramsArray, callback) { + var self = this; + if (paramsArray.length === 0) { + self.service.credentialsFrom(self.data, self); + callback(); + } else { + var params = paramsArray.shift(); + self.service.config.credentials = self.service.credentialsFrom(self.data, self); + self.service.assumeRole( + { + RoleArn: params.roleArn, + RoleSessionName: params.roleSessionName || 'token-file-web-identity' }, - - /** - * @api private - * - * @param credentials [Credentials] - * @param date [String] - * @param region [String] - * @param service [String] - * @param shouldCache [Boolean] - * @return [String] - */ - getSigningKey: function getSigningKey( - credentials, - date, - region, - service, - shouldCache - ) { - var credsIdentifier = AWS.util.crypto.hmac( - credentials.secretAccessKey, - credentials.accessKeyId, - "base64" - ); - var cacheKey = [credsIdentifier, date, region, service].join("_"); - shouldCache = shouldCache !== false; - if (shouldCache && cacheKey in cachedSecret) { - return cachedSecret[cacheKey]; + function (err, data) { + self.data = null; + if (err) { + callback(err); + } else { + self.data = data; + self.assumeRoleChaining(paramsArray, callback); } + } + ); + } + }, - var kDate = AWS.util.crypto.hmac( - "AWS4" + credentials.secretAccessKey, - date, - "buffer" - ); - var kRegion = AWS.util.crypto.hmac(kDate, region, "buffer"); - var kService = AWS.util.crypto.hmac(kRegion, service, "buffer"); - - var signingKey = AWS.util.crypto.hmac( - kService, - v4Identifier, - "buffer" - ); - if (shouldCache) { - cachedSecret[cacheKey] = signingKey; - cacheQueue.push(cacheKey); - if (cacheQueue.length > maxCacheEntries) { - // remove the oldest entry (not the least recently used) - delete cachedSecret[cacheQueue.shift()]; + /** + * @api private + */ + load: function load(callback) { + var self = this; + try { + var paramsArray = self.getParamsFromEnv(); + if (!paramsArray) { + paramsArray = self.getParamsFromSharedConfig(); + } + if (paramsArray) { + var params = paramsArray.shift(); + var oidcToken = fs.readFileSync(params.envTokenFile, {encoding: 'ascii'}); + if (!self.service) { + self.createClients(); + } + self.service.assumeRoleWithWebIdentity( + { + WebIdentityToken: oidcToken, + RoleArn: params.roleArn, + RoleSessionName: params.roleSessionName || 'token-file-web-identity' + }, + function (err, data) { + self.data = null; + if (err) { + callback(err); + } else { + self.data = data; + self.assumeRoleChaining(paramsArray, callback); } } - - return signingKey; - }, - - /** - * @api private - * - * Empties the derived signing key cache. Made available for testing purposes - * only. - */ - emptyCache: function emptyCache() { - cachedSecret = {}; - cacheQueue = []; - }, + ); + } + } catch (err) { + callback(err); + } + }, + + /** + * @api private + */ + createClients: function() { + if (!this.service) { + var stsConfig = AWS.util.merge({}, this.clientConfig); + this.service = new STS(stsConfig); + + // Retry in case of IDPCommunicationErrorException or InvalidIdentityToken + this.service.retryableError = function(error) { + if (error.code === 'IDPCommunicationErrorException' || error.code === 'InvalidIdentityToken') { + return true; + } else { + return AWS.Service.prototype.retryableError.call(this, error); + } }; - - /***/ - }, - - /***/ 68118: /***/ (module) => { - function AcceptorStateMachine(states, state) { - this.currentState = state || null; - this.states = states || {}; + } + } +}); + + +/***/ }), + +/***/ 74998: +/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { + +var AWS = __nccwpck_require__(28437); +var STS = __nccwpck_require__(57513); + +/** + * Represents credentials retrieved from STS Web Identity Federation support. + * + * By default this provider gets credentials using the + * {AWS.STS.assumeRoleWithWebIdentity} service operation. This operation + * requires a `RoleArn` containing the ARN of the IAM trust policy for the + * application for which credentials will be given. In addition, the + * `WebIdentityToken` must be set to the token provided by the identity + * provider. See {constructor} for an example on creating a credentials + * object with proper `RoleArn` and `WebIdentityToken` values. + * + * ## Refreshing Credentials from Identity Service + * + * In addition to AWS credentials expiring after a given amount of time, the + * login token from the identity provider will also expire. Once this token + * expires, it will not be usable to refresh AWS credentials, and another + * token will be needed. The SDK does not manage refreshing of the token value, + * but this can be done through a "refresh token" supported by most identity + * providers. Consult the documentation for the identity provider for refreshing + * tokens. Once the refreshed token is acquired, you should make sure to update + * this new token in the credentials object's {params} property. The following + * code will update the WebIdentityToken, assuming you have retrieved an updated + * token from the identity provider: + * + * ```javascript + * AWS.config.credentials.params.WebIdentityToken = updatedToken; + * ``` + * + * Future calls to `credentials.refresh()` will now use the new token. + * + * @!attribute params + * @return [map] the map of params passed to + * {AWS.STS.assumeRoleWithWebIdentity}. To update the token, set the + * `params.WebIdentityToken` property. + * @!attribute data + * @return [map] the raw data response from the call to + * {AWS.STS.assumeRoleWithWebIdentity}. Use this if you want to get + * access to other properties from the response. + */ +AWS.WebIdentityCredentials = AWS.util.inherit(AWS.Credentials, { + /** + * Creates a new credentials object. + * @param (see AWS.STS.assumeRoleWithWebIdentity) + * @example Creating a new credentials object + * AWS.config.credentials = new AWS.WebIdentityCredentials({ + * RoleArn: 'arn:aws:iam::1234567890:role/WebIdentity', + * WebIdentityToken: 'ABCDEFGHIJKLMNOP', // token from identity service + * RoleSessionName: 'web' // optional name, defaults to web-identity + * }, { + * // optionally provide configuration to apply to the underlying AWS.STS service client + * // if configuration is not provided, then configuration will be pulled from AWS.config + * + * // specify timeout options + * httpOptions: { + * timeout: 100 + * } + * }); + * @see AWS.STS.assumeRoleWithWebIdentity + * @see AWS.Config + */ + constructor: function WebIdentityCredentials(params, clientConfig) { + AWS.Credentials.call(this); + this.expired = true; + this.params = params; + this.params.RoleSessionName = this.params.RoleSessionName || 'web-identity'; + this.data = null; + this._clientConfig = AWS.util.copy(clientConfig || {}); + }, + + /** + * Refreshes credentials using {AWS.STS.assumeRoleWithWebIdentity} + * + * @callback callback function(err) + * Called when the STS service responds (or fails). When + * this callback is called with no error, it means that the credentials + * information has been loaded into the object (as the `accessKeyId`, + * `secretAccessKey`, and `sessionToken` properties). + * @param err [Error] if an error occurred, this value will be filled + * @see get + */ + refresh: function refresh(callback) { + this.coalesceRefresh(callback || AWS.util.fn.callback); + }, + + /** + * @api private + */ + load: function load(callback) { + var self = this; + self.createClients(); + self.service.assumeRoleWithWebIdentity(function (err, data) { + self.data = null; + if (!err) { + self.data = data; + self.service.credentialsFrom(data, self); + } + callback(err); + }); + }, + + /** + * @api private + */ + createClients: function() { + if (!this.service) { + var stsConfig = AWS.util.merge({}, this._clientConfig); + stsConfig.params = this.params; + this.service = new STS(stsConfig); + } + } + +}); + + +/***/ }), + +/***/ 45313: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var AWS = __nccwpck_require__(28437); +var util = __nccwpck_require__(77985); +var endpointDiscoveryEnabledEnvs = ['AWS_ENABLE_ENDPOINT_DISCOVERY', 'AWS_ENDPOINT_DISCOVERY_ENABLED']; + +/** + * Generate key (except resources and operation part) to index the endpoints in the cache + * If input shape has endpointdiscoveryid trait then use + * accessKey + operation + resources + region + service as cache key + * If input shape doesn't have endpointdiscoveryid trait then use + * accessKey + region + service as cache key + * @return [map] object with keys to index endpoints. + * @api private + */ +function getCacheKey(request) { + var service = request.service; + var api = service.api || {}; + var operations = api.operations; + var identifiers = {}; + if (service.config.region) { + identifiers.region = service.config.region; + } + if (api.serviceId) { + identifiers.serviceId = api.serviceId; + } + if (service.config.credentials.accessKeyId) { + identifiers.accessKeyId = service.config.credentials.accessKeyId; + } + return identifiers; +} + +/** + * Recursive helper for marshallCustomIdentifiers(). + * Looks for required string input members that have 'endpointdiscoveryid' trait. + * @api private + */ +function marshallCustomIdentifiersHelper(result, params, shape) { + if (!shape || params === undefined || params === null) return; + if (shape.type === 'structure' && shape.required && shape.required.length > 0) { + util.arrayEach(shape.required, function(name) { + var memberShape = shape.members[name]; + if (memberShape.endpointDiscoveryId === true) { + var locationName = memberShape.isLocationName ? memberShape.name : name; + result[locationName] = String(params[name]); + } else { + marshallCustomIdentifiersHelper(result, params[name], memberShape); + } + }); + } +} + +/** + * Get custom identifiers for cache key. + * Identifies custom identifiers by checking each shape's `endpointDiscoveryId` trait. + * @param [object] request object + * @param [object] input shape of the given operation's api + * @api private + */ +function marshallCustomIdentifiers(request, shape) { + var identifiers = {}; + marshallCustomIdentifiersHelper(identifiers, request.params, shape); + return identifiers; +} + +/** + * Call endpoint discovery operation when it's optional. + * When endpoint is available in cache then use the cached endpoints. If endpoints + * are unavailable then use regional endpoints and call endpoint discovery operation + * asynchronously. This is turned off by default. + * @param [object] request object + * @api private + */ +function optionalDiscoverEndpoint(request) { + var service = request.service; + var api = service.api; + var operationModel = api.operations ? api.operations[request.operation] : undefined; + var inputShape = operationModel ? operationModel.input : undefined; + + var identifiers = marshallCustomIdentifiers(request, inputShape); + var cacheKey = getCacheKey(request); + if (Object.keys(identifiers).length > 0) { + cacheKey = util.update(cacheKey, identifiers); + if (operationModel) cacheKey.operation = operationModel.name; + } + var endpoints = AWS.endpointCache.get(cacheKey); + if (endpoints && endpoints.length === 1 && endpoints[0].Address === '') { + //endpoint operation is being made but response not yet received + //or endpoint operation just failed in 1 minute + return; + } else if (endpoints && endpoints.length > 0) { + //found endpoint record from cache + request.httpRequest.updateEndpoint(endpoints[0].Address); + } else { + //endpoint record not in cache or outdated. make discovery operation + var endpointRequest = service.makeRequest(api.endpointOperation, { + Operation: operationModel.name, + Identifiers: identifiers, + }); + addApiVersionHeader(endpointRequest); + endpointRequest.removeListener('validate', AWS.EventListeners.Core.VALIDATE_PARAMETERS); + endpointRequest.removeListener('retry', AWS.EventListeners.Core.RETRY_CHECK); + //put in a placeholder for endpoints already requested, prevent + //too much in-flight calls + AWS.endpointCache.put(cacheKey, [{ + Address: '', + CachePeriodInMinutes: 1 + }]); + endpointRequest.send(function(err, data) { + if (data && data.Endpoints) { + AWS.endpointCache.put(cacheKey, data.Endpoints); + } else if (err) { + AWS.endpointCache.put(cacheKey, [{ + Address: '', + CachePeriodInMinutes: 1 //not to make more endpoint operation in next 1 minute + }]); + } + }); + } +} + +var requestQueue = {}; + +/** + * Call endpoint discovery operation when it's required. + * When endpoint is available in cache then use cached ones. If endpoints are + * unavailable then SDK should call endpoint operation then use returned new + * endpoint for the api call. SDK will automatically attempt to do endpoint + * discovery. This is turned off by default + * @param [object] request object + * @api private + */ +function requiredDiscoverEndpoint(request, done) { + var service = request.service; + var api = service.api; + var operationModel = api.operations ? api.operations[request.operation] : undefined; + var inputShape = operationModel ? operationModel.input : undefined; + + var identifiers = marshallCustomIdentifiers(request, inputShape); + var cacheKey = getCacheKey(request); + if (Object.keys(identifiers).length > 0) { + cacheKey = util.update(cacheKey, identifiers); + if (operationModel) cacheKey.operation = operationModel.name; + } + var cacheKeyStr = AWS.EndpointCache.getKeyString(cacheKey); + var endpoints = AWS.endpointCache.get(cacheKeyStr); //endpoint cache also accepts string keys + if (endpoints && endpoints.length === 1 && endpoints[0].Address === '') { + //endpoint operation is being made but response not yet received + //push request object to a pending queue + if (!requestQueue[cacheKeyStr]) requestQueue[cacheKeyStr] = []; + requestQueue[cacheKeyStr].push({request: request, callback: done}); + return; + } else if (endpoints && endpoints.length > 0) { + request.httpRequest.updateEndpoint(endpoints[0].Address); + done(); + } else { + var endpointRequest = service.makeRequest(api.endpointOperation, { + Operation: operationModel.name, + Identifiers: identifiers, + }); + endpointRequest.removeListener('validate', AWS.EventListeners.Core.VALIDATE_PARAMETERS); + addApiVersionHeader(endpointRequest); + + //put in a placeholder for endpoints already requested, prevent + //too much in-flight calls + AWS.endpointCache.put(cacheKeyStr, [{ + Address: '', + CachePeriodInMinutes: 60 //long-live cache + }]); + endpointRequest.send(function(err, data) { + if (err) { + request.response.error = util.error(err, { retryable: false }); + AWS.endpointCache.remove(cacheKey); + + //fail all the pending requests in batch + if (requestQueue[cacheKeyStr]) { + var pendingRequests = requestQueue[cacheKeyStr]; + util.arrayEach(pendingRequests, function(requestContext) { + requestContext.request.response.error = util.error(err, { retryable: false }); + requestContext.callback(); + }); + delete requestQueue[cacheKeyStr]; + } + } else if (data) { + AWS.endpointCache.put(cacheKeyStr, data.Endpoints); + request.httpRequest.updateEndpoint(data.Endpoints[0].Address); + + //update the endpoint for all the pending requests in batch + if (requestQueue[cacheKeyStr]) { + var pendingRequests = requestQueue[cacheKeyStr]; + util.arrayEach(pendingRequests, function(requestContext) { + requestContext.request.httpRequest.updateEndpoint(data.Endpoints[0].Address); + requestContext.callback(); + }); + delete requestQueue[cacheKeyStr]; + } } + done(); + }); + } +} - AcceptorStateMachine.prototype.runTo = function runTo( - finalState, - done, - bindObject, - inputError - ) { - if (typeof finalState === "function") { - inputError = bindObject; - bindObject = done; - done = finalState; - finalState = null; +/** + * add api version header to endpoint operation + * @api private + */ +function addApiVersionHeader(endpointRequest) { + var api = endpointRequest.service.api; + var apiVersion = api.apiVersion; + if (apiVersion && !endpointRequest.httpRequest.headers['x-amz-api-version']) { + endpointRequest.httpRequest.headers['x-amz-api-version'] = apiVersion; + } +} + +/** + * If api call gets invalid endpoint exception, SDK should attempt to remove the invalid + * endpoint from cache. + * @api private + */ +function invalidateCachedEndpoints(response) { + var error = response.error; + var httpResponse = response.httpResponse; + if (error && + (error.code === 'InvalidEndpointException' || httpResponse.statusCode === 421) + ) { + var request = response.request; + var operations = request.service.api.operations || {}; + var inputShape = operations[request.operation] ? operations[request.operation].input : undefined; + var identifiers = marshallCustomIdentifiers(request, inputShape); + var cacheKey = getCacheKey(request); + if (Object.keys(identifiers).length > 0) { + cacheKey = util.update(cacheKey, identifiers); + if (operations[request.operation]) cacheKey.operation = operations[request.operation].name; + } + AWS.endpointCache.remove(cacheKey); + } +} + +/** + * If endpoint is explicitly configured, SDK should not do endpoint discovery in anytime. + * @param [object] client Service client object. + * @api private + */ +function hasCustomEndpoint(client) { + //if set endpoint is set for specific client, enable endpoint discovery will raise an error. + if (client._originalConfig && client._originalConfig.endpoint && client._originalConfig.endpointDiscoveryEnabled === true) { + throw util.error(new Error(), { + code: 'ConfigurationException', + message: 'Custom endpoint is supplied; endpointDiscoveryEnabled must not be true.' + }); + }; + var svcConfig = AWS.config[client.serviceIdentifier] || {}; + return Boolean(AWS.config.endpoint || svcConfig.endpoint || (client._originalConfig && client._originalConfig.endpoint)); +} + +/** + * @api private + */ +function isFalsy(value) { + return ['false', '0'].indexOf(value) >= 0; +} + +/** + * If endpoint discovery should perform for this request when no operation requires endpoint + * discovery for the given service. + * SDK performs config resolution in order like below: + * 1. If set in client configuration. + * 2. If set in env AWS_ENABLE_ENDPOINT_DISCOVERY. + * 3. If set in shared ini config file with key 'endpoint_discovery_enabled'. + * @param [object] request request object. + * @returns [boolean|undefined] if endpoint discovery config is not set in any source, this + * function returns undefined + * @api private + */ +function resolveEndpointDiscoveryConfig(request) { + var service = request.service || {}; + if (service.config.endpointDiscoveryEnabled !== undefined) { + return service.config.endpointDiscoveryEnabled; + } + + //shared ini file is only available in Node + //not to check env in browser + if (util.isBrowser()) return undefined; + + // If any of recognized endpoint discovery config env is set + for (var i = 0; i < endpointDiscoveryEnabledEnvs.length; i++) { + var env = endpointDiscoveryEnabledEnvs[i]; + if (Object.prototype.hasOwnProperty.call(process.env, env)) { + if (process.env[env] === '' || process.env[env] === undefined) { + throw util.error(new Error(), { + code: 'ConfigurationException', + message: 'environmental variable ' + env + ' cannot be set to nothing' + }); + } + return !isFalsy(process.env[env]); + } + } + + var configFile = {}; + try { + configFile = AWS.util.iniLoader ? AWS.util.iniLoader.loadFrom({ + isConfig: true, + filename: process.env[AWS.util.sharedConfigFileEnv] + }) : {}; + } catch (e) {} + var sharedFileConfig = configFile[ + process.env.AWS_PROFILE || AWS.util.defaultProfile + ] || {}; + if (Object.prototype.hasOwnProperty.call(sharedFileConfig, 'endpoint_discovery_enabled')) { + if (sharedFileConfig.endpoint_discovery_enabled === undefined) { + throw util.error(new Error(), { + code: 'ConfigurationException', + message: 'config file entry \'endpoint_discovery_enabled\' cannot be set to nothing' + }); + } + return !isFalsy(sharedFileConfig.endpoint_discovery_enabled); + } + return undefined; +} + +/** + * attach endpoint discovery logic to request object + * @param [object] request + * @api private + */ +function discoverEndpoint(request, done) { + var service = request.service || {}; + if (hasCustomEndpoint(service) || request.isPresigned()) return done(); + + var operations = service.api.operations || {}; + var operationModel = operations[request.operation]; + var isEndpointDiscoveryRequired = operationModel ? operationModel.endpointDiscoveryRequired : 'NULL'; + var isEnabled = resolveEndpointDiscoveryConfig(request); + var hasRequiredEndpointDiscovery = service.api.hasRequiredEndpointDiscovery; + if (isEnabled || hasRequiredEndpointDiscovery) { + // Once a customer enables endpoint discovery, the SDK should start appending + // the string endpoint-discovery to the user-agent on all requests. + request.httpRequest.appendToUserAgent('endpoint-discovery'); + } + switch (isEndpointDiscoveryRequired) { + case 'OPTIONAL': + if (isEnabled || hasRequiredEndpointDiscovery) { + // For a given service; if at least one operation requires endpoint discovery then the SDK must enable endpoint discovery + // by default for all operations of that service, including operations where endpoint discovery is optional. + optionalDiscoverEndpoint(request); + request.addNamedListener('INVALIDATE_CACHED_ENDPOINTS', 'extractError', invalidateCachedEndpoints); + } + done(); + break; + case 'REQUIRED': + if (isEnabled === false) { + // For a given operation; if endpoint discovery is required and it has been disabled on the SDK client, + // then the SDK must return a clear and actionable exception. + request.response.error = util.error(new Error(), { + code: 'ConfigurationException', + message: 'Endpoint Discovery is disabled but ' + service.api.className + '.' + request.operation + + '() requires it. Please check your configurations.' + }); + done(); + break; + } + request.addNamedListener('INVALIDATE_CACHED_ENDPOINTS', 'extractError', invalidateCachedEndpoints); + requiredDiscoverEndpoint(request, done); + break; + case 'NULL': + default: + done(); + break; + } +} + +module.exports = { + discoverEndpoint: discoverEndpoint, + requiredDiscoverEndpoint: requiredDiscoverEndpoint, + optionalDiscoverEndpoint: optionalDiscoverEndpoint, + marshallCustomIdentifiers: marshallCustomIdentifiers, + getCacheKey: getCacheKey, + invalidateCachedEndpoint: invalidateCachedEndpoints, +}; + + +/***/ }), + +/***/ 76663: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var AWS = __nccwpck_require__(28437); +var util = AWS.util; +var typeOf = (__nccwpck_require__(48084).typeOf); +var DynamoDBSet = __nccwpck_require__(20304); +var NumberValue = __nccwpck_require__(91593); + +AWS.DynamoDB.Converter = { + /** + * Convert a JavaScript value to its equivalent DynamoDB AttributeValue type + * + * @param data [any] The data to convert to a DynamoDB AttributeValue + * @param options [map] + * @option options convertEmptyValues [Boolean] Whether to automatically + * convert empty strings, blobs, + * and sets to `null` + * @option options wrapNumbers [Boolean] Whether to return numbers as a + * NumberValue object instead of + * converting them to native JavaScript + * numbers. This allows for the safe + * round-trip transport of numbers of + * arbitrary size. + * @return [map] An object in the Amazon DynamoDB AttributeValue format + * + * @see AWS.DynamoDB.Converter.marshall AWS.DynamoDB.Converter.marshall to + * convert entire records (rather than individual attributes) + */ + input: function convertInput(data, options) { + options = options || {}; + var type = typeOf(data); + if (type === 'Object') { + return formatMap(data, options); + } else if (type === 'Array') { + return formatList(data, options); + } else if (type === 'Set') { + return formatSet(data, options); + } else if (type === 'String') { + if (data.length === 0 && options.convertEmptyValues) { + return convertInput(null); + } + return { S: data }; + } else if (type === 'Number' || type === 'NumberValue') { + return { N: data.toString() }; + } else if (type === 'Binary') { + if (data.length === 0 && options.convertEmptyValues) { + return convertInput(null); + } + return { B: data }; + } else if (type === 'Boolean') { + return { BOOL: data }; + } else if (type === 'null') { + return { NULL: true }; + } else if (type !== 'undefined' && type !== 'Function') { + // this value has a custom constructor + return formatMap(data, options); + } + }, + + /** + * Convert a JavaScript object into a DynamoDB record. + * + * @param data [any] The data to convert to a DynamoDB record + * @param options [map] + * @option options convertEmptyValues [Boolean] Whether to automatically + * convert empty strings, blobs, + * and sets to `null` + * @option options wrapNumbers [Boolean] Whether to return numbers as a + * NumberValue object instead of + * converting them to native JavaScript + * numbers. This allows for the safe + * round-trip transport of numbers of + * arbitrary size. + * + * @return [map] An object in the DynamoDB record format. + * + * @example Convert a JavaScript object into a DynamoDB record + * var marshalled = AWS.DynamoDB.Converter.marshall({ + * string: 'foo', + * list: ['fizz', 'buzz', 'pop'], + * map: { + * nestedMap: { + * key: 'value', + * } + * }, + * number: 123, + * nullValue: null, + * boolValue: true, + * stringSet: new DynamoDBSet(['foo', 'bar', 'baz']) + * }); + */ + marshall: function marshallItem(data, options) { + return AWS.DynamoDB.Converter.input(data, options).M; + }, + + /** + * Convert a DynamoDB AttributeValue object to its equivalent JavaScript type. + * + * @param data [map] An object in the Amazon DynamoDB AttributeValue format + * @param options [map] + * @option options convertEmptyValues [Boolean] Whether to automatically + * convert empty strings, blobs, + * and sets to `null` + * @option options wrapNumbers [Boolean] Whether to return numbers as a + * NumberValue object instead of + * converting them to native JavaScript + * numbers. This allows for the safe + * round-trip transport of numbers of + * arbitrary size. + * + * @return [Object|Array|String|Number|Boolean|null] + * + * @see AWS.DynamoDB.Converter.unmarshall AWS.DynamoDB.Converter.unmarshall to + * convert entire records (rather than individual attributes) + */ + output: function convertOutput(data, options) { + options = options || {}; + var list, map, i; + for (var type in data) { + var values = data[type]; + if (type === 'M') { + map = {}; + for (var key in values) { + map[key] = convertOutput(values[key], options); + } + return map; + } else if (type === 'L') { + list = []; + for (i = 0; i < values.length; i++) { + list.push(convertOutput(values[i], options)); + } + return list; + } else if (type === 'SS') { + list = []; + for (i = 0; i < values.length; i++) { + list.push(values[i] + ''); + } + return new DynamoDBSet(list); + } else if (type === 'NS') { + list = []; + for (i = 0; i < values.length; i++) { + list.push(convertNumber(values[i], options.wrapNumbers)); + } + return new DynamoDBSet(list); + } else if (type === 'BS') { + list = []; + for (i = 0; i < values.length; i++) { + list.push(AWS.util.buffer.toBuffer(values[i])); + } + return new DynamoDBSet(list); + } else if (type === 'S') { + return values + ''; + } else if (type === 'N') { + return convertNumber(values, options.wrapNumbers); + } else if (type === 'B') { + return util.buffer.toBuffer(values); + } else if (type === 'BOOL') { + return (values === 'true' || values === 'TRUE' || values === true); + } else if (type === 'NULL') { + return null; + } + } + }, + + /** + * Convert a DynamoDB record into a JavaScript object. + * + * @param data [any] The DynamoDB record + * @param options [map] + * @option options convertEmptyValues [Boolean] Whether to automatically + * convert empty strings, blobs, + * and sets to `null` + * @option options wrapNumbers [Boolean] Whether to return numbers as a + * NumberValue object instead of + * converting them to native JavaScript + * numbers. This allows for the safe + * round-trip transport of numbers of + * arbitrary size. + * + * @return [map] An object whose properties have been converted from + * DynamoDB's AttributeValue format into their corresponding native + * JavaScript types. + * + * @example Convert a record received from a DynamoDB stream + * var unmarshalled = AWS.DynamoDB.Converter.unmarshall({ + * string: {S: 'foo'}, + * list: {L: [{S: 'fizz'}, {S: 'buzz'}, {S: 'pop'}]}, + * map: { + * M: { + * nestedMap: { + * M: { + * key: {S: 'value'} + * } + * } + * } + * }, + * number: {N: '123'}, + * nullValue: {NULL: true}, + * boolValue: {BOOL: true} + * }); + */ + unmarshall: function unmarshall(data, options) { + return AWS.DynamoDB.Converter.output({M: data}, options); + } +}; + +/** + * @api private + * @param data [Array] + * @param options [map] + */ +function formatList(data, options) { + var list = {L: []}; + for (var i = 0; i < data.length; i++) { + list['L'].push(AWS.DynamoDB.Converter.input(data[i], options)); + } + return list; +} + +/** + * @api private + * @param value [String] + * @param wrapNumbers [Boolean] + */ +function convertNumber(value, wrapNumbers) { + return wrapNumbers ? new NumberValue(value) : Number(value); +} + +/** + * @api private + * @param data [map] + * @param options [map] + */ +function formatMap(data, options) { + var map = {M: {}}; + for (var key in data) { + var formatted = AWS.DynamoDB.Converter.input(data[key], options); + if (formatted !== void 0) { + map['M'][key] = formatted; + } + } + return map; +} + +/** + * @api private + */ +function formatSet(data, options) { + options = options || {}; + var values = data.values; + if (options.convertEmptyValues) { + values = filterEmptySetValues(data); + if (values.length === 0) { + return AWS.DynamoDB.Converter.input(null); + } + } + + var map = {}; + switch (data.type) { + case 'String': map['SS'] = values; break; + case 'Binary': map['BS'] = values; break; + case 'Number': map['NS'] = values.map(function (value) { + return value.toString(); + }); + } + return map; +} + +/** + * @api private + */ +function filterEmptySetValues(set) { + var nonEmptyValues = []; + var potentiallyEmptyTypes = { + String: true, + Binary: true, + Number: false + }; + if (potentiallyEmptyTypes[set.type]) { + for (var i = 0; i < set.values.length; i++) { + if (set.values[i].length === 0) { + continue; + } + nonEmptyValues.push(set.values[i]); } - var self = this; - var state = self.states[self.currentState]; - state.fn.call(bindObject || self, inputError, function (err) { - if (err) { - if (state.fail) self.currentState = state.fail; - else return done ? done.call(bindObject, err) : null; - } else { - if (state.accept) self.currentState = state.accept; - else return done ? done.call(bindObject) : null; - } - if (self.currentState === finalState) { - return done ? done.call(bindObject, err) : null; - } + return nonEmptyValues; + } - self.runTo(finalState, done, bindObject, err); - }); - }; + return set.values; +} - AcceptorStateMachine.prototype.addState = function addState( - name, - acceptState, - failState, - fn - ) { - if (typeof acceptState === "function") { - fn = acceptState; - acceptState = null; - failState = null; - } else if (typeof failState === "function") { - fn = failState; - failState = null; +/** + * @api private + */ +module.exports = AWS.DynamoDB.Converter; + + +/***/ }), + +/***/ 90030: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var AWS = __nccwpck_require__(28437); +var Translator = __nccwpck_require__(34222); +var DynamoDBSet = __nccwpck_require__(20304); + +/** + * The document client simplifies working with items in Amazon DynamoDB + * by abstracting away the notion of attribute values. This abstraction + * annotates native JavaScript types supplied as input parameters, as well + * as converts annotated response data to native JavaScript types. + * + * ## Marshalling Input and Unmarshalling Response Data + * + * The document client affords developers the use of native JavaScript types + * instead of `AttributeValue`s to simplify the JavaScript development + * experience with Amazon DynamoDB. JavaScript objects passed in as parameters + * are marshalled into `AttributeValue` shapes required by Amazon DynamoDB. + * Responses from DynamoDB are unmarshalled into plain JavaScript objects + * by the `DocumentClient`. The `DocumentClient`, does not accept + * `AttributeValue`s in favor of native JavaScript types. + * + * | JavaScript Type | DynamoDB AttributeValue | + * |:----------------------------------------------------------------------:|-------------------------| + * | String | S | + * | Number | N | + * | Boolean | BOOL | + * | null | NULL | + * | Array | L | + * | Object | M | + * | Buffer, File, Blob, ArrayBuffer, DataView, and JavaScript typed arrays | B | + * + * ## Support for Sets + * + * The `DocumentClient` offers a convenient way to create sets from + * JavaScript Arrays. The type of set is inferred from the first element + * in the array. DynamoDB supports string, number, and binary sets. To + * learn more about supported types see the + * [Amazon DynamoDB Data Model Documentation](http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DataModel.html) + * For more information see {AWS.DynamoDB.DocumentClient.createSet} + * + */ +AWS.DynamoDB.DocumentClient = AWS.util.inherit({ + + /** + * Creates a DynamoDB document client with a set of configuration options. + * + * @option options params [map] An optional map of parameters to bind to every + * request sent by this service object. + * @option options service [AWS.DynamoDB] An optional pre-configured instance + * of the AWS.DynamoDB service object to use for requests. The object may + * bound parameters used by the document client. + * @option options convertEmptyValues [Boolean] set to true if you would like + * the document client to convert empty values (0-length strings, binary + * buffers, and sets) to be converted to NULL types when persisting to + * DynamoDB. + * @option options wrapNumbers [Boolean] Set to true to return numbers as a + * NumberValue object instead of converting them to native JavaScript numbers. + * This allows for the safe round-trip transport of numbers of arbitrary size. + * @see AWS.DynamoDB.constructor + * + */ + constructor: function DocumentClient(options) { + var self = this; + self.options = options || {}; + self.configure(self.options); + }, + + /** + * @api private + */ + configure: function configure(options) { + var self = this; + self.service = options.service; + self.bindServiceObject(options); + self.attrValue = options.attrValue = + self.service.api.operations.putItem.input.members.Item.value.shape; + }, + + /** + * @api private + */ + bindServiceObject: function bindServiceObject(options) { + var self = this; + options = options || {}; + + if (!self.service) { + self.service = new AWS.DynamoDB(options); + } else { + var config = AWS.util.copy(self.service.config); + self.service = new self.service.constructor.__super__(config); + self.service.config.params = + AWS.util.merge(self.service.config.params || {}, options.params); + } + }, + + /** + * @api private + */ + makeServiceRequest: function(operation, params, callback) { + var self = this; + var request = self.service[operation](params); + self.setupRequest(request); + self.setupResponse(request); + if (typeof callback === 'function') { + request.send(callback); + } + return request; + }, + + /** + * @api private + */ + serviceClientOperationsMap: { + batchGet: 'batchGetItem', + batchWrite: 'batchWriteItem', + delete: 'deleteItem', + get: 'getItem', + put: 'putItem', + query: 'query', + scan: 'scan', + update: 'updateItem', + transactGet: 'transactGetItems', + transactWrite: 'transactWriteItems' + }, + + /** + * Returns the attributes of one or more items from one or more tables + * by delegating to `AWS.DynamoDB.batchGetItem()`. + * + * Supply the same parameters as {AWS.DynamoDB.batchGetItem} with + * `AttributeValue`s substituted by native JavaScript types. + * + * @see AWS.DynamoDB.batchGetItem + * @example Get items from multiple tables + * var params = { + * RequestItems: { + * 'Table-1': { + * Keys: [ + * { + * HashKey: 'haskey', + * NumberRangeKey: 1 + * } + * ] + * }, + * 'Table-2': { + * Keys: [ + * { foo: 'bar' }, + * ] + * } + * } + * }; + * + * var documentClient = new AWS.DynamoDB.DocumentClient(); + * + * documentClient.batchGet(params, function(err, data) { + * if (err) console.log(err); + * else console.log(data); + * }); + * + */ + batchGet: function(params, callback) { + var operation = this.serviceClientOperationsMap['batchGet']; + return this.makeServiceRequest(operation, params, callback); + }, + + /** + * Puts or deletes multiple items in one or more tables by delegating + * to `AWS.DynamoDB.batchWriteItem()`. + * + * Supply the same parameters as {AWS.DynamoDB.batchWriteItem} with + * `AttributeValue`s substituted by native JavaScript types. + * + * @see AWS.DynamoDB.batchWriteItem + * @example Write to and delete from a table + * var params = { + * RequestItems: { + * 'Table-1': [ + * { + * DeleteRequest: { + * Key: { HashKey: 'someKey' } + * } + * }, + * { + * PutRequest: { + * Item: { + * HashKey: 'anotherKey', + * NumAttribute: 1, + * BoolAttribute: true, + * ListAttribute: [1, 'two', false], + * MapAttribute: { foo: 'bar' } + * } + * } + * } + * ] + * } + * }; + * + * var documentClient = new AWS.DynamoDB.DocumentClient(); + * + * documentClient.batchWrite(params, function(err, data) { + * if (err) console.log(err); + * else console.log(data); + * }); + * + */ + batchWrite: function(params, callback) { + var operation = this.serviceClientOperationsMap['batchWrite']; + return this.makeServiceRequest(operation, params, callback); + }, + + /** + * Deletes a single item in a table by primary key by delegating to + * `AWS.DynamoDB.deleteItem()` + * + * Supply the same parameters as {AWS.DynamoDB.deleteItem} with + * `AttributeValue`s substituted by native JavaScript types. + * + * @see AWS.DynamoDB.deleteItem + * @example Delete an item from a table + * var params = { + * TableName : 'Table', + * Key: { + * HashKey: 'hashkey', + * NumberRangeKey: 1 + * } + * }; + * + * var documentClient = new AWS.DynamoDB.DocumentClient(); + * + * documentClient.delete(params, function(err, data) { + * if (err) console.log(err); + * else console.log(data); + * }); + * + */ + delete: function(params, callback) { + var operation = this.serviceClientOperationsMap['delete']; + return this.makeServiceRequest(operation, params, callback); + }, + + /** + * Returns a set of attributes for the item with the given primary key + * by delegating to `AWS.DynamoDB.getItem()`. + * + * Supply the same parameters as {AWS.DynamoDB.getItem} with + * `AttributeValue`s substituted by native JavaScript types. + * + * @see AWS.DynamoDB.getItem + * @example Get an item from a table + * var params = { + * TableName : 'Table', + * Key: { + * HashKey: 'hashkey' + * } + * }; + * + * var documentClient = new AWS.DynamoDB.DocumentClient(); + * + * documentClient.get(params, function(err, data) { + * if (err) console.log(err); + * else console.log(data); + * }); + * + */ + get: function(params, callback) { + var operation = this.serviceClientOperationsMap['get']; + return this.makeServiceRequest(operation, params, callback); + }, + + /** + * Creates a new item, or replaces an old item with a new item by + * delegating to `AWS.DynamoDB.putItem()`. + * + * Supply the same parameters as {AWS.DynamoDB.putItem} with + * `AttributeValue`s substituted by native JavaScript types. + * + * @see AWS.DynamoDB.putItem + * @example Create a new item in a table + * var params = { + * TableName : 'Table', + * Item: { + * HashKey: 'haskey', + * NumAttribute: 1, + * BoolAttribute: true, + * ListAttribute: [1, 'two', false], + * MapAttribute: { foo: 'bar'}, + * NullAttribute: null + * } + * }; + * + * var documentClient = new AWS.DynamoDB.DocumentClient(); + * + * documentClient.put(params, function(err, data) { + * if (err) console.log(err); + * else console.log(data); + * }); + * + */ + put: function(params, callback) { + var operation = this.serviceClientOperationsMap['put']; + return this.makeServiceRequest(operation, params, callback); + }, + + /** + * Edits an existing item's attributes, or adds a new item to the table if + * it does not already exist by delegating to `AWS.DynamoDB.updateItem()`. + * + * Supply the same parameters as {AWS.DynamoDB.updateItem} with + * `AttributeValue`s substituted by native JavaScript types. + * + * @see AWS.DynamoDB.updateItem + * @example Update an item with expressions + * var params = { + * TableName: 'Table', + * Key: { HashKey : 'hashkey' }, + * UpdateExpression: 'set #a = :x + :y', + * ConditionExpression: '#a < :MAX', + * ExpressionAttributeNames: {'#a' : 'Sum'}, + * ExpressionAttributeValues: { + * ':x' : 20, + * ':y' : 45, + * ':MAX' : 100, + * } + * }; + * + * var documentClient = new AWS.DynamoDB.DocumentClient(); + * + * documentClient.update(params, function(err, data) { + * if (err) console.log(err); + * else console.log(data); + * }); + * + */ + update: function(params, callback) { + var operation = this.serviceClientOperationsMap['update']; + return this.makeServiceRequest(operation, params, callback); + }, + + /** + * Returns one or more items and item attributes by accessing every item + * in a table or a secondary index. + * + * Supply the same parameters as {AWS.DynamoDB.scan} with + * `AttributeValue`s substituted by native JavaScript types. + * + * @see AWS.DynamoDB.scan + * @example Scan the table with a filter expression + * var params = { + * TableName : 'Table', + * FilterExpression : 'Year = :this_year', + * ExpressionAttributeValues : {':this_year' : 2015} + * }; + * + * var documentClient = new AWS.DynamoDB.DocumentClient(); + * + * documentClient.scan(params, function(err, data) { + * if (err) console.log(err); + * else console.log(data); + * }); + * + */ + scan: function(params, callback) { + var operation = this.serviceClientOperationsMap['scan']; + return this.makeServiceRequest(operation, params, callback); + }, + + /** + * Directly access items from a table by primary key or a secondary index. + * + * Supply the same parameters as {AWS.DynamoDB.query} with + * `AttributeValue`s substituted by native JavaScript types. + * + * @see AWS.DynamoDB.query + * @example Query an index + * var params = { + * TableName: 'Table', + * IndexName: 'Index', + * KeyConditionExpression: 'HashKey = :hkey and RangeKey > :rkey', + * ExpressionAttributeValues: { + * ':hkey': 'key', + * ':rkey': 2015 + * } + * }; + * + * var documentClient = new AWS.DynamoDB.DocumentClient(); + * + * documentClient.query(params, function(err, data) { + * if (err) console.log(err); + * else console.log(data); + * }); + * + */ + query: function(params, callback) { + var operation = this.serviceClientOperationsMap['query']; + return this.makeServiceRequest(operation, params, callback); + }, + + /** + * Synchronous write operation that groups up to 10 action requests + * + * Supply the same parameters as {AWS.DynamoDB.transactWriteItems} with + * `AttributeValue`s substituted by native JavaScript types. + * + * @see AWS.DynamoDB.transactWriteItems + * @example Get items from multiple tables + * var params = { + * TransactItems: [{ + * Put: { + * TableName : 'Table0', + * Item: { + * HashKey: 'haskey', + * NumAttribute: 1, + * BoolAttribute: true, + * ListAttribute: [1, 'two', false], + * MapAttribute: { foo: 'bar'}, + * NullAttribute: null + * } + * } + * }, { + * Update: { + * TableName: 'Table1', + * Key: { HashKey : 'hashkey' }, + * UpdateExpression: 'set #a = :x + :y', + * ConditionExpression: '#a < :MAX', + * ExpressionAttributeNames: {'#a' : 'Sum'}, + * ExpressionAttributeValues: { + * ':x' : 20, + * ':y' : 45, + * ':MAX' : 100, + * } + * } + * }] + * }; + * + * documentClient.transactWrite(params, function(err, data) { + * if (err) console.log(err); + * else console.log(data); + * }); + */ + transactWrite: function(params, callback) { + var operation = this.serviceClientOperationsMap['transactWrite']; + return this.makeServiceRequest(operation, params, callback); + }, + + /** + * Atomically retrieves multiple items from one or more tables (but not from indexes) + * in a single account and region. + * + * Supply the same parameters as {AWS.DynamoDB.transactGetItems} with + * `AttributeValue`s substituted by native JavaScript types. + * + * @see AWS.DynamoDB.transactGetItems + * @example Get items from multiple tables + * var params = { + * TransactItems: [{ + * Get: { + * TableName : 'Table0', + * Key: { + * HashKey: 'hashkey0' + * } + * } + * }, { + * Get: { + * TableName : 'Table1', + * Key: { + * HashKey: 'hashkey1' + * } + * } + * }] + * }; + * + * documentClient.transactGet(params, function(err, data) { + * if (err) console.log(err); + * else console.log(data); + * }); + */ + transactGet: function(params, callback) { + var operation = this.serviceClientOperationsMap['transactGet']; + return this.makeServiceRequest(operation, params, callback); + }, + + /** + * Creates a set of elements inferring the type of set from + * the type of the first element. Amazon DynamoDB currently supports + * the number sets, string sets, and binary sets. For more information + * about DynamoDB data types see the documentation on the + * [Amazon DynamoDB Data Model](http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DataModel.html#DataModel.DataTypes). + * + * @param list [Array] Collection to represent your DynamoDB Set + * @param options [map] + * * **validate** [Boolean] set to true if you want to validate the type + * of each element in the set. Defaults to `false`. + * @example Creating a number set + * var documentClient = new AWS.DynamoDB.DocumentClient(); + * + * var params = { + * Item: { + * hashkey: 'hashkey' + * numbers: documentClient.createSet([1, 2, 3]); + * } + * }; + * + * documentClient.put(params, function(err, data) { + * if (err) console.log(err); + * else console.log(data); + * }); + * + */ + createSet: function(list, options) { + options = options || {}; + return new DynamoDBSet(list, options); + }, + + /** + * @api private + */ + getTranslator: function() { + return new Translator(this.options); + }, + + /** + * @api private + */ + setupRequest: function setupRequest(request) { + var self = this; + var translator = self.getTranslator(); + var operation = request.operation; + var inputShape = request.service.api.operations[operation].input; + request._events.validate.unshift(function(req) { + req.rawParams = AWS.util.copy(req.params); + req.params = translator.translateInput(req.rawParams, inputShape); + }); + }, + + /** + * @api private + */ + setupResponse: function setupResponse(request) { + var self = this; + var translator = self.getTranslator(); + var outputShape = self.service.api.operations[request.operation].output; + request.on('extractData', function(response) { + response.data = translator.translateOutput(response.data, outputShape); + }); + + var response = request.response; + response.nextPage = function(cb) { + var resp = this; + var req = resp.request; + var config; + var service = req.service; + var operation = req.operation; + try { + config = service.paginationConfig(operation, true); + } catch (e) { resp.error = e; } + + if (!resp.hasNextPage()) { + if (cb) cb(resp.error, null); + else if (resp.error) throw resp.error; + return null; + } + + var params = AWS.util.copy(req.rawParams); + if (!resp.nextPageTokens) { + return cb ? cb(null, null) : null; + } else { + var inputTokens = config.inputToken; + if (typeof inputTokens === 'string') inputTokens = [inputTokens]; + for (var i = 0; i < inputTokens.length; i++) { + params[inputTokens[i]] = resp.nextPageTokens[i]; } + return self[operation](params, cb); + } + }; + } - if (!this.currentState) this.currentState = name; - this.states[name] = { accept: acceptState, fail: failState, fn: fn }; - return this; - }; +}); - /** - * @api private - */ - module.exports = AcceptorStateMachine; - - /***/ - }, - - /***/ 77985: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - /* eslint guard-for-in:0 */ - var AWS; - - /** - * A set of utility methods for use with the AWS SDK. - * - * @!attribute abort - * Return this value from an iterator function {each} or {arrayEach} - * to break out of the iteration. - * @example Breaking out of an iterator function - * AWS.util.each({a: 1, b: 2, c: 3}, function(key, value) { - * if (key == 'b') return AWS.util.abort; - * }); - * @see each - * @see arrayEach - * @api private - */ - var util = { - environment: "nodejs", - engine: function engine() { - if (util.isBrowser() && typeof navigator !== "undefined") { - return navigator.userAgent; - } else { - var engine = process.platform + "/" + process.version; - if (process.env.AWS_EXECUTION_ENV) { - engine += " exec-env/" + process.env.AWS_EXECUTION_ENV; - } - return engine; - } - }, +/** + * @api private + */ +module.exports = AWS.DynamoDB.DocumentClient; - userAgent: function userAgent() { - var name = util.environment; - var agent = - "aws-sdk-" + name + "/" + __nccwpck_require__(28437).VERSION; - if (name === "nodejs") agent += " " + util.engine(); - return agent; - }, - uriEscape: function uriEscape(string) { - var output = encodeURIComponent(string); - output = output.replace(/[^A-Za-z0-9_.~\-%]+/g, escape); +/***/ }), - // AWS percent-encodes some extra non-standard characters in a URI - output = output.replace(/[*]/g, function (ch) { - return "%" + ch.charCodeAt(0).toString(16).toUpperCase(); - }); +/***/ 91593: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - return output; - }, +var util = (__nccwpck_require__(28437).util); - uriEscapePath: function uriEscapePath(string) { - var parts = []; - util.arrayEach(string.split("/"), function (part) { - parts.push(util.uriEscape(part)); - }); - return parts.join("/"); - }, +/** + * An object recognizable as a numeric value that stores the underlying number + * as a string. + * + * Intended to be a deserialization target for the DynamoDB Document Client when + * the `wrapNumbers` flag is set. This allows for numeric values that lose + * precision when converted to JavaScript's `number` type. + */ +var DynamoDBNumberValue = util.inherit({ + constructor: function NumberValue(value) { + this.wrapperName = 'NumberValue'; + this.value = value.toString(); + }, + + /** + * Render the underlying value as a number when converting to JSON. + */ + toJSON: function () { + return this.toNumber(); + }, + + /** + * Convert the underlying value to a JavaScript number. + */ + toNumber: function () { + return Number(this.value); + }, + + /** + * Return a string representing the unaltered value provided to the + * constructor. + */ + toString: function () { + return this.value; + } +}); + +/** + * @api private + */ +module.exports = DynamoDBNumberValue; - urlParse: function urlParse(url) { - return util.url.parse(url); - }, - urlFormat: function urlFormat(url) { - return util.url.format(url); - }, +/***/ }), - queryStringParse: function queryStringParse(qs) { - return util.querystring.parse(qs); - }, +/***/ 20304: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - queryParamsToString: function queryParamsToString(params) { - var items = []; - var escape = util.uriEscape; - var sortedKeys = Object.keys(params).sort(); +var util = (__nccwpck_require__(28437).util); +var typeOf = (__nccwpck_require__(48084).typeOf); - util.arrayEach(sortedKeys, function (name) { - var value = params[name]; - var ename = escape(name); - var result = ename + "="; - if (Array.isArray(value)) { - var vals = []; - util.arrayEach(value, function (item) { - vals.push(escape(item)); - }); - result = ename + "=" + vals.sort().join("&" + ename + "="); - } else if (value !== undefined && value !== null) { - result = ename + "=" + escape(value); - } - items.push(result); - }); +/** + * @api private + */ +var memberTypeToSetType = { + 'String': 'String', + 'Number': 'Number', + 'NumberValue': 'Number', + 'Binary': 'Binary' +}; + +/** + * @api private + */ +var DynamoDBSet = util.inherit({ + + constructor: function Set(list, options) { + options = options || {}; + this.wrapperName = 'Set'; + this.initialize(list, options.validate); + }, + + initialize: function(list, validate) { + var self = this; + self.values = [].concat(list); + self.detectType(); + if (validate) { + self.validate(); + } + }, + + detectType: function() { + this.type = memberTypeToSetType[typeOf(this.values[0])]; + if (!this.type) { + throw util.error(new Error(), { + code: 'InvalidSetType', + message: 'Sets can contain string, number, or binary values' + }); + } + }, + + validate: function() { + var self = this; + var length = self.values.length; + var values = self.values; + for (var i = 0; i < length; i++) { + if (memberTypeToSetType[typeOf(values[i])] !== self.type) { + throw util.error(new Error(), { + code: 'InvalidType', + message: self.type + ' Set contains ' + typeOf(values[i]) + ' value' + }); + } + } + }, - return items.join("&"); - }, + /** + * Render the underlying values only when converting to JSON. + */ + toJSON: function() { + var self = this; + return self.values; + } - readFileSync: function readFileSync(path) { - if (util.isBrowser()) return null; - return __nccwpck_require__(57147).readFileSync(path, "utf-8"); - }, +}); - base64: { - encode: function encode64(string) { - if (typeof string === "number") { - throw util.error( - new Error("Cannot base64 encode number " + string) - ); - } - if (string === null || typeof string === "undefined") { - return string; - } - var buf = util.buffer.toBuffer(string); - return buf.toString("base64"); - }, +/** + * @api private + */ +module.exports = DynamoDBSet; + + +/***/ }), + +/***/ 34222: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var util = (__nccwpck_require__(28437).util); +var convert = __nccwpck_require__(76663); + +var Translator = function(options) { + options = options || {}; + this.attrValue = options.attrValue; + this.convertEmptyValues = Boolean(options.convertEmptyValues); + this.wrapNumbers = Boolean(options.wrapNumbers); +}; + +Translator.prototype.translateInput = function(value, shape) { + this.mode = 'input'; + return this.translate(value, shape); +}; + +Translator.prototype.translateOutput = function(value, shape) { + this.mode = 'output'; + return this.translate(value, shape); +}; + +Translator.prototype.translate = function(value, shape) { + var self = this; + if (!shape || value === undefined) return undefined; + + if (shape.shape === self.attrValue) { + return convert[self.mode](value, { + convertEmptyValues: self.convertEmptyValues, + wrapNumbers: self.wrapNumbers, + }); + } + switch (shape.type) { + case 'structure': return self.translateStructure(value, shape); + case 'map': return self.translateMap(value, shape); + case 'list': return self.translateList(value, shape); + default: return self.translateScalar(value, shape); + } +}; + +Translator.prototype.translateStructure = function(structure, shape) { + var self = this; + if (structure == null) return undefined; + + var struct = {}; + util.each(structure, function(name, value) { + var memberShape = shape.members[name]; + if (memberShape) { + var result = self.translate(value, memberShape); + if (result !== undefined) struct[name] = result; + } + }); + return struct; +}; + +Translator.prototype.translateList = function(list, shape) { + var self = this; + if (list == null) return undefined; + + var out = []; + util.arrayEach(list, function(value) { + var result = self.translate(value, shape.member); + if (result === undefined) out.push(null); + else out.push(result); + }); + return out; +}; + +Translator.prototype.translateMap = function(map, shape) { + var self = this; + if (map == null) return undefined; + + var out = {}; + util.each(map, function(key, value) { + var result = self.translate(value, shape.value); + if (result === undefined) out[key] = null; + else out[key] = result; + }); + return out; +}; + +Translator.prototype.translateScalar = function(value, shape) { + return shape.toType(value); +}; + +/** + * @api private + */ +module.exports = Translator; + + +/***/ }), + +/***/ 48084: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var util = (__nccwpck_require__(28437).util); + +function typeOf(data) { + if (data === null && typeof data === 'object') { + return 'null'; + } else if (data !== undefined && isBinary(data)) { + return 'Binary'; + } else if (data !== undefined && data.constructor) { + return data.wrapperName || util.typeName(data.constructor); + } else if (data !== undefined && typeof data === 'object') { + // this object is the result of Object.create(null), hence the absence of a + // defined constructor + return 'Object'; + } else { + return 'undefined'; + } +} + +function isBinary(data) { + var types = [ + 'Buffer', 'File', 'Blob', 'ArrayBuffer', 'DataView', + 'Int8Array', 'Uint8Array', 'Uint8ClampedArray', + 'Int16Array', 'Uint16Array', 'Int32Array', 'Uint32Array', + 'Float32Array', 'Float64Array' + ]; + if (util.isNode()) { + var Stream = util.stream.Stream; + if (util.Buffer.isBuffer(data) || data instanceof Stream) { + return true; + } + } + + for (var i = 0; i < types.length; i++) { + if (data !== undefined && data.constructor) { + if (util.isType(data, types[i])) return true; + if (util.typeName(data.constructor) === types[i]) return true; + } + } + + return false; +} + +/** + * @api private + */ +module.exports = { + typeOf: typeOf, + isBinary: isBinary +}; - decode: function decode64(string) { - if (typeof string === "number") { - throw util.error( - new Error("Cannot base64 decode number " + string) - ); - } - if (string === null || typeof string === "undefined") { - return string; - } - return util.buffer.toBuffer(string, "base64"); - }, - }, - buffer: { - /** - * Buffer constructor for Node buffer and buffer pollyfill - */ - toBuffer: function (data, encoding) { - return typeof util.Buffer.from === "function" && - util.Buffer.from !== Uint8Array.from - ? util.Buffer.from(data, encoding) - : new util.Buffer(data, encoding); - }, +/***/ }), - alloc: function (size, fill, encoding) { - if (typeof size !== "number") { - throw new Error("size passed to alloc must be a number."); - } - if (typeof util.Buffer.alloc === "function") { - return util.Buffer.alloc(size, fill, encoding); - } else { - var buf = new util.Buffer(size); - if (fill !== undefined && typeof buf.fill === "function") { - buf.fill(fill, undefined, undefined, encoding); - } - return buf; - } - }, +/***/ 63727: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - toStream: function toStream(buffer) { - if (!util.Buffer.isBuffer(buffer)) - buffer = util.buffer.toBuffer(buffer); +var eventMessageChunker = (__nccwpck_require__(73630).eventMessageChunker); +var parseEvent = (__nccwpck_require__(52123).parseEvent); - var readable = new util.stream.Readable(); - var pos = 0; - readable._read = function (size) { - if (pos >= buffer.length) return readable.push(null); +function createEventStream(body, parser, model) { + var eventMessages = eventMessageChunker(body); - var end = pos + size; - if (end > buffer.length) end = buffer.length; - readable.push(buffer.slice(pos, end)); - pos = end; - }; + var events = []; - return readable; - }, + for (var i = 0; i < eventMessages.length; i++) { + events.push(parseEvent(parser, eventMessages[i], model)); + } - /** - * Concatenates a list of Buffer objects. - */ - concat: function (buffers) { - var length = 0, - offset = 0, - buffer = null, - i; - - for (i = 0; i < buffers.length; i++) { - length += buffers[i].length; - } + return events; +} - buffer = util.buffer.alloc(length); +/** + * @api private + */ +module.exports = { + createEventStream: createEventStream +}; - for (i = 0; i < buffers.length; i++) { - buffers[i].copy(buffer, offset); - offset += buffers[i].length; - } - return buffer; - }, - }, +/***/ }), - string: { - byteLength: function byteLength(string) { - if (string === null || string === undefined) return 0; - if (typeof string === "string") - string = util.buffer.toBuffer(string); - - if (typeof string.byteLength === "number") { - return string.byteLength; - } else if (typeof string.length === "number") { - return string.length; - } else if (typeof string.size === "number") { - return string.size; - } else if (typeof string.path === "string") { - return __nccwpck_require__(57147).lstatSync(string.path).size; - } else { - throw util.error( - new Error("Cannot determine length of " + string), - { object: string } - ); - } - }, +/***/ 18518: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - upperFirst: function upperFirst(string) { - return string[0].toUpperCase() + string.substr(1); - }, +var util = (__nccwpck_require__(28437).util); +var Transform = (__nccwpck_require__(12781).Transform); +var allocBuffer = util.buffer.alloc; - lowerFirst: function lowerFirst(string) { - return string[0].toLowerCase() + string.substr(1); - }, - }, +/** @type {Transform} */ +function EventMessageChunkerStream(options) { + Transform.call(this, options); - ini: { - parse: function string(ini) { - var currentSection, - map = {}; - util.arrayEach(ini.split(/\r?\n/), function (line) { - line = line.split(/(^|\s)[;#]/)[0]; // remove comments - var section = line.match(/^\s*\[([^\[\]]+)\]\s*$/); - if (section) { - currentSection = section[1]; - if ( - currentSection === "__proto__" || - currentSection.split(/\s/)[1] === "__proto__" - ) { - throw util.error( - new Error( - "Cannot load profile name '" + - currentSection + - "' from shared ini file." - ) - ); - } - } else if (currentSection) { - var item = line.match(/^\s*(.+?)\s*=\s*(.+?)\s*$/); - if (item) { - map[currentSection] = map[currentSection] || {}; - map[currentSection][item[1]] = item[2]; - } - } - }); + this.currentMessageTotalLength = 0; + this.currentMessagePendingLength = 0; + /** @type {Buffer} */ + this.currentMessage = null; - return map; - }, - }, + /** @type {Buffer} */ + this.messageLengthBuffer = null; +} - fn: { - noop: function () {}, - callback: function (err) { - if (err) throw err; - }, +EventMessageChunkerStream.prototype = Object.create(Transform.prototype); + +/** + * + * @param {Buffer} chunk + * @param {string} encoding + * @param {*} callback + */ +EventMessageChunkerStream.prototype._transform = function(chunk, encoding, callback) { + var chunkLength = chunk.length; + var currentOffset = 0; - /** - * Turn a synchronous function into as "async" function by making it call - * a callback. The underlying function is called with all but the last argument, - * which is treated as the callback. The callback is passed passed a first argument - * of null on success to mimick standard node callbacks. - */ - makeAsync: function makeAsync(fn, expectedArgs) { - if (expectedArgs && expectedArgs <= fn.length) { - return fn; + while (currentOffset < chunkLength) { + // create new message if necessary + if (!this.currentMessage) { + // working on a new message, determine total length + var bytesRemaining = chunkLength - currentOffset; + // prevent edge case where total length spans 2 chunks + if (!this.messageLengthBuffer) { + this.messageLengthBuffer = allocBuffer(4); } + var numBytesForTotal = Math.min( + 4 - this.currentMessagePendingLength, // remaining bytes to fill the messageLengthBuffer + bytesRemaining // bytes left in chunk + ); - return function () { - var args = Array.prototype.slice.call(arguments, 0); - var callback = args.pop(); - var result = fn.apply(null, args); - callback(result); - }; - }, - }, + chunk.copy( + this.messageLengthBuffer, + this.currentMessagePendingLength, + currentOffset, + currentOffset + numBytesForTotal + ); - /** - * Date and time utility functions. - */ - date: { - /** - * @return [Date] the current JavaScript date object. Since all - * AWS services rely on this date object, you can override - * this function to provide a special time value to AWS service - * requests. - */ - getDate: function getDate() { - if (!AWS) AWS = __nccwpck_require__(28437); - if (AWS.config.systemClockOffset) { - // use offset when non-zero - return new Date( - new Date().getTime() + AWS.config.systemClockOffset - ); - } else { - return new Date(); - } - }, + this.currentMessagePendingLength += numBytesForTotal; + currentOffset += numBytesForTotal; - /** - * @return [String] the date in ISO-8601 format - */ - iso8601: function iso8601(date) { - if (date === undefined) { - date = util.date.getDate(); + if (this.currentMessagePendingLength < 4) { + // not enough information to create the current message + break; } - return date.toISOString().replace(/\.\d{3}Z$/, "Z"); - }, + this.allocateMessage(this.messageLengthBuffer.readUInt32BE(0)); + this.messageLengthBuffer = null; + } - /** - * @return [String] the date in RFC 822 format - */ - rfc822: function rfc822(date) { - if (date === undefined) { - date = util.date.getDate(); - } - return date.toUTCString(); - }, + // write data into current message + var numBytesToWrite = Math.min( + this.currentMessageTotalLength - this.currentMessagePendingLength, // number of bytes left to complete message + chunkLength - currentOffset // number of bytes left in the original chunk + ); + chunk.copy( + this.currentMessage, // target buffer + this.currentMessagePendingLength, // target offset + currentOffset, // chunk offset + currentOffset + numBytesToWrite // chunk end to write + ); + this.currentMessagePendingLength += numBytesToWrite; + currentOffset += numBytesToWrite; - /** - * @return [Integer] the UNIX timestamp value for the current time - */ - unixTimestamp: function unixTimestamp(date) { - if (date === undefined) { - date = util.date.getDate(); - } - return date.getTime() / 1000; - }, + // check if a message is ready to be pushed + if (this.currentMessageTotalLength && this.currentMessageTotalLength === this.currentMessagePendingLength) { + // push out the message + this.push(this.currentMessage); + // cleanup + this.currentMessage = null; + this.currentMessageTotalLength = 0; + this.currentMessagePendingLength = 0; + } + } - /** - * @param [String,number,Date] date - * @return [Date] - */ - from: function format(date) { - if (typeof date === "number") { - return new Date(date * 1000); // unix timestamp - } else { - return new Date(date); - } - }, + callback(); +}; - /** - * Given a Date or date-like value, this function formats the - * date into a string of the requested value. - * @param [String,number,Date] date - * @param [String] formatter Valid formats are: - # * 'iso8601' - # * 'rfc822' - # * 'unixTimestamp' - * @return [String] - */ - format: function format(date, formatter) { - if (!formatter) formatter = "iso8601"; - return util.date[formatter](util.date.from(date)); - }, +EventMessageChunkerStream.prototype._flush = function(callback) { + if (this.currentMessageTotalLength) { + if (this.currentMessageTotalLength === this.currentMessagePendingLength) { + callback(null, this.currentMessage); + } else { + callback(new Error('Truncated event message received.')); + } + } else { + callback(); + } +}; - parseTimestamp: function parseTimestamp(value) { - if (typeof value === "number") { - // unix timestamp (number) - return new Date(value * 1000); - } else if (value.match(/^\d+$/)) { - // unix timestamp - return new Date(value * 1000); - } else if (value.match(/^\d{4}/)) { - // iso8601 - return new Date(value); - } else if (value.match(/^\w{3},/)) { - // rfc822 - return new Date(value); - } else { - throw util.error( - new Error("unhandled timestamp format: " + value), - { code: "TimestampParserError" } - ); - } - }, - }, +/** + * @param {number} size Size of the message to be allocated. + * @api private + */ +EventMessageChunkerStream.prototype.allocateMessage = function(size) { + if (typeof size !== 'number') { + throw new Error('Attempted to allocate an event message where size was not a number: ' + size); + } + this.currentMessageTotalLength = size; + this.currentMessagePendingLength = 4; + this.currentMessage = allocBuffer(size); + this.currentMessage.writeUInt32BE(size, 0); +}; + +/** + * @api private + */ +module.exports = { + EventMessageChunkerStream: EventMessageChunkerStream +}; - crypto: { - crc32Table: [ - 0x00000000, - 0x77073096, - 0xee0e612c, - 0x990951ba, - 0x076dc419, - 0x706af48f, - 0xe963a535, - 0x9e6495a3, - 0x0edb8832, - 0x79dcb8a4, - 0xe0d5e91e, - 0x97d2d988, - 0x09b64c2b, - 0x7eb17cbd, - 0xe7b82d07, - 0x90bf1d91, - 0x1db71064, - 0x6ab020f2, - 0xf3b97148, - 0x84be41de, - 0x1adad47d, - 0x6ddde4eb, - 0xf4d4b551, - 0x83d385c7, - 0x136c9856, - 0x646ba8c0, - 0xfd62f97a, - 0x8a65c9ec, - 0x14015c4f, - 0x63066cd9, - 0xfa0f3d63, - 0x8d080df5, - 0x3b6e20c8, - 0x4c69105e, - 0xd56041e4, - 0xa2677172, - 0x3c03e4d1, - 0x4b04d447, - 0xd20d85fd, - 0xa50ab56b, - 0x35b5a8fa, - 0x42b2986c, - 0xdbbbc9d6, - 0xacbcf940, - 0x32d86ce3, - 0x45df5c75, - 0xdcd60dcf, - 0xabd13d59, - 0x26d930ac, - 0x51de003a, - 0xc8d75180, - 0xbfd06116, - 0x21b4f4b5, - 0x56b3c423, - 0xcfba9599, - 0xb8bda50f, - 0x2802b89e, - 0x5f058808, - 0xc60cd9b2, - 0xb10be924, - 0x2f6f7c87, - 0x58684c11, - 0xc1611dab, - 0xb6662d3d, - 0x76dc4190, - 0x01db7106, - 0x98d220bc, - 0xefd5102a, - 0x71b18589, - 0x06b6b51f, - 0x9fbfe4a5, - 0xe8b8d433, - 0x7807c9a2, - 0x0f00f934, - 0x9609a88e, - 0xe10e9818, - 0x7f6a0dbb, - 0x086d3d2d, - 0x91646c97, - 0xe6635c01, - 0x6b6b51f4, - 0x1c6c6162, - 0x856530d8, - 0xf262004e, - 0x6c0695ed, - 0x1b01a57b, - 0x8208f4c1, - 0xf50fc457, - 0x65b0d9c6, - 0x12b7e950, - 0x8bbeb8ea, - 0xfcb9887c, - 0x62dd1ddf, - 0x15da2d49, - 0x8cd37cf3, - 0xfbd44c65, - 0x4db26158, - 0x3ab551ce, - 0xa3bc0074, - 0xd4bb30e2, - 0x4adfa541, - 0x3dd895d7, - 0xa4d1c46d, - 0xd3d6f4fb, - 0x4369e96a, - 0x346ed9fc, - 0xad678846, - 0xda60b8d0, - 0x44042d73, - 0x33031de5, - 0xaa0a4c5f, - 0xdd0d7cc9, - 0x5005713c, - 0x270241aa, - 0xbe0b1010, - 0xc90c2086, - 0x5768b525, - 0x206f85b3, - 0xb966d409, - 0xce61e49f, - 0x5edef90e, - 0x29d9c998, - 0xb0d09822, - 0xc7d7a8b4, - 0x59b33d17, - 0x2eb40d81, - 0xb7bd5c3b, - 0xc0ba6cad, - 0xedb88320, - 0x9abfb3b6, - 0x03b6e20c, - 0x74b1d29a, - 0xead54739, - 0x9dd277af, - 0x04db2615, - 0x73dc1683, - 0xe3630b12, - 0x94643b84, - 0x0d6d6a3e, - 0x7a6a5aa8, - 0xe40ecf0b, - 0x9309ff9d, - 0x0a00ae27, - 0x7d079eb1, - 0xf00f9344, - 0x8708a3d2, - 0x1e01f268, - 0x6906c2fe, - 0xf762575d, - 0x806567cb, - 0x196c3671, - 0x6e6b06e7, - 0xfed41b76, - 0x89d32be0, - 0x10da7a5a, - 0x67dd4acc, - 0xf9b9df6f, - 0x8ebeeff9, - 0x17b7be43, - 0x60b08ed5, - 0xd6d6a3e8, - 0xa1d1937e, - 0x38d8c2c4, - 0x4fdff252, - 0xd1bb67f1, - 0xa6bc5767, - 0x3fb506dd, - 0x48b2364b, - 0xd80d2bda, - 0xaf0a1b4c, - 0x36034af6, - 0x41047a60, - 0xdf60efc3, - 0xa867df55, - 0x316e8eef, - 0x4669be79, - 0xcb61b38c, - 0xbc66831a, - 0x256fd2a0, - 0x5268e236, - 0xcc0c7795, - 0xbb0b4703, - 0x220216b9, - 0x5505262f, - 0xc5ba3bbe, - 0xb2bd0b28, - 0x2bb45a92, - 0x5cb36a04, - 0xc2d7ffa7, - 0xb5d0cf31, - 0x2cd99e8b, - 0x5bdeae1d, - 0x9b64c2b0, - 0xec63f226, - 0x756aa39c, - 0x026d930a, - 0x9c0906a9, - 0xeb0e363f, - 0x72076785, - 0x05005713, - 0x95bf4a82, - 0xe2b87a14, - 0x7bb12bae, - 0x0cb61b38, - 0x92d28e9b, - 0xe5d5be0d, - 0x7cdcefb7, - 0x0bdbdf21, - 0x86d3d2d4, - 0xf1d4e242, - 0x68ddb3f8, - 0x1fda836e, - 0x81be16cd, - 0xf6b9265b, - 0x6fb077e1, - 0x18b74777, - 0x88085ae6, - 0xff0f6a70, - 0x66063bca, - 0x11010b5c, - 0x8f659eff, - 0xf862ae69, - 0x616bffd3, - 0x166ccf45, - 0xa00ae278, - 0xd70dd2ee, - 0x4e048354, - 0x3903b3c2, - 0xa7672661, - 0xd06016f7, - 0x4969474d, - 0x3e6e77db, - 0xaed16a4a, - 0xd9d65adc, - 0x40df0b66, - 0x37d83bf0, - 0xa9bcae53, - 0xdebb9ec5, - 0x47b2cf7f, - 0x30b5ffe9, - 0xbdbdf21c, - 0xcabac28a, - 0x53b39330, - 0x24b4a3a6, - 0xbad03605, - 0xcdd70693, - 0x54de5729, - 0x23d967bf, - 0xb3667a2e, - 0xc4614ab8, - 0x5d681b02, - 0x2a6f2b94, - 0xb40bbe37, - 0xc30c8ea1, - 0x5a05df1b, - 0x2d02ef8d, - ], - - crc32: function crc32(data) { - var tbl = util.crypto.crc32Table; - var crc = 0 ^ -1; - - if (typeof data === "string") { - data = util.buffer.toBuffer(data); - } - for (var i = 0; i < data.length; i++) { - var code = data.readUInt8(i); - crc = (crc >>> 8) ^ tbl[(crc ^ code) & 0xff]; - } - return (crc ^ -1) >>> 0; - }, +/***/ }), - hmac: function hmac(key, string, digest, fn) { - if (!digest) digest = "binary"; - if (digest === "buffer") { - digest = undefined; - } - if (!fn) fn = "sha256"; - if (typeof string === "string") - string = util.buffer.toBuffer(string); - return util.crypto.lib - .createHmac(fn, key) - .update(string) - .digest(digest); - }, +/***/ 73630: +/***/ ((module) => { - md5: function md5(data, digest, callback) { - return util.crypto.hash("md5", data, digest, callback); - }, +/** + * Takes in a buffer of event messages and splits them into individual messages. + * @param {Buffer} buffer + * @api private + */ +function eventMessageChunker(buffer) { + /** @type Buffer[] */ + var messages = []; + var offset = 0; - sha256: function sha256(data, digest, callback) { - return util.crypto.hash("sha256", data, digest, callback); - }, + while (offset < buffer.length) { + var totalLength = buffer.readInt32BE(offset); - hash: function (algorithm, data, digest, callback) { - var hash = util.crypto.createHash(algorithm); - if (!digest) { - digest = "binary"; - } - if (digest === "buffer") { - digest = undefined; - } - if (typeof data === "string") data = util.buffer.toBuffer(data); - var sliceFn = util.arraySliceFn(data); - var isBuffer = util.Buffer.isBuffer(data); - //Identifying objects with an ArrayBuffer as buffers - if ( - util.isBrowser() && - typeof ArrayBuffer !== "undefined" && - data && - data.buffer instanceof ArrayBuffer - ) - isBuffer = true; - - if ( - callback && - typeof data === "object" && - typeof data.on === "function" && - !isBuffer - ) { - data.on("data", function (chunk) { - hash.update(chunk); - }); - data.on("error", function (err) { - callback(err); - }); - data.on("end", function () { - callback(null, hash.digest(digest)); - }); - } else if ( - callback && - sliceFn && - !isBuffer && - typeof FileReader !== "undefined" - ) { - // this might be a File/Blob - var index = 0, - size = 1024 * 512; - var reader = new FileReader(); - reader.onerror = function () { - callback(new Error("Failed to read data.")); - }; - reader.onload = function () { - var buf = new util.Buffer(new Uint8Array(reader.result)); - hash.update(buf); - index += buf.length; - reader._continueReading(); - }; - reader._continueReading = function () { - if (index >= data.size) { - callback(null, hash.digest(digest)); - return; - } + // create new buffer for individual message (shares memory with original) + var message = buffer.slice(offset, totalLength + offset); + // increment offset to it starts at the next message + offset += totalLength; - var back = index + size; - if (back > data.size) back = data.size; - reader.readAsArrayBuffer(sliceFn.call(data, index, back)); - }; + messages.push(message); + } - reader._continueReading(); - } else { - if (util.isBrowser() && typeof data === "object" && !isBuffer) { - data = new util.Buffer(new Uint8Array(data)); - } - var out = hash.update(data).digest(digest); - if (callback) callback(null, out); - return out; - } - }, + return messages; +} - toHex: function toHex(data) { - var out = []; - for (var i = 0; i < data.length; i++) { - out.push(("0" + data.charCodeAt(i).toString(16)).substr(-2, 2)); - } - return out.join(""); - }, +/** + * @api private + */ +module.exports = { + eventMessageChunker: eventMessageChunker +}; - createHash: function createHash(algorithm) { - return util.crypto.lib.createHash(algorithm); - }, - }, - /** @!ignore */ +/***/ }), - /* Abort constant */ - abort: {}, +/***/ 93773: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - each: function each(object, iterFunction) { - for (var key in object) { - if (Object.prototype.hasOwnProperty.call(object, key)) { - var ret = iterFunction.call(this, key, object[key]); - if (ret === util.abort) break; - } - } - }, +var Transform = (__nccwpck_require__(12781).Transform); +var parseEvent = (__nccwpck_require__(52123).parseEvent); - arrayEach: function arrayEach(array, iterFunction) { - for (var idx in array) { - if (Object.prototype.hasOwnProperty.call(array, idx)) { - var ret = iterFunction.call(this, array[idx], parseInt(idx, 10)); - if (ret === util.abort) break; - } - } - }, +/** @type {Transform} */ +function EventUnmarshallerStream(options) { + options = options || {}; + // set output to object mode + options.readableObjectMode = true; + Transform.call(this, options); + this._readableState.objectMode = true; - update: function update(obj1, obj2) { - util.each(obj2, function iterator(key, item) { - obj1[key] = item; - }); - return obj1; - }, + this.parser = options.parser; + this.eventStreamModel = options.eventStreamModel; +} - merge: function merge(obj1, obj2) { - return util.update(util.copy(obj1), obj2); - }, +EventUnmarshallerStream.prototype = Object.create(Transform.prototype); - copy: function copy(object) { - if (object === null || object === undefined) return object; - var dupe = {}; - // jshint forin:false - for (var key in object) { - dupe[key] = object[key]; - } - return dupe; - }, +/** + * + * @param {Buffer} chunk + * @param {string} encoding + * @param {*} callback + */ +EventUnmarshallerStream.prototype._transform = function(chunk, encoding, callback) { + try { + var event = parseEvent(this.parser, chunk, this.eventStreamModel); + this.push(event); + return callback(); + } catch (err) { + callback(err); + } +}; - isEmpty: function isEmpty(obj) { - for (var prop in obj) { - if (Object.prototype.hasOwnProperty.call(obj, prop)) { - return false; - } - } - return true; - }, +/** + * @api private + */ +module.exports = { + EventUnmarshallerStream: EventUnmarshallerStream +}; - arraySliceFn: function arraySliceFn(obj) { - var fn = obj.slice || obj.webkitSlice || obj.mozSlice; - return typeof fn === "function" ? fn : null; - }, - isType: function isType(obj, type) { - // handle cross-"frame" objects - if (typeof type === "function") type = util.typeName(type); - return ( - Object.prototype.toString.call(obj) === "[object " + type + "]" - ); - }, +/***/ }), - typeName: function typeName(type) { - if (Object.prototype.hasOwnProperty.call(type, "name")) - return type.name; - var str = type.toString(); - var match = str.match(/^\s*function (.+)\(/); - return match ? match[1] : str; - }, +/***/ 48583: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - error: function error(err, options) { - var originalError = null; - if (typeof err.message === "string" && err.message !== "") { - if (typeof options === "string" || (options && options.message)) { - originalError = util.copy(err); - originalError.message = err.message; - } - } - err.message = err.message || null; - - if (typeof options === "string") { - err.message = options; - } else if (typeof options === "object" && options !== null) { - util.update(err, options); - if (options.message) err.message = options.message; - if (options.code || options.name) - err.code = options.code || options.name; - if (options.stack) err.stack = options.stack; - } +var util = (__nccwpck_require__(28437).util); +var toBuffer = util.buffer.toBuffer; - if (typeof Object.defineProperty === "function") { - Object.defineProperty(err, "name", { - writable: true, - enumerable: false, - }); - Object.defineProperty(err, "message", { enumerable: true }); - } +/** + * A lossless representation of a signed, 64-bit integer. Instances of this + * class may be used in arithmetic expressions as if they were numeric + * primitives, but the binary representation will be preserved unchanged as the + * `bytes` property of the object. The bytes should be encoded as big-endian, + * two's complement integers. + * @param {Buffer} bytes + * + * @api private + */ +function Int64(bytes) { + if (bytes.length !== 8) { + throw new Error('Int64 buffers must be exactly 8 bytes'); + } + if (!util.Buffer.isBuffer(bytes)) bytes = toBuffer(bytes); + + this.bytes = bytes; +} + +/** + * @param {number} number + * @returns {Int64} + * + * @api private + */ +Int64.fromNumber = function(number) { + if (number > 9223372036854775807 || number < -9223372036854775808) { + throw new Error( + number + ' is too large (or, if negative, too small) to represent as an Int64' + ); + } - err.name = String( - (options && options.name) || err.name || err.code || "Error" - ); - err.time = new Date(); + var bytes = new Uint8Array(8); + for ( + var i = 7, remaining = Math.abs(Math.round(number)); + i > -1 && remaining > 0; + i--, remaining /= 256 + ) { + bytes[i] = remaining; + } - if (originalError) err.originalError = originalError; + if (number < 0) { + negate(bytes); + } - return err; - }, + return new Int64(bytes); +}; - /** - * @api private - */ - inherit: function inherit(klass, features) { - var newObject = null; - if (features === undefined) { - features = klass; - klass = Object; - newObject = {}; - } else { - var ctor = function ConstructorWrapper() {}; - ctor.prototype = klass.prototype; - newObject = new ctor(); - } +/** + * @returns {number} + * + * @api private + */ +Int64.prototype.valueOf = function() { + var bytes = this.bytes.slice(0); + var negative = bytes[0] & 128; + if (negative) { + negate(bytes); + } + + return parseInt(bytes.toString('hex'), 16) * (negative ? -1 : 1); +}; + +Int64.prototype.toString = function() { + return String(this.valueOf()); +}; + +/** + * @param {Buffer} bytes + * + * @api private + */ +function negate(bytes) { + for (var i = 0; i < 8; i++) { + bytes[i] ^= 0xFF; + } + for (var i = 7; i > -1; i--) { + bytes[i]++; + if (bytes[i] !== 0) { + break; + } + } +} - // constructor not supplied, create pass-through ctor - if (features.constructor === Object) { - features.constructor = function () { - if (klass !== Object) { - return klass.apply(this, arguments); - } - }; - } +/** + * @api private + */ +module.exports = { + Int64: Int64 +}; - features.constructor.prototype = newObject; - util.update(features.constructor.prototype, features); - features.constructor.__super__ = klass; - return features.constructor; - }, - - /** - * @api private - */ - mixin: function mixin() { - var klass = arguments[0]; - for (var i = 1; i < arguments.length; i++) { - // jshint forin:false - for (var prop in arguments[i].prototype) { - var fn = arguments[i].prototype[prop]; - if (prop !== "constructor") { - klass.prototype[prop] = fn; - } - } - } - return klass; - }, - /** - * @api private - */ - hideProperties: function hideProperties(obj, props) { - if (typeof Object.defineProperty !== "function") return; +/***/ }), - util.arrayEach(props, function (key) { - Object.defineProperty(obj, key, { - enumerable: false, - writable: true, - configurable: true, - }); - }); - }, +/***/ 52123: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - /** - * @api private - */ - property: function property(obj, name, value, enumerable, isValue) { - var opts = { - configurable: true, - enumerable: enumerable !== undefined ? enumerable : true, - }; - if (typeof value === "function" && !isValue) { - opts.get = value; - } else { - opts.value = value; - opts.writable = true; - } +var parseMessage = (__nccwpck_require__(30866).parseMessage); - Object.defineProperty(obj, name, opts); - }, +/** + * + * @param {*} parser + * @param {Buffer} message + * @param {*} shape + * @api private + */ +function parseEvent(parser, message, shape) { + var parsedMessage = parseMessage(message); - /** - * @api private - */ - memoizedProperty: function memoizedProperty( - obj, - name, - get, - enumerable - ) { - var cachedValue = null; - - // build enumerable attribute for each value with lazy accessor. - util.property( - obj, - name, - function () { - if (cachedValue === null) { - cachedValue = get(); - } - return cachedValue; - }, - enumerable - ); - }, + // check if message is an event or error + var messageType = parsedMessage.headers[':message-type']; + if (messageType) { + if (messageType.value === 'error') { + throw parseError(parsedMessage); + } else if (messageType.value !== 'event') { + // not sure how to parse non-events/non-errors, ignore for now + return; + } + } + + // determine event type + var eventType = parsedMessage.headers[':event-type']; + // check that the event type is modeled + var eventModel = shape.members[eventType.value]; + if (!eventModel) { + return; + } + + var result = {}; + // check if an event payload exists + var eventPayloadMemberName = eventModel.eventPayloadMemberName; + if (eventPayloadMemberName) { + var payloadShape = eventModel.members[eventPayloadMemberName]; + // if the shape is binary, return the byte array + if (payloadShape.type === 'binary') { + result[eventPayloadMemberName] = parsedMessage.body; + } else { + result[eventPayloadMemberName] = parser.parse(parsedMessage.body.toString(), payloadShape); + } + } - /** - * TODO Remove in major version revision - * This backfill populates response data without the - * top-level payload name. - * - * @api private - */ - hoistPayloadMember: function hoistPayloadMember(resp) { - var req = resp.request; - var operationName = req.operation; - var operation = req.service.api.operations[operationName]; - var output = operation.output; - if (output.payload && !operation.hasEventOutput) { - var payloadMember = output.members[output.payload]; - var responsePayload = resp.data[output.payload]; - if (payloadMember.type === "structure") { - util.each(responsePayload, function (key, value) { - util.property(resp.data, key, value, false); - }); - } - } - }, + // read event headers + var eventHeaderNames = eventModel.eventHeaderMemberNames; + for (var i = 0; i < eventHeaderNames.length; i++) { + var name = eventHeaderNames[i]; + if (parsedMessage.headers[name]) { + // parse the header! + result[name] = eventModel.members[name].toType(parsedMessage.headers[name].value); + } + } - /** - * Compute SHA-256 checksums of streams - * - * @api private - */ - computeSha256: function computeSha256(body, done) { - if (util.isNode()) { - var Stream = util.stream.Stream; - var fs = __nccwpck_require__(57147); - if (typeof Stream === "function" && body instanceof Stream) { - if (typeof body.path === "string") { - // assume file object - var settings = {}; - if (typeof body.start === "number") { - settings.start = body.start; - } - if (typeof body.end === "number") { - settings.end = body.end; - } - body = fs.createReadStream(body.path, settings); - } else { - // TODO support other stream types - return done( - new Error( - "Non-file stream objects are " + "not supported with SigV4" - ) - ); - } - } - } + var output = {}; + output[eventType.value] = result; + return output; +} - util.crypto.sha256(body, "hex", function (err, sha) { - if (err) done(err); - else done(null, sha); - }); - }, +function parseError(message) { + var errorCode = message.headers[':error-code']; + var errorMessage = message.headers[':error-message']; + var error = new Error(errorMessage.value || errorMessage); + error.code = error.name = errorCode.value || errorCode; + return error; +} - /** - * @api private - */ - isClockSkewed: function isClockSkewed(serverTime) { - if (serverTime) { - util.property( - AWS.config, - "isClockSkewed", - Math.abs(new Date().getTime() - serverTime) >= 300000, - false - ); - return AWS.config.isClockSkewed; - } - }, +/** + * @api private + */ +module.exports = { + parseEvent: parseEvent +}; - applyClockOffset: function applyClockOffset(serverTime) { - if (serverTime) - AWS.config.systemClockOffset = serverTime - new Date().getTime(); - }, - /** - * @api private - */ - extractRequestId: function extractRequestId(resp) { - var requestId = - resp.httpResponse.headers["x-amz-request-id"] || - resp.httpResponse.headers["x-amzn-requestid"]; +/***/ }), - if (!requestId && resp.data && resp.data.ResponseMetadata) { - requestId = resp.data.ResponseMetadata.RequestId; - } +/***/ 30866: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - if (requestId) { - resp.requestId = requestId; - } +var Int64 = (__nccwpck_require__(48583).Int64); - if (resp.error) { - resp.error.requestId = requestId; - } - }, +var splitMessage = (__nccwpck_require__(71765).splitMessage); - /** - * @api private - */ - addPromises: function addPromises(constructors, PromiseDependency) { - var deletePromises = false; - if (PromiseDependency === undefined && AWS && AWS.config) { - PromiseDependency = AWS.config.getPromisesDependency(); - } - if ( - PromiseDependency === undefined && - typeof Promise !== "undefined" - ) { - PromiseDependency = Promise; - } - if (typeof PromiseDependency !== "function") deletePromises = true; - if (!Array.isArray(constructors)) constructors = [constructors]; - - for (var ind = 0; ind < constructors.length; ind++) { - var constructor = constructors[ind]; - if (deletePromises) { - if (constructor.deletePromisesFromClass) { - constructor.deletePromisesFromClass(); - } - } else if (constructor.addPromisesToClass) { - constructor.addPromisesToClass(PromiseDependency); - } - } - }, +var BOOLEAN_TAG = 'boolean'; +var BYTE_TAG = 'byte'; +var SHORT_TAG = 'short'; +var INT_TAG = 'integer'; +var LONG_TAG = 'long'; +var BINARY_TAG = 'binary'; +var STRING_TAG = 'string'; +var TIMESTAMP_TAG = 'timestamp'; +var UUID_TAG = 'uuid'; - /** - * @api private - * Return a function that will return a promise whose fate is decided by the - * callback behavior of the given method with `methodName`. The method to be - * promisified should conform to node.js convention of accepting a callback as - * last argument and calling that callback with error as the first argument - * and success value on the second argument. - */ - promisifyMethod: function promisifyMethod( - methodName, - PromiseDependency - ) { - return function promise() { - var self = this; - var args = Array.prototype.slice.call(arguments); - return new PromiseDependency(function (resolve, reject) { - args.push(function (err, data) { - if (err) { - reject(err); - } else { - resolve(data); - } - }); - self[methodName].apply(self, args); - }); - }; - }, +/** + * @api private + * + * @param {Buffer} headers + */ +function parseHeaders(headers) { + var out = {}; + var position = 0; + while (position < headers.length) { + var nameLength = headers.readUInt8(position++); + var name = headers.slice(position, position + nameLength).toString(); + position += nameLength; + switch (headers.readUInt8(position++)) { + case 0 /* boolTrue */: + out[name] = { + type: BOOLEAN_TAG, + value: true + }; + break; + case 1 /* boolFalse */: + out[name] = { + type: BOOLEAN_TAG, + value: false + }; + break; + case 2 /* byte */: + out[name] = { + type: BYTE_TAG, + value: headers.readInt8(position++) + }; + break; + case 3 /* short */: + out[name] = { + type: SHORT_TAG, + value: headers.readInt16BE(position) + }; + position += 2; + break; + case 4 /* integer */: + out[name] = { + type: INT_TAG, + value: headers.readInt32BE(position) + }; + position += 4; + break; + case 5 /* long */: + out[name] = { + type: LONG_TAG, + value: new Int64(headers.slice(position, position + 8)) + }; + position += 8; + break; + case 6 /* byteArray */: + var binaryLength = headers.readUInt16BE(position); + position += 2; + out[name] = { + type: BINARY_TAG, + value: headers.slice(position, position + binaryLength) + }; + position += binaryLength; + break; + case 7 /* string */: + var stringLength = headers.readUInt16BE(position); + position += 2; + out[name] = { + type: STRING_TAG, + value: headers.slice( + position, + position + stringLength + ).toString() + }; + position += stringLength; + break; + case 8 /* timestamp */: + out[name] = { + type: TIMESTAMP_TAG, + value: new Date( + new Int64(headers.slice(position, position + 8)) + .valueOf() + ) + }; + position += 8; + break; + case 9 /* uuid */: + var uuidChars = headers.slice(position, position + 16) + .toString('hex'); + position += 16; + out[name] = { + type: UUID_TAG, + value: uuidChars.substr(0, 8) + '-' + + uuidChars.substr(8, 4) + '-' + + uuidChars.substr(12, 4) + '-' + + uuidChars.substr(16, 4) + '-' + + uuidChars.substr(20) + }; + break; + default: + throw new Error('Unrecognized header type tag'); + } + } + return out; +} - /** - * @api private - */ - isDualstackAvailable: function isDualstackAvailable(service) { - if (!service) return false; - var metadata = __nccwpck_require__(17752); - if (typeof service !== "string") service = service.serviceIdentifier; - if (typeof service !== "string" || !metadata.hasOwnProperty(service)) - return false; - return !!metadata[service].dualstackAvailable; - }, +function parseMessage(message) { + var parsed = splitMessage(message); + return { headers: parseHeaders(parsed.headers), body: parsed.body }; +} - /** - * @api private - */ - calculateRetryDelay: function calculateRetryDelay( - retryCount, - retryDelayOptions, - err - ) { - if (!retryDelayOptions) retryDelayOptions = {}; - var customBackoff = retryDelayOptions.customBackoff || null; - if (typeof customBackoff === "function") { - return customBackoff(retryCount, err); - } - var base = - typeof retryDelayOptions.base === "number" - ? retryDelayOptions.base - : 100; - var delay = Math.random() * (Math.pow(2, retryCount) * base); - return delay; - }, - - /** - * @api private - */ - handleRequestWithRetries: function handleRequestWithRetries( - httpRequest, - options, - cb - ) { - if (!options) options = {}; - var http = AWS.HttpClient.getInstance(); - var httpOptions = options.httpOptions || {}; - var retryCount = 0; - - var errCallback = function (err) { - var maxRetries = options.maxRetries || 0; - if (err && err.code === "TimeoutError") err.retryable = true; - - // Call `calculateRetryDelay()` only when relevant, see #3401 - if (err && err.retryable && retryCount < maxRetries) { - var delay = util.calculateRetryDelay( - retryCount, - options.retryDelayOptions, - err - ); - if (delay >= 0) { - retryCount++; - setTimeout(sendRequest, delay + (err.retryAfter || 0)); - return; - } - } - cb(err); - }; +/** + * @api private + */ +module.exports = { + parseMessage: parseMessage +}; - var sendRequest = function () { - var data = ""; - http.handleRequest( - httpRequest, - httpOptions, - function (httpResponse) { - httpResponse.on("data", function (chunk) { - data += chunk.toString(); - }); - httpResponse.on("end", function () { - var statusCode = httpResponse.statusCode; - if (statusCode < 300) { - cb(null, data); - } else { - var retryAfter = - parseInt(httpResponse.headers["retry-after"], 10) * - 1000 || 0; - var err = util.error(new Error(), { - statusCode: statusCode, - retryable: statusCode >= 500 || statusCode === 429, - }); - if (retryAfter && err.retryable) - err.retryAfter = retryAfter; - errCallback(err); - } - }); - }, - errCallback - ); - }; - AWS.util.defer(sendRequest); - }, +/***/ }), - /** - * @api private - */ - uuid: { - v4: function uuidV4() { - return __nccwpck_require__(71062).v4(); - }, - }, +/***/ 71765: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - /** - * @api private - */ - convertPayloadToString: function convertPayloadToString(resp) { - var req = resp.request; - var operation = req.operation; - var rules = req.service.api.operations[operation].output || {}; - if (rules.payload && resp.data[rules.payload]) { - resp.data[rules.payload] = resp.data[rules.payload].toString(); - } - }, +var util = (__nccwpck_require__(28437).util); +var toBuffer = util.buffer.toBuffer; - /** - * @api private - */ - defer: function defer(callback) { - if ( - typeof process === "object" && - typeof process.nextTick === "function" - ) { - process.nextTick(callback); - } else if (typeof setImmediate === "function") { - setImmediate(callback); - } else { - setTimeout(callback, 0); - } - }, +// All prelude components are unsigned, 32-bit integers +var PRELUDE_MEMBER_LENGTH = 4; +// The prelude consists of two components +var PRELUDE_LENGTH = PRELUDE_MEMBER_LENGTH * 2; +// Checksums are always CRC32 hashes. +var CHECKSUM_LENGTH = 4; +// Messages must include a full prelude, a prelude checksum, and a message checksum +var MINIMUM_MESSAGE_LENGTH = PRELUDE_LENGTH + CHECKSUM_LENGTH * 2; - /** - * @api private - */ - getRequestPayloadShape: function getRequestPayloadShape(req) { - var operations = req.service.api.operations; - if (!operations) return undefined; - var operation = (operations || {})[req.operation]; - if (!operation || !operation.input || !operation.input.payload) - return undefined; - return operation.input.members[operation.input.payload]; - }, +/** + * @api private + * + * @param {Buffer} message + */ +function splitMessage(message) { + if (!util.Buffer.isBuffer(message)) message = toBuffer(message); - getProfilesFromSharedConfig: function getProfilesFromSharedConfig( - iniLoader, - filename - ) { - var profiles = {}; - var profilesFromConfig = {}; - if (process.env[util.configOptInEnv]) { - var profilesFromConfig = iniLoader.loadFrom({ - isConfig: true, - filename: process.env[util.sharedConfigFileEnv], - }); - } - var profilesFromCreds = {}; - try { - var profilesFromCreds = iniLoader.loadFrom({ - filename: - filename || - (process.env[util.configOptInEnv] && - process.env[util.sharedCredentialsFileEnv]), - }); - } catch (error) { - // if using config, assume it is fully descriptive without a credentials file: - if (!process.env[util.configOptInEnv]) throw error; - } - for ( - var i = 0, profileNames = Object.keys(profilesFromConfig); - i < profileNames.length; - i++ - ) { - profiles[profileNames[i]] = objectAssign( - profiles[profileNames[i]] || {}, - profilesFromConfig[profileNames[i]] - ); - } - for ( - var i = 0, profileNames = Object.keys(profilesFromCreds); - i < profileNames.length; - i++ - ) { - profiles[profileNames[i]] = objectAssign( - profiles[profileNames[i]] || {}, - profilesFromCreds[profileNames[i]] - ); - } - return profiles; - - /** - * Roughly the semantics of `Object.assign(target, source)` - */ - function objectAssign(target, source) { - for (var i = 0, keys = Object.keys(source); i < keys.length; i++) { - target[keys[i]] = source[keys[i]]; - } - return target; - } - }, + if (message.length < MINIMUM_MESSAGE_LENGTH) { + throw new Error('Provided message too short to accommodate event stream message overhead'); + } - /** - * @api private - */ - ARN: { - validate: function validateARN(str) { - return ( - str && str.indexOf("arn:") === 0 && str.split(":").length >= 6 - ); - }, - parse: function parseARN(arn) { - var matched = arn.split(":"); - return { - partition: matched[1], - service: matched[2], - region: matched[3], - accountId: matched[4], - resource: matched.slice(5).join(":"), - }; - }, - build: function buildARN(arnObject) { - if ( - arnObject.service === undefined || - arnObject.region === undefined || - arnObject.accountId === undefined || - arnObject.resource === undefined - ) - throw util.error(new Error("Input ARN object is invalid")); - return ( - "arn:" + - (arnObject.partition || "aws") + - ":" + - arnObject.service + - ":" + - arnObject.region + - ":" + - arnObject.accountId + - ":" + - arnObject.resource - ); - }, - }, + if (message.length !== message.readUInt32BE(0)) { + throw new Error('Reported message length does not match received message length'); + } - /** - * @api private - */ - defaultProfile: "default", + var expectedPreludeChecksum = message.readUInt32BE(PRELUDE_LENGTH); - /** - * @api private - */ - configOptInEnv: "AWS_SDK_LOAD_CONFIG", + if ( + expectedPreludeChecksum !== util.crypto.crc32( + message.slice(0, PRELUDE_LENGTH) + ) + ) { + throw new Error( + 'The prelude checksum specified in the message (' + + expectedPreludeChecksum + + ') does not match the calculated CRC32 checksum.' + ); + } - /** - * @api private - */ - sharedCredentialsFileEnv: "AWS_SHARED_CREDENTIALS_FILE", + var expectedMessageChecksum = message.readUInt32BE(message.length - CHECKSUM_LENGTH); - /** - * @api private - */ - sharedConfigFileEnv: "AWS_CONFIG_FILE", + if ( + expectedMessageChecksum !== util.crypto.crc32( + message.slice(0, message.length - CHECKSUM_LENGTH) + ) + ) { + throw new Error( + 'The message checksum did not match the expected value of ' + + expectedMessageChecksum + ); + } - /** - * @api private - */ - imdsDisabledEnv: "AWS_EC2_METADATA_DISABLED", - }; + var headersStart = PRELUDE_LENGTH + CHECKSUM_LENGTH; + var headersEnd = headersStart + message.readUInt32BE(PRELUDE_MEMBER_LENGTH); - /** - * @api private - */ - module.exports = util; + return { + headers: message.slice(headersStart, headersEnd), + body: message.slice(headersEnd, message.length - CHECKSUM_LENGTH), + }; +} - /***/ - }, +/** + * @api private + */ +module.exports = { + splitMessage: splitMessage +}; - /***/ 23546: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var util = __nccwpck_require__(77985); - var XmlNode = __nccwpck_require__(20397).XmlNode; - var XmlText = __nccwpck_require__(90971).XmlText; - function XmlBuilder() {} +/***/ }), - XmlBuilder.prototype.toXML = function ( - params, - shape, - rootElement, - noEmpty - ) { - var xml = new XmlNode(rootElement); - applyNamespaces(xml, shape, true); - serialize(xml, params, shape); - return xml.children.length > 0 || noEmpty ? xml.toString() : ""; - }; +/***/ 69643: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - function serialize(xml, value, shape) { - switch (shape.type) { - case "structure": - return serializeStructure(xml, value, shape); - case "map": - return serializeMap(xml, value, shape); - case "list": - return serializeList(xml, value, shape); - default: - return serializeScalar(xml, value, shape); - } - } +/** + * What is necessary to create an event stream in node? + * - http response stream + * - parser + * - event stream model + */ - function serializeStructure(xml, params, shape) { - util.arrayEach(shape.memberNames, function (memberName) { - var memberShape = shape.members[memberName]; - if (memberShape.location !== "body") return; - - var value = params[memberName]; - var name = memberShape.name; - if (value !== undefined && value !== null) { - if (memberShape.isXmlAttribute) { - xml.addAttribute(name, value); - } else if (memberShape.flattened) { - serialize(xml, value, memberShape); - } else { - var element = new XmlNode(name); - xml.addChildNode(element); - applyNamespaces(element, memberShape); - serialize(element, value, memberShape); - } - } - }); - } +var EventMessageChunkerStream = (__nccwpck_require__(18518).EventMessageChunkerStream); +var EventUnmarshallerStream = (__nccwpck_require__(93773).EventUnmarshallerStream); - function serializeMap(xml, map, shape) { - var xmlKey = shape.key.name || "key"; - var xmlValue = shape.value.name || "value"; +function createEventStream(stream, parser, model) { + var eventStream = new EventUnmarshallerStream({ + parser: parser, + eventStreamModel: model + }); - util.each(map, function (key, value) { - var entry = new XmlNode(shape.flattened ? shape.name : "entry"); - xml.addChildNode(entry); + var eventMessageChunker = new EventMessageChunkerStream(); - var entryKey = new XmlNode(xmlKey); - var entryValue = new XmlNode(xmlValue); - entry.addChildNode(entryKey); - entry.addChildNode(entryValue); + stream.pipe( + eventMessageChunker + ).pipe(eventStream); - serialize(entryKey, key, shape.key); - serialize(entryValue, value, shape.value); - }); - } + stream.on('error', function(err) { + eventMessageChunker.emit('error', err); + }); - function serializeList(xml, list, shape) { - if (shape.flattened) { - util.arrayEach(list, function (value) { - var name = shape.member.name || shape.name; - var element = new XmlNode(name); - xml.addChildNode(element); - serialize(element, value, shape.member); - }); - } else { - util.arrayEach(list, function (value) { - var name = shape.member.name || "member"; - var element = new XmlNode(name); - xml.addChildNode(element); - serialize(element, value, shape.member); - }); - } - } + eventMessageChunker.on('error', function(err) { + eventStream.emit('error', err); + }); - function serializeScalar(xml, value, shape) { - xml.addChildNode(new XmlText(shape.toWireFormat(value))); - } + return eventStream; +} - function applyNamespaces(xml, shape, isRoot) { - var uri, - prefix = "xmlns"; - if (shape.xmlNamespaceUri) { - uri = shape.xmlNamespaceUri; - if (shape.xmlNamespacePrefix) - prefix += ":" + shape.xmlNamespacePrefix; - } else if (isRoot && shape.api.xmlNamespaceUri) { - uri = shape.api.xmlNamespaceUri; - } +/** + * @api private + */ +module.exports = { + createEventStream: createEventStream +}; + + +/***/ }), + +/***/ 54995: +/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { - if (uri) xml.addAttribute(prefix, uri); +var AWS = __nccwpck_require__(28437); +var SequentialExecutor = __nccwpck_require__(55948); +var DISCOVER_ENDPOINT = (__nccwpck_require__(45313).discoverEndpoint); +/** + * The namespace used to register global event listeners for request building + * and sending. + */ +AWS.EventListeners = { + /** + * @!attribute VALIDATE_CREDENTIALS + * A request listener that validates whether the request is being + * sent with credentials. + * Handles the {AWS.Request~validate 'validate' Request event} + * @example Sending a request without validating credentials + * var listener = AWS.EventListeners.Core.VALIDATE_CREDENTIALS; + * request.removeListener('validate', listener); + * @readonly + * @return [Function] + * @!attribute VALIDATE_REGION + * A request listener that validates whether the region is set + * for a request. + * Handles the {AWS.Request~validate 'validate' Request event} + * @example Sending a request without validating region configuration + * var listener = AWS.EventListeners.Core.VALIDATE_REGION; + * request.removeListener('validate', listener); + * @readonly + * @return [Function] + * @!attribute VALIDATE_PARAMETERS + * A request listener that validates input parameters in a request. + * Handles the {AWS.Request~validate 'validate' Request event} + * @example Sending a request without validating parameters + * var listener = AWS.EventListeners.Core.VALIDATE_PARAMETERS; + * request.removeListener('validate', listener); + * @example Disable parameter validation globally + * AWS.EventListeners.Core.removeListener('validate', + * AWS.EventListeners.Core.VALIDATE_REGION); + * @readonly + * @return [Function] + * @!attribute SEND + * A request listener that initiates the HTTP connection for a + * request being sent. Handles the {AWS.Request~send 'send' Request event} + * @example Replacing the HTTP handler + * var listener = AWS.EventListeners.Core.SEND; + * request.removeListener('send', listener); + * request.on('send', function(response) { + * customHandler.send(response); + * }); + * @return [Function] + * @readonly + * @!attribute HTTP_DATA + * A request listener that reads data from the HTTP connection in order + * to build the response data. + * Handles the {AWS.Request~httpData 'httpData' Request event}. + * Remove this handler if you are overriding the 'httpData' event and + * do not want extra data processing and buffering overhead. + * @example Disabling default data processing + * var listener = AWS.EventListeners.Core.HTTP_DATA; + * request.removeListener('httpData', listener); + * @return [Function] + * @readonly + */ + Core: {} /* doc hack */ +}; + +/** + * @api private + */ +function getOperationAuthtype(req) { + if (!req.service.api.operations) { + return ''; + } + var operation = req.service.api.operations[req.operation]; + return operation ? operation.authtype : ''; +} + +AWS.EventListeners = { + Core: new SequentialExecutor().addNamedListeners(function(add, addAsync) { + addAsync('VALIDATE_CREDENTIALS', 'validate', + function VALIDATE_CREDENTIALS(req, done) { + if (!req.service.api.signatureVersion && !req.service.config.signatureVersion) return done(); // none + req.service.config.getCredentials(function(err) { + if (err) { + req.response.error = AWS.util.error(err, + {code: 'CredentialsError', message: 'Missing credentials in config, if using AWS_CONFIG_FILE, set AWS_SDK_LOAD_CONFIG=1'}); + } + done(); + }); + }); + + add('VALIDATE_REGION', 'validate', function VALIDATE_REGION(req) { + if (!req.service.isGlobalEndpoint) { + var dnsHostRegex = new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/); + if (!req.service.config.region) { + req.response.error = AWS.util.error(new Error(), + {code: 'ConfigError', message: 'Missing region in config'}); + } else if (!dnsHostRegex.test(req.service.config.region)) { + req.response.error = AWS.util.error(new Error(), + {code: 'ConfigError', message: 'Invalid region in config'}); + } + } + }); + + add('BUILD_IDEMPOTENCY_TOKENS', 'validate', function BUILD_IDEMPOTENCY_TOKENS(req) { + if (!req.service.api.operations) { + return; + } + var operation = req.service.api.operations[req.operation]; + if (!operation) { + return; + } + var idempotentMembers = operation.idempotentMembers; + if (!idempotentMembers.length) { + return; + } + // creates a copy of params so user's param object isn't mutated + var params = AWS.util.copy(req.params); + for (var i = 0, iLen = idempotentMembers.length; i < iLen; i++) { + if (!params[idempotentMembers[i]]) { + // add the member + params[idempotentMembers[i]] = AWS.util.uuid.v4(); + } + } + req.params = params; + }); + + add('VALIDATE_PARAMETERS', 'validate', function VALIDATE_PARAMETERS(req) { + if (!req.service.api.operations) { + return; + } + var rules = req.service.api.operations[req.operation].input; + var validation = req.service.config.paramValidation; + new AWS.ParamValidator(validation).validate(rules, req.params); + }); + + addAsync('COMPUTE_SHA256', 'afterBuild', function COMPUTE_SHA256(req, done) { + req.haltHandlersOnError(); + if (!req.service.api.operations) { + return; + } + var operation = req.service.api.operations[req.operation]; + var authtype = operation ? operation.authtype : ''; + if (!req.service.api.signatureVersion && !authtype && !req.service.config.signatureVersion) return done(); // none + if (req.service.getSignerClass(req) === AWS.Signers.V4) { + var body = req.httpRequest.body || ''; + if (authtype.indexOf('unsigned-body') >= 0) { + req.httpRequest.headers['X-Amz-Content-Sha256'] = 'UNSIGNED-PAYLOAD'; + return done(); + } + AWS.util.computeSha256(body, function(err, sha) { + if (err) { + done(err); + } + else { + req.httpRequest.headers['X-Amz-Content-Sha256'] = sha; + done(); + } + }); + } else { + done(); } + }); - /** - * @api private - */ - module.exports = XmlBuilder; - - /***/ - }, - - /***/ 98241: /***/ (module) => { - /** - * Escapes characters that can not be in an XML attribute. - */ - function escapeAttribute(value) { - return value - .replace(/&/g, "&") - .replace(/'/g, "'") - .replace(//g, ">") - .replace(/"/g, """); + add('SET_CONTENT_LENGTH', 'afterBuild', function SET_CONTENT_LENGTH(req) { + var authtype = getOperationAuthtype(req); + var payloadMember = AWS.util.getRequestPayloadShape(req); + if (req.httpRequest.headers['Content-Length'] === undefined) { + try { + var length = AWS.util.string.byteLength(req.httpRequest.body); + req.httpRequest.headers['Content-Length'] = length; + } catch (err) { + if (payloadMember && payloadMember.isStreaming) { + if (payloadMember.requiresLength) { + //streaming payload requires length(s3, glacier) + throw err; + } else if (authtype.indexOf('unsigned-body') >= 0) { + //unbounded streaming payload(lex, mediastore) + req.httpRequest.headers['Transfer-Encoding'] = 'chunked'; + return; + } else { + throw err; + } + } + throw err; + } } + }); + + add('SET_HTTP_HOST', 'afterBuild', function SET_HTTP_HOST(req) { + req.httpRequest.headers['Host'] = req.httpRequest.endpoint.host; + }); - /** - * @api private - */ - module.exports = { - escapeAttribute: escapeAttribute, - }; + add('RESTART', 'restart', function RESTART() { + var err = this.response.error; + if (!err || !err.retryable) return; - /***/ - }, + this.httpRequest = new AWS.HttpRequest( + this.service.endpoint, + this.service.region + ); - /***/ 98464: /***/ (module) => { - /** - * Escapes characters that can not be in an XML element. - */ - function escapeElement(value) { - return value - .replace(/&/g, "&") - .replace(//g, ">"); + if (this.response.retryCount < this.service.config.maxRetries) { + this.response.retryCount++; + } else { + this.response.error = null; } + }); - /** - * @api private - */ - module.exports = { - escapeElement: escapeElement, - }; - - /***/ - }, - - /***/ 96752: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var AWS = __nccwpck_require__(28437); - var util = AWS.util; - var Shape = AWS.Model.Shape; - - var xml2js = __nccwpck_require__(66189); - - /** - * @api private - */ - var options = { - // options passed to xml2js parser - explicitCharkey: false, // undocumented - trim: false, // trim the leading/trailing whitespace from text nodes - normalize: false, // trim interior whitespace inside text nodes - explicitRoot: false, // return the root node in the resulting object? - emptyTag: null, // the default value for empty nodes - explicitArray: true, // always put child nodes in an array - ignoreAttrs: false, // ignore attributes, only create text nodes - mergeAttrs: false, // merge attributes and child elements - validator: null, // a callable validator - }; + var addToHead = true; + addAsync('DISCOVER_ENDPOINT', 'sign', DISCOVER_ENDPOINT, addToHead); - function NodeXmlParser() {} + addAsync('SIGN', 'sign', function SIGN(req, done) { + var service = req.service; + var operations = req.service.api.operations || {}; + var operation = operations[req.operation]; + var authtype = operation ? operation.authtype : ''; + if (!service.api.signatureVersion && !authtype && !service.config.signatureVersion) return done(); // none - NodeXmlParser.prototype.parse = function (xml, shape) { - shape = shape || {}; + service.config.getCredentials(function (err, credentials) { + if (err) { + req.response.error = err; + return done(); + } - var result = null; - var error = null; + try { + var date = service.getSkewCorrectedDate(); + var SignerClass = service.getSignerClass(req); + var signer = new SignerClass(req.httpRequest, + service.getSigningName(), + { + signatureCache: service.config.signatureCache, + operation: operation, + signatureVersion: service.api.signatureVersion + }); + signer.setServiceClientId(service._clientId); - var parser = new xml2js.Parser(options); - parser.parseString(xml, function (e, r) { - error = e; - result = r; - }); + // clear old authorization headers + delete req.httpRequest.headers['Authorization']; + delete req.httpRequest.headers['Date']; + delete req.httpRequest.headers['X-Amz-Date']; - if (result) { - var data = parseXml(result, shape); - if (result.ResponseMetadata) { - data.ResponseMetadata = parseXml(result.ResponseMetadata[0], {}); - } - return data; - } else if (error) { - throw util.error(error, { code: "XMLParserError", retryable: true }); - } else { - // empty xml document - return parseXml({}, shape); + // add new authorization + signer.addAuthorization(credentials, date); + req.signedAt = date; + } catch (e) { + req.response.error = e; } - }; + done(); + }); + }); - function parseXml(xml, shape) { - switch (shape.type) { - case "structure": - return parseStructure(xml, shape); - case "map": - return parseMap(xml, shape); - case "list": - return parseList(xml, shape); - case undefined: - case null: - return parseUnknown(xml); - default: - return parseScalar(xml, shape); - } + add('VALIDATE_RESPONSE', 'validateResponse', function VALIDATE_RESPONSE(resp) { + if (this.service.successfulResponse(resp, this)) { + resp.data = {}; + resp.error = null; + } else { + resp.data = null; + resp.error = AWS.util.error(new Error(), + {code: 'UnknownError', message: 'An unknown error occurred.'}); } + }); - function parseStructure(xml, shape) { - var data = {}; - if (xml === null) return data; + addAsync('SEND', 'send', function SEND(resp, done) { + resp.httpResponse._abortCallback = done; + resp.error = null; + resp.data = null; - util.each(shape.members, function (memberName, memberShape) { - var xmlName = memberShape.name; - if ( - Object.prototype.hasOwnProperty.call(xml, xmlName) && - Array.isArray(xml[xmlName]) - ) { - var xmlChild = xml[xmlName]; - if (!memberShape.flattened) xmlChild = xmlChild[0]; - - data[memberName] = parseXml(xmlChild, memberShape); - } else if ( - memberShape.isXmlAttribute && - xml.$ && - Object.prototype.hasOwnProperty.call(xml.$, xmlName) - ) { - data[memberName] = parseScalar(xml.$[xmlName], memberShape); - } else if ( - memberShape.type === "list" && - !shape.api.xmlNoDefaultLists - ) { - data[memberName] = memberShape.defaultValue; + function callback(httpResp) { + resp.httpResponse.stream = httpResp; + var stream = resp.request.httpRequest.stream; + var service = resp.request.service; + var api = service.api; + var operationName = resp.request.operation; + var operation = api.operations[operationName] || {}; + + httpResp.on('headers', function onHeaders(statusCode, headers, statusMessage) { + resp.request.emit( + 'httpHeaders', + [statusCode, headers, resp, statusMessage] + ); + + if (!resp.httpResponse.streaming) { + if (AWS.HttpClient.streamsApiVersion === 2) { // streams2 API check + // if we detect event streams, we're going to have to + // return the stream immediately + if (operation.hasEventOutput && service.successfulResponse(resp)) { + // skip reading the IncomingStream + resp.request.emit('httpDone'); + done(); + return; + } + + httpResp.on('readable', function onReadable() { + var data = httpResp.read(); + if (data !== null) { + resp.request.emit('httpData', [data, resp]); + } + }); + } else { // legacy streams API + httpResp.on('data', function onData(data) { + resp.request.emit('httpData', [data, resp]); + }); + } } }); - return data; + httpResp.on('end', function onEnd() { + if (!stream || !stream.didCallback) { + if (AWS.HttpClient.streamsApiVersion === 2 && (operation.hasEventOutput && service.successfulResponse(resp))) { + // don't concatenate response chunks when streaming event stream data when response is successful + return; + } + resp.request.emit('httpDone'); + done(); + } + }); } - function parseMap(xml, shape) { - var data = {}; - if (xml === null) return data; - - var xmlKey = shape.key.name || "key"; - var xmlValue = shape.value.name || "value"; - var iterable = shape.flattened ? xml : xml.entry; - - if (Array.isArray(iterable)) { - util.arrayEach(iterable, function (child) { - data[child[xmlKey][0]] = parseXml(child[xmlValue][0], shape.value); - }); - } + function progress(httpResp) { + httpResp.on('sendProgress', function onSendProgress(value) { + resp.request.emit('httpUploadProgress', [value, resp]); + }); - return data; + httpResp.on('receiveProgress', function onReceiveProgress(value) { + resp.request.emit('httpDownloadProgress', [value, resp]); + }); } - function parseList(xml, shape) { - var data = []; - var name = shape.member.name || "member"; - if (shape.flattened) { - util.arrayEach(xml, function (xmlChild) { - data.push(parseXml(xmlChild, shape.member)); - }); - } else if (xml && Array.isArray(xml[name])) { - util.arrayEach(xml[name], function (child) { - data.push(parseXml(child, shape.member)); + function error(err) { + if (err.code !== 'RequestAbortedError') { + var errCode = err.code === 'TimeoutError' ? err.code : 'NetworkingError'; + err = AWS.util.error(err, { + code: errCode, + region: resp.request.httpRequest.region, + hostname: resp.request.httpRequest.endpoint.hostname, + retryable: true }); } - - return data; + resp.error = err; + resp.request.emit('httpError', [resp.error, resp], function() { + done(); + }); } - function parseScalar(text, shape) { - if (text && text.$ && text.$.encoding === "base64") { - shape = new Shape.create({ type: text.$.encoding }); + function executeSend() { + var http = AWS.HttpClient.getInstance(); + var httpOptions = resp.request.service.config.httpOptions || {}; + try { + var stream = http.handleRequest(resp.request.httpRequest, httpOptions, + callback, error); + progress(stream); + } catch (err) { + error(err); } - if (text && text._) text = text._; + } + var timeDiff = (resp.request.service.getSkewCorrectedDate() - this.signedAt) / 1000; + if (timeDiff >= 60 * 10) { // if we signed 10min ago, re-sign + this.emit('sign', [this], function(err) { + if (err) done(err); + else executeSend(); + }); + } else { + executeSend(); + } + }); - if (typeof shape.toType === "function") { - return shape.toType(text); - } else { - return text; + add('HTTP_HEADERS', 'httpHeaders', + function HTTP_HEADERS(statusCode, headers, resp, statusMessage) { + resp.httpResponse.statusCode = statusCode; + resp.httpResponse.statusMessage = statusMessage; + resp.httpResponse.headers = headers; + resp.httpResponse.body = AWS.util.buffer.toBuffer(''); + resp.httpResponse.buffers = []; + resp.httpResponse.numBytes = 0; + var dateHeader = headers.date || headers.Date; + var service = resp.request.service; + if (dateHeader) { + var serverTime = Date.parse(dateHeader); + if (service.config.correctClockSkew + && service.isClockSkewed(serverTime)) { + service.applyClockOffset(serverTime); } } + }); - function parseUnknown(xml) { - if (xml === undefined || xml === null) return ""; - if (typeof xml === "string") return xml; - - // parse a list - if (Array.isArray(xml)) { - var arr = []; - for (i = 0; i < xml.length; i++) { - arr.push(parseXml(xml[i], {})); - } - return arr; - } + add('HTTP_DATA', 'httpData', function HTTP_DATA(chunk, resp) { + if (chunk) { + if (AWS.util.isNode()) { + resp.httpResponse.numBytes += chunk.length; - // empty object - var keys = Object.keys(xml), - i; - if (keys.length === 0 || (keys.length === 1 && keys[0] === "$")) { - return {}; + var total = resp.httpResponse.headers['content-length']; + var progress = { loaded: resp.httpResponse.numBytes, total: total }; + resp.request.emit('httpDownloadProgress', [progress, resp]); } - // object, parse as structure - var data = {}; - for (i = 0; i < keys.length; i++) { - var key = keys[i], - value = xml[key]; - if (key === "$") continue; - if (value.length > 1) { - // this member is a list - data[key] = parseList(value, { member: {} }); - } else { - // this member is a single item - data[key] = parseXml(value[0], {}); - } - } - return data; + resp.httpResponse.buffers.push(AWS.util.buffer.toBuffer(chunk)); } + }); - /** - * @api private - */ - module.exports = NodeXmlParser; - - /***/ - }, - - /***/ 20397: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var escapeAttribute = __nccwpck_require__(98241).escapeAttribute; + add('HTTP_DONE', 'httpDone', function HTTP_DONE(resp) { + // convert buffers array into single buffer + if (resp.httpResponse.buffers && resp.httpResponse.buffers.length > 0) { + var body = AWS.util.buffer.concat(resp.httpResponse.buffers); + resp.httpResponse.body = body; + } + delete resp.httpResponse.numBytes; + delete resp.httpResponse.buffers; + }); - /** - * Represents an XML node. - * @api private - */ - function XmlNode(name, children) { - if (children === void 0) { - children = []; + add('FINALIZE_ERROR', 'retry', function FINALIZE_ERROR(resp) { + if (resp.httpResponse.statusCode) { + resp.error.statusCode = resp.httpResponse.statusCode; + if (resp.error.retryable === undefined) { + resp.error.retryable = this.service.retryableError(resp.error, this); } - this.name = name; - this.children = children; - this.attributes = {}; } - XmlNode.prototype.addAttribute = function (name, value) { - this.attributes[name] = value; - return this; - }; - XmlNode.prototype.addChildNode = function (child) { - this.children.push(child); - return this; - }; - XmlNode.prototype.removeAttribute = function (name) { - delete this.attributes[name]; - return this; - }; - XmlNode.prototype.toString = function () { - var hasChildren = Boolean(this.children.length); - var xmlText = "<" + this.name; - // add attributes - var attributes = this.attributes; - for ( - var i = 0, attributeNames = Object.keys(attributes); - i < attributeNames.length; - i++ - ) { - var attributeName = attributeNames[i]; - var attribute = attributes[attributeName]; - if (typeof attribute !== "undefined" && attribute !== null) { - xmlText += - " " + - attributeName + - '="' + - escapeAttribute("" + attribute) + - '"'; - } - } - return (xmlText += !hasChildren - ? "/>" - : ">" + - this.children - .map(function (c) { - return c.toString(); - }) - .join("") + - ""); - }; - - /** - * @api private - */ - module.exports = { - XmlNode: XmlNode, - }; + }); - /***/ - }, - - /***/ 90971: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var escapeElement = __nccwpck_require__(98464).escapeElement; - - /** - * Represents an XML text value. - * @api private - */ - function XmlText(value) { - this.value = value; + add('INVALIDATE_CREDENTIALS', 'retry', function INVALIDATE_CREDENTIALS(resp) { + if (!resp.error) return; + switch (resp.error.code) { + case 'RequestExpired': // EC2 only + case 'ExpiredTokenException': + case 'ExpiredToken': + resp.error.retryable = true; + resp.request.service.config.credentials.expired = true; } + }); - XmlText.prototype.toString = function () { - return escapeElement("" + this.value); - }; - - /** - * @api private - */ - module.exports = { - XmlText: XmlText, - }; - - /***/ - }, + add('EXPIRED_SIGNATURE', 'retry', function EXPIRED_SIGNATURE(resp) { + var err = resp.error; + if (!err) return; + if (typeof err.code === 'string' && typeof err.message === 'string') { + if (err.code.match(/Signature/) && err.message.match(/expired/)) { + resp.error.retryable = true; + } + } + }); - /***/ 71062: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var v1 = __nccwpck_require__(68207); - var v4 = __nccwpck_require__(54151); + add('CLOCK_SKEWED', 'retry', function CLOCK_SKEWED(resp) { + if (!resp.error) return; + if (this.service.clockSkewError(resp.error) + && this.service.config.correctClockSkew) { + resp.error.retryable = true; + } + }); - var uuid = v4; - uuid.v1 = v1; - uuid.v4 = v4; + add('REDIRECT', 'retry', function REDIRECT(resp) { + if (resp.error && resp.error.statusCode >= 300 && + resp.error.statusCode < 400 && resp.httpResponse.headers['location']) { + this.httpRequest.endpoint = + new AWS.Endpoint(resp.httpResponse.headers['location']); + this.httpRequest.headers['Host'] = this.httpRequest.endpoint.host; + resp.error.redirect = true; + resp.error.retryable = true; + } + }); - module.exports = uuid; + add('RETRY_CHECK', 'retry', function RETRY_CHECK(resp) { + if (resp.error) { + if (resp.error.redirect && resp.redirectCount < resp.maxRedirects) { + resp.error.retryDelay = 0; + } else if (resp.retryCount < resp.maxRetries) { + resp.error.retryDelay = this.service.retryDelays(resp.retryCount, resp.error) || 0; + } + } + }); - /***/ - }, + addAsync('RESET_RETRY_STATE', 'afterRetry', function RESET_RETRY_STATE(resp, done) { + var delay, willRetry = false; - /***/ 50367: /***/ (module) => { - /** - * Convert array of 16 byte values to UUID string format of the form: - * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX - */ - var byteToHex = []; - for (var i = 0; i < 256; ++i) { - byteToHex[i] = (i + 0x100).toString(16).substr(1); + if (resp.error) { + delay = resp.error.retryDelay || 0; + if (resp.error.retryable && resp.retryCount < resp.maxRetries) { + resp.retryCount++; + willRetry = true; + } else if (resp.error.redirect && resp.redirectCount < resp.maxRedirects) { + resp.redirectCount++; + willRetry = true; + } } - function bytesToUuid(buf, offset) { - var i = offset || 0; - var bth = byteToHex; - // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4 - return [ - bth[buf[i++]], - bth[buf[i++]], - bth[buf[i++]], - bth[buf[i++]], - "-", - bth[buf[i++]], - bth[buf[i++]], - "-", - bth[buf[i++]], - bth[buf[i++]], - "-", - bth[buf[i++]], - bth[buf[i++]], - "-", - bth[buf[i++]], - bth[buf[i++]], - bth[buf[i++]], - bth[buf[i++]], - bth[buf[i++]], - bth[buf[i++]], - ].join(""); + // delay < 0 is a signal from customBackoff to skip retries + if (willRetry && delay >= 0) { + resp.error = null; + setTimeout(done, delay); + } else { + done(); + } + }); + }), + + CorePost: new SequentialExecutor().addNamedListeners(function(add) { + add('EXTRACT_REQUEST_ID', 'extractData', AWS.util.extractRequestId); + add('EXTRACT_REQUEST_ID', 'extractError', AWS.util.extractRequestId); + + add('ENOTFOUND_ERROR', 'httpError', function ENOTFOUND_ERROR(err) { + function isDNSError(err) { + return err.errno === 'ENOTFOUND' || + typeof err.errno === 'number' && + typeof AWS.util.getSystemErrorName === 'function' && + ['EAI_NONAME', 'EAI_NODATA'].indexOf(AWS.util.getSystemErrorName(err.errno) >= 0); + } + if (err.code === 'NetworkingError' && isDNSError(err)) { + var message = 'Inaccessible host: `' + err.hostname + + '\'. This service may not be available in the `' + err.region + + '\' region.'; + this.response.error = AWS.util.error(new Error(message), { + code: 'UnknownEndpoint', + region: err.region, + hostname: err.hostname, + retryable: true, + originalError: err + }); + } + }); + }), + + Logger: new SequentialExecutor().addNamedListeners(function(add) { + add('LOG_REQUEST', 'complete', function LOG_REQUEST(resp) { + var req = resp.request; + var logger = req.service.config.logger; + if (!logger) return; + function filterSensitiveLog(inputShape, shape) { + if (!shape) { + return shape; + } + if (inputShape.isSensitive) { + return '***SensitiveInformation***'; + } + switch (inputShape.type) { + case 'structure': + var struct = {}; + AWS.util.each(shape, function(subShapeName, subShape) { + if (Object.prototype.hasOwnProperty.call(inputShape.members, subShapeName)) { + struct[subShapeName] = filterSensitiveLog(inputShape.members[subShapeName], subShape); + } else { + struct[subShapeName] = subShape; + } + }); + return struct; + case 'list': + var list = []; + AWS.util.arrayEach(shape, function(subShape, index) { + list.push(filterSensitiveLog(inputShape.member, subShape)); + }); + return list; + case 'map': + var map = {}; + AWS.util.each(shape, function(key, value) { + map[key] = filterSensitiveLog(inputShape.value, value); + }); + return map; + default: + return shape; + } } - module.exports = bytesToUuid; - - /***/ - }, + function buildMessage() { + var time = resp.request.service.getSkewCorrectedDate().getTime(); + var delta = (time - req.startTime.getTime()) / 1000; + var ansi = logger.isTTY ? true : false; + var status = resp.httpResponse.statusCode; + var censoredParams = req.params; + if ( + req.service.api.operations && + req.service.api.operations[req.operation] && + req.service.api.operations[req.operation].input + ) { + var inputShape = req.service.api.operations[req.operation].input; + censoredParams = filterSensitiveLog(inputShape, req.params); + } + var params = (__nccwpck_require__(73837).inspect)(censoredParams, true, null); + var message = ''; + if (ansi) message += '\x1B[33m'; + message += '[AWS ' + req.service.serviceIdentifier + ' ' + status; + message += ' ' + delta.toString() + 's ' + resp.retryCount + ' retries]'; + if (ansi) message += '\x1B[0;1m'; + message += ' ' + AWS.util.string.lowerFirst(req.operation); + message += '(' + params + ')'; + if (ansi) message += '\x1B[0m'; + return message; + } + + var line = buildMessage(); + if (typeof logger.log === 'function') { + logger.log(line); + } else if (typeof logger.write === 'function') { + logger.write(line + '\n'); + } + }); + }), + + Json: new SequentialExecutor().addNamedListeners(function(add) { + var svc = __nccwpck_require__(30083); + add('BUILD', 'build', svc.buildRequest); + add('EXTRACT_DATA', 'extractData', svc.extractData); + add('EXTRACT_ERROR', 'extractError', svc.extractError); + }), + + Rest: new SequentialExecutor().addNamedListeners(function(add) { + var svc = __nccwpck_require__(98200); + add('BUILD', 'build', svc.buildRequest); + add('EXTRACT_DATA', 'extractData', svc.extractData); + add('EXTRACT_ERROR', 'extractError', svc.extractError); + }), + + RestJson: new SequentialExecutor().addNamedListeners(function(add) { + var svc = __nccwpck_require__(5883); + add('BUILD', 'build', svc.buildRequest); + add('EXTRACT_DATA', 'extractData', svc.extractData); + add('EXTRACT_ERROR', 'extractError', svc.extractError); + }), + + RestXml: new SequentialExecutor().addNamedListeners(function(add) { + var svc = __nccwpck_require__(15143); + add('BUILD', 'build', svc.buildRequest); + add('EXTRACT_DATA', 'extractData', svc.extractData); + add('EXTRACT_ERROR', 'extractError', svc.extractError); + }), + + Query: new SequentialExecutor().addNamedListeners(function(add) { + var svc = __nccwpck_require__(90761); + add('BUILD', 'build', svc.buildRequest); + add('EXTRACT_DATA', 'extractData', svc.extractData); + add('EXTRACT_ERROR', 'extractError', svc.extractError); + }) +}; + + +/***/ }), + +/***/ 1556: +/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { + +var AWS = __nccwpck_require__(28437); +var inherit = AWS.util.inherit; + +/** + * The endpoint that a service will talk to, for example, + * `'https://ec2.ap-southeast-1.amazonaws.com'`. If + * you need to override an endpoint for a service, you can + * set the endpoint on a service by passing the endpoint + * object with the `endpoint` option key: + * + * ```javascript + * var ep = new AWS.Endpoint('awsproxy.example.com'); + * var s3 = new AWS.S3({endpoint: ep}); + * s3.service.endpoint.hostname == 'awsproxy.example.com' + * ``` + * + * Note that if you do not specify a protocol, the protocol will + * be selected based on your current {AWS.config} configuration. + * + * @!attribute protocol + * @return [String] the protocol (http or https) of the endpoint + * URL + * @!attribute hostname + * @return [String] the host portion of the endpoint, e.g., + * example.com + * @!attribute host + * @return [String] the host portion of the endpoint including + * the port, e.g., example.com:80 + * @!attribute port + * @return [Integer] the port of the endpoint + * @!attribute href + * @return [String] the full URL of the endpoint + */ +AWS.Endpoint = inherit({ + + /** + * @overload Endpoint(endpoint) + * Constructs a new endpoint given an endpoint URL. If the + * URL omits a protocol (http or https), the default protocol + * set in the global {AWS.config} will be used. + * @param endpoint [String] the URL to construct an endpoint from + */ + constructor: function Endpoint(endpoint, config) { + AWS.util.hideProperties(this, ['slashes', 'auth', 'hash', 'search', 'query']); + + if (typeof endpoint === 'undefined' || endpoint === null) { + throw new Error('Invalid endpoint: ' + endpoint); + } else if (typeof endpoint !== 'string') { + return AWS.util.copy(endpoint); + } + + if (!endpoint.match(/^http/)) { + var useSSL = config && config.sslEnabled !== undefined ? + config.sslEnabled : AWS.config.sslEnabled; + endpoint = (useSSL ? 'https' : 'http') + '://' + endpoint; + } + + AWS.util.update(this, AWS.util.urlParse(endpoint)); + + // Ensure the port property is set as an integer + if (this.port) { + this.port = parseInt(this.port, 10); + } else { + this.port = this.protocol === 'https:' ? 443 : 80; + } + } + +}); + +/** + * The low level HTTP request object, encapsulating all HTTP header + * and body data sent by a service request. + * + * @!attribute method + * @return [String] the HTTP method of the request + * @!attribute path + * @return [String] the path portion of the URI, e.g., + * "/list/?start=5&num=10" + * @!attribute headers + * @return [map] + * a map of header keys and their respective values + * @!attribute body + * @return [String] the request body payload + * @!attribute endpoint + * @return [AWS.Endpoint] the endpoint for the request + * @!attribute region + * @api private + * @return [String] the region, for signing purposes only. + */ +AWS.HttpRequest = inherit({ + + /** + * @api private + */ + constructor: function HttpRequest(endpoint, region) { + endpoint = new AWS.Endpoint(endpoint); + this.method = 'POST'; + this.path = endpoint.path || '/'; + this.headers = {}; + this.body = ''; + this.endpoint = endpoint; + this.region = region; + this._userAgent = ''; + this.setUserAgent(); + }, + + /** + * @api private + */ + setUserAgent: function setUserAgent() { + this._userAgent = this.headers[this.getUserAgentHeaderName()] = AWS.util.userAgent(); + }, + + getUserAgentHeaderName: function getUserAgentHeaderName() { + var prefix = AWS.util.isBrowser() ? 'X-Amz-' : ''; + return prefix + 'User-Agent'; + }, + + /** + * @api private + */ + appendToUserAgent: function appendToUserAgent(agentPartial) { + if (typeof agentPartial === 'string' && agentPartial) { + this._userAgent += ' ' + agentPartial; + } + this.headers[this.getUserAgentHeaderName()] = this._userAgent; + }, + + /** + * @api private + */ + getUserAgent: function getUserAgent() { + return this._userAgent; + }, + + /** + * @return [String] the part of the {path} excluding the + * query string + */ + pathname: function pathname() { + return this.path.split('?', 1)[0]; + }, + + /** + * @return [String] the query string portion of the {path} + */ + search: function search() { + var query = this.path.split('?', 2)[1]; + if (query) { + query = AWS.util.queryStringParse(query); + return AWS.util.queryParamsToString(query); + } + return ''; + }, + + /** + * @api private + * update httpRequest endpoint with endpoint string + */ + updateEndpoint: function updateEndpoint(endpointStr) { + var newEndpoint = new AWS.Endpoint(endpointStr); + this.endpoint = newEndpoint; + this.path = newEndpoint.path || '/'; + if (this.headers['Host']) { + this.headers['Host'] = newEndpoint.host; + } + } +}); + +/** + * The low level HTTP response object, encapsulating all HTTP header + * and body data returned from the request. + * + * @!attribute statusCode + * @return [Integer] the HTTP status code of the response (e.g., 200, 404) + * @!attribute headers + * @return [map] + * a map of response header keys and their respective values + * @!attribute body + * @return [String] the response body payload + * @!attribute [r] streaming + * @return [Boolean] whether this response is being streamed at a low-level. + * Defaults to `false` (buffered reads). Do not modify this manually, use + * {createUnbufferedStream} to convert the stream to unbuffered mode + * instead. + */ +AWS.HttpResponse = inherit({ + + /** + * @api private + */ + constructor: function HttpResponse() { + this.statusCode = undefined; + this.headers = {}; + this.body = undefined; + this.streaming = false; + this.stream = null; + }, + + /** + * Disables buffering on the HTTP response and returns the stream for reading. + * @return [Stream, XMLHttpRequest, null] the underlying stream object. + * Use this object to directly read data off of the stream. + * @note This object is only available after the {AWS.Request~httpHeaders} + * event has fired. This method must be called prior to + * {AWS.Request~httpData}. + * @example Taking control of a stream + * request.on('httpHeaders', function(statusCode, headers) { + * if (statusCode < 300) { + * if (headers.etag === 'xyz') { + * // pipe the stream, disabling buffering + * var stream = this.response.httpResponse.createUnbufferedStream(); + * stream.pipe(process.stdout); + * } else { // abort this request and set a better error message + * this.abort(); + * this.response.error = new Error('Invalid ETag'); + * } + * } + * }).send(console.log); + */ + createUnbufferedStream: function createUnbufferedStream() { + this.streaming = true; + return this.stream; + } +}); + + +AWS.HttpClient = inherit({}); + +/** + * @api private + */ +AWS.HttpClient.getInstance = function getInstance() { + if (this.singleton === undefined) { + this.singleton = new this(); + } + return this.singleton; +}; - /***/ 91734: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - // Unique ID creation requires a high quality random # generator. In node.js - // this is pretty straight-forward - we use the crypto API. - var crypto = __nccwpck_require__(6113); +/***/ }), - module.exports = function nodeRNG() { - return crypto.randomBytes(16); - }; +/***/ 2310: +/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { - /***/ - }, +var AWS = __nccwpck_require__(28437); +var Stream = AWS.util.stream.Stream; +var TransformStream = AWS.util.stream.Transform; +var ReadableStream = AWS.util.stream.Readable; +__nccwpck_require__(1556); +var CONNECTION_REUSE_ENV_NAME = 'AWS_NODEJS_CONNECTION_REUSE_ENABLED'; - /***/ 68207: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var rng = __nccwpck_require__(91734); - var bytesToUuid = __nccwpck_require__(50367); +/** + * @api private + */ +AWS.NodeHttpClient = AWS.util.inherit({ + handleRequest: function handleRequest(httpRequest, httpOptions, callback, errCallback) { + var self = this; + var endpoint = httpRequest.endpoint; + var pathPrefix = ''; + if (!httpOptions) httpOptions = {}; + if (httpOptions.proxy) { + pathPrefix = endpoint.protocol + '//' + endpoint.hostname; + if (endpoint.port !== 80 && endpoint.port !== 443) { + pathPrefix += ':' + endpoint.port; + } + endpoint = new AWS.Endpoint(httpOptions.proxy); + } + + var useSSL = endpoint.protocol === 'https:'; + var http = useSSL ? __nccwpck_require__(95687) : __nccwpck_require__(13685); + var options = { + host: endpoint.hostname, + port: endpoint.port, + method: httpRequest.method, + headers: httpRequest.headers, + path: pathPrefix + httpRequest.path + }; + + if (!httpOptions.agent) { + options.agent = this.getAgent(useSSL, { + keepAlive: process.env[CONNECTION_REUSE_ENV_NAME] === '1' ? true : false + }); + } + + AWS.util.update(options, httpOptions); + delete options.proxy; // proxy isn't an HTTP option + delete options.timeout; // timeout isn't an HTTP option + + var stream = http.request(options, function (httpResp) { + if (stream.didCallback) return; + + callback(httpResp); + httpResp.emit( + 'headers', + httpResp.statusCode, + httpResp.headers, + httpResp.statusMessage + ); + }); + httpRequest.stream = stream; // attach stream to httpRequest + stream.didCallback = false; + + // connection timeout support + if (httpOptions.connectTimeout) { + var connectTimeoutId; + stream.on('socket', function(socket) { + if (socket.connecting) { + connectTimeoutId = setTimeout(function connectTimeout() { + if (stream.didCallback) return; stream.didCallback = true; - // **`v1()` - Generate time-based UUID** - // - // Inspired by https://github.com/LiosK/UUID.js - // and http://docs.python.org/library/uuid.html + stream.abort(); + errCallback(AWS.util.error( + new Error('Socket timed out without establishing a connection'), + {code: 'TimeoutError'} + )); + }, httpOptions.connectTimeout); + socket.on('connect', function() { + clearTimeout(connectTimeoutId); + connectTimeoutId = null; + }); + } + }); + } + + // timeout support + stream.setTimeout(httpOptions.timeout || 0, function() { + if (stream.didCallback) return; stream.didCallback = true; + + var msg = 'Connection timed out after ' + httpOptions.timeout + 'ms'; + errCallback(AWS.util.error(new Error(msg), {code: 'TimeoutError'})); + stream.abort(); + }); + + stream.on('error', function() { + if (connectTimeoutId) { + clearTimeout(connectTimeoutId); + connectTimeoutId = null; + } + if (stream.didCallback) return; stream.didCallback = true; + errCallback.apply(stream, arguments); + }); + + var expect = httpRequest.headers.Expect || httpRequest.headers.expect; + if (expect === '100-continue') { + stream.on('continue', function() { + self.writeBody(stream, httpRequest); + }); + } else { + this.writeBody(stream, httpRequest); + } + + return stream; + }, + + writeBody: function writeBody(stream, httpRequest) { + var body = httpRequest.body; + var totalBytes = parseInt(httpRequest.headers['Content-Length'], 10); + + if (body instanceof Stream) { + // For progress support of streaming content - + // pipe the data through a transform stream to emit 'sendProgress' events + var progressStream = this.progressStream(stream, totalBytes); + if (progressStream) { + body.pipe(progressStream).pipe(stream); + } else { + body.pipe(stream); + } + } else if (body) { + // The provided body is a buffer/string and is already fully available in memory - + // For performance it's best to send it as a whole by calling stream.end(body), + // Callers expect a 'sendProgress' event which is best emitted once + // the http request stream has been fully written and all data flushed. + // The use of totalBytes is important over body.length for strings where + // length is char length and not byte length. + stream.once('finish', function() { + stream.emit('sendProgress', { + loaded: totalBytes, + total: totalBytes + }); + }); + stream.end(body); + } else { + // no request body + stream.end(); + } + }, + + /** + * Create the https.Agent or http.Agent according to the request schema. + */ + getAgent: function getAgent(useSSL, agentOptions) { + var http = useSSL ? __nccwpck_require__(95687) : __nccwpck_require__(13685); + if (useSSL) { + if (!AWS.NodeHttpClient.sslAgent) { + AWS.NodeHttpClient.sslAgent = new http.Agent(AWS.util.merge({ + rejectUnauthorized: process.env.NODE_TLS_REJECT_UNAUTHORIZED === '0' ? false : true + }, agentOptions || {})); + AWS.NodeHttpClient.sslAgent.setMaxListeners(0); + + // delegate maxSockets to globalAgent, set a default limit of 50 if current value is Infinity. + // Users can bypass this default by supplying their own Agent as part of SDK configuration. + Object.defineProperty(AWS.NodeHttpClient.sslAgent, 'maxSockets', { + enumerable: true, + get: function() { + var defaultMaxSockets = 50; + var globalAgent = http.globalAgent; + if (globalAgent && globalAgent.maxSockets !== Infinity && typeof globalAgent.maxSockets === 'number') { + return globalAgent.maxSockets; + } + return defaultMaxSockets; + } + }); + } + return AWS.NodeHttpClient.sslAgent; + } else { + if (!AWS.NodeHttpClient.agent) { + AWS.NodeHttpClient.agent = new http.Agent(agentOptions); + } + return AWS.NodeHttpClient.agent; + } + }, + + progressStream: function progressStream(stream, totalBytes) { + if (typeof TransformStream === 'undefined') { + // for node 0.8 there is no streaming progress + return; + } + var loadedBytes = 0; + var reporter = new TransformStream(); + reporter._transform = function(chunk, encoding, callback) { + if (chunk) { + loadedBytes += chunk.length; + stream.emit('sendProgress', { + loaded: loadedBytes, + total: totalBytes + }); + } + callback(null, chunk); + }; + return reporter; + }, - var _nodeId; - var _clockseq; + emitter: null +}); - // Previous uuid creation time - var _lastMSecs = 0; - var _lastNSecs = 0; +/** + * @!ignore + */ - // See https://github.com/broofa/node-uuid for API details - function v1(options, buf, offset) { - var i = (buf && offset) || 0; - var b = buf || []; +/** + * @api private + */ +AWS.HttpClient.prototype = AWS.NodeHttpClient.prototype; - options = options || {}; - var node = options.node || _nodeId; - var clockseq = - options.clockseq !== undefined ? options.clockseq : _clockseq; - - // node and clockseq need to be initialized to random values if they're not - // specified. We do this lazily to minimize issues related to insufficient - // system entropy. See #189 - if (node == null || clockseq == null) { - var seedBytes = rng(); - if (node == null) { - // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) - node = _nodeId = [ - seedBytes[0] | 0x01, - seedBytes[1], - seedBytes[2], - seedBytes[3], - seedBytes[4], - seedBytes[5], - ]; - } - if (clockseq == null) { - // Per 4.2.2, randomize (14 bit) clockseq - clockseq = _clockseq = - ((seedBytes[6] << 8) | seedBytes[7]) & 0x3fff; +/** + * @api private + */ +AWS.HttpClient.streamsApiVersion = ReadableStream ? 2 : 1; + + +/***/ }), + +/***/ 47495: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var util = __nccwpck_require__(77985); + +function JsonBuilder() { } + +JsonBuilder.prototype.build = function(value, shape) { + return JSON.stringify(translate(value, shape)); +}; + +function translate(value, shape) { + if (!shape || value === undefined || value === null) return undefined; + + switch (shape.type) { + case 'structure': return translateStructure(value, shape); + case 'map': return translateMap(value, shape); + case 'list': return translateList(value, shape); + default: return translateScalar(value, shape); + } +} + +function translateStructure(structure, shape) { + var struct = {}; + util.each(structure, function(name, value) { + var memberShape = shape.members[name]; + if (memberShape) { + if (memberShape.location !== 'body') return; + var locationName = memberShape.isLocationName ? memberShape.name : name; + var result = translate(value, memberShape); + if (result !== undefined) struct[locationName] = result; + } + }); + return struct; +} + +function translateList(list, shape) { + var out = []; + util.arrayEach(list, function(value) { + var result = translate(value, shape.member); + if (result !== undefined) out.push(result); + }); + return out; +} + +function translateMap(map, shape) { + var out = {}; + util.each(map, function(key, value) { + var result = translate(value, shape.value); + if (result !== undefined) out[key] = result; + }); + return out; +} + +function translateScalar(value, shape) { + return shape.toWireFormat(value); +} + +/** + * @api private + */ +module.exports = JsonBuilder; + + +/***/ }), + +/***/ 5474: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var util = __nccwpck_require__(77985); + +function JsonParser() { } + +JsonParser.prototype.parse = function(value, shape) { + return translate(JSON.parse(value), shape); +}; + +function translate(value, shape) { + if (!shape || value === undefined) return undefined; + + switch (shape.type) { + case 'structure': return translateStructure(value, shape); + case 'map': return translateMap(value, shape); + case 'list': return translateList(value, shape); + default: return translateScalar(value, shape); + } +} + +function translateStructure(structure, shape) { + if (structure == null) return undefined; + + var struct = {}; + var shapeMembers = shape.members; + util.each(shapeMembers, function(name, memberShape) { + var locationName = memberShape.isLocationName ? memberShape.name : name; + if (Object.prototype.hasOwnProperty.call(structure, locationName)) { + var value = structure[locationName]; + var result = translate(value, memberShape); + if (result !== undefined) struct[name] = result; + } + }); + return struct; +} + +function translateList(list, shape) { + if (list == null) return undefined; + + var out = []; + util.arrayEach(list, function(value) { + var result = translate(value, shape.member); + if (result === undefined) out.push(null); + else out.push(result); + }); + return out; +} + +function translateMap(map, shape) { + if (map == null) return undefined; + + var out = {}; + util.each(map, function(key, value) { + var result = translate(value, shape.value); + if (result === undefined) out[key] = null; + else out[key] = result; + }); + return out; +} + +function translateScalar(value, shape) { + return shape.toType(value); +} + +/** + * @api private + */ +module.exports = JsonParser; + + +/***/ }), + +/***/ 25768: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var AWS = __nccwpck_require__(28437); +__nccwpck_require__(1556); +var inherit = AWS.util.inherit; + +/** + * Represents a metadata service available on EC2 instances. Using the + * {request} method, you can receieve metadata about any available resource + * on the metadata service. + * + * You can disable the use of the IMDS by setting the AWS_EC2_METADATA_DISABLED + * environment variable to a truthy value. + * + * @!attribute [r] httpOptions + * @return [map] a map of options to pass to the underlying HTTP request: + * + * * **timeout** (Number) — a timeout value in milliseconds to wait + * before aborting the connection. Set to 0 for no timeout. + * + * @!macro nobrowser + */ +AWS.MetadataService = inherit({ + /** + * @return [String] the hostname of the instance metadata service + */ + host: '169.254.169.254', + + /** + * @!ignore + */ + + /** + * Default HTTP options. By default, the metadata service is set to not + * timeout on long requests. This means that on non-EC2 machines, this + * request will never return. If you are calling this operation from an + * environment that may not always run on EC2, set a `timeout` value so + * the SDK will abort the request after a given number of milliseconds. + */ + httpOptions: { timeout: 0 }, + + /** + * when enabled, metadata service will not fetch token + */ + disableFetchToken: false, + + /** + * Creates a new MetadataService object with a given set of options. + * + * @option options host [String] the hostname of the instance metadata + * service + * @option options httpOptions [map] a map of options to pass to the + * underlying HTTP request: + * + * * **timeout** (Number) — a timeout value in milliseconds to wait + * before aborting the connection. Set to 0 for no timeout. + * @option options maxRetries [Integer] the maximum number of retries to + * perform for timeout errors + * @option options retryDelayOptions [map] A set of options to configure the + * retry delay on retryable errors. See AWS.Config for details. + */ + constructor: function MetadataService(options) { + AWS.util.update(this, options); + }, + + /** + * Sends a request to the instance metadata service for a given resource. + * + * @param path [String] the path of the resource to get + * + * @param options [map] an optional map used to make request + * + * * **method** (String) — HTTP request method + * + * * **headers** (map) — a map of response header keys and their respective values + * + * @callback callback function(err, data) + * Called when a response is available from the service. + * @param err [Error, null] if an error occurred, this value will be set + * @param data [String, null] if the request was successful, the body of + * the response + */ + request: function request(path, options, callback) { + if (arguments.length === 2) { + callback = options; + options = {}; + } + + if (process.env[AWS.util.imdsDisabledEnv]) { + callback(new Error('EC2 Instance Metadata Service access disabled')); + return; + } + + path = path || '/'; + var httpRequest = new AWS.HttpRequest('http://' + this.host + path); + httpRequest.method = options.method || 'GET'; + if (options.headers) { + httpRequest.headers = options.headers; + } + AWS.util.handleRequestWithRetries(httpRequest, this, callback); + }, + + /** + * @api private + */ + loadCredentialsCallbacks: [], + + /** + * Fetches metadata token used for getting credentials + * + * @api private + * @callback callback function(err, token) + * Called when token is loaded from the resource + */ + fetchMetadataToken: function fetchMetadataToken(callback) { + var self = this; + var tokenFetchPath = '/latest/api/token'; + self.request( + tokenFetchPath, + { + 'method': 'PUT', + 'headers': { + 'x-aws-ec2-metadata-token-ttl-seconds': '21600' + } + }, + callback + ); + }, + + /** + * Fetches credentials + * + * @api private + * @callback cb function(err, creds) + * Called when credentials are loaded from the resource + */ + fetchCredentials: function fetchCredentials(options, cb) { + var self = this; + var basePath = '/latest/meta-data/iam/security-credentials/'; + + self.request(basePath, options, function (err, roleName) { + if (err) { + self.disableFetchToken = !(err.statusCode === 401); + cb(AWS.util.error( + err, + { + message: 'EC2 Metadata roleName request returned error' } + )); + return; + } + roleName = roleName.split('\n')[0]; // grab first (and only) role + self.request(basePath + roleName, options, function (credErr, credData) { + if (credErr) { + self.disableFetchToken = !(credErr.statusCode === 401); + cb(AWS.util.error( + credErr, + { + message: 'EC2 Metadata creds request returned error' + } + )); + return; } - - // UUID timestamps are 100 nano-second units since the Gregorian epoch, - // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so - // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' - // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. - var msecs = - options.msecs !== undefined ? options.msecs : new Date().getTime(); - - // Per 4.2.1.2, use count of uuid's generated during the current clock - // cycle to simulate higher resolution clock - var nsecs = - options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; - - // Time since last uuid creation (in msecs) - var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; - - // Per 4.2.1.2, Bump clockseq on clock regression - if (dt < 0 && options.clockseq === undefined) { - clockseq = (clockseq + 1) & 0x3fff; + try { + var credentials = JSON.parse(credData); + cb(null, credentials); + } catch (parseError) { + cb(parseError); } - - // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new - // time interval - if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { - nsecs = 0; + }); + }); + }, + + /** + * Loads a set of credentials stored in the instance metadata service + * + * @api private + * @callback callback function(err, credentials) + * Called when credentials are loaded from the resource + * @param err [Error] if an error occurred, this value will be set + * @param credentials [Object] the raw JSON object containing all + * metadata from the credentials resource + */ + loadCredentials: function loadCredentials(callback) { + var self = this; + self.loadCredentialsCallbacks.push(callback); + if (self.loadCredentialsCallbacks.length > 1) { return; } + + function callbacks(err, creds) { + var cb; + while ((cb = self.loadCredentialsCallbacks.shift()) !== undefined) { + cb(err, creds); + } + } + + if (self.disableFetchToken) { + self.fetchCredentials({}, callbacks); + } else { + self.fetchMetadataToken(function(tokenError, token) { + if (tokenError) { + if (tokenError.code === 'TimeoutError') { + self.disableFetchToken = true; + } else if (tokenError.retryable === true) { + callbacks(AWS.util.error( + tokenError, + { + message: 'EC2 Metadata token request returned error' + } + )); + return; + } else if (tokenError.statusCode === 400) { + callbacks(AWS.util.error( + tokenError, + { + message: 'EC2 Metadata token request returned 400' + } + )); + return; + } } - - // Per 4.2.1.2 Throw error if too many uuids are requested - if (nsecs >= 10000) { - throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); + var options = {}; + if (token) { + options.headers = { + 'x-aws-ec2-metadata-token': token + }; } + self.fetchCredentials(options, callbacks); + }); - _lastMSecs = msecs; - _lastNSecs = nsecs; - _clockseq = clockseq; + } + } +}); - // Per 4.1.4 - Convert from unix epoch to Gregorian epoch - msecs += 12219292800000; +/** + * @api private + */ +module.exports = AWS.MetadataService; + + +/***/ }), + +/***/ 17657: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var Collection = __nccwpck_require__(71965); +var Operation = __nccwpck_require__(28083); +var Shape = __nccwpck_require__(71349); +var Paginator = __nccwpck_require__(45938); +var ResourceWaiter = __nccwpck_require__(41368); +var metadata = __nccwpck_require__(17752); + +var util = __nccwpck_require__(77985); +var property = util.property; +var memoizedProperty = util.memoizedProperty; + +function Api(api, options) { + var self = this; + api = api || {}; + options = options || {}; + options.api = this; + + api.metadata = api.metadata || {}; + + var serviceIdentifier = options.serviceIdentifier; + delete options.serviceIdentifier; + + property(this, 'isApi', true, false); + property(this, 'apiVersion', api.metadata.apiVersion); + property(this, 'endpointPrefix', api.metadata.endpointPrefix); + property(this, 'signingName', api.metadata.signingName); + property(this, 'globalEndpoint', api.metadata.globalEndpoint); + property(this, 'signatureVersion', api.metadata.signatureVersion); + property(this, 'jsonVersion', api.metadata.jsonVersion); + property(this, 'targetPrefix', api.metadata.targetPrefix); + property(this, 'protocol', api.metadata.protocol); + property(this, 'timestampFormat', api.metadata.timestampFormat); + property(this, 'xmlNamespaceUri', api.metadata.xmlNamespace); + property(this, 'abbreviation', api.metadata.serviceAbbreviation); + property(this, 'fullName', api.metadata.serviceFullName); + property(this, 'serviceId', api.metadata.serviceId); + if (serviceIdentifier && metadata[serviceIdentifier]) { + property(this, 'xmlNoDefaultLists', metadata[serviceIdentifier].xmlNoDefaultLists, false); + } + + memoizedProperty(this, 'className', function() { + var name = api.metadata.serviceAbbreviation || api.metadata.serviceFullName; + if (!name) return null; + + name = name.replace(/^Amazon|AWS\s*|\(.*|\s+|\W+/g, ''); + if (name === 'ElasticLoadBalancing') name = 'ELB'; + return name; + }); + + function addEndpointOperation(name, operation) { + if (operation.endpointoperation === true) { + property(self, 'endpointOperation', util.string.lowerFirst(name)); + } + if (operation.endpointdiscovery && !self.hasRequiredEndpointDiscovery) { + property( + self, + 'hasRequiredEndpointDiscovery', + operation.endpointdiscovery.required === true + ); + } + } + + property(this, 'operations', new Collection(api.operations, options, function(name, operation) { + return new Operation(name, operation, options); + }, util.string.lowerFirst, addEndpointOperation)); + + property(this, 'shapes', new Collection(api.shapes, options, function(name, shape) { + return Shape.create(shape, options); + })); + + property(this, 'paginators', new Collection(api.paginators, options, function(name, paginator) { + return new Paginator(name, paginator, options); + })); + + property(this, 'waiters', new Collection(api.waiters, options, function(name, waiter) { + return new ResourceWaiter(name, waiter, options); + }, util.string.lowerFirst)); + + if (options.documentation) { + property(this, 'documentation', api.documentation); + property(this, 'documentationUrl', api.documentationUrl); + } +} + +/** + * @api private + */ +module.exports = Api; - // `time_low` - var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; - b[i++] = (tl >>> 24) & 0xff; - b[i++] = (tl >>> 16) & 0xff; - b[i++] = (tl >>> 8) & 0xff; - b[i++] = tl & 0xff; - // `time_mid` - var tmh = ((msecs / 0x100000000) * 10000) & 0xfffffff; - b[i++] = (tmh >>> 8) & 0xff; - b[i++] = tmh & 0xff; +/***/ }), - // `time_high_and_version` - b[i++] = ((tmh >>> 24) & 0xf) | 0x10; // include version - b[i++] = (tmh >>> 16) & 0xff; +/***/ 71965: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) - b[i++] = (clockseq >>> 8) | 0x80; +var memoizedProperty = (__nccwpck_require__(77985).memoizedProperty); - // `clock_seq_low` - b[i++] = clockseq & 0xff; +function memoize(name, value, factory, nameTr) { + memoizedProperty(this, nameTr(name), function() { + return factory(name, value); + }); +} - // `node` - for (var n = 0; n < 6; ++n) { - b[i + n] = node[n]; - } +function Collection(iterable, options, factory, nameTr, callback) { + nameTr = nameTr || String; + var self = this; - return buf ? buf : bytesToUuid(b); - } + for (var id in iterable) { + if (Object.prototype.hasOwnProperty.call(iterable, id)) { + memoize.call(self, id, iterable[id], factory, nameTr); + if (callback) callback(id, iterable[id]); + } + } +} - module.exports = v1; +/** + * @api private + */ +module.exports = Collection; - /***/ - }, - /***/ 54151: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var rng = __nccwpck_require__(91734); - var bytesToUuid = __nccwpck_require__(50367); +/***/ }), - function v4(options, buf, offset) { - var i = (buf && offset) || 0; +/***/ 28083: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - if (typeof options == "string") { - buf = options === "binary" ? new Array(16) : null; - options = null; - } - options = options || {}; +var Shape = __nccwpck_require__(71349); - var rnds = options.random || (options.rng || rng)(); +var util = __nccwpck_require__(77985); +var property = util.property; +var memoizedProperty = util.memoizedProperty; - // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` - rnds[6] = (rnds[6] & 0x0f) | 0x40; - rnds[8] = (rnds[8] & 0x3f) | 0x80; +function Operation(name, operation, options) { + var self = this; + options = options || {}; - // Copy bytes to buffer, if provided - if (buf) { - for (var ii = 0; ii < 16; ++ii) { - buf[i + ii] = rnds[ii]; - } - } + property(this, 'name', operation.name || name); + property(this, 'api', options.api, false); - return buf || bytesToUuid(rnds); - } + operation.http = operation.http || {}; + property(this, 'endpoint', operation.endpoint); + property(this, 'httpMethod', operation.http.method || 'POST'); + property(this, 'httpPath', operation.http.requestUri || '/'); + property(this, 'authtype', operation.authtype || ''); + property( + this, + 'endpointDiscoveryRequired', + operation.endpointdiscovery ? + (operation.endpointdiscovery.required ? 'REQUIRED' : 'OPTIONAL') : + 'NULL' + ); - module.exports = v4; - - /***/ - }, - - /***/ 96323: /***/ ( - __unused_webpack_module, - exports, - __nccwpck_require__ - ) => { - "use strict"; - var __webpack_unused_export__; - - __webpack_unused_export__ = { value: true }; - var LRU_1 = __nccwpck_require__(77710); - var CACHE_SIZE = 1000; - /** - * Inspired node-lru-cache[https://github.com/isaacs/node-lru-cache] - */ - var EndpointCache = /** @class */ (function () { - function EndpointCache(maxSize) { - if (maxSize === void 0) { - maxSize = CACHE_SIZE; - } - this.maxSize = maxSize; - this.cache = new LRU_1.LRUCache(maxSize); - } - Object.defineProperty(EndpointCache.prototype, "size", { - get: function () { - return this.cache.length; - }, - enumerable: true, - configurable: true, - }); - EndpointCache.prototype.put = function (key, value) { - var keyString = - typeof key !== "string" ? EndpointCache.getKeyString(key) : key; - var endpointRecord = this.populateValue(value); - this.cache.put(keyString, endpointRecord); - }; - EndpointCache.prototype.get = function (key) { - var keyString = - typeof key !== "string" ? EndpointCache.getKeyString(key) : key; - var now = Date.now(); - var records = this.cache.get(keyString); - if (records) { - for (var i = 0; i < records.length; i++) { - var record = records[i]; - if (record.Expire < now) { - this.cache.remove(keyString); - return undefined; - } - } - } - return records; - }; - EndpointCache.getKeyString = function (key) { - var identifiers = []; - var identifierNames = Object.keys(key).sort(); - for (var i = 0; i < identifierNames.length; i++) { - var identifierName = identifierNames[i]; - if (key[identifierName] === undefined) continue; - identifiers.push(key[identifierName]); - } - return identifiers.join(" "); - }; - EndpointCache.prototype.populateValue = function (endpoints) { - var now = Date.now(); - return endpoints.map(function (endpoint) { - return { - Address: endpoint.Address || "", - Expire: now + (endpoint.CachePeriodInMinutes || 1) * 60 * 1000, - }; - }); - }; - EndpointCache.prototype.empty = function () { - this.cache.empty(); - }; - EndpointCache.prototype.remove = function (key) { - var keyString = - typeof key !== "string" ? EndpointCache.getKeyString(key) : key; - this.cache.remove(keyString); - }; - return EndpointCache; - })(); - exports.$ = EndpointCache; - - /***/ - }, - - /***/ 77710: /***/ (__unused_webpack_module, exports) => { - "use strict"; - - Object.defineProperty(exports, "__esModule", { value: true }); - var LinkedListNode = /** @class */ (function () { - function LinkedListNode(key, value) { - this.key = key; - this.value = value; - } - return LinkedListNode; - })(); - var LRUCache = /** @class */ (function () { - function LRUCache(size) { - this.nodeMap = {}; - this.size = 0; - if (typeof size !== "number" || size < 1) { - throw new Error("Cache size can only be positive number"); - } - this.sizeLimit = size; - } - Object.defineProperty(LRUCache.prototype, "length", { - get: function () { - return this.size; - }, - enumerable: true, - configurable: true, - }); - LRUCache.prototype.prependToList = function (node) { - if (!this.headerNode) { - this.tailNode = node; - } else { - this.headerNode.prev = node; - node.next = this.headerNode; - } - this.headerNode = node; - this.size++; - }; - LRUCache.prototype.removeFromTail = function () { - if (!this.tailNode) { - return undefined; - } - var node = this.tailNode; - var prevNode = node.prev; - if (prevNode) { - prevNode.next = undefined; - } - node.prev = undefined; - this.tailNode = prevNode; - this.size--; - return node; - }; - LRUCache.prototype.detachFromList = function (node) { - if (this.headerNode === node) { - this.headerNode = node.next; - } - if (this.tailNode === node) { - this.tailNode = node.prev; - } - if (node.prev) { - node.prev.next = node.next; - } - if (node.next) { - node.next.prev = node.prev; - } - node.next = undefined; - node.prev = undefined; - this.size--; - }; - LRUCache.prototype.get = function (key) { - if (this.nodeMap[key]) { - var node = this.nodeMap[key]; - this.detachFromList(node); - this.prependToList(node); - return node.value; - } - }; - LRUCache.prototype.remove = function (key) { - if (this.nodeMap[key]) { - var node = this.nodeMap[key]; - this.detachFromList(node); - delete this.nodeMap[key]; - } - }; - LRUCache.prototype.put = function (key, value) { - if (this.nodeMap[key]) { - this.remove(key); - } else if (this.size === this.sizeLimit) { - var tailNode = this.removeFromTail(); - var key_1 = tailNode.key; - delete this.nodeMap[key_1]; - } - var newNode = new LinkedListNode(key, value); - this.nodeMap[key] = newNode; - this.prependToList(newNode); - }; - LRUCache.prototype.empty = function () { - var keys = Object.keys(this.nodeMap); - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - var node = this.nodeMap[key]; - this.detachFromList(node); - delete this.nodeMap[key]; - } - }; - return LRUCache; - })(); - exports.LRUCache = LRUCache; - - /***/ - }, - - /***/ 83682: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var register = __nccwpck_require__(44670); - var addHook = __nccwpck_require__(5549); - var removeHook = __nccwpck_require__(6819); - - // bind with array of arguments: https://stackoverflow.com/a/21792913 - var bind = Function.bind; - var bindable = bind.bind(bind); - - function bindApi(hook, state, name) { - var removeHookRef = bindable(removeHook, null).apply( - null, - name ? [state, name] : [state] - ); - hook.api = { remove: removeHookRef }; - hook.remove = removeHookRef; - ["before", "error", "after", "wrap"].forEach(function (kind) { - var args = name ? [state, kind, name] : [state, kind]; - hook[kind] = hook.api[kind] = bindable(addHook, null).apply( - null, - args - ); - }); + memoizedProperty(this, 'input', function() { + if (!operation.input) { + return new Shape.create({type: 'structure'}, options); + } + return Shape.create(operation.input, options); + }); + + memoizedProperty(this, 'output', function() { + if (!operation.output) { + return new Shape.create({type: 'structure'}, options); + } + return Shape.create(operation.output, options); + }); + + memoizedProperty(this, 'errors', function() { + var list = []; + if (!operation.errors) return null; + + for (var i = 0; i < operation.errors.length; i++) { + list.push(Shape.create(operation.errors[i], options)); + } + + return list; + }); + + memoizedProperty(this, 'paginator', function() { + return options.api.paginators[name]; + }); + + if (options.documentation) { + property(this, 'documentation', operation.documentation); + property(this, 'documentationUrl', operation.documentationUrl); + } + + // idempotentMembers only tracks top-level input shapes + memoizedProperty(this, 'idempotentMembers', function() { + var idempotentMembers = []; + var input = self.input; + var members = input.members; + if (!input.members) { + return idempotentMembers; + } + for (var name in members) { + if (!members.hasOwnProperty(name)) { + continue; + } + if (members[name].isIdempotent === true) { + idempotentMembers.push(name); + } + } + return idempotentMembers; + }); + + memoizedProperty(this, 'hasEventOutput', function() { + var output = self.output; + return hasEventStream(output); + }); +} + +function hasEventStream(topLevelShape) { + var members = topLevelShape.members; + var payload = topLevelShape.payload; + + if (!topLevelShape.members) { + return false; + } + + if (payload) { + var payloadMember = members[payload]; + return payloadMember.isEventStream; + } + + // check if any member is an event stream + for (var name in members) { + if (!members.hasOwnProperty(name)) { + if (members[name].isEventStream === true) { + return true; } + } + } + return false; +} - function HookSingular() { - var singularHookName = "h"; - var singularHookState = { - registry: {}, - }; - var singularHook = register.bind( - null, - singularHookState, - singularHookName - ); - bindApi(singularHook, singularHookState, singularHookName); - return singularHook; - } +/** + * @api private + */ +module.exports = Operation; - function HookCollection() { - var state = { - registry: {}, - }; - var hook = register.bind(null, state); - bindApi(hook, state); +/***/ }), - return hook; - } +/***/ 45938: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - var collectionHookDeprecationMessageDisplayed = false; - function Hook() { - if (!collectionHookDeprecationMessageDisplayed) { - console.warn( - '[before-after-hook]: "Hook()" repurposing warning, use "Hook.Collection()". Read more: https://git.io/upgrade-before-after-hook-to-1.4' - ); - collectionHookDeprecationMessageDisplayed = true; - } - return HookCollection(); - } +var property = (__nccwpck_require__(77985).property); - Hook.Singular = HookSingular.bind(); - Hook.Collection = HookCollection.bind(); +function Paginator(name, paginator) { + property(this, 'inputToken', paginator.input_token); + property(this, 'limitKey', paginator.limit_key); + property(this, 'moreResults', paginator.more_results); + property(this, 'outputToken', paginator.output_token); + property(this, 'resultKey', paginator.result_key); +} - module.exports = Hook; - // expose constructors as a named property for TypeScript - module.exports.Hook = Hook; - module.exports.Singular = Hook.Singular; - module.exports.Collection = Hook.Collection; +/** + * @api private + */ +module.exports = Paginator; - /***/ - }, - /***/ 5549: /***/ (module) => { - module.exports = addHook; +/***/ }), - function addHook(state, kind, name, hook) { - var orig = hook; - if (!state.registry[name]) { - state.registry[name] = []; - } +/***/ 41368: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - if (kind === "before") { - hook = function (method, options) { - return Promise.resolve() - .then(orig.bind(null, options)) - .then(method.bind(null, options)); - }; - } +var util = __nccwpck_require__(77985); +var property = util.property; - if (kind === "after") { - hook = function (method, options) { - var result; - return Promise.resolve() - .then(method.bind(null, options)) - .then(function (result_) { - result = result_; - return orig(result, options); - }) - .then(function () { - return result; - }); - }; +function ResourceWaiter(name, waiter, options) { + options = options || {}; + property(this, 'name', name); + property(this, 'api', options.api, false); + + if (waiter.operation) { + property(this, 'operation', util.string.lowerFirst(waiter.operation)); + } + + var self = this; + var keys = [ + 'type', + 'description', + 'delay', + 'maxAttempts', + 'acceptors' + ]; + + keys.forEach(function(key) { + var value = waiter[key]; + if (value) { + property(self, key, value); + } + }); +} + +/** + * @api private + */ +module.exports = ResourceWaiter; + + +/***/ }), + +/***/ 71349: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var Collection = __nccwpck_require__(71965); + +var util = __nccwpck_require__(77985); + +function property(obj, name, value) { + if (value !== null && value !== undefined) { + util.property.apply(this, arguments); + } +} + +function memoizedProperty(obj, name) { + if (!obj.constructor.prototype[name]) { + util.memoizedProperty.apply(this, arguments); + } +} + +function Shape(shape, options, memberName) { + options = options || {}; + + property(this, 'shape', shape.shape); + property(this, 'api', options.api, false); + property(this, 'type', shape.type); + property(this, 'enum', shape.enum); + property(this, 'min', shape.min); + property(this, 'max', shape.max); + property(this, 'pattern', shape.pattern); + property(this, 'location', shape.location || this.location || 'body'); + property(this, 'name', this.name || shape.xmlName || shape.queryName || + shape.locationName || memberName); + property(this, 'isStreaming', shape.streaming || this.isStreaming || false); + property(this, 'requiresLength', shape.requiresLength, false); + property(this, 'isComposite', shape.isComposite || false); + property(this, 'isShape', true, false); + property(this, 'isQueryName', Boolean(shape.queryName), false); + property(this, 'isLocationName', Boolean(shape.locationName), false); + property(this, 'isIdempotent', shape.idempotencyToken === true); + property(this, 'isJsonValue', shape.jsonvalue === true); + property(this, 'isSensitive', shape.sensitive === true || shape.prototype && shape.prototype.sensitive === true); + property(this, 'isEventStream', Boolean(shape.eventstream), false); + property(this, 'isEvent', Boolean(shape.event), false); + property(this, 'isEventPayload', Boolean(shape.eventpayload), false); + property(this, 'isEventHeader', Boolean(shape.eventheader), false); + property(this, 'isTimestampFormatSet', Boolean(shape.timestampFormat) || shape.prototype && shape.prototype.isTimestampFormatSet === true, false); + property(this, 'endpointDiscoveryId', Boolean(shape.endpointdiscoveryid), false); + property(this, 'hostLabel', Boolean(shape.hostLabel), false); + + if (options.documentation) { + property(this, 'documentation', shape.documentation); + property(this, 'documentationUrl', shape.documentationUrl); + } + + if (shape.xmlAttribute) { + property(this, 'isXmlAttribute', shape.xmlAttribute || false); + } + + // type conversion and parsing + property(this, 'defaultValue', null); + this.toWireFormat = function(value) { + if (value === null || value === undefined) return ''; + return value; + }; + this.toType = function(value) { return value; }; +} + +/** + * @api private + */ +Shape.normalizedTypes = { + character: 'string', + double: 'float', + long: 'integer', + short: 'integer', + biginteger: 'integer', + bigdecimal: 'float', + blob: 'binary' +}; + +/** + * @api private + */ +Shape.types = { + 'structure': StructureShape, + 'list': ListShape, + 'map': MapShape, + 'boolean': BooleanShape, + 'timestamp': TimestampShape, + 'float': FloatShape, + 'integer': IntegerShape, + 'string': StringShape, + 'base64': Base64Shape, + 'binary': BinaryShape +}; + +Shape.resolve = function resolve(shape, options) { + if (shape.shape) { + var refShape = options.api.shapes[shape.shape]; + if (!refShape) { + throw new Error('Cannot find shape reference: ' + shape.shape); + } + + return refShape; + } else { + return null; + } +}; + +Shape.create = function create(shape, options, memberName) { + if (shape.isShape) return shape; + + var refShape = Shape.resolve(shape, options); + if (refShape) { + var filteredKeys = Object.keys(shape); + if (!options.documentation) { + filteredKeys = filteredKeys.filter(function(name) { + return !name.match(/documentation/); + }); + } + + // create an inline shape with extra members + var InlineShape = function() { + refShape.constructor.call(this, shape, options, memberName); + }; + InlineShape.prototype = refShape; + return new InlineShape(); + } else { + // set type if not set + if (!shape.type) { + if (shape.members) shape.type = 'structure'; + else if (shape.member) shape.type = 'list'; + else if (shape.key) shape.type = 'map'; + else shape.type = 'string'; + } + + // normalize types + var origType = shape.type; + if (Shape.normalizedTypes[shape.type]) { + shape.type = Shape.normalizedTypes[shape.type]; + } + + if (Shape.types[shape.type]) { + return new Shape.types[shape.type](shape, options, memberName); + } else { + throw new Error('Unrecognized shape type: ' + origType); + } + } +}; + +function CompositeShape(shape) { + Shape.apply(this, arguments); + property(this, 'isComposite', true); + + if (shape.flattened) { + property(this, 'flattened', shape.flattened || false); + } +} + +function StructureShape(shape, options) { + var self = this; + var requiredMap = null, firstInit = !this.isShape; + + CompositeShape.apply(this, arguments); + + if (firstInit) { + property(this, 'defaultValue', function() { return {}; }); + property(this, 'members', {}); + property(this, 'memberNames', []); + property(this, 'required', []); + property(this, 'isRequired', function() { return false; }); + } + + if (shape.members) { + property(this, 'members', new Collection(shape.members, options, function(name, member) { + return Shape.create(member, options, name); + })); + memoizedProperty(this, 'memberNames', function() { + return shape.xmlOrder || Object.keys(shape.members); + }); + + if (shape.event) { + memoizedProperty(this, 'eventPayloadMemberName', function() { + var members = self.members; + var memberNames = self.memberNames; + // iterate over members to find ones that are event payloads + for (var i = 0, iLen = memberNames.length; i < iLen; i++) { + if (members[memberNames[i]].isEventPayload) { + return memberNames[i]; + } } + }); - if (kind === "error") { - hook = function (method, options) { - return Promise.resolve() - .then(method.bind(null, options)) - .catch(function (error) { - return orig(error, options); - }); - }; + memoizedProperty(this, 'eventHeaderMemberNames', function() { + var members = self.members; + var memberNames = self.memberNames; + var eventHeaderMemberNames = []; + // iterate over members to find ones that are event headers + for (var i = 0, iLen = memberNames.length; i < iLen; i++) { + if (members[memberNames[i]].isEventHeader) { + eventHeaderMemberNames.push(memberNames[i]); + } } + return eventHeaderMemberNames; + }); + } + } + + if (shape.required) { + property(this, 'required', shape.required); + property(this, 'isRequired', function(name) { + if (!requiredMap) { + requiredMap = {}; + for (var i = 0; i < shape.required.length; i++) { + requiredMap[shape.required[i]] = true; + } + } + + return requiredMap[name]; + }, false, true); + } + + property(this, 'resultWrapper', shape.resultWrapper || null); + + if (shape.payload) { + property(this, 'payload', shape.payload); + } + + if (typeof shape.xmlNamespace === 'string') { + property(this, 'xmlNamespaceUri', shape.xmlNamespace); + } else if (typeof shape.xmlNamespace === 'object') { + property(this, 'xmlNamespacePrefix', shape.xmlNamespace.prefix); + property(this, 'xmlNamespaceUri', shape.xmlNamespace.uri); + } +} + +function ListShape(shape, options) { + var self = this, firstInit = !this.isShape; + CompositeShape.apply(this, arguments); + + if (firstInit) { + property(this, 'defaultValue', function() { return []; }); + } + + if (shape.member) { + memoizedProperty(this, 'member', function() { + return Shape.create(shape.member, options); + }); + } + + if (this.flattened) { + var oldName = this.name; + memoizedProperty(this, 'name', function() { + return self.member.name || oldName; + }); + } +} + +function MapShape(shape, options) { + var firstInit = !this.isShape; + CompositeShape.apply(this, arguments); + + if (firstInit) { + property(this, 'defaultValue', function() { return {}; }); + property(this, 'key', Shape.create({type: 'string'}, options)); + property(this, 'value', Shape.create({type: 'string'}, options)); + } + + if (shape.key) { + memoizedProperty(this, 'key', function() { + return Shape.create(shape.key, options); + }); + } + if (shape.value) { + memoizedProperty(this, 'value', function() { + return Shape.create(shape.value, options); + }); + } +} + +function TimestampShape(shape) { + var self = this; + Shape.apply(this, arguments); + + if (shape.timestampFormat) { + property(this, 'timestampFormat', shape.timestampFormat); + } else if (self.isTimestampFormatSet && this.timestampFormat) { + property(this, 'timestampFormat', this.timestampFormat); + } else if (this.location === 'header') { + property(this, 'timestampFormat', 'rfc822'); + } else if (this.location === 'querystring') { + property(this, 'timestampFormat', 'iso8601'); + } else if (this.api) { + switch (this.api.protocol) { + case 'json': + case 'rest-json': + property(this, 'timestampFormat', 'unixTimestamp'); + break; + case 'rest-xml': + case 'query': + case 'ec2': + property(this, 'timestampFormat', 'iso8601'); + break; + } + } + + this.toType = function(value) { + if (value === null || value === undefined) return null; + if (typeof value.toUTCString === 'function') return value; + return typeof value === 'string' || typeof value === 'number' ? + util.date.parseTimestamp(value) : null; + }; + + this.toWireFormat = function(value) { + return util.date.format(value, self.timestampFormat); + }; +} + +function StringShape() { + Shape.apply(this, arguments); + + var nullLessProtocols = ['rest-xml', 'query', 'ec2']; + this.toType = function(value) { + value = this.api && nullLessProtocols.indexOf(this.api.protocol) > -1 ? + value || '' : value; + if (this.isJsonValue) { + return JSON.parse(value); + } + + return value && typeof value.toString === 'function' ? + value.toString() : value; + }; + + this.toWireFormat = function(value) { + return this.isJsonValue ? JSON.stringify(value) : value; + }; +} + +function FloatShape() { + Shape.apply(this, arguments); + + this.toType = function(value) { + if (value === null || value === undefined) return null; + return parseFloat(value); + }; + this.toWireFormat = this.toType; +} + +function IntegerShape() { + Shape.apply(this, arguments); + + this.toType = function(value) { + if (value === null || value === undefined) return null; + return parseInt(value, 10); + }; + this.toWireFormat = this.toType; +} + +function BinaryShape() { + Shape.apply(this, arguments); + this.toType = function(value) { + var buf = util.base64.decode(value); + if (this.isSensitive && util.isNode() && typeof util.Buffer.alloc === 'function') { + /* Node.js can create a Buffer that is not isolated. + * i.e. buf.byteLength !== buf.buffer.byteLength + * This means that the sensitive data is accessible to anyone with access to buf.buffer. + * If this is the node shared Buffer, then other code within this process _could_ find this secret. + * Copy sensitive data to an isolated Buffer and zero the sensitive data. + * While this is safe to do here, copying this code somewhere else may produce unexpected results. + */ + var secureBuf = util.Buffer.alloc(buf.length, buf); + buf.fill(0); + buf = secureBuf; + } + return buf; + }; + this.toWireFormat = util.base64.encode; +} + +function Base64Shape() { + BinaryShape.apply(this, arguments); +} + +function BooleanShape() { + Shape.apply(this, arguments); + + this.toType = function(value) { + if (typeof value === 'boolean') return value; + if (value === null || value === undefined) return null; + return value === 'true'; + }; +} + +/** + * @api private + */ +Shape.shapes = { + StructureShape: StructureShape, + ListShape: ListShape, + MapShape: MapShape, + StringShape: StringShape, + BooleanShape: BooleanShape, + Base64Shape: Base64Shape +}; + +/** + * @api private + */ +module.exports = Shape; - state.registry[name].push({ - hook: hook, - orig: orig, - }); - } - /***/ - }, +/***/ }), - /***/ 44670: /***/ (module) => { - module.exports = register; +/***/ 73639: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - function register(state, name, method, options) { - if (typeof method !== "function") { - throw new Error("method for before hook must be a function"); - } +var util = __nccwpck_require__(77985); - if (!options) { - options = {}; - } +util.isBrowser = function() { return false; }; +util.isNode = function() { return true; }; - if (Array.isArray(name)) { - return name.reverse().reduce(function (callback, name) { - return register.bind(null, state, name, callback, options); - }, method)(); - } +// node.js specific modules +util.crypto.lib = __nccwpck_require__(6113); +util.Buffer = (__nccwpck_require__(14300).Buffer); +util.domain = __nccwpck_require__(13639); +util.stream = __nccwpck_require__(12781); +util.url = __nccwpck_require__(57310); +util.querystring = __nccwpck_require__(63477); +util.environment = 'nodejs'; +util.createEventStream = util.stream.Readable ? + (__nccwpck_require__(69643).createEventStream) : (__nccwpck_require__(63727).createEventStream); +util.realClock = __nccwpck_require__(81370); +util.clientSideMonitoring = { + Publisher: (__nccwpck_require__(66807).Publisher), + configProvider: __nccwpck_require__(91822), +}; +util.iniLoader = (__nccwpck_require__(29697)/* .iniLoader */ .b); +util.getSystemErrorName = (__nccwpck_require__(73837).getSystemErrorName); - return Promise.resolve().then(function () { - if (!state.registry[name]) { - return method(options); - } +var AWS; - return state.registry[name].reduce(function (method, registered) { - return registered.hook.bind(null, method, options); - }, method)(); - }); +/** + * @api private + */ +module.exports = AWS = __nccwpck_require__(28437); + +__nccwpck_require__(53819); +__nccwpck_require__(36965); +__nccwpck_require__(77360); +__nccwpck_require__(57083); +__nccwpck_require__(74998); +__nccwpck_require__(3498); +__nccwpck_require__(15037); +__nccwpck_require__(80371); + +// Load the xml2js XML parser +AWS.XML.Parser = __nccwpck_require__(96752); + +// Load Node HTTP client +__nccwpck_require__(2310); + +__nccwpck_require__(95417); + +// Load custom credential providers +__nccwpck_require__(11017); +__nccwpck_require__(73379); +__nccwpck_require__(88764); +__nccwpck_require__(10645); +__nccwpck_require__(57714); +__nccwpck_require__(27454); +__nccwpck_require__(13754); +__nccwpck_require__(80371); + +// Setup default chain providers +// If this changes, please update documentation for +// AWS.CredentialProviderChain.defaultProviders in +// credentials/credential_provider_chain.js +AWS.CredentialProviderChain.defaultProviders = [ + function () { return new AWS.EnvironmentCredentials('AWS'); }, + function () { return new AWS.EnvironmentCredentials('AMAZON'); }, + function () { return new AWS.SharedIniFileCredentials(); }, + function () { return new AWS.ECSCredentials(); }, + function () { return new AWS.ProcessCredentials(); }, + function () { return new AWS.TokenFileWebIdentityCredentials(); }, + function () { return new AWS.EC2MetadataCredentials(); } +]; + +// Update configuration keys +AWS.util.update(AWS.Config.prototype.keys, { + credentials: function () { + var credentials = null; + new AWS.CredentialProviderChain([ + function () { return new AWS.EnvironmentCredentials('AWS'); }, + function () { return new AWS.EnvironmentCredentials('AMAZON'); }, + function () { return new AWS.SharedIniFileCredentials({ disableAssumeRole: true }); } + ]).resolve(function(err, creds) { + if (!err) credentials = creds; + }); + return credentials; + }, + credentialProvider: function() { + return new AWS.CredentialProviderChain(); + }, + logger: function () { + return process.env.AWSJS_DEBUG ? console : null; + }, + region: function() { + var env = process.env; + var region = env.AWS_REGION || env.AMAZON_REGION; + if (env[AWS.util.configOptInEnv]) { + var toCheck = [ + {filename: env[AWS.util.sharedCredentialsFileEnv]}, + {isConfig: true, filename: env[AWS.util.sharedConfigFileEnv]} + ]; + var iniLoader = AWS.util.iniLoader; + while (!region && toCheck.length) { + var configFile = iniLoader.loadFrom(toCheck.shift()); + var profile = configFile[env.AWS_PROFILE || AWS.util.defaultProfile]; + region = profile && profile.region; } + } + return region; + } +}); - /***/ - }, +// Reset configuration +AWS.config = new AWS.Config(); - /***/ 6819: /***/ (module) => { - module.exports = removeHook; - function removeHook(state, name, method) { - if (!state.registry[name]) { - return; - } +/***/ }), - var index = state.registry[name] - .map(function (registered) { - return registered.orig; - }) - .indexOf(method); +/***/ 99127: +/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { - if (index === -1) { - return; - } +var AWS = __nccwpck_require__(28437); + +/** + * @api private + */ +AWS.ParamValidator = AWS.util.inherit({ + /** + * Create a new validator object. + * + * @param validation [Boolean|map] whether input parameters should be + * validated against the operation description before sending the + * request. Pass a map to enable any of the following specific + * validation features: + * + * * **min** [Boolean] — Validates that a value meets the min + * constraint. This is enabled by default when paramValidation is set + * to `true`. + * * **max** [Boolean] — Validates that a value meets the max + * constraint. + * * **pattern** [Boolean] — Validates that a string value matches a + * regular expression. + * * **enum** [Boolean] — Validates that a string value matches one + * of the allowable enum values. + */ + constructor: function ParamValidator(validation) { + if (validation === true || validation === undefined) { + validation = {'min': true}; + } + this.validation = validation; + }, + + validate: function validate(shape, params, context) { + this.errors = []; + this.validateMember(shape, params || {}, context || 'params'); + + if (this.errors.length > 1) { + var msg = this.errors.join('\n* '); + msg = 'There were ' + this.errors.length + + ' validation errors:\n* ' + msg; + throw AWS.util.error(new Error(msg), + {code: 'MultipleValidationErrors', errors: this.errors}); + } else if (this.errors.length === 1) { + throw this.errors[0]; + } else { + return true; + } + }, + + fail: function fail(code, message) { + this.errors.push(AWS.util.error(new Error(message), {code: code})); + }, + + validateStructure: function validateStructure(shape, params, context) { + this.validateType(params, context, ['object'], 'structure'); + + var paramName; + for (var i = 0; shape.required && i < shape.required.length; i++) { + paramName = shape.required[i]; + var value = params[paramName]; + if (value === undefined || value === null) { + this.fail('MissingRequiredParameter', + 'Missing required key \'' + paramName + '\' in ' + context); + } + } + + // validate hash members + for (paramName in params) { + if (!Object.prototype.hasOwnProperty.call(params, paramName)) continue; + + var paramValue = params[paramName], + memberShape = shape.members[paramName]; + + if (memberShape !== undefined) { + var memberContext = [context, paramName].join('.'); + this.validateMember(memberShape, paramValue, memberContext); + } else { + this.fail('UnexpectedParameter', + 'Unexpected key \'' + paramName + '\' found in ' + context); + } + } + + return true; + }, + + validateMember: function validateMember(shape, param, context) { + switch (shape.type) { + case 'structure': + return this.validateStructure(shape, param, context); + case 'list': + return this.validateList(shape, param, context); + case 'map': + return this.validateMap(shape, param, context); + default: + return this.validateScalar(shape, param, context); + } + }, + + validateList: function validateList(shape, params, context) { + if (this.validateType(params, context, [Array])) { + this.validateRange(shape, params.length, context, 'list member count'); + // validate array members + for (var i = 0; i < params.length; i++) { + this.validateMember(shape.member, params[i], context + '[' + i + ']'); + } + } + }, + + validateMap: function validateMap(shape, params, context) { + if (this.validateType(params, context, ['object'], 'map')) { + // Build up a count of map members to validate range traits. + var mapCount = 0; + for (var param in params) { + if (!Object.prototype.hasOwnProperty.call(params, param)) continue; + // Validate any map key trait constraints + this.validateMember(shape.key, param, + context + '[key=\'' + param + '\']'); + this.validateMember(shape.value, params[param], + context + '[\'' + param + '\']'); + mapCount++; + } + this.validateRange(shape, mapCount, context, 'map member count'); + } + }, + + validateScalar: function validateScalar(shape, value, context) { + switch (shape.type) { + case null: + case undefined: + case 'string': + return this.validateString(shape, value, context); + case 'base64': + case 'binary': + return this.validatePayload(value, context); + case 'integer': + case 'float': + return this.validateNumber(shape, value, context); + case 'boolean': + return this.validateType(value, context, ['boolean']); + case 'timestamp': + return this.validateType(value, context, [Date, + /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?Z$/, 'number'], + 'Date object, ISO-8601 string, or a UNIX timestamp'); + default: + return this.fail('UnkownType', 'Unhandled type ' + + shape.type + ' for ' + context); + } + }, + + validateString: function validateString(shape, value, context) { + var validTypes = ['string']; + if (shape.isJsonValue) { + validTypes = validTypes.concat(['number', 'object', 'boolean']); + } + if (value !== null && this.validateType(value, context, validTypes)) { + this.validateEnum(shape, value, context); + this.validateRange(shape, value.length, context, 'string length'); + this.validatePattern(shape, value, context); + this.validateUri(shape, value, context); + } + }, + + validateUri: function validateUri(shape, value, context) { + if (shape['location'] === 'uri') { + if (value.length === 0) { + this.fail('UriParameterError', 'Expected uri parameter to have length >= 1,' + + ' but found "' + value +'" for ' + context); + } + } + }, + + validatePattern: function validatePattern(shape, value, context) { + if (this.validation['pattern'] && shape['pattern'] !== undefined) { + if (!(new RegExp(shape['pattern'])).test(value)) { + this.fail('PatternMatchError', 'Provided value "' + value + '" ' + + 'does not match regex pattern /' + shape['pattern'] + '/ for ' + + context); + } + } + }, + + validateRange: function validateRange(shape, value, context, descriptor) { + if (this.validation['min']) { + if (shape['min'] !== undefined && value < shape['min']) { + this.fail('MinRangeError', 'Expected ' + descriptor + ' >= ' + + shape['min'] + ', but found ' + value + ' for ' + context); + } + } + if (this.validation['max']) { + if (shape['max'] !== undefined && value > shape['max']) { + this.fail('MaxRangeError', 'Expected ' + descriptor + ' <= ' + + shape['max'] + ', but found ' + value + ' for ' + context); + } + } + }, + + validateEnum: function validateRange(shape, value, context) { + if (this.validation['enum'] && shape['enum'] !== undefined) { + // Fail if the string value is not present in the enum list + if (shape['enum'].indexOf(value) === -1) { + this.fail('EnumError', 'Found string value of ' + value + ', but ' + + 'expected ' + shape['enum'].join('|') + ' for ' + context); + } + } + }, + + validateType: function validateType(value, context, acceptedTypes, type) { + // We will not log an error for null or undefined, but we will return + // false so that callers know that the expected type was not strictly met. + if (value === null || value === undefined) return false; + + var foundInvalidType = false; + for (var i = 0; i < acceptedTypes.length; i++) { + if (typeof acceptedTypes[i] === 'string') { + if (typeof value === acceptedTypes[i]) return true; + } else if (acceptedTypes[i] instanceof RegExp) { + if ((value || '').toString().match(acceptedTypes[i])) return true; + } else { + if (value instanceof acceptedTypes[i]) return true; + if (AWS.util.isType(value, acceptedTypes[i])) return true; + if (!type && !foundInvalidType) acceptedTypes = acceptedTypes.slice(); + acceptedTypes[i] = AWS.util.typeName(acceptedTypes[i]); + } + foundInvalidType = true; + } + + var acceptedType = type; + if (!acceptedType) { + acceptedType = acceptedTypes.join(', ').replace(/,([^,]+)$/, ', or$1'); + } + + var vowel = acceptedType.match(/^[aeiou]/i) ? 'n' : ''; + this.fail('InvalidParameterType', 'Expected ' + context + ' to be a' + + vowel + ' ' + acceptedType); + return false; + }, + + validateNumber: function validateNumber(shape, value, context) { + if (value === null || value === undefined) return; + if (typeof value === 'string') { + var castedValue = parseFloat(value); + if (castedValue.toString() === value) value = castedValue; + } + if (this.validateType(value, context, ['number'])) { + this.validateRange(shape, value, context, 'numeric value'); + } + }, + + validatePayload: function validatePayload(value, context) { + if (value === null || value === undefined) return; + if (typeof value === 'string') return; + if (value && typeof value.byteLength === 'number') return; // typed arrays + if (AWS.util.isNode()) { // special check for buffer/stream in Node.js + var Stream = AWS.util.stream.Stream; + if (AWS.util.Buffer.isBuffer(value) || value instanceof Stream) return; + } else { + if (typeof Blob !== void 0 && value instanceof Blob) return; + } - state.registry[name].splice(index, 1); + var types = ['Buffer', 'Stream', 'File', 'Blob', 'ArrayBuffer', 'DataView']; + if (value) { + for (var i = 0; i < types.length; i++) { + if (AWS.util.isType(value, types[i])) return; + if (AWS.util.typeName(value.constructor) === types[i]) return; } + } - /***/ - }, + this.fail('InvalidParameterType', 'Expected ' + context + ' to be a ' + + 'string, Buffer, Stream, Blob, or typed array object'); + } +}); - /***/ 72358: /***/ (module) => { - module.exports = function btoa(str) { - return new Buffer(str).toString("base64"); - }; - /***/ - }, +/***/ }), - /***/ 72746: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - "use strict"; +/***/ 44086: +/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { - const cp = __nccwpck_require__(32081); - const parse = __nccwpck_require__(66855); - const enoent = __nccwpck_require__(44101); +var AWS = __nccwpck_require__(28437); +var rest = AWS.Protocol.Rest; - function spawn(command, args, options) { - // Parse the arguments - const parsed = parse(command, args, options); +/** + * A presigner object can be used to generate presigned urls for the Polly service. + */ +AWS.Polly.Presigner = AWS.util.inherit({ + /** + * Creates a presigner object with a set of configuration options. + * + * @option options params [map] An optional map of parameters to bind to every + * request sent by this service object. + * @option options service [AWS.Polly] An optional pre-configured instance + * of the AWS.Polly service object to use for requests. The object may + * bound parameters used by the presigner. + * @see AWS.Polly.constructor + */ + constructor: function Signer(options) { + options = options || {}; + this.options = options; + this.service = options.service; + this.bindServiceObject(options); + this._operations = {}; + }, - // Spawn the child process - const spawned = cp.spawn(parsed.command, parsed.args, parsed.options); + /** + * @api private + */ + bindServiceObject: function bindServiceObject(options) { + options = options || {}; + if (!this.service) { + this.service = new AWS.Polly(options); + } else { + var config = AWS.util.copy(this.service.config); + this.service = new this.service.constructor.__super__(config); + this.service.config.params = AWS.util.merge(this.service.config.params || {}, options.params); + } + }, - // Hook into child process "exit" event to emit an error if the command - // does not exists, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16 - enoent.hookChildProcess(spawned, parsed); + /** + * @api private + */ + modifyInputMembers: function modifyInputMembers(input) { + // make copies of the input so we don't overwrite the api + // need to be careful to copy anything we access/modify + var modifiedInput = AWS.util.copy(input); + modifiedInput.members = AWS.util.copy(input.members); + AWS.util.each(input.members, function(name, member) { + modifiedInput.members[name] = AWS.util.copy(member); + // update location and locationName + if (!member.location || member.location === 'body') { + modifiedInput.members[name].location = 'querystring'; + modifiedInput.members[name].locationName = name; + } + }); + return modifiedInput; + }, - return spawned; - } + /** + * @api private + */ + convertPostToGet: function convertPostToGet(req) { + // convert method + req.httpRequest.method = 'GET'; - function spawnSync(command, args, options) { - // Parse the arguments - const parsed = parse(command, args, options); + var operation = req.service.api.operations[req.operation]; + // get cached operation input first + var input = this._operations[req.operation]; + if (!input) { + // modify the original input + this._operations[req.operation] = input = this.modifyInputMembers(operation.input); + } - // Spawn the child process - const result = cp.spawnSync( - parsed.command, - parsed.args, - parsed.options - ); + var uri = rest.generateURI(req.httpRequest.endpoint.path, operation.httpPath, input, req.params); - // Analyze if the command does not exist, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16 - result.error = - result.error || enoent.verifyENOENTSync(result.status, parsed); + req.httpRequest.path = uri; + req.httpRequest.body = ''; + + // don't need these headers on a GET request + delete req.httpRequest.headers['Content-Length']; + delete req.httpRequest.headers['Content-Type']; + }, + + /** + * @overload getSynthesizeSpeechUrl(params = {}, [expires = 3600], [callback]) + * Generate a presigned url for {AWS.Polly.synthesizeSpeech}. + * @note You must ensure that you have static or previously resolved + * credentials if you call this method synchronously (with no callback), + * otherwise it may not properly sign the request. If you cannot guarantee + * this (you are using an asynchronous credential provider, i.e., EC2 + * IAM roles), you should always call this method with an asynchronous + * callback. + * @param params [map] parameters to pass to the operation. See the {AWS.Polly.synthesizeSpeech} + * operation for the expected operation parameters. + * @param expires [Integer] (3600) the number of seconds to expire the pre-signed URL operation in. + * Defaults to 1 hour. + * @return [string] if called synchronously (with no callback), returns the signed URL. + * @return [null] nothing is returned if a callback is provided. + * @callback callback function (err, url) + * If a callback is supplied, it is called when a signed URL has been generated. + * @param err [Error] the error object returned from the presigner. + * @param url [String] the signed URL. + * @see AWS.Polly.synthesizeSpeech + */ + getSynthesizeSpeechUrl: function getSynthesizeSpeechUrl(params, expires, callback) { + var self = this; + var request = this.service.makeRequest('synthesizeSpeech', params); + // remove existing build listeners + request.removeAllListeners('build'); + request.on('build', function(req) { + self.convertPostToGet(req); + }); + return request.presign(expires, callback); + } +}); - return result; - } - module.exports = spawn; - module.exports.spawn = spawn; - module.exports.sync = spawnSync; +/***/ }), - module.exports._parse = parse; - module.exports._enoent = enoent; +/***/ 97969: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - /***/ - }, +var util = __nccwpck_require__(77985); +var AWS = __nccwpck_require__(28437); - /***/ 44101: /***/ (module) => { - "use strict"; +/** + * Prepend prefix defined by API model to endpoint that's already + * constructed. This feature does not apply to operations using + * endpoint discovery and can be disabled. + * @api private + */ +function populateHostPrefix(request) { + var enabled = request.service.config.hostPrefixEnabled; + if (!enabled) return request; + var operationModel = request.service.api.operations[request.operation]; + //don't marshal host prefix when operation has endpoint discovery traits + if (hasEndpointDiscover(request)) return request; + if (operationModel.endpoint && operationModel.endpoint.hostPrefix) { + var hostPrefixNotation = operationModel.endpoint.hostPrefix; + var hostPrefix = expandHostPrefix(hostPrefixNotation, request.params, operationModel.input); + prependEndpointPrefix(request.httpRequest.endpoint, hostPrefix); + validateHostname(request.httpRequest.endpoint.hostname); + } + return request; +} + +/** + * @api private + */ +function hasEndpointDiscover(request) { + var api = request.service.api; + var operationModel = api.operations[request.operation]; + var isEndpointOperation = api.endpointOperation && (api.endpointOperation === util.string.lowerFirst(operationModel.name)); + return (operationModel.endpointDiscoveryRequired !== 'NULL' || isEndpointOperation === true); +} + +/** + * @api private + */ +function expandHostPrefix(hostPrefixNotation, params, shape) { + util.each(shape.members, function(name, member) { + if (member.hostLabel === true) { + if (typeof params[name] !== 'string' || params[name] === '') { + throw util.error(new Error(), { + message: 'Parameter ' + name + ' should be a non-empty string.', + code: 'InvalidParameter' + }); + } + var regex = new RegExp('\\{' + name + '\\}', 'g'); + hostPrefixNotation = hostPrefixNotation.replace(regex, params[name]); + } + }); + return hostPrefixNotation; +} - const isWin = process.platform === "win32"; +/** + * @api private + */ +function prependEndpointPrefix(endpoint, prefix) { + if (endpoint.host) { + endpoint.host = prefix + endpoint.host; + } + if (endpoint.hostname) { + endpoint.hostname = prefix + endpoint.hostname; + } +} + +/** + * @api private + */ +function validateHostname(hostname) { + var labels = hostname.split('.'); + //Reference: https://tools.ietf.org/html/rfc1123#section-2 + var hostPattern = /^[a-zA-Z0-9]{1}$|^[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9]$/; + util.arrayEach(labels, function(label) { + if (!label.length || label.length < 1 || label.length > 63) { + throw util.error(new Error(), { + code: 'ValidationError', + message: 'Hostname label length should be between 1 to 63 characters, inclusive.' + }); + } + if (!hostPattern.test(label)) { + throw AWS.util.error(new Error(), + {code: 'ValidationError', message: label + ' is not hostname compatible.'}); + } + }); +} + +module.exports = { + populateHostPrefix: populateHostPrefix +}; + + +/***/ }), + +/***/ 30083: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var util = __nccwpck_require__(77985); +var JsonBuilder = __nccwpck_require__(47495); +var JsonParser = __nccwpck_require__(5474); +var populateHostPrefix = (__nccwpck_require__(97969).populateHostPrefix); + +function buildRequest(req) { + var httpRequest = req.httpRequest; + var api = req.service.api; + var target = api.targetPrefix + '.' + api.operations[req.operation].name; + var version = api.jsonVersion || '1.0'; + var input = api.operations[req.operation].input; + var builder = new JsonBuilder(); + + if (version === 1) version = '1.0'; + httpRequest.body = builder.build(req.params || {}, input); + httpRequest.headers['Content-Type'] = 'application/x-amz-json-' + version; + httpRequest.headers['X-Amz-Target'] = target; + + populateHostPrefix(req); +} + +function extractError(resp) { + var error = {}; + var httpResponse = resp.httpResponse; + + error.code = httpResponse.headers['x-amzn-errortype'] || 'UnknownError'; + if (typeof error.code === 'string') { + error.code = error.code.split(':')[0]; + } + + if (httpResponse.body.length > 0) { + try { + var e = JSON.parse(httpResponse.body.toString()); + var code = e.__type || e.code || e.Code; + if (code) { + error.code = code.split('#').pop(); + } + if (error.code === 'RequestEntityTooLarge') { + error.message = 'Request body must be less than 1 MB'; + } else { + error.message = (e.message || e.Message || null); + } + } catch (e) { + error.statusCode = httpResponse.statusCode; + error.message = httpResponse.statusMessage; + } + } else { + error.statusCode = httpResponse.statusCode; + error.message = httpResponse.statusCode.toString(); + } + + resp.error = util.error(new Error(), error); +} + +function extractData(resp) { + var body = resp.httpResponse.body.toString() || '{}'; + if (resp.request.service.config.convertResponseTypes === false) { + resp.data = JSON.parse(body); + } else { + var operation = resp.request.service.api.operations[resp.request.operation]; + var shape = operation.output || {}; + var parser = new JsonParser(); + resp.data = parser.parse(body, shape); + } +} + +/** + * @api private + */ +module.exports = { + buildRequest: buildRequest, + extractError: extractError, + extractData: extractData +}; + + +/***/ }), + +/***/ 90761: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var AWS = __nccwpck_require__(28437); +var util = __nccwpck_require__(77985); +var QueryParamSerializer = __nccwpck_require__(45175); +var Shape = __nccwpck_require__(71349); +var populateHostPrefix = (__nccwpck_require__(97969).populateHostPrefix); + +function buildRequest(req) { + var operation = req.service.api.operations[req.operation]; + var httpRequest = req.httpRequest; + httpRequest.headers['Content-Type'] = + 'application/x-www-form-urlencoded; charset=utf-8'; + httpRequest.params = { + Version: req.service.api.apiVersion, + Action: operation.name + }; + + // convert the request parameters into a list of query params, + // e.g. Deeply.NestedParam.0.Name=value + var builder = new QueryParamSerializer(); + builder.serialize(req.params, operation.input, function(name, value) { + httpRequest.params[name] = value; + }); + httpRequest.body = util.queryParamsToString(httpRequest.params); + + populateHostPrefix(req); +} + +function extractError(resp) { + var data, body = resp.httpResponse.body.toString(); + if (body.match(' { + +var util = __nccwpck_require__(77985); +var populateHostPrefix = (__nccwpck_require__(97969).populateHostPrefix); + +function populateMethod(req) { + req.httpRequest.method = req.service.api.operations[req.operation].httpMethod; +} + +function generateURI(endpointPath, operationPath, input, params) { + var uri = [endpointPath, operationPath].join('/'); + uri = uri.replace(/\/+/g, '/'); + + var queryString = {}, queryStringSet = false; + util.each(input.members, function (name, member) { + var paramValue = params[name]; + if (paramValue === null || paramValue === undefined) return; + if (member.location === 'uri') { + var regex = new RegExp('\\{' + member.name + '(\\+)?\\}'); + uri = uri.replace(regex, function(_, plus) { + var fn = plus ? util.uriEscapePath : util.uriEscape; + return fn(String(paramValue)); + }); + } else if (member.location === 'querystring') { + queryStringSet = true; - function notFoundError(original, syscall) { - return Object.assign( - new Error(`${syscall} ${original.command} ENOENT`), - { - code: "ENOENT", - errno: "ENOENT", - syscall: `${syscall} ${original.command}`, - path: original.command, - spawnargs: original.args, + if (member.type === 'list') { + queryString[member.name] = paramValue.map(function(val) { + return util.uriEscape(member.member.toWireFormat(val).toString()); + }); + } else if (member.type === 'map') { + util.each(paramValue, function(key, value) { + if (Array.isArray(value)) { + queryString[key] = value.map(function(val) { + return util.uriEscape(String(val)); + }); + } else { + queryString[key] = util.uriEscape(String(value)); } - ); + }); + } else { + queryString[member.name] = util.uriEscape(member.toWireFormat(paramValue).toString()); } + } + }); - function hookChildProcess(cp, parsed) { - if (!isWin) { - return; - } + if (queryStringSet) { + uri += (uri.indexOf('?') >= 0 ? '&' : '?'); + var parts = []; + util.arrayEach(Object.keys(queryString).sort(), function(key) { + if (!Array.isArray(queryString[key])) { + queryString[key] = [queryString[key]]; + } + for (var i = 0; i < queryString[key].length; i++) { + parts.push(util.uriEscape(String(key)) + '=' + queryString[key][i]); + } + }); + uri += parts.join('&'); + } - const originalEmit = cp.emit; + return uri; +} - cp.emit = function (name, arg1) { - // If emitting "exit" event and exit code is 1, we need to check if - // the command exists and emit an "error" instead - // See https://github.com/IndigoUnited/node-cross-spawn/issues/16 - if (name === "exit") { - const err = verifyENOENT(arg1, parsed, "spawn"); +function populateURI(req) { + var operation = req.service.api.operations[req.operation]; + var input = operation.input; - if (err) { - return originalEmit.call(cp, "error", err); - } - } + var uri = generateURI(req.httpRequest.endpoint.path, operation.httpPath, input, req.params); + req.httpRequest.path = uri; +} - return originalEmit.apply(cp, arguments); // eslint-disable-line prefer-rest-params - }; - } +function populateHeaders(req) { + var operation = req.service.api.operations[req.operation]; + util.each(operation.input.members, function (name, member) { + var value = req.params[name]; + if (value === null || value === undefined) return; - function verifyENOENT(status, parsed) { - if (isWin && status === 1 && !parsed.file) { - return notFoundError(parsed.original, "spawn"); + if (member.location === 'headers' && member.type === 'map') { + util.each(value, function(key, memberValue) { + req.httpRequest.headers[member.name + key] = memberValue; + }); + } else if (member.location === 'header') { + value = member.toWireFormat(value).toString(); + if (member.isJsonValue) { + value = util.base64.encode(value); + } + req.httpRequest.headers[member.name] = value; + } + }); +} + +function buildRequest(req) { + populateMethod(req); + populateURI(req); + populateHeaders(req); + populateHostPrefix(req); +} + +function extractError() { +} + +function extractData(resp) { + var req = resp.request; + var data = {}; + var r = resp.httpResponse; + var operation = req.service.api.operations[req.operation]; + var output = operation.output; + + // normalize headers names to lower-cased keys for matching + var headers = {}; + util.each(r.headers, function (k, v) { + headers[k.toLowerCase()] = v; + }); + + util.each(output.members, function(name, member) { + var header = (member.name || name).toLowerCase(); + if (member.location === 'headers' && member.type === 'map') { + data[name] = {}; + var location = member.isLocationName ? member.name : ''; + var pattern = new RegExp('^' + location + '(.+)', 'i'); + util.each(r.headers, function (k, v) { + var result = k.match(pattern); + if (result !== null) { + data[name][result[1]] = v; } + }); + } else if (member.location === 'header') { + if (headers[header] !== undefined) { + var value = member.isJsonValue ? + util.base64.decode(headers[header]) : + headers[header]; + data[name] = member.toType(value); + } + } else if (member.location === 'statusCode') { + data[name] = parseInt(r.statusCode, 10); + } + }); + + resp.data = data; +} + +/** + * @api private + */ +module.exports = { + buildRequest: buildRequest, + extractError: extractError, + extractData: extractData, + generateURI: generateURI +}; + + +/***/ }), + +/***/ 5883: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var util = __nccwpck_require__(77985); +var Rest = __nccwpck_require__(98200); +var Json = __nccwpck_require__(30083); +var JsonBuilder = __nccwpck_require__(47495); +var JsonParser = __nccwpck_require__(5474); + +function populateBody(req) { + var builder = new JsonBuilder(); + var input = req.service.api.operations[req.operation].input; + + if (input.payload) { + var params = {}; + var payloadShape = input.members[input.payload]; + params = req.params[input.payload]; + if (params === undefined) return; + + if (payloadShape.type === 'structure') { + req.httpRequest.body = builder.build(params, payloadShape); + applyContentTypeHeader(req); + } else { // non-JSON payload + req.httpRequest.body = params; + if (payloadShape.type === 'binary' || payloadShape.isStreaming) { + applyContentTypeHeader(req, true); + } + } + } else { + var body = builder.build(req.params, input); + if (body !== '{}' || req.httpRequest.method !== 'GET') { //don't send empty body for GET method + req.httpRequest.body = body; + } + applyContentTypeHeader(req); + } +} + +function applyContentTypeHeader(req, isBinary) { + var operation = req.service.api.operations[req.operation]; + var input = operation.input; + + if (!req.httpRequest.headers['Content-Type']) { + var type = isBinary ? 'binary/octet-stream' : 'application/json'; + req.httpRequest.headers['Content-Type'] = type; + } +} + +function buildRequest(req) { + Rest.buildRequest(req); + + // never send body payload on HEAD/DELETE + if (['HEAD', 'DELETE'].indexOf(req.httpRequest.method) < 0) { + populateBody(req); + } +} + +function extractError(resp) { + Json.extractError(resp); +} + +function extractData(resp) { + Rest.extractData(resp); + + var req = resp.request; + var operation = req.service.api.operations[req.operation]; + var rules = req.service.api.operations[req.operation].output || {}; + var parser; + var hasEventOutput = operation.hasEventOutput; + + if (rules.payload) { + var payloadMember = rules.members[rules.payload]; + var body = resp.httpResponse.body; + if (payloadMember.isEventStream) { + parser = new JsonParser(); + resp.data[payload] = util.createEventStream( + AWS.HttpClient.streamsApiVersion === 2 ? resp.httpResponse.stream : body, + parser, + payloadMember + ); + } else if (payloadMember.type === 'structure' || payloadMember.type === 'list') { + var parser = new JsonParser(); + resp.data[rules.payload] = parser.parse(body, payloadMember); + } else if (payloadMember.type === 'binary' || payloadMember.isStreaming) { + resp.data[rules.payload] = body; + } else { + resp.data[rules.payload] = payloadMember.toType(body); + } + } else { + var data = resp.data; + Json.extractData(resp); + resp.data = util.merge(data, resp.data); + } +} + +/** + * @api private + */ +module.exports = { + buildRequest: buildRequest, + extractError: extractError, + extractData: extractData +}; + + +/***/ }), + +/***/ 15143: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var AWS = __nccwpck_require__(28437); +var util = __nccwpck_require__(77985); +var Rest = __nccwpck_require__(98200); + +function populateBody(req) { + var input = req.service.api.operations[req.operation].input; + var builder = new AWS.XML.Builder(); + var params = req.params; + + var payload = input.payload; + if (payload) { + var payloadMember = input.members[payload]; + params = params[payload]; + if (params === undefined) return; + + if (payloadMember.type === 'structure') { + var rootElement = payloadMember.name; + req.httpRequest.body = builder.toXML(params, payloadMember, rootElement, true); + } else { // non-xml payload + req.httpRequest.body = params; + } + } else { + req.httpRequest.body = builder.toXML(params, input, input.name || + input.shape || util.string.upperFirst(req.operation) + 'Request'); + } +} + +function buildRequest(req) { + Rest.buildRequest(req); + + // never send body payload on GET/HEAD + if (['GET', 'HEAD'].indexOf(req.httpRequest.method) < 0) { + populateBody(req); + } +} + +function extractError(resp) { + Rest.extractError(resp); + + var data; + try { + data = new AWS.XML.Parser().parse(resp.httpResponse.body.toString()); + } catch (e) { + data = { + Code: resp.httpResponse.statusCode, + Message: resp.httpResponse.statusMessage + }; + } + + if (data.Errors) data = data.Errors; + if (data.Error) data = data.Error; + if (data.Code) { + resp.error = util.error(new Error(), { + code: data.Code, + message: data.Message + }); + } else { + resp.error = util.error(new Error(), { + code: resp.httpResponse.statusCode, + message: null + }); + } +} + +function extractData(resp) { + Rest.extractData(resp); + + var parser; + var req = resp.request; + var body = resp.httpResponse.body; + var operation = req.service.api.operations[req.operation]; + var output = operation.output; + + var hasEventOutput = operation.hasEventOutput; + + var payload = output.payload; + if (payload) { + var payloadMember = output.members[payload]; + if (payloadMember.isEventStream) { + parser = new AWS.XML.Parser(); + resp.data[payload] = util.createEventStream( + AWS.HttpClient.streamsApiVersion === 2 ? resp.httpResponse.stream : resp.httpResponse.body, + parser, + payloadMember + ); + } else if (payloadMember.type === 'structure') { + parser = new AWS.XML.Parser(); + resp.data[payload] = parser.parse(body.toString(), payloadMember); + } else if (payloadMember.type === 'binary' || payloadMember.isStreaming) { + resp.data[payload] = body; + } else { + resp.data[payload] = payloadMember.toType(body); + } + } else if (body.length > 0) { + parser = new AWS.XML.Parser(); + var data = parser.parse(body.toString(), output); + util.update(resp.data, data); + } +} + +/** + * @api private + */ +module.exports = { + buildRequest: buildRequest, + extractError: extractError, + extractData: extractData +}; - return null; - } - function verifyENOENTSync(status, parsed) { - if (isWin && status === 1 && !parsed.file) { - return notFoundError(parsed.original, "spawnSync"); +/***/ }), + +/***/ 91822: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var AWS = __nccwpck_require__(28437); + +/** + * Resolve client-side monitoring configuration from either environmental variables + * or shared config file. Configurations from environmental variables have higher priority + * than those from shared config file. The resolver will try to read the shared config file + * no matter whether the AWS_SDK_LOAD_CONFIG variable is set. + * @api private + */ +function resolveMonitoringConfig() { + var config = { + port: undefined, + clientId: undefined, + enabled: undefined, + host: undefined + }; + if (fromEnvironment(config) || fromConfigFile(config)) return toJSType(config); + return toJSType(config); +} + +/** + * Resolve configurations from environmental variables. + * @param {object} client side monitoring config object needs to be resolved + * @returns {boolean} whether resolving configurations is done + * @api private + */ +function fromEnvironment(config) { + config.port = config.port || process.env.AWS_CSM_PORT; + config.enabled = config.enabled || process.env.AWS_CSM_ENABLED; + config.clientId = config.clientId || process.env.AWS_CSM_CLIENT_ID; + config.host = config.host || process.env.AWS_CSM_HOST; + return config.port && config.enabled && config.clientId && config.host || + ['false', '0'].indexOf(config.enabled) >= 0; //no need to read shared config file if explicitely disabled +} + +/** + * Resolve cofigurations from shared config file with specified role name + * @param {object} client side monitoring config object needs to be resolved + * @returns {boolean} whether resolving configurations is done + * @api private + */ +function fromConfigFile(config) { + var sharedFileConfig; + try { + var configFile = AWS.util.iniLoader.loadFrom({ + isConfig: true, + filename: process.env[AWS.util.sharedConfigFileEnv] + }); + var sharedFileConfig = configFile[ + process.env.AWS_PROFILE || AWS.util.defaultProfile + ]; + } catch (err) { + return false; + } + if (!sharedFileConfig) return config; + config.port = config.port || sharedFileConfig.csm_port; + config.enabled = config.enabled || sharedFileConfig.csm_enabled; + config.clientId = config.clientId || sharedFileConfig.csm_client_id; + config.host = config.host || sharedFileConfig.csm_host; + return config.port && config.enabled && config.clientId && config.host; +} + +/** + * Transfer the resolved configuration value to proper types: port as number, enabled + * as boolean and clientId as string. The 'enabled' flag is valued to false when set + * to 'false' or '0'. + * @param {object} resolved client side monitoring config + * @api private + */ +function toJSType(config) { + //config.XXX is either undefined or string + var falsyNotations = ['false', '0', undefined]; + if (!config.enabled || falsyNotations.indexOf(config.enabled.toLowerCase()) >= 0) { + config.enabled = false; + } else { + config.enabled = true; + } + config.port = config.port ? parseInt(config.port, 10) : undefined; + return config; +} + +module.exports = resolveMonitoringConfig; + + +/***/ }), + +/***/ 66807: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var util = (__nccwpck_require__(28437).util); +var dgram = __nccwpck_require__(71891); +var stringToBuffer = util.buffer.toBuffer; + +var MAX_MESSAGE_SIZE = 1024 * 8; // 8 KB + +/** + * Publishes metrics via udp. + * @param {object} options Paramters for Publisher constructor + * @param {number} [options.port = 31000] Port number + * @param {string} [options.clientId = ''] Client Identifier + * @param {boolean} [options.enabled = false] enable sending metrics datagram + * @api private + */ +function Publisher(options) { + // handle configuration + options = options || {}; + this.enabled = options.enabled || false; + this.port = options.port || 31000; + this.clientId = options.clientId || ''; + this.address = options.host || '127.0.0.1'; + if (this.clientId.length > 255) { + // ClientId has a max length of 255 + this.clientId = this.clientId.substr(0, 255); + } + this.messagesInFlight = 0; +} + +Publisher.prototype.fieldsToTrim = { + UserAgent: 256, + SdkException: 128, + SdkExceptionMessage: 512, + AwsException: 128, + AwsExceptionMessage: 512, + FinalSdkException: 128, + FinalSdkExceptionMessage: 512, + FinalAwsException: 128, + FinalAwsExceptionMessage: 512 + +}; + +/** + * Trims fields that have a specified max length. + * @param {object} event ApiCall or ApiCallAttempt event. + * @returns {object} + * @api private + */ +Publisher.prototype.trimFields = function(event) { + var trimmableFields = Object.keys(this.fieldsToTrim); + for (var i = 0, iLen = trimmableFields.length; i < iLen; i++) { + var field = trimmableFields[i]; + if (event.hasOwnProperty(field)) { + var maxLength = this.fieldsToTrim[field]; + var value = event[field]; + if (value && value.length > maxLength) { + event[field] = value.substr(0, maxLength); + } } + } + return event; +}; - return null; - } +/** + * Handles ApiCall and ApiCallAttempt events. + * @param {Object} event apiCall or apiCallAttempt event. + * @api private + */ +Publisher.prototype.eventHandler = function(event) { + // set the clientId + event.ClientId = this.clientId; - module.exports = { - hookChildProcess, - verifyENOENT, - verifyENOENTSync, - notFoundError, - }; + this.trimFields(event); - /***/ - }, + var message = stringToBuffer(JSON.stringify(event)); + if (!this.enabled || message.length > MAX_MESSAGE_SIZE) { + // drop the message if publisher not enabled or it is too large + return; + } - /***/ 66855: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - "use strict"; + this.publishDatagram(message); +}; - const path = __nccwpck_require__(71017); - const niceTry = __nccwpck_require__(38560); - const resolveCommand = __nccwpck_require__(87274); - const escape = __nccwpck_require__(34274); - const readShebang = __nccwpck_require__(41252); - const semver = __nccwpck_require__(85911); +/** + * Publishes message to an agent. + * @param {Buffer} message JSON message to send to agent. + * @api private + */ +Publisher.prototype.publishDatagram = function(message) { + var self = this; + var client = this.getClient(); + + this.messagesInFlight++; + this.client.send(message, 0, message.length, this.port, this.address, function(err, bytes) { + if (--self.messagesInFlight <= 0) { + // destroy existing client so the event loop isn't kept open + self.destroyClient(); + } + }); +}; + +/** + * Returns an existing udp socket, or creates one if it doesn't already exist. + * @api private + */ +Publisher.prototype.getClient = function() { + if (!this.client) { + this.client = dgram.createSocket('udp4'); + } + return this.client; +}; + +/** + * Destroys the udp socket. + * @api private + */ +Publisher.prototype.destroyClient = function() { + if (this.client) { + this.client.close(); + this.client = void 0; + } +}; + +module.exports = { + Publisher: Publisher +}; + + +/***/ }), + +/***/ 45175: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var util = __nccwpck_require__(77985); + +function QueryParamSerializer() { +} + +QueryParamSerializer.prototype.serialize = function(params, shape, fn) { + serializeStructure('', params, shape, fn); +}; + +function ucfirst(shape) { + if (shape.isQueryName || shape.api.protocol !== 'ec2') { + return shape.name; + } else { + return shape.name[0].toUpperCase() + shape.name.substr(1); + } +} + +function serializeStructure(prefix, struct, rules, fn) { + util.each(rules.members, function(name, member) { + var value = struct[name]; + if (value === null || value === undefined) return; + + var memberName = ucfirst(member); + memberName = prefix ? prefix + '.' + memberName : memberName; + serializeMember(memberName, value, member, fn); + }); +} + +function serializeMap(name, map, rules, fn) { + var i = 1; + util.each(map, function (key, value) { + var prefix = rules.flattened ? '.' : '.entry.'; + var position = prefix + (i++) + '.'; + var keyName = position + (rules.key.name || 'key'); + var valueName = position + (rules.value.name || 'value'); + serializeMember(name + keyName, key, rules.key, fn); + serializeMember(name + valueName, value, rules.value, fn); + }); +} + +function serializeList(name, list, rules, fn) { + var memberRules = rules.member || {}; + + if (list.length === 0) { + fn.call(this, name, null); + return; + } + + util.arrayEach(list, function (v, n) { + var suffix = '.' + (n + 1); + if (rules.api.protocol === 'ec2') { + // Do nothing for EC2 + suffix = suffix + ''; // make linter happy + } else if (rules.flattened) { + if (memberRules.name) { + var parts = name.split('.'); + parts.pop(); + parts.push(ucfirst(memberRules)); + name = parts.join('.'); + } + } else { + suffix = '.' + (memberRules.name ? memberRules.name : 'member') + suffix; + } + serializeMember(name + suffix, v, memberRules, fn); + }); +} + +function serializeMember(name, value, rules, fn) { + if (value === null || value === undefined) return; + if (rules.type === 'structure') { + serializeStructure(name, value, rules, fn); + } else if (rules.type === 'list') { + serializeList(name, value, rules, fn); + } else if (rules.type === 'map') { + serializeMap(name, value, rules, fn); + } else { + fn(name, rules.toWireFormat(value).toString()); + } +} + +/** + * @api private + */ +module.exports = QueryParamSerializer; - const isWin = process.platform === "win32"; - const isExecutableRegExp = /\.(?:com|exe)$/i; - const isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i; - // `options.shell` is supported in Node ^4.8.0, ^5.7.0 and >= 6.0.0 - const supportsShellOption = - niceTry(() => - semver.satisfies( - process.version, - "^4.8.0 || ^5.7.0 || >= 6.0.0", - true - ) - ) || false; +/***/ }), - function detectShebang(parsed) { - parsed.file = resolveCommand(parsed); +/***/ 16612: +/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { - const shebang = parsed.file && readShebang(parsed.file); +var AWS = __nccwpck_require__(28437); - if (shebang) { - parsed.args.unshift(parsed.file); - parsed.command = shebang; +/** + * @api private + */ +var service = null; + +/** + * @api private + */ +var api = { + signatureVersion: 'v4', + signingName: 'rds-db', + operations: {} +}; + +/** + * @api private + */ +var requiredAuthTokenOptions = { + region: 'string', + hostname: 'string', + port: 'number', + username: 'string' +}; + +/** + * A signer object can be used to generate an auth token to a database. + */ +AWS.RDS.Signer = AWS.util.inherit({ + /** + * Creates a signer object can be used to generate an auth token. + * + * @option options credentials [AWS.Credentials] the AWS credentials + * to sign requests with. Uses the default credential provider chain + * if not specified. + * @option options hostname [String] the hostname of the database to connect to. + * @option options port [Number] the port number the database is listening on. + * @option options region [String] the region the database is located in. + * @option options username [String] the username to login as. + * @example Passing in options to constructor + * var signer = new AWS.RDS.Signer({ + * credentials: new AWS.SharedIniFileCredentials({profile: 'default'}), + * region: 'us-east-1', + * hostname: 'db.us-east-1.rds.amazonaws.com', + * port: 8000, + * username: 'name' + * }); + */ + constructor: function Signer(options) { + this.options = options || {}; + }, - return resolveCommand(parsed); + /** + * @api private + * Strips the protocol from a url. + */ + convertUrlToAuthToken: function convertUrlToAuthToken(url) { + // we are always using https as the protocol + var protocol = 'https://'; + if (url.indexOf(protocol) === 0) { + return url.substring(protocol.length); } + }, - return parsed.file; - } + /** + * @overload getAuthToken(options = {}, [callback]) + * Generate an auth token to a database. + * @note You must ensure that you have static or previously resolved + * credentials if you call this method synchronously (with no callback), + * otherwise it may not properly sign the request. If you cannot guarantee + * this (you are using an asynchronous credential provider, i.e., EC2 + * IAM roles), you should always call this method with an asynchronous + * callback. + * + * @param options [map] The fields to use when generating an auth token. + * Any options specified here will be merged on top of any options passed + * to AWS.RDS.Signer: + * + * * **credentials** (AWS.Credentials) — the AWS credentials + * to sign requests with. Uses the default credential provider chain + * if not specified. + * * **hostname** (String) — the hostname of the database to connect to. + * * **port** (Number) — the port number the database is listening on. + * * **region** (String) — the region the database is located in. + * * **username** (String) — the username to login as. + * @return [String] if called synchronously (with no callback), returns the + * auth token. + * @return [null] nothing is returned if a callback is provided. + * @callback callback function (err, token) + * If a callback is supplied, it is called when an auth token has been generated. + * @param err [Error] the error object returned from the signer. + * @param token [String] the auth token. + * + * @example Generating an auth token synchronously + * var signer = new AWS.RDS.Signer({ + * // configure options + * region: 'us-east-1', + * username: 'default', + * hostname: 'db.us-east-1.amazonaws.com', + * port: 8000 + * }); + * var token = signer.getAuthToken({ + * // these options are merged with those defined when creating the signer, overriding in the case of a duplicate option + * // credentials are not specified here or when creating the signer, so default credential provider will be used + * username: 'test' // overriding username + * }); + * @example Generating an auth token asynchronously + * var signer = new AWS.RDS.Signer({ + * // configure options + * region: 'us-east-1', + * username: 'default', + * hostname: 'db.us-east-1.amazonaws.com', + * port: 8000 + * }); + * signer.getAuthToken({ + * // these options are merged with those defined when creating the signer, overriding in the case of a duplicate option + * // credentials are not specified here or when creating the signer, so default credential provider will be used + * username: 'test' // overriding username + * }, function(err, token) { + * if (err) { + * // handle error + * } else { + * // use token + * } + * }); + * + */ + getAuthToken: function getAuthToken(options, callback) { + if (typeof options === 'function' && callback === undefined) { + callback = options; + options = {}; + } + var self = this; + var hasCallback = typeof callback === 'function'; + // merge options with existing options + options = AWS.util.merge(this.options, options); + // validate options + var optionsValidation = this.validateAuthTokenOptions(options); + if (optionsValidation !== true) { + if (hasCallback) { + return callback(optionsValidation, null); + } + throw optionsValidation; + } - function parseNonShell(parsed) { - if (!isWin) { - return parsed; + // 15 minutes + var expires = 900; + // create service to generate a request from + var serviceOptions = { + region: options.region, + endpoint: new AWS.Endpoint(options.hostname + ':' + options.port), + paramValidation: false, + signatureVersion: 'v4' + }; + if (options.credentials) { + serviceOptions.credentials = options.credentials; + } + service = new AWS.Service(serviceOptions); + // ensure the SDK is using sigv4 signing (config is not enough) + service.api = api; + + var request = service.makeRequest(); + // add listeners to request to properly build auth token + this.modifyRequestForAuthToken(request, options); + + if (hasCallback) { + request.presign(expires, function(err, url) { + if (url) { + url = self.convertUrlToAuthToken(url); + } + callback(err, url); + }); + } else { + var url = request.presign(expires); + return this.convertUrlToAuthToken(url); } + }, + + /** + * @api private + * Modifies a request to allow the presigner to generate an auth token. + */ + modifyRequestForAuthToken: function modifyRequestForAuthToken(request, options) { + request.on('build', request.buildAsGet); + var httpRequest = request.httpRequest; + httpRequest.body = AWS.util.queryParamsToString({ + Action: 'connect', + DBUser: options.username + }); + }, - // Detect & add support for shebangs - const commandFile = detectShebang(parsed); + /** + * @api private + * Validates that the options passed in contain all the keys with values of the correct type that + * are needed to generate an auth token. + */ + validateAuthTokenOptions: function validateAuthTokenOptions(options) { + // iterate over all keys in options + var message = ''; + options = options || {}; + for (var key in requiredAuthTokenOptions) { + if (!Object.prototype.hasOwnProperty.call(requiredAuthTokenOptions, key)) { + continue; + } + if (typeof options[key] !== requiredAuthTokenOptions[key]) { + message += 'option \'' + key + '\' should have been type \'' + requiredAuthTokenOptions[key] + '\', was \'' + typeof options[key] + '\'.\n'; + } + } + if (message.length) { + return AWS.util.error(new Error(), { + code: 'InvalidParameter', + message: message + }); + } + return true; + } +}); + + +/***/ }), + +/***/ 81370: +/***/ ((module) => { + +module.exports = { + //provide realtime clock for performance measurement + now: function now() { + var second = process.hrtime(); + return second[0] * 1000 + (second[1] / 1000000); + } +}; + + +/***/ }), + +/***/ 18262: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var util = __nccwpck_require__(77985); +var regionConfig = __nccwpck_require__(80738); + +function generateRegionPrefix(region) { + if (!region) return null; + + var parts = region.split('-'); + if (parts.length < 3) return null; + return parts.slice(0, parts.length - 2).join('-') + '-*'; +} + +function derivedKeys(service) { + var region = service.config.region; + var regionPrefix = generateRegionPrefix(region); + var endpointPrefix = service.api.endpointPrefix; + + return [ + [region, endpointPrefix], + [regionPrefix, endpointPrefix], + [region, '*'], + [regionPrefix, '*'], + ['*', endpointPrefix], + ['*', '*'] + ].map(function(item) { + return item[0] && item[1] ? item.join('/') : null; + }); +} + +function applyConfig(service, config) { + util.each(config, function(key, value) { + if (key === 'globalEndpoint') return; + if (service.config[key] === undefined || service.config[key] === null) { + service.config[key] = value; + } + }); +} + +function configureEndpoint(service) { + var keys = derivedKeys(service); + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + if (!key) continue; + + if (Object.prototype.hasOwnProperty.call(regionConfig.rules, key)) { + var config = regionConfig.rules[key]; + if (typeof config === 'string') { + config = regionConfig.patterns[config]; + } + + // set dualstack endpoint + if (service.config.useDualstack && util.isDualstackAvailable(service)) { + config = util.copy(config); + config.endpoint = config.endpoint.replace( + /{service}\.({region}\.)?/, + '{service}.dualstack.{region}.' + ); + } - // We don't need a shell if the command filename is an executable - const needsShell = !isExecutableRegExp.test(commandFile); + // set global endpoint + service.isGlobalEndpoint = !!config.globalEndpoint; + if (config.signingRegion) { + service.signingRegion = config.signingRegion; + } + + // signature version + if (!config.signatureVersion) config.signatureVersion = 'v4'; + + // merge config + applyConfig(service, config); + return; + } + } +} + +function getEndpointSuffix(region) { + var regionRegexes = { + '^(us|eu|ap|sa|ca|me)\\-\\w+\\-\\d+$': 'amazonaws.com', + '^cn\\-\\w+\\-\\d+$': 'amazonaws.com.cn', + '^us\\-gov\\-\\w+\\-\\d+$': 'amazonaws.com', + '^us\\-iso\\-\\w+\\-\\d+$': 'c2s.ic.gov', + '^us\\-isob\\-\\w+\\-\\d+$': 'sc2s.sgov.gov' + }; + var defaultSuffix = 'amazonaws.com'; + var regexes = Object.keys(regionRegexes); + for (var i = 0; i < regexes.length; i++) { + var regionPattern = RegExp(regexes[i]); + var dnsSuffix = regionRegexes[regexes[i]]; + if (regionPattern.test(region)) return dnsSuffix; + } + return defaultSuffix; +} + +/** + * @api private + */ +module.exports = { + configureEndpoint: configureEndpoint, + getEndpointSuffix: getEndpointSuffix +}; - // If a shell is required, use cmd.exe and take care of escaping everything correctly - // Note that `forceShell` is an hidden option used only in tests - if (parsed.options.forceShell || needsShell) { - // Need to double escape meta chars if the command is a cmd-shim located in `node_modules/.bin/` - // The cmd-shim simply calls execute the package bin file with NodeJS, proxying any argument - // Because the escape of metachars with ^ gets interpreted when the cmd.exe is first called, - // we need to double escape them - const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile); - // Normalize posix paths into OS compatible paths (e.g.: foo/bar -> foo\bar) - // This is necessary otherwise it will always fail with ENOENT in those cases - parsed.command = path.normalize(parsed.command); +/***/ }), - // Escape command & arguments - parsed.command = escape.command(parsed.command); - parsed.args = parsed.args.map((arg) => - escape.argument(arg, needsDoubleEscapeMetaChars) - ); +/***/ 78652: +/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { - const shellCommand = [parsed.command].concat(parsed.args).join(" "); +var AWS = __nccwpck_require__(28437); +var AcceptorStateMachine = __nccwpck_require__(68118); +var inherit = AWS.util.inherit; +var domain = AWS.util.domain; +var jmespath = __nccwpck_require__(87783); - parsed.args = ["/d", "/s", "/c", `"${shellCommand}"`]; - parsed.command = process.env.comspec || "cmd.exe"; - parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped +/** + * @api private + */ +var hardErrorStates = {success: 1, error: 1, complete: 1}; + +function isTerminalState(machine) { + return Object.prototype.hasOwnProperty.call(hardErrorStates, machine._asm.currentState); +} + +var fsm = new AcceptorStateMachine(); +fsm.setupStates = function() { + var transition = function(_, done) { + var self = this; + self._haltHandlersOnError = false; + + self.emit(self._asm.currentState, function(err) { + if (err) { + if (isTerminalState(self)) { + if (domain && self.domain instanceof domain.Domain) { + err.domainEmitter = self; + err.domain = self.domain; + err.domainThrown = false; + self.domain.emit('error', err); + } else { + throw err; + } + } else { + self.response.error = err; + done(err); } + } else { + done(self.response.error); + } + }); + + }; + + this.addState('validate', 'build', 'error', transition); + this.addState('build', 'afterBuild', 'restart', transition); + this.addState('afterBuild', 'sign', 'restart', transition); + this.addState('sign', 'send', 'retry', transition); + this.addState('retry', 'afterRetry', 'afterRetry', transition); + this.addState('afterRetry', 'sign', 'error', transition); + this.addState('send', 'validateResponse', 'retry', transition); + this.addState('validateResponse', 'extractData', 'extractError', transition); + this.addState('extractError', 'extractData', 'retry', transition); + this.addState('extractData', 'success', 'retry', transition); + this.addState('restart', 'build', 'error', transition); + this.addState('success', 'complete', 'complete', transition); + this.addState('error', 'complete', 'complete', transition); + this.addState('complete', null, null, transition); +}; +fsm.setupStates(); + +/** + * ## Asynchronous Requests + * + * All requests made through the SDK are asynchronous and use a + * callback interface. Each service method that kicks off a request + * returns an `AWS.Request` object that you can use to register + * callbacks. + * + * For example, the following service method returns the request + * object as "request", which can be used to register callbacks: + * + * ```javascript + * // request is an AWS.Request object + * var request = ec2.describeInstances(); + * + * // register callbacks on request to retrieve response data + * request.on('success', function(response) { + * console.log(response.data); + * }); + * ``` + * + * When a request is ready to be sent, the {send} method should + * be called: + * + * ```javascript + * request.send(); + * ``` + * + * Since registered callbacks may or may not be idempotent, requests should only + * be sent once. To perform the same operation multiple times, you will need to + * create multiple request objects, each with its own registered callbacks. + * + * ## Removing Default Listeners for Events + * + * Request objects are built with default listeners for the various events, + * depending on the service type. In some cases, you may want to remove + * some built-in listeners to customize behaviour. Doing this requires + * access to the built-in listener functions, which are exposed through + * the {AWS.EventListeners.Core} namespace. For instance, you may + * want to customize the HTTP handler used when sending a request. In this + * case, you can remove the built-in listener associated with the 'send' + * event, the {AWS.EventListeners.Core.SEND} listener and add your own. + * + * ## Multiple Callbacks and Chaining + * + * You can register multiple callbacks on any request object. The + * callbacks can be registered for different events, or all for the + * same event. In addition, you can chain callback registration, for + * example: + * + * ```javascript + * request. + * on('success', function(response) { + * console.log("Success!"); + * }). + * on('error', function(error, response) { + * console.log("Error!"); + * }). + * on('complete', function(response) { + * console.log("Always!"); + * }). + * send(); + * ``` + * + * The above example will print either "Success! Always!", or "Error! Always!", + * depending on whether the request succeeded or not. + * + * @!attribute httpRequest + * @readonly + * @!group HTTP Properties + * @return [AWS.HttpRequest] the raw HTTP request object + * containing request headers and body information + * sent by the service. + * + * @!attribute startTime + * @readonly + * @!group Operation Properties + * @return [Date] the time that the request started + * + * @!group Request Building Events + * + * @!event validate(request) + * Triggered when a request is being validated. Listeners + * should throw an error if the request should not be sent. + * @param request [Request] the request object being sent + * @see AWS.EventListeners.Core.VALIDATE_CREDENTIALS + * @see AWS.EventListeners.Core.VALIDATE_REGION + * @example Ensuring that a certain parameter is set before sending a request + * var req = s3.putObject(params); + * req.on('validate', function() { + * if (!req.params.Body.match(/^Hello\s/)) { + * throw new Error('Body must start with "Hello "'); + * } + * }); + * req.send(function(err, data) { ... }); + * + * @!event build(request) + * Triggered when the request payload is being built. Listeners + * should fill the necessary information to send the request + * over HTTP. + * @param (see AWS.Request~validate) + * @example Add a custom HTTP header to a request + * var req = s3.putObject(params); + * req.on('build', function() { + * req.httpRequest.headers['Custom-Header'] = 'value'; + * }); + * req.send(function(err, data) { ... }); + * + * @!event sign(request) + * Triggered when the request is being signed. Listeners should + * add the correct authentication headers and/or adjust the body, + * depending on the authentication mechanism being used. + * @param (see AWS.Request~validate) + * + * @!group Request Sending Events + * + * @!event send(response) + * Triggered when the request is ready to be sent. Listeners + * should call the underlying transport layer to initiate + * the sending of the request. + * @param response [Response] the response object + * @context [Request] the request object that was sent + * @see AWS.EventListeners.Core.SEND + * + * @!event retry(response) + * Triggered when a request failed and might need to be retried or redirected. + * If the response is retryable, the listener should set the + * `response.error.retryable` property to `true`, and optionally set + * `response.error.retryDelay` to the millisecond delay for the next attempt. + * In the case of a redirect, `response.error.redirect` should be set to + * `true` with `retryDelay` set to an optional delay on the next request. + * + * If a listener decides that a request should not be retried, + * it should set both `retryable` and `redirect` to false. + * + * Note that a retryable error will be retried at most + * {AWS.Config.maxRetries} times (based on the service object's config). + * Similarly, a request that is redirected will only redirect at most + * {AWS.Config.maxRedirects} times. + * + * @param (see AWS.Request~send) + * @context (see AWS.Request~send) + * @example Adding a custom retry for a 404 response + * request.on('retry', function(response) { + * // this resource is not yet available, wait 10 seconds to get it again + * if (response.httpResponse.statusCode === 404 && response.error) { + * response.error.retryable = true; // retry this error + * response.error.retryDelay = 10000; // wait 10 seconds + * } + * }); + * + * @!group Data Parsing Events + * + * @!event extractError(response) + * Triggered on all non-2xx requests so that listeners can extract + * error details from the response body. Listeners to this event + * should set the `response.error` property. + * @param (see AWS.Request~send) + * @context (see AWS.Request~send) + * + * @!event extractData(response) + * Triggered in successful requests to allow listeners to + * de-serialize the response body into `response.data`. + * @param (see AWS.Request~send) + * @context (see AWS.Request~send) + * + * @!group Completion Events + * + * @!event success(response) + * Triggered when the request completed successfully. + * `response.data` will contain the response data and + * `response.error` will be null. + * @param (see AWS.Request~send) + * @context (see AWS.Request~send) + * + * @!event error(error, response) + * Triggered when an error occurs at any point during the + * request. `response.error` will contain details about the error + * that occurred. `response.data` will be null. + * @param error [Error] the error object containing details about + * the error that occurred. + * @param (see AWS.Request~send) + * @context (see AWS.Request~send) + * + * @!event complete(response) + * Triggered whenever a request cycle completes. `response.error` + * should be checked, since the request may have failed. + * @param (see AWS.Request~send) + * @context (see AWS.Request~send) + * + * @!group HTTP Events + * + * @!event httpHeaders(statusCode, headers, response, statusMessage) + * Triggered when headers are sent by the remote server + * @param statusCode [Integer] the HTTP response code + * @param headers [map] the response headers + * @param (see AWS.Request~send) + * @param statusMessage [String] A status message corresponding to the HTTP + * response code + * @context (see AWS.Request~send) + * + * @!event httpData(chunk, response) + * Triggered when data is sent by the remote server + * @param chunk [Buffer] the buffer data containing the next data chunk + * from the server + * @param (see AWS.Request~send) + * @context (see AWS.Request~send) + * @see AWS.EventListeners.Core.HTTP_DATA + * + * @!event httpUploadProgress(progress, response) + * Triggered when the HTTP request has uploaded more data + * @param progress [map] An object containing the `loaded` and `total` bytes + * of the request. + * @param (see AWS.Request~send) + * @context (see AWS.Request~send) + * @note This event will not be emitted in Node.js 0.8.x. + * + * @!event httpDownloadProgress(progress, response) + * Triggered when the HTTP request has downloaded more data + * @param progress [map] An object containing the `loaded` and `total` bytes + * of the request. + * @param (see AWS.Request~send) + * @context (see AWS.Request~send) + * @note This event will not be emitted in Node.js 0.8.x. + * + * @!event httpError(error, response) + * Triggered when the HTTP request failed + * @param error [Error] the error object that was thrown + * @param (see AWS.Request~send) + * @context (see AWS.Request~send) + * + * @!event httpDone(response) + * Triggered when the server is finished sending data + * @param (see AWS.Request~send) + * @context (see AWS.Request~send) + * + * @see AWS.Response + */ +AWS.Request = inherit({ + + /** + * Creates a request for an operation on a given service with + * a set of input parameters. + * + * @param service [AWS.Service] the service to perform the operation on + * @param operation [String] the operation to perform on the service + * @param params [Object] parameters to send to the operation. + * See the operation's documentation for the format of the + * parameters. + */ + constructor: function Request(service, operation, params) { + var endpoint = service.endpoint; + var region = service.config.region; + var customUserAgent = service.config.customUserAgent; + + if (service.isGlobalEndpoint) { + if (service.signingRegion) { + region = service.signingRegion; + } else { + region = 'us-east-1'; + } + } + + this.domain = domain && domain.active; + this.service = service; + this.operation = operation; + this.params = params || {}; + this.httpRequest = new AWS.HttpRequest(endpoint, region); + this.httpRequest.appendToUserAgent(customUserAgent); + this.startTime = service.getSkewCorrectedDate(); + + this.response = new AWS.Response(this); + this._asm = new AcceptorStateMachine(fsm.states, 'validate'); + this._haltHandlersOnError = false; + + AWS.SequentialExecutor.call(this); + this.emit = this.emitEvent; + }, + + /** + * @!group Sending a Request + */ + + /** + * @overload send(callback = null) + * Sends the request object. + * + * @callback callback function(err, data) + * If a callback is supplied, it is called when a response is returned + * from the service. + * @context [AWS.Request] the request object being sent. + * @param err [Error] the error object returned from the request. + * Set to `null` if the request is successful. + * @param data [Object] the de-serialized data returned from + * the request. Set to `null` if a request error occurs. + * @example Sending a request with a callback + * request = s3.putObject({Bucket: 'bucket', Key: 'key'}); + * request.send(function(err, data) { console.log(err, data); }); + * @example Sending a request with no callback (using event handlers) + * request = s3.putObject({Bucket: 'bucket', Key: 'key'}); + * request.on('complete', function(response) { ... }); // register a callback + * request.send(); + */ + send: function send(callback) { + if (callback) { + // append to user agent + this.httpRequest.appendToUserAgent('callback'); + this.on('complete', function (resp) { + callback.call(resp, resp.error, resp.data); + }); + } + this.runTo(); + + return this.response; + }, + + /** + * @!method promise() + * Sends the request and returns a 'thenable' promise. + * + * Two callbacks can be provided to the `then` method on the returned promise. + * The first callback will be called if the promise is fulfilled, and the second + * callback will be called if the promise is rejected. + * @callback fulfilledCallback function(data) + * Called if the promise is fulfilled. + * @param data [Object] the de-serialized data returned from the request. + * @callback rejectedCallback function(error) + * Called if the promise is rejected. + * @param error [Error] the error object returned from the request. + * @return [Promise] A promise that represents the state of the request. + * @example Sending a request using promises. + * var request = s3.putObject({Bucket: 'bucket', Key: 'key'}); + * var result = request.promise(); + * result.then(function(data) { ... }, function(error) { ... }); + */ + + /** + * @api private + */ + build: function build(callback) { + return this.runTo('send', callback); + }, + + /** + * @api private + */ + runTo: function runTo(state, done) { + this._asm.runTo(state, done, this); + return this; + }, + + /** + * Aborts a request, emitting the error and complete events. + * + * @!macro nobrowser + * @example Aborting a request after sending + * var params = { + * Bucket: 'bucket', Key: 'key', + * Body: Buffer.alloc(1024 * 1024 * 5) // 5MB payload + * }; + * var request = s3.putObject(params); + * request.send(function (err, data) { + * if (err) console.log("Error:", err.code, err.message); + * else console.log(data); + * }); + * + * // abort request in 1 second + * setTimeout(request.abort.bind(request), 1000); + * + * // prints "Error: RequestAbortedError Request aborted by user" + * @return [AWS.Request] the same request object, for chaining. + * @since v1.4.0 + */ + abort: function abort() { + this.removeAllListeners('validateResponse'); + this.removeAllListeners('extractError'); + this.on('validateResponse', function addAbortedError(resp) { + resp.error = AWS.util.error(new Error('Request aborted by user'), { + code: 'RequestAbortedError', retryable: false + }); + }); - return parsed; - } + if (this.httpRequest.stream && !this.httpRequest.stream.didCallback) { // abort HTTP stream + this.httpRequest.stream.abort(); + if (this.httpRequest._abortCallback) { + this.httpRequest._abortCallback(); + } else { + this.removeAllListeners('send'); // haven't sent yet, so let's not + } + } + + return this; + }, + + /** + * Iterates over each page of results given a pageable request, calling + * the provided callback with each page of data. After all pages have been + * retrieved, the callback is called with `null` data. + * + * @note This operation can generate multiple requests to a service. + * @example Iterating over multiple pages of objects in an S3 bucket + * var pages = 1; + * s3.listObjects().eachPage(function(err, data) { + * if (err) return; + * console.log("Page", pages++); + * console.log(data); + * }); + * @example Iterating over multiple pages with an asynchronous callback + * s3.listObjects(params).eachPage(function(err, data, done) { + * doSomethingAsyncAndOrExpensive(function() { + * // The next page of results isn't fetched until done is called + * done(); + * }); + * }); + * @callback callback function(err, data, [doneCallback]) + * Called with each page of resulting data from the request. If the + * optional `doneCallback` is provided in the function, it must be called + * when the callback is complete. + * + * @param err [Error] an error object, if an error occurred. + * @param data [Object] a single page of response data. If there is no + * more data, this object will be `null`. + * @param doneCallback [Function] an optional done callback. If this + * argument is defined in the function declaration, it should be called + * when the next page is ready to be retrieved. This is useful for + * controlling serial pagination across asynchronous operations. + * @return [Boolean] if the callback returns `false`, pagination will + * stop. + * + * @see AWS.Request.eachItem + * @see AWS.Response.nextPage + * @since v1.4.0 + */ + eachPage: function eachPage(callback) { + // Make all callbacks async-ish + callback = AWS.util.fn.makeAsync(callback, 3); + + function wrappedCallback(response) { + callback.call(response, response.error, response.data, function (result) { + if (result === false) return; + + if (response.hasNextPage()) { + response.nextPage().on('complete', wrappedCallback).send(); + } else { + callback.call(response, null, null, AWS.util.fn.noop); + } + }); + } + + this.on('complete', wrappedCallback).send(); + }, + + /** + * Enumerates over individual items of a request, paging the responses if + * necessary. + * + * @api experimental + * @since v1.4.0 + */ + eachItem: function eachItem(callback) { + var self = this; + function wrappedCallback(err, data) { + if (err) return callback(err, null); + if (data === null) return callback(null, null); + + var config = self.service.paginationConfig(self.operation); + var resultKey = config.resultKey; + if (Array.isArray(resultKey)) resultKey = resultKey[0]; + var items = jmespath.search(data, resultKey); + var continueIteration = true; + AWS.util.arrayEach(items, function(item) { + continueIteration = callback(null, item); + if (continueIteration === false) { + return AWS.util.abort; + } + }); + return continueIteration; + } + + this.eachPage(wrappedCallback); + }, + + /** + * @return [Boolean] whether the operation can return multiple pages of + * response data. + * @see AWS.Response.eachPage + * @since v1.4.0 + */ + isPageable: function isPageable() { + return this.service.paginationConfig(this.operation) ? true : false; + }, + + /** + * Sends the request and converts the request object into a readable stream + * that can be read from or piped into a writable stream. + * + * @note The data read from a readable stream contains only + * the raw HTTP body contents. + * @example Manually reading from a stream + * request.createReadStream().on('data', function(data) { + * console.log("Got data:", data.toString()); + * }); + * @example Piping a request body into a file + * var out = fs.createWriteStream('/path/to/outfile.jpg'); + * s3.service.getObject(params).createReadStream().pipe(out); + * @return [Stream] the readable stream object that can be piped + * or read from (by registering 'data' event listeners). + * @!macro nobrowser + */ + createReadStream: function createReadStream() { + var streams = AWS.util.stream; + var req = this; + var stream = null; + + if (AWS.HttpClient.streamsApiVersion === 2) { + stream = new streams.PassThrough(); + process.nextTick(function() { req.send(); }); + } else { + stream = new streams.Stream(); + stream.readable = true; + + stream.sent = false; + stream.on('newListener', function(event) { + if (!stream.sent && event === 'data') { + stream.sent = true; + process.nextTick(function() { req.send(); }); + } + }); + } + + this.on('error', function(err) { + stream.emit('error', err); + }); + + this.on('httpHeaders', function streamHeaders(statusCode, headers, resp) { + if (statusCode < 300) { + req.removeListener('httpData', AWS.EventListeners.Core.HTTP_DATA); + req.removeListener('httpError', AWS.EventListeners.Core.HTTP_ERROR); + req.on('httpError', function streamHttpError(error) { + resp.error = error; + resp.error.retryable = false; + }); - function parseShell(parsed) { - // If node supports the shell option, there's no need to mimic its behavior - if (supportsShellOption) { - return parsed; + var shouldCheckContentLength = false; + var expectedLen; + if (req.httpRequest.method !== 'HEAD') { + expectedLen = parseInt(headers['content-length'], 10); } + if (expectedLen !== undefined && !isNaN(expectedLen) && expectedLen >= 0) { + shouldCheckContentLength = true; + var receivedLen = 0; + } + + var checkContentLengthAndEmit = function checkContentLengthAndEmit() { + if (shouldCheckContentLength && receivedLen !== expectedLen) { + stream.emit('error', AWS.util.error( + new Error('Stream content length mismatch. Received ' + + receivedLen + ' of ' + expectedLen + ' bytes.'), + { code: 'StreamContentLengthMismatch' } + )); + } else if (AWS.HttpClient.streamsApiVersion === 2) { + stream.end(); + } else { + stream.emit('end'); + } + }; - // Mimic node shell option - // See https://github.com/nodejs/node/blob/b9f6a2dc059a1062776133f3d4fd848c4da7d150/lib/child_process.js#L335 - const shellCommand = [parsed.command].concat(parsed.args).join(" "); + var httpStream = resp.httpResponse.createUnbufferedStream(); - if (isWin) { - parsed.command = - typeof parsed.options.shell === "string" - ? parsed.options.shell - : process.env.comspec || "cmd.exe"; - parsed.args = ["/d", "/s", "/c", `"${shellCommand}"`]; - parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped - } else { - if (typeof parsed.options.shell === "string") { - parsed.command = parsed.options.shell; - } else if (process.platform === "android") { - parsed.command = "/system/bin/sh"; + if (AWS.HttpClient.streamsApiVersion === 2) { + if (shouldCheckContentLength) { + var lengthAccumulator = new streams.PassThrough(); + lengthAccumulator._write = function(chunk) { + if (chunk && chunk.length) { + receivedLen += chunk.length; + } + return streams.PassThrough.prototype._write.apply(this, arguments); + }; + + lengthAccumulator.on('end', checkContentLengthAndEmit); + stream.on('error', function(err) { + shouldCheckContentLength = false; + httpStream.unpipe(lengthAccumulator); + lengthAccumulator.emit('end'); + lengthAccumulator.end(); + }); + httpStream.pipe(lengthAccumulator).pipe(stream, { end: false }); } else { - parsed.command = "/bin/sh"; + httpStream.pipe(stream); + } + } else { + + if (shouldCheckContentLength) { + httpStream.on('data', function(arg) { + if (arg && arg.length) { + receivedLen += arg.length; + } + }); } - parsed.args = ["-c", shellCommand]; + httpStream.on('data', function(arg) { + stream.emit('data', arg); + }); + httpStream.on('end', checkContentLengthAndEmit); } - return parsed; + httpStream.on('error', function(err) { + shouldCheckContentLength = false; + stream.emit('error', err); + }); } - - function parse(command, args, options) { - // Normalize arguments, similar to nodejs - if (args && !Array.isArray(args)) { - options = args; - args = null; + }); + + return stream; + }, + + /** + * @param [Array,Response] args This should be the response object, + * or an array of args to send to the event. + * @api private + */ + emitEvent: function emit(eventName, args, done) { + if (typeof args === 'function') { done = args; args = null; } + if (!done) done = function() { }; + if (!args) args = this.eventParameters(eventName, this.response); + + var origEmit = AWS.SequentialExecutor.prototype.emit; + origEmit.call(this, eventName, args, function (err) { + if (err) this.response.error = err; + done.call(this, err); + }); + }, + + /** + * @api private + */ + eventParameters: function eventParameters(eventName) { + switch (eventName) { + case 'restart': + case 'validate': + case 'sign': + case 'build': + case 'afterValidate': + case 'afterBuild': + return [this]; + case 'error': + return [this.response.error, this.response]; + default: + return [this.response]; + } + }, + + /** + * @api private + */ + presign: function presign(expires, callback) { + if (!callback && typeof expires === 'function') { + callback = expires; + expires = null; + } + return new AWS.Signers.Presign().sign(this.toGet(), expires, callback); + }, + + /** + * @api private + */ + isPresigned: function isPresigned() { + return Object.prototype.hasOwnProperty.call(this.httpRequest.headers, 'presigned-expires'); + }, + + /** + * @api private + */ + toUnauthenticated: function toUnauthenticated() { + this._unAuthenticated = true; + this.removeListener('validate', AWS.EventListeners.Core.VALIDATE_CREDENTIALS); + this.removeListener('sign', AWS.EventListeners.Core.SIGN); + return this; + }, + + /** + * @api private + */ + toGet: function toGet() { + if (this.service.api.protocol === 'query' || + this.service.api.protocol === 'ec2') { + this.removeListener('build', this.buildAsGet); + this.addListener('build', this.buildAsGet); + } + return this; + }, + + /** + * @api private + */ + buildAsGet: function buildAsGet(request) { + request.httpRequest.method = 'GET'; + request.httpRequest.path = request.service.endpoint.path + + '?' + request.httpRequest.body; + request.httpRequest.body = ''; + + // don't need these headers on a GET request + delete request.httpRequest.headers['Content-Length']; + delete request.httpRequest.headers['Content-Type']; + }, + + /** + * @api private + */ + haltHandlersOnError: function haltHandlersOnError() { + this._haltHandlersOnError = true; + } +}); + +/** + * @api private + */ +AWS.Request.addPromisesToClass = function addPromisesToClass(PromiseDependency) { + this.prototype.promise = function promise() { + var self = this; + // append to user agent + this.httpRequest.appendToUserAgent('promise'); + return new PromiseDependency(function(resolve, reject) { + self.on('complete', function(resp) { + if (resp.error) { + reject(resp.error); + } else { + // define $response property so that it is not enumerable + // this prevents circular reference errors when stringifying the JSON object + resolve(Object.defineProperty( + resp.data || {}, + '$response', + {value: resp} + )); } + }); + self.runTo(); + }); + }; +}; - args = args ? args.slice(0) : []; // Clone array to avoid changing the original - options = Object.assign({}, options); // Clone object to avoid changing the original +/** + * @api private + */ +AWS.Request.deletePromisesFromClass = function deletePromisesFromClass() { + delete this.prototype.promise; +}; - // Build our parsed object - const parsed = { - command, - args, - options, - file: undefined, - original: { - command, - args, - }, - }; +AWS.util.addPromises(AWS.Request); + +AWS.util.mixin(AWS.Request, AWS.SequentialExecutor); + + +/***/ }), + +/***/ 7246: +/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { + +/** + * Copyright 2012-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). You + * may not use this file except in compliance with the License. A copy of + * the License is located at + * + * http://aws.amazon.com/apache2.0/ + * + * or in the "license" file accompanying this file. This file is + * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF + * ANY KIND, either express or implied. See the License for the specific + * language governing permissions and limitations under the License. + */ + +var AWS = __nccwpck_require__(28437); +var inherit = AWS.util.inherit; +var jmespath = __nccwpck_require__(87783); - // Delegate further parsing to shell or non-shell - return options.shell ? parseShell(parsed) : parseNonShell(parsed); +/** + * @api private + */ +function CHECK_ACCEPTORS(resp) { + var waiter = resp.request._waiter; + var acceptors = waiter.config.acceptors; + var acceptorMatched = false; + var state = 'retry'; + + acceptors.forEach(function(acceptor) { + if (!acceptorMatched) { + var matcher = waiter.matchers[acceptor.matcher]; + if (matcher && matcher(resp, acceptor.expected, acceptor.argument)) { + acceptorMatched = true; + state = acceptor.state; + } + } + }); + + if (!acceptorMatched && resp.error) state = 'failure'; + + if (state === 'success') { + waiter.setSuccess(resp); + } else { + waiter.setError(resp, state === 'retry'); + } +} + +/** + * @api private + */ +AWS.ResourceWaiter = inherit({ + /** + * Waits for a given state on a service object + * @param service [Service] the service object to wait on + * @param state [String] the state (defined in waiter configuration) to wait + * for. + * @example Create a waiter for running EC2 instances + * var ec2 = new AWS.EC2; + * var waiter = new AWS.ResourceWaiter(ec2, 'instanceRunning'); + */ + constructor: function constructor(service, state) { + this.service = service; + this.state = state; + this.loadWaiterConfig(this.state); + }, + + service: null, + + state: null, + + config: null, + + matchers: { + path: function(resp, expected, argument) { + try { + var result = jmespath.search(resp.data, argument); + } catch (err) { + return false; } - module.exports = parse; - - /***/ + return jmespath.strictDeepEqual(result,expected); }, - /***/ 34274: /***/ (module) => { - "use strict"; - - // See http://www.robvanderwoude.com/escapechars.php - const metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g; - - function escapeCommand(arg) { - // Escape meta chars - arg = arg.replace(metaCharsRegExp, "^$1"); + pathAll: function(resp, expected, argument) { + try { + var results = jmespath.search(resp.data, argument); + } catch (err) { + return false; + } - return arg; + if (!Array.isArray(results)) results = [results]; + var numResults = results.length; + if (!numResults) return false; + for (var ind = 0 ; ind < numResults; ind++) { + if (!jmespath.strictDeepEqual(results[ind], expected)) { + return false; + } } + return true; + }, - function escapeArgument(arg, doubleEscapeMetaChars) { - // Convert to string - arg = `${arg}`; + pathAny: function(resp, expected, argument) { + try { + var results = jmespath.search(resp.data, argument); + } catch (err) { + return false; + } - // Algorithm below is based on https://qntm.org/cmd + if (!Array.isArray(results)) results = [results]; + var numResults = results.length; + for (var ind = 0 ; ind < numResults; ind++) { + if (jmespath.strictDeepEqual(results[ind], expected)) { + return true; + } + } + return false; + }, + + status: function(resp, expected) { + var statusCode = resp.httpResponse.statusCode; + return (typeof statusCode === 'number') && (statusCode === expected); + }, + + error: function(resp, expected) { + if (typeof expected === 'string' && resp.error) { + return expected === resp.error.code; + } + // if expected is not string, can be boolean indicating presence of error + return expected === !!resp.error; + } + }, + + listeners: new AWS.SequentialExecutor().addNamedListeners(function(add) { + add('RETRY_CHECK', 'retry', function(resp) { + var waiter = resp.request._waiter; + if (resp.error && resp.error.code === 'ResourceNotReady') { + resp.error.retryDelay = (waiter.config.delay || 0) * 1000; + } + }); + + add('CHECK_OUTPUT', 'extractData', CHECK_ACCEPTORS); + + add('CHECK_ERROR', 'extractError', CHECK_ACCEPTORS); + }), + + /** + * @return [AWS.Request] + */ + wait: function wait(params, callback) { + if (typeof params === 'function') { + callback = params; params = undefined; + } + + if (params && params.$waiter) { + params = AWS.util.copy(params); + if (typeof params.$waiter.delay === 'number') { + this.config.delay = params.$waiter.delay; + } + if (typeof params.$waiter.maxAttempts === 'number') { + this.config.maxAttempts = params.$waiter.maxAttempts; + } + delete params.$waiter; + } + + var request = this.service.makeRequest(this.config.operation, params); + request._waiter = this; + request.response.maxRetries = this.config.maxAttempts; + request.addListeners(this.listeners); + + if (callback) request.send(callback); + return request; + }, + + setSuccess: function setSuccess(resp) { + resp.error = null; + resp.data = resp.data || {}; + resp.request.removeAllListeners('extractData'); + }, + + setError: function setError(resp, retryable) { + resp.data = null; + resp.error = AWS.util.error(resp.error || new Error(), { + code: 'ResourceNotReady', + message: 'Resource is not in the state ' + this.state, + retryable: retryable + }); + }, + + /** + * Loads waiter configuration from API configuration + * + * @api private + */ + loadWaiterConfig: function loadWaiterConfig(state) { + if (!this.service.api.waiters[state]) { + throw new AWS.util.error(new Error(), { + code: 'StateNotFoundError', + message: 'State ' + state + ' not found.' + }); + } + + this.config = AWS.util.copy(this.service.api.waiters[state]); + } +}); + + +/***/ }), + +/***/ 58743: +/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { + +var AWS = __nccwpck_require__(28437); +var inherit = AWS.util.inherit; +var jmespath = __nccwpck_require__(87783); + +/** + * This class encapsulates the response information + * from a service request operation sent through {AWS.Request}. + * The response object has two main properties for getting information + * back from a request: + * + * ## The `data` property + * + * The `response.data` property contains the serialized object data + * retrieved from the service request. For instance, for an + * Amazon DynamoDB `listTables` method call, the response data might + * look like: + * + * ``` + * > resp.data + * { TableNames: + * [ 'table1', 'table2', ... ] } + * ``` + * + * The `data` property can be null if an error occurs (see below). + * + * ## The `error` property + * + * In the event of a service error (or transfer error), the + * `response.error` property will be filled with the given + * error data in the form: + * + * ``` + * { code: 'SHORT_UNIQUE_ERROR_CODE', + * message: 'Some human readable error message' } + * ``` + * + * In the case of an error, the `data` property will be `null`. + * Note that if you handle events that can be in a failure state, + * you should always check whether `response.error` is set + * before attempting to access the `response.data` property. + * + * @!attribute data + * @readonly + * @!group Data Properties + * @note Inside of a {AWS.Request~httpData} event, this + * property contains a single raw packet instead of the + * full de-serialized service response. + * @return [Object] the de-serialized response data + * from the service. + * + * @!attribute error + * An structure containing information about a service + * or networking error. + * @readonly + * @!group Data Properties + * @note This attribute is only filled if a service or + * networking error occurs. + * @return [Error] + * * code [String] a unique short code representing the + * error that was emitted. + * * message [String] a longer human readable error message + * * retryable [Boolean] whether the error message is + * retryable. + * * statusCode [Numeric] in the case of a request that reached the service, + * this value contains the response status code. + * * time [Date] the date time object when the error occurred. + * * hostname [String] set when a networking error occurs to easily + * identify the endpoint of the request. + * * region [String] set when a networking error occurs to easily + * identify the region of the request. + * + * @!attribute requestId + * @readonly + * @!group Data Properties + * @return [String] the unique request ID associated with the response. + * Log this value when debugging requests for AWS support. + * + * @!attribute retryCount + * @readonly + * @!group Operation Properties + * @return [Integer] the number of retries that were + * attempted before the request was completed. + * + * @!attribute redirectCount + * @readonly + * @!group Operation Properties + * @return [Integer] the number of redirects that were + * followed before the request was completed. + * + * @!attribute httpResponse + * @readonly + * @!group HTTP Properties + * @return [AWS.HttpResponse] the raw HTTP response object + * containing the response headers and body information + * from the server. + * + * @see AWS.Request + */ +AWS.Response = inherit({ + + /** + * @api private + */ + constructor: function Response(request) { + this.request = request; + this.data = null; + this.error = null; + this.retryCount = 0; + this.redirectCount = 0; + this.httpResponse = new AWS.HttpResponse(); + if (request) { + this.maxRetries = request.service.numRetries(); + this.maxRedirects = request.service.config.maxRedirects; + } + }, + + /** + * Creates a new request for the next page of response data, calling the + * callback with the page data if a callback is provided. + * + * @callback callback function(err, data) + * Called when a page of data is returned from the next request. + * + * @param err [Error] an error object, if an error occurred in the request + * @param data [Object] the next page of data, or null, if there are no + * more pages left. + * @return [AWS.Request] the request object for the next page of data + * @return [null] if no callback is provided and there are no pages left + * to retrieve. + * @since v1.4.0 + */ + nextPage: function nextPage(callback) { + var config; + var service = this.request.service; + var operation = this.request.operation; + try { + config = service.paginationConfig(operation, true); + } catch (e) { this.error = e; } + + if (!this.hasNextPage()) { + if (callback) callback(this.error, null); + else if (this.error) throw this.error; + return null; + } + + var params = AWS.util.copy(this.request.params); + if (!this.nextPageTokens) { + return callback ? callback(null, null) : null; + } else { + var inputTokens = config.inputToken; + if (typeof inputTokens === 'string') inputTokens = [inputTokens]; + for (var i = 0; i < inputTokens.length; i++) { + params[inputTokens[i]] = this.nextPageTokens[i]; + } + return service.makeRequest(this.request.operation, params, callback); + } + }, + + /** + * @return [Boolean] whether more pages of data can be returned by further + * requests + * @since v1.4.0 + */ + hasNextPage: function hasNextPage() { + this.cacheNextPageTokens(); + if (this.nextPageTokens) return true; + if (this.nextPageTokens === undefined) return undefined; + else return false; + }, + + /** + * @api private + */ + cacheNextPageTokens: function cacheNextPageTokens() { + if (Object.prototype.hasOwnProperty.call(this, 'nextPageTokens')) return this.nextPageTokens; + this.nextPageTokens = undefined; + + var config = this.request.service.paginationConfig(this.request.operation); + if (!config) return this.nextPageTokens; + + this.nextPageTokens = null; + if (config.moreResults) { + if (!jmespath.search(this.data, config.moreResults)) { + return this.nextPageTokens; + } + } + + var exprs = config.outputToken; + if (typeof exprs === 'string') exprs = [exprs]; + AWS.util.arrayEach.call(this, exprs, function (expr) { + var output = jmespath.search(this.data, expr); + if (output) { + this.nextPageTokens = this.nextPageTokens || []; + this.nextPageTokens.push(output); + } + }); + + return this.nextPageTokens; + } + +}); + + +/***/ }), + +/***/ 81600: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var AWS = __nccwpck_require__(28437); +var byteLength = AWS.util.string.byteLength; +var Buffer = AWS.util.Buffer; + +/** + * The managed uploader allows for easy and efficient uploading of buffers, + * blobs, or streams, using a configurable amount of concurrency to perform + * multipart uploads where possible. This abstraction also enables uploading + * streams of unknown size due to the use of multipart uploads. + * + * To construct a managed upload object, see the {constructor} function. + * + * ## Tracking upload progress + * + * The managed upload object can also track progress by attaching an + * 'httpUploadProgress' listener to the upload manager. This event is similar + * to {AWS.Request~httpUploadProgress} but groups all concurrent upload progress + * into a single event. See {AWS.S3.ManagedUpload~httpUploadProgress} for more + * information. + * + * ## Handling Multipart Cleanup + * + * By default, this class will automatically clean up any multipart uploads + * when an individual part upload fails. This behavior can be disabled in order + * to manually handle failures by setting the `leavePartsOnError` configuration + * option to `true` when initializing the upload object. + * + * @!event httpUploadProgress(progress) + * Triggered when the uploader has uploaded more data. + * @note The `total` property may not be set if the stream being uploaded has + * not yet finished chunking. In this case the `total` will be undefined + * until the total stream size is known. + * @note This event will not be emitted in Node.js 0.8.x. + * @param progress [map] An object containing the `loaded` and `total` bytes + * of the request and the `key` of the S3 object. Note that `total` may be undefined until the payload + * size is known. + * @context (see AWS.Request~send) + */ +AWS.S3.ManagedUpload = AWS.util.inherit({ + /** + * Creates a managed upload object with a set of configuration options. + * + * @note A "Body" parameter is required to be set prior to calling {send}. + * @note In Node.js, sending "Body" as {https://nodejs.org/dist/latest/docs/api/stream.html#stream_object_mode object-mode stream} + * may result in upload hangs. Using buffer stream is preferable. + * @option options params [map] a map of parameters to pass to the upload + * requests. The "Body" parameter is required to be specified either on + * the service or in the params option. + * @note ContentMD5 should not be provided when using the managed upload object. + * Instead, setting "computeChecksums" to true will enable automatic ContentMD5 generation + * by the managed upload object. + * @option options queueSize [Number] (4) the size of the concurrent queue + * manager to upload parts in parallel. Set to 1 for synchronous uploading + * of parts. Note that the uploader will buffer at most queueSize * partSize + * bytes into memory at any given time. + * @option options partSize [Number] (5mb) the size in bytes for each + * individual part to be uploaded. Adjust the part size to ensure the number + * of parts does not exceed {maxTotalParts}. See {minPartSize} for the + * minimum allowed part size. + * @option options leavePartsOnError [Boolean] (false) whether to abort the + * multipart upload if an error occurs. Set to true if you want to handle + * failures manually. + * @option options service [AWS.S3] an optional S3 service object to use for + * requests. This object might have bound parameters used by the uploader. + * @option options tags [Array] The tags to apply to the uploaded object. + * Each tag should have a `Key` and `Value` keys. + * @example Creating a default uploader for a stream object + * var upload = new AWS.S3.ManagedUpload({ + * params: {Bucket: 'bucket', Key: 'key', Body: stream} + * }); + * @example Creating an uploader with concurrency of 1 and partSize of 10mb + * var upload = new AWS.S3.ManagedUpload({ + * partSize: 10 * 1024 * 1024, queueSize: 1, + * params: {Bucket: 'bucket', Key: 'key', Body: stream} + * }); + * @example Creating an uploader with tags + * var upload = new AWS.S3.ManagedUpload({ + * params: {Bucket: 'bucket', Key: 'key', Body: stream}, + * tags: [{Key: 'tag1', Value: 'value1'}, {Key: 'tag2', Value: 'value2'}] + * }); + * @see send + */ + constructor: function ManagedUpload(options) { + var self = this; + AWS.SequentialExecutor.call(self); + self.body = null; + self.sliceFn = null; + self.callback = null; + self.parts = {}; + self.completeInfo = []; + self.fillQueue = function() { + self.callback(new Error('Unsupported body payload ' + typeof self.body)); + }; + + self.configure(options); + }, + + /** + * @api private + */ + configure: function configure(options) { + options = options || {}; + this.partSize = this.minPartSize; + + if (options.queueSize) this.queueSize = options.queueSize; + if (options.partSize) this.partSize = options.partSize; + if (options.leavePartsOnError) this.leavePartsOnError = true; + if (options.tags) { + if (!Array.isArray(options.tags)) { + throw new Error('Tags must be specified as an array; ' + + typeof options.tags + ' provided.'); + } + this.tags = options.tags; + } + + if (this.partSize < this.minPartSize) { + throw new Error('partSize must be greater than ' + + this.minPartSize); + } + + this.service = options.service; + this.bindServiceObject(options.params); + this.validateBody(); + this.adjustTotalBytes(); + }, + + /** + * @api private + */ + leavePartsOnError: false, + + /** + * @api private + */ + queueSize: 4, + + /** + * @api private + */ + partSize: null, + + /** + * @readonly + * @return [Number] the minimum number of bytes for an individual part + * upload. + */ + minPartSize: 1024 * 1024 * 5, + + /** + * @readonly + * @return [Number] the maximum allowed number of parts in a multipart upload. + */ + maxTotalParts: 10000, + + /** + * Initiates the managed upload for the payload. + * + * @callback callback function(err, data) + * @param err [Error] an error or null if no error occurred. + * @param data [map] The response data from the successful upload: + * * `Location` (String) the URL of the uploaded object + * * `ETag` (String) the ETag of the uploaded object + * * `Bucket` (String) the bucket to which the object was uploaded + * * `Key` (String) the key to which the object was uploaded + * @example Sending a managed upload object + * var params = {Bucket: 'bucket', Key: 'key', Body: stream}; + * var upload = new AWS.S3.ManagedUpload({params: params}); + * upload.send(function(err, data) { + * console.log(err, data); + * }); + */ + send: function(callback) { + var self = this; + self.failed = false; + self.callback = callback || function(err) { if (err) throw err; }; + + var runFill = true; + if (self.sliceFn) { + self.fillQueue = self.fillBuffer; + } else if (AWS.util.isNode()) { + var Stream = AWS.util.stream.Stream; + if (self.body instanceof Stream) { + runFill = false; + self.fillQueue = self.fillStream; + self.partBuffers = []; + self.body. + on('error', function(err) { self.cleanup(err); }). + on('readable', function() { self.fillQueue(); }). + on('end', function() { + self.isDoneChunking = true; + self.numParts = self.totalPartNumbers; + self.fillQueue.call(self); - // Sequence of backslashes followed by a double quote: - // double up all the backslashes and escape the double quote - arg = arg.replace(/(\\*)"/g, '$1$1\\"'); + if (self.isDoneChunking && self.totalPartNumbers >= 1 && self.doneParts === self.numParts) { + self.finishMultiPart(); + } + }); + } + } + + if (runFill) self.fillQueue.call(self); + }, + + /** + * @!method promise() + * Returns a 'thenable' promise. + * + * Two callbacks can be provided to the `then` method on the returned promise. + * The first callback will be called if the promise is fulfilled, and the second + * callback will be called if the promise is rejected. + * @callback fulfilledCallback function(data) + * Called if the promise is fulfilled. + * @param data [map] The response data from the successful upload: + * `Location` (String) the URL of the uploaded object + * `ETag` (String) the ETag of the uploaded object + * `Bucket` (String) the bucket to which the object was uploaded + * `Key` (String) the key to which the object was uploaded + * @callback rejectedCallback function(err) + * Called if the promise is rejected. + * @param err [Error] an error or null if no error occurred. + * @return [Promise] A promise that represents the state of the upload request. + * @example Sending an upload request using promises. + * var upload = s3.upload({Bucket: 'bucket', Key: 'key', Body: stream}); + * var promise = upload.promise(); + * promise.then(function(data) { ... }, function(err) { ... }); + */ + + /** + * Aborts a managed upload, including all concurrent upload requests. + * @note By default, calling this function will cleanup a multipart upload + * if one was created. To leave the multipart upload around after aborting + * a request, configure `leavePartsOnError` to `true` in the {constructor}. + * @note Calling {abort} in the browser environment will not abort any requests + * that are already in flight. If a multipart upload was created, any parts + * not yet uploaded will not be sent, and the multipart upload will be cleaned up. + * @example Aborting an upload + * var params = { + * Bucket: 'bucket', Key: 'key', + * Body: Buffer.alloc(1024 * 1024 * 25) // 25MB payload + * }; + * var upload = s3.upload(params); + * upload.send(function (err, data) { + * if (err) console.log("Error:", err.code, err.message); + * else console.log(data); + * }); + * + * // abort request in 1 second + * setTimeout(upload.abort.bind(upload), 1000); + */ + abort: function() { + var self = this; + //abort putObject request + if (self.isDoneChunking === true && self.totalPartNumbers === 1 && self.singlePart) { + self.singlePart.abort(); + } else { + self.cleanup(AWS.util.error(new Error('Request aborted by user'), { + code: 'RequestAbortedError', retryable: false + })); + } + }, + + /** + * @api private + */ + validateBody: function validateBody() { + var self = this; + self.body = self.service.config.params.Body; + if (typeof self.body === 'string') { + self.body = AWS.util.buffer.toBuffer(self.body); + } else if (!self.body) { + throw new Error('params.Body is required'); + } + self.sliceFn = AWS.util.arraySliceFn(self.body); + }, + + /** + * @api private + */ + bindServiceObject: function bindServiceObject(params) { + params = params || {}; + var self = this; + // bind parameters to new service object + if (!self.service) { + self.service = new AWS.S3({params: params}); + } else { + var service = self.service; + var config = AWS.util.copy(service._originalConfig || {}); + config.signatureVersion = service.getSignatureVersion(); + self.service = new service.constructor.__super__(config); + self.service.config.params = + AWS.util.merge(self.service.config.params || {}, params); + } + }, + + /** + * @api private + */ + adjustTotalBytes: function adjustTotalBytes() { + var self = this; + try { // try to get totalBytes + self.totalBytes = byteLength(self.body); + } catch (e) { } + + // try to adjust partSize if we know payload length + if (self.totalBytes) { + var newPartSize = Math.ceil(self.totalBytes / self.maxTotalParts); + if (newPartSize > self.partSize) self.partSize = newPartSize; + } else { + self.totalBytes = undefined; + } + }, + + /** + * @api private + */ + isDoneChunking: false, + + /** + * @api private + */ + partPos: 0, + + /** + * @api private + */ + totalChunkedBytes: 0, + + /** + * @api private + */ + totalUploadedBytes: 0, + + /** + * @api private + */ + totalBytes: undefined, + + /** + * @api private + */ + numParts: 0, + + /** + * @api private + */ + totalPartNumbers: 0, + + /** + * @api private + */ + activeParts: 0, + + /** + * @api private + */ + doneParts: 0, + + /** + * @api private + */ + parts: null, + + /** + * @api private + */ + completeInfo: null, + + /** + * @api private + */ + failed: false, + + /** + * @api private + */ + multipartReq: null, + + /** + * @api private + */ + partBuffers: null, + + /** + * @api private + */ + partBufferLength: 0, + + /** + * @api private + */ + fillBuffer: function fillBuffer() { + var self = this; + var bodyLen = byteLength(self.body); + + if (bodyLen === 0) { + self.isDoneChunking = true; + self.numParts = 1; + self.nextChunk(self.body); + return; + } + + while (self.activeParts < self.queueSize && self.partPos < bodyLen) { + var endPos = Math.min(self.partPos + self.partSize, bodyLen); + var buf = self.sliceFn.call(self.body, self.partPos, endPos); + self.partPos += self.partSize; + + if (byteLength(buf) < self.partSize || self.partPos === bodyLen) { + self.isDoneChunking = true; + self.numParts = self.totalPartNumbers + 1; + } + self.nextChunk(buf); + } + }, + + /** + * @api private + */ + fillStream: function fillStream() { + var self = this; + if (self.activeParts >= self.queueSize) return; + + var buf = self.body.read(self.partSize - self.partBufferLength) || + self.body.read(); + if (buf) { + self.partBuffers.push(buf); + self.partBufferLength += buf.length; + self.totalChunkedBytes += buf.length; + } + + if (self.partBufferLength >= self.partSize) { + // if we have single buffer we avoid copyfull concat + var pbuf = self.partBuffers.length === 1 ? + self.partBuffers[0] : Buffer.concat(self.partBuffers); + self.partBuffers = []; + self.partBufferLength = 0; + + // if we have more than partSize, push the rest back on the queue + if (pbuf.length > self.partSize) { + var rest = pbuf.slice(self.partSize); + self.partBuffers.push(rest); + self.partBufferLength += rest.length; + pbuf = pbuf.slice(0, self.partSize); + } + + self.nextChunk(pbuf); + } + + if (self.isDoneChunking && !self.isDoneSending) { + // if we have single buffer we avoid copyfull concat + pbuf = self.partBuffers.length === 1 ? + self.partBuffers[0] : Buffer.concat(self.partBuffers); + self.partBuffers = []; + self.partBufferLength = 0; + self.totalBytes = self.totalChunkedBytes; + self.isDoneSending = true; + + if (self.numParts === 0 || pbuf.length > 0) { + self.numParts++; + self.nextChunk(pbuf); + } + } + + self.body.read(0); + }, + + /** + * @api private + */ + nextChunk: function nextChunk(chunk) { + var self = this; + if (self.failed) return null; + + var partNumber = ++self.totalPartNumbers; + if (self.isDoneChunking && partNumber === 1) { + var params = {Body: chunk}; + if (this.tags) { + params.Tagging = this.getTaggingHeader(); + } + var req = self.service.putObject(params); + req._managedUpload = self; + req.on('httpUploadProgress', self.progress).send(self.finishSinglePart); + self.singlePart = req; //save the single part request + return null; + } else if (self.service.config.params.ContentMD5) { + var err = AWS.util.error(new Error('The Content-MD5 you specified is invalid for multi-part uploads.'), { + code: 'InvalidDigest', retryable: false + }); - // Sequence of backslashes followed by the end of the string - // (which will become a double quote later): - // double up all the backslashes - arg = arg.replace(/(\\*)$/, "$1$1"); + self.cleanup(err); + return null; + } - // All other backslashes occur literally + if (self.completeInfo[partNumber] && self.completeInfo[partNumber].ETag !== null) { + return null; // Already uploaded this part. + } - // Quote the whole thing: - arg = `"${arg}"`; + self.activeParts++; + if (!self.service.config.params.UploadId) { - // Escape meta chars - arg = arg.replace(metaCharsRegExp, "^$1"); + if (!self.multipartReq) { // create multipart + self.multipartReq = self.service.createMultipartUpload(); + self.multipartReq.on('success', function(resp) { + self.service.config.params.UploadId = resp.data.UploadId; + self.multipartReq = null; + }); + self.queueChunks(chunk, partNumber); + self.multipartReq.on('error', function(err) { + self.cleanup(err); + }); + self.multipartReq.send(); + } else { + self.queueChunks(chunk, partNumber); + } + } else { // multipart is created, just send + self.uploadPart(chunk, partNumber); + } + }, + + /** + * @api private + */ + getTaggingHeader: function getTaggingHeader() { + var kvPairStrings = []; + for (var i = 0; i < this.tags.length; i++) { + kvPairStrings.push(AWS.util.uriEscape(this.tags[i].Key) + '=' + + AWS.util.uriEscape(this.tags[i].Value)); + } + + return kvPairStrings.join('&'); + }, + + /** + * @api private + */ + uploadPart: function uploadPart(chunk, partNumber) { + var self = this; + + var partParams = { + Body: chunk, + ContentLength: AWS.util.string.byteLength(chunk), + PartNumber: partNumber + }; + + var partInfo = {ETag: null, PartNumber: partNumber}; + self.completeInfo[partNumber] = partInfo; + + var req = self.service.uploadPart(partParams); + self.parts[partNumber] = req; + req._lastUploadedBytes = 0; + req._managedUpload = self; + req.on('httpUploadProgress', self.progress); + req.send(function(err, data) { + delete self.parts[partParams.PartNumber]; + self.activeParts--; + + if (!err && (!data || !data.ETag)) { + var message = 'No access to ETag property on response.'; + if (AWS.util.isBrowser()) { + message += ' Check CORS configuration to expose ETag header.'; + } + + err = AWS.util.error(new Error(message), { + code: 'ETagMissing', retryable: false + }); + } + if (err) return self.cleanup(err); + //prevent sending part being returned twice (https://github.com/aws/aws-sdk-js/issues/2304) + if (self.completeInfo[partNumber] && self.completeInfo[partNumber].ETag !== null) return null; + partInfo.ETag = data.ETag; + self.doneParts++; + if (self.isDoneChunking && self.doneParts === self.numParts) { + self.finishMultiPart(); + } else { + self.fillQueue.call(self); + } + }); + }, + + /** + * @api private + */ + queueChunks: function queueChunks(chunk, partNumber) { + var self = this; + self.multipartReq.on('success', function() { + self.uploadPart(chunk, partNumber); + }); + }, + + /** + * @api private + */ + cleanup: function cleanup(err) { + var self = this; + if (self.failed) return; + + // clean up stream + if (typeof self.body.removeAllListeners === 'function' && + typeof self.body.resume === 'function') { + self.body.removeAllListeners('readable'); + self.body.removeAllListeners('end'); + self.body.resume(); + } + + // cleanup multipartReq listeners + if (self.multipartReq) { + self.multipartReq.removeAllListeners('success'); + self.multipartReq.removeAllListeners('error'); + self.multipartReq.removeAllListeners('complete'); + delete self.multipartReq; + } + + if (self.service.config.params.UploadId && !self.leavePartsOnError) { + self.service.abortMultipartUpload().send(); + } else if (self.leavePartsOnError) { + self.isDoneChunking = false; + } + + AWS.util.each(self.parts, function(partNumber, part) { + part.removeAllListeners('complete'); + part.abort(); + }); + + self.activeParts = 0; + self.partPos = 0; + self.numParts = 0; + self.totalPartNumbers = 0; + self.parts = {}; + self.failed = true; + self.callback(err); + }, + + /** + * @api private + */ + finishMultiPart: function finishMultiPart() { + var self = this; + var completeParams = { MultipartUpload: { Parts: self.completeInfo.slice(1) } }; + self.service.completeMultipartUpload(completeParams, function(err, data) { + if (err) { + return self.cleanup(err); + } + + if (data && typeof data.Location === 'string') { + data.Location = data.Location.replace(/%2F/g, '/'); + } + + if (Array.isArray(self.tags)) { + for (var i = 0; i < self.tags.length; i++) { + self.tags[i].Value = String(self.tags[i].Value); + } + self.service.putObjectTagging( + {Tagging: {TagSet: self.tags}}, + function(e, d) { + if (e) { + self.callback(e); + } else { + self.callback(e, data); + } + } + ); + } else { + self.callback(err, data); + } + }); + }, + + /** + * @api private + */ + finishSinglePart: function finishSinglePart(err, data) { + var upload = this.request._managedUpload; + var httpReq = this.request.httpRequest; + var endpoint = httpReq.endpoint; + if (err) return upload.callback(err); + data.Location = + [endpoint.protocol, '//', endpoint.host, httpReq.path].join(''); + data.key = this.request.params.Key; // will stay undocumented + data.Key = this.request.params.Key; + data.Bucket = this.request.params.Bucket; + upload.callback(err, data); + }, + + /** + * @api private + */ + progress: function progress(info) { + var upload = this._managedUpload; + if (this.operation === 'putObject') { + info.part = 1; + info.key = this.params.Key; + } else { + upload.totalUploadedBytes += info.loaded - this._lastUploadedBytes; + this._lastUploadedBytes = info.loaded; + info = { + loaded: upload.totalUploadedBytes, + total: upload.totalBytes, + part: this.params.PartNumber, + key: this.params.Key + }; + } + upload.emit('httpUploadProgress', [info]); + } +}); - // Double escape meta chars if necessary - if (doubleEscapeMetaChars) { - arg = arg.replace(metaCharsRegExp, "^$1"); - } +AWS.util.mixin(AWS.S3.ManagedUpload, AWS.SequentialExecutor); - return arg; - } +/** + * @api private + */ +AWS.S3.ManagedUpload.addPromisesToClass = function addPromisesToClass(PromiseDependency) { + this.prototype.promise = AWS.util.promisifyMethod('send', PromiseDependency); +}; - module.exports.command = escapeCommand; - module.exports.argument = escapeArgument; +/** + * @api private + */ +AWS.S3.ManagedUpload.deletePromisesFromClass = function deletePromisesFromClass() { + delete this.prototype.promise; +}; - /***/ - }, +AWS.util.addPromises(AWS.S3.ManagedUpload); - /***/ 41252: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - "use strict"; +/** + * @api private + */ +module.exports = AWS.S3.ManagedUpload; - const fs = __nccwpck_require__(57147); - const shebangCommand = __nccwpck_require__(67032); - function readShebang(command) { - // Read the first 150 bytes from the file - const size = 150; - let buffer; +/***/ }), - if (Buffer.alloc) { - // Node.js v4.5+ / v5.10+ - buffer = Buffer.alloc(size); - } else { - // Old Node.js API - buffer = new Buffer(size); - buffer.fill(0); // zero-fill - } +/***/ 55948: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - let fd; +var AWS = __nccwpck_require__(28437); +/** + * @api private + * @!method on(eventName, callback) + * Registers an event listener callback for the event given by `eventName`. + * Parameters passed to the callback function depend on the individual event + * being triggered. See the event documentation for those parameters. + * + * @param eventName [String] the event name to register the listener for + * @param callback [Function] the listener callback function + * @param toHead [Boolean] attach the listener callback to the head of callback array if set to true. + * Default to be false. + * @return [AWS.SequentialExecutor] the same object for chaining + */ +AWS.SequentialExecutor = AWS.util.inherit({ + + constructor: function SequentialExecutor() { + this._events = {}; + }, + + /** + * @api private + */ + listeners: function listeners(eventName) { + return this._events[eventName] ? this._events[eventName].slice(0) : []; + }, + + on: function on(eventName, listener, toHead) { + if (this._events[eventName]) { + toHead ? + this._events[eventName].unshift(listener) : + this._events[eventName].push(listener); + } else { + this._events[eventName] = [listener]; + } + return this; + }, + + onAsync: function onAsync(eventName, listener, toHead) { + listener._isAsync = true; + return this.on(eventName, listener, toHead); + }, + + removeListener: function removeListener(eventName, listener) { + var listeners = this._events[eventName]; + if (listeners) { + var length = listeners.length; + var position = -1; + for (var i = 0; i < length; ++i) { + if (listeners[i] === listener) { + position = i; + } + } + if (position > -1) { + listeners.splice(position, 1); + } + } + return this; + }, + + removeAllListeners: function removeAllListeners(eventName) { + if (eventName) { + delete this._events[eventName]; + } else { + this._events = {}; + } + return this; + }, + + /** + * @api private + */ + emit: function emit(eventName, eventArgs, doneCallback) { + if (!doneCallback) doneCallback = function() { }; + var listeners = this.listeners(eventName); + var count = listeners.length; + this.callListeners(listeners, eventArgs, doneCallback); + return count > 0; + }, + + /** + * @api private + */ + callListeners: function callListeners(listeners, args, doneCallback, prevError) { + var self = this; + var error = prevError || null; + + function callNextListener(err) { + if (err) { + error = AWS.util.error(error || new Error(), err); + if (self._haltHandlersOnError) { + return doneCallback.call(self, error); + } + } + self.callListeners(listeners, args, doneCallback, error); + } + + while (listeners.length > 0) { + var listener = listeners.shift(); + if (listener._isAsync) { // asynchronous listener + listener.apply(self, args.concat([callNextListener])); + return; // stop here, callNextListener will continue + } else { // synchronous listener try { - fd = fs.openSync(command, "r"); - fs.readSync(fd, buffer, 0, size, 0); - fs.closeSync(fd); - } catch (e) { - /* Empty */ + listener.apply(self, args); + } catch (err) { + error = AWS.util.error(error || new Error(), err); + } + if (error && self._haltHandlersOnError) { + doneCallback.call(self, error); + return; } - - // Attempt to extract shebang (null is returned if not a shebang) - return shebangCommand(buffer.toString()); } + } + doneCallback.call(self, error); + }, + + /** + * Adds or copies a set of listeners from another list of + * listeners or SequentialExecutor object. + * + * @param listeners [map>, AWS.SequentialExecutor] + * a list of events and callbacks, or an event emitter object + * containing listeners to add to this emitter object. + * @return [AWS.SequentialExecutor] the emitter object, for chaining. + * @example Adding listeners from a map of listeners + * emitter.addListeners({ + * event1: [function() { ... }, function() { ... }], + * event2: [function() { ... }] + * }); + * emitter.emit('event1'); // emitter has event1 + * emitter.emit('event2'); // emitter has event2 + * @example Adding listeners from another emitter object + * var emitter1 = new AWS.SequentialExecutor(); + * emitter1.on('event1', function() { ... }); + * emitter1.on('event2', function() { ... }); + * var emitter2 = new AWS.SequentialExecutor(); + * emitter2.addListeners(emitter1); + * emitter2.emit('event1'); // emitter2 has event1 + * emitter2.emit('event2'); // emitter2 has event2 + */ + addListeners: function addListeners(listeners) { + var self = this; + + // extract listeners if parameter is an SequentialExecutor object + if (listeners._events) listeners = listeners._events; + + AWS.util.each(listeners, function(event, callbacks) { + if (typeof callbacks === 'function') callbacks = [callbacks]; + AWS.util.arrayEach(callbacks, function(callback) { + self.on(event, callback); + }); + }); + + return self; + }, + + /** + * Registers an event with {on} and saves the callback handle function + * as a property on the emitter object using a given `name`. + * + * @param name [String] the property name to set on this object containing + * the callback function handle so that the listener can be removed in + * the future. + * @param (see on) + * @return (see on) + * @example Adding a named listener DATA_CALLBACK + * var listener = function() { doSomething(); }; + * emitter.addNamedListener('DATA_CALLBACK', 'data', listener); + * + * // the following prints: true + * console.log(emitter.DATA_CALLBACK == listener); + */ + addNamedListener: function addNamedListener(name, eventName, callback, toHead) { + this[name] = callback; + this.addListener(eventName, callback, toHead); + return this; + }, + + /** + * @api private + */ + addNamedAsyncListener: function addNamedAsyncListener(name, eventName, callback, toHead) { + callback._isAsync = true; + return this.addNamedListener(name, eventName, callback, toHead); + }, + + /** + * Helper method to add a set of named listeners using + * {addNamedListener}. The callback contains a parameter + * with a handle to the `addNamedListener` method. + * + * @callback callback function(add) + * The callback function is called immediately in order to provide + * the `add` function to the block. This simplifies the addition of + * a large group of named listeners. + * @param add [Function] the {addNamedListener} function to call + * when registering listeners. + * @example Adding a set of named listeners + * emitter.addNamedListeners(function(add) { + * add('DATA_CALLBACK', 'data', function() { ... }); + * add('OTHER', 'otherEvent', function() { ... }); + * add('LAST', 'lastEvent', function() { ... }); + * }); + * + * // these properties are now set: + * emitter.DATA_CALLBACK; + * emitter.OTHER; + * emitter.LAST; + */ + addNamedListeners: function addNamedListeners(callback) { + var self = this; + callback( + function() { + self.addNamedListener.apply(self, arguments); + }, + function() { + self.addNamedAsyncListener.apply(self, arguments); + } + ); + return this; + } +}); + +/** + * {on} is the prefered method. + * @api private + */ +AWS.SequentialExecutor.prototype.addListener = AWS.SequentialExecutor.prototype.on; - module.exports = readShebang; +/** + * @api private + */ +module.exports = AWS.SequentialExecutor; - /***/ - }, - /***/ 87274: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - "use strict"; +/***/ }), - const path = __nccwpck_require__(71017); - const which = __nccwpck_require__(34207); - const pathKey = __nccwpck_require__(20539)(); +/***/ 68903: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - function resolveCommandAttempt(parsed, withoutPathExt) { - const cwd = process.cwd(); - const hasCustomCwd = parsed.options.cwd != null; +var AWS = __nccwpck_require__(28437); +var Api = __nccwpck_require__(17657); +var regionConfig = __nccwpck_require__(18262); - // If a custom `cwd` was specified, we need to change the process cwd - // because `which` will do stat calls but does not support a custom cwd - if (hasCustomCwd) { - try { - process.chdir(parsed.options.cwd); - } catch (err) { - /* Empty */ - } - } +var inherit = AWS.util.inherit; +var clientCount = 0; - let resolved; +/** + * The service class representing an AWS service. + * + * @class_abstract This class is an abstract class. + * + * @!attribute apiVersions + * @return [Array] the list of API versions supported by this service. + * @readonly + */ +AWS.Service = inherit({ + /** + * Create a new service object with a configuration object + * + * @param config [map] a map of configuration options + */ + constructor: function Service(config) { + if (!this.loadServiceClass) { + throw AWS.util.error(new Error(), + 'Service must be constructed with `new\' operator'); + } + var ServiceClass = this.loadServiceClass(config || {}); + if (ServiceClass) { + var originalConfig = AWS.util.copy(config); + var svc = new ServiceClass(config); + Object.defineProperty(svc, '_originalConfig', { + get: function() { return originalConfig; }, + enumerable: false, + configurable: true + }); + svc._clientId = ++clientCount; + return svc; + } + this.initialize(config); + }, + + /** + * @api private + */ + initialize: function initialize(config) { + var svcConfig = AWS.config[this.serviceIdentifier]; + this.config = new AWS.Config(AWS.config); + if (svcConfig) this.config.update(svcConfig, true); + if (config) this.config.update(config, true); + + this.validateService(); + if (!this.config.endpoint) regionConfig.configureEndpoint(this); + + this.config.endpoint = this.endpointFromTemplate(this.config.endpoint); + this.setEndpoint(this.config.endpoint); + //enable attaching listeners to service client + AWS.SequentialExecutor.call(this); + AWS.Service.addDefaultMonitoringListeners(this); + if ((this.config.clientSideMonitoring || AWS.Service._clientSideMonitoring) && this.publisher) { + var publisher = this.publisher; + this.addNamedListener('PUBLISH_API_CALL', 'apiCall', function PUBLISH_API_CALL(event) { + process.nextTick(function() {publisher.eventHandler(event);}); + }); + this.addNamedListener('PUBLISH_API_ATTEMPT', 'apiCallAttempt', function PUBLISH_API_ATTEMPT(event) { + process.nextTick(function() {publisher.eventHandler(event);}); + }); + } + }, + + /** + * @api private + */ + validateService: function validateService() { + }, + + /** + * @api private + */ + loadServiceClass: function loadServiceClass(serviceConfig) { + var config = serviceConfig; + if (!AWS.util.isEmpty(this.api)) { + return null; + } else if (config.apiConfig) { + return AWS.Service.defineServiceApi(this.constructor, config.apiConfig); + } else if (!this.constructor.services) { + return null; + } else { + config = new AWS.Config(AWS.config); + config.update(serviceConfig, true); + var version = config.apiVersions[this.constructor.serviceIdentifier]; + version = version || config.apiVersion; + return this.getLatestServiceClass(version); + } + }, + + /** + * @api private + */ + getLatestServiceClass: function getLatestServiceClass(version) { + version = this.getLatestServiceVersion(version); + if (this.constructor.services[version] === null) { + AWS.Service.defineServiceApi(this.constructor, version); + } + + return this.constructor.services[version]; + }, + + /** + * @api private + */ + getLatestServiceVersion: function getLatestServiceVersion(version) { + if (!this.constructor.services || this.constructor.services.length === 0) { + throw new Error('No services defined on ' + + this.constructor.serviceIdentifier); + } + + if (!version) { + version = 'latest'; + } else if (AWS.util.isType(version, Date)) { + version = AWS.util.date.iso8601(version).split('T')[0]; + } + + if (Object.hasOwnProperty(this.constructor.services, version)) { + return version; + } + + var keys = Object.keys(this.constructor.services).sort(); + var selectedVersion = null; + for (var i = keys.length - 1; i >= 0; i--) { + // versions that end in "*" are not available on disk and can be + // skipped, so do not choose these as selectedVersions + if (keys[i][keys[i].length - 1] !== '*') { + selectedVersion = keys[i]; + } + if (keys[i].substr(0, 10) <= version) { + return selectedVersion; + } + } + + throw new Error('Could not find ' + this.constructor.serviceIdentifier + + ' API to satisfy version constraint `' + version + '\''); + }, + + /** + * @api private + */ + api: {}, + + /** + * @api private + */ + defaultRetryCount: 3, + + /** + * @api private + */ + customizeRequests: function customizeRequests(callback) { + if (!callback) { + this.customRequestHandler = null; + } else if (typeof callback === 'function') { + this.customRequestHandler = callback; + } else { + throw new Error('Invalid callback type \'' + typeof callback + '\' provided in customizeRequests'); + } + }, + + /** + * Calls an operation on a service with the given input parameters. + * + * @param operation [String] the name of the operation to call on the service. + * @param params [map] a map of input options for the operation + * @callback callback function(err, data) + * If a callback is supplied, it is called when a response is returned + * from the service. + * @param err [Error] the error object returned from the request. + * Set to `null` if the request is successful. + * @param data [Object] the de-serialized data returned from + * the request. Set to `null` if a request error occurs. + */ + makeRequest: function makeRequest(operation, params, callback) { + if (typeof params === 'function') { + callback = params; + params = null; + } + + params = params || {}; + if (this.config.params) { // copy only toplevel bound params + var rules = this.api.operations[operation]; + if (rules) { + params = AWS.util.copy(params); + AWS.util.each(this.config.params, function(key, value) { + if (rules.input.members[key]) { + if (params[key] === undefined || params[key] === null) { + params[key] = value; + } + } + }); + } + } + + var request = new AWS.Request(this, operation, params); + this.addAllRequestListeners(request); + this.attachMonitoringEmitter(request); + if (callback) request.send(callback); + return request; + }, + + /** + * Calls an operation on a service with the given input parameters, without + * any authentication data. This method is useful for "public" API operations. + * + * @param operation [String] the name of the operation to call on the service. + * @param params [map] a map of input options for the operation + * @callback callback function(err, data) + * If a callback is supplied, it is called when a response is returned + * from the service. + * @param err [Error] the error object returned from the request. + * Set to `null` if the request is successful. + * @param data [Object] the de-serialized data returned from + * the request. Set to `null` if a request error occurs. + */ + makeUnauthenticatedRequest: function makeUnauthenticatedRequest(operation, params, callback) { + if (typeof params === 'function') { + callback = params; + params = {}; + } + + var request = this.makeRequest(operation, params).toUnauthenticated(); + return callback ? request.send(callback) : request; + }, + + /** + * Waits for a given state + * + * @param state [String] the state on the service to wait for + * @param params [map] a map of parameters to pass with each request + * @option params $waiter [map] a map of configuration options for the waiter + * @option params $waiter.delay [Number] The number of seconds to wait between + * requests + * @option params $waiter.maxAttempts [Number] The maximum number of requests + * to send while waiting + * @callback callback function(err, data) + * If a callback is supplied, it is called when a response is returned + * from the service. + * @param err [Error] the error object returned from the request. + * Set to `null` if the request is successful. + * @param data [Object] the de-serialized data returned from + * the request. Set to `null` if a request error occurs. + */ + waitFor: function waitFor(state, params, callback) { + var waiter = new AWS.ResourceWaiter(this, state); + return waiter.wait(params, callback); + }, + + /** + * @api private + */ + addAllRequestListeners: function addAllRequestListeners(request) { + var list = [AWS.events, AWS.EventListeners.Core, this.serviceInterface(), + AWS.EventListeners.CorePost]; + for (var i = 0; i < list.length; i++) { + if (list[i]) request.addListeners(list[i]); + } + + // disable parameter validation + if (!this.config.paramValidation) { + request.removeListener('validate', + AWS.EventListeners.Core.VALIDATE_PARAMETERS); + } + + if (this.config.logger) { // add logging events + request.addListeners(AWS.EventListeners.Logger); + } + + this.setupRequestListeners(request); + // call prototype's customRequestHandler + if (typeof this.constructor.prototype.customRequestHandler === 'function') { + this.constructor.prototype.customRequestHandler(request); + } + // call instance's customRequestHandler + if (Object.prototype.hasOwnProperty.call(this, 'customRequestHandler') && typeof this.customRequestHandler === 'function') { + this.customRequestHandler(request); + } + }, + + /** + * Event recording metrics for a whole API call. + * @returns {object} a subset of api call metrics + * @api private + */ + apiCallEvent: function apiCallEvent(request) { + var api = request.service.api.operations[request.operation]; + var monitoringEvent = { + Type: 'ApiCall', + Api: api ? api.name : request.operation, + Version: 1, + Service: request.service.api.serviceId || request.service.api.endpointPrefix, + Region: request.httpRequest.region, + MaxRetriesExceeded: 0, + UserAgent: request.httpRequest.getUserAgent(), + }; + var response = request.response; + if (response.httpResponse.statusCode) { + monitoringEvent.FinalHttpStatusCode = response.httpResponse.statusCode; + } + if (response.error) { + var error = response.error; + var statusCode = response.httpResponse.statusCode; + if (statusCode > 299) { + if (error.code) monitoringEvent.FinalAwsException = error.code; + if (error.message) monitoringEvent.FinalAwsExceptionMessage = error.message; + } else { + if (error.code || error.name) monitoringEvent.FinalSdkException = error.code || error.name; + if (error.message) monitoringEvent.FinalSdkExceptionMessage = error.message; + } + } + return monitoringEvent; + }, + + /** + * Event recording metrics for an API call attempt. + * @returns {object} a subset of api call attempt metrics + * @api private + */ + apiAttemptEvent: function apiAttemptEvent(request) { + var api = request.service.api.operations[request.operation]; + var monitoringEvent = { + Type: 'ApiCallAttempt', + Api: api ? api.name : request.operation, + Version: 1, + Service: request.service.api.serviceId || request.service.api.endpointPrefix, + Fqdn: request.httpRequest.endpoint.hostname, + UserAgent: request.httpRequest.getUserAgent(), + }; + var response = request.response; + if (response.httpResponse.statusCode) { + monitoringEvent.HttpStatusCode = response.httpResponse.statusCode; + } + if ( + !request._unAuthenticated && + request.service.config.credentials && + request.service.config.credentials.accessKeyId + ) { + monitoringEvent.AccessKey = request.service.config.credentials.accessKeyId; + } + if (!response.httpResponse.headers) return monitoringEvent; + if (request.httpRequest.headers['x-amz-security-token']) { + monitoringEvent.SessionToken = request.httpRequest.headers['x-amz-security-token']; + } + if (response.httpResponse.headers['x-amzn-requestid']) { + monitoringEvent.XAmznRequestId = response.httpResponse.headers['x-amzn-requestid']; + } + if (response.httpResponse.headers['x-amz-request-id']) { + monitoringEvent.XAmzRequestId = response.httpResponse.headers['x-amz-request-id']; + } + if (response.httpResponse.headers['x-amz-id-2']) { + monitoringEvent.XAmzId2 = response.httpResponse.headers['x-amz-id-2']; + } + return monitoringEvent; + }, + + /** + * Add metrics of failed request. + * @api private + */ + attemptFailEvent: function attemptFailEvent(request) { + var monitoringEvent = this.apiAttemptEvent(request); + var response = request.response; + var error = response.error; + if (response.httpResponse.statusCode > 299 ) { + if (error.code) monitoringEvent.AwsException = error.code; + if (error.message) monitoringEvent.AwsExceptionMessage = error.message; + } else { + if (error.code || error.name) monitoringEvent.SdkException = error.code || error.name; + if (error.message) monitoringEvent.SdkExceptionMessage = error.message; + } + return monitoringEvent; + }, + + /** + * Attach listeners to request object to fetch metrics of each request + * and emit data object through \'ApiCall\' and \'ApiCallAttempt\' events. + * @api private + */ + attachMonitoringEmitter: function attachMonitoringEmitter(request) { + var attemptTimestamp; //timestamp marking the beginning of a request attempt + var attemptStartRealTime; //Start time of request attempt. Used to calculating attemptLatency + var attemptLatency; //latency from request sent out to http response reaching SDK + var callStartRealTime; //Start time of API call. Used to calculating API call latency + var attemptCount = 0; //request.retryCount is not reliable here + var region; //region cache region for each attempt since it can be updated in plase (e.g. s3) + var callTimestamp; //timestamp when the request is created + var self = this; + var addToHead = true; + + request.on('validate', function () { + callStartRealTime = AWS.util.realClock.now(); + callTimestamp = Date.now(); + }, addToHead); + request.on('sign', function () { + attemptStartRealTime = AWS.util.realClock.now(); + attemptTimestamp = Date.now(); + region = request.httpRequest.region; + attemptCount++; + }, addToHead); + request.on('validateResponse', function() { + attemptLatency = Math.round(AWS.util.realClock.now() - attemptStartRealTime); + }); + request.addNamedListener('API_CALL_ATTEMPT', 'success', function API_CALL_ATTEMPT() { + var apiAttemptEvent = self.apiAttemptEvent(request); + apiAttemptEvent.Timestamp = attemptTimestamp; + apiAttemptEvent.AttemptLatency = attemptLatency >= 0 ? attemptLatency : 0; + apiAttemptEvent.Region = region; + self.emit('apiCallAttempt', [apiAttemptEvent]); + }); + request.addNamedListener('API_CALL_ATTEMPT_RETRY', 'retry', function API_CALL_ATTEMPT_RETRY() { + var apiAttemptEvent = self.attemptFailEvent(request); + apiAttemptEvent.Timestamp = attemptTimestamp; + //attemptLatency may not be available if fail before response + attemptLatency = attemptLatency || + Math.round(AWS.util.realClock.now() - attemptStartRealTime); + apiAttemptEvent.AttemptLatency = attemptLatency >= 0 ? attemptLatency : 0; + apiAttemptEvent.Region = region; + self.emit('apiCallAttempt', [apiAttemptEvent]); + }); + request.addNamedListener('API_CALL', 'complete', function API_CALL() { + var apiCallEvent = self.apiCallEvent(request); + apiCallEvent.AttemptCount = attemptCount; + if (apiCallEvent.AttemptCount <= 0) return; + apiCallEvent.Timestamp = callTimestamp; + var latency = Math.round(AWS.util.realClock.now() - callStartRealTime); + apiCallEvent.Latency = latency >= 0 ? latency : 0; + var response = request.response; + if ( + response.error && + response.error.retryable && + typeof response.retryCount === 'number' && + typeof response.maxRetries === 'number' && + (response.retryCount >= response.maxRetries) + ) { + apiCallEvent.MaxRetriesExceeded = 1; + } + self.emit('apiCall', [apiCallEvent]); + }); + }, + + /** + * Override this method to setup any custom request listeners for each + * new request to the service. + * + * @method_abstract This is an abstract method. + */ + setupRequestListeners: function setupRequestListeners(request) { + }, + + /** + * Gets the signing name for a given request + * @api private + */ + getSigningName: function getSigningName() { + return this.api.signingName || this.api.endpointPrefix; + }, + + /** + * Gets the signer class for a given request + * @api private + */ + getSignerClass: function getSignerClass(request) { + var version; + // get operation authtype if present + var operation = null; + var authtype = ''; + if (request) { + var operations = request.service.api.operations || {}; + operation = operations[request.operation] || null; + authtype = operation ? operation.authtype : ''; + } + if (this.config.signatureVersion) { + version = this.config.signatureVersion; + } else if (authtype === 'v4' || authtype === 'v4-unsigned-body') { + version = 'v4'; + } else { + version = this.api.signatureVersion; + } + return AWS.Signers.RequestSigner.getVersion(version); + }, + + /** + * @api private + */ + serviceInterface: function serviceInterface() { + switch (this.api.protocol) { + case 'ec2': return AWS.EventListeners.Query; + case 'query': return AWS.EventListeners.Query; + case 'json': return AWS.EventListeners.Json; + case 'rest-json': return AWS.EventListeners.RestJson; + case 'rest-xml': return AWS.EventListeners.RestXml; + } + if (this.api.protocol) { + throw new Error('Invalid service `protocol\' ' + + this.api.protocol + ' in API config'); + } + }, + + /** + * @api private + */ + successfulResponse: function successfulResponse(resp) { + return resp.httpResponse.statusCode < 300; + }, + + /** + * How many times a failed request should be retried before giving up. + * the defaultRetryCount can be overriden by service classes. + * + * @api private + */ + numRetries: function numRetries() { + if (this.config.maxRetries !== undefined) { + return this.config.maxRetries; + } else { + return this.defaultRetryCount; + } + }, + + /** + * @api private + */ + retryDelays: function retryDelays(retryCount, err) { + return AWS.util.calculateRetryDelay(retryCount, this.config.retryDelayOptions, err); + }, + + /** + * @api private + */ + retryableError: function retryableError(error) { + if (this.timeoutError(error)) return true; + if (this.networkingError(error)) return true; + if (this.expiredCredentialsError(error)) return true; + if (this.throttledError(error)) return true; + if (error.statusCode >= 500) return true; + return false; + }, + + /** + * @api private + */ + networkingError: function networkingError(error) { + return error.code === 'NetworkingError'; + }, + + /** + * @api private + */ + timeoutError: function timeoutError(error) { + return error.code === 'TimeoutError'; + }, + + /** + * @api private + */ + expiredCredentialsError: function expiredCredentialsError(error) { + // TODO : this only handles *one* of the expired credential codes + return (error.code === 'ExpiredTokenException'); + }, + + /** + * @api private + */ + clockSkewError: function clockSkewError(error) { + switch (error.code) { + case 'RequestTimeTooSkewed': + case 'RequestExpired': + case 'InvalidSignatureException': + case 'SignatureDoesNotMatch': + case 'AuthFailure': + case 'RequestInTheFuture': + return true; + default: return false; + } + }, + + /** + * @api private + */ + getSkewCorrectedDate: function getSkewCorrectedDate() { + return new Date(Date.now() + this.config.systemClockOffset); + }, + + /** + * @api private + */ + applyClockOffset: function applyClockOffset(newServerTime) { + if (newServerTime) { + this.config.systemClockOffset = newServerTime - Date.now(); + } + }, + + /** + * @api private + */ + isClockSkewed: function isClockSkewed(newServerTime) { + if (newServerTime) { + return Math.abs(this.getSkewCorrectedDate().getTime() - newServerTime) >= 300000; + } + }, + + /** + * @api private + */ + throttledError: function throttledError(error) { + // this logic varies between services + if (error.statusCode === 429) return true; + switch (error.code) { + case 'ProvisionedThroughputExceededException': + case 'Throttling': + case 'ThrottlingException': + case 'RequestLimitExceeded': + case 'RequestThrottled': + case 'RequestThrottledException': + case 'TooManyRequestsException': + case 'TransactionInProgressException': //dynamodb + case 'EC2ThrottledException': + return true; + default: + return false; + } + }, + + /** + * @api private + */ + endpointFromTemplate: function endpointFromTemplate(endpoint) { + if (typeof endpoint !== 'string') return endpoint; + + var e = endpoint; + e = e.replace(/\{service\}/g, this.api.endpointPrefix); + e = e.replace(/\{region\}/g, this.config.region); + e = e.replace(/\{scheme\}/g, this.config.sslEnabled ? 'https' : 'http'); + return e; + }, + + /** + * @api private + */ + setEndpoint: function setEndpoint(endpoint) { + this.endpoint = new AWS.Endpoint(endpoint, this.config); + }, + + /** + * @api private + */ + paginationConfig: function paginationConfig(operation, throwException) { + var paginator = this.api.operations[operation].paginator; + if (!paginator) { + if (throwException) { + var e = new Error(); + throw AWS.util.error(e, 'No pagination configuration for ' + operation); + } + return null; + } + + return paginator; + } +}); + +AWS.util.update(AWS.Service, { + + /** + * Adds one method for each operation described in the api configuration + * + * @api private + */ + defineMethods: function defineMethods(svc) { + AWS.util.each(svc.prototype.api.operations, function iterator(method) { + if (svc.prototype[method]) return; + var operation = svc.prototype.api.operations[method]; + if (operation.authtype === 'none') { + svc.prototype[method] = function (params, callback) { + return this.makeUnauthenticatedRequest(method, params, callback); + }; + } else { + svc.prototype[method] = function (params, callback) { + return this.makeRequest(method, params, callback); + }; + } + }); + }, + + /** + * Defines a new Service class using a service identifier and list of versions + * including an optional set of features (functions) to apply to the class + * prototype. + * + * @param serviceIdentifier [String] the identifier for the service + * @param versions [Array] a list of versions that work with this + * service + * @param features [Object] an object to attach to the prototype + * @return [Class] the service class defined by this function. + */ + defineService: function defineService(serviceIdentifier, versions, features) { + AWS.Service._serviceMap[serviceIdentifier] = true; + if (!Array.isArray(versions)) { + features = versions; + versions = []; + } + + var svc = inherit(AWS.Service, features || {}); + + if (typeof serviceIdentifier === 'string') { + AWS.Service.addVersions(svc, versions); + + var identifier = svc.serviceIdentifier || serviceIdentifier; + svc.serviceIdentifier = identifier; + } else { // defineService called with an API + svc.prototype.api = serviceIdentifier; + AWS.Service.defineMethods(svc); + } + AWS.SequentialExecutor.call(this.prototype); + //util.clientSideMonitoring is only available in node + if (!this.prototype.publisher && AWS.util.clientSideMonitoring) { + var Publisher = AWS.util.clientSideMonitoring.Publisher; + var configProvider = AWS.util.clientSideMonitoring.configProvider; + var publisherConfig = configProvider(); + this.prototype.publisher = new Publisher(publisherConfig); + if (publisherConfig.enabled) { + //if csm is enabled in environment, SDK should send all metrics + AWS.Service._clientSideMonitoring = true; + } + } + AWS.SequentialExecutor.call(svc.prototype); + AWS.Service.addDefaultMonitoringListeners(svc.prototype); + return svc; + }, + + /** + * @api private + */ + addVersions: function addVersions(svc, versions) { + if (!Array.isArray(versions)) versions = [versions]; + + svc.services = svc.services || {}; + for (var i = 0; i < versions.length; i++) { + if (svc.services[versions[i]] === undefined) { + svc.services[versions[i]] = null; + } + } + + svc.apiVersions = Object.keys(svc.services).sort(); + }, + + /** + * @api private + */ + defineServiceApi: function defineServiceApi(superclass, version, apiConfig) { + var svc = inherit(superclass, { + serviceIdentifier: superclass.serviceIdentifier + }); + + function setApi(api) { + if (api.isApi) { + svc.prototype.api = api; + } else { + svc.prototype.api = new Api(api, { + serviceIdentifier: superclass.serviceIdentifier + }); + } + } + if (typeof version === 'string') { + if (apiConfig) { + setApi(apiConfig); + } else { try { - resolved = which.sync(parsed.command, { - path: (parsed.options.env || process.env)[pathKey], - pathExt: withoutPathExt ? path.delimiter : undefined, + setApi(AWS.apiLoader(superclass.serviceIdentifier, version)); + } catch (err) { + throw AWS.util.error(err, { + message: 'Could not find API configuration ' + + superclass.serviceIdentifier + '-' + version }); - } catch (e) { - /* Empty */ - } finally { - process.chdir(cwd); } + } + if (!Object.prototype.hasOwnProperty.call(superclass.services, version)) { + superclass.apiVersions = superclass.apiVersions.concat(version).sort(); + } + superclass.services[version] = svc; + } else { + setApi(version); + } + + AWS.Service.defineMethods(svc); + return svc; + }, + + /** + * @api private + */ + hasService: function(identifier) { + return Object.prototype.hasOwnProperty.call(AWS.Service._serviceMap, identifier); + }, + + /** + * @param attachOn attach default monitoring listeners to object + * + * Each monitoring event should be emitted from service client to service constructor prototype and then + * to global service prototype like bubbling up. These default monitoring events listener will transfer + * the monitoring events to the upper layer. + * @api private + */ + addDefaultMonitoringListeners: function addDefaultMonitoringListeners(attachOn) { + attachOn.addNamedListener('MONITOR_EVENTS_BUBBLE', 'apiCallAttempt', function EVENTS_BUBBLE(event) { + var baseClass = Object.getPrototypeOf(attachOn); + if (baseClass._events) baseClass.emit('apiCallAttempt', [event]); + }); + attachOn.addNamedListener('CALL_EVENTS_BUBBLE', 'apiCall', function CALL_EVENTS_BUBBLE(event) { + var baseClass = Object.getPrototypeOf(attachOn); + if (baseClass._events) baseClass.emit('apiCall', [event]); + }); + }, + + /** + * @api private + */ + _serviceMap: {} +}); + +AWS.util.mixin(AWS.Service, AWS.SequentialExecutor); + +/** + * @api private + */ +module.exports = AWS.Service; - // If we successfully resolved, ensure that an absolute path is returned - // Note that when a custom `cwd` was used, we need to resolve to an absolute path based on it - if (resolved) { - resolved = path.resolve( - hasCustomCwd ? parsed.options.cwd : "", - resolved - ); - } - return resolved; - } +/***/ }), - function resolveCommand(parsed) { - return ( - resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true) - ); - } +/***/ 4338: +/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { - module.exports = resolveCommand; +var AWS = __nccwpck_require__(28437); - /***/ - }, +AWS.util.update(AWS.APIGateway.prototype, { +/** + * Sets the Accept header to application/json. + * + * @api private + */ + setAcceptHeader: function setAcceptHeader(req) { + var httpRequest = req.httpRequest; + if (!httpRequest.headers.Accept) { + httpRequest.headers['Accept'] = 'application/json'; + } + }, + + /** + * @api private + */ + setupRequestListeners: function setupRequestListeners(request) { + request.addListener('build', this.setAcceptHeader); + if (request.operation === 'getExport') { + var params = request.params || {}; + if (params.exportType === 'swagger') { + request.addListener('extractData', AWS.util.convertPayloadToString); + } + } + } +}); + + + +/***/ }), + +/***/ 95483: +/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { + +var AWS = __nccwpck_require__(28437); + +// pull in CloudFront signer +__nccwpck_require__(93260); + +AWS.util.update(AWS.CloudFront.prototype, { + + setupRequestListeners: function setupRequestListeners(request) { + request.addListener('extractData', AWS.util.hoistPayloadMember); + } + +}); + + +/***/ }), + +/***/ 48571: +/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { + +var AWS = __nccwpck_require__(28437); + +/** + * Constructs a service interface object. Each API operation is exposed as a + * function on service. + * + * ### Sending a Request Using CloudSearchDomain + * + * ```javascript + * var csd = new AWS.CloudSearchDomain({endpoint: 'my.host.tld'}); + * csd.search(params, function (err, data) { + * if (err) console.log(err, err.stack); // an error occurred + * else console.log(data); // successful response + * }); + * ``` + * + * ### Locking the API Version + * + * In order to ensure that the CloudSearchDomain object uses this specific API, + * you can construct the object by passing the `apiVersion` option to the + * constructor: + * + * ```javascript + * var csd = new AWS.CloudSearchDomain({ + * endpoint: 'my.host.tld', + * apiVersion: '2013-01-01' + * }); + * ``` + * + * You can also set the API version globally in `AWS.config.apiVersions` using + * the **cloudsearchdomain** service identifier: + * + * ```javascript + * AWS.config.apiVersions = { + * cloudsearchdomain: '2013-01-01', + * // other service API versions + * }; + * + * var csd = new AWS.CloudSearchDomain({endpoint: 'my.host.tld'}); + * ``` + * + * @note You *must* provide an `endpoint` configuration parameter when + * constructing this service. See {constructor} for more information. + * + * @!method constructor(options = {}) + * Constructs a service object. This object has one method for each + * API operation. + * + * @example Constructing a CloudSearchDomain object + * var csd = new AWS.CloudSearchDomain({endpoint: 'my.host.tld'}); + * @note You *must* provide an `endpoint` when constructing this service. + * @option (see AWS.Config.constructor) + * + * @service cloudsearchdomain + * @version 2013-01-01 + */ +AWS.util.update(AWS.CloudSearchDomain.prototype, { + /** + * @api private + */ + validateService: function validateService() { + if (!this.config.endpoint || this.config.endpoint.indexOf('{') >= 0) { + var msg = 'AWS.CloudSearchDomain requires an explicit ' + + '`endpoint\' configuration option.'; + throw AWS.util.error(new Error(), + {name: 'InvalidEndpoint', message: msg}); + } + }, + + /** + * @api private + */ + setupRequestListeners: function setupRequestListeners(request) { + request.removeListener('validate', + AWS.EventListeners.Core.VALIDATE_CREDENTIALS + ); + request.onAsync('validate', this.validateCredentials); + request.addListener('validate', this.updateRegion); + if (request.operation === 'search') { + request.addListener('build', this.convertGetToPost); + } + }, + + /** + * @api private + */ + validateCredentials: function(req, done) { + if (!req.service.api.signatureVersion) return done(); // none + req.service.config.getCredentials(function(err) { + if (err) { + req.removeListener('sign', AWS.EventListeners.Core.SIGN); + } + done(); + }); + }, + + /** + * @api private + */ + convertGetToPost: function(request) { + var httpRequest = request.httpRequest; + // convert queries to POST to avoid length restrictions + var path = httpRequest.path.split('?'); + httpRequest.method = 'POST'; + httpRequest.path = path[0]; + httpRequest.body = path[1]; + httpRequest.headers['Content-Length'] = httpRequest.body.length; + httpRequest.headers['Content-Type'] = 'application/x-www-form-urlencoded'; + }, + + /** + * @api private + */ + updateRegion: function updateRegion(request) { + var endpoint = request.httpRequest.endpoint.hostname; + var zones = endpoint.split('.'); + request.httpRequest.region = zones[1] || request.httpRequest.region; + } + +}); + + +/***/ }), + +/***/ 17101: +/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { + +var AWS = __nccwpck_require__(28437); +__nccwpck_require__(90030); + +AWS.util.update(AWS.DynamoDB.prototype, { + /** + * @api private + */ + setupRequestListeners: function setupRequestListeners(request) { + if (request.service.config.dynamoDbCrc32) { + request.removeListener('extractData', AWS.EventListeners.Json.EXTRACT_DATA); + request.addListener('extractData', this.checkCrc32); + request.addListener('extractData', AWS.EventListeners.Json.EXTRACT_DATA); + } + }, + + /** + * @api private + */ + checkCrc32: function checkCrc32(resp) { + if (!resp.httpResponse.streaming && !resp.request.service.crc32IsValid(resp)) { + resp.data = null; + resp.error = AWS.util.error(new Error(), { + code: 'CRC32CheckFailed', + message: 'CRC32 integrity check failed', + retryable: true + }); + resp.request.haltHandlersOnError(); + throw (resp.error); + } + }, + + /** + * @api private + */ + crc32IsValid: function crc32IsValid(resp) { + var crc = resp.httpResponse.headers['x-amz-crc32']; + if (!crc) return true; // no (valid) CRC32 header + return parseInt(crc, 10) === AWS.util.crypto.crc32(resp.httpResponse.body); + }, + + /** + * @api private + */ + defaultRetryCount: 10, + + /** + * @api private + */ + retryDelays: function retryDelays(retryCount, err) { + var retryDelayOptions = AWS.util.copy(this.config.retryDelayOptions); + + if (typeof retryDelayOptions.base !== 'number') { + retryDelayOptions.base = 50; // default for dynamodb + } + var delay = AWS.util.calculateRetryDelay(retryCount, retryDelayOptions, err); + return delay; + } +}); + + +/***/ }), + +/***/ 92501: +/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { + +var AWS = __nccwpck_require__(28437); + +AWS.util.update(AWS.EC2.prototype, { + /** + * @api private + */ + setupRequestListeners: function setupRequestListeners(request) { + request.removeListener('extractError', AWS.EventListeners.Query.EXTRACT_ERROR); + request.addListener('extractError', this.extractError); + + if (request.operation === 'copySnapshot') { + request.onAsync('validate', this.buildCopySnapshotPresignedUrl); + } + }, + + /** + * @api private + */ + buildCopySnapshotPresignedUrl: function buildCopySnapshotPresignedUrl(req, done) { + if (req.params.PresignedUrl || req._subRequest) { + return done(); + } + + req.params = AWS.util.copy(req.params); + req.params.DestinationRegion = req.service.config.region; + + var config = AWS.util.copy(req.service.config); + delete config.endpoint; + config.region = req.params.SourceRegion; + var svc = new req.service.constructor(config); + var newReq = svc[req.operation](req.params); + newReq._subRequest = true; + newReq.presign(function(err, url) { + if (err) done(err); + else { + req.params.PresignedUrl = url; + done(); + } + }); + }, + + /** + * @api private + */ + extractError: function extractError(resp) { + // EC2 nests the error code and message deeper than other AWS Query services. + var httpResponse = resp.httpResponse; + var data = new AWS.XML.Parser().parse(httpResponse.body.toString() || ''); + if (data.Errors) { + resp.error = AWS.util.error(new Error(), { + code: data.Errors.Error.Code, + message: data.Errors.Error.Message + }); + } else { + resp.error = AWS.util.error(new Error(), { + code: httpResponse.statusCode, + message: null + }); + } + resp.error.requestId = data.RequestID || null; + } +}); + + +/***/ }), + +/***/ 14472: +/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { + +var AWS = __nccwpck_require__(28437); + +AWS.util.update(AWS.Glacier.prototype, { + /** + * @api private + */ + setupRequestListeners: function setupRequestListeners(request) { + if (Array.isArray(request._events.validate)) { + request._events.validate.unshift(this.validateAccountId); + } else { + request.on('validate', this.validateAccountId); + } + request.removeListener('afterBuild', + AWS.EventListeners.Core.COMPUTE_SHA256); + request.on('build', this.addGlacierApiVersion); + request.on('build', this.addTreeHashHeaders); + }, + + /** + * @api private + */ + validateAccountId: function validateAccountId(request) { + if (request.params.accountId !== undefined) return; + request.params = AWS.util.copy(request.params); + request.params.accountId = '-'; + }, + + /** + * @api private + */ + addGlacierApiVersion: function addGlacierApiVersion(request) { + var version = request.service.api.apiVersion; + request.httpRequest.headers['x-amz-glacier-version'] = version; + }, + + /** + * @api private + */ + addTreeHashHeaders: function addTreeHashHeaders(request) { + if (request.params.body === undefined) return; + + var hashes = request.service.computeChecksums(request.params.body); + request.httpRequest.headers['X-Amz-Content-Sha256'] = hashes.linearHash; + + if (!request.httpRequest.headers['x-amz-sha256-tree-hash']) { + request.httpRequest.headers['x-amz-sha256-tree-hash'] = hashes.treeHash; + } + }, + + /** + * @!group Computing Checksums + */ + + /** + * Computes the SHA-256 linear and tree hash checksums for a given + * block of Buffer data. Pass the tree hash of the computed checksums + * as the checksum input to the {completeMultipartUpload} when performing + * a multi-part upload. + * + * @example Calculate checksum of 5.5MB data chunk + * var glacier = new AWS.Glacier(); + * var data = Buffer.alloc(5.5 * 1024 * 1024); + * data.fill('0'); // fill with zeros + * var results = glacier.computeChecksums(data); + * // Result: { linearHash: '68aff0c5a9...', treeHash: '154e26c78f...' } + * @param data [Buffer, String] data to calculate the checksum for + * @return [map] a map containing + * the linearHash and treeHash properties representing hex based digests + * of the respective checksums. + * @see completeMultipartUpload + */ + computeChecksums: function computeChecksums(data) { + if (!AWS.util.Buffer.isBuffer(data)) data = AWS.util.buffer.toBuffer(data); + + var mb = 1024 * 1024; + var hashes = []; + var hash = AWS.util.crypto.createHash('sha256'); + + // build leaf nodes in 1mb chunks + for (var i = 0; i < data.length; i += mb) { + var chunk = data.slice(i, Math.min(i + mb, data.length)); + hash.update(chunk); + hashes.push(AWS.util.crypto.sha256(chunk)); + } + + return { + linearHash: hash.digest('hex'), + treeHash: this.buildHashTree(hashes) + }; + }, + + /** + * @api private + */ + buildHashTree: function buildHashTree(hashes) { + // merge leaf nodes + while (hashes.length > 1) { + var tmpHashes = []; + for (var i = 0; i < hashes.length; i += 2) { + if (hashes[i + 1]) { + var tmpHash = AWS.util.buffer.alloc(64); + tmpHash.write(hashes[i], 0, 32, 'binary'); + tmpHash.write(hashes[i + 1], 32, 32, 'binary'); + tmpHashes.push(AWS.util.crypto.sha256(tmpHash)); + } else { + tmpHashes.push(hashes[i]); + } + } + hashes = tmpHashes; + } - /***/ 58932: /***/ (__unused_webpack_module, exports) => { - "use strict"; + return AWS.util.crypto.toHex(hashes[0]); + } +}); - Object.defineProperty(exports, "__esModule", { value: true }); - class Deprecation extends Error { - constructor(message) { - super(message); // Maintains proper stack trace (only available on V8) +/***/ }), - /* istanbul ignore next */ +/***/ 27062: +/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { - if (Error.captureStackTrace) { - Error.captureStackTrace(this, this.constructor); - } +var AWS = __nccwpck_require__(28437); - this.name = "Deprecation"; +/** + * @api private + */ +var blobPayloadOutputOps = [ + 'deleteThingShadow', + 'getThingShadow', + 'updateThingShadow' +]; + +/** + * Constructs a service interface object. Each API operation is exposed as a + * function on service. + * + * ### Sending a Request Using IotData + * + * ```javascript + * var iotdata = new AWS.IotData({endpoint: 'my.host.tld'}); + * iotdata.getThingShadow(params, function (err, data) { + * if (err) console.log(err, err.stack); // an error occurred + * else console.log(data); // successful response + * }); + * ``` + * + * ### Locking the API Version + * + * In order to ensure that the IotData object uses this specific API, + * you can construct the object by passing the `apiVersion` option to the + * constructor: + * + * ```javascript + * var iotdata = new AWS.IotData({ + * endpoint: 'my.host.tld', + * apiVersion: '2015-05-28' + * }); + * ``` + * + * You can also set the API version globally in `AWS.config.apiVersions` using + * the **iotdata** service identifier: + * + * ```javascript + * AWS.config.apiVersions = { + * iotdata: '2015-05-28', + * // other service API versions + * }; + * + * var iotdata = new AWS.IotData({endpoint: 'my.host.tld'}); + * ``` + * + * @note You *must* provide an `endpoint` configuration parameter when + * constructing this service. See {constructor} for more information. + * + * @!method constructor(options = {}) + * Constructs a service object. This object has one method for each + * API operation. + * + * @example Constructing a IotData object + * var iotdata = new AWS.IotData({endpoint: 'my.host.tld'}); + * @note You *must* provide an `endpoint` when constructing this service. + * @option (see AWS.Config.constructor) + * + * @service iotdata + * @version 2015-05-28 + */ +AWS.util.update(AWS.IotData.prototype, { + /** + * @api private + */ + validateService: function validateService() { + if (!this.config.endpoint || this.config.endpoint.indexOf('{') >= 0) { + var msg = 'AWS.IotData requires an explicit ' + + '`endpoint\' configuration option.'; + throw AWS.util.error(new Error(), + {name: 'InvalidEndpoint', message: msg}); } - } - - exports.Deprecation = Deprecation; + }, - /***/ + /** + * @api private + */ + setupRequestListeners: function setupRequestListeners(request) { + request.addListener('validateResponse', this.validateResponseBody); + if (blobPayloadOutputOps.indexOf(request.operation) > -1) { + request.addListener('extractData', AWS.util.convertPayloadToString); + } }, - /***/ 81205: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var once = __nccwpck_require__(1223); + /** + * @api private + */ + validateResponseBody: function validateResponseBody(resp) { + var body = resp.httpResponse.body.toString() || '{}'; + var bodyCheck = body.trim(); + if (!bodyCheck || bodyCheck.charAt(0) !== '{') { + resp.httpResponse.body = ''; + } + } - var noop = function () {}; +}); - var isRequest = function (stream) { - return stream.setHeader && typeof stream.abort === "function"; - }; - var isChildProcess = function (stream) { - return ( - stream.stdio && - Array.isArray(stream.stdio) && - stream.stdio.length === 3 - ); - }; +/***/ }), - var eos = function (stream, opts, callback) { - if (typeof opts === "function") return eos(stream, null, opts); - if (!opts) opts = {}; +/***/ 8452: +/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { - callback = once(callback || noop); +var AWS = __nccwpck_require__(28437); - var ws = stream._writableState; - var rs = stream._readableState; - var readable = - opts.readable || (opts.readable !== false && stream.readable); - var writable = - opts.writable || (opts.writable !== false && stream.writable); - var cancelled = false; +AWS.util.update(AWS.Lambda.prototype, { + /** + * @api private + */ + setupRequestListeners: function setupRequestListeners(request) { + if (request.operation === 'invoke') { + request.addListener('extractData', AWS.util.convertPayloadToString); + } + } +}); - var onlegacyfinish = function () { - if (!stream.writable) onfinish(); - }; - var onfinish = function () { - writable = false; - if (!readable) callback.call(stream); - }; - var onend = function () { - readable = false; - if (!writable) callback.call(stream); - }; +/***/ }), - var onexit = function (exitCode) { - callback.call( - stream, - exitCode ? new Error("exited with error code: " + exitCode) : null - ); - }; +/***/ 19174: +/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { - var onerror = function (err) { - callback.call(stream, err); - }; +var AWS = __nccwpck_require__(28437); - var onclose = function () { - process.nextTick(onclosenexttick); - }; +AWS.util.update(AWS.MachineLearning.prototype, { + /** + * @api private + */ + setupRequestListeners: function setupRequestListeners(request) { + if (request.operation === 'predict') { + request.addListener('build', this.buildEndpoint); + } + }, - var onclosenexttick = function () { - if (cancelled) return; - if (readable && !(rs && rs.ended && !rs.destroyed)) - return callback.call(stream, new Error("premature close")); - if (writable && !(ws && ws.ended && !ws.destroyed)) - return callback.call(stream, new Error("premature close")); - }; + /** + * Updates request endpoint from PredictEndpoint + * @api private + */ + buildEndpoint: function buildEndpoint(request) { + var url = request.params.PredictEndpoint; + if (url) { + request.httpRequest.endpoint = new AWS.Endpoint(url); + } + } - var onrequest = function () { - stream.req.on("finish", onfinish); - }; +}); - if (isRequest(stream)) { - stream.on("complete", onfinish); - stream.on("abort", onclose); - if (stream.req) onrequest(); - else stream.on("request", onrequest); - } else if (writable && !ws) { - // legacy streams - stream.on("end", onlegacyfinish); - stream.on("close", onlegacyfinish); - } - - if (isChildProcess(stream)) stream.on("exit", onexit); - - stream.on("end", onend); - stream.on("finish", onfinish); - if (opts.error !== false) stream.on("error", onerror); - stream.on("close", onclose); - - return function () { - cancelled = true; - stream.removeListener("complete", onfinish); - stream.removeListener("abort", onclose); - stream.removeListener("request", onrequest); - if (stream.req) stream.req.removeListener("finish", onfinish); - stream.removeListener("end", onlegacyfinish); - stream.removeListener("close", onlegacyfinish); - stream.removeListener("finish", onfinish); - stream.removeListener("exit", onexit); - stream.removeListener("end", onend); - stream.removeListener("error", onerror); - stream.removeListener("close", onclose); - }; - }; - module.exports = eos; +/***/ }), - /***/ - }, +/***/ 53199: +/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { - /***/ 55447: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - "use strict"; +__nccwpck_require__(44086); - const path = __nccwpck_require__(71017); - const childProcess = __nccwpck_require__(32081); - const crossSpawn = __nccwpck_require__(72746); - const stripEof = __nccwpck_require__(85515); - const npmRunPath = __nccwpck_require__(20502); - const isStream = __nccwpck_require__(41554); - const _getStream = __nccwpck_require__(21766); - const pFinally = __nccwpck_require__(31330); - const onExit = __nccwpck_require__(24931); - const errname = __nccwpck_require__(64689); - const stdio = __nccwpck_require__(10166); - const TEN_MEGABYTES = 1000 * 1000 * 10; +/***/ }), - function handleArgs(cmd, args, opts) { - let parsed; +/***/ 71928: +/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { - opts = Object.assign( - { - extendEnv: true, - env: {}, - }, - opts - ); +var AWS = __nccwpck_require__(28437); +__nccwpck_require__(16612); + /** + * @api private + */ + var crossRegionOperations = ['copyDBSnapshot', 'createDBInstanceReadReplica', 'createDBCluster', 'copyDBClusterSnapshot', 'startDBInstanceAutomatedBackupsReplication']; - if (opts.extendEnv) { - opts.env = Object.assign({}, process.env, opts.env); + AWS.util.update(AWS.RDS.prototype, { + /** + * @api private + */ + setupRequestListeners: function setupRequestListeners(request) { + if (crossRegionOperations.indexOf(request.operation) !== -1 && + request.params.SourceRegion) { + request.params = AWS.util.copy(request.params); + if (request.params.PreSignedUrl || + request.params.SourceRegion === this.config.region) { + delete request.params.SourceRegion; + } else { + var doesParamValidation = !!this.config.paramValidation; + // remove the validate parameters listener so we can re-add it after we build the URL + if (doesParamValidation) { + request.removeListener('validate', AWS.EventListeners.Core.VALIDATE_PARAMETERS); + } + request.onAsync('validate', this.buildCrossRegionPresignedUrl); + if (doesParamValidation) { + request.addListener('validate', AWS.EventListeners.Core.VALIDATE_PARAMETERS); + } + } + } + }, + + /** + * @api private + */ + buildCrossRegionPresignedUrl: function buildCrossRegionPresignedUrl(req, done) { + var config = AWS.util.copy(req.service.config); + config.region = req.params.SourceRegion; + delete req.params.SourceRegion; + delete config.endpoint; + // relevant params for the operation will already be in req.params + delete config.params; + config.signatureVersion = 'v4'; + var destinationRegion = req.service.config.region; + + var svc = new req.service.constructor(config); + var newReq = svc[req.operation](AWS.util.copy(req.params)); + newReq.on('build', function addDestinationRegionParam(request) { + var httpRequest = request.httpRequest; + httpRequest.params.DestinationRegion = destinationRegion; + httpRequest.body = AWS.util.queryParamsToString(httpRequest.params); + }); + newReq.presign(function(err, url) { + if (err) done(err); + else { + req.params.PreSignedUrl = url; + done(); + } + }); + } + }); + + +/***/ }), + +/***/ 64070: +/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { + +var AWS = __nccwpck_require__(28437); + +AWS.util.update(AWS.RDSDataService.prototype, { + /** + * @return [Boolean] whether the error can be retried + * @api private + */ + retryableError: function retryableError(error) { + if (error.code === 'BadRequestException' && + error.message && + error.message.match(/^Communications link failure/) && + error.statusCode === 400) { + return true; + } else { + var _super = AWS.Service.prototype.retryableError; + return _super.call(this, error); + } + } +}); + + +/***/ }), + +/***/ 69627: +/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { + +var AWS = __nccwpck_require__(28437); + +AWS.util.update(AWS.Route53.prototype, { + /** + * @api private + */ + setupRequestListeners: function setupRequestListeners(request) { + request.on('build', this.sanitizeUrl); + }, + + /** + * @api private + */ + sanitizeUrl: function sanitizeUrl(request) { + var path = request.httpRequest.path; + request.httpRequest.path = path.replace(/\/%2F\w+%2F/, '/'); + }, + + /** + * @return [Boolean] whether the error can be retried + * @api private + */ + retryableError: function retryableError(error) { + if (error.code === 'PriorRequestNotComplete' && + error.statusCode === 400) { + return true; + } else { + var _super = AWS.Service.prototype.retryableError; + return _super.call(this, error); + } + } +}); + + +/***/ }), + +/***/ 26543: +/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { + +var AWS = __nccwpck_require__(28437); +var v4Credentials = __nccwpck_require__(62660); +var resolveRegionalEndpointsFlag = __nccwpck_require__(85566); +var s3util = __nccwpck_require__(35895); +var regionUtil = __nccwpck_require__(18262); + +// Pull in managed upload extension +__nccwpck_require__(81600); + +/** + * @api private + */ +var operationsWith200StatusCodeError = { + 'completeMultipartUpload': true, + 'copyObject': true, + 'uploadPartCopy': true +}; + +/** + * @api private + */ + var regionRedirectErrorCodes = [ + 'AuthorizationHeaderMalformed', // non-head operations on virtual-hosted global bucket endpoints + 'BadRequest', // head operations on virtual-hosted global bucket endpoints + 'PermanentRedirect', // non-head operations on path-style or regional endpoints + 301 // head operations on path-style or regional endpoints + ]; + +AWS.util.update(AWS.S3.prototype, { + /** + * @api private + */ + getSignatureVersion: function getSignatureVersion(request) { + var defaultApiVersion = this.api.signatureVersion; + var userDefinedVersion = this._originalConfig ? this._originalConfig.signatureVersion : null; + var regionDefinedVersion = this.config.signatureVersion; + var isPresigned = request ? request.isPresigned() : false; + /* + 1) User defined version specified: + a) always return user defined version + 2) No user defined version specified: + a) If not using presigned urls, default to V4 + b) If using presigned urls, default to lowest version the region supports + */ + if (userDefinedVersion) { + userDefinedVersion = userDefinedVersion === 'v2' ? 's3' : userDefinedVersion; + return userDefinedVersion; + } + if (isPresigned !== true) { + defaultApiVersion = 'v4'; + } else if (regionDefinedVersion) { + defaultApiVersion = regionDefinedVersion; + } + return defaultApiVersion; + }, + + /** + * @api private + */ + getSigningName: function getSigningName() { + var _super = AWS.Service.prototype.getSigningName; + return (this._parsedArn && this._parsedArn.service) + ? this._parsedArn.service + : _super.call(this); + }, + + /** + * @api private + */ + getSignerClass: function getSignerClass(request) { + var signatureVersion = this.getSignatureVersion(request); + return AWS.Signers.RequestSigner.getVersion(signatureVersion); + }, + + /** + * @api private + */ + validateService: function validateService() { + var msg; + var messages = []; + + // default to us-east-1 when no region is provided + if (!this.config.region) this.config.region = 'us-east-1'; + + if (!this.config.endpoint && this.config.s3BucketEndpoint) { + messages.push('An endpoint must be provided when configuring ' + + '`s3BucketEndpoint` to true.'); + } + if (messages.length === 1) { + msg = messages[0]; + } else if (messages.length > 1) { + msg = 'Multiple configuration errors:\n' + messages.join('\n'); + } + if (msg) { + throw AWS.util.error(new Error(), + {name: 'InvalidEndpoint', message: msg}); + } + }, + + /** + * @api private + */ + shouldDisableBodySigning: function shouldDisableBodySigning(request) { + var signerClass = this.getSignerClass(); + if (this.config.s3DisableBodySigning === true && signerClass === AWS.Signers.V4 + && request.httpRequest.endpoint.protocol === 'https:') { + return true; + } + return false; + }, + + /** + * @api private + */ + setupRequestListeners: function setupRequestListeners(request) { + var prependListener = true; + request.addListener('validate', this.validateScheme); + request.addListener('validate', this.validateBucketName, prependListener); + request.addListener('validate', this.optInUsEast1RegionalEndpoint, prependListener); + + request.removeListener('validate', + AWS.EventListeners.Core.VALIDATE_REGION); + request.addListener('build', this.addContentType); + request.addListener('build', this.computeContentMd5); + request.addListener('build', this.computeSseCustomerKeyMd5); + request.addListener('build', this.populateURI); + request.addListener('afterBuild', this.addExpect100Continue); + request.addListener('extractError', this.extractError); + request.addListener('extractData', AWS.util.hoistPayloadMember); + request.addListener('extractData', this.extractData); + request.addListener('extractData', this.extractErrorFrom200Response); + request.addListener('beforePresign', this.prepareSignedUrl); + if (this.shouldDisableBodySigning(request)) { + request.removeListener('afterBuild', AWS.EventListeners.Core.COMPUTE_SHA256); + request.addListener('afterBuild', this.disableBodySigning); + } + //deal with ARNs supplied to Bucket + if (request.operation !== 'createBucket' && s3util.isArnInParam(request, 'Bucket')) { + // avoid duplicate parsing in the future + request.service._parsedArn = AWS.util.ARN.parse(request.params.Bucket); + + request.removeListener('validate', this.validateBucketName); + request.removeListener('build', this.populateURI); + if (request.service._parsedArn.service === 's3') { + request.addListener('validate', s3util.validateS3AccessPointArn); + request.addListener('validate', this.validateArnResourceType); + } else if (request.service._parsedArn.service === 's3-outposts') { + request.addListener('validate', s3util.validateOutpostsAccessPointArn); + request.addListener('validate', s3util.validateOutpostsArn); + } + request.addListener('validate', s3util.validateArnRegion); + request.addListener('validate', s3util.validateArnAccount); + request.addListener('validate', s3util.validateArnService); + request.addListener('build', this.populateUriFromAccessPointArn); + request.addListener('build', s3util.validatePopulateUriFromArn); + return; + } + //listeners regarding region inference + request.addListener('validate', this.validateBucketEndpoint); + request.addListener('validate', this.correctBucketRegionFromCache); + request.onAsync('extractError', this.requestBucketRegion); + if (AWS.util.isBrowser()) { + request.onAsync('retry', this.reqRegionForNetworkingError); + } + }, + + /** + * @api private + */ + validateScheme: function(req) { + var params = req.params, + scheme = req.httpRequest.endpoint.protocol, + sensitive = params.SSECustomerKey || params.CopySourceSSECustomerKey; + if (sensitive && scheme !== 'https:') { + var msg = 'Cannot send SSE keys over HTTP. Set \'sslEnabled\'' + + 'to \'true\' in your configuration'; + throw AWS.util.error(new Error(), + { code: 'ConfigError', message: msg }); + } + }, + + /** + * @api private + */ + validateBucketEndpoint: function(req) { + if (!req.params.Bucket && req.service.config.s3BucketEndpoint) { + var msg = 'Cannot send requests to root API with `s3BucketEndpoint` set.'; + throw AWS.util.error(new Error(), + { code: 'ConfigError', message: msg }); + } + }, + + /** + * Validate resource-type supplied in S3 ARN + */ + validateArnResourceType: function validateArnResourceType(req) { + var resource = req.service._parsedArn.resource; + + if ( + resource.indexOf('accesspoint:') !== 0 && + resource.indexOf('accesspoint/') !== 0 + ) { + throw AWS.util.error(new Error(), { + code: 'InvalidARN', + message: 'ARN resource should begin with \'accesspoint/\'' + }); + } + }, + + /** + * @api private + */ + validateBucketName: function validateBucketName(req) { + var service = req.service; + var signatureVersion = service.getSignatureVersion(req); + var bucket = req.params && req.params.Bucket; + var key = req.params && req.params.Key; + var slashIndex = bucket && bucket.indexOf('/'); + if (bucket && slashIndex >= 0) { + if (typeof key === 'string' && slashIndex > 0) { + req.params = AWS.util.copy(req.params); + // Need to include trailing slash to match sigv2 behavior + var prefix = bucket.substr(slashIndex + 1) || ''; + req.params.Key = prefix + '/' + key; + req.params.Bucket = bucket.substr(0, slashIndex); + } else if (signatureVersion === 'v4') { + var msg = 'Bucket names cannot contain forward slashes. Bucket: ' + bucket; + throw AWS.util.error(new Error(), + { code: 'InvalidBucket', message: msg }); + } + } + }, + + /** + * @api private + */ + isValidAccelerateOperation: function isValidAccelerateOperation(operation) { + var invalidOperations = [ + 'createBucket', + 'deleteBucket', + 'listBuckets' + ]; + return invalidOperations.indexOf(operation) === -1; + }, + + /** + * When us-east-1 region endpoint configuration is set, in stead of sending request to + * global endpoint(e.g. 's3.amazonaws.com'), we will send request to + * 's3.us-east-1.amazonaws.com'. + * @api private + */ + optInUsEast1RegionalEndpoint: function optInUsEast1RegionalEndpoint(req) { + var service = req.service; + var config = service.config; + config.s3UsEast1RegionalEndpoint = resolveRegionalEndpointsFlag(service._originalConfig, { + env: 'AWS_S3_US_EAST_1_REGIONAL_ENDPOINT', + sharedConfig: 's3_us_east_1_regional_endpoint', + clientConfig: 's3UsEast1RegionalEndpoint' + }); + if ( + !(service._originalConfig || {}).endpoint && + req.httpRequest.region === 'us-east-1' && + config.s3UsEast1RegionalEndpoint === 'regional' && + req.httpRequest.endpoint.hostname.indexOf('s3.amazonaws.com') >= 0 + ) { + var insertPoint = config.endpoint.indexOf('.amazonaws.com'); + regionalEndpoint = config.endpoint.substring(0, insertPoint) + + '.us-east-1' + config.endpoint.substring(insertPoint); + req.httpRequest.updateEndpoint(regionalEndpoint); + } + }, + + /** + * S3 prefers dns-compatible bucket names to be moved from the uri path + * to the hostname as a sub-domain. This is not possible, even for dns-compat + * buckets when using SSL and the bucket name contains a dot ('.'). The + * ssl wildcard certificate is only 1-level deep. + * + * @api private + */ + populateURI: function populateURI(req) { + var httpRequest = req.httpRequest; + var b = req.params.Bucket; + var service = req.service; + var endpoint = httpRequest.endpoint; + if (b) { + if (!service.pathStyleBucketName(b)) { + if (service.config.useAccelerateEndpoint && service.isValidAccelerateOperation(req.operation)) { + if (service.config.useDualstack) { + endpoint.hostname = b + '.s3-accelerate.dualstack.amazonaws.com'; + } else { + endpoint.hostname = b + '.s3-accelerate.amazonaws.com'; + } + } else if (!service.config.s3BucketEndpoint) { + endpoint.hostname = + b + '.' + endpoint.hostname; } - if (opts.__winShell === true) { - delete opts.__winShell; - parsed = { - command: cmd, - args, - options: opts, - file: cmd, - original: { - cmd, - args, - }, - }; + var port = endpoint.port; + if (port !== 80 && port !== 443) { + endpoint.host = endpoint.hostname + ':' + + endpoint.port; } else { - parsed = crossSpawn._parse(cmd, args, opts); - } - - opts = Object.assign( - { - maxBuffer: TEN_MEGABYTES, - buffer: true, - stripEof: true, - preferLocal: true, - localDir: parsed.options.cwd || process.cwd(), - encoding: "utf8", - reject: true, - cleanup: true, - }, - parsed.options - ); - - opts.stdio = stdio(opts); - - if (opts.preferLocal) { - opts.env = npmRunPath.env( - Object.assign({}, opts, { cwd: opts.localDir }) - ); - } - - if (opts.detached) { - // #115 - opts.cleanup = false; + endpoint.host = endpoint.hostname; } - if ( - process.platform === "win32" && - path.basename(parsed.command) === "cmd.exe" - ) { - // #116 - parsed.args.unshift("/q"); + httpRequest.virtualHostedBucket = b; // needed for signing the request + service.removeVirtualHostedBucketFromPath(req); + } + } + }, + + /** + * Takes the bucket name out of the path if bucket is virtual-hosted + * + * @api private + */ + removeVirtualHostedBucketFromPath: function removeVirtualHostedBucketFromPath(req) { + var httpRequest = req.httpRequest; + var bucket = httpRequest.virtualHostedBucket; + if (bucket && httpRequest.path) { + if (req.params && req.params.Key) { + var encodedS3Key = '/' + AWS.util.uriEscapePath(req.params.Key); + if (httpRequest.path.indexOf(encodedS3Key) === 0 && (httpRequest.path.length === encodedS3Key.length || httpRequest.path[encodedS3Key.length] === '?')) { + //path only contains key or path contains only key and querystring + return; } - - return { - cmd: parsed.command, - args: parsed.args, - opts, - parsed, + } + httpRequest.path = httpRequest.path.replace(new RegExp('/' + bucket), ''); + if (httpRequest.path[0] !== '/') { + httpRequest.path = '/' + httpRequest.path; + } + } + }, + + /** + * When user supply an access point ARN in the Bucket parameter, we need to + * populate the URI according to the ARN. + */ + populateUriFromAccessPointArn: function populateUriFromAccessPointArn(req) { + var accessPointArn = req.service._parsedArn; + + var isOutpostArn = accessPointArn.service === 's3-outposts'; + + var outpostsSuffix = isOutpostArn ? '.' + accessPointArn.outpostId: ''; + var serviceName = isOutpostArn ? 's3-outposts': 's3-accesspoint'; + var dualStackSuffix = !isOutpostArn && req.service.config.useDualstack ? '.dualstack' : ''; + + var endpoint = req.httpRequest.endpoint; + var dnsSuffix = regionUtil.getEndpointSuffix(accessPointArn.region); + var useArnRegion = req.service.config.s3UseArnRegion; + + endpoint.hostname = [ + accessPointArn.accessPoint + '-' + accessPointArn.accountId + outpostsSuffix, + serviceName + dualStackSuffix, + useArnRegion ? accessPointArn.region : req.service.config.region, + dnsSuffix + ].join('.'); + endpoint.host = endpoint.hostname; + + var encodedArn = AWS.util.uriEscape(req.params.Bucket); + var path = req.httpRequest.path; + //remove the Bucket value from path + req.httpRequest.path = path.replace(new RegExp('/' + encodedArn), ''); + if (req.httpRequest.path[0] !== '/') { + req.httpRequest.path = '/' + req.httpRequest.path; + } + req.httpRequest.region = accessPointArn.region; //region used to sign + }, + + /** + * Adds Expect: 100-continue header if payload is greater-or-equal 1MB + * @api private + */ + addExpect100Continue: function addExpect100Continue(req) { + var len = req.httpRequest.headers['Content-Length']; + if (AWS.util.isNode() && (len >= 1024 * 1024 || req.params.Body instanceof AWS.util.stream.Stream)) { + req.httpRequest.headers['Expect'] = '100-continue'; + } + }, + + /** + * Adds a default content type if none is supplied. + * + * @api private + */ + addContentType: function addContentType(req) { + var httpRequest = req.httpRequest; + if (httpRequest.method === 'GET' || httpRequest.method === 'HEAD') { + // Content-Type is not set in GET/HEAD requests + delete httpRequest.headers['Content-Type']; + return; + } + + if (!httpRequest.headers['Content-Type']) { // always have a Content-Type + httpRequest.headers['Content-Type'] = 'application/octet-stream'; + } + + var contentType = httpRequest.headers['Content-Type']; + if (AWS.util.isBrowser()) { + if (typeof httpRequest.body === 'string' && !contentType.match(/;\s*charset=/)) { + var charset = '; charset=UTF-8'; + httpRequest.headers['Content-Type'] += charset; + } else { + var replaceFn = function(_, prefix, charsetName) { + return prefix + charsetName.toUpperCase(); }; + + httpRequest.headers['Content-Type'] = + contentType.replace(/(;\s*charset=)(.+)$/, replaceFn); + } + } + }, + + /** + * @api private + */ + computableChecksumOperations: { + putBucketCors: true, + putBucketLifecycle: true, + putBucketLifecycleConfiguration: true, + putBucketTagging: true, + deleteObjects: true, + putBucketReplication: true, + putObjectLegalHold: true, + putObjectRetention: true, + putObjectLockConfiguration: true + }, + + /** + * Checks whether checksums should be computed for the request. + * If the request requires checksums to be computed, this will always + * return true, otherwise it depends on whether {AWS.Config.computeChecksums} + * is set. + * + * @param req [AWS.Request] the request to check against + * @return [Boolean] whether to compute checksums for a request. + * @api private + */ + willComputeChecksums: function willComputeChecksums(req) { + if (this.computableChecksumOperations[req.operation]) return true; + if (!this.config.computeChecksums) return false; + + // TODO: compute checksums for Stream objects + if (!AWS.util.Buffer.isBuffer(req.httpRequest.body) && + typeof req.httpRequest.body !== 'string') { + return false; + } + + var rules = req.service.api.operations[req.operation].input.members; + + // Sha256 signing disabled, and not a presigned url + if (req.service.shouldDisableBodySigning(req) && !Object.prototype.hasOwnProperty.call(req.httpRequest.headers, 'presigned-expires')) { + if (rules.ContentMD5 && !req.params.ContentMD5) { + return true; } + } + + // V4 signer uses SHA256 signatures so only compute MD5 if it is required + if (req.service.getSignerClass(req) === AWS.Signers.V4) { + if (rules.ContentMD5 && !rules.ContentMD5.required) return false; + } + + if (rules.ContentMD5 && !req.params.ContentMD5) return true; + }, + + /** + * A listener that computes the Content-MD5 and sets it in the header. + * @see AWS.S3.willComputeChecksums + * @api private + */ + computeContentMd5: function computeContentMd5(req) { + if (req.service.willComputeChecksums(req)) { + var md5 = AWS.util.crypto.md5(req.httpRequest.body, 'base64'); + req.httpRequest.headers['Content-MD5'] = md5; + } + }, + + /** + * @api private + */ + computeSseCustomerKeyMd5: function computeSseCustomerKeyMd5(req) { + var keys = { + SSECustomerKey: 'x-amz-server-side-encryption-customer-key-MD5', + CopySourceSSECustomerKey: 'x-amz-copy-source-server-side-encryption-customer-key-MD5' + }; + AWS.util.each(keys, function(key, header) { + if (req.params[key]) { + var value = AWS.util.crypto.md5(req.params[key], 'base64'); + req.httpRequest.headers[header] = value; + } + }); + }, + + /** + * Returns true if the bucket name should be left in the URI path for + * a request to S3. This function takes into account the current + * endpoint protocol (e.g. http or https). + * + * @api private + */ + pathStyleBucketName: function pathStyleBucketName(bucketName) { + // user can force path style requests via the configuration + if (this.config.s3ForcePathStyle) return true; + if (this.config.s3BucketEndpoint) return false; + + if (s3util.dnsCompatibleBucketName(bucketName)) { + return (this.config.sslEnabled && bucketName.match(/\./)) ? true : false; + } else { + return true; // not dns compatible names must always use path style + } + }, + + /** + * For COPY operations, some can be error even with status code 200. + * SDK treats the response as exception when response body indicates + * an exception or body is empty. + * + * @api private + */ + extractErrorFrom200Response: function extractErrorFrom200Response(resp) { + if (!operationsWith200StatusCodeError[resp.request.operation]) return; + var httpResponse = resp.httpResponse; + if (httpResponse.body && httpResponse.body.toString().match('')) { + // Response body with '...' indicates an exception. + // Get S3 client object. In ManagedUpload, this.service refers to + // S3 client object. + resp.data = null; + var service = this.service ? this.service : this; + service.extractError(resp); + throw resp.error; + } else if (!httpResponse.body || !httpResponse.body.toString().match(/<[\w_]/)) { + // When body is empty or incomplete, S3 might stop the request on detecting client + // side aborting the request. + resp.data = null; + throw AWS.util.error(new Error(), { + code: 'InternalError', + message: 'S3 aborted request' + }); + } + }, + + /** + * @return [Boolean] whether the error can be retried + * @api private + */ + retryableError: function retryableError(error, request) { + if (operationsWith200StatusCodeError[request.operation] && + error.statusCode === 200) { + return true; + } else if (request._requestRegionForBucket && + request.service.bucketRegionCache[request._requestRegionForBucket]) { + return false; + } else if (error && error.code === 'RequestTimeout') { + return true; + } else if (error && + regionRedirectErrorCodes.indexOf(error.code) != -1 && + error.region && error.region != request.httpRequest.region) { + request.httpRequest.region = error.region; + if (error.statusCode === 301) { + request.service.updateReqBucketRegion(request); + } + return true; + } else { + var _super = AWS.Service.prototype.retryableError; + return _super.call(this, error, request); + } + }, + + /** + * Updates httpRequest with region. If region is not provided, then + * the httpRequest will be updated based on httpRequest.region + * + * @api private + */ + updateReqBucketRegion: function updateReqBucketRegion(request, region) { + var httpRequest = request.httpRequest; + if (typeof region === 'string' && region.length) { + httpRequest.region = region; + } + if (!httpRequest.endpoint.host.match(/s3(?!-accelerate).*\.amazonaws\.com$/)) { + return; + } + var service = request.service; + var s3Config = service.config; + var s3BucketEndpoint = s3Config.s3BucketEndpoint; + if (s3BucketEndpoint) { + delete s3Config.s3BucketEndpoint; + } + var newConfig = AWS.util.copy(s3Config); + delete newConfig.endpoint; + newConfig.region = httpRequest.region; + + httpRequest.endpoint = (new AWS.S3(newConfig)).endpoint; + service.populateURI(request); + s3Config.s3BucketEndpoint = s3BucketEndpoint; + httpRequest.headers.Host = httpRequest.endpoint.host; + + if (request._asm.currentState === 'validate') { + request.removeListener('build', service.populateURI); + request.addListener('build', service.removeVirtualHostedBucketFromPath); + } + }, + + /** + * Provides a specialized parser for getBucketLocation -- all other + * operations are parsed by the super class. + * + * @api private + */ + extractData: function extractData(resp) { + var req = resp.request; + if (req.operation === 'getBucketLocation') { + var match = resp.httpResponse.body.toString().match(/>(.+)<\/Location/); + delete resp.data['_']; + if (match) { + resp.data.LocationConstraint = match[1]; + } else { + resp.data.LocationConstraint = ''; + } + } + var bucket = req.params.Bucket || null; + if (req.operation === 'deleteBucket' && typeof bucket === 'string' && !resp.error) { + req.service.clearBucketRegionCache(bucket); + } else { + var headers = resp.httpResponse.headers || {}; + var region = headers['x-amz-bucket-region'] || null; + if (!region && req.operation === 'createBucket' && !resp.error) { + var createBucketConfiguration = req.params.CreateBucketConfiguration; + if (!createBucketConfiguration) { + region = 'us-east-1'; + } else if (createBucketConfiguration.LocationConstraint === 'EU') { + region = 'eu-west-1'; + } else { + region = createBucketConfiguration.LocationConstraint; + } + } + if (region) { + if (bucket && region !== req.service.bucketRegionCache[bucket]) { + req.service.bucketRegionCache[bucket] = region; + } + } + } + req.service.extractRequestIds(resp); + }, + + /** + * Extracts an error object from the http response. + * + * @api private + */ + extractError: function extractError(resp) { + var codes = { + 304: 'NotModified', + 403: 'Forbidden', + 400: 'BadRequest', + 404: 'NotFound' + }; + + var req = resp.request; + var code = resp.httpResponse.statusCode; + var body = resp.httpResponse.body || ''; + + var headers = resp.httpResponse.headers || {}; + var region = headers['x-amz-bucket-region'] || null; + var bucket = req.params.Bucket || null; + var bucketRegionCache = req.service.bucketRegionCache; + if (region && bucket && region !== bucketRegionCache[bucket]) { + bucketRegionCache[bucket] = region; + } + + var cachedRegion; + if (codes[code] && body.length === 0) { + if (bucket && !region) { + cachedRegion = bucketRegionCache[bucket] || null; + if (cachedRegion !== req.httpRequest.region) { + region = cachedRegion; + } + } + resp.error = AWS.util.error(new Error(), { + code: codes[code], + message: null, + region: region + }); + } else { + var data = new AWS.XML.Parser().parse(body.toString()); - function handleInput(spawned, input) { - if (input === null || input === undefined) { - return; + if (data.Region && !region) { + region = data.Region; + if (bucket && region !== bucketRegionCache[bucket]) { + bucketRegionCache[bucket] = region; } - - if (isStream(input)) { - input.pipe(spawned.stdin); - } else { - spawned.stdin.end(input); + } else if (bucket && !region && !data.Region) { + cachedRegion = bucketRegionCache[bucket] || null; + if (cachedRegion !== req.httpRequest.region) { + region = cachedRegion; } } - function handleOutput(opts, val) { - if (val && opts.stripEof) { - val = stripEof(val); + resp.error = AWS.util.error(new Error(), { + code: data.Code || code, + message: data.Message || null, + region: region + }); + } + req.service.extractRequestIds(resp); + }, + + /** + * If region was not obtained synchronously, then send async request + * to get bucket region for errors resulting from wrong region. + * + * @api private + */ + requestBucketRegion: function requestBucketRegion(resp, done) { + var error = resp.error; + var req = resp.request; + var bucket = req.params.Bucket || null; + + if (!error || !bucket || error.region || req.operation === 'listObjects' || + (AWS.util.isNode() && req.operation === 'headBucket') || + (error.statusCode === 400 && req.operation !== 'headObject') || + regionRedirectErrorCodes.indexOf(error.code) === -1) { + return done(); + } + var reqOperation = AWS.util.isNode() ? 'headBucket' : 'listObjects'; + var reqParams = {Bucket: bucket}; + if (reqOperation === 'listObjects') reqParams.MaxKeys = 0; + var regionReq = req.service[reqOperation](reqParams); + regionReq._requestRegionForBucket = bucket; + regionReq.send(function() { + var region = req.service.bucketRegionCache[bucket] || null; + error.region = region; + done(); + }); + }, + + /** + * For browser only. If NetworkingError received, will attempt to obtain + * the bucket region. + * + * @api private + */ + reqRegionForNetworkingError: function reqRegionForNetworkingError(resp, done) { + if (!AWS.util.isBrowser()) { + return done(); + } + var error = resp.error; + var request = resp.request; + var bucket = request.params.Bucket; + if (!error || error.code !== 'NetworkingError' || !bucket || + request.httpRequest.region === 'us-east-1') { + return done(); + } + var service = request.service; + var bucketRegionCache = service.bucketRegionCache; + var cachedRegion = bucketRegionCache[bucket] || null; + + if (cachedRegion && cachedRegion !== request.httpRequest.region) { + service.updateReqBucketRegion(request, cachedRegion); + done(); + } else if (!s3util.dnsCompatibleBucketName(bucket)) { + service.updateReqBucketRegion(request, 'us-east-1'); + if (bucketRegionCache[bucket] !== 'us-east-1') { + bucketRegionCache[bucket] = 'us-east-1'; + } + done(); + } else if (request.httpRequest.virtualHostedBucket) { + var getRegionReq = service.listObjects({Bucket: bucket, MaxKeys: 0}); + service.updateReqBucketRegion(getRegionReq, 'us-east-1'); + getRegionReq._requestRegionForBucket = bucket; + + getRegionReq.send(function() { + var region = service.bucketRegionCache[bucket] || null; + if (region && region !== request.httpRequest.region) { + service.updateReqBucketRegion(request, region); + } + done(); + }); + } else { + // DNS-compatible path-style + // (s3ForcePathStyle or bucket name with dot over https) + // Cannot obtain region information for this case + done(); + } + }, + + /** + * Cache for bucket region. + * + * @api private + */ + bucketRegionCache: {}, + + /** + * Clears bucket region cache. + * + * @api private + */ + clearBucketRegionCache: function(buckets) { + var bucketRegionCache = this.bucketRegionCache; + if (!buckets) { + buckets = Object.keys(bucketRegionCache); + } else if (typeof buckets === 'string') { + buckets = [buckets]; + } + for (var i = 0; i < buckets.length; i++) { + delete bucketRegionCache[buckets[i]]; + } + return bucketRegionCache; + }, + + /** + * Corrects request region if bucket's cached region is different + * + * @api private + */ + correctBucketRegionFromCache: function correctBucketRegionFromCache(req) { + var bucket = req.params.Bucket || null; + if (bucket) { + var service = req.service; + var requestRegion = req.httpRequest.region; + var cachedRegion = service.bucketRegionCache[bucket]; + if (cachedRegion && cachedRegion !== requestRegion) { + service.updateReqBucketRegion(req, cachedRegion); + } + } + }, + + /** + * Extracts S3 specific request ids from the http response. + * + * @api private + */ + extractRequestIds: function extractRequestIds(resp) { + var extendedRequestId = resp.httpResponse.headers ? resp.httpResponse.headers['x-amz-id-2'] : null; + var cfId = resp.httpResponse.headers ? resp.httpResponse.headers['x-amz-cf-id'] : null; + resp.extendedRequestId = extendedRequestId; + resp.cfId = cfId; + + if (resp.error) { + resp.error.requestId = resp.requestId || null; + resp.error.extendedRequestId = extendedRequestId; + resp.error.cfId = cfId; + } + }, + + /** + * Get a pre-signed URL for a given operation name. + * + * @note You must ensure that you have static or previously resolved + * credentials if you call this method synchronously (with no callback), + * otherwise it may not properly sign the request. If you cannot guarantee + * this (you are using an asynchronous credential provider, i.e., EC2 + * IAM roles), you should always call this method with an asynchronous + * callback. + * @note Not all operation parameters are supported when using pre-signed + * URLs. Certain parameters, such as `SSECustomerKey`, `ACL`, `Expires`, + * `ContentLength`, or `Tagging` must be provided as headers when sending a + * request. If you are using pre-signed URLs to upload from a browser and + * need to use these fields, see {createPresignedPost}. + * @note The default signer allows altering the request by adding corresponding + * headers to set some parameters (e.g. Range) and these added parameters + * won't be signed. You must use signatureVersion v4 to to include these + * parameters in the signed portion of the URL and enforce exact matching + * between headers and signed params in the URL. + * @note This operation cannot be used with a promise. See note above regarding + * asynchronous credentials and use with a callback. + * @param operation [String] the name of the operation to call + * @param params [map] parameters to pass to the operation. See the given + * operation for the expected operation parameters. In addition, you can + * also pass the "Expires" parameter to inform S3 how long the URL should + * work for. + * @option params Expires [Integer] (900) the number of seconds to expire + * the pre-signed URL operation in. Defaults to 15 minutes. + * @param callback [Function] if a callback is provided, this function will + * pass the URL as the second parameter (after the error parameter) to + * the callback function. + * @return [String] if called synchronously (with no callback), returns the + * signed URL. + * @return [null] nothing is returned if a callback is provided. + * @example Pre-signing a getObject operation (synchronously) + * var params = {Bucket: 'bucket', Key: 'key'}; + * var url = s3.getSignedUrl('getObject', params); + * console.log('The URL is', url); + * @example Pre-signing a putObject (asynchronously) + * var params = {Bucket: 'bucket', Key: 'key'}; + * s3.getSignedUrl('putObject', params, function (err, url) { + * console.log('The URL is', url); + * }); + * @example Pre-signing a putObject operation with a specific payload + * var params = {Bucket: 'bucket', Key: 'key', Body: 'body'}; + * var url = s3.getSignedUrl('putObject', params); + * console.log('The URL is', url); + * @example Passing in a 1-minute expiry time for a pre-signed URL + * var params = {Bucket: 'bucket', Key: 'key', Expires: 60}; + * var url = s3.getSignedUrl('getObject', params); + * console.log('The URL is', url); // expires in 60 seconds + */ + getSignedUrl: function getSignedUrl(operation, params, callback) { + params = AWS.util.copy(params || {}); + var expires = params.Expires || 900; + + if (typeof expires !== 'number') { + throw AWS.util.error(new Error(), + { code: 'InvalidParameterException', message: 'The expiration must be a number, received ' + typeof expires }); + } + + delete params.Expires; // we can't validate this + var request = this.makeRequest(operation, params); + + if (callback) { + AWS.util.defer(function() { + request.presign(expires, callback); + }); + } else { + return request.presign(expires, callback); + } + }, + + /** + * @!method getSignedUrlPromise() + * Returns a 'thenable' promise that will be resolved with a pre-signed URL + * for a given operation name. + * + * Two callbacks can be provided to the `then` method on the returned promise. + * The first callback will be called if the promise is fulfilled, and the second + * callback will be called if the promise is rejected. + * @note Not all operation parameters are supported when using pre-signed + * URLs. Certain parameters, such as `SSECustomerKey`, `ACL`, `Expires`, + * `ContentLength`, or `Tagging` must be provided as headers when sending a + * request. If you are using pre-signed URLs to upload from a browser and + * need to use these fields, see {createPresignedPost}. + * @param operation [String] the name of the operation to call + * @param params [map] parameters to pass to the operation. See the given + * operation for the expected operation parameters. In addition, you can + * also pass the "Expires" parameter to inform S3 how long the URL should + * work for. + * @option params Expires [Integer] (900) the number of seconds to expire + * the pre-signed URL operation in. Defaults to 15 minutes. + * @callback fulfilledCallback function(url) + * Called if the promise is fulfilled. + * @param url [String] the signed url + * @callback rejectedCallback function(err) + * Called if the promise is rejected. + * @param err [Error] if an error occurred, this value will be filled + * @return [Promise] A promise that represents the state of the `refresh` call. + * @example Pre-signing a getObject operation + * var params = {Bucket: 'bucket', Key: 'key'}; + * var promise = s3.getSignedUrlPromise('getObject', params); + * promise.then(function(url) { + * console.log('The URL is', url); + * }, function(err) { ... }); + * @example Pre-signing a putObject operation with a specific payload + * var params = {Bucket: 'bucket', Key: 'key', Body: 'body'}; + * var promise = s3.getSignedUrlPromise('putObject', params); + * promise.then(function(url) { + * console.log('The URL is', url); + * }, function(err) { ... }); + * @example Passing in a 1-minute expiry time for a pre-signed URL + * var params = {Bucket: 'bucket', Key: 'key', Expires: 60}; + * var promise = s3.getSignedUrlPromise('getObject', params); + * promise.then(function(url) { + * console.log('The URL is', url); + * }, function(err) { ... }); + */ + + /** + * Get a pre-signed POST policy to support uploading to S3 directly from an + * HTML form. + * + * @param params [map] + * @option params Bucket [String] The bucket to which the post should be + * uploaded + * @option params Expires [Integer] (3600) The number of seconds for which + * the presigned policy should be valid. + * @option params Conditions [Array] An array of conditions that must be met + * for the presigned policy to allow the + * upload. This can include required tags, + * the accepted range for content lengths, + * etc. + * @see http://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-HTTPPOSTConstructPolicy.html + * @option params Fields [map] Fields to include in the form. All + * values passed in as fields will be + * signed as exact match conditions. + * @param callback [Function] + * + * @note All fields passed in when creating presigned post data will be signed + * as exact match conditions. Any fields that will be interpolated by S3 + * must be added to the fields hash after signing, and an appropriate + * condition for such fields must be explicitly added to the Conditions + * array passed to this function before signing. + * + * @example Presiging post data with a known key + * var params = { + * Bucket: 'bucket', + * Fields: { + * key: 'key' + * } + * }; + * s3.createPresignedPost(params, function(err, data) { + * if (err) { + * console.error('Presigning post data encountered an error', err); + * } else { + * console.log('The post data is', data); + * } + * }); + * + * @example Presigning post data with an interpolated key + * var params = { + * Bucket: 'bucket', + * Conditions: [ + * ['starts-with', '$key', 'path/to/uploads/'] + * ] + * }; + * s3.createPresignedPost(params, function(err, data) { + * if (err) { + * console.error('Presigning post data encountered an error', err); + * } else { + * data.Fields.key = 'path/to/uploads/${filename}'; + * console.log('The post data is', data); + * } + * }); + * + * @note You must ensure that you have static or previously resolved + * credentials if you call this method synchronously (with no callback), + * otherwise it may not properly sign the request. If you cannot guarantee + * this (you are using an asynchronous credential provider, i.e., EC2 + * IAM roles), you should always call this method with an asynchronous + * callback. + * + * @return [map] If called synchronously (with no callback), returns a hash + * with the url to set as the form action and a hash of fields + * to include in the form. + * @return [null] Nothing is returned if a callback is provided. + * + * @callback callback function (err, data) + * @param err [Error] the error object returned from the policy signer + * @param data [map] The data necessary to construct an HTML form + * @param data.url [String] The URL to use as the action of the form + * @param data.fields [map] A hash of fields that must be included in the + * form for the upload to succeed. This hash will + * include the signed POST policy, your access key + * ID and security token (if present), etc. These + * may be safely included as input elements of type + * 'hidden.' + */ + createPresignedPost: function createPresignedPost(params, callback) { + if (typeof params === 'function' && callback === undefined) { + callback = params; + params = null; + } + + params = AWS.util.copy(params || {}); + var boundParams = this.config.params || {}; + var bucket = params.Bucket || boundParams.Bucket, + self = this, + config = this.config, + endpoint = AWS.util.copy(this.endpoint); + if (!config.s3BucketEndpoint) { + endpoint.pathname = '/' + bucket; + } + + function finalizePost() { + return { + url: AWS.util.urlFormat(endpoint), + fields: self.preparePostFields( + config.credentials, + config.region, + bucket, + params.Fields, + params.Conditions, + params.Expires + ) + }; + } + + if (callback) { + config.getCredentials(function (err) { + if (err) { + callback(err); + } else { + try { + callback(null, finalizePost()); + } catch (err) { + callback(err); + } } + }); + } else { + return finalizePost(); + } + }, + + /** + * @api private + */ + preparePostFields: function preparePostFields( + credentials, + region, + bucket, + fields, + conditions, + expiresInSeconds + ) { + var now = this.getSkewCorrectedDate(); + if (!credentials || !region || !bucket) { + throw new Error('Unable to create a POST object policy without a bucket,' + + ' region, and credentials'); + } + fields = AWS.util.copy(fields || {}); + conditions = (conditions || []).slice(0); + expiresInSeconds = expiresInSeconds || 3600; + + var signingDate = AWS.util.date.iso8601(now).replace(/[:\-]|\.\d{3}/g, ''); + var shortDate = signingDate.substr(0, 8); + var scope = v4Credentials.createScope(shortDate, region, 's3'); + var credential = credentials.accessKeyId + '/' + scope; + + fields['bucket'] = bucket; + fields['X-Amz-Algorithm'] = 'AWS4-HMAC-SHA256'; + fields['X-Amz-Credential'] = credential; + fields['X-Amz-Date'] = signingDate; + if (credentials.sessionToken) { + fields['X-Amz-Security-Token'] = credentials.sessionToken; + } + for (var field in fields) { + if (fields.hasOwnProperty(field)) { + var condition = {}; + condition[field] = fields[field]; + conditions.push(condition); + } + } + + fields.Policy = this.preparePostPolicy( + new Date(now.valueOf() + expiresInSeconds * 1000), + conditions + ); + fields['X-Amz-Signature'] = AWS.util.crypto.hmac( + v4Credentials.getSigningKey(credentials, shortDate, region, 's3', true), + fields.Policy, + 'hex' + ); + + return fields; + }, + + /** + * @api private + */ + preparePostPolicy: function preparePostPolicy(expiration, conditions) { + return AWS.util.base64.encode(JSON.stringify({ + expiration: AWS.util.date.iso8601(expiration), + conditions: conditions + })); + }, + + /** + * @api private + */ + prepareSignedUrl: function prepareSignedUrl(request) { + request.addListener('validate', request.service.noPresignedContentLength); + request.removeListener('build', request.service.addContentType); + if (!request.params.Body) { + // no Content-MD5/SHA-256 if body is not provided + request.removeListener('build', request.service.computeContentMd5); + } else { + request.addListener('afterBuild', AWS.EventListeners.Core.COMPUTE_SHA256); + } + }, + + /** + * @api private + * @param request + */ + disableBodySigning: function disableBodySigning(request) { + var headers = request.httpRequest.headers; + // Add the header to anything that isn't a presigned url, unless that presigned url had a body defined + if (!Object.prototype.hasOwnProperty.call(headers, 'presigned-expires')) { + headers['X-Amz-Content-Sha256'] = 'UNSIGNED-PAYLOAD'; + } + }, + + /** + * @api private + */ + noPresignedContentLength: function noPresignedContentLength(request) { + if (request.params.ContentLength !== undefined) { + throw AWS.util.error(new Error(), {code: 'UnexpectedParameter', + message: 'ContentLength is not supported in pre-signed URLs.'}); + } + }, + + createBucket: function createBucket(params, callback) { + // When creating a bucket *outside* the classic region, the location + // constraint must be set for the bucket and it must match the endpoint. + // This chunk of code will set the location constraint param based + // on the region (when possible), but it will not override a passed-in + // location constraint. + if (typeof params === 'function' || !params) { + callback = callback || params; + params = {}; + } + var hostname = this.endpoint.hostname; + // copy params so that appending keys does not unintentioinallly + // mutate params object argument passed in by user + var copiedParams = AWS.util.copy(params); + + if (hostname !== this.api.globalEndpoint && !params.CreateBucketConfiguration) { + copiedParams.CreateBucketConfiguration = { LocationConstraint: this.config.region }; + } + return this.makeRequest('createBucket', copiedParams, callback); + }, + + /** + * @see AWS.S3.ManagedUpload + * @overload upload(params = {}, [options], [callback]) + * Uploads an arbitrarily sized buffer, blob, or stream, using intelligent + * concurrent handling of parts if the payload is large enough. You can + * configure the concurrent queue size by setting `options`. Note that this + * is the only operation for which the SDK can retry requests with stream + * bodies. + * + * @param (see AWS.S3.putObject) + * @option (see AWS.S3.ManagedUpload.constructor) + * @return [AWS.S3.ManagedUpload] the managed upload object that can call + * `send()` or track progress. + * @example Uploading a stream object + * var params = {Bucket: 'bucket', Key: 'key', Body: stream}; + * s3.upload(params, function(err, data) { + * console.log(err, data); + * }); + * @example Uploading a stream with concurrency of 1 and partSize of 10mb + * var params = {Bucket: 'bucket', Key: 'key', Body: stream}; + * var options = {partSize: 10 * 1024 * 1024, queueSize: 1}; + * s3.upload(params, options, function(err, data) { + * console.log(err, data); + * }); + * @callback callback function(err, data) + * @param err [Error] an error or null if no error occurred. + * @param data [map] The response data from the successful upload: + * @param data.Location [String] the URL of the uploaded object + * @param data.ETag [String] the ETag of the uploaded object + * @param data.Bucket [String] the bucket to which the object was uploaded + * @param data.Key [String] the key to which the object was uploaded + */ + upload: function upload(params, options, callback) { + if (typeof options === 'function' && callback === undefined) { + callback = options; + options = null; + } + + options = options || {}; + options = AWS.util.merge(options || {}, {service: this, params: params}); + + var uploader = new AWS.S3.ManagedUpload(options); + if (typeof callback === 'function') uploader.send(callback); + return uploader; + } +}); + +/** + * @api private + */ +AWS.S3.addPromisesToClass = function addPromisesToClass(PromiseDependency) { + this.prototype.getSignedUrlPromise = AWS.util.promisifyMethod('getSignedUrl', PromiseDependency); +}; - return val; - } +/** + * @api private + */ +AWS.S3.deletePromisesFromClass = function deletePromisesFromClass() { + delete this.prototype.getSignedUrlPromise; +}; + +AWS.util.addPromises(AWS.S3); + + +/***/ }), + +/***/ 71207: +/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { + +var AWS = __nccwpck_require__(28437); +var s3util = __nccwpck_require__(35895); +var regionUtil = __nccwpck_require__(18262); + +AWS.util.update(AWS.S3Control.prototype, { + /** + * @api private + */ + setupRequestListeners: function setupRequestListeners(request) { + request.addListener('extractError', this.extractHostId); + request.addListener('extractData', this.extractHostId); + request.addListener('validate', this.validateAccountId); + + var isArnInBucket = s3util.isArnInParam(request, 'Bucket'); + var isArnInName = s3util.isArnInParam(request, 'Name'); + + if (isArnInBucket) { + request.service._parsedArn = AWS.util.ARN.parse(request.params['Bucket']); + request.service.signingName = request.service._parsedArn.service; + request.addListener('validate', this.validateOutpostsBucketArn); + request.addListener('validate', s3util.validateOutpostsArn); + request.addListener('afterBuild', this.addOutpostIdHeader); + } else if (isArnInName) { + request.service._parsedArn = AWS.util.ARN.parse(request.params['Name']); + request.service.signingName = request.service._parsedArn.service; + request.addListener('validate', s3util.validateOutpostsAccessPointArn); + request.addListener('validate', s3util.validateOutpostsArn); + request.addListener('afterBuild', this.addOutpostIdHeader); + } + + if (isArnInBucket || isArnInName) { + request.addListener('validate', s3util.validateArnRegion); + request.addListener('validate', this.validateArnAccountWithParams, true); + request.addListener('validate', s3util.validateArnAccount); + request.addListener('validate', s3util.validateArnService); + request.addListener('build', this.populateParamFromArn, true); + request.addListener('build', this.populateUriFromArn); + request.addListener('build', s3util.validatePopulateUriFromArn); + } + + if (request.params.OutpostId && + (request.operation === 'createBucket' || + request.operation === 'listRegionalBuckets')) { + request.service.signingName = 's3-outposts'; + request.addListener('build', this.populateEndpointForOutpostId); + } + }, + + /** + * Adds outpostId header + */ + addOutpostIdHeader: function addOutpostIdHeader(req) { + req.httpRequest.headers['x-amz-outpost-id'] = req.service._parsedArn.outpostId; + }, + + /** + * Validate Outposts ARN supplied in Bucket parameter is a valid bucket name + */ + validateOutpostsBucketArn: function validateOutpostsBucketArn(req) { + var parsedArn = req.service._parsedArn; + + //can be ':' or '/' + var delimiter = parsedArn.resource['outpost'.length]; + + if (parsedArn.resource.split(delimiter).length !== 4) { + throw AWS.util.error(new Error(), { + code: 'InvalidARN', + message: 'Bucket ARN should have two resources outpost/{outpostId}/bucket/{accesspointName}' + }); + } - function handleShell(fn, cmd, opts) { - let file = "/bin/sh"; - let args = ["-c", cmd]; + var bucket = parsedArn.resource.split(delimiter)[3]; + if (!s3util.dnsCompatibleBucketName(bucket) || bucket.match(/\./)) { + throw AWS.util.error(new Error(), { + code: 'InvalidARN', + message: 'Bucket ARN is not DNS compatible. Got ' + bucket + }); + } + + //set parsed valid bucket + req.service._parsedArn.bucket = bucket; + }, + + /** + * @api private + */ + populateParamFromArn: function populateParamFromArn(req) { + var parsedArn = req.service._parsedArn; + if (s3util.isArnInParam(req, 'Bucket')) { + req.params.Bucket = parsedArn.bucket; + } else if (s3util.isArnInParam(req, 'Name')) { + req.params.Name = parsedArn.accessPoint; + } + }, + + /** + * Populate URI according to the ARN + */ + populateUriFromArn: function populateUriFromArn(req) { + var parsedArn = req.service._parsedArn; + + var endpoint = req.httpRequest.endpoint; + var useArnRegion = req.service.config.s3UseArnRegion; + + endpoint.hostname = [ + 's3-outposts', + useArnRegion ? parsedArn.region : req.service.config.region, + 'amazonaws.com' + ].join('.'); + endpoint.host = endpoint.hostname; + }, + + /** + * @api private + */ + populateEndpointForOutpostId: function populateEndpointForOutpostId(req) { + var endpoint = req.httpRequest.endpoint; + endpoint.hostname = [ + 's3-outposts', + req.service.config.region, + 'amazonaws.com' + ].join('.'); + endpoint.host = endpoint.hostname; + }, + + /** + * @api private + */ + extractHostId: function(response) { + var hostId = response.httpResponse.headers ? response.httpResponse.headers['x-amz-id-2'] : null; + response.extendedRequestId = hostId; + if (response.error) { + response.error.extendedRequestId = hostId; + } + }, + + /** + * @api private + */ + validateArnAccountWithParams: function validateArnAccountWithParams(req) { + var params = req.params; + var inputModel = req.service.api.operations[req.operation].input; + if (inputModel.members.AccountId) { + var parsedArn = req.service._parsedArn; + if (parsedArn.accountId) { + if (params.AccountId) { + if (params.AccountId !== parsedArn.accountId) { + throw AWS.util.error( + new Error(), + {code: 'ValidationError', message: 'AccountId in ARN and request params should be same.'} + ); + } + } else { + // Store accountId from ARN in params + params.AccountId = parsedArn.accountId; + } + } + } + }, + + /** + * @api private + */ + validateAccountId: function(request) { + var params = request.params; + if (!Object.prototype.hasOwnProperty.call(params, 'AccountId')) return; + var accountId = params.AccountId; + //validate type + if (typeof accountId !== 'string') { + throw AWS.util.error( + new Error(), + {code: 'ValidationError', message: 'AccountId must be a string.'} + ); + } + //validate length + if (accountId.length < 1 || accountId.length > 63) { + throw AWS.util.error( + new Error(), + {code: 'ValidationError', message: 'AccountId length should be between 1 to 63 characters, inclusive.'} + ); + } + //validate pattern + var hostPattern = /^[a-zA-Z0-9]{1}$|^[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9]$/; + if (!hostPattern.test(accountId)) { + throw AWS.util.error(new Error(), + {code: 'ValidationError', message: 'AccountId should be hostname compatible. AccountId: ' + accountId}); + } + }, + + /** + * @api private + */ + getSigningName: function getSigningName() { + var _super = AWS.Service.prototype.getSigningName; + return (this.signingName) + ? this.signingName + : _super.call(this); + }, +}); + + +/***/ }), + +/***/ 35895: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var AWS = __nccwpck_require__(28437); +var regionUtil = __nccwpck_require__(18262); + +var s3util = { + /** + * @api private + */ + isArnInParam: function isArnInParam(req, paramName) { + var inputShape = (req.service.api.operations[req.operation] || {}).input || {}; + var inputMembers = inputShape.members || {}; + if (!req.params[paramName] || !inputMembers[paramName]) return false; + return AWS.util.ARN.validate(req.params[paramName]); + }, + + /** + * Validate service component from ARN supplied in Bucket parameter + */ + validateArnService: function validateArnService(req) { + var parsedArn = req.service._parsedArn; + + if (parsedArn.service !== 's3' && parsedArn.service !== 's3-outposts') { + throw AWS.util.error(new Error(), { + code: 'InvalidARN', + message: 'expect \'s3\' or \'s3-outposts\' in ARN service component' + }); + } + }, + + /** + * Validate account ID from ARN supplied in Bucket parameter is a valid account + */ + validateArnAccount: function validateArnAccount(req) { + var parsedArn = req.service._parsedArn; + + if (!/[0-9]{12}/.exec(parsedArn.accountId)) { + throw AWS.util.error(new Error(), { + code: 'InvalidARN', + message: 'ARN accountID does not match regex "[0-9]{12}"' + }); + } + }, + + /** + * Validate ARN supplied in Bucket parameter is a valid access point ARN + */ + validateS3AccessPointArn: function validateS3AccessPointArn(req) { + var parsedArn = req.service._parsedArn; + + //can be ':' or '/' + var delimiter = parsedArn.resource['accesspoint'.length]; + + if (parsedArn.resource.split(delimiter).length !== 2) { + throw AWS.util.error(new Error(), { + code: 'InvalidARN', + message: 'Access Point ARN should have one resource accesspoint/{accesspointName}' + }); + } + + var accessPoint = parsedArn.resource.split(delimiter)[1]; + var accessPointPrefix = accessPoint + '-' + parsedArn.accountId; + if (!s3util.dnsCompatibleBucketName(accessPointPrefix) || accessPointPrefix.match(/\./)) { + throw AWS.util.error(new Error(), { + code: 'InvalidARN', + message: 'Access point resource in ARN is not DNS compatible. Got ' + accessPoint + }); + } - opts = Object.assign({}, opts); + //set parsed valid access point + req.service._parsedArn.accessPoint = accessPoint; + }, - if (process.platform === "win32") { - opts.__winShell = true; - file = process.env.comspec || "cmd.exe"; - args = ["/s", "/c", `"${cmd}"`]; - opts.windowsVerbatimArguments = true; - } + /** + * Validate Outposts ARN supplied in Bucket parameter is a valid outposts ARN + */ + validateOutpostsArn: function validateOutpostsArn(req) { + var parsedArn = req.service._parsedArn; - if (opts.shell) { - file = opts.shell; - delete opts.shell; - } + if ( + parsedArn.resource.indexOf('outpost:') !== 0 && + parsedArn.resource.indexOf('outpost/') !== 0 + ) { + throw AWS.util.error(new Error(), { + code: 'InvalidARN', + message: 'ARN resource should begin with \'outpost/\'' + }); + } + + //can be ':' or '/' + var delimiter = parsedArn.resource['outpost'.length]; + var outpostId = parsedArn.resource.split(delimiter)[1]; + var dnsHostRegex = new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/); + if (!dnsHostRegex.test(outpostId)) { + throw AWS.util.error(new Error(), { + code: 'InvalidARN', + message: 'Outpost resource in ARN is not DNS compatible. Got ' + outpostId + }); + } + req.service._parsedArn.outpostId = outpostId; + }, + + /** + * Validate Outposts ARN supplied in Bucket parameter is a valid outposts ARN + */ + validateOutpostsAccessPointArn: function validateOutpostsAccessPointArn(req) { + var parsedArn = req.service._parsedArn; + + //can be ':' or '/' + var delimiter = parsedArn.resource['outpost'.length]; + + if (parsedArn.resource.split(delimiter).length !== 4) { + throw AWS.util.error(new Error(), { + code: 'InvalidARN', + message: 'Outposts ARN should have two resources outpost/{outpostId}/accesspoint/{accesspointName}' + }); + } + + var accessPoint = parsedArn.resource.split(delimiter)[3]; + var accessPointPrefix = accessPoint + '-' + parsedArn.accountId; + if (!s3util.dnsCompatibleBucketName(accessPointPrefix) || accessPointPrefix.match(/\./)) { + throw AWS.util.error(new Error(), { + code: 'InvalidARN', + message: 'Access point resource in ARN is not DNS compatible. Got ' + accessPoint + }); + } + + //set parsed valid access point + req.service._parsedArn.accessPoint = accessPoint; + }, + + /** + * Validate region field in ARN supplied in Bucket parameter is a valid region + */ + validateArnRegion: function validateArnRegion(req) { + var useArnRegion = s3util.loadUseArnRegionConfig(req); + var regionFromArn = req.service._parsedArn.region; + var clientRegion = req.service.config.region; + + if (!regionFromArn) { + throw AWS.util.error(new Error(), { + code: 'InvalidARN', + message: 'ARN region is empty' + }); + } - return fn(file, args, opts); - } + if ( + clientRegion.indexOf('fips') >= 0 || + regionFromArn.indexOf('fips') >= 0 + ) { + throw AWS.util.error(new Error(), { + code: 'InvalidConfiguration', + message: 'ARN endpoint is not compatible with FIPS region' + }); + } - function getStream(process, stream, { encoding, buffer, maxBuffer }) { - if (!process[stream]) { - return null; - } + if (!useArnRegion && regionFromArn !== clientRegion) { + throw AWS.util.error(new Error(), { + code: 'InvalidConfiguration', + message: 'Configured region conflicts with access point region' + }); + } else if ( + useArnRegion && + regionUtil.getEndpointSuffix(regionFromArn) !== regionUtil.getEndpointSuffix(clientRegion) + ) { + throw AWS.util.error(new Error(), { + code: 'InvalidConfiguration', + message: 'Configured region and access point region not in same partition' + }); + } - let ret; + if (req.service.config.useAccelerateEndpoint) { + throw AWS.util.error(new Error(), { + code: 'InvalidConfiguration', + message: 'useAccelerateEndpoint config is not supported with access point ARN' + }); + } - if (!buffer) { - // TODO: Use `ret = util.promisify(stream.finished)(process[stream]);` when targeting Node.js 10 - ret = new Promise((resolve, reject) => { - process[stream].once("end", resolve).once("error", reject); - }); - } else if (encoding) { - ret = _getStream(process[stream], { - encoding, - maxBuffer, + if (req.service._parsedArn.service === 's3-outposts' && req.service.config.useDualstack) { + throw AWS.util.error(new Error(), { + code: 'InvalidConfiguration', + message: 'useDualstack config is not supported with outposts access point ARN' + }); + } + }, + + loadUseArnRegionConfig: function loadUseArnRegionConfig(req) { + var envName = 'AWS_S3_USE_ARN_REGION'; + var configName = 's3_use_arn_region'; + var useArnRegion = true; + var originalConfig = req.service._originalConfig || {}; + if (req.service.config.s3UseArnRegion !== undefined) { + return req.service.config.s3UseArnRegion; + } else if (originalConfig.s3UseArnRegion !== undefined) { + useArnRegion = originalConfig.s3UseArnRegion === true; + } else if (AWS.util.isNode()) { + //load from environmental variable AWS_USE_ARN_REGION + if (process.env[envName]) { + var value = process.env[envName].trim().toLowerCase(); + if (['false', 'true'].indexOf(value) < 0) { + throw AWS.util.error(new Error(), { + code: 'InvalidConfiguration', + message: envName + ' only accepts true or false. Got ' + process.env[envName], + retryable: false }); - } else { - ret = _getStream.buffer(process[stream], { maxBuffer }); } + useArnRegion = value === 'true'; + } else { //load from shared config property use_arn_region + var profiles = {}; + var profile = {}; + try { + profiles = AWS.util.getProfilesFromSharedConfig(AWS.util.iniLoader); + profile = profiles[process.env.AWS_PROFILE || AWS.util.defaultProfile]; + } catch (e) {} + if (profile[configName]) { + if (['false', 'true'].indexOf(profile[configName].trim().toLowerCase()) < 0) { + throw AWS.util.error(new Error(), { + code: 'InvalidConfiguration', + message: configName + ' only accepts true or false. Got ' + profile[configName], + retryable: false + }); + } + useArnRegion = profile[configName].trim().toLowerCase() === 'true'; + } + } + } + req.service.config.s3UseArnRegion = useArnRegion; + return useArnRegion; + }, - return ret.catch((err) => { - err.stream = stream; - err.message = `${stream} ${err.message}`; - throw err; - }); + /** + * Validations before URI can be populated + */ + validatePopulateUriFromArn: function validatePopulateUriFromArn(req) { + if (req.service._originalConfig && req.service._originalConfig.endpoint) { + throw AWS.util.error(new Error(), { + code: 'InvalidConfiguration', + message: 'Custom endpoint is not compatible with access point ARN' + }); + } + + if (req.service.config.s3ForcePathStyle) { + throw AWS.util.error(new Error(), { + code: 'InvalidConfiguration', + message: 'Cannot construct path-style endpoint with access point' + }); + } + }, + + /** + * Returns true if the bucket name is DNS compatible. Buckets created + * outside of the classic region MUST be DNS compatible. + * + * @api private + */ + dnsCompatibleBucketName: function dnsCompatibleBucketName(bucketName) { + var b = bucketName; + var domain = new RegExp(/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/); + var ipAddress = new RegExp(/(\d+\.){3}\d+/); + var dots = new RegExp(/\.\./); + return (b.match(domain) && !b.match(ipAddress) && !b.match(dots)) ? true : false; + }, +}; + +/** + * @api private + */ +module.exports = s3util; + + +/***/ }), + +/***/ 94571: +/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { + +var AWS = __nccwpck_require__(28437); + +AWS.util.update(AWS.SQS.prototype, { + /** + * @api private + */ + setupRequestListeners: function setupRequestListeners(request) { + request.addListener('build', this.buildEndpoint); + + if (request.service.config.computeChecksums) { + if (request.operation === 'sendMessage') { + request.addListener('extractData', this.verifySendMessageChecksum); + } else if (request.operation === 'sendMessageBatch') { + request.addListener('extractData', this.verifySendMessageBatchChecksum); + } else if (request.operation === 'receiveMessage') { + request.addListener('extractData', this.verifyReceiveMessageChecksum); + } + } + }, + + /** + * @api private + */ + verifySendMessageChecksum: function verifySendMessageChecksum(response) { + if (!response.data) return; + + var md5 = response.data.MD5OfMessageBody; + var body = this.params.MessageBody; + var calculatedMd5 = this.service.calculateChecksum(body); + if (calculatedMd5 !== md5) { + var msg = 'Got "' + response.data.MD5OfMessageBody + + '", expecting "' + calculatedMd5 + '".'; + this.service.throwInvalidChecksumError(response, + [response.data.MessageId], msg); + } + }, + + /** + * @api private + */ + verifySendMessageBatchChecksum: function verifySendMessageBatchChecksum(response) { + if (!response.data) return; + + var service = this.service; + var entries = {}; + var errors = []; + var messageIds = []; + AWS.util.arrayEach(response.data.Successful, function (entry) { + entries[entry.Id] = entry; + }); + AWS.util.arrayEach(this.params.Entries, function (entry) { + if (entries[entry.Id]) { + var md5 = entries[entry.Id].MD5OfMessageBody; + var body = entry.MessageBody; + if (!service.isChecksumValid(md5, body)) { + errors.push(entry.Id); + messageIds.push(entries[entry.Id].MessageId); + } + } + }); + + if (errors.length > 0) { + service.throwInvalidChecksumError(response, messageIds, + 'Invalid messages: ' + errors.join(', ')); + } + }, + + /** + * @api private + */ + verifyReceiveMessageChecksum: function verifyReceiveMessageChecksum(response) { + if (!response.data) return; + + var service = this.service; + var messageIds = []; + AWS.util.arrayEach(response.data.Messages, function(message) { + var md5 = message.MD5OfBody; + var body = message.Body; + if (!service.isChecksumValid(md5, body)) { + messageIds.push(message.MessageId); + } + }); + + if (messageIds.length > 0) { + service.throwInvalidChecksumError(response, messageIds, + 'Invalid messages: ' + messageIds.join(', ')); + } + }, + + /** + * @api private + */ + throwInvalidChecksumError: function throwInvalidChecksumError(response, ids, message) { + response.error = AWS.util.error(new Error(), { + retryable: true, + code: 'InvalidChecksum', + messageIds: ids, + message: response.request.operation + + ' returned an invalid MD5 response. ' + message + }); + }, + + /** + * @api private + */ + isChecksumValid: function isChecksumValid(checksum, data) { + return this.calculateChecksum(data) === checksum; + }, + + /** + * @api private + */ + calculateChecksum: function calculateChecksum(data) { + return AWS.util.crypto.md5(data, 'hex'); + }, + + /** + * @api private + */ + buildEndpoint: function buildEndpoint(request) { + var url = request.httpRequest.params.QueueUrl; + if (url) { + request.httpRequest.endpoint = new AWS.Endpoint(url); + + // signature version 4 requires the region name to be set, + // sqs queue urls contain the region name + var matches = request.httpRequest.endpoint.host.match(/^sqs\.(.+?)\./); + if (matches) request.httpRequest.region = matches[1]; + } + } +}); + + +/***/ }), + +/***/ 91055: +/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { + +var AWS = __nccwpck_require__(28437); +var resolveRegionalEndpointsFlag = __nccwpck_require__(85566); +var ENV_REGIONAL_ENDPOINT_ENABLED = 'AWS_STS_REGIONAL_ENDPOINTS'; +var CONFIG_REGIONAL_ENDPOINT_ENABLED = 'sts_regional_endpoints'; + +AWS.util.update(AWS.STS.prototype, { + /** + * @overload credentialsFrom(data, credentials = null) + * Creates a credentials object from STS response data containing + * credentials information. Useful for quickly setting AWS credentials. + * + * @note This is a low-level utility function. If you want to load temporary + * credentials into your process for subsequent requests to AWS resources, + * you should use {AWS.TemporaryCredentials} instead. + * @param data [map] data retrieved from a call to {getFederatedToken}, + * {getSessionToken}, {assumeRole}, or {assumeRoleWithWebIdentity}. + * @param credentials [AWS.Credentials] an optional credentials object to + * fill instead of creating a new object. Useful when modifying an + * existing credentials object from a refresh call. + * @return [AWS.TemporaryCredentials] the set of temporary credentials + * loaded from a raw STS operation response. + * @example Using credentialsFrom to load global AWS credentials + * var sts = new AWS.STS(); + * sts.getSessionToken(function (err, data) { + * if (err) console.log("Error getting credentials"); + * else { + * AWS.config.credentials = sts.credentialsFrom(data); + * } + * }); + * @see AWS.TemporaryCredentials + */ + credentialsFrom: function credentialsFrom(data, credentials) { + if (!data) return null; + if (!credentials) credentials = new AWS.TemporaryCredentials(); + credentials.expired = false; + credentials.accessKeyId = data.Credentials.AccessKeyId; + credentials.secretAccessKey = data.Credentials.SecretAccessKey; + credentials.sessionToken = data.Credentials.SessionToken; + credentials.expireTime = data.Credentials.Expiration; + return credentials; + }, + + assumeRoleWithWebIdentity: function assumeRoleWithWebIdentity(params, callback) { + return this.makeUnauthenticatedRequest('assumeRoleWithWebIdentity', params, callback); + }, + + assumeRoleWithSAML: function assumeRoleWithSAML(params, callback) { + return this.makeUnauthenticatedRequest('assumeRoleWithSAML', params, callback); + }, + + /** + * @api private + */ + setupRequestListeners: function setupRequestListeners(request) { + request.addListener('validate', this.optInRegionalEndpoint, true); + }, + + /** + * @api private + */ + optInRegionalEndpoint: function optInRegionalEndpoint(req) { + var service = req.service; + var config = service.config; + config.stsRegionalEndpoints = resolveRegionalEndpointsFlag(service._originalConfig, { + env: ENV_REGIONAL_ENDPOINT_ENABLED, + sharedConfig: CONFIG_REGIONAL_ENDPOINT_ENABLED, + clientConfig: 'stsRegionalEndpoints' + }); + if ( + config.stsRegionalEndpoints === 'regional' && + service.isGlobalEndpoint + ) { + //client will throw if region is not supplied; request will be signed with specified region + if (!config.region) { + throw AWS.util.error(new Error(), + {code: 'ConfigError', message: 'Missing region in config'}); } + var insertPoint = config.endpoint.indexOf('.amazonaws.com'); + var regionalEndpoint = config.endpoint.substring(0, insertPoint) + + '.' + config.region + config.endpoint.substring(insertPoint); + req.httpRequest.updateEndpoint(regionalEndpoint); + req.httpRequest.region = config.region; + } + } + +}); + + +/***/ }), - function makeError(result, options) { - const { stdout, stderr } = result; +/***/ 31987: +/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { + +var AWS = __nccwpck_require__(28437); + +AWS.util.hideProperties(AWS, ['SimpleWorkflow']); + +/** + * @constant + * @readonly + * Backwards compatibility for access to the {AWS.SWF} service class. + */ +AWS.SimpleWorkflow = AWS.SWF; - let err = result.error; - const { code, signal } = result; - const { parsed, joinedCmd } = options; - const timedOut = options.timedOut || false; +/***/ }), - if (!err) { - let output = ""; +/***/ 29697: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - if (Array.isArray(parsed.opts.stdio)) { - if (parsed.opts.stdio[2] !== "inherit") { - output += output.length > 0 ? stderr : `\n${stderr}`; - } +var IniLoader = (__nccwpck_require__(95417).IniLoader); +/** + * Singleton object to load specified config/credentials files. + * It will cache all the files ever loaded; + */ +module.exports.b = new IniLoader(); - if (parsed.opts.stdio[1] !== "inherit") { - output += `\n${stdout}`; - } - } else if (parsed.opts.stdio !== "inherit") { - output = `\n${stderr}${stdout}`; - } - err = new Error(`Command failed: ${joinedCmd}${output}`); - err.code = code < 0 ? errname(code) : code; - } +/***/ }), - err.stdout = stdout; - err.stderr = stderr; - err.failed = true; - err.signal = signal || null; - err.cmd = joinedCmd; - err.timedOut = timedOut; +/***/ 95417: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - return err; - } +var AWS = __nccwpck_require__(28437); +var os = __nccwpck_require__(22037); +var path = __nccwpck_require__(71017); - function joinCmd(cmd, args) { - let joinedCmd = cmd; +function parseFile(filename, isConfig) { + var content = AWS.util.ini.parse(AWS.util.readFileSync(filename)); + var tmpContent = {}; + Object.keys(content).forEach(function(profileName) { + var profileContent = content[profileName]; + profileName = isConfig ? profileName.replace(/^profile\s/, '') : profileName; + Object.defineProperty(tmpContent, profileName, { + value: profileContent, + enumerable: true + }); + }); + return tmpContent; +} + +/** + * Ini file loader class the same as that used in the SDK. It loads and + * parses config and credentials files in .ini format and cache the content + * to assure files are only read once. + * Note that calling operations on the instance instantiated from this class + * won't affect the behavior of SDK since SDK uses an internal singleton of + * this class. + * @!macro nobrowser + */ +AWS.IniLoader = AWS.util.inherit({ + constructor: function IniLoader() { + this.resolvedProfiles = {}; + }, + + /** Remove all cached files. Used after config files are updated. */ + clearCachedFiles: function clearCachedFiles() { + this.resolvedProfiles = {}; + }, + +/** + * Load configurations from config/credentials files and cache them + * for later use. If no file is specified it will try to load default + * files. + * @param options [map] information describing the file + * @option options filename [String] ('~/.aws/credentials' or defined by + * AWS_SHARED_CREDENTIALS_FILE process env var or '~/.aws/config' if + * isConfig is set to true) + * path to the file to be read. + * @option options isConfig [Boolean] (false) True to read config file. + * @return [map] object containing contents from file in key-value + * pairs. + */ + loadFrom: function loadFrom(options) { + options = options || {}; + var isConfig = options.isConfig === true; + var filename = options.filename || this.getDefaultFilePath(isConfig); + if (!this.resolvedProfiles[filename]) { + var fileContent = this.parseFile(filename, isConfig); + Object.defineProperty(this.resolvedProfiles, filename, { value: fileContent }); + } + return this.resolvedProfiles[filename]; + }, + + /** + * @api private + */ + parseFile: parseFile, + + /** + * @api private + */ + getDefaultFilePath: function getDefaultFilePath(isConfig) { + return path.join( + this.getHomeDir(), + '.aws', + isConfig ? 'config' : 'credentials' + ); + }, + + /** + * @api private + */ + getHomeDir: function getHomeDir() { + var env = process.env; + var home = env.HOME || + env.USERPROFILE || + (env.HOMEPATH ? ((env.HOMEDRIVE || 'C:/') + env.HOMEPATH) : null); + + if (home) { + return home; + } + + if (typeof os.homedir === 'function') { + return os.homedir(); + } + + throw AWS.util.error( + new Error('Cannot load credentials, HOME path not set') + ); + } +}); + +var IniLoader = AWS.IniLoader; + +module.exports = { + IniLoader: IniLoader, + parseFile: parseFile, +}; + + +/***/ }), + +/***/ 60328: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var AWS = __nccwpck_require__(28437); +var inherit = AWS.util.inherit; + +/** + * @api private + */ +var expiresHeader = 'presigned-expires'; - if (Array.isArray(args) && args.length > 0) { - joinedCmd += " " + args.join(" "); +/** + * @api private + */ +function signedUrlBuilder(request) { + var expires = request.httpRequest.headers[expiresHeader]; + var signerClass = request.service.getSignerClass(request); + + delete request.httpRequest.headers['User-Agent']; + delete request.httpRequest.headers['X-Amz-User-Agent']; + + if (signerClass === AWS.Signers.V4) { + if (expires > 604800) { // one week expiry is invalid + var message = 'Presigning does not support expiry time greater ' + + 'than a week with SigV4 signing.'; + throw AWS.util.error(new Error(), { + code: 'InvalidExpiryTime', message: message, retryable: false + }); + } + request.httpRequest.headers[expiresHeader] = expires; + } else if (signerClass === AWS.Signers.S3) { + var now = request.service ? request.service.getSkewCorrectedDate() : AWS.util.date.getDate(); + request.httpRequest.headers[expiresHeader] = parseInt( + AWS.util.date.unixTimestamp(now) + expires, 10).toString(); + } else { + throw AWS.util.error(new Error(), { + message: 'Presigning only supports S3 or SigV4 signing.', + code: 'UnsupportedSigner', retryable: false + }); + } +} + +/** + * @api private + */ +function signedUrlSigner(request) { + var endpoint = request.httpRequest.endpoint; + var parsedUrl = AWS.util.urlParse(request.httpRequest.path); + var queryParams = {}; + + if (parsedUrl.search) { + queryParams = AWS.util.queryStringParse(parsedUrl.search.substr(1)); + } + + var auth = request.httpRequest.headers['Authorization'].split(' '); + if (auth[0] === 'AWS') { + auth = auth[1].split(':'); + queryParams['Signature'] = auth.pop(); + queryParams['AWSAccessKeyId'] = auth.join(':'); + + AWS.util.each(request.httpRequest.headers, function (key, value) { + if (key === expiresHeader) key = 'Expires'; + if (key.indexOf('x-amz-meta-') === 0) { + // Delete existing, potentially not normalized key + delete queryParams[key]; + key = key.toLowerCase(); + } + queryParams[key] = value; + }); + delete request.httpRequest.headers[expiresHeader]; + delete queryParams['Authorization']; + delete queryParams['Host']; + } else if (auth[0] === 'AWS4-HMAC-SHA256') { // SigV4 signing + auth.shift(); + var rest = auth.join(' '); + var signature = rest.match(/Signature=(.*?)(?:,|\s|\r?\n|$)/)[1]; + queryParams['X-Amz-Signature'] = signature; + delete queryParams['Expires']; + } + + // build URL + endpoint.pathname = parsedUrl.pathname; + endpoint.search = AWS.util.queryParamsToString(queryParams); +} + +/** + * @api private + */ +AWS.Signers.Presign = inherit({ + /** + * @api private + */ + sign: function sign(request, expireTime, callback) { + request.httpRequest.headers[expiresHeader] = expireTime || 3600; + request.on('build', signedUrlBuilder); + request.on('sign', signedUrlSigner); + request.removeListener('afterBuild', + AWS.EventListeners.Core.SET_CONTENT_LENGTH); + request.removeListener('afterBuild', + AWS.EventListeners.Core.COMPUTE_SHA256); + + request.emit('beforePresign', [request]); + + if (callback) { + request.build(function() { + if (this.response.error) callback(this.response.error); + else { + callback(null, AWS.util.urlFormat(request.httpRequest.endpoint)); } + }); + } else { + request.build(); + if (request.response.error) throw request.response.error; + return AWS.util.urlFormat(request.httpRequest.endpoint); + } + } +}); + +/** + * @api private + */ +module.exports = AWS.Signers.Presign; - return joinedCmd; - } - module.exports = (cmd, args, opts) => { - const parsed = handleArgs(cmd, args, opts); - const { encoding, buffer, maxBuffer } = parsed.opts; - const joinedCmd = joinCmd(cmd, args); +/***/ }), - let spawned; - try { - spawned = childProcess.spawn(parsed.cmd, parsed.args, parsed.opts); - } catch (err) { - return Promise.reject(err); - } +/***/ 9897: +/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { - let removeExitHandler; - if (parsed.opts.cleanup) { - removeExitHandler = onExit(() => { - spawned.kill(); - }); - } +var AWS = __nccwpck_require__(28437); - let timeoutId = null; - let timedOut = false; +var inherit = AWS.util.inherit; - const cleanup = () => { - if (timeoutId) { - clearTimeout(timeoutId); - timeoutId = null; - } +/** + * @api private + */ +AWS.Signers.RequestSigner = inherit({ + constructor: function RequestSigner(request) { + this.request = request; + }, + + setServiceClientId: function setServiceClientId(id) { + this.serviceClientId = id; + }, + + getServiceClientId: function getServiceClientId() { + return this.serviceClientId; + } +}); + +AWS.Signers.RequestSigner.getVersion = function getVersion(version) { + switch (version) { + case 'v2': return AWS.Signers.V2; + case 'v3': return AWS.Signers.V3; + case 's3v4': return AWS.Signers.V4; + case 'v4': return AWS.Signers.V4; + case 's3': return AWS.Signers.S3; + case 'v3https': return AWS.Signers.V3Https; + } + throw new Error('Unknown signing version ' + version); +}; + +__nccwpck_require__(28489); +__nccwpck_require__(66458); +__nccwpck_require__(24473); +__nccwpck_require__(26529); +__nccwpck_require__(58616); +__nccwpck_require__(60328); + + +/***/ }), + +/***/ 58616: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var AWS = __nccwpck_require__(28437); +var inherit = AWS.util.inherit; + +/** + * @api private + */ +AWS.Signers.S3 = inherit(AWS.Signers.RequestSigner, { + /** + * When building the stringToSign, these sub resource params should be + * part of the canonical resource string with their NON-decoded values + */ + subResources: { + 'acl': 1, + 'accelerate': 1, + 'analytics': 1, + 'cors': 1, + 'lifecycle': 1, + 'delete': 1, + 'inventory': 1, + 'location': 1, + 'logging': 1, + 'metrics': 1, + 'notification': 1, + 'partNumber': 1, + 'policy': 1, + 'requestPayment': 1, + 'replication': 1, + 'restore': 1, + 'tagging': 1, + 'torrent': 1, + 'uploadId': 1, + 'uploads': 1, + 'versionId': 1, + 'versioning': 1, + 'versions': 1, + 'website': 1 + }, + + // when building the stringToSign, these querystring params should be + // part of the canonical resource string with their NON-encoded values + responseHeaders: { + 'response-content-type': 1, + 'response-content-language': 1, + 'response-expires': 1, + 'response-cache-control': 1, + 'response-content-disposition': 1, + 'response-content-encoding': 1 + }, + + addAuthorization: function addAuthorization(credentials, date) { + if (!this.request.headers['presigned-expires']) { + this.request.headers['X-Amz-Date'] = AWS.util.date.rfc822(date); + } + + if (credentials.sessionToken) { + // presigned URLs require this header to be lowercased + this.request.headers['x-amz-security-token'] = credentials.sessionToken; + } + + var signature = this.sign(credentials.secretAccessKey, this.stringToSign()); + var auth = 'AWS ' + credentials.accessKeyId + ':' + signature; + + this.request.headers['Authorization'] = auth; + }, + + stringToSign: function stringToSign() { + var r = this.request; + + var parts = []; + parts.push(r.method); + parts.push(r.headers['Content-MD5'] || ''); + parts.push(r.headers['Content-Type'] || ''); + + // This is the "Date" header, but we use X-Amz-Date. + // The S3 signing mechanism requires us to pass an empty + // string for this Date header regardless. + parts.push(r.headers['presigned-expires'] || ''); + + var headers = this.canonicalizedAmzHeaders(); + if (headers) parts.push(headers); + parts.push(this.canonicalizedResource()); + + return parts.join('\n'); + + }, + + canonicalizedAmzHeaders: function canonicalizedAmzHeaders() { + + var amzHeaders = []; + + AWS.util.each(this.request.headers, function (name) { + if (name.match(/^x-amz-/i)) + amzHeaders.push(name); + }); + + amzHeaders.sort(function (a, b) { + return a.toLowerCase() < b.toLowerCase() ? -1 : 1; + }); + + var parts = []; + AWS.util.arrayEach.call(this, amzHeaders, function (name) { + parts.push(name.toLowerCase() + ':' + String(this.request.headers[name])); + }); + + return parts.join('\n'); + + }, + + canonicalizedResource: function canonicalizedResource() { + + var r = this.request; + + var parts = r.path.split('?'); + var path = parts[0]; + var querystring = parts[1]; + + var resource = ''; + + if (r.virtualHostedBucket) + resource += '/' + r.virtualHostedBucket; + + resource += path; + + if (querystring) { + + // collect a list of sub resources and query params that need to be signed + var resources = []; - if (removeExitHandler) { - removeExitHandler(); + AWS.util.arrayEach.call(this, querystring.split('&'), function (param) { + var name = param.split('=')[0]; + var value = param.split('=')[1]; + if (this.subResources[name] || this.responseHeaders[name]) { + var subresource = { name: name }; + if (value !== undefined) { + if (this.subResources[name]) { + subresource.value = value; + } else { + subresource.value = decodeURIComponent(value); + } } - }; - - if (parsed.opts.timeout > 0) { - timeoutId = setTimeout(() => { - timeoutId = null; - timedOut = true; - spawned.kill(parsed.opts.killSignal); - }, parsed.opts.timeout); + resources.push(subresource); } + }); - const processDone = new Promise((resolve) => { - spawned.on("exit", (code, signal) => { - cleanup(); - resolve({ code, signal }); - }); + resources.sort(function (a, b) { return a.name < b.name ? -1 : 1; }); - spawned.on("error", (err) => { - cleanup(); - resolve({ error: err }); - }); + if (resources.length) { - if (spawned.stdin) { - spawned.stdin.on("error", (err) => { - cleanup(); - resolve({ error: err }); - }); + querystring = []; + AWS.util.arrayEach(resources, function (res) { + if (res.value === undefined) { + querystring.push(res.name); + } else { + querystring.push(res.name + '=' + res.value); } }); - function destroy() { - if (spawned.stdout) { - spawned.stdout.destroy(); - } + resource += '?' + querystring.join('&'); + } - if (spawned.stderr) { - spawned.stderr.destroy(); - } - } + } - const handlePromise = () => - pFinally( - Promise.all([ - processDone, - getStream(spawned, "stdout", { encoding, buffer, maxBuffer }), - getStream(spawned, "stderr", { encoding, buffer, maxBuffer }), - ]).then((arr) => { - const result = arr[0]; - result.stdout = arr[1]; - result.stderr = arr[2]; - - if (result.error || result.code !== 0 || result.signal !== null) { - const err = makeError(result, { - joinedCmd, - parsed, - timedOut, - }); + return resource; - // TODO: missing some timeout logic for killed - // https://github.com/nodejs/node/blob/master/lib/child_process.js#L203 - // err.killed = spawned.killed || killed; - err.killed = err.killed || spawned.killed; + }, - if (!parsed.opts.reject) { - return err; - } + sign: function sign(secret, string) { + return AWS.util.crypto.hmac(secret, string, 'base64', 'sha1'); + } +}); - throw err; - } +/** + * @api private + */ +module.exports = AWS.Signers.S3; - return { - stdout: handleOutput(parsed.opts, result.stdout), - stderr: handleOutput(parsed.opts, result.stderr), - code: 0, - failed: false, - killed: false, - signal: null, - cmd: joinedCmd, - timedOut: false, - }; - }), - destroy - ); - crossSpawn._enoent.hookChildProcess(spawned, parsed.parsed); +/***/ }), - handleInput(spawned, parsed.opts.input); +/***/ 28489: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - spawned.then = (onfulfilled, onrejected) => - handlePromise().then(onfulfilled, onrejected); - spawned.catch = (onrejected) => handlePromise().catch(onrejected); +var AWS = __nccwpck_require__(28437); +var inherit = AWS.util.inherit; - return spawned; - }; +/** + * @api private + */ +AWS.Signers.V2 = inherit(AWS.Signers.RequestSigner, { + addAuthorization: function addAuthorization(credentials, date) { - // TODO: set `stderr: 'ignore'` when that option is implemented - module.exports.stdout = (...args) => - module.exports(...args).then((x) => x.stdout); + if (!date) date = AWS.util.date.getDate(); - // TODO: set `stdout: 'ignore'` when that option is implemented - module.exports.stderr = (...args) => - module.exports(...args).then((x) => x.stderr); + var r = this.request; - module.exports.shell = (cmd, opts) => - handleShell(module.exports, cmd, opts); + r.params.Timestamp = AWS.util.date.iso8601(date); + r.params.SignatureVersion = '2'; + r.params.SignatureMethod = 'HmacSHA256'; + r.params.AWSAccessKeyId = credentials.accessKeyId; - module.exports.sync = (cmd, args, opts) => { - const parsed = handleArgs(cmd, args, opts); - const joinedCmd = joinCmd(cmd, args); + if (credentials.sessionToken) { + r.params.SecurityToken = credentials.sessionToken; + } - if (isStream(parsed.opts.input)) { - throw new TypeError( - "The `input` option cannot be a stream in sync mode" - ); - } + delete r.params.Signature; // delete old Signature for re-signing + r.params.Signature = this.signature(credentials); - const result = childProcess.spawnSync( - parsed.cmd, - parsed.args, - parsed.opts - ); - result.code = result.status; + r.body = AWS.util.queryParamsToString(r.params); + r.headers['Content-Length'] = r.body.length; + }, - if (result.error || result.status !== 0 || result.signal !== null) { - const err = makeError(result, { - joinedCmd, - parsed, - }); + signature: function signature(credentials) { + return AWS.util.crypto.hmac(credentials.secretAccessKey, this.stringToSign(), 'base64'); + }, - if (!parsed.opts.reject) { - return err; - } + stringToSign: function stringToSign() { + var parts = []; + parts.push(this.request.method); + parts.push(this.request.endpoint.host.toLowerCase()); + parts.push(this.request.pathname()); + parts.push(AWS.util.queryParamsToString(this.request.params)); + return parts.join('\n'); + } - throw err; - } +}); - return { - stdout: handleOutput(parsed.opts, result.stdout), - stderr: handleOutput(parsed.opts, result.stderr), - code: 0, - failed: false, - signal: null, - cmd: joinedCmd, - timedOut: false, - }; - }; +/** + * @api private + */ +module.exports = AWS.Signers.V2; - module.exports.shellSync = (cmd, opts) => - handleShell(module.exports.sync, cmd, opts); - /***/ - }, +/***/ }), - /***/ 64689: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - "use strict"; +/***/ 66458: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - // Older verions of Node.js might not have `util.getSystemErrorName()`. - // In that case, fall back to a deprecated internal. - const util = __nccwpck_require__(73837); +var AWS = __nccwpck_require__(28437); +var inherit = AWS.util.inherit; - let uv; +/** + * @api private + */ +AWS.Signers.V3 = inherit(AWS.Signers.RequestSigner, { + addAuthorization: function addAuthorization(credentials, date) { + + var datetime = AWS.util.date.rfc822(date); + + this.request.headers['X-Amz-Date'] = datetime; + + if (credentials.sessionToken) { + this.request.headers['x-amz-security-token'] = credentials.sessionToken; + } + + this.request.headers['X-Amzn-Authorization'] = + this.authorization(credentials, datetime); + + }, + + authorization: function authorization(credentials) { + return 'AWS3 ' + + 'AWSAccessKeyId=' + credentials.accessKeyId + ',' + + 'Algorithm=HmacSHA256,' + + 'SignedHeaders=' + this.signedHeaders() + ',' + + 'Signature=' + this.signature(credentials); + }, + + signedHeaders: function signedHeaders() { + var headers = []; + AWS.util.arrayEach(this.headersToSign(), function iterator(h) { + headers.push(h.toLowerCase()); + }); + return headers.sort().join(';'); + }, + + canonicalHeaders: function canonicalHeaders() { + var headers = this.request.headers; + var parts = []; + AWS.util.arrayEach(this.headersToSign(), function iterator(h) { + parts.push(h.toLowerCase().trim() + ':' + String(headers[h]).trim()); + }); + return parts.sort().join('\n') + '\n'; + }, + + headersToSign: function headersToSign() { + var headers = []; + AWS.util.each(this.request.headers, function iterator(k) { + if (k === 'Host' || k === 'Content-Encoding' || k.match(/^X-Amz/i)) { + headers.push(k); + } + }); + return headers; + }, + + signature: function signature(credentials) { + return AWS.util.crypto.hmac(credentials.secretAccessKey, this.stringToSign(), 'base64'); + }, + + stringToSign: function stringToSign() { + var parts = []; + parts.push(this.request.method); + parts.push('/'); + parts.push(''); + parts.push(this.canonicalHeaders()); + parts.push(this.request.body); + return AWS.util.crypto.sha256(parts.join('\n')); + } + +}); + +/** + * @api private + */ +module.exports = AWS.Signers.V3; - if (typeof util.getSystemErrorName === "function") { - module.exports = util.getSystemErrorName; - } else { - try { - uv = process.binding("uv"); - if (typeof uv.errname !== "function") { - throw new TypeError("uv.errname is not a function"); - } - } catch (err) { - console.error( - "execa/lib/errname: unable to establish process.binding('uv')", - err - ); - uv = null; - } +/***/ }), - module.exports = (code) => errname(uv, code); - } +/***/ 24473: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - // Used for testing the fallback behavior - module.exports.__test__ = errname; +var AWS = __nccwpck_require__(28437); +var inherit = AWS.util.inherit; - function errname(uv, code) { - if (uv) { - return uv.errname(code); - } +__nccwpck_require__(66458); - if (!(code < 0)) { - throw new Error("err >= 0"); - } +/** + * @api private + */ +AWS.Signers.V3Https = inherit(AWS.Signers.V3, { + authorization: function authorization(credentials) { + return 'AWS3-HTTPS ' + + 'AWSAccessKeyId=' + credentials.accessKeyId + ',' + + 'Algorithm=HmacSHA256,' + + 'Signature=' + this.signature(credentials); + }, + + stringToSign: function stringToSign() { + return this.request.headers['X-Amz-Date']; + } +}); + +/** + * @api private + */ +module.exports = AWS.Signers.V3Https; - return `Unknown system error ${code}`; - } - /***/ - }, +/***/ }), - /***/ 10166: /***/ (module) => { - "use strict"; +/***/ 26529: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - const alias = ["stdin", "stdout", "stderr"]; +var AWS = __nccwpck_require__(28437); +var v4Credentials = __nccwpck_require__(62660); +var inherit = AWS.util.inherit; - const hasAlias = (opts) => alias.some((x) => Boolean(opts[x])); +/** + * @api private + */ +var expiresHeader = 'presigned-expires'; - module.exports = (opts) => { - if (!opts) { - return null; +/** + * @api private + */ +AWS.Signers.V4 = inherit(AWS.Signers.RequestSigner, { + constructor: function V4(request, serviceName, options) { + AWS.Signers.RequestSigner.call(this, request); + this.serviceName = serviceName; + options = options || {}; + this.signatureCache = typeof options.signatureCache === 'boolean' ? options.signatureCache : true; + this.operation = options.operation; + this.signatureVersion = options.signatureVersion; + }, + + algorithm: 'AWS4-HMAC-SHA256', + + addAuthorization: function addAuthorization(credentials, date) { + var datetime = AWS.util.date.iso8601(date).replace(/[:\-]|\.\d{3}/g, ''); + + if (this.isPresigned()) { + this.updateForPresigned(credentials, datetime); + } else { + this.addHeaders(credentials, datetime); + } + + this.request.headers['Authorization'] = + this.authorization(credentials, datetime); + }, + + addHeaders: function addHeaders(credentials, datetime) { + this.request.headers['X-Amz-Date'] = datetime; + if (credentials.sessionToken) { + this.request.headers['x-amz-security-token'] = credentials.sessionToken; + } + }, + + updateForPresigned: function updateForPresigned(credentials, datetime) { + var credString = this.credentialString(datetime); + var qs = { + 'X-Amz-Date': datetime, + 'X-Amz-Algorithm': this.algorithm, + 'X-Amz-Credential': credentials.accessKeyId + '/' + credString, + 'X-Amz-Expires': this.request.headers[expiresHeader], + 'X-Amz-SignedHeaders': this.signedHeaders() + }; + + if (credentials.sessionToken) { + qs['X-Amz-Security-Token'] = credentials.sessionToken; + } + + if (this.request.headers['Content-Type']) { + qs['Content-Type'] = this.request.headers['Content-Type']; + } + if (this.request.headers['Content-MD5']) { + qs['Content-MD5'] = this.request.headers['Content-MD5']; + } + if (this.request.headers['Cache-Control']) { + qs['Cache-Control'] = this.request.headers['Cache-Control']; + } + + // need to pull in any other X-Amz-* headers + AWS.util.each.call(this, this.request.headers, function(key, value) { + if (key === expiresHeader) return; + if (this.isSignableHeader(key)) { + var lowerKey = key.toLowerCase(); + // Metadata should be normalized + if (lowerKey.indexOf('x-amz-meta-') === 0) { + qs[lowerKey] = value; + } else if (lowerKey.indexOf('x-amz-') === 0) { + qs[key] = value; + } + } + }); + + var sep = this.request.path.indexOf('?') >= 0 ? '&' : '?'; + this.request.path += sep + AWS.util.queryParamsToString(qs); + }, + + authorization: function authorization(credentials, datetime) { + var parts = []; + var credString = this.credentialString(datetime); + parts.push(this.algorithm + ' Credential=' + + credentials.accessKeyId + '/' + credString); + parts.push('SignedHeaders=' + this.signedHeaders()); + parts.push('Signature=' + this.signature(credentials, datetime)); + return parts.join(', '); + }, + + signature: function signature(credentials, datetime) { + var signingKey = v4Credentials.getSigningKey( + credentials, + datetime.substr(0, 8), + this.request.region, + this.serviceName, + this.signatureCache + ); + return AWS.util.crypto.hmac(signingKey, this.stringToSign(datetime), 'hex'); + }, + + stringToSign: function stringToSign(datetime) { + var parts = []; + parts.push('AWS4-HMAC-SHA256'); + parts.push(datetime); + parts.push(this.credentialString(datetime)); + parts.push(this.hexEncodedHash(this.canonicalString())); + return parts.join('\n'); + }, + + canonicalString: function canonicalString() { + var parts = [], pathname = this.request.pathname(); + if (this.serviceName !== 's3' && this.signatureVersion !== 's3v4') pathname = AWS.util.uriEscapePath(pathname); + + parts.push(this.request.method); + parts.push(pathname); + parts.push(this.request.search()); + parts.push(this.canonicalHeaders() + '\n'); + parts.push(this.signedHeaders()); + parts.push(this.hexEncodedBodyHash()); + return parts.join('\n'); + }, + + canonicalHeaders: function canonicalHeaders() { + var headers = []; + AWS.util.each.call(this, this.request.headers, function (key, item) { + headers.push([key, item]); + }); + headers.sort(function (a, b) { + return a[0].toLowerCase() < b[0].toLowerCase() ? -1 : 1; + }); + var parts = []; + AWS.util.arrayEach.call(this, headers, function (item) { + var key = item[0].toLowerCase(); + if (this.isSignableHeader(key)) { + var value = item[1]; + if (typeof value === 'undefined' || value === null || typeof value.toString !== 'function') { + throw AWS.util.error(new Error('Header ' + key + ' contains invalid value'), { + code: 'InvalidHeader' + }); } + parts.push(key + ':' + + this.canonicalHeaderValues(value.toString())); + } + }); + return parts.join('\n'); + }, + + canonicalHeaderValues: function canonicalHeaderValues(values) { + return values.replace(/\s+/g, ' ').replace(/^\s+|\s+$/g, ''); + }, + + signedHeaders: function signedHeaders() { + var keys = []; + AWS.util.each.call(this, this.request.headers, function (key) { + key = key.toLowerCase(); + if (this.isSignableHeader(key)) keys.push(key); + }); + return keys.sort().join(';'); + }, + + credentialString: function credentialString(datetime) { + return v4Credentials.createScope( + datetime.substr(0, 8), + this.request.region, + this.serviceName + ); + }, + + hexEncodedHash: function hash(string) { + return AWS.util.crypto.sha256(string, 'hex'); + }, + + hexEncodedBodyHash: function hexEncodedBodyHash() { + var request = this.request; + if (this.isPresigned() && this.serviceName === 's3' && !request.body) { + return 'UNSIGNED-PAYLOAD'; + } else if (request.headers['X-Amz-Content-Sha256']) { + return request.headers['X-Amz-Content-Sha256']; + } else { + return this.hexEncodedHash(this.request.body || ''); + } + }, + + unsignableHeaders: [ + 'authorization', + 'content-type', + 'content-length', + 'user-agent', + expiresHeader, + 'expect', + 'x-amzn-trace-id' + ], + + isSignableHeader: function isSignableHeader(key) { + if (key.toLowerCase().indexOf('x-amz-') === 0) return true; + return this.unsignableHeaders.indexOf(key) < 0; + }, + + isPresigned: function isPresigned() { + return this.request.headers[expiresHeader] ? true : false; + } + +}); + +/** + * @api private + */ +module.exports = AWS.Signers.V4; - if (opts.stdio && hasAlias(opts)) { - throw new Error( - `It's not possible to provide \`stdio\` in combination with one of ${alias - .map((x) => `\`${x}\``) - .join(", ")}` - ); - } - if (typeof opts.stdio === "string") { - return opts.stdio; - } +/***/ }), - const stdio = opts.stdio || []; +/***/ 62660: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - if (!Array.isArray(stdio)) { - throw new TypeError( - `Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof stdio}\`` - ); - } +var AWS = __nccwpck_require__(28437); - const result = []; - const len = Math.max(stdio.length, alias.length); +/** + * @api private + */ +var cachedSecret = {}; - for (let i = 0; i < len; i++) { - let value = null; +/** + * @api private + */ +var cacheQueue = []; - if (stdio[i] !== undefined) { - value = stdio[i]; - } else if (opts[alias[i]] !== undefined) { - value = opts[alias[i]]; - } +/** + * @api private + */ +var maxCacheEntries = 50; + +/** + * @api private + */ +var v4Identifier = 'aws4_request'; + +/** + * @api private + */ +module.exports = { + /** + * @api private + * + * @param date [String] + * @param region [String] + * @param serviceName [String] + * @return [String] + */ + createScope: function createScope(date, region, serviceName) { + return [ + date.substr(0, 8), + region, + serviceName, + v4Identifier + ].join('/'); + }, + + /** + * @api private + * + * @param credentials [Credentials] + * @param date [String] + * @param region [String] + * @param service [String] + * @param shouldCache [Boolean] + * @return [String] + */ + getSigningKey: function getSigningKey( + credentials, + date, + region, + service, + shouldCache + ) { + var credsIdentifier = AWS.util.crypto + .hmac(credentials.secretAccessKey, credentials.accessKeyId, 'base64'); + var cacheKey = [credsIdentifier, date, region, service].join('_'); + shouldCache = shouldCache !== false; + if (shouldCache && (cacheKey in cachedSecret)) { + return cachedSecret[cacheKey]; + } + + var kDate = AWS.util.crypto.hmac( + 'AWS4' + credentials.secretAccessKey, + date, + 'buffer' + ); + var kRegion = AWS.util.crypto.hmac(kDate, region, 'buffer'); + var kService = AWS.util.crypto.hmac(kRegion, service, 'buffer'); + + var signingKey = AWS.util.crypto.hmac(kService, v4Identifier, 'buffer'); + if (shouldCache) { + cachedSecret[cacheKey] = signingKey; + cacheQueue.push(cacheKey); + if (cacheQueue.length > maxCacheEntries) { + // remove the oldest entry (not the least recently used) + delete cachedSecret[cacheQueue.shift()]; + } + } + + return signingKey; + }, + + /** + * @api private + * + * Empties the derived signing key cache. Made available for testing purposes + * only. + */ + emptyCache: function emptyCache() { + cachedSecret = {}; + cacheQueue = []; + } +}; + + +/***/ }), + +/***/ 68118: +/***/ ((module) => { + +function AcceptorStateMachine(states, state) { + this.currentState = state || null; + this.states = states || {}; +} + +AcceptorStateMachine.prototype.runTo = function runTo(finalState, done, bindObject, inputError) { + if (typeof finalState === 'function') { + inputError = bindObject; bindObject = done; + done = finalState; finalState = null; + } + + var self = this; + var state = self.states[self.currentState]; + state.fn.call(bindObject || self, inputError, function(err) { + if (err) { + if (state.fail) self.currentState = state.fail; + else return done ? done.call(bindObject, err) : null; + } else { + if (state.accept) self.currentState = state.accept; + else return done ? done.call(bindObject) : null; + } + if (self.currentState === finalState) { + return done ? done.call(bindObject, err) : null; + } + + self.runTo(finalState, done, bindObject, err); + }); +}; + +AcceptorStateMachine.prototype.addState = function addState(name, acceptState, failState, fn) { + if (typeof acceptState === 'function') { + fn = acceptState; acceptState = null; failState = null; + } else if (typeof failState === 'function') { + fn = failState; failState = null; + } + + if (!this.currentState) this.currentState = name; + this.states[name] = { accept: acceptState, fail: failState, fn: fn }; + return this; +}; + +/** + * @api private + */ +module.exports = AcceptorStateMachine; + + +/***/ }), + +/***/ 77985: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/* eslint guard-for-in:0 */ +var AWS; + +/** + * A set of utility methods for use with the AWS SDK. + * + * @!attribute abort + * Return this value from an iterator function {each} or {arrayEach} + * to break out of the iteration. + * @example Breaking out of an iterator function + * AWS.util.each({a: 1, b: 2, c: 3}, function(key, value) { + * if (key == 'b') return AWS.util.abort; + * }); + * @see each + * @see arrayEach + * @api private + */ +var util = { + environment: 'nodejs', + engine: function engine() { + if (util.isBrowser() && typeof navigator !== 'undefined') { + return navigator.userAgent; + } else { + var engine = process.platform + '/' + process.version; + if (process.env.AWS_EXECUTION_ENV) { + engine += ' exec-env/' + process.env.AWS_EXECUTION_ENV; + } + return engine; + } + }, + + userAgent: function userAgent() { + var name = util.environment; + var agent = 'aws-sdk-' + name + '/' + (__nccwpck_require__(28437).VERSION); + if (name === 'nodejs') agent += ' ' + util.engine(); + return agent; + }, + + uriEscape: function uriEscape(string) { + var output = encodeURIComponent(string); + output = output.replace(/[^A-Za-z0-9_.~\-%]+/g, escape); + + // AWS percent-encodes some extra non-standard characters in a URI + output = output.replace(/[*]/g, function(ch) { + return '%' + ch.charCodeAt(0).toString(16).toUpperCase(); + }); + + return output; + }, + + uriEscapePath: function uriEscapePath(string) { + var parts = []; + util.arrayEach(string.split('/'), function (part) { + parts.push(util.uriEscape(part)); + }); + return parts.join('/'); + }, + + urlParse: function urlParse(url) { + return util.url.parse(url); + }, + + urlFormat: function urlFormat(url) { + return util.url.format(url); + }, + + queryStringParse: function queryStringParse(qs) { + return util.querystring.parse(qs); + }, + + queryParamsToString: function queryParamsToString(params) { + var items = []; + var escape = util.uriEscape; + var sortedKeys = Object.keys(params).sort(); + + util.arrayEach(sortedKeys, function(name) { + var value = params[name]; + var ename = escape(name); + var result = ename + '='; + if (Array.isArray(value)) { + var vals = []; + util.arrayEach(value, function(item) { vals.push(escape(item)); }); + result = ename + '=' + vals.sort().join('&' + ename + '='); + } else if (value !== undefined && value !== null) { + result = ename + '=' + escape(value); + } + items.push(result); + }); + + return items.join('&'); + }, + + readFileSync: function readFileSync(path) { + if (util.isBrowser()) return null; + return (__nccwpck_require__(57147).readFileSync)(path, 'utf-8'); + }, + + base64: { + encode: function encode64(string) { + if (typeof string === 'number') { + throw util.error(new Error('Cannot base64 encode number ' + string)); + } + if (string === null || typeof string === 'undefined') { + return string; + } + var buf = util.buffer.toBuffer(string); + return buf.toString('base64'); + }, + + decode: function decode64(string) { + if (typeof string === 'number') { + throw util.error(new Error('Cannot base64 decode number ' + string)); + } + if (string === null || typeof string === 'undefined') { + return string; + } + return util.buffer.toBuffer(string, 'base64'); + } + + }, + + buffer: { + /** + * Buffer constructor for Node buffer and buffer pollyfill + */ + toBuffer: function(data, encoding) { + return (typeof util.Buffer.from === 'function' && util.Buffer.from !== Uint8Array.from) ? + util.Buffer.from(data, encoding) : new util.Buffer(data, encoding); + }, - result[i] = value; + alloc: function(size, fill, encoding) { + if (typeof size !== 'number') { + throw new Error('size passed to alloc must be a number.'); + } + if (typeof util.Buffer.alloc === 'function') { + return util.Buffer.alloc(size, fill, encoding); + } else { + var buf = new util.Buffer(size); + if (fill !== undefined && typeof buf.fill === 'function') { + buf.fill(fill, undefined, undefined, encoding); } + return buf; + } + }, - return result; + toStream: function toStream(buffer) { + if (!util.Buffer.isBuffer(buffer)) buffer = util.buffer.toBuffer(buffer); + + var readable = new (util.stream.Readable)(); + var pos = 0; + readable._read = function(size) { + if (pos >= buffer.length) return readable.push(null); + + var end = pos + size; + if (end > buffer.length) end = buffer.length; + readable.push(buffer.slice(pos, end)); + pos = end; }; - /***/ + return readable; }, - /***/ 91585: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - "use strict"; + /** + * Concatenates a list of Buffer objects. + */ + concat: function(buffers) { + var length = 0, + offset = 0, + buffer = null, i; - const { PassThrough } = __nccwpck_require__(12781); + for (i = 0; i < buffers.length; i++) { + length += buffers[i].length; + } - module.exports = (options) => { - options = Object.assign({}, options); + buffer = util.buffer.alloc(length); - const { array } = options; - let { encoding } = options; - const buffer = encoding === "buffer"; - let objectMode = false; + for (i = 0; i < buffers.length; i++) { + buffers[i].copy(buffer, offset); + offset += buffers[i].length; + } - if (array) { - objectMode = !(encoding || buffer); - } else { - encoding = encoding || "utf8"; - } + return buffer; + } + }, - if (buffer) { - encoding = null; - } + string: { + byteLength: function byteLength(string) { + if (string === null || string === undefined) return 0; + if (typeof string === 'string') string = util.buffer.toBuffer(string); - let len = 0; - const ret = []; - const stream = new PassThrough({ objectMode }); + if (typeof string.byteLength === 'number') { + return string.byteLength; + } else if (typeof string.length === 'number') { + return string.length; + } else if (typeof string.size === 'number') { + return string.size; + } else if (typeof string.path === 'string') { + return (__nccwpck_require__(57147).lstatSync)(string.path).size; + } else { + throw util.error(new Error('Cannot determine length of ' + string), + { object: string }); + } + }, - if (encoding) { - stream.setEncoding(encoding); - } + upperFirst: function upperFirst(string) { + return string[0].toUpperCase() + string.substr(1); + }, - stream.on("data", (chunk) => { - ret.push(chunk); + lowerFirst: function lowerFirst(string) { + return string[0].toLowerCase() + string.substr(1); + } + }, - if (objectMode) { - len = ret.length; - } else { - len += chunk.length; + ini: { + parse: function string(ini) { + var currentSection, map = {}; + util.arrayEach(ini.split(/\r?\n/), function(line) { + line = line.split(/(^|\s)[;#]/)[0]; // remove comments + var section = line.match(/^\s*\[([^\[\]]+)\]\s*$/); + if (section) { + currentSection = section[1]; + if (currentSection === '__proto__' || currentSection.split(/\s/)[1] === '__proto__') { + throw util.error( + new Error('Cannot load profile name \'' + currentSection + '\' from shared ini file.') + ); } - }); - - stream.getBufferedValue = () => { - if (array) { - return ret; + } else if (currentSection) { + var item = line.match(/^\s*(.+?)\s*=\s*(.+?)\s*$/); + if (item) { + map[currentSection] = map[currentSection] || {}; + map[currentSection][item[1]] = item[2]; } + } + }); - return buffer ? Buffer.concat(ret, len) : ret.join(""); - }; + return map; + } + }, - stream.getBufferedLength = () => len; + fn: { + noop: function() {}, + callback: function (err) { if (err) throw err; }, + + /** + * Turn a synchronous function into as "async" function by making it call + * a callback. The underlying function is called with all but the last argument, + * which is treated as the callback. The callback is passed passed a first argument + * of null on success to mimick standard node callbacks. + */ + makeAsync: function makeAsync(fn, expectedArgs) { + if (expectedArgs && expectedArgs <= fn.length) { + return fn; + } - return stream; + return function() { + var args = Array.prototype.slice.call(arguments, 0); + var callback = args.pop(); + var result = fn.apply(null, args); + callback(result); }; + } + }, + + /** + * Date and time utility functions. + */ + date: { + + /** + * @return [Date] the current JavaScript date object. Since all + * AWS services rely on this date object, you can override + * this function to provide a special time value to AWS service + * requests. + */ + getDate: function getDate() { + if (!AWS) AWS = __nccwpck_require__(28437); + if (AWS.config.systemClockOffset) { // use offset when non-zero + return new Date(new Date().getTime() + AWS.config.systemClockOffset); + } else { + return new Date(); + } + }, - /***/ + /** + * @return [String] the date in ISO-8601 format + */ + iso8601: function iso8601(date) { + if (date === undefined) { date = util.date.getDate(); } + return date.toISOString().replace(/\.\d{3}Z$/, 'Z'); }, - /***/ 21766: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - "use strict"; + /** + * @return [String] the date in RFC 822 format + */ + rfc822: function rfc822(date) { + if (date === undefined) { date = util.date.getDate(); } + return date.toUTCString(); + }, - const pump = __nccwpck_require__(18341); - const bufferStream = __nccwpck_require__(91585); + /** + * @return [Integer] the UNIX timestamp value for the current time + */ + unixTimestamp: function unixTimestamp(date) { + if (date === undefined) { date = util.date.getDate(); } + return date.getTime() / 1000; + }, - class MaxBufferError extends Error { - constructor() { - super("maxBuffer exceeded"); - this.name = "MaxBufferError"; - } + /** + * @param [String,number,Date] date + * @return [Date] + */ + from: function format(date) { + if (typeof date === 'number') { + return new Date(date * 1000); // unix timestamp + } else { + return new Date(date); } + }, - function getStream(inputStream, options) { - if (!inputStream) { - return Promise.reject(new Error("Expected a stream")); - } - - options = Object.assign({ maxBuffer: Infinity }, options); - - const { maxBuffer } = options; - - let stream; - return new Promise((resolve, reject) => { - const rejectPromise = (error) => { - if (error) { - // A null check - error.bufferedData = stream.getBufferedValue(); - } - reject(error); - }; + /** + * Given a Date or date-like value, this function formats the + * date into a string of the requested value. + * @param [String,number,Date] date + * @param [String] formatter Valid formats are: + # * 'iso8601' + # * 'rfc822' + # * 'unixTimestamp' + * @return [String] + */ + format: function format(date, formatter) { + if (!formatter) formatter = 'iso8601'; + return util.date[formatter](util.date.from(date)); + }, + + parseTimestamp: function parseTimestamp(value) { + if (typeof value === 'number') { // unix timestamp (number) + return new Date(value * 1000); + } else if (value.match(/^\d+$/)) { // unix timestamp + return new Date(value * 1000); + } else if (value.match(/^\d{4}/)) { // iso8601 + return new Date(value); + } else if (value.match(/^\w{3},/)) { // rfc822 + return new Date(value); + } else { + throw util.error( + new Error('unhandled timestamp format: ' + value), + {code: 'TimestampParserError'}); + } + } + + }, + + crypto: { + crc32Table: [ + 0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA, 0x076DC419, + 0x706AF48F, 0xE963A535, 0x9E6495A3, 0x0EDB8832, 0x79DCB8A4, + 0xE0D5E91E, 0x97D2D988, 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, + 0x90BF1D91, 0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE, + 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7, 0x136C9856, + 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC, 0x14015C4F, 0x63066CD9, + 0xFA0F3D63, 0x8D080DF5, 0x3B6E20C8, 0x4C69105E, 0xD56041E4, + 0xA2677172, 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B, + 0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940, 0x32D86CE3, + 0x45DF5C75, 0xDCD60DCF, 0xABD13D59, 0x26D930AC, 0x51DE003A, + 0xC8D75180, 0xBFD06116, 0x21B4F4B5, 0x56B3C423, 0xCFBA9599, + 0xB8BDA50F, 0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924, + 0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D, 0x76DC4190, + 0x01DB7106, 0x98D220BC, 0xEFD5102A, 0x71B18589, 0x06B6B51F, + 0x9FBFE4A5, 0xE8B8D433, 0x7807C9A2, 0x0F00F934, 0x9609A88E, + 0xE10E9818, 0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01, + 0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E, 0x6C0695ED, + 0x1B01A57B, 0x8208F4C1, 0xF50FC457, 0x65B0D9C6, 0x12B7E950, + 0x8BBEB8EA, 0xFCB9887C, 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, + 0xFBD44C65, 0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2, + 0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB, 0x4369E96A, + 0x346ED9FC, 0xAD678846, 0xDA60B8D0, 0x44042D73, 0x33031DE5, + 0xAA0A4C5F, 0xDD0D7CC9, 0x5005713C, 0x270241AA, 0xBE0B1010, + 0xC90C2086, 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F, + 0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4, 0x59B33D17, + 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD, 0xEDB88320, 0x9ABFB3B6, + 0x03B6E20C, 0x74B1D29A, 0xEAD54739, 0x9DD277AF, 0x04DB2615, + 0x73DC1683, 0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8, + 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1, 0xF00F9344, + 0x8708A3D2, 0x1E01F268, 0x6906C2FE, 0xF762575D, 0x806567CB, + 0x196C3671, 0x6E6B06E7, 0xFED41B76, 0x89D32BE0, 0x10DA7A5A, + 0x67DD4ACC, 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5, + 0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252, 0xD1BB67F1, + 0xA6BC5767, 0x3FB506DD, 0x48B2364B, 0xD80D2BDA, 0xAF0A1B4C, + 0x36034AF6, 0x41047A60, 0xDF60EFC3, 0xA867DF55, 0x316E8EEF, + 0x4669BE79, 0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236, + 0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F, 0xC5BA3BBE, + 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04, 0xC2D7FFA7, 0xB5D0CF31, + 0x2CD99E8B, 0x5BDEAE1D, 0x9B64C2B0, 0xEC63F226, 0x756AA39C, + 0x026D930A, 0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713, + 0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38, 0x92D28E9B, + 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21, 0x86D3D2D4, 0xF1D4E242, + 0x68DDB3F8, 0x1FDA836E, 0x81BE16CD, 0xF6B9265B, 0x6FB077E1, + 0x18B74777, 0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C, + 0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45, 0xA00AE278, + 0xD70DD2EE, 0x4E048354, 0x3903B3C2, 0xA7672661, 0xD06016F7, + 0x4969474D, 0x3E6E77DB, 0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, + 0x37D83BF0, 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9, + 0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6, 0xBAD03605, + 0xCDD70693, 0x54DE5729, 0x23D967BF, 0xB3667A2E, 0xC4614AB8, + 0x5D681B02, 0x2A6F2B94, 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, + 0x2D02EF8D], + + crc32: function crc32(data) { + var tbl = util.crypto.crc32Table; + var crc = 0 ^ -1; + + if (typeof data === 'string') { + data = util.buffer.toBuffer(data); + } + + for (var i = 0; i < data.length; i++) { + var code = data.readUInt8(i); + crc = (crc >>> 8) ^ tbl[(crc ^ code) & 0xFF]; + } + return (crc ^ -1) >>> 0; + }, + + hmac: function hmac(key, string, digest, fn) { + if (!digest) digest = 'binary'; + if (digest === 'buffer') { digest = undefined; } + if (!fn) fn = 'sha256'; + if (typeof string === 'string') string = util.buffer.toBuffer(string); + return util.crypto.lib.createHmac(fn, key).update(string).digest(digest); + }, + + md5: function md5(data, digest, callback) { + return util.crypto.hash('md5', data, digest, callback); + }, + + sha256: function sha256(data, digest, callback) { + return util.crypto.hash('sha256', data, digest, callback); + }, + + hash: function(algorithm, data, digest, callback) { + var hash = util.crypto.createHash(algorithm); + if (!digest) { digest = 'binary'; } + if (digest === 'buffer') { digest = undefined; } + if (typeof data === 'string') data = util.buffer.toBuffer(data); + var sliceFn = util.arraySliceFn(data); + var isBuffer = util.Buffer.isBuffer(data); + //Identifying objects with an ArrayBuffer as buffers + if (util.isBrowser() && typeof ArrayBuffer !== 'undefined' && data && data.buffer instanceof ArrayBuffer) isBuffer = true; + + if (callback && typeof data === 'object' && + typeof data.on === 'function' && !isBuffer) { + data.on('data', function(chunk) { hash.update(chunk); }); + data.on('error', function(err) { callback(err); }); + data.on('end', function() { callback(null, hash.digest(digest)); }); + } else if (callback && sliceFn && !isBuffer && + typeof FileReader !== 'undefined') { + // this might be a File/Blob + var index = 0, size = 1024 * 512; + var reader = new FileReader(); + reader.onerror = function() { + callback(new Error('Failed to read data.')); + }; + reader.onload = function() { + var buf = new util.Buffer(new Uint8Array(reader.result)); + hash.update(buf); + index += buf.length; + reader._continueReading(); + }; + reader._continueReading = function() { + if (index >= data.size) { + callback(null, hash.digest(digest)); + return; + } - stream = pump(inputStream, bufferStream(options), (error) => { - if (error) { - rejectPromise(error); - return; - } + var back = index + size; + if (back > data.size) back = data.size; + reader.readAsArrayBuffer(sliceFn.call(data, index, back)); + }; - resolve(); - }); + reader._continueReading(); + } else { + if (util.isBrowser() && typeof data === 'object' && !isBuffer) { + data = new util.Buffer(new Uint8Array(data)); + } + var out = hash.update(data).digest(digest); + if (callback) callback(null, out); + return out; + } + }, - stream.on("data", () => { - if (stream.getBufferedLength() > maxBuffer) { - rejectPromise(new MaxBufferError()); - } - }); - }).then(() => stream.getBufferedValue()); + toHex: function toHex(data) { + var out = []; + for (var i = 0; i < data.length; i++) { + out.push(('0' + data.charCodeAt(i).toString(16)).substr(-2, 2)); } + return out.join(''); + }, - module.exports = getStream; - module.exports.buffer = (stream, options) => - getStream(stream, Object.assign({}, options, { encoding: "buffer" })); - module.exports.array = (stream, options) => - getStream(stream, Object.assign({}, options, { array: true })); - module.exports.MaxBufferError = MaxBufferError; + createHash: function createHash(algorithm) { + return util.crypto.lib.createHash(algorithm); + } - /***/ - }, + }, - /***/ 48840: /***/ (module) => { - "use strict"; + /** @!ignore */ - /*! - * isobject - * - * Copyright (c) 2014-2017, Jon Schlinkert. - * Released under the MIT License. - */ + /* Abort constant */ + abort: {}, - function isObject(val) { - return ( - val != null && typeof val === "object" && Array.isArray(val) === false - ); + each: function each(object, iterFunction) { + for (var key in object) { + if (Object.prototype.hasOwnProperty.call(object, key)) { + var ret = iterFunction.call(this, key, object[key]); + if (ret === util.abort) break; } + } + }, - /*! - * is-plain-object - * - * Copyright (c) 2014-2017, Jon Schlinkert. - * Released under the MIT License. - */ - - function isObjectObject(o) { - return ( - isObject(o) === true && - Object.prototype.toString.call(o) === "[object Object]" - ); + arrayEach: function arrayEach(array, iterFunction) { + for (var idx in array) { + if (Object.prototype.hasOwnProperty.call(array, idx)) { + var ret = iterFunction.call(this, array[idx], parseInt(idx, 10)); + if (ret === util.abort) break; } + } + }, - function isPlainObject(o) { - var ctor, prot; - - if (isObjectObject(o) === false) return false; + update: function update(obj1, obj2) { + util.each(obj2, function iterator(key, item) { + obj1[key] = item; + }); + return obj1; + }, - // If has modified constructor - ctor = o.constructor; - if (typeof ctor !== "function") return false; + merge: function merge(obj1, obj2) { + return util.update(util.copy(obj1), obj2); + }, - // If has modified prototype - prot = ctor.prototype; - if (isObjectObject(prot) === false) return false; + copy: function copy(object) { + if (object === null || object === undefined) return object; + var dupe = {}; + // jshint forin:false + for (var key in object) { + dupe[key] = object[key]; + } + return dupe; + }, - // If constructor does not have an Object-specific method - if (prot.hasOwnProperty("isPrototypeOf") === false) { - return false; + isEmpty: function isEmpty(obj) { + for (var prop in obj) { + if (Object.prototype.hasOwnProperty.call(obj, prop)) { + return false; + } + } + return true; + }, + + arraySliceFn: function arraySliceFn(obj) { + var fn = obj.slice || obj.webkitSlice || obj.mozSlice; + return typeof fn === 'function' ? fn : null; + }, + + isType: function isType(obj, type) { + // handle cross-"frame" objects + if (typeof type === 'function') type = util.typeName(type); + return Object.prototype.toString.call(obj) === '[object ' + type + ']'; + }, + + typeName: function typeName(type) { + if (Object.prototype.hasOwnProperty.call(type, 'name')) return type.name; + var str = type.toString(); + var match = str.match(/^\s*function (.+)\(/); + return match ? match[1] : str; + }, + + error: function error(err, options) { + var originalError = null; + if (typeof err.message === 'string' && err.message !== '') { + if (typeof options === 'string' || (options && options.message)) { + originalError = util.copy(err); + originalError.message = err.message; + } + } + err.message = err.message || null; + + if (typeof options === 'string') { + err.message = options; + } else if (typeof options === 'object' && options !== null) { + util.update(err, options); + if (options.message) + err.message = options.message; + if (options.code || options.name) + err.code = options.code || options.name; + if (options.stack) + err.stack = options.stack; + } + + if (typeof Object.defineProperty === 'function') { + Object.defineProperty(err, 'name', {writable: true, enumerable: false}); + Object.defineProperty(err, 'message', {enumerable: true}); + } + + err.name = String(options && options.name || err.name || err.code || 'Error'); + err.time = new Date(); + + if (originalError) err.originalError = originalError; + + return err; + }, + + /** + * @api private + */ + inherit: function inherit(klass, features) { + var newObject = null; + if (features === undefined) { + features = klass; + klass = Object; + newObject = {}; + } else { + var ctor = function ConstructorWrapper() {}; + ctor.prototype = klass.prototype; + newObject = new ctor(); + } + + // constructor not supplied, create pass-through ctor + if (features.constructor === Object) { + features.constructor = function() { + if (klass !== Object) { + return klass.apply(this, arguments); } - - // Most likely a plain Object - return true; + }; + } + + features.constructor.prototype = newObject; + util.update(features.constructor.prototype, features); + features.constructor.__super__ = klass; + return features.constructor; + }, + + /** + * @api private + */ + mixin: function mixin() { + var klass = arguments[0]; + for (var i = 1; i < arguments.length; i++) { + // jshint forin:false + for (var prop in arguments[i].prototype) { + var fn = arguments[i].prototype[prop]; + if (prop !== 'constructor') { + klass.prototype[prop] = fn; + } + } + } + return klass; + }, + + /** + * @api private + */ + hideProperties: function hideProperties(obj, props) { + if (typeof Object.defineProperty !== 'function') return; + + util.arrayEach(props, function (key) { + Object.defineProperty(obj, key, { + enumerable: false, writable: true, configurable: true }); + }); + }, + + /** + * @api private + */ + property: function property(obj, name, value, enumerable, isValue) { + var opts = { + configurable: true, + enumerable: enumerable !== undefined ? enumerable : true + }; + if (typeof value === 'function' && !isValue) { + opts.get = value; + } + else { + opts.value = value; opts.writable = true; + } + + Object.defineProperty(obj, name, opts); + }, + + /** + * @api private + */ + memoizedProperty: function memoizedProperty(obj, name, get, enumerable) { + var cachedValue = null; + + // build enumerable attribute for each value with lazy accessor. + util.property(obj, name, function() { + if (cachedValue === null) { + cachedValue = get(); + } + return cachedValue; + }, enumerable); + }, + + /** + * TODO Remove in major version revision + * This backfill populates response data without the + * top-level payload name. + * + * @api private + */ + hoistPayloadMember: function hoistPayloadMember(resp) { + var req = resp.request; + var operationName = req.operation; + var operation = req.service.api.operations[operationName]; + var output = operation.output; + if (output.payload && !operation.hasEventOutput) { + var payloadMember = output.members[output.payload]; + var responsePayload = resp.data[output.payload]; + if (payloadMember.type === 'structure') { + util.each(responsePayload, function(key, value) { + util.property(resp.data, key, value, false); + }); } - - module.exports = isPlainObject; - - /***/ - }, - - /***/ 41554: /***/ (module) => { - "use strict"; - - var isStream = (module.exports = function (stream) { - return ( - stream !== null && - typeof stream === "object" && - typeof stream.pipe === "function" - ); + } + }, + + /** + * Compute SHA-256 checksums of streams + * + * @api private + */ + computeSha256: function computeSha256(body, done) { + if (util.isNode()) { + var Stream = util.stream.Stream; + var fs = __nccwpck_require__(57147); + if (typeof Stream === 'function' && body instanceof Stream) { + if (typeof body.path === 'string') { // assume file object + var settings = {}; + if (typeof body.start === 'number') { + settings.start = body.start; + } + if (typeof body.end === 'number') { + settings.end = body.end; + } + body = fs.createReadStream(body.path, settings); + } else { // TODO support other stream types + return done(new Error('Non-file stream objects are ' + + 'not supported with SigV4')); + } + } + } + + util.crypto.sha256(body, 'hex', function(err, sha) { + if (err) done(err); + else done(null, sha); + }); + }, + + /** + * @api private + */ + isClockSkewed: function isClockSkewed(serverTime) { + if (serverTime) { + util.property(AWS.config, 'isClockSkewed', + Math.abs(new Date().getTime() - serverTime) >= 300000, false); + return AWS.config.isClockSkewed; + } + }, + + applyClockOffset: function applyClockOffset(serverTime) { + if (serverTime) + AWS.config.systemClockOffset = serverTime - new Date().getTime(); + }, + + /** + * @api private + */ + extractRequestId: function extractRequestId(resp) { + var requestId = resp.httpResponse.headers['x-amz-request-id'] || + resp.httpResponse.headers['x-amzn-requestid']; + + if (!requestId && resp.data && resp.data.ResponseMetadata) { + requestId = resp.data.ResponseMetadata.RequestId; + } + + if (requestId) { + resp.requestId = requestId; + } + + if (resp.error) { + resp.error.requestId = requestId; + } + }, + + /** + * @api private + */ + addPromises: function addPromises(constructors, PromiseDependency) { + var deletePromises = false; + if (PromiseDependency === undefined && AWS && AWS.config) { + PromiseDependency = AWS.config.getPromisesDependency(); + } + if (PromiseDependency === undefined && typeof Promise !== 'undefined') { + PromiseDependency = Promise; + } + if (typeof PromiseDependency !== 'function') deletePromises = true; + if (!Array.isArray(constructors)) constructors = [constructors]; + + for (var ind = 0; ind < constructors.length; ind++) { + var constructor = constructors[ind]; + if (deletePromises) { + if (constructor.deletePromisesFromClass) { + constructor.deletePromisesFromClass(); + } + } else if (constructor.addPromisesToClass) { + constructor.addPromisesToClass(PromiseDependency); + } + } + }, + + /** + * @api private + * Return a function that will return a promise whose fate is decided by the + * callback behavior of the given method with `methodName`. The method to be + * promisified should conform to node.js convention of accepting a callback as + * last argument and calling that callback with error as the first argument + * and success value on the second argument. + */ + promisifyMethod: function promisifyMethod(methodName, PromiseDependency) { + return function promise() { + var self = this; + var args = Array.prototype.slice.call(arguments); + return new PromiseDependency(function(resolve, reject) { + args.push(function(err, data) { + if (err) { + reject(err); + } else { + resolve(data); + } + }); + self[methodName].apply(self, args); }); + }; + }, + + /** + * @api private + */ + isDualstackAvailable: function isDualstackAvailable(service) { + if (!service) return false; + var metadata = __nccwpck_require__(17752); + if (typeof service !== 'string') service = service.serviceIdentifier; + if (typeof service !== 'string' || !metadata.hasOwnProperty(service)) return false; + return !!metadata[service].dualstackAvailable; + }, + + /** + * @api private + */ + calculateRetryDelay: function calculateRetryDelay(retryCount, retryDelayOptions, err) { + if (!retryDelayOptions) retryDelayOptions = {}; + var customBackoff = retryDelayOptions.customBackoff || null; + if (typeof customBackoff === 'function') { + return customBackoff(retryCount, err); + } + var base = typeof retryDelayOptions.base === 'number' ? retryDelayOptions.base : 100; + var delay = Math.random() * (Math.pow(2, retryCount) * base); + return delay; + }, + + /** + * @api private + */ + handleRequestWithRetries: function handleRequestWithRetries(httpRequest, options, cb) { + if (!options) options = {}; + var http = AWS.HttpClient.getInstance(); + var httpOptions = options.httpOptions || {}; + var retryCount = 0; + + var errCallback = function(err) { + var maxRetries = options.maxRetries || 0; + if (err && err.code === 'TimeoutError') err.retryable = true; + + // Call `calculateRetryDelay()` only when relevant, see #3401 + if (err && err.retryable && retryCount < maxRetries) { + var delay = util.calculateRetryDelay(retryCount, options.retryDelayOptions, err); + if (delay >= 0) { + retryCount++; + setTimeout(sendRequest, delay + (err.retryAfter || 0)); + return; + } + } + cb(err); + }; - isStream.writable = function (stream) { - return ( - isStream(stream) && - stream.writable !== false && - typeof stream._write === "function" && - typeof stream._writableState === "object" - ); - }; - - isStream.readable = function (stream) { - return ( - isStream(stream) && - stream.readable !== false && - typeof stream._read === "function" && - typeof stream._readableState === "object" - ); - }; - - isStream.duplex = function (stream) { - return isStream.writable(stream) && isStream.readable(stream); + var sendRequest = function() { + var data = ''; + http.handleRequest(httpRequest, httpOptions, function(httpResponse) { + httpResponse.on('data', function(chunk) { data += chunk.toString(); }); + httpResponse.on('end', function() { + var statusCode = httpResponse.statusCode; + if (statusCode < 300) { + cb(null, data); + } else { + var retryAfter = parseInt(httpResponse.headers['retry-after'], 10) * 1000 || 0; + var err = util.error(new Error(), + { + statusCode: statusCode, + retryable: statusCode >= 500 || statusCode === 429 + } + ); + if (retryAfter && err.retryable) err.retryAfter = retryAfter; + errCallback(err); + } + }); + }, errCallback); + }; + + AWS.util.defer(sendRequest); + }, + + /** + * @api private + */ + uuid: { + v4: function uuidV4() { + return (__nccwpck_require__(71062).v4)(); + } + }, + + /** + * @api private + */ + convertPayloadToString: function convertPayloadToString(resp) { + var req = resp.request; + var operation = req.operation; + var rules = req.service.api.operations[operation].output || {}; + if (rules.payload && resp.data[rules.payload]) { + resp.data[rules.payload] = resp.data[rules.payload].toString(); + } + }, + + /** + * @api private + */ + defer: function defer(callback) { + if (typeof process === 'object' && typeof process.nextTick === 'function') { + process.nextTick(callback); + } else if (typeof setImmediate === 'function') { + setImmediate(callback); + } else { + setTimeout(callback, 0); + } + }, + + /** + * @api private + */ + getRequestPayloadShape: function getRequestPayloadShape(req) { + var operations = req.service.api.operations; + if (!operations) return undefined; + var operation = (operations || {})[req.operation]; + if (!operation || !operation.input || !operation.input.payload) return undefined; + return operation.input.members[operation.input.payload]; + }, + + getProfilesFromSharedConfig: function getProfilesFromSharedConfig(iniLoader, filename) { + var profiles = {}; + var profilesFromConfig = {}; + if (process.env[util.configOptInEnv]) { + var profilesFromConfig = iniLoader.loadFrom({ + isConfig: true, + filename: process.env[util.sharedConfigFileEnv] + }); + } + var profilesFromCreds= {}; + try { + var profilesFromCreds = iniLoader.loadFrom({ + filename: filename || + (process.env[util.configOptInEnv] && process.env[util.sharedCredentialsFileEnv]) + }); + } catch (error) { + // if using config, assume it is fully descriptive without a credentials file: + if (!process.env[util.configOptInEnv]) throw error; + } + for (var i = 0, profileNames = Object.keys(profilesFromConfig); i < profileNames.length; i++) { + profiles[profileNames[i]] = objectAssign(profiles[profileNames[i]] || {}, profilesFromConfig[profileNames[i]]); + } + for (var i = 0, profileNames = Object.keys(profilesFromCreds); i < profileNames.length; i++) { + profiles[profileNames[i]] = objectAssign(profiles[profileNames[i]] || {}, profilesFromCreds[profileNames[i]]); + } + return profiles; + + /** + * Roughly the semantics of `Object.assign(target, source)` + */ + function objectAssign(target, source) { + for (var i = 0, keys = Object.keys(source); i < keys.length; i++) { + target[keys[i]] = source[keys[i]]; + } + return target; + } + }, + + /** + * @api private + */ + ARN: { + validate: function validateARN(str) { + return str && str.indexOf('arn:') === 0 && str.split(':').length >= 6; + }, + parse: function parseARN(arn) { + var matched = arn.split(':'); + return { + partition: matched[1], + service: matched[2], + region: matched[3], + accountId: matched[4], + resource: matched.slice(5).join(':') }; + }, + build: function buildARN(arnObject) { + if ( + arnObject.service === undefined || + arnObject.region === undefined || + arnObject.accountId === undefined || + arnObject.resource === undefined + ) throw util.error(new Error('Input ARN object is invalid')); + return 'arn:'+ (arnObject.partition || 'aws') + ':' + arnObject.service + + ':' + arnObject.region + ':' + arnObject.accountId + ':' + arnObject.resource; + } + }, + + /** + * @api private + */ + defaultProfile: 'default', + + /** + * @api private + */ + configOptInEnv: 'AWS_SDK_LOAD_CONFIG', + + /** + * @api private + */ + sharedCredentialsFileEnv: 'AWS_SHARED_CREDENTIALS_FILE', + + /** + * @api private + */ + sharedConfigFileEnv: 'AWS_CONFIG_FILE', + + /** + * @api private + */ + imdsDisabledEnv: 'AWS_EC2_METADATA_DISABLED' +}; + +/** + * @api private + */ +module.exports = util; + + +/***/ }), + +/***/ 23546: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var util = __nccwpck_require__(77985); +var XmlNode = (__nccwpck_require__(20397).XmlNode); +var XmlText = (__nccwpck_require__(90971).XmlText); + +function XmlBuilder() { } + +XmlBuilder.prototype.toXML = function(params, shape, rootElement, noEmpty) { + var xml = new XmlNode(rootElement); + applyNamespaces(xml, shape, true); + serialize(xml, params, shape); + return xml.children.length > 0 || noEmpty ? xml.toString() : ''; +}; + +function serialize(xml, value, shape) { + switch (shape.type) { + case 'structure': return serializeStructure(xml, value, shape); + case 'map': return serializeMap(xml, value, shape); + case 'list': return serializeList(xml, value, shape); + default: return serializeScalar(xml, value, shape); + } +} + +function serializeStructure(xml, params, shape) { + util.arrayEach(shape.memberNames, function(memberName) { + var memberShape = shape.members[memberName]; + if (memberShape.location !== 'body') return; + + var value = params[memberName]; + var name = memberShape.name; + if (value !== undefined && value !== null) { + if (memberShape.isXmlAttribute) { + xml.addAttribute(name, value); + } else if (memberShape.flattened) { + serialize(xml, value, memberShape); + } else { + var element = new XmlNode(name); + xml.addChildNode(element); + applyNamespaces(element, memberShape); + serialize(element, value, memberShape); + } + } + }); +} + +function serializeMap(xml, map, shape) { + var xmlKey = shape.key.name || 'key'; + var xmlValue = shape.value.name || 'value'; + + util.each(map, function(key, value) { + var entry = new XmlNode(shape.flattened ? shape.name : 'entry'); + xml.addChildNode(entry); + + var entryKey = new XmlNode(xmlKey); + var entryValue = new XmlNode(xmlValue); + entry.addChildNode(entryKey); + entry.addChildNode(entryValue); + + serialize(entryKey, key, shape.key); + serialize(entryValue, value, shape.value); + }); +} + +function serializeList(xml, list, shape) { + if (shape.flattened) { + util.arrayEach(list, function(value) { + var name = shape.member.name || shape.name; + var element = new XmlNode(name); + xml.addChildNode(element); + serialize(element, value, shape.member); + }); + } else { + util.arrayEach(list, function(value) { + var name = shape.member.name || 'member'; + var element = new XmlNode(name); + xml.addChildNode(element); + serialize(element, value, shape.member); + }); + } +} + +function serializeScalar(xml, value, shape) { + xml.addChildNode( + new XmlText(shape.toWireFormat(value)) + ); +} + +function applyNamespaces(xml, shape, isRoot) { + var uri, prefix = 'xmlns'; + if (shape.xmlNamespaceUri) { + uri = shape.xmlNamespaceUri; + if (shape.xmlNamespacePrefix) prefix += ':' + shape.xmlNamespacePrefix; + } else if (isRoot && shape.api.xmlNamespaceUri) { + uri = shape.api.xmlNamespaceUri; + } + + if (uri) xml.addAttribute(prefix, uri); +} + +/** + * @api private + */ +module.exports = XmlBuilder; - isStream.transform = function (stream) { - return ( - isStream.duplex(stream) && - typeof stream._transform === "function" && - typeof stream._transformState === "object" - ); - }; - /***/ - }, +/***/ }), - /***/ 97126: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var fs = __nccwpck_require__(57147); - var core; - if (process.platform === "win32" || global.TESTING_WINDOWS) { - core = __nccwpck_require__(42001); - } else { - core = __nccwpck_require__(9728); - } +/***/ 98241: +/***/ ((module) => { - module.exports = isexe; - isexe.sync = sync; +/** + * Escapes characters that can not be in an XML attribute. + */ +function escapeAttribute(value) { + return value.replace(/&/g, '&').replace(/'/g, ''').replace(//g, '>').replace(/"/g, '"'); +} - function isexe(path, options, cb) { - if (typeof options === "function") { - cb = options; - options = {}; - } +/** + * @api private + */ +module.exports = { + escapeAttribute: escapeAttribute +}; - if (!cb) { - if (typeof Promise !== "function") { - throw new TypeError("callback not provided"); - } - return new Promise(function (resolve, reject) { - isexe(path, options || {}, function (er, is) { - if (er) { - reject(er); - } else { - resolve(is); - } - }); - }); - } +/***/ }), - core(path, options || {}, function (er, is) { - // ignore EACCES because that just means we aren't allowed to run it - if (er) { - if (er.code === "EACCES" || (options && options.ignoreErrors)) { - er = null; - is = false; - } - } - cb(er, is); - }); - } +/***/ 98464: +/***/ ((module) => { - function sync(path, options) { - // my kingdom for a filtered catch - try { - return core.sync(path, options || {}); - } catch (er) { - if ((options && options.ignoreErrors) || er.code === "EACCES") { - return false; - } else { - throw er; - } - } - } +/** + * Escapes characters that can not be in an XML element. + */ +function escapeElement(value) { + return value.replace(/&/g, '&').replace(//g, '>'); +} - /***/ - }, +/** + * @api private + */ +module.exports = { + escapeElement: escapeElement +}; - /***/ 9728: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - module.exports = isexe; - isexe.sync = sync; - var fs = __nccwpck_require__(57147); +/***/ }), - function isexe(path, options, cb) { - fs.stat(path, function (er, stat) { - cb(er, er ? false : checkStat(stat, options)); - }); - } +/***/ 96752: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - function sync(path, options) { - return checkStat(fs.statSync(path), options); - } +var AWS = __nccwpck_require__(28437); +var util = AWS.util; +var Shape = AWS.Model.Shape; - function checkStat(stat, options) { - return stat.isFile() && checkMode(stat, options); - } +var xml2js = __nccwpck_require__(66189); - function checkMode(stat, options) { - var mod = stat.mode; - var uid = stat.uid; - var gid = stat.gid; - - var myUid = - options.uid !== undefined - ? options.uid - : process.getuid && process.getuid(); - var myGid = - options.gid !== undefined - ? options.gid - : process.getgid && process.getgid(); - - var u = parseInt("100", 8); - var g = parseInt("010", 8); - var o = parseInt("001", 8); - var ug = u | g; - - var ret = - mod & o || - (mod & g && gid === myGid) || - (mod & u && uid === myUid) || - (mod & ug && myUid === 0); - - return ret; - } +/** + * @api private + */ +var options = { // options passed to xml2js parser + explicitCharkey: false, // undocumented + trim: false, // trim the leading/trailing whitespace from text nodes + normalize: false, // trim interior whitespace inside text nodes + explicitRoot: false, // return the root node in the resulting object? + emptyTag: null, // the default value for empty nodes + explicitArray: true, // always put child nodes in an array + ignoreAttrs: false, // ignore attributes, only create text nodes + mergeAttrs: false, // merge attributes and child elements + validator: null // a callable validator +}; + +function NodeXmlParser() { } + +NodeXmlParser.prototype.parse = function(xml, shape) { + shape = shape || {}; + + var result = null; + var error = null; + + var parser = new xml2js.Parser(options); + parser.parseString(xml, function (e, r) { + error = e; + result = r; + }); + + if (result) { + var data = parseXml(result, shape); + if (result.ResponseMetadata) { + data.ResponseMetadata = parseXml(result.ResponseMetadata[0], {}); + } + return data; + } else if (error) { + throw util.error(error, {code: 'XMLParserError', retryable: true}); + } else { // empty xml document + return parseXml({}, shape); + } +}; + +function parseXml(xml, shape) { + switch (shape.type) { + case 'structure': return parseStructure(xml, shape); + case 'map': return parseMap(xml, shape); + case 'list': return parseList(xml, shape); + case undefined: case null: return parseUnknown(xml); + default: return parseScalar(xml, shape); + } +} + +function parseStructure(xml, shape) { + var data = {}; + if (xml === null) return data; + + util.each(shape.members, function(memberName, memberShape) { + var xmlName = memberShape.name; + if (Object.prototype.hasOwnProperty.call(xml, xmlName) && Array.isArray(xml[xmlName])) { + var xmlChild = xml[xmlName]; + if (!memberShape.flattened) xmlChild = xmlChild[0]; + + data[memberName] = parseXml(xmlChild, memberShape); + } else if (memberShape.isXmlAttribute && + xml.$ && Object.prototype.hasOwnProperty.call(xml.$, xmlName)) { + data[memberName] = parseScalar(xml.$[xmlName], memberShape); + } else if (memberShape.type === 'list' && !shape.api.xmlNoDefaultLists) { + data[memberName] = memberShape.defaultValue; + } + }); + + return data; +} + +function parseMap(xml, shape) { + var data = {}; + if (xml === null) return data; + + var xmlKey = shape.key.name || 'key'; + var xmlValue = shape.value.name || 'value'; + var iterable = shape.flattened ? xml : xml.entry; + + if (Array.isArray(iterable)) { + util.arrayEach(iterable, function(child) { + data[child[xmlKey][0]] = parseXml(child[xmlValue][0], shape.value); + }); + } + + return data; +} + +function parseList(xml, shape) { + var data = []; + var name = shape.member.name || 'member'; + if (shape.flattened) { + util.arrayEach(xml, function(xmlChild) { + data.push(parseXml(xmlChild, shape.member)); + }); + } else if (xml && Array.isArray(xml[name])) { + util.arrayEach(xml[name], function(child) { + data.push(parseXml(child, shape.member)); + }); + } + + return data; +} + +function parseScalar(text, shape) { + if (text && text.$ && text.$.encoding === 'base64') { + shape = new Shape.create({type: text.$.encoding}); + } + if (text && text._) text = text._; + + if (typeof shape.toType === 'function') { + return shape.toType(text); + } else { + return text; + } +} + +function parseUnknown(xml) { + if (xml === undefined || xml === null) return ''; + if (typeof xml === 'string') return xml; + + // parse a list + if (Array.isArray(xml)) { + var arr = []; + for (i = 0; i < xml.length; i++) { + arr.push(parseXml(xml[i], {})); + } + return arr; + } + + // empty object + var keys = Object.keys(xml), i; + if (keys.length === 0 || (keys.length === 1 && keys[0] === '$')) { + return {}; + } + + // object, parse as structure + var data = {}; + for (i = 0; i < keys.length; i++) { + var key = keys[i], value = xml[key]; + if (key === '$') continue; + if (value.length > 1) { // this member is a list + data[key] = parseList(value, {member: {}}); + } else { // this member is a single item + data[key] = parseXml(value[0], {}); + } + } + return data; +} + +/** + * @api private + */ +module.exports = NodeXmlParser; - /***/ - }, - /***/ 42001: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - module.exports = isexe; - isexe.sync = sync; +/***/ }), - var fs = __nccwpck_require__(57147); +/***/ 20397: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - function checkPathExt(path, options) { - var pathext = - options.pathExt !== undefined ? options.pathExt : process.env.PATHEXT; +var escapeAttribute = (__nccwpck_require__(98241).escapeAttribute); - if (!pathext) { - return true; - } +/** + * Represents an XML node. + * @api private + */ +function XmlNode(name, children) { + if (children === void 0) { children = []; } + this.name = name; + this.children = children; + this.attributes = {}; +} +XmlNode.prototype.addAttribute = function (name, value) { + this.attributes[name] = value; + return this; +}; +XmlNode.prototype.addChildNode = function (child) { + this.children.push(child); + return this; +}; +XmlNode.prototype.removeAttribute = function (name) { + delete this.attributes[name]; + return this; +}; +XmlNode.prototype.toString = function () { + var hasChildren = Boolean(this.children.length); + var xmlText = '<' + this.name; + // add attributes + var attributes = this.attributes; + for (var i = 0, attributeNames = Object.keys(attributes); i < attributeNames.length; i++) { + var attributeName = attributeNames[i]; + var attribute = attributes[attributeName]; + if (typeof attribute !== 'undefined' && attribute !== null) { + xmlText += ' ' + attributeName + '=\"' + escapeAttribute('' + attribute) + '\"'; + } + } + return xmlText += !hasChildren ? '/>' : '>' + this.children.map(function (c) { return c.toString(); }).join('') + ''; +}; + +/** + * @api private + */ +module.exports = { + XmlNode: XmlNode +}; - pathext = pathext.split(";"); - if (pathext.indexOf("") !== -1) { - return true; - } - for (var i = 0; i < pathext.length; i++) { - var p = pathext[i].toLowerCase(); - if (p && path.substr(-p.length).toLowerCase() === p) { - return true; - } - } - return false; - } - function checkStat(stat, path, options) { - if (!stat.isSymbolicLink() && !stat.isFile()) { - return false; - } - return checkPathExt(path, options); - } +/***/ }), - function isexe(path, options, cb) { - fs.stat(path, function (er, stat) { - cb(er, er ? false : checkStat(stat, path, options)); - }); - } +/***/ 90971: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - function sync(path, options) { - return checkStat(fs.statSync(path), path, options); - } +var escapeElement = (__nccwpck_require__(98464).escapeElement); - /***/ - }, +/** + * Represents an XML text value. + * @api private + */ +function XmlText(value) { + this.value = value; +} - /***/ 87783: /***/ (__unused_webpack_module, exports) => { - (function (exports) { - "use strict"; +XmlText.prototype.toString = function () { + return escapeElement('' + this.value); +}; - function isArray(obj) { - if (obj !== null) { - return Object.prototype.toString.call(obj) === "[object Array]"; - } else { - return false; - } - } +/** + * @api private + */ +module.exports = { + XmlText: XmlText +}; - function isObject(obj) { - if (obj !== null) { - return Object.prototype.toString.call(obj) === "[object Object]"; - } else { - return false; - } - } - function strictDeepEqual(first, second) { - // Check the scalar case first. - if (first === second) { - return true; - } +/***/ }), - // Check if they are the same type. - var firstType = Object.prototype.toString.call(first); - if (firstType !== Object.prototype.toString.call(second)) { - return false; - } - // We know that first and second have the same type so we can just check the - // first type from now on. - if (isArray(first) === true) { - // Short circuit if they're not the same length; - if (first.length !== second.length) { - return false; - } - for (var i = 0; i < first.length; i++) { - if (strictDeepEqual(first[i], second[i]) === false) { - return false; - } - } - return true; - } - if (isObject(first) === true) { - // An object is equal if it has the same key/value pairs. - var keysSeen = {}; - for (var key in first) { - if (hasOwnProperty.call(first, key)) { - if (strictDeepEqual(first[key], second[key]) === false) { - return false; - } - keysSeen[key] = true; - } - } - // Now check that there aren't any keys in second that weren't - // in first. - for (var key2 in second) { - if (hasOwnProperty.call(second, key2)) { - if (keysSeen[key2] !== true) { - return false; - } - } - } - return true; - } - return false; - } +/***/ 71062: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - function isFalse(obj) { - // From the spec: - // A false value corresponds to the following values: - // Empty list - // Empty object - // Empty string - // False boolean - // null value +var v1 = __nccwpck_require__(68207); +var v4 = __nccwpck_require__(54151); - // First check the scalar values. - if (obj === "" || obj === false || obj === null) { - return true; - } else if (isArray(obj) && obj.length === 0) { - // Check for an empty array. - return true; - } else if (isObject(obj)) { - // Check for an empty object. - for (var key in obj) { - // If there are any keys, then - // the object is not empty so the object - // is not false. - if (obj.hasOwnProperty(key)) { - return false; - } - } - return true; - } else { - return false; - } - } +var uuid = v4; +uuid.v1 = v1; +uuid.v4 = v4; - function objValues(obj) { - var keys = Object.keys(obj); - var values = []; - for (var i = 0; i < keys.length; i++) { - values.push(obj[keys[i]]); - } - return values; - } +module.exports = uuid; - function merge(a, b) { - var merged = {}; - for (var key in a) { - merged[key] = a[key]; - } - for (var key2 in b) { - merged[key2] = b[key2]; - } - return merged; - } - var trimLeft; - if (typeof String.prototype.trimLeft === "function") { - trimLeft = function (str) { - return str.trimLeft(); - }; - } else { - trimLeft = function (str) { - return str.match(/^\s*(.*)/)[1]; - }; - } +/***/ }), - // Type constants used to define functions. - var TYPE_NUMBER = 0; - var TYPE_ANY = 1; - var TYPE_STRING = 2; - var TYPE_ARRAY = 3; - var TYPE_OBJECT = 4; - var TYPE_BOOLEAN = 5; - var TYPE_EXPREF = 6; - var TYPE_NULL = 7; - var TYPE_ARRAY_NUMBER = 8; - var TYPE_ARRAY_STRING = 9; - - var TOK_EOF = "EOF"; - var TOK_UNQUOTEDIDENTIFIER = "UnquotedIdentifier"; - var TOK_QUOTEDIDENTIFIER = "QuotedIdentifier"; - var TOK_RBRACKET = "Rbracket"; - var TOK_RPAREN = "Rparen"; - var TOK_COMMA = "Comma"; - var TOK_COLON = "Colon"; - var TOK_RBRACE = "Rbrace"; - var TOK_NUMBER = "Number"; - var TOK_CURRENT = "Current"; - var TOK_EXPREF = "Expref"; - var TOK_PIPE = "Pipe"; - var TOK_OR = "Or"; - var TOK_AND = "And"; - var TOK_EQ = "EQ"; - var TOK_GT = "GT"; - var TOK_LT = "LT"; - var TOK_GTE = "GTE"; - var TOK_LTE = "LTE"; - var TOK_NE = "NE"; - var TOK_FLATTEN = "Flatten"; - var TOK_STAR = "Star"; - var TOK_FILTER = "Filter"; - var TOK_DOT = "Dot"; - var TOK_NOT = "Not"; - var TOK_LBRACE = "Lbrace"; - var TOK_LBRACKET = "Lbracket"; - var TOK_LPAREN = "Lparen"; - var TOK_LITERAL = "Literal"; - - // The "&", "[", "<", ">" tokens - // are not in basicToken because - // there are two token variants - // ("&&", "[?", "<=", ">="). This is specially handled - // below. - - var basicTokens = { - ".": TOK_DOT, - "*": TOK_STAR, - ",": TOK_COMMA, - ":": TOK_COLON, - "{": TOK_LBRACE, - "}": TOK_RBRACE, - "]": TOK_RBRACKET, - "(": TOK_LPAREN, - ")": TOK_RPAREN, - "@": TOK_CURRENT, - }; +/***/ 50367: +/***/ ((module) => { - var operatorStartToken = { - "<": true, - ">": true, - "=": true, - "!": true, - }; +/** + * Convert array of 16 byte values to UUID string format of the form: + * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX + */ +var byteToHex = []; +for (var i = 0; i < 256; ++i) { + byteToHex[i] = (i + 0x100).toString(16).substr(1); +} + +function bytesToUuid(buf, offset) { + var i = offset || 0; + var bth = byteToHex; + // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4 + return ([bth[buf[i++]], bth[buf[i++]], + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], + bth[buf[i++]], bth[buf[i++]], + bth[buf[i++]], bth[buf[i++]]]).join(''); +} + +module.exports = bytesToUuid; + + +/***/ }), + +/***/ 91734: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// Unique ID creation requires a high quality random # generator. In node.js +// this is pretty straight-forward - we use the crypto API. + +var crypto = __nccwpck_require__(6113); + +module.exports = function nodeRNG() { + return crypto.randomBytes(16); +}; + + +/***/ }), + +/***/ 68207: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var rng = __nccwpck_require__(91734); +var bytesToUuid = __nccwpck_require__(50367); + +// **`v1()` - Generate time-based UUID** +// +// Inspired by https://github.com/LiosK/UUID.js +// and http://docs.python.org/library/uuid.html + +var _nodeId; +var _clockseq; + +// Previous uuid creation time +var _lastMSecs = 0; +var _lastNSecs = 0; + +// See https://github.com/broofa/node-uuid for API details +function v1(options, buf, offset) { + var i = buf && offset || 0; + var b = buf || []; + + options = options || {}; + var node = options.node || _nodeId; + var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; + + // node and clockseq need to be initialized to random values if they're not + // specified. We do this lazily to minimize issues related to insufficient + // system entropy. See #189 + if (node == null || clockseq == null) { + var seedBytes = rng(); + if (node == null) { + // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) + node = _nodeId = [ + seedBytes[0] | 0x01, + seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5] + ]; + } + if (clockseq == null) { + // Per 4.2.2, randomize (14 bit) clockseq + clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; + } + } - var skipChars = { - " ": true, - "\t": true, - "\n": true, - }; + // UUID timestamps are 100 nano-second units since the Gregorian epoch, + // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so + // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' + // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. + var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime(); - function isAlpha(ch) { - return ( - (ch >= "a" && ch <= "z") || (ch >= "A" && ch <= "Z") || ch === "_" - ); - } + // Per 4.2.1.2, use count of uuid's generated during the current clock + // cycle to simulate higher resolution clock + var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; - function isNum(ch) { - return (ch >= "0" && ch <= "9") || ch === "-"; - } - function isAlphaNum(ch) { - return ( - (ch >= "a" && ch <= "z") || - (ch >= "A" && ch <= "Z") || - (ch >= "0" && ch <= "9") || - ch === "_" - ); - } + // Time since last uuid creation (in msecs) + var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000; - function Lexer() {} - Lexer.prototype = { - tokenize: function (stream) { - var tokens = []; - this._current = 0; - var start; - var identifier; - var token; - while (this._current < stream.length) { - if (isAlpha(stream[this._current])) { - start = this._current; - identifier = this._consumeUnquotedIdentifier(stream); - tokens.push({ - type: TOK_UNQUOTEDIDENTIFIER, - value: identifier, - start: start, - }); - } else if (basicTokens[stream[this._current]] !== undefined) { - tokens.push({ - type: basicTokens[stream[this._current]], - value: stream[this._current], - start: this._current, - }); - this._current++; - } else if (isNum(stream[this._current])) { - token = this._consumeNumber(stream); - tokens.push(token); - } else if (stream[this._current] === "[") { - // No need to increment this._current. This happens - // in _consumeLBracket - token = this._consumeLBracket(stream); - tokens.push(token); - } else if (stream[this._current] === '"') { - start = this._current; - identifier = this._consumeQuotedIdentifier(stream); - tokens.push({ - type: TOK_QUOTEDIDENTIFIER, - value: identifier, - start: start, - }); - } else if (stream[this._current] === "'") { - start = this._current; - identifier = this._consumeRawStringLiteral(stream); - tokens.push({ - type: TOK_LITERAL, - value: identifier, - start: start, - }); - } else if (stream[this._current] === "`") { - start = this._current; - var literal = this._consumeLiteral(stream); - tokens.push({ - type: TOK_LITERAL, - value: literal, - start: start, - }); - } else if ( - operatorStartToken[stream[this._current]] !== undefined - ) { - tokens.push(this._consumeOperator(stream)); - } else if (skipChars[stream[this._current]] !== undefined) { - // Ignore whitespace. - this._current++; - } else if (stream[this._current] === "&") { - start = this._current; - this._current++; - if (stream[this._current] === "&") { - this._current++; - tokens.push({ type: TOK_AND, value: "&&", start: start }); - } else { - tokens.push({ type: TOK_EXPREF, value: "&", start: start }); - } - } else if (stream[this._current] === "|") { - start = this._current; - this._current++; - if (stream[this._current] === "|") { - this._current++; - tokens.push({ type: TOK_OR, value: "||", start: start }); - } else { - tokens.push({ type: TOK_PIPE, value: "|", start: start }); - } - } else { - var error = new Error( - "Unknown character:" + stream[this._current] - ); - error.name = "LexerError"; - throw error; - } - } - return tokens; - }, + // Per 4.2.1.2, Bump clockseq on clock regression + if (dt < 0 && options.clockseq === undefined) { + clockseq = clockseq + 1 & 0x3fff; + } - _consumeUnquotedIdentifier: function (stream) { - var start = this._current; - this._current++; - while ( - this._current < stream.length && - isAlphaNum(stream[this._current]) - ) { - this._current++; - } - return stream.slice(start, this._current); - }, + // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new + // time interval + if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { + nsecs = 0; + } - _consumeQuotedIdentifier: function (stream) { - var start = this._current; - this._current++; - var maxLength = stream.length; - while (stream[this._current] !== '"' && this._current < maxLength) { - // You can escape a double quote and you can escape an escape. - var current = this._current; - if ( - stream[current] === "\\" && - (stream[current + 1] === "\\" || stream[current + 1] === '"') - ) { - current += 2; - } else { - current++; - } - this._current = current; - } - this._current++; - return JSON.parse(stream.slice(start, this._current)); - }, + // Per 4.2.1.2 Throw error if too many uuids are requested + if (nsecs >= 10000) { + throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec'); + } - _consumeRawStringLiteral: function (stream) { - var start = this._current; - this._current++; - var maxLength = stream.length; - while (stream[this._current] !== "'" && this._current < maxLength) { - // You can escape a single quote and you can escape an escape. - var current = this._current; - if ( - stream[current] === "\\" && - (stream[current + 1] === "\\" || stream[current + 1] === "'") - ) { - current += 2; - } else { - current++; - } - this._current = current; - } - this._current++; - var literal = stream.slice(start + 1, this._current - 1); - return literal.replace("\\'", "'"); - }, + _lastMSecs = msecs; + _lastNSecs = nsecs; + _clockseq = clockseq; - _consumeNumber: function (stream) { - var start = this._current; - this._current++; - var maxLength = stream.length; - while (isNum(stream[this._current]) && this._current < maxLength) { - this._current++; - } - var value = parseInt(stream.slice(start, this._current)); - return { type: TOK_NUMBER, value: value, start: start }; - }, + // Per 4.1.4 - Convert from unix epoch to Gregorian epoch + msecs += 12219292800000; - _consumeLBracket: function (stream) { - var start = this._current; - this._current++; - if (stream[this._current] === "?") { - this._current++; - return { type: TOK_FILTER, value: "[?", start: start }; - } else if (stream[this._current] === "]") { - this._current++; - return { type: TOK_FLATTEN, value: "[]", start: start }; - } else { - return { type: TOK_LBRACKET, value: "[", start: start }; - } - }, + // `time_low` + var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; + b[i++] = tl >>> 24 & 0xff; + b[i++] = tl >>> 16 & 0xff; + b[i++] = tl >>> 8 & 0xff; + b[i++] = tl & 0xff; - _consumeOperator: function (stream) { - var start = this._current; - var startingChar = stream[start]; - this._current++; - if (startingChar === "!") { - if (stream[this._current] === "=") { - this._current++; - return { type: TOK_NE, value: "!=", start: start }; - } else { - return { type: TOK_NOT, value: "!", start: start }; - } - } else if (startingChar === "<") { - if (stream[this._current] === "=") { - this._current++; - return { type: TOK_LTE, value: "<=", start: start }; - } else { - return { type: TOK_LT, value: "<", start: start }; - } - } else if (startingChar === ">") { - if (stream[this._current] === "=") { - this._current++; - return { type: TOK_GTE, value: ">=", start: start }; - } else { - return { type: TOK_GT, value: ">", start: start }; - } - } else if (startingChar === "=") { - if (stream[this._current] === "=") { - this._current++; - return { type: TOK_EQ, value: "==", start: start }; - } - } - }, + // `time_mid` + var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff; + b[i++] = tmh >>> 8 & 0xff; + b[i++] = tmh & 0xff; - _consumeLiteral: function (stream) { - this._current++; - var start = this._current; - var maxLength = stream.length; - var literal; - while (stream[this._current] !== "`" && this._current < maxLength) { - // You can escape a literal char or you can escape the escape. - var current = this._current; - if ( - stream[current] === "\\" && - (stream[current + 1] === "\\" || stream[current + 1] === "`") - ) { - current += 2; - } else { - current++; - } - this._current = current; - } - var literalString = trimLeft(stream.slice(start, this._current)); - literalString = literalString.replace("\\`", "`"); - if (this._looksLikeJSON(literalString)) { - literal = JSON.parse(literalString); - } else { - // Try to JSON parse it as "" - literal = JSON.parse('"' + literalString + '"'); - } - // +1 gets us to the ending "`", +1 to move on to the next char. - this._current++; - return literal; - }, + // `time_high_and_version` + b[i++] = tmh >>> 24 & 0xf | 0x10; // include version + b[i++] = tmh >>> 16 & 0xff; - _looksLikeJSON: function (literalString) { - var startingChars = '[{"'; - var jsonLiterals = ["true", "false", "null"]; - var numberLooking = "-0123456789"; + // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) + b[i++] = clockseq >>> 8 | 0x80; - if (literalString === "") { - return false; - } else if (startingChars.indexOf(literalString[0]) >= 0) { - return true; - } else if (jsonLiterals.indexOf(literalString) >= 0) { - return true; - } else if (numberLooking.indexOf(literalString[0]) >= 0) { - try { - JSON.parse(literalString); - return true; - } catch (ex) { - return false; - } - } else { - return false; - } - }, - }; + // `clock_seq_low` + b[i++] = clockseq & 0xff; - var bindingPower = {}; - bindingPower[TOK_EOF] = 0; - bindingPower[TOK_UNQUOTEDIDENTIFIER] = 0; - bindingPower[TOK_QUOTEDIDENTIFIER] = 0; - bindingPower[TOK_RBRACKET] = 0; - bindingPower[TOK_RPAREN] = 0; - bindingPower[TOK_COMMA] = 0; - bindingPower[TOK_RBRACE] = 0; - bindingPower[TOK_NUMBER] = 0; - bindingPower[TOK_CURRENT] = 0; - bindingPower[TOK_EXPREF] = 0; - bindingPower[TOK_PIPE] = 1; - bindingPower[TOK_OR] = 2; - bindingPower[TOK_AND] = 3; - bindingPower[TOK_EQ] = 5; - bindingPower[TOK_GT] = 5; - bindingPower[TOK_LT] = 5; - bindingPower[TOK_GTE] = 5; - bindingPower[TOK_LTE] = 5; - bindingPower[TOK_NE] = 5; - bindingPower[TOK_FLATTEN] = 9; - bindingPower[TOK_STAR] = 20; - bindingPower[TOK_FILTER] = 21; - bindingPower[TOK_DOT] = 40; - bindingPower[TOK_NOT] = 45; - bindingPower[TOK_LBRACE] = 50; - bindingPower[TOK_LBRACKET] = 55; - bindingPower[TOK_LPAREN] = 60; - - function Parser() {} - - Parser.prototype = { - parse: function (expression) { - this._loadTokens(expression); - this.index = 0; - var ast = this.expression(0); - if (this._lookahead(0) !== TOK_EOF) { - var t = this._lookaheadToken(0); - var error = new Error( - "Unexpected token type: " + t.type + ", value: " + t.value - ); - error.name = "ParserError"; - throw error; - } - return ast; - }, + // `node` + for (var n = 0; n < 6; ++n) { + b[i + n] = node[n]; + } - _loadTokens: function (expression) { - var lexer = new Lexer(); - var tokens = lexer.tokenize(expression); - tokens.push({ type: TOK_EOF, value: "", start: expression.length }); - this.tokens = tokens; - }, + return buf ? buf : bytesToUuid(b); +} - expression: function (rbp) { - var leftToken = this._lookaheadToken(0); - this._advance(); - var left = this.nud(leftToken); - var currentToken = this._lookahead(0); - while (rbp < bindingPower[currentToken]) { - this._advance(); - left = this.led(currentToken, left); - currentToken = this._lookahead(0); - } - return left; - }, +module.exports = v1; - _lookahead: function (number) { - return this.tokens[this.index + number].type; - }, - _lookaheadToken: function (number) { - return this.tokens[this.index + number]; - }, +/***/ }), - _advance: function () { - this.index++; - }, +/***/ 54151: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - nud: function (token) { - var left; - var right; - var expression; - switch (token.type) { - case TOK_LITERAL: - return { type: "Literal", value: token.value }; - case TOK_UNQUOTEDIDENTIFIER: - return { type: "Field", name: token.value }; - case TOK_QUOTEDIDENTIFIER: - var node = { type: "Field", name: token.value }; - if (this._lookahead(0) === TOK_LPAREN) { - throw new Error( - "Quoted identifier not allowed for function names." - ); - } else { - return node; - } - break; - case TOK_NOT: - right = this.expression(bindingPower.Not); - return { type: "NotExpression", children: [right] }; - case TOK_STAR: - left = { type: "Identity" }; - right = null; - if (this._lookahead(0) === TOK_RBRACKET) { - // This can happen in a multiselect, - // [a, b, *] - right = { type: "Identity" }; - } else { - right = this._parseProjectionRHS(bindingPower.Star); - } - return { type: "ValueProjection", children: [left, right] }; - case TOK_FILTER: - return this.led(token.type, { type: "Identity" }); - case TOK_LBRACE: - return this._parseMultiselectHash(); - case TOK_FLATTEN: - left = { type: TOK_FLATTEN, children: [{ type: "Identity" }] }; - right = this._parseProjectionRHS(bindingPower.Flatten); - return { type: "Projection", children: [left, right] }; - case TOK_LBRACKET: - if ( - this._lookahead(0) === TOK_NUMBER || - this._lookahead(0) === TOK_COLON - ) { - right = this._parseIndexExpression(); - return this._projectIfSlice({ type: "Identity" }, right); - } else if ( - this._lookahead(0) === TOK_STAR && - this._lookahead(1) === TOK_RBRACKET - ) { - this._advance(); - this._advance(); - right = this._parseProjectionRHS(bindingPower.Star); - return { - type: "Projection", - children: [{ type: "Identity" }, right], - }; - } else { - return this._parseMultiselectList(); - } - break; - case TOK_CURRENT: - return { type: TOK_CURRENT }; - case TOK_EXPREF: - expression = this.expression(bindingPower.Expref); - return { type: "ExpressionReference", children: [expression] }; - case TOK_LPAREN: - var args = []; - while (this._lookahead(0) !== TOK_RPAREN) { - if (this._lookahead(0) === TOK_CURRENT) { - expression = { type: TOK_CURRENT }; - this._advance(); - } else { - expression = this.expression(0); - } - args.push(expression); - } - this._match(TOK_RPAREN); - return args[0]; - default: - this._errorToken(token); - } - }, +var rng = __nccwpck_require__(91734); +var bytesToUuid = __nccwpck_require__(50367); - led: function (tokenName, left) { - var right; - switch (tokenName) { - case TOK_DOT: - var rbp = bindingPower.Dot; - if (this._lookahead(0) !== TOK_STAR) { - right = this._parseDotRHS(rbp); - return { type: "Subexpression", children: [left, right] }; - } else { - // Creating a projection. - this._advance(); - right = this._parseProjectionRHS(rbp); - return { type: "ValueProjection", children: [left, right] }; - } - break; - case TOK_PIPE: - right = this.expression(bindingPower.Pipe); - return { type: TOK_PIPE, children: [left, right] }; - case TOK_OR: - right = this.expression(bindingPower.Or); - return { type: "OrExpression", children: [left, right] }; - case TOK_AND: - right = this.expression(bindingPower.And); - return { type: "AndExpression", children: [left, right] }; - case TOK_LPAREN: - var name = left.name; - var args = []; - var expression, node; - while (this._lookahead(0) !== TOK_RPAREN) { - if (this._lookahead(0) === TOK_CURRENT) { - expression = { type: TOK_CURRENT }; - this._advance(); - } else { - expression = this.expression(0); - } - if (this._lookahead(0) === TOK_COMMA) { - this._match(TOK_COMMA); - } - args.push(expression); - } - this._match(TOK_RPAREN); - node = { type: "Function", name: name, children: args }; - return node; - case TOK_FILTER: - var condition = this.expression(0); - this._match(TOK_RBRACKET); - if (this._lookahead(0) === TOK_FLATTEN) { - right = { type: "Identity" }; - } else { - right = this._parseProjectionRHS(bindingPower.Filter); - } - return { - type: "FilterProjection", - children: [left, right, condition], - }; - case TOK_FLATTEN: - var leftNode = { type: TOK_FLATTEN, children: [left] }; - var rightNode = this._parseProjectionRHS(bindingPower.Flatten); - return { type: "Projection", children: [leftNode, rightNode] }; - case TOK_EQ: - case TOK_NE: - case TOK_GT: - case TOK_GTE: - case TOK_LT: - case TOK_LTE: - return this._parseComparator(left, tokenName); - case TOK_LBRACKET: - var token = this._lookaheadToken(0); - if (token.type === TOK_NUMBER || token.type === TOK_COLON) { - right = this._parseIndexExpression(); - return this._projectIfSlice(left, right); - } else { - this._match(TOK_STAR); - this._match(TOK_RBRACKET); - right = this._parseProjectionRHS(bindingPower.Star); - return { type: "Projection", children: [left, right] }; - } - break; - default: - this._errorToken(this._lookaheadToken(0)); - } - }, +function v4(options, buf, offset) { + var i = buf && offset || 0; - _match: function (tokenType) { - if (this._lookahead(0) === tokenType) { - this._advance(); - } else { - var t = this._lookaheadToken(0); - var error = new Error( - "Expected " + tokenType + ", got: " + t.type - ); - error.name = "ParserError"; - throw error; - } - }, + if (typeof(options) == 'string') { + buf = options === 'binary' ? new Array(16) : null; + options = null; + } + options = options || {}; - _errorToken: function (token) { - var error = new Error( - "Invalid token (" + token.type + '): "' + token.value + '"' - ); - error.name = "ParserError"; - throw error; - }, + var rnds = options.random || (options.rng || rng)(); - _parseIndexExpression: function () { - if ( - this._lookahead(0) === TOK_COLON || - this._lookahead(1) === TOK_COLON - ) { - return this._parseSliceExpression(); - } else { - var node = { - type: "Index", - value: this._lookaheadToken(0).value, - }; - this._advance(); - this._match(TOK_RBRACKET); - return node; - } - }, + // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` + rnds[6] = (rnds[6] & 0x0f) | 0x40; + rnds[8] = (rnds[8] & 0x3f) | 0x80; - _projectIfSlice: function (left, right) { - var indexExpr = { - type: "IndexExpression", - children: [left, right], - }; - if (right.type === "Slice") { - return { - type: "Projection", - children: [ - indexExpr, - this._parseProjectionRHS(bindingPower.Star), - ], - }; - } else { - return indexExpr; - } - }, + // Copy bytes to buffer, if provided + if (buf) { + for (var ii = 0; ii < 16; ++ii) { + buf[i + ii] = rnds[ii]; + } + } - _parseSliceExpression: function () { - // [start:end:step] where each part is optional, as well as the last - // colon. - var parts = [null, null, null]; - var index = 0; - var currentToken = this._lookahead(0); - while (currentToken !== TOK_RBRACKET && index < 3) { - if (currentToken === TOK_COLON) { - index++; - this._advance(); - } else if (currentToken === TOK_NUMBER) { - parts[index] = this._lookaheadToken(0).value; - this._advance(); - } else { - var t = this._lookahead(0); - var error = new Error( - "Syntax error, unexpected token: " + - t.value + - "(" + - t.type + - ")" - ); - error.name = "Parsererror"; - throw error; - } - currentToken = this._lookahead(0); - } - this._match(TOK_RBRACKET); - return { - type: "Slice", - children: parts, - }; - }, + return buf || bytesToUuid(rnds); +} - _parseComparator: function (left, comparator) { - var right = this.expression(bindingPower[comparator]); - return { - type: "Comparator", - name: comparator, - children: [left, right], - }; - }, +module.exports = v4; - _parseDotRHS: function (rbp) { - var lookahead = this._lookahead(0); - var exprTokens = [ - TOK_UNQUOTEDIDENTIFIER, - TOK_QUOTEDIDENTIFIER, - TOK_STAR, - ]; - if (exprTokens.indexOf(lookahead) >= 0) { - return this.expression(rbp); - } else if (lookahead === TOK_LBRACKET) { - this._match(TOK_LBRACKET); - return this._parseMultiselectList(); - } else if (lookahead === TOK_LBRACE) { - this._match(TOK_LBRACE); - return this._parseMultiselectHash(); - } - }, - _parseProjectionRHS: function (rbp) { - var right; - if (bindingPower[this._lookahead(0)] < 10) { - right = { type: "Identity" }; - } else if (this._lookahead(0) === TOK_LBRACKET) { - right = this.expression(rbp); - } else if (this._lookahead(0) === TOK_FILTER) { - right = this.expression(rbp); - } else if (this._lookahead(0) === TOK_DOT) { - this._match(TOK_DOT); - right = this._parseDotRHS(rbp); - } else { - var t = this._lookaheadToken(0); - var error = new Error( - "Sytanx error, unexpected token: " + - t.value + - "(" + - t.type + - ")" - ); - error.name = "ParserError"; - throw error; - } - return right; - }, +/***/ }), - _parseMultiselectList: function () { - var expressions = []; - while (this._lookahead(0) !== TOK_RBRACKET) { - var expression = this.expression(0); - expressions.push(expression); - if (this._lookahead(0) === TOK_COMMA) { - this._match(TOK_COMMA); - if (this._lookahead(0) === TOK_RBRACKET) { - throw new Error("Unexpected token Rbracket"); +/***/ 96323: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; +var __webpack_unused_export__; + +__webpack_unused_export__ = ({ value: true }); +var LRU_1 = __nccwpck_require__(77710); +var CACHE_SIZE = 1000; +/** + * Inspired node-lru-cache[https://github.com/isaacs/node-lru-cache] + */ +var EndpointCache = /** @class */ (function () { + function EndpointCache(maxSize) { + if (maxSize === void 0) { maxSize = CACHE_SIZE; } + this.maxSize = maxSize; + this.cache = new LRU_1.LRUCache(maxSize); + } + ; + Object.defineProperty(EndpointCache.prototype, "size", { + get: function () { + return this.cache.length; + }, + enumerable: true, + configurable: true + }); + EndpointCache.prototype.put = function (key, value) { + var keyString = typeof key !== 'string' ? EndpointCache.getKeyString(key) : key; + var endpointRecord = this.populateValue(value); + this.cache.put(keyString, endpointRecord); + }; + EndpointCache.prototype.get = function (key) { + var keyString = typeof key !== 'string' ? EndpointCache.getKeyString(key) : key; + var now = Date.now(); + var records = this.cache.get(keyString); + if (records) { + for (var i = 0; i < records.length; i++) { + var record = records[i]; + if (record.Expire < now) { + this.cache.remove(keyString); + return undefined; } - } } - this._match(TOK_RBRACKET); - return { type: "MultiSelectList", children: expressions }; - }, + } + return records; + }; + EndpointCache.getKeyString = function (key) { + var identifiers = []; + var identifierNames = Object.keys(key).sort(); + for (var i = 0; i < identifierNames.length; i++) { + var identifierName = identifierNames[i]; + if (key[identifierName] === undefined) + continue; + identifiers.push(key[identifierName]); + } + return identifiers.join(' '); + }; + EndpointCache.prototype.populateValue = function (endpoints) { + var now = Date.now(); + return endpoints.map(function (endpoint) { return ({ + Address: endpoint.Address || '', + Expire: now + (endpoint.CachePeriodInMinutes || 1) * 60 * 1000 + }); }); + }; + EndpointCache.prototype.empty = function () { + this.cache.empty(); + }; + EndpointCache.prototype.remove = function (key) { + var keyString = typeof key !== 'string' ? EndpointCache.getKeyString(key) : key; + this.cache.remove(keyString); + }; + return EndpointCache; +}()); +exports.$ = EndpointCache; + +/***/ }), + +/***/ 77710: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +var LinkedListNode = /** @class */ (function () { + function LinkedListNode(key, value) { + this.key = key; + this.value = value; + } + return LinkedListNode; +}()); +var LRUCache = /** @class */ (function () { + function LRUCache(size) { + this.nodeMap = {}; + this.size = 0; + if (typeof size !== 'number' || size < 1) { + throw new Error('Cache size can only be positive number'); + } + this.sizeLimit = size; + } + Object.defineProperty(LRUCache.prototype, "length", { + get: function () { + return this.size; + }, + enumerable: true, + configurable: true + }); + LRUCache.prototype.prependToList = function (node) { + if (!this.headerNode) { + this.tailNode = node; + } + else { + this.headerNode.prev = node; + node.next = this.headerNode; + } + this.headerNode = node; + this.size++; + }; + LRUCache.prototype.removeFromTail = function () { + if (!this.tailNode) { + return undefined; + } + var node = this.tailNode; + var prevNode = node.prev; + if (prevNode) { + prevNode.next = undefined; + } + node.prev = undefined; + this.tailNode = prevNode; + this.size--; + return node; + }; + LRUCache.prototype.detachFromList = function (node) { + if (this.headerNode === node) { + this.headerNode = node.next; + } + if (this.tailNode === node) { + this.tailNode = node.prev; + } + if (node.prev) { + node.prev.next = node.next; + } + if (node.next) { + node.next.prev = node.prev; + } + node.next = undefined; + node.prev = undefined; + this.size--; + }; + LRUCache.prototype.get = function (key) { + if (this.nodeMap[key]) { + var node = this.nodeMap[key]; + this.detachFromList(node); + this.prependToList(node); + return node.value; + } + }; + LRUCache.prototype.remove = function (key) { + if (this.nodeMap[key]) { + var node = this.nodeMap[key]; + this.detachFromList(node); + delete this.nodeMap[key]; + } + }; + LRUCache.prototype.put = function (key, value) { + if (this.nodeMap[key]) { + this.remove(key); + } + else if (this.size === this.sizeLimit) { + var tailNode = this.removeFromTail(); + var key_1 = tailNode.key; + delete this.nodeMap[key_1]; + } + var newNode = new LinkedListNode(key, value); + this.nodeMap[key] = newNode; + this.prependToList(newNode); + }; + LRUCache.prototype.empty = function () { + var keys = Object.keys(this.nodeMap); + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + var node = this.nodeMap[key]; + this.detachFromList(node); + delete this.nodeMap[key]; + } + }; + return LRUCache; +}()); +exports.LRUCache = LRUCache; + +/***/ }), + +/***/ 83682: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var register = __nccwpck_require__(44670) +var addHook = __nccwpck_require__(5549) +var removeHook = __nccwpck_require__(6819) + +// bind with array of arguments: https://stackoverflow.com/a/21792913 +var bind = Function.bind +var bindable = bind.bind(bind) + +function bindApi (hook, state, name) { + var removeHookRef = bindable(removeHook, null).apply(null, name ? [state, name] : [state]) + hook.api = { remove: removeHookRef } + hook.remove = removeHookRef + + ;['before', 'error', 'after', 'wrap'].forEach(function (kind) { + var args = name ? [state, kind, name] : [state, kind] + hook[kind] = hook.api[kind] = bindable(addHook, null).apply(null, args) + }) +} + +function HookSingular () { + var singularHookName = 'h' + var singularHookState = { + registry: {} + } + var singularHook = register.bind(null, singularHookState, singularHookName) + bindApi(singularHook, singularHookState, singularHookName) + return singularHook +} + +function HookCollection () { + var state = { + registry: {} + } + + var hook = register.bind(null, state) + bindApi(hook, state) + + return hook +} + +var collectionHookDeprecationMessageDisplayed = false +function Hook () { + if (!collectionHookDeprecationMessageDisplayed) { + console.warn('[before-after-hook]: "Hook()" repurposing warning, use "Hook.Collection()". Read more: https://git.io/upgrade-before-after-hook-to-1.4') + collectionHookDeprecationMessageDisplayed = true + } + return HookCollection() +} + +Hook.Singular = HookSingular.bind() +Hook.Collection = HookCollection.bind() + +module.exports = Hook +// expose constructors as a named property for TypeScript +module.exports.Hook = Hook +module.exports.Singular = Hook.Singular +module.exports.Collection = Hook.Collection + + +/***/ }), + +/***/ 5549: +/***/ ((module) => { + +module.exports = addHook + +function addHook (state, kind, name, hook) { + var orig = hook + if (!state.registry[name]) { + state.registry[name] = [] + } + + if (kind === 'before') { + hook = function (method, options) { + return Promise.resolve() + .then(orig.bind(null, options)) + .then(method.bind(null, options)) + } + } + + if (kind === 'after') { + hook = function (method, options) { + var result + return Promise.resolve() + .then(method.bind(null, options)) + .then(function (result_) { + result = result_ + return orig(result, options) + }) + .then(function () { + return result + }) + } + } - _parseMultiselectHash: function () { - var pairs = []; - var identifierTypes = [ - TOK_UNQUOTEDIDENTIFIER, - TOK_QUOTEDIDENTIFIER, - ]; - var keyToken, keyName, value, node; - for (;;) { - keyToken = this._lookaheadToken(0); - if (identifierTypes.indexOf(keyToken.type) < 0) { - throw new Error( - "Expecting an identifier token, got: " + keyToken.type - ); - } - keyName = keyToken.value; - this._advance(); - this._match(TOK_COLON); - value = this.expression(0); - node = { type: "KeyValuePair", name: keyName, value: value }; - pairs.push(node); - if (this._lookahead(0) === TOK_COMMA) { - this._match(TOK_COMMA); - } else if (this._lookahead(0) === TOK_RBRACE) { - this._match(TOK_RBRACE); - break; - } - } - return { type: "MultiSelectHash", children: pairs }; - }, - }; + if (kind === 'error') { + hook = function (method, options) { + return Promise.resolve() + .then(method.bind(null, options)) + .catch(function (error) { + return orig(error, options) + }) + } + } - function TreeInterpreter(runtime) { - this.runtime = runtime; - } + state.registry[name].push({ + hook: hook, + orig: orig + }) +} - TreeInterpreter.prototype = { - search: function (node, value) { - return this.visit(node, value); - }, - visit: function (node, value) { - var matched, - current, - result, - first, - second, - field, - left, - right, - collected, - i; - switch (node.type) { - case "Field": - if (value === null) { - return null; - } else if (isObject(value)) { - field = value[node.name]; - if (field === undefined) { - return null; - } else { - return field; - } - } else { - return null; - } - break; - case "Subexpression": - result = this.visit(node.children[0], value); - for (i = 1; i < node.children.length; i++) { - result = this.visit(node.children[1], result); - if (result === null) { - return null; - } - } - return result; - case "IndexExpression": - left = this.visit(node.children[0], value); - right = this.visit(node.children[1], left); - return right; - case "Index": - if (!isArray(value)) { - return null; - } - var index = node.value; - if (index < 0) { - index = value.length + index; - } - result = value[index]; - if (result === undefined) { - result = null; - } - return result; - case "Slice": - if (!isArray(value)) { - return null; - } - var sliceParams = node.children.slice(0); - var computed = this.computeSliceParams( - value.length, - sliceParams - ); - var start = computed[0]; - var stop = computed[1]; - var step = computed[2]; - result = []; - if (step > 0) { - for (i = start; i < stop; i += step) { - result.push(value[i]); - } - } else { - for (i = start; i > stop; i += step) { - result.push(value[i]); - } - } - return result; - case "Projection": - // Evaluate left child. - var base = this.visit(node.children[0], value); - if (!isArray(base)) { - return null; - } - collected = []; - for (i = 0; i < base.length; i++) { - current = this.visit(node.children[1], base[i]); - if (current !== null) { - collected.push(current); - } - } - return collected; - case "ValueProjection": - // Evaluate left child. - base = this.visit(node.children[0], value); - if (!isObject(base)) { - return null; - } - collected = []; - var values = objValues(base); - for (i = 0; i < values.length; i++) { - current = this.visit(node.children[1], values[i]); - if (current !== null) { - collected.push(current); - } - } - return collected; - case "FilterProjection": - base = this.visit(node.children[0], value); - if (!isArray(base)) { - return null; - } - var filtered = []; - var finalResults = []; - for (i = 0; i < base.length; i++) { - matched = this.visit(node.children[2], base[i]); - if (!isFalse(matched)) { - filtered.push(base[i]); - } - } - for (var j = 0; j < filtered.length; j++) { - current = this.visit(node.children[1], filtered[j]); - if (current !== null) { - finalResults.push(current); - } - } - return finalResults; - case "Comparator": - first = this.visit(node.children[0], value); - second = this.visit(node.children[1], value); - switch (node.name) { - case TOK_EQ: - result = strictDeepEqual(first, second); - break; - case TOK_NE: - result = !strictDeepEqual(first, second); - break; - case TOK_GT: - result = first > second; - break; - case TOK_GTE: - result = first >= second; - break; - case TOK_LT: - result = first < second; - break; - case TOK_LTE: - result = first <= second; - break; - default: - throw new Error("Unknown comparator: " + node.name); - } - return result; - case TOK_FLATTEN: - var original = this.visit(node.children[0], value); - if (!isArray(original)) { - return null; - } - var merged = []; - for (i = 0; i < original.length; i++) { - current = original[i]; - if (isArray(current)) { - merged.push.apply(merged, current); - } else { - merged.push(current); - } - } - return merged; - case "Identity": - return value; - case "MultiSelectList": - if (value === null) { - return null; - } - collected = []; - for (i = 0; i < node.children.length; i++) { - collected.push(this.visit(node.children[i], value)); - } - return collected; - case "MultiSelectHash": - if (value === null) { - return null; - } - collected = {}; - var child; - for (i = 0; i < node.children.length; i++) { - child = node.children[i]; - collected[child.name] = this.visit(child.value, value); - } - return collected; - case "OrExpression": - matched = this.visit(node.children[0], value); - if (isFalse(matched)) { - matched = this.visit(node.children[1], value); - } - return matched; - case "AndExpression": - first = this.visit(node.children[0], value); +/***/ }), - if (isFalse(first) === true) { - return first; - } - return this.visit(node.children[1], value); - case "NotExpression": - first = this.visit(node.children[0], value); - return isFalse(first); - case "Literal": - return node.value; - case TOK_PIPE: - left = this.visit(node.children[0], value); - return this.visit(node.children[1], left); - case TOK_CURRENT: - return value; - case "Function": - var resolvedArgs = []; - for (i = 0; i < node.children.length; i++) { - resolvedArgs.push(this.visit(node.children[i], value)); - } - return this.runtime.callFunction(node.name, resolvedArgs); - case "ExpressionReference": - var refNode = node.children[0]; - // Tag the node with a specific attribute so the type - // checker verify the type. - refNode.jmespathType = TOK_EXPREF; - return refNode; - default: - throw new Error("Unknown node type: " + node.type); - } - }, +/***/ 44670: +/***/ ((module) => { - computeSliceParams: function (arrayLength, sliceParams) { - var start = sliceParams[0]; - var stop = sliceParams[1]; - var step = sliceParams[2]; - var computed = [null, null, null]; - if (step === null) { - step = 1; - } else if (step === 0) { - var error = new Error("Invalid slice, step cannot be 0"); - error.name = "RuntimeError"; - throw error; - } - var stepValueNegative = step < 0 ? true : false; +module.exports = register - if (start === null) { - start = stepValueNegative ? arrayLength - 1 : 0; - } else { - start = this.capSliceRange(arrayLength, start, step); - } +function register (state, name, method, options) { + if (typeof method !== 'function') { + throw new Error('method for before hook must be a function') + } - if (stop === null) { - stop = stepValueNegative ? -1 : arrayLength; - } else { - stop = this.capSliceRange(arrayLength, stop, step); - } - computed[0] = start; - computed[1] = stop; - computed[2] = step; - return computed; - }, + if (!options) { + options = {} + } - capSliceRange: function (arrayLength, actualValue, step) { - if (actualValue < 0) { - actualValue += arrayLength; - if (actualValue < 0) { - actualValue = step < 0 ? -1 : 0; - } - } else if (actualValue >= arrayLength) { - actualValue = step < 0 ? arrayLength - 1 : arrayLength; - } - return actualValue; - }, - }; + if (Array.isArray(name)) { + return name.reverse().reduce(function (callback, name) { + return register.bind(null, state, name, callback, options) + }, method)() + } - function Runtime(interpreter) { - this._interpreter = interpreter; - this.functionTable = { - // name: [function, ] - // The can be: - // - // { - // args: [[type1, type2], [type1, type2]], - // variadic: true|false - // } - // - // Each arg in the arg list is a list of valid types - // (if the function is overloaded and supports multiple - // types. If the type is "any" then no type checking - // occurs on the argument. Variadic is optional - // and if not provided is assumed to be false. - abs: { - _func: this._functionAbs, - _signature: [{ types: [TYPE_NUMBER] }], - }, - avg: { - _func: this._functionAvg, - _signature: [{ types: [TYPE_ARRAY_NUMBER] }], - }, - ceil: { - _func: this._functionCeil, - _signature: [{ types: [TYPE_NUMBER] }], - }, - contains: { - _func: this._functionContains, - _signature: [ - { types: [TYPE_STRING, TYPE_ARRAY] }, - { types: [TYPE_ANY] }, - ], - }, - ends_with: { - _func: this._functionEndsWith, - _signature: [{ types: [TYPE_STRING] }, { types: [TYPE_STRING] }], - }, - floor: { - _func: this._functionFloor, - _signature: [{ types: [TYPE_NUMBER] }], - }, - length: { - _func: this._functionLength, - _signature: [{ types: [TYPE_STRING, TYPE_ARRAY, TYPE_OBJECT] }], - }, - map: { - _func: this._functionMap, - _signature: [{ types: [TYPE_EXPREF] }, { types: [TYPE_ARRAY] }], - }, - max: { - _func: this._functionMax, - _signature: [{ types: [TYPE_ARRAY_NUMBER, TYPE_ARRAY_STRING] }], - }, - merge: { - _func: this._functionMerge, - _signature: [{ types: [TYPE_OBJECT], variadic: true }], - }, - max_by: { - _func: this._functionMaxBy, - _signature: [{ types: [TYPE_ARRAY] }, { types: [TYPE_EXPREF] }], - }, - sum: { - _func: this._functionSum, - _signature: [{ types: [TYPE_ARRAY_NUMBER] }], - }, - starts_with: { - _func: this._functionStartsWith, - _signature: [{ types: [TYPE_STRING] }, { types: [TYPE_STRING] }], - }, - min: { - _func: this._functionMin, - _signature: [{ types: [TYPE_ARRAY_NUMBER, TYPE_ARRAY_STRING] }], - }, - min_by: { - _func: this._functionMinBy, - _signature: [{ types: [TYPE_ARRAY] }, { types: [TYPE_EXPREF] }], - }, - type: { - _func: this._functionType, - _signature: [{ types: [TYPE_ANY] }], - }, - keys: { - _func: this._functionKeys, - _signature: [{ types: [TYPE_OBJECT] }], - }, - values: { - _func: this._functionValues, - _signature: [{ types: [TYPE_OBJECT] }], - }, - sort: { - _func: this._functionSort, - _signature: [{ types: [TYPE_ARRAY_STRING, TYPE_ARRAY_NUMBER] }], - }, - sort_by: { - _func: this._functionSortBy, - _signature: [{ types: [TYPE_ARRAY] }, { types: [TYPE_EXPREF] }], - }, - join: { - _func: this._functionJoin, - _signature: [ - { types: [TYPE_STRING] }, - { types: [TYPE_ARRAY_STRING] }, - ], - }, - reverse: { - _func: this._functionReverse, - _signature: [{ types: [TYPE_STRING, TYPE_ARRAY] }], - }, - to_array: { - _func: this._functionToArray, - _signature: [{ types: [TYPE_ANY] }], - }, - to_string: { - _func: this._functionToString, - _signature: [{ types: [TYPE_ANY] }], - }, - to_number: { - _func: this._functionToNumber, - _signature: [{ types: [TYPE_ANY] }], - }, - not_null: { - _func: this._functionNotNull, - _signature: [{ types: [TYPE_ANY], variadic: true }], - }, - }; - } + return Promise.resolve() + .then(function () { + if (!state.registry[name]) { + return method(options) + } - Runtime.prototype = { - callFunction: function (name, resolvedArgs) { - var functionEntry = this.functionTable[name]; - if (functionEntry === undefined) { - throw new Error("Unknown function: " + name + "()"); - } - this._validateArgs(name, resolvedArgs, functionEntry._signature); - return functionEntry._func.call(this, resolvedArgs); - }, + return (state.registry[name]).reduce(function (method, registered) { + return registered.hook.bind(null, method, options) + }, method)() + }) +} - _validateArgs: function (name, args, signature) { - // Validating the args requires validating - // the correct arity and the correct type of each arg. - // If the last argument is declared as variadic, then we need - // a minimum number of args to be required. Otherwise it has to - // be an exact amount. - var pluralized; - if (signature[signature.length - 1].variadic) { - if (args.length < signature.length) { - pluralized = - signature.length === 1 ? " argument" : " arguments"; - throw new Error( - "ArgumentError: " + - name + - "() " + - "takes at least" + - signature.length + - pluralized + - " but received " + - args.length - ); - } - } else if (args.length !== signature.length) { - pluralized = signature.length === 1 ? " argument" : " arguments"; - throw new Error( - "ArgumentError: " + - name + - "() " + - "takes " + - signature.length + - pluralized + - " but received " + - args.length - ); - } - var currentSpec; - var actualType; - var typeMatched; - for (var i = 0; i < signature.length; i++) { - typeMatched = false; - currentSpec = signature[i].types; - actualType = this._getTypeName(args[i]); - for (var j = 0; j < currentSpec.length; j++) { - if (this._typeMatches(actualType, currentSpec[j], args[i])) { - typeMatched = true; - break; - } - } - if (!typeMatched) { - throw new Error( - "TypeError: " + - name + - "() " + - "expected argument " + - (i + 1) + - " to be type " + - currentSpec + - " but received type " + - actualType + - " instead." - ); - } - } - }, - _typeMatches: function (actual, expected, argValue) { - if (expected === TYPE_ANY) { - return true; - } - if ( - expected === TYPE_ARRAY_STRING || - expected === TYPE_ARRAY_NUMBER || - expected === TYPE_ARRAY - ) { - // The expected type can either just be array, - // or it can require a specific subtype (array of numbers). - // - // The simplest case is if "array" with no subtype is specified. - if (expected === TYPE_ARRAY) { - return actual === TYPE_ARRAY; - } else if (actual === TYPE_ARRAY) { - // Otherwise we need to check subtypes. - // I think this has potential to be improved. - var subtype; - if (expected === TYPE_ARRAY_NUMBER) { - subtype = TYPE_NUMBER; - } else if (expected === TYPE_ARRAY_STRING) { - subtype = TYPE_STRING; - } - for (var i = 0; i < argValue.length; i++) { - if ( - !this._typeMatches( - this._getTypeName(argValue[i]), - subtype, - argValue[i] - ) - ) { - return false; - } - } - return true; - } - } else { - return actual === expected; - } - }, - _getTypeName: function (obj) { - switch (Object.prototype.toString.call(obj)) { - case "[object String]": - return TYPE_STRING; - case "[object Number]": - return TYPE_NUMBER; - case "[object Array]": - return TYPE_ARRAY; - case "[object Boolean]": - return TYPE_BOOLEAN; - case "[object Null]": - return TYPE_NULL; - case "[object Object]": - // Check if it's an expref. If it has, it's been - // tagged with a jmespathType attr of 'Expref'; - if (obj.jmespathType === TOK_EXPREF) { - return TYPE_EXPREF; - } else { - return TYPE_OBJECT; - } - } - }, +/***/ }), - _functionStartsWith: function (resolvedArgs) { - return resolvedArgs[0].lastIndexOf(resolvedArgs[1]) === 0; - }, +/***/ 6819: +/***/ ((module) => { - _functionEndsWith: function (resolvedArgs) { - var searchStr = resolvedArgs[0]; - var suffix = resolvedArgs[1]; - return ( - searchStr.indexOf(suffix, searchStr.length - suffix.length) !== -1 - ); - }, +module.exports = removeHook - _functionReverse: function (resolvedArgs) { - var typeName = this._getTypeName(resolvedArgs[0]); - if (typeName === TYPE_STRING) { - var originalStr = resolvedArgs[0]; - var reversedStr = ""; - for (var i = originalStr.length - 1; i >= 0; i--) { - reversedStr += originalStr[i]; - } - return reversedStr; - } else { - var reversedArray = resolvedArgs[0].slice(0); - reversedArray.reverse(); - return reversedArray; - } - }, +function removeHook (state, name, method) { + if (!state.registry[name]) { + return + } - _functionAbs: function (resolvedArgs) { - return Math.abs(resolvedArgs[0]); - }, + var index = state.registry[name] + .map(function (registered) { return registered.orig }) + .indexOf(method) - _functionCeil: function (resolvedArgs) { - return Math.ceil(resolvedArgs[0]); - }, + if (index === -1) { + return + } - _functionAvg: function (resolvedArgs) { - var sum = 0; - var inputArray = resolvedArgs[0]; - for (var i = 0; i < inputArray.length; i++) { - sum += inputArray[i]; - } - return sum / inputArray.length; - }, + state.registry[name].splice(index, 1) +} - _functionContains: function (resolvedArgs) { - return resolvedArgs[0].indexOf(resolvedArgs[1]) >= 0; - }, - _functionFloor: function (resolvedArgs) { - return Math.floor(resolvedArgs[0]); - }, +/***/ }), - _functionLength: function (resolvedArgs) { - if (!isObject(resolvedArgs[0])) { - return resolvedArgs[0].length; - } else { - // As far as I can tell, there's no way to get the length - // of an object without O(n) iteration through the object. - return Object.keys(resolvedArgs[0]).length; - } - }, +/***/ 72358: +/***/ ((module) => { - _functionMap: function (resolvedArgs) { - var mapped = []; - var interpreter = this._interpreter; - var exprefNode = resolvedArgs[0]; - var elements = resolvedArgs[1]; - for (var i = 0; i < elements.length; i++) { - mapped.push(interpreter.visit(exprefNode, elements[i])); - } - return mapped; - }, +module.exports = function btoa(str) { + return new Buffer(str).toString('base64') +} - _functionMerge: function (resolvedArgs) { - var merged = {}; - for (var i = 0; i < resolvedArgs.length; i++) { - var current = resolvedArgs[i]; - for (var key in current) { - merged[key] = current[key]; - } - } - return merged; - }, - _functionMax: function (resolvedArgs) { - if (resolvedArgs[0].length > 0) { - var typeName = this._getTypeName(resolvedArgs[0][0]); - if (typeName === TYPE_NUMBER) { - return Math.max.apply(Math, resolvedArgs[0]); - } else { - var elements = resolvedArgs[0]; - var maxElement = elements[0]; - for (var i = 1; i < elements.length; i++) { - if (maxElement.localeCompare(elements[i]) < 0) { - maxElement = elements[i]; - } - } - return maxElement; - } - } else { - return null; - } - }, +/***/ }), - _functionMin: function (resolvedArgs) { - if (resolvedArgs[0].length > 0) { - var typeName = this._getTypeName(resolvedArgs[0][0]); - if (typeName === TYPE_NUMBER) { - return Math.min.apply(Math, resolvedArgs[0]); - } else { - var elements = resolvedArgs[0]; - var minElement = elements[0]; - for (var i = 1; i < elements.length; i++) { - if (elements[i].localeCompare(minElement) < 0) { - minElement = elements[i]; - } - } - return minElement; - } - } else { - return null; - } - }, +/***/ 72746: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - _functionSum: function (resolvedArgs) { - var sum = 0; - var listToSum = resolvedArgs[0]; - for (var i = 0; i < listToSum.length; i++) { - sum += listToSum[i]; - } - return sum; - }, +"use strict"; - _functionType: function (resolvedArgs) { - switch (this._getTypeName(resolvedArgs[0])) { - case TYPE_NUMBER: - return "number"; - case TYPE_STRING: - return "string"; - case TYPE_ARRAY: - return "array"; - case TYPE_OBJECT: - return "object"; - case TYPE_BOOLEAN: - return "boolean"; - case TYPE_EXPREF: - return "expref"; - case TYPE_NULL: - return "null"; - } - }, - _functionKeys: function (resolvedArgs) { - return Object.keys(resolvedArgs[0]); - }, +const cp = __nccwpck_require__(32081); +const parse = __nccwpck_require__(66855); +const enoent = __nccwpck_require__(44101); + +function spawn(command, args, options) { + // Parse the arguments + const parsed = parse(command, args, options); + + // Spawn the child process + const spawned = cp.spawn(parsed.command, parsed.args, parsed.options); + + // Hook into child process "exit" event to emit an error if the command + // does not exists, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16 + enoent.hookChildProcess(spawned, parsed); - _functionValues: function (resolvedArgs) { - var obj = resolvedArgs[0]; - var keys = Object.keys(obj); - var values = []; - for (var i = 0; i < keys.length; i++) { - values.push(obj[keys[i]]); - } - return values; - }, + return spawned; +} - _functionJoin: function (resolvedArgs) { - var joinChar = resolvedArgs[0]; - var listJoin = resolvedArgs[1]; - return listJoin.join(joinChar); - }, +function spawnSync(command, args, options) { + // Parse the arguments + const parsed = parse(command, args, options); - _functionToArray: function (resolvedArgs) { - if (this._getTypeName(resolvedArgs[0]) === TYPE_ARRAY) { - return resolvedArgs[0]; - } else { - return [resolvedArgs[0]]; - } - }, + // Spawn the child process + const result = cp.spawnSync(parsed.command, parsed.args, parsed.options); - _functionToString: function (resolvedArgs) { - if (this._getTypeName(resolvedArgs[0]) === TYPE_STRING) { - return resolvedArgs[0]; - } else { - return JSON.stringify(resolvedArgs[0]); - } - }, + // Analyze if the command does not exist, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16 + result.error = result.error || enoent.verifyENOENTSync(result.status, parsed); - _functionToNumber: function (resolvedArgs) { - var typeName = this._getTypeName(resolvedArgs[0]); - var convertedValue; - if (typeName === TYPE_NUMBER) { - return resolvedArgs[0]; - } else if (typeName === TYPE_STRING) { - convertedValue = +resolvedArgs[0]; - if (!isNaN(convertedValue)) { - return convertedValue; - } - } - return null; - }, + return result; +} - _functionNotNull: function (resolvedArgs) { - for (var i = 0; i < resolvedArgs.length; i++) { - if (this._getTypeName(resolvedArgs[i]) !== TYPE_NULL) { - return resolvedArgs[i]; - } - } - return null; - }, +module.exports = spawn; +module.exports.spawn = spawn; +module.exports.sync = spawnSync; - _functionSort: function (resolvedArgs) { - var sortedArray = resolvedArgs[0].slice(0); - sortedArray.sort(); - return sortedArray; - }, +module.exports._parse = parse; +module.exports._enoent = enoent; - _functionSortBy: function (resolvedArgs) { - var sortedArray = resolvedArgs[0].slice(0); - if (sortedArray.length === 0) { - return sortedArray; - } - var interpreter = this._interpreter; - var exprefNode = resolvedArgs[1]; - var requiredType = this._getTypeName( - interpreter.visit(exprefNode, sortedArray[0]) - ); - if ([TYPE_NUMBER, TYPE_STRING].indexOf(requiredType) < 0) { - throw new Error("TypeError"); - } - var that = this; - // In order to get a stable sort out of an unstable - // sort algorithm, we decorate/sort/undecorate (DSU) - // by creating a new list of [index, element] pairs. - // In the cmp function, if the evaluated elements are - // equal, then the index will be used as the tiebreaker. - // After the decorated list has been sorted, it will be - // undecorated to extract the original elements. - var decorated = []; - for (var i = 0; i < sortedArray.length; i++) { - decorated.push([i, sortedArray[i]]); - } - decorated.sort(function (a, b) { - var exprA = interpreter.visit(exprefNode, a[1]); - var exprB = interpreter.visit(exprefNode, b[1]); - if (that._getTypeName(exprA) !== requiredType) { - throw new Error( - "TypeError: expected " + - requiredType + - ", received " + - that._getTypeName(exprA) - ); - } else if (that._getTypeName(exprB) !== requiredType) { - throw new Error( - "TypeError: expected " + - requiredType + - ", received " + - that._getTypeName(exprB) - ); - } - if (exprA > exprB) { - return 1; - } else if (exprA < exprB) { - return -1; - } else { - // If they're equal compare the items by their - // order to maintain relative order of equal keys - // (i.e. to get a stable sort). - return a[0] - b[0]; - } - }); - // Undecorate: extract out the original list elements. - for (var j = 0; j < decorated.length; j++) { - sortedArray[j] = decorated[j][1]; - } - return sortedArray; - }, - _functionMaxBy: function (resolvedArgs) { - var exprefNode = resolvedArgs[1]; - var resolvedArray = resolvedArgs[0]; - var keyFunction = this.createKeyFunction(exprefNode, [ - TYPE_NUMBER, - TYPE_STRING, - ]); - var maxNumber = -Infinity; - var maxRecord; - var current; - for (var i = 0; i < resolvedArray.length; i++) { - current = keyFunction(resolvedArray[i]); - if (current > maxNumber) { - maxNumber = current; - maxRecord = resolvedArray[i]; - } - } - return maxRecord; - }, +/***/ }), - _functionMinBy: function (resolvedArgs) { - var exprefNode = resolvedArgs[1]; - var resolvedArray = resolvedArgs[0]; - var keyFunction = this.createKeyFunction(exprefNode, [ - TYPE_NUMBER, - TYPE_STRING, - ]); - var minNumber = Infinity; - var minRecord; - var current; - for (var i = 0; i < resolvedArray.length; i++) { - current = keyFunction(resolvedArray[i]); - if (current < minNumber) { - minNumber = current; - minRecord = resolvedArray[i]; - } - } - return minRecord; - }, +/***/ 44101: +/***/ ((module) => { - createKeyFunction: function (exprefNode, allowedTypes) { - var that = this; - var interpreter = this._interpreter; - var keyFunc = function (x) { - var current = interpreter.visit(exprefNode, x); - if (allowedTypes.indexOf(that._getTypeName(current)) < 0) { - var msg = - "TypeError: expected one of " + - allowedTypes + - ", received " + - that._getTypeName(current); - throw new Error(msg); - } - return current; - }; - return keyFunc; - }, - }; +"use strict"; - function compile(stream) { - var parser = new Parser(); - var ast = parser.parse(stream); - return ast; - } - function tokenize(stream) { - var lexer = new Lexer(); - return lexer.tokenize(stream); - } - - function search(data, expression) { - var parser = new Parser(); - // This needs to be improved. Both the interpreter and runtime depend on - // each other. The runtime needs the interpreter to support exprefs. - // There's likely a clean way to avoid the cyclic dependency. - var runtime = new Runtime(); - var interpreter = new TreeInterpreter(runtime); - runtime._interpreter = interpreter; - var node = parser.parse(expression); - return interpreter.search(node, data); - } - - exports.tokenize = tokenize; - exports.compile = compile; - exports.search = search; - exports.strictDeepEqual = strictDeepEqual; - })(false ? 0 : exports); - - /***/ - }, - - /***/ 99197: /***/ (module) => { - /** - * lodash (Custom Build) - * Build: `lodash modularize exports="npm" -o ./` - * Copyright jQuery Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */ - - /** Used as the `TypeError` message for "Functions" methods. */ - var FUNC_ERROR_TEXT = "Expected a function"; - - /** Used to stand-in for `undefined` hash values. */ - var HASH_UNDEFINED = "__lodash_hash_undefined__"; - - /** Used as references for various `Number` constants. */ - var INFINITY = 1 / 0; - - /** `Object#toString` result references. */ - var funcTag = "[object Function]", - genTag = "[object GeneratorFunction]", - symbolTag = "[object Symbol]"; - - /** Used to match property names within property paths. */ - var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, - reIsPlainProp = /^\w*$/, - reLeadingDot = /^\./, - rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; - - /** - * Used to match `RegExp` - * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). - */ - var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; - - /** Used to match backslashes in property paths. */ - var reEscapeChar = /\\(\\)?/g; - - /** Used to detect host constructors (Safari). */ - var reIsHostCtor = /^\[object .+?Constructor\]$/; - - /** Detect free variable `global` from Node.js. */ - var freeGlobal = - typeof global == "object" && - global && - global.Object === Object && - global; - - /** Detect free variable `self`. */ - var freeSelf = - typeof self == "object" && self && self.Object === Object && self; - - /** Used as a reference to the global object. */ - var root = freeGlobal || freeSelf || Function("return this")(); - - /** - * Gets the value at `key` of `object`. - * - * @private - * @param {Object} [object] The object to query. - * @param {string} key The key of the property to get. - * @returns {*} Returns the property value. - */ - function getValue(object, key) { - return object == null ? undefined : object[key]; - } +const isWin = process.platform === 'win32'; - /** - * Checks if `value` is a host object in IE < 9. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a host object, else `false`. - */ - function isHostObject(value) { - // Many host objects are `Object` objects that can coerce to strings - // despite having improperly defined `toString` methods. - var result = false; - if (value != null && typeof value.toString != "function") { - try { - result = !!(value + ""); - } catch (e) {} - } - return result; - } +function notFoundError(original, syscall) { + return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), { + code: 'ENOENT', + errno: 'ENOENT', + syscall: `${syscall} ${original.command}`, + path: original.command, + spawnargs: original.args, + }); +} - /** Used for built-in method references. */ - var arrayProto = Array.prototype, - funcProto = Function.prototype, - objectProto = Object.prototype; +function hookChildProcess(cp, parsed) { + if (!isWin) { + return; + } - /** Used to detect overreaching core-js shims. */ - var coreJsData = root["__core-js_shared__"]; + const originalEmit = cp.emit; - /** Used to detect methods masquerading as native. */ - var maskSrcKey = (function () { - var uid = /[^.]+$/.exec( - (coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO) || "" - ); - return uid ? "Symbol(src)_1." + uid : ""; - })(); - - /** Used to resolve the decompiled source of functions. */ - var funcToString = funcProto.toString; - - /** Used to check objects for own properties. */ - var hasOwnProperty = objectProto.hasOwnProperty; - - /** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ - var objectToString = objectProto.toString; - - /** Used to detect if a method is native. */ - var reIsNative = RegExp( - "^" + - funcToString - .call(hasOwnProperty) - .replace(reRegExpChar, "\\$&") - .replace( - /hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, - "$1.*?" - ) + - "$" - ); + cp.emit = function (name, arg1) { + // If emitting "exit" event and exit code is 1, we need to check if + // the command exists and emit an "error" instead + // See https://github.com/IndigoUnited/node-cross-spawn/issues/16 + if (name === 'exit') { + const err = verifyENOENT(arg1, parsed, 'spawn'); - /** Built-in value references. */ - var Symbol = root.Symbol, - splice = arrayProto.splice; - - /* Built-in method references that are verified to be native. */ - var Map = getNative(root, "Map"), - nativeCreate = getNative(Object, "create"); - - /** Used to convert symbols to primitives and strings. */ - var symbolProto = Symbol ? Symbol.prototype : undefined, - symbolToString = symbolProto ? symbolProto.toString : undefined; - - /** - * Creates a hash object. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ - function Hash(entries) { - var index = -1, - length = entries ? entries.length : 0; - - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); + if (err) { + return originalEmit.call(cp, 'error', err); + } } - } - /** - * Removes all key-value entries from the hash. - * - * @private - * @name clear - * @memberOf Hash - */ - function hashClear() { - this.__data__ = nativeCreate ? nativeCreate(null) : {}; - } + return originalEmit.apply(cp, arguments); // eslint-disable-line prefer-rest-params + }; +} - /** - * Removes `key` and its value from the hash. - * - * @private - * @name delete - * @memberOf Hash - * @param {Object} hash The hash to modify. - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ - function hashDelete(key) { - return this.has(key) && delete this.__data__[key]; - } +function verifyENOENT(status, parsed) { + if (isWin && status === 1 && !parsed.file) { + return notFoundError(parsed.original, 'spawn'); + } - /** - * Gets the hash value for `key`. - * - * @private - * @name get - * @memberOf Hash - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ - function hashGet(key) { - var data = this.__data__; - if (nativeCreate) { - var result = data[key]; - return result === HASH_UNDEFINED ? undefined : result; - } - return hasOwnProperty.call(data, key) ? data[key] : undefined; - } + return null; +} - /** - * Checks if a hash value for `key` exists. - * - * @private - * @name has - * @memberOf Hash - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ - function hashHas(key) { - var data = this.__data__; - return nativeCreate - ? data[key] !== undefined - : hasOwnProperty.call(data, key); - } +function verifyENOENTSync(status, parsed) { + if (isWin && status === 1 && !parsed.file) { + return notFoundError(parsed.original, 'spawnSync'); + } - /** - * Sets the hash `key` to `value`. - * - * @private - * @name set - * @memberOf Hash - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the hash instance. - */ - function hashSet(key, value) { - var data = this.__data__; - data[key] = - nativeCreate && value === undefined ? HASH_UNDEFINED : value; - return this; - } + return null; +} - // Add methods to `Hash`. - Hash.prototype.clear = hashClear; - Hash.prototype["delete"] = hashDelete; - Hash.prototype.get = hashGet; - Hash.prototype.has = hashHas; - Hash.prototype.set = hashSet; - - /** - * Creates an list cache object. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ - function ListCache(entries) { - var index = -1, - length = entries ? entries.length : 0; - - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } - } +module.exports = { + hookChildProcess, + verifyENOENT, + verifyENOENTSync, + notFoundError, +}; - /** - * Removes all key-value entries from the list cache. - * - * @private - * @name clear - * @memberOf ListCache - */ - function listCacheClear() { - this.__data__ = []; - } - /** - * Removes `key` and its value from the list cache. - * - * @private - * @name delete - * @memberOf ListCache - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ - function listCacheDelete(key) { - var data = this.__data__, - index = assocIndexOf(data, key); - - if (index < 0) { - return false; - } - var lastIndex = data.length - 1; - if (index == lastIndex) { - data.pop(); - } else { - splice.call(data, index, 1); - } - return true; - } +/***/ }), - /** - * Gets the list cache value for `key`. - * - * @private - * @name get - * @memberOf ListCache - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ - function listCacheGet(key) { - var data = this.__data__, - index = assocIndexOf(data, key); - - return index < 0 ? undefined : data[index][1]; - } +/***/ 66855: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - /** - * Checks if a list cache value for `key` exists. - * - * @private - * @name has - * @memberOf ListCache - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ - function listCacheHas(key) { - return assocIndexOf(this.__data__, key) > -1; - } +"use strict"; - /** - * Sets the list cache `key` to `value`. - * - * @private - * @name set - * @memberOf ListCache - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the list cache instance. - */ - function listCacheSet(key, value) { - var data = this.__data__, - index = assocIndexOf(data, key); - - if (index < 0) { - data.push([key, value]); - } else { - data[index][1] = value; - } - return this; - } - // Add methods to `ListCache`. - ListCache.prototype.clear = listCacheClear; - ListCache.prototype["delete"] = listCacheDelete; - ListCache.prototype.get = listCacheGet; - ListCache.prototype.has = listCacheHas; - ListCache.prototype.set = listCacheSet; - - /** - * Creates a map cache object to store key-value pairs. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ - function MapCache(entries) { - var index = -1, - length = entries ? entries.length : 0; - - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } - } +const path = __nccwpck_require__(71017); +const niceTry = __nccwpck_require__(38560); +const resolveCommand = __nccwpck_require__(87274); +const escape = __nccwpck_require__(34274); +const readShebang = __nccwpck_require__(41252); +const semver = __nccwpck_require__(85911); - /** - * Removes all key-value entries from the map. - * - * @private - * @name clear - * @memberOf MapCache - */ - function mapCacheClear() { - this.__data__ = { - hash: new Hash(), - map: new (Map || ListCache)(), - string: new Hash(), - }; - } +const isWin = process.platform === 'win32'; +const isExecutableRegExp = /\.(?:com|exe)$/i; +const isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i; - /** - * Removes `key` and its value from the map. - * - * @private - * @name delete - * @memberOf MapCache - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ - function mapCacheDelete(key) { - return getMapData(this, key)["delete"](key); - } +// `options.shell` is supported in Node ^4.8.0, ^5.7.0 and >= 6.0.0 +const supportsShellOption = niceTry(() => semver.satisfies(process.version, '^4.8.0 || ^5.7.0 || >= 6.0.0', true)) || false; - /** - * Gets the map value for `key`. - * - * @private - * @name get - * @memberOf MapCache - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ - function mapCacheGet(key) { - return getMapData(this, key).get(key); - } +function detectShebang(parsed) { + parsed.file = resolveCommand(parsed); - /** - * Checks if a map value for `key` exists. - * - * @private - * @name has - * @memberOf MapCache - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ - function mapCacheHas(key) { - return getMapData(this, key).has(key); - } + const shebang = parsed.file && readShebang(parsed.file); - /** - * Sets the map `key` to `value`. - * - * @private - * @name set - * @memberOf MapCache - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the map cache instance. - */ - function mapCacheSet(key, value) { - getMapData(this, key).set(key, value); - return this; - } + if (shebang) { + parsed.args.unshift(parsed.file); + parsed.command = shebang; - // Add methods to `MapCache`. - MapCache.prototype.clear = mapCacheClear; - MapCache.prototype["delete"] = mapCacheDelete; - MapCache.prototype.get = mapCacheGet; - MapCache.prototype.has = mapCacheHas; - MapCache.prototype.set = mapCacheSet; - - /** - * Gets the index at which the `key` is found in `array` of key-value pairs. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} key The key to search for. - * @returns {number} Returns the index of the matched value, else `-1`. - */ - function assocIndexOf(array, key) { - var length = array.length; - while (length--) { - if (eq(array[length][0], key)) { - return length; - } - } - return -1; - } + return resolveCommand(parsed); + } - /** - * The base implementation of `_.get` without support for default values. - * - * @private - * @param {Object} object The object to query. - * @param {Array|string} path The path of the property to get. - * @returns {*} Returns the resolved value. - */ - function baseGet(object, path) { - path = isKey(path, object) ? [path] : castPath(path); + return parsed.file; +} - var index = 0, - length = path.length; +function parseNonShell(parsed) { + if (!isWin) { + return parsed; + } - while (object != null && index < length) { - object = object[toKey(path[index++])]; - } - return index && index == length ? object : undefined; - } + // Detect & add support for shebangs + const commandFile = detectShebang(parsed); - /** - * The base implementation of `_.isNative` without bad shim checks. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a native function, - * else `false`. - */ - function baseIsNative(value) { - if (!isObject(value) || isMasked(value)) { - return false; - } - var pattern = - isFunction(value) || isHostObject(value) ? reIsNative : reIsHostCtor; - return pattern.test(toSource(value)); - } + // We don't need a shell if the command filename is an executable + const needsShell = !isExecutableRegExp.test(commandFile); - /** - * The base implementation of `_.toString` which doesn't convert nullish - * values to empty strings. - * - * @private - * @param {*} value The value to process. - * @returns {string} Returns the string. - */ - function baseToString(value) { - // Exit early for strings to avoid a performance hit in some environments. - if (typeof value == "string") { - return value; - } - if (isSymbol(value)) { - return symbolToString ? symbolToString.call(value) : ""; - } - var result = value + ""; - return result == "0" && 1 / value == -INFINITY ? "-0" : result; - } + // If a shell is required, use cmd.exe and take care of escaping everything correctly + // Note that `forceShell` is an hidden option used only in tests + if (parsed.options.forceShell || needsShell) { + // Need to double escape meta chars if the command is a cmd-shim located in `node_modules/.bin/` + // The cmd-shim simply calls execute the package bin file with NodeJS, proxying any argument + // Because the escape of metachars with ^ gets interpreted when the cmd.exe is first called, + // we need to double escape them + const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile); - /** - * Casts `value` to a path array if it's not one. - * - * @private - * @param {*} value The value to inspect. - * @returns {Array} Returns the cast property path array. - */ - function castPath(value) { - return isArray(value) ? value : stringToPath(value); - } + // Normalize posix paths into OS compatible paths (e.g.: foo/bar -> foo\bar) + // This is necessary otherwise it will always fail with ENOENT in those cases + parsed.command = path.normalize(parsed.command); - /** - * Gets the data for `map`. - * - * @private - * @param {Object} map The map to query. - * @param {string} key The reference key. - * @returns {*} Returns the map data. - */ - function getMapData(map, key) { - var data = map.__data__; - return isKeyable(key) - ? data[typeof key == "string" ? "string" : "hash"] - : data.map; - } + // Escape command & arguments + parsed.command = escape.command(parsed.command); + parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars)); - /** - * Gets the native function at `key` of `object`. - * - * @private - * @param {Object} object The object to query. - * @param {string} key The key of the method to get. - * @returns {*} Returns the function if it's native, else `undefined`. - */ - function getNative(object, key) { - var value = getValue(object, key); - return baseIsNative(value) ? value : undefined; - } + const shellCommand = [parsed.command].concat(parsed.args).join(' '); - /** - * Checks if `value` is a property name and not a property path. - * - * @private - * @param {*} value The value to check. - * @param {Object} [object] The object to query keys on. - * @returns {boolean} Returns `true` if `value` is a property name, else `false`. - */ - function isKey(value, object) { - if (isArray(value)) { - return false; - } - var type = typeof value; - if ( - type == "number" || - type == "symbol" || - type == "boolean" || - value == null || - isSymbol(value) - ) { - return true; - } - return ( - reIsPlainProp.test(value) || - !reIsDeepProp.test(value) || - (object != null && value in Object(object)) - ); - } + parsed.args = ['/d', '/s', '/c', `"${shellCommand}"`]; + parsed.command = process.env.comspec || 'cmd.exe'; + parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped + } - /** - * Checks if `value` is suitable for use as unique object key. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is suitable, else `false`. - */ - function isKeyable(value) { - var type = typeof value; - return type == "string" || - type == "number" || - type == "symbol" || - type == "boolean" - ? value !== "__proto__" - : value === null; - } + return parsed; +} - /** - * Checks if `func` has its source masked. - * - * @private - * @param {Function} func The function to check. - * @returns {boolean} Returns `true` if `func` is masked, else `false`. - */ - function isMasked(func) { - return !!maskSrcKey && maskSrcKey in func; - } +function parseShell(parsed) { + // If node supports the shell option, there's no need to mimic its behavior + if (supportsShellOption) { + return parsed; + } + + // Mimic node shell option + // See https://github.com/nodejs/node/blob/b9f6a2dc059a1062776133f3d4fd848c4da7d150/lib/child_process.js#L335 + const shellCommand = [parsed.command].concat(parsed.args).join(' '); + + if (isWin) { + parsed.command = typeof parsed.options.shell === 'string' ? parsed.options.shell : process.env.comspec || 'cmd.exe'; + parsed.args = ['/d', '/s', '/c', `"${shellCommand}"`]; + parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped + } else { + if (typeof parsed.options.shell === 'string') { + parsed.command = parsed.options.shell; + } else if (process.platform === 'android') { + parsed.command = '/system/bin/sh'; + } else { + parsed.command = '/bin/sh'; + } - /** - * Converts `string` to a property path array. - * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the property path array. - */ - var stringToPath = memoize(function (string) { - string = toString(string); - - var result = []; - if (reLeadingDot.test(string)) { - result.push(""); - } - string.replace(rePropName, function (match, number, quote, string) { - result.push( - quote ? string.replace(reEscapeChar, "$1") : number || match - ); - }); - return result; - }); + parsed.args = ['-c', shellCommand]; + } - /** - * Converts `value` to a string key if it's not a string or symbol. - * - * @private - * @param {*} value The value to inspect. - * @returns {string|symbol} Returns the key. - */ - function toKey(value) { - if (typeof value == "string" || isSymbol(value)) { - return value; - } - var result = value + ""; - return result == "0" && 1 / value == -INFINITY ? "-0" : result; - } + return parsed; +} - /** - * Converts `func` to its source code. - * - * @private - * @param {Function} func The function to process. - * @returns {string} Returns the source code. - */ - function toSource(func) { - if (func != null) { - try { - return funcToString.call(func); - } catch (e) {} - try { - return func + ""; - } catch (e) {} - } - return ""; - } +function parse(command, args, options) { + // Normalize arguments, similar to nodejs + if (args && !Array.isArray(args)) { + options = args; + args = null; + } - /** - * Creates a function that memoizes the result of `func`. If `resolver` is - * provided, it determines the cache key for storing the result based on the - * arguments provided to the memoized function. By default, the first argument - * provided to the memoized function is used as the map cache key. The `func` - * is invoked with the `this` binding of the memoized function. - * - * **Note:** The cache is exposed as the `cache` property on the memoized - * function. Its creation may be customized by replacing the `_.memoize.Cache` - * constructor with one whose instances implement the - * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) - * method interface of `delete`, `get`, `has`, and `set`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to have its output memoized. - * @param {Function} [resolver] The function to resolve the cache key. - * @returns {Function} Returns the new memoized function. - * @example - * - * var object = { 'a': 1, 'b': 2 }; - * var other = { 'c': 3, 'd': 4 }; - * - * var values = _.memoize(_.values); - * values(object); - * // => [1, 2] - * - * values(other); - * // => [3, 4] - * - * object.a = 2; - * values(object); - * // => [1, 2] - * - * // Modify the result cache. - * values.cache.set(object, ['a', 'b']); - * values(object); - * // => ['a', 'b'] - * - * // Replace `_.memoize.Cache`. - * _.memoize.Cache = WeakMap; - */ - function memoize(func, resolver) { - if ( - typeof func != "function" || - (resolver && typeof resolver != "function") - ) { - throw new TypeError(FUNC_ERROR_TEXT); - } - var memoized = function () { - var args = arguments, - key = resolver ? resolver.apply(this, args) : args[0], - cache = memoized.cache; + args = args ? args.slice(0) : []; // Clone array to avoid changing the original + options = Object.assign({}, options); // Clone object to avoid changing the original - if (cache.has(key)) { - return cache.get(key); - } - var result = func.apply(this, args); - memoized.cache = cache.set(key, result); - return result; - }; - memoized.cache = new (memoize.Cache || MapCache)(); - return memoized; - } + // Build our parsed object + const parsed = { + command, + args, + options, + file: undefined, + original: { + command, + args, + }, + }; - // Assign cache to `_.memoize`. - memoize.Cache = MapCache; - - /** - * Performs a - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * comparison between two values to determine if they are equivalent. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - * @example - * - * var object = { 'a': 1 }; - * var other = { 'a': 1 }; - * - * _.eq(object, object); - * // => true - * - * _.eq(object, other); - * // => false - * - * _.eq('a', 'a'); - * // => true - * - * _.eq('a', Object('a')); - * // => false - * - * _.eq(NaN, NaN); - * // => true - */ - function eq(value, other) { - return value === other || (value !== value && other !== other); - } + // Delegate further parsing to shell or non-shell + return options.shell ? parseShell(parsed) : parseNonShell(parsed); +} - /** - * Checks if `value` is classified as an `Array` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array, else `false`. - * @example - * - * _.isArray([1, 2, 3]); - * // => true - * - * _.isArray(document.body.children); - * // => false - * - * _.isArray('abc'); - * // => false - * - * _.isArray(_.noop); - * // => false - */ - var isArray = Array.isArray; - - /** - * Checks if `value` is classified as a `Function` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a function, else `false`. - * @example - * - * _.isFunction(_); - * // => true - * - * _.isFunction(/abc/); - * // => false - */ - function isFunction(value) { - // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8-9 which returns 'object' for typed array and other constructors. - var tag = isObject(value) ? objectToString.call(value) : ""; - return tag == funcTag || tag == genTag; - } +module.exports = parse; - /** - * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) - * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(_.noop); - * // => true - * - * _.isObject(null); - * // => false - */ - function isObject(value) { - var type = typeof value; - return !!value && (type == "object" || type == "function"); - } - /** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ - function isObjectLike(value) { - return !!value && typeof value == "object"; - } +/***/ }), - /** - * Checks if `value` is classified as a `Symbol` primitive or object. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. - * @example - * - * _.isSymbol(Symbol.iterator); - * // => true - * - * _.isSymbol('abc'); - * // => false - */ - function isSymbol(value) { - return ( - typeof value == "symbol" || - (isObjectLike(value) && objectToString.call(value) == symbolTag) - ); - } +/***/ 34274: +/***/ ((module) => { - /** - * Converts `value` to a string. An empty string is returned for `null` - * and `undefined` values. The sign of `-0` is preserved. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to process. - * @returns {string} Returns the string. - * @example - * - * _.toString(null); - * // => '' - * - * _.toString(-0); - * // => '-0' - * - * _.toString([1, 2, 3]); - * // => '1,2,3' - */ - function toString(value) { - return value == null ? "" : baseToString(value); - } +"use strict"; - /** - * Gets the value at `path` of `object`. If the resolved value is - * `undefined`, the `defaultValue` is returned in its place. - * - * @static - * @memberOf _ - * @since 3.7.0 - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path of the property to get. - * @param {*} [defaultValue] The value returned for `undefined` resolved values. - * @returns {*} Returns the resolved value. - * @example - * - * var object = { 'a': [{ 'b': { 'c': 3 } }] }; - * - * _.get(object, 'a[0].b.c'); - * // => 3 - * - * _.get(object, ['a', '0', 'b', 'c']); - * // => 3 - * - * _.get(object, 'a.b.c', 'default'); - * // => 'default' - */ - function get(object, path, defaultValue) { - var result = object == null ? undefined : baseGet(object, path); - return result === undefined ? defaultValue : result; - } - module.exports = get; - - /***/ - }, - - /***/ 51552: /***/ (module) => { - /** - * lodash (Custom Build) - * Build: `lodash modularize exports="npm" -o ./` - * Copyright jQuery Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */ - - /** Used as the `TypeError` message for "Functions" methods. */ - var FUNC_ERROR_TEXT = "Expected a function"; - - /** Used to stand-in for `undefined` hash values. */ - var HASH_UNDEFINED = "__lodash_hash_undefined__"; - - /** Used as references for various `Number` constants. */ - var INFINITY = 1 / 0, - MAX_SAFE_INTEGER = 9007199254740991; - - /** `Object#toString` result references. */ - var funcTag = "[object Function]", - genTag = "[object GeneratorFunction]", - symbolTag = "[object Symbol]"; - - /** Used to match property names within property paths. */ - var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, - reIsPlainProp = /^\w*$/, - reLeadingDot = /^\./, - rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; - - /** - * Used to match `RegExp` - * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). - */ - var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; - - /** Used to match backslashes in property paths. */ - var reEscapeChar = /\\(\\)?/g; - - /** Used to detect host constructors (Safari). */ - var reIsHostCtor = /^\[object .+?Constructor\]$/; - - /** Used to detect unsigned integer values. */ - var reIsUint = /^(?:0|[1-9]\d*)$/; - - /** Detect free variable `global` from Node.js. */ - var freeGlobal = - typeof global == "object" && - global && - global.Object === Object && - global; - - /** Detect free variable `self`. */ - var freeSelf = - typeof self == "object" && self && self.Object === Object && self; - - /** Used as a reference to the global object. */ - var root = freeGlobal || freeSelf || Function("return this")(); - - /** - * Gets the value at `key` of `object`. - * - * @private - * @param {Object} [object] The object to query. - * @param {string} key The key of the property to get. - * @returns {*} Returns the property value. - */ - function getValue(object, key) { - return object == null ? undefined : object[key]; - } +// See http://www.robvanderwoude.com/escapechars.php +const metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g; - /** - * Checks if `value` is a host object in IE < 9. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a host object, else `false`. - */ - function isHostObject(value) { - // Many host objects are `Object` objects that can coerce to strings - // despite having improperly defined `toString` methods. - var result = false; - if (value != null && typeof value.toString != "function") { - try { - result = !!(value + ""); - } catch (e) {} - } - return result; - } +function escapeCommand(arg) { + // Escape meta chars + arg = arg.replace(metaCharsRegExp, '^$1'); - /** Used for built-in method references. */ - var arrayProto = Array.prototype, - funcProto = Function.prototype, - objectProto = Object.prototype; + return arg; +} - /** Used to detect overreaching core-js shims. */ - var coreJsData = root["__core-js_shared__"]; +function escapeArgument(arg, doubleEscapeMetaChars) { + // Convert to string + arg = `${arg}`; - /** Used to detect methods masquerading as native. */ - var maskSrcKey = (function () { - var uid = /[^.]+$/.exec( - (coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO) || "" - ); - return uid ? "Symbol(src)_1." + uid : ""; - })(); - - /** Used to resolve the decompiled source of functions. */ - var funcToString = funcProto.toString; - - /** Used to check objects for own properties. */ - var hasOwnProperty = objectProto.hasOwnProperty; - - /** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ - var objectToString = objectProto.toString; - - /** Used to detect if a method is native. */ - var reIsNative = RegExp( - "^" + - funcToString - .call(hasOwnProperty) - .replace(reRegExpChar, "\\$&") - .replace( - /hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, - "$1.*?" - ) + - "$" - ); + // Algorithm below is based on https://qntm.org/cmd - /** Built-in value references. */ - var Symbol = root.Symbol, - splice = arrayProto.splice; - - /* Built-in method references that are verified to be native. */ - var Map = getNative(root, "Map"), - nativeCreate = getNative(Object, "create"); - - /** Used to convert symbols to primitives and strings. */ - var symbolProto = Symbol ? Symbol.prototype : undefined, - symbolToString = symbolProto ? symbolProto.toString : undefined; - - /** - * Creates a hash object. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ - function Hash(entries) { - var index = -1, - length = entries ? entries.length : 0; - - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } - } + // Sequence of backslashes followed by a double quote: + // double up all the backslashes and escape the double quote + arg = arg.replace(/(\\*)"/g, '$1$1\\"'); - /** - * Removes all key-value entries from the hash. - * - * @private - * @name clear - * @memberOf Hash - */ - function hashClear() { - this.__data__ = nativeCreate ? nativeCreate(null) : {}; - } + // Sequence of backslashes followed by the end of the string + // (which will become a double quote later): + // double up all the backslashes + arg = arg.replace(/(\\*)$/, '$1$1'); - /** - * Removes `key` and its value from the hash. - * - * @private - * @name delete - * @memberOf Hash - * @param {Object} hash The hash to modify. - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ - function hashDelete(key) { - return this.has(key) && delete this.__data__[key]; - } + // All other backslashes occur literally - /** - * Gets the hash value for `key`. - * - * @private - * @name get - * @memberOf Hash - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ - function hashGet(key) { - var data = this.__data__; - if (nativeCreate) { - var result = data[key]; - return result === HASH_UNDEFINED ? undefined : result; - } - return hasOwnProperty.call(data, key) ? data[key] : undefined; - } + // Quote the whole thing: + arg = `"${arg}"`; - /** - * Checks if a hash value for `key` exists. - * - * @private - * @name has - * @memberOf Hash - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ - function hashHas(key) { - var data = this.__data__; - return nativeCreate - ? data[key] !== undefined - : hasOwnProperty.call(data, key); - } + // Escape meta chars + arg = arg.replace(metaCharsRegExp, '^$1'); - /** - * Sets the hash `key` to `value`. - * - * @private - * @name set - * @memberOf Hash - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the hash instance. - */ - function hashSet(key, value) { - var data = this.__data__; - data[key] = - nativeCreate && value === undefined ? HASH_UNDEFINED : value; - return this; - } + // Double escape meta chars if necessary + if (doubleEscapeMetaChars) { + arg = arg.replace(metaCharsRegExp, '^$1'); + } - // Add methods to `Hash`. - Hash.prototype.clear = hashClear; - Hash.prototype["delete"] = hashDelete; - Hash.prototype.get = hashGet; - Hash.prototype.has = hashHas; - Hash.prototype.set = hashSet; - - /** - * Creates an list cache object. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ - function ListCache(entries) { - var index = -1, - length = entries ? entries.length : 0; - - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } - } + return arg; +} - /** - * Removes all key-value entries from the list cache. - * - * @private - * @name clear - * @memberOf ListCache - */ - function listCacheClear() { - this.__data__ = []; - } +module.exports.command = escapeCommand; +module.exports.argument = escapeArgument; - /** - * Removes `key` and its value from the list cache. - * - * @private - * @name delete - * @memberOf ListCache - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ - function listCacheDelete(key) { - var data = this.__data__, - index = assocIndexOf(data, key); - - if (index < 0) { - return false; - } - var lastIndex = data.length - 1; - if (index == lastIndex) { - data.pop(); - } else { - splice.call(data, index, 1); - } - return true; - } - /** - * Gets the list cache value for `key`. - * - * @private - * @name get - * @memberOf ListCache - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ - function listCacheGet(key) { - var data = this.__data__, - index = assocIndexOf(data, key); - - return index < 0 ? undefined : data[index][1]; - } +/***/ }), - /** - * Checks if a list cache value for `key` exists. - * - * @private - * @name has - * @memberOf ListCache - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ - function listCacheHas(key) { - return assocIndexOf(this.__data__, key) > -1; - } +/***/ 41252: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - /** - * Sets the list cache `key` to `value`. - * - * @private - * @name set - * @memberOf ListCache - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the list cache instance. - */ - function listCacheSet(key, value) { - var data = this.__data__, - index = assocIndexOf(data, key); - - if (index < 0) { - data.push([key, value]); - } else { - data[index][1] = value; - } - return this; - } +"use strict"; - // Add methods to `ListCache`. - ListCache.prototype.clear = listCacheClear; - ListCache.prototype["delete"] = listCacheDelete; - ListCache.prototype.get = listCacheGet; - ListCache.prototype.has = listCacheHas; - ListCache.prototype.set = listCacheSet; - - /** - * Creates a map cache object to store key-value pairs. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ - function MapCache(entries) { - var index = -1, - length = entries ? entries.length : 0; - - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } - } - /** - * Removes all key-value entries from the map. - * - * @private - * @name clear - * @memberOf MapCache - */ - function mapCacheClear() { - this.__data__ = { - hash: new Hash(), - map: new (Map || ListCache)(), - string: new Hash(), - }; - } +const fs = __nccwpck_require__(57147); +const shebangCommand = __nccwpck_require__(67032); - /** - * Removes `key` and its value from the map. - * - * @private - * @name delete - * @memberOf MapCache - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ - function mapCacheDelete(key) { - return getMapData(this, key)["delete"](key); - } +function readShebang(command) { + // Read the first 150 bytes from the file + const size = 150; + let buffer; - /** - * Gets the map value for `key`. - * - * @private - * @name get - * @memberOf MapCache - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ - function mapCacheGet(key) { - return getMapData(this, key).get(key); - } + if (Buffer.alloc) { + // Node.js v4.5+ / v5.10+ + buffer = Buffer.alloc(size); + } else { + // Old Node.js API + buffer = new Buffer(size); + buffer.fill(0); // zero-fill + } - /** - * Checks if a map value for `key` exists. - * - * @private - * @name has - * @memberOf MapCache - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ - function mapCacheHas(key) { - return getMapData(this, key).has(key); - } + let fd; - /** - * Sets the map `key` to `value`. - * - * @private - * @name set - * @memberOf MapCache - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the map cache instance. - */ - function mapCacheSet(key, value) { - getMapData(this, key).set(key, value); - return this; - } + try { + fd = fs.openSync(command, 'r'); + fs.readSync(fd, buffer, 0, size, 0); + fs.closeSync(fd); + } catch (e) { /* Empty */ } - // Add methods to `MapCache`. - MapCache.prototype.clear = mapCacheClear; - MapCache.prototype["delete"] = mapCacheDelete; - MapCache.prototype.get = mapCacheGet; - MapCache.prototype.has = mapCacheHas; - MapCache.prototype.set = mapCacheSet; - - /** - * Assigns `value` to `key` of `object` if the existing value is not equivalent - * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. - * - * @private - * @param {Object} object The object to modify. - * @param {string} key The key of the property to assign. - * @param {*} value The value to assign. - */ - function assignValue(object, key, value) { - var objValue = object[key]; - if ( - !(hasOwnProperty.call(object, key) && eq(objValue, value)) || - (value === undefined && !(key in object)) - ) { - object[key] = value; - } - } + // Attempt to extract shebang (null is returned if not a shebang) + return shebangCommand(buffer.toString()); +} - /** - * Gets the index at which the `key` is found in `array` of key-value pairs. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} key The key to search for. - * @returns {number} Returns the index of the matched value, else `-1`. - */ - function assocIndexOf(array, key) { - var length = array.length; - while (length--) { - if (eq(array[length][0], key)) { - return length; - } - } - return -1; - } +module.exports = readShebang; - /** - * The base implementation of `_.isNative` without bad shim checks. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a native function, - * else `false`. - */ - function baseIsNative(value) { - if (!isObject(value) || isMasked(value)) { - return false; - } - var pattern = - isFunction(value) || isHostObject(value) ? reIsNative : reIsHostCtor; - return pattern.test(toSource(value)); - } - /** - * The base implementation of `_.set`. - * - * @private - * @param {Object} object The object to modify. - * @param {Array|string} path The path of the property to set. - * @param {*} value The value to set. - * @param {Function} [customizer] The function to customize path creation. - * @returns {Object} Returns `object`. - */ - function baseSet(object, path, value, customizer) { - if (!isObject(object)) { - return object; - } - path = isKey(path, object) ? [path] : castPath(path); - - var index = -1, - length = path.length, - lastIndex = length - 1, - nested = object; - - while (nested != null && ++index < length) { - var key = toKey(path[index]), - newValue = value; - - if (index != lastIndex) { - var objValue = nested[key]; - newValue = customizer - ? customizer(objValue, key, nested) - : undefined; - if (newValue === undefined) { - newValue = isObject(objValue) - ? objValue - : isIndex(path[index + 1]) - ? [] - : {}; - } - } - assignValue(nested, key, newValue); - nested = nested[key]; - } - return object; - } +/***/ }), - /** - * The base implementation of `_.toString` which doesn't convert nullish - * values to empty strings. - * - * @private - * @param {*} value The value to process. - * @returns {string} Returns the string. - */ - function baseToString(value) { - // Exit early for strings to avoid a performance hit in some environments. - if (typeof value == "string") { - return value; - } - if (isSymbol(value)) { - return symbolToString ? symbolToString.call(value) : ""; - } - var result = value + ""; - return result == "0" && 1 / value == -INFINITY ? "-0" : result; - } +/***/ 87274: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - /** - * Casts `value` to a path array if it's not one. - * - * @private - * @param {*} value The value to inspect. - * @returns {Array} Returns the cast property path array. - */ - function castPath(value) { - return isArray(value) ? value : stringToPath(value); - } +"use strict"; - /** - * Gets the data for `map`. - * - * @private - * @param {Object} map The map to query. - * @param {string} key The reference key. - * @returns {*} Returns the map data. - */ - function getMapData(map, key) { - var data = map.__data__; - return isKeyable(key) - ? data[typeof key == "string" ? "string" : "hash"] - : data.map; - } - /** - * Gets the native function at `key` of `object`. - * - * @private - * @param {Object} object The object to query. - * @param {string} key The key of the method to get. - * @returns {*} Returns the function if it's native, else `undefined`. - */ - function getNative(object, key) { - var value = getValue(object, key); - return baseIsNative(value) ? value : undefined; - } +const path = __nccwpck_require__(71017); +const which = __nccwpck_require__(34207); +const pathKey = __nccwpck_require__(20539)(); - /** - * Checks if `value` is a valid array-like index. - * - * @private - * @param {*} value The value to check. - * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. - * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. - */ - function isIndex(value, length) { - length = length == null ? MAX_SAFE_INTEGER : length; - return ( - !!length && - (typeof value == "number" || reIsUint.test(value)) && - value > -1 && - value % 1 == 0 && - value < length - ); - } +function resolveCommandAttempt(parsed, withoutPathExt) { + const cwd = process.cwd(); + const hasCustomCwd = parsed.options.cwd != null; - /** - * Checks if `value` is a property name and not a property path. - * - * @private - * @param {*} value The value to check. - * @param {Object} [object] The object to query keys on. - * @returns {boolean} Returns `true` if `value` is a property name, else `false`. - */ - function isKey(value, object) { - if (isArray(value)) { - return false; - } - var type = typeof value; - if ( - type == "number" || - type == "symbol" || - type == "boolean" || - value == null || - isSymbol(value) - ) { - return true; + // If a custom `cwd` was specified, we need to change the process cwd + // because `which` will do stat calls but does not support a custom cwd + if (hasCustomCwd) { + try { + process.chdir(parsed.options.cwd); + } catch (err) { + /* Empty */ } - return ( - reIsPlainProp.test(value) || - !reIsDeepProp.test(value) || - (object != null && value in Object(object)) - ); - } - - /** - * Checks if `value` is suitable for use as unique object key. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is suitable, else `false`. - */ - function isKeyable(value) { - var type = typeof value; - return type == "string" || - type == "number" || - type == "symbol" || - type == "boolean" - ? value !== "__proto__" - : value === null; - } + } - /** - * Checks if `func` has its source masked. - * - * @private - * @param {Function} func The function to check. - * @returns {boolean} Returns `true` if `func` is masked, else `false`. - */ - function isMasked(func) { - return !!maskSrcKey && maskSrcKey in func; - } + let resolved; - /** - * Converts `string` to a property path array. - * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the property path array. - */ - var stringToPath = memoize(function (string) { - string = toString(string); - - var result = []; - if (reLeadingDot.test(string)) { - result.push(""); - } - string.replace(rePropName, function (match, number, quote, string) { - result.push( - quote ? string.replace(reEscapeChar, "$1") : number || match - ); + try { + resolved = which.sync(parsed.command, { + path: (parsed.options.env || process.env)[pathKey], + pathExt: withoutPathExt ? path.delimiter : undefined, }); - return result; - }); + } catch (e) { + /* Empty */ + } finally { + process.chdir(cwd); + } - /** - * Converts `value` to a string key if it's not a string or symbol. - * - * @private - * @param {*} value The value to inspect. - * @returns {string|symbol} Returns the key. - */ - function toKey(value) { - if (typeof value == "string" || isSymbol(value)) { - return value; - } - var result = value + ""; - return result == "0" && 1 / value == -INFINITY ? "-0" : result; - } + // If we successfully resolved, ensure that an absolute path is returned + // Note that when a custom `cwd` was used, we need to resolve to an absolute path based on it + if (resolved) { + resolved = path.resolve(hasCustomCwd ? parsed.options.cwd : '', resolved); + } - /** - * Converts `func` to its source code. - * - * @private - * @param {Function} func The function to process. - * @returns {string} Returns the source code. - */ - function toSource(func) { - if (func != null) { - try { - return funcToString.call(func); - } catch (e) {} - try { - return func + ""; - } catch (e) {} - } - return ""; - } + return resolved; +} - /** - * Creates a function that memoizes the result of `func`. If `resolver` is - * provided, it determines the cache key for storing the result based on the - * arguments provided to the memoized function. By default, the first argument - * provided to the memoized function is used as the map cache key. The `func` - * is invoked with the `this` binding of the memoized function. - * - * **Note:** The cache is exposed as the `cache` property on the memoized - * function. Its creation may be customized by replacing the `_.memoize.Cache` - * constructor with one whose instances implement the - * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) - * method interface of `delete`, `get`, `has`, and `set`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to have its output memoized. - * @param {Function} [resolver] The function to resolve the cache key. - * @returns {Function} Returns the new memoized function. - * @example - * - * var object = { 'a': 1, 'b': 2 }; - * var other = { 'c': 3, 'd': 4 }; - * - * var values = _.memoize(_.values); - * values(object); - * // => [1, 2] - * - * values(other); - * // => [3, 4] - * - * object.a = 2; - * values(object); - * // => [1, 2] - * - * // Modify the result cache. - * values.cache.set(object, ['a', 'b']); - * values(object); - * // => ['a', 'b'] - * - * // Replace `_.memoize.Cache`. - * _.memoize.Cache = WeakMap; - */ - function memoize(func, resolver) { - if ( - typeof func != "function" || - (resolver && typeof resolver != "function") - ) { - throw new TypeError(FUNC_ERROR_TEXT); - } - var memoized = function () { - var args = arguments, - key = resolver ? resolver.apply(this, args) : args[0], - cache = memoized.cache; +function resolveCommand(parsed) { + return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true); +} - if (cache.has(key)) { - return cache.get(key); - } - var result = func.apply(this, args); - memoized.cache = cache.set(key, result); - return result; - }; - memoized.cache = new (memoize.Cache || MapCache)(); - return memoized; - } +module.exports = resolveCommand; - // Assign cache to `_.memoize`. - memoize.Cache = MapCache; - - /** - * Performs a - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * comparison between two values to determine if they are equivalent. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - * @example - * - * var object = { 'a': 1 }; - * var other = { 'a': 1 }; - * - * _.eq(object, object); - * // => true - * - * _.eq(object, other); - * // => false - * - * _.eq('a', 'a'); - * // => true - * - * _.eq('a', Object('a')); - * // => false - * - * _.eq(NaN, NaN); - * // => true - */ - function eq(value, other) { - return value === other || (value !== value && other !== other); - } - /** - * Checks if `value` is classified as an `Array` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array, else `false`. - * @example - * - * _.isArray([1, 2, 3]); - * // => true - * - * _.isArray(document.body.children); - * // => false - * - * _.isArray('abc'); - * // => false - * - * _.isArray(_.noop); - * // => false - */ - var isArray = Array.isArray; - - /** - * Checks if `value` is classified as a `Function` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a function, else `false`. - * @example - * - * _.isFunction(_); - * // => true - * - * _.isFunction(/abc/); - * // => false - */ - function isFunction(value) { - // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8-9 which returns 'object' for typed array and other constructors. - var tag = isObject(value) ? objectToString.call(value) : ""; - return tag == funcTag || tag == genTag; - } +/***/ }), - /** - * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) - * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(_.noop); - * // => true - * - * _.isObject(null); - * // => false - */ - function isObject(value) { - var type = typeof value; - return !!value && (type == "object" || type == "function"); - } +/***/ 58932: +/***/ ((__unused_webpack_module, exports) => { - /** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ - function isObjectLike(value) { - return !!value && typeof value == "object"; - } +"use strict"; - /** - * Checks if `value` is classified as a `Symbol` primitive or object. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. - * @example - * - * _.isSymbol(Symbol.iterator); - * // => true - * - * _.isSymbol('abc'); - * // => false - */ - function isSymbol(value) { - return ( - typeof value == "symbol" || - (isObjectLike(value) && objectToString.call(value) == symbolTag) - ); - } - /** - * Converts `value` to a string. An empty string is returned for `null` - * and `undefined` values. The sign of `-0` is preserved. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to process. - * @returns {string} Returns the string. - * @example - * - * _.toString(null); - * // => '' - * - * _.toString(-0); - * // => '-0' - * - * _.toString([1, 2, 3]); - * // => '1,2,3' - */ - function toString(value) { - return value == null ? "" : baseToString(value); - } +Object.defineProperty(exports, "__esModule", ({ value: true })); - /** - * Sets the value at `path` of `object`. If a portion of `path` doesn't exist, - * it's created. Arrays are created for missing index properties while objects - * are created for all other missing properties. Use `_.setWith` to customize - * `path` creation. - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @since 3.7.0 - * @category Object - * @param {Object} object The object to modify. - * @param {Array|string} path The path of the property to set. - * @param {*} value The value to set. - * @returns {Object} Returns `object`. - * @example - * - * var object = { 'a': [{ 'b': { 'c': 3 } }] }; - * - * _.set(object, 'a[0].b.c', 4); - * console.log(object.a[0].b.c); - * // => 4 - * - * _.set(object, ['x', '0', 'y', 'z'], 5); - * console.log(object.x[0].y.z); - * // => 5 - */ - function set(object, path, value) { - return object == null ? object : baseSet(object, path, value); - } +class Deprecation extends Error { + constructor(message) { + super(message); // Maintains proper stack trace (only available on V8) - module.exports = set; - - /***/ - }, - - /***/ 78216: /***/ (module) => { - /** - * lodash (Custom Build) - * Build: `lodash modularize exports="npm" -o ./` - * Copyright jQuery Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */ - - /** Used as the size to enable large array optimizations. */ - var LARGE_ARRAY_SIZE = 200; - - /** Used to stand-in for `undefined` hash values. */ - var HASH_UNDEFINED = "__lodash_hash_undefined__"; - - /** Used as references for various `Number` constants. */ - var INFINITY = 1 / 0; - - /** `Object#toString` result references. */ - var funcTag = "[object Function]", - genTag = "[object GeneratorFunction]"; - - /** - * Used to match `RegExp` - * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). - */ - var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; - - /** Used to detect host constructors (Safari). */ - var reIsHostCtor = /^\[object .+?Constructor\]$/; - - /** Detect free variable `global` from Node.js. */ - var freeGlobal = - typeof global == "object" && - global && - global.Object === Object && - global; - - /** Detect free variable `self`. */ - var freeSelf = - typeof self == "object" && self && self.Object === Object && self; - - /** Used as a reference to the global object. */ - var root = freeGlobal || freeSelf || Function("return this")(); - - /** - * A specialized version of `_.includes` for arrays without support for - * specifying an index to search from. - * - * @private - * @param {Array} [array] The array to inspect. - * @param {*} target The value to search for. - * @returns {boolean} Returns `true` if `target` is found, else `false`. - */ - function arrayIncludes(array, value) { - var length = array ? array.length : 0; - return !!length && baseIndexOf(array, value, 0) > -1; - } + /* istanbul ignore next */ - /** - * This function is like `arrayIncludes` except that it accepts a comparator. - * - * @private - * @param {Array} [array] The array to inspect. - * @param {*} target The value to search for. - * @param {Function} comparator The comparator invoked per element. - * @returns {boolean} Returns `true` if `target` is found, else `false`. - */ - function arrayIncludesWith(array, value, comparator) { - var index = -1, - length = array ? array.length : 0; + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } - while (++index < length) { - if (comparator(value, array[index])) { - return true; - } - } - return false; - } + this.name = 'Deprecation'; + } + +} + +exports.Deprecation = Deprecation; + + +/***/ }), + +/***/ 81205: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - /** - * The base implementation of `_.findIndex` and `_.findLastIndex` without - * support for iteratee shorthands. - * - * @private - * @param {Array} array The array to inspect. - * @param {Function} predicate The function invoked per iteration. - * @param {number} fromIndex The index to search from. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {number} Returns the index of the matched value, else `-1`. - */ - function baseFindIndex(array, predicate, fromIndex, fromRight) { - var length = array.length, - index = fromIndex + (fromRight ? 1 : -1); - - while (fromRight ? index-- : ++index < length) { - if (predicate(array[index], index, array)) { - return index; - } - } - return -1; - } +var once = __nccwpck_require__(1223); - /** - * The base implementation of `_.indexOf` without `fromIndex` bounds checks. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - */ - function baseIndexOf(array, value, fromIndex) { - if (value !== value) { - return baseFindIndex(array, baseIsNaN, fromIndex); - } - var index = fromIndex - 1, - length = array.length; +var noop = function() {}; - while (++index < length) { - if (array[index] === value) { - return index; - } - } - return -1; - } +var isRequest = function(stream) { + return stream.setHeader && typeof stream.abort === 'function'; +}; - /** - * The base implementation of `_.isNaN` without support for number objects. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. - */ - function baseIsNaN(value) { - return value !== value; - } +var isChildProcess = function(stream) { + return stream.stdio && Array.isArray(stream.stdio) && stream.stdio.length === 3 +}; - /** - * Checks if a cache value for `key` exists. - * - * @private - * @param {Object} cache The cache to query. - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ - function cacheHas(cache, key) { - return cache.has(key); - } +var eos = function(stream, opts, callback) { + if (typeof opts === 'function') return eos(stream, null, opts); + if (!opts) opts = {}; - /** - * Gets the value at `key` of `object`. - * - * @private - * @param {Object} [object] The object to query. - * @param {string} key The key of the property to get. - * @returns {*} Returns the property value. - */ - function getValue(object, key) { - return object == null ? undefined : object[key]; - } + callback = once(callback || noop); - /** - * Checks if `value` is a host object in IE < 9. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a host object, else `false`. - */ - function isHostObject(value) { - // Many host objects are `Object` objects that can coerce to strings - // despite having improperly defined `toString` methods. - var result = false; - if (value != null && typeof value.toString != "function") { - try { - result = !!(value + ""); - } catch (e) {} - } - return result; - } + var ws = stream._writableState; + var rs = stream._readableState; + var readable = opts.readable || (opts.readable !== false && stream.readable); + var writable = opts.writable || (opts.writable !== false && stream.writable); + var cancelled = false; - /** - * Converts `set` to an array of its values. - * - * @private - * @param {Object} set The set to convert. - * @returns {Array} Returns the values. - */ - function setToArray(set) { - var index = -1, - result = Array(set.size); - - set.forEach(function (value) { - result[++index] = value; - }); - return result; - } + var onlegacyfinish = function() { + if (!stream.writable) onfinish(); + }; - /** Used for built-in method references. */ - var arrayProto = Array.prototype, - funcProto = Function.prototype, - objectProto = Object.prototype; + var onfinish = function() { + writable = false; + if (!readable) callback.call(stream); + }; - /** Used to detect overreaching core-js shims. */ - var coreJsData = root["__core-js_shared__"]; + var onend = function() { + readable = false; + if (!writable) callback.call(stream); + }; - /** Used to detect methods masquerading as native. */ - var maskSrcKey = (function () { - var uid = /[^.]+$/.exec( - (coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO) || "" - ); - return uid ? "Symbol(src)_1." + uid : ""; - })(); - - /** Used to resolve the decompiled source of functions. */ - var funcToString = funcProto.toString; - - /** Used to check objects for own properties. */ - var hasOwnProperty = objectProto.hasOwnProperty; - - /** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ - var objectToString = objectProto.toString; - - /** Used to detect if a method is native. */ - var reIsNative = RegExp( - "^" + - funcToString - .call(hasOwnProperty) - .replace(reRegExpChar, "\\$&") - .replace( - /hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, - "$1.*?" - ) + - "$" - ); + var onexit = function(exitCode) { + callback.call(stream, exitCode ? new Error('exited with error code: ' + exitCode) : null); + }; - /** Built-in value references. */ - var splice = arrayProto.splice; - - /* Built-in method references that are verified to be native. */ - var Map = getNative(root, "Map"), - Set = getNative(root, "Set"), - nativeCreate = getNative(Object, "create"); - - /** - * Creates a hash object. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ - function Hash(entries) { - var index = -1, - length = entries ? entries.length : 0; - - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } - } + var onerror = function(err) { + callback.call(stream, err); + }; - /** - * Removes all key-value entries from the hash. - * - * @private - * @name clear - * @memberOf Hash - */ - function hashClear() { - this.__data__ = nativeCreate ? nativeCreate(null) : {}; - } + var onclose = function() { + process.nextTick(onclosenexttick); + }; - /** - * Removes `key` and its value from the hash. - * - * @private - * @name delete - * @memberOf Hash - * @param {Object} hash The hash to modify. - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ - function hashDelete(key) { - return this.has(key) && delete this.__data__[key]; - } + var onclosenexttick = function() { + if (cancelled) return; + if (readable && !(rs && (rs.ended && !rs.destroyed))) return callback.call(stream, new Error('premature close')); + if (writable && !(ws && (ws.ended && !ws.destroyed))) return callback.call(stream, new Error('premature close')); + }; - /** - * Gets the hash value for `key`. - * - * @private - * @name get - * @memberOf Hash - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ - function hashGet(key) { - var data = this.__data__; - if (nativeCreate) { - var result = data[key]; - return result === HASH_UNDEFINED ? undefined : result; - } - return hasOwnProperty.call(data, key) ? data[key] : undefined; - } + var onrequest = function() { + stream.req.on('finish', onfinish); + }; - /** - * Checks if a hash value for `key` exists. - * - * @private - * @name has - * @memberOf Hash - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ - function hashHas(key) { - var data = this.__data__; - return nativeCreate - ? data[key] !== undefined - : hasOwnProperty.call(data, key); - } + if (isRequest(stream)) { + stream.on('complete', onfinish); + stream.on('abort', onclose); + if (stream.req) onrequest(); + else stream.on('request', onrequest); + } else if (writable && !ws) { // legacy streams + stream.on('end', onlegacyfinish); + stream.on('close', onlegacyfinish); + } + + if (isChildProcess(stream)) stream.on('exit', onexit); + + stream.on('end', onend); + stream.on('finish', onfinish); + if (opts.error !== false) stream.on('error', onerror); + stream.on('close', onclose); + + return function() { + cancelled = true; + stream.removeListener('complete', onfinish); + stream.removeListener('abort', onclose); + stream.removeListener('request', onrequest); + if (stream.req) stream.req.removeListener('finish', onfinish); + stream.removeListener('end', onlegacyfinish); + stream.removeListener('close', onlegacyfinish); + stream.removeListener('finish', onfinish); + stream.removeListener('exit', onexit); + stream.removeListener('end', onend); + stream.removeListener('error', onerror); + stream.removeListener('close', onclose); + }; +}; + +module.exports = eos; + + +/***/ }), + +/***/ 55447: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +const path = __nccwpck_require__(71017); +const childProcess = __nccwpck_require__(32081); +const crossSpawn = __nccwpck_require__(72746); +const stripEof = __nccwpck_require__(85515); +const npmRunPath = __nccwpck_require__(20502); +const isStream = __nccwpck_require__(41554); +const _getStream = __nccwpck_require__(21766); +const pFinally = __nccwpck_require__(31330); +const onExit = __nccwpck_require__(24931); +const errname = __nccwpck_require__(64689); +const stdio = __nccwpck_require__(10166); + +const TEN_MEGABYTES = 1000 * 1000 * 10; + +function handleArgs(cmd, args, opts) { + let parsed; + + opts = Object.assign({ + extendEnv: true, + env: {} + }, opts); + + if (opts.extendEnv) { + opts.env = Object.assign({}, process.env, opts.env); + } + + if (opts.__winShell === true) { + delete opts.__winShell; + parsed = { + command: cmd, + args, + options: opts, + file: cmd, + original: { + cmd, + args + } + }; + } else { + parsed = crossSpawn._parse(cmd, args, opts); + } + + opts = Object.assign({ + maxBuffer: TEN_MEGABYTES, + buffer: true, + stripEof: true, + preferLocal: true, + localDir: parsed.options.cwd || process.cwd(), + encoding: 'utf8', + reject: true, + cleanup: true + }, parsed.options); + + opts.stdio = stdio(opts); + + if (opts.preferLocal) { + opts.env = npmRunPath.env(Object.assign({}, opts, {cwd: opts.localDir})); + } + + if (opts.detached) { + // #115 + opts.cleanup = false; + } + + if (process.platform === 'win32' && path.basename(parsed.command) === 'cmd.exe') { + // #116 + parsed.args.unshift('/q'); + } + + return { + cmd: parsed.command, + args: parsed.args, + opts, + parsed + }; +} + +function handleInput(spawned, input) { + if (input === null || input === undefined) { + return; + } + + if (isStream(input)) { + input.pipe(spawned.stdin); + } else { + spawned.stdin.end(input); + } +} + +function handleOutput(opts, val) { + if (val && opts.stripEof) { + val = stripEof(val); + } + + return val; +} + +function handleShell(fn, cmd, opts) { + let file = '/bin/sh'; + let args = ['-c', cmd]; + + opts = Object.assign({}, opts); + + if (process.platform === 'win32') { + opts.__winShell = true; + file = process.env.comspec || 'cmd.exe'; + args = ['/s', '/c', `"${cmd}"`]; + opts.windowsVerbatimArguments = true; + } + + if (opts.shell) { + file = opts.shell; + delete opts.shell; + } + + return fn(file, args, opts); +} + +function getStream(process, stream, {encoding, buffer, maxBuffer}) { + if (!process[stream]) { + return null; + } + + let ret; + + if (!buffer) { + // TODO: Use `ret = util.promisify(stream.finished)(process[stream]);` when targeting Node.js 10 + ret = new Promise((resolve, reject) => { + process[stream] + .once('end', resolve) + .once('error', reject); + }); + } else if (encoding) { + ret = _getStream(process[stream], { + encoding, + maxBuffer + }); + } else { + ret = _getStream.buffer(process[stream], {maxBuffer}); + } + + return ret.catch(err => { + err.stream = stream; + err.message = `${stream} ${err.message}`; + throw err; + }); +} + +function makeError(result, options) { + const {stdout, stderr} = result; + + let err = result.error; + const {code, signal} = result; + + const {parsed, joinedCmd} = options; + const timedOut = options.timedOut || false; + + if (!err) { + let output = ''; + + if (Array.isArray(parsed.opts.stdio)) { + if (parsed.opts.stdio[2] !== 'inherit') { + output += output.length > 0 ? stderr : `\n${stderr}`; + } + + if (parsed.opts.stdio[1] !== 'inherit') { + output += `\n${stdout}`; + } + } else if (parsed.opts.stdio !== 'inherit') { + output = `\n${stderr}${stdout}`; + } + + err = new Error(`Command failed: ${joinedCmd}${output}`); + err.code = code < 0 ? errname(code) : code; + } + + err.stdout = stdout; + err.stderr = stderr; + err.failed = true; + err.signal = signal || null; + err.cmd = joinedCmd; + err.timedOut = timedOut; + + return err; +} + +function joinCmd(cmd, args) { + let joinedCmd = cmd; + + if (Array.isArray(args) && args.length > 0) { + joinedCmd += ' ' + args.join(' '); + } + + return joinedCmd; +} + +module.exports = (cmd, args, opts) => { + const parsed = handleArgs(cmd, args, opts); + const {encoding, buffer, maxBuffer} = parsed.opts; + const joinedCmd = joinCmd(cmd, args); + + let spawned; + try { + spawned = childProcess.spawn(parsed.cmd, parsed.args, parsed.opts); + } catch (err) { + return Promise.reject(err); + } + + let removeExitHandler; + if (parsed.opts.cleanup) { + removeExitHandler = onExit(() => { + spawned.kill(); + }); + } + + let timeoutId = null; + let timedOut = false; + + const cleanup = () => { + if (timeoutId) { + clearTimeout(timeoutId); + timeoutId = null; + } + + if (removeExitHandler) { + removeExitHandler(); + } + }; + + if (parsed.opts.timeout > 0) { + timeoutId = setTimeout(() => { + timeoutId = null; + timedOut = true; + spawned.kill(parsed.opts.killSignal); + }, parsed.opts.timeout); + } + + const processDone = new Promise(resolve => { + spawned.on('exit', (code, signal) => { + cleanup(); + resolve({code, signal}); + }); + + spawned.on('error', err => { + cleanup(); + resolve({error: err}); + }); + + if (spawned.stdin) { + spawned.stdin.on('error', err => { + cleanup(); + resolve({error: err}); + }); + } + }); + + function destroy() { + if (spawned.stdout) { + spawned.stdout.destroy(); + } + + if (spawned.stderr) { + spawned.stderr.destroy(); + } + } + + const handlePromise = () => pFinally(Promise.all([ + processDone, + getStream(spawned, 'stdout', {encoding, buffer, maxBuffer}), + getStream(spawned, 'stderr', {encoding, buffer, maxBuffer}) + ]).then(arr => { + const result = arr[0]; + result.stdout = arr[1]; + result.stderr = arr[2]; + + if (result.error || result.code !== 0 || result.signal !== null) { + const err = makeError(result, { + joinedCmd, + parsed, + timedOut + }); + + // TODO: missing some timeout logic for killed + // https://github.com/nodejs/node/blob/master/lib/child_process.js#L203 + // err.killed = spawned.killed || killed; + err.killed = err.killed || spawned.killed; + + if (!parsed.opts.reject) { + return err; + } + + throw err; + } + + return { + stdout: handleOutput(parsed.opts, result.stdout), + stderr: handleOutput(parsed.opts, result.stderr), + code: 0, + failed: false, + killed: false, + signal: null, + cmd: joinedCmd, + timedOut: false + }; + }), destroy); + + crossSpawn._enoent.hookChildProcess(spawned, parsed.parsed); + + handleInput(spawned, parsed.opts.input); + + spawned.then = (onfulfilled, onrejected) => handlePromise().then(onfulfilled, onrejected); + spawned.catch = onrejected => handlePromise().catch(onrejected); + + return spawned; +}; + +// TODO: set `stderr: 'ignore'` when that option is implemented +module.exports.stdout = (...args) => module.exports(...args).then(x => x.stdout); + +// TODO: set `stdout: 'ignore'` when that option is implemented +module.exports.stderr = (...args) => module.exports(...args).then(x => x.stderr); + +module.exports.shell = (cmd, opts) => handleShell(module.exports, cmd, opts); + +module.exports.sync = (cmd, args, opts) => { + const parsed = handleArgs(cmd, args, opts); + const joinedCmd = joinCmd(cmd, args); + + if (isStream(parsed.opts.input)) { + throw new TypeError('The `input` option cannot be a stream in sync mode'); + } + + const result = childProcess.spawnSync(parsed.cmd, parsed.args, parsed.opts); + result.code = result.status; - /** - * Sets the hash `key` to `value`. - * - * @private - * @name set - * @memberOf Hash - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the hash instance. - */ - function hashSet(key, value) { - var data = this.__data__; - data[key] = - nativeCreate && value === undefined ? HASH_UNDEFINED : value; - return this; - } + if (result.error || result.status !== 0 || result.signal !== null) { + const err = makeError(result, { + joinedCmd, + parsed + }); - // Add methods to `Hash`. - Hash.prototype.clear = hashClear; - Hash.prototype["delete"] = hashDelete; - Hash.prototype.get = hashGet; - Hash.prototype.has = hashHas; - Hash.prototype.set = hashSet; - - /** - * Creates an list cache object. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ - function ListCache(entries) { - var index = -1, - length = entries ? entries.length : 0; - - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } - } + if (!parsed.opts.reject) { + return err; + } - /** - * Removes all key-value entries from the list cache. - * - * @private - * @name clear - * @memberOf ListCache - */ - function listCacheClear() { - this.__data__ = []; - } + throw err; + } - /** - * Removes `key` and its value from the list cache. - * - * @private - * @name delete - * @memberOf ListCache - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ - function listCacheDelete(key) { - var data = this.__data__, - index = assocIndexOf(data, key); - - if (index < 0) { - return false; - } - var lastIndex = data.length - 1; - if (index == lastIndex) { - data.pop(); - } else { - splice.call(data, index, 1); - } - return true; - } + return { + stdout: handleOutput(parsed.opts, result.stdout), + stderr: handleOutput(parsed.opts, result.stderr), + code: 0, + failed: false, + signal: null, + cmd: joinedCmd, + timedOut: false + }; +}; - /** - * Gets the list cache value for `key`. - * - * @private - * @name get - * @memberOf ListCache - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ - function listCacheGet(key) { - var data = this.__data__, - index = assocIndexOf(data, key); - - return index < 0 ? undefined : data[index][1]; - } +module.exports.shellSync = (cmd, opts) => handleShell(module.exports.sync, cmd, opts); - /** - * Checks if a list cache value for `key` exists. - * - * @private - * @name has - * @memberOf ListCache - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ - function listCacheHas(key) { - return assocIndexOf(this.__data__, key) > -1; - } - /** - * Sets the list cache `key` to `value`. - * - * @private - * @name set - * @memberOf ListCache - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the list cache instance. - */ - function listCacheSet(key, value) { - var data = this.__data__, - index = assocIndexOf(data, key); - - if (index < 0) { - data.push([key, value]); - } else { - data[index][1] = value; - } - return this; - } +/***/ }), - // Add methods to `ListCache`. - ListCache.prototype.clear = listCacheClear; - ListCache.prototype["delete"] = listCacheDelete; - ListCache.prototype.get = listCacheGet; - ListCache.prototype.has = listCacheHas; - ListCache.prototype.set = listCacheSet; - - /** - * Creates a map cache object to store key-value pairs. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ - function MapCache(entries) { - var index = -1, - length = entries ? entries.length : 0; - - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } - } +/***/ 64689: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - /** - * Removes all key-value entries from the map. - * - * @private - * @name clear - * @memberOf MapCache - */ - function mapCacheClear() { - this.__data__ = { - hash: new Hash(), - map: new (Map || ListCache)(), - string: new Hash(), - }; - } +"use strict"; - /** - * Removes `key` and its value from the map. - * - * @private - * @name delete - * @memberOf MapCache - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ - function mapCacheDelete(key) { - return getMapData(this, key)["delete"](key); - } +// Older verions of Node.js might not have `util.getSystemErrorName()`. +// In that case, fall back to a deprecated internal. +const util = __nccwpck_require__(73837); - /** - * Gets the map value for `key`. - * - * @private - * @name get - * @memberOf MapCache - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ - function mapCacheGet(key) { - return getMapData(this, key).get(key); - } +let uv; - /** - * Checks if a map value for `key` exists. - * - * @private - * @name has - * @memberOf MapCache - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ - function mapCacheHas(key) { - return getMapData(this, key).has(key); - } +if (typeof util.getSystemErrorName === 'function') { + module.exports = util.getSystemErrorName; +} else { + try { + uv = process.binding('uv'); - /** - * Sets the map `key` to `value`. - * - * @private - * @name set - * @memberOf MapCache - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the map cache instance. - */ - function mapCacheSet(key, value) { - getMapData(this, key).set(key, value); - return this; - } + if (typeof uv.errname !== 'function') { + throw new TypeError('uv.errname is not a function'); + } + } catch (err) { + console.error('execa/lib/errname: unable to establish process.binding(\'uv\')', err); + uv = null; + } - // Add methods to `MapCache`. - MapCache.prototype.clear = mapCacheClear; - MapCache.prototype["delete"] = mapCacheDelete; - MapCache.prototype.get = mapCacheGet; - MapCache.prototype.has = mapCacheHas; - MapCache.prototype.set = mapCacheSet; - - /** - * - * Creates an array cache object to store unique values. - * - * @private - * @constructor - * @param {Array} [values] The values to cache. - */ - function SetCache(values) { - var index = -1, - length = values ? values.length : 0; - - this.__data__ = new MapCache(); - while (++index < length) { - this.add(values[index]); - } - } + module.exports = code => errname(uv, code); +} - /** - * Adds `value` to the array cache. - * - * @private - * @name add - * @memberOf SetCache - * @alias push - * @param {*} value The value to cache. - * @returns {Object} Returns the cache instance. - */ - function setCacheAdd(value) { - this.__data__.set(value, HASH_UNDEFINED); - return this; - } +// Used for testing the fallback behavior +module.exports.__test__ = errname; - /** - * Checks if `value` is in the array cache. - * - * @private - * @name has - * @memberOf SetCache - * @param {*} value The value to search for. - * @returns {number} Returns `true` if `value` is found, else `false`. - */ - function setCacheHas(value) { - return this.__data__.has(value); - } +function errname(uv, code) { + if (uv) { + return uv.errname(code); + } - // Add methods to `SetCache`. - SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; - SetCache.prototype.has = setCacheHas; - - /** - * Gets the index at which the `key` is found in `array` of key-value pairs. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} key The key to search for. - * @returns {number} Returns the index of the matched value, else `-1`. - */ - function assocIndexOf(array, key) { - var length = array.length; - while (length--) { - if (eq(array[length][0], key)) { - return length; - } - } - return -1; - } + if (!(code < 0)) { + throw new Error('err >= 0'); + } - /** - * The base implementation of `_.isNative` without bad shim checks. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a native function, - * else `false`. - */ - function baseIsNative(value) { - if (!isObject(value) || isMasked(value)) { - return false; - } - var pattern = - isFunction(value) || isHostObject(value) ? reIsNative : reIsHostCtor; - return pattern.test(toSource(value)); - } + return `Unknown system error ${code}`; +} - /** - * The base implementation of `_.uniqBy` without support for iteratee shorthands. - * - * @private - * @param {Array} array The array to inspect. - * @param {Function} [iteratee] The iteratee invoked per element. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new duplicate free array. - */ - function baseUniq(array, iteratee, comparator) { - var index = -1, - includes = arrayIncludes, - length = array.length, - isCommon = true, - result = [], - seen = result; - - if (comparator) { - isCommon = false; - includes = arrayIncludesWith; - } else if (length >= LARGE_ARRAY_SIZE) { - var set = iteratee ? null : createSet(array); - if (set) { - return setToArray(set); - } - isCommon = false; - includes = cacheHas; - seen = new SetCache(); - } else { - seen = iteratee ? [] : result; - } - outer: while (++index < length) { - var value = array[index], - computed = iteratee ? iteratee(value) : value; - - value = comparator || value !== 0 ? value : 0; - if (isCommon && computed === computed) { - var seenIndex = seen.length; - while (seenIndex--) { - if (seen[seenIndex] === computed) { - continue outer; - } - } - if (iteratee) { - seen.push(computed); - } - result.push(value); - } else if (!includes(seen, computed, comparator)) { - if (seen !== result) { - seen.push(computed); - } - result.push(value); - } - } - return result; - } - /** - * Creates a set object of `values`. - * - * @private - * @param {Array} values The values to add to the set. - * @returns {Object} Returns the new set. - */ - var createSet = !(Set && 1 / setToArray(new Set([, -0]))[1] == INFINITY) - ? noop - : function (values) { - return new Set(values); - }; - /** - * Gets the data for `map`. - * - * @private - * @param {Object} map The map to query. - * @param {string} key The reference key. - * @returns {*} Returns the map data. - */ - function getMapData(map, key) { - var data = map.__data__; - return isKeyable(key) - ? data[typeof key == "string" ? "string" : "hash"] - : data.map; - } +/***/ }), - /** - * Gets the native function at `key` of `object`. - * - * @private - * @param {Object} object The object to query. - * @param {string} key The key of the method to get. - * @returns {*} Returns the function if it's native, else `undefined`. - */ - function getNative(object, key) { - var value = getValue(object, key); - return baseIsNative(value) ? value : undefined; - } +/***/ 10166: +/***/ ((module) => { - /** - * Checks if `value` is suitable for use as unique object key. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is suitable, else `false`. - */ - function isKeyable(value) { - var type = typeof value; - return type == "string" || - type == "number" || - type == "symbol" || - type == "boolean" - ? value !== "__proto__" - : value === null; - } +"use strict"; - /** - * Checks if `func` has its source masked. - * - * @private - * @param {Function} func The function to check. - * @returns {boolean} Returns `true` if `func` is masked, else `false`. - */ - function isMasked(func) { - return !!maskSrcKey && maskSrcKey in func; - } +const alias = ['stdin', 'stdout', 'stderr']; - /** - * Converts `func` to its source code. - * - * @private - * @param {Function} func The function to process. - * @returns {string} Returns the source code. - */ - function toSource(func) { - if (func != null) { - try { - return funcToString.call(func); - } catch (e) {} - try { - return func + ""; - } catch (e) {} - } - return ""; - } +const hasAlias = opts => alias.some(x => Boolean(opts[x])); - /** - * Creates a duplicate-free version of an array, using - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons, in which only the first occurrence of each - * element is kept. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to inspect. - * @returns {Array} Returns the new duplicate free array. - * @example - * - * _.uniq([2, 1, 2]); - * // => [2, 1] - */ - function uniq(array) { - return array && array.length ? baseUniq(array) : []; - } +module.exports = opts => { + if (!opts) { + return null; + } - /** - * Performs a - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * comparison between two values to determine if they are equivalent. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - * @example - * - * var object = { 'a': 1 }; - * var other = { 'a': 1 }; - * - * _.eq(object, object); - * // => true - * - * _.eq(object, other); - * // => false - * - * _.eq('a', 'a'); - * // => true - * - * _.eq('a', Object('a')); - * // => false - * - * _.eq(NaN, NaN); - * // => true - */ - function eq(value, other) { - return value === other || (value !== value && other !== other); - } + if (opts.stdio && hasAlias(opts)) { + throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${alias.map(x => `\`${x}\``).join(', ')}`); + } - /** - * Checks if `value` is classified as a `Function` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a function, else `false`. - * @example - * - * _.isFunction(_); - * // => true - * - * _.isFunction(/abc/); - * // => false - */ - function isFunction(value) { - // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8-9 which returns 'object' for typed array and other constructors. - var tag = isObject(value) ? objectToString.call(value) : ""; - return tag == funcTag || tag == genTag; - } + if (typeof opts.stdio === 'string') { + return opts.stdio; + } - /** - * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) - * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(_.noop); - * // => true - * - * _.isObject(null); - * // => false - */ - function isObject(value) { - var type = typeof value; - return !!value && (type == "object" || type == "function"); - } + const stdio = opts.stdio || []; - /** - * This method returns `undefined`. - * - * @static - * @memberOf _ - * @since 2.3.0 - * @category Util - * @example - * - * _.times(2, _.noop); - * // => [undefined, undefined] - */ - function noop() { - // No operation performed. - } + if (!Array.isArray(stdio)) { + throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof stdio}\``); + } - module.exports = uniq; - - /***/ - }, - - /***/ 7493: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - "use strict"; - - const os = __nccwpck_require__(22037); - - const nameMap = new Map([ - [19, "Catalina"], - [18, "Mojave"], - [17, "High Sierra"], - [16, "Sierra"], - [15, "El Capitan"], - [14, "Yosemite"], - [13, "Mavericks"], - [12, "Mountain Lion"], - [11, "Lion"], - [10, "Snow Leopard"], - [9, "Leopard"], - [8, "Tiger"], - [7, "Panther"], - [6, "Jaguar"], - [5, "Puma"], - ]); - - const macosRelease = (release) => { - release = Number((release || os.release()).split(".")[0]); - return { - name: nameMap.get(release), - version: "10." + (release - 4), - }; - }; + const result = []; + const len = Math.max(stdio.length, alias.length); - module.exports = macosRelease; - // TODO: remove this in the next major version - module.exports["default"] = macosRelease; + for (let i = 0; i < len; i++) { + let value = null; - /***/ - }, + if (stdio[i] !== undefined) { + value = stdio[i]; + } else if (opts[alias[i]] !== undefined) { + value = opts[alias[i]]; + } - /***/ 38560: /***/ (module) => { - "use strict"; + result[i] = value; + } - /** - * Tries to execute a function and discards any error that occurs. - * @param {Function} fn - Function that might or might not throw an error. - * @returns {?*} Return-value of the function when no error occurred. - */ - module.exports = function (fn) { - try { - return fn(); - } catch (e) {} - }; + return result; +}; - /***/ - }, - /***/ 80467: /***/ (module, exports, __nccwpck_require__) => { - "use strict"; +/***/ }), - Object.defineProperty(exports, "__esModule", { value: true }); +/***/ 91585: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - function _interopDefault(ex) { - return ex && typeof ex === "object" && "default" in ex - ? ex["default"] - : ex; - } +"use strict"; - var Stream = _interopDefault(__nccwpck_require__(12781)); - var http = _interopDefault(__nccwpck_require__(13685)); - var Url = _interopDefault(__nccwpck_require__(57310)); - var whatwgUrl = _interopDefault(__nccwpck_require__(28665)); - var https = _interopDefault(__nccwpck_require__(95687)); - var zlib = _interopDefault(__nccwpck_require__(59796)); - - // Based on https://github.com/tmpvar/jsdom/blob/aa85b2abf07766ff7bf5c1f6daafb3726f2f2db5/lib/jsdom/living/blob.js - - // fix for "Readable" isn't a named export issue - const Readable = Stream.Readable; - - const BUFFER = Symbol("buffer"); - const TYPE = Symbol("type"); - - class Blob { - constructor() { - this[TYPE] = ""; - - const blobParts = arguments[0]; - const options = arguments[1]; - - const buffers = []; - let size = 0; - - if (blobParts) { - const a = blobParts; - const length = Number(a.length); - for (let i = 0; i < length; i++) { - const element = a[i]; - let buffer; - if (element instanceof Buffer) { - buffer = element; - } else if (ArrayBuffer.isView(element)) { - buffer = Buffer.from( - element.buffer, - element.byteOffset, - element.byteLength - ); - } else if (element instanceof ArrayBuffer) { - buffer = Buffer.from(element); - } else if (element instanceof Blob) { - buffer = element[BUFFER]; - } else { - buffer = Buffer.from( - typeof element === "string" ? element : String(element) - ); - } - size += buffer.length; - buffers.push(buffer); - } - } +const {PassThrough} = __nccwpck_require__(12781); - this[BUFFER] = Buffer.concat(buffers); +module.exports = options => { + options = Object.assign({}, options); - let type = - options && - options.type !== undefined && - String(options.type).toLowerCase(); - if (type && !/[^\u0020-\u007E]/.test(type)) { - this[TYPE] = type; - } - } - get size() { - return this[BUFFER].length; - } - get type() { - return this[TYPE]; - } - text() { - return Promise.resolve(this[BUFFER].toString()); - } - arrayBuffer() { - const buf = this[BUFFER]; - const ab = buf.buffer.slice( - buf.byteOffset, - buf.byteOffset + buf.byteLength - ); - return Promise.resolve(ab); - } - stream() { - const readable = new Readable(); - readable._read = function () {}; - readable.push(this[BUFFER]); - readable.push(null); - return readable; - } - toString() { - return "[object Blob]"; - } - slice() { - const size = this.size; - - const start = arguments[0]; - const end = arguments[1]; - let relativeStart, relativeEnd; - if (start === undefined) { - relativeStart = 0; - } else if (start < 0) { - relativeStart = Math.max(size + start, 0); - } else { - relativeStart = Math.min(start, size); - } - if (end === undefined) { - relativeEnd = size; - } else if (end < 0) { - relativeEnd = Math.max(size + end, 0); - } else { - relativeEnd = Math.min(end, size); - } - const span = Math.max(relativeEnd - relativeStart, 0); + const {array} = options; + let {encoding} = options; + const buffer = encoding === 'buffer'; + let objectMode = false; - const buffer = this[BUFFER]; - const slicedBuffer = buffer.slice( - relativeStart, - relativeStart + span - ); - const blob = new Blob([], { type: arguments[2] }); - blob[BUFFER] = slicedBuffer; - return blob; - } - } + if (array) { + objectMode = !(encoding || buffer); + } else { + encoding = encoding || 'utf8'; + } - Object.defineProperties(Blob.prototype, { - size: { enumerable: true }, - type: { enumerable: true }, - slice: { enumerable: true }, - }); + if (buffer) { + encoding = null; + } - Object.defineProperty(Blob.prototype, Symbol.toStringTag, { - value: "Blob", - writable: false, - enumerable: false, - configurable: true, - }); + let len = 0; + const ret = []; + const stream = new PassThrough({objectMode}); - /** - * fetch-error.js - * - * FetchError interface for operational errors - */ - - /** - * Create FetchError instance - * - * @param String message Error message for human - * @param String type Error type for machine - * @param String systemError For Node.js system error - * @return FetchError - */ - function FetchError(message, type, systemError) { - Error.call(this, message); + if (encoding) { + stream.setEncoding(encoding); + } - this.message = message; - this.type = type; + stream.on('data', chunk => { + ret.push(chunk); - // when err.type is `system`, err.code contains system error code - if (systemError) { - this.code = this.errno = systemError.code; - } + if (objectMode) { + len = ret.length; + } else { + len += chunk.length; + } + }); - // hide custom error implementation details from end-users - Error.captureStackTrace(this, this.constructor); - } + stream.getBufferedValue = () => { + if (array) { + return ret; + } - FetchError.prototype = Object.create(Error.prototype); - FetchError.prototype.constructor = FetchError; - FetchError.prototype.name = "FetchError"; + return buffer ? Buffer.concat(ret, len) : ret.join(''); + }; - let convert; - try { - convert = __nccwpck_require__(22877).convert; - } catch (e) {} - - const INTERNALS = Symbol("Body internals"); - - // fix an issue where "PassThrough" isn't a named export for node <10 - const PassThrough = Stream.PassThrough; - - /** - * Body mixin - * - * Ref: https://fetch.spec.whatwg.org/#body - * - * @param Stream body Readable stream - * @param Object opts Response options - * @return Void - */ - function Body(body) { - var _this = this; - - var _ref = - arguments.length > 1 && arguments[1] !== undefined - ? arguments[1] - : {}, - _ref$size = _ref.size; - - let size = _ref$size === undefined ? 0 : _ref$size; - var _ref$timeout = _ref.timeout; - let timeout = _ref$timeout === undefined ? 0 : _ref$timeout; - - if (body == null) { - // body is undefined or null - body = null; - } else if (isURLSearchParams(body)) { - // body is a URLSearchParams - body = Buffer.from(body.toString()); - } else if (isBlob(body)); - else if (Buffer.isBuffer(body)); - else if ( - Object.prototype.toString.call(body) === "[object ArrayBuffer]" - ) { - // body is ArrayBuffer - body = Buffer.from(body); - } else if (ArrayBuffer.isView(body)) { - // body is ArrayBufferView - body = Buffer.from(body.buffer, body.byteOffset, body.byteLength); - } else if (body instanceof Stream); - else { - // none of the above - // coerce to string then buffer - body = Buffer.from(String(body)); - } - this[INTERNALS] = { - body, - disturbed: false, - error: null, - }; - this.size = size; - this.timeout = timeout; - - if (body instanceof Stream) { - body.on("error", function (err) { - const error = - err.name === "AbortError" - ? err - : new FetchError( - `Invalid response body while trying to fetch ${_this.url}: ${err.message}`, - "system", - err - ); - _this[INTERNALS].error = error; - }); - } - } + stream.getBufferedLength = () => len; - Body.prototype = { - get body() { - return this[INTERNALS].body; - }, + return stream; +}; - get bodyUsed() { - return this[INTERNALS].disturbed; - }, - /** - * Decode response as ArrayBuffer - * - * @return Promise - */ - arrayBuffer() { - return consumeBody.call(this).then(function (buf) { - return buf.buffer.slice( - buf.byteOffset, - buf.byteOffset + buf.byteLength - ); - }); - }, +/***/ }), - /** - * Return raw response as Blob - * - * @return Promise - */ - blob() { - let ct = (this.headers && this.headers.get("content-type")) || ""; - return consumeBody.call(this).then(function (buf) { - return Object.assign( - // Prevent copying - new Blob([], { - type: ct.toLowerCase(), - }), - { - [BUFFER]: buf, - } - ); - }); - }, +/***/ 21766: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - /** - * Decode response as json - * - * @return Promise - */ - json() { - var _this2 = this; +"use strict"; - return consumeBody.call(this).then(function (buffer) { - try { - return JSON.parse(buffer.toString()); - } catch (err) { - return Body.Promise.reject( - new FetchError( - `invalid json response body at ${_this2.url} reason: ${err.message}`, - "invalid-json" - ) - ); - } - }); - }, +const pump = __nccwpck_require__(18341); +const bufferStream = __nccwpck_require__(91585); - /** - * Decode response as text - * - * @return Promise - */ - text() { - return consumeBody.call(this).then(function (buffer) { - return buffer.toString(); - }); - }, +class MaxBufferError extends Error { + constructor() { + super('maxBuffer exceeded'); + this.name = 'MaxBufferError'; + } +} - /** - * Decode response as buffer (non-spec api) - * - * @return Promise - */ - buffer() { - return consumeBody.call(this); - }, +function getStream(inputStream, options) { + if (!inputStream) { + return Promise.reject(new Error('Expected a stream')); + } - /** - * Decode response as text, while automatically detecting the encoding and - * trying to decode to UTF-8 (non-spec api) - * - * @return Promise - */ - textConverted() { - var _this3 = this; + options = Object.assign({maxBuffer: Infinity}, options); - return consumeBody.call(this).then(function (buffer) { - return convertBody(buffer, _this3.headers); - }); - }, - }; + const {maxBuffer} = options; - // In browsers, all properties are enumerable. - Object.defineProperties(Body.prototype, { - body: { enumerable: true }, - bodyUsed: { enumerable: true }, - arrayBuffer: { enumerable: true }, - blob: { enumerable: true }, - json: { enumerable: true }, - text: { enumerable: true }, - }); + let stream; + return new Promise((resolve, reject) => { + const rejectPromise = error => { + if (error) { // A null check + error.bufferedData = stream.getBufferedValue(); + } + reject(error); + }; - Body.mixIn = function (proto) { - for (const name of Object.getOwnPropertyNames(Body.prototype)) { - // istanbul ignore else: future proof - if (!(name in proto)) { - const desc = Object.getOwnPropertyDescriptor(Body.prototype, name); - Object.defineProperty(proto, name, desc); - } - } - }; + stream = pump(inputStream, bufferStream(options), error => { + if (error) { + rejectPromise(error); + return; + } - /** - * Consume and convert an entire Body to a Buffer. - * - * Ref: https://fetch.spec.whatwg.org/#concept-body-consume-body - * - * @return Promise - */ - function consumeBody() { - var _this4 = this; - - if (this[INTERNALS].disturbed) { - return Body.Promise.reject( - new TypeError(`body used already for: ${this.url}`) - ); - } + resolve(); + }); - this[INTERNALS].disturbed = true; + stream.on('data', () => { + if (stream.getBufferedLength() > maxBuffer) { + rejectPromise(new MaxBufferError()); + } + }); + }).then(() => stream.getBufferedValue()); +} - if (this[INTERNALS].error) { - return Body.Promise.reject(this[INTERNALS].error); - } +module.exports = getStream; +module.exports.buffer = (stream, options) => getStream(stream, Object.assign({}, options, {encoding: 'buffer'})); +module.exports.array = (stream, options) => getStream(stream, Object.assign({}, options, {array: true})); +module.exports.MaxBufferError = MaxBufferError; - let body = this.body; - // body is null - if (body === null) { - return Body.Promise.resolve(Buffer.alloc(0)); - } +/***/ }), - // body is blob - if (isBlob(body)) { - body = body.stream(); - } +/***/ 48840: +/***/ ((module) => { - // body is buffer - if (Buffer.isBuffer(body)) { - return Body.Promise.resolve(body); - } +"use strict"; - // istanbul ignore if: should never happen - if (!(body instanceof Stream)) { - return Body.Promise.resolve(Buffer.alloc(0)); - } - // body is stream - // get ready to actually consume the body - let accum = []; - let accumBytes = 0; - let abort = false; +/*! + * isobject + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ - return new Body.Promise(function (resolve, reject) { - let resTimeout; +function isObject(val) { + return val != null && typeof val === 'object' && Array.isArray(val) === false; +} - // allow timeout on slow response body - if (_this4.timeout) { - resTimeout = setTimeout(function () { - abort = true; - reject( - new FetchError( - `Response timeout while trying to fetch ${_this4.url} (over ${_this4.timeout}ms)`, - "body-timeout" - ) - ); - }, _this4.timeout); - } +/*! + * is-plain-object + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ - // handle stream errors - body.on("error", function (err) { - if (err.name === "AbortError") { - // if the request was aborted, reject with this Error - abort = true; - reject(err); - } else { - // other errors, such as incorrect content-encoding - reject( - new FetchError( - `Invalid response body while trying to fetch ${_this4.url}: ${err.message}`, - "system", - err - ) - ); - } - }); +function isObjectObject(o) { + return isObject(o) === true + && Object.prototype.toString.call(o) === '[object Object]'; +} - body.on("data", function (chunk) { - if (abort || chunk === null) { - return; - } +function isPlainObject(o) { + var ctor,prot; - if (_this4.size && accumBytes + chunk.length > _this4.size) { - abort = true; - reject( - new FetchError( - `content size at ${_this4.url} over limit: ${_this4.size}`, - "max-size" - ) - ); - return; - } + if (isObjectObject(o) === false) return false; - accumBytes += chunk.length; - accum.push(chunk); - }); + // If has modified constructor + ctor = o.constructor; + if (typeof ctor !== 'function') return false; - body.on("end", function () { - if (abort) { - return; - } + // If has modified prototype + prot = ctor.prototype; + if (isObjectObject(prot) === false) return false; - clearTimeout(resTimeout); + // If constructor does not have an Object-specific method + if (prot.hasOwnProperty('isPrototypeOf') === false) { + return false; + } - try { - resolve(Buffer.concat(accum, accumBytes)); - } catch (err) { - // handle streams that have accumulated too much data (issue #414) - reject( - new FetchError( - `Could not create Buffer from response body for ${_this4.url}: ${err.message}`, - "system", - err - ) - ); - } - }); - }); - } + // Most likely a plain Object + return true; +} - /** - * Detect buffer encoding and convert to target encoding - * ref: http://www.w3.org/TR/2011/WD-html5-20110113/parsing.html#determining-the-character-encoding - * - * @param Buffer buffer Incoming buffer - * @param String encoding Target encoding - * @return String - */ - function convertBody(buffer, headers) { - if (typeof convert !== "function") { - throw new Error( - "The package `encoding` must be installed to use the textConverted() function" - ); - } +module.exports = isPlainObject; - const ct = headers.get("content-type"); - let charset = "utf-8"; - let res, str; - // header - if (ct) { - res = /charset=([^;]*)/i.exec(ct); - } +/***/ }), - // no charset in content type, peek at response body for at most 1024 bytes - str = buffer.slice(0, 1024).toString(); +/***/ 41554: +/***/ ((module) => { - // html5 - if (!res && str) { - res = / { - /** - * Clone body given Res/Req instance - * - * @param Mixed instance Response or Request instance - * @return Mixed - */ - function clone(instance) { - let p1, p2; - let body = instance.body; - - // don't allow cloning a used body - if (instance.bodyUsed) { - throw new Error("cannot clone body after it is used"); - } - - // check that body is a stream and not form-data object - // note: we can't clone the form-data object without having it as a dependency - if (body instanceof Stream && typeof body.getBoundary !== "function") { - // tee instance body - p1 = new PassThrough(); - p2 = new PassThrough(); - body.pipe(p1); - body.pipe(p2); - // set instance body to teed body and return the other teed body - instance[INTERNALS].body = p1; - body = p2; - } - - return body; - } +var fs = __nccwpck_require__(57147) +var core +if (process.platform === 'win32' || global.TESTING_WINDOWS) { + core = __nccwpck_require__(42001) +} else { + core = __nccwpck_require__(9728) +} - /** - * Performs the operation "extract a `Content-Type` value from |object|" as - * specified in the specification: - * https://fetch.spec.whatwg.org/#concept-bodyinit-extract - * - * This function assumes that instance.body is present. - * - * @param Mixed instance Any options.body input - */ - function extractContentType(body) { - if (body === null) { - // body is null - return null; - } else if (typeof body === "string") { - // body is string - return "text/plain;charset=UTF-8"; - } else if (isURLSearchParams(body)) { - // body is a URLSearchParams - return "application/x-www-form-urlencoded;charset=UTF-8"; - } else if (isBlob(body)) { - // body is blob - return body.type || null; - } else if (Buffer.isBuffer(body)) { - // body is buffer - return null; - } else if ( - Object.prototype.toString.call(body) === "[object ArrayBuffer]" - ) { - // body is ArrayBuffer - return null; - } else if (ArrayBuffer.isView(body)) { - // body is ArrayBufferView - return null; - } else if (typeof body.getBoundary === "function") { - // detect form data input from form-data module - return `multipart/form-data;boundary=${body.getBoundary()}`; - } else if (body instanceof Stream) { - // body is stream - // can't really do much about this - return null; +module.exports = isexe +isexe.sync = sync + +function isexe (path, options, cb) { + if (typeof options === 'function') { + cb = options + options = {} + } + + if (!cb) { + if (typeof Promise !== 'function') { + throw new TypeError('callback not provided') + } + + return new Promise(function (resolve, reject) { + isexe(path, options || {}, function (er, is) { + if (er) { + reject(er) } else { - // Body constructor defaults other things to string - return "text/plain;charset=UTF-8"; + resolve(is) } + }) + }) + } + + core(path, options || {}, function (er, is) { + // ignore EACCES because that just means we aren't allowed to run it + if (er) { + if (er.code === 'EACCES' || options && options.ignoreErrors) { + er = null + is = false + } + } + cb(er, is) + }) +} + +function sync (path, options) { + // my kingdom for a filtered catch + try { + return core.sync(path, options || {}) + } catch (er) { + if (options && options.ignoreErrors || er.code === 'EACCES') { + return false + } else { + throw er + } + } +} + + +/***/ }), + +/***/ 9728: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +module.exports = isexe +isexe.sync = sync + +var fs = __nccwpck_require__(57147) + +function isexe (path, options, cb) { + fs.stat(path, function (er, stat) { + cb(er, er ? false : checkStat(stat, options)) + }) +} + +function sync (path, options) { + return checkStat(fs.statSync(path), options) +} + +function checkStat (stat, options) { + return stat.isFile() && checkMode(stat, options) +} + +function checkMode (stat, options) { + var mod = stat.mode + var uid = stat.uid + var gid = stat.gid + + var myUid = options.uid !== undefined ? + options.uid : process.getuid && process.getuid() + var myGid = options.gid !== undefined ? + options.gid : process.getgid && process.getgid() + + var u = parseInt('100', 8) + var g = parseInt('010', 8) + var o = parseInt('001', 8) + var ug = u | g + + var ret = (mod & o) || + (mod & g) && gid === myGid || + (mod & u) && uid === myUid || + (mod & ug) && myUid === 0 + + return ret +} + + +/***/ }), + +/***/ 42001: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +module.exports = isexe +isexe.sync = sync + +var fs = __nccwpck_require__(57147) + +function checkPathExt (path, options) { + var pathext = options.pathExt !== undefined ? + options.pathExt : process.env.PATHEXT + + if (!pathext) { + return true + } + + pathext = pathext.split(';') + if (pathext.indexOf('') !== -1) { + return true + } + for (var i = 0; i < pathext.length; i++) { + var p = pathext[i].toLowerCase() + if (p && path.substr(-p.length).toLowerCase() === p) { + return true + } + } + return false +} + +function checkStat (stat, path, options) { + if (!stat.isSymbolicLink() && !stat.isFile()) { + return false + } + return checkPathExt(path, options) +} + +function isexe (path, options, cb) { + fs.stat(path, function (er, stat) { + cb(er, er ? false : checkStat(stat, path, options)) + }) +} + +function sync (path, options) { + return checkStat(fs.statSync(path), path, options) +} + + +/***/ }), + +/***/ 87783: +/***/ ((__unused_webpack_module, exports) => { + +(function(exports) { + "use strict"; + + function isArray(obj) { + if (obj !== null) { + return Object.prototype.toString.call(obj) === "[object Array]"; + } else { + return false; + } + } + + function isObject(obj) { + if (obj !== null) { + return Object.prototype.toString.call(obj) === "[object Object]"; + } else { + return false; + } + } + + function strictDeepEqual(first, second) { + // Check the scalar case first. + if (first === second) { + return true; + } + + // Check if they are the same type. + var firstType = Object.prototype.toString.call(first); + if (firstType !== Object.prototype.toString.call(second)) { + return false; + } + // We know that first and second have the same type so we can just check the + // first type from now on. + if (isArray(first) === true) { + // Short circuit if they're not the same length; + if (first.length !== second.length) { + return false; } - - /** - * The Fetch Standard treats this as if "total bytes" is a property on the body. - * For us, we have to explicitly get it with a function. - * - * ref: https://fetch.spec.whatwg.org/#concept-body-total-bytes - * - * @param Body instance Instance of Body - * @return Number? Number of bytes, or null if not possible - */ - function getTotalBytes(instance) { - const body = instance.body; - - if (body === null) { - // body is null - return 0; - } else if (isBlob(body)) { - return body.size; - } else if (Buffer.isBuffer(body)) { - // body is buffer - return body.length; - } else if (body && typeof body.getLengthSync === "function") { - // detect form data input from form-data module - if ( - (body._lengthRetrievers && body._lengthRetrievers.length == 0) || // 1.x - (body.hasKnownLength && body.hasKnownLength()) - ) { - // 2.x - return body.getLengthSync(); - } - return null; - } else { - // body is stream - return null; + for (var i = 0; i < first.length; i++) { + if (strictDeepEqual(first[i], second[i]) === false) { + return false; } } - - /** - * Write a Body to a Node.js WritableStream (e.g. http.Request) object. - * - * @param Body instance Instance of Body - * @return Void - */ - function writeToStream(dest, instance) { - const body = instance.body; - - if (body === null) { - // body is null - dest.end(); - } else if (isBlob(body)) { - body.stream().pipe(dest); - } else if (Buffer.isBuffer(body)) { - // body is buffer - dest.write(body); - dest.end(); - } else { - // body is stream - body.pipe(dest); + return true; + } + if (isObject(first) === true) { + // An object is equal if it has the same key/value pairs. + var keysSeen = {}; + for (var key in first) { + if (hasOwnProperty.call(first, key)) { + if (strictDeepEqual(first[key], second[key]) === false) { + return false; + } + keysSeen[key] = true; } } - - // expose Promise - Body.Promise = global.Promise; - - /** - * headers.js - * - * Headers class offers convenient helpers - */ - - const invalidTokenRegex = /[^\^_`a-zA-Z\-0-9!#$%&'*+.|~]/; - const invalidHeaderCharRegex = /[^\t\x20-\x7e\x80-\xff]/; - - function validateName(name) { - name = `${name}`; - if (invalidTokenRegex.test(name) || name === "") { - throw new TypeError(`${name} is not a legal HTTP header name`); + // Now check that there aren't any keys in second that weren't + // in first. + for (var key2 in second) { + if (hasOwnProperty.call(second, key2)) { + if (keysSeen[key2] !== true) { + return false; + } } } + return true; + } + return false; + } + + function isFalse(obj) { + // From the spec: + // A false value corresponds to the following values: + // Empty list + // Empty object + // Empty string + // False boolean + // null value - function validateValue(value) { - value = `${value}`; - if (invalidHeaderCharRegex.test(value)) { - throw new TypeError(`${value} is not a legal HTTP header value`); + // First check the scalar values. + if (obj === "" || obj === false || obj === null) { + return true; + } else if (isArray(obj) && obj.length === 0) { + // Check for an empty array. + return true; + } else if (isObject(obj)) { + // Check for an empty object. + for (var key in obj) { + // If there are any keys, then + // the object is not empty so the object + // is not false. + if (obj.hasOwnProperty(key)) { + return false; + } } - } + return true; + } else { + return false; + } + } + + function objValues(obj) { + var keys = Object.keys(obj); + var values = []; + for (var i = 0; i < keys.length; i++) { + values.push(obj[keys[i]]); + } + return values; + } + + function merge(a, b) { + var merged = {}; + for (var key in a) { + merged[key] = a[key]; + } + for (var key2 in b) { + merged[key2] = b[key2]; + } + return merged; + } + + var trimLeft; + if (typeof String.prototype.trimLeft === "function") { + trimLeft = function(str) { + return str.trimLeft(); + }; + } else { + trimLeft = function(str) { + return str.match(/^\s*(.*)/)[1]; + }; + } + + // Type constants used to define functions. + var TYPE_NUMBER = 0; + var TYPE_ANY = 1; + var TYPE_STRING = 2; + var TYPE_ARRAY = 3; + var TYPE_OBJECT = 4; + var TYPE_BOOLEAN = 5; + var TYPE_EXPREF = 6; + var TYPE_NULL = 7; + var TYPE_ARRAY_NUMBER = 8; + var TYPE_ARRAY_STRING = 9; + + var TOK_EOF = "EOF"; + var TOK_UNQUOTEDIDENTIFIER = "UnquotedIdentifier"; + var TOK_QUOTEDIDENTIFIER = "QuotedIdentifier"; + var TOK_RBRACKET = "Rbracket"; + var TOK_RPAREN = "Rparen"; + var TOK_COMMA = "Comma"; + var TOK_COLON = "Colon"; + var TOK_RBRACE = "Rbrace"; + var TOK_NUMBER = "Number"; + var TOK_CURRENT = "Current"; + var TOK_EXPREF = "Expref"; + var TOK_PIPE = "Pipe"; + var TOK_OR = "Or"; + var TOK_AND = "And"; + var TOK_EQ = "EQ"; + var TOK_GT = "GT"; + var TOK_LT = "LT"; + var TOK_GTE = "GTE"; + var TOK_LTE = "LTE"; + var TOK_NE = "NE"; + var TOK_FLATTEN = "Flatten"; + var TOK_STAR = "Star"; + var TOK_FILTER = "Filter"; + var TOK_DOT = "Dot"; + var TOK_NOT = "Not"; + var TOK_LBRACE = "Lbrace"; + var TOK_LBRACKET = "Lbracket"; + var TOK_LPAREN= "Lparen"; + var TOK_LITERAL= "Literal"; + + // The "&", "[", "<", ">" tokens + // are not in basicToken because + // there are two token variants + // ("&&", "[?", "<=", ">="). This is specially handled + // below. + + var basicTokens = { + ".": TOK_DOT, + "*": TOK_STAR, + ",": TOK_COMMA, + ":": TOK_COLON, + "{": TOK_LBRACE, + "}": TOK_RBRACE, + "]": TOK_RBRACKET, + "(": TOK_LPAREN, + ")": TOK_RPAREN, + "@": TOK_CURRENT + }; + + var operatorStartToken = { + "<": true, + ">": true, + "=": true, + "!": true + }; + + var skipChars = { + " ": true, + "\t": true, + "\n": true + }; + + + function isAlpha(ch) { + return (ch >= "a" && ch <= "z") || + (ch >= "A" && ch <= "Z") || + ch === "_"; + } + + function isNum(ch) { + return (ch >= "0" && ch <= "9") || + ch === "-"; + } + function isAlphaNum(ch) { + return (ch >= "a" && ch <= "z") || + (ch >= "A" && ch <= "Z") || + (ch >= "0" && ch <= "9") || + ch === "_"; + } + + function Lexer() { + } + Lexer.prototype = { + tokenize: function(stream) { + var tokens = []; + this._current = 0; + var start; + var identifier; + var token; + while (this._current < stream.length) { + if (isAlpha(stream[this._current])) { + start = this._current; + identifier = this._consumeUnquotedIdentifier(stream); + tokens.push({type: TOK_UNQUOTEDIDENTIFIER, + value: identifier, + start: start}); + } else if (basicTokens[stream[this._current]] !== undefined) { + tokens.push({type: basicTokens[stream[this._current]], + value: stream[this._current], + start: this._current}); + this._current++; + } else if (isNum(stream[this._current])) { + token = this._consumeNumber(stream); + tokens.push(token); + } else if (stream[this._current] === "[") { + // No need to increment this._current. This happens + // in _consumeLBracket + token = this._consumeLBracket(stream); + tokens.push(token); + } else if (stream[this._current] === "\"") { + start = this._current; + identifier = this._consumeQuotedIdentifier(stream); + tokens.push({type: TOK_QUOTEDIDENTIFIER, + value: identifier, + start: start}); + } else if (stream[this._current] === "'") { + start = this._current; + identifier = this._consumeRawStringLiteral(stream); + tokens.push({type: TOK_LITERAL, + value: identifier, + start: start}); + } else if (stream[this._current] === "`") { + start = this._current; + var literal = this._consumeLiteral(stream); + tokens.push({type: TOK_LITERAL, + value: literal, + start: start}); + } else if (operatorStartToken[stream[this._current]] !== undefined) { + tokens.push(this._consumeOperator(stream)); + } else if (skipChars[stream[this._current]] !== undefined) { + // Ignore whitespace. + this._current++; + } else if (stream[this._current] === "&") { + start = this._current; + this._current++; + if (stream[this._current] === "&") { + this._current++; + tokens.push({type: TOK_AND, value: "&&", start: start}); + } else { + tokens.push({type: TOK_EXPREF, value: "&", start: start}); + } + } else if (stream[this._current] === "|") { + start = this._current; + this._current++; + if (stream[this._current] === "|") { + this._current++; + tokens.push({type: TOK_OR, value: "||", start: start}); + } else { + tokens.push({type: TOK_PIPE, value: "|", start: start}); + } + } else { + var error = new Error("Unknown character:" + stream[this._current]); + error.name = "LexerError"; + throw error; + } + } + return tokens; + }, - /** - * Find the key in the map object given a header name. - * - * Returns undefined if not found. - * - * @param String name Header name - * @return String|Undefined - */ - function find(map, name) { - name = name.toLowerCase(); - for (const key in map) { - if (key.toLowerCase() === name) { - return key; + _consumeUnquotedIdentifier: function(stream) { + var start = this._current; + this._current++; + while (this._current < stream.length && isAlphaNum(stream[this._current])) { + this._current++; } - } - return undefined; - } + return stream.slice(start, this._current); + }, - const MAP = Symbol("map"); - class Headers { - /** - * Headers class - * - * @param Object headers Response headers - * @return Void - */ - constructor() { - let init = - arguments.length > 0 && arguments[0] !== undefined - ? arguments[0] - : undefined; - - this[MAP] = Object.create(null); - - if (init instanceof Headers) { - const rawHeaders = init.raw(); - const headerNames = Object.keys(rawHeaders); - - for (const headerName of headerNames) { - for (const value of rawHeaders[headerName]) { - this.append(headerName, value); + _consumeQuotedIdentifier: function(stream) { + var start = this._current; + this._current++; + var maxLength = stream.length; + while (stream[this._current] !== "\"" && this._current < maxLength) { + // You can escape a double quote and you can escape an escape. + var current = this._current; + if (stream[current] === "\\" && (stream[current + 1] === "\\" || + stream[current + 1] === "\"")) { + current += 2; + } else { + current++; } - } - - return; + this._current = current; } + this._current++; + return JSON.parse(stream.slice(start, this._current)); + }, - // We don't worry about converting prop to ByteString here as append() - // will handle it. - if (init == null); - else if (typeof init === "object") { - const method = init[Symbol.iterator]; - if (method != null) { - if (typeof method !== "function") { - throw new TypeError("Header pairs must be iterable"); + _consumeRawStringLiteral: function(stream) { + var start = this._current; + this._current++; + var maxLength = stream.length; + while (stream[this._current] !== "'" && this._current < maxLength) { + // You can escape a single quote and you can escape an escape. + var current = this._current; + if (stream[current] === "\\" && (stream[current + 1] === "\\" || + stream[current + 1] === "'")) { + current += 2; + } else { + current++; } + this._current = current; + } + this._current++; + var literal = stream.slice(start + 1, this._current - 1); + return literal.replace("\\'", "'"); + }, - // sequence> - // Note: per spec we have to first exhaust the lists then process them - const pairs = []; - for (const pair of init) { - if ( - typeof pair !== "object" || - typeof pair[Symbol.iterator] !== "function" - ) { - throw new TypeError("Each header pair must be iterable"); - } - pairs.push(Array.from(pair)); - } + _consumeNumber: function(stream) { + var start = this._current; + this._current++; + var maxLength = stream.length; + while (isNum(stream[this._current]) && this._current < maxLength) { + this._current++; + } + var value = parseInt(stream.slice(start, this._current)); + return {type: TOK_NUMBER, value: value, start: start}; + }, - for (const pair of pairs) { - if (pair.length !== 2) { - throw new TypeError( - "Each header pair must be a name/value tuple" - ); - } - this.append(pair[0], pair[1]); - } - } else { - // record - for (const key of Object.keys(init)) { - const value = init[key]; - this.append(key, value); - } - } + _consumeLBracket: function(stream) { + var start = this._current; + this._current++; + if (stream[this._current] === "?") { + this._current++; + return {type: TOK_FILTER, value: "[?", start: start}; + } else if (stream[this._current] === "]") { + this._current++; + return {type: TOK_FLATTEN, value: "[]", start: start}; } else { - throw new TypeError("Provided initializer must be an object"); + return {type: TOK_LBRACKET, value: "[", start: start}; } - } + }, - /** - * Return combined header value given name - * - * @param String name Header name - * @return Mixed - */ - get(name) { - name = `${name}`; - validateName(name); - const key = find(this[MAP], name); - if (key === undefined) { - return null; + _consumeOperator: function(stream) { + var start = this._current; + var startingChar = stream[start]; + this._current++; + if (startingChar === "!") { + if (stream[this._current] === "=") { + this._current++; + return {type: TOK_NE, value: "!=", start: start}; + } else { + return {type: TOK_NOT, value: "!", start: start}; + } + } else if (startingChar === "<") { + if (stream[this._current] === "=") { + this._current++; + return {type: TOK_LTE, value: "<=", start: start}; + } else { + return {type: TOK_LT, value: "<", start: start}; + } + } else if (startingChar === ">") { + if (stream[this._current] === "=") { + this._current++; + return {type: TOK_GTE, value: ">=", start: start}; + } else { + return {type: TOK_GT, value: ">", start: start}; + } + } else if (startingChar === "=") { + if (stream[this._current] === "=") { + this._current++; + return {type: TOK_EQ, value: "==", start: start}; + } } + }, - return this[MAP][key].join(", "); - } - - /** - * Iterate over all headers - * - * @param Function callback Executed for each item with parameters (value, name, thisArg) - * @param Boolean thisArg `this` context for callback function - * @return Void - */ - forEach(callback) { - let thisArg = - arguments.length > 1 && arguments[1] !== undefined - ? arguments[1] - : undefined; - - let pairs = getHeaders(this); - let i = 0; - while (i < pairs.length) { - var _pairs$i = pairs[i]; - const name = _pairs$i[0], - value = _pairs$i[1]; - - callback.call(thisArg, value, name, this); - pairs = getHeaders(this); - i++; + _consumeLiteral: function(stream) { + this._current++; + var start = this._current; + var maxLength = stream.length; + var literal; + while(stream[this._current] !== "`" && this._current < maxLength) { + // You can escape a literal char or you can escape the escape. + var current = this._current; + if (stream[current] === "\\" && (stream[current + 1] === "\\" || + stream[current + 1] === "`")) { + current += 2; + } else { + current++; + } + this._current = current; } - } - - /** - * Overwrite header values given name - * - * @param String name Header name - * @param String value Header value - * @return Void - */ - set(name, value) { - name = `${name}`; - value = `${value}`; - validateName(name); - validateValue(value); - const key = find(this[MAP], name); - this[MAP][key !== undefined ? key : name] = [value]; - } - - /** - * Append a value onto existing header - * - * @param String name Header name - * @param String value Header value - * @return Void - */ - append(name, value) { - name = `${name}`; - value = `${value}`; - validateName(name); - validateValue(value); - const key = find(this[MAP], name); - if (key !== undefined) { - this[MAP][key].push(value); + var literalString = trimLeft(stream.slice(start, this._current)); + literalString = literalString.replace("\\`", "`"); + if (this._looksLikeJSON(literalString)) { + literal = JSON.parse(literalString); } else { - this[MAP][name] = [value]; - } - } - - /** - * Check for header name existence - * - * @param String name Header name - * @return Boolean - */ - has(name) { - name = `${name}`; - validateName(name); - return find(this[MAP], name) !== undefined; - } - - /** - * Delete all header values given name - * - * @param String name Header name - * @return Void - */ - delete(name) { - name = `${name}`; - validateName(name); - const key = find(this[MAP], name); - if (key !== undefined) { - delete this[MAP][key]; + // Try to JSON parse it as "" + literal = JSON.parse("\"" + literalString + "\""); } - } - - /** - * Return raw headers (non-spec api) - * - * @return Object - */ - raw() { - return this[MAP]; - } - - /** - * Get an iterator on keys. - * - * @return Iterator - */ - keys() { - return createHeadersIterator(this, "key"); - } + // +1 gets us to the ending "`", +1 to move on to the next char. + this._current++; + return literal; + }, - /** - * Get an iterator on values. - * - * @return Iterator - */ - values() { - return createHeadersIterator(this, "value"); - } + _looksLikeJSON: function(literalString) { + var startingChars = "[{\""; + var jsonLiterals = ["true", "false", "null"]; + var numberLooking = "-0123456789"; - /** - * Get an iterator on entries. - * - * This is the default iterator of the Headers object. - * - * @return Iterator - */ - [Symbol.iterator]() { - return createHeadersIterator(this, "key+value"); - } + if (literalString === "") { + return false; + } else if (startingChars.indexOf(literalString[0]) >= 0) { + return true; + } else if (jsonLiterals.indexOf(literalString) >= 0) { + return true; + } else if (numberLooking.indexOf(literalString[0]) >= 0) { + try { + JSON.parse(literalString); + return true; + } catch (ex) { + return false; + } + } else { + return false; + } } - Headers.prototype.entries = Headers.prototype[Symbol.iterator]; - - Object.defineProperty(Headers.prototype, Symbol.toStringTag, { - value: "Headers", - writable: false, - enumerable: false, - configurable: true, - }); - - Object.defineProperties(Headers.prototype, { - get: { enumerable: true }, - forEach: { enumerable: true }, - set: { enumerable: true }, - append: { enumerable: true }, - has: { enumerable: true }, - delete: { enumerable: true }, - keys: { enumerable: true }, - values: { enumerable: true }, - entries: { enumerable: true }, - }); + }; + + var bindingPower = {}; + bindingPower[TOK_EOF] = 0; + bindingPower[TOK_UNQUOTEDIDENTIFIER] = 0; + bindingPower[TOK_QUOTEDIDENTIFIER] = 0; + bindingPower[TOK_RBRACKET] = 0; + bindingPower[TOK_RPAREN] = 0; + bindingPower[TOK_COMMA] = 0; + bindingPower[TOK_RBRACE] = 0; + bindingPower[TOK_NUMBER] = 0; + bindingPower[TOK_CURRENT] = 0; + bindingPower[TOK_EXPREF] = 0; + bindingPower[TOK_PIPE] = 1; + bindingPower[TOK_OR] = 2; + bindingPower[TOK_AND] = 3; + bindingPower[TOK_EQ] = 5; + bindingPower[TOK_GT] = 5; + bindingPower[TOK_LT] = 5; + bindingPower[TOK_GTE] = 5; + bindingPower[TOK_LTE] = 5; + bindingPower[TOK_NE] = 5; + bindingPower[TOK_FLATTEN] = 9; + bindingPower[TOK_STAR] = 20; + bindingPower[TOK_FILTER] = 21; + bindingPower[TOK_DOT] = 40; + bindingPower[TOK_NOT] = 45; + bindingPower[TOK_LBRACE] = 50; + bindingPower[TOK_LBRACKET] = 55; + bindingPower[TOK_LPAREN] = 60; + + function Parser() { + } + + Parser.prototype = { + parse: function(expression) { + this._loadTokens(expression); + this.index = 0; + var ast = this.expression(0); + if (this._lookahead(0) !== TOK_EOF) { + var t = this._lookaheadToken(0); + var error = new Error( + "Unexpected token type: " + t.type + ", value: " + t.value); + error.name = "ParserError"; + throw error; + } + return ast; + }, - function getHeaders(headers) { - let kind = - arguments.length > 1 && arguments[1] !== undefined - ? arguments[1] - : "key+value"; - - const keys = Object.keys(headers[MAP]).sort(); - return keys.map( - kind === "key" - ? function (k) { - return k.toLowerCase(); + _loadTokens: function(expression) { + var lexer = new Lexer(); + var tokens = lexer.tokenize(expression); + tokens.push({type: TOK_EOF, value: "", start: expression.length}); + this.tokens = tokens; + }, + + expression: function(rbp) { + var leftToken = this._lookaheadToken(0); + this._advance(); + var left = this.nud(leftToken); + var currentToken = this._lookahead(0); + while (rbp < bindingPower[currentToken]) { + this._advance(); + left = this.led(currentToken, left); + currentToken = this._lookahead(0); + } + return left; + }, + + _lookahead: function(number) { + return this.tokens[this.index + number].type; + }, + + _lookaheadToken: function(number) { + return this.tokens[this.index + number]; + }, + + _advance: function() { + this.index++; + }, + + nud: function(token) { + var left; + var right; + var expression; + switch (token.type) { + case TOK_LITERAL: + return {type: "Literal", value: token.value}; + case TOK_UNQUOTEDIDENTIFIER: + return {type: "Field", name: token.value}; + case TOK_QUOTEDIDENTIFIER: + var node = {type: "Field", name: token.value}; + if (this._lookahead(0) === TOK_LPAREN) { + throw new Error("Quoted identifier not allowed for function names."); + } else { + return node; + } + break; + case TOK_NOT: + right = this.expression(bindingPower.Not); + return {type: "NotExpression", children: [right]}; + case TOK_STAR: + left = {type: "Identity"}; + right = null; + if (this._lookahead(0) === TOK_RBRACKET) { + // This can happen in a multiselect, + // [a, b, *] + right = {type: "Identity"}; + } else { + right = this._parseProjectionRHS(bindingPower.Star); + } + return {type: "ValueProjection", children: [left, right]}; + case TOK_FILTER: + return this.led(token.type, {type: "Identity"}); + case TOK_LBRACE: + return this._parseMultiselectHash(); + case TOK_FLATTEN: + left = {type: TOK_FLATTEN, children: [{type: "Identity"}]}; + right = this._parseProjectionRHS(bindingPower.Flatten); + return {type: "Projection", children: [left, right]}; + case TOK_LBRACKET: + if (this._lookahead(0) === TOK_NUMBER || this._lookahead(0) === TOK_COLON) { + right = this._parseIndexExpression(); + return this._projectIfSlice({type: "Identity"}, right); + } else if (this._lookahead(0) === TOK_STAR && + this._lookahead(1) === TOK_RBRACKET) { + this._advance(); + this._advance(); + right = this._parseProjectionRHS(bindingPower.Star); + return {type: "Projection", + children: [{type: "Identity"}, right]}; + } else { + return this._parseMultiselectList(); + } + break; + case TOK_CURRENT: + return {type: TOK_CURRENT}; + case TOK_EXPREF: + expression = this.expression(bindingPower.Expref); + return {type: "ExpressionReference", children: [expression]}; + case TOK_LPAREN: + var args = []; + while (this._lookahead(0) !== TOK_RPAREN) { + if (this._lookahead(0) === TOK_CURRENT) { + expression = {type: TOK_CURRENT}; + this._advance(); + } else { + expression = this.expression(0); } - : kind === "value" - ? function (k) { - return headers[MAP][k].join(", "); + args.push(expression); + } + this._match(TOK_RPAREN); + return args[0]; + default: + this._errorToken(token); + } + }, + + led: function(tokenName, left) { + var right; + switch(tokenName) { + case TOK_DOT: + var rbp = bindingPower.Dot; + if (this._lookahead(0) !== TOK_STAR) { + right = this._parseDotRHS(rbp); + return {type: "Subexpression", children: [left, right]}; + } else { + // Creating a projection. + this._advance(); + right = this._parseProjectionRHS(rbp); + return {type: "ValueProjection", children: [left, right]}; + } + break; + case TOK_PIPE: + right = this.expression(bindingPower.Pipe); + return {type: TOK_PIPE, children: [left, right]}; + case TOK_OR: + right = this.expression(bindingPower.Or); + return {type: "OrExpression", children: [left, right]}; + case TOK_AND: + right = this.expression(bindingPower.And); + return {type: "AndExpression", children: [left, right]}; + case TOK_LPAREN: + var name = left.name; + var args = []; + var expression, node; + while (this._lookahead(0) !== TOK_RPAREN) { + if (this._lookahead(0) === TOK_CURRENT) { + expression = {type: TOK_CURRENT}; + this._advance(); + } else { + expression = this.expression(0); } - : function (k) { - return [k.toLowerCase(), headers[MAP][k].join(", ")]; + if (this._lookahead(0) === TOK_COMMA) { + this._match(TOK_COMMA); } - ); - } + args.push(expression); + } + this._match(TOK_RPAREN); + node = {type: "Function", name: name, children: args}; + return node; + case TOK_FILTER: + var condition = this.expression(0); + this._match(TOK_RBRACKET); + if (this._lookahead(0) === TOK_FLATTEN) { + right = {type: "Identity"}; + } else { + right = this._parseProjectionRHS(bindingPower.Filter); + } + return {type: "FilterProjection", children: [left, right, condition]}; + case TOK_FLATTEN: + var leftNode = {type: TOK_FLATTEN, children: [left]}; + var rightNode = this._parseProjectionRHS(bindingPower.Flatten); + return {type: "Projection", children: [leftNode, rightNode]}; + case TOK_EQ: + case TOK_NE: + case TOK_GT: + case TOK_GTE: + case TOK_LT: + case TOK_LTE: + return this._parseComparator(left, tokenName); + case TOK_LBRACKET: + var token = this._lookaheadToken(0); + if (token.type === TOK_NUMBER || token.type === TOK_COLON) { + right = this._parseIndexExpression(); + return this._projectIfSlice(left, right); + } else { + this._match(TOK_STAR); + this._match(TOK_RBRACKET); + right = this._parseProjectionRHS(bindingPower.Star); + return {type: "Projection", children: [left, right]}; + } + break; + default: + this._errorToken(this._lookaheadToken(0)); + } + }, - const INTERNAL = Symbol("internal"); + _match: function(tokenType) { + if (this._lookahead(0) === tokenType) { + this._advance(); + } else { + var t = this._lookaheadToken(0); + var error = new Error("Expected " + tokenType + ", got: " + t.type); + error.name = "ParserError"; + throw error; + } + }, - function createHeadersIterator(target, kind) { - const iterator = Object.create(HeadersIteratorPrototype); - iterator[INTERNAL] = { - target, - kind, - index: 0, - }; - return iterator; - } + _errorToken: function(token) { + var error = new Error("Invalid token (" + + token.type + "): \"" + + token.value + "\""); + error.name = "ParserError"; + throw error; + }, - const HeadersIteratorPrototype = Object.setPrototypeOf( - { - next() { - // istanbul ignore if - if ( - !this || - Object.getPrototypeOf(this) !== HeadersIteratorPrototype - ) { - throw new TypeError("Value of `this` is not a HeadersIterator"); - } - var _INTERNAL = this[INTERNAL]; - const target = _INTERNAL.target, - kind = _INTERNAL.kind, - index = _INTERNAL.index; + _parseIndexExpression: function() { + if (this._lookahead(0) === TOK_COLON || this._lookahead(1) === TOK_COLON) { + return this._parseSliceExpression(); + } else { + var node = { + type: "Index", + value: this._lookaheadToken(0).value}; + this._advance(); + this._match(TOK_RBRACKET); + return node; + } + }, - const values = getHeaders(target, kind); - const len = values.length; - if (index >= len) { + _projectIfSlice: function(left, right) { + var indexExpr = {type: "IndexExpression", children: [left, right]}; + if (right.type === "Slice") { return { - value: undefined, - done: true, + type: "Projection", + children: [indexExpr, this._parseProjectionRHS(bindingPower.Star)] }; - } - - this[INTERNAL].index = index + 1; - - return { - value: values[index], - done: false, - }; - }, - }, - Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())) - ); - - Object.defineProperty(HeadersIteratorPrototype, Symbol.toStringTag, { - value: "HeadersIterator", - writable: false, - enumerable: false, - configurable: true, - }); + } else { + return indexExpr; + } + }, - /** - * Export the Headers object in a form that Node.js can consume. - * - * @param Headers headers - * @return Object - */ - function exportNodeCompatibleHeaders(headers) { - const obj = Object.assign({ __proto__: null }, headers[MAP]); + _parseSliceExpression: function() { + // [start:end:step] where each part is optional, as well as the last + // colon. + var parts = [null, null, null]; + var index = 0; + var currentToken = this._lookahead(0); + while (currentToken !== TOK_RBRACKET && index < 3) { + if (currentToken === TOK_COLON) { + index++; + this._advance(); + } else if (currentToken === TOK_NUMBER) { + parts[index] = this._lookaheadToken(0).value; + this._advance(); + } else { + var t = this._lookahead(0); + var error = new Error("Syntax error, unexpected token: " + + t.value + "(" + t.type + ")"); + error.name = "Parsererror"; + throw error; + } + currentToken = this._lookahead(0); + } + this._match(TOK_RBRACKET); + return { + type: "Slice", + children: parts + }; + }, - // http.request() only supports string as Host header. This hack makes - // specifying custom Host header possible. - const hostHeaderKey = find(headers[MAP], "Host"); - if (hostHeaderKey !== undefined) { - obj[hostHeaderKey] = obj[hostHeaderKey][0]; - } + _parseComparator: function(left, comparator) { + var right = this.expression(bindingPower[comparator]); + return {type: "Comparator", name: comparator, children: [left, right]}; + }, - return obj; - } + _parseDotRHS: function(rbp) { + var lookahead = this._lookahead(0); + var exprTokens = [TOK_UNQUOTEDIDENTIFIER, TOK_QUOTEDIDENTIFIER, TOK_STAR]; + if (exprTokens.indexOf(lookahead) >= 0) { + return this.expression(rbp); + } else if (lookahead === TOK_LBRACKET) { + this._match(TOK_LBRACKET); + return this._parseMultiselectList(); + } else if (lookahead === TOK_LBRACE) { + this._match(TOK_LBRACE); + return this._parseMultiselectHash(); + } + }, - /** - * Create a Headers object from an object of headers, ignoring those that do - * not conform to HTTP grammar productions. - * - * @param Object obj Object of headers - * @return Headers - */ - function createHeadersLenient(obj) { - const headers = new Headers(); - for (const name of Object.keys(obj)) { - if (invalidTokenRegex.test(name)) { - continue; + _parseProjectionRHS: function(rbp) { + var right; + if (bindingPower[this._lookahead(0)] < 10) { + right = {type: "Identity"}; + } else if (this._lookahead(0) === TOK_LBRACKET) { + right = this.expression(rbp); + } else if (this._lookahead(0) === TOK_FILTER) { + right = this.expression(rbp); + } else if (this._lookahead(0) === TOK_DOT) { + this._match(TOK_DOT); + right = this._parseDotRHS(rbp); + } else { + var t = this._lookaheadToken(0); + var error = new Error("Sytanx error, unexpected token: " + + t.value + "(" + t.type + ")"); + error.name = "ParserError"; + throw error; } - if (Array.isArray(obj[name])) { - for (const val of obj[name]) { - if (invalidHeaderCharRegex.test(val)) { - continue; - } - if (headers[MAP][name] === undefined) { - headers[MAP][name] = [val]; - } else { - headers[MAP][name].push(val); + return right; + }, + + _parseMultiselectList: function() { + var expressions = []; + while (this._lookahead(0) !== TOK_RBRACKET) { + var expression = this.expression(0); + expressions.push(expression); + if (this._lookahead(0) === TOK_COMMA) { + this._match(TOK_COMMA); + if (this._lookahead(0) === TOK_RBRACKET) { + throw new Error("Unexpected token Rbracket"); + } } - } - } else if (!invalidHeaderCharRegex.test(obj[name])) { - headers[MAP][name] = [obj[name]]; + } + this._match(TOK_RBRACKET); + return {type: "MultiSelectList", children: expressions}; + }, + + _parseMultiselectHash: function() { + var pairs = []; + var identifierTypes = [TOK_UNQUOTEDIDENTIFIER, TOK_QUOTEDIDENTIFIER]; + var keyToken, keyName, value, node; + for (;;) { + keyToken = this._lookaheadToken(0); + if (identifierTypes.indexOf(keyToken.type) < 0) { + throw new Error("Expecting an identifier token, got: " + + keyToken.type); + } + keyName = keyToken.value; + this._advance(); + this._match(TOK_COLON); + value = this.expression(0); + node = {type: "KeyValuePair", name: keyName, value: value}; + pairs.push(node); + if (this._lookahead(0) === TOK_COMMA) { + this._match(TOK_COMMA); + } else if (this._lookahead(0) === TOK_RBRACE) { + this._match(TOK_RBRACE); + break; } } - return headers; + return {type: "MultiSelectHash", children: pairs}; } + }; - const INTERNALS$1 = Symbol("Response internals"); - - // fix an issue where "STATUS_CODES" aren't a named export for node <10 - const STATUS_CODES = http.STATUS_CODES; - - /** - * Response class - * - * @param Stream body Readable stream - * @param Object opts Response options - * @return Void - */ - class Response { - constructor() { - let body = - arguments.length > 0 && arguments[0] !== undefined - ? arguments[0] - : null; - let opts = - arguments.length > 1 && arguments[1] !== undefined - ? arguments[1] - : {}; - - Body.call(this, body, opts); - - const status = opts.status || 200; - const headers = new Headers(opts.headers); - - if (body != null && !headers.has("Content-Type")) { - const contentType = extractContentType(body); - if (contentType) { - headers.append("Content-Type", contentType); - } - } - this[INTERNALS$1] = { - url: opts.url, - status, - statusText: opts.statusText || STATUS_CODES[status], - headers, - counter: opts.counter, - }; - } + function TreeInterpreter(runtime) { + this.runtime = runtime; + } - get url() { - return this[INTERNALS$1].url || ""; - } + TreeInterpreter.prototype = { + search: function(node, value) { + return this.visit(node, value); + }, + + visit: function(node, value) { + var matched, current, result, first, second, field, left, right, collected, i; + switch (node.type) { + case "Field": + if (value === null ) { + return null; + } else if (isObject(value)) { + field = value[node.name]; + if (field === undefined) { + return null; + } else { + return field; + } + } else { + return null; + } + break; + case "Subexpression": + result = this.visit(node.children[0], value); + for (i = 1; i < node.children.length; i++) { + result = this.visit(node.children[1], result); + if (result === null) { + return null; + } + } + return result; + case "IndexExpression": + left = this.visit(node.children[0], value); + right = this.visit(node.children[1], left); + return right; + case "Index": + if (!isArray(value)) { + return null; + } + var index = node.value; + if (index < 0) { + index = value.length + index; + } + result = value[index]; + if (result === undefined) { + result = null; + } + return result; + case "Slice": + if (!isArray(value)) { + return null; + } + var sliceParams = node.children.slice(0); + var computed = this.computeSliceParams(value.length, sliceParams); + var start = computed[0]; + var stop = computed[1]; + var step = computed[2]; + result = []; + if (step > 0) { + for (i = start; i < stop; i += step) { + result.push(value[i]); + } + } else { + for (i = start; i > stop; i += step) { + result.push(value[i]); + } + } + return result; + case "Projection": + // Evaluate left child. + var base = this.visit(node.children[0], value); + if (!isArray(base)) { + return null; + } + collected = []; + for (i = 0; i < base.length; i++) { + current = this.visit(node.children[1], base[i]); + if (current !== null) { + collected.push(current); + } + } + return collected; + case "ValueProjection": + // Evaluate left child. + base = this.visit(node.children[0], value); + if (!isObject(base)) { + return null; + } + collected = []; + var values = objValues(base); + for (i = 0; i < values.length; i++) { + current = this.visit(node.children[1], values[i]); + if (current !== null) { + collected.push(current); + } + } + return collected; + case "FilterProjection": + base = this.visit(node.children[0], value); + if (!isArray(base)) { + return null; + } + var filtered = []; + var finalResults = []; + for (i = 0; i < base.length; i++) { + matched = this.visit(node.children[2], base[i]); + if (!isFalse(matched)) { + filtered.push(base[i]); + } + } + for (var j = 0; j < filtered.length; j++) { + current = this.visit(node.children[1], filtered[j]); + if (current !== null) { + finalResults.push(current); + } + } + return finalResults; + case "Comparator": + first = this.visit(node.children[0], value); + second = this.visit(node.children[1], value); + switch(node.name) { + case TOK_EQ: + result = strictDeepEqual(first, second); + break; + case TOK_NE: + result = !strictDeepEqual(first, second); + break; + case TOK_GT: + result = first > second; + break; + case TOK_GTE: + result = first >= second; + break; + case TOK_LT: + result = first < second; + break; + case TOK_LTE: + result = first <= second; + break; + default: + throw new Error("Unknown comparator: " + node.name); + } + return result; + case TOK_FLATTEN: + var original = this.visit(node.children[0], value); + if (!isArray(original)) { + return null; + } + var merged = []; + for (i = 0; i < original.length; i++) { + current = original[i]; + if (isArray(current)) { + merged.push.apply(merged, current); + } else { + merged.push(current); + } + } + return merged; + case "Identity": + return value; + case "MultiSelectList": + if (value === null) { + return null; + } + collected = []; + for (i = 0; i < node.children.length; i++) { + collected.push(this.visit(node.children[i], value)); + } + return collected; + case "MultiSelectHash": + if (value === null) { + return null; + } + collected = {}; + var child; + for (i = 0; i < node.children.length; i++) { + child = node.children[i]; + collected[child.name] = this.visit(child.value, value); + } + return collected; + case "OrExpression": + matched = this.visit(node.children[0], value); + if (isFalse(matched)) { + matched = this.visit(node.children[1], value); + } + return matched; + case "AndExpression": + first = this.visit(node.children[0], value); - get status() { - return this[INTERNALS$1].status; + if (isFalse(first) === true) { + return first; + } + return this.visit(node.children[1], value); + case "NotExpression": + first = this.visit(node.children[0], value); + return isFalse(first); + case "Literal": + return node.value; + case TOK_PIPE: + left = this.visit(node.children[0], value); + return this.visit(node.children[1], left); + case TOK_CURRENT: + return value; + case "Function": + var resolvedArgs = []; + for (i = 0; i < node.children.length; i++) { + resolvedArgs.push(this.visit(node.children[i], value)); + } + return this.runtime.callFunction(node.name, resolvedArgs); + case "ExpressionReference": + var refNode = node.children[0]; + // Tag the node with a specific attribute so the type + // checker verify the type. + refNode.jmespathType = TOK_EXPREF; + return refNode; + default: + throw new Error("Unknown node type: " + node.type); + } + }, + + computeSliceParams: function(arrayLength, sliceParams) { + var start = sliceParams[0]; + var stop = sliceParams[1]; + var step = sliceParams[2]; + var computed = [null, null, null]; + if (step === null) { + step = 1; + } else if (step === 0) { + var error = new Error("Invalid slice, step cannot be 0"); + error.name = "RuntimeError"; + throw error; } + var stepValueNegative = step < 0 ? true : false; - /** - * Convenience property representing if the request ended normally - */ - get ok() { - return ( - this[INTERNALS$1].status >= 200 && this[INTERNALS$1].status < 300 - ); + if (start === null) { + start = stepValueNegative ? arrayLength - 1 : 0; + } else { + start = this.capSliceRange(arrayLength, start, step); } - get redirected() { - return this[INTERNALS$1].counter > 0; + if (stop === null) { + stop = stepValueNegative ? -1 : arrayLength; + } else { + stop = this.capSliceRange(arrayLength, stop, step); } + computed[0] = start; + computed[1] = stop; + computed[2] = step; + return computed; + }, - get statusText() { - return this[INTERNALS$1].statusText; + capSliceRange: function(arrayLength, actualValue, step) { + if (actualValue < 0) { + actualValue += arrayLength; + if (actualValue < 0) { + actualValue = step < 0 ? -1 : 0; + } + } else if (actualValue >= arrayLength) { + actualValue = step < 0 ? arrayLength - 1 : arrayLength; + } + return actualValue; + } + + }; + + function Runtime(interpreter) { + this._interpreter = interpreter; + this.functionTable = { + // name: [function, ] + // The can be: + // + // { + // args: [[type1, type2], [type1, type2]], + // variadic: true|false + // } + // + // Each arg in the arg list is a list of valid types + // (if the function is overloaded and supports multiple + // types. If the type is "any" then no type checking + // occurs on the argument. Variadic is optional + // and if not provided is assumed to be false. + abs: {_func: this._functionAbs, _signature: [{types: [TYPE_NUMBER]}]}, + avg: {_func: this._functionAvg, _signature: [{types: [TYPE_ARRAY_NUMBER]}]}, + ceil: {_func: this._functionCeil, _signature: [{types: [TYPE_NUMBER]}]}, + contains: { + _func: this._functionContains, + _signature: [{types: [TYPE_STRING, TYPE_ARRAY]}, + {types: [TYPE_ANY]}]}, + "ends_with": { + _func: this._functionEndsWith, + _signature: [{types: [TYPE_STRING]}, {types: [TYPE_STRING]}]}, + floor: {_func: this._functionFloor, _signature: [{types: [TYPE_NUMBER]}]}, + length: { + _func: this._functionLength, + _signature: [{types: [TYPE_STRING, TYPE_ARRAY, TYPE_OBJECT]}]}, + map: { + _func: this._functionMap, + _signature: [{types: [TYPE_EXPREF]}, {types: [TYPE_ARRAY]}]}, + max: { + _func: this._functionMax, + _signature: [{types: [TYPE_ARRAY_NUMBER, TYPE_ARRAY_STRING]}]}, + "merge": { + _func: this._functionMerge, + _signature: [{types: [TYPE_OBJECT], variadic: true}] + }, + "max_by": { + _func: this._functionMaxBy, + _signature: [{types: [TYPE_ARRAY]}, {types: [TYPE_EXPREF]}] + }, + sum: {_func: this._functionSum, _signature: [{types: [TYPE_ARRAY_NUMBER]}]}, + "starts_with": { + _func: this._functionStartsWith, + _signature: [{types: [TYPE_STRING]}, {types: [TYPE_STRING]}]}, + min: { + _func: this._functionMin, + _signature: [{types: [TYPE_ARRAY_NUMBER, TYPE_ARRAY_STRING]}]}, + "min_by": { + _func: this._functionMinBy, + _signature: [{types: [TYPE_ARRAY]}, {types: [TYPE_EXPREF]}] + }, + type: {_func: this._functionType, _signature: [{types: [TYPE_ANY]}]}, + keys: {_func: this._functionKeys, _signature: [{types: [TYPE_OBJECT]}]}, + values: {_func: this._functionValues, _signature: [{types: [TYPE_OBJECT]}]}, + sort: {_func: this._functionSort, _signature: [{types: [TYPE_ARRAY_STRING, TYPE_ARRAY_NUMBER]}]}, + "sort_by": { + _func: this._functionSortBy, + _signature: [{types: [TYPE_ARRAY]}, {types: [TYPE_EXPREF]}] + }, + join: { + _func: this._functionJoin, + _signature: [ + {types: [TYPE_STRING]}, + {types: [TYPE_ARRAY_STRING]} + ] + }, + reverse: { + _func: this._functionReverse, + _signature: [{types: [TYPE_STRING, TYPE_ARRAY]}]}, + "to_array": {_func: this._functionToArray, _signature: [{types: [TYPE_ANY]}]}, + "to_string": {_func: this._functionToString, _signature: [{types: [TYPE_ANY]}]}, + "to_number": {_func: this._functionToNumber, _signature: [{types: [TYPE_ANY]}]}, + "not_null": { + _func: this._functionNotNull, + _signature: [{types: [TYPE_ANY], variadic: true}] + } + }; + } + + Runtime.prototype = { + callFunction: function(name, resolvedArgs) { + var functionEntry = this.functionTable[name]; + if (functionEntry === undefined) { + throw new Error("Unknown function: " + name + "()"); + } + this._validateArgs(name, resolvedArgs, functionEntry._signature); + return functionEntry._func.call(this, resolvedArgs); + }, + + _validateArgs: function(name, args, signature) { + // Validating the args requires validating + // the correct arity and the correct type of each arg. + // If the last argument is declared as variadic, then we need + // a minimum number of args to be required. Otherwise it has to + // be an exact amount. + var pluralized; + if (signature[signature.length - 1].variadic) { + if (args.length < signature.length) { + pluralized = signature.length === 1 ? " argument" : " arguments"; + throw new Error("ArgumentError: " + name + "() " + + "takes at least" + signature.length + pluralized + + " but received " + args.length); + } + } else if (args.length !== signature.length) { + pluralized = signature.length === 1 ? " argument" : " arguments"; + throw new Error("ArgumentError: " + name + "() " + + "takes " + signature.length + pluralized + + " but received " + args.length); + } + var currentSpec; + var actualType; + var typeMatched; + for (var i = 0; i < signature.length; i++) { + typeMatched = false; + currentSpec = signature[i].types; + actualType = this._getTypeName(args[i]); + for (var j = 0; j < currentSpec.length; j++) { + if (this._typeMatches(actualType, currentSpec[j], args[i])) { + typeMatched = true; + break; + } + } + if (!typeMatched) { + throw new Error("TypeError: " + name + "() " + + "expected argument " + (i + 1) + + " to be type " + currentSpec + + " but received type " + actualType + + " instead."); + } } + }, - get headers() { - return this[INTERNALS$1].headers; + _typeMatches: function(actual, expected, argValue) { + if (expected === TYPE_ANY) { + return true; } - - /** - * Clone this response - * - * @return Response - */ - clone() { - return new Response(clone(this), { - url: this.url, - status: this.status, - statusText: this.statusText, - headers: this.headers, - ok: this.ok, - redirected: this.redirected, - }); + if (expected === TYPE_ARRAY_STRING || + expected === TYPE_ARRAY_NUMBER || + expected === TYPE_ARRAY) { + // The expected type can either just be array, + // or it can require a specific subtype (array of numbers). + // + // The simplest case is if "array" with no subtype is specified. + if (expected === TYPE_ARRAY) { + return actual === TYPE_ARRAY; + } else if (actual === TYPE_ARRAY) { + // Otherwise we need to check subtypes. + // I think this has potential to be improved. + var subtype; + if (expected === TYPE_ARRAY_NUMBER) { + subtype = TYPE_NUMBER; + } else if (expected === TYPE_ARRAY_STRING) { + subtype = TYPE_STRING; + } + for (var i = 0; i < argValue.length; i++) { + if (!this._typeMatches( + this._getTypeName(argValue[i]), subtype, + argValue[i])) { + return false; + } + } + return true; + } + } else { + return actual === expected; + } + }, + _getTypeName: function(obj) { + switch (Object.prototype.toString.call(obj)) { + case "[object String]": + return TYPE_STRING; + case "[object Number]": + return TYPE_NUMBER; + case "[object Array]": + return TYPE_ARRAY; + case "[object Boolean]": + return TYPE_BOOLEAN; + case "[object Null]": + return TYPE_NULL; + case "[object Object]": + // Check if it's an expref. If it has, it's been + // tagged with a jmespathType attr of 'Expref'; + if (obj.jmespathType === TOK_EXPREF) { + return TYPE_EXPREF; + } else { + return TYPE_OBJECT; + } } - } - - Body.mixIn(Response.prototype); + }, - Object.defineProperties(Response.prototype, { - url: { enumerable: true }, - status: { enumerable: true }, - ok: { enumerable: true }, - redirected: { enumerable: true }, - statusText: { enumerable: true }, - headers: { enumerable: true }, - clone: { enumerable: true }, - }); + _functionStartsWith: function(resolvedArgs) { + return resolvedArgs[0].lastIndexOf(resolvedArgs[1]) === 0; + }, - Object.defineProperty(Response.prototype, Symbol.toStringTag, { - value: "Response", - writable: false, - enumerable: false, - configurable: true, - }); + _functionEndsWith: function(resolvedArgs) { + var searchStr = resolvedArgs[0]; + var suffix = resolvedArgs[1]; + return searchStr.indexOf(suffix, searchStr.length - suffix.length) !== -1; + }, - const INTERNALS$2 = Symbol("Request internals"); - const URL = Url.URL || whatwgUrl.URL; - - // fix an issue where "format", "parse" aren't a named export for node <10 - const parse_url = Url.parse; - const format_url = Url.format; - - /** - * Wrapper around `new URL` to handle arbitrary URLs - * - * @param {string} urlStr - * @return {void} - */ - function parseURL(urlStr) { - /* - Check whether the URL is absolute or not - Scheme: https://tools.ietf.org/html/rfc3986#section-3.1 - Absolute URL: https://tools.ietf.org/html/rfc3986#section-4.3 - */ - if (/^[a-zA-Z][a-zA-Z\d+\-.]*:/.exec(urlStr)) { - urlStr = new URL(urlStr).toString(); + _functionReverse: function(resolvedArgs) { + var typeName = this._getTypeName(resolvedArgs[0]); + if (typeName === TYPE_STRING) { + var originalStr = resolvedArgs[0]; + var reversedStr = ""; + for (var i = originalStr.length - 1; i >= 0; i--) { + reversedStr += originalStr[i]; + } + return reversedStr; + } else { + var reversedArray = resolvedArgs[0].slice(0); + reversedArray.reverse(); + return reversedArray; } + }, - // Fallback to old implementation for arbitrary URLs - return parse_url(urlStr); - } - - const streamDestructionSupported = "destroy" in Stream.Readable.prototype; - - /** - * Check if a value is an instance of Request. - * - * @param Mixed input - * @return Boolean - */ - function isRequest(input) { - return ( - typeof input === "object" && typeof input[INTERNALS$2] === "object" - ); - } + _functionAbs: function(resolvedArgs) { + return Math.abs(resolvedArgs[0]); + }, - function isAbortSignal(signal) { - const proto = - signal && typeof signal === "object" && Object.getPrototypeOf(signal); - return !!(proto && proto.constructor.name === "AbortSignal"); - } + _functionCeil: function(resolvedArgs) { + return Math.ceil(resolvedArgs[0]); + }, - /** - * Request class - * - * @param Mixed input Url or Request instance - * @param Object init Custom options - * @return Void - */ - class Request { - constructor(input) { - let init = - arguments.length > 1 && arguments[1] !== undefined - ? arguments[1] - : {}; - - let parsedURL; - - // normalize input - if (!isRequest(input)) { - if (input && input.href) { - // in order to support Node.js' Url objects; though WHATWG's URL objects - // will fall into this branch also (since their `toString()` will return - // `href` property anyway) - parsedURL = parseURL(input.href); - } else { - // coerce input to a string before attempting to parse - parsedURL = parseURL(`${input}`); - } - input = {}; - } else { - parsedURL = parseURL(input.url); - } + _functionAvg: function(resolvedArgs) { + var sum = 0; + var inputArray = resolvedArgs[0]; + for (var i = 0; i < inputArray.length; i++) { + sum += inputArray[i]; + } + return sum / inputArray.length; + }, - let method = init.method || input.method || "GET"; - method = method.toUpperCase(); + _functionContains: function(resolvedArgs) { + return resolvedArgs[0].indexOf(resolvedArgs[1]) >= 0; + }, - if ( - (init.body != null || (isRequest(input) && input.body !== null)) && - (method === "GET" || method === "HEAD") - ) { - throw new TypeError( - "Request with GET/HEAD method cannot have body" - ); - } + _functionFloor: function(resolvedArgs) { + return Math.floor(resolvedArgs[0]); + }, - let inputBody = - init.body != null - ? init.body - : isRequest(input) && input.body !== null - ? clone(input) - : null; + _functionLength: function(resolvedArgs) { + if (!isObject(resolvedArgs[0])) { + return resolvedArgs[0].length; + } else { + // As far as I can tell, there's no way to get the length + // of an object without O(n) iteration through the object. + return Object.keys(resolvedArgs[0]).length; + } + }, - Body.call(this, inputBody, { - timeout: init.timeout || input.timeout || 0, - size: init.size || input.size || 0, - }); + _functionMap: function(resolvedArgs) { + var mapped = []; + var interpreter = this._interpreter; + var exprefNode = resolvedArgs[0]; + var elements = resolvedArgs[1]; + for (var i = 0; i < elements.length; i++) { + mapped.push(interpreter.visit(exprefNode, elements[i])); + } + return mapped; + }, - const headers = new Headers(init.headers || input.headers || {}); + _functionMerge: function(resolvedArgs) { + var merged = {}; + for (var i = 0; i < resolvedArgs.length; i++) { + var current = resolvedArgs[i]; + for (var key in current) { + merged[key] = current[key]; + } + } + return merged; + }, - if (inputBody != null && !headers.has("Content-Type")) { - const contentType = extractContentType(inputBody); - if (contentType) { - headers.append("Content-Type", contentType); - } + _functionMax: function(resolvedArgs) { + if (resolvedArgs[0].length > 0) { + var typeName = this._getTypeName(resolvedArgs[0][0]); + if (typeName === TYPE_NUMBER) { + return Math.max.apply(Math, resolvedArgs[0]); + } else { + var elements = resolvedArgs[0]; + var maxElement = elements[0]; + for (var i = 1; i < elements.length; i++) { + if (maxElement.localeCompare(elements[i]) < 0) { + maxElement = elements[i]; + } } + return maxElement; + } + } else { + return null; + } + }, - let signal = isRequest(input) ? input.signal : null; - if ("signal" in init) signal = init.signal; - - if (signal != null && !isAbortSignal(signal)) { - throw new TypeError( - "Expected signal to be an instanceof AbortSignal" - ); + _functionMin: function(resolvedArgs) { + if (resolvedArgs[0].length > 0) { + var typeName = this._getTypeName(resolvedArgs[0][0]); + if (typeName === TYPE_NUMBER) { + return Math.min.apply(Math, resolvedArgs[0]); + } else { + var elements = resolvedArgs[0]; + var minElement = elements[0]; + for (var i = 1; i < elements.length; i++) { + if (elements[i].localeCompare(minElement) < 0) { + minElement = elements[i]; + } } + return minElement; + } + } else { + return null; + } + }, - this[INTERNALS$2] = { - method, - redirect: init.redirect || input.redirect || "follow", - headers, - parsedURL, - signal, - }; + _functionSum: function(resolvedArgs) { + var sum = 0; + var listToSum = resolvedArgs[0]; + for (var i = 0; i < listToSum.length; i++) { + sum += listToSum[i]; + } + return sum; + }, - // node-fetch-only options - this.follow = - init.follow !== undefined - ? init.follow - : input.follow !== undefined - ? input.follow - : 20; - this.compress = - init.compress !== undefined - ? init.compress - : input.compress !== undefined - ? input.compress - : true; - this.counter = init.counter || input.counter || 0; - this.agent = init.agent || input.agent; + _functionType: function(resolvedArgs) { + switch (this._getTypeName(resolvedArgs[0])) { + case TYPE_NUMBER: + return "number"; + case TYPE_STRING: + return "string"; + case TYPE_ARRAY: + return "array"; + case TYPE_OBJECT: + return "object"; + case TYPE_BOOLEAN: + return "boolean"; + case TYPE_EXPREF: + return "expref"; + case TYPE_NULL: + return "null"; } + }, - get method() { - return this[INTERNALS$2].method; - } + _functionKeys: function(resolvedArgs) { + return Object.keys(resolvedArgs[0]); + }, - get url() { - return format_url(this[INTERNALS$2].parsedURL); + _functionValues: function(resolvedArgs) { + var obj = resolvedArgs[0]; + var keys = Object.keys(obj); + var values = []; + for (var i = 0; i < keys.length; i++) { + values.push(obj[keys[i]]); } + return values; + }, - get headers() { - return this[INTERNALS$2].headers; - } + _functionJoin: function(resolvedArgs) { + var joinChar = resolvedArgs[0]; + var listJoin = resolvedArgs[1]; + return listJoin.join(joinChar); + }, - get redirect() { - return this[INTERNALS$2].redirect; + _functionToArray: function(resolvedArgs) { + if (this._getTypeName(resolvedArgs[0]) === TYPE_ARRAY) { + return resolvedArgs[0]; + } else { + return [resolvedArgs[0]]; } + }, - get signal() { - return this[INTERNALS$2].signal; + _functionToString: function(resolvedArgs) { + if (this._getTypeName(resolvedArgs[0]) === TYPE_STRING) { + return resolvedArgs[0]; + } else { + return JSON.stringify(resolvedArgs[0]); } + }, - /** - * Clone this request - * - * @return Request - */ - clone() { - return new Request(this); + _functionToNumber: function(resolvedArgs) { + var typeName = this._getTypeName(resolvedArgs[0]); + var convertedValue; + if (typeName === TYPE_NUMBER) { + return resolvedArgs[0]; + } else if (typeName === TYPE_STRING) { + convertedValue = +resolvedArgs[0]; + if (!isNaN(convertedValue)) { + return convertedValue; + } } - } + return null; + }, - Body.mixIn(Request.prototype); + _functionNotNull: function(resolvedArgs) { + for (var i = 0; i < resolvedArgs.length; i++) { + if (this._getTypeName(resolvedArgs[i]) !== TYPE_NULL) { + return resolvedArgs[i]; + } + } + return null; + }, - Object.defineProperty(Request.prototype, Symbol.toStringTag, { - value: "Request", - writable: false, - enumerable: false, - configurable: true, - }); + _functionSort: function(resolvedArgs) { + var sortedArray = resolvedArgs[0].slice(0); + sortedArray.sort(); + return sortedArray; + }, - Object.defineProperties(Request.prototype, { - method: { enumerable: true }, - url: { enumerable: true }, - headers: { enumerable: true }, - redirect: { enumerable: true }, - clone: { enumerable: true }, - signal: { enumerable: true }, - }); + _functionSortBy: function(resolvedArgs) { + var sortedArray = resolvedArgs[0].slice(0); + if (sortedArray.length === 0) { + return sortedArray; + } + var interpreter = this._interpreter; + var exprefNode = resolvedArgs[1]; + var requiredType = this._getTypeName( + interpreter.visit(exprefNode, sortedArray[0])); + if ([TYPE_NUMBER, TYPE_STRING].indexOf(requiredType) < 0) { + throw new Error("TypeError"); + } + var that = this; + // In order to get a stable sort out of an unstable + // sort algorithm, we decorate/sort/undecorate (DSU) + // by creating a new list of [index, element] pairs. + // In the cmp function, if the evaluated elements are + // equal, then the index will be used as the tiebreaker. + // After the decorated list has been sorted, it will be + // undecorated to extract the original elements. + var decorated = []; + for (var i = 0; i < sortedArray.length; i++) { + decorated.push([i, sortedArray[i]]); + } + decorated.sort(function(a, b) { + var exprA = interpreter.visit(exprefNode, a[1]); + var exprB = interpreter.visit(exprefNode, b[1]); + if (that._getTypeName(exprA) !== requiredType) { + throw new Error( + "TypeError: expected " + requiredType + ", received " + + that._getTypeName(exprA)); + } else if (that._getTypeName(exprB) !== requiredType) { + throw new Error( + "TypeError: expected " + requiredType + ", received " + + that._getTypeName(exprB)); + } + if (exprA > exprB) { + return 1; + } else if (exprA < exprB) { + return -1; + } else { + // If they're equal compare the items by their + // order to maintain relative order of equal keys + // (i.e. to get a stable sort). + return a[0] - b[0]; + } + }); + // Undecorate: extract out the original list elements. + for (var j = 0; j < decorated.length; j++) { + sortedArray[j] = decorated[j][1]; + } + return sortedArray; + }, + + _functionMaxBy: function(resolvedArgs) { + var exprefNode = resolvedArgs[1]; + var resolvedArray = resolvedArgs[0]; + var keyFunction = this.createKeyFunction(exprefNode, [TYPE_NUMBER, TYPE_STRING]); + var maxNumber = -Infinity; + var maxRecord; + var current; + for (var i = 0; i < resolvedArray.length; i++) { + current = keyFunction(resolvedArray[i]); + if (current > maxNumber) { + maxNumber = current; + maxRecord = resolvedArray[i]; + } + } + return maxRecord; + }, + + _functionMinBy: function(resolvedArgs) { + var exprefNode = resolvedArgs[1]; + var resolvedArray = resolvedArgs[0]; + var keyFunction = this.createKeyFunction(exprefNode, [TYPE_NUMBER, TYPE_STRING]); + var minNumber = Infinity; + var minRecord; + var current; + for (var i = 0; i < resolvedArray.length; i++) { + current = keyFunction(resolvedArray[i]); + if (current < minNumber) { + minNumber = current; + minRecord = resolvedArray[i]; + } + } + return minRecord; + }, + + createKeyFunction: function(exprefNode, allowedTypes) { + var that = this; + var interpreter = this._interpreter; + var keyFunc = function(x) { + var current = interpreter.visit(exprefNode, x); + if (allowedTypes.indexOf(that._getTypeName(current)) < 0) { + var msg = "TypeError: expected one of " + allowedTypes + + ", received " + that._getTypeName(current); + throw new Error(msg); + } + return current; + }; + return keyFunc; + } + + }; + + function compile(stream) { + var parser = new Parser(); + var ast = parser.parse(stream); + return ast; + } + + function tokenize(stream) { + var lexer = new Lexer(); + return lexer.tokenize(stream); + } + + function search(data, expression) { + var parser = new Parser(); + // This needs to be improved. Both the interpreter and runtime depend on + // each other. The runtime needs the interpreter to support exprefs. + // There's likely a clean way to avoid the cyclic dependency. + var runtime = new Runtime(); + var interpreter = new TreeInterpreter(runtime); + runtime._interpreter = interpreter; + var node = parser.parse(expression); + return interpreter.search(node, data); + } + + exports.tokenize = tokenize; + exports.compile = compile; + exports.search = search; + exports.strictDeepEqual = strictDeepEqual; +})( false ? 0 : exports); + + +/***/ }), + +/***/ 99197: +/***/ ((module) => { + +/** + * lodash (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright jQuery Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ - /** - * Convert a Request to Node.js http request options. - * - * @param Request A Request instance - * @return Object The options object to be passed to http.request - */ - function getNodeRequestOptions(request) { - const parsedURL = request[INTERNALS$2].parsedURL; - const headers = new Headers(request[INTERNALS$2].headers); +/** Used as the `TypeError` message for "Functions" methods. */ +var FUNC_ERROR_TEXT = 'Expected a function'; - // fetch step 1.3 - if (!headers.has("Accept")) { - headers.set("Accept", "*/*"); - } +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; - // Basic fetch - if (!parsedURL.protocol || !parsedURL.hostname) { - throw new TypeError("Only absolute URLs are supported"); - } +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; - if (!/^https?:$/.test(parsedURL.protocol)) { - throw new TypeError("Only HTTP(S) protocols are supported"); - } +/** `Object#toString` result references. */ +var funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + symbolTag = '[object Symbol]'; - if ( - request.signal && - request.body instanceof Stream.Readable && - !streamDestructionSupported - ) { - throw new Error( - "Cancellation of streamed requests with AbortSignal is not supported in node < 8" - ); - } +/** Used to match property names within property paths. */ +var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/, + reLeadingDot = /^\./, + rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; - // HTTP-network-or-cache fetch steps 2.4-2.7 - let contentLengthValue = null; - if (request.body == null && /^(POST|PUT)$/i.test(request.method)) { - contentLengthValue = "0"; - } - if (request.body != null) { - const totalBytes = getTotalBytes(request); - if (typeof totalBytes === "number") { - contentLengthValue = String(totalBytes); - } - } - if (contentLengthValue) { - headers.set("Content-Length", contentLengthValue); - } +/** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ +var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; - // HTTP-network-or-cache fetch step 2.11 - if (!headers.has("User-Agent")) { - headers.set( - "User-Agent", - "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)" - ); - } +/** Used to match backslashes in property paths. */ +var reEscapeChar = /\\(\\)?/g; - // HTTP-network-or-cache fetch step 2.15 - if (request.compress && !headers.has("Accept-Encoding")) { - headers.set("Accept-Encoding", "gzip,deflate"); - } +/** Used to detect host constructors (Safari). */ +var reIsHostCtor = /^\[object .+?Constructor\]$/; - let agent = request.agent; - if (typeof agent === "function") { - agent = agent(parsedURL); - } +/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; - if (!headers.has("Connection") && !agent) { - headers.set("Connection", "close"); - } +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; - // HTTP-network fetch step 4.2 - // chunked encoding is handled by Node.js +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); - return Object.assign({}, parsedURL, { - method: request.method, - headers: exportNodeCompatibleHeaders(headers), - agent, - }); - } +/** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ +function getValue(object, key) { + return object == null ? undefined : object[key]; +} + +/** + * Checks if `value` is a host object in IE < 9. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a host object, else `false`. + */ +function isHostObject(value) { + // Many host objects are `Object` objects that can coerce to strings + // despite having improperly defined `toString` methods. + var result = false; + if (value != null && typeof value.toString != 'function') { + try { + result = !!(value + ''); + } catch (e) {} + } + return result; +} + +/** Used for built-in method references. */ +var arrayProto = Array.prototype, + funcProto = Function.prototype, + objectProto = Object.prototype; + +/** Used to detect overreaching core-js shims. */ +var coreJsData = root['__core-js_shared__']; + +/** Used to detect methods masquerading as native. */ +var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; +}()); + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var objectToString = objectProto.toString; + +/** Used to detect if a method is native. */ +var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' +); + +/** Built-in value references. */ +var Symbol = root.Symbol, + splice = arrayProto.splice; + +/* Built-in method references that are verified to be native. */ +var Map = getNative(root, 'Map'), + nativeCreate = getNative(Object, 'create'); + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + +/** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Hash(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ +function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; +} + +/** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function hashDelete(key) { + return this.has(key) && delete this.__data__[key]; +} + +/** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + return hasOwnProperty.call(data, key) ? data[key] : undefined; +} + +/** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function hashHas(key) { + var data = this.__data__; + return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); +} + +/** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ +function hashSet(key, value) { + var data = this.__data__; + data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + return this; +} + +// Add methods to `Hash`. +Hash.prototype.clear = hashClear; +Hash.prototype['delete'] = hashDelete; +Hash.prototype.get = hashGet; +Hash.prototype.has = hashHas; +Hash.prototype.set = hashSet; + +/** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function ListCache(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ +function listCacheClear() { + this.__data__ = []; +} + +/** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + return true; +} + +/** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + return index < 0 ? undefined : data[index][1]; +} + +/** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; +} + +/** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ +function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; +} + +// Add methods to `ListCache`. +ListCache.prototype.clear = listCacheClear; +ListCache.prototype['delete'] = listCacheDelete; +ListCache.prototype.get = listCacheGet; +ListCache.prototype.has = listCacheHas; +ListCache.prototype.set = listCacheSet; + +/** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function MapCache(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ +function mapCacheClear() { + this.__data__ = { + 'hash': new Hash, + 'map': new (Map || ListCache), + 'string': new Hash + }; +} + +/** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function mapCacheDelete(key) { + return getMapData(this, key)['delete'](key); +} + +/** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function mapCacheGet(key) { + return getMapData(this, key).get(key); +} + +/** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function mapCacheHas(key) { + return getMapData(this, key).has(key); +} + +/** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ +function mapCacheSet(key, value) { + getMapData(this, key).set(key, value); + return this; +} + +// Add methods to `MapCache`. +MapCache.prototype.clear = mapCacheClear; +MapCache.prototype['delete'] = mapCacheDelete; +MapCache.prototype.get = mapCacheGet; +MapCache.prototype.has = mapCacheHas; +MapCache.prototype.set = mapCacheSet; + +/** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; +} + +/** + * The base implementation of `_.get` without support for default values. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @returns {*} Returns the resolved value. + */ +function baseGet(object, path) { + path = isKey(path, object) ? [path] : castPath(path); + + var index = 0, + length = path.length; + + while (object != null && index < length) { + object = object[toKey(path[index++])]; + } + return (index && index == length) ? object : undefined; +} + +/** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ +function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); +} + +/** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ +function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +/** + * Casts `value` to a path array if it's not one. + * + * @private + * @param {*} value The value to inspect. + * @returns {Array} Returns the cast property path array. + */ +function castPath(value) { + return isArray(value) ? value : stringToPath(value); +} + +/** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ +function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; +} + +/** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ +function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; +} + +/** + * Checks if `value` is a property name and not a property path. + * + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + */ +function isKey(value, object) { + if (isArray(value)) { + return false; + } + var type = typeof value; + if (type == 'number' || type == 'symbol' || type == 'boolean' || + value == null || isSymbol(value)) { + return true; + } + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || + (object != null && value in Object(object)); +} + +/** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ +function isKeyable(value) { + var type = typeof value; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); +} + +/** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ +function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); +} + +/** + * Converts `string` to a property path array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the property path array. + */ +var stringToPath = memoize(function(string) { + string = toString(string); + + var result = []; + if (reLeadingDot.test(string)) { + result.push(''); + } + string.replace(rePropName, function(match, number, quote, string) { + result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match)); + }); + return result; +}); + +/** + * Converts `value` to a string key if it's not a string or symbol. + * + * @private + * @param {*} value The value to inspect. + * @returns {string|symbol} Returns the key. + */ +function toKey(value) { + if (typeof value == 'string' || isSymbol(value)) { + return value; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +/** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to process. + * @returns {string} Returns the source code. + */ +function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} + } + return ''; +} + +/** + * Creates a function that memoizes the result of `func`. If `resolver` is + * provided, it determines the cache key for storing the result based on the + * arguments provided to the memoized function. By default, the first argument + * provided to the memoized function is used as the map cache key. The `func` + * is invoked with the `this` binding of the memoized function. + * + * **Note:** The cache is exposed as the `cache` property on the memoized + * function. Its creation may be customized by replacing the `_.memoize.Cache` + * constructor with one whose instances implement the + * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) + * method interface of `delete`, `get`, `has`, and `set`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to have its output memoized. + * @param {Function} [resolver] The function to resolve the cache key. + * @returns {Function} Returns the new memoized function. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * var other = { 'c': 3, 'd': 4 }; + * + * var values = _.memoize(_.values); + * values(object); + * // => [1, 2] + * + * values(other); + * // => [3, 4] + * + * object.a = 2; + * values(object); + * // => [1, 2] + * + * // Modify the result cache. + * values.cache.set(object, ['a', 'b']); + * values(object); + * // => ['a', 'b'] + * + * // Replace `_.memoize.Cache`. + * _.memoize.Cache = WeakMap; + */ +function memoize(func, resolver) { + if (typeof func != 'function' || (resolver && typeof resolver != 'function')) { + throw new TypeError(FUNC_ERROR_TEXT); + } + var memoized = function() { + var args = arguments, + key = resolver ? resolver.apply(this, args) : args[0], + cache = memoized.cache; + + if (cache.has(key)) { + return cache.get(key); + } + var result = func.apply(this, args); + memoized.cache = cache.set(key, result); + return result; + }; + memoized.cache = new (memoize.Cache || MapCache); + return memoized; +} + +// Assign cache to `_.memoize`. +memoize.Cache = MapCache; + +/** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ +function eq(value, other) { + return value === other || (value !== value && other !== other); +} + +/** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ +var isArray = Array.isArray; + +/** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ +function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 8-9 which returns 'object' for typed array and other constructors. + var tag = isObject(value) ? objectToString.call(value) : ''; + return tag == funcTag || tag == genTag; +} + +/** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ +function isObject(value) { + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); +} + +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +/** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ +function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && objectToString.call(value) == symbolTag); +} + +/** + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {string} Returns the string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' + */ +function toString(value) { + return value == null ? '' : baseToString(value); +} + +/** + * Gets the value at `path` of `object`. If the resolved value is + * `undefined`, the `defaultValue` is returned in its place. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.get(object, 'a[0].b.c'); + * // => 3 + * + * _.get(object, ['a', '0', 'b', 'c']); + * // => 3 + * + * _.get(object, 'a.b.c', 'default'); + * // => 'default' + */ +function get(object, path, defaultValue) { + var result = object == null ? undefined : baseGet(object, path); + return result === undefined ? defaultValue : result; +} - /** - * abort-error.js - * - * AbortError interface for cancelled requests - */ - - /** - * Create AbortError instance - * - * @param String message Error message for human - * @return AbortError - */ - function AbortError(message) { - Error.call(this, message); - - this.type = "aborted"; - this.message = message; +module.exports = get; - // hide custom error implementation details from end-users - Error.captureStackTrace(this, this.constructor); - } - AbortError.prototype = Object.create(Error.prototype); - AbortError.prototype.constructor = AbortError; - AbortError.prototype.name = "AbortError"; +/***/ }), - const URL$1 = Url.URL || whatwgUrl.URL; +/***/ 51552: +/***/ ((module) => { - // fix an issue where "PassThrough", "resolve" aren't a named export for node <10 - const PassThrough$1 = Stream.PassThrough; +/** + * lodash (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright jQuery Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ - const isDomainOrSubdomain = function isDomainOrSubdomain( - destination, - original - ) { - const orig = new URL$1(original).hostname; - const dest = new URL$1(destination).hostname; +/** Used as the `TypeError` message for "Functions" methods. */ +var FUNC_ERROR_TEXT = 'Expected a function'; - return ( - orig === dest || - (orig[orig.length - dest.length - 1] === "." && orig.endsWith(dest)) - ); - }; +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; - /** - * Fetch function - * - * @param Mixed url Absolute url or Request instance - * @param Object opts Fetch options - * @return Promise - */ - function fetch(url, opts) { - // allow custom promise - if (!fetch.Promise) { - throw new Error( - "native promise missing, set fetch.Promise to your favorite alternative" - ); - } +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0, + MAX_SAFE_INTEGER = 9007199254740991; - Body.Promise = fetch.Promise; +/** `Object#toString` result references. */ +var funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + symbolTag = '[object Symbol]'; - // wrap http.request into fetch - return new fetch.Promise(function (resolve, reject) { - // build request object - const request = new Request(url, opts); - const options = getNodeRequestOptions(request); +/** Used to match property names within property paths. */ +var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/, + reLeadingDot = /^\./, + rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; - const send = (options.protocol === "https:" ? https : http).request; - const signal = request.signal; +/** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ +var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; - let response = null; +/** Used to match backslashes in property paths. */ +var reEscapeChar = /\\(\\)?/g; - const abort = function abort() { - let error = new AbortError("The user aborted a request."); - reject(error); - if (request.body && request.body instanceof Stream.Readable) { - request.body.destroy(error); - } - if (!response || !response.body) return; - response.body.emit("error", error); - }; +/** Used to detect host constructors (Safari). */ +var reIsHostCtor = /^\[object .+?Constructor\]$/; - if (signal && signal.aborted) { - abort(); - return; - } +/** Used to detect unsigned integer values. */ +var reIsUint = /^(?:0|[1-9]\d*)$/; - const abortAndFinalize = function abortAndFinalize() { - abort(); - finalize(); - }; +/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; - // send request - const req = send(options); - let reqTimeout; +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; - if (signal) { - signal.addEventListener("abort", abortAndFinalize); - } +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); - function finalize() { - req.abort(); - if (signal) signal.removeEventListener("abort", abortAndFinalize); - clearTimeout(reqTimeout); - } +/** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ +function getValue(object, key) { + return object == null ? undefined : object[key]; +} + +/** + * Checks if `value` is a host object in IE < 9. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a host object, else `false`. + */ +function isHostObject(value) { + // Many host objects are `Object` objects that can coerce to strings + // despite having improperly defined `toString` methods. + var result = false; + if (value != null && typeof value.toString != 'function') { + try { + result = !!(value + ''); + } catch (e) {} + } + return result; +} + +/** Used for built-in method references. */ +var arrayProto = Array.prototype, + funcProto = Function.prototype, + objectProto = Object.prototype; + +/** Used to detect overreaching core-js shims. */ +var coreJsData = root['__core-js_shared__']; + +/** Used to detect methods masquerading as native. */ +var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; +}()); + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var objectToString = objectProto.toString; + +/** Used to detect if a method is native. */ +var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' +); + +/** Built-in value references. */ +var Symbol = root.Symbol, + splice = arrayProto.splice; + +/* Built-in method references that are verified to be native. */ +var Map = getNative(root, 'Map'), + nativeCreate = getNative(Object, 'create'); + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + +/** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Hash(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ +function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; +} + +/** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function hashDelete(key) { + return this.has(key) && delete this.__data__[key]; +} + +/** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + return hasOwnProperty.call(data, key) ? data[key] : undefined; +} + +/** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function hashHas(key) { + var data = this.__data__; + return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); +} + +/** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ +function hashSet(key, value) { + var data = this.__data__; + data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + return this; +} + +// Add methods to `Hash`. +Hash.prototype.clear = hashClear; +Hash.prototype['delete'] = hashDelete; +Hash.prototype.get = hashGet; +Hash.prototype.has = hashHas; +Hash.prototype.set = hashSet; + +/** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function ListCache(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ +function listCacheClear() { + this.__data__ = []; +} + +/** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + return true; +} + +/** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + return index < 0 ? undefined : data[index][1]; +} + +/** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; +} + +/** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ +function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; +} + +// Add methods to `ListCache`. +ListCache.prototype.clear = listCacheClear; +ListCache.prototype['delete'] = listCacheDelete; +ListCache.prototype.get = listCacheGet; +ListCache.prototype.has = listCacheHas; +ListCache.prototype.set = listCacheSet; + +/** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function MapCache(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ +function mapCacheClear() { + this.__data__ = { + 'hash': new Hash, + 'map': new (Map || ListCache), + 'string': new Hash + }; +} + +/** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function mapCacheDelete(key) { + return getMapData(this, key)['delete'](key); +} + +/** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function mapCacheGet(key) { + return getMapData(this, key).get(key); +} + +/** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function mapCacheHas(key) { + return getMapData(this, key).has(key); +} + +/** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ +function mapCacheSet(key, value) { + getMapData(this, key).set(key, value); + return this; +} + +// Add methods to `MapCache`. +MapCache.prototype.clear = mapCacheClear; +MapCache.prototype['delete'] = mapCacheDelete; +MapCache.prototype.get = mapCacheGet; +MapCache.prototype.has = mapCacheHas; +MapCache.prototype.set = mapCacheSet; + +/** + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || + (value === undefined && !(key in object))) { + object[key] = value; + } +} + +/** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; +} + +/** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ +function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); +} + +/** + * The base implementation of `_.set`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ +function baseSet(object, path, value, customizer) { + if (!isObject(object)) { + return object; + } + path = isKey(path, object) ? [path] : castPath(path); + + var index = -1, + length = path.length, + lastIndex = length - 1, + nested = object; + + while (nested != null && ++index < length) { + var key = toKey(path[index]), + newValue = value; + + if (index != lastIndex) { + var objValue = nested[key]; + newValue = customizer ? customizer(objValue, key, nested) : undefined; + if (newValue === undefined) { + newValue = isObject(objValue) + ? objValue + : (isIndex(path[index + 1]) ? [] : {}); + } + } + assignValue(nested, key, newValue); + nested = nested[key]; + } + return object; +} + +/** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ +function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +/** + * Casts `value` to a path array if it's not one. + * + * @private + * @param {*} value The value to inspect. + * @returns {Array} Returns the cast property path array. + */ +function castPath(value) { + return isArray(value) ? value : stringToPath(value); +} + +/** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ +function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; +} + +/** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ +function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; +} + +/** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ +function isIndex(value, length) { + length = length == null ? MAX_SAFE_INTEGER : length; + return !!length && + (typeof value == 'number' || reIsUint.test(value)) && + (value > -1 && value % 1 == 0 && value < length); +} + +/** + * Checks if `value` is a property name and not a property path. + * + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + */ +function isKey(value, object) { + if (isArray(value)) { + return false; + } + var type = typeof value; + if (type == 'number' || type == 'symbol' || type == 'boolean' || + value == null || isSymbol(value)) { + return true; + } + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || + (object != null && value in Object(object)); +} + +/** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ +function isKeyable(value) { + var type = typeof value; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); +} + +/** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ +function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); +} + +/** + * Converts `string` to a property path array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the property path array. + */ +var stringToPath = memoize(function(string) { + string = toString(string); + + var result = []; + if (reLeadingDot.test(string)) { + result.push(''); + } + string.replace(rePropName, function(match, number, quote, string) { + result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match)); + }); + return result; +}); + +/** + * Converts `value` to a string key if it's not a string or symbol. + * + * @private + * @param {*} value The value to inspect. + * @returns {string|symbol} Returns the key. + */ +function toKey(value) { + if (typeof value == 'string' || isSymbol(value)) { + return value; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +/** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to process. + * @returns {string} Returns the source code. + */ +function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} + } + return ''; +} + +/** + * Creates a function that memoizes the result of `func`. If `resolver` is + * provided, it determines the cache key for storing the result based on the + * arguments provided to the memoized function. By default, the first argument + * provided to the memoized function is used as the map cache key. The `func` + * is invoked with the `this` binding of the memoized function. + * + * **Note:** The cache is exposed as the `cache` property on the memoized + * function. Its creation may be customized by replacing the `_.memoize.Cache` + * constructor with one whose instances implement the + * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) + * method interface of `delete`, `get`, `has`, and `set`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to have its output memoized. + * @param {Function} [resolver] The function to resolve the cache key. + * @returns {Function} Returns the new memoized function. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * var other = { 'c': 3, 'd': 4 }; + * + * var values = _.memoize(_.values); + * values(object); + * // => [1, 2] + * + * values(other); + * // => [3, 4] + * + * object.a = 2; + * values(object); + * // => [1, 2] + * + * // Modify the result cache. + * values.cache.set(object, ['a', 'b']); + * values(object); + * // => ['a', 'b'] + * + * // Replace `_.memoize.Cache`. + * _.memoize.Cache = WeakMap; + */ +function memoize(func, resolver) { + if (typeof func != 'function' || (resolver && typeof resolver != 'function')) { + throw new TypeError(FUNC_ERROR_TEXT); + } + var memoized = function() { + var args = arguments, + key = resolver ? resolver.apply(this, args) : args[0], + cache = memoized.cache; + + if (cache.has(key)) { + return cache.get(key); + } + var result = func.apply(this, args); + memoized.cache = cache.set(key, result); + return result; + }; + memoized.cache = new (memoize.Cache || MapCache); + return memoized; +} + +// Assign cache to `_.memoize`. +memoize.Cache = MapCache; + +/** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ +function eq(value, other) { + return value === other || (value !== value && other !== other); +} + +/** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ +var isArray = Array.isArray; + +/** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ +function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 8-9 which returns 'object' for typed array and other constructors. + var tag = isObject(value) ? objectToString.call(value) : ''; + return tag == funcTag || tag == genTag; +} + +/** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ +function isObject(value) { + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); +} + +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +/** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ +function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && objectToString.call(value) == symbolTag); +} + +/** + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {string} Returns the string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' + */ +function toString(value) { + return value == null ? '' : baseToString(value); +} + +/** + * Sets the value at `path` of `object`. If a portion of `path` doesn't exist, + * it's created. Arrays are created for missing index properties while objects + * are created for all other missing properties. Use `_.setWith` to customize + * `path` creation. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @returns {Object} Returns `object`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.set(object, 'a[0].b.c', 4); + * console.log(object.a[0].b.c); + * // => 4 + * + * _.set(object, ['x', '0', 'y', 'z'], 5); + * console.log(object.x[0].y.z); + * // => 5 + */ +function set(object, path, value) { + return object == null ? object : baseSet(object, path, value); +} - if (request.timeout) { - req.once("socket", function (socket) { - reqTimeout = setTimeout(function () { - reject( - new FetchError( - `network timeout at: ${request.url}`, - "request-timeout" - ) - ); - finalize(); - }, request.timeout); - }); - } +module.exports = set; - req.on("error", function (err) { - reject( - new FetchError( - `request to ${request.url} failed, reason: ${err.message}`, - "system", - err - ) - ); - finalize(); - }); - req.on("response", function (res) { - clearTimeout(reqTimeout); +/***/ }), - const headers = createHeadersLenient(res.headers); +/***/ 78216: +/***/ ((module) => { - // HTTP fetch step 5 - if (fetch.isRedirect(res.statusCode)) { - // HTTP fetch step 5.2 - const location = headers.get("Location"); +/** + * lodash (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright jQuery Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ - // HTTP fetch step 5.3 - let locationURL = null; - try { - locationURL = - location === null - ? null - : new URL$1(location, request.url).toString(); - } catch (err) { - // error here can only be invalid URL in Location: header - // do not throw when options.redirect == manual - // let the user extract the errorneous redirect URL - if (request.redirect !== "manual") { - reject( - new FetchError( - `uri requested responds with an invalid redirect URL: ${location}`, - "invalid-redirect" - ) - ); - finalize(); - return; - } - } +/** Used as the size to enable large array optimizations. */ +var LARGE_ARRAY_SIZE = 200; - // HTTP fetch step 5.5 - switch (request.redirect) { - case "error": - reject( - new FetchError( - `uri requested responds with a redirect, redirect mode is set to error: ${request.url}`, - "no-redirect" - ) - ); - finalize(); - return; - case "manual": - // node-fetch-specific step: make manual redirect a bit easier to use by setting the Location header value to the resolved URL. - if (locationURL !== null) { - // handle corrupted header - try { - headers.set("Location", locationURL); - } catch (err) { - // istanbul ignore next: nodejs server prevent invalid response headers, we can't test this through normal request - reject(err); - } - } - break; - case "follow": - // HTTP-redirect fetch step 2 - if (locationURL === null) { - break; - } +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; - // HTTP-redirect fetch step 5 - if (request.counter >= request.follow) { - reject( - new FetchError( - `maximum redirect reached at: ${request.url}`, - "max-redirect" - ) - ); - finalize(); - return; - } +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; - // HTTP-redirect fetch step 6 (counter increment) - // Create a new Request object. - const requestOpts = { - headers: new Headers(request.headers), - follow: request.follow, - counter: request.counter + 1, - agent: request.agent, - compress: request.compress, - method: request.method, - body: request.body, - signal: request.signal, - timeout: request.timeout, - size: request.size, - }; - - if (!isDomainOrSubdomain(request.url, locationURL)) { - for (const name of [ - "authorization", - "www-authenticate", - "cookie", - "cookie2", - ]) { - requestOpts.headers.delete(name); - } - } +/** `Object#toString` result references. */ +var funcTag = '[object Function]', + genTag = '[object GeneratorFunction]'; - // HTTP-redirect fetch step 9 - if ( - res.statusCode !== 303 && - request.body && - getTotalBytes(request) === null - ) { - reject( - new FetchError( - "Cannot follow redirect with body being a readable stream", - "unsupported-redirect" - ) - ); - finalize(); - return; - } +/** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ +var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; - // HTTP-redirect fetch step 11 - if ( - res.statusCode === 303 || - ((res.statusCode === 301 || res.statusCode === 302) && - request.method === "POST") - ) { - requestOpts.method = "GET"; - requestOpts.body = undefined; - requestOpts.headers.delete("content-length"); - } +/** Used to detect host constructors (Safari). */ +var reIsHostCtor = /^\[object .+?Constructor\]$/; - // HTTP-redirect fetch step 15 - resolve(fetch(new Request(locationURL, requestOpts))); - finalize(); - return; - } - } +/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; - // prepare response - res.once("end", function () { - if (signal) signal.removeEventListener("abort", abortAndFinalize); - }); - let body = res.pipe(new PassThrough$1()); - - const response_options = { - url: request.url, - status: res.statusCode, - statusText: res.statusMessage, - headers: headers, - size: request.size, - timeout: request.timeout, - counter: request.counter, - }; +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; - // HTTP-network fetch step 12.1.1.3 - const codings = headers.get("Content-Encoding"); - - // HTTP-network fetch step 12.1.1.4: handle content codings - - // in following scenarios we ignore compression support - // 1. compression support is disabled - // 2. HEAD request - // 3. no Content-Encoding header - // 4. no content response (204) - // 5. content not modified response (304) - if ( - !request.compress || - request.method === "HEAD" || - codings === null || - res.statusCode === 204 || - res.statusCode === 304 - ) { - response = new Response(body, response_options); - resolve(response); - return; - } +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); - // For Node v6+ - // Be less strict when decoding compressed responses, since sometimes - // servers send slightly invalid responses that are still accepted - // by common browsers. - // Always using Z_SYNC_FLUSH is what cURL does. - const zlibOptions = { - flush: zlib.Z_SYNC_FLUSH, - finishFlush: zlib.Z_SYNC_FLUSH, - }; +/** + * A specialized version of `_.includes` for arrays without support for + * specifying an index to search from. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ +function arrayIncludes(array, value) { + var length = array ? array.length : 0; + return !!length && baseIndexOf(array, value, 0) > -1; +} + +/** + * This function is like `arrayIncludes` except that it accepts a comparator. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @param {Function} comparator The comparator invoked per element. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ +function arrayIncludesWith(array, value, comparator) { + var index = -1, + length = array ? array.length : 0; + + while (++index < length) { + if (comparator(value, array[index])) { + return true; + } + } + return false; +} + +/** + * The base implementation of `_.findIndex` and `_.findLastIndex` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {number} fromIndex The index to search from. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 1 : -1); + + while ((fromRight ? index-- : ++index < length)) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; +} + +/** + * The base implementation of `_.indexOf` without `fromIndex` bounds checks. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function baseIndexOf(array, value, fromIndex) { + if (value !== value) { + return baseFindIndex(array, baseIsNaN, fromIndex); + } + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; +} + +/** + * The base implementation of `_.isNaN` without support for number objects. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + */ +function baseIsNaN(value) { + return value !== value; +} + +/** + * Checks if a cache value for `key` exists. + * + * @private + * @param {Object} cache The cache to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function cacheHas(cache, key) { + return cache.has(key); +} + +/** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ +function getValue(object, key) { + return object == null ? undefined : object[key]; +} + +/** + * Checks if `value` is a host object in IE < 9. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a host object, else `false`. + */ +function isHostObject(value) { + // Many host objects are `Object` objects that can coerce to strings + // despite having improperly defined `toString` methods. + var result = false; + if (value != null && typeof value.toString != 'function') { + try { + result = !!(value + ''); + } catch (e) {} + } + return result; +} + +/** + * Converts `set` to an array of its values. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. + */ +function setToArray(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = value; + }); + return result; +} + +/** Used for built-in method references. */ +var arrayProto = Array.prototype, + funcProto = Function.prototype, + objectProto = Object.prototype; + +/** Used to detect overreaching core-js shims. */ +var coreJsData = root['__core-js_shared__']; + +/** Used to detect methods masquerading as native. */ +var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; +}()); + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var objectToString = objectProto.toString; + +/** Used to detect if a method is native. */ +var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' +); + +/** Built-in value references. */ +var splice = arrayProto.splice; + +/* Built-in method references that are verified to be native. */ +var Map = getNative(root, 'Map'), + Set = getNative(root, 'Set'), + nativeCreate = getNative(Object, 'create'); + +/** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Hash(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ +function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; +} + +/** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function hashDelete(key) { + return this.has(key) && delete this.__data__[key]; +} + +/** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + return hasOwnProperty.call(data, key) ? data[key] : undefined; +} + +/** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function hashHas(key) { + var data = this.__data__; + return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); +} + +/** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ +function hashSet(key, value) { + var data = this.__data__; + data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + return this; +} + +// Add methods to `Hash`. +Hash.prototype.clear = hashClear; +Hash.prototype['delete'] = hashDelete; +Hash.prototype.get = hashGet; +Hash.prototype.has = hashHas; +Hash.prototype.set = hashSet; + +/** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function ListCache(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ +function listCacheClear() { + this.__data__ = []; +} + +/** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + return true; +} + +/** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + return index < 0 ? undefined : data[index][1]; +} + +/** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; +} + +/** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ +function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; +} + +// Add methods to `ListCache`. +ListCache.prototype.clear = listCacheClear; +ListCache.prototype['delete'] = listCacheDelete; +ListCache.prototype.get = listCacheGet; +ListCache.prototype.has = listCacheHas; +ListCache.prototype.set = listCacheSet; + +/** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function MapCache(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ +function mapCacheClear() { + this.__data__ = { + 'hash': new Hash, + 'map': new (Map || ListCache), + 'string': new Hash + }; +} + +/** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function mapCacheDelete(key) { + return getMapData(this, key)['delete'](key); +} + +/** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function mapCacheGet(key) { + return getMapData(this, key).get(key); +} + +/** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function mapCacheHas(key) { + return getMapData(this, key).has(key); +} + +/** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ +function mapCacheSet(key, value) { + getMapData(this, key).set(key, value); + return this; +} + +// Add methods to `MapCache`. +MapCache.prototype.clear = mapCacheClear; +MapCache.prototype['delete'] = mapCacheDelete; +MapCache.prototype.get = mapCacheGet; +MapCache.prototype.has = mapCacheHas; +MapCache.prototype.set = mapCacheSet; + +/** + * + * Creates an array cache object to store unique values. + * + * @private + * @constructor + * @param {Array} [values] The values to cache. + */ +function SetCache(values) { + var index = -1, + length = values ? values.length : 0; + + this.__data__ = new MapCache; + while (++index < length) { + this.add(values[index]); + } +} + +/** + * Adds `value` to the array cache. + * + * @private + * @name add + * @memberOf SetCache + * @alias push + * @param {*} value The value to cache. + * @returns {Object} Returns the cache instance. + */ +function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; +} + +/** + * Checks if `value` is in the array cache. + * + * @private + * @name has + * @memberOf SetCache + * @param {*} value The value to search for. + * @returns {number} Returns `true` if `value` is found, else `false`. + */ +function setCacheHas(value) { + return this.__data__.has(value); +} + +// Add methods to `SetCache`. +SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; +SetCache.prototype.has = setCacheHas; + +/** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; +} + +/** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ +function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); +} + +/** + * The base implementation of `_.uniqBy` without support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. + */ +function baseUniq(array, iteratee, comparator) { + var index = -1, + includes = arrayIncludes, + length = array.length, + isCommon = true, + result = [], + seen = result; + + if (comparator) { + isCommon = false; + includes = arrayIncludesWith; + } + else if (length >= LARGE_ARRAY_SIZE) { + var set = iteratee ? null : createSet(array); + if (set) { + return setToArray(set); + } + isCommon = false; + includes = cacheHas; + seen = new SetCache; + } + else { + seen = iteratee ? [] : result; + } + outer: + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + value = (comparator || value !== 0) ? value : 0; + if (isCommon && computed === computed) { + var seenIndex = seen.length; + while (seenIndex--) { + if (seen[seenIndex] === computed) { + continue outer; + } + } + if (iteratee) { + seen.push(computed); + } + result.push(value); + } + else if (!includes(seen, computed, comparator)) { + if (seen !== result) { + seen.push(computed); + } + result.push(value); + } + } + return result; +} + +/** + * Creates a set object of `values`. + * + * @private + * @param {Array} values The values to add to the set. + * @returns {Object} Returns the new set. + */ +var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) { + return new Set(values); +}; + +/** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ +function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; +} + +/** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ +function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; +} + +/** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ +function isKeyable(value) { + var type = typeof value; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); +} + +/** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ +function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); +} + +/** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to process. + * @returns {string} Returns the source code. + */ +function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} + } + return ''; +} + +/** + * Creates a duplicate-free version of an array, using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons, in which only the first occurrence of each + * element is kept. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.uniq([2, 1, 2]); + * // => [2, 1] + */ +function uniq(array) { + return (array && array.length) + ? baseUniq(array) + : []; +} + +/** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ +function eq(value, other) { + return value === other || (value !== value && other !== other); +} + +/** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ +function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 8-9 which returns 'object' for typed array and other constructors. + var tag = isObject(value) ? objectToString.call(value) : ''; + return tag == funcTag || tag == genTag; +} + +/** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ +function isObject(value) { + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); +} + +/** + * This method returns `undefined`. + * + * @static + * @memberOf _ + * @since 2.3.0 + * @category Util + * @example + * + * _.times(2, _.noop); + * // => [undefined, undefined] + */ +function noop() { + // No operation performed. +} - // for gzip - if (codings == "gzip" || codings == "x-gzip") { - body = body.pipe(zlib.createGunzip(zlibOptions)); - response = new Response(body, response_options); - resolve(response); - return; - } +module.exports = uniq; - // for deflate - if (codings == "deflate" || codings == "x-deflate") { - // handle the infamous raw deflate response from old servers - // a hack for old IIS and Apache servers - const raw = res.pipe(new PassThrough$1()); - raw.once("data", function (chunk) { - // see http://stackoverflow.com/questions/37519828 - if ((chunk[0] & 0x0f) === 0x08) { - body = body.pipe(zlib.createInflate()); - } else { - body = body.pipe(zlib.createInflateRaw()); - } - response = new Response(body, response_options); - resolve(response); - }); - return; - } - // for br - if ( - codings == "br" && - typeof zlib.createBrotliDecompress === "function" - ) { - body = body.pipe(zlib.createBrotliDecompress()); - response = new Response(body, response_options); - resolve(response); - return; - } +/***/ }), - // otherwise, use response as-is - response = new Response(body, response_options); - resolve(response); - }); +/***/ 7493: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - writeToStream(req, request); - }); - } - /** - * Redirect code matching - * - * @param Number code Status code - * @return Boolean - */ - fetch.isRedirect = function (code) { - return ( - code === 301 || - code === 302 || - code === 303 || - code === 307 || - code === 308 - ); - }; +"use strict"; - // expose Promise - fetch.Promise = global.Promise; +const os = __nccwpck_require__(22037); - module.exports = exports = fetch; - Object.defineProperty(exports, "__esModule", { value: true }); - exports["default"] = exports; - exports.Headers = Headers; - exports.Request = Request; - exports.Response = Response; - exports.FetchError = FetchError; +const nameMap = new Map([ + [19, 'Catalina'], + [18, 'Mojave'], + [17, 'High Sierra'], + [16, 'Sierra'], + [15, 'El Capitan'], + [14, 'Yosemite'], + [13, 'Mavericks'], + [12, 'Mountain Lion'], + [11, 'Lion'], + [10, 'Snow Leopard'], + [9, 'Leopard'], + [8, 'Tiger'], + [7, 'Panther'], + [6, 'Jaguar'], + [5, 'Puma'] +]); - /***/ - }, +const macosRelease = release => { + release = Number((release || os.release()).split('.')[0]); + return { + name: nameMap.get(release), + version: '10.' + (release - 4) + }; +}; - /***/ 20502: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - "use strict"; +module.exports = macosRelease; +// TODO: remove this in the next major version +module.exports["default"] = macosRelease; - const path = __nccwpck_require__(71017); - const pathKey = __nccwpck_require__(20539); - module.exports = (opts) => { - opts = Object.assign( - { - cwd: process.cwd(), - path: process.env[pathKey()], - }, - opts - ); +/***/ }), - let prev; - let pth = path.resolve(opts.cwd); - const ret = []; +/***/ 38560: +/***/ ((module) => { - while (prev !== pth) { - ret.push(path.join(pth, "node_modules/.bin")); - prev = pth; - pth = path.resolve(pth, ".."); - } +"use strict"; - // ensure the running `node` binary is used - ret.push(path.dirname(process.execPath)); - return ret.concat(opts.path).join(path.delimiter); - }; +/** + * Tries to execute a function and discards any error that occurs. + * @param {Function} fn - Function that might or might not throw an error. + * @returns {?*} Return-value of the function when no error occurred. + */ +module.exports = function(fn) { + + try { return fn() } catch (e) {} + +} + +/***/ }), + +/***/ 80467: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } + +var Stream = _interopDefault(__nccwpck_require__(12781)); +var http = _interopDefault(__nccwpck_require__(13685)); +var Url = _interopDefault(__nccwpck_require__(57310)); +var whatwgUrl = _interopDefault(__nccwpck_require__(28665)); +var https = _interopDefault(__nccwpck_require__(95687)); +var zlib = _interopDefault(__nccwpck_require__(59796)); + +// Based on https://github.com/tmpvar/jsdom/blob/aa85b2abf07766ff7bf5c1f6daafb3726f2f2db5/lib/jsdom/living/blob.js + +// fix for "Readable" isn't a named export issue +const Readable = Stream.Readable; + +const BUFFER = Symbol('buffer'); +const TYPE = Symbol('type'); + +class Blob { + constructor() { + this[TYPE] = ''; + + const blobParts = arguments[0]; + const options = arguments[1]; + + const buffers = []; + let size = 0; + + if (blobParts) { + const a = blobParts; + const length = Number(a.length); + for (let i = 0; i < length; i++) { + const element = a[i]; + let buffer; + if (element instanceof Buffer) { + buffer = element; + } else if (ArrayBuffer.isView(element)) { + buffer = Buffer.from(element.buffer, element.byteOffset, element.byteLength); + } else if (element instanceof ArrayBuffer) { + buffer = Buffer.from(element); + } else if (element instanceof Blob) { + buffer = element[BUFFER]; + } else { + buffer = Buffer.from(typeof element === 'string' ? element : String(element)); + } + size += buffer.length; + buffers.push(buffer); + } + } + + this[BUFFER] = Buffer.concat(buffers); + + let type = options && options.type !== undefined && String(options.type).toLowerCase(); + if (type && !/[^\u0020-\u007E]/.test(type)) { + this[TYPE] = type; + } + } + get size() { + return this[BUFFER].length; + } + get type() { + return this[TYPE]; + } + text() { + return Promise.resolve(this[BUFFER].toString()); + } + arrayBuffer() { + const buf = this[BUFFER]; + const ab = buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); + return Promise.resolve(ab); + } + stream() { + const readable = new Readable(); + readable._read = function () {}; + readable.push(this[BUFFER]); + readable.push(null); + return readable; + } + toString() { + return '[object Blob]'; + } + slice() { + const size = this.size; + + const start = arguments[0]; + const end = arguments[1]; + let relativeStart, relativeEnd; + if (start === undefined) { + relativeStart = 0; + } else if (start < 0) { + relativeStart = Math.max(size + start, 0); + } else { + relativeStart = Math.min(start, size); + } + if (end === undefined) { + relativeEnd = size; + } else if (end < 0) { + relativeEnd = Math.max(size + end, 0); + } else { + relativeEnd = Math.min(end, size); + } + const span = Math.max(relativeEnd - relativeStart, 0); + + const buffer = this[BUFFER]; + const slicedBuffer = buffer.slice(relativeStart, relativeStart + span); + const blob = new Blob([], { type: arguments[2] }); + blob[BUFFER] = slicedBuffer; + return blob; + } +} + +Object.defineProperties(Blob.prototype, { + size: { enumerable: true }, + type: { enumerable: true }, + slice: { enumerable: true } +}); + +Object.defineProperty(Blob.prototype, Symbol.toStringTag, { + value: 'Blob', + writable: false, + enumerable: false, + configurable: true +}); + +/** + * fetch-error.js + * + * FetchError interface for operational errors + */ - module.exports.env = (opts) => { - opts = Object.assign( - { - env: process.env, - }, - opts - ); +/** + * Create FetchError instance + * + * @param String message Error message for human + * @param String type Error type for machine + * @param String systemError For Node.js system error + * @return FetchError + */ +function FetchError(message, type, systemError) { + Error.call(this, message); + + this.message = message; + this.type = type; + + // when err.type is `system`, err.code contains system error code + if (systemError) { + this.code = this.errno = systemError.code; + } + + // hide custom error implementation details from end-users + Error.captureStackTrace(this, this.constructor); +} + +FetchError.prototype = Object.create(Error.prototype); +FetchError.prototype.constructor = FetchError; +FetchError.prototype.name = 'FetchError'; + +let convert; +try { + convert = (__nccwpck_require__(22877).convert); +} catch (e) {} + +const INTERNALS = Symbol('Body internals'); + +// fix an issue where "PassThrough" isn't a named export for node <10 +const PassThrough = Stream.PassThrough; + +/** + * Body mixin + * + * Ref: https://fetch.spec.whatwg.org/#body + * + * @param Stream body Readable stream + * @param Object opts Response options + * @return Void + */ +function Body(body) { + var _this = this; + + var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, + _ref$size = _ref.size; + + let size = _ref$size === undefined ? 0 : _ref$size; + var _ref$timeout = _ref.timeout; + let timeout = _ref$timeout === undefined ? 0 : _ref$timeout; + + if (body == null) { + // body is undefined or null + body = null; + } else if (isURLSearchParams(body)) { + // body is a URLSearchParams + body = Buffer.from(body.toString()); + } else if (isBlob(body)) ; else if (Buffer.isBuffer(body)) ; else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') { + // body is ArrayBuffer + body = Buffer.from(body); + } else if (ArrayBuffer.isView(body)) { + // body is ArrayBufferView + body = Buffer.from(body.buffer, body.byteOffset, body.byteLength); + } else if (body instanceof Stream) ; else { + // none of the above + // coerce to string then buffer + body = Buffer.from(String(body)); + } + this[INTERNALS] = { + body, + disturbed: false, + error: null + }; + this.size = size; + this.timeout = timeout; + + if (body instanceof Stream) { + body.on('error', function (err) { + const error = err.name === 'AbortError' ? err : new FetchError(`Invalid response body while trying to fetch ${_this.url}: ${err.message}`, 'system', err); + _this[INTERNALS].error = error; + }); + } +} + +Body.prototype = { + get body() { + return this[INTERNALS].body; + }, + + get bodyUsed() { + return this[INTERNALS].disturbed; + }, + + /** + * Decode response as ArrayBuffer + * + * @return Promise + */ + arrayBuffer() { + return consumeBody.call(this).then(function (buf) { + return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); + }); + }, + + /** + * Return raw response as Blob + * + * @return Promise + */ + blob() { + let ct = this.headers && this.headers.get('content-type') || ''; + return consumeBody.call(this).then(function (buf) { + return Object.assign( + // Prevent copying + new Blob([], { + type: ct.toLowerCase() + }), { + [BUFFER]: buf + }); + }); + }, + + /** + * Decode response as json + * + * @return Promise + */ + json() { + var _this2 = this; + + return consumeBody.call(this).then(function (buffer) { + try { + return JSON.parse(buffer.toString()); + } catch (err) { + return Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, 'invalid-json')); + } + }); + }, + + /** + * Decode response as text + * + * @return Promise + */ + text() { + return consumeBody.call(this).then(function (buffer) { + return buffer.toString(); + }); + }, + + /** + * Decode response as buffer (non-spec api) + * + * @return Promise + */ + buffer() { + return consumeBody.call(this); + }, + + /** + * Decode response as text, while automatically detecting the encoding and + * trying to decode to UTF-8 (non-spec api) + * + * @return Promise + */ + textConverted() { + var _this3 = this; + + return consumeBody.call(this).then(function (buffer) { + return convertBody(buffer, _this3.headers); + }); + } +}; + +// In browsers, all properties are enumerable. +Object.defineProperties(Body.prototype, { + body: { enumerable: true }, + bodyUsed: { enumerable: true }, + arrayBuffer: { enumerable: true }, + blob: { enumerable: true }, + json: { enumerable: true }, + text: { enumerable: true } +}); + +Body.mixIn = function (proto) { + for (const name of Object.getOwnPropertyNames(Body.prototype)) { + // istanbul ignore else: future proof + if (!(name in proto)) { + const desc = Object.getOwnPropertyDescriptor(Body.prototype, name); + Object.defineProperty(proto, name, desc); + } + } +}; + +/** + * Consume and convert an entire Body to a Buffer. + * + * Ref: https://fetch.spec.whatwg.org/#concept-body-consume-body + * + * @return Promise + */ +function consumeBody() { + var _this4 = this; + + if (this[INTERNALS].disturbed) { + return Body.Promise.reject(new TypeError(`body used already for: ${this.url}`)); + } + + this[INTERNALS].disturbed = true; + + if (this[INTERNALS].error) { + return Body.Promise.reject(this[INTERNALS].error); + } + + let body = this.body; + + // body is null + if (body === null) { + return Body.Promise.resolve(Buffer.alloc(0)); + } + + // body is blob + if (isBlob(body)) { + body = body.stream(); + } + + // body is buffer + if (Buffer.isBuffer(body)) { + return Body.Promise.resolve(body); + } + + // istanbul ignore if: should never happen + if (!(body instanceof Stream)) { + return Body.Promise.resolve(Buffer.alloc(0)); + } + + // body is stream + // get ready to actually consume the body + let accum = []; + let accumBytes = 0; + let abort = false; + + return new Body.Promise(function (resolve, reject) { + let resTimeout; + + // allow timeout on slow response body + if (_this4.timeout) { + resTimeout = setTimeout(function () { + abort = true; + reject(new FetchError(`Response timeout while trying to fetch ${_this4.url} (over ${_this4.timeout}ms)`, 'body-timeout')); + }, _this4.timeout); + } + + // handle stream errors + body.on('error', function (err) { + if (err.name === 'AbortError') { + // if the request was aborted, reject with this Error + abort = true; + reject(err); + } else { + // other errors, such as incorrect content-encoding + reject(new FetchError(`Invalid response body while trying to fetch ${_this4.url}: ${err.message}`, 'system', err)); + } + }); + + body.on('data', function (chunk) { + if (abort || chunk === null) { + return; + } + + if (_this4.size && accumBytes + chunk.length > _this4.size) { + abort = true; + reject(new FetchError(`content size at ${_this4.url} over limit: ${_this4.size}`, 'max-size')); + return; + } + + accumBytes += chunk.length; + accum.push(chunk); + }); + + body.on('end', function () { + if (abort) { + return; + } + + clearTimeout(resTimeout); + + try { + resolve(Buffer.concat(accum, accumBytes)); + } catch (err) { + // handle streams that have accumulated too much data (issue #414) + reject(new FetchError(`Could not create Buffer from response body for ${_this4.url}: ${err.message}`, 'system', err)); + } + }); + }); +} + +/** + * Detect buffer encoding and convert to target encoding + * ref: http://www.w3.org/TR/2011/WD-html5-20110113/parsing.html#determining-the-character-encoding + * + * @param Buffer buffer Incoming buffer + * @param String encoding Target encoding + * @return String + */ +function convertBody(buffer, headers) { + if (typeof convert !== 'function') { + throw new Error('The package `encoding` must be installed to use the textConverted() function'); + } + + const ct = headers.get('content-type'); + let charset = 'utf-8'; + let res, str; + + // header + if (ct) { + res = /charset=([^;]*)/i.exec(ct); + } + + // no charset in content type, peek at response body for at most 1024 bytes + str = buffer.slice(0, 1024).toString(); + + // html5 + if (!res && str) { + res = / 0 && arguments[0] !== undefined ? arguments[0] : undefined; + + this[MAP] = Object.create(null); + + if (init instanceof Headers) { + const rawHeaders = init.raw(); + const headerNames = Object.keys(rawHeaders); + + for (const headerName of headerNames) { + for (const value of rawHeaders[headerName]) { + this.append(headerName, value); + } + } + + return; + } + + // We don't worry about converting prop to ByteString here as append() + // will handle it. + if (init == null) ; else if (typeof init === 'object') { + const method = init[Symbol.iterator]; + if (method != null) { + if (typeof method !== 'function') { + throw new TypeError('Header pairs must be iterable'); + } + + // sequence> + // Note: per spec we have to first exhaust the lists then process them + const pairs = []; + for (const pair of init) { + if (typeof pair !== 'object' || typeof pair[Symbol.iterator] !== 'function') { + throw new TypeError('Each header pair must be iterable'); + } + pairs.push(Array.from(pair)); + } + + for (const pair of pairs) { + if (pair.length !== 2) { + throw new TypeError('Each header pair must be a name/value tuple'); + } + this.append(pair[0], pair[1]); + } + } else { + // record + for (const key of Object.keys(init)) { + const value = init[key]; + this.append(key, value); + } + } + } else { + throw new TypeError('Provided initializer must be an object'); + } + } + + /** + * Return combined header value given name + * + * @param String name Header name + * @return Mixed + */ + get(name) { + name = `${name}`; + validateName(name); + const key = find(this[MAP], name); + if (key === undefined) { + return null; + } + + return this[MAP][key].join(', '); + } + + /** + * Iterate over all headers + * + * @param Function callback Executed for each item with parameters (value, name, thisArg) + * @param Boolean thisArg `this` context for callback function + * @return Void + */ + forEach(callback) { + let thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; + + let pairs = getHeaders(this); + let i = 0; + while (i < pairs.length) { + var _pairs$i = pairs[i]; + const name = _pairs$i[0], + value = _pairs$i[1]; + + callback.call(thisArg, value, name, this); + pairs = getHeaders(this); + i++; + } + } + + /** + * Overwrite header values given name + * + * @param String name Header name + * @param String value Header value + * @return Void + */ + set(name, value) { + name = `${name}`; + value = `${value}`; + validateName(name); + validateValue(value); + const key = find(this[MAP], name); + this[MAP][key !== undefined ? key : name] = [value]; + } + + /** + * Append a value onto existing header + * + * @param String name Header name + * @param String value Header value + * @return Void + */ + append(name, value) { + name = `${name}`; + value = `${value}`; + validateName(name); + validateValue(value); + const key = find(this[MAP], name); + if (key !== undefined) { + this[MAP][key].push(value); + } else { + this[MAP][name] = [value]; + } + } + + /** + * Check for header name existence + * + * @param String name Header name + * @return Boolean + */ + has(name) { + name = `${name}`; + validateName(name); + return find(this[MAP], name) !== undefined; + } + + /** + * Delete all header values given name + * + * @param String name Header name + * @return Void + */ + delete(name) { + name = `${name}`; + validateName(name); + const key = find(this[MAP], name); + if (key !== undefined) { + delete this[MAP][key]; + } + } + + /** + * Return raw headers (non-spec api) + * + * @return Object + */ + raw() { + return this[MAP]; + } + + /** + * Get an iterator on keys. + * + * @return Iterator + */ + keys() { + return createHeadersIterator(this, 'key'); + } + + /** + * Get an iterator on values. + * + * @return Iterator + */ + values() { + return createHeadersIterator(this, 'value'); + } + + /** + * Get an iterator on entries. + * + * This is the default iterator of the Headers object. + * + * @return Iterator + */ + [Symbol.iterator]() { + return createHeadersIterator(this, 'key+value'); + } +} +Headers.prototype.entries = Headers.prototype[Symbol.iterator]; + +Object.defineProperty(Headers.prototype, Symbol.toStringTag, { + value: 'Headers', + writable: false, + enumerable: false, + configurable: true +}); + +Object.defineProperties(Headers.prototype, { + get: { enumerable: true }, + forEach: { enumerable: true }, + set: { enumerable: true }, + append: { enumerable: true }, + has: { enumerable: true }, + delete: { enumerable: true }, + keys: { enumerable: true }, + values: { enumerable: true }, + entries: { enumerable: true } +}); + +function getHeaders(headers) { + let kind = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'key+value'; + + const keys = Object.keys(headers[MAP]).sort(); + return keys.map(kind === 'key' ? function (k) { + return k.toLowerCase(); + } : kind === 'value' ? function (k) { + return headers[MAP][k].join(', '); + } : function (k) { + return [k.toLowerCase(), headers[MAP][k].join(', ')]; + }); +} + +const INTERNAL = Symbol('internal'); + +function createHeadersIterator(target, kind) { + const iterator = Object.create(HeadersIteratorPrototype); + iterator[INTERNAL] = { + target, + kind, + index: 0 + }; + return iterator; +} + +const HeadersIteratorPrototype = Object.setPrototypeOf({ + next() { + // istanbul ignore if + if (!this || Object.getPrototypeOf(this) !== HeadersIteratorPrototype) { + throw new TypeError('Value of `this` is not a HeadersIterator'); + } + + var _INTERNAL = this[INTERNAL]; + const target = _INTERNAL.target, + kind = _INTERNAL.kind, + index = _INTERNAL.index; + + const values = getHeaders(target, kind); + const len = values.length; + if (index >= len) { + return { + value: undefined, + done: true + }; + } + + this[INTERNAL].index = index + 1; + + return { + value: values[index], + done: false + }; + } +}, Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()))); + +Object.defineProperty(HeadersIteratorPrototype, Symbol.toStringTag, { + value: 'HeadersIterator', + writable: false, + enumerable: false, + configurable: true +}); + +/** + * Export the Headers object in a form that Node.js can consume. + * + * @param Headers headers + * @return Object + */ +function exportNodeCompatibleHeaders(headers) { + const obj = Object.assign({ __proto__: null }, headers[MAP]); + + // http.request() only supports string as Host header. This hack makes + // specifying custom Host header possible. + const hostHeaderKey = find(headers[MAP], 'Host'); + if (hostHeaderKey !== undefined) { + obj[hostHeaderKey] = obj[hostHeaderKey][0]; + } + + return obj; +} + +/** + * Create a Headers object from an object of headers, ignoring those that do + * not conform to HTTP grammar productions. + * + * @param Object obj Object of headers + * @return Headers + */ +function createHeadersLenient(obj) { + const headers = new Headers(); + for (const name of Object.keys(obj)) { + if (invalidTokenRegex.test(name)) { + continue; + } + if (Array.isArray(obj[name])) { + for (const val of obj[name]) { + if (invalidHeaderCharRegex.test(val)) { + continue; + } + if (headers[MAP][name] === undefined) { + headers[MAP][name] = [val]; + } else { + headers[MAP][name].push(val); + } + } + } else if (!invalidHeaderCharRegex.test(obj[name])) { + headers[MAP][name] = [obj[name]]; + } + } + return headers; +} + +const INTERNALS$1 = Symbol('Response internals'); + +// fix an issue where "STATUS_CODES" aren't a named export for node <10 +const STATUS_CODES = http.STATUS_CODES; + +/** + * Response class + * + * @param Stream body Readable stream + * @param Object opts Response options + * @return Void + */ +class Response { + constructor() { + let body = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; + let opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + Body.call(this, body, opts); + + const status = opts.status || 200; + const headers = new Headers(opts.headers); + + if (body != null && !headers.has('Content-Type')) { + const contentType = extractContentType(body); + if (contentType) { + headers.append('Content-Type', contentType); + } + } + + this[INTERNALS$1] = { + url: opts.url, + status, + statusText: opts.statusText || STATUS_CODES[status], + headers, + counter: opts.counter + }; + } + + get url() { + return this[INTERNALS$1].url || ''; + } + + get status() { + return this[INTERNALS$1].status; + } + + /** + * Convenience property representing if the request ended normally + */ + get ok() { + return this[INTERNALS$1].status >= 200 && this[INTERNALS$1].status < 300; + } + + get redirected() { + return this[INTERNALS$1].counter > 0; + } + + get statusText() { + return this[INTERNALS$1].statusText; + } + + get headers() { + return this[INTERNALS$1].headers; + } + + /** + * Clone this response + * + * @return Response + */ + clone() { + return new Response(clone(this), { + url: this.url, + status: this.status, + statusText: this.statusText, + headers: this.headers, + ok: this.ok, + redirected: this.redirected + }); + } +} + +Body.mixIn(Response.prototype); + +Object.defineProperties(Response.prototype, { + url: { enumerable: true }, + status: { enumerable: true }, + ok: { enumerable: true }, + redirected: { enumerable: true }, + statusText: { enumerable: true }, + headers: { enumerable: true }, + clone: { enumerable: true } +}); + +Object.defineProperty(Response.prototype, Symbol.toStringTag, { + value: 'Response', + writable: false, + enumerable: false, + configurable: true +}); + +const INTERNALS$2 = Symbol('Request internals'); +const URL = Url.URL || whatwgUrl.URL; + +// fix an issue where "format", "parse" aren't a named export for node <10 +const parse_url = Url.parse; +const format_url = Url.format; + +/** + * Wrapper around `new URL` to handle arbitrary URLs + * + * @param {string} urlStr + * @return {void} + */ +function parseURL(urlStr) { + /* + Check whether the URL is absolute or not + Scheme: https://tools.ietf.org/html/rfc3986#section-3.1 + Absolute URL: https://tools.ietf.org/html/rfc3986#section-4.3 + */ + if (/^[a-zA-Z][a-zA-Z\d+\-.]*:/.exec(urlStr)) { + urlStr = new URL(urlStr).toString(); + } - opts.path = env[path]; - env[path] = module.exports(opts); + // Fallback to old implementation for arbitrary URLs + return parse_url(urlStr); +} - return env; - }; +const streamDestructionSupported = 'destroy' in Stream.Readable.prototype; - /***/ - }, +/** + * Check if a value is an instance of Request. + * + * @param Mixed input + * @return Boolean + */ +function isRequest(input) { + return typeof input === 'object' && typeof input[INTERNALS$2] === 'object'; +} + +function isAbortSignal(signal) { + const proto = signal && typeof signal === 'object' && Object.getPrototypeOf(signal); + return !!(proto && proto.constructor.name === 'AbortSignal'); +} + +/** + * Request class + * + * @param Mixed input Url or Request instance + * @param Object init Custom options + * @return Void + */ +class Request { + constructor(input) { + let init = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + let parsedURL; + + // normalize input + if (!isRequest(input)) { + if (input && input.href) { + // in order to support Node.js' Url objects; though WHATWG's URL objects + // will fall into this branch also (since their `toString()` will return + // `href` property anyway) + parsedURL = parseURL(input.href); + } else { + // coerce input to a string before attempting to parse + parsedURL = parseURL(`${input}`); + } + input = {}; + } else { + parsedURL = parseURL(input.url); + } + + let method = init.method || input.method || 'GET'; + method = method.toUpperCase(); + + if ((init.body != null || isRequest(input) && input.body !== null) && (method === 'GET' || method === 'HEAD')) { + throw new TypeError('Request with GET/HEAD method cannot have body'); + } + + let inputBody = init.body != null ? init.body : isRequest(input) && input.body !== null ? clone(input) : null; + + Body.call(this, inputBody, { + timeout: init.timeout || input.timeout || 0, + size: init.size || input.size || 0 + }); + + const headers = new Headers(init.headers || input.headers || {}); + + if (inputBody != null && !headers.has('Content-Type')) { + const contentType = extractContentType(inputBody); + if (contentType) { + headers.append('Content-Type', contentType); + } + } + + let signal = isRequest(input) ? input.signal : null; + if ('signal' in init) signal = init.signal; + + if (signal != null && !isAbortSignal(signal)) { + throw new TypeError('Expected signal to be an instanceof AbortSignal'); + } + + this[INTERNALS$2] = { + method, + redirect: init.redirect || input.redirect || 'follow', + headers, + parsedURL, + signal + }; + + // node-fetch-only options + this.follow = init.follow !== undefined ? init.follow : input.follow !== undefined ? input.follow : 20; + this.compress = init.compress !== undefined ? init.compress : input.compress !== undefined ? input.compress : true; + this.counter = init.counter || input.counter || 0; + this.agent = init.agent || input.agent; + } + + get method() { + return this[INTERNALS$2].method; + } + + get url() { + return format_url(this[INTERNALS$2].parsedURL); + } + + get headers() { + return this[INTERNALS$2].headers; + } + + get redirect() { + return this[INTERNALS$2].redirect; + } + + get signal() { + return this[INTERNALS$2].signal; + } + + /** + * Clone this request + * + * @return Request + */ + clone() { + return new Request(this); + } +} + +Body.mixIn(Request.prototype); + +Object.defineProperty(Request.prototype, Symbol.toStringTag, { + value: 'Request', + writable: false, + enumerable: false, + configurable: true +}); + +Object.defineProperties(Request.prototype, { + method: { enumerable: true }, + url: { enumerable: true }, + headers: { enumerable: true }, + redirect: { enumerable: true }, + clone: { enumerable: true }, + signal: { enumerable: true } +}); + +/** + * Convert a Request to Node.js http request options. + * + * @param Request A Request instance + * @return Object The options object to be passed to http.request + */ +function getNodeRequestOptions(request) { + const parsedURL = request[INTERNALS$2].parsedURL; + const headers = new Headers(request[INTERNALS$2].headers); + + // fetch step 1.3 + if (!headers.has('Accept')) { + headers.set('Accept', '*/*'); + } + + // Basic fetch + if (!parsedURL.protocol || !parsedURL.hostname) { + throw new TypeError('Only absolute URLs are supported'); + } + + if (!/^https?:$/.test(parsedURL.protocol)) { + throw new TypeError('Only HTTP(S) protocols are supported'); + } + + if (request.signal && request.body instanceof Stream.Readable && !streamDestructionSupported) { + throw new Error('Cancellation of streamed requests with AbortSignal is not supported in node < 8'); + } + + // HTTP-network-or-cache fetch steps 2.4-2.7 + let contentLengthValue = null; + if (request.body == null && /^(POST|PUT)$/i.test(request.method)) { + contentLengthValue = '0'; + } + if (request.body != null) { + const totalBytes = getTotalBytes(request); + if (typeof totalBytes === 'number') { + contentLengthValue = String(totalBytes); + } + } + if (contentLengthValue) { + headers.set('Content-Length', contentLengthValue); + } + + // HTTP-network-or-cache fetch step 2.11 + if (!headers.has('User-Agent')) { + headers.set('User-Agent', 'node-fetch/1.0 (+https://github.com/bitinn/node-fetch)'); + } + + // HTTP-network-or-cache fetch step 2.15 + if (request.compress && !headers.has('Accept-Encoding')) { + headers.set('Accept-Encoding', 'gzip,deflate'); + } + + let agent = request.agent; + if (typeof agent === 'function') { + agent = agent(parsedURL); + } + + if (!headers.has('Connection') && !agent) { + headers.set('Connection', 'close'); + } + + // HTTP-network fetch step 4.2 + // chunked encoding is handled by Node.js + + return Object.assign({}, parsedURL, { + method: request.method, + headers: exportNodeCompatibleHeaders(headers), + agent + }); +} + +/** + * abort-error.js + * + * AbortError interface for cancelled requests + */ - /***/ 82072: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - module.exports = paginationMethodsPlugin; +/** + * Create AbortError instance + * + * @param String message Error message for human + * @return AbortError + */ +function AbortError(message) { + Error.call(this, message); - function paginationMethodsPlugin(octokit) { - octokit.getFirstPage = __nccwpck_require__(49555).bind(null, octokit); - octokit.getLastPage = __nccwpck_require__(42203).bind(null, octokit); - octokit.getNextPage = __nccwpck_require__(86655).bind(null, octokit); - octokit.getPreviousPage = __nccwpck_require__(63032).bind( - null, - octokit - ); - octokit.hasFirstPage = __nccwpck_require__(59631); - octokit.hasLastPage = __nccwpck_require__(64286); - octokit.hasNextPage = __nccwpck_require__(500); - octokit.hasPreviousPage = __nccwpck_require__(5996); - } + this.type = 'aborted'; + this.message = message; - /***/ - }, + // hide custom error implementation details from end-users + Error.captureStackTrace(this, this.constructor); +} - /***/ 30191: /***/ (module) => { - module.exports = deprecate; +AbortError.prototype = Object.create(Error.prototype); +AbortError.prototype.constructor = AbortError; +AbortError.prototype.name = 'AbortError'; - const loggedMessages = {}; +const URL$1 = Url.URL || whatwgUrl.URL; - function deprecate(message) { - if (loggedMessages[message]) { - return; - } +// fix an issue where "PassThrough", "resolve" aren't a named export for node <10 +const PassThrough$1 = Stream.PassThrough; - console.warn(`DEPRECATED (@octokit/rest): ${message}`); - loggedMessages[message] = 1; - } +const isDomainOrSubdomain = function isDomainOrSubdomain(destination, original) { + const orig = new URL$1(original).hostname; + const dest = new URL$1(destination).hostname; - /***/ - }, + return orig === dest || orig[orig.length - dest.length - 1] === '.' && orig.endsWith(dest); +}; - /***/ 49555: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - module.exports = getFirstPage; +/** + * Fetch function + * + * @param Mixed url Absolute url or Request instance + * @param Object opts Fetch options + * @return Promise + */ +function fetch(url, opts) { + + // allow custom promise + if (!fetch.Promise) { + throw new Error('native promise missing, set fetch.Promise to your favorite alternative'); + } + + Body.Promise = fetch.Promise; + + // wrap http.request into fetch + return new fetch.Promise(function (resolve, reject) { + // build request object + const request = new Request(url, opts); + const options = getNodeRequestOptions(request); + + const send = (options.protocol === 'https:' ? https : http).request; + const signal = request.signal; + + let response = null; + + const abort = function abort() { + let error = new AbortError('The user aborted a request.'); + reject(error); + if (request.body && request.body instanceof Stream.Readable) { + request.body.destroy(error); + } + if (!response || !response.body) return; + response.body.emit('error', error); + }; + + if (signal && signal.aborted) { + abort(); + return; + } + + const abortAndFinalize = function abortAndFinalize() { + abort(); + finalize(); + }; + + // send request + const req = send(options); + let reqTimeout; + + if (signal) { + signal.addEventListener('abort', abortAndFinalize); + } + + function finalize() { + req.abort(); + if (signal) signal.removeEventListener('abort', abortAndFinalize); + clearTimeout(reqTimeout); + } + + if (request.timeout) { + req.once('socket', function (socket) { + reqTimeout = setTimeout(function () { + reject(new FetchError(`network timeout at: ${request.url}`, 'request-timeout')); + finalize(); + }, request.timeout); + }); + } + + req.on('error', function (err) { + reject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err)); + finalize(); + }); + + req.on('response', function (res) { + clearTimeout(reqTimeout); + + const headers = createHeadersLenient(res.headers); + + // HTTP fetch step 5 + if (fetch.isRedirect(res.statusCode)) { + // HTTP fetch step 5.2 + const location = headers.get('Location'); + + // HTTP fetch step 5.3 + let locationURL = null; + try { + locationURL = location === null ? null : new URL$1(location, request.url).toString(); + } catch (err) { + // error here can only be invalid URL in Location: header + // do not throw when options.redirect == manual + // let the user extract the errorneous redirect URL + if (request.redirect !== 'manual') { + reject(new FetchError(`uri requested responds with an invalid redirect URL: ${location}`, 'invalid-redirect')); + finalize(); + return; + } + } + + // HTTP fetch step 5.5 + switch (request.redirect) { + case 'error': + reject(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${request.url}`, 'no-redirect')); + finalize(); + return; + case 'manual': + // node-fetch-specific step: make manual redirect a bit easier to use by setting the Location header value to the resolved URL. + if (locationURL !== null) { + // handle corrupted header + try { + headers.set('Location', locationURL); + } catch (err) { + // istanbul ignore next: nodejs server prevent invalid response headers, we can't test this through normal request + reject(err); + } + } + break; + case 'follow': + // HTTP-redirect fetch step 2 + if (locationURL === null) { + break; + } + + // HTTP-redirect fetch step 5 + if (request.counter >= request.follow) { + reject(new FetchError(`maximum redirect reached at: ${request.url}`, 'max-redirect')); + finalize(); + return; + } + + // HTTP-redirect fetch step 6 (counter increment) + // Create a new Request object. + const requestOpts = { + headers: new Headers(request.headers), + follow: request.follow, + counter: request.counter + 1, + agent: request.agent, + compress: request.compress, + method: request.method, + body: request.body, + signal: request.signal, + timeout: request.timeout, + size: request.size + }; + + if (!isDomainOrSubdomain(request.url, locationURL)) { + for (const name of ['authorization', 'www-authenticate', 'cookie', 'cookie2']) { + requestOpts.headers.delete(name); + } + } + + // HTTP-redirect fetch step 9 + if (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) { + reject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect')); + finalize(); + return; + } + + // HTTP-redirect fetch step 11 + if (res.statusCode === 303 || (res.statusCode === 301 || res.statusCode === 302) && request.method === 'POST') { + requestOpts.method = 'GET'; + requestOpts.body = undefined; + requestOpts.headers.delete('content-length'); + } + + // HTTP-redirect fetch step 15 + resolve(fetch(new Request(locationURL, requestOpts))); + finalize(); + return; + } + } + + // prepare response + res.once('end', function () { + if (signal) signal.removeEventListener('abort', abortAndFinalize); + }); + let body = res.pipe(new PassThrough$1()); + + const response_options = { + url: request.url, + status: res.statusCode, + statusText: res.statusMessage, + headers: headers, + size: request.size, + timeout: request.timeout, + counter: request.counter + }; + + // HTTP-network fetch step 12.1.1.3 + const codings = headers.get('Content-Encoding'); + + // HTTP-network fetch step 12.1.1.4: handle content codings + + // in following scenarios we ignore compression support + // 1. compression support is disabled + // 2. HEAD request + // 3. no Content-Encoding header + // 4. no content response (204) + // 5. content not modified response (304) + if (!request.compress || request.method === 'HEAD' || codings === null || res.statusCode === 204 || res.statusCode === 304) { + response = new Response(body, response_options); + resolve(response); + return; + } + + // For Node v6+ + // Be less strict when decoding compressed responses, since sometimes + // servers send slightly invalid responses that are still accepted + // by common browsers. + // Always using Z_SYNC_FLUSH is what cURL does. + const zlibOptions = { + flush: zlib.Z_SYNC_FLUSH, + finishFlush: zlib.Z_SYNC_FLUSH + }; + + // for gzip + if (codings == 'gzip' || codings == 'x-gzip') { + body = body.pipe(zlib.createGunzip(zlibOptions)); + response = new Response(body, response_options); + resolve(response); + return; + } + + // for deflate + if (codings == 'deflate' || codings == 'x-deflate') { + // handle the infamous raw deflate response from old servers + // a hack for old IIS and Apache servers + const raw = res.pipe(new PassThrough$1()); + raw.once('data', function (chunk) { + // see http://stackoverflow.com/questions/37519828 + if ((chunk[0] & 0x0F) === 0x08) { + body = body.pipe(zlib.createInflate()); + } else { + body = body.pipe(zlib.createInflateRaw()); + } + response = new Response(body, response_options); + resolve(response); + }); + return; + } + + // for br + if (codings == 'br' && typeof zlib.createBrotliDecompress === 'function') { + body = body.pipe(zlib.createBrotliDecompress()); + response = new Response(body, response_options); + resolve(response); + return; + } + + // otherwise, use response as-is + response = new Response(body, response_options); + resolve(response); + }); + + writeToStream(req, request); + }); +} +/** + * Redirect code matching + * + * @param Number code Status code + * @return Boolean + */ +fetch.isRedirect = function (code) { + return code === 301 || code === 302 || code === 303 || code === 307 || code === 308; +}; - const getPage = __nccwpck_require__(48604); +// expose Promise +fetch.Promise = global.Promise; - function getFirstPage(octokit, link, headers) { - return getPage(octokit, link, "first", headers); - } +module.exports = exports = fetch; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports["default"] = exports; +exports.Headers = Headers; +exports.Request = Request; +exports.Response = Response; +exports.FetchError = FetchError; - /***/ - }, - /***/ 42203: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - module.exports = getLastPage; +/***/ }), - const getPage = __nccwpck_require__(48604); +/***/ 20502: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - function getLastPage(octokit, link, headers) { - return getPage(octokit, link, "last", headers); - } +"use strict"; - /***/ - }, +const path = __nccwpck_require__(71017); +const pathKey = __nccwpck_require__(20539); - /***/ 86655: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - module.exports = getNextPage; +module.exports = opts => { + opts = Object.assign({ + cwd: process.cwd(), + path: process.env[pathKey()] + }, opts); - const getPage = __nccwpck_require__(48604); + let prev; + let pth = path.resolve(opts.cwd); + const ret = []; - function getNextPage(octokit, link, headers) { - return getPage(octokit, link, "next", headers); - } + while (prev !== pth) { + ret.push(path.join(pth, 'node_modules/.bin')); + prev = pth; + pth = path.resolve(pth, '..'); + } - /***/ - }, + // ensure the running `node` binary is used + ret.push(path.dirname(process.execPath)); - /***/ 17889: /***/ (module) => { - module.exports = getPageLinks; + return ret.concat(opts.path).join(path.delimiter); +}; - function getPageLinks(link) { - link = link.link || link.headers.link || ""; +module.exports.env = opts => { + opts = Object.assign({ + env: process.env + }, opts); - const links = {}; + const env = Object.assign({}, opts.env); + const path = pathKey({env}); - // link format: - // '; rel="next", ; rel="last"' - link.replace(/<([^>]*)>;\s*rel="([\w]*)"/g, (m, uri, type) => { - links[type] = uri; - }); + opts.path = env[path]; + env[path] = module.exports(opts); - return links; - } + return env; +}; - /***/ - }, - /***/ 48604: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - module.exports = getPage; +/***/ }), - const deprecate = __nccwpck_require__(30191); - const getPageLinks = __nccwpck_require__(17889); - const HttpError = __nccwpck_require__(46058); +/***/ 82072: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - function getPage(octokit, link, which, headers) { - deprecate( - `octokit.get${ - which.charAt(0).toUpperCase() + which.slice(1) - }Page() – You can use octokit.paginate or async iterators instead: https://github.com/octokit/rest.js#pagination.` - ); - const url = getPageLinks(link)[which]; +module.exports = paginationMethodsPlugin - if (!url) { - const urlError = new HttpError(`No ${which} page found`, 404); - return Promise.reject(urlError); - } +function paginationMethodsPlugin (octokit) { + octokit.getFirstPage = (__nccwpck_require__(49555).bind)(null, octokit) + octokit.getLastPage = (__nccwpck_require__(42203).bind)(null, octokit) + octokit.getNextPage = (__nccwpck_require__(86655).bind)(null, octokit) + octokit.getPreviousPage = (__nccwpck_require__(63032).bind)(null, octokit) + octokit.hasFirstPage = __nccwpck_require__(59631) + octokit.hasLastPage = __nccwpck_require__(64286) + octokit.hasNextPage = __nccwpck_require__(500) + octokit.hasPreviousPage = __nccwpck_require__(5996) +} - const requestOptions = { - url, - headers: applyAcceptHeader(link, headers), - }; - const promise = octokit.request(requestOptions); +/***/ }), - return promise; - } +/***/ 30191: +/***/ ((module) => { - function applyAcceptHeader(res, headers) { - const previous = res.headers && res.headers["x-github-media-type"]; +module.exports = deprecate - if (!previous || (headers && headers.accept)) { - return headers; - } - headers = headers || {}; - headers.accept = - "application/vnd." + - previous.replace("; param=", ".").replace("; format=", "+"); +const loggedMessages = {} - return headers; - } +function deprecate (message) { + if (loggedMessages[message]) { + return + } - /***/ - }, + console.warn(`DEPRECATED (@octokit/rest): ${message}`) + loggedMessages[message] = 1 +} - /***/ 63032: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - module.exports = getPreviousPage; - const getPage = __nccwpck_require__(48604); +/***/ }), - function getPreviousPage(octokit, link, headers) { - return getPage(octokit, link, "prev", headers); - } +/***/ 49555: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - /***/ - }, +module.exports = getFirstPage - /***/ 59631: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - module.exports = hasFirstPage; +const getPage = __nccwpck_require__(48604) - const deprecate = __nccwpck_require__(30191); - const getPageLinks = __nccwpck_require__(17889); +function getFirstPage (octokit, link, headers) { + return getPage(octokit, link, 'first', headers) +} - function hasFirstPage(link) { - deprecate( - `octokit.hasFirstPage() – You can use octokit.paginate or async iterators instead: https://github.com/octokit/rest.js#pagination.` - ); - return getPageLinks(link).first; - } - /***/ - }, +/***/ }), - /***/ 64286: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - module.exports = hasLastPage; +/***/ 42203: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - const deprecate = __nccwpck_require__(30191); - const getPageLinks = __nccwpck_require__(17889); +module.exports = getLastPage - function hasLastPage(link) { - deprecate( - `octokit.hasLastPage() – You can use octokit.paginate or async iterators instead: https://github.com/octokit/rest.js#pagination.` - ); - return getPageLinks(link).last; - } +const getPage = __nccwpck_require__(48604) - /***/ - }, +function getLastPage (octokit, link, headers) { + return getPage(octokit, link, 'last', headers) +} - /***/ 500: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - module.exports = hasNextPage; - const deprecate = __nccwpck_require__(30191); - const getPageLinks = __nccwpck_require__(17889); +/***/ }), - function hasNextPage(link) { - deprecate( - `octokit.hasNextPage() – You can use octokit.paginate or async iterators instead: https://github.com/octokit/rest.js#pagination.` - ); - return getPageLinks(link).next; - } +/***/ 86655: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - /***/ - }, +module.exports = getNextPage - /***/ 5996: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - module.exports = hasPreviousPage; +const getPage = __nccwpck_require__(48604) - const deprecate = __nccwpck_require__(30191); - const getPageLinks = __nccwpck_require__(17889); +function getNextPage (octokit, link, headers) { + return getPage(octokit, link, 'next', headers) +} - function hasPreviousPage(link) { - deprecate( - `octokit.hasPreviousPage() – You can use octokit.paginate or async iterators instead: https://github.com/octokit/rest.js#pagination.` - ); - return getPageLinks(link).prev; - } - /***/ - }, +/***/ }), - /***/ 46058: /***/ (module) => { - module.exports = class HttpError extends Error { - constructor(message, code, headers) { - super(message); +/***/ 17889: +/***/ ((module) => { - // Maintains proper stack trace (only available on V8) - /* istanbul ignore next */ - if (Error.captureStackTrace) { - Error.captureStackTrace(this, this.constructor); - } +module.exports = getPageLinks - this.name = "HttpError"; - this.code = code; - this.headers = headers; - } - }; +function getPageLinks (link) { + link = link.link || link.headers.link || '' - /***/ - }, + const links = {} - /***/ 1223: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var wrappy = __nccwpck_require__(62940); - module.exports = wrappy(once); - module.exports.strict = wrappy(onceStrict); + // link format: + // '; rel="next", ; rel="last"' + link.replace(/<([^>]*)>;\s*rel="([\w]*)"/g, (m, uri, type) => { + links[type] = uri + }) - once.proto = once(function () { - Object.defineProperty(Function.prototype, "once", { - value: function () { - return once(this); - }, - configurable: true, - }); + return links +} - Object.defineProperty(Function.prototype, "onceStrict", { - value: function () { - return onceStrict(this); - }, - configurable: true, - }); - }); - function once(fn) { - var f = function () { - if (f.called) return f.value; - f.called = true; - return (f.value = fn.apply(this, arguments)); - }; - f.called = false; - return f; - } +/***/ }), - function onceStrict(fn) { - var f = function () { - if (f.called) throw new Error(f.onceError); - f.called = true; - return (f.value = fn.apply(this, arguments)); - }; - var name = fn.name || "Function wrapped with `once`"; - f.onceError = name + " shouldn't be called more than once"; - f.called = false; - return f; - } +/***/ 48604: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - /***/ - }, +module.exports = getPage - /***/ 54824: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - "use strict"; +const deprecate = __nccwpck_require__(30191) +const getPageLinks = __nccwpck_require__(17889) +const HttpError = __nccwpck_require__(46058) - const os = __nccwpck_require__(22037); - const macosRelease = __nccwpck_require__(7493); - const winRelease = __nccwpck_require__(63515); +function getPage (octokit, link, which, headers) { + deprecate(`octokit.get${which.charAt(0).toUpperCase() + which.slice(1)}Page() – You can use octokit.paginate or async iterators instead: https://github.com/octokit/rest.js#pagination.`) + const url = getPageLinks(link)[which] - const osName = (platform, release) => { - if (!platform && release) { - throw new Error( - "You can't specify a `release` without specifying `platform`" - ); - } + if (!url) { + const urlError = new HttpError(`No ${which} page found`, 404) + return Promise.reject(urlError) + } - platform = platform || os.platform(); + const requestOptions = { + url, + headers: applyAcceptHeader(link, headers) + } - let id; + const promise = octokit.request(requestOptions) - if (platform === "darwin") { - if (!release && os.platform() === "darwin") { - release = os.release(); - } + return promise +} - const prefix = release - ? Number(release.split(".")[0]) > 15 - ? "macOS" - : "OS X" - : "macOS"; - id = release ? macosRelease(release).name : ""; - return prefix + (id ? " " + id : ""); - } +function applyAcceptHeader (res, headers) { + const previous = res.headers && res.headers['x-github-media-type'] - if (platform === "linux") { - if (!release && os.platform() === "linux") { - release = os.release(); - } + if (!previous || (headers && headers.accept)) { + return headers + } + headers = headers || {} + headers.accept = 'application/vnd.' + previous + .replace('; param=', '.') + .replace('; format=', '+') - id = release ? release.replace(/^(\d+\.\d+).*/, "$1") : ""; - return "Linux" + (id ? " " + id : ""); - } + return headers +} - if (platform === "win32") { - if (!release && os.platform() === "win32") { - release = os.release(); - } - id = release ? winRelease(release) : ""; - return "Windows" + (id ? " " + id : ""); - } +/***/ }), - return platform; - }; +/***/ 63032: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - module.exports = osName; +module.exports = getPreviousPage - /***/ - }, +const getPage = __nccwpck_require__(48604) - /***/ 31330: /***/ (module) => { - "use strict"; +function getPreviousPage (octokit, link, headers) { + return getPage(octokit, link, 'prev', headers) +} - module.exports = (promise, onFinally) => { - onFinally = onFinally || (() => {}); - return promise.then( - (val) => - new Promise((resolve) => { - resolve(onFinally()); - }).then(() => val), - (err) => - new Promise((resolve) => { - resolve(onFinally()); - }).then(() => { - throw err; - }) - ); - }; +/***/ }), - /***/ - }, +/***/ 59631: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - /***/ 20539: /***/ (module) => { - "use strict"; +module.exports = hasFirstPage - module.exports = (opts) => { - opts = opts || {}; +const deprecate = __nccwpck_require__(30191) +const getPageLinks = __nccwpck_require__(17889) - const env = opts.env || process.env; - const platform = opts.platform || process.platform; +function hasFirstPage (link) { + deprecate(`octokit.hasFirstPage() – You can use octokit.paginate or async iterators instead: https://github.com/octokit/rest.js#pagination.`) + return getPageLinks(link).first +} - if (platform !== "win32") { - return "PATH"; - } - return ( - Object.keys(env).find((x) => x.toUpperCase() === "PATH") || "Path" - ); - }; +/***/ }), - /***/ - }, +/***/ 64286: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - /***/ 18341: /***/ ( - module, - __unused_webpack_exports, - __nccwpck_require__ - ) => { - var once = __nccwpck_require__(1223); - var eos = __nccwpck_require__(81205); - var fs = __nccwpck_require__(57147); // we only need fs to get the ReadStream and WriteStream prototypes +module.exports = hasLastPage - var noop = function () {}; - var ancient = /^v?\.0/.test(process.version); +const deprecate = __nccwpck_require__(30191) +const getPageLinks = __nccwpck_require__(17889) - var isFn = function (fn) { - return typeof fn === "function"; - }; +function hasLastPage (link) { + deprecate(`octokit.hasLastPage() – You can use octokit.paginate or async iterators instead: https://github.com/octokit/rest.js#pagination.`) + return getPageLinks(link).last +} - var isFS = function (stream) { - if (!ancient) return false; // newer node version do not need to care about fs is a special way - if (!fs) return false; // browser - return ( - (stream instanceof (fs.ReadStream || noop) || - stream instanceof (fs.WriteStream || noop)) && - isFn(stream.close) - ); - }; - var isRequest = function (stream) { - return stream.setHeader && isFn(stream.abort); - }; +/***/ }), - var destroyer = function (stream, reading, writing, callback) { - callback = once(callback); +/***/ 500: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - var closed = false; - stream.on("close", function () { - closed = true; - }); +module.exports = hasNextPage - eos(stream, { readable: reading, writable: writing }, function (err) { - if (err) return callback(err); - closed = true; - callback(); - }); +const deprecate = __nccwpck_require__(30191) +const getPageLinks = __nccwpck_require__(17889) - var destroyed = false; - return function (err) { - if (closed) return; - if (destroyed) return; - destroyed = true; +function hasNextPage (link) { + deprecate(`octokit.hasNextPage() – You can use octokit.paginate or async iterators instead: https://github.com/octokit/rest.js#pagination.`) + return getPageLinks(link).next +} - if (isFS(stream)) return stream.close(noop); // use close for fs streams to avoid fd leaks - if (isRequest(stream)) return stream.abort(); // request.destroy just do .end - .abort is what we want - if (isFn(stream.destroy)) return stream.destroy(); +/***/ }), - callback(err || new Error("stream was destroyed")); - }; - }; +/***/ 5996: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - var call = function (fn) { - fn(); - }; +module.exports = hasPreviousPage - var pipe = function (from, to) { - return from.pipe(to); - }; +const deprecate = __nccwpck_require__(30191) +const getPageLinks = __nccwpck_require__(17889) - var pump = function () { - var streams = Array.prototype.slice.call(arguments); - var callback = - (isFn(streams[streams.length - 1] || noop) && streams.pop()) || noop; - - if (Array.isArray(streams[0])) streams = streams[0]; - if (streams.length < 2) - throw new Error("pump requires two streams per minimum"); - - var error; - var destroys = streams.map(function (stream, i) { - var reading = i < streams.length - 1; - var writing = i > 0; - return destroyer(stream, reading, writing, function (err) { - if (!error) error = err; - if (err) destroys.forEach(call); - if (reading) return; - destroys.forEach(call); - callback(error); - }); - }); +function hasPreviousPage (link) { + deprecate(`octokit.hasPreviousPage() – You can use octokit.paginate or async iterators instead: https://github.com/octokit/rest.js#pagination.`) + return getPageLinks(link).prev +} - return streams.reduce(pipe); - }; - module.exports = pump; +/***/ }), - /***/ - }, +/***/ 46058: +/***/ ((module) => { - /***/ 72043: /***/ ( - __unused_webpack_module, - exports, - __nccwpck_require__ - ) => { - (function (sax) { - // wrapper for non-node envs - sax.parser = function (strict, opt) { - return new SAXParser(strict, opt); - }; - sax.SAXParser = SAXParser; - sax.SAXStream = SAXStream; - sax.createStream = createStream; - - // When we pass the MAX_BUFFER_LENGTH position, start checking for buffer overruns. - // When we check, schedule the next check for MAX_BUFFER_LENGTH - (max(buffer lengths)), - // since that's the earliest that a buffer overrun could occur. This way, checks are - // as rare as required, but as often as necessary to ensure never crossing this bound. - // Furthermore, buffers are only tested at most once per write(), so passing a very - // large string into write() might have undesirable effects, but this is manageable by - // the caller, so it is assumed to be safe. Thus, a call to write() may, in the extreme - // edge case, result in creating at most one complete copy of the string passed in. - // Set to Infinity to have unlimited buffers. - sax.MAX_BUFFER_LENGTH = 64 * 1024; - - var buffers = [ - "comment", - "sgmlDecl", - "textNode", - "tagName", - "doctype", - "procInstName", - "procInstBody", - "entity", - "attribName", - "attribValue", - "cdata", - "script", - ]; +module.exports = class HttpError extends Error { + constructor (message, code, headers) { + super(message) - sax.EVENTS = [ - "text", - "processinginstruction", - "sgmldeclaration", - "doctype", - "comment", - "opentagstart", - "attribute", - "opentag", - "closetag", - "opencdata", - "cdata", - "closecdata", - "error", - "end", - "ready", - "script", - "opennamespace", - "closenamespace", - ]; + // Maintains proper stack trace (only available on V8) + /* istanbul ignore next */ + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor) + } - function SAXParser(strict, opt) { - if (!(this instanceof SAXParser)) { - return new SAXParser(strict, opt); - } + this.name = 'HttpError' + this.code = code + this.headers = headers + } +} - var parser = this; - clearBuffers(parser); - parser.q = parser.c = ""; - parser.bufferCheckPosition = sax.MAX_BUFFER_LENGTH; - parser.opt = opt || {}; - parser.opt.lowercase = - parser.opt.lowercase || parser.opt.lowercasetags; - parser.looseCase = parser.opt.lowercase - ? "toLowerCase" - : "toUpperCase"; - parser.tags = []; - parser.closed = parser.closedRoot = parser.sawRoot = false; - parser.tag = parser.error = null; - parser.strict = !!strict; - parser.noscript = !!(strict || parser.opt.noscript); - parser.state = S.BEGIN; - parser.strictEntities = parser.opt.strictEntities; - parser.ENTITIES = parser.strictEntities - ? Object.create(sax.XML_ENTITIES) - : Object.create(sax.ENTITIES); - parser.attribList = []; - - // namespaces form a prototype chain. - // it always points at the current tag, - // which protos to its parent tag. - if (parser.opt.xmlns) { - parser.ns = Object.create(rootNS); - } - // mostly just for error reporting - parser.trackPosition = parser.opt.position !== false; - if (parser.trackPosition) { - parser.position = parser.line = parser.column = 0; - } - emit(parser, "onready"); - } +/***/ }), - if (!Object.create) { - Object.create = function (o) { - function F() {} - F.prototype = o; - var newf = new F(); - return newf; - }; - } +/***/ 1223: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - if (!Object.keys) { - Object.keys = function (o) { - var a = []; - for (var i in o) if (o.hasOwnProperty(i)) a.push(i); - return a; - }; - } +var wrappy = __nccwpck_require__(62940) +module.exports = wrappy(once) +module.exports.strict = wrappy(onceStrict) - function checkBufferLength(parser) { - var maxAllowed = Math.max(sax.MAX_BUFFER_LENGTH, 10); - var maxActual = 0; - for (var i = 0, l = buffers.length; i < l; i++) { - var len = parser[buffers[i]].length; - if (len > maxAllowed) { - // Text/cdata nodes can get big, and since they're buffered, - // we can get here under normal conditions. - // Avoid issues by emitting the text node now, - // so at least it won't get any bigger. - switch (buffers[i]) { - case "textNode": - closeText(parser); - break; +once.proto = once(function () { + Object.defineProperty(Function.prototype, 'once', { + value: function () { + return once(this) + }, + configurable: true + }) - case "cdata": - emitNode(parser, "oncdata", parser.cdata); - parser.cdata = ""; - break; + Object.defineProperty(Function.prototype, 'onceStrict', { + value: function () { + return onceStrict(this) + }, + configurable: true + }) +}) - case "script": - emitNode(parser, "onscript", parser.script); - parser.script = ""; - break; +function once (fn) { + var f = function () { + if (f.called) return f.value + f.called = true + return f.value = fn.apply(this, arguments) + } + f.called = false + return f +} - default: - error(parser, "Max buffer length exceeded: " + buffers[i]); - } - } - maxActual = Math.max(maxActual, len); - } - // schedule the next check for the earliest possible buffer overrun. - var m = sax.MAX_BUFFER_LENGTH - maxActual; - parser.bufferCheckPosition = m + parser.position; - } +function onceStrict (fn) { + var f = function () { + if (f.called) + throw new Error(f.onceError) + f.called = true + return f.value = fn.apply(this, arguments) + } + var name = fn.name || 'Function wrapped with `once`' + f.onceError = name + " shouldn't be called more than once" + f.called = false + return f +} - function clearBuffers(parser) { - for (var i = 0, l = buffers.length; i < l; i++) { - parser[buffers[i]] = ""; - } - } - function flushBuffers(parser) { - closeText(parser); - if (parser.cdata !== "") { - emitNode(parser, "oncdata", parser.cdata); - parser.cdata = ""; - } - if (parser.script !== "") { - emitNode(parser, "onscript", parser.script); - parser.script = ""; - } - } +/***/ }), - SAXParser.prototype = { - end: function () { - end(this); - }, - write: write, - resume: function () { - this.error = null; - return this; - }, - close: function () { - return this.write(null); - }, - flush: function () { - flushBuffers(this); - }, - }; +/***/ 54824: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - var Stream; - try { - Stream = __nccwpck_require__(12781).Stream; - } catch (ex) { - Stream = function () {}; - } +"use strict"; - var streamWraps = sax.EVENTS.filter(function (ev) { - return ev !== "error" && ev !== "end"; - }); +const os = __nccwpck_require__(22037); +const macosRelease = __nccwpck_require__(7493); +const winRelease = __nccwpck_require__(63515); - function createStream(strict, opt) { - return new SAXStream(strict, opt); - } +const osName = (platform, release) => { + if (!platform && release) { + throw new Error('You can\'t specify a `release` without specifying `platform`'); + } - function SAXStream(strict, opt) { - if (!(this instanceof SAXStream)) { - return new SAXStream(strict, opt); - } + platform = platform || os.platform(); - Stream.apply(this); + let id; - this._parser = new SAXParser(strict, opt); - this.writable = true; - this.readable = true; + if (platform === 'darwin') { + if (!release && os.platform() === 'darwin') { + release = os.release(); + } - var me = this; + const prefix = release ? (Number(release.split('.')[0]) > 15 ? 'macOS' : 'OS X') : 'macOS'; + id = release ? macosRelease(release).name : ''; + return prefix + (id ? ' ' + id : ''); + } - this._parser.onend = function () { - me.emit("end"); - }; + if (platform === 'linux') { + if (!release && os.platform() === 'linux') { + release = os.release(); + } - this._parser.onerror = function (er) { - me.emit("error", er); + id = release ? release.replace(/^(\d+\.\d+).*/, '$1') : ''; + return 'Linux' + (id ? ' ' + id : ''); + } - // if didn't throw, then means error was handled. - // go ahead and clear error, so we can write again. - me._parser.error = null; - }; + if (platform === 'win32') { + if (!release && os.platform() === 'win32') { + release = os.release(); + } - this._decoder = null; - - streamWraps.forEach(function (ev) { - Object.defineProperty(me, "on" + ev, { - get: function () { - return me._parser["on" + ev]; - }, - set: function (h) { - if (!h) { - me.removeAllListeners(ev); - me._parser["on" + ev] = h; - return h; - } - me.on(ev, h); - }, - enumerable: true, - configurable: false, - }); - }); - } + id = release ? winRelease(release) : ''; + return 'Windows' + (id ? ' ' + id : ''); + } - SAXStream.prototype = Object.create(Stream.prototype, { - constructor: { - value: SAXStream, - }, - }); + return platform; +}; - SAXStream.prototype.write = function (data) { - if ( - typeof Buffer === "function" && - typeof Buffer.isBuffer === "function" && - Buffer.isBuffer(data) - ) { - if (!this._decoder) { - var SD = __nccwpck_require__(71576).StringDecoder; - this._decoder = new SD("utf8"); - } - data = this._decoder.write(data); - } +module.exports = osName; - this._parser.write(data.toString()); - this.emit("data", data); - return true; - }; - SAXStream.prototype.end = function (chunk) { - if (chunk && chunk.length) { - this.write(chunk); - } - this._parser.end(); - return true; - }; +/***/ }), - SAXStream.prototype.on = function (ev, handler) { - var me = this; - if (!me._parser["on" + ev] && streamWraps.indexOf(ev) !== -1) { - me._parser["on" + ev] = function () { - var args = - arguments.length === 1 - ? [arguments[0]] - : Array.apply(null, arguments); - args.splice(0, 0, ev); - me.emit.apply(me, args); - }; - } +/***/ 31330: +/***/ ((module) => { - return Stream.prototype.on.call(me, ev, handler); - }; +"use strict"; - // character classes and tokens - var whitespace = "\r\n\t "; - - // this really needs to be replaced with character classes. - // XML allows all manner of ridiculous numbers and digits. - var number = "0124356789"; - var letter = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; - - // (Letter | "_" | ":") - var quote = "'\""; - var attribEnd = whitespace + ">"; - var CDATA = "[CDATA["; - var DOCTYPE = "DOCTYPE"; - var XML_NAMESPACE = "http://www.w3.org/XML/1998/namespace"; - var XMLNS_NAMESPACE = "http://www.w3.org/2000/xmlns/"; - var rootNS = { xml: XML_NAMESPACE, xmlns: XMLNS_NAMESPACE }; - - // turn all the string character sets into character class objects. - whitespace = charClass(whitespace); - number = charClass(number); - letter = charClass(letter); - - // http://www.w3.org/TR/REC-xml/#NT-NameStartChar - // This implementation works on strings, a single character at a time - // as such, it cannot ever support astral-plane characters (10000-EFFFF) - // without a significant breaking change to either this parser, or the - // JavaScript language. Implementation of an emoji-capable xml parser - // is left as an exercise for the reader. - var nameStart = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/; - - var nameBody = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040\.\d-]/; - - var entityStart = /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/; - var entityBody = /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040\.\d-]/; - - quote = charClass(quote); - attribEnd = charClass(attribEnd); - - function charClass(str) { - return str.split("").reduce(function (s, c) { - s[c] = true; - return s; - }, {}); - } - - function isRegExp(c) { - return Object.prototype.toString.call(c) === "[object RegExp]"; - } - - function is(charclass, c) { - return isRegExp(charclass) ? !!c.match(charclass) : charclass[c]; - } - - function not(charclass, c) { - return !is(charclass, c); - } - - var S = 0; - sax.STATE = { - BEGIN: S++, // leading byte order mark or whitespace - BEGIN_WHITESPACE: S++, // leading whitespace - TEXT: S++, // general stuff - TEXT_ENTITY: S++, // & and such. - OPEN_WAKA: S++, // < - SGML_DECL: S++, // - SCRIPT: S++, //