From f8415c0af77664f05f724af9a4df28ef359885e5 Mon Sep 17 00:00:00 2001 From: Eli Polonsky Date: Thu, 14 Nov 2024 10:28:51 +0200 Subject: [PATCH 1/8] chore: disable codecov from `v2-release` branch (#32125) In https://github.com/aws/aws-cdk/pull/32082, we added codecov checks to mergify merge conditions. This, as originally intended, blocked merging to both the `main` and the `v2-release` branches. However, we decided that currently we won't be applying codecov on the `v2-release` branch because it is redundant. Ideally, to achieve this, we would remove the conditions only from the mergify configuration that applies to the `v2-release` branch. But our configuration isn't set up that way right now, it doesn't distinguish between branches. Luckily, mergify will [automatically honor branch protection rules](https://github.com/Mergifyio/mergify/discussions/2184#discussioncomment-452783), so we can safely remove the branch dependant conditions from mergify all together, and keep them only in branch protection rules (which we already configured). Once this PR is merged, I will also remove the codecov branch protection from `v2-release` (but keep it on `main`). ## Additional Changes There's some additional codecov related cleanup we need to do so might as well. They are explained as review comments. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .github/workflows/codecov.yml | 8 ++++--- .mergify.yml | 24 ------------------- packages/aws-cdk/jest.config.js | 3 ++- packages/aws-cdk/lib/api/logs/logs-monitor.ts | 6 ++--- 4 files changed, 10 insertions(+), 31 deletions(-) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index c313f13efc77d..ec63ae9bdb394 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -11,6 +11,8 @@ jobs: name: collect if: github.repository == 'aws/aws-cdk' runs-on: ubuntu-latest + permissions: + id-token: write steps: - name: Checkout uses: actions/checkout@v4 @@ -19,10 +21,10 @@ jobs: uses: actions/setup-node@v4 - name: Install dependencies - run: cd packages/aws-cdk && yarn install + run: yarn install - name: Build CLI - run: cd packages/aws-cdk && npx lerna run build --scope=aws-cdk + run: npx lerna run build --scope=aws-cdk - name: Run tests run: cd packages/aws-cdk && yarn test @@ -33,4 +35,4 @@ jobs: directory: packages/aws-cdk/coverage fail_ci_if_error: true flags: suite.unit - token: ${{ secrets.CODECOV_TOKEN }} + use_oidc: true diff --git a/.mergify.yml b/.mergify.yml index 98299ebd0e518..b9ffeae147913 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -15,10 +15,6 @@ queue_rules: - "#changes-requested-reviews-by=0" - status-success~=AWS CodeBuild us-east-1 - status-success=validate-pr - - status-success=codecov/patch - - status-success=codecov/patch/packages/aws-cdk - - status-success=codecov/project - - status-success=codecov/project/packages/aws-cdk commit_message_template: |- {{ title }} (#{{ number }}) {{ body }} @@ -37,10 +33,6 @@ queue_rules: - "#changes-requested-reviews-by=0" - status-success~=AWS CodeBuild us-east-1 - status-success=validate-pr - - status-success=codecov/patch - - status-success=codecov/patch/packages/aws-cdk - - status-success=codecov/project - - status-success=codecov/project/packages/aws-cdk commit_message_template: |- {{ title }} (#{{ number }}) {{ body }} @@ -72,10 +64,6 @@ pull_request_rules: - "#changes-requested-reviews-by=0" - status-success~=AWS CodeBuild us-east-1 - status-success=validate-pr - - status-success=codecov/patch - - status-success=codecov/patch/packages/aws-cdk - - status-success=codecov/project - - status-success=codecov/project/packages/aws-cdk - name: automatic merge (2+ approvers) actions: comment: @@ -96,10 +84,6 @@ pull_request_rules: - "#changes-requested-reviews-by=0" - status-success~=AWS CodeBuild us-east-1 - status-success=validate-pr - - status-success=codecov/patch - - status-success=codecov/patch/packages/aws-cdk - - status-success=codecov/project - - status-success=codecov/project/packages/aws-cdk - name: automatic merge (no-squash) actions: comment: @@ -120,10 +104,6 @@ pull_request_rules: - "#changes-requested-reviews-by=0" - status-success~=AWS CodeBuild us-east-1 - status-success=validate-pr - - status-success=codecov/patch - - status-success=codecov/patch/packages/aws-cdk - - status-success=codecov/project - - status-success=codecov/project/packages/aws-cdk - name: remove stale reviews actions: dismiss_reviews: @@ -163,7 +143,3 @@ pull_request_rules: - "#changes-requested-reviews-by=0" - status-success~=AWS CodeBuild us-east-1 - status-success=validate-pr - - status-success=codecov/patch - - status-success=codecov/patch/packages/aws-cdk - - status-success=codecov/project - - status-success=codecov/project/packages/aws-cdk diff --git a/packages/aws-cdk/jest.config.js b/packages/aws-cdk/jest.config.js index 6519819936478..a6aa99d846bfa 100644 --- a/packages/aws-cdk/jest.config.js +++ b/packages/aws-cdk/jest.config.js @@ -12,7 +12,8 @@ module.exports = { lines: 81 }, }, - "coveragePathIgnorePatterns": [ + coveragePathIgnorePatterns: [ + ...baseConfig.coveragePathIgnorePatterns, // Mostly wrappers around the SDK, which get mocked in unit tests "/lib/api/aws-auth/sdk.ts", ], diff --git a/packages/aws-cdk/lib/api/logs/logs-monitor.ts b/packages/aws-cdk/lib/api/logs/logs-monitor.ts index c2757514a1463..5594d3f4cb8ff 100644 --- a/packages/aws-cdk/lib/api/logs/logs-monitor.ts +++ b/packages/aws-cdk/lib/api/logs/logs-monitor.ts @@ -124,10 +124,10 @@ export class CloudWatchLogEventMonitor { } private async tick(): Promise { + // excluding from codecoverage because this + // doesn't always run (depends on timing) + /* istanbul ignore next */ if (!this.active) { - // excluding from codecoverage because this - // doesn't always run (depends on timing) - /* istanbul ignore next */ return; } try { From d5c0aa2864a80387c858d4db68e65aab4bf67f3f Mon Sep 17 00:00:00 2001 From: Momo Kornher Date: Thu, 14 Nov 2024 09:08:11 +0000 Subject: [PATCH 2/8] fix(cdk): remove source-map-support from typescript init templates (#32113) ### Issue Closes #20754 Closes #30231 ### Reason for this change This package is no longer needed and not recommended for users. ### Description of changes Remove the package from `package.json` and sample code. ### Description of how you validated changes Tested locally. ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../lib/init-templates/app/typescript/bin/%name%.template.ts | 1 - .../aws-cdk/lib/init-templates/app/typescript/package.json | 5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/aws-cdk/lib/init-templates/app/typescript/bin/%name%.template.ts b/packages/aws-cdk/lib/init-templates/app/typescript/bin/%name%.template.ts index fb6e9d5085377..7c042a481ef79 100644 --- a/packages/aws-cdk/lib/init-templates/app/typescript/bin/%name%.template.ts +++ b/packages/aws-cdk/lib/init-templates/app/typescript/bin/%name%.template.ts @@ -1,5 +1,4 @@ #!/usr/bin/env node -import 'source-map-support/register'; import * as cdk from 'aws-cdk-lib'; import { %name.PascalCased%Stack } from '../lib/%name%-stack'; diff --git a/packages/aws-cdk/lib/init-templates/app/typescript/package.json b/packages/aws-cdk/lib/init-templates/app/typescript/package.json index 9214e64bfe560..ed030600773d3 100644 --- a/packages/aws-cdk/lib/init-templates/app/typescript/package.json +++ b/packages/aws-cdk/lib/init-templates/app/typescript/package.json @@ -21,7 +21,6 @@ }, "dependencies": { "aws-cdk-lib": "%cdk-version%", - "constructs": "%constructs-version%", - "source-map-support": "^0.5.21" + "constructs": "%constructs-version%" } -} \ No newline at end of file +} From 36d4d1a98cd30e255a96debcbf167d42cd3df23f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Nov 2024 09:38:10 +0000 Subject: [PATCH 3/8] chore(deps): bump tj-actions/changed-files from 45.0.3 to 45.0.4 (#32086) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 45.0.3 to 45.0.4.
Release notes

Sourced from tj-actions/changed-files's releases.

v45.0.4

What's Changed

Full Changelog: https://github.com/tj-actions/changed-files/compare/v45...v45.0.4

Changelog

Sourced from tj-actions/changed-files's changelog.

Changelog

45.0.4 - (2024-11-05)

🚀 Features

  • Prevent ignore files warning (#2318) (1f772e9) - (Tonye Jack)

🐛 Bug Fixes

  • deps: Update dependency @​actions/core to v1.11.1 (4d0aab9) - (renovate[bot])

➕ Add

  • Added missing changes and modified dist assets. (9d7201d) - (GitHub Action)
  • Added missing changes and modified dist assets. (0104c75) - (GitHub Action)

📝 Other

⚙️ Miscellaneous Tasks

  • deps: Update dependency eslint-plugin-jest to v28.9.0 (4edd678) - (renovate[bot])
  • deps: Update dependency @​types/node to v22.9.0 (f082558) - (renovate[bot])
  • deps: Lock file maintenance (92c02a0) - (renovate[bot])
  • deps: Update dependency @​types/node to v22.8.7 (b702211) - (renovate[bot])
  • deps: Update dependency @​types/node to v22.8.6 (435fd74) - (renovate[bot])
  • deps: Update dependency @​types/node to v22.8.5 (0626fa3) - (renovate[bot])
  • deps: Update dependency @​types/lodash to v4.17.13 (8817a79) - (renovate[bot])
  • deps: Update dependency @​types/node to v22.8.4 (5417491) - (renovate[bot])
  • deps: Update dependency @​types/node to v22.8.2 (84ef162) - (renovate[bot])
  • deps: Lock file maintenance (b672a51) - (renovate[bot])
  • deps: Update dependency @​types/node to v22.8.1 (678cdc2) - (renovate[bot])
  • deps: Update dependency @​types/node to v22.8.0 (27b7bbb) - (renovate[bot])
  • deps: Update actions/setup-node action to v4.1.0 (8361072) - (renovate[bot])
  • deps: Update dependency @​types/node to v22.7.9 (21acf46) - (renovate[bot])
  • deps: Update dependency @​types/jest to v29.5.14 (f356b3c) - (renovate[bot])
  • deps: Update dependency @​types/node to v22.7.8 (66275de) - (renovate[bot])
  • deps: Lock file maintenance (a16702b) - (renovate[bot])
  • deps: Update dependency @​types/lodash to v4.17.12 (aa11897) - (renovate[bot])
  • deps: Update dependency @​types/node to v22.7.7 (6513fe1) - (renovate[bot])
  • deps: Update dependency @​types/lodash to v4.17.11 (45e0c78) - (renovate[bot])
  • deps: Update dependency @​types/node to v22.7.6 (a949a83) - (renovate[bot])
  • deps: Lock file maintenance (f93ff33) - (renovate[bot])
  • deps: Update dependency typescript to v5.6.3 (729c704) - (renovate[bot])
  • deps: Update dependency @​types/node to v22.7.5 (2009d44) - (renovate[bot])
  • deps: Lock file maintenance (b693fc2) - (renovate[bot])

... (truncated)

Commits
  • 4edd678 chore(deps): update dependency eslint-plugin-jest to v28.9.0
  • f082558 chore(deps): update dependency @​types/node to v22.9.0
  • 92c02a0 chore(deps): lock file maintenance
  • b702211 chore(deps): update dependency @​types/node to v22.8.7
  • 435fd74 chore(deps): update dependency @​types/node to v22.8.6
  • 0626fa3 chore(deps): update dependency @​types/node to v22.8.5
  • 8817a79 chore(deps): update dependency @​types/lodash to v4.17.13
  • 5417491 chore(deps): update dependency @​types/node to v22.8.4
  • 84ef162 chore(deps): update dependency @​types/node to v22.8.2
  • b672a51 chore(deps): lock file maintenance
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=tj-actions/changed-files&package-manager=github_actions&previous-version=45.0.3&new-version=45.0.4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- .github/workflows/request-cli-integ-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/request-cli-integ-test.yml b/.github/workflows/request-cli-integ-test.yml index 7a477ac68655e..5d48cbaee41f0 100644 --- a/.github/workflows/request-cli-integ-test.yml +++ b/.github/workflows/request-cli-integ-test.yml @@ -19,7 +19,7 @@ jobs: persist-credentials: false - name: Find changed cli files id: changed-cli-files - uses: tj-actions/changed-files@c3a1bb2c992d77180ae65be6ae6c166cf40f857c + uses: tj-actions/changed-files@4edd678ac3f81e2dc578756871e4d00c19191daf with: base_sha: ${{ github.event.pull_request.base.sha }} files_yaml: | From fb97684de54da5e2815851edda50bebe980f8eb5 Mon Sep 17 00:00:00 2001 From: Eli Polonsky Date: Thu, 14 Nov 2024 12:29:25 +0200 Subject: [PATCH 4/8] chore: use codecov token instead of OIDC (#32129) For PR from forks, OIDC doesn't currently work with the latest version of the GitHub Action. [Example failure](https://github.com/aws/aws-cdk/actions/runs/11834319601/job/32974759899?pr=32121): ```console Run codecov/codecov-action@v4 Error: Codecov: Failed to get OIDC token with url: https://codecov.io/. Error message: Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable ``` See https://github.com/codecov/codecov-action/issues/1594 Revert back to token until we validate a fix. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .github/workflows/codecov.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index ec63ae9bdb394..0920cc4e5515f 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -11,8 +11,6 @@ jobs: name: collect if: github.repository == 'aws/aws-cdk' runs-on: ubuntu-latest - permissions: - id-token: write steps: - name: Checkout uses: actions/checkout@v4 @@ -35,4 +33,4 @@ jobs: directory: packages/aws-cdk/coverage fail_ci_if_error: true flags: suite.unit - use_oidc: true + token: ${{ secrets.CODECOV_TOKEN }} From 339fed1585344a212464243cf4da517272ce3a9c Mon Sep 17 00:00:00 2001 From: Eli Polonsky Date: Thu, 14 Nov 2024 16:31:40 +0200 Subject: [PATCH 5/8] chore(contributing): mention manual PR merge option (#32126) Folks are probably already doing this, but just clarify that when a PR is failing status checks you can ping a maintainer for a manual merge if you think its justified. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- CONTRIBUTING.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 81dfff28ae4ce..98f02c5fa0f92 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -804,6 +804,11 @@ console.log('This cannot be covered') * Once approved and tested, one of our bots will squash-merge to main and will use your PR title/description as the commit message. +> [!NOTE] +> If your PR is failing one of the required checks (e.g Codecov), it will not be auto-merged. If you believe the PR should be merged +> inspite of this, let a maintainer know. The maintainer may agree and merge the PR manually, or ask you to address the failing checks. + + ## Breaking Changes **_NOTE_**: _Starting with version 2.0.0 of the AWS CDK, **all modules and members vended as part of the main CDK library**_ From 9ef4e72663d33fe0cfaaaf31a1ee46925d5bc330 Mon Sep 17 00:00:00 2001 From: Otavio Macedo <288203+otaviomacedo@users.noreply.github.com> Date: Thu, 14 Nov 2024 15:44:12 +0000 Subject: [PATCH 6/8] fix(cli): failure to get credentials when session token is not set (#32134) In Node.js, if you assign `undefined` to an environment variable, that variable ends up having the string `"undefined"`. If we are using IAM user credentials, `AWS_SESSION_TOKEN` should not be set, but because we were not handling this edge case, it was getting assigned an invalid value: ``` Welcome to Node.js v22.9.0. Type ".help" for more information. > process.env.AWS_SESSION_TOKEN || process.env.AMAZON_SESSION_TOKEN undefined > process.env.AWS_SESSION_TOKEN = process.env.AWS_SESSION_TOKEN || process.env.AMAZON_SESSION_TOKEN undefined > process.env.AWS_SESSION_TOKEN 'undefined' ``` Closes https://github.com/aws/aws-cdk/issues/32120. ### Checklist - [ ] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../lib/api/aws-auth/awscli-compatible.ts | 7 ++- .../api/aws-auth/awscli-compatible.test.ts | 45 +++++++++++++++++++ 2 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 packages/aws-cdk/test/api/aws-auth/awscli-compatible.test.ts diff --git a/packages/aws-cdk/lib/api/aws-auth/awscli-compatible.ts b/packages/aws-cdk/lib/api/aws-auth/awscli-compatible.ts index 58bb2138ef9ba..782a7a2222b11 100644 --- a/packages/aws-cdk/lib/api/aws-auth/awscli-compatible.ts +++ b/packages/aws-cdk/lib/api/aws-auth/awscli-compatible.ts @@ -182,11 +182,16 @@ function caBundlePathFromEnvironment(): string | undefined { 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; - process.env.AWS_SESSION_TOKEN = process.env.AWS_SESSION_TOKEN || process.env.AMAZON_SESSION_TOKEN; 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; } diff --git a/packages/aws-cdk/test/api/aws-auth/awscli-compatible.test.ts b/packages/aws-cdk/test/api/aws-auth/awscli-compatible.test.ts new file mode 100644 index 0000000000000..1c9ef12e45624 --- /dev/null +++ b/packages/aws-cdk/test/api/aws-auth/awscli-compatible.test.ts @@ -0,0 +1,45 @@ +import { AwsCliCompatible } from '../../../lib/api/aws-auth/awscli-compatible'; + +describe('Session token', () => { + beforeEach(() => { + process.env.AWS_ACCESS_KEY_ID = 'foo'; + process.env.AWS_SECRET_ACCESS_KEY = 'bar'; + }); + + test('does not mess up with session token env variables if they are undefined', async () => { + // Making sure these variables are not defined + delete process.env.AWS_SESSION_TOKEN; + delete process.env.AMAZON_SESSION_TOKEN; + + await AwsCliCompatible.credentialChainBuilder(); + + expect(process.env.AWS_SESSION_TOKEN).toBeUndefined(); + }); + + test('preserves AWS_SESSION_TOKEN if it is defined', async () => { + process.env.AWS_SESSION_TOKEN = 'aaa'; + delete process.env.AMAZON_SESSION_TOKEN; + + await AwsCliCompatible.credentialChainBuilder(); + + expect(process.env.AWS_SESSION_TOKEN).toEqual('aaa'); + }); + + test('assigns AWS_SESSION_TOKEN if it is not defined but AMAZON_SESSION_TOKEN is', async () => { + delete process.env.AWS_SESSION_TOKEN; + process.env.AMAZON_SESSION_TOKEN = 'aaa'; + + await AwsCliCompatible.credentialChainBuilder(); + + expect(process.env.AWS_SESSION_TOKEN).toEqual('aaa'); + }); + + test('preserves AWS_SESSION_TOKEN if both are defined', async () => { + process.env.AWS_SESSION_TOKEN = 'aaa'; + process.env.AMAZON_SESSION_TOKEN = 'bbb'; + + await AwsCliCompatible.credentialChainBuilder(); + + expect(process.env.AWS_SESSION_TOKEN).toEqual('aaa'); + }); +}); \ No newline at end of file From 5d499dcb0ee2a056a644affad51b65c7964fbe9d Mon Sep 17 00:00:00 2001 From: Momo Kornher Date: Thu, 14 Nov 2024 16:14:13 +0000 Subject: [PATCH 7/8] fix(cdk): use built-in source map support (#32115) ### Reason for this change We don't need to use the third party `source-map-support` package anymore to achieve the same result. ### Description of changes We use `process.setSourceMapsEnabled(true)` instead. However unlike the previous package, this command needs to be run _before_ we import any other files, otherwise it won't work. We therefore move it into the executable. ### Description of how you validated changes Manual verification ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../cli-lib-alpha/THIRD_PARTY_LICENSES | 474 ------------------ packages/@aws-cdk/cli-lib-alpha/package.json | 1 + packages/aws-cdk/THIRD_PARTY_LICENSES | 63 --- packages/aws-cdk/bin/cdk | 5 + packages/aws-cdk/lib/cli.ts | 5 - packages/aws-cdk/package.json | 3 +- yarn.lock | 14 +- 7 files changed, 14 insertions(+), 551 deletions(-) diff --git a/packages/@aws-cdk/cli-lib-alpha/THIRD_PARTY_LICENSES b/packages/@aws-cdk/cli-lib-alpha/THIRD_PARTY_LICENSES index e31b9c6d28124..bdef416e7ed88 100644 --- a/packages/@aws-cdk/cli-lib-alpha/THIRD_PARTY_LICENSES +++ b/packages/@aws-cdk/cli-lib-alpha/THIRD_PARTY_LICENSES @@ -21816,211 +21816,6 @@ Apache License ---------------- -** @smithy/node-http-handler@3.2.4 - https://www.npmjs.com/package/@smithy/node-http-handler/v/3.2.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 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-http-handler@3.2.5 - https://www.npmjs.com/package/@smithy/node-http-handler/v/3.2.5 | Apache-2.0 Apache License Version 2.0, January 2004 @@ -22431,212 +22226,6 @@ Apache License ---------------- -** @smithy/protocol-http@4.1.4 - https://www.npmjs.com/package/@smithy/protocol-http/v/4.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/protocol-http@4.1.5 - https://www.npmjs.com/package/@smithy/protocol-http/v/4.1.5 | Apache-2.0 Apache License Version 2.0, January 2004 @@ -28300,32 +27889,6 @@ FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TOR ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ----------------- - -** buffer-from@1.1.2 - https://www.npmjs.com/package/buffer-from/v/1.1.2 | MIT -MIT License - -Copyright (c) 2016, 2018 Linus Unnebäck - -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 @@ -30348,43 +29911,6 @@ The above copyright notice and this permission notice shall be included in all c 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-support@0.5.21 - https://www.npmjs.com/package/source-map-support/v/0.5.21 | MIT - ----------------- - -** 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. - - ---------------- ** string_decoder@1.1.1 - https://www.npmjs.com/package/string_decoder/v/1.1.1 | MIT diff --git a/packages/@aws-cdk/cli-lib-alpha/package.json b/packages/@aws-cdk/cli-lib-alpha/package.json index f324871121491..49a48e313c633 100644 --- a/packages/@aws-cdk/cli-lib-alpha/package.json +++ b/packages/@aws-cdk/cli-lib-alpha/package.json @@ -87,6 +87,7 @@ "aws-cdk-lib": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^29.5.14", + "@types/node": "^18.18.14", "aws-cdk": "0.0.0", "constructs": "^10.0.0", "jest": "^29.7.0", diff --git a/packages/aws-cdk/THIRD_PARTY_LICENSES b/packages/aws-cdk/THIRD_PARTY_LICENSES index ed01726f1acb7..b4da7ccc205a4 100644 --- a/packages/aws-cdk/THIRD_PARTY_LICENSES +++ b/packages/aws-cdk/THIRD_PARTY_LICENSES @@ -27682,32 +27682,6 @@ FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TOR ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ----------------- - -** buffer-from@1.1.2 - https://www.npmjs.com/package/buffer-from/v/1.1.2 | MIT -MIT License - -Copyright (c) 2016, 2018 Linus Unnebäck - -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 @@ -29730,43 +29704,6 @@ The above copyright notice and this permission notice shall be included in all c 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-support@0.5.21 - https://www.npmjs.com/package/source-map-support/v/0.5.21 | MIT - ----------------- - -** 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. - - ---------------- ** string_decoder@1.1.1 - https://www.npmjs.com/package/string_decoder/v/1.1.1 | MIT diff --git a/packages/aws-cdk/bin/cdk b/packages/aws-cdk/bin/cdk index 280814a578a49..46528824d34a8 100755 --- a/packages/aws-cdk/bin/cdk +++ b/packages/aws-cdk/bin/cdk @@ -1,2 +1,7 @@ #!/usr/bin/env node + +// source maps must be enabled before importing files +if (process.argv.includes('--debug')) { + process.setSourceMapsEnabled(true); +} require('./cdk.js'); diff --git a/packages/aws-cdk/lib/cli.ts b/packages/aws-cdk/lib/cli.ts index fec8f492b9d2a..567dfd6201ab9 100644 --- a/packages/aws-cdk/lib/cli.ts +++ b/packages/aws-cdk/lib/cli.ts @@ -1,7 +1,6 @@ import * as cxapi from '@aws-cdk/cx-api'; import '@jsii/check-node/run'; import * as chalk from 'chalk'; -import { install as enableSourceMapSupport } from 'source-map-support'; import { DeploymentMethod } from './api'; import { HotswapMode } from './api/hotswap/common'; @@ -53,10 +52,6 @@ export async function exec(args: string[], synthesizer?: Synthesizer): Promise 2) { enableTracing(true); diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index 4cad33d3794d2..c88cccd69e81d 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -76,11 +76,11 @@ "@types/fs-extra": "^9.0.13", "@types/glob": "^7.2.0", "@types/jest": "^29.5.12", + "@types/node": "^18.18.14", "@types/mockery": "^1.4.33", "@types/promptly": "^3.0.5", "@types/semver": "^7.5.8", "@types/sinon": "^9.0.11", - "@types/source-map-support": "^0.5.10", "@types/table": "^6.3.2", "@types/uuid": "^8.3.4", "@types/wrap-ansi": "^3.0.0", @@ -149,7 +149,6 @@ "promptly": "^3.2.0", "proxy-agent": "^6.4.0", "semver": "^7.6.3", - "source-map-support": "^0.5.21", "strip-ansi": "^6.0.1", "table": "^6.8.2", "uuid": "^8.3.2", diff --git a/yarn.lock b/yarn.lock index 8431c77e679e3..dbd1ef6322cc9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6315,6 +6315,13 @@ dependencies: undici-types "~5.26.4" +"@types/node@^18.18.14": + version "18.19.64" + resolved "https://registry.npmjs.org/@types/node/-/node-18.19.64.tgz#122897fb79f2a9ec9c979bded01c11461b2b1478" + integrity sha512-955mDqvO2vFf/oL7V3WiUtiz+BugyX8uVbaT2H8oj3+8dRyH2FLiNdowe7eNqRM7IOIZvzDH76EoAT+gwm6aIQ== + dependencies: + undici-types "~5.26.4" + "@types/normalize-package-data@^2.4.0": version "2.4.4" resolved "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz#56e2cc26c397c038fab0e3a917a12d5c5909e901" @@ -6385,13 +6392,6 @@ resolved "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.5.tgz#5fd3592ff10c1e9695d377020c033116cc2889f2" integrity sha512-mQkU2jY8jJEF7YHjHvsQO8+3ughTL1mcnn96igfhONmR+fUPSKIkefQYpSe8bsly2Ep7oQbn/6VG5/9/0qcArQ== -"@types/source-map-support@^0.5.10": - version "0.5.10" - resolved "https://registry.npmjs.org/@types/source-map-support/-/source-map-support-0.5.10.tgz#824dcef989496bae98e9d04c8dc1ac1d70e1bd39" - integrity sha512-tgVP2H469x9zq34Z0m/fgPewGhg/MLClalNOiPIzQlXrSS2YrKu/xCdSCKnEDwkFha51VKEKB6A9wW26/ZNwzA== - dependencies: - source-map "^0.6.0" - "@types/stack-utils@^2.0.0": version "2.0.3" resolved "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz#6209321eb2c1712a7e7466422b8cb1fc0d9dd5d8" From 92bfb59e96b5bc26db0ee72d1cd3b96107e4ff93 Mon Sep 17 00:00:00 2001 From: Grace Luo <54298030+gracelu0@users.noreply.github.com> Date: Thu, 14 Nov 2024 10:30:37 -0800 Subject: [PATCH 8/8] chore(scheduler-targets-alpha): readme updates (#32123) ### Issue # (if applicable) Tracking: #31785 ### Reason for this change Improve README quality. ### Description of changes Mostly grammar and formatting fixes. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../@aws-cdk/aws-scheduler-alpha/README.md | 34 +++++-------- .../aws-scheduler-targets-alpha/README.md | 51 +++++++++---------- 2 files changed, 39 insertions(+), 46 deletions(-) diff --git a/packages/@aws-cdk/aws-scheduler-alpha/README.md b/packages/@aws-cdk/aws-scheduler-alpha/README.md index 1babcd6e8671b..d2c17485b1365 100644 --- a/packages/@aws-cdk/aws-scheduler-alpha/README.md +++ b/packages/@aws-cdk/aws-scheduler-alpha/README.md @@ -16,8 +16,7 @@ [Amazon EventBridge Scheduler](https://aws.amazon.com/blogs/compute/introducing-amazon-eventbridge-scheduler/) is a feature from Amazon EventBridge -that allows you to create, run, and manage scheduled tasks at scale. With EventBridge Scheduler, you can schedule one-time or recurrently tens -of millions of tasks across many AWS services without provisioning or managing underlying infrastructure. +that allows you to create, run, and manage scheduled tasks at scale. With EventBridge Scheduler, you can schedule millions of one-time or recurring tasks across various AWS services without provisioning or managing underlying infrastructure. 1. **Schedule**: A schedule is the main resource you create, configure, and manage using Amazon EventBridge Scheduler. Every schedule has a schedule expression that determines when, and with what frequency, the schedule runs. EventBridge Scheduler supports three types of schedules: rate, cron, and one-time schedules. When you create a schedule, you configure a target for the schedule to invoke. 2. **Target**: A target is an API operation that EventBridge Scheduler calls on your behalf every time your schedule runs. EventBridge Scheduler @@ -28,12 +27,8 @@ more than 6,000 API operations across over 270 AWS services. 3. **Schedule Group**: A schedule group is an Amazon EventBridge Scheduler resource that you use to organize your schedules. Your AWS account comes with a default scheduler group. A new schedule will always be added to a scheduling group. If you do not provide a scheduling group to add to, it will be added to the default scheduling group. You can create up to 500 schedule groups in your AWS account. Groups can be used to organize the -schedules logically, access the schedule metrics and manage permissions at group granularity (see details below). Scheduling groups support tagging: -with EventBridge Scheduler, you apply tags to schedule groups, not to individual schedules to organize your resources. - -This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. It allows you to define Event Bridge Schedules. - -> This module is in active development. Some features may not be implemented yet. +schedules logically, access the schedule metrics and manage permissions at group granularity (see details below). Schedule groups support tagging. +With EventBridge Scheduler, you apply tags to schedule groups, not to individual schedules to organize your resources. ## Defining a schedule @@ -49,7 +44,7 @@ const target = new targets.LambdaInvoke(fn, { const schedule = new Schedule(this, 'Schedule', { schedule: ScheduleExpression.rate(Duration.minutes(10)), target, - description: 'This is a test schedule that invokes lambda function every 10 minutes.', + description: 'This is a test schedule that invokes a lambda function every 10 minutes.', }); ``` @@ -167,7 +162,7 @@ A list of supported targets can be found at `@aws-cdk/aws-scheduler-targets-alph ### Input -Targets can be invoked with a custom input. The `ScheduleTargetInput`class supports free-form text input and JSON-formatted object input: +Targets can be invoked with a custom input. The `ScheduleTargetInput` class supports free-form text input and JSON-formatted object input: ```ts const input = ScheduleTargetInput.fromObject({ @@ -180,9 +175,9 @@ its respective value and deliver it to the target. See [full list of supported context attributes](https://docs.aws.amazon.com/scheduler/latest/UserGuide/managing-schedule-context-attributes.html): 1. `ContextAttribute.scheduleArn()` – The ARN of the schedule. -2. `ContextAttribute.scheduledTime()` – The time you specified for the schedule to invoke its target, for example, 2022-03-22T18:59:43Z. -3. `ContextAttribute.executionId()` – The unique ID that EventBridge Scheduler assigns for each attempted invocation of a target, for example, d32c5kddcf5bb8c3. -4. `ContextAttribute.attemptNumber()` – A counter that identifies the attempt number for the current invocation, for example, 1. +2. `ContextAttribute.scheduledTime()` – The time you specified for the schedule to invoke its target, e.g., 2022-03-22T18:59:43Z. +3. `ContextAttribute.executionId()` – The unique ID that EventBridge Scheduler assigns for each attempted invocation of a target, e.g., d32c5kddcf5bb8c3. +4. `ContextAttribute.attemptNumber()` – A counter that identifies the attempt number for the current invocation, e.g., 1. ```ts const text = `Attempt number: ${ContextAttribute.attemptNumber}`; @@ -195,7 +190,7 @@ An execution role is an IAM role that EventBridge Scheduler assumes in order to The classes for templated schedule targets automatically create an IAM role with all the minimum necessary permissions to interact with the templated target. If you wish you may specify your own IAM role, then the templated targets -will grant minimal required permissions. For example, the target `LambdaInvoke` will grant the +will grant minimal required permissions. For example, the `LambdaInvoke` target will grant the IAM execution role `lambda:InvokeFunction` permission to invoke the Lambda function. ```ts @@ -239,12 +234,12 @@ const schedule = new Schedule(this, 'Schedule', { }); ``` -> Visit [Data protection in Amazon EventBridge Scheduler](https://docs.aws.amazon.com/scheduler/latest/UserGuide/data-protection.html) for more details. +> See [Data protection in Amazon EventBridge Scheduler](https://docs.aws.amazon.com/scheduler/latest/UserGuide/data-protection.html) for more details. ## Configuring flexible time windows You can configure flexible time windows by specifying the `timeWindow` property. -Flexible time windows is disabled by default. +Flexible time windows are disabled by default. ```ts declare const target: targets.LambdaInvoke; @@ -256,7 +251,7 @@ const schedule = new Schedule(this, 'Schedule', { }); ``` -> Visit [Configuring flexible time windows](https://docs.aws.amazon.com/scheduler/latest/UserGuide/managing-schedule-flexible-time-windows.html) for more details. +> See [Configuring flexible time windows](https://docs.aws.amazon.com/scheduler/latest/UserGuide/managing-schedule-flexible-time-windows.html) for more details. ## Error-handling @@ -295,8 +290,7 @@ EventBridge Scheduler publishes additional metrics when your schedule exhausts i ### Metrics for all schedules -Class `Schedule` provides static methods for accessing all schedules metrics with default configuration, - such as `metricAllErrors` for viewing errors when executing targets. +The `Schedule` class provides static methods for accessing all schedules metrics with default configuration, such as `metricAllErrors` for viewing errors when executing targets. ```ts new cloudwatch.Alarm(this, 'SchedulesErrorAlarm', { @@ -332,4 +326,4 @@ new cloudwatch.Alarm(this, 'DefaultGroupErrorAlarm', { See full list of metrics and their description at [Monitoring Using CloudWatch Metrics](https://docs.aws.amazon.com/scheduler/latest/UserGuide/monitoring-cloudwatch.html) -in the *AWS Event Bridge Scheduler User Guide*. +in the *AWS EventBridge Scheduler User Guide*. diff --git a/packages/@aws-cdk/aws-scheduler-targets-alpha/README.md b/packages/@aws-cdk/aws-scheduler-targets-alpha/README.md index 3f95fadf1d961..43901ededed77 100644 --- a/packages/@aws-cdk/aws-scheduler-targets-alpha/README.md +++ b/packages/@aws-cdk/aws-scheduler-targets-alpha/README.md @@ -16,22 +16,21 @@ [Amazon EventBridge Scheduler](https://aws.amazon.com/blogs/compute/introducing-amazon-eventbridge-scheduler/) is a feature from Amazon EventBridge -that allows you to create, run, and manage scheduled tasks at scale. With EventBridge Scheduler, you can schedule one-time or recurrently tens -of millions of tasks across many AWS services without provisioning or managing underlying infrastructure. +that allows you to create, run, and manage scheduled tasks at scale. With EventBridge Scheduler, you can schedule millions of one-time or recurring tasks across various AWS services without provisioning or managing underlying infrastructure. This library contains integration classes for Amazon EventBridge Scheduler to call any -number of supported AWS Services. +number of supported AWS Services. The following targets are supported: -1. `targets.LambdaInvoke`: [Invoke an AWS Lambda function](#invoke-a-lambda-function)) +1. `targets.LambdaInvoke`: [Invoke an AWS Lambda function](#invoke-a-lambda-function) 2. `targets.StepFunctionsStartExecution`: [Start an AWS Step Function](#start-an-aws-step-function) 3. `targets.CodeBuildStartBuild`: [Start a CodeBuild job](#start-a-codebuild-job) -4. `targets.SqsSendMessage`: [Send a Message to an Amazon SQS Queue](#send-a-message-to-sqs-queue) +4. `targets.SqsSendMessage`: [Send a Message to an Amazon SQS Queue](#send-a-message-to-an-sqs-queue) 5. `targets.SnsPublish`: [Publish messages to an Amazon SNS topic](#publish-messages-to-an-amazon-sns-topic) 6. `targets.EventBridgePutEvents`: [Put Events on EventBridge](#send-events-to-an-eventbridge-event-bus) 7. `targets.InspectorStartAssessmentRun`: [Start an Amazon Inspector assessment run](#start-an-amazon-inspector-assessment-run) -8. `targets.KinesisStreamPutRecord`: [Put a record to an Amazon Kinesis Data Streams](#put-a-record-to-an-amazon-kinesis-data-streams) +8. `targets.KinesisStreamPutRecord`: [Put a record to an Amazon Kinesis Data Stream](#put-a-record-to-an-amazon-kinesis-data-stream) 9. `targets.KinesisDataFirehosePutRecord`: [Put a record to a Kinesis Data Firehose](#put-a-record-to-a-kinesis-data-firehose) 10. `targets.CodePipelineStartPipelineExecution`: [Start a CodePipeline execution](#start-a-codepipeline-execution) 11. `targets.SageMakerStartPipelineExecution`: [Start a SageMaker pipeline execution](#start-a-sagemaker-pipeline-execution) @@ -41,7 +40,7 @@ The following targets are supported: Use the `LambdaInvoke` target to invoke a lambda function. The code snippet below creates an event rule with a Lambda function as a target -called every hour by Event Bridge Scheduler with custom payload. You can optionally attach a +called every hour by EventBridge Scheduler with a custom payload. You can optionally attach a [dead letter queue](https://docs.aws.amazon.com/eventbridge/latest/userguide/rule-dlq.html). ```ts @@ -77,7 +76,7 @@ const schedule = new Schedule(this, 'Schedule', { Use the `StepFunctionsStartExecution` target to start a new execution on a StepFunction. The code snippet below creates an event rule with a Step Function as a target -called every hour by Event Bridge Scheduler with a custom payload. +called every hour by EventBridge Scheduler with a custom payload. ```ts import * as sfn from 'aws-cdk-lib/aws-stepfunctions'; @@ -117,7 +116,7 @@ new Schedule(this, 'Schedule', { Use the `CodeBuildStartBuild` target to start a new build run on a CodeBuild project. The code snippet below creates an event rule with a CodeBuild project as target which is -called every hour by Event Bridge Scheduler. +called every hour by EventBridge Scheduler. ```ts import * as codebuild from 'aws-cdk-lib/aws-codebuild'; @@ -130,12 +129,12 @@ new Schedule(this, 'Schedule', { }); ``` -## Send A Message To SQS Queue +## Send a Message To an SQS Queue -Use the `SqsSendMessage` target to send a message to SQS Queue. +Use the `SqsSendMessage` target to send a message to an SQS Queue. -The code snippet below creates an event rule with a SQS Queue as a target -called every hour by Event Bridge Scheduler with a custom payload. +The code snippet below creates an event rule with an SQS Queue as a target +called every hour by EventBridge Scheduler with a custom payload. Contains the `messageGroupId` to use when the target is a FIFO queue. If you specify a FIFO queue as a target, the queue must have content-based deduplication enabled. @@ -164,7 +163,7 @@ new Schedule(this, 'Schedule', { Use the `SnsPublish` target to publish messages to an Amazon SNS topic. The code snippets below create an event rule with a Amazon SNS topic as a target. -It's called every hour by Amazon Event Bridge Scheduler with custom payload. +It's called every hour by Amazon EventBridge Scheduler with a custom payload. ```ts import * as sns from 'aws-cdk-lib/aws-sns'; @@ -190,7 +189,7 @@ new Schedule(this, 'Schedule', { Use the `EventBridgePutEvents` target to send events to an EventBridge event bus. The code snippet below creates an event rule with an EventBridge event bus as a target -called every hour by Event Bridge Scheduler with a custom event payload. +called every hour by EventBridge Scheduler with a custom event payload. ```ts import * as events from 'aws-cdk-lib/aws-events'; @@ -216,8 +215,8 @@ new Schedule(this, 'Schedule', { Use the `InspectorStartAssessmentRun` target to start an Inspector assessment run. -The code snippet below creates an event rule with an assessment template as target which is -called every hour by Event Bridge Scheduler. +The code snippet below creates an event rule with an assessment template as the target which is +called every hour by EventBridge Scheduler. ```ts import * as inspector from 'aws-cdk-lib/aws-inspector'; @@ -230,12 +229,12 @@ new Schedule(this, 'Schedule', { }); ``` -## Put a record to an Amazon Kinesis Data Streams +## Put a record to an Amazon Kinesis Data Stream -Use the `KinesisStreamPutRecord` target to put a record to an Amazon Kinesis Data Streams. +Use the `KinesisStreamPutRecord` target to put a record to an Amazon Kinesis Data Stream. -The code snippet below creates an event rule with a stream as target which is -called every hour by Event Bridge Scheduler. +The code snippet below creates an event rule with a stream as the target which is +called every hour by EventBridge Scheduler. ```ts import * as kinesis from 'aws-cdk-lib/aws-kinesis'; @@ -255,7 +254,7 @@ new Schedule(this, 'Schedule', { Use the `KinesisDataFirehosePutRecord` target to put a record to a Kinesis Data Firehose delivery stream. The code snippet below creates an event rule with a delivery stream as a target -called every hour by Event Bridge Scheduler with a custom payload. +called every hour by EventBridge Scheduler with a custom payload. ```ts import * as firehose from 'aws-cdk-lib/aws-kinesisfirehose'; @@ -277,8 +276,8 @@ new Schedule(this, 'Schedule', { Use the `CodePipelineStartPipelineExecution` target to start a new execution for a CodePipeline pipeline. -The code snippet below creates an event rule with a CodePipeline pipeline as target which is -called every hour by Event Bridge Scheduler. +The code snippet below creates an event rule with a CodePipeline pipeline as the target which is +called every hour by EventBridge Scheduler. ```ts import * as codepipeline from 'aws-cdk-lib/aws-codepipeline'; @@ -295,8 +294,8 @@ new Schedule(this, 'Schedule', { Use the `SageMakerStartPipelineExecution` target to start a new execution for a SageMaker pipeline. -The code snippet below creates an event rule with a SageMaker pipeline as target which is -called every hour by Event Bridge Scheduler. +The code snippet below creates an event rule with a SageMaker pipeline as the target which is +called every hour by EventBridge Scheduler. ```ts import * as sagemaker from 'aws-cdk-lib/aws-sagemaker';