From fa37eae8646d30d740ad01bce01e804936550ba1 Mon Sep 17 00:00:00 2001 From: "Milan Gyalai @ AWS" <142315836+gyalai-aws@users.noreply.github.com> Date: Mon, 2 Sep 2024 17:25:43 +0200 Subject: [PATCH] feat: new repository source interface (#86) * feat: new repository source interface * chore: self mutation Signed-off-by: github-actions * fix: lock NPM_LICENSE_CHECKER_TOOL version to 4.3.0 * fix: python support was missing yaml in the bundle * fix: license checker has to use the projectRoot --------- Signed-off-by: github-actions Co-authored-by: github-actions --- .gitignore | 1 + .projenrc.ts | 2 + NOTICE | 479 +++++++++--------- OSS_License_Summary.csv | 2 +- Taskfile.codeartifact.yml | 6 +- devbox.json | 52 +- devbox.lock | 64 +++ docs/content/developer_guides/cd.md | 12 +- .../developer_guides/global_resource.md | 2 +- package-verification.json | 10 +- package.json | 2 +- .../cdk-cicd-wrapper-cli/package.json | 2 +- .../src/cmds/ValidateCommand.ts | 2 +- .../src/cmds/license/NodeLicenseCollector.ts | 2 +- .../src/cmds/license/Projects.ts | 6 +- .../cdk-cicd-wrapper-cli/src/utils/Logging.ts | 6 +- .../cdk-cicd-wrapper-projen/package.json | 4 +- .../cdk-cicd-wrapper/.projen/tasks.json | 3 + .../@cdklabs/cdk-cicd-wrapper/package.json | 6 +- .../src/common/types/Types.ts | 11 + .../CodeCommitRepositoryConstruct.ts | 4 +- .../constructs/CodeStarConnectionConstruct.ts | 1 + .../src/resource-providers/LoggingProvider.ts | 27 +- .../PhaseCommandProvider.ts | 5 +- .../resource-providers/RepositoryProvider.ts | 229 +++++++-- .../src/stacks/PipelineBlueprint.ts | 30 +- .../src/stacks/PipelineBlueprintBase.ts | 1 - yarn.lock | 194 +++---- 28 files changed, 710 insertions(+), 455 deletions(-) diff --git a/.gitignore b/.gitignore index a42923b..0b7bea9 100644 --- a/.gitignore +++ b/.gitignore @@ -44,6 +44,7 @@ samples/**/package-lock.json node_modules .env .env.* +.venv !/.github/workflows/build.yml !/.github/workflows/upgrade.yml !/.github/pull_request_template.md diff --git a/.projenrc.ts b/.projenrc.ts index c2c3a21..830b0be 100644 --- a/.projenrc.ts +++ b/.projenrc.ts @@ -95,6 +95,7 @@ const root = new yarn.Monorepo({ 'node_modules', '.env', '.env.*', + '.venv', ], }); @@ -167,6 +168,7 @@ pipeline.tasks // Copy bundle dependencies to the package const postCompile = pipeline.tasks.tryFind('post-compile')!; postCompile.exec("export DEP='@cloudcomponents';cp -rf ../../../node_modules/$DEP ./node_modules/ 2>/dev/null;"); +postCompile.exec("export DEP='yaml';cp -rf ../../../node_modules/$DEP ./node_modules/ 2>/dev/null;"); //============================================ // diff --git a/NOTICE b/NOTICE index 40fbf39..a4a2179 100644 --- a/NOTICE +++ b/NOTICE @@ -9144,7 +9144,7 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -@babel/generator 7.25.5 +@babel/generator 7.25.6 MIT MIT License @@ -9378,7 +9378,7 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -@babel/helpers 7.25.0 +@babel/helpers 7.25.6 MIT MIT License @@ -9430,7 +9430,7 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -@babel/parser 7.25.4 +@babel/parser 7.25.6 MIT Copyright (C) 2012-2014 by various contributors (see AUTHORS) @@ -9557,7 +9557,7 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -@babel/plugin-syntax-import-attributes 7.24.7 +@babel/plugin-syntax-import-attributes 7.25.6 MIT MIT License @@ -9895,7 +9895,7 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -@babel/runtime 7.25.4 +@babel/runtime 7.25.6 MIT MIT License @@ -9947,7 +9947,7 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -@babel/traverse 7.25.4 +@babel/traverse 7.25.6 MIT MIT License @@ -9973,7 +9973,7 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -@babel/types 7.25.4 +@babel/types 7.25.6 MIT MIT License @@ -13059,7 +13059,7 @@ Apache-2.0 See the License for the specific language governing permissions and limitations under the License. -@jsii/spec 1.102.0 +@jsii/check-node 1.103.1 Apache-2.0 Apache License @@ -13469,6 +13469,211 @@ Apache-2.0 See the License for the specific language governing permissions and limitations under the License. +@jsii/spec 1.103.1 +Apache-2.0 + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + @nodelib/fs.scandir 2.1.5 MIT The MIT License (MIT) @@ -20696,211 +20901,6 @@ Apache-2.0 limitations under the License. -@smithy/types 3.2.0 -Apache-2.0 - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - @smithy/types 3.3.0 Apache-2.0 Apache License @@ -25228,7 +25228,7 @@ MIT SOFTWARE -@types/node 18.19.47 +@types/node 18.19.48 MIT MIT License @@ -25253,7 +25253,7 @@ MIT SOFTWARE -@types/node 22.5.1 +@types/node 22.5.2 MIT MIT License @@ -25353,31 +25353,6 @@ MIT SOFTWARE -@types/yargs 17.0.32 -MIT - MIT License - - Copyright (c) Microsoft Corporation. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE - - @types/yargs 17.0.33 MIT MIT License @@ -27361,7 +27336,7 @@ The above copyright notice and this permission notice shall be included in all c THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -caniuse-lite 1.0.30001653 +caniuse-lite 1.0.30001655 CC-BY-4.0 Attribution 4.0 International @@ -28662,7 +28637,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -codemaker 1.103.0 +codemaker 1.103.1 Apache-2.0 Apache License @@ -31701,7 +31676,7 @@ SOFTWARE. -escalade 3.1.2 +escalade 3.2.0 MIT MIT License @@ -33686,7 +33661,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -get-tsconfig 4.7.6 +get-tsconfig 4.8.0 MIT MIT License @@ -37403,7 +37378,7 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -jsii-diff 1.103.0 +jsii-diff 1.103.1 Apache-2.0 Apache License @@ -37608,7 +37583,7 @@ Apache-2.0 See the License for the specific language governing permissions and limitations under the License. -jsii-pacmak 1.103.0 +jsii-pacmak 1.103.1 Apache-2.0 Apache License @@ -37813,7 +37788,7 @@ Apache-2.0 See the License for the specific language governing permissions and limitations under the License. -jsii-reflect 1.103.0 +jsii-reflect 1.103.1 Apache-2.0 Apache License @@ -38018,7 +37993,7 @@ Apache-2.0 See the License for the specific language governing permissions and limitations under the License. -jsii-rosetta 5.4.34 +jsii-rosetta 5.4.35 Apache-2.0 Apache License @@ -41408,7 +41383,7 @@ The above copyright notice and this permission notice shall be included in all c THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -oo-ascii-tree 1.103.0 +oo-ascii-tree 1.103.1 Apache-2.0 Apache License @@ -52689,7 +52664,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.** -projen 0.86.5 +projen 0.86.6 Apache-2.0 Apache License @@ -56766,7 +56741,7 @@ If the Work includes a "NOTICE" text file as part of its distribution, then any END OF TERMS AND CONDITIONS -typescript 5.7.0-dev.20240829 +typescript 5.7.0-dev.20240902 Apache-2.0 Apache License @@ -56825,7 +56800,7 @@ If the Work includes a "NOTICE" text file as part of its distribution, then any END OF TERMS AND CONDITIONS -uglify-js 3.19.2 +uglify-js 3.19.3 BSD-2-Clause UglifyJS is released under the BSD license: diff --git a/OSS_License_Summary.csv b/OSS_License_Summary.csv index 41cea88..6bd92e2 100644 --- a/OSS_License_Summary.csv +++ b/OSS_License_Summary.csv @@ -14,6 +14,6 @@ "CC-BY-4.0","1" "CC0-1.0","2" "ISC","78" -"MIT","661" +"MIT","660" "Python-2.0","1" "UNLICENSED","1" diff --git a/Taskfile.codeartifact.yml b/Taskfile.codeartifact.yml index 50f44a1..eea286b 100644 --- a/Taskfile.codeartifact.yml +++ b/Taskfile.codeartifact.yml @@ -59,7 +59,7 @@ tasks: internal: true cmds: - task: publish:pipeline:js - # - task: publish:pipeline:python + - task: publish:pipeline:python publish:pipeline:js: desc: Publish the pipeline package locally @@ -123,8 +123,8 @@ tasks: cmds: - test -f .npmrc && rm -rf ./.npmrc && echo "[Warning] Project level .npmrc file has been removed." || true - aws codeartifact {{with .AWS_PROFILE}} --profile {{.}} {{end}}login --domain {{.DOMAIN}} --repository {{.REPOSITORY}} {{with .AWS_REGION}} --region {{.}} {{end}} --namespace cdklabs --tool npm - # - aws codeartifact {{with .AWS_PROFILE}} --profile {{.}} {{end}}login --domain {{.DOMAIN}} --repository {{.REPOSITORY}} {{with .AWS_REGION}} --region {{.}} {{end}} --tool pip - # - aws codeartifact {{with .AWS_PROFILE}} --profile {{.}} {{end}}login --domain {{.DOMAIN}} --repository {{.REPOSITORY}} {{with .AWS_REGION}} --region {{.}} {{end}} --tool twine + - aws codeartifact {{with .AWS_PROFILE}} --profile {{.}} {{end}}login --domain {{.DOMAIN}} --repository {{.REPOSITORY}} {{with .AWS_REGION}} --region {{.}} {{end}} --tool pip + - aws codeartifact {{with .AWS_PROFILE}} --profile {{.}} {{end}}login --domain {{.DOMAIN}} --repository {{.REPOSITORY}} {{with .AWS_REGION}} --region {{.}} {{end}} --tool twine - task: set-token-secret silent: true preconditions: diff --git a/devbox.json b/devbox.json index d8d19f2..43c9ccf 100644 --- a/devbox.json +++ b/devbox.json @@ -1,27 +1,33 @@ { - "$schema": "https://raw.githubusercontent.com/jetpack-io/devbox/0.10.3/.schema/devbox.schema.json", - "packages": [ - "git@2.42.0", - "git-remote-codecommit@1.15.1", - "jq@1.7.1", - "go-task@3.35.1", - "python@3.12.2", - "pipenv@2023.2.4", - "nodejs@18.19.1" + "$schema": "https://raw.githubusercontent.com/jetpack-io/devbox/0.10.3/.schema/devbox.schema.json", + "packages": [ + "git@2.42.0", + "git-remote-codecommit@1.15.1", + "jq@1.7.1", + "go-task@3.35.1", + "python@3.12.2", + "pipenv@2023.2.4", + "nodejs@18.19.1", + "twine@latest" + ], + "shell": { + "init_hook": [ + "echo 'Welcome to CDKLabs CDK CI/CD Wrapper'", + "echo 'You can run the following commands:'", + ". $VENV_DIR/bin/activate", + "task -l", + "echo 'For more information, see Readme.md'", + "task init" ], - "shell": { - "init_hook": [ - "echo 'Welcome to CDKLabs CDK CI/CD Wrapper'", - "echo 'You can run the following commands:'", - "task -l", - "echo 'For more information, see Readme.md'", - "task init" - ], - "scripts": { - "test": [ - "echo \"Error: no test specified\" && exit 1" - ] - } + "scripts": { + "test": [ + "echo \"Error: no test specified\" && exit 1" + ] } + }, + "env": { + "VENV_DIR": ".venv", + "PIPENV_VERBOSITY": "-1", + "DEVBOX_COREPACK_ENABLED": "1" } - \ No newline at end of file +} diff --git a/devbox.lock b/devbox.lock index edf25be..811c9d8 100644 --- a/devbox.lock +++ b/devbox.lock @@ -502,6 +502,70 @@ "store_path": "/nix/store/7yh2ax34jd7fgf17mjfd3c6niw1h2hsj-python3-3.12.2" } } + }, + "twine@latest": { + "last_modified": "2024-08-27T08:49:48Z", + "resolved": "github:NixOS/nixpkgs/a6292e34000dc93d43bccf78338770c1c5ec8a99#twine", + "source": "devbox-search", + "version": "5.1.0", + "systems": { + "aarch64-darwin": { + "outputs": [ + { + "name": "out", + "path": "/nix/store/2qlcms1l0lh8cxjmryg1jbnbv0mxih4r-python3.12-twine-5.1.0", + "default": true + }, + { + "name": "dist", + "path": "/nix/store/ya9s86ab0wjry6d6pq8izdghzbrq54w5-python3.12-twine-5.1.0-dist" + } + ], + "store_path": "/nix/store/2qlcms1l0lh8cxjmryg1jbnbv0mxih4r-python3.12-twine-5.1.0" + }, + "aarch64-linux": { + "outputs": [ + { + "name": "out", + "path": "/nix/store/w8k56bsfncdc67rl195aq98hbhgvjylx-python3.12-twine-5.1.0", + "default": true + }, + { + "name": "dist", + "path": "/nix/store/33118r1fr0j9r3p6srpql7fpd1aha487-python3.12-twine-5.1.0-dist" + } + ], + "store_path": "/nix/store/w8k56bsfncdc67rl195aq98hbhgvjylx-python3.12-twine-5.1.0" + }, + "x86_64-darwin": { + "outputs": [ + { + "name": "out", + "path": "/nix/store/aplcp7jzsxbnmxhzdldczygpv56gify8-python3.12-twine-5.1.0", + "default": true + }, + { + "name": "dist", + "path": "/nix/store/8zq56pfskha9gdmks6dzkjv8capj4wz2-python3.12-twine-5.1.0-dist" + } + ], + "store_path": "/nix/store/aplcp7jzsxbnmxhzdldczygpv56gify8-python3.12-twine-5.1.0" + }, + "x86_64-linux": { + "outputs": [ + { + "name": "out", + "path": "/nix/store/7gxvyicpv5xhf62rhp9clpjk5wyxnzmx-python3.12-twine-5.1.0", + "default": true + }, + { + "name": "dist", + "path": "/nix/store/70j2cmnk5fqfang6mx5h50n8pc5ghvl5-python3.12-twine-5.1.0-dist" + } + ], + "store_path": "/nix/store/7gxvyicpv5xhf62rhp9clpjk5wyxnzmx-python3.12-twine-5.1.0" + } + } } } } diff --git a/docs/content/developer_guides/cd.md b/docs/content/developer_guides/cd.md index 04cd497..4e7f210 100644 --- a/docs/content/developer_guides/cd.md +++ b/docs/content/developer_guides/cd.md @@ -74,7 +74,7 @@ PipelineBlueprint.builder().addStack({ applicationName: context.blueprintProps.applicationName, stageName: context.stage, }); -}}, vp.COMMON_STAGES.DEV).addStack({ +}}, Stage.DEV).addStack({ provide: (context) => { new example.S3BucketStack(context.scope, `${context.blueprintProps.applicationName}S3Stack`, { bucketName: 'test-bucket', @@ -82,7 +82,7 @@ PipelineBlueprint.builder().addStack({ applicationQualifier: context.blueprintProps.applicationQualifier, encryptionKey: context.get(GlobalResources.ENCRYPTION)!.kmsKey, }); -}}, vp.COMMON_STAGES.INT, vp.COMMON_STAGES.PROD).synth(app); +}}, Stage.INT, Stage.PROD).synth(app); ``` With this configuration the `LambdaStack` will be deployed in the DEV stage only and not in the INT and PROD stages where as the `S3BucketStack` will be deployed in the INT and PROD stages. @@ -97,10 +97,10 @@ You can define custom stages through the VanillaPipelineBuilder, so that you can ```typescript PipelineBlueprint.builder() .defineStages([ - vp.COMMON_STAGES.RES, + Stage.RES, { stage: 'EXP', account: '1234567891012', region: 'eu-west-1'}, - { stage: vp.COMMON_STAGES.DEV, account: '2345678910123', region: 'eu-west-1'}, - { stage: vp.COMMON_STAGES.INT} + { stage: Stage.DEV, account: '2345678910123', region: 'eu-west-1'}, + { stage: Stage.INT} ]) .addStack({ provide: (context) => { @@ -116,7 +116,7 @@ PipelineBlueprint.builder() applicationQualifier: context.blueprintProps.applicationQualifier, encryptionKey: context.get(GlobalResources.ENCRYPTION)!.kmsKey, }); - }}, vp.COMMON_STAGES.INT, vp.COMMON_STAGES.PROD).synth(app); + }}, Stage.INT, Stage.PROD).synth(app); ``` With this example you can see the options of how the Stages can be defined. diff --git a/docs/content/developer_guides/global_resource.md b/docs/content/developer_guides/global_resource.md index a6f8ac9..bcbc8ef 100644 --- a/docs/content/developer_guides/global_resource.md +++ b/docs/content/developer_guides/global_resource.md @@ -9,7 +9,7 @@ The benefit of the dependency injection is that the stack dependency implementat Let's see an example: ```typescript -new vp.S3BucketStack(context.scope, `${context.blueprintProps.applicationName}S3Stack`, { +new S3BucketStack(context.scope, `${context.blueprintProps.applicationName}S3Stack`, { bucketName: 'test-bucket', stageName: context.stage, applicationQualifier: context.blueprintProps.applicationQualifier, diff --git a/package-verification.json b/package-verification.json index 11a7966..c2aba7b 100644 --- a/package-verification.json +++ b/package-verification.json @@ -1,11 +1,11 @@ { "license": { - "package.json": "2fa6e73426cf7478f18abdad18c34aab0e7cc00a9c7be587a820772228ccb927", + "package.json": "27eb954737b58156e44e11e20987a453921d49bc602480b2df850cebcbdc9ead", "samples/cdk-ts-example/package.json": "54e2441af495ddf02e1e232fdd1ed4edc697c31fe03671776290a254e52ba2a6", - "packages/@cdklabs/cdk-cicd-wrapper/package.json": "5a037128d50a11a17cfddff266a40b2c939001931e30c27a2e0ad4cf8052186b", - "packages/@cdklabs/cdk-cicd-wrapper-cli/package.json": "56ad46900253b2fd1c44d965bdb0c40975ef5035dccff7be73c4864ccba8f57b", - "packages/@cdklabs/cdk-cicd-wrapper-projen/package.json": "8d45188ba2b0e57ba00df30f1cc2931032353a42c2da1171a708fb339b719b98", + "packages/@cdklabs/cdk-cicd-wrapper/package.json": "7cee38ba7a290df197937217245c7f333e3cc7c02cc6e56de51a314ceaa16d1b", + "packages/@cdklabs/cdk-cicd-wrapper-cli/package.json": "dd2779775dd746a96beee3fb8bf74b2aa02d0b9e93336ec9fdf6c3e90248ea99", + "packages/@cdklabs/cdk-cicd-wrapper-projen/package.json": "fa9a0a02cf185d82d98680f8a657ee7baa87542ddc35f164eb0c44acafe6358d", "projectList": "5790138ec76401840b75a0409a66d8e7e10445628567d18dbe5b2feedd20f463" }, - "npm-lock-file": "4f8e486be973f8b92a779e2491d525290be5ffb230129f934662e0b7a4f5008c" + "npm-lock-file": "3b26da52d4e5d1c84e560562bcaeedbd2e88e40eb5ceb7c9cc81ae2afd5bee1c" } \ No newline at end of file diff --git a/package.json b/package.json index 8a8e9ac..737cb07 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "husky": "^9.1.5", "node-fetch": "^2", "prettier": "^3.3.3", - "projen": "^0.86.5", + "projen": "^0.86.6", "ts-node": "^10.9.2", "typescript": "^5.5.4" }, diff --git a/packages/@cdklabs/cdk-cicd-wrapper-cli/package.json b/packages/@cdklabs/cdk-cicd-wrapper-cli/package.json index 2a5b561..1e290b5 100644 --- a/packages/@cdklabs/cdk-cicd-wrapper-cli/package.json +++ b/packages/@cdklabs/cdk-cicd-wrapper-cli/package.json @@ -39,7 +39,7 @@ "eslint-plugin-import": "^2.29.1", "eslint-plugin-prettier": "^5.2.1", "prettier": "^3.3.3", - "projen": "^0.86.5", + "projen": "^0.86.6", "typescript": "^5.5.4" }, "dependencies": { diff --git a/packages/@cdklabs/cdk-cicd-wrapper-cli/src/cmds/ValidateCommand.ts b/packages/@cdklabs/cdk-cicd-wrapper-cli/src/cmds/ValidateCommand.ts index ebf170b..57311b0 100644 --- a/packages/@cdklabs/cdk-cicd-wrapper-cli/src/cmds/ValidateCommand.ts +++ b/packages/@cdklabs/cdk-cicd-wrapper-cli/src/cmds/ValidateCommand.ts @@ -43,7 +43,7 @@ class Command implements yargs.CommandModule { static validateChecksum(filePath: string, expectedHash: string) { const hexCheckSum = CliHelpers.generateChecksum(filePath); if (hexCheckSum !== expectedHash) { - logger.info( + logger.warn( `File at ${filePath} has checksum ${hexCheckSum}, which does not match expected value ${expectedHash}`, ); logger.info('This likely means dependencies have updated. You must get the changes approved before proceeding'); diff --git a/packages/@cdklabs/cdk-cicd-wrapper-cli/src/cmds/license/NodeLicenseCollector.ts b/packages/@cdklabs/cdk-cicd-wrapper-cli/src/cmds/license/NodeLicenseCollector.ts index ccacf9d..ded31cd 100644 --- a/packages/@cdklabs/cdk-cicd-wrapper-cli/src/cmds/license/NodeLicenseCollector.ts +++ b/packages/@cdklabs/cdk-cicd-wrapper-cli/src/cmds/license/NodeLicenseCollector.ts @@ -8,7 +8,7 @@ import { parse, stringify } from 'csv/sync'; import { LicenseCollector, LicenseConfig, ScanningContext } from './Types'; import { logger } from '../../utils/Logging'; -const NPM_LICENSE_CHECKER_TOOL = 'license-checker-rseidelsohn'; +const NPM_LICENSE_CHECKER_TOOL = 'license-checker-rseidelsohn@4.3.0'; enum ProjectType { NPM, diff --git a/packages/@cdklabs/cdk-cicd-wrapper-cli/src/cmds/license/Projects.ts b/packages/@cdklabs/cdk-cicd-wrapper-cli/src/cmds/license/Projects.ts index 215b634..221eb88 100644 --- a/packages/@cdklabs/cdk-cicd-wrapper-cli/src/cmds/license/Projects.ts +++ b/packages/@cdklabs/cdk-cicd-wrapper-cli/src/cmds/license/Projects.ts @@ -21,7 +21,7 @@ export class Projects { private verificationFilePath: string; constructor(readonly config: LicenseConfig, readonly context: ScanningContext) { - this.verificationFilePath = path.resolve(this.context.workingDir, this.config.verificationFile); + this.verificationFilePath = path.resolve(this.context.projectRoot, this.config.verificationFile); } public getProjects(type: string) { @@ -72,6 +72,8 @@ export class Projects { this.newLicensesSection[projectRelativePath] = currentHashCode; if (verifiedHashCode !== currentHashCode) { logger.info(`File ${projectFile} has changed since last scan.`); + logger.debug(`Old hash: ${verifiedHashCode}`); + logger.debug(`New hash: ${currentHashCode}`); result = true; } @@ -85,6 +87,8 @@ export class Projects { this.newLicensesSection[LICENSE_FILES_SUMMARY_HASH] = currentHashCodeOfProjectFiles; if (verifiedHashCode !== currentHashCodeOfProjectFiles) { logger.info('Source of licenses has changed since last scan.'); + logger.debug(`Old hash: ${verifiedHashCode}`); + logger.debug(`New hash: ${currentHashCodeOfProjectFiles}`); result = true; } diff --git a/packages/@cdklabs/cdk-cicd-wrapper-cli/src/utils/Logging.ts b/packages/@cdklabs/cdk-cicd-wrapper-cli/src/utils/Logging.ts index 7990c40..9679fec 100644 --- a/packages/@cdklabs/cdk-cicd-wrapper-cli/src/utils/Logging.ts +++ b/packages/@cdklabs/cdk-cicd-wrapper-cli/src/utils/Logging.ts @@ -3,4 +3,8 @@ import { Logger } from 'tslog'; -export const logger = new Logger({ name: 'CDK CI/CD CLI', minLevel: 4 }); +export const logger = new Logger({ + name: 'CDK CI/CD CLI', + minLevel: 3, + prettyLogTemplate: '{{yyyy}}.{{mm}}.{{dd}} {{hh}}:{{MM}}:{{ss}}:{{ms}}\t{{logLevelName}}\t[{{name}}]\t', +}); diff --git a/packages/@cdklabs/cdk-cicd-wrapper-projen/package.json b/packages/@cdklabs/cdk-cicd-wrapper-projen/package.json index 56cdd08..330e56c 100644 --- a/packages/@cdklabs/cdk-cicd-wrapper-projen/package.json +++ b/packages/@cdklabs/cdk-cicd-wrapper-projen/package.json @@ -35,11 +35,11 @@ "eslint-plugin-import": "^2.29.1", "eslint-plugin-prettier": "^5.2.1", "prettier": "^3.3.3", - "projen": "^0.86.5", + "projen": "^0.86.6", "typescript": "^5.5.4" }, "dependencies": { - "projen": "^0.86.5" + "projen": "^0.86.6" }, "main": "lib/index.js", "license": "Apache-2.0", diff --git a/packages/@cdklabs/cdk-cicd-wrapper/.projen/tasks.json b/packages/@cdklabs/cdk-cicd-wrapper/.projen/tasks.json index 9c59343..041346c 100644 --- a/packages/@cdklabs/cdk-cicd-wrapper/.projen/tasks.json +++ b/packages/@cdklabs/cdk-cicd-wrapper/.projen/tasks.json @@ -191,6 +191,9 @@ }, { "exec": "export DEP='@cloudcomponents';cp -rf ../../../node_modules/$DEP ./node_modules/ 2>/dev/null;" + }, + { + "exec": "export DEP='yaml';cp -rf ../../../node_modules/$DEP ./node_modules/ 2>/dev/null;" } ] }, diff --git a/packages/@cdklabs/cdk-cicd-wrapper/package.json b/packages/@cdklabs/cdk-cicd-wrapper/package.json index eb49be3..47120f6 100644 --- a/packages/@cdklabs/cdk-cicd-wrapper/package.json +++ b/packages/@cdklabs/cdk-cicd-wrapper/package.json @@ -52,11 +52,11 @@ "jest": "^29.7.0", "jest-junit": "^15", "jsii": "~5.4.0", - "jsii-diff": "^1.103.0", - "jsii-pacmak": "^1.103.0", + "jsii-diff": "^1.103.1", + "jsii-pacmak": "^1.103.1", "jsii-rosetta": "~5.4.0", "prettier": "^3.3.3", - "projen": "^0.86.5", + "projen": "^0.86.6", "ts-jest": "^29.2.5", "typescript": "^5.5.4" }, diff --git a/packages/@cdklabs/cdk-cicd-wrapper/src/common/types/Types.ts b/packages/@cdklabs/cdk-cicd-wrapper/src/common/types/Types.ts index a206c51..ded9898 100644 --- a/packages/@cdklabs/cdk-cicd-wrapper/src/common/types/Types.ts +++ b/packages/@cdklabs/cdk-cicd-wrapper/src/common/types/Types.ts @@ -5,6 +5,7 @@ import * as codebuild from 'aws-cdk-lib/aws-codebuild'; import { Step } from 'aws-cdk-lib/pipelines'; import { Construct } from 'constructs'; import { PipelineOptions } from '../../code-pipeline'; +import { RepositorySource } from '../../resource-providers'; import { IVpcConfig } from '../../resource-providers/VPCProvider'; import { ResourceContext } from '../spi'; @@ -179,6 +180,11 @@ export interface IPipelineConfig { * Additional pipelineOptions. */ pipelineOptions?: PipelineOptions; + + /** + * The repository source for the pipeline. + */ + repositorySource?: RepositorySource; } /** @@ -369,6 +375,11 @@ export interface RepositoryConfig { * The description of the repository (optional). */ readonly description?: string; + + /** + * Enforce full clone for the repository. + */ + readonly codeBuildCloneOutput?: boolean; } /** diff --git a/packages/@cdklabs/cdk-cicd-wrapper/src/constructs/CodeCommitRepositoryConstruct.ts b/packages/@cdklabs/cdk-cicd-wrapper/src/constructs/CodeCommitRepositoryConstruct.ts index dce2c18..a8b6c05 100644 --- a/packages/@cdklabs/cdk-cicd-wrapper/src/constructs/CodeCommitRepositoryConstruct.ts +++ b/packages/@cdklabs/cdk-cicd-wrapper/src/constructs/CodeCommitRepositoryConstruct.ts @@ -73,7 +73,9 @@ export class CodeCommitRepositoryConstruct extends Construct { description: props.description, }); - this.pipelineInput = pipelines.CodePipelineSource.codeCommit(repository, props.branch); + this.pipelineInput = pipelines.CodePipelineSource.codeCommit(repository, props.branch, { + codeBuildCloneOutput: props.codeBuildCloneOutput, + }); if (props.pr) { this.enablePrRequest(props.applicationName, repository, props.pr); diff --git a/packages/@cdklabs/cdk-cicd-wrapper/src/constructs/CodeStarConnectionConstruct.ts b/packages/@cdklabs/cdk-cicd-wrapper/src/constructs/CodeStarConnectionConstruct.ts index 91119c2..d12841d 100644 --- a/packages/@cdklabs/cdk-cicd-wrapper/src/constructs/CodeStarConnectionConstruct.ts +++ b/packages/@cdklabs/cdk-cicd-wrapper/src/constructs/CodeStarConnectionConstruct.ts @@ -47,6 +47,7 @@ export class CodeStarConnectionConstruct extends Construct { */ this.pipelineInput = pipelines.CodePipelineSource.connection(props.name, props.branch, { connectionArn: props.codeStarConnectionArn, + codeBuildCloneOutput: props.codeBuildCloneOutput, }); /** diff --git a/packages/@cdklabs/cdk-cicd-wrapper/src/resource-providers/LoggingProvider.ts b/packages/@cdklabs/cdk-cicd-wrapper/src/resource-providers/LoggingProvider.ts index a0b484b..68dc63b 100644 --- a/packages/@cdklabs/cdk-cicd-wrapper/src/resource-providers/LoggingProvider.ts +++ b/packages/@cdklabs/cdk-cicd-wrapper/src/resource-providers/LoggingProvider.ts @@ -2,15 +2,15 @@ // SPDX-License-Identifier: Apache-2.0 import * as cdk from 'aws-cdk-lib'; -import { Construct } from 'constructs'; +import { Construct, IConstruct } from 'constructs'; import { IResourceProvider, ResourceContext } from '../common'; export interface ILogger { - info(message: string): void; + info(message: string, on?: IConstruct): void; - warning(message: string): void; + warning(message: string, on?: IConstruct): void; - error(message: string): void; + error(message: string, on?: IConstruct): void; } class Logger implements ILogger { @@ -37,27 +37,27 @@ class Logger implements ILogger { }; } - info(message: string) { - if (!this.scope) { + info(message: string, on?: IConstruct) { + if (!on && !this.scope) { this.messages.info.push(message); } else { - cdk.Annotations.of(this.scope).addInfo(message); + cdk.Annotations.of(on || this.scope!).addInfo(message); } } - warning(message: string) { - if (!this.scope) { + warning(message: string, on?: IConstruct) { + if (!on && !this.scope) { this.messages.warning.push(message); } else { - cdk.Annotations.of(this.scope).addWarning(message); + cdk.Annotations.of(on || this.scope!).addWarning(message); } } - error(message: string) { + error(message: string, on?: IConstruct) { if (!this.scope) { this.messages.error.push(message); } else { - cdk.Annotations.of(this.scope).addError(message); + cdk.Annotations.of(on || this.scope!).addError(message); } } } @@ -67,8 +67,7 @@ const logger = new Logger(); export { logger }; export class LoggingProvider implements IResourceProvider { - provide(context: ResourceContext): any { - logger.setScope(context.scope); + provide(_: ResourceContext): any { return logger; } } diff --git a/packages/@cdklabs/cdk-cicd-wrapper/src/resource-providers/PhaseCommandProvider.ts b/packages/@cdklabs/cdk-cicd-wrapper/src/resource-providers/PhaseCommandProvider.ts index 7a9b00d..7227e58 100644 --- a/packages/@cdklabs/cdk-cicd-wrapper/src/resource-providers/PhaseCommandProvider.ts +++ b/packages/@cdklabs/cdk-cicd-wrapper/src/resource-providers/PhaseCommandProvider.ts @@ -40,10 +40,7 @@ export class NPMPhaseCommand implements IPhaseCommand { // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access if (!pkgJson.scripts[this.script]) { - logger.warning( - `[WARN] Script ${this.script} does not exist in package.json. Please add it to the scripts section.`, - ); - console.log(`[WARN] Script ${this.script} does not exist in package.json. Please add it to the scripts section.`); + logger.warning(`Script ${this.script} does not exist in package.json. Please add it to the scripts section.`); } return command; diff --git a/packages/@cdklabs/cdk-cicd-wrapper/src/resource-providers/RepositoryProvider.ts b/packages/@cdklabs/cdk-cicd-wrapper/src/resource-providers/RepositoryProvider.ts index 7ae54f6..a6dedc7 100644 --- a/packages/@cdklabs/cdk-cicd-wrapper/src/resource-providers/RepositoryProvider.ts +++ b/packages/@cdklabs/cdk-cicd-wrapper/src/resource-providers/RepositoryProvider.ts @@ -4,6 +4,7 @@ import * as pipelines from 'aws-cdk-lib/pipelines'; import { IConstruct } from 'constructs'; import { ICodeBuildFactory } from './CodeBuildFactoryProvider'; +import { logger } from './LoggingProvider'; import { RepositoryType, GlobalResources, ResourceContext, IResourceProvider, RepositoryConfig } from '../common'; import { CodeStarConnectRepositoryStack } from '../stacks'; import { CodeCommitRepositoryStack } from '../stacks/CodeCommitRepositoryStack'; @@ -12,7 +13,7 @@ import { CodeCommitRepositoryStack } from '../stacks/CodeCommitRepositoryStack'; * Default configuration for repository provider. */ const defaultRepositoryConfig: BaseRepositoryProviderProps = { - repositoryType: process.env.npm_package_config_repositoryType as RepositoryType, + repositoryType: (process.env.npm_package_config_repositoryType as RepositoryType | undefined) || 'CODECOMMIT', name: process.env.npm_package_config_repositoryName!, branch: 'main', // Default branch is 'main' codeStarConnectionArn: process.env.CODESTAR_CONNECTION_ARN, @@ -53,44 +54,200 @@ export class BasicRepositoryProvider implements RepositoryProvider { * @returns The repository stack. */ provide(context: ResourceContext): any { - const { applicationName, deploymentDefinition, applicationQualifier } = context.blueprintProps; + const repositorySource = + context.blueprintProps.repositorySource || RepositorySource.basedType(this.config.repositoryType, this.config); + + return repositorySource.produceSourceConfig(context); + } +} + +/** + * Represents a repository source. + */ +export abstract class RepositorySource { + /** + * Creates a new CodeCommit repository source. + * + * @param options The repository source options. + * @returns + */ + static codecommit(options?: CodeCommitRepositorySourceOptions): RepositorySource { + return new CodeCommitRepositorySource(options); + } + + /** + * Creates a new Github - CodeStar connection repository source. + * + * @param options The repository source options. + * @returns + */ + static github(options?: CodeStarConnectionRepositorySourceOptions): RepositorySource { + return new CodeStarConnectionRepositorySource(options); + } + + /** + * Creates a new CodeStar connection repository source. + * + * @param options The repository source options. + * @returns + */ + static codestarConnection(options?: CodeStarConnectionRepositorySourceOptions): RepositorySource { + return new CodeStarConnectionRepositorySource(options); + } - const codebuildFactory: ICodeBuildFactory = context.get(GlobalResources.CODEBUILD_FACTORY)!; - const ciDefinition = context.get(GlobalResources.CI_DEFINITION)!; - - switch (this.config.repositoryType) { - case 'GITHUB': { - if (!this.config.codeStarConnectionArn) { - throw new Error('CodeStar connection ARN is required for CodeStarConnection based repository'); - } - - return new CodeStarConnectRepositoryStack(context.scope, `${applicationName}Repository`, { - env: { account: deploymentDefinition.RES.env.account, region: deploymentDefinition.RES.env.region }, - applicationName: applicationName, - applicationQualifier: applicationQualifier, - codeStarConnectionArn: this.config.codeStarConnectionArn, - ...this.config, + static basedType(type: RepositoryType, config?: BaseRepositoryProviderProps): RepositorySource { + switch (type) { + case 'GITHUB': + return this.github({ + repositoryName: config?.name, + branch: config?.branch, + description: config?.description, + codeStarConnectionArn: config?.codeStarConnectionArn, }); - } - case 'CODECOMMIT': { - return new CodeCommitRepositoryStack(context.scope, `${applicationName}Repository`, { - env: { - account: deploymentDefinition.RES.env.account, - region: deploymentDefinition.RES.env.region, - }, - applicationName: applicationName, - applicationQualifier: applicationQualifier, - ...this.config, - pr: { - codeGuruReviewer: this.config.codeGuruReviewer || false, // Default value is false - codeBuildOptions: codebuildFactory.provideCodeBuildOptions(), - buildSpec: ciDefinition, - }, + case 'CODECOMMIT': + return this.codecommit({ + repositoryName: config?.name, + branch: config?.branch, + description: config?.description, + enableCodeGuruReviewer: config?.codeGuruReviewer, + enablePullRequestChecks: true, }); - } - default: { - throw new Error(`Unsupported repository type: ${this.config.repositoryType}`); - } + default: + throw new Error(`Unsupported repository type: ${type}`); + } + } + + protected constructor() {} + + abstract produceSourceConfig(context: ResourceContext): IRepositoryStack; +} + +export class CodeCommitRepositorySource extends RepositorySource { + constructor(private options: CodeCommitRepositorySourceOptions = {}) { + super(); + } + + produceSourceConfig(context: ResourceContext): IRepositoryStack { + const { applicationName, deploymentDefinition, applicationQualifier } = context.blueprintProps; + + let prConfig = {}; + + if (this.options.enablePullRequestChecks ?? true) { + const codebuildFactory: ICodeBuildFactory = context.get(GlobalResources.CODEBUILD_FACTORY)!; + const ciDefinition = context.get(GlobalResources.CI_DEFINITION)!; + + prConfig = { + pr: { + codeGuruReviewer: this.options.enableCodeGuruReviewer || false, // Default value is false + codeBuildOptions: codebuildFactory.provideCodeBuildOptions(), + buildSpec: ciDefinition, + }, + }; + } + + return new CodeCommitRepositoryStack(context.scope, `${applicationName}Repository`, { + env: { + account: deploymentDefinition.RES.env.account, + region: deploymentDefinition.RES.env.region, + }, + applicationName: applicationName, + applicationQualifier: applicationQualifier, + repositoryType: 'CODECOMMIT', + name: this.options.repositoryName || defaultRepositoryConfig.name || applicationName, + branch: this.options.branch || defaultRepositoryConfig.branch, + codeBuildCloneOutput: this.options.codeBuildCloneOutput || false, + ...prConfig, + }); + } +} + +export class CodeStarConnectionRepositorySource extends RepositorySource { + constructor(private options: CodeStarConnectionRepositorySourceOptions = {}) { + super(); + } + + produceSourceConfig(context: ResourceContext): IRepositoryStack { + const { applicationName, deploymentDefinition, applicationQualifier } = context.blueprintProps; + + const codeStarConnectionArn = this.options.codeStarConnectionArn || defaultRepositoryConfig.codeStarConnectionArn; + + if (!codeStarConnectionArn) { + logger.error('CodeStarConnectionArn is required for CodeStarConnectionRepositorySource'); + throw new Error('CodeStarConnectionArn is required for CodeStarConnectionRepositorySource'); } + + return new CodeStarConnectRepositoryStack(context.scope, `${applicationName}Repository`, { + env: { account: deploymentDefinition.RES.env.account, region: deploymentDefinition.RES.env.region }, + applicationName: applicationName, + applicationQualifier: applicationQualifier, + codeStarConnectionArn: codeStarConnectionArn, + repositoryType: 'GITHUB', + name: this.options.repositoryName || defaultRepositoryConfig.name || applicationName, + branch: this.options.branch || defaultRepositoryConfig.branch, + codeBuildCloneOutput: this.options.codeBuildCloneOutput || false, + }); } } + +/** + * Represents the configuration for a repository source. + */ +export interface RepositorySourceOptions { + /** + * The name of the repository. + * @default - The name of the application. + * + * other options to configure: + * in package.json file + * + * "config": { + * "repositoryName": "my-repo", + * } + */ + readonly repositoryName?: string; + + /** + * The branch of the repository. + * @default - 'main' + */ + readonly branch?: string; + + /** + * The description of the repository. + * @default - No description. + */ + readonly description?: string; + + /** + * Enforce full clone for the repository. + * Tools like semgrep and pre-commit hooks require a full clone. + * + * @default - false + */ + readonly codeBuildCloneOutput?: boolean; +} + +export interface CodeCommitRepositorySourceOptions extends RepositorySourceOptions { + /** + * Enable pull request checks. + * + * @default - true + */ + readonly enablePullRequestChecks?: boolean; + + /** + * Enable CodeGuru Reviewer. + * + * @default - false + */ + readonly enableCodeGuruReviewer?: boolean; +} + +export interface CodeStarConnectionRepositorySourceOptions extends RepositorySourceOptions { + /** + * The ARN of the CodeStar connection. + * + * @default - The value of the CODESTAR_CONNECTION_ARN environment variable. + */ + readonly codeStarConnectionArn?: string; +} diff --git a/packages/@cdklabs/cdk-cicd-wrapper/src/stacks/PipelineBlueprint.ts b/packages/@cdklabs/cdk-cicd-wrapper/src/stacks/PipelineBlueprint.ts index 81fb0f7..c67de0e 100644 --- a/packages/@cdklabs/cdk-cicd-wrapper/src/stacks/PipelineBlueprint.ts +++ b/packages/@cdklabs/cdk-cicd-wrapper/src/stacks/PipelineBlueprint.ts @@ -26,6 +26,7 @@ import { RequiredRESStage, WorkbenchOptions, IPlugin, + ResourceContext, } from '../common'; import { Plugins } from '../plugins'; import { CIDefinitionProvider, HookProvider } from '../resource-providers'; @@ -38,7 +39,11 @@ import { ParameterProvider } from '../resource-providers/ParameterProvider'; import { PhaseCommandProvider, PhaseCommands } from '../resource-providers/PhaseCommandProvider'; import { PipelineProvider } from '../resource-providers/PipelineProvider'; import { HttpProxyProvider, IProxyConfig } from '../resource-providers/ProxyProvider'; -import { BasicRepositoryProvider, RepositoryProvider } from '../resource-providers/RepositoryProvider'; +import { + BasicRepositoryProvider, + RepositoryProvider, + RepositorySource, +} from '../resource-providers/RepositoryProvider'; import { StageProvider } from '../resource-providers/StageProvider'; import { VPCProvider } from '../resource-providers/VPCProvider'; @@ -48,7 +53,7 @@ const defaultRegion = process.env.AWS_REGION; * Default configuration for the Pipeline Blueprint. */ const defaultConfigs = { - applicationName: process.env.npm_package_config_applicationName || process.env.npm_package_name || '', + applicationName: '', applicationQualifier: '', region: defaultRegion, logRetentionInDays: '365', @@ -235,6 +240,11 @@ export class PipelineBlueprintBuilder { return this.resourceProvider(GlobalResources.REPOSITORY, repositoryProvider); } + public repository(repositorySource: RepositorySource) { + this.props.repositorySource = repositorySource; + return this; + } + /** * Sets a resource provider for the Pipeline Blueprint. * @param name The name of the resource provider. @@ -423,10 +433,19 @@ export class PipelineBlueprintBuilder { let stack: cdk.Stack; + if (this.props.applicationName === '') { + if (!process.env.JSII_AGENT) { + this.props.applicationName = process.env.npm_package_config_applicationName || process.env.npm_package_name!; + } else { + throw new Error(`Application name must be directly set if used ${process.env.JSII_AGENT} CDK language.`); + } + } + const id = this._id || this.props.applicationName || 'CiCdBlueprint'; if (this.props.applicationQualifier === '') { - process.env.npm_package_config_cdkQualifier || + this.props.applicationQualifier = + process.env.npm_package_config_cdkQualifier || app.node.tryGetContext('@aws-cdk/core:bootstrapQualifier') || cdk.DefaultStackSynthesizer.DEFAULT_QUALIFIER; } @@ -449,6 +468,9 @@ export class PipelineBlueprintBuilder { stack = new PipelineStack(app, id, this.props as IPipelineBlueprintProps); } + // Ensure all the logs that are added during the pipeline definition without specifying the stack are added to the pipeline stack + ResourceContext.instance().get(GlobalResources.LOGGING).setScope(stack); + cdk.Tags.of(app).add('Application', `${this.props.applicationName}`); cdk.Aspects.of(app).add(new AwsSolutionsChecks({ verbose: false })); @@ -493,7 +515,7 @@ export class PipelineBlueprintBuilder { region: string, ) { if (this.props.resourceProviders![GlobalResources.COMPLIANCE_BUCKET] instanceof DisabledProvider) { - return undefined; + return providedDefinition.complianceLogBucketName; } return providedDefinition.complianceLogBucketName ?? `compliance-log-${account}-${region}`; diff --git a/packages/@cdklabs/cdk-cicd-wrapper/src/stacks/PipelineBlueprintBase.ts b/packages/@cdklabs/cdk-cicd-wrapper/src/stacks/PipelineBlueprintBase.ts index 815eeb1..1b6e88f 100644 --- a/packages/@cdklabs/cdk-cicd-wrapper/src/stacks/PipelineBlueprintBase.ts +++ b/packages/@cdklabs/cdk-cicd-wrapper/src/stacks/PipelineBlueprintBase.ts @@ -43,7 +43,6 @@ export class PipelineBlueprintBase extends cdk.Stack { super(scope, id, { env }); this.resourceContext = new ResourceContext(scope, this, config); - this.resourceContext.get(GlobalResources.LOGGING); Object.values(config.plugins).forEach((plugin) => (plugin.create ? plugin.create(this.resourceContext) : null)); diff --git a/yarn.lock b/yarn.lock index b295d3f..124ae21 100644 --- a/yarn.lock +++ b/yarn.lock @@ -726,12 +726,12 @@ json5 "^2.2.3" semver "^6.3.1" -"@babel/generator@^7.25.0", "@babel/generator@^7.25.4", "@babel/generator@^7.7.2": - version "7.25.5" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.25.5.tgz#b31cf05b3fe8c32d206b6dad03bb0aacbde73450" - integrity sha512-abd43wyLfbWoxC6ahM8xTkqLpGB2iWBVyuKC9/srhFunCd1SDNrV1s72bBpK4hLj8KLzHBBcOblvLQZBNw9r3w== +"@babel/generator@^7.25.0", "@babel/generator@^7.25.6", "@babel/generator@^7.7.2": + version "7.25.6" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.25.6.tgz#0df1ad8cb32fe4d2b01d8bf437f153d19342a87c" + integrity sha512-VPC82gr1seXOpkjAAKoLhP50vx4vGNlF4msF64dSFq1P8RfB+QAuJWGHPXXPc8QyfVWwwB/TNNU4+ayZmHNbZw== dependencies: - "@babel/types" "^7.25.4" + "@babel/types" "^7.25.6" "@jridgewell/gen-mapping" "^0.3.5" "@jridgewell/trace-mapping" "^0.3.25" jsesc "^2.5.1" @@ -794,12 +794,12 @@ integrity sha512-xb8t9tD1MHLungh/AIoWYN+gVHaB9kwlu8gffXGSt3FFEIT7RjS+xWbc2vUD1UTZdIpKj/ab3rdqJ7ufngyi2Q== "@babel/helpers@^7.25.0": - version "7.25.0" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.25.0.tgz#e69beb7841cb93a6505531ede34f34e6a073650a" - integrity sha512-MjgLZ42aCm0oGjJj8CtSM3DB8NOOf8h2l7DCTePJs29u+v7yO/RBX9nShlKMgFnRks/Q4tBAe7Hxnov9VkGwLw== + version "7.25.6" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.25.6.tgz#57ee60141829ba2e102f30711ffe3afab357cc60" + integrity sha512-Xg0tn4HcfTijTwfDwYlvVCl43V6h4KyVVX2aEm4qdO/PC6L2YvzLHFdmxhoeSA3eslcE6+ZVXHgWwopXYLNq4Q== dependencies: "@babel/template" "^7.25.0" - "@babel/types" "^7.25.0" + "@babel/types" "^7.25.6" "@babel/highlight@^7.24.7": version "7.24.7" @@ -811,12 +811,12 @@ js-tokens "^4.0.0" picocolors "^1.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.23.9", "@babel/parser@^7.25.0", "@babel/parser@^7.25.4": - version "7.25.4" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.25.4.tgz#af4f2df7d02440286b7de57b1c21acfb2a6f257a" - integrity sha512-nq+eWrOgdtu3jG5Os4TQP3x3cLA8hR8TvJNjD8vnPa20WGycimcparWnLK4jJhElTK6SDyuJo1weMKO/5LpmLA== +"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.23.9", "@babel/parser@^7.25.0", "@babel/parser@^7.25.6": + version "7.25.6" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.25.6.tgz#85660c5ef388cbbf6e3d2a694ee97a38f18afe2f" + integrity sha512-trGdfBdbD0l1ZPmcJ83eNxB9rbEax4ALFTF7fN386TMYbeCQbyme5cOEXQhbGXKebwGaB/J52w1mrklMcbgy6Q== dependencies: - "@babel/types" "^7.25.4" + "@babel/types" "^7.25.6" "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" @@ -847,11 +847,11 @@ "@babel/helper-plugin-utils" "^7.14.5" "@babel/plugin-syntax-import-attributes@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.24.7.tgz#b4f9ea95a79e6912480c4b626739f86a076624ca" - integrity sha512-hbX+lKKeUMGihnK8nvKqmXBInriT3GVjzXKFriV3YC6APGxMbP8RZNFwy91+hocLXq90Mta+HshoB31802bb8A== + version "7.25.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.25.6.tgz#6d4c78f042db0e82fd6436cd65fec5dc78ad2bde" + integrity sha512-sXaDXaJN9SNLymBdlWFA+bjzBhFD617ZaFiY13dGt7TVslVvVgA6fkZOP7Ki3IGElC45lwHdOTrCtKZGVAWeLQ== dependencies: - "@babel/helper-plugin-utils" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.8" "@babel/plugin-syntax-import-meta@^7.10.4": version "7.10.4" @@ -938,9 +938,9 @@ "@babel/helper-plugin-utils" "^7.24.8" "@babel/runtime@^7.18.9", "@babel/runtime@^7.7.6": - version "7.25.4" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.25.4.tgz#6ef37d678428306e7d75f054d5b1bdb8cf8aa8ee" - integrity sha512-DSgLeL/FNcpXuzav5wfYvHCGvynXkJbn3Zvc3823AEe9nPwW9IK4UoCSS5yGymmQzN0pCPvivtgS6/8U2kkm1w== + version "7.25.6" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.25.6.tgz#9afc3289f7184d8d7f98b099884c26317b9264d2" + integrity sha512-VBj9MYyDb9tuLq7yzqjgzt6Q+IBQLrGZfdjOekyEirZPHxXWoTSGUTMrpsfi58Up73d13NfYLv8HT9vmznjzhQ== dependencies: regenerator-runtime "^0.14.0" @@ -954,22 +954,22 @@ "@babel/types" "^7.25.0" "@babel/traverse@^7.24.7", "@babel/traverse@^7.25.2": - version "7.25.4" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.25.4.tgz#648678046990f2957407e3086e97044f13c3e18e" - integrity sha512-VJ4XsrD+nOvlXyLzmLzUs/0qjFS4sK30te5yEFlvbbUNEgKaVb2BHZUpAL+ttLPQAHNrsI3zZisbfha5Cvr8vg== + version "7.25.6" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.25.6.tgz#04fad980e444f182ecf1520504941940a90fea41" + integrity sha512-9Vrcx5ZW6UwK5tvqsj0nGpp/XzqthkT0dqIc9g1AdtygFToNtTF67XzYS//dm+SAK9cp3B9R4ZO/46p63SCjlQ== dependencies: "@babel/code-frame" "^7.24.7" - "@babel/generator" "^7.25.4" - "@babel/parser" "^7.25.4" + "@babel/generator" "^7.25.6" + "@babel/parser" "^7.25.6" "@babel/template" "^7.25.0" - "@babel/types" "^7.25.4" + "@babel/types" "^7.25.6" debug "^4.3.1" globals "^11.1.0" -"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.24.7", "@babel/types@^7.25.0", "@babel/types@^7.25.2", "@babel/types@^7.25.4", "@babel/types@^7.3.3": - version "7.25.4" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.25.4.tgz#6bcb46c72fdf1012a209d016c07f769e10adcb5f" - integrity sha512-zQ1ijeeCXVEh+aNL0RlmkPkG8HUiDcU2pzQQFjtbntgAczRASFzj4H+6+bV+dy1ntKR14I/DypeuRG1uma98iQ== +"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.24.7", "@babel/types@^7.25.0", "@babel/types@^7.25.2", "@babel/types@^7.25.6", "@babel/types@^7.3.3": + version "7.25.6" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.25.6.tgz#893942ddb858f32ae7a004ec9d3a76b3463ef8e6" + integrity sha512-/l42B1qxpG6RdfYf343Uw1vmDjeNhneUXtzhojE7pDgfpEypmRhI6j1kr17XCVv4Cgl9HdAiQY2x0GwKm7rWCw== dependencies: "@babel/helper-string-parser" "^7.24.8" "@babel/helper-validator-identifier" "^7.24.7" @@ -1483,10 +1483,18 @@ chalk "^4.1.2" semver "^7.6.3" -"@jsii/spec@^1.102.0", "@jsii/spec@^1.103.0": - version "1.103.0" - resolved "https://registry.yarnpkg.com/@jsii/spec/-/spec-1.103.0.tgz#a0cfe50d03b773eaa3c57b23e501599ebaf6444e" - integrity sha512-SLKkITTr6d2wSMCC/HITBNLwBcwz6PStV83oZpM98SDtyNHDbpLNlkwS5m8DpmP+ufMqgI6IvgF7iiyrwz8DRg== +"@jsii/check-node@1.103.1": + version "1.103.1" + resolved "https://registry.yarnpkg.com/@jsii/check-node/-/check-node-1.103.1.tgz#6eb9147993b9f035ae1730c5821a75872a5e4928" + integrity sha512-Vi6ONm5WXEim98a2DJ6WMlrP/w5AGzXrrQBpGcfVV7cu86DPx1L0OAZnqzGAJE8ly0VfcSXkmxJ9LFcn3jylBQ== + dependencies: + chalk "^4.1.2" + semver "^7.6.3" + +"@jsii/spec@^1.102.0", "@jsii/spec@^1.103.0", "@jsii/spec@^1.103.1": + version "1.103.1" + resolved "https://registry.yarnpkg.com/@jsii/spec/-/spec-1.103.1.tgz#2f8e61c603238c56d30d26100eb7ee9f51aa35b8" + integrity sha512-14OGYM3DjEBjUOUaih+bwPgkhFnR8L9TSNSM0oE0L0hjWscTapvClqOgMDJ1ID52qkROCAgKl1d71Vmm4v0Buw== dependencies: ajv "^8.17.1" @@ -2179,16 +2187,16 @@ integrity sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag== "@types/node@*": - version "22.5.1" - resolved "https://registry.yarnpkg.com/@types/node/-/node-22.5.1.tgz#de01dce265f6b99ed32b295962045d10b5b99560" - integrity sha512-KkHsxej0j9IW1KKOOAA/XBA0z08UFSrRQHErzEfA3Vgq57eXIMYboIlHJuYIfd+lwCQjtKqUu3UnmKbtUc9yRw== + version "22.5.2" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.5.2.tgz#e42344429702e69e28c839a7e16a8262a8086793" + integrity sha512-acJsPTEqYqulZS/Yp/S3GgeE6GZ0qYODUR8aVr/DkhHQ8l9nd4j5x1/ZJy9/gHrRlFMqkO6i0I3E27Alu4jjPg== dependencies: undici-types "~6.19.2" "@types/node@^18": - version "18.19.47" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.47.tgz#18076201ad7dd3445046df6ce9ead5fe5abd9387" - integrity sha512-1f7dB3BL/bpd9tnDJrrHb66Y+cVrhxSOTGorRNdHwYTUlTay3HuTDPKo9a/4vX9pMQkhYBcAbL4jQdNlhCFP9A== + version "18.19.48" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.48.tgz#3a1696f4a7298d8831ed9ce47db62bf4c62c8880" + integrity sha512-7WevbG4ekUcRQSZzOwxWgi5dZmTak7FaxXDoW7xVxPBmKx1rTzfmRLkeCgJzcbBnOV2dkhAPc8cCeT6agocpjg== dependencies: undici-types "~5.26.4" @@ -2724,9 +2732,9 @@ camelcase@^6.2.0, camelcase@^6.3.0: integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== caniuse-lite@^1.0.30001646: - version "1.0.30001653" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001653.tgz#b8af452f8f33b1c77f122780a4aecebea0caca56" - integrity sha512-XGWQVB8wFQ2+9NZwZ10GxTYC5hk0Fa+q8cSkr0tgvMhYhMHP/QC+WTgrePMDBWiWc/pV+1ik82Al20XOK25Gcw== + version "1.0.30001655" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001655.tgz#0ce881f5a19a2dcfda2ecd927df4d5c1684b982f" + integrity sha512-jRGVy3iSGO5Uutn2owlb5gR6qsGngTw9ZTb4ali9f3glshcNmJ2noam4Mo9zia5P9Dk3jNNydy7vQjuE5dQmfg== case@1.6.3, case@^1.6.3: version "1.6.3" @@ -2836,10 +2844,10 @@ co@^4.6.0: resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" integrity sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ== -codemaker@^1.103.0: - version "1.103.0" - resolved "https://registry.yarnpkg.com/codemaker/-/codemaker-1.103.0.tgz#96a89763010a97a69b89fa29d6a382a169126692" - integrity sha512-QNJkfWt5TFkSsjzVyG20+DxX3B8+h+8xewHxs+am9kU/AMpAbFD35LlhzFfZwBVVuRG1gZGi9dkDmZvT7auHOA== +codemaker@^1.103.1: + version "1.103.1" + resolved "https://registry.yarnpkg.com/codemaker/-/codemaker-1.103.1.tgz#93426532883633081104651dd5aa0f4dffdaea92" + integrity sha512-y3Ru0bZV6qiuPAt8c/Hik1dCI0dVb6lj/6gAIWckvNYVu5FS51avr3FU/mRtuPrY3b1bW/EA0pszGB/P54Bl5A== dependencies: camelcase "^6.3.0" decamelize "^5.0.1" @@ -3572,9 +3580,9 @@ es-to-primitive@^1.2.1: is-symbol "^1.0.2" escalade@^3.1.1, escalade@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.2.tgz#54076e9ab29ea5bf3d8f1ed62acffbb88272df27" - integrity sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA== + version "3.2.0" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.2.0.tgz#011a3f69856ba189dffa7dc8fcce99d2a87903e5" + integrity sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA== escape-string-regexp@^1.0.5: version "1.0.5" @@ -4079,9 +4087,9 @@ get-symbol-description@^1.0.2: get-intrinsic "^1.2.4" get-tsconfig@^4.7.5: - version "4.7.6" - resolved "https://registry.yarnpkg.com/get-tsconfig/-/get-tsconfig-4.7.6.tgz#118fd5b7b9bae234cc7705a00cd771d7eb65d62a" - integrity sha512-ZAqrLlu18NbDdRaHq+AKXzAmqIUPswPWKUchfytdAjiRFnCe5ojG2bstg6mRiZabkKfCoL/e98pbBELIV/YCeA== + version "4.8.0" + resolved "https://registry.yarnpkg.com/get-tsconfig/-/get-tsconfig-4.8.0.tgz#125dc13a316f61650a12b20c97c11b8fd996fedd" + integrity sha512-Pgba6TExTZ0FJAn1qkJAjIeKoDJ3CsI2ChuLohJnZl/tTU8MVrq3b+2t5UOPfRa4RMsorClBjJALkJUMjG1PAw== dependencies: resolve-pkg-maps "^1.0.0" @@ -5148,52 +5156,52 @@ jsesc@^2.5.1: resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== -jsii-diff@^1.103.0: - version "1.103.0" - resolved "https://registry.yarnpkg.com/jsii-diff/-/jsii-diff-1.103.0.tgz#e55ced64d0eec788c7b2a49e356c68148e5ebe41" - integrity sha512-a2ZE35jNs7urCd9a90w58e2gpWF73Q3+gOJ/p7m4Ti8OdBEhrS/u7D1sv1DAeCuskIiPs4o8/p/KJfMKqJoXbA== +jsii-diff@^1.103.1: + version "1.103.1" + resolved "https://registry.yarnpkg.com/jsii-diff/-/jsii-diff-1.103.1.tgz#bf5feaccfdc0cf562b2e82011234c18952d52cb3" + integrity sha512-JceGFJkOsTEFjtubTsDTDIw+3PrAVx0lpUtHSvFUZ+aeFYpnbWLcOGcX7vuxwnvZO2oDbm7qE+ymmov53exKqQ== dependencies: - "@jsii/check-node" "1.103.0" - "@jsii/spec" "^1.103.0" + "@jsii/check-node" "1.103.1" + "@jsii/spec" "^1.103.1" fs-extra "^10.1.0" - jsii-reflect "^1.103.0" + jsii-reflect "^1.103.1" log4js "^6.9.1" yargs "^16.2.0" -jsii-pacmak@^1.103.0: - version "1.103.0" - resolved "https://registry.yarnpkg.com/jsii-pacmak/-/jsii-pacmak-1.103.0.tgz#9fd384578e00f0a66cf99959e2cf2de004271bde" - integrity sha512-UKHSky0Lt6v+effaK2e87ga0QC47/r1RS2V1tMhd0zIBjIB+8AV+Jq5fHwRTf1FFwr+Nrm7pzDn/UZyDBLGecw== +jsii-pacmak@^1.103.1: + version "1.103.1" + resolved "https://registry.yarnpkg.com/jsii-pacmak/-/jsii-pacmak-1.103.1.tgz#e734b52d91e8831fed36de9b49840981b55c6b76" + integrity sha512-2zzm/OYsdbxcaYuq4n0o2lQAPQ5Fo+T+sQJPGFeMXD0kgDZTNqXv21FdsKBKuQ/DutxTATOaZ7gTXEDK1n7/RQ== dependencies: - "@jsii/check-node" "1.103.0" - "@jsii/spec" "^1.103.0" + "@jsii/check-node" "1.103.1" + "@jsii/spec" "^1.103.1" clone "^2.1.2" - codemaker "^1.103.0" + codemaker "^1.103.1" commonmark "^0.31.1" escape-string-regexp "^4.0.0" fs-extra "^10.1.0" - jsii-reflect "^1.103.0" + jsii-reflect "^1.103.1" semver "^7.6.3" spdx-license-list "^6.9.0" xmlbuilder "^15.1.1" yargs "^16.2.0" -jsii-reflect@^1.103.0: - version "1.103.0" - resolved "https://registry.yarnpkg.com/jsii-reflect/-/jsii-reflect-1.103.0.tgz#4390b3d6d3ac1ab79f58f8663f4e083b56099b8f" - integrity sha512-L6sV0zVWDvlMbNY6vFmtfZsmMHHtd+TlefP+R/8y6puZf2eA+rh5W9SpmX+q1xHwZ7ohRsXt9S7nONiEgv7F3g== +jsii-reflect@^1.103.1: + version "1.103.1" + resolved "https://registry.yarnpkg.com/jsii-reflect/-/jsii-reflect-1.103.1.tgz#486ea9077a20ac244d0127c08388c2bf33de4f03" + integrity sha512-kFm09KL9dlxyxesf7mtm12+4vVaRin5YI4Eca2OOa0X28HNVpr62/n21T3BuAAhFaI0nkiUoJuBWtdOz475BSQ== dependencies: - "@jsii/check-node" "1.103.0" - "@jsii/spec" "^1.103.0" + "@jsii/check-node" "1.103.1" + "@jsii/spec" "^1.103.1" chalk "^4" fs-extra "^10.1.0" - oo-ascii-tree "^1.103.0" + oo-ascii-tree "^1.103.1" yargs "^16.2.0" jsii-rosetta@~5.4.0: - version "5.4.34" - resolved "https://registry.yarnpkg.com/jsii-rosetta/-/jsii-rosetta-5.4.34.tgz#660caaf25cff0c550ef6609a02625e9c5a17a911" - integrity sha512-5pUVuDeGtD0FYArthBBoTmZmdlH8zu1qYDHXF3aYBuWfDm86PMQGTRvKZYH/r8C4A3/u6Y/OR36+6lzgDS2Ixg== + version "5.4.35" + resolved "https://registry.yarnpkg.com/jsii-rosetta/-/jsii-rosetta-5.4.35.tgz#16a477118acdf40dcd8b073e21b44a3f6188bd9f" + integrity sha512-uz3+nnFxdSvpqUwdSzpEjOfFZQ5gFdyTvfb+PylvrQnF8/y7bMmYa0sJV09sF8UHMij0iYnuS00WpepG92/R/g== dependencies: "@jsii/check-node" "1.103.0" "@jsii/spec" "^1.103.0" @@ -5791,10 +5799,10 @@ onetime@^6.0.0: dependencies: mimic-fn "^4.0.0" -oo-ascii-tree@^1.103.0: - version "1.103.0" - resolved "https://registry.yarnpkg.com/oo-ascii-tree/-/oo-ascii-tree-1.103.0.tgz#1eab948ba57e591d2ad98e646d2a61f49604195c" - integrity sha512-gpweHwaD2QwZ8AZtQraM3vIZ9sd+yGQOxBORonvo5Yq3mqcGEU05RcjPikrsDyq1Clkuyhf4qfWBzCwwEjT6yA== +oo-ascii-tree@^1.103.1: + version "1.103.1" + resolved "https://registry.yarnpkg.com/oo-ascii-tree/-/oo-ascii-tree-1.103.1.tgz#74d498282d7027dc3be15d78d87e52875ebaedce" + integrity sha512-X0nmbb8xUUi637JXzCxY/K4AtO/I0fB5b7iiGaHJHu8IXBWV8TnQ4xqa0Igb/NoAg3OP2uXNhSeiTsErETOA/g== optionator@^0.9.3: version "0.9.4" @@ -6048,10 +6056,10 @@ process-nextick-args@~2.0.0: resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== -projen@^0.86.5: - version "0.86.5" - resolved "https://registry.yarnpkg.com/projen/-/projen-0.86.5.tgz#86c7a45b4a058ba699111ba88af5bf989c9bdb70" - integrity sha512-JVckfyzjFQ46MdHjowslWWNH309A5kxYrpCIkobRTsB1F2KFiiESenjnS+vyWGML9NcfDIw6UIMRNYD6enuTIQ== +projen@^0.86.6: + version "0.86.6" + resolved "https://registry.yarnpkg.com/projen/-/projen-0.86.6.tgz#65943163283a291fedbd61c53a9c3cbd21c109dd" + integrity sha512-UBDdUrNku6y4fTx++YXVMi9NqaaWOUzEAzPVSVtUkOdW0itV7YfE9GxXRbVrM8gB+b3doem1o1kdddaEkfsuDw== dependencies: "@iarna/toml" "^2.2.5" case "^1.6.3" @@ -6999,9 +7007,9 @@ typescript@^5.5.4: integrity sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q== typescript@next: - version "5.7.0-dev.20240829" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.7.0-dev.20240829.tgz#504599e4c39500f39bc8414461706060dd9a33c9" - integrity sha512-F9kcFC/YWjYhecieA4GmXEu8IDrRtfONo3Pw61UZb9aQYDhbrfqpoz5ixfEt6O9rrSFvzdh1i0o1MRY2Bt/BLg== + version "5.7.0-dev.20240902" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.7.0-dev.20240902.tgz#7972ff7e6b46fe601db5094bc3fa8aa4c2b5e605" + integrity sha512-IXcRYw/MfjNJlBlU1pnOWK4oM3MkpUPXy8MVe0I0F4nhv/sRAPBAvCWDAc1687B3rUZ1RUlFUhRbQhypb15IoA== typescript@~5.4: version "5.4.5" @@ -7009,9 +7017,9 @@ typescript@~5.4: integrity sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ== uglify-js@^3.1.4: - version "3.19.2" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.19.2.tgz#319ae26a5fbd18d03c7dc02496cfa1d6f1cd4307" - integrity sha512-S8KA6DDI47nQXJSi2ctQ629YzwOVs+bQML6DAtvy0wgNdpi+0ySpQK0g2pxBq2xfF2z3YCscu7NNA8nXT9PlIQ== + version "3.19.3" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.19.3.tgz#82315e9bbc6f2b25888858acd1fff8441035b77f" + integrity sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ== unbox-primitive@^1.0.2: version "1.0.2"