diff --git a/.github/workflows/integ.yml b/.github/workflows/integ.yml index 84c96580..74a9b1a0 100644 --- a/.github/workflows/integ.yml +++ b/.github/workflows/integ.yml @@ -22,7 +22,10 @@ jobs: with: ref: ${{ github.event.pull_request.head.sha }} repository: ${{ github.event.pull_request.head.repo.full_name }} - fetch-depth: 0 + - name: Fetch tags from origin repo + run: |- + git remote add upstream https://github.com/aws/aws-cdk-cli.git + git fetch upstream 'refs/tags/*:refs/tags/*' - name: Setup Node.js uses: actions/setup-node@v4 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e01c7fdb..9e846b0d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -549,7 +549,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_REPOSITORY: ${{ github.repository }} GITHUB_REF: ${{ github.sha }} - run: errout=$(mktemp); gh release create $(cat dist/releasetag.txt) -R $GITHUB_REPOSITORY -F dist/changelog.md -t $(cat dist/releasetag.txt) --target $GITHUB_REF -p 2> $errout && true; exitcode=$?; if [ $exitcode -ne 0 ] && ! grep -q "Release.tag_name already exists" $errout; then cat $errout; exit $exitcode; fi + run: errout=$(mktemp); gh release create $(cat dist/releasetag.txt) -R $GITHUB_REPOSITORY -F dist/changelog.md -t $(cat dist/releasetag.txt) --target $GITHUB_REF 2> $errout && true; exitcode=$?; if [ $exitcode -ne 0 ] && ! grep -q "Release.tag_name already exists" $errout; then cat $errout; exit $exitcode; fi cdk-assets_release_npm: name: "cdk-assets: Publish to npm" needs: release diff --git a/.projen/deps.json b/.projen/deps.json index 20beca28..80a2e6d8 100644 --- a/.projen/deps.json +++ b/.projen/deps.json @@ -39,7 +39,6 @@ }, { "name": "cdklabs-projen-project-types", - "version": "^0.1.220", "type": "build" }, { diff --git a/.projenrc.ts b/.projenrc.ts index 327c0377..5bbbfdca 100644 --- a/.projenrc.ts +++ b/.projenrc.ts @@ -152,6 +152,21 @@ function transitiveFeaturesAndFixes(thisPkg: string, depPkgs: string[]) { ].join(' ')); } +/** + * Returns all packages that are considered part of the toolkit, + * as relative paths from the provided package. + */ +function transitiveToolkitPackages(thisPkg: string) { + const toolkitPackages = [ + 'aws-cdk', + '@aws-cdk/tmp-toolkit-helpers', + '@aws-cdk/cloud-assembly-schema', + '@aws-cdk/cloudformation-diff', + ]; + + return transitiveFeaturesAndFixes(thisPkg, toolkitPackages.filter(name => name !== thisPkg)); +} + const repoProject = new yarn.Monorepo({ projenrcTs: true, name: 'aws-cdk-cli', @@ -160,7 +175,7 @@ const repoProject = new yarn.Monorepo({ defaultReleaseBranch: 'main', devDeps: [ - 'cdklabs-projen-project-types@^0.1.220', + 'cdklabs-projen-project-types', 'glob', 'semver', `@aws-sdk/client-s3@${CLI_SDK_V3_RANGE}`, @@ -623,7 +638,6 @@ const cdkAssets = configureProject( }, ], npmDistTag: 'v3-latest', - prerelease: 'rc', majorVersion: 3, jestOptions: jestOptionsForProject({ @@ -665,6 +679,38 @@ cdkAssets.eslint?.addRules({ 'jest/no-export': ['off'] }); ////////////////////////////////////////////////////////////////////// +const tmpToolkitHelpers = configureProject( + new yarn.TypeScriptWorkspace({ + ...genericCdkProps({ + private: true, + }), + parent: repo, + name: '@aws-cdk/tmp-toolkit-helpers', + description: 'A temporary package to hold code shared between aws-cdk and @aws-cdk/toolkit-lib', + deps: [], + devDeps: [ + cdkBuildTools, + ], + tsconfig: { + compilerOptions: { + target: 'es2022', + lib: ['es2022', 'esnext.disposable'], + module: 'NodeNext', + esModuleInterop: false, + }, + }, + }), +); + +// Prevent imports of private API surface +tmpToolkitHelpers.package.addField('exports', { + '.': './lib/index.js', + './package.json': './package.json', + './api': './lib/api/index.js', +}); + +////////////////////////////////////////////////////////////////////// + let CLI_SDK_VERSION: '2' | '3' = ('3' as any); const cli = configureProject( @@ -680,6 +726,7 @@ const cli = configureProject( cdkBuildTools, yargsGen, cliPluginContract, + tmpToolkitHelpers, '@octokit/rest', '@types/archiver', '@types/fs-extra@^9', @@ -823,7 +870,7 @@ const cli = configureProject( // Append a specific version string for testing nextVersionCommand: 'tsx ../../projenrc/next-version.ts maybeRc', - releasableCommits: transitiveFeaturesAndFixes('aws-cdk', [cloudAssemblySchema.name, cloudFormationDiff.name]), + releasableCommits: transitiveToolkitPackages('aws-cdk'), }), ); @@ -959,7 +1006,7 @@ const cliLib = configureProject( devDeps: ['aws-cdk-lib', cli, 'constructs'], disableTsconfig: true, nextVersionCommand: `tsx ../../../projenrc/next-version.ts copyVersion:../../../${cliPackageJson} append:-alpha.0`, - releasableCommits: transitiveFeaturesAndFixes('@aws-cdk/cli-lib-alpha', [cli.name, cloudAssemblySchema.name, cloudFormationDiff.name]), + releasableCommits: transitiveToolkitPackages('@aws-cdk/cli-lib-alpha'), eslintOptions: { dirs: ['lib'], ignorePatterns: [ @@ -1115,13 +1162,14 @@ const toolkitLib = configureProject( '@types/fs-extra', '@types/split2', cli, + tmpToolkitHelpers, 'aws-cdk-lib', 'aws-sdk-client-mock', 'esbuild', 'typedoc', ], // Watch 2 directories at once - releasableCommits: transitiveFeaturesAndFixes('@aws-cdk/toolkit-lib', [cli.name, cloudAssemblySchema.name, cloudFormationDiff.name]), + releasableCommits: transitiveToolkitPackages('@aws-cdk/toolkit-lib'), eslintOptions: { dirs: ['lib'], ignorePatterns: [ @@ -1167,6 +1215,11 @@ toolkitLib.eslint?.addRules({ target: './', from: '../../aws-cdk', message: 'All `aws-cdk` code must be used via lib/api/aws-cdk.ts', + }, + { + target: './', + from: '../tmp-toolkit-helpers', + message: 'All `@aws-cdk/tmp-toolkit-helpers` code must be used via lib/api/shared-*.ts', }], }], }); @@ -1262,7 +1315,7 @@ const cdkCliWrapper = configureProject( srcdir: 'lib', devDeps: ['aws-cdk-lib', cli, 'constructs', '@aws-cdk/integ-runner'], nextVersionCommand: `tsx ../../../projenrc/next-version.ts copyVersion:../../../${cliPackageJson}`, - releasableCommits: transitiveFeaturesAndFixes('@aws-cdk/cdk-cli-wrapper', [cli.name, cloudAssemblySchema.name, cloudFormationDiff.name]), + releasableCommits: transitiveToolkitPackages('@aws-cdk/cdk-cli-wrapper'), jestOptions: jestOptionsForProject({ jestConfig: { @@ -1292,7 +1345,7 @@ const cdkAliasPackage = configureProject( srcdir: 'lib', deps: [cli], nextVersionCommand: `tsx ../../projenrc/next-version.ts copyVersion:../../${cliPackageJson}`, - releasableCommits: transitiveFeaturesAndFixes('cdk', [cli.name, cloudAssemblySchema.name, cloudFormationDiff.name]), + releasableCommits: transitiveToolkitPackages('cdk'), }), ); void cdkAliasPackage; @@ -1324,11 +1377,11 @@ const APPROVAL_ENVIRONMENT = 'integ-approval'; const TEST_ENVIRONMENT = 'run-tests'; new CdkCliIntegTestsWorkflow(repo, { + sourceRepo: 'aws/aws-cdk-cli', approvalEnvironment: APPROVAL_ENVIRONMENT, testEnvironment: TEST_ENVIRONMENT, buildRunsOn: POWERFUL_RUNNER, testRunsOn: POWERFUL_RUNNER, - expectNewCliLibVersion: true, localPackages: [ // CloudAssemblySchema is not in this list because in the way we're doing diff --git a/aws-cdk-cli.code-workspace b/aws-cdk-cli.code-workspace index 15ad8a73..acae91b7 100644 --- a/aws-cdk-cli.code-workspace +++ b/aws-cdk-cli.code-workspace @@ -26,6 +26,9 @@ { "path": "packages/@aws-cdk/node-bundle" }, + { + "path": "packages/@aws-cdk/tmp-toolkit-helpers" + }, { "path": "packages/@aws-cdk/toolkit-lib" }, diff --git a/package.json b/package.json index a33a4c36..3cc39e7a 100644 --- a/package.json +++ b/package.json @@ -25,11 +25,11 @@ "@aws-sdk/credential-providers": "^3", "@aws-sdk/lib-storage": "^3", "@cdklabs/eslint-plugin": "^1.3.2", - "@stylistic/eslint-plugin": "^2.13.0", + "@stylistic/eslint-plugin": "^3.1.0", "@types/node": "^22.13.5", "@typescript-eslint/eslint-plugin": "^8", "@typescript-eslint/parser": "^8", - "cdklabs-projen-project-types": "^0.1.220", + "cdklabs-projen-project-types": "^0.2.1", "constructs": "^10.0.0", "eslint": "^9", "eslint-import-resolver-typescript": "^3.8.3", @@ -66,6 +66,7 @@ "packages/@aws-cdk/cdk-build-tools", "packages/@aws-cdk/cli-plugin-contract", "packages/cdk-assets", + "packages/@aws-cdk/tmp-toolkit-helpers", "packages/aws-cdk", "packages/@aws-cdk/cli-lib-alpha", "packages/@aws-cdk/toolkit-lib", @@ -89,6 +90,7 @@ "/packages/@aws-cdk/cdk-build-tools", "/packages/@aws-cdk/cli-plugin-contract", "/packages/cdk-assets", + "/packages/@aws-cdk/tmp-toolkit-helpers", "/packages/aws-cdk", "/packages/@aws-cdk/cli-lib-alpha", "/packages/@aws-cdk/toolkit-lib", diff --git a/packages/@aws-cdk/cdk-cli-wrapper/lib/commands/deploy.ts b/packages/@aws-cdk/cdk-cli-wrapper/lib/commands/deploy.ts index 59ffedef..b096885e 100644 --- a/packages/@aws-cdk/cdk-cli-wrapper/lib/commands/deploy.ts +++ b/packages/@aws-cdk/cdk-cli-wrapper/lib/commands/deploy.ts @@ -56,7 +56,7 @@ export interface DeployOptions extends DefaultCdkOptions { /** * What kind of security changes require approval * - * @default RequireApproval.Never + * @default RequireApproval.NEVER */ readonly requireApproval?: RequireApproval; diff --git a/packages/@aws-cdk/cli-lib-alpha/.projen/tasks.json b/packages/@aws-cdk/cli-lib-alpha/.projen/tasks.json index 9b4551a3..68719d7c 100644 --- a/packages/@aws-cdk/cli-lib-alpha/.projen/tasks.json +++ b/packages/@aws-cdk/cli-lib-alpha/.projen/tasks.json @@ -33,7 +33,7 @@ "VERSIONRCOPTIONS": "{\"path\":\".\"}", "BUMP_PACKAGE": "commit-and-tag-version@^12", "NEXT_VERSION_COMMAND": "tsx ../../../projenrc/next-version.ts copyVersion:../../../packages/aws-cdk/package.json append:-alpha.0", - "RELEASABLE_COMMITS": "git log --no-merges --oneline $LATEST_TAG..HEAD -E --grep \"^(feat|fix){1}(\\([^()[:space:]]+\\))?(!)?:[[:blank:]]+.+\" -- . ../../aws-cdk ../cloud-assembly-schema ../cloudformation-diff" + "RELEASABLE_COMMITS": "git log --no-merges --oneline $LATEST_TAG..HEAD -E --grep \"^(feat|fix){1}(\\([^()[:space:]]+\\))?(!)?:[[:blank:]]+.+\" -- . ../../aws-cdk ../tmp-toolkit-helpers ../cloud-assembly-schema ../cloudformation-diff" }, "steps": [ { @@ -299,7 +299,7 @@ "VERSIONRCOPTIONS": "{\"path\":\".\"}", "BUMP_PACKAGE": "commit-and-tag-version@^12", "NEXT_VERSION_COMMAND": "tsx ../../../projenrc/next-version.ts copyVersion:../../../packages/aws-cdk/package.json append:-alpha.0", - "RELEASABLE_COMMITS": "git log --no-merges --oneline $LATEST_TAG..HEAD -E --grep \"^(feat|fix){1}(\\([^()[:space:]]+\\))?(!)?:[[:blank:]]+.+\" -- . ../../aws-cdk ../cloud-assembly-schema ../cloudformation-diff" + "RELEASABLE_COMMITS": "git log --no-merges --oneline $LATEST_TAG..HEAD -E --grep \"^(feat|fix){1}(\\([^()[:space:]]+\\))?(!)?:[[:blank:]]+.+\" -- . ../../aws-cdk ../tmp-toolkit-helpers ../cloud-assembly-schema ../cloudformation-diff" }, "steps": [ { diff --git a/packages/@aws-cdk/cli-lib-alpha/API.md b/packages/@aws-cdk/cli-lib-alpha/API.md index 123f7366..bbb3b0a4 100644 --- a/packages/@aws-cdk/cli-lib-alpha/API.md +++ b/packages/@aws-cdk/cli-lib-alpha/API.md @@ -1126,7 +1126,7 @@ public readonly requireApproval: RequireApproval; ``` - *Type:* RequireApproval -- *Default:* RequireApproval.Never +- *Default:* RequireApproval.NEVER What kind of security changes require approval. diff --git a/packages/@aws-cdk/cli-lib-alpha/lib/commands/deploy.ts b/packages/@aws-cdk/cli-lib-alpha/lib/commands/deploy.ts index 4af8da8a..34c05242 100644 --- a/packages/@aws-cdk/cli-lib-alpha/lib/commands/deploy.ts +++ b/packages/@aws-cdk/cli-lib-alpha/lib/commands/deploy.ts @@ -74,7 +74,7 @@ export interface DeployOptions extends SharedOptions { /** * What kind of security changes require approval * - * @default RequireApproval.Never + * @default RequireApproval.NEVER */ readonly requireApproval?: RequireApproval; diff --git a/packages/@aws-cdk/cloud-assembly-schema/lib/integ-tests/commands/deploy.ts b/packages/@aws-cdk/cloud-assembly-schema/lib/integ-tests/commands/deploy.ts index 8d63a7d9..72a1f6e9 100644 --- a/packages/@aws-cdk/cloud-assembly-schema/lib/integ-tests/commands/deploy.ts +++ b/packages/@aws-cdk/cloud-assembly-schema/lib/integ-tests/commands/deploy.ts @@ -56,7 +56,7 @@ export interface DeployOptions extends DefaultCdkOptions { /** * What kind of security changes require approval * - * @default RequireApproval.Never + * @default RequireApproval.NEVER */ readonly requireApproval?: RequireApproval; diff --git a/packages/@aws-cdk/cloud-assembly-schema/schema/integ.schema.json b/packages/@aws-cdk/cloud-assembly-schema/schema/integ.schema.json index a43e4f30..5bd06f91 100644 --- a/packages/@aws-cdk/cloud-assembly-schema/schema/integ.schema.json +++ b/packages/@aws-cdk/cloud-assembly-schema/schema/integ.schema.json @@ -167,7 +167,7 @@ } }, "requireApproval": { - "description": "What kind of security changes require approval (Default RequireApproval.Never)", + "description": "What kind of security changes require approval (Default RequireApproval.NEVER)", "enum": [ "any-change", "broadening", diff --git a/packages/@aws-cdk/cloud-assembly-schema/schema/version.json b/packages/@aws-cdk/cloud-assembly-schema/schema/version.json index cbb32439..eff5ca19 100644 --- a/packages/@aws-cdk/cloud-assembly-schema/schema/version.json +++ b/packages/@aws-cdk/cloud-assembly-schema/schema/version.json @@ -1,4 +1,4 @@ { - "schemaHash": "1063bafc562a50e6dafeb8664275f5d61ff631542d47992963bfaf5cf277ab6e", + "schemaHash": "4244f1ed6fcece9abcfb319c637fd2eb863a5deef9cc36f05f7d52377ce60012", "revision": 40 } \ No newline at end of file diff --git a/packages/@aws-cdk/tmp-toolkit-helpers/.eslintrc.js b/packages/@aws-cdk/tmp-toolkit-helpers/.eslintrc.js new file mode 100644 index 00000000..8f296a38 --- /dev/null +++ b/packages/@aws-cdk/tmp-toolkit-helpers/.eslintrc.js @@ -0,0 +1,9 @@ +var path = require('path'); +var fs = require('fs'); +var contents = fs.readFileSync(`${__dirname}/.eslintrc.json`, { encoding: 'utf-8' }); +// Strip comments, JSON.parse() doesn't like those +contents = contents.replace(/^\/\/.*$/m, ''); +var json = JSON.parse(contents); +// Patch the .json config with something that can only be represented in JS +json.parserOptions.tsconfigRootDir = __dirname; +module.exports = json; \ No newline at end of file diff --git a/packages/@aws-cdk/tmp-toolkit-helpers/.eslintrc.json b/packages/@aws-cdk/tmp-toolkit-helpers/.eslintrc.json new file mode 100644 index 00000000..691af85e --- /dev/null +++ b/packages/@aws-cdk/tmp-toolkit-helpers/.eslintrc.json @@ -0,0 +1,324 @@ +// ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +{ + "env": { + "jest": true, + "node": true + }, + "root": true, + "plugins": [ + "@typescript-eslint", + "import", + "@cdklabs", + "@stylistic", + "jest", + "jsdoc" + ], + "parser": "@typescript-eslint/parser", + "parserOptions": { + "ecmaVersion": 2018, + "sourceType": "module", + "project": "./tsconfig.dev.json" + }, + "extends": [ + "plugin:import/typescript", + "plugin:jest/recommended", + "plugin:prettier/recommended" + ], + "settings": { + "import/parsers": { + "@typescript-eslint/parser": [ + ".ts", + ".tsx" + ] + }, + "import/resolver": { + "node": {}, + "typescript": { + "project": "./tsconfig.dev.json", + "alwaysTryTypes": true + } + } + }, + "ignorePatterns": [ + "*.js", + "*.d.ts", + "node_modules/", + "*.generated.ts", + "coverage", + "*.generated.ts" + ], + "rules": { + "@typescript-eslint/no-require-imports": [ + "error" + ], + "import/no-extraneous-dependencies": [ + "error", + { + "devDependencies": [ + "**/test/**", + "**/build-tools/**" + ], + "optionalDependencies": false, + "peerDependencies": true + } + ], + "import/no-unresolved": [ + "error" + ], + "import/order": [ + "error", + { + "groups": [ + "builtin", + "external" + ], + "alphabetize": { + "order": "asc", + "caseInsensitive": true + } + } + ], + "import/no-duplicates": [ + "error" + ], + "no-shadow": [ + "off" + ], + "@typescript-eslint/no-shadow": [ + "error" + ], + "key-spacing": [ + "error" + ], + "no-multiple-empty-lines": [ + "error", + { + "max": 1 + } + ], + "@typescript-eslint/no-floating-promises": [ + "error" + ], + "no-return-await": "off", + "@typescript-eslint/return-await": "error", + "no-trailing-spaces": [ + "error" + ], + "dot-notation": [ + "error" + ], + "no-bitwise": [ + "error" + ], + "@typescript-eslint/member-ordering": [ + "error", + { + "default": [ + "public-static-field", + "public-static-method", + "protected-static-field", + "protected-static-method", + "private-static-field", + "private-static-method", + "field", + "constructor", + "method" + ] + } + ], + "@cdklabs/no-core-construct": [ + "error" + ], + "@cdklabs/invalid-cfn-imports": [ + "error" + ], + "@cdklabs/no-literal-partition": [ + "error" + ], + "@cdklabs/no-invalid-path": [ + "error" + ], + "@cdklabs/promiseall-no-unbounded-parallelism": [ + "error" + ], + "no-throw-literal": [ + "error" + ], + "@stylistic/indent": [ + "error", + 2 + ], + "quotes": [ + "error", + "single", + { + "avoidEscape": true + } + ], + "@stylistic/member-delimiter-style": [ + "error" + ], + "@stylistic/comma-dangle": [ + "error", + "always-multiline" + ], + "@stylistic/no-extra-semi": [ + "error" + ], + "@stylistic/curly-newline": [ + "error", + "always" + ], + "comma-spacing": [ + "error", + { + "before": false, + "after": true + } + ], + "no-multi-spaces": [ + "error", + { + "ignoreEOLComments": false + } + ], + "array-bracket-spacing": [ + "error", + "never" + ], + "array-bracket-newline": [ + "error", + "consistent" + ], + "object-curly-spacing": [ + "error", + "always" + ], + "object-curly-newline": [ + "error", + { + "multiline": true, + "consistent": true + } + ], + "object-property-newline": [ + "error", + { + "allowAllPropertiesOnSameLine": true + } + ], + "keyword-spacing": [ + "error" + ], + "brace-style": [ + "error", + "1tbs", + { + "allowSingleLine": true + } + ], + "space-before-blocks": "error", + "curly": [ + "error", + "multi-line", + "consistent" + ], + "eol-last": [ + "error", + "always" + ], + "@stylistic/spaced-comment": [ + "error", + "always", + { + "exceptions": [ + "/", + "*" + ], + "markers": [ + "/" + ] + } + ], + "@stylistic/padded-blocks": [ + "error", + { + "classes": "never", + "blocks": "never", + "switches": "never" + } + ], + "jsdoc/require-param-description": [ + "error" + ], + "jsdoc/require-property-description": [ + "error" + ], + "jsdoc/require-returns-description": [ + "error" + ], + "jsdoc/check-alignment": [ + "error" + ], + "no-restricted-imports": [ + "error", + { + "paths": [ + { + "name": "punycode", + "message": "Package 'punycode' has to be imported with trailing slash, see warning in https://github.com/bestiejs/punycode.js#installation" + } + ], + "patterns": [ + "!punycode/" + ] + } + ], + "no-duplicate-imports": [ + "error" + ], + "semi": [ + "error", + "always" + ], + "quote-props": [ + "error", + "consistent-as-needed" + ], + "max-len": [ + "error", + { + "code": 150, + "ignoreUrls": true, + "ignoreStrings": true, + "ignoreTemplateLiterals": true, + "ignoreComments": true, + "ignoreRegExpLiterals": true + } + ], + "no-console": [ + "error" + ], + "no-restricted-syntax": [ + "error", + { + "selector": "CallExpression:matches([callee.name='createHash'], [callee.property.name='createHash']) Literal[value='md5']", + "message": "Use the md5hash() function from the core library if you want md5" + } + ], + "@typescript-eslint/unbound-method": "error", + "jest/expect-expect": "off", + "jest/no-conditional-expect": "off", + "jest/no-done-callback": "off", + "jest/no-standalone-expect": "off", + "jest/valid-expect": "off", + "jest/valid-title": "off", + "jest/no-identical-title": "off", + "jest/no-disabled-tests": "error", + "jest/no-focused-tests": "error", + "prettier/prettier": [ + "off" + ] + }, + "overrides": [] +} diff --git a/packages/@aws-cdk/tmp-toolkit-helpers/.gitattributes b/packages/@aws-cdk/tmp-toolkit-helpers/.gitattributes new file mode 100644 index 00000000..c1b26c9d --- /dev/null +++ b/packages/@aws-cdk/tmp-toolkit-helpers/.gitattributes @@ -0,0 +1,20 @@ +# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". + +* text=auto eol=lf +/.eslintrc.js linguist-generated +/.eslintrc.json linguist-generated +/.gitattributes linguist-generated +/.gitignore linguist-generated +/.npmignore linguist-generated +/.prettierignore linguist-generated +/.prettierrc.json linguist-generated +/.projen/** linguist-generated +/.projen/deps.json linguist-generated +/.projen/files.json linguist-generated +/.projen/tasks.json linguist-generated +/jest.config.json linguist-generated +/LICENSE linguist-generated +/package.json linguist-generated +/tsconfig.dev.json linguist-generated +/tsconfig.json linguist-generated +/yarn.lock linguist-generated \ No newline at end of file diff --git a/packages/@aws-cdk/tmp-toolkit-helpers/.gitignore b/packages/@aws-cdk/tmp-toolkit-helpers/.gitignore new file mode 100644 index 00000000..637a79a9 --- /dev/null +++ b/packages/@aws-cdk/tmp-toolkit-helpers/.gitignore @@ -0,0 +1,43 @@ +# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +!/.gitattributes +!/.projen/tasks.json +!/.projen/deps.json +!/.projen/files.json +!/package.json +!/LICENSE +!/.npmignore +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json +pids +*.pid +*.seed +*.pid.lock +lib-cov +coverage +*.lcov +.nyc_output +build/Release +node_modules/ +jspm_packages/ +*.tsbuildinfo +.eslintcache +*.tgz +.yarn-integrity +.cache +!/jest.config.json +/coverage/ +!/.prettierignore +!/.prettierrc.json +!/test/ +!/tsconfig.json +!/tsconfig.dev.json +!/src/ +/lib +/dist/ +!/.eslintrc.json +!/.eslintrc.js diff --git a/packages/@aws-cdk/tmp-toolkit-helpers/.npmignore b/packages/@aws-cdk/tmp-toolkit-helpers/.npmignore new file mode 100644 index 00000000..98cb578d --- /dev/null +++ b/packages/@aws-cdk/tmp-toolkit-helpers/.npmignore @@ -0,0 +1,25 @@ +# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +/.projen/ +/jest.config.json +/coverage/ +/.prettierignore +/.prettierrc.json +/test/ +/tsconfig.dev.json +/src/ +!/lib/ +!/lib/**/*.js +!/lib/**/*.d.ts +dist +/tsconfig.json +/.github/ +/.vscode/ +/.idea/ +/.projenrc.js +tsconfig.tsbuildinfo +/.eslintrc.json +.eslintrc.js +*.ts +!*.d.ts +build-tools +/.gitattributes diff --git a/packages/@aws-cdk/tmp-toolkit-helpers/.prettierignore b/packages/@aws-cdk/tmp-toolkit-helpers/.prettierignore new file mode 100644 index 00000000..b6999ad1 --- /dev/null +++ b/packages/@aws-cdk/tmp-toolkit-helpers/.prettierignore @@ -0,0 +1,2 @@ +# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +.eslintrc.js diff --git a/packages/@aws-cdk/tmp-toolkit-helpers/.prettierrc.json b/packages/@aws-cdk/tmp-toolkit-helpers/.prettierrc.json new file mode 100644 index 00000000..af318ca5 --- /dev/null +++ b/packages/@aws-cdk/tmp-toolkit-helpers/.prettierrc.json @@ -0,0 +1,6 @@ +{ + "printWidth": 120, + "singleQuote": true, + "trailingComma": "all", + "overrides": [] +} diff --git a/packages/@aws-cdk/tmp-toolkit-helpers/.projen/deps.json b/packages/@aws-cdk/tmp-toolkit-helpers/.projen/deps.json new file mode 100644 index 00000000..560efe3d --- /dev/null +++ b/packages/@aws-cdk/tmp-toolkit-helpers/.projen/deps.json @@ -0,0 +1,97 @@ +{ + "dependencies": [ + { + "name": "@aws-cdk/cdk-build-tools", + "type": "build" + }, + { + "name": "@cdklabs/eslint-plugin", + "type": "build" + }, + { + "name": "@stylistic/eslint-plugin", + "type": "build" + }, + { + "name": "@types/jest", + "type": "build" + }, + { + "name": "@types/node", + "version": "^16", + "type": "build" + }, + { + "name": "@typescript-eslint/eslint-plugin", + "version": "^8", + "type": "build" + }, + { + "name": "@typescript-eslint/parser", + "version": "^8", + "type": "build" + }, + { + "name": "constructs", + "version": "^10.0.0", + "type": "build" + }, + { + "name": "eslint-config-prettier", + "type": "build" + }, + { + "name": "eslint-import-resolver-typescript", + "type": "build" + }, + { + "name": "eslint-plugin-import", + "type": "build" + }, + { + "name": "eslint-plugin-jest", + "type": "build" + }, + { + "name": "eslint-plugin-jsdoc", + "type": "build" + }, + { + "name": "eslint-plugin-prettier", + "type": "build" + }, + { + "name": "eslint", + "version": "^9", + "type": "build" + }, + { + "name": "jest", + "type": "build" + }, + { + "name": "jest-junit", + "version": "^16", + "type": "build" + }, + { + "name": "prettier", + "version": "^2.8", + "type": "build" + }, + { + "name": "projen", + "type": "build" + }, + { + "name": "ts-jest", + "type": "build" + }, + { + "name": "typescript", + "version": "5.6", + "type": "build" + } + ], + "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." +} diff --git a/packages/@aws-cdk/tmp-toolkit-helpers/.projen/files.json b/packages/@aws-cdk/tmp-toolkit-helpers/.projen/files.json new file mode 100644 index 00000000..493bbd87 --- /dev/null +++ b/packages/@aws-cdk/tmp-toolkit-helpers/.projen/files.json @@ -0,0 +1,19 @@ +{ + "files": [ + ".eslintrc.js", + ".eslintrc.json", + ".gitattributes", + ".gitignore", + ".npmignore", + ".prettierignore", + ".prettierrc.json", + ".projen/deps.json", + ".projen/files.json", + ".projen/tasks.json", + "jest.config.json", + "LICENSE", + "tsconfig.dev.json", + "tsconfig.json" + ], + "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." +} diff --git a/packages/@aws-cdk/tmp-toolkit-helpers/.projen/tasks.json b/packages/@aws-cdk/tmp-toolkit-helpers/.projen/tasks.json new file mode 100644 index 00000000..6f153699 --- /dev/null +++ b/packages/@aws-cdk/tmp-toolkit-helpers/.projen/tasks.json @@ -0,0 +1,169 @@ +{ + "tasks": { + "build": { + "name": "build", + "description": "Full release build", + "steps": [ + { + "spawn": "pre-compile" + }, + { + "spawn": "compile" + }, + { + "spawn": "post-compile" + }, + { + "spawn": "test" + }, + { + "spawn": "package" + } + ] + }, + "bump": { + "name": "bump", + "description": "Bumps versions of local dependencies", + "steps": [ + { + "spawn": "gather-versions" + } + ] + }, + "check-for-updates": { + "name": "check-for-updates", + "env": { + "CI": "0" + }, + "steps": [ + { + "exec": "npx npm-check-updates@16 --upgrade --target=minor --peer --no-deprecated --dep=dev,peer,prod,optional --filter=@cdklabs/eslint-plugin,@stylistic/eslint-plugin,@types/jest,eslint-config-prettier,eslint-import-resolver-typescript,eslint-plugin-import,eslint-plugin-jest,eslint-plugin-jsdoc,eslint-plugin-prettier,jest,projen,ts-jest" + } + ] + }, + "compile": { + "name": "compile", + "description": "Only compile", + "steps": [ + { + "exec": "tsc --build", + "receiveArgs": true + } + ] + }, + "default": { + "name": "default", + "description": "Synthesize project files", + "steps": [ + { + "exec": "cd ../../.. && npx projen default" + } + ] + }, + "eslint": { + "name": "eslint", + "description": "Runs eslint against the codebase", + "env": { + "ESLINT_USE_FLAT_CONFIG": "false" + }, + "steps": [ + { + "exec": "eslint --ext .ts,.tsx --fix --no-error-on-unmatched-pattern $@ src test build-tools", + "receiveArgs": true + } + ] + }, + "gather-versions": { + "name": "gather-versions", + "steps": [ + { + "exec": "node -e \"require(path.join(path.dirname(require.resolve('cdklabs-projen-project-types')), 'yarn', 'gather-versions.exec.js'))\" @aws-cdk/tmp-toolkit-helpers MAJOR --deps @aws-cdk/cdk-build-tools", + "receiveArgs": true + } + ] + }, + "install": { + "name": "install", + "description": "Install project dependencies and update lockfile (non-frozen)", + "steps": [ + { + "exec": "yarn install --check-files" + } + ] + }, + "install:ci": { + "name": "install:ci", + "description": "Install project dependencies using frozen lockfile", + "steps": [ + { + "exec": "yarn install --check-files --frozen-lockfile" + } + ] + }, + "nx": { + "name": "nx", + "steps": [ + { + "exec": "nx run", + "receiveArgs": true + } + ] + }, + "package": { + "name": "package", + "description": "Creates the distribution package" + }, + "post-compile": { + "name": "post-compile", + "description": "Runs after successful compilation" + }, + "pre-compile": { + "name": "pre-compile", + "description": "Prepare the project for compilation" + }, + "test": { + "name": "test", + "description": "Run tests", + "steps": [ + { + "exec": "jest --passWithNoTests --updateSnapshot", + "receiveArgs": true + }, + { + "spawn": "eslint" + } + ] + }, + "test:watch": { + "name": "test:watch", + "description": "Run jest in watch mode", + "steps": [ + { + "exec": "jest --watch" + } + ] + }, + "unbump": { + "name": "unbump", + "description": "Resets versions of local dependencies to 0.0.0", + "steps": [ + { + "spawn": "gather-versions" + } + ] + }, + "watch": { + "name": "watch", + "description": "Watch & compile in the background", + "steps": [ + { + "exec": "tsc --build -w" + } + ] + } + }, + "env": { + "PATH": "$(npx -c \"node --print process.env.PATH\")" + }, + "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." +} diff --git a/packages/@aws-cdk/tmp-toolkit-helpers/LICENSE b/packages/@aws-cdk/tmp-toolkit-helpers/LICENSE new file mode 100644 index 00000000..d6456956 --- /dev/null +++ b/packages/@aws-cdk/tmp-toolkit-helpers/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/packages/@aws-cdk/tmp-toolkit-helpers/README.md b/packages/@aws-cdk/tmp-toolkit-helpers/README.md new file mode 100644 index 00000000..b3fa7ddc --- /dev/null +++ b/packages/@aws-cdk/tmp-toolkit-helpers/README.md @@ -0,0 +1 @@ +# replace this \ No newline at end of file diff --git a/packages/@aws-cdk/tmp-toolkit-helpers/jest.config.json b/packages/@aws-cdk/tmp-toolkit-helpers/jest.config.json new file mode 100644 index 00000000..bffb87ec --- /dev/null +++ b/packages/@aws-cdk/tmp-toolkit-helpers/jest.config.json @@ -0,0 +1,67 @@ +{ + "coverageProvider": "v8", + "moduleFileExtensions": [ + "ts", + "js" + ], + "maxWorkers": "80%", + "testEnvironment": "node", + "coverageThreshold": { + "global": { + "statements": 80, + "branches": 80, + "functions": 80, + "lines": 80 + } + }, + "collectCoverage": true, + "coverageReporters": [ + "text-summary", + "cobertura", + [ + "html", + { + "subdir": "html-report" + } + ] + ], + "testMatch": [ + "/test/**/?(*.)+(test).ts", + "/@(src|test)/**/*(*.)@(spec|test).ts?(x)", + "/@(src|test)/**/__tests__/**/*.ts?(x)" + ], + "coveragePathIgnorePatterns": [ + "\\.generated\\.[jt]s$", + "/test/", + ".warnings.jsii.js$", + "/node_modules/" + ], + "reporters": [ + "default", + [ + "jest-junit", + { + "suiteName": "jest tests", + "outputDirectory": "coverage" + } + ] + ], + "randomize": true, + "clearMocks": true, + "coverageDirectory": "coverage", + "testPathIgnorePatterns": [ + "/node_modules/" + ], + "watchPathIgnorePatterns": [ + "/node_modules/" + ], + "transform": { + "^.+\\.[t]sx?$": [ + "ts-jest", + { + "tsconfig": "tsconfig.dev.json" + } + ] + }, + "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." +} diff --git a/packages/@aws-cdk/tmp-toolkit-helpers/package.json b/packages/@aws-cdk/tmp-toolkit-helpers/package.json new file mode 100644 index 00000000..6665419e --- /dev/null +++ b/packages/@aws-cdk/tmp-toolkit-helpers/package.json @@ -0,0 +1,74 @@ +{ + "name": "@aws-cdk/tmp-toolkit-helpers", + "description": "A temporary package to hold code shared between aws-cdk and @aws-cdk/toolkit-lib", + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-cdk-cli", + "directory": "packages/@aws-cdk/tmp-toolkit-helpers" + }, + "scripts": { + "build": "npx projen build", + "bump": "npx projen bump", + "check-for-updates": "npx projen check-for-updates", + "compile": "npx projen compile", + "default": "npx projen default", + "eslint": "npx projen eslint", + "gather-versions": "npx projen gather-versions", + "nx": "npx projen nx", + "package": "npx projen package", + "post-compile": "npx projen post-compile", + "pre-compile": "npx projen pre-compile", + "test": "npx projen test", + "test:watch": "npx projen test:watch", + "unbump": "npx projen unbump", + "watch": "npx projen watch", + "projen": "npx projen" + }, + "author": { + "name": "Amazon Web Services", + "url": "https://aws.amazon.com", + "organization": true + }, + "devDependencies": { + "@aws-cdk/cdk-build-tools": "^0.0.0", + "@cdklabs/eslint-plugin": "^1.3.2", + "@stylistic/eslint-plugin": "^3.1.0", + "@types/jest": "^29.5.14", + "@types/node": "^16", + "@typescript-eslint/eslint-plugin": "^8", + "@typescript-eslint/parser": "^8", + "constructs": "^10.0.0", + "eslint": "^9", + "eslint-config-prettier": "^10.0.2", + "eslint-import-resolver-typescript": "^3.8.3", + "eslint-plugin-import": "^2.31.0", + "eslint-plugin-jest": "^28.11.0", + "eslint-plugin-jsdoc": "^50.6.3", + "eslint-plugin-prettier": "^5.2.3", + "jest": "^29.7.0", + "jest-junit": "^16", + "prettier": "^2.8", + "projen": "^0.91.13", + "ts-jest": "^29.2.6", + "typescript": "5.6" + }, + "keywords": [ + "aws", + "cdk" + ], + "engines": { + "node": ">= 14.15.0" + }, + "main": "lib/index.js", + "license": "Apache-2.0", + "homepage": "https://github.com/aws/aws-cdk", + "version": "0.0.0", + "types": "lib/index.d.ts", + "private": true, + "exports": { + ".": "./lib/index.js", + "./package.json": "./package.json", + "./api": "./lib/api/index.js" + }, + "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." +} diff --git a/packages/@aws-cdk/tmp-toolkit-helpers/src/api/index.ts b/packages/@aws-cdk/tmp-toolkit-helpers/src/api/index.ts new file mode 100644 index 00000000..508aefd1 --- /dev/null +++ b/packages/@aws-cdk/tmp-toolkit-helpers/src/api/index.ts @@ -0,0 +1 @@ +export * from './toolkit-error'; diff --git a/packages/@aws-cdk/toolkit-lib/lib/api/errors.ts b/packages/@aws-cdk/tmp-toolkit-helpers/src/api/toolkit-error.ts similarity index 100% rename from packages/@aws-cdk/toolkit-lib/lib/api/errors.ts rename to packages/@aws-cdk/tmp-toolkit-helpers/src/api/toolkit-error.ts diff --git a/packages/@aws-cdk/tmp-toolkit-helpers/src/index.ts b/packages/@aws-cdk/tmp-toolkit-helpers/src/index.ts new file mode 100644 index 00000000..b1c13e73 --- /dev/null +++ b/packages/@aws-cdk/tmp-toolkit-helpers/src/index.ts @@ -0,0 +1 @@ +export * from './api'; diff --git a/packages/aws-cdk/test/toolkit/toolkit-error.test.ts b/packages/@aws-cdk/tmp-toolkit-helpers/test/api/toolkit-error.test.ts similarity index 96% rename from packages/aws-cdk/test/toolkit/toolkit-error.test.ts rename to packages/@aws-cdk/tmp-toolkit-helpers/test/api/toolkit-error.test.ts index 04a02050..6de21730 100644 --- a/packages/aws-cdk/test/toolkit/toolkit-error.test.ts +++ b/packages/@aws-cdk/tmp-toolkit-helpers/test/api/toolkit-error.test.ts @@ -1,4 +1,4 @@ -import { AssemblyError, AuthenticationError, ContextProviderError, ToolkitError } from '../../lib/toolkit/error'; +import { AssemblyError, AuthenticationError, ContextProviderError, ToolkitError } from '../../src/api/toolkit-error'; describe('toolkit error', () => { let toolkitError = new ToolkitError('Test toolkit error'); diff --git a/packages/@aws-cdk/tmp-toolkit-helpers/tsconfig.dev.json b/packages/@aws-cdk/tmp-toolkit-helpers/tsconfig.dev.json new file mode 100644 index 00000000..016dbb01 --- /dev/null +++ b/packages/@aws-cdk/tmp-toolkit-helpers/tsconfig.dev.json @@ -0,0 +1,43 @@ +// ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +{ + "compilerOptions": { + "alwaysStrict": true, + "declaration": true, + "esModuleInterop": false, + "experimentalDecorators": true, + "inlineSourceMap": true, + "inlineSources": true, + "lib": [ + "es2022", + "esnext.disposable" + ], + "module": "NodeNext", + "noEmitOnError": false, + "noFallthroughCasesInSwitch": true, + "noImplicitAny": true, + "noImplicitReturns": true, + "noImplicitThis": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "resolveJsonModule": true, + "strict": true, + "strictNullChecks": true, + "strictPropertyInitialization": true, + "stripInternal": true, + "target": "es2022", + "composite": true, + "outDir": "lib" + }, + "include": [ + "src/**/*.ts", + "test/**/*.ts" + ], + "exclude": [ + "node_modules" + ], + "references": [ + { + "path": "../cdk-build-tools" + } + ] +} diff --git a/packages/@aws-cdk/tmp-toolkit-helpers/tsconfig.json b/packages/@aws-cdk/tmp-toolkit-helpers/tsconfig.json new file mode 100644 index 00000000..52c049e4 --- /dev/null +++ b/packages/@aws-cdk/tmp-toolkit-helpers/tsconfig.json @@ -0,0 +1,41 @@ +// ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +{ + "compilerOptions": { + "rootDir": "src", + "outDir": "lib", + "alwaysStrict": true, + "declaration": true, + "esModuleInterop": false, + "experimentalDecorators": true, + "inlineSourceMap": true, + "inlineSources": true, + "lib": [ + "es2022", + "esnext.disposable" + ], + "module": "NodeNext", + "noEmitOnError": false, + "noFallthroughCasesInSwitch": true, + "noImplicitAny": true, + "noImplicitReturns": true, + "noImplicitThis": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "resolveJsonModule": true, + "strict": true, + "strictNullChecks": true, + "strictPropertyInitialization": true, + "stripInternal": true, + "target": "es2022", + "composite": true + }, + "include": [ + "src/**/*.ts" + ], + "exclude": [], + "references": [ + { + "path": "../cdk-build-tools" + } + ] +} diff --git a/packages/@aws-cdk/toolkit-lib/.eslintrc.json b/packages/@aws-cdk/toolkit-lib/.eslintrc.json index 6fa46cbe..b91584eb 100644 --- a/packages/@aws-cdk/toolkit-lib/.eslintrc.json +++ b/packages/@aws-cdk/toolkit-lib/.eslintrc.json @@ -327,6 +327,11 @@ "target": "./", "from": "../../aws-cdk", "message": "All `aws-cdk` code must be used via lib/api/aws-cdk.ts" + }, + { + "target": "./", + "from": "../tmp-toolkit-helpers", + "message": "All `@aws-cdk/tmp-toolkit-helpers` code must be used via lib/api/shared-*.ts" } ] } diff --git a/packages/@aws-cdk/toolkit-lib/.projen/deps.json b/packages/@aws-cdk/toolkit-lib/.projen/deps.json index 97ab1591..c3975a53 100644 --- a/packages/@aws-cdk/toolkit-lib/.projen/deps.json +++ b/packages/@aws-cdk/toolkit-lib/.projen/deps.json @@ -4,6 +4,10 @@ "name": "@aws-cdk/cdk-build-tools", "type": "build" }, + { + "name": "@aws-cdk/tmp-toolkit-helpers", + "type": "build" + }, { "name": "@cdklabs/eslint-plugin", "type": "build" diff --git a/packages/@aws-cdk/toolkit-lib/.projen/tasks.json b/packages/@aws-cdk/toolkit-lib/.projen/tasks.json index 8f6490f2..90245fbb 100644 --- a/packages/@aws-cdk/toolkit-lib/.projen/tasks.json +++ b/packages/@aws-cdk/toolkit-lib/.projen/tasks.json @@ -32,7 +32,7 @@ "RELEASE_TAG_PREFIX": "@aws-cdk/toolkit-lib@", "VERSIONRCOPTIONS": "{\"path\":\".\"}", "BUMP_PACKAGE": "commit-and-tag-version@^12", - "RELEASABLE_COMMITS": "git log --no-merges --oneline $LATEST_TAG..HEAD -E --grep \"^(feat|fix){1}(\\([^()[:space:]]+\\))?(!)?:[[:blank:]]+.+\" -- . ../../aws-cdk ../cloud-assembly-schema ../cloudformation-diff" + "RELEASABLE_COMMITS": "git log --no-merges --oneline $LATEST_TAG..HEAD -E --grep \"^(feat|fix){1}(\\([^()[:space:]]+\\))?(!)?:[[:blank:]]+.+\" -- . ../../aws-cdk ../tmp-toolkit-helpers ../cloud-assembly-schema ../cloudformation-diff" }, "steps": [ { @@ -109,7 +109,7 @@ "name": "gather-versions", "steps": [ { - "exec": "node -e \"require(path.join(path.dirname(require.resolve('cdklabs-projen-project-types')), 'yarn', 'gather-versions.exec.js'))\" @aws-cdk/toolkit-lib MAJOR --deps @aws-cdk/cloud-assembly-schema @aws-cdk/cloudformation-diff @aws-cdk/cdk-build-tools cdk-assets aws-cdk", + "exec": "node -e \"require(path.join(path.dirname(require.resolve('cdklabs-projen-project-types')), 'yarn', 'gather-versions.exec.js'))\" @aws-cdk/toolkit-lib MAJOR --deps @aws-cdk/cloud-assembly-schema @aws-cdk/cloudformation-diff @aws-cdk/cdk-build-tools cdk-assets @aws-cdk/tmp-toolkit-helpers aws-cdk", "receiveArgs": true } ] @@ -235,7 +235,7 @@ "RELEASE_TAG_PREFIX": "@aws-cdk/toolkit-lib@", "VERSIONRCOPTIONS": "{\"path\":\".\"}", "BUMP_PACKAGE": "commit-and-tag-version@^12", - "RELEASABLE_COMMITS": "git log --no-merges --oneline $LATEST_TAG..HEAD -E --grep \"^(feat|fix){1}(\\([^()[:space:]]+\\))?(!)?:[[:blank:]]+.+\" -- . ../../aws-cdk ../cloud-assembly-schema ../cloudformation-diff" + "RELEASABLE_COMMITS": "git log --no-merges --oneline $LATEST_TAG..HEAD -E --grep \"^(feat|fix){1}(\\([^()[:space:]]+\\))?(!)?:[[:blank:]]+.+\" -- . ../../aws-cdk ../tmp-toolkit-helpers ../cloud-assembly-schema ../cloudformation-diff" }, "steps": [ { diff --git a/packages/@aws-cdk/toolkit-lib/build-tools/bundle.mjs b/packages/@aws-cdk/toolkit-lib/build-tools/bundle.mjs index 1a5ffd05..6770f4cc 100644 --- a/packages/@aws-cdk/toolkit-lib/build-tools/bundle.mjs +++ b/packages/@aws-cdk/toolkit-lib/build-tools/bundle.mjs @@ -23,11 +23,14 @@ await Promise.all([ // mkdir -p ./lib/api/bootstrap/ && cp $aws_cdk/lib/api/bootstrap/bootstrap-template.yaml ./lib/api/bootstrap/ await esbuild.build({ - entryPoints: ['lib/api/aws-cdk.ts'], + outdir: 'lib/api', + entryPoints: [ + 'lib/api/aws-cdk.ts', + 'lib/api/shared-public.ts', + ], target: 'node18', platform: 'node', packages: 'external', sourcemap: true, bundle: true, - outfile: 'lib/api/aws-cdk.js', }); diff --git a/packages/@aws-cdk/toolkit-lib/lib/actions/diff/private/helpers.ts b/packages/@aws-cdk/toolkit-lib/lib/actions/diff/private/helpers.ts index 98155f3d..95d204c7 100644 --- a/packages/@aws-cdk/toolkit-lib/lib/actions/diff/private/helpers.ts +++ b/packages/@aws-cdk/toolkit-lib/lib/actions/diff/private/helpers.ts @@ -1,6 +1,6 @@ import { DescribeChangeSetOutput, fullDiff } from '@aws-cdk/cloudformation-diff'; import * as cxapi from '@aws-cdk/cx-api'; -import { ToolkitError } from '../../../api/errors'; +import { ToolkitError } from '../../../api/shared-public'; import { RequireApproval } from '../../deploy'; /** diff --git a/packages/@aws-cdk/toolkit-lib/lib/api/cloud-assembly/private/context-aware-source.ts b/packages/@aws-cdk/toolkit-lib/lib/api/cloud-assembly/private/context-aware-source.ts index 086fc825..981c9411 100644 --- a/packages/@aws-cdk/toolkit-lib/lib/api/cloud-assembly/private/context-aware-source.ts +++ b/packages/@aws-cdk/toolkit-lib/lib/api/cloud-assembly/private/context-aware-source.ts @@ -2,8 +2,8 @@ import type { MissingContext } from '@aws-cdk/cloud-assembly-schema'; import * as cxapi from '@aws-cdk/cx-api'; import { ToolkitServices } from '../../../toolkit/private'; import { type Context, contextproviders, PROJECT_CONTEXT } from '../../aws-cdk'; -import { ToolkitError } from '../../errors'; import { ActionAwareIoHost, CODES, debug } from '../../io/private'; +import { ToolkitError } from '../../shared-public'; import { ICloudAssemblySource } from '../types'; export interface ContextAwareCloudAssemblyProps { diff --git a/packages/@aws-cdk/toolkit-lib/lib/api/cloud-assembly/private/exec.ts b/packages/@aws-cdk/toolkit-lib/lib/api/cloud-assembly/private/exec.ts index ccfcb080..0f7ffd2a 100644 --- a/packages/@aws-cdk/toolkit-lib/lib/api/cloud-assembly/private/exec.ts +++ b/packages/@aws-cdk/toolkit-lib/lib/api/cloud-assembly/private/exec.ts @@ -1,6 +1,6 @@ import * as child_process from 'node:child_process'; import * as split2 from 'split2'; -import { ToolkitError } from '../../errors'; +import { ToolkitError } from '../../shared-public'; type EventPublisher = (event: 'open' | 'data_stdout' | 'data_stderr' | 'close', line: string) => void; diff --git a/packages/@aws-cdk/toolkit-lib/lib/api/cloud-assembly/private/prepare-source.ts b/packages/@aws-cdk/toolkit-lib/lib/api/cloud-assembly/private/prepare-source.ts index 8a7e3102..426ffa3b 100644 --- a/packages/@aws-cdk/toolkit-lib/lib/api/cloud-assembly/private/prepare-source.ts +++ b/packages/@aws-cdk/toolkit-lib/lib/api/cloud-assembly/private/prepare-source.ts @@ -6,8 +6,8 @@ import * as fs from 'fs-extra'; import { lte } from 'semver'; import { prepareDefaultEnvironment as oldPrepare, prepareContext, spaceAvailableForContext, Settings, loadTree, some, splitBySize, versionNumber } from '../../../api/aws-cdk'; import { ToolkitServices } from '../../../toolkit/private'; -import { ToolkitError } from '../../errors'; import { ActionAwareIoHost, asLogger, CODES, error } from '../../io/private'; +import { ToolkitError } from '../../shared-public'; import type { AppSynthOptions } from '../source-builder'; export { guessExecutable } from '../../../api/aws-cdk'; diff --git a/packages/@aws-cdk/toolkit-lib/lib/api/cloud-assembly/private/source-builder.ts b/packages/@aws-cdk/toolkit-lib/lib/api/cloud-assembly/private/source-builder.ts index 5ac930d9..983894b0 100644 --- a/packages/@aws-cdk/toolkit-lib/lib/api/cloud-assembly/private/source-builder.ts +++ b/packages/@aws-cdk/toolkit-lib/lib/api/cloud-assembly/private/source-builder.ts @@ -6,8 +6,8 @@ import { execInChildProcess } from './exec'; import { assemblyFromDirectory, changeDir, determineOutputDirectory, guessExecutable, prepareDefaultEnvironment, withContext, withEnv } from './prepare-source'; import { ToolkitServices } from '../../../toolkit/private'; import { Context, ILock, RWLock, Settings } from '../../aws-cdk'; -import { ToolkitError } from '../../errors'; import { CODES, debug, error, info } from '../../io/private'; +import { ToolkitError } from '../../shared-public'; import { AssemblyBuilder } from '../source-builder'; export abstract class CloudAssemblySourceBuilder { diff --git a/packages/@aws-cdk/toolkit-lib/lib/api/cloud-assembly/private/stack-assembly.ts b/packages/@aws-cdk/toolkit-lib/lib/api/cloud-assembly/private/stack-assembly.ts index ec791ae1..53b9388f 100644 --- a/packages/@aws-cdk/toolkit-lib/lib/api/cloud-assembly/private/stack-assembly.ts +++ b/packages/@aws-cdk/toolkit-lib/lib/api/cloud-assembly/private/stack-assembly.ts @@ -1,7 +1,7 @@ import * as cxapi from '@aws-cdk/cx-api'; import { major } from 'semver'; import { CloudAssembly, sanitizePatterns, StackCollection, ExtendedStackSelection as CliExtendedStackSelection } from '../../aws-cdk'; -import { ToolkitError } from '../../errors'; +import { ToolkitError } from '../../shared-public'; import { ExpandStackSelection, StackSelectionStrategy, StackSelector } from '../stack-selector'; import { ICloudAssemblySource } from '../types'; diff --git a/packages/@aws-cdk/toolkit-lib/lib/api/shared-public.ts b/packages/@aws-cdk/toolkit-lib/lib/api/shared-public.ts new file mode 100644 index 00000000..b35e28de --- /dev/null +++ b/packages/@aws-cdk/toolkit-lib/lib/api/shared-public.ts @@ -0,0 +1,4 @@ +/* eslint-disable import/no-restricted-paths */ + +// APIs +export * from '../../../tmp-toolkit-helpers/src/api'; diff --git a/packages/@aws-cdk/toolkit-lib/lib/index.ts b/packages/@aws-cdk/toolkit-lib/lib/index.ts index e75ac971..86a648ea 100644 --- a/packages/@aws-cdk/toolkit-lib/lib/index.ts +++ b/packages/@aws-cdk/toolkit-lib/lib/index.ts @@ -6,4 +6,4 @@ export * from './actions'; export * from './api/aws-auth'; export * from './api/cloud-assembly'; export * from './api/io'; -export * from './api/errors'; +export * from './api/shared-public'; diff --git a/packages/@aws-cdk/toolkit-lib/lib/toolkit/toolkit.ts b/packages/@aws-cdk/toolkit-lib/lib/toolkit/toolkit.ts index 5e24fa62..d15da96a 100644 --- a/packages/@aws-cdk/toolkit-lib/lib/toolkit/toolkit.ts +++ b/packages/@aws-cdk/toolkit-lib/lib/toolkit/toolkit.ts @@ -18,9 +18,9 @@ import { type SdkConfig } from '../api/aws-auth'; import { DEFAULT_TOOLKIT_STACK_NAME, SdkProvider, SuccessfulDeployStackResult, StackCollection, Deployments, HotswapMode, ResourceMigrator, obscureTemplate, serializeStructure, tagsForStack, CliIoHost, validateSnsTopicArn, Concurrency, WorkGraphBuilder, AssetBuildNode, AssetPublishNode, StackNode, formatErrorMessage, CloudWatchLogEventMonitor, findCloudWatchLogGroups, formatTime, StackDetails } from '../api/aws-cdk'; import { ICloudAssemblySource, StackSelectionStrategy } from '../api/cloud-assembly'; import { ALL_STACKS, CachedCloudAssemblySource, CloudAssemblySourceBuilder, IdentityCloudAssemblySource, StackAssembly } from '../api/cloud-assembly/private'; -import { ToolkitError } from '../api/errors'; import { IIoHost, IoMessageCode, IoMessageLevel } from '../api/io'; import { asSdkLogger, withAction, Timer, confirm, error, info, success, warn, ActionAwareIoHost, debug, result, withoutEmojis, withoutColor, withTrimmedWhitespace, CODES } from '../api/io/private'; +import { ToolkitError } from '../api/shared-public'; /** * The current action being performed by the CLI. 'none' represents the absence of an action. diff --git a/packages/@aws-cdk/toolkit-lib/package.json b/packages/@aws-cdk/toolkit-lib/package.json index 28e88e54..0e567a48 100644 --- a/packages/@aws-cdk/toolkit-lib/package.json +++ b/packages/@aws-cdk/toolkit-lib/package.json @@ -34,6 +34,7 @@ }, "devDependencies": { "@aws-cdk/cdk-build-tools": "^0.0.0", + "@aws-cdk/tmp-toolkit-helpers": "^0.0.0", "@cdklabs/eslint-plugin": "^1.3.2", "@smithy/types": "^4.1.0", "@stylistic/eslint-plugin": "^3.1.0", diff --git a/packages/@aws-cdk/toolkit-lib/test/api/errors.test.ts b/packages/@aws-cdk/toolkit-lib/test/api/errors.test.ts deleted file mode 100644 index b8881cc5..00000000 --- a/packages/@aws-cdk/toolkit-lib/test/api/errors.test.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { AssemblyError, AuthenticationError, ContextProviderError, ToolkitError } from '../../lib/api/errors'; - -describe('toolkit error', () => { - let toolkitError = new ToolkitError('Test toolkit error'); - let authError = new AuthenticationError('Test authentication error'); - let assemblyError = new AssemblyError('Test authentication error'); - let contextProviderError = new ContextProviderError('Test context provider error'); - - test('types are correctly assigned', async () => { - expect(toolkitError.type).toBe('toolkit'); - expect(authError.type).toBe('authentication'); - expect(assemblyError.type).toBe('assembly'); - expect(contextProviderError.type).toBe('context-provider'); - }); - - test('isToolkitError works', () => { - expect(ToolkitError.isToolkitError(toolkitError)).toBe(true); - expect(ToolkitError.isToolkitError(authError)).toBe(true); - expect(ToolkitError.isToolkitError(assemblyError)).toBe(true); - expect(ToolkitError.isToolkitError(contextProviderError)).toBe(true); - }); - - test('isAuthenticationError works', () => { - expect(ToolkitError.isAuthenticationError(toolkitError)).toBe(false); - expect(ToolkitError.isAuthenticationError(authError)).toBe(true); - }); - - test('isAssemblyError works', () => { - expect(ToolkitError.isAssemblyError(assemblyError)).toBe(true); - expect(ToolkitError.isAssemblyError(toolkitError)).toBe(false); - expect(ToolkitError.isAssemblyError(authError)).toBe(false); - }); - - test('isContextProviderError works', () => { - expect(ToolkitError.isContextProviderError(contextProviderError)).toBe(true); - expect(ToolkitError.isContextProviderError(toolkitError)).toBe(false); - expect(ToolkitError.isContextProviderError(authError)).toBe(false); - }); -}); diff --git a/packages/@aws-cdk/toolkit-lib/tsconfig.dev.json b/packages/@aws-cdk/toolkit-lib/tsconfig.dev.json index 639bf305..49a6cf38 100644 --- a/packages/@aws-cdk/toolkit-lib/tsconfig.dev.json +++ b/packages/@aws-cdk/toolkit-lib/tsconfig.dev.json @@ -51,6 +51,9 @@ }, { "path": "../../aws-cdk" + }, + { + "path": "../tmp-toolkit-helpers" } ] } diff --git a/packages/@aws-cdk/toolkit-lib/tsconfig.json b/packages/@aws-cdk/toolkit-lib/tsconfig.json index 81b21551..0b63f963 100644 --- a/packages/@aws-cdk/toolkit-lib/tsconfig.json +++ b/packages/@aws-cdk/toolkit-lib/tsconfig.json @@ -48,6 +48,9 @@ }, { "path": "../../aws-cdk" + }, + { + "path": "../tmp-toolkit-helpers" } ] } diff --git a/packages/aws-cdk/.projen/deps.json b/packages/aws-cdk/.projen/deps.json index 6e526602..c4d5b00b 100644 --- a/packages/aws-cdk/.projen/deps.json +++ b/packages/aws-cdk/.projen/deps.json @@ -12,6 +12,10 @@ "name": "@aws-cdk/node-bundle", "type": "build" }, + { + "name": "@aws-cdk/tmp-toolkit-helpers", + "type": "build" + }, { "name": "@aws-cdk/user-input-gen", "type": "build" diff --git a/packages/aws-cdk/.projen/tasks.json b/packages/aws-cdk/.projen/tasks.json index c1c93d53..9b84b987 100644 --- a/packages/aws-cdk/.projen/tasks.json +++ b/packages/aws-cdk/.projen/tasks.json @@ -33,7 +33,7 @@ "VERSIONRCOPTIONS": "{\"path\":\".\"}", "BUMP_PACKAGE": "commit-and-tag-version@^12", "NEXT_VERSION_COMMAND": "tsx ../../projenrc/next-version.ts maybeRc", - "RELEASABLE_COMMITS": "git log --no-merges --oneline $LATEST_TAG..HEAD -E --grep \"^(feat|fix){1}(\\([^()[:space:]]+\\))?(!)?:[[:blank:]]+.+\" -- . ../@aws-cdk/cloud-assembly-schema ../@aws-cdk/cloudformation-diff" + "RELEASABLE_COMMITS": "git log --no-merges --oneline $LATEST_TAG..HEAD -E --grep \"^(feat|fix){1}(\\([^()[:space:]]+\\))?(!)?:[[:blank:]]+.+\" -- . ../@aws-cdk/tmp-toolkit-helpers ../@aws-cdk/cloud-assembly-schema ../@aws-cdk/cloudformation-diff" }, "steps": [ { @@ -101,7 +101,7 @@ "name": "gather-versions", "steps": [ { - "exec": "node -e \"require(path.join(path.dirname(require.resolve('cdklabs-projen-project-types')), 'yarn', 'gather-versions.exec.js'))\" aws-cdk MAJOR --deps @aws-cdk/cloud-assembly-schema @aws-cdk/cloudformation-diff @aws-cdk/yarn-cling @aws-cdk/user-input-gen @aws-cdk/node-bundle @aws-cdk/cdk-build-tools @aws-cdk/cli-plugin-contract cdk-assets", + "exec": "node -e \"require(path.join(path.dirname(require.resolve('cdklabs-projen-project-types')), 'yarn', 'gather-versions.exec.js'))\" aws-cdk MAJOR --deps @aws-cdk/cloud-assembly-schema @aws-cdk/cloudformation-diff @aws-cdk/yarn-cling @aws-cdk/user-input-gen @aws-cdk/node-bundle @aws-cdk/cdk-build-tools @aws-cdk/cli-plugin-contract cdk-assets @aws-cdk/tmp-toolkit-helpers", "receiveArgs": true } ] @@ -209,7 +209,7 @@ "VERSIONRCOPTIONS": "{\"path\":\".\"}", "BUMP_PACKAGE": "commit-and-tag-version@^12", "NEXT_VERSION_COMMAND": "tsx ../../projenrc/next-version.ts maybeRc", - "RELEASABLE_COMMITS": "git log --no-merges --oneline $LATEST_TAG..HEAD -E --grep \"^(feat|fix){1}(\\([^()[:space:]]+\\))?(!)?:[[:blank:]]+.+\" -- . ../@aws-cdk/cloud-assembly-schema ../@aws-cdk/cloudformation-diff" + "RELEASABLE_COMMITS": "git log --no-merges --oneline $LATEST_TAG..HEAD -E --grep \"^(feat|fix){1}(\\([^()[:space:]]+\\))?(!)?:[[:blank:]]+.+\" -- . ../@aws-cdk/tmp-toolkit-helpers ../@aws-cdk/cloud-assembly-schema ../@aws-cdk/cloudformation-diff" }, "steps": [ { diff --git a/packages/aws-cdk/lib/api/bootstrap/bootstrap-template.yaml b/packages/aws-cdk/lib/api/bootstrap/bootstrap-template.yaml index 15acb72c..4b2c6413 100644 --- a/packages/aws-cdk/lib/api/bootstrap/bootstrap-template.yaml +++ b/packages/aws-cdk/lib/api/bootstrap/bootstrap-template.yaml @@ -166,6 +166,8 @@ Resources: Fn::Sub: "${FilePublishingRole.Arn}" Resource: "*" Condition: CreateNewKey + UpdateReplacePolicy: Delete + DeletionPolicy: Delete FileAssetsBucketEncryptionKeyAlias: Condition: CreateNewKey Type: AWS::KMS::Alias @@ -657,7 +659,7 @@ Resources: Type: String Name: Fn::Sub: '/cdk-bootstrap/${Qualifier}/version' - Value: '25' + Value: '26' Outputs: BucketName: Description: The name of the S3 bucket owned by the CDK toolkit stack diff --git a/packages/aws-cdk/lib/context-providers/cc-api-provider.ts b/packages/aws-cdk/lib/context-providers/cc-api-provider.ts index 38486d3b..90631538 100644 --- a/packages/aws-cdk/lib/context-providers/cc-api-provider.ts +++ b/packages/aws-cdk/lib/context-providers/cc-api-provider.ts @@ -120,7 +120,7 @@ export class CcApiContextProviderPlugin implements ContextProviderPlugin { } }); } catch (err) { - throw new ContextProviderError(`Could not get resources ${propertyMatch}. Error: ${err}`); + throw new ContextProviderError(`Could not get resources ${JSON.stringify(propertyMatch)}. Error: ${err}`); } return resultObjs; } diff --git a/packages/aws-cdk/lib/toolkit/error.ts b/packages/aws-cdk/lib/toolkit/error.ts index 8dfa5ac8..dc2d7cc2 100644 --- a/packages/aws-cdk/lib/toolkit/error.ts +++ b/packages/aws-cdk/lib/toolkit/error.ts @@ -1,83 +1 @@ -const TOOLKIT_ERROR_SYMBOL = Symbol.for('@aws-cdk/toolkit.ToolkitError'); -const AUTHENTICATION_ERROR_SYMBOL = Symbol.for('@aws-cdk/toolkit.AuthenticationError'); -const ASSEMBLY_ERROR_SYMBOL = Symbol.for('@aws-cdk/toolkit.AssemblyError'); -const CONTEXT_PROVIDER_ERROR_SYMBOL = Symbol.for('@aws-cdk/toolkit.ContextProviderError'); - -/** - * Represents a general toolkit error in the AWS CDK Toolkit. - */ -export class ToolkitError extends Error { - /** - * Determines if a given error is an instance of ToolkitError. - */ - public static isToolkitError(x: any): x is ToolkitError { - return x !== null && typeof(x) === 'object' && TOOLKIT_ERROR_SYMBOL in x; - } - - /** - * Determines if a given error is an instance of AuthenticationError. - */ - public static isAuthenticationError(x: any): x is AuthenticationError { - return this.isToolkitError(x) && AUTHENTICATION_ERROR_SYMBOL in x; - } - - /** - * Determines if a given error is an instance of AssemblyError. - */ - public static isAssemblyError(x: any): x is AssemblyError { - return this.isToolkitError(x) && ASSEMBLY_ERROR_SYMBOL in x; - } - - /** - * Determines if a given error is an instance of AssemblyError. - */ - public static isContextProviderError(x: any): x is ContextProviderError { - return this.isToolkitError(x) && CONTEXT_PROVIDER_ERROR_SYMBOL in x; - } - - /** - * The type of the error, defaults to "toolkit". - */ - public readonly type: string; - - constructor(message: string, type: string = 'toolkit') { - super(message); - Object.setPrototypeOf(this, ToolkitError.prototype); - Object.defineProperty(this, TOOLKIT_ERROR_SYMBOL, { value: true }); - this.name = new.target.name; - this.type = type; - } -} - -/** - * Represents an authentication-specific error in the AWS CDK Toolkit. - */ -export class AuthenticationError extends ToolkitError { - constructor(message: string) { - super(message, 'authentication'); - Object.setPrototypeOf(this, AuthenticationError.prototype); - Object.defineProperty(this, AUTHENTICATION_ERROR_SYMBOL, { value: true }); - } -} - -/** - * Represents an authentication-specific error in the AWS CDK Toolkit. - */ -export class AssemblyError extends ToolkitError { - constructor(message: string) { - super(message, 'assembly'); - Object.setPrototypeOf(this, AssemblyError.prototype); - Object.defineProperty(this, ASSEMBLY_ERROR_SYMBOL, { value: true }); - } -} - -/** - * Represents an error originating from a Context Provider - */ -export class ContextProviderError extends ToolkitError { - constructor(message: string) { - super(message, 'context-provider'); - Object.setPrototypeOf(this, ContextProviderError.prototype); - Object.defineProperty(this, CONTEXT_PROVIDER_ERROR_SYMBOL, { value: true }); - } -} +export * from '../../../@aws-cdk/tmp-toolkit-helpers/src/api/toolkit-error'; diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index 8a99c4a5..4cb4009b 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -37,6 +37,7 @@ "@aws-cdk/cdk-build-tools": "^0.0.0", "@aws-cdk/cli-plugin-contract": "^0.0.0", "@aws-cdk/node-bundle": "^0.0.0", + "@aws-cdk/tmp-toolkit-helpers": "^0.0.0", "@aws-cdk/user-input-gen": "^0.0.0", "@aws-cdk/yarn-cling": "^0.0.0", "@cdklabs/eslint-plugin": "^1.3.2", diff --git a/packages/aws-cdk/test/context-providers/cc-api-provider.test.ts b/packages/aws-cdk/test/context-providers/cc-api-provider.test.ts index 9f66b512..ab71efde 100644 --- a/packages/aws-cdk/test/context-providers/cc-api-provider.test.ts +++ b/packages/aws-cdk/test/context-providers/cc-api-provider.test.ts @@ -188,6 +188,22 @@ test('looks up RDS instance using CC API listResources - nested prop', async () expect(results.length).toEqual(1); }); +test('looks up RDS instance using CC API listResources - error in CC API', async () => { + // GIVEN + mockCloudControlClient.on(ListResourcesCommand).rejects('No data found'); + + await expect( + // WHEN + provider.getValue({ + account: '123456789012', + region: 'us-east-1', + typeName: 'AWS::RDS::DBInstance', + propertyMatch: { 'Endpoint.Port': '5432' }, + propertiesToReturn: ['DBInstanceArn', 'StorageEncrypted'], + }), + ).rejects.toThrow('Could not get resources {"Endpoint.Port":"5432"}.'); // THEN +}); + test('error by specifying both exactIdentifier and propertyMatch', async () => { // GIVEN mockCloudControlClient.on(GetResourceCommand).resolves({ diff --git a/packages/aws-cdk/tsconfig.dev.json b/packages/aws-cdk/tsconfig.dev.json index 97f85d9d..870390ac 100644 --- a/packages/aws-cdk/tsconfig.dev.json +++ b/packages/aws-cdk/tsconfig.dev.json @@ -62,6 +62,9 @@ }, { "path": "../@aws-cdk/cli-plugin-contract" + }, + { + "path": "../@aws-cdk/tmp-toolkit-helpers" } ] } diff --git a/packages/aws-cdk/tsconfig.json b/packages/aws-cdk/tsconfig.json index 70a76b17..5a43d097 100644 --- a/packages/aws-cdk/tsconfig.json +++ b/packages/aws-cdk/tsconfig.json @@ -61,6 +61,9 @@ }, { "path": "../@aws-cdk/cli-plugin-contract" + }, + { + "path": "../@aws-cdk/tmp-toolkit-helpers" } ] } diff --git a/packages/cdk-assets/.projen/tasks.json b/packages/cdk-assets/.projen/tasks.json index e5d1e3cb..8a647c5b 100644 --- a/packages/cdk-assets/.projen/tasks.json +++ b/packages/cdk-assets/.projen/tasks.json @@ -34,8 +34,7 @@ "BUMP_PACKAGE": "commit-and-tag-version@^12", "NEXT_VERSION_COMMAND": "tsx ../../projenrc/next-version.ts maybeRc", "RELEASABLE_COMMITS": "git log --no-merges --oneline $LATEST_TAG..HEAD -E --grep \"^(feat|fix){1}(\\([^()[:space:]]+\\))?(!)?:[[:blank:]]+.+\" -- .", - "MAJOR": "3", - "PRERELEASE": "rc" + "MAJOR": "3" }, "steps": [ { diff --git a/packages/cdk-assets/lib/private/docker.ts b/packages/cdk-assets/lib/private/docker.ts index ebc45dd1..dd4d7242 100644 --- a/packages/cdk-assets/lib/private/docker.ts +++ b/packages/cdk-assets/lib/private/docker.ts @@ -144,7 +144,7 @@ export class Docker { // Use --password-stdin otherwise docker will complain. Loudly. await this.execute( - ['login', '--username', credentials.username, '--password-stdin', credentials.endpoint], + ['login', '--username', credentials.username, '--password-stdin', credentials.endpoint.replace(/^https?:\/\/|\/$/g, '')], { input: credentials.password, diff --git a/packages/cdk-assets/test/docker-images.test.ts b/packages/cdk-assets/test/docker-images.test.ts index bea03277..eaf8c39c 100644 --- a/packages/cdk-assets/test/docker-images.test.ts +++ b/packages/cdk-assets/test/docker-images.test.ts @@ -280,9 +280,7 @@ beforeEach(() => { // Set consistent mocks mockEcr.on(GetAuthorizationTokenCommand).resolves({ - authorizationData: [ - { authorizationToken: 'dXNlcjpwYXNz', proxyEndpoint: 'https://proxy.com/' }, - ], + authorizationData: [{ authorizationToken: 'dXNlcjpwYXNz', proxyEndpoint: 'https://proxy.com/' }], }); }); @@ -312,14 +310,10 @@ test('logging in twice for two repository domains (containing account id & regio const responses: GetAuthorizationTokenResponse[] = [ { - authorizationData: [ - { authorizationToken: 'dXNlcjpwYXNz', proxyEndpoint: 'https://12345.proxy.com/' }, - ], + authorizationData: [{ authorizationToken: 'dXNlcjpwYXNz', proxyEndpoint: 'https://12345.proxy.com/' }], }, { - authorizationData: [ - { authorizationToken: 'dXNlcjpwYXNz', proxyEndpoint: 'https://12346.proxy.com/' }, - ], + authorizationData: [{ authorizationToken: 'dXNlcjpwYXNz', proxyEndpoint: 'https://12346.proxy.com/' }], }, ]; @@ -331,14 +325,7 @@ test('logging in twice for two repository domains (containing account id & regio const expectAllSpawns = mockSpawn( { - commandLine: [ - 'docker', - 'login', - '--username', - 'user', - '--password-stdin', - 'https://12345.proxy.com/', - ], + commandLine: ['docker', 'login', '--username', 'user', '--password-stdin', '12345.proxy.com'], }, { commandLine: ['docker', 'inspect', 'cdkasset-theasset1'], exitCode: 1 }, { @@ -350,14 +337,7 @@ test('logging in twice for two repository domains (containing account id & regio }, { commandLine: ['docker', 'push', '12345.amazonaws.com/repo:theAsset1'] }, { - commandLine: [ - 'docker', - 'login', - '--username', - 'user', - '--password-stdin', - 'https://12346.proxy.com/', - ], + commandLine: ['docker', 'login', '--username', 'user', '--password-stdin', '12346.proxy.com'], }, { commandLine: ['docker', 'inspect', 'cdkasset-theasset2'], exitCode: 1 }, { @@ -421,14 +401,7 @@ describe('with a complete manifest', () => { test('upload docker image if not uploaded yet but exists locally', async () => { const expectAllSpawns = mockSpawn( { - commandLine: [ - 'docker', - 'login', - '--username', - 'user', - '--password-stdin', - 'https://proxy.com/', - ], + commandLine: ['docker', 'login', '--username', 'user', '--password-stdin', 'proxy.com'], }, { commandLine: ['docker', 'inspect', 'cdkasset-theasset'] }, { commandLine: ['docker', 'tag', 'cdkasset-theasset', '12345.amazonaws.com/repo:abcdef'] }, @@ -444,14 +417,7 @@ describe('with a complete manifest', () => { test('build and upload docker image if not exists anywhere', async () => { const expectAllSpawns = mockSpawn( { - commandLine: [ - 'docker', - 'login', - '--username', - 'user', - '--password-stdin', - 'https://proxy.com/', - ], + commandLine: ['docker', 'login', '--username', 'user', '--password-stdin', 'proxy.com'], }, { commandLine: ['docker', 'inspect', 'cdkasset-theasset'], exitCode: 1 }, { @@ -476,14 +442,7 @@ describe('with a complete manifest', () => { const expectAllSpawns = mockSpawn( { - commandLine: [ - 'docker', - 'login', - '--username', - 'user', - '--password-stdin', - 'https://proxy.com/', - ], + commandLine: ['docker', 'login', '--username', 'user', '--password-stdin', 'proxy.com'], }, { commandLine: ['docker', 'inspect', 'cdkasset-theasset'], exitCode: 1 }, { @@ -508,26 +467,11 @@ describe('with a complete manifest', () => { const expectAllSpawns = mockSpawn( { - commandLine: [ - 'docker', - 'login', - '--username', - 'user', - '--password-stdin', - 'https://proxy.com/', - ], + commandLine: ['docker', 'login', '--username', 'user', '--password-stdin', 'proxy.com'], }, { commandLine: ['docker', 'inspect', 'cdkasset-theasset'], exitCode: 1 }, { - commandLine: [ - 'docker', - 'build', - '--tag', - 'cdkasset-theasset', - '--platform', - 'linux/arm64', - '.', - ], + commandLine: ['docker', 'build', '--tag', 'cdkasset-theasset', '--platform', 'linux/arm64', '.'], cwd: defaultNetworkDockerpath, }, { commandLine: ['docker', 'tag', 'cdkasset-theasset', '12345.amazonaws.com/repo:nopqr'] }, @@ -546,14 +490,7 @@ describe('with a complete manifest', () => { const expectAllSpawns = mockSpawn( { - commandLine: [ - 'docker', - 'login', - '--username', - 'user', - '--password-stdin', - 'https://proxy.com/', - ], + commandLine: ['docker', 'login', '--username', 'user', '--password-stdin', 'proxy.com'], }, { commandLine: ['docker', 'inspect', 'cdkasset-theasset'], exitCode: 1 }, { @@ -586,14 +523,7 @@ describe('with a complete manifest', () => { const expectAllSpawns = mockSpawn( { - commandLine: [ - 'docker', - 'login', - '--username', - 'user', - '--password-stdin', - 'https://proxy.com/', - ], + commandLine: ['docker', 'login', '--username', 'user', '--password-stdin', 'proxy.com'], }, { commandLine: ['docker', 'inspect', 'cdkasset-theasset'], exitCode: 1 }, { @@ -618,14 +548,7 @@ describe('with a complete manifest', () => { const expectAllSpawns = mockSpawn( { - commandLine: [ - 'docker', - 'login', - '--username', - 'user', - '--password-stdin', - 'https://proxy.com/', - ], + commandLine: ['docker', 'login', '--username', 'user', '--password-stdin', 'proxy.com'], }, { commandLine: ['docker', 'inspect', 'cdkasset-theasset'], exitCode: 1 }, { @@ -662,14 +585,7 @@ describe('with a complete manifest', () => { const expectAllSpawns = mockSpawn( { - commandLine: [ - 'docker', - 'login', - '--username', - 'user', - '--password-stdin', - 'https://proxy.com/', - ], + commandLine: ['docker', 'login', '--username', 'user', '--password-stdin', 'proxy.com'], }, { commandLine: ['docker', 'inspect', 'cdkasset-theasset'], exitCode: 1 }, { @@ -705,14 +621,7 @@ describe('external assets', () => { test('upload externally generated Docker image', async () => { const expectAllSpawns = mockSpawn( { - commandLine: [ - 'docker', - 'login', - '--username', - 'user', - '--password-stdin', - 'https://proxy.com/', - ], + commandLine: ['docker', 'login', '--username', 'user', '--password-stdin', 'proxy.com'], }, { commandLine: ['sometool'], stdout: externalTag, cwd: '/external/cdk.out' }, { commandLine: ['docker', 'tag', externalTag, '12345.amazonaws.com/repo:ghijkl'] }, @@ -754,9 +663,7 @@ test('correctly identify Docker directory if path is absolute', async () => { test('when external credentials are present, explicit Docker config directories are used', async () => { // Setup -- Mock that we have CDK credentials, and mock fs operations. - jest - .spyOn(dockercreds, 'cdkCredentialsConfig') - .mockReturnValue({ version: '0.1', domainCredentials: {} }); + jest.spyOn(dockercreds, 'cdkCredentialsConfig').mockReturnValue({ version: '0.1', domainCredentials: {} }); jest.spyOn(fs, 'mkdtempSync').mockImplementationOnce(() => '/tmp/mockedTempDir'); jest.spyOn(fs, 'writeFileSync').mockImplementation(jest.fn()); @@ -769,15 +676,7 @@ test('when external credentials are present, explicit Docker config directories exitCode: 1, }, { - commandLine: [ - 'docker', - '--config', - '/tmp/mockedTempDir', - 'build', - '--tag', - 'cdkasset-theasset', - '.', - ], + commandLine: ['docker', '--config', '/tmp/mockedTempDir', 'build', '--tag', 'cdkasset-theasset', '.'], cwd: absoluteDockerPath, }, { @@ -808,14 +707,7 @@ test('logging in only once for two assets', async () => { const expectAllSpawns = mockSpawn( { - commandLine: [ - 'docker', - 'login', - '--username', - 'user', - '--password-stdin', - 'https://proxy.com/', - ], + commandLine: ['docker', 'login', '--username', 'user', '--password-stdin', 'proxy.com'], }, { commandLine: ['docker', 'inspect', 'cdkasset-theasset1'], exitCode: 1 }, { @@ -849,14 +741,7 @@ test('building only', async () => { const expectAllSpawns = mockSpawn( { - commandLine: [ - 'docker', - 'login', - '--username', - 'user', - '--password-stdin', - 'https://proxy.com/', - ], + commandLine: ['docker', 'login', '--username', 'user', '--password-stdin', 'proxy.com'], }, { commandLine: ['docker', 'inspect', 'cdkasset-theasset1'], exitCode: 1 }, { @@ -888,14 +773,7 @@ test('publishing only', async () => { const expectAllSpawns = mockSpawn( { - commandLine: [ - 'docker', - 'login', - '--username', - 'user', - '--password-stdin', - 'https://proxy.com/', - ], + commandLine: ['docker', 'login', '--username', 'user', '--password-stdin', 'proxy.com'], }, { commandLine: ['docker', 'push', '12345.amazonaws.com/aws-cdk/assets:theAsset1'] }, { commandLine: ['docker', 'push', '12345.amazonaws.com/aws-cdk/assets:theAsset2'] }, @@ -917,14 +795,7 @@ test('overriding the docker command', async () => { const expectAllSpawns = mockSpawn( { - commandLine: [ - 'custom', - 'login', - '--username', - 'user', - '--password-stdin', - 'https://proxy.com/', - ], + commandLine: ['custom', 'login', '--username', 'user', '--password-stdin', 'proxy.com'], }, { commandLine: ['custom', 'inspect', 'cdkasset-theasset'] }, { commandLine: ['custom', 'tag', 'cdkasset-theasset', '12345.amazonaws.com/repo:abcdef'] }, diff --git a/packages/cdk/.projen/tasks.json b/packages/cdk/.projen/tasks.json index 9ad34ce9..0d0cab3e 100644 --- a/packages/cdk/.projen/tasks.json +++ b/packages/cdk/.projen/tasks.json @@ -33,7 +33,7 @@ "VERSIONRCOPTIONS": "{\"path\":\".\"}", "BUMP_PACKAGE": "commit-and-tag-version@^12", "NEXT_VERSION_COMMAND": "tsx ../../projenrc/next-version.ts copyVersion:../../packages/aws-cdk/package.json", - "RELEASABLE_COMMITS": "git log --no-merges --oneline $LATEST_TAG..HEAD -E --grep \"^(feat|fix){1}(\\([^()[:space:]]+\\))?(!)?:[[:blank:]]+.+\" -- . ../aws-cdk ../@aws-cdk/cloud-assembly-schema ../@aws-cdk/cloudformation-diff" + "RELEASABLE_COMMITS": "git log --no-merges --oneline $LATEST_TAG..HEAD -E --grep \"^(feat|fix){1}(\\([^()[:space:]]+\\))?(!)?:[[:blank:]]+.+\" -- . ../aws-cdk ../@aws-cdk/tmp-toolkit-helpers ../@aws-cdk/cloud-assembly-schema ../@aws-cdk/cloudformation-diff" }, "steps": [ { @@ -192,7 +192,7 @@ "VERSIONRCOPTIONS": "{\"path\":\".\"}", "BUMP_PACKAGE": "commit-and-tag-version@^12", "NEXT_VERSION_COMMAND": "tsx ../../projenrc/next-version.ts copyVersion:../../packages/aws-cdk/package.json", - "RELEASABLE_COMMITS": "git log --no-merges --oneline $LATEST_TAG..HEAD -E --grep \"^(feat|fix){1}(\\([^()[:space:]]+\\))?(!)?:[[:blank:]]+.+\" -- . ../aws-cdk ../@aws-cdk/cloud-assembly-schema ../@aws-cdk/cloudformation-diff" + "RELEASABLE_COMMITS": "git log --no-merges --oneline $LATEST_TAG..HEAD -E --grep \"^(feat|fix){1}(\\([^()[:space:]]+\\))?(!)?:[[:blank:]]+.+\" -- . ../aws-cdk ../@aws-cdk/tmp-toolkit-helpers ../@aws-cdk/cloud-assembly-schema ../@aws-cdk/cloudformation-diff" }, "steps": [ { diff --git a/tsconfig.dev.json b/tsconfig.dev.json index 21d106db..393d79ec 100644 --- a/tsconfig.dev.json +++ b/tsconfig.dev.json @@ -57,6 +57,9 @@ { "path": "packages/cdk-assets" }, + { + "path": "packages/@aws-cdk/tmp-toolkit-helpers" + }, { "path": "packages/aws-cdk" }, diff --git a/tsconfig.json b/tsconfig.json index e585685f..9840db28 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -54,6 +54,9 @@ { "path": "packages/cdk-assets" }, + { + "path": "packages/@aws-cdk/tmp-toolkit-helpers" + }, { "path": "packages/aws-cdk" }, diff --git a/yarn.lock b/yarn.lock index bc752cdc..033ec249 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3657,17 +3657,6 @@ "@smithy/types" "^4.1.0" tslib "^2.6.2" -"@stylistic/eslint-plugin@^2.13.0": - version "2.13.0" - resolved "https://registry.yarnpkg.com/@stylistic/eslint-plugin/-/eslint-plugin-2.13.0.tgz#53bf175dac8c1ec055b370a6ff77d491cae9a70d" - integrity sha512-RnO1SaiCFHn666wNz2QfZEFxvmiNRqhzaMXHXxXXKt+MEP7aajlPxUSMIQpKAaJfverpovEYqjBOXDq6dDcaOQ== - dependencies: - "@typescript-eslint/utils" "^8.13.0" - eslint-visitor-keys "^4.2.0" - espree "^10.3.0" - estraverse "^5.3.0" - picomatch "^4.0.2" - "@stylistic/eslint-plugin@^3.1.0": version "3.1.0" resolved "https://registry.yarnpkg.com/@stylistic/eslint-plugin/-/eslint-plugin-3.1.0.tgz#a9f655c518f76bfc5feb46b467d0f06e511b289d" @@ -4863,10 +4852,10 @@ cdk-from-cfn@^0.191.0: resolved "https://registry.yarnpkg.com/cdk-from-cfn/-/cdk-from-cfn-0.191.0.tgz#47af22686f5f85cee50b1628b0a2b1a4a8719909" integrity sha512-j+TKUSmje5iSiOQzWstH/BkrsL8L9WV57zXll+BHlGT8w5wTrou4dZvNvFQWELW9aaS+UBX0ivsJRZwuO7GiIw== -cdklabs-projen-project-types@^0.1.220: - version "0.1.234" - resolved "https://registry.yarnpkg.com/cdklabs-projen-project-types/-/cdklabs-projen-project-types-0.1.234.tgz#2d46f793c1d0ef398b8d3006ad52c235b72e8b83" - integrity sha512-fx7FQ9s4C1gici/dQRIE0bKaaYqrMJn2AcwVYrCynXhsQ4pRZRtOCRLfDSFFVrqABPAvLgEcVu45sW3mSxU5yg== +cdklabs-projen-project-types@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/cdklabs-projen-project-types/-/cdklabs-projen-project-types-0.2.1.tgz#6247a64dcadc24e2804fd0c1402c388db09b4f1f" + integrity sha512-L9BsaNMjvnJETWOSAstfeuMTFwjOOl6GZaYNcuMWZV4WK5hJjtX15p0QyLQisFiStz4qahCtNXFmMzg5jf6yZA== dependencies: yaml "^2.7.0" @@ -6091,6 +6080,11 @@ eslint-config-prettier@^10.0.1: resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-10.0.1.tgz#fbb03bfc8db0651df9ce4e8b7150d11c5fe3addf" integrity sha512-lZBts941cyJyeaooiKxAtzoPHTN+GbQTJFAIdQbRhA4/8whaAraEh47Whw/ZFfrjNSnlAxqfm9i0XVAEkULjCw== +eslint-config-prettier@^10.0.2: + version "10.0.2" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-10.0.2.tgz#47444de8aa104ce82c2f91ad2a5e96b62c01e20d" + integrity sha512-1105/17ZIMjmCOJOPNfVdbXafLCLj3hPmkmB7dLgt7XsQ/zkxSuDerE/xgO3RxoHysR1N1whmquY0lSn2O0VLg== + eslint-import-resolver-node@^0.3.9: version "0.3.9" resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz#d4eaac52b8a2e7c3cd1903eb00f7e053356118ac"