Repository: eladb/projen Branch: main Commit: cddd4d13b563 Files: 407 Total size: 4.6 MB Directory structure: gitextract_rzfgxmkm/ ├── .all-contributorsrc ├── .devcontainer.json ├── .eslintrc.json ├── .gitattributes ├── .github/ │ ├── pull_request_template.md │ └── workflows/ │ ├── auto-approve.yml │ ├── build.yml │ ├── pull-request-lint.yml │ ├── release.yml │ └── upgrade-main.yml ├── .gitignore ├── .gitpod.yml ├── .markdownlint.json ├── .mergify.yml ├── .npmignore ├── .prettierignore ├── .prettierrc.json ├── .projen/ │ ├── deps.json │ ├── files.json │ └── tasks.json ├── .projenrc.js ├── .vscode/ │ └── launch.json ├── ARCHITECTURE.md ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── SECURITY.md ├── VISION.md ├── assets/ │ └── web/ │ └── react/ │ ├── index.html │ ├── manifest.json │ └── robots.txt ├── bin/ │ └── projen ├── docs/ │ ├── CNAME │ ├── README.md │ ├── api/ │ │ └── API.md │ ├── awscdk-apps.md │ ├── awscdk-construct.md │ ├── awscdk.md │ ├── build.md │ ├── bundling.md │ ├── cdk8s.md │ ├── circleci.md │ ├── components.md │ ├── deps.md │ ├── eject.md │ ├── escape-hatches.md │ ├── github.md │ ├── gitlab.md │ ├── java.md │ ├── node.md │ ├── programmatic-api.md │ ├── publisher.md │ ├── python.md │ ├── releases.md │ ├── subproject.md │ ├── tasks.md │ └── typescript.md ├── license-text/ │ ├── Apache-2.0.txt │ ├── Artistic-1.0.txt │ ├── Artistic-2.0.txt │ ├── EUPL-1.2.txt │ ├── GPL-2.0-or-later.txt │ ├── GPL-3.0-WITH-GCC-exception-3.1.txt │ ├── GPL-3.0-or-later.txt │ ├── LGPL-2.1-or-later.txt │ ├── LGPL-3.0-or-later.txt │ ├── MIT-0.txt │ ├── MIT.txt │ ├── MPL-2.0.txt │ ├── OFL-1.1.txt │ ├── PHP-3.01.txt │ ├── Ruby.txt │ ├── Unlicense.txt │ ├── WTFPL.txt │ └── ZPL-2.1.txt ├── package.json ├── projen.bash ├── rfcs/ │ ├── github-project-settings.md │ └── project-creation-prompt.md ├── scripts/ │ ├── python-compat.sh │ └── readme-projects.js ├── src/ │ ├── _resolve.ts │ ├── awscdk/ │ │ ├── auto-discover.ts │ │ ├── awscdk-app-java.ts │ │ ├── awscdk-app-py.ts │ │ ├── awscdk-app-ts.ts │ │ ├── awscdk-construct.ts │ │ ├── awscdk-deps-java.ts │ │ ├── awscdk-deps-js.ts │ │ ├── awscdk-deps-py.ts │ │ ├── awscdk-deps.ts │ │ ├── awscdk-pytest-sample.ts │ │ ├── cdk-config.ts │ │ ├── cdk-tasks.ts │ │ ├── index.ts │ │ ├── integration-test.ts │ │ ├── internal.ts │ │ ├── lambda-extension.ts │ │ └── lambda-function.ts │ ├── build/ │ │ ├── build-workflow.ts │ │ └── index.ts │ ├── builtin-example.task.ts │ ├── cdk/ │ │ ├── auto-discover-base.ts │ │ ├── construct-lib.ts │ │ ├── consts.ts │ │ ├── index.ts │ │ ├── integration-test-base.ts │ │ ├── internal.ts │ │ ├── jsii-docgen.ts │ │ └── jsii-project.ts │ ├── cdk8s/ │ │ ├── auto-discover.ts │ │ ├── cdk8s-app-py.ts │ │ ├── cdk8s-app-ts.ts │ │ ├── cdk8s-construct.ts │ │ ├── cdk8s-deps-js.ts │ │ ├── cdk8s-deps-py.ts │ │ ├── cdk8s-deps.ts │ │ ├── index.ts │ │ └── integration-test.ts │ ├── cdktf/ │ │ ├── cdktf-construct.ts │ │ └── index.ts │ ├── circleci/ │ │ ├── circleci.ts │ │ ├── constant.ts │ │ ├── index.ts │ │ └── model.ts │ ├── cleanup.ts │ ├── cli/ │ │ ├── cmds/ │ │ │ └── new.ts │ │ ├── index.ts │ │ ├── macros.ts │ │ ├── synth.ts │ │ ├── tasks.ts │ │ └── util.ts │ ├── clobber.ts │ ├── common.ts │ ├── component.ts │ ├── dependencies.ts │ ├── dev-env.ts │ ├── docker-compose.ts │ ├── file.ts │ ├── gitattributes.ts │ ├── github/ │ │ ├── auto-approve.ts │ │ ├── auto-merge.ts │ │ ├── constants.ts │ │ ├── dependabot.ts │ │ ├── github-credentials.ts │ │ ├── github-project.ts │ │ ├── github.ts │ │ ├── index.ts │ │ ├── mergify.ts │ │ ├── pr-template.ts │ │ ├── pull-request-lint.ts │ │ ├── stale-util.ts │ │ ├── stale.ts │ │ ├── task-workflow.ts │ │ ├── util.ts │ │ ├── workflow-actions.ts │ │ ├── workflows-model.ts │ │ └── workflows.ts │ ├── gitlab/ │ │ ├── configuration-model.ts │ │ ├── configuration.ts │ │ ├── gitlab-configuration.ts │ │ ├── index.ts │ │ └── nested-configuration.ts │ ├── gitpod.ts │ ├── ignore-file.ts │ ├── index.ts │ ├── ini.ts │ ├── inventory.ts │ ├── java/ │ │ ├── index.ts │ │ ├── java-project.ts │ │ ├── junit.ts │ │ ├── maven-compile.ts │ │ ├── maven-packaging.ts │ │ ├── maven-sample.ts │ │ ├── pom.ts │ │ └── projenrc.ts │ ├── javascript/ │ │ ├── bundler.ts │ │ ├── eslint.ts │ │ ├── index.ts │ │ ├── jest.ts │ │ ├── node-package.ts │ │ ├── node-project.ts │ │ ├── npm-config.ts │ │ ├── prettier.ts │ │ ├── projenrc.ts │ │ ├── render-options.ts │ │ ├── typescript-config.ts │ │ ├── upgrade-dependencies.ts │ │ └── util.ts │ ├── json-patch.ts │ ├── json.ts │ ├── license.ts │ ├── logger.ts │ ├── logging.ts │ ├── makefile.ts │ ├── object-file.ts │ ├── option-hints.ts │ ├── project-build.ts │ ├── project.ts │ ├── projects.ts │ ├── projenrc-json.ts │ ├── python/ │ │ ├── index.ts │ │ ├── pip.ts │ │ ├── poetry.ts │ │ ├── projenrc.ts │ │ ├── pytest-sample.ts │ │ ├── pytest.ts │ │ ├── python-deps.ts │ │ ├── python-env.ts │ │ ├── python-packaging.ts │ │ ├── python-project.ts │ │ ├── python-sample.ts │ │ ├── requirements-file.ts │ │ ├── setuppy.ts │ │ ├── setuptools.ts │ │ └── venv.ts │ ├── readme.ts │ ├── release/ │ │ ├── bump-version.task.ts │ │ ├── bump-version.ts │ │ ├── index.ts │ │ ├── publisher.ts │ │ ├── release-trigger.ts │ │ ├── release.ts │ │ ├── reset-version.task.ts │ │ ├── tag-version.task.ts │ │ ├── tag-version.ts │ │ ├── update-changelog.task.ts │ │ └── update-changelog.ts │ ├── renovatebot.ts │ ├── run-projenrc-json.task.ts │ ├── sample-file.ts │ ├── semver.ts │ ├── smithy/ │ │ └── smithy-build.ts │ ├── source-code.ts │ ├── task-model.ts │ ├── task-runtime.ts │ ├── task.ts │ ├── tasks.ts │ ├── testing.ts │ ├── textfile.ts │ ├── toml.ts │ ├── typescript/ │ │ ├── index.ts │ │ ├── projenrc.ts │ │ ├── typescript-typedoc.ts │ │ └── typescript.ts │ ├── util/ │ │ ├── semver.ts │ │ └── synth.ts │ ├── util.ts │ ├── version.ts │ ├── vscode/ │ │ ├── devcontainer.ts │ │ ├── extensions.ts │ │ ├── index.ts │ │ ├── launch-config.ts │ │ ├── settings.ts │ │ └── vscode.ts │ ├── web/ │ │ ├── index.ts │ │ ├── next.ts │ │ ├── postcss.ts │ │ ├── react.ts │ │ └── tailwind.ts │ ├── xmlfile.ts │ └── yaml.ts ├── test/ │ ├── __snapshots__/ │ │ ├── cleanup.test.ts.snap │ │ ├── cli.test.ts.snap │ │ ├── deps.test.ts.snap │ │ ├── integ.test.ts.snap │ │ ├── inventory.test.ts.snap │ │ ├── license.test.ts.snap │ │ ├── new.test.ts.snap │ │ ├── project.test.ts.snap │ │ ├── projects.test.ts.snap │ │ └── xml.test.ts.snap │ ├── awscdk/ │ │ ├── __snapshots__/ │ │ │ ├── integration-test.test.ts.snap │ │ │ ├── java-app.test.ts.snap │ │ │ ├── lambda-extension.test.ts.snap │ │ │ ├── lambda-function.test.ts.snap │ │ │ └── python-app.test.ts.snap │ │ ├── awscdk-app.test.ts │ │ ├── awscdk-construct.test.ts │ │ ├── cdk-config.test.ts │ │ ├── integration-test.test.ts │ │ ├── java-app.test.ts │ │ ├── lambda-extension.test.ts │ │ ├── lambda-function.test.ts │ │ └── python-app.test.ts │ ├── cdk/ │ │ ├── __snapshots__/ │ │ │ └── jsii.test.ts.snap │ │ ├── auto-discover-base.test.ts │ │ ├── jsii.test.ts │ │ └── testtree/ │ │ └── abc.myext.ts │ ├── cdk8s/ │ │ ├── __snapshots__/ │ │ │ └── integration-test.test.ts.snap │ │ ├── cdk8s-app-project-py.test.ts │ │ ├── cdk8s-app-project-ts.test.ts │ │ ├── cdk8s-construct.test.ts │ │ └── integration-test.test.ts │ ├── cdktf/ │ │ └── cdktf-construct.test.ts │ ├── cirlceci/ │ │ ├── __snapshots__/ │ │ │ └── circleci.test.ts.snap │ │ └── circleci.test.ts │ ├── cleanup.test.ts │ ├── cli.test.ts │ ├── deps.test.ts │ ├── docker-compose.test.ts │ ├── github/ │ │ ├── __snapshots__/ │ │ │ ├── auto-approve.test.ts.snap │ │ │ ├── dependabot.test.ts.snap │ │ │ ├── github-workflow.test.ts.snap │ │ │ ├── mergify.test.ts.snap │ │ │ ├── pull-request-lint.test.ts.snap │ │ │ ├── stale.test.ts.snap │ │ │ ├── task-workflow.test.ts.snap │ │ │ └── workflows.test.ts.snap │ │ ├── auto-approve.test.ts │ │ ├── dependabot.test.ts │ │ ├── github-workflow.test.ts │ │ ├── mergify.test.ts │ │ ├── pull-request-lint.test.ts │ │ ├── stale.test.ts │ │ ├── task-workflow.test.ts │ │ └── workflows.test.ts │ ├── gitlab/ │ │ ├── __snapshots__/ │ │ │ └── configuration.test.ts.snap │ │ ├── configuration.test.ts │ │ └── gitlab-configuration.test.ts │ ├── ignore-file.test.ts │ ├── ini.test.ts │ ├── integ.test.ts │ ├── integration/ │ │ ├── cdk-watchful.projenrc.js │ │ ├── cdk8s/ │ │ │ ├── cdk8s-cli.projenrc.js │ │ │ ├── cdk8s.common.js │ │ │ └── cdk8s.projenrc.js │ │ └── pnpm.projenrc.js │ ├── inventory/ │ │ ├── gzip_compression/ │ │ │ └── .jsii │ │ └── no_compression/ │ │ └── .jsii │ ├── inventory.test.ts │ ├── java/ │ │ ├── __snapshots__/ │ │ │ ├── java-project.test.ts.snap │ │ │ ├── pom.test.ts.snap │ │ │ └── projenrc.test.ts.snap │ │ ├── java-project.test.ts │ │ ├── pom.test.ts │ │ └── projenrc.test.ts │ ├── javascript/ │ │ ├── __snapshots__/ │ │ │ ├── eslint.test.ts.snap │ │ │ ├── node-package.test.ts.snap │ │ │ ├── node-project.test.ts.snap │ │ │ ├── npm-config.test.ts.snap │ │ │ ├── prettier.test.ts.snap │ │ │ └── upgrade-dependencies.test.ts.snap │ │ ├── bundler.test.ts │ │ ├── eslint.test.ts │ │ ├── jest.test.ts │ │ ├── node-package.test.ts │ │ ├── node-project.test.ts │ │ ├── npm-config.test.ts │ │ ├── prettier.test.ts │ │ └── upgrade-dependencies.test.ts │ ├── json/ │ │ ├── __snapshots__/ │ │ │ └── projenrc.test.ts.snap │ │ └── projenrc.test.ts │ ├── json.test.ts │ ├── license.test.ts │ ├── makefile.test.ts │ ├── new.test.ts │ ├── object-file.test.ts │ ├── pr-template.test.ts │ ├── project.test.ts │ ├── projects.test.ts │ ├── python/ │ │ ├── __snapshots__/ │ │ │ ├── poetry.test.ts.snap │ │ │ ├── projenrc.test.ts.snap │ │ │ └── python-project.test.ts.snap │ │ ├── poetry.test.ts │ │ ├── projenrc.test.ts │ │ ├── python-project.test.ts │ │ └── setuptools.test.ts │ ├── readme.test.ts │ ├── release/ │ │ ├── __snapshots__/ │ │ │ └── release.test.ts.snap │ │ ├── bump.test.ts │ │ ├── release-trigger.test.ts │ │ ├── release.test.ts │ │ ├── tag.test.ts │ │ └── update-changelog.test.ts │ ├── resolve.test.ts │ ├── sample-file.test.ts │ ├── smithy/ │ │ └── smithy-build.test.ts │ ├── source-code.test.ts │ ├── subproject.test.ts │ ├── tasks/ │ │ ├── __snapshots__/ │ │ │ └── tasks.test.ts.snap │ │ ├── runtime.test.ts │ │ └── tasks.test.ts │ ├── textfile.test.ts │ ├── toml.test.ts │ ├── typescript/ │ │ ├── __snapshots__/ │ │ │ └── typescript.test.ts.snap │ │ └── typescript.test.ts │ ├── util.test.ts │ ├── util.ts │ ├── vscode/ │ │ ├── __snapshots__/ │ │ │ └── dev-env.test.ts.snap │ │ ├── dev-env.test.ts │ │ ├── extensions.test.ts │ │ ├── settings.test.ts │ │ └── vscode-launch-config.test.ts │ ├── web/ │ │ ├── __snapshots__/ │ │ │ ├── nextjs-project.test.ts.snap │ │ │ ├── nextjs-ts-project.test.ts.snap │ │ │ ├── react-project.test.ts.snap │ │ │ └── react-ts-project.test.ts.snap │ │ ├── nextjs-project.test.ts │ │ ├── nextjs-ts-project.test.ts │ │ ├── react-project.test.ts │ │ └── react-ts-project.test.ts │ ├── xml.test.ts │ └── yaml.test.ts ├── tsconfig.dev.json └── version.json ================================================ FILE CONTENTS ================================================ ================================================ FILE: .all-contributorsrc ================================================ { "projectName": "projen", "projectOwner": "projen", "repoType": "github", "repoHost": "https://github.com", "files": [ "README.md" ], "imageSize": 100, "commit": false, "commitConvention": "angular", "contributors": [ { "login": "eladb", "name": "Elad Ben-Israel", "avatar_url": "https://avatars3.githubusercontent.com/u/598796?v=4", "profile": "http://eladb.github.com/", "contributions": [ "code" ] }, { "login": "Chriscbr", "name": "Christopher Rybicki", "avatar_url": "https://avatars2.githubusercontent.com/u/5008987?v=4", "profile": "https://rybicki.io/", "contributions": [ "code" ] }, { "login": "pgollucci", "name": "Philip M. Gollucci", "avatar_url": "https://avatars0.githubusercontent.com/u/34295?v=4", "profile": "http://p6m7g8.github.io/", "contributions": [ "code" ] }, { "login": "hoegertn", "name": "Thorsten Hoeger", "avatar_url": "https://avatars2.githubusercontent.com/u/1287829?v=4", "profile": "https://github.com/hoegertn", "contributions": [ "code" ] }, { "login": "kcwinner", "name": "Kenneth Winner", "avatar_url": "https://avatars3.githubusercontent.com/u/2728868?v=4", "profile": "https://github.com/kcwinner", "contributions": [ "code" ] }, { "login": "JordanSinko", "name": "Jordan Sinko", "avatar_url": "https://avatars2.githubusercontent.com/u/10212966?v=4", "profile": "https://github.com/JordanSinko", "contributions": [ "code" ] }, { "login": "misterjoshua", "name": "Josh Kellendonk", "avatar_url": "https://avatars2.githubusercontent.com/u/644092?v=4", "profile": "https://github.com/misterjoshua", "contributions": [ "code" ] }, { "login": "andrestone", "name": "andrestone", "avatar_url": "https://avatars1.githubusercontent.com/u/7958086?v=4", "profile": "https://github.com/andrestone", "contributions": [ "code" ] }, { "login": "skyrpex", "name": "Cristian Pallarés", "avatar_url": "https://avatars3.githubusercontent.com/u/1077520?v=4", "profile": "https://pallares.io/", "contributions": [ "code" ] }, { "login": "jogold", "name": "Jonathan Goldwasser", "avatar_url": "https://avatars2.githubusercontent.com/u/12623249?v=4", "profile": "https://github.com/jogold", "contributions": [ "code" ] }, { "login": "mbonig", "name": "Matthew Bonig", "avatar_url": "https://avatars2.githubusercontent.com/u/1559437?v=4", "profile": "http://www.matthewbonig.com/", "contributions": [ "code" ] }, { "login": "pahud", "name": "Pahud Hsieh", "avatar_url": "https://avatars3.githubusercontent.com/u/278432?v=4", "profile": "https://github.com/pahud", "contributions": [ "code" ] }, { "login": "adamelmore", "name": "Adam Elmore", "avatar_url": "https://avatars2.githubusercontent.com/u/2363879?v=4", "profile": "https://github.com/adamelmore", "contributions": [ "code" ] }, { "login": "abelmokadem", "name": "Ash", "avatar_url": "https://avatars0.githubusercontent.com/u/9717944?v=4", "profile": "https://github.com/abelmokadem", "contributions": [ "code" ] }, { "login": "jmourelos", "name": "Jacob", "avatar_url": "https://avatars3.githubusercontent.com/u/3878434?v=4", "profile": "https://github.com/jmourelos", "contributions": [ "code" ] }, { "login": "bigkraig", "name": "Kraig Amador", "avatar_url": "https://avatars1.githubusercontent.com/u/508403?v=4", "profile": "https://github.com/bigkraig", "contributions": [ "code" ] }, { "login": "mmuller88", "name": "Martin Muller", "avatar_url": "https://avatars0.githubusercontent.com/u/18393842?v=4", "profile": "https://github.com/mmuller88", "contributions": [ "code" ] }, { "login": "tlakomy", "name": "Tomasz Łakomy", "avatar_url": "https://avatars2.githubusercontent.com/u/16646517?v=4", "profile": "https://tlakomy.com/", "contributions": [ "code" ] }, { "login": "john-tipper", "name": "john-tipper", "avatar_url": "https://avatars2.githubusercontent.com/u/9730398?v=4", "profile": "https://github.com/john-tipper", "contributions": [ "code" ] }, { "login": "henrysachs", "name": "Henry Sachs", "avatar_url": "https://avatars0.githubusercontent.com/u/17173951?v=4", "profile": "https://github.com/henrysachs", "contributions": [ "code" ] }, { "login": "eganjs", "name": "Joseph Egan", "avatar_url": "https://avatars3.githubusercontent.com/u/6639482?v=4", "profile": "https://github.com/eganjs", "contributions": [ "code" ] }, { "login": "skorfmann", "name": "Sebastian Korfmann", "avatar_url": "https://avatars1.githubusercontent.com/u/136789?v=4", "profile": "https://skorfmann.com/", "contributions": [ "code" ] }, { "login": "bartcallant", "name": "Bart Callant", "avatar_url": "https://avatars1.githubusercontent.com/u/5915843?v=4", "profile": "http://www.callant.net/", "contributions": [ "code" ] }, { "login": "campionfellin", "name": "Campion Fellin", "avatar_url": "https://avatars3.githubusercontent.com/u/11984923?v=4", "profile": "https://github.com/campionfellin", "contributions": [ "code" ] }, { "login": "gradybarrett", "name": "Grady Barrett", "avatar_url": "https://avatars1.githubusercontent.com/u/1140074?v=4", "profile": "https://github.com/gradybarrett", "contributions": [ "code" ] }, { "login": "HassanMahmud", "name": "Hassan Mahmud", "avatar_url": "https://avatars3.githubusercontent.com/u/58504381?v=4", "profile": "https://github.com/HassanMahmud", "contributions": [ "code" ] }, { "login": "hass123uk", "name": "Hassan Mahmud", "avatar_url": "https://avatars1.githubusercontent.com/u/7426703?v=4", "profile": "https://dk.linkedin.com/in/hassanmahmud93", "contributions": [ "code" ] }, { "login": "jakepearson", "name": "Jake Pearson", "avatar_url": "https://avatars3.githubusercontent.com/u/325306?v=4", "profile": "http://joapy.com/", "contributions": [ "code" ] }, { "login": "JeremyJonas", "name": "Jeremy Jonas", "avatar_url": "https://avatars1.githubusercontent.com/u/464119?v=4", "profile": "https://github.com/JeremyJonas", "contributions": [ "code" ] }, { "login": "martzcodes", "name": "Matt Martz", "avatar_url": "https://avatars1.githubusercontent.com/u/978362?v=4", "profile": "https://dev.to/martzcodes", "contributions": [ "code" ] }, { "login": "fongie", "name": "Max Körlinge", "avatar_url": "https://avatars1.githubusercontent.com/u/19932622?v=4", "profile": "https://github.com/fongie", "contributions": [ "code" ] }, { "login": "guan840912", "name": "Neil Kuan", "avatar_url": "https://avatars2.githubusercontent.com/u/46012524?v=4", "profile": "https://blog.neilkuan.dev/", "contributions": [ "code" ] }, { "login": "RafalWilinski", "name": "Rafal Wilinski", "avatar_url": "https://avatars3.githubusercontent.com/u/3391616?v=4", "profile": "https://dynobase.dev/", "contributions": [ "code" ] }, { "login": "RomainMuller", "name": "Romain Marcadier", "avatar_url": "https://avatars2.githubusercontent.com/u/411689?v=4", "profile": "https://keybase.io/romainmuller", "contributions": [ "code" ] }, { "login": "thomasklinger1234", "name": "Thomas Klinger", "avatar_url": "https://avatars1.githubusercontent.com/u/39558817?v=4", "profile": "https://github.com/thomasklinger1234", "contributions": [ "code" ] }, { "login": "gwriss", "name": "Tobias", "avatar_url": "https://avatars2.githubusercontent.com/u/1842089?v=4", "profile": "https://github.com/gwriss", "contributions": [ "code" ] }, { "login": "flyingImer", "name": "flyingImer", "avatar_url": "https://avatars0.githubusercontent.com/u/1973868?v=4", "profile": "https://github.com/flyingImer", "contributions": [ "code" ] }, { "login": "Hunter-Thompson", "name": " Aatman ", "avatar_url": "https://avatars.githubusercontent.com/u/20844961?v=4", "profile": "https://github.com/Hunter-Thompson", "contributions": [ "code" ] }, { "login": "mmcculloh-dms", "name": "Mark McCulloh", "avatar_url": "https://avatars.githubusercontent.com/u/68597641?v=4", "profile": "https://github.com/mmcculloh-dms", "contributions": [ "code" ] }, { "login": "aisamu", "name": "Samuel Tschiedel", "avatar_url": "https://avatars.githubusercontent.com/u/431708?v=4", "profile": "https://github.com/aisamu", "contributions": [ "code" ] }, { "login": "iliapolo", "name": "Eli Polonsky", "avatar_url": "https://avatars.githubusercontent.com/u/1428812?v=4", "profile": "https://github.com/iliapolo", "contributions": [ "code" ] }, { "login": "Miradorn", "name": "Alexander Steppke", "avatar_url": "https://avatars.githubusercontent.com/u/1308885?v=4", "profile": "https://unsubstantiated.blog/", "contributions": [ "code" ] }, { "login": "kanatti", "name": "Balagopal Kanattil", "avatar_url": "https://avatars.githubusercontent.com/u/8623654?v=4", "profile": "https://github.com/kanatti", "contributions": [ "code" ] }, { "login": "bracki", "name": "Jan Brauer", "avatar_url": "https://avatars.githubusercontent.com/u/49786?v=4", "profile": "http://twitter.com/bracki", "contributions": [ "code" ] }, { "login": "polothy", "name": "Mark Nielsen", "avatar_url": "https://avatars.githubusercontent.com/u/634657?v=4", "profile": "https://polothy.github.io/", "contributions": [ "code" ] }, { "login": "MrArnoldPalmer", "name": "Mitchell Valine", "avatar_url": "https://avatars.githubusercontent.com/u/7221111?v=4", "profile": "https://github.com/MrArnoldPalmer", "contributions": [ "code" ] }, { "login": "neilkuan", "name": "Neil Kuan", "avatar_url": "https://avatars.githubusercontent.com/u/46012524?v=4", "profile": "https://blog.neilkuan.net/", "contributions": [ "code" ] }, { "login": "pgarbe", "name": "Philipp Garbe", "avatar_url": "https://avatars.githubusercontent.com/u/721899?v=4", "profile": "https://garbe.io/", "contributions": [ "code" ] }, { "login": "smacintyre", "name": "Shawn MacIntyre", "avatar_url": "https://avatars.githubusercontent.com/u/361689?v=4", "profile": "https://selfstructured.com/", "contributions": [ "code" ] }, { "login": "tobias-bardino", "name": "Tobias", "avatar_url": "https://avatars.githubusercontent.com/u/1842089?v=4", "profile": "https://github.com/tobias-bardino", "contributions": [ "code" ] }, { "login": "yglcode", "name": "Yigong Liu", "avatar_url": "https://avatars.githubusercontent.com/u/11893614?v=4", "profile": "https://github.com/yglcode", "contributions": [ "code" ] }, { "login": "eduardomourar", "name": "Eduardo Rodrigues", "avatar_url": "https://avatars.githubusercontent.com/u/16357187?v=4", "profile": "https://github.com/eduardomourar", "contributions": [ "code" ] }, { "login": "hassanazharkhan", "name": "Hassan Azhar", "avatar_url": "https://avatars.githubusercontent.com/u/57677979?v=4", "profile": "https://github.com/hassanazharkhan", "contributions": [ "code" ] }, { "login": "jumic", "name": "Julian Michel", "avatar_url": "https://avatars.githubusercontent.com/u/15660169?v=4", "profile": "https://www.linkedin.com/in/julian-michel-812a223a/", "contributions": [ "code" ] }, { "login": "lmarsden", "name": "lmarsden", "avatar_url": "https://avatars.githubusercontent.com/u/51232932?v=4", "profile": "https://github.com/lmarsden", "contributions": [ "code" ] }, { "login": "adrianmace", "name": "Adrian Mace", "avatar_url": "https://avatars.githubusercontent.com/u/5071859?v=4", "profile": "https://github.com/adrianmace", "contributions": [ "code" ] }, { "login": "mKeRix", "name": "Heiko Rothe", "avatar_url": "https://avatars.githubusercontent.com/u/770596?v=4", "profile": "https://github.com/mKeRix", "contributions": [ "code" ] }, { "login": "hyandell", "name": "Henri Yandell", "avatar_url": "https://avatars.githubusercontent.com/u/477715?v=4", "profile": "https://github.com/hyandell", "contributions": [ "code" ] }, { "login": "mwg-rea", "name": "Matthew Gamble", "avatar_url": "https://avatars.githubusercontent.com/u/82480228?v=4", "profile": "https://github.com/mwg-rea", "contributions": [ "code" ] }, { "login": "willdady", "name": "Will Dady", "avatar_url": "https://avatars.githubusercontent.com/u/204259?v=4", "profile": "https://willdady.com/", "contributions": [ "code" ] }, { "login": "msessa", "name": "Matteo Sessa", "avatar_url": "https://avatars.githubusercontent.com/u/1912143?v=4", "profile": "https://github.com/msessa", "contributions": [ "code" ] }, { "login": "Hi-Fi", "name": "Juho Saarinen", "avatar_url": "https://avatars.githubusercontent.com/u/1499780?v=4", "profile": "https://github.com/Hi-Fi", "contributions": [ "code" ] }, { "login": "njlynch", "name": "Nick Lynch", "avatar_url": "https://avatars.githubusercontent.com/u/1376292?v=4", "profile": "https://github.com/njlynch", "contributions": [ "code" ] }, { "login": "dkaksl", "name": "Amani Kilumanga", "avatar_url": "https://avatars.githubusercontent.com/u/8690282?v=4", "profile": "https://amani.kilumanga.com/", "contributions": [ "code" ] }, { "login": "gherlein", "name": "Greg Herlein", "avatar_url": "https://avatars.githubusercontent.com/u/173428?v=4", "profile": "http://blog.herlein.com/", "contributions": [ "code" ] }, { "login": "kaizen3031593", "name": "Kaizen Conroy", "avatar_url": "https://avatars.githubusercontent.com/u/36202692?v=4", "profile": "https://github.com/kaizen3031593", "contributions": [ "code" ] }, { "login": "saudkhanzada", "name": "Saud Khanzada", "avatar_url": "https://avatars.githubusercontent.com/u/30137907?v=4", "profile": "https://github.com/saudkhanzada", "contributions": [ "code" ] } ], "contributorsPerLine": 7 } ================================================ FILE: .devcontainer.json ================================================ { "postCreateCommand": "( npx projen devenv:setup )", "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." } ================================================ FILE: .eslintrc.json ================================================ { "env": { "jest": true, "node": true }, "root": true, "plugins": [ "@typescript-eslint", "import", "prettier" ], "parser": "@typescript-eslint/parser", "parserOptions": { "ecmaVersion": 2018, "sourceType": "module", "project": "./tsconfig.dev.json" }, "extends": [ "plugin:import/typescript", "prettier", "plugin:prettier/recommended" ], "settings": { "import/parsers": { "@typescript-eslint/parser": [ ".ts", ".tsx" ] }, "import/resolver": { "node": {}, "typescript": { "project": "./tsconfig.dev.json", "alwaysTryTypes": true } } }, "ignorePatterns": [ "*.js", "!.projenrc.js", "*.d.ts", "node_modules/", "*.generated.ts", "coverage" ], "rules": { "prettier/prettier": [ "error" ], "@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": [ "warn", { "groups": [ "builtin", "external" ], "alphabetize": { "order": "asc", "caseInsensitive": true } } ], "no-duplicate-imports": [ "error" ], "no-shadow": [ "off" ], "@typescript-eslint/no-shadow": [ "error" ], "key-spacing": [ "error" ], "no-multiple-empty-lines": [ "error" ], "@typescript-eslint/no-floating-promises": [ "error" ], "no-return-await": [ "off" ], "@typescript-eslint/return-await": [ "error" ], "no-trailing-spaces": [ "error" ], "dot-notation": [ "error" ], "no-bitwise": [ "error" ], "@typescript-eslint/member-ordering": [ "error", { "default": [ "public-static-field", "public-static-method", "protected-static-field", "protected-static-method", "private-static-field", "private-static-method", "field", "constructor", "method" ] } ] }, "overrides": [ { "files": [ ".projenrc.js" ], "rules": { "@typescript-eslint/no-require-imports": "off", "import/no-extraneous-dependencies": "off" } } ] } ================================================ FILE: .gitattributes ================================================ # ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". *.snap linguist-generated /.devcontainer.json linguist-generated /.eslintrc.json linguist-generated /.gitattributes linguist-generated /.github/pull_request_template.md linguist-generated /.github/workflows/auto-approve.yml linguist-generated /.github/workflows/build.yml linguist-generated /.github/workflows/pull-request-lint.yml linguist-generated /.github/workflows/release.yml linguist-generated /.github/workflows/upgrade-main.yml linguist-generated /.gitignore linguist-generated /.gitpod.yml linguist-generated /.markdownlint.json linguist-generated /.mergify.yml 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 /.vscode/launch.json linguist-generated /docs/api/API.md linguist-generated /LICENSE linguist-generated /package.json linguist-generated /projen.bash linguist-generated /tsconfig.dev.json linguist-generated /yarn.lock linguist-generated ================================================ FILE: .github/pull_request_template.md ================================================ --- By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. ================================================ FILE: .github/workflows/auto-approve.yml ================================================ # ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". name: auto-approve on: pull_request_target: types: - labeled - opened - synchronize - reopened - ready_for_review jobs: approve: runs-on: ubuntu-latest permissions: pull-requests: write if: contains(github.event.pull_request.labels.*.name, 'auto-approve') && (github.event.pull_request.user.login == 'cdklabs-automation') steps: - uses: hmarr/auto-approve-action@v2.2.1 with: github-token: ${{ secrets.GITHUB_TOKEN }} ================================================ FILE: .github/workflows/build.yml ================================================ # ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". name: build on: pull_request: {} workflow_dispatch: {} jobs: build: runs-on: ubuntu-latest permissions: contents: write outputs: self_mutation_happened: ${{ steps.self_mutation.outputs.self_mutation_happened }} env: CI: "true" steps: - name: Checkout uses: actions/checkout@v3 with: ref: ${{ github.event.pull_request.head.ref }} repository: ${{ github.event.pull_request.head.repo.full_name }} - name: Setup Node.js uses: actions/setup-node@v3 with: node-version: 14.17.0 - name: Install dependencies run: yarn install --check-files - name: build run: /bin/bash ./projen.bash build - name: Upload coverage to Codecov uses: codecov/codecov-action@v1 with: directory: coverage - id: self_mutation name: Find mutations run: |- git add . git diff --staged --patch --exit-code > .repo.patch || echo "::set-output name=self_mutation_happened::true" - if: steps.self_mutation.outputs.self_mutation_happened name: Upload patch uses: actions/upload-artifact@v2 with: name: .repo.patch path: .repo.patch - name: Fail build on mutation if: steps.self_mutation.outputs.self_mutation_happened run: |- echo "::error::Files were changed during build (see build log). If this was triggered from a fork, you will need to update your branch." cat .repo.patch exit 1 - name: Upload artifact uses: actions/upload-artifact@v2.1.1 with: name: build-artifact path: dist self-mutation: needs: build runs-on: ubuntu-latest permissions: contents: write if: always() && needs.build.outputs.self_mutation_happened && !(github.event.pull_request.head.repo.full_name != github.repository) steps: - name: Checkout uses: actions/checkout@v3 with: token: ${{ secrets.PROJEN_GITHUB_TOKEN }} ref: ${{ github.event.pull_request.head.ref }} repository: ${{ github.event.pull_request.head.repo.full_name }} - name: Download patch uses: actions/download-artifact@v3 with: name: .repo.patch path: ${{ runner.temp }} - name: Apply patch run: '[ -s ${{ runner.temp }}/.repo.patch ] && git apply ${{ runner.temp }}/.repo.patch || echo "Empty patch. Skipping."' - name: Set git identity run: |- git config user.name "github-actions" git config user.email "github-actions@github.com" - name: Push changes run: |2- git add . git commit -s -m "chore: self mutation" git push origin HEAD:${{ github.event.pull_request.head.ref }} package-js: needs: build runs-on: ubuntu-latest permissions: {} if: "! needs.build.outputs.self_mutation_happened" steps: - uses: actions/setup-node@v3 with: node-version: 14.17.0 - name: Download build artifacts uses: actions/download-artifact@v3 with: name: build-artifact path: dist - name: Prepare Repository run: mv dist .repo - name: Install Dependencies run: cd .repo && yarn install --check-files --frozen-lockfile - name: Create js artifact run: cd .repo && npx projen package:js - name: Collect js Artifact run: mv .repo/dist dist package-java: needs: build runs-on: ubuntu-latest permissions: {} if: "! needs.build.outputs.self_mutation_happened" steps: - uses: actions/setup-java@v3 with: distribution: temurin java-version: 11.x - uses: actions/setup-node@v3 with: node-version: 14.17.0 - name: Download build artifacts uses: actions/download-artifact@v3 with: name: build-artifact path: dist - name: Prepare Repository run: mv dist .repo - name: Install Dependencies run: cd .repo && yarn install --check-files --frozen-lockfile - name: Create java artifact run: cd .repo && npx projen package:java - name: Collect java Artifact run: mv .repo/dist dist package-python: needs: build runs-on: ubuntu-latest permissions: {} if: "! needs.build.outputs.self_mutation_happened" steps: - uses: actions/setup-node@v3 with: node-version: 14.17.0 - uses: actions/setup-python@v3 with: python-version: 3.x - name: Download build artifacts uses: actions/download-artifact@v3 with: name: build-artifact path: dist - name: Prepare Repository run: mv dist .repo - name: Install Dependencies run: cd .repo && yarn install --check-files --frozen-lockfile - name: Create python artifact run: cd .repo && npx projen package:python - name: Collect python Artifact run: mv .repo/dist dist package-go: needs: build runs-on: ubuntu-latest permissions: {} if: "! needs.build.outputs.self_mutation_happened" steps: - uses: actions/setup-node@v3 with: node-version: 14.17.0 - uses: actions/setup-go@v3 with: go-version: ^1.16.0 - name: Download build artifacts uses: actions/download-artifact@v3 with: name: build-artifact path: dist - name: Prepare Repository run: mv dist .repo - name: Install Dependencies run: cd .repo && yarn install --check-files --frozen-lockfile - name: Create go artifact run: cd .repo && npx projen package:go - name: Collect go Artifact run: mv .repo/dist dist post-build-integ: needs: build runs-on: ubuntu-latest permissions: contents: read if: "! needs.build.outputs.self_mutation_happened" steps: - uses: actions/setup-python@v3 with: python-version: 3.x - uses: actions/setup-go@v3 with: go-version: 1.16.x - name: Download build artifacts uses: actions/download-artifact@v3 with: name: build-artifact path: dist - name: Checkout uses: actions/checkout@v3 with: ref: ${{ github.event.pull_request.head.ref }} repository: ${{ github.event.pull_request.head.repo.full_name }} - name: Install dependencies run: yarn install --check-files --frozen-lockfile - run: /bin/bash ./projen.bash integ ================================================ FILE: .github/workflows/pull-request-lint.yml ================================================ # ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". name: pull-request-lint on: pull_request_target: types: - labeled - opened - synchronize - reopened - ready_for_review - edited jobs: validate: name: Validate PR title runs-on: ubuntu-latest permissions: pull-requests: write steps: - uses: amannn/action-semantic-pull-request@v4.5.0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: types: |- feat fix chore requireScope: false ================================================ FILE: .github/workflows/release.yml ================================================ # ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". name: release on: push: branches: - main workflow_dispatch: {} jobs: release: runs-on: ubuntu-latest permissions: contents: write outputs: latest_commit: ${{ steps.git_remote.outputs.latest_commit }} env: CI: "true" steps: - name: Checkout uses: actions/checkout@v3 with: fetch-depth: 0 - name: Set git identity run: |- git config user.name "github-actions" git config user.email "github-actions@github.com" - name: Setup Node.js uses: actions/setup-node@v3 with: node-version: 14.17.0 - name: Install dependencies run: yarn install --check-files --frozen-lockfile - name: release run: /bin/bash ./projen.bash release - name: Upload coverage to Codecov uses: codecov/codecov-action@v1 with: directory: coverage - name: Check for new commits id: git_remote run: echo ::set-output name=latest_commit::"$(git ls-remote origin -h ${{ github.ref }} | cut -f1)" - name: Upload artifact if: ${{ steps.git_remote.outputs.latest_commit == github.sha }} uses: actions/upload-artifact@v2.1.1 with: name: build-artifact path: dist release_github: name: Publish to GitHub Releases needs: release runs-on: ubuntu-latest permissions: contents: write issues: write if: needs.release.outputs.latest_commit == github.sha steps: - uses: actions/setup-node@v3 with: node-version: 14.17.0 - name: Download build artifacts uses: actions/download-artifact@v3 with: name: build-artifact path: dist - name: Prepare Repository run: mv dist .repo - name: Collect GitHub Metadata run: mv .repo/dist dist - name: Release 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 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_REPOSITORY: ${{ github.repository }} GITHUB_REF: ${{ github.ref }} - name: Extract Version if: ${{ failure() }} id: extract-version run: echo "::set-output name=VERSION::$(cat dist/version.txt)" - name: Create Issue if: ${{ failure() }} uses: imjohnbo/issue-bot@v3 with: labels: failed-release title: Publishing v${{ steps.extract-version.outputs.VERSION }} to GitHub Releases failed body: See https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} release_npm: name: Publish to npm needs: release runs-on: ubuntu-latest permissions: contents: read issues: write if: needs.release.outputs.latest_commit == github.sha steps: - uses: actions/setup-node@v3 with: node-version: 14.17.0 - name: Download build artifacts uses: actions/download-artifact@v3 with: name: build-artifact path: dist - name: Prepare Repository run: mv dist .repo - name: Install Dependencies run: cd .repo && yarn install --check-files --frozen-lockfile - name: Create js artifact run: cd .repo && npx projen package:js - name: Collect js Artifact run: mv .repo/dist dist - name: Release run: npx -p publib@latest publib-npm env: NPM_DIST_TAG: latest NPM_REGISTRY: registry.npmjs.org NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - name: Extract Version if: ${{ failure() }} id: extract-version run: echo "::set-output name=VERSION::$(cat dist/version.txt)" - name: Create Issue if: ${{ failure() }} uses: imjohnbo/issue-bot@v3 with: labels: failed-release title: Publishing v${{ steps.extract-version.outputs.VERSION }} to npm failed body: See https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} release_maven: name: Publish to Maven Central needs: release runs-on: ubuntu-latest permissions: contents: read issues: write if: needs.release.outputs.latest_commit == github.sha steps: - uses: actions/setup-java@v3 with: distribution: temurin java-version: 11.x - uses: actions/setup-node@v3 with: node-version: 14.17.0 - name: Download build artifacts uses: actions/download-artifact@v3 with: name: build-artifact path: dist - name: Prepare Repository run: mv dist .repo - name: Install Dependencies run: cd .repo && yarn install --check-files --frozen-lockfile - name: Create java artifact run: cd .repo && npx projen package:java - name: Collect java Artifact run: mv .repo/dist dist - name: Release run: npx -p publib@latest publib-maven env: MAVEN_ENDPOINT: https://s01.oss.sonatype.org MAVEN_GPG_PRIVATE_KEY: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} MAVEN_GPG_PRIVATE_KEY_PASSPHRASE: ${{ secrets.MAVEN_GPG_PRIVATE_KEY_PASSPHRASE }} MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} MAVEN_STAGING_PROFILE_ID: ${{ secrets.MAVEN_STAGING_PROFILE_ID }} - name: Extract Version if: ${{ failure() }} id: extract-version run: echo "::set-output name=VERSION::$(cat dist/version.txt)" - name: Create Issue if: ${{ failure() }} uses: imjohnbo/issue-bot@v3 with: labels: failed-release title: Publishing v${{ steps.extract-version.outputs.VERSION }} to Maven Central failed body: See https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} release_pypi: name: Publish to PyPI needs: release runs-on: ubuntu-latest permissions: contents: read issues: write if: needs.release.outputs.latest_commit == github.sha steps: - uses: actions/setup-node@v3 with: node-version: 14.17.0 - uses: actions/setup-python@v3 with: python-version: 3.x - name: Download build artifacts uses: actions/download-artifact@v3 with: name: build-artifact path: dist - name: Prepare Repository run: mv dist .repo - name: Install Dependencies run: cd .repo && yarn install --check-files --frozen-lockfile - name: Create python artifact run: cd .repo && npx projen package:python - name: Collect python Artifact run: mv .repo/dist dist - name: Release run: npx -p publib@latest publib-pypi env: TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }} TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} - name: Extract Version if: ${{ failure() }} id: extract-version run: echo "::set-output name=VERSION::$(cat dist/version.txt)" - name: Create Issue if: ${{ failure() }} uses: imjohnbo/issue-bot@v3 with: labels: failed-release title: Publishing v${{ steps.extract-version.outputs.VERSION }} to PyPI failed body: See https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} release_golang: name: Publish to GitHub Go Module Repository needs: release runs-on: ubuntu-latest permissions: contents: read issues: write if: needs.release.outputs.latest_commit == github.sha steps: - uses: actions/setup-node@v3 with: node-version: 14.17.0 - uses: actions/setup-go@v3 with: go-version: ^1.16.0 - name: Download build artifacts uses: actions/download-artifact@v3 with: name: build-artifact path: dist - name: Prepare Repository run: mv dist .repo - name: Install Dependencies run: cd .repo && yarn install --check-files --frozen-lockfile - name: Create go artifact run: cd .repo && npx projen package:go - name: Collect go Artifact run: mv .repo/dist dist - name: Release run: npx -p publib@latest publib-golang env: GIT_USER_NAME: github-actions GIT_USER_EMAIL: github-actions@github.com GITHUB_TOKEN: ${{ secrets.GO_GITHUB_TOKEN }} - name: Extract Version if: ${{ failure() }} id: extract-version run: echo "::set-output name=VERSION::$(cat dist/version.txt)" - name: Create Issue if: ${{ failure() }} uses: imjohnbo/issue-bot@v3 with: labels: failed-release title: Publishing v${{ steps.extract-version.outputs.VERSION }} to GitHub Go Module Repository failed body: See https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} ================================================ FILE: .github/workflows/upgrade-main.yml ================================================ # ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". name: upgrade-main on: workflow_dispatch: {} schedule: - cron: 0 0 * * * jobs: upgrade: name: Upgrade runs-on: ubuntu-latest permissions: contents: read outputs: patch_created: ${{ steps.create_patch.outputs.patch_created }} steps: - name: Checkout uses: actions/checkout@v3 with: ref: main - name: Setup Node.js uses: actions/setup-node@v3 with: node-version: 14.17.0 - name: Install dependencies run: yarn install --check-files --frozen-lockfile - name: Upgrade dependencies run: /bin/bash ./projen.bash upgrade - id: create_patch name: Find mutations run: |- git add . git diff --staged --patch --exit-code > .repo.patch || echo "::set-output name=patch_created::true" - if: steps.create_patch.outputs.patch_created name: Upload patch uses: actions/upload-artifact@v2 with: name: .repo.patch path: .repo.patch pr: name: Create Pull Request needs: upgrade runs-on: ubuntu-latest permissions: contents: write pull-requests: write if: ${{ needs.upgrade.outputs.patch_created }} steps: - name: Checkout uses: actions/checkout@v3 with: token: ${{ secrets.PROJEN_GITHUB_TOKEN }} ref: main - name: Download patch uses: actions/download-artifact@v3 with: name: .repo.patch path: ${{ runner.temp }} - name: Apply patch run: '[ -s ${{ runner.temp }}/.repo.patch ] && git apply ${{ runner.temp }}/.repo.patch || echo "Empty patch. Skipping."' - name: Set git identity run: |- git config user.name "github-actions" git config user.email "github-actions@github.com" - name: Create Pull Request id: create-pr uses: peter-evans/create-pull-request@v3 with: token: ${{ secrets.PROJEN_GITHUB_TOKEN }} commit-message: |- chore(deps): upgrade dependencies Upgrades project dependencies. See details in [workflow run]. [Workflow Run]: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} ------ *Automatically created by projen via the "upgrade-main" workflow* branch: github-actions/upgrade-main title: "chore(deps): upgrade dependencies" labels: auto-approve body: |- Upgrades project dependencies. See details in [workflow run]. [Workflow Run]: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} ------ *Automatically created by projen via the "upgrade-main" workflow* author: github-actions committer: github-actions signoff: true ================================================ FILE: .gitignore ================================================ # ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". !/.gitattributes !/.projen/tasks.json !/.projen/deps.json !/.projen/files.json !/.github/workflows/pull-request-lint.yml !/.gitpod.yml !/.devcontainer.json !/.github/workflows/auto-approve.yml !/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 !/.projenrc.js /test-reports/ junit.xml /coverage/ !/.github/workflows/build.yml /dist/changelog.md /dist/version.txt !/.github/workflows/release.yml !/.mergify.yml !/.github/workflows/upgrade-main.yml !/.github/pull_request_template.md !/.prettierignore !/.prettierrc.json !/test/ !/tsconfig.dev.json !/src/ /lib /dist/ !/.eslintrc.json .jsii tsconfig.json !/docs/api/API.md !/projen.bash !templates/** /.idea !test/inventory/** !/.markdownlint.json !/.vscode/launch.json ================================================ FILE: .gitpod.yml ================================================ # ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". tasks: - name: Setup command: npx projen build init: yarn install prebuild: bash ./projen.bash ================================================ FILE: .markdownlint.json ================================================ { "default": true, "commands-show-output": false, "line-length": { "line_length": 200 }, "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." } ================================================ FILE: .mergify.yml ================================================ # ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". queue_rules: - name: default conditions: - "#approved-reviews-by>=1" - -label~=(do-not-merge) - status-success=build - status-success=package-js - status-success=package-java - status-success=package-python - status-success=package-go - status-success=post-build-integ pull_request_rules: - name: Automatic merge on approval and successful build actions: delete_head_branch: {} queue: method: squash name: default commit_message_template: |- {{ title }} (#{{ number }}) {{ body }} conditions: - "#approved-reviews-by>=1" - -label~=(do-not-merge) - status-success=build - status-success=package-js - status-success=package-java - status-success=package-python - status-success=package-go - status-success=post-build-integ - name: Label core contributions actions: label: add: - contribution/core conditions: - author~=^(eladb|Chriscbr)$ - label!=contribution/core ================================================ FILE: .npmignore ================================================ # ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". /.projen/ /test-reports/ junit.xml /coverage/ /dist/changelog.md /dist/version.txt /.mergify.yml /test/ /tsconfig.dev.json /src/ !/lib/ !/lib/**/*.js !/lib/**/*.d.ts dist /tsconfig.json /.github/ /.vscode/ /.idea/ /.projenrc.js tsconfig.tsbuildinfo /.eslintrc.json !.jsii /projen.bash /.markdownlint.json /.devcontainer.json /.all-contributorsrc /scripts/ /ARCHITECTURE.md /CODE_OF_CONDUCT.md /CONTRIBUTING.md /VISION.md /SECURITY.md /.gitattributes /.gitpod.yml ================================================ FILE: .prettierignore ================================================ # ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". ================================================ FILE: .prettierrc.json ================================================ { "overrides": [] } ================================================ FILE: .projen/deps.json ================================================ { "dependencies": [ { "name": "@types/conventional-changelog-config-spec", "type": "build" }, { "name": "@types/fs-extra", "version": "^8", "type": "build" }, { "name": "@types/glob", "type": "build" }, { "name": "@types/ini", "type": "build" }, { "name": "@types/jest", "version": "^27", "type": "build" }, { "name": "@types/node", "version": "^14", "type": "build" }, { "name": "@types/semver", "type": "build" }, { "name": "@types/yargs", "type": "build" }, { "name": "@typescript-eslint/eslint-plugin", "version": "^5", "type": "build" }, { "name": "@typescript-eslint/parser", "version": "^5", "type": "build" }, { "name": "all-contributors-cli", "type": "build" }, { "name": "esbuild", "type": "build" }, { "name": "eslint-config-prettier", "type": "build" }, { "name": "eslint-import-resolver-node", "type": "build" }, { "name": "eslint-import-resolver-typescript", "type": "build" }, { "name": "eslint-plugin-import", "type": "build" }, { "name": "eslint-plugin-prettier", "type": "build" }, { "name": "eslint", "version": "^8", "type": "build" }, { "name": "jest-junit", "version": "^13", "type": "build" }, { "name": "jest", "version": "^27", "type": "build" }, { "name": "jsii", "type": "build" }, { "name": "jsii-diff", "type": "build" }, { "name": "jsii-docgen", "type": "build" }, { "name": "jsii-pacmak", "type": "build" }, { "name": "json-schema", "type": "build" }, { "name": "json5", "type": "build" }, { "name": "markmac", "type": "build" }, { "name": "npm-check-updates", "version": "^15", "type": "build" }, { "name": "prettier", "type": "build" }, { "name": "standard-version", "version": "^9", "type": "build" }, { "name": "ts-jest", "version": "^27", "type": "build" }, { "name": "typescript", "type": "build" }, { "name": "@iarna/toml", "type": "bundled" }, { "name": "case", "type": "bundled" }, { "name": "chalk", "type": "bundled" }, { "name": "conventional-changelog-config-spec", "type": "bundled" }, { "name": "fast-json-patch", "type": "bundled" }, { "name": "fs-extra", "type": "bundled" }, { "name": "glob", "version": "^7", "type": "bundled" }, { "name": "ini", "type": "bundled" }, { "name": "semver", "type": "bundled" }, { "name": "shx", "type": "bundled" }, { "name": "xmlbuilder2", "type": "bundled" }, { "name": "yaml", "version": "2.0.0", "type": "bundled" }, { "name": "yargs", "type": "bundled" }, { "name": "zlib", "type": "bundled" } ], "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." } ================================================ FILE: .projen/files.json ================================================ { "files": [ ".devcontainer.json", ".eslintrc.json", ".gitattributes", ".github/pull_request_template.md", ".github/workflows/auto-approve.yml", ".github/workflows/build.yml", ".github/workflows/pull-request-lint.yml", ".github/workflows/release.yml", ".github/workflows/upgrade-main.yml", ".gitignore", ".gitpod.yml", ".markdownlint.json", ".mergify.yml", ".prettierignore", ".prettierrc.json", ".projen/deps.json", ".projen/files.json", ".projen/tasks.json", ".vscode/launch.json", "LICENSE", "projen.bash", "tsconfig.dev.json" ], "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." } ================================================ FILE: .projen/tasks.json ================================================ { "tasks": { "build": { "name": "build", "description": "Full release build", "steps": [ { "spawn": "default" }, { "spawn": "pre-compile" }, { "spawn": "compile" }, { "spawn": "post-compile" }, { "spawn": "test" }, { "spawn": "package" } ] }, "bump": { "name": "bump", "description": "Bumps version based on latest git tag and generates a changelog entry", "env": { "OUTFILE": "package.json", "CHANGELOG": "dist/changelog.md", "BUMPFILE": "dist/version.txt", "RELEASETAG": "dist/releasetag.txt", "RELEASE_TAG_PREFIX": "" }, "steps": [ { "builtin": "release/bump-version" } ], "condition": "! git log --oneline -1 | grep -q \"chore(release):\"" }, "bundle:task-runner": { "name": "bundle:task-runner", "description": "Bundle the run-task script needed for \"projen eject\"", "steps": [ { "exec": "esbuild src/task-runtime.ts --outfile=lib/run-task.js --bundle --platform=node --external:\"*/package.json\"" }, { "exec": "echo \"#!/usr/bin/env node\" | cat - lib/run-task.js | tee lib/run-task.js > /dev/null", "name": "Insert Node shebang to beginning of the file" }, { "exec": "echo \"const runtime = new TaskRuntime(\\\".\\\");\nruntime.runTask(process.argv[2]);\" >> lib/run-task.js", "name": "Add driver code to end of the file" } ] }, "clobber": { "name": "clobber", "description": "hard resets to HEAD of origin and cleans the local repo", "env": { "BRANCH": "$(git branch --show-current)" }, "steps": [ { "exec": "git checkout -b scratch", "name": "save current HEAD in \"scratch\" branch" }, { "exec": "git checkout $BRANCH" }, { "exec": "git fetch origin", "name": "fetch latest changes from origin" }, { "exec": "git reset --hard origin/$BRANCH", "name": "hard reset to origin commit" }, { "exec": "git clean -fdx", "name": "clean all untracked files" }, { "say": "ready to rock! (unpushed commits are under the \"scratch\" branch)" } ], "condition": "git diff --exit-code > /dev/null" }, "compat": { "name": "compat", "description": "Perform API compatibility check against latest version", "steps": [ { "exec": "jsii-diff npm:$(node -p \"require('./package.json').name\") -k --ignore-file .compatignore || (echo \"\nUNEXPECTED BREAKING CHANGES: add keys such as 'removed:constructs.Node.of' to .compatignore to skip.\n\" && exit 1)" } ] }, "compile": { "name": "compile", "description": "Only compile", "steps": [ { "exec": "jsii --silence-warnings=reserved-word" } ] }, "contributors:update": { "name": "contributors:update", "steps": [ { "exec": "all-contributors check | grep \"Missing contributors\" -A 1 | tail -n1 | sed -e \"s/,//g\" | xargs -n1 | grep -v \"[bot]\" | xargs -n1 -I{} all-contributors add {} code" } ] }, "default": { "name": "default", "description": "Synthesize project files", "steps": [ { "exec": "node .projenrc.js" } ] }, "devenv:setup": { "name": "devenv:setup", "steps": [ { "exec": "yarn install" }, { "spawn": "build" } ] }, "docgen": { "name": "docgen", "description": "Generate API.md from .jsii manifest", "steps": [ { "exec": "jsii-docgen -o docs/api/API.md" } ] }, "eject": { "name": "eject", "description": "Remove projen from the project", "env": { "PROJEN_EJECTING": "true" }, "steps": [ { "spawn": "default" } ] }, "eslint": { "name": "eslint", "description": "Runs eslint against the codebase", "steps": [ { "exec": "eslint --ext .ts,.tsx --fix --no-error-on-unmatched-pattern src test build-tools .projenrc.js" } ] }, "integ": { "name": "integ", "description": "Run integration tests", "steps": [ { "spawn": "compile" }, { "spawn": "package:python" }, { "spawn": "integ:python-compat" } ] }, "integ:python-compat": { "name": "integ:python-compat", "description": "Checks that projen's submodule structure does not cause import failures for python. Expects python to be installed and projen to be fully built.", "steps": [ { "exec": "scripts/python-compat.sh" } ] }, "package": { "name": "package", "description": "Creates the distribution package", "steps": [ { "exec": "if [ ! -z ${CI} ]; then rsync -a . .repo --exclude .git --exclude node_modules && rm -rf dist && mv .repo dist; else /bin/bash ./projen.bash package-all; fi" } ] }, "package-all": { "name": "package-all", "description": "Packages artifacts for all target languages", "steps": [ { "spawn": "package:js" }, { "spawn": "package:java" }, { "spawn": "package:python" }, { "spawn": "package:go" } ] }, "package:go": { "name": "package:go", "description": "Create go language bindings", "steps": [ { "exec": "jsii-pacmak -v --target go" } ] }, "package:java": { "name": "package:java", "description": "Create java language bindings", "steps": [ { "exec": "jsii-pacmak -v --target java" } ] }, "package:js": { "name": "package:js", "description": "Create js language bindings", "steps": [ { "exec": "jsii-pacmak -v --target js" } ] }, "package:python": { "name": "package:python", "description": "Create python language bindings", "steps": [ { "exec": "jsii-pacmak -v --target python" } ] }, "post-compile": { "name": "post-compile", "description": "Runs after successful compilation", "steps": [ { "spawn": "docgen" }, { "spawn": "readme-macros" }, { "spawn": "bundle:task-runner" }, { "spawn": "default" } ] }, "post-upgrade": { "name": "post-upgrade", "description": "Runs after upgrading dependencies" }, "pre-compile": { "name": "pre-compile", "description": "Prepare the project for compilation" }, "readme-macros": { "name": "readme-macros", "steps": [ { "exec": "mv README.md README.md.bak" }, { "exec": "cat README.md.bak | markmac > README.md" }, { "exec": "rm README.md.bak" } ] }, "release": { "name": "release", "description": "Prepare a release from \"main\" branch", "env": { "RELEASE": "true" }, "steps": [ { "exec": "rm -fr dist" }, { "spawn": "bump" }, { "spawn": "build" }, { "spawn": "unbump" }, { "exec": "git diff --ignore-space-at-eol --exit-code" } ] }, "test": { "name": "test", "description": "Run tests", "steps": [ { "exec": "jest --passWithNoTests --all --updateSnapshot --coverageProvider=v8" }, { "spawn": "eslint" } ] }, "test:update": { "name": "test:update", "description": "Update jest snapshots", "steps": [ { "exec": "jest --updateSnapshot" } ] }, "test:watch": { "name": "test:watch", "description": "Run jest in watch mode", "steps": [ { "exec": "jest --watch" } ] }, "unbump": { "name": "unbump", "description": "Restores version to 0.0.0", "env": { "OUTFILE": "package.json", "CHANGELOG": "dist/changelog.md", "BUMPFILE": "dist/version.txt", "RELEASETAG": "dist/releasetag.txt", "RELEASE_TAG_PREFIX": "" }, "steps": [ { "builtin": "release/reset-version" } ] }, "upgrade": { "name": "upgrade", "description": "upgrade dependencies", "env": { "CI": "0" }, "steps": [ { "exec": "yarn upgrade npm-check-updates" }, { "exec": "npm-check-updates --dep dev --upgrade --target=minor --reject='yaml,markmac'" }, { "exec": "npm-check-updates --dep optional --upgrade --target=minor --reject='yaml,markmac'" }, { "exec": "npm-check-updates --dep peer --upgrade --target=minor --reject='yaml,markmac'" }, { "exec": "npm-check-updates --dep prod --upgrade --target=minor --reject='yaml,markmac'" }, { "exec": "npm-check-updates --dep bundle --upgrade --target=minor --reject='yaml,markmac'" }, { "exec": "yarn install --check-files" }, { "exec": "yarn upgrade @types/conventional-changelog-config-spec @types/fs-extra @types/glob @types/ini @types/jest @types/node @types/semver @types/yargs @typescript-eslint/eslint-plugin @typescript-eslint/parser all-contributors-cli esbuild eslint-config-prettier eslint-import-resolver-node eslint-import-resolver-typescript eslint-plugin-import eslint-plugin-prettier eslint jest-junit jest jsii jsii-diff jsii-docgen jsii-pacmak json-schema json5 npm-check-updates prettier standard-version ts-jest typescript @iarna/toml case chalk conventional-changelog-config-spec fast-json-patch fs-extra glob ini semver shx xmlbuilder2 yaml yargs zlib" }, { "exec": "/bin/bash ./projen.bash" }, { "spawn": "post-upgrade" } ] }, "watch": { "name": "watch", "description": "Watch & compile in the background", "steps": [ { "exec": "jsii -w --silence-warnings=reserved-word" } ] } }, "env": { "PATH": "$(npx -c \"node -e \\\"console.log(process.env.PATH)\\\"\")" }, "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." } ================================================ FILE: .projenrc.js ================================================ const { cdk, JsonFile, TextFile } = require("./lib"); const { PROJEN_MARKER } = require("./lib/common"); const project = new cdk.JsiiProject({ name: "projen", description: "CDK for software projects", repository: "https://github.com/projen/projen.git", authorName: "Amazon Web Services", authorUrl: "https://aws.amazon.com", authorOrganization: true, stability: "experimental", keywords: [ "scaffolding", "cicd", "project", "management", "generator", "cdk", ], pullRequestTemplateContents: [ "---", "By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.", ], bundledDeps: [ "conventional-changelog-config-spec", "yaml@2.0.0", "fs-extra", "yargs", "case", "glob@^7", "semver", "chalk", "@iarna/toml", "xmlbuilder2", "ini", "shx", "fast-json-patch", "zlib", ], devDeps: [ "@types/conventional-changelog-config-spec", "@types/fs-extra@^8", "@types/yargs", "@types/glob", "@types/semver", "@types/ini", "markmac", "esbuild", "all-contributors-cli", "json5", ], depsUpgradeOptions: { // markmac depends on projen, we are excluding it here to avoid a circular update loop exclude: ["markmac"], }, projenDevDependency: false, // because I am projen releaseToNpm: true, minNodeVersion: "14.0.0", workflowNodeVersion: "14.17.0", // required by @typescript-eslint/eslint-plugin@5.19.0 codeCov: true, prettier: true, defaultReleaseBranch: "main", gitpod: true, devContainer: true, // since this is projen, we need to always compile before we run projenCommand: "/bin/bash ./projen.bash", // cli tests need projen to be compiled compileBeforeTest: true, jestOptions: { // makes it very hard to iterate with jest --watch coverageText: false, jestConfig: { // By default jest will try to use all CPU cores on the running machine. // But some of our integration tests spawn child processes - so by // creating one jest worker per test, some of the child processes will get // starved of CPU time and sometimes hang or timeout. This should // help mitigate that. maxWorkers: "50%", }, }, publishToMaven: { javaPackage: "io.github.cdklabs.projen", mavenGroupId: "io.github.cdklabs", mavenArtifactId: "projen", mavenEndpoint: "https://s01.oss.sonatype.org", }, publishToPypi: { distName: "projen", module: "projen", }, publishToGo: { moduleName: "github.com/projen/projen-go", }, releaseFailureIssue: true, autoApproveUpgrades: true, autoApproveOptions: { allowedUsernames: ["cdklabs-automation"] }, docgenFilePath: "docs/api/API.md", }); // this script is what we use as the projen command in this project // it will compile the project if needed and then run the cli. new TextFile(project, "projen.bash", { lines: [ "#!/bin/bash", `# ${PROJEN_MARKER}`, "set -euo pipefail", "if [ ! -f lib/cli/index.js ]; then", ' echo "bootstrapping..."', " npx jsii --silence-warnings=reserved-word --no-fix-peer-dependencies", "fi", "exec bin/projen $@", ], }); project.npmignore.exclude("/projen.bash"); project.addExcludeFromCleanup("test/**"); // because snapshots include the projen marker... project.gitignore.include("templates/**"); project.gitignore.exclude("/.idea"); project.gitignore.include("test/inventory/**"); // expand markdown macros in readme const macros = project.addTask("readme-macros"); macros.exec("mv README.md README.md.bak"); macros.exec("cat README.md.bak | markmac > README.md"); macros.exec("rm README.md.bak"); project.postCompileTask.spawn(macros); new JsonFile(project, ".markdownlint.json", { obj: { default: true, "commands-show-output": false, "line-length": { line_length: 200, }, }, }); project.npmignore.exclude("/.markdownlint.json"); project.vscode.launchConfiguration.addConfiguration({ type: "pwa-node", request: "launch", name: "projen CLI", skipFiles: ["/**"], program: "${workspaceFolder}/lib/cli/index.js", outFiles: ["${workspaceFolder}/lib/**/*.js"], }); project.github.mergify.addRule({ name: "Label core contributions", actions: { label: { add: ["contribution/core"], }, }, conditions: ["author~=^(eladb|Chriscbr)$", "label!=contribution/core"], }); project.gitpod.addCustomTask({ name: "Setup", init: "yarn install", prebuild: "bash ./projen.bash", command: "npx projen build", }); const setup = project.addTask("devenv:setup"); setup.exec("yarn install"); setup.spawn(project.buildTask); project.devContainer.addTasks(setup); project.npmignore.exclude("/.devcontainer.json"); project.addTask("contributors:update", { exec: 'all-contributors check | grep "Missing contributors" -A 1 | tail -n1 | sed -e "s/,//g" | xargs -n1 | grep -v "[bot]" | xargs -n1 -I{} all-contributors add {} code', }); project.npmignore.exclude("/.all-contributorsrc"); project.npmignore.exclude("/scripts/"); project.npmignore.exclude("/ARCHITECTURE.md"); project.npmignore.exclude("/CODE_OF_CONDUCT.md"); project.npmignore.exclude("/CONTRIBUTING.md"); project.npmignore.exclude("/VISION.md"); project.npmignore.exclude("/SECURITY.md"); project.npmignore.exclude("/.gitattributes"); project.npmignore.exclude("/.gitpod.yml"); function setupIntegTest() { const pythonCompatTask = project.addTask("integ:python-compat", { exec: "scripts/python-compat.sh", description: "Checks that projen's submodule structure does not cause import failures for python. Expects python to be installed and projen to be fully built.", }); const integTask = project.addTask("integ", { description: "Run integration tests", }); integTask.spawn(project.compileTask); integTask.spawn(project.tasks.tryFind("package:python")); integTask.spawn(pythonCompatTask); project.buildWorkflow.addPostBuildJobTask(integTask, { tools: { python: { version: "3.x" }, go: { version: "1.16.x" } }, }); } // build `run-task` script needed for "projen eject" functionality function setupBundleTaskRunner() { const taskRunnerPath = "lib/run-task.js"; const task = project.addTask("bundle:task-runner", { description: 'Bundle the run-task script needed for "projen eject"', exec: `esbuild src/task-runtime.ts --outfile=${taskRunnerPath} --bundle --platform=node --external:"*/package.json"`, }); task.exec( `echo "#!/usr/bin/env node" | cat - lib/run-task.js | tee lib/run-task.js > /dev/null`, { name: "Insert Node shebang to beginning of the file", } ); task.exec( `echo "const runtime = new TaskRuntime(\\".\\");\nruntime.runTask(process.argv[2]);" >> ${taskRunnerPath}`, { name: "Add driver code to end of the file", } ); project.postCompileTask.spawn(task); } setupIntegTest(); setupBundleTaskRunner(); // we are projen, so re-synth after compiling. // fixes feedback loop where projen contibutors run "build" // but not all files are updated project.postCompileTask.spawn(project.defaultTask); project.synth(); ================================================ FILE: .vscode/launch.json ================================================ { "version": "0.2.0", "configurations": [ { "type": "pwa-node", "request": "launch", "name": "projen CLI", "skipFiles": [ "/**" ], "program": "${workspaceFolder}/lib/cli/index.js", "outFiles": [ "${workspaceFolder}/lib/**/*.js" ] } ], "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." } ================================================ FILE: ARCHITECTURE.md ================================================ # Architecture This document attempts to document the high-level architecture of projen. This could be useful if you're trying to contribute to projen, trying to debug an error message, or if you're just curious! ## How are a project's files synthesized? ### Bird's eye view When `npx projen` is run, the command-line process executes the project's projenrc file. This is usually a file like `.projenrc.js` or `projenrc.java`. > The "rc" in the name is a common convention for configuration files - see https://en.wikipedia.org/wiki/Configuration_file. projenrc files follow a general structure: 1. they define one or more `Project` instances 2. these projects are configured and customized 3. `project.synth()` is called on the root project For simplicity, most of this document will just assume there is a single project unless otherwise specified. Steps 1 and 2 only serve to initialize an in-memory representation of the project. projen runs on Node.js; so in the JavaScript runtime, these steps create a hierarchy of objects (called `Component`'s), each with various fields specifying the names of files, tasks, options, and so on. The data within each component provides enough information to uniquely determine the structure and contents of the files it is responsible for. Components can add other components to the project, and even make changes to existing components through common interfaces like `project.tasks`, `project.deps`, or `project.tryFindObjectFile()`. Step 3 is the only step that actually performs any changes to files in the user's project / file system. ### Synthesizing actual files The `synth()` method of `Project` performs the actual synthesizing (and updating) of all configuration files managed by projen. This is achieved by deleting all projen-managed files (if there are any), and then re-synthesizing them based on the latest configuration specified by the user. In code, this breaks down as follows (slightly simplified): 1. the project's `preSynthesize()` method is called 2. all components' `preSynthesize()` methods are called 3. all projen-synthesized files are cleaned up 4. all components' `synthesize()` methods are called (most files are generated) 5. all components' `postSynthesize()` methods are called 6. the project's `postSynthesize()` method is called In the above list, step 3 is critical since it's important that only files that are managed by projen get cleaned up - we don't want user source code to be deleted! Moreover, if a file was synthesized by projen at one point in time, but later a user changes their projenrc configuration so it is no longer necessary, we want it to be automatically cleaned up. Rather than manually keeping track of synthesized files with some form of stored state (which could easily get desynced by tampering from users or other tools), projen simply looks for files with the _magic string_ that you get by concatenating `"~~ Generated by "` and `"projen"`, and removes them. See [cleanup.ts](src/cleanup.ts). Since any file with this string gets automatically cleaned up, you should not include this magic string verbatim in source code files. If you are writing your own projen project type or component, you can simply reference this magic string via `FileBase.PROJEN_MARKER`. ---- Steps 1, 2, 4, 5, and 6 are more straightforward. `synthesize()` is used to generate the actual files in the user's file system (including applying appropriate read/write permissions). `preSynthesize()` and `postSynthesize()` are complementary methods that can used to enable components to perform additional logic before and after synthesis. See the source code of `Component` and `FileBase` for more details. > Note: in practice, there are many existing components for creating specific > types of files (such as `JsonFile` and `TextFile`), so we recommend using > these over hand-making components wherever possible. (Believe in the power of > abstractions!) Since `preSynthesize()` is called before any files are cleaned up, it can be used for e.g. observing any changes made to a generated file, and then adjusting how the file is re-synthesized based on those changes. (As an example, running `npm install` or `yarn install` can change the dependencies listed in the `package.json` file of JavaScript projects. The built-in `NodeProject` uses `preSynthesize()` to automatically integrate these changes to the `package.json` file synthesized by projen, instead of overriding them.) ## How can projenrc files be written in multiple languages? The projen library is transpiled by [jsii](https://github.com/aws/jsii) so that projenrc files can be written in languages besides JavaScript. Under the hood, API calls made in projen's Java/Python/etc. libraries communicate with a JavaScript runtime to deliver the same behavior as if you wrote the code in JavaScript. For more information, check out [jsii](https://github.com/aws/jsii). ================================================ FILE: CODE_OF_CONDUCT.md ================================================ # Contributor Covenant Code of Conduct ## Our Pledge We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation. We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community. ## Our Standards Examples of behavior that contributes to a positive environment for our community include: * Demonstrating empathy and kindness toward other people * Being respectful of differing opinions, viewpoints, and experiences * Giving and gracefully accepting constructive feedback * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience * Focusing on what is best not just for us as individuals, but for the overall community Examples of unacceptable behavior include: * The use of sexualized language or imagery, and sexual attention or advances of any kind * Trolling, insulting or derogatory comments, and personal or political attacks * Public or private harassment * Publishing others' private information, such as a physical or email address, without their explicit permission * Other conduct which could reasonably be considered inappropriate in a professional setting ## Enforcement Responsibilities Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful. Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate. ## Scope This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. ## Enforcement Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at elad.benisrael@gmail.com. All complaints will be reviewed and investigated promptly and fairly. All community leaders are obligated to respect the privacy and security of the reporter of any incident. ## Enforcement Guidelines Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct: ### 1. Correction **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community. **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested. ### 2. Warning **Community Impact**: A violation through a single incident or series of actions. **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban. ### 3. Temporary Ban **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior. **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban. ### 4. Permanent Ban **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals. **Consequence**: A permanent ban from any sort of public interaction within the community. ## Attribution This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0, available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity). [homepage]: https://www.contributor-covenant.org For answers to common questions about this code of conduct, see the FAQ at https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations. ================================================ FILE: CONTRIBUTING.md ================================================ # Contributing to projen Thanks for your interest in contributing to projen! :heart: This document describes how to set up a development environment and submit your contributions. Please read it carefully and let us know if it's not up-to date (or even better, submit a pull request with your corrections! :wink:). ## Prerequisites ### Manually install tools The following tools need to be installed to develop on projen locally. - [Node] - [Yarn] - [Maven] [Node]: https://nodejs.org/en/download/ [Yarn]: https://yarnpkg.com/en/docs/install [Maven]: https://maven.apache.org/install ## Getting Started The basic commands to get the repository cloned and built locally follow: ```console $ git clone git@github.com:projen/projen $ cd projen $ yarn # install dependencies $ yarn build # build projen ``` ## Code Organization Check out [this recording](https://www.youtube.com/watch?v=8dHwnuSND14) from a walkthrough of the projen codebase. ### Development workflow The projen package has the following scripts: - `build` - builds the package and runs all unit tests - `watch` - watches for file changes and builds them progressively - `test` - executes all unit tests - `test:update` - executes all unit tests and overwrites snapshot expectations (those `.snap` files). - `test:watch` - runs all unit tests and reruns tests when files are changed - `package` - emits publishable artifacts to `dist`. - `eslint` - run linter against source code Each of these scripts can be executed using `yarn