diff --git a/API.md b/API.md new file mode 100644 index 0000000..4cd9e36 --- /dev/null +++ b/API.md @@ -0,0 +1,4450 @@ +# replace this +# API Reference + + +## Structs + +### CdktfConfigOptions + +Options for CdktfConfig. + +#### Initializer + +```typescript +import { CdktfConfigOptions } from '@gmeligio/project-gen' + +const cdktfConfigOptions: CdktfConfigOptions = { ... } +``` + +#### Properties + +| **Name** | **Type** | **Description** | +| --- | --- | --- | +| app | string | The command to run in order to synthesize the code to Terraform compatible JSON (language specific). | +| codeMakerOutput | string | Default: '.gen'. Path where generated provider bindings will be rendered to. | +| language | Language | Target language for building provider or module bindings. | +| output | string | Where the synthesized JSON should go. | +| projectId | string | Unique identifier for the project used to differentiate projects. | +| sendCrashReports | string | Whether to send crash reports to the CDKTF team. | +| terraformModules | string \| TerraformDependencyConstraint[] | Terraform Modules to build. | +| terraformProviders | string \| TerraformDependencyConstraint[] | Terraform Providers to build. | + +--- + +##### `app`Optional + +```typescript +public readonly app: string; +``` + +- *Type:* string + +The command to run in order to synthesize the code to Terraform compatible JSON (language specific). + +--- + +##### `codeMakerOutput`Optional + +```typescript +public readonly codeMakerOutput: string; +``` + +- *Type:* string +- *Default:* ".gen" + +Default: '.gen'. Path where generated provider bindings will be rendered to. + +--- + +##### `language`Optional + +```typescript +public readonly language: Language; +``` + +- *Type:* Language + +Target language for building provider or module bindings. + +Currently supported: `typescript`, `python`, `java`, `csharp`, and `go` + +--- + +##### `output`Optional + +```typescript +public readonly output: string; +``` + +- *Type:* string +- *Default:* "cdktf.out" + +Where the synthesized JSON should go. + +Also will be the working directory for CDKTF cli + +--- + +##### `projectId`Optional + +```typescript +public readonly projectId: string; +``` + +- *Type:* string +- *Default:* "generated UUID" + +Unique identifier for the project used to differentiate projects. + +--- + +##### `sendCrashReports`Optional + +```typescript +public readonly sendCrashReports: string; +``` + +- *Type:* string +- *Default:* "false" + +Whether to send crash reports to the CDKTF team. + +--- + +##### `terraformModules`Optional + +```typescript +public readonly terraformModules: string | TerraformDependencyConstraint[]; +``` + +- *Type:* string | TerraformDependencyConstraint[] + +Terraform Modules to build. + +--- + +##### `terraformProviders`Optional + +```typescript +public readonly terraformProviders: string | TerraformDependencyConstraint[]; +``` + +- *Type:* string | TerraformDependencyConstraint[] + +Terraform Providers to build. + +--- + +### CdktfTypeScriptAppOptions + +#### Initializer + +```typescript +import { CdktfTypeScriptAppOptions } from '@gmeligio/project-gen' + +const cdktfTypeScriptAppOptions: CdktfTypeScriptAppOptions = { ... } +``` + +#### Properties + +| **Name** | **Type** | **Description** | +| --- | --- | --- | +| name | string | This is the name of your project. | +| commitGenerated | boolean | Whether to commit the managed files by default. | +| gitIgnoreOptions | projen.IgnoreFileOptions | Configuration options for .gitignore file. | +| gitOptions | projen.GitOptions | Configuration options for git. | +| logging | projen.LoggerOptions | Configure logging options such as verbosity. | +| outdir | string | The root directory of the project. | +| parent | projen.Project | The parent project, if this project is part of a bigger project. | +| projenCommand | string | The shell command to use in order to run the projen CLI. | +| projenrcJson | boolean | Generate (once) .projenrc.json (in JSON). Set to `false` in order to disable .projenrc.json generation. | +| projenrcJsonOptions | projen.ProjenrcJsonOptions | Options for .projenrc.json. | +| renovatebot | boolean | Use renovatebot to handle dependency upgrades. | +| renovatebotOptions | projen.RenovatebotOptions | Options for renovatebot. | +| autoApproveOptions | projen.github.AutoApproveOptions | Enable and configure the 'auto approve' workflow. | +| autoMerge | boolean | Enable automatic merging on GitHub. | +| autoMergeOptions | projen.github.AutoMergeOptions | Configure options for automatic merging on GitHub. | +| clobber | boolean | Add a `clobber` task which resets the repo to origin. | +| devContainer | boolean | Add a VSCode development environment (used for GitHub Codespaces). | +| github | boolean | Enable GitHub integration. | +| githubOptions | projen.github.GitHubOptions | Options for GitHub integration. | +| gitpod | boolean | Add a Gitpod development environment. | +| mergify | boolean | Whether mergify should be enabled on this repository or not. | +| mergifyOptions | projen.github.MergifyOptions | Options for mergify. | +| projectType | projen.ProjectType | Which type of project this is (library/app). | +| projenCredentials | projen.github.GithubCredentials | Choose a method of providing GitHub API access for projen workflows. | +| projenTokenSecret | string | The name of a secret which includes a GitHub Personal Access Token to be used by projen workflows. | +| readme | projen.SampleReadmeProps | The README setup. | +| stale | boolean | Auto-close of stale issues and pull request. | +| staleOptions | projen.github.StaleOptions | Auto-close stale issues and pull requests. | +| vscode | boolean | Enable VSCode integration. | +| allowLibraryDependencies | boolean | Allow the project to include `peerDependencies` and `bundledDependencies`. | +| authorEmail | string | Author's e-mail. | +| authorName | string | Author's name. | +| authorOrganization | boolean | Is the author an organization. | +| authorUrl | string | Author's URL / Website. | +| autoDetectBin | boolean | Automatically add all executables under the `bin` directory to your `package.json` file under the `bin` section. | +| bin | {[ key: string ]: string} | Binary programs vended with your module. | +| bugsEmail | string | The email address to which issues should be reported. | +| bugsUrl | string | The url to your project's issue tracker. | +| bundledDeps | string[] | List of dependencies to bundle into this module. | +| codeArtifactOptions | projen.javascript.CodeArtifactOptions | Options for npm packages using AWS CodeArtifact. | +| deps | string[] | Runtime dependencies of this module. | +| description | string | The description is just a string that helps people understand the purpose of the package. | +| devDeps | string[] | Build dependencies for this module. | +| entrypoint | string | Module entrypoint (`main` in `package.json`). | +| homepage | string | Package's Homepage / Website. | +| keywords | string[] | Keywords to include in `package.json`. | +| license | string | License's SPDX identifier. | +| licensed | boolean | Indicates if a license should be added. | +| maxNodeVersion | string | Minimum node.js version to require via `engines` (inclusive). | +| minNodeVersion | string | Minimum Node.js version to require via package.json `engines` (inclusive). | +| npmAccess | projen.javascript.NpmAccess | Access level of the npm package. | +| npmRegistry | string | The host name of the npm registry to publish to. | +| npmRegistryUrl | string | The base URL of the npm package registry. | +| npmTokenSecret | string | GitHub secret which contains the NPM token to use when publishing packages. | +| packageManager | projen.javascript.NodePackageManager | The Node Package Manager used to execute scripts. | +| packageName | string | The "name" in package.json. | +| peerDependencyOptions | projen.javascript.PeerDependencyOptions | Options for `peerDeps`. | +| peerDeps | string[] | Peer dependencies for this module. | +| pnpmVersion | string | The version of PNPM to use if using PNPM as a package manager. | +| repository | string | The repository is the location where the actual code for your package lives. | +| repositoryDirectory | string | If the package.json for your package is not in the root directory (for example if it is part of a monorepo), you can specify the directory in which it lives. | +| scopedPackagesOptions | projen.javascript.ScopedPackagesOptions[] | Options for privately hosted scoped packages. | +| scripts | {[ key: string ]: string} | npm scripts to include. | +| stability | string | Package's Stability. | +| jsiiReleaseVersion | string | Version requirement of `publib` which is used to publish modules to npm. | +| majorVersion | number | Major version to release from the default branch. | +| minMajorVersion | number | Minimal Major version to release. | +| npmDistTag | string | The npmDistTag to use when publishing from the default branch. | +| postBuildSteps | projen.github.workflows.JobStep[] | Steps to execute after build as part of the release workflow. | +| prerelease | string | Bump versions from the default branch as pre-releases (e.g. "beta", "alpha", "pre"). | +| publishDryRun | boolean | Instead of actually publishing to package managers, just print the publishing command. | +| publishTasks | boolean | Define publishing tasks that can be executed manually as well as workflows. | +| releasableCommits | projen.ReleasableCommits | Find commits that should be considered releasable Used to decide if a release is required. | +| releaseBranches | {[ key: string ]: projen.release.BranchOptions} | Defines additional release branches. | +| releaseEveryCommit | boolean | Automatically release new versions every commit to one of branches in `releaseBranches`. | +| releaseFailureIssue | boolean | Create a github issue on every failed publishing task. | +| releaseFailureIssueLabel | string | The label to apply to issues indicating publish failures. | +| releaseSchedule | string | CRON schedule to trigger new releases. | +| releaseTagPrefix | string | Automatically add the given prefix to release tags. Useful if you are releasing on multiple branches with overlapping version numbers. | +| releaseTrigger | projen.release.ReleaseTrigger | The release trigger to use. | +| releaseWorkflowName | string | The name of the default release workflow. | +| releaseWorkflowSetupSteps | projen.github.workflows.JobStep[] | A set of workflow steps to execute in order to setup the workflow container. | +| versionrcOptions | {[ key: string ]: any} | Custom configuration used when creating changelog with standard-version package. | +| workflowContainerImage | string | Container image to use for GitHub workflows. | +| workflowRunsOn | string[] | Github Runner selection labels. | +| defaultReleaseBranch | string | The name of the main release branch. | +| artifactsDirectory | string | A directory which will contain build artifacts. | +| autoApproveUpgrades | boolean | Automatically approve deps upgrade PRs, allowing them to be merged by mergify (if configued). | +| buildWorkflow | boolean | Define a GitHub workflow for building PRs. | +| buildWorkflowTriggers | projen.github.workflows.Triggers | Build workflow triggers. | +| bundlerOptions | projen.javascript.BundlerOptions | Options for `Bundler`. | +| codeCov | boolean | Define a GitHub workflow step for sending code coverage metrics to https://codecov.io/ Uses codecov/codecov-action@v3 A secret is required for private repos. Configured with `@codeCovTokenSecret`. | +| codeCovTokenSecret | string | Define the secret name for a specified https://codecov.io/ token A secret is required to send coverage for private repositories. | +| copyrightOwner | string | License copyright owner. | +| copyrightPeriod | string | The copyright years to put in the LICENSE file. | +| dependabot | boolean | Use dependabot to handle dependency upgrades. | +| dependabotOptions | projen.github.DependabotOptions | Options for dependabot. | +| depsUpgrade | boolean | Use github workflows to handle dependency upgrades. | +| depsUpgradeOptions | projen.javascript.UpgradeDependenciesOptions | Options for `UpgradeDependencies`. | +| gitignore | string[] | Additional entries to .gitignore. | +| jest | boolean | Setup jest unit tests. | +| jestOptions | projen.javascript.JestOptions | Jest options. | +| mutableBuild | boolean | Automatically update files modified during builds to pull-request branches. | +| npmignore | string[] | Additional entries to .npmignore. | +| npmignoreEnabled | boolean | Defines an .npmignore file. Normally this is only needed for libraries that are packaged as tarballs. | +| npmIgnoreOptions | projen.IgnoreFileOptions | Configuration options for .npmignore file. | +| package | boolean | Defines a `package` task that will produce an npm tarball under the artifacts directory (e.g. `dist`). | +| prettier | boolean | Setup prettier. | +| prettierOptions | projen.javascript.PrettierOptions | Prettier options. | +| projenDevDependency | boolean | Indicates of "projen" should be installed as a devDependency. | +| projenrcJs | boolean | Generate (once) .projenrc.js (in JavaScript). Set to `false` in order to disable .projenrc.js generation. | +| projenrcJsOptions | projen.javascript.ProjenrcOptions | Options for .projenrc.js. | +| projenVersion | string | Version of projen to install. | +| pullRequestTemplate | boolean | Include a GitHub pull request template. | +| pullRequestTemplateContents | string[] | The contents of the pull request template. | +| release | boolean | Add release management to this project. | +| releaseToNpm | boolean | Automatically release to npm when new versions are introduced. | +| releaseWorkflow | boolean | DEPRECATED: renamed to `release`. | +| workflowBootstrapSteps | projen.github.workflows.JobStep[] | Workflow steps to use in order to bootstrap this repo. | +| workflowGitIdentity | projen.github.GitIdentity | The git identity to use in workflows. | +| workflowNodeVersion | string | The node version to use in GitHub workflows. | +| workflowPackageCache | boolean | Enable Node.js package cache in GitHub workflows. | +| disableTsconfig | boolean | Do not generate a `tsconfig.json` file (used by jsii projects since tsconfig.json is generated by the jsii compiler). | +| disableTsconfigDev | boolean | Do not generate a `tsconfig.dev.json` file. | +| docgen | boolean | Docgen by Typedoc. | +| docsDirectory | string | Docs directory. | +| entrypointTypes | string | The .d.ts file that includes the type declarations for this module. | +| eslint | boolean | Setup eslint. | +| eslintOptions | projen.javascript.EslintOptions | Eslint options. | +| libdir | string | Typescript artifacts output directory. | +| projenrcTs | boolean | Use TypeScript for your projenrc file (`.projenrc.ts`). | +| projenrcTsOptions | projen.typescript.ProjenrcOptions | Options for .projenrc.ts. | +| sampleCode | boolean | Generate one-time sample in `src/` and `test/` if there are no files there. | +| srcdir | string | Typescript sources directory. | +| testdir | string | Jest tests directory. Tests files should be named `xxx.test.ts`. | +| tsconfig | projen.javascript.TypescriptConfigOptions | Custom TSConfig. | +| tsconfigDev | projen.javascript.TypescriptConfigOptions | Custom tsconfig options for the development tsconfig.json file (used for testing). | +| tsconfigDevFile | string | The name of the development tsconfig.json file. | +| typescriptVersion | string | TypeScript version to use. | +| cdktfVersion | string | Minimum target version this app can be run against. | +| constructsVersion | string | Construct version to use. | +| cdktfConfig | CdktfConfigOptions | The CDKTF cli configuration. | + +--- + +##### `name`Required + +```typescript +public readonly name: string; +``` + +- *Type:* string +- *Default:* $BASEDIR + +This is the name of your project. + +--- + +##### `commitGenerated`Optional + +```typescript +public readonly commitGenerated: boolean; +``` + +- *Type:* boolean +- *Default:* true + +Whether to commit the managed files by default. + +--- + +##### `gitIgnoreOptions`Optional + +```typescript +public readonly gitIgnoreOptions: IgnoreFileOptions; +``` + +- *Type:* projen.IgnoreFileOptions + +Configuration options for .gitignore file. + +--- + +##### `gitOptions`Optional + +```typescript +public readonly gitOptions: GitOptions; +``` + +- *Type:* projen.GitOptions + +Configuration options for git. + +--- + +##### `logging`Optional + +```typescript +public readonly logging: LoggerOptions; +``` + +- *Type:* projen.LoggerOptions +- *Default:* {} + +Configure logging options such as verbosity. + +--- + +##### `outdir`Optional + +```typescript +public readonly outdir: string; +``` + +- *Type:* string +- *Default:* "." + +The root directory of the project. + +Relative to this directory, all files are synthesized. + +If this project has a parent, this directory is relative to the parent +directory and it cannot be the same as the parent or any of it's other +sub-projects. + +--- + +##### `parent`Optional + +```typescript +public readonly parent: Project; +``` + +- *Type:* projen.Project + +The parent project, if this project is part of a bigger project. + +--- + +##### `projenCommand`Optional + +```typescript +public readonly projenCommand: string; +``` + +- *Type:* string +- *Default:* "npx projen" + +The shell command to use in order to run the projen CLI. + +Can be used to customize in special environments. + +--- + +##### `projenrcJson`Optional + +```typescript +public readonly projenrcJson: boolean; +``` + +- *Type:* boolean +- *Default:* false + +Generate (once) .projenrc.json (in JSON). Set to `false` in order to disable .projenrc.json generation. + +--- + +##### `projenrcJsonOptions`Optional + +```typescript +public readonly projenrcJsonOptions: ProjenrcJsonOptions; +``` + +- *Type:* projen.ProjenrcJsonOptions +- *Default:* default options + +Options for .projenrc.json. + +--- + +##### `renovatebot`Optional + +```typescript +public readonly renovatebot: boolean; +``` + +- *Type:* boolean +- *Default:* false + +Use renovatebot to handle dependency upgrades. + +--- + +##### `renovatebotOptions`Optional + +```typescript +public readonly renovatebotOptions: RenovatebotOptions; +``` + +- *Type:* projen.RenovatebotOptions +- *Default:* default options + +Options for renovatebot. + +--- + +##### `autoApproveOptions`Optional + +```typescript +public readonly autoApproveOptions: AutoApproveOptions; +``` + +- *Type:* projen.github.AutoApproveOptions +- *Default:* auto approve is disabled + +Enable and configure the 'auto approve' workflow. + +--- + +##### `autoMerge`Optional + +```typescript +public readonly autoMerge: boolean; +``` + +- *Type:* boolean +- *Default:* true + +Enable automatic merging on GitHub. + +Has no effect if `github.mergify` +is set to false. + +--- + +##### `autoMergeOptions`Optional + +```typescript +public readonly autoMergeOptions: AutoMergeOptions; +``` + +- *Type:* projen.github.AutoMergeOptions +- *Default:* see defaults in `AutoMergeOptions` + +Configure options for automatic merging on GitHub. + +Has no effect if +`github.mergify` or `autoMerge` is set to false. + +--- + +##### `clobber`Optional + +```typescript +public readonly clobber: boolean; +``` + +- *Type:* boolean +- *Default:* true, but false for subprojects + +Add a `clobber` task which resets the repo to origin. + +--- + +##### `devContainer`Optional + +```typescript +public readonly devContainer: boolean; +``` + +- *Type:* boolean +- *Default:* false + +Add a VSCode development environment (used for GitHub Codespaces). + +--- + +##### `github`Optional + +```typescript +public readonly github: boolean; +``` + +- *Type:* boolean +- *Default:* true + +Enable GitHub integration. + +Enabled by default for root projects. Disabled for non-root projects. + +--- + +##### `githubOptions`Optional + +```typescript +public readonly githubOptions: GitHubOptions; +``` + +- *Type:* projen.github.GitHubOptions +- *Default:* see GitHubOptions + +Options for GitHub integration. + +--- + +##### `gitpod`Optional + +```typescript +public readonly gitpod: boolean; +``` + +- *Type:* boolean +- *Default:* false + +Add a Gitpod development environment. + +--- + +##### ~~`mergify`~~Optional + +- *Deprecated:* use `githubOptions.mergify` instead + +```typescript +public readonly mergify: boolean; +``` + +- *Type:* boolean +- *Default:* true + +Whether mergify should be enabled on this repository or not. + +--- + +##### ~~`mergifyOptions`~~Optional + +- *Deprecated:* use `githubOptions.mergifyOptions` instead + +```typescript +public readonly mergifyOptions: MergifyOptions; +``` + +- *Type:* projen.github.MergifyOptions +- *Default:* default options + +Options for mergify. + +--- + +##### ~~`projectType`~~Optional + +- *Deprecated:* no longer supported at the base project level + +```typescript +public readonly projectType: ProjectType; +``` + +- *Type:* projen.ProjectType +- *Default:* ProjectType.UNKNOWN + +Which type of project this is (library/app). + +--- + +##### `projenCredentials`Optional + +```typescript +public readonly projenCredentials: GithubCredentials; +``` + +- *Type:* projen.github.GithubCredentials +- *Default:* use a personal access token named PROJEN_GITHUB_TOKEN + +Choose a method of providing GitHub API access for projen workflows. + +--- + +##### ~~`projenTokenSecret`~~Optional + +- *Deprecated:* use `projenCredentials` + +```typescript +public readonly projenTokenSecret: string; +``` + +- *Type:* string +- *Default:* "PROJEN_GITHUB_TOKEN" + +The name of a secret which includes a GitHub Personal Access Token to be used by projen workflows. + +This token needs to have the `repo`, `workflows` +and `packages` scope. + +--- + +##### `readme`Optional + +```typescript +public readonly readme: SampleReadmeProps; +``` + +- *Type:* projen.SampleReadmeProps +- *Default:* { filename: 'README.md', contents: '# replace this' } + +The README setup. + +--- + +*Example* + +```typescript +"{ filename: 'readme.md', contents: '# title' }" +``` + + +##### `stale`Optional + +```typescript +public readonly stale: boolean; +``` + +- *Type:* boolean +- *Default:* false + +Auto-close of stale issues and pull request. + +See `staleOptions` for options. + +--- + +##### `staleOptions`Optional + +```typescript +public readonly staleOptions: StaleOptions; +``` + +- *Type:* projen.github.StaleOptions +- *Default:* see defaults in `StaleOptions` + +Auto-close stale issues and pull requests. + +To disable set `stale` to `false`. + +--- + +##### `vscode`Optional + +```typescript +public readonly vscode: boolean; +``` + +- *Type:* boolean +- *Default:* true + +Enable VSCode integration. + +Enabled by default for root projects. Disabled for non-root projects. + +--- + +##### `allowLibraryDependencies`Optional + +```typescript +public readonly allowLibraryDependencies: boolean; +``` + +- *Type:* boolean +- *Default:* true + +Allow the project to include `peerDependencies` and `bundledDependencies`. + +This is normally only allowed for libraries. For apps, there's no meaning +for specifying these. + +--- + +##### `authorEmail`Optional + +```typescript +public readonly authorEmail: string; +``` + +- *Type:* string + +Author's e-mail. + +--- + +##### `authorName`Optional + +```typescript +public readonly authorName: string; +``` + +- *Type:* string + +Author's name. + +--- + +##### `authorOrganization`Optional + +```typescript +public readonly authorOrganization: boolean; +``` + +- *Type:* boolean + +Is the author an organization. + +--- + +##### `authorUrl`Optional + +```typescript +public readonly authorUrl: string; +``` + +- *Type:* string + +Author's URL / Website. + +--- + +##### `autoDetectBin`Optional + +```typescript +public readonly autoDetectBin: boolean; +``` + +- *Type:* boolean +- *Default:* true + +Automatically add all executables under the `bin` directory to your `package.json` file under the `bin` section. + +--- + +##### `bin`Optional + +```typescript +public readonly bin: {[ key: string ]: string}; +``` + +- *Type:* {[ key: string ]: string} + +Binary programs vended with your module. + +You can use this option to add/customize how binaries are represented in +your `package.json`, but unless `autoDetectBin` is `false`, every +executable file under `bin` will automatically be added to this section. + +--- + +##### `bugsEmail`Optional + +```typescript +public readonly bugsEmail: string; +``` + +- *Type:* string + +The email address to which issues should be reported. + +--- + +##### `bugsUrl`Optional + +```typescript +public readonly bugsUrl: string; +``` + +- *Type:* string + +The url to your project's issue tracker. + +--- + +##### `bundledDeps`Optional + +```typescript +public readonly bundledDeps: string[]; +``` + +- *Type:* string[] + +List of dependencies to bundle into this module. + +These modules will be +added both to the `dependencies` section and `bundledDependencies` section of +your `package.json`. + +The recommendation is to only specify the module name here (e.g. +`express`). This will behave similar to `yarn add` or `npm install` in the +sense that it will add the module as a dependency to your `package.json` +file with the latest version (`^`). You can specify semver requirements in +the same syntax passed to `npm i` or `yarn add` (e.g. `express@^2`) and +this will be what you `package.json` will eventually include. + +--- + +##### `codeArtifactOptions`Optional + +```typescript +public readonly codeArtifactOptions: CodeArtifactOptions; +``` + +- *Type:* projen.javascript.CodeArtifactOptions +- *Default:* undefined + +Options for npm packages using AWS CodeArtifact. + +This is required if publishing packages to, or installing scoped packages from AWS CodeArtifact + +--- + +##### `deps`Optional + +```typescript +public readonly deps: string[]; +``` + +- *Type:* string[] +- *Default:* [] + +Runtime dependencies of this module. + +The recommendation is to only specify the module name here (e.g. +`express`). This will behave similar to `yarn add` or `npm install` in the +sense that it will add the module as a dependency to your `package.json` +file with the latest version (`^`). You can specify semver requirements in +the same syntax passed to `npm i` or `yarn add` (e.g. `express@^2`) and +this will be what you `package.json` will eventually include. + +--- + +*Example* + +```typescript +[ 'express', 'lodash', 'foo@^2' ] +``` + + +##### `description`Optional + +```typescript +public readonly description: string; +``` + +- *Type:* string + +The description is just a string that helps people understand the purpose of the package. + +It can be used when searching for packages in a package manager as well. +See https://classic.yarnpkg.com/en/docs/package-json/#toc-description + +--- + +##### `devDeps`Optional + +```typescript +public readonly devDeps: string[]; +``` + +- *Type:* string[] +- *Default:* [] + +Build dependencies for this module. + +These dependencies will only be +available in your build environment but will not be fetched when this +module is consumed. + +The recommendation is to only specify the module name here (e.g. +`express`). This will behave similar to `yarn add` or `npm install` in the +sense that it will add the module as a dependency to your `package.json` +file with the latest version (`^`). You can specify semver requirements in +the same syntax passed to `npm i` or `yarn add` (e.g. `express@^2`) and +this will be what you `package.json` will eventually include. + +--- + +*Example* + +```typescript +[ 'typescript', '@types/express' ] +``` + + +##### `entrypoint`Optional + +```typescript +public readonly entrypoint: string; +``` + +- *Type:* string +- *Default:* "lib/index.js" + +Module entrypoint (`main` in `package.json`). + +Set to an empty string to not include `main` in your package.json + +--- + +##### `homepage`Optional + +```typescript +public readonly homepage: string; +``` + +- *Type:* string + +Package's Homepage / Website. + +--- + +##### `keywords`Optional + +```typescript +public readonly keywords: string[]; +``` + +- *Type:* string[] + +Keywords to include in `package.json`. + +--- + +##### `license`Optional + +```typescript +public readonly license: string; +``` + +- *Type:* string +- *Default:* "Apache-2.0" + +License's SPDX identifier. + +See https://github.com/projen/projen/tree/main/license-text for a list of supported licenses. +Use the `licensed` option if you want to no license to be specified. + +--- + +##### `licensed`Optional + +```typescript +public readonly licensed: boolean; +``` + +- *Type:* boolean +- *Default:* true + +Indicates if a license should be added. + +--- + +##### `maxNodeVersion`Optional + +```typescript +public readonly maxNodeVersion: string; +``` + +- *Type:* string +- *Default:* no max + +Minimum node.js version to require via `engines` (inclusive). + +--- + +##### `minNodeVersion`Optional + +```typescript +public readonly minNodeVersion: string; +``` + +- *Type:* string +- *Default:* no "engines" specified + +Minimum Node.js version to require via package.json `engines` (inclusive). + +--- + +##### `npmAccess`Optional + +```typescript +public readonly npmAccess: NpmAccess; +``` + +- *Type:* projen.javascript.NpmAccess +- *Default:* for scoped packages (e.g. `foo@bar`), the default is `NpmAccess.RESTRICTED`, for non-scoped packages, the default is `NpmAccess.PUBLIC`. + +Access level of the npm package. + +--- + +##### ~~`npmRegistry`~~Optional + +- *Deprecated:* use `npmRegistryUrl` instead + +```typescript +public readonly npmRegistry: string; +``` + +- *Type:* string + +The host name of the npm registry to publish to. + +Cannot be set together with `npmRegistryUrl`. + +--- + +##### `npmRegistryUrl`Optional + +```typescript +public readonly npmRegistryUrl: string; +``` + +- *Type:* string +- *Default:* "https://registry.npmjs.org" + +The base URL of the npm package registry. + +Must be a URL (e.g. start with "https://" or "http://") + +--- + +##### `npmTokenSecret`Optional + +```typescript +public readonly npmTokenSecret: string; +``` + +- *Type:* string +- *Default:* "NPM_TOKEN" + +GitHub secret which contains the NPM token to use when publishing packages. + +--- + +##### `packageManager`Optional + +```typescript +public readonly packageManager: NodePackageManager; +``` + +- *Type:* projen.javascript.NodePackageManager +- *Default:* NodePackageManager.YARN + +The Node Package Manager used to execute scripts. + +--- + +##### `packageName`Optional + +```typescript +public readonly packageName: string; +``` + +- *Type:* string +- *Default:* defaults to project name + +The "name" in package.json. + +--- + +##### `peerDependencyOptions`Optional + +```typescript +public readonly peerDependencyOptions: PeerDependencyOptions; +``` + +- *Type:* projen.javascript.PeerDependencyOptions + +Options for `peerDeps`. + +--- + +##### `peerDeps`Optional + +```typescript +public readonly peerDeps: string[]; +``` + +- *Type:* string[] +- *Default:* [] + +Peer dependencies for this module. + +Dependencies listed here are required to +be installed (and satisfied) by the _consumer_ of this library. Using peer +dependencies allows you to ensure that only a single module of a certain +library exists in the `node_modules` tree of your consumers. + +Note that prior to npm@7, peer dependencies are _not_ automatically +installed, which means that adding peer dependencies to a library will be a +breaking change for your customers. + +Unless `peerDependencyOptions.pinnedDevDependency` is disabled (it is +enabled by default), projen will automatically add a dev dependency with a +pinned version for each peer dependency. This will ensure that you build & +test your module against the lowest peer version required. + +--- + +##### `pnpmVersion`Optional + +```typescript +public readonly pnpmVersion: string; +``` + +- *Type:* string +- *Default:* "7" + +The version of PNPM to use if using PNPM as a package manager. + +--- + +##### `repository`Optional + +```typescript +public readonly repository: string; +``` + +- *Type:* string + +The repository is the location where the actual code for your package lives. + +See https://classic.yarnpkg.com/en/docs/package-json/#toc-repository + +--- + +##### `repositoryDirectory`Optional + +```typescript +public readonly repositoryDirectory: string; +``` + +- *Type:* string + +If the package.json for your package is not in the root directory (for example if it is part of a monorepo), you can specify the directory in which it lives. + +--- + +##### `scopedPackagesOptions`Optional + +```typescript +public readonly scopedPackagesOptions: ScopedPackagesOptions[]; +``` + +- *Type:* projen.javascript.ScopedPackagesOptions[] +- *Default:* fetch all scoped packages from the public npm registry + +Options for privately hosted scoped packages. + +--- + +##### ~~`scripts`~~Optional + +- *Deprecated:* use `project.addTask()` or `package.setScript()` + +```typescript +public readonly scripts: {[ key: string ]: string}; +``` + +- *Type:* {[ key: string ]: string} +- *Default:* {} + +npm scripts to include. + +If a script has the same name as a standard script, +the standard script will be overwritten. +Also adds the script as a task. + +--- + +##### `stability`Optional + +```typescript +public readonly stability: string; +``` + +- *Type:* string + +Package's Stability. + +--- + +##### `jsiiReleaseVersion`Optional + +```typescript +public readonly jsiiReleaseVersion: string; +``` + +- *Type:* string +- *Default:* "latest" + +Version requirement of `publib` which is used to publish modules to npm. + +--- + +##### `majorVersion`Optional + +```typescript +public readonly majorVersion: number; +``` + +- *Type:* number +- *Default:* Major version is not enforced. + +Major version to release from the default branch. + +If this is specified, we bump the latest version of this major version line. +If not specified, we bump the global latest version. + +--- + +##### `minMajorVersion`Optional + +```typescript +public readonly minMajorVersion: number; +``` + +- *Type:* number +- *Default:* No minimum version is being enforced + +Minimal Major version to release. + +This can be useful to set to 1, as breaking changes before the 1.x major +release are not incrementing the major version number. + +Can not be set together with `majorVersion`. + +--- + +##### `npmDistTag`Optional + +```typescript +public readonly npmDistTag: string; +``` + +- *Type:* string +- *Default:* "latest" + +The npmDistTag to use when publishing from the default branch. + +To set the npm dist-tag for release branches, set the `npmDistTag` property +for each branch. + +--- + +##### `postBuildSteps`Optional + +```typescript +public readonly postBuildSteps: JobStep[]; +``` + +- *Type:* projen.github.workflows.JobStep[] +- *Default:* [] + +Steps to execute after build as part of the release workflow. + +--- + +##### `prerelease`Optional + +```typescript +public readonly prerelease: string; +``` + +- *Type:* string +- *Default:* normal semantic versions + +Bump versions from the default branch as pre-releases (e.g. "beta", "alpha", "pre"). + +--- + +##### `publishDryRun`Optional + +```typescript +public readonly publishDryRun: boolean; +``` + +- *Type:* boolean +- *Default:* false + +Instead of actually publishing to package managers, just print the publishing command. + +--- + +##### `publishTasks`Optional + +```typescript +public readonly publishTasks: boolean; +``` + +- *Type:* boolean +- *Default:* false + +Define publishing tasks that can be executed manually as well as workflows. + +Normally, publishing only happens within automated workflows. Enable this +in order to create a publishing task for each publishing activity. + +--- + +##### `releasableCommits`Optional + +```typescript +public readonly releasableCommits: ReleasableCommits; +``` + +- *Type:* projen.ReleasableCommits +- *Default:* ReleasableCommits.everyCommit() + +Find commits that should be considered releasable Used to decide if a release is required. + +--- + +##### `releaseBranches`Optional + +```typescript +public readonly releaseBranches: {[ key: string ]: BranchOptions}; +``` + +- *Type:* {[ key: string ]: projen.release.BranchOptions} +- *Default:* no additional branches are used for release. you can use `addBranch()` to add additional branches. + +Defines additional release branches. + +A workflow will be created for each +release branch which will publish releases from commits in this branch. +Each release branch _must_ be assigned a major version number which is used +to enforce that versions published from that branch always use that major +version. If multiple branches are used, the `majorVersion` field must also +be provided for the default branch. + +--- + +##### ~~`releaseEveryCommit`~~Optional + +- *Deprecated:* Use `releaseTrigger: ReleaseTrigger.continuous()` instead + +```typescript +public readonly releaseEveryCommit: boolean; +``` + +- *Type:* boolean +- *Default:* true + +Automatically release new versions every commit to one of branches in `releaseBranches`. + +--- + +##### `releaseFailureIssue`Optional + +```typescript +public readonly releaseFailureIssue: boolean; +``` + +- *Type:* boolean +- *Default:* false + +Create a github issue on every failed publishing task. + +--- + +##### `releaseFailureIssueLabel`Optional + +```typescript +public readonly releaseFailureIssueLabel: string; +``` + +- *Type:* string +- *Default:* "failed-release" + +The label to apply to issues indicating publish failures. + +Only applies if `releaseFailureIssue` is true. + +--- + +##### ~~`releaseSchedule`~~Optional + +- *Deprecated:* Use `releaseTrigger: ReleaseTrigger.scheduled()` instead + +```typescript +public readonly releaseSchedule: string; +``` + +- *Type:* string +- *Default:* no scheduled releases + +CRON schedule to trigger new releases. + +--- + +##### `releaseTagPrefix`Optional + +```typescript +public readonly releaseTagPrefix: string; +``` + +- *Type:* string +- *Default:* "v" + +Automatically add the given prefix to release tags. Useful if you are releasing on multiple branches with overlapping version numbers. + +Note: this prefix is used to detect the latest tagged version +when bumping, so if you change this on a project with an existing version +history, you may need to manually tag your latest release +with the new prefix. + +--- + +##### `releaseTrigger`Optional + +```typescript +public readonly releaseTrigger: ReleaseTrigger; +``` + +- *Type:* projen.release.ReleaseTrigger +- *Default:* Continuous releases (`ReleaseTrigger.continuous()`) + +The release trigger to use. + +--- + +##### `releaseWorkflowName`Optional + +```typescript +public readonly releaseWorkflowName: string; +``` + +- *Type:* string +- *Default:* "Release" + +The name of the default release workflow. + +--- + +##### `releaseWorkflowSetupSteps`Optional + +```typescript +public readonly releaseWorkflowSetupSteps: JobStep[]; +``` + +- *Type:* projen.github.workflows.JobStep[] + +A set of workflow steps to execute in order to setup the workflow container. + +--- + +##### `versionrcOptions`Optional + +```typescript +public readonly versionrcOptions: {[ key: string ]: any}; +``` + +- *Type:* {[ key: string ]: any} +- *Default:* standard configuration applicable for GitHub repositories + +Custom configuration used when creating changelog with standard-version package. + +Given values either append to default configuration or overwrite values in it. + +--- + +##### `workflowContainerImage`Optional + +```typescript +public readonly workflowContainerImage: string; +``` + +- *Type:* string +- *Default:* default image + +Container image to use for GitHub workflows. + +--- + +##### `workflowRunsOn`Optional + +```typescript +public readonly workflowRunsOn: string[]; +``` + +- *Type:* string[] +- *Default:* ["ubuntu-latest"] + +Github Runner selection labels. + +--- + +##### `defaultReleaseBranch`Required + +```typescript +public readonly defaultReleaseBranch: string; +``` + +- *Type:* string +- *Default:* "main" + +The name of the main release branch. + +--- + +##### `artifactsDirectory`Optional + +```typescript +public readonly artifactsDirectory: string; +``` + +- *Type:* string +- *Default:* "dist" + +A directory which will contain build artifacts. + +--- + +##### `autoApproveUpgrades`Optional + +```typescript +public readonly autoApproveUpgrades: boolean; +``` + +- *Type:* boolean +- *Default:* true + +Automatically approve deps upgrade PRs, allowing them to be merged by mergify (if configued). + +Throw if set to true but `autoApproveOptions` are not defined. + +--- + +##### `buildWorkflow`Optional + +```typescript +public readonly buildWorkflow: boolean; +``` + +- *Type:* boolean +- *Default:* true if not a subproject + +Define a GitHub workflow for building PRs. + +--- + +##### `buildWorkflowTriggers`Optional + +```typescript +public readonly buildWorkflowTriggers: Triggers; +``` + +- *Type:* projen.github.workflows.Triggers +- *Default:* "{ pullRequest: {}, workflowDispatch: {} }" + +Build workflow triggers. + +--- + +##### `bundlerOptions`Optional + +```typescript +public readonly bundlerOptions: BundlerOptions; +``` + +- *Type:* projen.javascript.BundlerOptions + +Options for `Bundler`. + +--- + +##### `codeCov`Optional + +```typescript +public readonly codeCov: boolean; +``` + +- *Type:* boolean +- *Default:* false + +Define a GitHub workflow step for sending code coverage metrics to https://codecov.io/ Uses codecov/codecov-action@v3 A secret is required for private repos. Configured with `@codeCovTokenSecret`. + +--- + +##### `codeCovTokenSecret`Optional + +```typescript +public readonly codeCovTokenSecret: string; +``` + +- *Type:* string +- *Default:* if this option is not specified, only public repositories are supported + +Define the secret name for a specified https://codecov.io/ token A secret is required to send coverage for private repositories. + +--- + +##### `copyrightOwner`Optional + +```typescript +public readonly copyrightOwner: string; +``` + +- *Type:* string +- *Default:* defaults to the value of authorName or "" if `authorName` is undefined. + +License copyright owner. + +--- + +##### `copyrightPeriod`Optional + +```typescript +public readonly copyrightPeriod: string; +``` + +- *Type:* string +- *Default:* current year + +The copyright years to put in the LICENSE file. + +--- + +##### `dependabot`Optional + +```typescript +public readonly dependabot: boolean; +``` + +- *Type:* boolean +- *Default:* false + +Use dependabot to handle dependency upgrades. + +Cannot be used in conjunction with `depsUpgrade`. + +--- + +##### `dependabotOptions`Optional + +```typescript +public readonly dependabotOptions: DependabotOptions; +``` + +- *Type:* projen.github.DependabotOptions +- *Default:* default options + +Options for dependabot. + +--- + +##### `depsUpgrade`Optional + +```typescript +public readonly depsUpgrade: boolean; +``` + +- *Type:* boolean +- *Default:* true + +Use github workflows to handle dependency upgrades. + +Cannot be used in conjunction with `dependabot`. + +--- + +##### `depsUpgradeOptions`Optional + +```typescript +public readonly depsUpgradeOptions: UpgradeDependenciesOptions; +``` + +- *Type:* projen.javascript.UpgradeDependenciesOptions +- *Default:* default options + +Options for `UpgradeDependencies`. + +--- + +##### `gitignore`Optional + +```typescript +public readonly gitignore: string[]; +``` + +- *Type:* string[] + +Additional entries to .gitignore. + +--- + +##### `jest`Optional + +```typescript +public readonly jest: boolean; +``` + +- *Type:* boolean +- *Default:* true + +Setup jest unit tests. + +--- + +##### `jestOptions`Optional + +```typescript +public readonly jestOptions: JestOptions; +``` + +- *Type:* projen.javascript.JestOptions +- *Default:* default options + +Jest options. + +--- + +##### `mutableBuild`Optional + +```typescript +public readonly mutableBuild: boolean; +``` + +- *Type:* boolean +- *Default:* true + +Automatically update files modified during builds to pull-request branches. + +This means +that any files synthesized by projen or e.g. test snapshots will always be up-to-date +before a PR is merged. + +Implies that PR builds do not have anti-tamper checks. + +--- + +##### ~~`npmignore`~~Optional + +- *Deprecated:* - use `project.addPackageIgnore` + +```typescript +public readonly npmignore: string[]; +``` + +- *Type:* string[] + +Additional entries to .npmignore. + +--- + +##### `npmignoreEnabled`Optional + +```typescript +public readonly npmignoreEnabled: boolean; +``` + +- *Type:* boolean +- *Default:* true + +Defines an .npmignore file. Normally this is only needed for libraries that are packaged as tarballs. + +--- + +##### `npmIgnoreOptions`Optional + +```typescript +public readonly npmIgnoreOptions: IgnoreFileOptions; +``` + +- *Type:* projen.IgnoreFileOptions + +Configuration options for .npmignore file. + +--- + +##### `package`Optional + +```typescript +public readonly package: boolean; +``` + +- *Type:* boolean +- *Default:* true + +Defines a `package` task that will produce an npm tarball under the artifacts directory (e.g. `dist`). + +--- + +##### `prettier`Optional + +```typescript +public readonly prettier: boolean; +``` + +- *Type:* boolean +- *Default:* false + +Setup prettier. + +--- + +##### `prettierOptions`Optional + +```typescript +public readonly prettierOptions: PrettierOptions; +``` + +- *Type:* projen.javascript.PrettierOptions +- *Default:* default options + +Prettier options. + +--- + +##### `projenDevDependency`Optional + +```typescript +public readonly projenDevDependency: boolean; +``` + +- *Type:* boolean +- *Default:* true + +Indicates of "projen" should be installed as a devDependency. + +--- + +##### `projenrcJs`Optional + +```typescript +public readonly projenrcJs: boolean; +``` + +- *Type:* boolean +- *Default:* true if projenrcJson is false + +Generate (once) .projenrc.js (in JavaScript). Set to `false` in order to disable .projenrc.js generation. + +--- + +##### `projenrcJsOptions`Optional + +```typescript +public readonly projenrcJsOptions: ProjenrcOptions; +``` + +- *Type:* projen.javascript.ProjenrcOptions +- *Default:* default options + +Options for .projenrc.js. + +--- + +##### `projenVersion`Optional + +```typescript +public readonly projenVersion: string; +``` + +- *Type:* string +- *Default:* Defaults to the latest version. + +Version of projen to install. + +--- + +##### `pullRequestTemplate`Optional + +```typescript +public readonly pullRequestTemplate: boolean; +``` + +- *Type:* boolean +- *Default:* true + +Include a GitHub pull request template. + +--- + +##### `pullRequestTemplateContents`Optional + +```typescript +public readonly pullRequestTemplateContents: string[]; +``` + +- *Type:* string[] +- *Default:* default content + +The contents of the pull request template. + +--- + +##### `release`Optional + +```typescript +public readonly release: boolean; +``` + +- *Type:* boolean +- *Default:* true (false for subprojects) + +Add release management to this project. + +--- + +##### `releaseToNpm`Optional + +```typescript +public readonly releaseToNpm: boolean; +``` + +- *Type:* boolean +- *Default:* false + +Automatically release to npm when new versions are introduced. + +--- + +##### ~~`releaseWorkflow`~~Optional + +- *Deprecated:* see `release`. + +```typescript +public readonly releaseWorkflow: boolean; +``` + +- *Type:* boolean +- *Default:* true if not a subproject + +DEPRECATED: renamed to `release`. + +--- + +##### `workflowBootstrapSteps`Optional + +```typescript +public readonly workflowBootstrapSteps: JobStep[]; +``` + +- *Type:* projen.github.workflows.JobStep[] +- *Default:* "yarn install --frozen-lockfile && yarn projen" + +Workflow steps to use in order to bootstrap this repo. + +--- + +##### `workflowGitIdentity`Optional + +```typescript +public readonly workflowGitIdentity: GitIdentity; +``` + +- *Type:* projen.github.GitIdentity +- *Default:* GitHub Actions + +The git identity to use in workflows. + +--- + +##### `workflowNodeVersion`Optional + +```typescript +public readonly workflowNodeVersion: string; +``` + +- *Type:* string +- *Default:* same as `minNodeVersion` + +The node version to use in GitHub workflows. + +--- + +##### `workflowPackageCache`Optional + +```typescript +public readonly workflowPackageCache: boolean; +``` + +- *Type:* boolean +- *Default:* false + +Enable Node.js package cache in GitHub workflows. + +--- + +##### `disableTsconfig`Optional + +```typescript +public readonly disableTsconfig: boolean; +``` + +- *Type:* boolean +- *Default:* false + +Do not generate a `tsconfig.json` file (used by jsii projects since tsconfig.json is generated by the jsii compiler). + +--- + +##### `disableTsconfigDev`Optional + +```typescript +public readonly disableTsconfigDev: boolean; +``` + +- *Type:* boolean +- *Default:* false + +Do not generate a `tsconfig.dev.json` file. + +--- + +##### `docgen`Optional + +```typescript +public readonly docgen: boolean; +``` + +- *Type:* boolean +- *Default:* false + +Docgen by Typedoc. + +--- + +##### `docsDirectory`Optional + +```typescript +public readonly docsDirectory: string; +``` + +- *Type:* string +- *Default:* "docs" + +Docs directory. + +--- + +##### `entrypointTypes`Optional + +```typescript +public readonly entrypointTypes: string; +``` + +- *Type:* string +- *Default:* .d.ts file derived from the project's entrypoint (usually lib/index.d.ts) + +The .d.ts file that includes the type declarations for this module. + +--- + +##### `eslint`Optional + +```typescript +public readonly eslint: boolean; +``` + +- *Type:* boolean +- *Default:* true + +Setup eslint. + +--- + +##### `eslintOptions`Optional + +```typescript +public readonly eslintOptions: EslintOptions; +``` + +- *Type:* projen.javascript.EslintOptions +- *Default:* opinionated default options + +Eslint options. + +--- + +##### `libdir`Optional + +```typescript +public readonly libdir: string; +``` + +- *Type:* string +- *Default:* "lib" + +Typescript artifacts output directory. + +--- + +##### `projenrcTs`Optional + +```typescript +public readonly projenrcTs: boolean; +``` + +- *Type:* boolean +- *Default:* false + +Use TypeScript for your projenrc file (`.projenrc.ts`). + +--- + +##### `projenrcTsOptions`Optional + +```typescript +public readonly projenrcTsOptions: ProjenrcOptions; +``` + +- *Type:* projen.typescript.ProjenrcOptions + +Options for .projenrc.ts. + +--- + +##### `sampleCode`Optional + +```typescript +public readonly sampleCode: boolean; +``` + +- *Type:* boolean +- *Default:* true + +Generate one-time sample in `src/` and `test/` if there are no files there. + +--- + +##### `srcdir`Optional + +```typescript +public readonly srcdir: string; +``` + +- *Type:* string +- *Default:* "src" + +Typescript sources directory. + +--- + +##### `testdir`Optional + +```typescript +public readonly testdir: string; +``` + +- *Type:* string +- *Default:* "test" + +Jest tests directory. Tests files should be named `xxx.test.ts`. + +If this directory is under `srcdir` (e.g. `src/test`, `src/__tests__`), +then tests are going to be compiled into `lib/` and executed as javascript. +If the test directory is outside of `src`, then we configure jest to +compile the code in-memory. + +--- + +##### `tsconfig`Optional + +```typescript +public readonly tsconfig: TypescriptConfigOptions; +``` + +- *Type:* projen.javascript.TypescriptConfigOptions +- *Default:* default options + +Custom TSConfig. + +--- + +##### `tsconfigDev`Optional + +```typescript +public readonly tsconfigDev: TypescriptConfigOptions; +``` + +- *Type:* projen.javascript.TypescriptConfigOptions +- *Default:* use the production tsconfig options + +Custom tsconfig options for the development tsconfig.json file (used for testing). + +--- + +##### `tsconfigDevFile`Optional + +```typescript +public readonly tsconfigDevFile: string; +``` + +- *Type:* string +- *Default:* "tsconfig.dev.json" + +The name of the development tsconfig.json file. + +--- + +##### `typescriptVersion`Optional + +```typescript +public readonly typescriptVersion: string; +``` + +- *Type:* string +- *Default:* "latest" + +TypeScript version to use. + +NOTE: Typescript is not semantically versioned and should remain on the +same minor, so we recommend using a `~` dependency (e.g. `~1.2.3`). + +--- + +##### `cdktfVersion`Required + +```typescript +public readonly cdktfVersion: string; +``` + +- *Type:* string +- *Default:* "latest" + +Minimum target version this app can be run against. + +--- + +##### `constructsVersion`Required + +```typescript +public readonly constructsVersion: string; +``` + +- *Type:* string +- *Default:* "latest" + +Construct version to use. + +--- + +##### `cdktfConfig`Optional + +```typescript +public readonly cdktfConfig: CdktfConfigOptions; +``` + +- *Type:* CdktfConfigOptions + +The CDKTF cli configuration. + +--- + +### Element + +The schema of a Yaml element. + +#### Initializer + +```typescript +import { Element } from '@gmeligio/project-gen' + +const element: Element = { ... } +``` + +#### Properties + +| **Name** | **Type** | **Description** | +| --- | --- | --- | +| value | string | The new value to set. | +| comment | string | An optional comment to add to the element. | + +--- + +##### `value`Required + +```typescript +public readonly value: string; +``` + +- *Type:* string + +The new value to set. + +--- + +##### `comment`Optional + +```typescript +public readonly comment: string; +``` + +- *Type:* string + +An optional comment to add to the element. + +--- + +### TerraformDependencyConstraint + +#### Initializer + +```typescript +import { TerraformDependencyConstraint } from '@gmeligio/project-gen' + +const terraformDependencyConstraint: TerraformDependencyConstraint = { ... } +``` + +#### Properties + +| **Name** | **Type** | **Description** | +| --- | --- | --- | +| name | string | Name of the module / provider. | +| fqn | string | Fully qualified name of the module / provider. | +| namespace | string | Namespace of the module / provider. | +| source | string | Path / url / registry identifier for the module / provider. | +| version | string | Version constraint (https://www.terraform.io/docs/language/providers/requirements.html#version-constraints). | + +--- + +##### `name`Required + +```typescript +public readonly name: string; +``` + +- *Type:* string + +Name of the module / provider. + +--- + +##### `fqn`Optional + +```typescript +public readonly fqn: string; +``` + +- *Type:* string + +Fully qualified name of the module / provider. + +--- + +##### `namespace`Optional + +```typescript +public readonly namespace: string; +``` + +- *Type:* string + +Namespace of the module / provider. + +--- + +##### `source`Optional + +```typescript +public readonly source: string; +``` + +- *Type:* string + +Path / url / registry identifier for the module / provider. + +--- + +##### `version`Optional + +```typescript +public readonly version: string; +``` + +- *Type:* string + +Version constraint (https://www.terraform.io/docs/language/providers/requirements.html#version-constraints). + +--- + +### YamlElement + +An element to apply transformations to. + +#### Initializer + +```typescript +import { YamlElement } from '@gmeligio/project-gen' + +const yamlElement: YamlElement = { ... } +``` + +#### Properties + +| **Name** | **Type** | **Description** | +| --- | --- | --- | +| element | Element | The new element to set. | +| path | string \| number[] | The YAML path to the element to be updated. | + +--- + +##### `element`Required + +```typescript +public readonly element: Element; +``` + +- *Type:* Element + +The new element to set. + +--- + +##### `path`Required + +```typescript +public readonly path: string | number[]; +``` + +- *Type:* string | number[] + +The YAML path to the element to be updated. + +--- + +### YamlTransformerOptions + +The options of the RenovateTransformer constructor. + +#### Initializer + +```typescript +import { YamlTransformerOptions } from '@gmeligio/project-gen' + +const yamlTransformerOptions: YamlTransformerOptions = { ... } +``` + +#### Properties + +| **Name** | **Type** | **Description** | +| --- | --- | --- | +| path | string | The path to the file to be transformed. | + +--- + +##### `path`Required + +```typescript +public readonly path: string; +``` + +- *Type:* string + +The path to the file to be transformed. + +--- + +### YamlTreeOptions + +The YamlTree options. + +#### Initializer + +```typescript +import { YamlTreeOptions } from '@gmeligio/project-gen' + +const yamlTreeOptions: YamlTreeOptions = { ... } +``` + +#### Properties + +| **Name** | **Type** | **Description** | +| --- | --- | --- | +| path | string \| number[] | The path to the element where the elements will be transformed. | + +--- + +##### `path`Required + +```typescript +public readonly path: string | number[]; +``` + +- *Type:* string | number[] + +The path to the element where the elements will be transformed. + +--- + +## Classes + +### CdktfConfig + +#### Initializers + +```typescript +import { CdktfConfig } from '@gmeligio/project-gen' + +new CdktfConfig(project: Project, options: CdktfConfigOptions) +``` + +| **Name** | **Type** | **Description** | +| --- | --- | --- | +| project | projen.Project | *No description.* | +| options | CdktfConfigOptions | *No description.* | + +--- + +##### `project`Required + +- *Type:* projen.Project + +--- + +##### `options`Required + +- *Type:* CdktfConfigOptions + +--- + +#### Methods + +| **Name** | **Description** | +| --- | --- | +| postSynthesize | Called after synthesis. | +| preSynthesize | Called before synthesis. | +| synthesize | Synthesizes files to the project output directory. | + +--- + +##### `postSynthesize` + +```typescript +public postSynthesize(): void +``` + +Called after synthesis. + +Order is *not* guaranteed. + +##### `preSynthesize` + +```typescript +public preSynthesize(): void +``` + +Called before synthesis. + +##### `synthesize` + +```typescript +public synthesize(): void +``` + +Synthesizes files to the project output directory. + + +#### Properties + +| **Name** | **Type** | **Description** | +| --- | --- | --- | +| project | projen.Project | *No description.* | +| app | string | The command to run in order to synthesize the code to Terraform compatible JSON (language specific). | +| json | projen.JsonFile | The command to run in order to synthesize the code to Terraform compatible JSON. | +| language | string | Target language for building provider or module bindings. | +| projectId | string | Unique identifier for the project used to differentiate projects. | +| sendCrashReports | string | Whether to send crash reports to the CDKTF team. | +| terraformModules | string \| TerraformDependencyConstraint[] | Terraform Modules to build. | +| terraformProviders | string \| TerraformDependencyConstraint[] | Terraform Providers to build. | + +--- + +##### `project`Required + +```typescript +public readonly project: Project; +``` + +- *Type:* projen.Project + +--- + +##### `app`Required + +```typescript +public readonly app: string; +``` + +- *Type:* string + +The command to run in order to synthesize the code to Terraform compatible JSON (language specific). + +--- + +##### `json`Required + +```typescript +public readonly json: JsonFile; +``` + +- *Type:* projen.JsonFile + +The command to run in order to synthesize the code to Terraform compatible JSON. + +--- + +##### `language`Required + +```typescript +public readonly language: string; +``` + +- *Type:* string + +Target language for building provider or module bindings. + +Currently supported: `typescript`, `python`, `java`, `csharp`, and `go` + +--- + +##### `projectId`Required + +```typescript +public readonly projectId: string; +``` + +- *Type:* string + +Unique identifier for the project used to differentiate projects. + +--- + +##### `sendCrashReports`Required + +```typescript +public readonly sendCrashReports: string; +``` + +- *Type:* string + +Whether to send crash reports to the CDKTF team. + +--- + +##### `terraformModules`Required + +```typescript +public readonly terraformModules: string | TerraformDependencyConstraint[]; +``` + +- *Type:* string | TerraformDependencyConstraint[] + +Terraform Modules to build. + +--- + +##### `terraformProviders`Required + +```typescript +public readonly terraformProviders: string | TerraformDependencyConstraint[]; +``` + +- *Type:* string | TerraformDependencyConstraint[] + +Terraform Providers to build. + +--- + + +### CdktfTasks + +Adds standard AWS CDK tasks to your project. + +#### Initializers + +```typescript +import { CdktfTasks } from '@gmeligio/project-gen' + +new CdktfTasks(project: Project) +``` + +| **Name** | **Type** | **Description** | +| --- | --- | --- | +| project | projen.Project | *No description.* | + +--- + +##### `project`Required + +- *Type:* projen.Project + +--- + +#### Methods + +| **Name** | **Description** | +| --- | --- | +| postSynthesize | Called after synthesis. | +| preSynthesize | Called before synthesis. | +| synthesize | Synthesizes files to the project output directory. | + +--- + +##### `postSynthesize` + +```typescript +public postSynthesize(): void +``` + +Called after synthesis. + +Order is *not* guaranteed. + +##### `preSynthesize` + +```typescript +public preSynthesize(): void +``` + +Called before synthesis. + +##### `synthesize` + +```typescript +public synthesize(): void +``` + +Synthesizes files to the project output directory. + + +#### Properties + +| **Name** | **Type** | **Description** | +| --- | --- | --- | +| project | projen.Project | *No description.* | +| deploy | projen.Task | Deploy the given stacks. | +| destroy | projen.Task | Destroy the given stacks. | +| diff | projen.Task | Perform a diff (terraform plan) for the given stack. | +| get | projen.Task | Generate CDK Constructs for Terraform providers and modules. | +| synth | projen.Task | Synthesizes Terraform code for the given app in a directory. | + +--- + +##### `project`Required + +```typescript +public readonly project: Project; +``` + +- *Type:* projen.Project + +--- + +##### `deploy`Required + +```typescript +public readonly deploy: Task; +``` + +- *Type:* projen.Task + +Deploy the given stacks. + +--- + +##### `destroy`Required + +```typescript +public readonly destroy: Task; +``` + +- *Type:* projen.Task + +Destroy the given stacks. + +--- + +##### `diff`Required + +```typescript +public readonly diff: Task; +``` + +- *Type:* projen.Task + +Perform a diff (terraform plan) for the given stack. + +--- + +##### `get`Required + +```typescript +public readonly get: Task; +``` + +- *Type:* projen.Task + +Generate CDK Constructs for Terraform providers and modules. + +--- + +##### `synth`Required + +```typescript +public readonly synth: Task; +``` + +- *Type:* projen.Task + +Synthesizes Terraform code for the given app in a directory. + +--- + + +### CdktfTypeScriptApp + +#### Initializers + +```typescript +import { CdktfTypeScriptApp } from '@gmeligio/project-gen' + +new CdktfTypeScriptApp(options: CdktfTypeScriptAppOptions) +``` + +| **Name** | **Type** | **Description** | +| --- | --- | --- | +| options | CdktfTypeScriptAppOptions | *No description.* | + +--- + +##### `options`Required + +- *Type:* CdktfTypeScriptAppOptions + +--- + +#### Methods + +| **Name** | **Description** | +| --- | --- | +| addExcludeFromCleanup | Exclude the matching files from pre-synth cleanup. | +| addGitIgnore | Adds a .gitignore pattern. | +| addPackageIgnore | Exclude these files from the bundled package. | +| addTask | Adds a new task to this project. | +| addTip | Prints a "tip" message during synthesis. | +| annotateGenerated | Marks the provided file(s) as being generated. | +| postSynthesize | Called after all components are synthesized. | +| preSynthesize | Called before all components are synthesized. | +| removeTask | Removes a task from a project. | +| runTaskCommand | Returns the shell command to execute in order to run a task. | +| synth | Synthesize all project files into `outdir`. | +| tryFindFile | Finds a file at the specified relative path within this project and all its subprojects. | +| tryFindJsonFile | Finds a json file by name. | +| tryFindObjectFile | Finds an object file (like JsonFile, YamlFile, etc.) by name. | +| tryRemoveFile | Finds a file at the specified relative path within this project and removes it. | +| addBins | *No description.* | +| addBundledDeps | Defines bundled dependencies. | +| addCompileCommand | DEPRECATED. | +| addDeps | Defines normal dependencies. | +| addDevDeps | Defines development/test dependencies. | +| addFields | Directly set fields in `package.json`. | +| addKeywords | Adds keywords to package.json (deduplicated). | +| addPeerDeps | Defines peer dependencies. | +| addScripts | Replaces the contents of multiple npm package.json scripts. | +| addTestCommand | DEPRECATED. | +| hasScript | Indicates if a script by the name name is defined. | +| removeScript | Removes the npm script (always successful). | +| renderWorkflowSetup | Returns the set of workflow steps which should be executed to bootstrap a workflow. | +| setScript | Replaces the contents of an npm package.json script. | + +--- + +##### `addExcludeFromCleanup` + +```typescript +public addExcludeFromCleanup(globs: string): void +``` + +Exclude the matching files from pre-synth cleanup. + +Can be used when, for example, some +source files include the projen marker and we don't want them to be erased during synth. + +###### `globs`Required + +- *Type:* string + +The glob patterns to match. + +--- + +##### `addGitIgnore` + +```typescript +public addGitIgnore(pattern: string): void +``` + +Adds a .gitignore pattern. + +###### `pattern`Required + +- *Type:* string + +The glob pattern to ignore. + +--- + +##### `addPackageIgnore` + +```typescript +public addPackageIgnore(pattern: string): void +``` + +Exclude these files from the bundled package. + +Implemented by project types based on the +packaging mechanism. For example, `NodeProject` delegates this to `.npmignore`. + +###### `pattern`Required + +- *Type:* string + +--- + +##### `addTask` + +```typescript +public addTask(name: string, props?: TaskOptions): Task +``` + +Adds a new task to this project. + +This will fail if the project already has +a task with this name. + +###### `name`Required + +- *Type:* string + +The task name to add. + +--- + +###### `props`Optional + +- *Type:* projen.TaskOptions + +Task properties. + +--- + +##### ~~`addTip`~~ + +```typescript +public addTip(message: string): void +``` + +Prints a "tip" message during synthesis. + +###### `message`Required + +- *Type:* string + +The message. + +--- + +##### `annotateGenerated` + +```typescript +public annotateGenerated(glob: string): void +``` + +Marks the provided file(s) as being generated. + +This is achieved using the +github-linguist attributes. Generated files do not count against the +repository statistics and language breakdown. + +> [https://github.com/github/linguist/blob/master/docs/overrides.md](https://github.com/github/linguist/blob/master/docs/overrides.md) + +###### `glob`Required + +- *Type:* string + +the glob pattern to match (could be a file path). + +--- + +##### `postSynthesize` + +```typescript +public postSynthesize(): void +``` + +Called after all components are synthesized. + +Order is *not* guaranteed. + +##### `preSynthesize` + +```typescript +public preSynthesize(): void +``` + +Called before all components are synthesized. + +##### `removeTask` + +```typescript +public removeTask(name: string): Task +``` + +Removes a task from a project. + +###### `name`Required + +- *Type:* string + +The name of the task to remove. + +--- + +##### `runTaskCommand` + +```typescript +public runTaskCommand(task: Task): string +``` + +Returns the shell command to execute in order to run a task. + +This will +typically be `npx projen TASK`. + +###### `task`Required + +- *Type:* projen.Task + +The task for which the command is required. + +--- + +##### `synth` + +```typescript +public synth(): void +``` + +Synthesize all project files into `outdir`. + +1. Call "this.preSynthesize()" +2. Delete all generated files +3. Synthesize all sub-projects +4. Synthesize all components of this project +5. Call "postSynthesize()" for all components of this project +6. Call "this.postSynthesize()" + +##### `tryFindFile` + +```typescript +public tryFindFile(filePath: string): FileBase +``` + +Finds a file at the specified relative path within this project and all its subprojects. + +###### `filePath`Required + +- *Type:* string + +The file path. + +If this path is relative, it will be resolved +from the root of _this_ project. + +--- + +##### ~~`tryFindJsonFile`~~ + +```typescript +public tryFindJsonFile(filePath: string): JsonFile +``` + +Finds a json file by name. + +###### `filePath`Required + +- *Type:* string + +The file path. + +--- + +##### `tryFindObjectFile` + +```typescript +public tryFindObjectFile(filePath: string): ObjectFile +``` + +Finds an object file (like JsonFile, YamlFile, etc.) by name. + +###### `filePath`Required + +- *Type:* string + +The file path. + +--- + +##### `tryRemoveFile` + +```typescript +public tryRemoveFile(filePath: string): FileBase +``` + +Finds a file at the specified relative path within this project and removes it. + +###### `filePath`Required + +- *Type:* string + +The file path. + +If this path is relative, it will be +resolved from the root of _this_ project. + +--- + +##### `addBins` + +```typescript +public addBins(bins: {[ key: string ]: string}): void +``` + +###### `bins`Required + +- *Type:* {[ key: string ]: string} + +--- + +##### `addBundledDeps` + +```typescript +public addBundledDeps(deps: string): void +``` + +Defines bundled dependencies. + +Bundled dependencies will be added as normal dependencies as well as to the +`bundledDependencies` section of your `package.json`. + +###### `deps`Required + +- *Type:* string + +Names modules to install. + +By default, the the dependency will +be installed in the next `npx projen` run and the version will be recorded +in your `package.json` file. You can upgrade manually or using `yarn +add/upgrade`. If you wish to specify a version range use this syntax: +`module@^7`. + +--- + +##### ~~`addCompileCommand`~~ + +```typescript +public addCompileCommand(commands: string): void +``` + +DEPRECATED. + +###### `commands`Required + +- *Type:* string + +--- + +##### `addDeps` + +```typescript +public addDeps(deps: string): void +``` + +Defines normal dependencies. + +###### `deps`Required + +- *Type:* string + +Names modules to install. + +By default, the the dependency will +be installed in the next `npx projen` run and the version will be recorded +in your `package.json` file. You can upgrade manually or using `yarn +add/upgrade`. If you wish to specify a version range use this syntax: +`module@^7`. + +--- + +##### `addDevDeps` + +```typescript +public addDevDeps(deps: string): void +``` + +Defines development/test dependencies. + +###### `deps`Required + +- *Type:* string + +Names modules to install. + +By default, the the dependency will +be installed in the next `npx projen` run and the version will be recorded +in your `package.json` file. You can upgrade manually or using `yarn +add/upgrade`. If you wish to specify a version range use this syntax: +`module@^7`. + +--- + +##### `addFields` + +```typescript +public addFields(fields: {[ key: string ]: any}): void +``` + +Directly set fields in `package.json`. + +###### `fields`Required + +- *Type:* {[ key: string ]: any} + +The fields to set. + +--- + +##### `addKeywords` + +```typescript +public addKeywords(keywords: string): void +``` + +Adds keywords to package.json (deduplicated). + +###### `keywords`Required + +- *Type:* string + +The keywords to add. + +--- + +##### `addPeerDeps` + +```typescript +public addPeerDeps(deps: string): void +``` + +Defines peer dependencies. + +When adding peer dependencies, a devDependency will also be added on the +pinned version of the declared peer. This will ensure that you are testing +your code against the minimum version required from your consumers. + +###### `deps`Required + +- *Type:* string + +Names modules to install. + +By default, the the dependency will +be installed in the next `npx projen` run and the version will be recorded +in your `package.json` file. You can upgrade manually or using `yarn +add/upgrade`. If you wish to specify a version range use this syntax: +`module@^7`. + +--- + +##### `addScripts` + +```typescript +public addScripts(scripts: {[ key: string ]: string}): void +``` + +Replaces the contents of multiple npm package.json scripts. + +###### `scripts`Required + +- *Type:* {[ key: string ]: string} + +The scripts to set. + +--- + +##### ~~`addTestCommand`~~ + +```typescript +public addTestCommand(commands: string): void +``` + +DEPRECATED. + +###### `commands`Required + +- *Type:* string + +--- + +##### ~~`hasScript`~~ + +```typescript +public hasScript(name: string): boolean +``` + +Indicates if a script by the name name is defined. + +###### `name`Required + +- *Type:* string + +The name of the script. + +--- + +##### `removeScript` + +```typescript +public removeScript(name: string): void +``` + +Removes the npm script (always successful). + +###### `name`Required + +- *Type:* string + +The name of the script. + +--- + +##### `renderWorkflowSetup` + +```typescript +public renderWorkflowSetup(options?: RenderWorkflowSetupOptions): JobStep[] +``` + +Returns the set of workflow steps which should be executed to bootstrap a workflow. + +###### `options`Optional + +- *Type:* projen.javascript.RenderWorkflowSetupOptions + +Options. + +--- + +##### `setScript` + +```typescript +public setScript(name: string, command: string): void +``` + +Replaces the contents of an npm package.json script. + +###### `name`Required + +- *Type:* string + +The script name. + +--- + +###### `command`Required + +- *Type:* string + +The command to execute. + +--- + + +#### Properties + +| **Name** | **Type** | **Description** | +| --- | --- | --- | +| buildTask | projen.Task | *No description.* | +| commitGenerated | boolean | Whether to commit the managed files by default. | +| compileTask | projen.Task | *No description.* | +| components | projen.Component[] | Returns all the components within this project. | +| deps | projen.Dependencies | Project dependencies. | +| ejected | boolean | Whether or not the project is being ejected. | +| files | projen.FileBase[] | All files in this project. | +| gitattributes | projen.GitAttributesFile | The .gitattributes file for this repository. | +| gitignore | projen.IgnoreFile | .gitignore. | +| logger | projen.Logger | Logging utilities. | +| name | string | Project name. | +| outdir | string | Absolute output directory of this project. | +| packageTask | projen.Task | *No description.* | +| postCompileTask | projen.Task | *No description.* | +| preCompileTask | projen.Task | *No description.* | +| projectBuild | projen.ProjectBuild | Manages the build process of the project. | +| projenCommand | string | The command to use in order to run the projen CLI. | +| root | projen.Project | The root project. | +| subprojects | projen.Project[] | Returns all the subprojects within this project. | +| tasks | projen.Tasks | Project tasks. | +| testTask | projen.Task | *No description.* | +| defaultTask | projen.Task | This is the "default" task, the one that executes "projen". | +| initProject | projen.InitProject | The options used when this project is bootstrapped via `projen new`. | +| parent | projen.Project | A parent project. | +| projectType | projen.ProjectType | *No description.* | +| autoApprove | projen.github.AutoApprove | Auto approve set up for this project. | +| devContainer | projen.vscode.DevContainer | Access for .devcontainer.json (used for GitHub Codespaces). | +| github | projen.github.GitHub | Access all github components. | +| gitpod | projen.Gitpod | Access for Gitpod. | +| vscode | projen.vscode.VsCode | Access all VSCode components. | +| allowLibraryDependencies | boolean | *No description.* | +| artifactsDirectory | string | The build output directory. | +| artifactsJavascriptDirectory | string | The location of the npm tarball after build (`${artifactsDirectory}/js`). | +| bundler | projen.javascript.Bundler | *No description.* | +| entrypoint | string | *No description.* | +| manifest | any | *No description.* | +| npmrc | projen.javascript.NpmConfig | The .npmrc file. | +| package | projen.javascript.NodePackage | API for managing the node package. | +| packageManager | projen.javascript.NodePackageManager | The package manager to use. | +| runScriptCommand | string | The command to use to run scripts (e.g. `yarn run` or `npm run` depends on the package manager). | +| autoMerge | projen.github.AutoMerge | Component that sets up mergify for merging approved pull requests. | +| buildWorkflow | projen.build.BuildWorkflow | The PR build GitHub workflow. | +| buildWorkflowJobId | string | The job ID of the build workflow. | +| jest | projen.javascript.Jest | The Jest configuration (if enabled). | +| maxNodeVersion | string | Maximum node version required by this package. | +| minNodeVersion | string | Minimum node.js version required by this package. | +| npmignore | projen.IgnoreFile | The .npmignore file. | +| prettier | projen.javascript.Prettier | *No description.* | +| publisher | projen.release.Publisher | Package publisher. | +| release | projen.release.Release | Release management. | +| upgradeWorkflow | projen.javascript.UpgradeDependencies | The upgrade workflow. | +| docsDirectory | string | *No description.* | +| libdir | string | The directory in which compiled .js files reside. | +| srcdir | string | The directory in which the .ts sources reside. | +| testdir | string | The directory in which tests reside. | +| tsconfigDev | projen.javascript.TypescriptConfig | A typescript configuration file which covers all files (sources, tests, projen). | +| watchTask | projen.Task | The "watch" task. | +| docgen | boolean | *No description.* | +| eslint | projen.javascript.Eslint | *No description.* | +| tsconfig | projen.javascript.TypescriptConfig | *No description.* | +| tsconfigEslint | projen.javascript.TypescriptConfig | *No description.* | +| cdktfConfig | CdktfConfig | The CDKTF CLI options. | +| cdktfTasks | CdktfTasks | *No description.* | + +--- + +##### `buildTask`Required + +```typescript +public readonly buildTask: Task; +``` + +- *Type:* projen.Task + +--- + +##### `commitGenerated`Required + +```typescript +public readonly commitGenerated: boolean; +``` + +- *Type:* boolean + +Whether to commit the managed files by default. + +--- + +##### `compileTask`Required + +```typescript +public readonly compileTask: Task; +``` + +- *Type:* projen.Task + +--- + +##### `components`Required + +```typescript +public readonly components: Component[]; +``` + +- *Type:* projen.Component[] + +Returns all the components within this project. + +--- + +##### `deps`Required + +```typescript +public readonly deps: Dependencies; +``` + +- *Type:* projen.Dependencies + +Project dependencies. + +--- + +##### `ejected`Required + +```typescript +public readonly ejected: boolean; +``` + +- *Type:* boolean + +Whether or not the project is being ejected. + +--- + +##### `files`Required + +```typescript +public readonly files: FileBase[]; +``` + +- *Type:* projen.FileBase[] + +All files in this project. + +--- + +##### `gitattributes`Required + +```typescript +public readonly gitattributes: GitAttributesFile; +``` + +- *Type:* projen.GitAttributesFile + +The .gitattributes file for this repository. + +--- + +##### `gitignore`Required + +```typescript +public readonly gitignore: IgnoreFile; +``` + +- *Type:* projen.IgnoreFile + +.gitignore. + +--- + +##### `logger`Required + +```typescript +public readonly logger: Logger; +``` + +- *Type:* projen.Logger + +Logging utilities. + +--- + +##### `name`Required + +```typescript +public readonly name: string; +``` + +- *Type:* string + +Project name. + +--- + +##### `outdir`Required + +```typescript +public readonly outdir: string; +``` + +- *Type:* string + +Absolute output directory of this project. + +--- + +##### `packageTask`Required + +```typescript +public readonly packageTask: Task; +``` + +- *Type:* projen.Task + +--- + +##### `postCompileTask`Required + +```typescript +public readonly postCompileTask: Task; +``` + +- *Type:* projen.Task + +--- + +##### `preCompileTask`Required + +```typescript +public readonly preCompileTask: Task; +``` + +- *Type:* projen.Task + +--- + +##### `projectBuild`Required + +```typescript +public readonly projectBuild: ProjectBuild; +``` + +- *Type:* projen.ProjectBuild + +Manages the build process of the project. + +--- + +##### `projenCommand`Required + +```typescript +public readonly projenCommand: string; +``` + +- *Type:* string + +The command to use in order to run the projen CLI. + +--- + +##### `root`Required + +```typescript +public readonly root: Project; +``` + +- *Type:* projen.Project + +The root project. + +--- + +##### `subprojects`Required + +```typescript +public readonly subprojects: Project[]; +``` + +- *Type:* projen.Project[] + +Returns all the subprojects within this project. + +--- + +##### `tasks`Required + +```typescript +public readonly tasks: Tasks; +``` + +- *Type:* projen.Tasks + +Project tasks. + +--- + +##### `testTask`Required + +```typescript +public readonly testTask: Task; +``` + +- *Type:* projen.Task + +--- + +##### `defaultTask`Optional + +```typescript +public readonly defaultTask: Task; +``` + +- *Type:* projen.Task + +This is the "default" task, the one that executes "projen". + +Undefined if +the project is being ejected. + +--- + +##### `initProject`Optional + +```typescript +public readonly initProject: InitProject; +``` + +- *Type:* projen.InitProject + +The options used when this project is bootstrapped via `projen new`. + +It +includes the original set of options passed to the CLI and also the JSII +FQN of the project type. + +--- + +##### `parent`Optional + +```typescript +public readonly parent: Project; +``` + +- *Type:* projen.Project + +A parent project. + +If undefined, this is the root project. + +--- + +##### `projectType`Required + +```typescript +public readonly projectType: ProjectType; +``` + +- *Type:* projen.ProjectType + +--- + +##### `autoApprove`Optional + +```typescript +public readonly autoApprove: AutoApprove; +``` + +- *Type:* projen.github.AutoApprove + +Auto approve set up for this project. + +--- + +##### `devContainer`Optional + +```typescript +public readonly devContainer: DevContainer; +``` + +- *Type:* projen.vscode.DevContainer + +Access for .devcontainer.json (used for GitHub Codespaces). + +This will be `undefined` if devContainer boolean is false + +--- + +##### `github`Optional + +```typescript +public readonly github: GitHub; +``` + +- *Type:* projen.github.GitHub + +Access all github components. + +This will be `undefined` for subprojects. + +--- + +##### `gitpod`Optional + +```typescript +public readonly gitpod: Gitpod; +``` + +- *Type:* projen.Gitpod + +Access for Gitpod. + +This will be `undefined` if gitpod boolean is false + +--- + +##### `vscode`Optional + +```typescript +public readonly vscode: VsCode; +``` + +- *Type:* projen.vscode.VsCode + +Access all VSCode components. + +This will be `undefined` for subprojects. + +--- + +##### ~~`allowLibraryDependencies`~~Required + +- *Deprecated:* use `package.allowLibraryDependencies` + +```typescript +public readonly allowLibraryDependencies: boolean; +``` + +- *Type:* boolean + +--- + +##### `artifactsDirectory`Required + +```typescript +public readonly artifactsDirectory: string; +``` + +- *Type:* string + +The build output directory. + +An npm tarball will be created under the `js` +subdirectory. For example, if this is set to `dist` (the default), the npm +tarball will be placed under `dist/js/boom-boom-1.2.3.tg`. + +--- + +##### `artifactsJavascriptDirectory`Required + +```typescript +public readonly artifactsJavascriptDirectory: string; +``` + +- *Type:* string + +The location of the npm tarball after build (`${artifactsDirectory}/js`). + +--- + +##### `bundler`Required + +```typescript +public readonly bundler: Bundler; +``` + +- *Type:* projen.javascript.Bundler + +--- + +##### ~~`entrypoint`~~Required + +- *Deprecated:* use `package.entrypoint` + +```typescript +public readonly entrypoint: string; +``` + +- *Type:* string + +--- + +##### ~~`manifest`~~Required + +- *Deprecated:* use `package.addField(x, y)` + +```typescript +public readonly manifest: any; +``` + +- *Type:* any + +--- + +##### `npmrc`Required + +```typescript +public readonly npmrc: NpmConfig; +``` + +- *Type:* projen.javascript.NpmConfig + +The .npmrc file. + +--- + +##### `package`Required + +```typescript +public readonly package: NodePackage; +``` + +- *Type:* projen.javascript.NodePackage + +API for managing the node package. + +--- + +##### ~~`packageManager`~~Required + +- *Deprecated:* use `package.packageManager` + +```typescript +public readonly packageManager: NodePackageManager; +``` + +- *Type:* projen.javascript.NodePackageManager + +The package manager to use. + +--- + +##### `runScriptCommand`Required + +```typescript +public readonly runScriptCommand: string; +``` + +- *Type:* string + +The command to use to run scripts (e.g. `yarn run` or `npm run` depends on the package manager). + +--- + +##### `autoMerge`Optional + +```typescript +public readonly autoMerge: AutoMerge; +``` + +- *Type:* projen.github.AutoMerge + +Component that sets up mergify for merging approved pull requests. + +--- + +##### `buildWorkflow`Optional + +```typescript +public readonly buildWorkflow: BuildWorkflow; +``` + +- *Type:* projen.build.BuildWorkflow + +The PR build GitHub workflow. + +`undefined` if `buildWorkflow` is disabled. + +--- + +##### `buildWorkflowJobId`Optional + +```typescript +public readonly buildWorkflowJobId: string; +``` + +- *Type:* string + +The job ID of the build workflow. + +--- + +##### `jest`Optional + +```typescript +public readonly jest: Jest; +``` + +- *Type:* projen.javascript.Jest + +The Jest configuration (if enabled). + +--- + +##### `maxNodeVersion`Optional + +```typescript +public readonly maxNodeVersion: string; +``` + +- *Type:* string + +Maximum node version required by this package. + +--- + +##### `minNodeVersion`Optional + +```typescript +public readonly minNodeVersion: string; +``` + +- *Type:* string + +Minimum node.js version required by this package. + +--- + +##### `npmignore`Optional + +```typescript +public readonly npmignore: IgnoreFile; +``` + +- *Type:* projen.IgnoreFile + +The .npmignore file. + +--- + +##### `prettier`Optional + +```typescript +public readonly prettier: Prettier; +``` + +- *Type:* projen.javascript.Prettier + +--- + +##### ~~`publisher`~~Optional + +- *Deprecated:* use `release.publisher`. + +```typescript +public readonly publisher: Publisher; +``` + +- *Type:* projen.release.Publisher + +Package publisher. + +This will be `undefined` if the project does not have a +release workflow. + +--- + +##### `release`Optional + +```typescript +public readonly release: Release; +``` + +- *Type:* projen.release.Release + +Release management. + +--- + +##### `upgradeWorkflow`Optional + +```typescript +public readonly upgradeWorkflow: UpgradeDependencies; +``` + +- *Type:* projen.javascript.UpgradeDependencies + +The upgrade workflow. + +--- + +##### `docsDirectory`Required + +```typescript +public readonly docsDirectory: string; +``` + +- *Type:* string + +--- + +##### `libdir`Required + +```typescript +public readonly libdir: string; +``` + +- *Type:* string + +The directory in which compiled .js files reside. + +--- + +##### `srcdir`Required + +```typescript +public readonly srcdir: string; +``` + +- *Type:* string + +The directory in which the .ts sources reside. + +--- + +##### `testdir`Required + +```typescript +public readonly testdir: string; +``` + +- *Type:* string + +The directory in which tests reside. + +--- + +##### `tsconfigDev`Required + +```typescript +public readonly tsconfigDev: TypescriptConfig; +``` + +- *Type:* projen.javascript.TypescriptConfig + +A typescript configuration file which covers all files (sources, tests, projen). + +--- + +##### `watchTask`Required + +```typescript +public readonly watchTask: Task; +``` + +- *Type:* projen.Task + +The "watch" task. + +--- + +##### `docgen`Optional + +```typescript +public readonly docgen: boolean; +``` + +- *Type:* boolean + +--- + +##### `eslint`Optional + +```typescript +public readonly eslint: Eslint; +``` + +- *Type:* projen.javascript.Eslint + +--- + +##### `tsconfig`Optional + +```typescript +public readonly tsconfig: TypescriptConfig; +``` + +- *Type:* projen.javascript.TypescriptConfig + +--- + +##### `tsconfigEslint`Optional + +```typescript +public readonly tsconfigEslint: TypescriptConfig; +``` + +- *Type:* projen.javascript.TypescriptConfig + +--- + +##### `cdktfConfig`Required + +```typescript +public readonly cdktfConfig: CdktfConfig; +``` + +- *Type:* CdktfConfig + +The CDKTF CLI options. + +--- + +##### `cdktfTasks`Required + +```typescript +public readonly cdktfTasks: CdktfTasks; +``` + +- *Type:* CdktfTasks + +--- + +#### Constants + +| **Name** | **Type** | **Description** | +| --- | --- | --- | +| DEFAULT_TASK | string | The name of the default task (the task executed when `projen` is run without arguments). | + +--- + +##### `DEFAULT_TASK`Required + +```typescript +public readonly DEFAULT_TASK: string; +``` + +- *Type:* string + +The name of the default task (the task executed when `projen` is run without arguments). + +Normally +this task should synthesize the project files. + +--- + +### YamlTransformer + +A transformer of YAML. + +#### Initializers + +```typescript +import { YamlTransformer } from '@gmeligio/project-gen' + +new YamlTransformer(options: YamlTransformerOptions) +``` + +| **Name** | **Type** | **Description** | +| --- | --- | --- | +| options | YamlTransformerOptions | *No description.* | + +--- + +##### `options`Required + +- *Type:* YamlTransformerOptions + +--- + +#### Methods + +| **Name** | **Description** | +| --- | --- | +| apply | Applies the given transformations to the document. | + +--- + +##### `apply` + +```typescript +public apply(transformations: YamlElement[]): string +``` + +Applies the given transformations to the document. + +###### `transformations`Required + +- *Type:* YamlElement[] + +The transformations to apply to the document. + +--- + + + + +### YamlTree + +The YAML tree of transformations. + +#### Initializers + +```typescript +import { YamlTree } from '@gmeligio/project-gen' + +new YamlTree(options: YamlTreeOptions) +``` + +| **Name** | **Type** | **Description** | +| --- | --- | --- | +| options | YamlTreeOptions | *No description.* | + +--- + +##### `options`Required + +- *Type:* YamlTreeOptions + +--- + +#### Methods + +| **Name** | **Description** | +| --- | --- | +| addChildren | Add an array of childre to the tree. | +| createTransformations | Get the transformations from the tree. | +| descendTo | Jump to a child path. | + +--- + +##### `addChildren` + +```typescript +public addChildren(children: YamlElement[]): YamlTree +``` + +Add an array of childre to the tree. + +###### `children`Required + +- *Type:* YamlElement[] + +The children to add. + +--- + +##### `createTransformations` + +```typescript +public createTransformations(): YamlElement[] +``` + +Get the transformations from the tree. + +##### `descendTo` + +```typescript +public descendTo(path: string | number[]): YamlTree +``` + +Jump to a child path. + +###### `path`Required + +- *Type:* string | number[] + +The path to descend to. + +--- + + + + + +## Enums + +### Language + +#### Members + +| **Name** | **Description** | +| --- | --- | +| TYPESCRIPT | *No description.* | +| PYTHON | *No description.* | +| CSHARP | *No description.* | +| JAVA | *No description.* | +| GO | *No description.* | + +--- + +##### `TYPESCRIPT` + +--- + + +##### `PYTHON` + +--- + + +##### `CSHARP` + +--- + + +##### `JAVA` + +--- + + +##### `GO` + +--- + diff --git a/src/CdktfTypescriptApp.ts b/src/CdktfTypescriptApp.ts index 60336c8..d638d8b 100644 --- a/src/CdktfTypescriptApp.ts +++ b/src/CdktfTypescriptApp.ts @@ -24,7 +24,7 @@ export interface CdktfTypeScriptAppOptions extends typescript.TypeScriptProjectO readonly constructsVersion: string; } -export class CdktTypeScriptApp extends TypeScriptAppProject { +export class CdktfTypeScriptApp extends TypeScriptAppProject { /** * The CDKTF CLI options */ diff --git a/src/test/CdktfTypescriptApp.test.ts b/src/test/CdktfTypescriptApp.test.ts index e5abff5..2d9469a 100644 --- a/src/test/CdktfTypescriptApp.test.ts +++ b/src/test/CdktfTypescriptApp.test.ts @@ -1,10 +1,10 @@ import { Language } from '../CdktfConfig'; -import { CdktTypeScriptApp } from '../CdktfTypescriptApp'; +import { CdktfTypeScriptApp } from '../CdktfTypescriptApp'; describe('CdktfApp', () => { describe('app', () => { test('should use `ts-node` by default', () => { - const app = new CdktTypeScriptApp({ + const app = new CdktfTypeScriptApp({ name: 'test_project', defaultReleaseBranch: 'main', cdktfVersion: '0.0.0', @@ -17,7 +17,7 @@ describe('CdktfApp', () => { test('can be overriden with custom command', () => { const command = 'npx ts-node --swc src/main.ts'; - const app = new CdktTypeScriptApp({ + const app = new CdktfTypeScriptApp({ name: 'test_project', defaultReleaseBranch: 'main', cdktfVersion: '0.0.0', @@ -33,7 +33,7 @@ describe('CdktfApp', () => { describe('language', () => { test('should use `typescript` language', () => { - const app = new CdktTypeScriptApp({ + const app = new CdktfTypeScriptApp({ name: 'test_project', defaultReleaseBranch: 'main', cdktfVersion: '0.0.0', @@ -45,7 +45,7 @@ describe('CdktfApp', () => { test('should throw if not using `typescript`', () => { const createCdktfApp = () => - new CdktTypeScriptApp({ + new CdktfTypeScriptApp({ name: 'test_project', defaultReleaseBranch: 'main', cdktfVersion: '0.0.0', @@ -63,7 +63,7 @@ describe('CdktfApp', () => { test('should throw an error if cdktfVersion is not specified', () => { const createCdktfApp = () => // @ts-ignore - new CdktTypeScriptApp({ + new CdktfTypeScriptApp({ name: 'test_project', defaultReleaseBranch: 'main', constructsVersion: '0.0.0', @@ -74,7 +74,7 @@ describe('CdktfApp', () => { test('should throw an error if cdktfVersion is not specified', () => { const createCdktfApp = () => // @ts-ignore - new CdktTypeScriptApp({ + new CdktfTypeScriptApp({ name: 'test_project', defaultReleaseBranch: 'main', cdktfVersion: '0.0.0',