diff --git a/package.json b/package.json index a6c51f057118f..0f3eb7971f811 100644 --- a/package.json +++ b/package.json @@ -25,9 +25,9 @@ "fs-extra": "^9.1.0", "graceful-fs": "^4.2.11", "jest-junit": "^13.2.0", - "jsii-diff": "1.106.0", - "jsii-pacmak": "1.106.0", - "jsii-reflect": "1.106.0", + "jsii-diff": "1.104.0", + "jsii-pacmak": "1.104.0", + "jsii-reflect": "1.104.0", "lerna": "^8.1.8", "nx": "^19.8.6", "semver": "^7.6.3", diff --git a/packages/@aws-cdk-testing/cli-integ/bin/query-github b/packages/@aws-cdk-testing/cli-integ/bin/query-github index fbb9b1fa5f199..34c2f861aefe9 100755 --- a/packages/@aws-cdk-testing/cli-integ/bin/query-github +++ b/packages/@aws-cdk-testing/cli-integ/bin/query-github @@ -1,2 +1,2 @@ #!/usr/bin/env node -require('./query-github.js'); +require('../lib/cli/query-github.js'); diff --git a/packages/@aws-cdk-testing/cli-integ/bin/run-suite b/packages/@aws-cdk-testing/cli-integ/bin/run-suite index d4a0aacaa4a54..8b2b678b95a6b 100755 --- a/packages/@aws-cdk-testing/cli-integ/bin/run-suite +++ b/packages/@aws-cdk-testing/cli-integ/bin/run-suite @@ -1,2 +1,2 @@ #!/usr/bin/env node -require('./run-suite.js'); \ No newline at end of file +require('../lib/cli/run-suite.js'); \ No newline at end of file diff --git a/packages/@aws-cdk-testing/cli-integ/bin/stage-distribution b/packages/@aws-cdk-testing/cli-integ/bin/stage-distribution index 99b7ad3606f7b..5105f5fd7116e 100755 --- a/packages/@aws-cdk-testing/cli-integ/bin/stage-distribution +++ b/packages/@aws-cdk-testing/cli-integ/bin/stage-distribution @@ -1,2 +1,2 @@ #!/usr/bin/env node -require('./stage-distribution.js'); +require('../lib/cli/stage-distribution.js'); diff --git a/packages/@aws-cdk-testing/cli-integ/bin/test-root b/packages/@aws-cdk-testing/cli-integ/bin/test-root index d14248e4d4019..9cb8f0f2284fd 100755 --- a/packages/@aws-cdk-testing/cli-integ/bin/test-root +++ b/packages/@aws-cdk-testing/cli-integ/bin/test-root @@ -1,2 +1,2 @@ #!/usr/bin/env node -require('./test-root.js'); +require('../lib/cli/test-root.js'); diff --git a/packages/@aws-cdk-testing/cli-integ/bin/query-github.ts b/packages/@aws-cdk-testing/cli-integ/lib/cli/query-github.ts similarity index 96% rename from packages/@aws-cdk-testing/cli-integ/bin/query-github.ts rename to packages/@aws-cdk-testing/cli-integ/lib/cli/query-github.ts index 712e4108b70ca..8a8d61309658a 100644 --- a/packages/@aws-cdk-testing/cli-integ/bin/query-github.ts +++ b/packages/@aws-cdk-testing/cli-integ/lib/cli/query-github.ts @@ -1,5 +1,5 @@ import * as yargs from 'yargs'; -import { fetchPreviousVersion } from '../lib/github'; +import { fetchPreviousVersion } from '../github'; async function main() { const args = await yargs diff --git a/packages/@aws-cdk-testing/cli-integ/bin/run-suite.ts b/packages/@aws-cdk-testing/cli-integ/lib/cli/run-suite.ts similarity index 91% rename from packages/@aws-cdk-testing/cli-integ/bin/run-suite.ts rename to packages/@aws-cdk-testing/cli-integ/lib/cli/run-suite.ts index 4d32690e16f7a..405031d364d57 100644 --- a/packages/@aws-cdk-testing/cli-integ/bin/run-suite.ts +++ b/packages/@aws-cdk-testing/cli-integ/lib/cli/run-suite.ts @@ -2,10 +2,10 @@ import * as path from 'path'; import * as jest from 'jest'; import * as yargs from 'yargs'; -import { ReleasePackageSourceSetup } from '../lib/package-sources/release-source'; -import { RepoPackageSourceSetup, autoFindRoot } from '../lib/package-sources/repo-source'; -import { IPackageSourceSetup } from '../lib/package-sources/source'; -import { serializeForSubprocess } from '../lib/package-sources/subprocess'; +import { ReleasePackageSourceSetup } from '../package-sources/release-source'; +import { RepoPackageSourceSetup, autoFindRoot } from '../package-sources/repo-source'; +import { IPackageSourceSetup } from '../package-sources/source'; +import { serializeForSubprocess } from '../package-sources/subprocess'; async function main() { const args = await yargs @@ -126,7 +126,7 @@ async function main() { ...args.verbose ? ['--verbose'] : [], ...passWithNoTests ? ['--passWithNoTests'] : [], ...args['test-file'] ? [args['test-file']] : [], - ], path.resolve(__dirname, '..', 'resources', 'integ.jest.config.js')); + ], path.resolve(__dirname, '..', '..', 'resources', 'integ.jest.config.js')); } finally { await packageSource.cleanup(); diff --git a/packages/@aws-cdk-testing/cli-integ/bin/stage-distribution.ts b/packages/@aws-cdk-testing/cli-integ/lib/cli/stage-distribution.ts similarity index 94% rename from packages/@aws-cdk-testing/cli-integ/bin/stage-distribution.ts rename to packages/@aws-cdk-testing/cli-integ/lib/cli/stage-distribution.ts index 31af8c4742b99..e23127a588581 100644 --- a/packages/@aws-cdk-testing/cli-integ/bin/stage-distribution.ts +++ b/packages/@aws-cdk-testing/cli-integ/lib/cli/stage-distribution.ts @@ -3,13 +3,13 @@ import * as path from 'path'; import * as fs from 'fs-extra'; import * as glob from 'glob'; import * as yargs from 'yargs'; -import { shell } from '../lib'; -import { TestRepository } from '../lib/staging/codeartifact'; -import { uploadJavaPackages, mavenLogin } from '../lib/staging/maven'; -import { uploadNpmPackages, npmLogin } from '../lib/staging/npm'; -import { uploadDotnetPackages, nugetLogin } from '../lib/staging/nuget'; -import { uploadPythonPackages, pypiLogin } from '../lib/staging/pypi'; -import { UsageDir } from '../lib/staging/usage-dir'; +import { shell } from '..'; +import { TestRepository } from '../staging/codeartifact'; +import { uploadJavaPackages, mavenLogin } from '../staging/maven'; +import { uploadNpmPackages, npmLogin } from '../staging/npm'; +import { uploadDotnetPackages, nugetLogin } from '../staging/nuget'; +import { uploadPythonPackages, pypiLogin } from '../staging/pypi'; +import { UsageDir } from '../staging/usage-dir'; async function main() { await yargs diff --git a/packages/@aws-cdk-testing/cli-integ/bin/test-root.ts b/packages/@aws-cdk-testing/cli-integ/lib/cli/test-root.ts similarity index 57% rename from packages/@aws-cdk-testing/cli-integ/bin/test-root.ts rename to packages/@aws-cdk-testing/cli-integ/lib/cli/test-root.ts index 1a9fe0f655e58..22bd437e6a9df 100644 --- a/packages/@aws-cdk-testing/cli-integ/bin/test-root.ts +++ b/packages/@aws-cdk-testing/cli-integ/lib/cli/test-root.ts @@ -1,3 +1,3 @@ import * as path from 'path'; // eslint-disable-next-line no-console -console.log(path.resolve(__dirname, '..')); +console.log(path.resolve(__dirname, '..', '..')); diff --git a/packages/@aws-cdk-testing/cli-integ/test/resource-pool.test.ts b/packages/@aws-cdk-testing/cli-integ/test/resource-pool.test.ts index 7f8bc069fe525..ff5cf3c43a276 100644 --- a/packages/@aws-cdk-testing/cli-integ/test/resource-pool.test.ts +++ b/packages/@aws-cdk-testing/cli-integ/test/resource-pool.test.ts @@ -8,11 +8,16 @@ const POOL_NAME = 'resource-pool.test'; test('take and dispose', async () => { const pool = ResourcePool.withResources(POOL_NAME, ['a']); const take1 = pool.take(); - const take2 = pool.take(); let released = false; const lease1 = await take1; + + // We must start the take2 only after take1 has definitely + // succeeded, otherwise we have a race condition if take2 happens to + // win the race (we expect take1 to succeed and take2 to wait). + const take2 = pool.take(); + // awaiting 'take2' would now block but we add an async // handler to it to flip a boolean to see when it gets activated. void(take2.then(() => released = true)); diff --git a/packages/@aws-cdk/cli-lib-alpha/.eslintrc.js b/packages/@aws-cdk/cli-lib-alpha/.eslintrc.js index b284f20df26e9..f2bee0ec3d188 100644 --- a/packages/@aws-cdk/cli-lib-alpha/.eslintrc.js +++ b/packages/@aws-cdk/cli-lib-alpha/.eslintrc.js @@ -1,5 +1,6 @@ const baseConfig = require('@aws-cdk/cdk-build-tools/config/eslintrc'); baseConfig.parserOptions.project = __dirname + '/tsconfig.json'; +baseConfig.ignorePatterns.push('**/*.template.ts'); baseConfig.rules['import/no-extraneous-dependencies'] = ['error', { devDependencies: true, peerDependencies: true } ]; baseConfig.rules['import/order'] = 'off'; diff --git a/packages/@aws-cdk/cli-lib-alpha/.gitignore b/packages/@aws-cdk/cli-lib-alpha/.gitignore index 573a12d965554..e728027e0ff5f 100644 --- a/packages/@aws-cdk/cli-lib-alpha/.gitignore +++ b/packages/@aws-cdk/cli-lib-alpha/.gitignore @@ -2,7 +2,7 @@ *.js.map *.d.ts *.gz -!lib/init-templates/**/javascript/**/* +lib/init-templates/ node_modules dist .jsii 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 0000000000000..d04e7fe939da4 --- /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/package.json b/packages/@aws-cdk/cli-lib-alpha/package.json index 49a48e313c633..a72dc5f7c736e 100644 --- a/packages/@aws-cdk/cli-lib-alpha/package.json +++ b/packages/@aws-cdk/cli-lib-alpha/package.json @@ -6,6 +6,9 @@ "main": "lib/main.js", "types": "lib/index.d.ts", "jsii": { + "excludeTypescript": [ + "**/*.template.ts" + ], "outdir": "dist", "targets": { "dotnet": { @@ -52,7 +55,7 @@ "build+test+package": "yarn build+test && yarn package", "bundle": "esbuild --bundle lib/index.ts --target=node18 --platform=node --external:fsevents --minify-whitespace --outfile=lib/main.js", "compat": "cdk-compat", - "gen": "../../../packages/aws-cdk/generate.sh", + "gen": "build-tools/copy-cli-resources.sh ../../../packages/aws-cdk", "lint": "cdk-lint", "package": "cdk-package", "pkglint": "pkglint -f", @@ -63,9 +66,6 @@ "cdk-build": { "post": [ "yarn attribute", - "mkdir -p ./lib/api/bootstrap/ && cp ../../aws-cdk/lib/api/bootstrap/bootstrap-template.yaml ./lib/api/bootstrap/", - "cp ../../../node_modules/cdk-from-cfn/index_bg.wasm ./lib/", - "cp ../../../node_modules/@aws-cdk/aws-service-spec/db.json.gz ./", "yarn bundle", "node ./lib/main.js >/dev/null 2>/dev/null ): Record { return { - ...NEW_PROJECT_CONTEXT, + ...currentlyRecommendedAwsCdkLibFlags(), ...this.legacyContext, ...additionalContext, @@ -432,3 +432,13 @@ export const DEFAULT_SYNTH_OPTIONS = { CDK_INTEG_SUBNET_ID: 'subnet-0dff1a399d8f6f92c', }, }; + +/** + * Return the currently recommended flags for `aws-cdk-lib`. + * + * These have been built into the CLI at build time. + */ +export function currentlyRecommendedAwsCdkLibFlags() { + const recommendedFlagsFile = path.join(__dirname, '..', 'recommended-feature-flags.json'); + return JSON.parse(fs.readFileSync(recommendedFlagsFile, { encoding: 'utf-8' })); +} diff --git a/packages/@aws-cdk/integ-runner/package.json b/packages/@aws-cdk/integ-runner/package.json index 3b96e1f8d8194..9dbe0d95e564f 100644 --- a/packages/@aws-cdk/integ-runner/package.json +++ b/packages/@aws-cdk/integ-runner/package.json @@ -8,6 +8,7 @@ "integ-runner": "bin/integ-runner" }, "scripts": { + "gen": "./build-tools/generate.sh", "build": "cdk-build", "lint": "cdk-lint", "package": "cdk-package", @@ -74,7 +75,7 @@ "@aws-cdk/cloud-assembly-schema": "^38.0.0", "@aws-cdk/cloudformation-diff": "0.0.0", "@aws-cdk/cx-api": "0.0.0", - "@aws-cdk/aws-service-spec": "^0.1.39", + "@aws-cdk/aws-service-spec": "^0.1.40", "cdk-assets": "3.0.0-rc.32", "@aws-cdk/cdk-cli-wrapper": "0.0.0", "aws-cdk": "0.0.0", diff --git a/packages/aws-cdk-lib/cx-api/build-tools/flag-report.ts b/packages/aws-cdk-lib/cx-api/build-tools/flag-report.ts index 654684c091d77..00477c8833876 100644 --- a/packages/aws-cdk-lib/cx-api/build-tools/flag-report.ts +++ b/packages/aws-cdk-lib/cx-api/build-tools/flag-report.ts @@ -15,6 +15,9 @@ async function main() { diff: changedFlags(), migratejson: migrateJson(), }); + + // Write to the package root + await updateRecommendedFlagsFile(path.join(__dirname, '..', '..', 'recommended-feature-flags.json')); } function flagsTable() { @@ -117,7 +120,7 @@ function oldBehavior(flag: FlagInfo): string | undefined { function recommendedJson() { return [ '```json', - JSON.stringify({ context: feats.NEW_PROJECT_CONTEXT }, undefined, 2), + JSON.stringify({ context: feats.CURRENTLY_RECOMMENDED_FLAGS }, undefined, 2), '```', ].join('\n'); } @@ -206,6 +209,10 @@ async function updateMarkdownFile(filename: string, sections: Record x !== 0) ?? 0; } diff --git a/packages/aws-cdk-lib/cx-api/lib/features.ts b/packages/aws-cdk-lib/cx-api/lib/features.ts index 72ab65805054f..2992b611be55a 100644 --- a/packages/aws-cdk-lib/cx-api/lib/features.ts +++ b/packages/aws-cdk-lib/cx-api/lib/features.ts @@ -1317,10 +1317,13 @@ export const CURRENT_VERSION_EXPIRED_FLAGS: string[] = Object.entries(FLAGS) * Add a flag in here (typically with the value `true`), to enable * backwards-breaking behavior changes only for new projects. New projects * generated through `cdk init` will include these flags in their generated + * project config. * * Tests must cover the default (disabled) case and the future (enabled) case. + * + * Going forward, this should *NOT* be consumed directly anymore. */ -export const NEW_PROJECT_CONTEXT = Object.fromEntries( +export const CURRENTLY_RECOMMENDED_FLAGS = Object.fromEntries( Object.entries(FLAGS) .filter(([_, flag]) => flag.recommendedValue !== flag.defaults?.[CURRENT_MV] && flag.introducedIn[CURRENT_MV]) .map(([name, flag]) => [name, flag.recommendedValue]), @@ -1352,10 +1355,10 @@ export function futureFlagDefault(flag: string): boolean { /** @deprecated use CURRENT_VERSION_EXPIRED_FLAGS instead */ export const FUTURE_FLAGS_EXPIRED = CURRENT_VERSION_EXPIRED_FLAGS; -/** @deprecated use NEW_PROJECT_CONTEXT instead */ -export const FUTURE_FLAGS = Object.fromEntries(Object.entries(NEW_PROJECT_CONTEXT) +/** @deprecated do not use at all! */ +export const FUTURE_FLAGS = Object.fromEntries(Object.entries(CURRENTLY_RECOMMENDED_FLAGS) .filter(([_, v]) => typeof v === 'boolean')); -/** @deprecated use NEW_PROJECT_CONTEXT instead */ -export const NEW_PROJECT_DEFAULT_CONTEXT = Object.fromEntries(Object.entries(NEW_PROJECT_CONTEXT) +/** @deprecated do not use at all! */ +export const NEW_PROJECT_DEFAULT_CONTEXT = Object.fromEntries(Object.entries(CURRENTLY_RECOMMENDED_FLAGS) .filter(([_, v]) => typeof v !== 'boolean')); diff --git a/packages/aws-cdk-lib/cx-api/lib/private/flag-modeling.ts b/packages/aws-cdk-lib/cx-api/lib/private/flag-modeling.ts index ba9389cf45a9d..55279650d075e 100644 --- a/packages/aws-cdk-lib/cx-api/lib/private/flag-modeling.ts +++ b/packages/aws-cdk-lib/cx-api/lib/private/flag-modeling.ts @@ -30,7 +30,7 @@ export interface FlagInfoBase { /** Version number the flag was introduced in each version line. `undefined` means flag does not exist in that line. */ readonly introducedIn: { v1?: string; v2?: string }; /** Default value, if flag is unset by user. Adding a flag with a default may not change behavior after GA! */ - readonly defaults?: { v2?: any }; + readonly defaults?: { v1?: any; v2?: any }; /** Default in new projects */ readonly recommendedValue: any; }; diff --git a/packages/aws-cdk-lib/package.json b/packages/aws-cdk-lib/package.json index 4c31ed54c5056..b6a237c0a8a89 100644 --- a/packages/aws-cdk-lib/package.json +++ b/packages/aws-cdk-lib/package.json @@ -136,7 +136,7 @@ "mime-types": "^2.1.35" }, "devDependencies": { - "@aws-cdk/aws-service-spec": "^0.1.39", + "@aws-cdk/aws-service-spec": "^0.1.40", "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/custom-resource-handlers": "0.0.0", "@aws-cdk/pkglint": "0.0.0", @@ -509,6 +509,7 @@ "./pipelines/.warnings.jsii.js": "./pipelines/.warnings.jsii.js", "./pipelines/lib/helpers-internal": "./pipelines/lib/helpers-internal/index.js", "./pipelines/package.json": "./pipelines/package.json", + "./recommended-feature-flags.json": "./recommended-feature-flags.json", "./region-info": "./region-info/index.js", "./triggers": "./triggers/index.js" }, diff --git a/packages/aws-cdk-lib/recommended-feature-flags.json b/packages/aws-cdk-lib/recommended-feature-flags.json new file mode 100644 index 0000000000000..30a08f65a928c --- /dev/null +++ b/packages/aws-cdk-lib/recommended-feature-flags.json @@ -0,0 +1,63 @@ +{ + "@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: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 +} \ No newline at end of file diff --git a/packages/aws-cdk/.gitignore b/packages/aws-cdk/.gitignore index b4917729cbcb0..d0b5e0796af72 100644 --- a/packages/aws-cdk/.gitignore +++ b/packages/aws-cdk/.gitignore @@ -4,6 +4,7 @@ !lib/init-templates/**/javascript/**/* lib/init-templates/**/*.hook.js lib/init-templates/**/*.hook.d.ts +lib/init-templates/.*.json node_modules dist @@ -40,5 +41,6 @@ test/integ/cli/*.d.ts junit.xml + lib/**/*.wasm db.json.gz diff --git a/packages/aws-cdk/THIRD_PARTY_LICENSES b/packages/aws-cdk/THIRD_PARTY_LICENSES index 8966d92b437b0..65b1760c61d19 100644 --- a/packages/aws-cdk/THIRD_PARTY_LICENSES +++ b/packages/aws-cdk/THIRD_PARTY_LICENSES @@ -17701,7 +17701,7 @@ Apache License ---------------- -** @jsii/check-node@1.106.0 - https://www.npmjs.com/package/@jsii/check-node/v/1.106.0 | Apache-2.0 +** @jsii/check-node@1.104.0 - https://www.npmjs.com/package/@jsii/check-node/v/1.104.0 | Apache-2.0 jsii Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/packages/aws-cdk/generate.sh b/packages/aws-cdk/generate.sh index 4d9d43a954b6b..9a74b49240b88 100755 --- a/packages/aws-cdk/generate.sh +++ b/packages/aws-cdk/generate.sh @@ -14,3 +14,12 @@ 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/lib/api/cxapp/cloud-assembly.ts b/packages/aws-cdk/lib/api/cxapp/cloud-assembly.ts index 6b827d4a2e363..96843b706b005 100644 --- a/packages/aws-cdk/lib/api/cxapp/cloud-assembly.ts +++ b/packages/aws-cdk/lib/api/cxapp/cloud-assembly.ts @@ -4,7 +4,6 @@ import { minimatch } from 'minimatch'; import * as semver from 'semver'; import { error, print, warning } from '../../logging'; import { flatten } from '../../util'; -import { versionNumber } from '../../version'; export enum DefaultSelection { /** @@ -122,9 +121,11 @@ export class CloudAssembly { } } - private selectTopLevelStacks(stacks: cxapi.CloudFormationStackArtifact[], + private selectTopLevelStacks( + stacks: cxapi.CloudFormationStackArtifact[], topLevelStacks: cxapi.CloudFormationStackArtifact[], - extend: ExtendedStackSelection = ExtendedStackSelection.None): StackCollection { + extend: ExtendedStackSelection = ExtendedStackSelection.None, + ): StackCollection { if (topLevelStacks.length > 0) { return this.extendStacks(topLevelStacks, stacks, extend); } else { @@ -132,33 +133,23 @@ export class CloudAssembly { } } - private selectMatchingStacks(stacks: cxapi.CloudFormationStackArtifact[], + private selectMatchingStacks( + stacks: cxapi.CloudFormationStackArtifact[], patterns: string[], - extend: ExtendedStackSelection = ExtendedStackSelection.None): StackCollection { - - // cli tests use this to ensure tests do not depend on legacy behavior - // (otherwise they will fail in v2) - const disableLegacy = process.env.CXAPI_DISABLE_SELECT_BY_ID === '1'; - - const matchingPattern = (pattern: string) => (stack: cxapi.CloudFormationStackArtifact) => { - if (minimatch(stack.hierarchicalId, pattern)) { - return true; - } else if (!disableLegacy && stack.id === pattern && semver.major(versionNumber()) < 2) { - warning('Selecting stack by identifier "%s". This identifier is deprecated and will be removed in v2. Please use "%s" instead.', chalk.bold(stack.id), chalk.bold(stack.hierarchicalId)); - warning('Run "cdk ls" to see a list of all stack identifiers'); - return true; - } - return false; - }; + 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[], + private selectDefaultStacks( + stacks: cxapi.CloudFormationStackArtifact[], topLevelStacks: cxapi.CloudFormationStackArtifact[], - defaultSelection: DefaultSelection) { + defaultSelection: DefaultSelection, + ) { switch (defaultSelection) { case DefaultSelection.MainAssembly: return new StackCollection(this, topLevelStacks); @@ -178,9 +169,11 @@ export class CloudAssembly { } } - private extendStacks(matched: cxapi.CloudFormationStackArtifact[], + private extendStacks( + matched: cxapi.CloudFormationStackArtifact[], all: cxapi.CloudFormationStackArtifact[], - extend: ExtendedStackSelection = ExtendedStackSelection.None) { + extend: ExtendedStackSelection = ExtendedStackSelection.None, + ) { const allStacks = new Map(); for (const stack of all) { allStacks.set(stack.hierarchicalId, stack); diff --git a/packages/aws-cdk/lib/init-templates/lib/typescript/tsconfig.json b/packages/aws-cdk/lib/init-templates/lib/typescript/tsconfig.json index aaa7dc510f1d2..1fa2eb4d6dbf9 100644 --- a/packages/aws-cdk/lib/init-templates/lib/typescript/tsconfig.json +++ b/packages/aws-cdk/lib/init-templates/lib/typescript/tsconfig.json @@ -26,6 +26,6 @@ }, "exclude": [ "node_modules", - "cdk.out" + "cdk.out", ] } diff --git a/packages/aws-cdk/lib/init.ts b/packages/aws-cdk/lib/init.ts index d119f3b78cc0a..c6801b0229554 100644 --- a/packages/aws-cdk/lib/init.ts +++ b/packages/aws-cdk/lib/init.ts @@ -1,6 +1,5 @@ import * as childProcess from 'child_process'; import * as path from 'path'; -import * as cxapi from '@aws-cdk/cx-api'; import * as chalk from 'chalk'; import * as fs from 'fs-extra'; import { invokeBuiltinHooks } from './init-hooks'; @@ -126,6 +125,7 @@ export class InitTemplate { const projectInfo: ProjectInfo = { name: decamelize(path.basename(path.resolve(targetDirectory))), stackName, + versions: await loadInitVersions(), }; const sourceDirectory = path.join(this.basePath, language); @@ -173,11 +173,9 @@ export class InitTemplate { } private expand(template: string, language: string, project: ProjectInfo) { - // eslint-disable-next-line @typescript-eslint/no-require-imports - const manifest = require(path.join(rootDir(), 'package.json')); - const MATCH_VER_BUILD = /\+[a-f0-9]+$/; // Matches "+BUILD" in "x.y.z-beta+BUILD" - const cdkVersion = manifest.version.replace(MATCH_VER_BUILD, ''); - let constructsVersion = manifest.devDependencies.constructs.replace(MATCH_VER_BUILD, ''); + const cdkVersion = project.versions['aws-cdk-lib']; + let constructsVersion = project.versions.constructs; + switch (language) { case 'java': case 'csharp': @@ -222,7 +220,7 @@ export class InitTemplate { const config = await fs.readJson(cdkJson); config.context = { ...config.context, - ...cxapi.NEW_PROJECT_CONTEXT, + ...await currentlyRecommendedAwsCdkLibFlags(), }; await fs.writeJson(cdkJson, config, { spaces: 2 }); @@ -248,6 +246,8 @@ interface ProjectInfo { /** The value used for %name% */ readonly name: string; readonly stackName?: string; + + readonly versions: Versions; } export async function availableInitTemplates(): Promise { @@ -471,3 +471,41 @@ async function execute(cmd: string, args: string[], { cwd }: { cwd: string }) { }); }); } + +interface Versions { + ['aws-cdk-lib']: string; + constructs: string; +} + +/** + * Return the 'aws-cdk-lib' version we will init + * + * This has been built into the CLI at build time. + */ +async function loadInitVersions(): Promise { + const recommendedFlagsFile = path.join(__dirname, './init-templates/.init-version.json'); + const contents = JSON.parse(await fs.readFile(recommendedFlagsFile, { encoding: 'utf-8' })); + + const ret = { + 'aws-cdk-lib': contents['aws-cdk-lib'], + 'constructs': contents.constructs, + }; + for (const [key, value] of Object.entries(ret)) { + /* istanbul ignore next */ + if (!value) { + throw new Error(`Missing init version from ${recommendedFlagsFile}: ${key}`); + } + } + + return ret; +} + +/** + * Return the currently recommended flags for `aws-cdk-lib`. + * + * These have been built into the CLI at build time. + */ +export async function currentlyRecommendedAwsCdkLibFlags() { + const recommendedFlagsFile = path.join(__dirname, './init-templates/.recommended-feature-flags.json'); + return JSON.parse(await fs.readFile(recommendedFlagsFile, { encoding: 'utf-8' })); +} diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index 1768d5cc49256..589a3563f1791 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -126,7 +126,7 @@ "@aws-sdk/credential-providers": "3.699.0", "@aws-sdk/ec2-metadata-service": "3.699.0", "@aws-sdk/lib-storage": "3.699.0", - "@jsii/check-node": "1.106.0", + "@jsii/check-node": "1.104.0", "@smithy/middleware-endpoint": "3.1.4", "@smithy/node-http-handler": "3.2.4", "@smithy/property-provider": "3.1.10", diff --git a/packages/aws-cdk/test/api/cloud-assembly.test.ts b/packages/aws-cdk/test/api/cloud-assembly.test.ts index 5654c6390f2dd..c97e6f4925d76 100644 --- a/packages/aws-cdk/test/api/cloud-assembly.test.ts +++ b/packages/aws-cdk/test/api/cloud-assembly.test.ts @@ -4,9 +4,6 @@ import { DefaultSelection } from '../../lib/api/cxapp/cloud-assembly'; import { MockCloudExecutable } from '../util'; import { cliAssemblyWithForcedVersion } from './assembly-versions'; -// behave like v2 -process.env.CXAPI_DISABLE_SELECT_BY_ID = '1'; - test('do not throw when selecting stack without errors', async () => { // GIVEN const cxasm = await testCloudAssembly(); diff --git a/packages/aws-cdk/test/cdk-toolkit.test.ts b/packages/aws-cdk/test/cdk-toolkit.test.ts index cba685fe15528..5e4081e66dcb5 100644 --- a/packages/aws-cdk/test/cdk-toolkit.test.ts +++ b/packages/aws-cdk/test/cdk-toolkit.test.ts @@ -95,8 +95,6 @@ import { flatten } from '../lib/util'; markTesting(); -process.env.CXAPI_DISABLE_SELECT_BY_ID = '1'; - const defaultBootstrapSource: BootstrapSource = { source: 'default' }; const bootstrapEnvironmentMock = jest.spyOn(Bootstrapper.prototype, 'bootstrapEnvironment'); let cloudExecutable: MockCloudExecutable; diff --git a/packages/aws-cdk/test/init.test.ts b/packages/aws-cdk/test/init.test.ts index 02a94f4addf70..2ef2582f1b63c 100644 --- a/packages/aws-cdk/test/init.test.ts +++ b/packages/aws-cdk/test/init.test.ts @@ -2,7 +2,7 @@ import * as os from 'os'; import * as path from 'path'; import * as cxapi from '@aws-cdk/cx-api'; import * as fs from 'fs-extra'; -import { availableInitLanguages, availableInitTemplates, cliInit, printAvailableTemplates } from '../lib/init'; +import { availableInitLanguages, availableInitTemplates, cliInit, currentlyRecommendedAwsCdkLibFlags, printAvailableTemplates } from '../lib/init'; describe('constructs version', () => { cliTest('create a TypeScript library project', async (workDir) => { @@ -211,8 +211,36 @@ describe('constructs version', () => { expect(await fs.pathExists(path.join(workDir, 'bin'))).toBeTruthy(); }); - test('verify "future flags" are added to cdk.json', async () => { + cliTest('CLI uses recommended feature flags from data file to initialize context', async (workDir) => { + const recommendedFlagsFile = path.join(__dirname, '..', 'lib', 'init-templates', '.recommended-feature-flags.json'); + await withReplacedFile(recommendedFlagsFile, JSON.stringify({ banana: 'yellow' }), () => cliInit({ + type: 'app', + language: 'typescript', + canUseNetwork: false, + generateOnly: true, + workDir, + })); + + const cdkFile = await fs.readJson(path.join(workDir, 'cdk.json')); + expect(cdkFile.context).toEqual({ banana: 'yellow' }); + }); + + cliTest('CLI uses init versions file to initialize template', async (workDir) => { + const recommendedFlagsFile = path.join(__dirname, '..', 'lib', 'init-templates', '.init-version.json'); + await withReplacedFile(recommendedFlagsFile, JSON.stringify({ 'aws-cdk-lib': '100.1.1', 'constructs': '^200.2.2' }), () => cliInit({ + type: 'app', + language: 'typescript', + canUseNetwork: false, + generateOnly: true, + workDir, + })); + const packageJson = await fs.readJson(path.join(workDir, 'package.json')); + expect(packageJson.dependencies['aws-cdk-lib']).toEqual('100.1.1'); + expect(packageJson.dependencies.constructs).toEqual('^200.2.2'); + }); + + test('verify "future flags" are added to cdk.json', async () => { for (const templ of await availableInitTemplates()) { for (const lang of templ.languages) { await withTempDir(async tmpDir => { @@ -231,9 +259,10 @@ describe('constructs version', () => { const config = await fs.readJson(path.join(tmpDir, 'cdk.json')); const context = config.context || {}; + const recommendedFlags = await currentlyRecommendedAwsCdkLibFlags(); for (const [key, actual] of Object.entries(context)) { - expect(key in cxapi.NEW_PROJECT_CONTEXT).toBeTruthy(); - expect(cxapi.NEW_PROJECT_CONTEXT[key]).toEqual(actual); + expect(key in recommendedFlags).toBeTruthy(); + expect(recommendedFlags[key]).toEqual(actual); } // assert that expired future flags are not part of the cdk.json @@ -307,3 +336,13 @@ async function recursiveListFiles(rdir: string): Promise { } } } + +async function withReplacedFile(fileName: string, contents: any, cb: () => Promise): Promise { + const oldContents = await fs.readFile(fileName, 'utf8'); + await fs.writeFile(fileName, contents); + try { + await cb(); + } finally { + await fs.writeFile(fileName, oldContents); + } +} diff --git a/packages/awslint/package.json b/packages/awslint/package.json index faa5e5bc2aeee..38cc680b527de 100644 --- a/packages/awslint/package.json +++ b/packages/awslint/package.json @@ -18,10 +18,10 @@ "awslint": "bin/awslint" }, "dependencies": { - "@jsii/spec": "1.106.0", + "@jsii/spec": "1.104.0", "chalk": "^4", "fs-extra": "^9.1.0", - "jsii-reflect": "1.106.0", + "jsii-reflect": "1.104.0", "change-case": "^4.1.2", "yargs": "^16.2.0" }, diff --git a/tools/@aws-cdk/cdk-build-tools/package.json b/tools/@aws-cdk/cdk-build-tools/package.json index 95ee6c4f37704..24ace0ff1195c 100644 --- a/tools/@aws-cdk/cdk-build-tools/package.json +++ b/tools/@aws-cdk/cdk-build-tools/package.json @@ -62,9 +62,9 @@ "jest": "^29.7.0", "jest-junit": "^13.2.0", "jsii": "~5.7.0", - "jsii-rosetta": "~5.7.0", - "jsii-pacmak": "1.106.0", - "jsii-reflect": "1.106.0", + "jsii-rosetta": "~5.4.36", + "jsii-pacmak": "1.104.0", + "jsii-reflect": "1.104.0", "markdownlint-cli": "^0.42.0", "nyc": "^15.1.0", "semver": "^7.6.3", diff --git a/tools/@aws-cdk/pkglint/lib/rules.ts b/tools/@aws-cdk/pkglint/lib/rules.ts index 531dd1d18cc95..849c17f4ce067 100644 --- a/tools/@aws-cdk/pkglint/lib/rules.ts +++ b/tools/@aws-cdk/pkglint/lib/rules.ts @@ -1411,7 +1411,7 @@ export class PackageInJsiiPackageNoRuntimeDeps extends ValidationRule { public readonly name = 'lambda-packages-no-runtime-deps'; public validate(pkg: PackageJson) { - if (!isJSII(pkg)) { return; } + if (!isJSII(pkg) || pkg.packageName === '@aws-cdk/cli-lib-alpha') { return; } for (const inner of findInnerPackages(pkg.packageRoot)) { const innerPkg = PackageJson.fromDirectory(inner); diff --git a/tools/@aws-cdk/spec2cdk/package.json b/tools/@aws-cdk/spec2cdk/package.json index be5354dfa108a..c6a92e5d8237a 100644 --- a/tools/@aws-cdk/spec2cdk/package.json +++ b/tools/@aws-cdk/spec2cdk/package.json @@ -32,9 +32,9 @@ }, "license": "Apache-2.0", "dependencies": { - "@aws-cdk/aws-service-spec": "^0.1.39", - "@aws-cdk/service-spec-importers": "^0.0.59", - "@aws-cdk/service-spec-types": "^0.0.106", + "@aws-cdk/aws-service-spec": "^0.1.40", + "@aws-cdk/service-spec-importers": "^0.0.60", + "@aws-cdk/service-spec-types": "^0.0.107", "@cdklabs/tskb": "^0.0.3", "@cdklabs/typewriter": "^0.0.3", "camelcase": "^6", diff --git a/yarn.lock b/yarn.lock index bd844eb92edd3..087c8e04423ac 100644 --- a/yarn.lock +++ b/yarn.lock @@ -63,12 +63,12 @@ resolved "https://registry.npmjs.org/@aws-cdk/asset-node-proxy-agent-v6/-/asset-node-proxy-agent-v6-2.1.0.tgz#6d3c7860354d4856a7e75375f2f0ecab313b4989" integrity sha512-7bY3J8GCVxLupn/kNmpPc5VJz8grx+4RKfnnJiO1LG+uxkZfANZG3RMHhE+qQxxwkyQ9/MfPtTpf748UhR425A== -"@aws-cdk/aws-service-spec@^0.1.39": - version "0.1.39" - resolved "https://registry.npmjs.org/@aws-cdk/aws-service-spec/-/aws-service-spec-0.1.39.tgz#ae70cb59f9e20dbfb0c5b66671c35adaa0d51503" - integrity sha512-d0WygAOVbPVVn/nopwy2yY40kN7blGAvtIegNhfxPEwP7hU50DwK8nBUZEBz1WzQL8+iOCD/PWIYYH2aoPAk5Q== +"@aws-cdk/aws-service-spec@^0.1.40": + version "0.1.40" + resolved "https://registry.npmjs.org/@aws-cdk/aws-service-spec/-/aws-service-spec-0.1.40.tgz#47cb3a68ab088b9d1882eae653d61a12d1b5743b" + integrity sha512-op8bV75AEkLJEjEDZMFNUCJkX4WLB+YtzT3tPX7LOOVNePDlUlbWrO29edHjvPfCiw2QkqCpGMjCeeygKCZVvQ== dependencies: - "@aws-cdk/service-spec-types" "^0.0.106" + "@aws-cdk/service-spec-types" "^0.0.107" "@cdklabs/tskb" "^0.0.3" "@aws-cdk/cloud-assembly-schema@^38.0.0", "@aws-cdk/cloud-assembly-schema@^38.0.1": @@ -106,12 +106,12 @@ resolved "https://registry.npmjs.org/@aws-cdk/lambda-layer-kubectl-v31/-/lambda-layer-kubectl-v31-2.0.0.tgz#d87799d7d0d5dad77af45281a36942e4b7996b6b" integrity sha512-8JI0sMDbqCubOyt1TbQFEwicYok9KYSrNSfzREgjGJcoPy17/Kd0gbe44ATyLMfjae7dExUhhwKMhr6GK7Hmrw== -"@aws-cdk/service-spec-importers@^0.0.59": - version "0.0.59" - resolved "https://registry.npmjs.org/@aws-cdk/service-spec-importers/-/service-spec-importers-0.0.59.tgz#c0fcd9a64083e555dc9e359fc4e175213437e919" - integrity sha512-OgIjNvRp7rJidxw+P0mMZCrmll6rmuS+N38s/8Zzw8WyUJ9ixyF1E8KNL2K+Jb+RUOsE6steWSChVBE2A+o+ag== +"@aws-cdk/service-spec-importers@^0.0.60": + version "0.0.60" + resolved "https://registry.npmjs.org/@aws-cdk/service-spec-importers/-/service-spec-importers-0.0.60.tgz#40f3960bb171ee6d967e2b2481c70541ed95b670" + integrity sha512-WC9ISRg3oPrfDi831IXgyX8GG7lamUWEv+6IOj4UBAb5LDEcWVDl73IHyq9AFiVPwEbIPUGPn3JTj9tqdpqB1w== dependencies: - "@aws-cdk/service-spec-types" "^0.0.106" + "@aws-cdk/service-spec-types" "^0.0.107" "@cdklabs/tskb" "^0.0.3" ajv "^6" canonicalize "^2.0.0" @@ -122,10 +122,10 @@ glob "^8" sort-json "^2.0.1" -"@aws-cdk/service-spec-types@^0.0.106": - version "0.0.106" - resolved "https://registry.npmjs.org/@aws-cdk/service-spec-types/-/service-spec-types-0.0.106.tgz#1739c42014e896bf36b70230c04dbf852d9d8269" - integrity sha512-hjEzUqawJIdhoef1DWOcMPqnonBmQv1xYGBEsQ6ddhEPEVIf/IA71eIjKl8bAourMO9ThLv53ThCklPLnVJy6w== +"@aws-cdk/service-spec-types@^0.0.107": + version "0.0.107" + resolved "https://registry.npmjs.org/@aws-cdk/service-spec-types/-/service-spec-types-0.0.107.tgz#9630507487ced2fe926b93cd77c6a0a099782c7f" + integrity sha512-zI9NU0eU6I0+W8vttyFHQghk6IEnr6ps/5qhGcnGdV51K4fN8pR3yDP5QVqZiJX1vqAl63aH/JIdt+yIvGr2uA== dependencies: "@cdklabs/tskb" "^0.0.3" @@ -5689,18 +5689,18 @@ "@jridgewell/resolve-uri" "^3.1.0" "@jridgewell/sourcemap-codec" "^1.4.14" -"@jsii/check-node@1.104.0": - version "1.104.0" - resolved "https://registry.npmjs.org/@jsii/check-node/-/check-node-1.104.0.tgz#093a616ab4a80abc9b932906c4f68c32362faa6c" - integrity sha512-5rAn4y11APxq69DmTKtAACmDuOymcTiz29CE7s0AeWA5jzpxBRhkaj8xwixiSQtkoBFk+Vpoi2eNctCvwLdFaw== +"@jsii/check-node@1.103.1": + version "1.103.1" + resolved "https://registry.npmjs.org/@jsii/check-node/-/check-node-1.103.1.tgz#6eb9147993b9f035ae1730c5821a75872a5e4928" + integrity sha512-Vi6ONm5WXEim98a2DJ6WMlrP/w5AGzXrrQBpGcfVV7cu86DPx1L0OAZnqzGAJE8ly0VfcSXkmxJ9LFcn3jylBQ== dependencies: chalk "^4.1.2" semver "^7.6.3" -"@jsii/check-node@1.105.0": - version "1.105.0" - resolved "https://registry.npmjs.org/@jsii/check-node/-/check-node-1.105.0.tgz#92ffea17d1497ddf9b104088d65a363bbf9d2b64" - integrity sha512-7QIzioc9//TwRjLhGMllcTBfIvJ0h6OeGVUEYdXB1DpCNtMbr8Xcj5KaeKHRAF9iRjB1d0IGzKm4A8fRUzIf+Q== +"@jsii/check-node@1.104.0": + version "1.104.0" + resolved "https://registry.npmjs.org/@jsii/check-node/-/check-node-1.104.0.tgz#093a616ab4a80abc9b932906c4f68c32362faa6c" + integrity sha512-5rAn4y11APxq69DmTKtAACmDuOymcTiz29CE7s0AeWA5jzpxBRhkaj8xwixiSQtkoBFk+Vpoi2eNctCvwLdFaw== dependencies: chalk "^4.1.2" semver "^7.6.3" @@ -5713,20 +5713,20 @@ chalk "^4.1.2" semver "^7.6.3" -"@jsii/spec@1.106.0", "@jsii/spec@^1.105.0", "@jsii/spec@^1.106.0": - version "1.106.0" - resolved "https://registry.npmjs.org/@jsii/spec/-/spec-1.106.0.tgz#f40010ec8cde14b7a003dd5b6a46480d9d7e222f" - integrity sha512-pAIvqEGf0YLmtzFtUKWNEGkCmXMHENy7k+rzCD147wnM4jHhvEL1mEvxi99aA2VcmvLYaAYNOs/XozT+s+kLqQ== - dependencies: - ajv "^8.17.1" - -"@jsii/spec@^1.104.0": +"@jsii/spec@1.104.0", "@jsii/spec@^1.103.1", "@jsii/spec@^1.104.0": version "1.104.0" resolved "https://registry.npmjs.org/@jsii/spec/-/spec-1.104.0.tgz#9f1206b3712808ad7cbbdbf6cf333a77a8f3df8c" integrity sha512-7jxU8iRowA3O7Dpn8XAsX8o4Y8Fy8plbEVg0CnjvIQsJh3puI3KFHspXur70OOccfGkoL1TWnXBZ+BwCcvhu1g== dependencies: ajv "^8.17.1" +"@jsii/spec@^1.106.0": + version "1.106.0" + resolved "https://registry.npmjs.org/@jsii/spec/-/spec-1.106.0.tgz#f40010ec8cde14b7a003dd5b6a46480d9d7e222f" + integrity sha512-pAIvqEGf0YLmtzFtUKWNEGkCmXMHENy7k+rzCD147wnM4jHhvEL1mEvxi99aA2VcmvLYaAYNOs/XozT+s+kLqQ== + dependencies: + ajv "^8.17.1" + "@lerna/create@8.1.8": version "8.1.8" resolved "https://registry.npmjs.org/@lerna/create/-/create-8.1.8.tgz#be70d620f1d6b71e9d6b9d20049b784168b6ca19" @@ -8309,10 +8309,10 @@ loupe "^3.1.1" tinyrainbow "^1.2.0" -"@xmldom/xmldom@^0.9.5": - version "0.9.6" - resolved "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.9.6.tgz#3eaefb585c1f920e06fb35e6dcb8d505445621c0" - integrity sha512-Su4xcxR0CPGwlDHNmVP09fqET9YxbyDXHaSob6JlBH7L6reTYaeim6zbk9o08UarO0L5GTRo3uzl0D+9lSxmvw== +"@xmldom/xmldom@^0.9.0": + version "0.9.4" + resolved "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.9.4.tgz#6027f1fc5c07f2d0fa9ab26c9de63cfa80699e23" + integrity sha512-zglELfWx7g1cEpVMRBZ0srIQO5nEvKvraJ6CVUC/c5Ky1GgX8OIjtUj5qOweTYULYZo5VnXs/LpUUUNiGpX/rA== "@yarnpkg/lockfile@^1.1.0": version "1.1.0" @@ -9659,10 +9659,10 @@ code-block-writer@^13.0.3: resolved "https://registry.npmjs.org/code-block-writer/-/code-block-writer-13.0.3.tgz#90f8a84763a5012da7af61319dd638655ae90b5b" integrity sha512-Oofo0pq3IKnsFtuHqSF7TqBfr71aeyZDVJ0HpmqB7FBM2qEigL0iPONSCZSO9pE9dZTAxANe5XHG9Uy0YMv8cg== -codemaker@^1.106.0: - version "1.106.0" - resolved "https://registry.npmjs.org/codemaker/-/codemaker-1.106.0.tgz#c696de48847e7758731b72d89264e972eaceb4d0" - integrity sha512-1aLNQCF/3DVxXol6eRqoLZnYulAwWPGq8BMF8pMZu+CaNkR7c0T5otMcbAXcskRLChiFt+BjVWS3JPVeBOHD4w== +codemaker@^1.104.0: + version "1.104.0" + resolved "https://registry.npmjs.org/codemaker/-/codemaker-1.104.0.tgz#e310320177d774e3c62e80e862802c3688b63a4d" + integrity sha512-BC95gULaPN4MMeWxeLXHGatkac6LOArHMAkPkl3wQdcVa7MO4OzST6e8tY71iqA3KrgamfP0vQ34N9rDkfDyGg== dependencies: camelcase "^6.3.0" decamelize "^5.0.1" @@ -9786,7 +9786,7 @@ commondir@^1.0.1: resolved "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" integrity sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg== -commonmark@^0.31.2: +commonmark@^0.31.1: version "0.31.2" resolved "https://registry.npmjs.org/commonmark/-/commonmark-0.31.2.tgz#9d8d5439c82c9a235154d858a53e1a7965d573a5" integrity sha512-2fRLTyb9r/2835k5cwcAwOj0DEc44FARnMp5veGsJ+mEAZdi52sNopLu07ZyElQUz058H43whzlERDIaaSw4rg== @@ -10725,6 +10725,15 @@ dotgitignore@^2.1.0: find-up "^3.0.0" minimatch "^3.0.4" +downlevel-dts@^0.11.0: + version "0.11.0" + resolved "https://registry.npmjs.org/downlevel-dts/-/downlevel-dts-0.11.0.tgz#514a2d723009c5845730c1db6c994484c596ed9c" + integrity sha512-vo835pntK7kzYStk7xUHDifiYJvXxVhUapt85uk2AI94gUUAQX9HNRtrcMHNSc3YHJUEHGbYIGsM99uIbgAtxw== + dependencies: + semver "^7.3.2" + shelljs "^0.8.3" + typescript next + dreamopt@~0.8.0: version "0.8.0" resolved "https://registry.npmjs.org/dreamopt/-/dreamopt-0.8.0.tgz#5bcc80be7097e45fc489c342405ab68140a8c1d9" @@ -11996,7 +12005,7 @@ glob@^10.2.2, glob@^10.3.10, glob@^10.3.7: package-json-from-dist "^1.0.0" path-scurry "^1.11.1" -glob@^7.1.1, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6, glob@^7.1.7, glob@^7.2.0, glob@^7.2.3: +glob@^7.0.0, glob@^7.1.1, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6, glob@^7.1.7, glob@^7.2.0, glob@^7.2.3: version "7.2.3" resolved "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== @@ -12558,6 +12567,11 @@ internal-slot@^1.0.7: hasown "^2.0.0" side-channel "^1.0.4" +interpret@^1.0.0: + version "1.4.0" + resolved "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e" + integrity sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA== + ip-address@^9.0.5: version "9.0.5" resolved "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz#117a960819b08780c3bd1f14ef3c1cc1d3f3ea5a" @@ -13500,49 +13514,37 @@ jsesc@^3.0.2: resolved "https://registry.npmjs.org/jsesc/-/jsesc-3.0.2.tgz#bb8b09a6597ba426425f2e4a07245c3d00b9343e" integrity sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g== -jsii-diff@1.106.0: - version "1.106.0" - resolved "https://registry.npmjs.org/jsii-diff/-/jsii-diff-1.106.0.tgz#5619755f62f7c65b3f35f688639cf7f82e7443a0" - integrity sha512-1UMvocIJCsUzb0IG/fcOANsm2qVN8lcWG5AD98bljlkJenO33i+YzIChIZc/JqKY0cQFRc7OIEcExt3GtqRzNQ== +jsii-diff@1.104.0: + version "1.104.0" + resolved "https://registry.npmjs.org/jsii-diff/-/jsii-diff-1.104.0.tgz#8e3e8e8a0a6b0e30944ccc0d60e15f91290ae052" + integrity sha512-QIuHZVbrqRedZVoUQhoz/Qa93EnW0oSV5lviXPPA2/I6etEXy0+KnLS68nsGCL9/koSNK9vGl8X2Qo46MpKuBw== dependencies: - "@jsii/check-node" "1.106.0" - "@jsii/spec" "^1.106.0" + "@jsii/check-node" "1.104.0" + "@jsii/spec" "^1.104.0" fs-extra "^10.1.0" - jsii-reflect "^1.106.0" + jsii-reflect "^1.104.0" log4js "^6.9.1" yargs "^16.2.0" -jsii-pacmak@1.106.0: - version "1.106.0" - resolved "https://registry.npmjs.org/jsii-pacmak/-/jsii-pacmak-1.106.0.tgz#0622a5770585a35b84abff964cb58aaa38f12779" - integrity sha512-cNSzPszHaFg5AYwOQhp+eM/KpOJupdeyyycrzR6AtxwSmRN6x4K7YybZY/Rk0zfqGds9ukOYv0euGLZuXzXt1w== +jsii-pacmak@1.104.0: + version "1.104.0" + resolved "https://registry.npmjs.org/jsii-pacmak/-/jsii-pacmak-1.104.0.tgz#994d52e0e063f78f23c8502e826606e0552c1fa6" + integrity sha512-KxdYOzpBSnixZ5VjKsWvVIaRAwW4L5JJS3GE0yn5pj6Antx2sjaMvy6XsbjI1MPiOe/W8xNlRDW/XgNE+Bzt6g== dependencies: - "@jsii/check-node" "1.106.0" - "@jsii/spec" "^1.106.0" + "@jsii/check-node" "1.104.0" + "@jsii/spec" "^1.104.0" clone "^2.1.2" - codemaker "^1.106.0" - commonmark "^0.31.2" + codemaker "^1.104.0" + commonmark "^0.31.1" escape-string-regexp "^4.0.0" fs-extra "^10.1.0" - jsii-reflect "^1.106.0" + jsii-reflect "^1.104.0" semver "^7.6.3" spdx-license-list "^6.9.0" xmlbuilder "^15.1.1" yargs "^16.2.0" -jsii-reflect@1.106.0, jsii-reflect@^1.106.0: - version "1.106.0" - resolved "https://registry.npmjs.org/jsii-reflect/-/jsii-reflect-1.106.0.tgz#8d9bfa7cd22e677fbcc433781b919df3b41d8b2d" - integrity sha512-3t+a8kT4G5fYnQAM7eS8bgUpK+Vj1sFgABqLIC2Oae+8rUb6J+v7xTSvqWEOlO0FI608/BwalWsXsvW+Mtogmw== - dependencies: - "@jsii/check-node" "1.106.0" - "@jsii/spec" "^1.106.0" - chalk "^4" - fs-extra "^10.1.0" - oo-ascii-tree "^1.106.0" - yargs "^16.2.0" - -jsii-reflect@^1.104.0: +jsii-reflect@1.104.0, jsii-reflect@^1.104.0: version "1.104.0" resolved "https://registry.npmjs.org/jsii-reflect/-/jsii-reflect-1.104.0.tgz#5ac03b8e895c4b248743969252fab699ef2df5a5" integrity sha512-tBdJvLPdfrlAI7ijKmuUv48Nkk0aC26VC/wtNjVqtJmpKsDOOG1JXKiIny690FnifhgpdoHnrVE12asSpFdPfA== @@ -13554,25 +13556,44 @@ jsii-reflect@^1.104.0: oo-ascii-tree "^1.104.0" yargs "^16.2.0" -jsii-rosetta@~5.7.0: - version "5.7.1" - resolved "https://registry.npmjs.org/jsii-rosetta/-/jsii-rosetta-5.7.1.tgz#8b5721ff5d6ea6572f12aa97e0657222aa75c961" - integrity sha512-joxTYrpaYYUFpDYwNhf0lHyp1i6ZfXjpl2AkSCEd6vd0FvmK00tKbWu8UnY/dA7ryI1hvDkm1MTi6f4s36ZzZg== +jsii-rosetta@~5.4.36: + version "5.4.36" + resolved "https://registry.npmjs.org/jsii-rosetta/-/jsii-rosetta-5.4.36.tgz#394fa5a9daa7790c55041524158b0e852d49daa5" + integrity sha512-7rYdbq0NCTID6XSxJYZkMLfrO+8loO2ZSlokVLgAeEQ1YSwF6ydqLHuFkYr4iZwpugLSSLVDRi8q+e6aHh9XBA== dependencies: - "@jsii/check-node" "1.105.0" - "@jsii/spec" "^1.105.0" - "@xmldom/xmldom" "^0.9.5" + "@jsii/check-node" "1.103.1" + "@jsii/spec" "^1.103.1" + "@xmldom/xmldom" "^0.9.0" chalk "^4" - commonmark "^0.31.2" + commonmark "^0.31.1" fast-glob "^3.3.2" - jsii "~5.7.0" + jsii "~5.4.0" semver "^7.6.3" semver-intersect "^1.5.0" - stream-json "^1.9.1" - typescript "~5.7" + stream-json "^1.8.0" + typescript "~5.4" workerpool "^6.5.1" yargs "^17.7.2" +jsii@~5.4.0: + version "5.4.36" + resolved "https://registry.npmjs.org/jsii/-/jsii-5.4.36.tgz#376afc0553b44d81abd83f7e95927e831a652fce" + integrity sha512-bFd+CJ2gqtJi49Nx1i76d22VJj6gi+Ztq5OZk3mCmkGzzXhV7F3TC4Cf4Z4mJjjCbr5693SXYRZmk5SkpJvt9A== + dependencies: + "@jsii/check-node" "1.103.1" + "@jsii/spec" "^1.103.1" + case "^1.6.3" + chalk "^4" + downlevel-dts "^0.11.0" + fast-deep-equal "^3.1.3" + log4js "^6.9.1" + semver "^7.6.3" + semver-intersect "^1.5.0" + sort-json "^2.0.1" + spdx-license-list "^6.9.0" + typescript "~5.4" + yargs "^17.7.2" + jsii@~5.7.0: version "5.7.3" resolved "https://registry.npmjs.org/jsii/-/jsii-5.7.3.tgz#5f35be6529cf316cd903692112ad8321aa710ab4" @@ -15652,11 +15673,6 @@ oo-ascii-tree@^1.104.0: resolved "https://registry.npmjs.org/oo-ascii-tree/-/oo-ascii-tree-1.104.0.tgz#f17857f84f25b0b9d0879bbea2f04caf15a72384" integrity sha512-2cScXtwxt5WVIi3+vdkbKoHSeRepRcibnFhdV2ojGxVvj1KU0m0EHfBCsal6XEg1vBkMgTIxnxVd+E/l/Fam3w== -oo-ascii-tree@^1.106.0: - version "1.106.0" - resolved "https://registry.npmjs.org/oo-ascii-tree/-/oo-ascii-tree-1.106.0.tgz#58a017dd63f93dc912c9037080967ed7b7afa997" - integrity sha512-0PZkjIiJUW3jEx7durxcri7JciR8VbJpf2K3qiVbGG4x0MTq6Xm/H84GjBI6tamSx/DV1PMFDfwMs3hm8zfOCw== - open@^8.4.0: version "8.4.2" resolved "https://registry.npmjs.org/open/-/open-8.4.2.tgz#5b5ffe2a8f793dcd2aad73e550cb87b59cb084f9" @@ -16763,6 +16779,13 @@ recast@^0.23.1: tiny-invariant "^1.3.3" tslib "^2.0.1" +rechoir@^0.6.2: + version "0.6.2" + resolved "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" + integrity sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw== + dependencies: + resolve "^1.1.6" + redent@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz#e557b7998316bb53c9f1f56fa626352c6963059f" @@ -16872,7 +16895,7 @@ resolve.exports@^2.0.0: resolved "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.2.tgz#f8c934b8e6a13f539e38b7098e2e36134f01e800" integrity sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg== -resolve@^1.10.0, resolve@^1.20.0, resolve@^1.21.0, resolve@^1.22.0, resolve@^1.22.4: +resolve@^1.1.6, resolve@^1.10.0, resolve@^1.20.0, resolve@^1.21.0, resolve@^1.22.0, resolve@^1.22.4: version "1.22.8" resolved "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d" integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw== @@ -17058,7 +17081,7 @@ semver@^6.0.0, semver@^6.1.1, semver@^6.3.0, semver@^6.3.1: resolved "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== -semver@^7.0.0, semver@^7.1.1, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.3.8, semver@^7.5.1, semver@^7.5.3, semver@^7.5.4, semver@^7.6.0, semver@^7.6.3: +semver@^7.0.0, semver@^7.1.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.3.8, semver@^7.5.1, semver@^7.5.3, semver@^7.5.4, semver@^7.6.0, semver@^7.6.3: version "7.6.3" resolved "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143" integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== @@ -17152,6 +17175,15 @@ shebang-regex@^3.0.0: resolved "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== +shelljs@^0.8.3: + version "0.8.5" + resolved "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz#de055408d8361bed66c669d2f000538ced8ee20c" + integrity sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow== + dependencies: + glob "^7.0.0" + interpret "^1.0.0" + rechoir "^0.6.2" + shlex@^2.1.2: version "2.1.2" resolved "https://registry.npmjs.org/shlex/-/shlex-2.1.2.tgz#5b5384d603885281c1dee05d56975865edddcba0" @@ -17514,10 +17546,10 @@ stream-chain@^2.2.5: resolved "https://registry.npmjs.org/stream-chain/-/stream-chain-2.2.5.tgz#b30967e8f14ee033c5b9a19bbe8a2cba90ba0d09" integrity sha512-1TJmBx6aSWqZ4tx7aTpBDXK0/e2hhcNSTV8+CbFJtDjbb+I1mZ8lHit0Grw9GRT+6JbIrrDd8esncgBi8aBXGA== -stream-json@^1.9.1: - version "1.9.1" - resolved "https://registry.npmjs.org/stream-json/-/stream-json-1.9.1.tgz#e3fec03e984a503718946c170db7d74556c2a187" - integrity sha512-uWkjJ+2Nt/LO9Z/JyKZbMusL8Dkh97uUBTv3AJQ74y07lVahLY4eEFsPsE97pxYBwr8nnjMAIch5eqI0gPShyw== +stream-json@^1.8.0: + version "1.9.0" + resolved "https://registry.npmjs.org/stream-json/-/stream-json-1.9.0.tgz#caae36fd9fff99662f504dce859bc855d5668282" + integrity sha512-TqnfW7hRTKje7UobBzXZJ2qOEDJvdcSVgVIK/fopC03xINFuFqQs8RVjyDT4ry7TmOo2ueAXwpXXXG4tNgtvoQ== dependencies: stream-chain "^2.2.5" @@ -18225,6 +18257,16 @@ typescript@^3.9.10, typescript@^3.9.5, typescript@^3.9.7: resolved "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz#70f3910ac7a51ed6bef79da7800690b19bf778b8" integrity sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q== +typescript@next: + version "5.7.0-dev.20241023" + resolved "https://registry.npmjs.org/typescript/-/typescript-5.7.0-dev.20241023.tgz#83a5ecd5b4f98f1f94ba915bcc858faa765733df" + integrity sha512-HB6rRd9ySnFMoQUuDasWnBtvOg1P4CFG3nRfs2ZvFbenUkxSzoeeZ0PUwJJ7MKJp5zz7uMTZamGt7zdj0tP9YA== + +typescript@~5.4: + version "5.4.5" + resolved "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz#42ccef2c571fdbd0f6718b1d1f5e6e5ef006f611" + integrity sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ== + typescript@~5.5.0, typescript@~5.5.2: version "5.5.4" resolved "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz#d9852d6c82bad2d2eda4fd74a5762a8f5909e9ba"