API Reference
Constructs
MonorepoJavaProject
- Implements: INxProjectCore
This project type will bootstrap a NX based monorepo with support for polygot builds, build caching, dependency graph visualization and much more.
Initializers
import aws.pdk.monorepo
aws.pdk.monorepo.MonorepoJavaProject(
name: str,
artifact_id: str = None,
auto_approve_options: AutoApproveOptions = None,
auto_merge: bool = None,
auto_merge_options: AutoMergeOptions = None,
clobber: bool = None,
commit_generated: bool = None,
compile_options: MavenCompileOptions = None,
deps: typing.List[str] = None,
description: str = None,
dev_container: bool = None,
distdir: str = None,
github: bool = None,
github_options: GitHubOptions = None,
git_ignore_options: IgnoreFileOptions = None,
git_options: GitOptions = None,
gitpod: bool = None,
group_id: str = None,
junit: bool = None,
junit_options: JunitOptions = None,
logging: LoggerOptions = None,
mergify: bool = None,
mergify_options: MergifyOptions = None,
outdir: str = None,
packaging: str = None,
packaging_options: MavenPackagingOptions = None,
parent: Project = None,
parent_pom: ParentPom = None,
project_type: ProjectType = None,
projen_command: str = None,
projen_credentials: GithubCredentials = None,
projenrc_java: bool = None,
projenrc_java_options: ProjenrcOptions = None,
projenrc_json: bool = None,
projenrc_json_options: ProjenrcJsonOptions = None,
projen_token_secret: str = None,
readme: SampleReadmeProps = None,
renovatebot: bool = None,
renovatebot_options: RenovatebotOptions = None,
sample: bool = None,
sample_java_package: str = None,
stale: bool = None,
stale_options: StaleOptions = None,
test_deps: typing.List[str] = None,
url: str = None,
version: str = None,
vscode: bool = None,
default_release_branch: str = None,
disable_default_licenses: bool = None
)
Name | Type | Description |
---|---|---|
name |
str |
No description. |
artifact_id |
str |
The artifactId is generally the name that the project is known by. |
auto_approve_options |
projen.github.AutoApproveOptions |
Enable and configure the 'auto approve' workflow. |
auto_merge |
bool |
Enable automatic merging on GitHub. |
auto_merge_options |
projen.github.AutoMergeOptions |
Configure options for automatic merging on GitHub. |
clobber |
bool |
Add a clobber task which resets the repo to origin. |
commit_generated |
bool |
Whether to commit the managed files by default. |
compile_options |
projen.java.MavenCompileOptions |
Compile options. |
deps |
typing.List[str] |
List of runtime dependencies for this project. Dependencies use the format: <groupId>/<artifactId>@<semver> . |
description |
str |
Description of a project is always good. |
dev_container |
bool |
Add a VSCode development environment (used for GitHub Codespaces). |
distdir |
str |
Final artifact output directory. |
github |
bool |
Enable GitHub integration. |
github_options |
projen.github.GitHubOptions |
Options for GitHub integration. |
git_ignore_options |
projen.IgnoreFileOptions |
Configuration options for .gitignore file. |
git_options |
projen.GitOptions |
Configuration options for git. |
gitpod |
bool |
Add a Gitpod development environment. |
group_id |
str |
This is generally unique amongst an organization or a project. |
junit |
bool |
Include junit tests. |
junit_options |
projen.java.JunitOptions |
junit options. |
logging |
projen.LoggerOptions |
Configure logging options such as verbosity. |
mergify |
bool |
Whether mergify should be enabled on this repository or not. |
mergify_options |
projen.github.MergifyOptions |
Options for mergify. |
outdir |
str |
The root directory of the project. Relative to this directory, all files are synthesized. |
packaging |
str |
Project packaging format. |
packaging_options |
projen.java.MavenPackagingOptions |
Packaging options. |
parent |
projen.Project |
The parent project, if this project is part of a bigger project. |
parent_pom |
projen.java.ParentPom |
A Parent Pom can be used to have a child project inherit properties/plugins/ect in order to reduce duplication and keep standards across a large amount of repos. |
project_type |
projen.ProjectType |
Which type of project this is (library/app). |
projen_command |
str |
The shell command to use in order to run the projen CLI. |
projen_credentials |
projen.github.GithubCredentials |
Choose a method of providing GitHub API access for projen workflows. |
projenrc_java |
bool |
Use projenrc in java. |
projenrc_java_options |
projen.java.ProjenrcOptions |
Options related to projenrc in java. |
projenrc_json |
bool |
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation. |
projenrc_json_options |
projen.ProjenrcJsonOptions |
Options for .projenrc.json. |
projen_token_secret |
str |
The name of a secret which includes a GitHub Personal Access Token to be used by projen workflows. |
readme |
projen.SampleReadmeProps |
The README setup. |
renovatebot |
bool |
Use renovatebot to handle dependency upgrades. |
renovatebot_options |
projen.RenovatebotOptions |
Options for renovatebot. |
sample |
bool |
Include sample code and test if the relevant directories don't exist. |
sample_java_package |
str |
The java package to use for the code sample. |
stale |
bool |
Auto-close of stale issues and pull request. |
stale_options |
projen.github.StaleOptions |
Auto-close stale issues and pull requests. |
test_deps |
typing.List[str] |
List of test dependencies for this project. Dependencies use the format: <groupId>/<artifactId>@<semver> . |
url |
str |
The URL, like the name, is not required. |
version |
str |
This is the last piece of the naming puzzle. |
vscode |
bool |
Enable VSCode integration. |
default_release_branch |
str |
No description. |
disable_default_licenses |
bool |
Whether to disable the generation of default licenses. |
name
Required
- Type: str
- Default: $BASEDIR
artifact_id
Optional
- Type: str
- Default: "my-app"
The artifactId is generally the name that the project is known by.
Although the groupId is important, people within the group will rarely mention the groupId in discussion (they are often all be the same ID, such as the MojoHaus project groupId: org.codehaus.mojo). It, along with the groupId, creates a key that separates this project from every other project in the world (at least, it should :) ). Along with the groupId, the artifactId fully defines the artifact's living quarters within the repository. In the case of the above project, my-project lives in $M2_REPO/org/codehaus/mojo/my-project.
auto_approve_options
Optional
- Type: projen.github.AutoApproveOptions
- Default: auto approve is disabled
Enable and configure the 'auto approve' workflow.
auto_merge
Optional
- Type: bool
- Default: true
Enable automatic merging on GitHub.
Has no effect if github.mergify
is set to false.
auto_merge_options
Optional
- 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
- Type: bool
- Default: true, but false for subprojects
Add a clobber
task which resets the repo to origin.
commit_generated
Optional
- Type: bool
- Default: true
Whether to commit the managed files by default.
compile_options
Optional
- Type: projen.java.MavenCompileOptions
- Default: defaults
Compile options.
deps
Optional
- Type: typing.List[str]
- Default: []
List of runtime dependencies for this project. Dependencies use the format: <groupId>/<artifactId>@<semver>
.
Additional dependencies can be added via project.addDependency()
.
description
Optional
- Type: str
- Default: undefined
Description of a project is always good.
Although this should not replace formal documentation, a quick comment to any readers of the POM is always helpful.
dev_container
Optional
- Type: bool
- Default: false
Add a VSCode development environment (used for GitHub Codespaces).
distdir
Optional
- Type: str
- Default: "dist/java"
Final artifact output directory.
github
Optional
- Type: bool
- Default: true
Enable GitHub integration.
Enabled by default for root projects. Disabled for non-root projects.
github_options
Optional
- Type: projen.github.GitHubOptions
- Default: see GitHubOptions
Options for GitHub integration.
git_ignore_options
Optional
- Type: projen.IgnoreFileOptions
Configuration options for .gitignore file.
git_options
Optional
- Type: projen.GitOptions
Configuration options for git.
gitpod
Optional
- Type: bool
- Default: false
Add a Gitpod development environment.
group_id
Optional
- Type: str
- Default: "org.acme"
This is generally unique amongst an organization or a project.
For example, all core Maven artifacts do (well, should) live under the groupId org.apache.maven. Group ID's do not necessarily use the dot notation, for example, the junit project. Note that the dot-notated groupId does not have to correspond to the package structure that the project contains. It is, however, a good practice to follow. When stored within a repository, the group acts much like the Java packaging structure does in an operating system. The dots are replaced by OS specific directory separators (such as '/' in Unix) which becomes a relative directory structure from the base repository. In the example given, the org.codehaus.mojo group lives within the directory $M2_REPO/org/codehaus/mojo.
junit
Optional
- Type: bool
- Default: true
Include junit tests.
junit_options
Optional
- Type: projen.java.JunitOptions
- Default: defaults
junit options.
logging
Optional
- Type: projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
~~mergify
~~Optional
-
Deprecated: use
githubOptions.mergify
instead -
Type: bool
- Default: true
Whether mergify should be enabled on this repository or not.
~~mergify_options
~~Optional
-
Deprecated: use
githubOptions.mergifyOptions
instead -
Type: projen.github.MergifyOptions
- Default: default options
Options for mergify.
outdir
Optional
- Type: str
- 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 subprojects.
packaging
Optional
- Type: str
- Default: "jar"
Project packaging format.
packaging_options
Optional
- Type: projen.java.MavenPackagingOptions
- Default: defaults
Packaging options.
parent
Optional
- Type: projen.Project
The parent project, if this project is part of a bigger project.
parent_pom
Optional
- Type: projen.java.ParentPom
- Default: undefined
A Parent Pom can be used to have a child project inherit properties/plugins/ect in order to reduce duplication and keep standards across a large amount of repos.
~~project_type
~~Optional
-
Deprecated: no longer supported at the base project level
-
Type: projen.ProjectType
- Default: ProjectType.UNKNOWN
Which type of project this is (library/app).
projen_command
Optional
- Type: str
- Default: "npx projen"
The shell command to use in order to run the projen CLI.
Can be used to customize in special environments.
projen_credentials
Optional
- 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.
projenrc_java
Optional
- Type: bool
- Default: true
Use projenrc in java.
This will install projen
as a java dependency and will add a synth
task which
will compile & execute main()
from src/main/java/projenrc.java
.
projenrc_java_options
Optional
- Type: projen.java.ProjenrcOptions
- Default: default options
Options related to projenrc in java.
projenrc_json
Optional
- Type: bool
- Default: false
Generate (once) .projenrc.json (in JSON). Set to false
in order to disable .projenrc.json generation.
projenrc_json_options
Optional
- Type: projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
~~projen_token_secret
~~Optional
-
Deprecated: use
projenCredentials
-
Type: str
- 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
- Type: projen.SampleReadmeProps
- Default: { filename: 'README.md', contents: '# replace this' }
The README setup.
renovatebot
Optional
- Type: bool
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebot_options
Optional
- Type: projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
sample
Optional
- Type: bool
- Default: true
Include sample code and test if the relevant directories don't exist.
sample_java_package
Optional
- Type: str
- Default: "org.acme"
The java package to use for the code sample.
stale
Optional
- Type: bool
- Default: false
Auto-close of stale issues and pull request.
See staleOptions
for options.
stale_options
Optional
- Type: projen.github.StaleOptions
- Default: see defaults in
StaleOptions
Auto-close stale issues and pull requests.
To disable set stale
to false
.
test_deps
Optional
- Type: typing.List[str]
- Default: []
List of test dependencies for this project. Dependencies use the format: <groupId>/<artifactId>@<semver>
.
Additional dependencies can be added via project.addTestDependency()
.
url
Optional
- Type: str
- Default: undefined
The URL, like the name, is not required.
This is a nice gesture for projects users, however, so that they know where the project lives.
version
Optional
- Type: str
- Default: "0.1.0"
This is the last piece of the naming puzzle.
groupId:artifactId denotes a single project but they cannot delineate which incarnation of that project we are talking about. Do we want the junit:junit of 2018 (version 4.12), or of 2007 (version 3.8.2)? In short: code changes, those changes should be versioned, and this element keeps those versions in line. It is also used within an artifact's repository to separate versions from each other. my-project version 1.0 files live in the directory structure $M2_REPO/org/codehaus/mojo/my-project/1.0.
vscode
Optional
- Type: bool
- Default: true
Enable VSCode integration.
Enabled by default for root projects. Disabled for non-root projects.
default_release_branch
Optional
- Type: str
disable_default_licenses
Optional
- Type: bool
- Default: false
Whether to disable the generation of default licenses.
Methods
Name | Description |
---|---|
to_string |
Returns a string representation of this construct. |
add_exclude_from_cleanup |
Exclude the matching files from pre-synth cleanup. |
add_git_ignore |
Adds a .gitignore pattern. |
add_package_ignore |
Exclude these files from the bundled package. |
add_task |
Adds a new task to this project. |
add_tip |
Prints a "tip" message during synthesis. |
annotate_generated |
Marks the provided file(s) as being generated. |
post_synthesize |
Called after all components are synthesized. |
pre_synthesize |
Called before all components are synthesized. |
remove_task |
Removes a task from a project. |
run_task_command |
Returns the shell command to execute in order to run a task. |
synth |
Synthesize all project files into outdir . |
try_find_file |
Finds a file at the specified relative path within this project and all its subprojects. |
try_find_json_file |
Finds a json file by name. |
try_find_object_file |
Finds an object file (like JsonFile, YamlFile, etc.) by name. |
try_remove_file |
Finds a file at the specified relative path within this project and removes it. |
add_dependency |
Adds a runtime dependency. |
add_plugin |
Adds a build plugin to the pom. |
add_test_dependency |
Adds a test dependency. |
add_implicit_dependency |
Create an implicit dependency between two Projects. |
add_java_dependency |
Adds a dependency between two Java Projects in the monorepo. |
add_nx_run_many_task |
Add project task that executes npx nx run-many ... style command. |
add_python_poetry_dependency |
Adds a dependency between two Python Projects in the monorepo. |
compose_nx_run_many_command |
Helper to format npx nx run-many ... style command. |
exec_nx_run_many_command |
Helper to format npx nx run-many ... style command execution in package manager. |
to_string
def to_string() -> str
Returns a string representation of this construct.
add_exclude_from_cleanup
def add_exclude_from_cleanup(
globs: str
) -> None
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: str
The glob patterns to match.
add_git_ignore
def add_git_ignore(
pattern: str
) -> None
Adds a .gitignore pattern.
pattern
Required
- Type: str
The glob pattern to ignore.
add_package_ignore
def add_package_ignore(
_pattern: str
) -> None
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: str
The glob pattern to exclude.
add_task
def add_task(
name: str,
condition: str = None,
cwd: str = None,
description: str = None,
env: typing.Mapping[str] = None,
required_env: typing.List[str] = None,
args: typing.List[str] = None,
exec: str = None,
receive_args: bool = None,
steps: typing.List[TaskStep] = None
) -> Task
Adds a new task to this project.
This will fail if the project already has a task with this name.
name
Required
- Type: str
The task name to add.
condition
Optional
- Type: str
A shell command which determines if the this task should be executed.
If the program exits with a zero exit code, steps will be executed. A non-zero code means that task will be skipped.
cwd
Optional
- Type: str
- Default: process.cwd()
The working directory for all steps in this task (unless overridden by the step).
description
Optional
- Type: str
- Default: the task name
The description of this build command.
env
Optional
- Type: typing.Mapping[str]
- Default: {}
Defines environment variables for the execution of this task.
Values in this map will be evaluated in a shell, so you can do stuff like $(echo "foo")
.
required_env
Optional
- Type: typing.List[str]
A set of environment variables that must be defined in order to execute this task.
Task execution will fail if one of these is not defined.
args
Optional
- Type: typing.List[str]
- Default: no arguments are passed to the step
Should the provided exec
shell command receive fixed args.
exec
Optional
- Type: str
- Default: add steps using
task.exec(command)
ortask.spawn(subtask)
Shell command to execute as the first command of the task.
receive_args
Optional
- Type: bool
- Default: false
Should the provided exec
shell command receive args passed to the task.
steps
Optional
- Type: typing.List[projen.TaskStep]
List of task steps to run.
~~add_tip
~~
def add_tip(
message: str
) -> None
Prints a "tip" message during synthesis.
message
Required
- Type: str
The message.
annotate_generated
def annotate_generated(
glob: str
) -> None
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
glob
Required
- Type: str
the glob pattern to match (could be a file path).
post_synthesize
def post_synthesize() -> None
Called after all components are synthesized.
Order is not guaranteed.
pre_synthesize
def pre_synthesize() -> None
Called before all components are synthesized.
remove_task
def remove_task(
name: str
) -> Task
Removes a task from a project.
name
Required
- Type: str
The name of the task to remove.
run_task_command
def run_task_command(
task: Task
) -> str
Returns the shell command to execute in order to run a task.
By default, this is npx projen@<version> <task>
task
Required
- Type: projen.Task
The task for which the command is required.
synth
def synth() -> None
Synthesize all project files into outdir
.
- Call "this.preSynthesize()"
- Delete all generated files
- Synthesize all subprojects
- Synthesize all components of this project
- Call "postSynthesize()" for all components of this project
- Call "this.postSynthesize()"
try_find_file
def try_find_file(
file_path: str
) -> FileBase
Finds a file at the specified relative path within this project and all its subprojects.
file_path
Required
- Type: str
The file path.
If this path is relative, it will be resolved from the root of this project.
~~try_find_json_file
~~
def try_find_json_file(
file_path: str
) -> JsonFile
Finds a json file by name.
file_path
Required
- Type: str
The file path.
try_find_object_file
def try_find_object_file(
file_path: str
) -> ObjectFile
Finds an object file (like JsonFile, YamlFile, etc.) by name.
file_path
Required
- Type: str
The file path.
try_remove_file
def try_remove_file(
file_path: str
) -> FileBase
Finds a file at the specified relative path within this project and removes it.
file_path
Required
- Type: str
The file path.
If this path is relative, it will be resolved from the root of this project.
add_dependency
def add_dependency(
spec: str
) -> None
Adds a runtime dependency.
spec
Required
- Type: str
Format <groupId>/<artifactId>@<semver>
.
add_plugin
def add_plugin(
spec: str,
configuration: typing.Mapping[typing.Any] = None,
dependencies: typing.List[str] = None,
executions: typing.List[PluginExecution] = None
) -> Dependency
Adds a build plugin to the pom.
The plug in is also added as a BUILD dep to the project.
spec
Required
- Type: str
dependency spec (group/artifact@version
).
configuration
Optional
- Type: typing.Mapping[typing.Any]
- Default: {}
Plugin key/value configuration.
dependencies
Optional
- Type: typing.List[str]
- Default: []
You could configure the dependencies for the plugin.
Dependencies are in <groupId>/<artifactId>@<semver>
format.
executions
Optional
- Type: typing.List[projen.java.PluginExecution]
- Default: []
Plugin executions.
add_test_dependency
def add_test_dependency(
spec: str
) -> None
Adds a test dependency.
spec
Required
- Type: str
Format <groupId>/<artifactId>@<semver>
.
add_implicit_dependency
def add_implicit_dependency(
dependent: Project,
dependee: typing.Union[str, Project]
) -> None
Create an implicit dependency between two Projects.
This is typically used in polygot repos where a Typescript project wants a build dependency on a Python project as an example.
dependent
Required
- Type: projen.Project
dependee
Required
- Type: typing.Union[str, projen.Project]
add_java_dependency
def add_java_dependency(
dependent: JavaProject,
dependee: JavaProject
) -> None
Adds a dependency between two Java Projects in the monorepo.
dependent
Required
- Type: projen.java.JavaProject
dependee
Required
- Type: projen.java.JavaProject
add_nx_run_many_task
def add_nx_run_many_task(
name: str,
target: str,
configuration: str = None,
exclude: str = None,
ignore_cycles: bool = None,
no_bail: bool = None,
output_style: str = None,
parallel: typing.Union[int, float] = None,
projects: typing.List[str] = None,
runner: str = None,
skip_cache: bool = None,
verbose: bool = None
) -> Task
Add project task that executes npx nx run-many ...
style command.
name
Required
- Type: str
target
Required
- Type: str
Task to run for affected projects.
configuration
Optional
- Type: str
This is the configuration to use when performing tasks on projects.
exclude
Optional
- Type: str
Exclude certain projects from being processed.
ignore_cycles
Optional
- Type: bool
Ignore cycles in the task graph.
no_bail
Optional
- Type: bool
Do not stop command execution after the first failed task.
output_style
Optional
- Type: str
- Default: "stream"
Defines how Nx emits outputs tasks logs.
parallel
Optional
- Type: typing.Union[int, float]
- Default: 3
Max number of parallel processes.
projects
Optional
- Type: typing.List[str]
Project to run as list project names and/or patterns.
runner
Optional
- Type: str
This is the name of the tasks runner configuration in nx.json.
skip_cache
Optional
- Type: bool
Rerun the tasks even when the results are available in the cache.
verbose
Optional
- Type: bool
Prints additional information about the commands (e.g. stack traces).
add_python_poetry_dependency
def add_python_poetry_dependency(
dependent: PythonProject,
dependee: PythonProject
) -> None
Adds a dependency between two Python Projects in the monorepo.
The dependent must have Poetry enabled.
dependent
Required
- Type: projen.python.PythonProject
dependee
Required
- Type: projen.python.PythonProject
compose_nx_run_many_command
def compose_nx_run_many_command(
target: str,
configuration: str = None,
exclude: str = None,
ignore_cycles: bool = None,
no_bail: bool = None,
output_style: str = None,
parallel: typing.Union[int, float] = None,
projects: typing.List[str] = None,
runner: str = None,
skip_cache: bool = None,
verbose: bool = None
) -> typing.List[str]
Helper to format npx nx run-many ...
style command.
target
Required
- Type: str
Task to run for affected projects.
configuration
Optional
- Type: str
This is the configuration to use when performing tasks on projects.
exclude
Optional
- Type: str
Exclude certain projects from being processed.
ignore_cycles
Optional
- Type: bool
Ignore cycles in the task graph.
no_bail
Optional
- Type: bool
Do not stop command execution after the first failed task.
output_style
Optional
- Type: str
- Default: "stream"
Defines how Nx emits outputs tasks logs.
parallel
Optional
- Type: typing.Union[int, float]
- Default: 3
Max number of parallel processes.
projects
Optional
- Type: typing.List[str]
Project to run as list project names and/or patterns.
runner
Optional
- Type: str
This is the name of the tasks runner configuration in nx.json.
skip_cache
Optional
- Type: bool
Rerun the tasks even when the results are available in the cache.
verbose
Optional
- Type: bool
Prints additional information about the commands (e.g. stack traces).
exec_nx_run_many_command
def exec_nx_run_many_command(
target: str,
configuration: str = None,
exclude: str = None,
ignore_cycles: bool = None,
no_bail: bool = None,
output_style: str = None,
parallel: typing.Union[int, float] = None,
projects: typing.List[str] = None,
runner: str = None,
skip_cache: bool = None,
verbose: bool = None
) -> str
Helper to format npx nx run-many ...
style command execution in package manager.
target
Required
- Type: str
Task to run for affected projects.
configuration
Optional
- Type: str
This is the configuration to use when performing tasks on projects.
exclude
Optional
- Type: str
Exclude certain projects from being processed.
ignore_cycles
Optional
- Type: bool
Ignore cycles in the task graph.
no_bail
Optional
- Type: bool
Do not stop command execution after the first failed task.
output_style
Optional
- Type: str
- Default: "stream"
Defines how Nx emits outputs tasks logs.
parallel
Optional
- Type: typing.Union[int, float]
- Default: 3
Max number of parallel processes.
projects
Optional
- Type: typing.List[str]
Project to run as list project names and/or patterns.
runner
Optional
- Type: str
This is the name of the tasks runner configuration in nx.json.
skip_cache
Optional
- Type: bool
Rerun the tasks even when the results are available in the cache.
verbose
Optional
- Type: bool
Prints additional information about the commands (e.g. stack traces).
Static Functions
Name | Description |
---|---|
is_construct |
Checks if x is a construct. |
is_project |
Test whether the given construct is a project. |
of |
Find the closest ancestor project for given construct. |
is_construct
import aws.pdk.monorepo
aws.pdk.monorepo.MonorepoJavaProject.is_construct(
x: typing.Any
)
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
x
Required
- Type: typing.Any
Any object.
is_project
import aws.pdk.monorepo
aws.pdk.monorepo.MonorepoJavaProject.is_project(
x: typing.Any
)
Test whether the given construct is a project.
x
Required
- Type: typing.Any
of
import aws.pdk.monorepo
aws.pdk.monorepo.MonorepoJavaProject.of(
construct: IConstruct
)
Find the closest ancestor project for given construct.
When given a project, this it the project itself.
construct
Required
- Type: constructs.IConstruct
Properties
Name | Type | Description |
---|---|---|
node |
constructs.Node |
The tree node. |
build_task |
projen.Task |
No description. |
commit_generated |
bool |
Whether to commit the managed files by default. |
compile_task |
projen.Task |
No description. |
components |
typing.List[projen.Component] |
Returns all the components within this project. |
deps |
projen.Dependencies |
Project dependencies. |
ejected |
bool |
Whether or not the project is being ejected. |
files |
typing.List[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 |
str |
Project name. |
outdir |
str |
Absolute output directory of this project. |
package_task |
projen.Task |
No description. |
post_compile_task |
projen.Task |
No description. |
pre_compile_task |
projen.Task |
No description. |
project_build |
projen.ProjectBuild |
Manages the build process of the project. |
projen_command |
str |
The command to use in order to run the projen CLI. |
root |
projen.Project |
The root project. |
subprojects |
typing.List[projen.Project] |
Returns all the subprojects within this project. |
tasks |
projen.Tasks |
Project tasks. |
test_task |
projen.Task |
No description. |
default_task |
projen.Task |
This is the "default" task, the one that executes "projen". |
init_project |
projen.InitProject |
The options used when this project is bootstrapped via projen new . |
parent |
projen.Project |
A parent project. |
project_type |
projen.ProjectType |
No description. |
auto_approve |
projen.github.AutoApprove |
Auto approve set up for this project. |
dev_container |
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. |
compile |
projen.java.MavenCompile |
Compile component. |
distdir |
str |
Maven artifact output directory. |
packaging |
projen.java.MavenPackaging |
Packaging component. |
pom |
projen.java.Pom |
API for managing pom.xml . |
junit |
projen.java.Junit |
JUnit component. |
projenrc |
projen.java.Projenrc |
Projenrc component. |
nx |
NxWorkspace |
Return the NxWorkspace instance. |
nx_configurator |
NxConfigurator |
No description. |
node
Required
node: Node
- Type: constructs.Node
The tree node.
build_task
Required
build_task: Task
- Type: projen.Task
commit_generated
Required
commit_generated: bool
- Type: bool
Whether to commit the managed files by default.
compile_task
Required
compile_task: Task
- Type: projen.Task
components
Required
components: typing.List[Component]
- Type: typing.List[projen.Component]
Returns all the components within this project.
deps
Required
deps: Dependencies
- Type: projen.Dependencies
Project dependencies.
ejected
Required
ejected: bool
- Type: bool
Whether or not the project is being ejected.
files
Required
files: typing.List[FileBase]
- Type: typing.List[projen.FileBase]
All files in this project.
gitattributes
Required
gitattributes: GitAttributesFile
- Type: projen.GitAttributesFile
The .gitattributes file for this repository.
gitignore
Required
gitignore: IgnoreFile
- Type: projen.IgnoreFile
.gitignore.
logger
Required
logger: Logger
- Type: projen.Logger
Logging utilities.
name
Required
name: str
- Type: str
Project name.
outdir
Required
outdir: str
- Type: str
Absolute output directory of this project.
package_task
Required
package_task: Task
- Type: projen.Task
post_compile_task
Required
post_compile_task: Task
- Type: projen.Task
pre_compile_task
Required
pre_compile_task: Task
- Type: projen.Task
project_build
Required
project_build: ProjectBuild
- Type: projen.ProjectBuild
Manages the build process of the project.
projen_command
Required
projen_command: str
- Type: str
The command to use in order to run the projen CLI.
root
Required
root: Project
- Type: projen.Project
The root project.
subprojects
Required
subprojects: typing.List[Project]
- Type: typing.List[projen.Project]
Returns all the subprojects within this project.
tasks
Required
tasks: Tasks
- Type: projen.Tasks
Project tasks.
test_task
Required
test_task: Task
- Type: projen.Task
default_task
Optional
default_task: Task
- Type: projen.Task
This is the "default" task, the one that executes "projen".
Undefined if the project is being ejected.
init_project
Optional
init_project: 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
parent: Project
- Type: projen.Project
A parent project.
If undefined, this is the root project.
project_type
Required
project_type: ProjectType
- Type: projen.ProjectType
auto_approve
Optional
auto_approve: AutoApprove
- Type: projen.github.AutoApprove
Auto approve set up for this project.
dev_container
Optional
dev_container: DevContainer
- Type: projen.vscode.DevContainer
Access for .devcontainer.json (used for GitHub Codespaces).
This will be undefined
if devContainer boolean is false
github
Optional
github: GitHub
- Type: projen.github.GitHub
Access all github components.
This will be undefined
for subprojects.
gitpod
Optional
gitpod: Gitpod
- Type: projen.Gitpod
Access for Gitpod.
This will be undefined
if gitpod boolean is false
vscode
Optional
vscode: VsCode
- Type: projen.vscode.VsCode
Access all VSCode components.
This will be undefined
for subprojects.
compile
Required
compile: MavenCompile
- Type: projen.java.MavenCompile
Compile component.
distdir
Required
distdir: str
- Type: str
Maven artifact output directory.
packaging
Required
packaging: MavenPackaging
- Type: projen.java.MavenPackaging
Packaging component.
pom
Required
pom: Pom
- Type: projen.java.Pom
API for managing pom.xml
.
junit
Optional
junit: Junit
- Type: projen.java.Junit
JUnit component.
projenrc
Optional
projenrc: Projenrc
- Type: projen.java.Projenrc
Projenrc component.
nx
Required
nx: NxWorkspace
- Type: NxWorkspace
Return the NxWorkspace instance.
This should be implemented using a getter.
nx_configurator
Required
nx_configurator: NxConfigurator
- Type: NxConfigurator
Constants
Name | Type | Description |
---|---|---|
DEFAULT_TASK |
str |
The name of the default task (the task executed when projen is run without arguments). |
DEFAULT_TASK
Required
DEFAULT_TASK: str
- Type: str
The name of the default task (the task executed when projen
is run without arguments).
Normally this task should synthesize the project files.
MonorepoPythonProject
- Implements: INxProjectCore
This project type will bootstrap a NX based monorepo with support for polygot builds, build caching, dependency graph visualization and much more.
Initializers
import aws.pdk.monorepo
aws.pdk.monorepo.MonorepoPythonProject(
module_name: str,
name: str,
author_email: str = None,
author_name: str = None,
auto_approve_options: AutoApproveOptions = None,
auto_merge: bool = None,
auto_merge_options: AutoMergeOptions = None,
classifiers: typing.List[str] = None,
clobber: bool = None,
commit_generated: bool = None,
deps: typing.List[str] = None,
description: str = None,
dev_container: bool = None,
dev_deps: typing.List[str] = None,
github: bool = None,
github_options: GitHubOptions = None,
git_ignore_options: IgnoreFileOptions = None,
git_options: GitOptions = None,
gitpod: bool = None,
homepage: str = None,
license: str = None,
logging: LoggerOptions = None,
mergify: bool = None,
mergify_options: MergifyOptions = None,
outdir: str = None,
package_name: str = None,
parent: Project = None,
poetry_options: PoetryPyprojectOptionsWithoutDeps = None,
project_type: ProjectType = None,
projen_command: str = None,
projen_credentials: GithubCredentials = None,
projenrc_json: bool = None,
projenrc_json_options: ProjenrcJsonOptions = None,
projenrc_python_options: ProjenrcOptions = None,
projen_token_secret: str = None,
pytest: bool = None,
pytest_options: PytestOptions = None,
python_exec: str = None,
readme: SampleReadmeProps = None,
renovatebot: bool = None,
renovatebot_options: RenovatebotOptions = None,
sample: bool = None,
setup_config: typing.Mapping[typing.Any] = None,
setuptools: bool = None,
stale: bool = None,
stale_options: StaleOptions = None,
version: str = None,
vscode: bool = None,
default_release_branch: str = None,
license_options: LicenseOptions = None
)
Name | Type | Description |
---|---|---|
module_name |
str |
No description. |
name |
str |
No description. |
author_email |
str |
Author's e-mail. |
author_name |
str |
Author's name. |
auto_approve_options |
projen.github.AutoApproveOptions |
Enable and configure the 'auto approve' workflow. |
auto_merge |
bool |
Enable automatic merging on GitHub. |
auto_merge_options |
projen.github.AutoMergeOptions |
Configure options for automatic merging on GitHub. |
classifiers |
typing.List[str] |
A list of PyPI trove classifiers that describe the project. |
clobber |
bool |
Add a clobber task which resets the repo to origin. |
commit_generated |
bool |
Whether to commit the managed files by default. |
deps |
typing.List[str] |
List of runtime dependencies for this project. Dependencies use the format: <module>@<semver> . |
description |
str |
A short description of the package. |
dev_container |
bool |
Add a VSCode development environment (used for GitHub Codespaces). |
dev_deps |
typing.List[str] |
List of dev dependencies for this project. Dependencies use the format: <module>@<semver> . |
github |
bool |
Enable GitHub integration. |
github_options |
projen.github.GitHubOptions |
Options for GitHub integration. |
git_ignore_options |
projen.IgnoreFileOptions |
Configuration options for .gitignore file. |
git_options |
projen.GitOptions |
Configuration options for git. |
gitpod |
bool |
Add a Gitpod development environment. |
homepage |
str |
A URL to the website of the project. |
license |
str |
License of this package as an SPDX identifier. |
logging |
projen.LoggerOptions |
Configure logging options such as verbosity. |
mergify |
bool |
Whether mergify should be enabled on this repository or not. |
mergify_options |
projen.github.MergifyOptions |
Options for mergify. |
outdir |
str |
The root directory of the project. Relative to this directory, all files are synthesized. |
package_name |
str |
Package name. |
parent |
projen.Project |
The parent project, if this project is part of a bigger project. |
poetry_options |
projen.python.PoetryPyprojectOptionsWithoutDeps |
Additional options to set for poetry if using poetry. |
project_type |
projen.ProjectType |
Which type of project this is (library/app). |
projen_command |
str |
The shell command to use in order to run the projen CLI. |
projen_credentials |
projen.github.GithubCredentials |
Choose a method of providing GitHub API access for projen workflows. |
projenrc_json |
bool |
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation. |
projenrc_json_options |
projen.ProjenrcJsonOptions |
Options for .projenrc.json. |
projenrc_python_options |
projen.python.ProjenrcOptions |
Options related to projenrc in python. |
projen_token_secret |
str |
The name of a secret which includes a GitHub Personal Access Token to be used by projen workflows. |
pytest |
bool |
Include pytest tests. |
pytest_options |
projen.python.PytestOptions |
pytest options. |
python_exec |
str |
Path to the python executable to use. |
readme |
projen.SampleReadmeProps |
The README setup. |
renovatebot |
bool |
Use renovatebot to handle dependency upgrades. |
renovatebot_options |
projen.RenovatebotOptions |
Options for renovatebot. |
sample |
bool |
Include sample code and test if the relevant directories don't exist. |
setup_config |
typing.Mapping[typing.Any] |
Additional fields to pass in the setup() function if using setuptools. |
setuptools |
bool |
Use setuptools with a setup.py script for packaging and publishing. |
stale |
bool |
Auto-close of stale issues and pull request. |
stale_options |
projen.github.StaleOptions |
Auto-close stale issues and pull requests. |
version |
str |
Version of the package. |
vscode |
bool |
Enable VSCode integration. |
default_release_branch |
str |
No description. |
license_options |
LicenseOptions |
Default license to apply to all PDK managed packages. |
module_name
Required
- Type: str
- Default: $PYTHON_MODULE_NAME
name
Required
- Type: str
- Default: $BASEDIR
author_email
Optional
- Type: str
- Default: $GIT_USER_EMAIL
Author's e-mail.
author_name
Optional
- Type: str
- Default: $GIT_USER_NAME
Author's name.
auto_approve_options
Optional
- Type: projen.github.AutoApproveOptions
- Default: auto approve is disabled
Enable and configure the 'auto approve' workflow.
auto_merge
Optional
- Type: bool
- Default: true
Enable automatic merging on GitHub.
Has no effect if github.mergify
is set to false.
auto_merge_options
Optional
- 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.
classifiers
Optional
- Type: typing.List[str]
A list of PyPI trove classifiers that describe the project.
clobber
Optional
- Type: bool
- Default: true, but false for subprojects
Add a clobber
task which resets the repo to origin.
commit_generated
Optional
- Type: bool
- Default: true
Whether to commit the managed files by default.
deps
Optional
- Type: typing.List[str]
- Default: []
List of runtime dependencies for this project. Dependencies use the format: <module>@<semver>
.
Additional dependencies can be added via project.addDependency()
.
description
Optional
- Type: str
A short description of the package.
dev_container
Optional
- Type: bool
- Default: false
Add a VSCode development environment (used for GitHub Codespaces).
dev_deps
Optional
- Type: typing.List[str]
- Default: []
List of dev dependencies for this project. Dependencies use the format: <module>@<semver>
.
Additional dependencies can be added via project.addDevDependency()
.
github
Optional
- Type: bool
- Default: true
Enable GitHub integration.
Enabled by default for root projects. Disabled for non-root projects.
github_options
Optional
- Type: projen.github.GitHubOptions
- Default: see GitHubOptions
Options for GitHub integration.
git_ignore_options
Optional
- Type: projen.IgnoreFileOptions
Configuration options for .gitignore file.
git_options
Optional
- Type: projen.GitOptions
Configuration options for git.
gitpod
Optional
- Type: bool
- Default: false
Add a Gitpod development environment.
homepage
Optional
- Type: str
A URL to the website of the project.
license
Optional
- Type: str
License of this package as an SPDX identifier.
logging
Optional
- Type: projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
~~mergify
~~Optional
-
Deprecated: use
githubOptions.mergify
instead -
Type: bool
- Default: true
Whether mergify should be enabled on this repository or not.
~~mergify_options
~~Optional
-
Deprecated: use
githubOptions.mergifyOptions
instead -
Type: projen.github.MergifyOptions
- Default: default options
Options for mergify.
outdir
Optional
- Type: str
- 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 subprojects.
package_name
Optional
- Type: str
Package name.
parent
Optional
- Type: projen.Project
The parent project, if this project is part of a bigger project.
poetry_options
Optional
- Type: projen.python.PoetryPyprojectOptionsWithoutDeps
Additional options to set for poetry if using poetry.
~~project_type
~~Optional
-
Deprecated: no longer supported at the base project level
-
Type: projen.ProjectType
- Default: ProjectType.UNKNOWN
Which type of project this is (library/app).
projen_command
Optional
- Type: str
- Default: "npx projen"
The shell command to use in order to run the projen CLI.
Can be used to customize in special environments.
projen_credentials
Optional
- 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.
projenrc_json
Optional
- Type: bool
- Default: false
Generate (once) .projenrc.json (in JSON). Set to false
in order to disable .projenrc.json generation.
projenrc_json_options
Optional
- Type: projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
projenrc_python_options
Optional
- Type: projen.python.ProjenrcOptions
- Default: default options
Options related to projenrc in python.
~~projen_token_secret
~~Optional
-
Deprecated: use
projenCredentials
-
Type: str
- 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.
pytest
Optional
- Type: bool
- Default: true
Include pytest tests.
pytest_options
Optional
- Type: projen.python.PytestOptions
- Default: defaults
pytest options.
python_exec
Optional
- Type: str
- Default: "python"
Path to the python executable to use.
readme
Optional
- Type: projen.SampleReadmeProps
- Default: { filename: 'README.md', contents: '# replace this' }
The README setup.
renovatebot
Optional
- Type: bool
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebot_options
Optional
- Type: projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
sample
Optional
- Type: bool
- Default: true
Include sample code and test if the relevant directories don't exist.
setup_config
Optional
- Type: typing.Mapping[typing.Any]
Additional fields to pass in the setup() function if using setuptools.
setuptools
Optional
- Type: bool
- Default: true, unless poetry is true, then false
Use setuptools with a setup.py script for packaging and publishing.
stale
Optional
- Type: bool
- Default: false
Auto-close of stale issues and pull request.
See staleOptions
for options.
stale_options
Optional
- Type: projen.github.StaleOptions
- Default: see defaults in
StaleOptions
Auto-close stale issues and pull requests.
To disable set stale
to false
.
version
Optional
- Type: str
- Default: "0.1.0"
Version of the package.
vscode
Optional
- Type: bool
- Default: true
Enable VSCode integration.
Enabled by default for root projects. Disabled for non-root projects.
default_release_branch
Optional
- Type: str
license_options
Optional
- Type: LicenseOptions
- Default: Apache-2.0
Default license to apply to all PDK managed packages.
Methods
Name | Description |
---|---|
to_string |
Returns a string representation of this construct. |
add_exclude_from_cleanup |
Exclude the matching files from pre-synth cleanup. |
add_git_ignore |
Adds a .gitignore pattern. |
add_package_ignore |
Exclude these files from the bundled package. |
add_task |
Adds a new task to this project. |
add_tip |
Prints a "tip" message during synthesis. |
annotate_generated |
Marks the provided file(s) as being generated. |
post_synthesize |
Called after all components are synthesized. |
pre_synthesize |
Called before all components are synthesized. |
remove_task |
Removes a task from a project. |
run_task_command |
Returns the shell command to execute in order to run a task. |
synth |
Synthesize all project files into outdir . |
try_find_file |
Finds a file at the specified relative path within this project and all its subprojects. |
try_find_json_file |
Finds a json file by name. |
try_find_object_file |
Finds an object file (like JsonFile, YamlFile, etc.) by name. |
try_remove_file |
Finds a file at the specified relative path within this project and removes it. |
add_dependency |
Adds a runtime dependency. |
add_dev_dependency |
Adds a dev dependency. |
add_implicit_dependency |
Create an implicit dependency between two Projects. |
add_java_dependency |
Adds a dependency between two Java Projects in the monorepo. |
add_nx_run_many_task |
Add project task that executes npx nx run-many ... style command. |
add_python_poetry_dependency |
Adds a dependency between two Python Projects in the monorepo. |
compose_nx_run_many_command |
Helper to format npx nx run-many ... style command. |
exec_nx_run_many_command |
Helper to format npx nx run-many ... style command execution in package manager. |
to_string
def to_string() -> str
Returns a string representation of this construct.
add_exclude_from_cleanup
def add_exclude_from_cleanup(
globs: str
) -> None
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: str
The glob patterns to match.
add_git_ignore
def add_git_ignore(
pattern: str
) -> None
Adds a .gitignore pattern.
pattern
Required
- Type: str
The glob pattern to ignore.
add_package_ignore
def add_package_ignore(
_pattern: str
) -> None
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: str
The glob pattern to exclude.
add_task
def add_task(
name: str,
condition: str = None,
cwd: str = None,
description: str = None,
env: typing.Mapping[str] = None,
required_env: typing.List[str] = None,
args: typing.List[str] = None,
exec: str = None,
receive_args: bool = None,
steps: typing.List[TaskStep] = None
) -> Task
Adds a new task to this project.
This will fail if the project already has a task with this name.
name
Required
- Type: str
The task name to add.
condition
Optional
- Type: str
A shell command which determines if the this task should be executed.
If the program exits with a zero exit code, steps will be executed. A non-zero code means that task will be skipped.
cwd
Optional
- Type: str
- Default: process.cwd()
The working directory for all steps in this task (unless overridden by the step).
description
Optional
- Type: str
- Default: the task name
The description of this build command.
env
Optional
- Type: typing.Mapping[str]
- Default: {}
Defines environment variables for the execution of this task.
Values in this map will be evaluated in a shell, so you can do stuff like $(echo "foo")
.
required_env
Optional
- Type: typing.List[str]
A set of environment variables that must be defined in order to execute this task.
Task execution will fail if one of these is not defined.
args
Optional
- Type: typing.List[str]
- Default: no arguments are passed to the step
Should the provided exec
shell command receive fixed args.
exec
Optional
- Type: str
- Default: add steps using
task.exec(command)
ortask.spawn(subtask)
Shell command to execute as the first command of the task.
receive_args
Optional
- Type: bool
- Default: false
Should the provided exec
shell command receive args passed to the task.
steps
Optional
- Type: typing.List[projen.TaskStep]
List of task steps to run.
~~add_tip
~~
def add_tip(
message: str
) -> None
Prints a "tip" message during synthesis.
message
Required
- Type: str
The message.
annotate_generated
def annotate_generated(
glob: str
) -> None
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
glob
Required
- Type: str
the glob pattern to match (could be a file path).
post_synthesize
def post_synthesize() -> None
Called after all components are synthesized.
Order is not guaranteed. NOTE: Be sure to ensure the VIRTUAL_ENV is unset during postSynthesize as the individual poetry envs will only be created if a existing VIRTUAL_ENV cannot be found.
pre_synthesize
def pre_synthesize() -> None
Called before all components are synthesized.
remove_task
def remove_task(
name: str
) -> Task
Removes a task from a project.
name
Required
- Type: str
The name of the task to remove.
run_task_command
def run_task_command(
task: Task
) -> str
Returns the shell command to execute in order to run a task.
By default, this is npx projen@<version> <task>
task
Required
- Type: projen.Task
The task for which the command is required.
synth
def synth() -> None
Synthesize all project files into outdir
.
- Call "this.preSynthesize()"
- Delete all generated files
- Synthesize all subprojects
- Synthesize all components of this project
- Call "postSynthesize()" for all components of this project
- Call "this.postSynthesize()"
try_find_file
def try_find_file(
file_path: str
) -> FileBase
Finds a file at the specified relative path within this project and all its subprojects.
file_path
Required
- Type: str
The file path.
If this path is relative, it will be resolved from the root of this project.
~~try_find_json_file
~~
def try_find_json_file(
file_path: str
) -> JsonFile
Finds a json file by name.
file_path
Required
- Type: str
The file path.
try_find_object_file
def try_find_object_file(
file_path: str
) -> ObjectFile
Finds an object file (like JsonFile, YamlFile, etc.) by name.
file_path
Required
- Type: str
The file path.
try_remove_file
def try_remove_file(
file_path: str
) -> FileBase
Finds a file at the specified relative path within this project and removes it.
file_path
Required
- Type: str
The file path.
If this path is relative, it will be resolved from the root of this project.
add_dependency
def add_dependency(
spec: str
) -> None
Adds a runtime dependency.
spec
Required
- Type: str
Format <module>@<semver>
.
add_dev_dependency
def add_dev_dependency(
spec: str
) -> None
Adds a dev dependency.
spec
Required
- Type: str
Format <module>@<semver>
.
add_implicit_dependency
def add_implicit_dependency(
dependent: Project,
dependee: typing.Union[str, Project]
) -> None
Create an implicit dependency between two Projects.
This is typically used in polygot repos where a Typescript project wants a build dependency on a Python project as an example.
dependent
Required
- Type: projen.Project
dependee
Required
- Type: typing.Union[str, projen.Project]
add_java_dependency
def add_java_dependency(
dependent: JavaProject,
dependee: JavaProject
) -> None
Adds a dependency between two Java Projects in the monorepo.
dependent
Required
- Type: projen.java.JavaProject
dependee
Required
- Type: projen.java.JavaProject
add_nx_run_many_task
def add_nx_run_many_task(
name: str,
target: str,
configuration: str = None,
exclude: str = None,
ignore_cycles: bool = None,
no_bail: bool = None,
output_style: str = None,
parallel: typing.Union[int, float] = None,
projects: typing.List[str] = None,
runner: str = None,
skip_cache: bool = None,
verbose: bool = None
) -> Task
Add project task that executes npx nx run-many ...
style command.
name
Required
- Type: str
target
Required
- Type: str
Task to run for affected projects.
configuration
Optional
- Type: str
This is the configuration to use when performing tasks on projects.
exclude
Optional
- Type: str
Exclude certain projects from being processed.
ignore_cycles
Optional
- Type: bool
Ignore cycles in the task graph.
no_bail
Optional
- Type: bool
Do not stop command execution after the first failed task.
output_style
Optional
- Type: str
- Default: "stream"
Defines how Nx emits outputs tasks logs.
parallel
Optional
- Type: typing.Union[int, float]
- Default: 3
Max number of parallel processes.
projects
Optional
- Type: typing.List[str]
Project to run as list project names and/or patterns.
runner
Optional
- Type: str
This is the name of the tasks runner configuration in nx.json.
skip_cache
Optional
- Type: bool
Rerun the tasks even when the results are available in the cache.
verbose
Optional
- Type: bool
Prints additional information about the commands (e.g. stack traces).
add_python_poetry_dependency
def add_python_poetry_dependency(
dependent: PythonProject,
dependee: PythonProject
) -> None
Adds a dependency between two Python Projects in the monorepo.
The dependent must have Poetry enabled.
dependent
Required
- Type: projen.python.PythonProject
dependee
Required
- Type: projen.python.PythonProject
compose_nx_run_many_command
def compose_nx_run_many_command(
target: str,
configuration: str = None,
exclude: str = None,
ignore_cycles: bool = None,
no_bail: bool = None,
output_style: str = None,
parallel: typing.Union[int, float] = None,
projects: typing.List[str] = None,
runner: str = None,
skip_cache: bool = None,
verbose: bool = None
) -> typing.List[str]
Helper to format npx nx run-many ...
style command.
target
Required
- Type: str
Task to run for affected projects.
configuration
Optional
- Type: str
This is the configuration to use when performing tasks on projects.
exclude
Optional
- Type: str
Exclude certain projects from being processed.
ignore_cycles
Optional
- Type: bool
Ignore cycles in the task graph.
no_bail
Optional
- Type: bool
Do not stop command execution after the first failed task.
output_style
Optional
- Type: str
- Default: "stream"
Defines how Nx emits outputs tasks logs.
parallel
Optional
- Type: typing.Union[int, float]
- Default: 3
Max number of parallel processes.
projects
Optional
- Type: typing.List[str]
Project to run as list project names and/or patterns.
runner
Optional
- Type: str
This is the name of the tasks runner configuration in nx.json.
skip_cache
Optional
- Type: bool
Rerun the tasks even when the results are available in the cache.
verbose
Optional
- Type: bool
Prints additional information about the commands (e.g. stack traces).
exec_nx_run_many_command
def exec_nx_run_many_command(
target: str,
configuration: str = None,
exclude: str = None,
ignore_cycles: bool = None,
no_bail: bool = None,
output_style: str = None,
parallel: typing.Union[int, float] = None,
projects: typing.List[str] = None,
runner: str = None,
skip_cache: bool = None,
verbose: bool = None
) -> str
Helper to format npx nx run-many ...
style command execution in package manager.
target
Required
- Type: str
Task to run for affected projects.
configuration
Optional
- Type: str
This is the configuration to use when performing tasks on projects.
exclude
Optional
- Type: str
Exclude certain projects from being processed.
ignore_cycles
Optional
- Type: bool
Ignore cycles in the task graph.
no_bail
Optional
- Type: bool
Do not stop command execution after the first failed task.
output_style
Optional
- Type: str
- Default: "stream"
Defines how Nx emits outputs tasks logs.
parallel
Optional
- Type: typing.Union[int, float]
- Default: 3
Max number of parallel processes.
projects
Optional
- Type: typing.List[str]
Project to run as list project names and/or patterns.
runner
Optional
- Type: str
This is the name of the tasks runner configuration in nx.json.
skip_cache
Optional
- Type: bool
Rerun the tasks even when the results are available in the cache.
verbose
Optional
- Type: bool
Prints additional information about the commands (e.g. stack traces).
Static Functions
Name | Description |
---|---|
is_construct |
Checks if x is a construct. |
is_project |
Test whether the given construct is a project. |
of |
Find the closest ancestor project for given construct. |
is_construct
import aws.pdk.monorepo
aws.pdk.monorepo.MonorepoPythonProject.is_construct(
x: typing.Any
)
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
x
Required
- Type: typing.Any
Any object.
is_project
import aws.pdk.monorepo
aws.pdk.monorepo.MonorepoPythonProject.is_project(
x: typing.Any
)
Test whether the given construct is a project.
x
Required
- Type: typing.Any
of
import aws.pdk.monorepo
aws.pdk.monorepo.MonorepoPythonProject.of(
construct: IConstruct
)
Find the closest ancestor project for given construct.
When given a project, this it the project itself.
construct
Required
- Type: constructs.IConstruct
Properties
Name | Type | Description |
---|---|---|
node |
constructs.Node |
The tree node. |
build_task |
projen.Task |
No description. |
commit_generated |
bool |
Whether to commit the managed files by default. |
compile_task |
projen.Task |
No description. |
components |
typing.List[projen.Component] |
Returns all the components within this project. |
deps |
projen.Dependencies |
Project dependencies. |
ejected |
bool |
Whether or not the project is being ejected. |
files |
typing.List[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 |
str |
Project name. |
outdir |
str |
Absolute output directory of this project. |
package_task |
projen.Task |
No description. |
post_compile_task |
projen.Task |
No description. |
pre_compile_task |
projen.Task |
No description. |
project_build |
projen.ProjectBuild |
Manages the build process of the project. |
projen_command |
str |
The command to use in order to run the projen CLI. |
root |
projen.Project |
The root project. |
subprojects |
typing.List[projen.Project] |
Returns all the subprojects within this project. |
tasks |
projen.Tasks |
Project tasks. |
test_task |
projen.Task |
No description. |
default_task |
projen.Task |
This is the "default" task, the one that executes "projen". |
init_project |
projen.InitProject |
The options used when this project is bootstrapped via projen new . |
parent |
projen.Project |
A parent project. |
project_type |
projen.ProjectType |
No description. |
auto_approve |
projen.github.AutoApprove |
Auto approve set up for this project. |
dev_container |
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. |
deps_manager |
projen.python.IPythonDeps |
API for managing dependencies. |
env_manager |
projen.python.IPythonEnv |
API for mangaging the Python runtime environment. |
module_name |
str |
Python module name (the project name, with any hyphens or periods replaced with underscores). |
version |
str |
Version of the package for distribution (should follow semver). |
packaging_manager |
projen.python.IPythonPackaging |
API for managing packaging the project as a library. |
pytest |
projen.python.Pytest |
Pytest component. |
nx |
NxWorkspace |
Return the NxWorkspace instance. |
nx_configurator |
NxConfigurator |
No description. |
node
Required
node: Node
- Type: constructs.Node
The tree node.
build_task
Required
build_task: Task
- Type: projen.Task
commit_generated
Required
commit_generated: bool
- Type: bool
Whether to commit the managed files by default.
compile_task
Required
compile_task: Task
- Type: projen.Task
components
Required
components: typing.List[Component]
- Type: typing.List[projen.Component]
Returns all the components within this project.
deps
Required
deps: Dependencies
- Type: projen.Dependencies
Project dependencies.
ejected
Required
ejected: bool
- Type: bool
Whether or not the project is being ejected.
files
Required
files: typing.List[FileBase]
- Type: typing.List[projen.FileBase]
All files in this project.
gitattributes
Required
gitattributes: GitAttributesFile
- Type: projen.GitAttributesFile
The .gitattributes file for this repository.
gitignore
Required
gitignore: IgnoreFile
- Type: projen.IgnoreFile
.gitignore.
logger
Required
logger: Logger
- Type: projen.Logger
Logging utilities.
name
Required
name: str
- Type: str
Project name.
outdir
Required
outdir: str
- Type: str
Absolute output directory of this project.
package_task
Required
package_task: Task
- Type: projen.Task
post_compile_task
Required
post_compile_task: Task
- Type: projen.Task
pre_compile_task
Required
pre_compile_task: Task
- Type: projen.Task
project_build
Required
project_build: ProjectBuild
- Type: projen.ProjectBuild
Manages the build process of the project.
projen_command
Required
projen_command: str
- Type: str
The command to use in order to run the projen CLI.
root
Required
root: Project
- Type: projen.Project
The root project.
subprojects
Required
subprojects: typing.List[Project]
- Type: typing.List[projen.Project]
Returns all the subprojects within this project.
tasks
Required
tasks: Tasks
- Type: projen.Tasks
Project tasks.
test_task
Required
test_task: Task
- Type: projen.Task
default_task
Optional
default_task: Task
- Type: projen.Task
This is the "default" task, the one that executes "projen".
Undefined if the project is being ejected.
init_project
Optional
init_project: 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
parent: Project
- Type: projen.Project
A parent project.
If undefined, this is the root project.
project_type
Required
project_type: ProjectType
- Type: projen.ProjectType
auto_approve
Optional
auto_approve: AutoApprove
- Type: projen.github.AutoApprove
Auto approve set up for this project.
dev_container
Optional
dev_container: DevContainer
- Type: projen.vscode.DevContainer
Access for .devcontainer.json (used for GitHub Codespaces).
This will be undefined
if devContainer boolean is false
github
Optional
github: GitHub
- Type: projen.github.GitHub
Access all github components.
This will be undefined
for subprojects.
gitpod
Optional
gitpod: Gitpod
- Type: projen.Gitpod
Access for Gitpod.
This will be undefined
if gitpod boolean is false
vscode
Optional
vscode: VsCode
- Type: projen.vscode.VsCode
Access all VSCode components.
This will be undefined
for subprojects.
deps_manager
Required
deps_manager: IPythonDeps
- Type: projen.python.IPythonDeps
API for managing dependencies.
env_manager
Required
env_manager: IPythonEnv
- Type: projen.python.IPythonEnv
API for mangaging the Python runtime environment.
module_name
Required
module_name: str
- Type: str
Python module name (the project name, with any hyphens or periods replaced with underscores).
version
Required
version: str
- Type: str
Version of the package for distribution (should follow semver).
packaging_manager
Optional
packaging_manager: IPythonPackaging
- Type: projen.python.IPythonPackaging
API for managing packaging the project as a library.
Only applies when the projectType
is LIB.
pytest
Optional
pytest: Pytest
- Type: projen.python.Pytest
Pytest component.
nx
Required
nx: NxWorkspace
- Type: NxWorkspace
Return the NxWorkspace instance.
This should be implemented using a getter.
nx_configurator
Required
nx_configurator: NxConfigurator
- Type: NxConfigurator
Constants
Name | Type | Description |
---|---|---|
DEFAULT_TASK |
str |
The name of the default task (the task executed when projen is run without arguments). |
DEFAULT_TASK
Required
DEFAULT_TASK: str
- Type: str
The name of the default task (the task executed when projen
is run without arguments).
Normally this task should synthesize the project files.
MonorepoTsProject
- Implements: INxProjectCore
This project type will bootstrap a monorepo with support for polygot builds, build caching, dependency graph visualization and much more.
Initializers
import aws.pdk.monorepo
aws.pdk.monorepo.MonorepoTsProject(
name: str,
allow_library_dependencies: bool = None,
artifacts_directory: str = None,
author_email: str = None,
author_name: str = None,
author_organization: bool = None,
author_url: str = None,
auto_approve_options: AutoApproveOptions = None,
auto_approve_upgrades: bool = None,
auto_detect_bin: bool = None,
auto_merge: bool = None,
auto_merge_options: AutoMergeOptions = None,
bin: typing.Mapping[str] = None,
bugs_email: str = None,
bugs_url: str = None,
build_workflow: bool = None,
build_workflow_options: BuildWorkflowOptions = None,
build_workflow_triggers: Triggers = None,
bundled_deps: typing.List[str] = None,
bundler_options: BundlerOptions = None,
check_licenses: LicenseCheckerOptions = None,
clobber: bool = None,
code_artifact_options: CodeArtifactOptions = None,
code_cov: bool = None,
code_cov_token_secret: str = None,
commit_generated: bool = None,
copyright_owner: str = None,
copyright_period: str = None,
default_release_branch: str = None,
dependabot: bool = None,
dependabot_options: DependabotOptions = None,
deps: typing.List[str] = None,
deps_upgrade: bool = None,
deps_upgrade_options: UpgradeDependenciesOptions = None,
description: str = None,
dev_container: bool = None,
dev_deps: typing.List[str] = None,
disable_tsconfig: bool = None,
disable_tsconfig_dev: bool = None,
docgen: bool = None,
docs_directory: str = None,
entrypoint: str = None,
entrypoint_types: str = None,
eslint: bool = None,
eslint_options: EslintOptions = None,
github: bool = None,
github_options: GitHubOptions = None,
gitignore: typing.List[str] = None,
git_ignore_options: IgnoreFileOptions = None,
git_options: GitOptions = None,
gitpod: bool = None,
homepage: str = None,
jest: bool = None,
jest_options: JestOptions = None,
jsii_release_version: str = None,
keywords: typing.List[str] = None,
libdir: str = None,
license: str = None,
licensed: bool = None,
logging: LoggerOptions = None,
major_version: typing.Union[int, float] = None,
max_node_version: str = None,
mergify: bool = None,
mergify_options: MergifyOptions = None,
min_major_version: typing.Union[int, float] = None,
min_node_version: str = None,
mutable_build: bool = None,
npm_access: NpmAccess = None,
npm_dist_tag: str = None,
npmignore: typing.List[str] = None,
npmignore_enabled: bool = None,
npm_ignore_options: IgnoreFileOptions = None,
npm_provenance: bool = None,
npm_registry: str = None,
npm_registry_url: str = None,
npm_token_secret: str = None,
outdir: str = None,
package: bool = None,
package_manager: NodePackageManager = None,
package_name: str = None,
parent: Project = None,
peer_dependency_options: PeerDependencyOptions = None,
peer_deps: typing.List[str] = None,
pnpm_version: str = None,
post_build_steps: typing.List[JobStep] = None,
prerelease: str = None,
prettier: bool = None,
prettier_options: PrettierOptions = None,
project_type: ProjectType = None,
projen_command: str = None,
projen_credentials: GithubCredentials = None,
projen_dev_dependency: bool = None,
projenrc_js: bool = None,
projenrc_json: bool = None,
projenrc_json_options: ProjenrcJsonOptions = None,
projenrc_js_options: ProjenrcOptions = None,
projenrc_ts: bool = None,
projenrc_ts_options: ProjenrcOptions = None,
projen_token_secret: str = None,
projen_version: str = None,
publish_dry_run: bool = None,
publish_tasks: bool = None,
pull_request_template: bool = None,
pull_request_template_contents: typing.List[str] = None,
readme: SampleReadmeProps = None,
releasable_commits: ReleasableCommits = None,
release: bool = None,
release_branches: typing.Mapping[BranchOptions] = None,
release_every_commit: bool = None,
release_failure_issue: bool = None,
release_failure_issue_label: str = None,
release_schedule: str = None,
release_tag_prefix: str = None,
release_to_npm: bool = None,
release_trigger: ReleaseTrigger = None,
release_workflow: bool = None,
release_workflow_name: str = None,
release_workflow_setup_steps: typing.List[JobStep] = None,
renovatebot: bool = None,
renovatebot_options: RenovatebotOptions = None,
repository: str = None,
repository_directory: str = None,
sample_code: bool = None,
scoped_packages_options: typing.List[ScopedPackagesOptions] = None,
scripts: typing.Mapping[str] = None,
srcdir: str = None,
stability: str = None,
stale: bool = None,
stale_options: StaleOptions = None,
testdir: str = None,
tsconfig: TypescriptConfigOptions = None,
tsconfig_dev: TypescriptConfigOptions = None,
tsconfig_dev_file: str = None,
ts_jest_options: TsJestOptions = None,
typescript_version: str = None,
versionrc_options: typing.Mapping[typing.Any] = None,
vscode: bool = None,
workflow_bootstrap_steps: typing.List[JobStep] = None,
workflow_container_image: str = None,
workflow_git_identity: GitIdentity = None,
workflow_node_version: str = None,
workflow_package_cache: bool = None,
workflow_runs_on: typing.List[str] = None,
workflow_runs_on_group: GroupRunnerOptions = None,
yarn_berry_options: YarnBerryOptions = None,
disable_node_warnings: bool = None,
license_options: LicenseOptions = None,
monorepo_upgrade_deps: bool = None,
monorepo_upgrade_deps_options: MonorepoUpgradeDepsOptions = None,
workspace_config: WorkspaceConfig = None
)
Name | Type | Description |
---|---|---|
name |
str |
No description. |
allow_library_dependencies |
bool |
Allow the project to include peerDependencies and bundledDependencies . |
artifacts_directory |
str |
A directory which will contain build artifacts. |
author_email |
str |
Author's e-mail. |
author_name |
str |
Author's name. |
author_organization |
bool |
Is the author an organization. |
author_url |
str |
Author's URL / Website. |
auto_approve_options |
projen.github.AutoApproveOptions |
Enable and configure the 'auto approve' workflow. |
auto_approve_upgrades |
bool |
Automatically approve deps upgrade PRs, allowing them to be merged by mergify (if configued). |
auto_detect_bin |
bool |
Automatically add all executables under the bin directory to your package.json file under the bin section. |
auto_merge |
bool |
Enable automatic merging on GitHub. |
auto_merge_options |
projen.github.AutoMergeOptions |
Configure options for automatic merging on GitHub. |
bin |
typing.Mapping[str] |
Binary programs vended with your module. |
bugs_email |
str |
The email address to which issues should be reported. |
bugs_url |
str |
The url to your project's issue tracker. |
build_workflow |
bool |
Define a GitHub workflow for building PRs. |
build_workflow_options |
projen.javascript.BuildWorkflowOptions |
Options for PR build workflow. |
build_workflow_triggers |
projen.github.workflows.Triggers |
Build workflow triggers. |
bundled_deps |
typing.List[str] |
List of dependencies to bundle into this module. |
bundler_options |
projen.javascript.BundlerOptions |
Options for Bundler . |
check_licenses |
projen.javascript.LicenseCheckerOptions |
Configure which licenses should be deemed acceptable for use by dependencies. |
clobber |
bool |
Add a clobber task which resets the repo to origin. |
code_artifact_options |
projen.javascript.CodeArtifactOptions |
Options for npm packages using AWS CodeArtifact. |
code_cov |
bool |
Define a GitHub workflow step for sending code coverage metrics to https://codecov.io/ Uses codecov/codecov-action@v4 A secret is required for private repos. Configured with @codeCovTokenSecret . |
code_cov_token_secret |
str |
Define the secret name for a specified https://codecov.io/ token A secret is required to send coverage for private repositories. |
commit_generated |
bool |
Whether to commit the managed files by default. |
copyright_owner |
str |
License copyright owner. |
copyright_period |
str |
The copyright years to put in the LICENSE file. |
default_release_branch |
str |
The name of the main release branch. |
dependabot |
bool |
Use dependabot to handle dependency upgrades. |
dependabot_options |
projen.github.DependabotOptions |
Options for dependabot. |
deps |
typing.List[str] |
Runtime dependencies of this module. |
deps_upgrade |
bool |
Use tasks and github workflows to handle dependency upgrades. |
deps_upgrade_options |
projen.javascript.UpgradeDependenciesOptions |
Options for UpgradeDependencies . |
description |
str |
The description is just a string that helps people understand the purpose of the package. |
dev_container |
bool |
Add a VSCode development environment (used for GitHub Codespaces). |
dev_deps |
typing.List[str] |
Build dependencies for this module. |
disable_tsconfig |
bool |
Do not generate a tsconfig.json file (used by jsii projects since tsconfig.json is generated by the jsii compiler). |
disable_tsconfig_dev |
bool |
Do not generate a tsconfig.dev.json file. |
docgen |
bool |
Docgen by Typedoc. |
docs_directory |
str |
Docs directory. |
entrypoint |
str |
Module entrypoint (main in package.json ). Set to an empty string to not include main in your package.json. |
entrypoint_types |
str |
The .d.ts file that includes the type declarations for this module. |
eslint |
bool |
Setup eslint. |
eslint_options |
projen.javascript.EslintOptions |
Eslint options. |
github |
bool |
Enable GitHub integration. |
github_options |
projen.github.GitHubOptions |
Options for GitHub integration. |
gitignore |
typing.List[str] |
Additional entries to .gitignore. |
git_ignore_options |
projen.IgnoreFileOptions |
Configuration options for .gitignore file. |
git_options |
projen.GitOptions |
Configuration options for git. |
gitpod |
bool |
Add a Gitpod development environment. |
homepage |
str |
Package's Homepage / Website. |
jest |
bool |
Setup jest unit tests. |
jest_options |
projen.javascript.JestOptions |
Jest options. |
jsii_release_version |
str |
Version requirement of publib which is used to publish modules to npm. |
keywords |
typing.List[str] |
Keywords to include in package.json . |
libdir |
str |
Typescript artifacts output directory. |
license |
str |
License's SPDX identifier. |
licensed |
bool |
Indicates if a license should be added. |
logging |
projen.LoggerOptions |
Configure logging options such as verbosity. |
major_version |
typing.Union[int, float] |
Major version to release from the default branch. |
max_node_version |
str |
Minimum node.js version to require via engines (inclusive). |
mergify |
bool |
Whether mergify should be enabled on this repository or not. |
mergify_options |
projen.github.MergifyOptions |
Options for mergify. |
min_major_version |
typing.Union[int, float] |
Minimal Major version to release. |
min_node_version |
str |
Minimum Node.js version to require via package.json engines (inclusive). |
mutable_build |
bool |
Automatically update files modified during builds to pull-request branches. |
npm_access |
projen.javascript.NpmAccess |
Access level of the npm package. |
npm_dist_tag |
str |
The npmDistTag to use when publishing from the default branch. |
npmignore |
typing.List[str] |
Additional entries to .npmignore. |
npmignore_enabled |
bool |
Defines an .npmignore file. Normally this is only needed for libraries that are packaged as tarballs. |
npm_ignore_options |
projen.IgnoreFileOptions |
Configuration options for .npmignore file. |
npm_provenance |
bool |
Should provenance statements be generated when the package is published. |
npm_registry |
str |
The host name of the npm registry to publish to. |
npm_registry_url |
str |
The base URL of the npm package registry. |
npm_token_secret |
str |
GitHub secret which contains the NPM token to use when publishing packages. |
outdir |
str |
The root directory of the project. Relative to this directory, all files are synthesized. |
package |
bool |
Defines a package task that will produce an npm tarball under the artifacts directory (e.g. dist ). |
package_manager |
projen.javascript.NodePackageManager |
The Node Package Manager used to execute scripts. |
package_name |
str |
The "name" in package.json. |
parent |
projen.Project |
The parent project, if this project is part of a bigger project. |
peer_dependency_options |
projen.javascript.PeerDependencyOptions |
Options for peerDeps . |
peer_deps |
typing.List[str] |
Peer dependencies for this module. |
pnpm_version |
str |
The version of PNPM to use if using PNPM as a package manager. |
post_build_steps |
typing.List[projen.github.workflows.JobStep] |
Steps to execute after build as part of the release workflow. |
prerelease |
str |
Bump versions from the default branch as pre-releases (e.g. "beta", "alpha", "pre"). |
prettier |
bool |
Setup prettier. |
prettier_options |
projen.javascript.PrettierOptions |
Prettier options. |
project_type |
projen.ProjectType |
Which type of project this is (library/app). |
projen_command |
str |
The shell command to use in order to run the projen CLI. |
projen_credentials |
projen.github.GithubCredentials |
Choose a method of providing GitHub API access for projen workflows. |
projen_dev_dependency |
bool |
Indicates of "projen" should be installed as a devDependency. |
projenrc_js |
bool |
Generate (once) .projenrc.js (in JavaScript). Set to false in order to disable .projenrc.js generation. |
projenrc_json |
bool |
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation. |
projenrc_json_options |
projen.ProjenrcJsonOptions |
Options for .projenrc.json. |
projenrc_js_options |
projen.javascript.ProjenrcOptions |
Options for .projenrc.js. |
projenrc_ts |
bool |
Use TypeScript for your projenrc file (.projenrc.ts ). |
projenrc_ts_options |
projen.typescript.ProjenrcOptions |
Options for .projenrc.ts. |
projen_token_secret |
str |
The name of a secret which includes a GitHub Personal Access Token to be used by projen workflows. |
projen_version |
str |
Version of projen to install. |
publish_dry_run |
bool |
Instead of actually publishing to package managers, just print the publishing command. |
publish_tasks |
bool |
Define publishing tasks that can be executed manually as well as workflows. |
pull_request_template |
bool |
Include a GitHub pull request template. |
pull_request_template_contents |
typing.List[str] |
The contents of the pull request template. |
readme |
projen.SampleReadmeProps |
The README setup. |
releasable_commits |
projen.ReleasableCommits |
Find commits that should be considered releasable Used to decide if a release is required. |
release |
bool |
Add release management to this project. |
release_branches |
typing.Mapping[projen.release.BranchOptions] |
Defines additional release branches. |
release_every_commit |
bool |
Automatically release new versions every commit to one of branches in releaseBranches . |
release_failure_issue |
bool |
Create a github issue on every failed publishing task. |
release_failure_issue_label |
str |
The label to apply to issues indicating publish failures. |
release_schedule |
str |
CRON schedule to trigger new releases. |
release_tag_prefix |
str |
Automatically add the given prefix to release tags. |
release_to_npm |
bool |
Automatically release to npm when new versions are introduced. |
release_trigger |
projen.release.ReleaseTrigger |
The release trigger to use. |
release_workflow |
bool |
DEPRECATED: renamed to release . |
release_workflow_name |
str |
The name of the default release workflow. |
release_workflow_setup_steps |
typing.List[projen.github.workflows.JobStep] |
A set of workflow steps to execute in order to setup the workflow container. |
renovatebot |
bool |
Use renovatebot to handle dependency upgrades. |
renovatebot_options |
projen.RenovatebotOptions |
Options for renovatebot. |
repository |
str |
The repository is the location where the actual code for your package lives. |
repository_directory |
str |
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. |
sample_code |
bool |
Generate one-time sample in src/ and test/ if there are no files there. |
scoped_packages_options |
typing.List[projen.javascript.ScopedPackagesOptions] |
Options for privately hosted scoped packages. |
scripts |
typing.Mapping[str] |
npm scripts to include. |
srcdir |
str |
Typescript sources directory. |
stability |
str |
Package's Stability. |
stale |
bool |
Auto-close of stale issues and pull request. |
stale_options |
projen.github.StaleOptions |
Auto-close stale issues and pull requests. |
testdir |
str |
Jest tests directory. |
tsconfig |
projen.javascript.TypescriptConfigOptions |
Custom TSConfig. |
tsconfig_dev |
projen.javascript.TypescriptConfigOptions |
Custom tsconfig options for the development tsconfig.json file (used for testing). |
tsconfig_dev_file |
str |
The name of the development tsconfig.json file. |
ts_jest_options |
projen.typescript.TsJestOptions |
Options for ts-jest. |
typescript_version |
str |
TypeScript version to use. |
versionrc_options |
typing.Mapping[typing.Any] |
Custom configuration used when creating changelog with standard-version package. |
vscode |
bool |
Enable VSCode integration. |
workflow_bootstrap_steps |
typing.List[projen.github.workflows.JobStep] |
Workflow steps to use in order to bootstrap this repo. |
workflow_container_image |
str |
Container image to use for GitHub workflows. |
workflow_git_identity |
projen.github.GitIdentity |
The git identity to use in workflows. |
workflow_node_version |
str |
The node version to use in GitHub workflows. |
workflow_package_cache |
bool |
Enable Node.js package cache in GitHub workflows. |
workflow_runs_on |
typing.List[str] |
Github Runner selection labels. |
workflow_runs_on_group |
projen.GroupRunnerOptions |
Github Runner Group selection options. |
yarn_berry_options |
projen.javascript.YarnBerryOptions |
Options for Yarn Berry. |
disable_node_warnings |
bool |
Disable node warnings from being emitted during build tasks. |
license_options |
LicenseOptions |
Default license to apply to all PDK managed packages. |
monorepo_upgrade_deps |
bool |
Whether to include an upgrade-deps task at the root of the monorepo which will upgrade all dependencies. |
monorepo_upgrade_deps_options |
MonorepoUpgradeDepsOptions |
Monorepo Upgrade Deps options. |
workspace_config |
WorkspaceConfig |
Configuration for workspace. |
name
Required
- Type: str
- Default: $BASEDIR
allow_library_dependencies
Optional
- Type: bool
- 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.
artifacts_directory
Optional
- Type: str
- Default: "dist"
A directory which will contain build artifacts.
author_email
Optional
- Type: str
Author's e-mail.
author_name
Optional
- Type: str
Author's name.
author_organization
Optional
- Type: bool
Is the author an organization.
author_url
Optional
- Type: str
Author's URL / Website.
auto_approve_options
Optional
- Type: projen.github.AutoApproveOptions
- Default: auto approve is disabled
Enable and configure the 'auto approve' workflow.
auto_approve_upgrades
Optional
- Type: bool
- 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.
auto_detect_bin
Optional
- Type: bool
- Default: true
Automatically add all executables under the bin
directory to your package.json
file under the bin
section.
auto_merge
Optional
- Type: bool
- Default: true
Enable automatic merging on GitHub.
Has no effect if github.mergify
is set to false.
auto_merge_options
Optional
- 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.
bin
Optional
- Type: typing.Mapping[str]
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.
bugs_email
Optional
- Type: str
The email address to which issues should be reported.
bugs_url
Optional
- Type: str
The url to your project's issue tracker.
build_workflow
Optional
- Type: bool
- Default: true if not a subproject
Define a GitHub workflow for building PRs.
build_workflow_options
Optional
- Type: projen.javascript.BuildWorkflowOptions
Options for PR build workflow.
~~build_workflow_triggers
~~Optional
-
Deprecated: - Use
buildWorkflowOptions.workflowTriggers
-
Type: projen.github.workflows.Triggers
- Default: "{ pullRequest: {}, workflowDispatch: {} }"
Build workflow triggers.
bundled_deps
Optional
- Type: typing.List[str]
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.
bundler_options
Optional
- Type: projen.javascript.BundlerOptions
Options for Bundler
.
check_licenses
Optional
- Type: projen.javascript.LicenseCheckerOptions
- Default: no license checks are run during the build and all licenses will be accepted
Configure which licenses should be deemed acceptable for use by dependencies.
This setting will cause the build to fail, if any prohibited or not allowed licenses ares encountered.
clobber
Optional
- Type: bool
- Default: true, but false for subprojects
Add a clobber
task which resets the repo to origin.
code_artifact_options
Optional
- 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
code_cov
Optional
- Type: bool
- Default: false
Define a GitHub workflow step for sending code coverage metrics to https://codecov.io/ Uses codecov/codecov-action@v4 A secret is required for private repos. Configured with @codeCovTokenSecret
.
code_cov_token_secret
Optional
- Type: str
- 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.
commit_generated
Optional
- Type: bool
- Default: true
Whether to commit the managed files by default.
copyright_owner
Optional
- Type: str
- Default: defaults to the value of authorName or "" if
authorName
is undefined.
License copyright owner.
copyright_period
Optional
- Type: str
- Default: current year
The copyright years to put in the LICENSE file.
default_release_branch
Optional
- Type: str
- Default: "main"
The name of the main release branch.
dependabot
Optional
- Type: bool
- Default: false
Use dependabot to handle dependency upgrades.
Cannot be used in conjunction with depsUpgrade
.
dependabot_options
Optional
- Type: projen.github.DependabotOptions
- Default: default options
Options for dependabot.
deps
Optional
- Type: typing.List[str]
- 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.
deps_upgrade
Optional
- Type: bool
- Default: true
Use tasks and github workflows to handle dependency upgrades.
Cannot be used in conjunction with dependabot
.
deps_upgrade_options
Optional
- Type: projen.javascript.UpgradeDependenciesOptions
- Default: default options
Options for UpgradeDependencies
.
description
Optional
- Type: str
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
dev_container
Optional
- Type: bool
- Default: false
Add a VSCode development environment (used for GitHub Codespaces).
dev_deps
Optional
- Type: typing.List[str]
- 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.
disable_tsconfig
Optional
- Type: bool
- Default: false
Do not generate a tsconfig.json
file (used by jsii projects since tsconfig.json is generated by the jsii compiler).
disable_tsconfig_dev
Optional
- Type: bool
- Default: false
Do not generate a tsconfig.dev.json
file.
docgen
Optional
- Type: bool
- Default: false
Docgen by Typedoc.
docs_directory
Optional
- Type: str
- Default: "docs"
Docs directory.
entrypoint
Optional
- Type: str
- Default: "lib/index.js"
Module entrypoint (main
in package.json
). Set to an empty string to not include main
in your package.json.
entrypoint_types
Optional
- Type: str
- 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
- Type: bool
- Default: true
Setup eslint.
eslint_options
Optional
- Type: projen.javascript.EslintOptions
- Default: opinionated default options
Eslint options.
github
Optional
- Type: bool
- Default: true
Enable GitHub integration.
Enabled by default for root projects. Disabled for non-root projects.
github_options
Optional
- Type: projen.github.GitHubOptions
- Default: see GitHubOptions
Options for GitHub integration.
gitignore
Optional
- Type: typing.List[str]
Additional entries to .gitignore.
git_ignore_options
Optional
- Type: projen.IgnoreFileOptions
Configuration options for .gitignore file.
git_options
Optional
- Type: projen.GitOptions
Configuration options for git.
gitpod
Optional
- Type: bool
- Default: false
Add a Gitpod development environment.
homepage
Optional
- Type: str
Package's Homepage / Website.
jest
Optional
- Type: bool
- Default: true
Setup jest unit tests.
jest_options
Optional
- Type: projen.javascript.JestOptions
- Default: default options
Jest options.
jsii_release_version
Optional
- Type: str
- Default: "latest"
Version requirement of publib
which is used to publish modules to npm.
keywords
Optional
- Type: typing.List[str]
Keywords to include in package.json
.
libdir
Optional
- Type: str
- Default: "lib"
Typescript artifacts output directory.
license
Optional
- Type: str
- 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
- Type: bool
- Default: true
Indicates if a license should be added.
logging
Optional
- Type: projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
major_version
Optional
- Type: typing.Union[int, float]
- 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.
max_node_version
Optional
- Type: str
- Default: no max
Minimum node.js version to require via engines
(inclusive).
~~mergify
~~Optional
-
Deprecated: use
githubOptions.mergify
instead -
Type: bool
- Default: true
Whether mergify should be enabled on this repository or not.
~~mergify_options
~~Optional
-
Deprecated: use
githubOptions.mergifyOptions
instead -
Type: projen.github.MergifyOptions
- Default: default options
Options for mergify.
min_major_version
Optional
- Type: typing.Union[int, float]
- 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
.
min_node_version
Optional
- Type: str
- Default: no "engines" specified
Minimum Node.js version to require via package.json engines
(inclusive).
~~mutable_build
~~Optional
-
Deprecated: - Use
buildWorkflowOptions.mutableBuild
-
Type: bool
- 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.
npm_access
Optional
- Type: projen.javascript.NpmAccess
- Default: for scoped packages (e.g.
foo@bar
), the default isNpmAccess.RESTRICTED
, for non-scoped packages, the default isNpmAccess.PUBLIC
.
Access level of the npm package.
npm_dist_tag
Optional
- Type: str
- 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.
~~npmignore
~~Optional
-
Deprecated: - use
project.addPackageIgnore
-
Type: typing.List[str]
Additional entries to .npmignore.
npmignore_enabled
Optional
- Type: bool
- Default: true
Defines an .npmignore file. Normally this is only needed for libraries that are packaged as tarballs.
npm_ignore_options
Optional
- Type: projen.IgnoreFileOptions
Configuration options for .npmignore file.
npm_provenance
Optional
- Type: bool
- Default: true for public packages, false otherwise
Should provenance statements be generated when the package is published.
A supported package manager is required to publish a package with npm provenance statements and you will need to use a supported CI/CD provider.
Note that the projen Release
and Publisher
components are using publib
to publish packages,
which is using npm internally and supports provenance statements independently of the package manager used.
~~npm_registry
~~Optional
-
Deprecated: use
npmRegistryUrl
instead -
Type: str
The host name of the npm registry to publish to.
Cannot be set together with npmRegistryUrl
.
npm_registry_url
Optional
- Type: str
- Default: "https://registry.npmjs.org"
The base URL of the npm package registry.
Must be a URL (e.g. start with "https://" or "http://")
npm_token_secret
Optional
- Type: str
- Default: "NPM_TOKEN"
GitHub secret which contains the NPM token to use when publishing packages.
outdir
Optional
- Type: str
- 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 subprojects.
package
Optional
- Type: bool
- Default: true
Defines a package
task that will produce an npm tarball under the artifacts directory (e.g. dist
).
package_manager
Optional
- Type: projen.javascript.NodePackageManager
- Default: NodePackageManager.YARN_CLASSIC
The Node Package Manager used to execute scripts.
package_name
Optional
- Type: str
- Default: defaults to project name
The "name" in package.json.
parent
Optional
- Type: projen.Project
The parent project, if this project is part of a bigger project.
peer_dependency_options
Optional
- Type: projen.javascript.PeerDependencyOptions
Options for peerDeps
.
peer_deps
Optional
- Type: typing.List[str]
- 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.
pnpm_version
Optional
- Type: str
- Default: "7"
The version of PNPM to use if using PNPM as a package manager.
post_build_steps
Optional
- Type: typing.List[projen.github.workflows.JobStep]
- Default: []
Steps to execute after build as part of the release workflow.
prerelease
Optional
- Type: str
- Default: normal semantic versions
Bump versions from the default branch as pre-releases (e.g. "beta", "alpha", "pre").
prettier
Optional
- Type: bool
- Default: false
Setup prettier.
prettier_options
Optional
- Type: projen.javascript.PrettierOptions
- Default: default options
Prettier options.
~~project_type
~~Optional
-
Deprecated: no longer supported at the base project level
-
Type: projen.ProjectType
- Default: ProjectType.UNKNOWN
Which type of project this is (library/app).
projen_command
Optional
- Type: str
- Default: "npx projen"
The shell command to use in order to run the projen CLI.
Can be used to customize in special environments.
projen_credentials
Optional
- 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.
projen_dev_dependency
Optional
- Type: bool
- Default: true if not a subproject
Indicates of "projen" should be installed as a devDependency.
projenrc_js
Optional
- Type: bool
- Default: true if projenrcJson is false
Generate (once) .projenrc.js (in JavaScript). Set to false
in order to disable .projenrc.js generation.
projenrc_json
Optional
- Type: bool
- Default: false
Generate (once) .projenrc.json (in JSON). Set to false
in order to disable .projenrc.json generation.
projenrc_json_options
Optional
- Type: projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
projenrc_js_options
Optional
- Type: projen.javascript.ProjenrcOptions
- Default: default options
Options for .projenrc.js.
projenrc_ts
Optional
- Type: bool
- Default: false
Use TypeScript for your projenrc file (.projenrc.ts
).
projenrc_ts_options
Optional
- Type: projen.typescript.ProjenrcOptions
Options for .projenrc.ts.
~~projen_token_secret
~~Optional
-
Deprecated: use
projenCredentials
-
Type: str
- 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.
projen_version
Optional
- Type: str
- Default: Defaults to the latest version.
Version of projen to install.
publish_dry_run
Optional
- Type: bool
- Default: false
Instead of actually publishing to package managers, just print the publishing command.
publish_tasks
Optional
- Type: bool
- 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.
pull_request_template
Optional
- Type: bool
- Default: true
Include a GitHub pull request template.
pull_request_template_contents
Optional
- Type: typing.List[str]
- Default: default content
The contents of the pull request template.
readme
Optional
- Type: projen.SampleReadmeProps
- Default: { filename: 'README.md', contents: '# replace this' }
The README setup.
releasable_commits
Optional
- Type: projen.ReleasableCommits
- Default: ReleasableCommits.everyCommit()
Find commits that should be considered releasable Used to decide if a release is required.
release
Optional
- Type: bool
- Default: true (false for subprojects)
Add release management to this project.
release_branches
Optional
- Type: typing.Mapping[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.
~~release_every_commit
~~Optional
-
Deprecated: Use
releaseTrigger: ReleaseTrigger.continuous()
instead -
Type: bool
- Default: true
Automatically release new versions every commit to one of branches in releaseBranches
.
release_failure_issue
Optional
- Type: bool
- Default: false
Create a github issue on every failed publishing task.
release_failure_issue_label
Optional
- Type: str
- Default: "failed-release"
The label to apply to issues indicating publish failures.
Only applies if releaseFailureIssue
is true.
~~release_schedule
~~Optional
-
Deprecated: Use
releaseTrigger: ReleaseTrigger.scheduled()
instead -
Type: str
- Default: no scheduled releases
CRON schedule to trigger new releases.
release_tag_prefix
Optional
- Type: str
- 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.
release_to_npm
Optional
- Type: bool
- Default: false
Automatically release to npm when new versions are introduced.
release_trigger
Optional
- Type: projen.release.ReleaseTrigger
- Default: Continuous releases (
ReleaseTrigger.continuous()
)
The release trigger to use.
~~release_workflow
~~Optional
-
Deprecated: see
release
. -
Type: bool
- Default: true if not a subproject
DEPRECATED: renamed to release
.
release_workflow_name
Optional
- Type: str
- Default: "release"
The name of the default release workflow.
release_workflow_setup_steps
Optional
- Type: typing.List[projen.github.workflows.JobStep]
A set of workflow steps to execute in order to setup the workflow container.
renovatebot
Optional
- Type: bool
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebot_options
Optional
- Type: projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
repository
Optional
- Type: str
The repository is the location where the actual code for your package lives.
See https://classic.yarnpkg.com/en/docs/package-json/#toc-repository
repository_directory
Optional
- Type: str
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.
sample_code
Optional
- Type: bool
- Default: true
Generate one-time sample in src/
and test/
if there are no files there.
scoped_packages_options
Optional
- Type: typing.List[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()
orpackage.setScript()
-
Type: typing.Mapping[str]
- 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.
srcdir
Optional
- Type: str
- Default: "src"
Typescript sources directory.
stability
Optional
- Type: str
Package's Stability.
stale
Optional
- Type: bool
- Default: false
Auto-close of stale issues and pull request.
See staleOptions
for options.
stale_options
Optional
- Type: projen.github.StaleOptions
- Default: see defaults in
StaleOptions
Auto-close stale issues and pull requests.
To disable set stale
to false
.
testdir
Optional
- Type: str
- 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
- Type: projen.javascript.TypescriptConfigOptions
- Default: default options
Custom TSConfig.
tsconfig_dev
Optional
- Type: projen.javascript.TypescriptConfigOptions
- Default: use the production tsconfig options
Custom tsconfig options for the development tsconfig.json file (used for testing).
tsconfig_dev_file
Optional
- Type: str
- Default: "tsconfig.dev.json"
The name of the development tsconfig.json file.
ts_jest_options
Optional
- Type: projen.typescript.TsJestOptions
Options for ts-jest.
typescript_version
Optional
- Type: str
- 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
).
versionrc_options
Optional
- Type: typing.Mapping[typing.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.
vscode
Optional
- Type: bool
- Default: true
Enable VSCode integration.
Enabled by default for root projects. Disabled for non-root projects.
workflow_bootstrap_steps
Optional
- Type: typing.List[projen.github.workflows.JobStep]
- Default: "yarn install --frozen-lockfile && yarn projen"
Workflow steps to use in order to bootstrap this repo.
workflow_container_image
Optional
- Type: str
- Default: default image
Container image to use for GitHub workflows.
workflow_git_identity
Optional
- Type: projen.github.GitIdentity
- Default: GitHub Actions
The git identity to use in workflows.
workflow_node_version
Optional
- Type: str
- Default: same as
minNodeVersion
The node version to use in GitHub workflows.
workflow_package_cache
Optional
- Type: bool
- Default: false
Enable Node.js package cache in GitHub workflows.
workflow_runs_on
Optional
- Type: typing.List[str]
- Default: ["ubuntu-latest"]
Github Runner selection labels.
workflow_runs_on_group
Optional
- Type: projen.GroupRunnerOptions
Github Runner Group selection options.
yarn_berry_options
Optional
- Type: projen.javascript.YarnBerryOptions
- Default: Yarn Berry v4 with all default options
Options for Yarn Berry.
disable_node_warnings
Optional
- Type: bool
- Default: false
Disable node warnings from being emitted during build tasks.
license_options
Optional
- Type: LicenseOptions
- Default: Apache-2.0
Default license to apply to all PDK managed packages.
monorepo_upgrade_deps
Optional
- Type: bool
- Default: true
Whether to include an upgrade-deps task at the root of the monorepo which will upgrade all dependencies.
monorepo_upgrade_deps_options
Optional
- Type: MonorepoUpgradeDepsOptions
- Default: undefined
Monorepo Upgrade Deps options.
This is only used if monorepoUpgradeDeps is true.
workspace_config
Optional
- Type: WorkspaceConfig
Configuration for workspace.
Methods
Name | Description |
---|---|
to_string |
Returns a string representation of this construct. |
add_exclude_from_cleanup |
Exclude the matching files from pre-synth cleanup. |
add_git_ignore |
Adds a .gitignore pattern. |
add_package_ignore |
Adds patterns to be ignored by npm. |
add_task |
Adds a new task to this project. |
add_tip |
Prints a "tip" message during synthesis. |
annotate_generated |
Marks the provided file(s) as being generated. |
post_synthesize |
Called after all components are synthesized. |
pre_synthesize |
Called before all components are synthesized. |
remove_task |
Removes a task from a project. |
run_task_command |
Returns the shell command to execute in order to run a task. |
synth |
Synthesize all project files into outdir . |
try_find_file |
Finds a file at the specified relative path within this project and all its subprojects. |
try_find_json_file |
Finds a json file by name. |
try_find_object_file |
Finds an object file (like JsonFile, YamlFile, etc.) by name. |
try_remove_file |
Finds a file at the specified relative path within this project and removes it. |
add_bins |
No description. |
add_bundled_deps |
Defines bundled dependencies. |
add_compile_command |
DEPRECATED. |
add_deps |
Defines normal dependencies. |
add_dev_deps |
Defines development/test dependencies. |
add_fields |
Directly set fields in package.json . |
add_keywords |
Adds keywords to package.json (deduplicated). |
add_peer_deps |
Defines peer dependencies. |
add_scripts |
Replaces the contents of multiple npm package.json scripts. |
add_test_command |
DEPRECATED. |
has_script |
Indicates if a script by the name name is defined. |
remove_script |
Removes the npm script (always successful). |
render_workflow_setup |
Returns the set of workflow steps which should be executed to bootstrap a workflow. |
set_script |
Replaces the contents of an npm package.json script. |
add_implicit_dependency |
Create an implicit dependency between two Projects. |
add_java_dependency |
Adds a dependency between two Java Projects in the monorepo. |
add_nx_run_many_task |
Add project task that executes npx nx run-many ... style command. |
add_python_poetry_dependency |
Adds a dependency between two Python Projects in the monorepo. |
add_workspace_packages |
Add one or more additional package globs to the workspace. |
compose_nx_run_many_command |
Helper to format npx nx run-many ... style command. |
exec_nx_run_many_command |
Helper to format npx nx run-many ... style command execution in package manager. |
to_string
def to_string() -> str
Returns a string representation of this construct.
add_exclude_from_cleanup
def add_exclude_from_cleanup(
globs: str
) -> None
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: str
The glob patterns to match.
add_git_ignore
def add_git_ignore(
pattern: str
) -> None
Adds a .gitignore pattern.
pattern
Required
- Type: str
The glob pattern to ignore.
add_package_ignore
def add_package_ignore(
pattern: str
) -> None
Adds patterns to be ignored by npm.
pattern
Required
- Type: str
The pattern to ignore.
add_task
def add_task(
name: str,
condition: str = None,
cwd: str = None,
description: str = None,
env: typing.Mapping[str] = None,
required_env: typing.List[str] = None,
args: typing.List[str] = None,
exec: str = None,
receive_args: bool = None,
steps: typing.List[TaskStep] = None
) -> Task
Adds a new task to this project.
This will fail if the project already has a task with this name.
name
Required
- Type: str
The task name to add.
condition
Optional
- Type: str
A shell command which determines if the this task should be executed.
If the program exits with a zero exit code, steps will be executed. A non-zero code means that task will be skipped.
cwd
Optional
- Type: str
- Default: process.cwd()
The working directory for all steps in this task (unless overridden by the step).
description
Optional
- Type: str
- Default: the task name
The description of this build command.
env
Optional
- Type: typing.Mapping[str]
- Default: {}
Defines environment variables for the execution of this task.
Values in this map will be evaluated in a shell, so you can do stuff like $(echo "foo")
.
required_env
Optional
- Type: typing.List[str]
A set of environment variables that must be defined in order to execute this task.
Task execution will fail if one of these is not defined.
args
Optional
- Type: typing.List[str]
- Default: no arguments are passed to the step
Should the provided exec
shell command receive fixed args.
exec
Optional
- Type: str
- Default: add steps using
task.exec(command)
ortask.spawn(subtask)
Shell command to execute as the first command of the task.
receive_args
Optional
- Type: bool
- Default: false
Should the provided exec
shell command receive args passed to the task.
steps
Optional
- Type: typing.List[projen.TaskStep]
List of task steps to run.
~~add_tip
~~
def add_tip(
message: str
) -> None
Prints a "tip" message during synthesis.
message
Required
- Type: str
The message.
annotate_generated
def annotate_generated(
glob: str
) -> None
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
glob
Required
- Type: str
the glob pattern to match (could be a file path).
post_synthesize
def post_synthesize() -> None
Called after all components are synthesized.
Order is not guaranteed.
pre_synthesize
def pre_synthesize() -> None
Called before all components are synthesized.
remove_task
def remove_task(
name: str
) -> Task
Removes a task from a project.
name
Required
- Type: str
The name of the task to remove.
run_task_command
def run_task_command(
task: Task
) -> str
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
def synth() -> None
Synthesize all project files into outdir
.
- Call "this.preSynthesize()"
- Delete all generated files
- Synthesize all subprojects
- Synthesize all components of this project
- Call "postSynthesize()" for all components of this project
- Call "this.postSynthesize()"
try_find_file
def try_find_file(
file_path: str
) -> FileBase
Finds a file at the specified relative path within this project and all its subprojects.
file_path
Required
- Type: str
The file path.
If this path is relative, it will be resolved from the root of this project.
~~try_find_json_file
~~
def try_find_json_file(
file_path: str
) -> JsonFile
Finds a json file by name.
file_path
Required
- Type: str
The file path.
try_find_object_file
def try_find_object_file(
file_path: str
) -> ObjectFile
Finds an object file (like JsonFile, YamlFile, etc.) by name.
file_path
Required
- Type: str
The file path.
try_remove_file
def try_remove_file(
file_path: str
) -> FileBase
Finds a file at the specified relative path within this project and removes it.
file_path
Required
- Type: str
The file path.
If this path is relative, it will be resolved from the root of this project.
add_bins
def add_bins(
bins: typing.Mapping[str]
) -> None
bins
Required
- Type: typing.Mapping[str]
add_bundled_deps
def add_bundled_deps(
deps: str
) -> None
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: str
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
.
~~add_compile_command
~~
def add_compile_command(
commands: str
) -> None
DEPRECATED.
commands
Required
- Type: str
add_deps
def add_deps(
deps: str
) -> None
Defines normal dependencies.
deps
Required
- Type: str
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
.
add_dev_deps
def add_dev_deps(
deps: str
) -> None
Defines development/test dependencies.
deps
Required
- Type: str
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
.
add_fields
def add_fields(
fields: typing.Mapping[typing.Any]
) -> None
Directly set fields in package.json
.
fields
Required
- Type: typing.Mapping[typing.Any]
The fields to set.
add_keywords
def add_keywords(
keywords: str
) -> None
Adds keywords to package.json (deduplicated).
keywords
Required
- Type: str
The keywords to add.
add_peer_deps
def add_peer_deps(
deps: str
) -> None
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: str
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
.
add_scripts
def add_scripts(
scripts: typing.Mapping[str]
) -> None
Replaces the contents of multiple npm package.json scripts.
scripts
Required
- Type: typing.Mapping[str]
The scripts to set.
~~add_test_command
~~
def add_test_command(
commands: str
) -> None
DEPRECATED.
commands
Required
- Type: str
~~has_script
~~
def has_script(
name: str
) -> bool
Indicates if a script by the name name is defined.
name
Required
- Type: str
The name of the script.
remove_script
def remove_script(
name: str
) -> None
Removes the npm script (always successful).
name
Required
- Type: str
The name of the script.
render_workflow_setup
def render_workflow_setup(
install_step_configuration: JobStepConfiguration = None,
mutable: bool = None
) -> typing.List[JobStep]
Returns the set of workflow steps which should be executed to bootstrap a workflow.
install_step_configuration
Optional
- Type: projen.github.workflows.JobStepConfiguration
- Default:
{ name: "Install dependencies" }
Configure the install step in the workflow setup.
Example
- { env: { NPM_TOKEN: "token" }} for installing from private npm registry.
mutable
Optional
- Type: bool
- Default: false
Should the package lockfile be updated?
set_script
def set_script(
name: str,
command: str
) -> None
Replaces the contents of an npm package.json script.
name
Required
- Type: str
The script name.
command
Required
- Type: str
The command to execute.
add_implicit_dependency
def add_implicit_dependency(
dependent: Project,
dependee: typing.Union[str, Project]
) -> None
Create an implicit dependency between two Projects.
This is typically used in polygot repos where a Typescript project wants a build dependency on a Python project as an example.
dependent
Required
- Type: projen.Project
dependee
Required
- Type: typing.Union[str, projen.Project]
add_java_dependency
def add_java_dependency(
dependent: JavaProject,
dependee: JavaProject
) -> None
Adds a dependency between two Java Projects in the monorepo.
dependent
Required
- Type: projen.java.JavaProject
dependee
Required
- Type: projen.java.JavaProject
add_nx_run_many_task
def add_nx_run_many_task(
name: str,
target: str,
configuration: str = None,
exclude: str = None,
ignore_cycles: bool = None,
no_bail: bool = None,
output_style: str = None,
parallel: typing.Union[int, float] = None,
projects: typing.List[str] = None,
runner: str = None,
skip_cache: bool = None,
verbose: bool = None
) -> Task
Add project task that executes npx nx run-many ...
style command.
name
Required
- Type: str
target
Required
- Type: str
Task to run for affected projects.
configuration
Optional
- Type: str
This is the configuration to use when performing tasks on projects.
exclude
Optional
- Type: str
Exclude certain projects from being processed.
ignore_cycles
Optional
- Type: bool
Ignore cycles in the task graph.
no_bail
Optional
- Type: bool
Do not stop command execution after the first failed task.
output_style
Optional
- Type: str
- Default: "stream"
Defines how Nx emits outputs tasks logs.
parallel
Optional
- Type: typing.Union[int, float]
- Default: 3
Max number of parallel processes.
projects
Optional
- Type: typing.List[str]
Project to run as list project names and/or patterns.
runner
Optional
- Type: str
This is the name of the tasks runner configuration in nx.json.
skip_cache
Optional
- Type: bool
Rerun the tasks even when the results are available in the cache.
verbose
Optional
- Type: bool
Prints additional information about the commands (e.g. stack traces).
add_python_poetry_dependency
def add_python_poetry_dependency(
dependent: PythonProject,
dependee: PythonProject
) -> None
Adds a dependency between two Python Projects in the monorepo.
The dependent must have Poetry enabled.
dependent
Required
- Type: projen.python.PythonProject
dependee
Required
- Type: projen.python.PythonProject
add_workspace_packages
def add_workspace_packages(
package_globs: str
) -> None
Add one or more additional package globs to the workspace.
package_globs
Required
- Type: str
paths to the package to include in the workspace (for example packages/my-package).
compose_nx_run_many_command
def compose_nx_run_many_command(
target: str,
configuration: str = None,
exclude: str = None,
ignore_cycles: bool = None,
no_bail: bool = None,
output_style: str = None,
parallel: typing.Union[int, float] = None,
projects: typing.List[str] = None,
runner: str = None,
skip_cache: bool = None,
verbose: bool = None
) -> typing.List[str]
Helper to format npx nx run-many ...
style command.
target
Required
- Type: str
Task to run for affected projects.
configuration
Optional
- Type: str
This is the configuration to use when performing tasks on projects.
exclude
Optional
- Type: str
Exclude certain projects from being processed.
ignore_cycles
Optional
- Type: bool
Ignore cycles in the task graph.
no_bail
Optional
- Type: bool
Do not stop command execution after the first failed task.
output_style
Optional
- Type: str
- Default: "stream"
Defines how Nx emits outputs tasks logs.
parallel
Optional
- Type: typing.Union[int, float]
- Default: 3
Max number of parallel processes.
projects
Optional
- Type: typing.List[str]
Project to run as list project names and/or patterns.
runner
Optional
- Type: str
This is the name of the tasks runner configuration in nx.json.
skip_cache
Optional
- Type: bool
Rerun the tasks even when the results are available in the cache.
verbose
Optional
- Type: bool
Prints additional information about the commands (e.g. stack traces).
exec_nx_run_many_command
def exec_nx_run_many_command(
target: str,
configuration: str = None,
exclude: str = None,
ignore_cycles: bool = None,
no_bail: bool = None,
output_style: str = None,
parallel: typing.Union[int, float] = None,
projects: typing.List[str] = None,
runner: str = None,
skip_cache: bool = None,
verbose: bool = None
) -> str
Helper to format npx nx run-many ...
style command execution in package manager.
target
Required
- Type: str
Task to run for affected projects.
configuration
Optional
- Type: str
This is the configuration to use when performing tasks on projects.
exclude
Optional
- Type: str
Exclude certain projects from being processed.
ignore_cycles
Optional
- Type: bool
Ignore cycles in the task graph.
no_bail
Optional
- Type: bool
Do not stop command execution after the first failed task.
output_style
Optional
- Type: str
- Default: "stream"
Defines how Nx emits outputs tasks logs.
parallel
Optional
- Type: typing.Union[int, float]
- Default: 3
Max number of parallel processes.
projects
Optional
- Type: typing.List[str]
Project to run as list project names and/or patterns.
runner
Optional
- Type: str
This is the name of the tasks runner configuration in nx.json.
skip_cache
Optional
- Type: bool
Rerun the tasks even when the results are available in the cache.
verbose
Optional
- Type: bool
Prints additional information about the commands (e.g. stack traces).
Static Functions
Name | Description |
---|---|
is_construct |
Checks if x is a construct. |
is_project |
Test whether the given construct is a project. |
of |
Find the closest ancestor project for given construct. |
is_construct
import aws.pdk.monorepo
aws.pdk.monorepo.MonorepoTsProject.is_construct(
x: typing.Any
)
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
x
Required
- Type: typing.Any
Any object.
is_project
import aws.pdk.monorepo
aws.pdk.monorepo.MonorepoTsProject.is_project(
x: typing.Any
)
Test whether the given construct is a project.
x
Required
- Type: typing.Any
of
import aws.pdk.monorepo
aws.pdk.monorepo.MonorepoTsProject.of(
construct: IConstruct
)
Find the closest ancestor project for given construct.
When given a project, this it the project itself.
construct
Required
- Type: constructs.IConstruct
Properties
Name | Type | Description |
---|---|---|
node |
constructs.Node |
The tree node. |
build_task |
projen.Task |
No description. |
commit_generated |
bool |
Whether to commit the managed files by default. |
compile_task |
projen.Task |
No description. |
components |
typing.List[projen.Component] |
Returns all the components within this project. |
deps |
projen.Dependencies |
Project dependencies. |
ejected |
bool |
Whether or not the project is being ejected. |
files |
typing.List[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 |
str |
Project name. |
outdir |
str |
Absolute output directory of this project. |
package_task |
projen.Task |
No description. |
post_compile_task |
projen.Task |
No description. |
pre_compile_task |
projen.Task |
No description. |
project_build |
projen.ProjectBuild |
Manages the build process of the project. |
projen_command |
str |
The command to use in order to run the projen CLI. |
root |
projen.Project |
The root project. |
subprojects |
typing.List[projen.Project] |
Returns all the subprojects within this project. |
tasks |
projen.Tasks |
Project tasks. |
test_task |
projen.Task |
No description. |
default_task |
projen.Task |
This is the "default" task, the one that executes "projen". |
init_project |
projen.InitProject |
The options used when this project is bootstrapped via projen new . |
parent |
projen.Project |
A parent project. |
project_type |
projen.ProjectType |
No description. |
auto_approve |
projen.github.AutoApprove |
Auto approve set up for this project. |
dev_container |
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. |
allow_library_dependencies |
bool |
No description. |
artifacts_directory |
str |
The build output directory. |
artifacts_javascript_directory |
str |
The location of the npm tarball after build (${artifactsDirectory}/js ). |
bundler |
projen.javascript.Bundler |
No description. |
entrypoint |
str |
No description. |
manifest |
typing.Any |
No description. |
npmrc |
projen.javascript.NpmConfig |
The .npmrc file. |
package |
projen.javascript.NodePackage |
API for managing the node package. |
package_manager |
projen.javascript.NodePackageManager |
The package manager to use. |
run_script_command |
str |
The command to use to run scripts (e.g. yarn run or npm run depends on the package manager). |
auto_merge |
projen.github.AutoMerge |
Component that sets up mergify for merging approved pull requests. |
build_workflow |
projen.build.BuildWorkflow |
The PR build GitHub workflow. |
build_workflow_job_id |
str |
The job ID of the build workflow. |
jest |
projen.javascript.Jest |
The Jest configuration (if enabled). |
max_node_version |
str |
Maximum node version required by this package. |
min_node_version |
str |
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. |
upgrade_workflow |
projen.javascript.UpgradeDependencies |
The upgrade workflow. |
docs_directory |
str |
No description. |
libdir |
str |
The directory in which compiled .js files reside. |
srcdir |
str |
The directory in which the .ts sources reside. |
testdir |
str |
The directory in which tests reside. |
tsconfig_dev |
projen.javascript.TypescriptConfig |
A typescript configuration file which covers all files (sources, tests, projen). |
watch_task |
projen.Task |
The "watch" task. |
docgen |
bool |
No description. |
eslint |
projen.javascript.Eslint |
No description. |
tsconfig |
projen.javascript.TypescriptConfig |
No description. |
tsconfig_eslint |
projen.javascript.TypescriptConfig |
No description. |
nx |
NxWorkspace |
Return the NxWorkspace instance. |
nx_configurator |
NxConfigurator |
No description. |
sorted_sub_projects |
typing.List[projen.Project] |
Get consistently sorted list of subprojects. |
node
Required
node: Node
- Type: constructs.Node
The tree node.
build_task
Required
build_task: Task
- Type: projen.Task
commit_generated
Required
commit_generated: bool
- Type: bool
Whether to commit the managed files by default.
compile_task
Required
compile_task: Task
- Type: projen.Task
components
Required
components: typing.List[Component]
- Type: typing.List[projen.Component]
Returns all the components within this project.
deps
Required
deps: Dependencies
- Type: projen.Dependencies
Project dependencies.
ejected
Required
ejected: bool
- Type: bool
Whether or not the project is being ejected.
files
Required
files: typing.List[FileBase]
- Type: typing.List[projen.FileBase]
All files in this project.
gitattributes
Required
gitattributes: GitAttributesFile
- Type: projen.GitAttributesFile
The .gitattributes file for this repository.
gitignore
Required
gitignore: IgnoreFile
- Type: projen.IgnoreFile
.gitignore.
logger
Required
logger: Logger
- Type: projen.Logger
Logging utilities.
name
Required
name: str
- Type: str
Project name.
outdir
Required
outdir: str
- Type: str
Absolute output directory of this project.
package_task
Required
package_task: Task
- Type: projen.Task
post_compile_task
Required
post_compile_task: Task
- Type: projen.Task
pre_compile_task
Required
pre_compile_task: Task
- Type: projen.Task
project_build
Required
project_build: ProjectBuild
- Type: projen.ProjectBuild
Manages the build process of the project.
projen_command
Required
projen_command: str
- Type: str
The command to use in order to run the projen CLI.
root
Required
root: Project
- Type: projen.Project
The root project.
subprojects
Required
subprojects: typing.List[Project]
- Type: typing.List[projen.Project]
Returns all the subprojects within this project.
tasks
Required
tasks: Tasks
- Type: projen.Tasks
Project tasks.
test_task
Required
test_task: Task
- Type: projen.Task
default_task
Optional
default_task: Task
- Type: projen.Task
This is the "default" task, the one that executes "projen".
Undefined if the project is being ejected.
init_project
Optional
init_project: 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
parent: Project
- Type: projen.Project
A parent project.
If undefined, this is the root project.
project_type
Required
project_type: ProjectType
- Type: projen.ProjectType
auto_approve
Optional
auto_approve: AutoApprove
- Type: projen.github.AutoApprove
Auto approve set up for this project.
dev_container
Optional
dev_container: DevContainer
- Type: projen.vscode.DevContainer
Access for .devcontainer.json (used for GitHub Codespaces).
This will be undefined
if devContainer boolean is false
github
Optional
github: GitHub
- Type: projen.github.GitHub
Access all github components.
This will be undefined
for subprojects.
gitpod
Optional
gitpod: Gitpod
- Type: projen.Gitpod
Access for Gitpod.
This will be undefined
if gitpod boolean is false
vscode
Optional
vscode: VsCode
- Type: projen.vscode.VsCode
Access all VSCode components.
This will be undefined
for subprojects.
~~allow_library_dependencies
~~Required
- Deprecated: use
package.allowLibraryDependencies
allow_library_dependencies: bool
- Type: bool
artifacts_directory
Required
artifacts_directory: str
- Type: str
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
.
artifacts_javascript_directory
Required
artifacts_javascript_directory: str
- Type: str
The location of the npm tarball after build (${artifactsDirectory}/js
).
bundler
Required
bundler: Bundler
- Type: projen.javascript.Bundler
~~entrypoint
~~Required
- Deprecated: use
package.entrypoint
entrypoint: str
- Type: str
~~manifest
~~Required
- Deprecated: use
package.addField(x, y)
manifest: typing.Any
- Type: typing.Any
npmrc
Required
npmrc: NpmConfig
- Type: projen.javascript.NpmConfig
The .npmrc file.
package
Required
package: NodePackage
- Type: projen.javascript.NodePackage
API for managing the node package.
~~package_manager
~~Required
- Deprecated: use
package.packageManager
package_manager: NodePackageManager
- Type: projen.javascript.NodePackageManager
The package manager to use.
run_script_command
Required
run_script_command: str
- Type: str
The command to use to run scripts (e.g. yarn run
or npm run
depends on the package manager).
auto_merge
Optional
auto_merge: AutoMerge
- Type: projen.github.AutoMerge
Component that sets up mergify for merging approved pull requests.
build_workflow
Optional
build_workflow: BuildWorkflow
- Type: projen.build.BuildWorkflow
The PR build GitHub workflow.
undefined
if buildWorkflow
is disabled.
build_workflow_job_id
Optional
build_workflow_job_id: str
- Type: str
The job ID of the build workflow.
jest
Optional
jest: Jest
- Type: projen.javascript.Jest
The Jest configuration (if enabled).
max_node_version
Optional
max_node_version: str
- Type: str
Maximum node version required by this package.
min_node_version
Optional
min_node_version: str
- Type: str
Minimum node.js version required by this package.
npmignore
Optional
npmignore: IgnoreFile
- Type: projen.IgnoreFile
The .npmignore file.
prettier
Optional
prettier: Prettier
- Type: projen.javascript.Prettier
~~publisher
~~Optional
- Deprecated: use
release.publisher
.
publisher: Publisher
- Type: projen.release.Publisher
Package publisher.
This will be undefined
if the project does not have a
release workflow.
release
Optional
release: Release
- Type: projen.release.Release
Release management.
upgrade_workflow
Optional
upgrade_workflow: UpgradeDependencies
- Type: projen.javascript.UpgradeDependencies
The upgrade workflow.
docs_directory
Required
docs_directory: str
- Type: str
libdir
Required
libdir: str
- Type: str
The directory in which compiled .js files reside.
srcdir
Required
srcdir: str
- Type: str
The directory in which the .ts sources reside.
testdir
Required
testdir: str
- Type: str
The directory in which tests reside.
tsconfig_dev
Required
tsconfig_dev: TypescriptConfig
- Type: projen.javascript.TypescriptConfig
A typescript configuration file which covers all files (sources, tests, projen).
watch_task
Required
watch_task: Task
- Type: projen.Task
The "watch" task.
docgen
Optional
docgen: bool
- Type: bool
eslint
Optional
eslint: Eslint
- Type: projen.javascript.Eslint
tsconfig
Optional
tsconfig: TypescriptConfig
- Type: projen.javascript.TypescriptConfig
tsconfig_eslint
Optional
tsconfig_eslint: TypescriptConfig
- Type: projen.javascript.TypescriptConfig
nx
Required
nx: NxWorkspace
- Type: NxWorkspace
Return the NxWorkspace instance.
This should be implemented using a getter.
nx_configurator
Required
nx_configurator: NxConfigurator
- Type: NxConfigurator
sorted_sub_projects
Required
sorted_sub_projects: typing.List[Project]
- Type: typing.List[projen.Project]
Get consistently sorted list of subprojects.
Constants
Name | Type | Description |
---|---|---|
DEFAULT_TASK |
str |
The name of the default task (the task executed when projen is run without arguments). |
DEFAULT_TS_JEST_TRANFORM_PATTERN |
str |
No description. |
DEFAULT_TASK
Required
DEFAULT_TASK: str
- Type: str
The name of the default task (the task executed when projen
is run without arguments).
Normally this task should synthesize the project files.
DEFAULT_TS_JEST_TRANFORM_PATTERN
Required
DEFAULT_TS_JEST_TRANFORM_PATTERN: str
- Type: str
NxConfigurator
- Implements: INxProjectCore
Configues common NX related tasks and methods.
Initializers
import aws.pdk.monorepo
aws.pdk.monorepo.NxConfigurator(
project: Project,
default_release_branch: str = None,
license_options: LicenseOptions = None
)
Name | Type | Description |
---|---|---|
project |
projen.Project |
No description. |
default_release_branch |
str |
Branch that NX affected should run against. |
license_options |
LicenseOptions |
Default package license config. |
project
Required
- Type: projen.Project
default_release_branch
Optional
- Type: str
Branch that NX affected should run against.
license_options
Optional
- Type: LicenseOptions
Default package license config.
If nothing is specified, all packages will default to Apache-2.0 (unless they have their own License component).
Methods
Name | Description |
---|---|
to_string |
Returns a string representation of this construct. |
post_synthesize |
Called after synthesis. |
pre_synthesize |
Called before synthesis. |
synthesize |
Synthesizes files to the project output directory. |
add_implicit_dependency |
Create an implicit dependency between two Projects. |
add_java_dependency |
Adds a dependency between two Java Projects in the monorepo. |
add_nx_run_many_task |
Add project task that executes npx nx run-many ... style command. |
add_python_poetry_dependency |
Adds a dependency between two Python Projects in the monorepo. |
compose_nx_run_many_command |
Helper to format npx nx run-many ... style command. |
ensure_nx_install_task |
Returns the install task or creates one with nx installation command added. |
exec_nx_run_many_command |
Helper to format npx nx run-many ... style command execution in package manager. |
patch_poetry_env |
No description. |
patch_python_projects |
No description. |
synth |
No description. |
to_string
def to_string() -> str
Returns a string representation of this construct.
post_synthesize
def post_synthesize() -> None
Called after synthesis.
Order is not guaranteed.
pre_synthesize
def pre_synthesize() -> None
Called before synthesis.
synthesize
def synthesize() -> None
Synthesizes files to the project output directory.
add_implicit_dependency
def add_implicit_dependency(
dependent: Project,
dependee: typing.Union[str, Project]
) -> None
Create an implicit dependency between two Projects.
This is typically used in polygot repos where a Typescript project wants a build dependency on a Python project as an example.
dependent
Required
- Type: projen.Project
project you want to have the dependency.
dependee
Required
- Type: typing.Union[str, projen.Project]
project you wish to depend on.
add_java_dependency
def add_java_dependency(
dependent: JavaProject,
dependee: JavaProject
) -> None
Adds a dependency between two Java Projects in the monorepo.
dependent
Required
- Type: projen.java.JavaProject
project you want to have the dependency.
dependee
Required
- Type: projen.java.JavaProject
project you wish to depend on.
add_nx_run_many_task
def add_nx_run_many_task(
name: str,
target: str,
configuration: str = None,
exclude: str = None,
ignore_cycles: bool = None,
no_bail: bool = None,
output_style: str = None,
parallel: typing.Union[int, float] = None,
projects: typing.List[str] = None,
runner: str = None,
skip_cache: bool = None,
verbose: bool = None
) -> Task
Add project task that executes npx nx run-many ...
style command.
name
Required
- Type: str
target
Required
- Type: str
Task to run for affected projects.
configuration
Optional
- Type: str
This is the configuration to use when performing tasks on projects.
exclude
Optional
- Type: str
Exclude certain projects from being processed.
ignore_cycles
Optional
- Type: bool
Ignore cycles in the task graph.
no_bail
Optional
- Type: bool
Do not stop command execution after the first failed task.
output_style
Optional
- Type: str
- Default: "stream"
Defines how Nx emits outputs tasks logs.
parallel
Optional
- Type: typing.Union[int, float]
- Default: 3
Max number of parallel processes.
projects
Optional
- Type: typing.List[str]
Project to run as list project names and/or patterns.
runner
Optional
- Type: str
This is the name of the tasks runner configuration in nx.json.
skip_cache
Optional
- Type: bool
Rerun the tasks even when the results are available in the cache.
verbose
Optional
- Type: bool
Prints additional information about the commands (e.g. stack traces).
add_python_poetry_dependency
def add_python_poetry_dependency(
dependent: PythonProject,
dependee: PythonProject
) -> None
Adds a dependency between two Python Projects in the monorepo.
The dependent must have Poetry enabled.
dependent
Required
- Type: projen.python.PythonProject
project you want to have the dependency (must be a Poetry Python Project).
dependee
Required
- Type: projen.python.PythonProject
project you wish to depend on.
compose_nx_run_many_command
def compose_nx_run_many_command(
target: str,
configuration: str = None,
exclude: str = None,
ignore_cycles: bool = None,
no_bail: bool = None,
output_style: str = None,
parallel: typing.Union[int, float] = None,
projects: typing.List[str] = None,
runner: str = None,
skip_cache: bool = None,
verbose: bool = None
) -> typing.List[str]
Helper to format npx nx run-many ...
style command.
target
Required
- Type: str
Task to run for affected projects.
configuration
Optional
- Type: str
This is the configuration to use when performing tasks on projects.
exclude
Optional
- Type: str
Exclude certain projects from being processed.
ignore_cycles
Optional
- Type: bool
Ignore cycles in the task graph.
no_bail
Optional
- Type: bool
Do not stop command execution after the first failed task.
output_style
Optional
- Type: str
- Default: "stream"
Defines how Nx emits outputs tasks logs.
parallel
Optional
- Type: typing.Union[int, float]
- Default: 3
Max number of parallel processes.
projects
Optional
- Type: typing.List[str]
Project to run as list project names and/or patterns.
runner
Optional
- Type: str
This is the name of the tasks runner configuration in nx.json.
skip_cache
Optional
- Type: bool
Rerun the tasks even when the results are available in the cache.
verbose
Optional
- Type: bool
Prints additional information about the commands (e.g. stack traces).
ensure_nx_install_task
def ensure_nx_install_task(
nx_plugins: typing.Mapping[str]
) -> Task
Returns the install task or creates one with nx installation command added.
Note: this should only be called from non-node projects
nx_plugins
Required
- Type: typing.Mapping[str]
additional plugins to install.
exec_nx_run_many_command
def exec_nx_run_many_command(
target: str,
configuration: str = None,
exclude: str = None,
ignore_cycles: bool = None,
no_bail: bool = None,
output_style: str = None,
parallel: typing.Union[int, float] = None,
projects: typing.List[str] = None,
runner: str = None,
skip_cache: bool = None,
verbose: bool = None
) -> str
Helper to format npx nx run-many ...
style command execution in package manager.
target
Required
- Type: str
Task to run for affected projects.
configuration
Optional
- Type: str
This is the configuration to use when performing tasks on projects.
exclude
Optional
- Type: str
Exclude certain projects from being processed.
ignore_cycles
Optional
- Type: bool
Ignore cycles in the task graph.
no_bail
Optional
- Type: bool
Do not stop command execution after the first failed task.
output_style
Optional
- Type: str
- Default: "stream"
Defines how Nx emits outputs tasks logs.
parallel
Optional
- Type: typing.Union[int, float]
- Default: 3
Max number of parallel processes.
projects
Optional
- Type: typing.List[str]
Project to run as list project names and/or patterns.
runner
Optional
- Type: str
This is the name of the tasks runner configuration in nx.json.
skip_cache
Optional
- Type: bool
Rerun the tasks even when the results are available in the cache.
verbose
Optional
- Type: bool
Prints additional information about the commands (e.g. stack traces).
patch_poetry_env
def patch_poetry_env(
project: PythonProject
) -> None
project
Required
- Type: projen.python.PythonProject
patch_python_projects
def patch_python_projects(
projects: typing.List[Project]
) -> None
projects
Required
- Type: typing.List[projen.Project]
synth
def synth() -> None
Static Functions
Name | Description |
---|---|
is_construct |
Checks if x is a construct. |
is_component |
Test whether the given construct is a component. |
is_construct
import aws.pdk.monorepo
aws.pdk.monorepo.NxConfigurator.is_construct(
x: typing.Any
)
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
x
Required
- Type: typing.Any
Any object.
is_component
import aws.pdk.monorepo
aws.pdk.monorepo.NxConfigurator.is_component(
x: typing.Any
)
Test whether the given construct is a component.
x
Required
- Type: typing.Any
Properties
Name | Type | Description |
---|---|---|
node |
constructs.Node |
The tree node. |
project |
projen.Project |
No description. |
nx |
NxWorkspace |
Return the NxWorkspace instance. |
node
Required
node: Node
- Type: constructs.Node
The tree node.
project
Required
project: Project
- Type: projen.Project
nx
Required
nx: NxWorkspace
- Type: NxWorkspace
Return the NxWorkspace instance.
This should be implemented using a getter.
NxProject
Component which manages the project specific NX Config and is added to all NXMonorepo subprojects.
Initializers
import aws.pdk.monorepo
aws.pdk.monorepo.NxProject(
project: Project
)
Name | Type | Description |
---|---|---|
project |
projen.Project |
No description. |
project
Required
- Type: projen.Project
Methods
Name | Description |
---|---|
to_string |
Returns a string representation of this construct. |
post_synthesize |
Called after synthesis. |
pre_synthesize |
Called before synthesis. |
synthesize |
Synthesizes files to the project output directory. |
add_build_target_files |
Add input and output files to build target. |
add_implicit_dependency |
Adds an implicit dependency between the dependant (this project) and dependee. |
add_java_dependency |
Adds a dependency between two Java Projects in the monorepo. |
add_python_poetry_dependency |
Adds a dependency between two Python Projects in the monorepo. |
add_tag |
Add tag. |
infer_targets |
Automatically infer targets based on project type. |
merge |
Merge configuration into existing config. |
set_named_input |
Set namedInputs helper. |
set_target |
Set targets helper. |
to_string
def to_string() -> str
Returns a string representation of this construct.
post_synthesize
def post_synthesize() -> None
Called after synthesis.
Order is not guaranteed.
pre_synthesize
def pre_synthesize() -> None
Called before synthesis.
synthesize
def synthesize() -> None
Synthesizes files to the project output directory.
add_build_target_files
def add_build_target_files(
inputs: typing.List[typing.Union[str, IInput]] = None,
outputs: typing.List[str] = None
) -> None
Add input and output files to build target.
inputs
Optional
- Type: typing.List[typing.Union[str, aws.pdk.monorepo.Nx.IInput]]
Input files.
outputs
Optional
- Type: typing.List[str]
Output files.
add_implicit_dependency
def add_implicit_dependency(
dependee: typing.Union[str, Project]
) -> None
Adds an implicit dependency between the dependant (this project) and dependee.
dependee
Required
- Type: typing.Union[str, projen.Project]
project to add the implicit dependency on.
add_java_dependency
def add_java_dependency(
dependee: JavaProject
) -> None
Adds a dependency between two Java Projects in the monorepo.
dependee
Required
- Type: projen.java.JavaProject
project you wish to depend on.
add_python_poetry_dependency
def add_python_poetry_dependency(
dependee: PythonProject
) -> None
Adds a dependency between two Python Projects in the monorepo.
The dependent must have Poetry enabled.
dependee
Required
- Type: projen.python.PythonProject
project you wish to depend on.
add_tag
def add_tag(
tags: str
) -> None
Add tag.
tags
Required
- Type: str
infer_targets
def infer_targets() -> None
Automatically infer targets based on project type.
merge
def merge(
implicit_dependencies: typing.List[str] = None,
included_scripts: typing.List[str] = None,
name: str = None,
named_inputs: typing.Mapping[typing.List[str]] = None,
root: str = None,
tags: typing.List[str] = None,
targets: typing.Mapping[IProjectTarget] = None
) -> None
Merge configuration into existing config.
implicit_dependencies
Optional
- Type: typing.List[str]
Implicit dependencies.
https://nx.dev/reference/project-configuration#implicitdependencies
included_scripts
Optional
- Type: typing.List[str]
Explicit list of scripts for Nx to include.
https://nx.dev/reference/project-configuration#ignoring-package.json-scripts
name
Optional
- Type: str
Name of project.
named_inputs
Optional
- Type: typing.Mapping[typing.List[str]]
Named inputs.
root
Optional
- Type: str
Project root dir path relative to workspace.
tags
Optional
- Type: typing.List[str]
Project tag annotations.
targets
Optional
- Type: typing.Mapping[aws.pdk.monorepo.Nx.IProjectTarget]
Targets configuration.
set_named_input
def set_named_input(
name: str,
inputs: typing.List[str]
) -> None
Set namedInputs
helper.
name
Required
- Type: str
inputs
Required
- Type: typing.List[str]
set_target
def set_target(
name: str,
target: IProjectTarget,
include_defaults: typing.Union[str, bool] = None
) -> None
Set targets
helper.
name
Required
- Type: str
target
Required
- Type: aws.pdk.monorepo.Nx.IProjectTarget
include_defaults
Optional
- Type: typing.Union[str, bool]
Static Functions
Name | Description |
---|---|
is_construct |
Checks if x is a construct. |
is_component |
Test whether the given construct is a component. |
ensure |
Retrieves an instance of NXProject if one is associated to the given project, otherwise created a NXProject instance for the project. |
of |
Retrieves an instance of NXProject if one is associated to the given project. |
is_construct
import aws.pdk.monorepo
aws.pdk.monorepo.NxProject.is_construct(
x: typing.Any
)
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
x
Required
- Type: typing.Any
Any object.
is_component
import aws.pdk.monorepo
aws.pdk.monorepo.NxProject.is_component(
x: typing.Any
)
Test whether the given construct is a component.
x
Required
- Type: typing.Any
ensure
import aws.pdk.monorepo
aws.pdk.monorepo.NxProject.ensure(
project: Project
)
Retrieves an instance of NXProject if one is associated to the given project, otherwise created a NXProject instance for the project.
project
Required
- Type: projen.Project
project instance.
of
import aws.pdk.monorepo
aws.pdk.monorepo.NxProject.of(
project: Project
)
Retrieves an instance of NXProject if one is associated to the given project.
project
Required
- Type: projen.Project
project instance.
Properties
Name | Type | Description |
---|---|---|
node |
constructs.Node |
The tree node. |
project |
projen.Project |
No description. |
file |
projen.JsonFile |
Raw json file. |
implicit_dependencies |
typing.List[str] |
Implicit dependencies. |
included_scripts |
typing.List[str] |
Explicit list of scripts for Nx to include. |
named_inputs |
typing.Mapping[typing.Any] |
Named inputs. |
tags |
typing.List[str] |
Project tag annotations. |
targets |
typing.Mapping[typing.Any] |
Targets configuration. |
node
Required
node: Node
- Type: constructs.Node
The tree node.
project
Required
project: Project
- Type: projen.Project
file
Required
file: JsonFile
- Type: projen.JsonFile
Raw json file.
Attention: any overrides applied here will not be visible in the properties and only included in final synthesized output, and likely to override native handling.
implicit_dependencies
Required
implicit_dependencies: typing.List[str]
- Type: typing.List[str]
Implicit dependencies.
https://nx.dev/reference/project-configuration#implicitdependencies
included_scripts
Required
included_scripts: typing.List[str]
- Type: typing.List[str]
Explicit list of scripts for Nx to include.
https://nx.dev/reference/project-configuration#ignoring-package.json-scripts
named_inputs
Required
named_inputs: typing.Mapping[typing.Any]
- Type: typing.Mapping[typing.Any]
Named inputs.
tags
Required
tags: typing.List[str]
- Type: typing.List[str]
Project tag annotations.
targets
Required
targets: typing.Mapping[typing.Any]
- Type: typing.Mapping[typing.Any]
Targets configuration.
NxWorkspace
Component which manages the workspace specific NX Config for the root monorepo.
Initializers
import aws.pdk.monorepo
aws.pdk.monorepo.NxWorkspace(
project: Project
)
Name | Type | Description |
---|---|---|
project |
projen.Project |
No description. |
project
Required
- Type: projen.Project
Methods
Name | Description |
---|---|
to_string |
Returns a string representation of this construct. |
post_synthesize |
Called after synthesis. |
pre_synthesize |
Called before synthesis. |
synthesize |
Synthesizes files to the project output directory. |
set_named_input |
Set namedInput value helper. |
set_target_default |
Set targetDefaults helper. |
use_nx_cloud |
Setup workspace to use nx-cloud. |
to_string
def to_string() -> str
Returns a string representation of this construct.
post_synthesize
def post_synthesize() -> None
Called after synthesis.
Order is not guaranteed.
pre_synthesize
def pre_synthesize() -> None
Called before synthesis.
synthesize
def synthesize() -> None
Synthesizes files to the project output directory.
set_named_input
def set_named_input(
name: str,
inputs: typing.List[str]
) -> None
Set namedInput
value helper.
name
Required
- Type: str
inputs
Required
- Type: typing.List[str]
set_target_default
def set_target_default(
name: str,
target: IProjectTarget,
merge: bool = None
) -> None
Set targetDefaults
helper.
name
Required
- Type: str
target
Required
- Type: aws.pdk.monorepo.Nx.IProjectTarget
merge
Optional
- Type: bool
use_nx_cloud
def use_nx_cloud(
read_only_access_token: str
) -> None
Setup workspace to use nx-cloud.
read_only_access_token
Required
- Type: str
Static Functions
Name | Description |
---|---|
is_construct |
Checks if x is a construct. |
is_component |
Test whether the given construct is a component. |
of |
Retrieves the singleton instance associated with project root. |
is_construct
import aws.pdk.monorepo
aws.pdk.monorepo.NxWorkspace.is_construct(
x: typing.Any
)
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
x
Required
- Type: typing.Any
Any object.
is_component
import aws.pdk.monorepo
aws.pdk.monorepo.NxWorkspace.is_component(
x: typing.Any
)
Test whether the given construct is a component.
x
Required
- Type: typing.Any
of
import aws.pdk.monorepo
aws.pdk.monorepo.NxWorkspace.of(
scope: Project
)
Retrieves the singleton instance associated with project root.
scope
Required
- Type: projen.Project
project instance.
Properties
Name | Type | Description |
---|---|---|
node |
constructs.Node |
The tree node. |
project |
projen.Project |
No description. |
nx_ignore |
projen.IgnoreFile |
.nxignore file. |
nx_json |
projen.JsonFile |
Raw nx.json file to support overrides that aren't handled directly. |
affected |
aws.pdk.monorepo.Nx.INxAffectedConfig |
Default options for nx affected . |
auto_infer_project_targets |
bool |
Automatically infer NxProject targets based on project type. |
cacheable_operations |
typing.List[str] |
List of cacheable operations. |
default_task_runner |
str |
Default task runner. |
default_task_runner_options |
typing.Mapping[typing.Any] |
Default task runner options. |
extends |
str |
Some presets use the extends property to hide some default options in a separate json file. |
named_inputs |
typing.Mapping[typing.List[str]] |
Named inputs. |
non_native_hasher |
bool |
Indicates if non-native nx hasher will be used. |
npm_scope |
str |
Tells Nx what prefix to use when generating library imports. |
plugins |
typing.List[str] |
Plugins for extending the project graph. |
plugins_config |
typing.Mapping[typing.Any] |
Configuration for Nx Plugins. |
target_defaults |
typing.Mapping[aws.pdk.monorepo.Nx.IProjectTarget] |
Dependencies between different target names across all projects. |
tasks_runner_options |
typing.Mapping[typing.Any] |
Task runner options. |
cache_directory |
str |
Override the default nx cacheDirectory. |
workspace_layout |
aws.pdk.monorepo.Nx.IWorkspaceLayout |
Where new apps + libs should be placed. |
node
Required
node: Node
- Type: constructs.Node
The tree node.
project
Required
project: Project
- Type: projen.Project
nx_ignore
Required
nx_ignore: IgnoreFile
- Type: projen.IgnoreFile
.nxignore file.
nx_json
Required
nx_json: JsonFile
- Type: projen.JsonFile
Raw nx.json file to support overrides that aren't handled directly.
Attention: any overrides applied here will not be visible in the properties and only included in final synthesized output, and likely to override native handling.
affected
Required
affected: INxAffectedConfig
- Type: aws.pdk.monorepo.Nx.INxAffectedConfig
Default options for nx affected
.
auto_infer_project_targets
Required
auto_infer_project_targets: bool
- Type: bool
Automatically infer NxProject targets based on project type.
cacheable_operations
Required
cacheable_operations: typing.List[str]
- Type: typing.List[str]
List of cacheable operations.
default_task_runner
Required
default_task_runner: str
- Type: str
Default task runner.
default_task_runner_options
Required
default_task_runner_options: typing.Mapping[typing.Any]
- Type: typing.Mapping[typing.Any]
Default task runner options.
extends
Required
extends: str
- Type: str
- Default: "nx/presets/npm.json"
Some presets use the extends property to hide some default options in a separate json file.
The json file specified in the extends property is located in your node_modules folder. The Nx preset files are specified in the nx package.
named_inputs
Required
named_inputs: typing.Mapping[typing.List[str]]
- Type: typing.Mapping[typing.List[str]]
Named inputs.
non_native_hasher
Required
non_native_hasher: bool
- Type: bool
Indicates if non-native nx hasher will be used.
If true, the NX_NON_NATIVE_HASHER env var will be set to true for all project tasks.
npm_scope
Required
npm_scope: str
- Type: str
Tells Nx what prefix to use when generating library imports.
plugins
Required
plugins: typing.List[str]
- Type: typing.List[str]
Plugins for extending the project graph.
plugins_config
Required
plugins_config: typing.Mapping[typing.Any]
- Type: typing.Mapping[typing.Any]
Configuration for Nx Plugins.
target_defaults
Required
target_defaults: typing.Mapping[IProjectTarget]
- Type: typing.Mapping[aws.pdk.monorepo.Nx.IProjectTarget]
Dependencies between different target names across all projects.
tasks_runner_options
Required
tasks_runner_options: typing.Mapping[typing.Any]
- Type: typing.Mapping[typing.Any]
Task runner options.
cache_directory
Optional
cache_directory: str
- Type: str
Override the default nx cacheDirectory.
workspace_layout
Optional
workspace_layout: IWorkspaceLayout
- Type: aws.pdk.monorepo.Nx.IWorkspaceLayout
Where new apps + libs should be placed.
Structs
CliConfig
Initializer
from aws.pdk.monorepo import syncpack
Syncpack.CliConfig(
filter: str,
indent: str,
source: typing.List[str],
specs: str,
types: str,
config_path: str = None
)
Properties
Name | Type | Description |
---|---|---|
filter |
str |
No description. |
indent |
str |
No description. |
source |
typing.List[str] |
No description. |
specs |
str |
No description. |
types |
str |
No description. |
config_path |
str |
No description. |
filter
Required
filter: str
- Type: str
indent
Required
indent: str
- Type: str
source
Required
source: typing.List[str]
- Type: typing.List[str]
specs
Required
specs: str
- Type: str
types
Required
types: str
- Type: str
config_path
Optional
config_path: str
- Type: str
JavaProjectOptions
JavaProjectOptions.
Initializer
import aws.pdk.monorepo
aws.pdk.monorepo.JavaProjectOptions(
name: str,
artifact_id: str = None,
auto_approve_options: AutoApproveOptions = None,
auto_merge: bool = None,
auto_merge_options: AutoMergeOptions = None,
clobber: bool = None,
commit_generated: bool = None,
compile_options: MavenCompileOptions = None,
deps: typing.List[str] = None,
description: str = None,
dev_container: bool = None,
distdir: str = None,
github: bool = None,
github_options: GitHubOptions = None,
git_ignore_options: IgnoreFileOptions = None,
git_options: GitOptions = None,
gitpod: bool = None,
group_id: str = None,
junit: bool = None,
junit_options: JunitOptions = None,
logging: LoggerOptions = None,
mergify: bool = None,
mergify_options: MergifyOptions = None,
outdir: str = None,
packaging: str = None,
packaging_options: MavenPackagingOptions = None,
parent: Project = None,
parent_pom: ParentPom = None,
project_type: ProjectType = None,
projen_command: str = None,
projen_credentials: GithubCredentials = None,
projenrc_java: bool = None,
projenrc_java_options: ProjenrcOptions = None,
projenrc_json: bool = None,
projenrc_json_options: ProjenrcJsonOptions = None,
projen_token_secret: str = None,
readme: SampleReadmeProps = None,
renovatebot: bool = None,
renovatebot_options: RenovatebotOptions = None,
sample: bool = None,
sample_java_package: str = None,
stale: bool = None,
stale_options: StaleOptions = None,
test_deps: typing.List[str] = None,
url: str = None,
version: str = None,
vscode: bool = None
)
Properties
Name | Type | Description |
---|---|---|
name |
str |
No description. |
artifact_id |
str |
The artifactId is generally the name that the project is known by. |
auto_approve_options |
projen.github.AutoApproveOptions |
Enable and configure the 'auto approve' workflow. |
auto_merge |
bool |
Enable automatic merging on GitHub. |
auto_merge_options |
projen.github.AutoMergeOptions |
Configure options for automatic merging on GitHub. |
clobber |
bool |
Add a clobber task which resets the repo to origin. |
commit_generated |
bool |
Whether to commit the managed files by default. |
compile_options |
projen.java.MavenCompileOptions |
Compile options. |
deps |
typing.List[str] |
List of runtime dependencies for this project. Dependencies use the format: <groupId>/<artifactId>@<semver> . |
description |
str |
Description of a project is always good. |
dev_container |
bool |
Add a VSCode development environment (used for GitHub Codespaces). |
distdir |
str |
Final artifact output directory. |
github |
bool |
Enable GitHub integration. |
github_options |
projen.github.GitHubOptions |
Options for GitHub integration. |
git_ignore_options |
projen.IgnoreFileOptions |
Configuration options for .gitignore file. |
git_options |
projen.GitOptions |
Configuration options for git. |
gitpod |
bool |
Add a Gitpod development environment. |
group_id |
str |
This is generally unique amongst an organization or a project. |
junit |
bool |
Include junit tests. |
junit_options |
projen.java.JunitOptions |
junit options. |
logging |
projen.LoggerOptions |
Configure logging options such as verbosity. |
mergify |
bool |
Whether mergify should be enabled on this repository or not. |
mergify_options |
projen.github.MergifyOptions |
Options for mergify. |
outdir |
str |
The root directory of the project. Relative to this directory, all files are synthesized. |
packaging |
str |
Project packaging format. |
packaging_options |
projen.java.MavenPackagingOptions |
Packaging options. |
parent |
projen.Project |
The parent project, if this project is part of a bigger project. |
parent_pom |
projen.java.ParentPom |
A Parent Pom can be used to have a child project inherit properties/plugins/ect in order to reduce duplication and keep standards across a large amount of repos. |
project_type |
projen.ProjectType |
Which type of project this is (library/app). |
projen_command |
str |
The shell command to use in order to run the projen CLI. |
projen_credentials |
projen.github.GithubCredentials |
Choose a method of providing GitHub API access for projen workflows. |
projenrc_java |
bool |
Use projenrc in java. |
projenrc_java_options |
projen.java.ProjenrcOptions |
Options related to projenrc in java. |
projenrc_json |
bool |
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation. |
projenrc_json_options |
projen.ProjenrcJsonOptions |
Options for .projenrc.json. |
projen_token_secret |
str |
The name of a secret which includes a GitHub Personal Access Token to be used by projen workflows. |
readme |
projen.SampleReadmeProps |
The README setup. |
renovatebot |
bool |
Use renovatebot to handle dependency upgrades. |
renovatebot_options |
projen.RenovatebotOptions |
Options for renovatebot. |
sample |
bool |
Include sample code and test if the relevant directories don't exist. |
sample_java_package |
str |
The java package to use for the code sample. |
stale |
bool |
Auto-close of stale issues and pull request. |
stale_options |
projen.github.StaleOptions |
Auto-close stale issues and pull requests. |
test_deps |
typing.List[str] |
List of test dependencies for this project. Dependencies use the format: <groupId>/<artifactId>@<semver> . |
url |
str |
The URL, like the name, is not required. |
version |
str |
This is the last piece of the naming puzzle. |
vscode |
bool |
Enable VSCode integration. |
name
Required
name: str
- Type: str
- Default: $BASEDIR
artifact_id
Optional
artifact_id: str
- Type: str
- Default: "my-app"
The artifactId is generally the name that the project is known by.
Although the groupId is important, people within the group will rarely mention the groupId in discussion (they are often all be the same ID, such as the MojoHaus project groupId: org.codehaus.mojo). It, along with the groupId, creates a key that separates this project from every other project in the world (at least, it should :) ). Along with the groupId, the artifactId fully defines the artifact's living quarters within the repository. In the case of the above project, my-project lives in $M2_REPO/org/codehaus/mojo/my-project.
auto_approve_options
Optional
auto_approve_options: AutoApproveOptions
- Type: projen.github.AutoApproveOptions
- Default: auto approve is disabled
Enable and configure the 'auto approve' workflow.
auto_merge
Optional
auto_merge: bool
- Type: bool
- Default: true
Enable automatic merging on GitHub.
Has no effect if github.mergify
is set to false.
auto_merge_options
Optional
auto_merge_options: 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
clobber: bool
- Type: bool
- Default: true, but false for subprojects
Add a clobber
task which resets the repo to origin.
commit_generated
Optional
commit_generated: bool
- Type: bool
- Default: true
Whether to commit the managed files by default.
compile_options
Optional
compile_options: MavenCompileOptions
- Type: projen.java.MavenCompileOptions
- Default: defaults
Compile options.
deps
Optional
deps: typing.List[str]
- Type: typing.List[str]
- Default: []
List of runtime dependencies for this project. Dependencies use the format: <groupId>/<artifactId>@<semver>
.
Additional dependencies can be added via project.addDependency()
.
description
Optional
description: str
- Type: str
- Default: undefined
Description of a project is always good.
Although this should not replace formal documentation, a quick comment to any readers of the POM is always helpful.
dev_container
Optional
dev_container: bool
- Type: bool
- Default: false
Add a VSCode development environment (used for GitHub Codespaces).
distdir
Optional
distdir: str
- Type: str
- Default: "dist/java"
Final artifact output directory.
github
Optional
github: bool
- Type: bool
- Default: true
Enable GitHub integration.
Enabled by default for root projects. Disabled for non-root projects.
github_options
Optional
github_options: GitHubOptions
- Type: projen.github.GitHubOptions
- Default: see GitHubOptions
Options for GitHub integration.
git_ignore_options
Optional
git_ignore_options: IgnoreFileOptions
- Type: projen.IgnoreFileOptions
Configuration options for .gitignore file.
git_options
Optional
git_options: GitOptions
- Type: projen.GitOptions
Configuration options for git.
gitpod
Optional
gitpod: bool
- Type: bool
- Default: false
Add a Gitpod development environment.
group_id
Optional
group_id: str
- Type: str
- Default: "org.acme"
This is generally unique amongst an organization or a project.
For example, all core Maven artifacts do (well, should) live under the groupId org.apache.maven. Group ID's do not necessarily use the dot notation, for example, the junit project. Note that the dot-notated groupId does not have to correspond to the package structure that the project contains. It is, however, a good practice to follow. When stored within a repository, the group acts much like the Java packaging structure does in an operating system. The dots are replaced by OS specific directory separators (such as '/' in Unix) which becomes a relative directory structure from the base repository. In the example given, the org.codehaus.mojo group lives within the directory $M2_REPO/org/codehaus/mojo.
junit
Optional
junit: bool
- Type: bool
- Default: true
Include junit tests.
junit_options
Optional
junit_options: JunitOptions
- Type: projen.java.JunitOptions
- Default: defaults
junit options.
logging
Optional
logging: LoggerOptions
- Type: projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
~~mergify
~~Optional
- Deprecated: use
githubOptions.mergify
instead
mergify: bool
- Type: bool
- Default: true
Whether mergify should be enabled on this repository or not.
~~mergify_options
~~Optional
- Deprecated: use
githubOptions.mergifyOptions
instead
mergify_options: MergifyOptions
- Type: projen.github.MergifyOptions
- Default: default options
Options for mergify.
outdir
Optional
outdir: str
- Type: str
- 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 subprojects.
packaging
Optional
packaging: str
- Type: str
- Default: "jar"
Project packaging format.
packaging_options
Optional
packaging_options: MavenPackagingOptions
- Type: projen.java.MavenPackagingOptions
- Default: defaults
Packaging options.
parent
Optional
parent: Project
- Type: projen.Project
The parent project, if this project is part of a bigger project.
parent_pom
Optional
parent_pom: ParentPom
- Type: projen.java.ParentPom
- Default: undefined
A Parent Pom can be used to have a child project inherit properties/plugins/ect in order to reduce duplication and keep standards across a large amount of repos.
~~project_type
~~Optional
- Deprecated: no longer supported at the base project level
project_type: ProjectType
- Type: projen.ProjectType
- Default: ProjectType.UNKNOWN
Which type of project this is (library/app).
projen_command
Optional
projen_command: str
- Type: str
- Default: "npx projen"
The shell command to use in order to run the projen CLI.
Can be used to customize in special environments.
projen_credentials
Optional
projen_credentials: 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.
projenrc_java
Optional
projenrc_java: bool
- Type: bool
- Default: true
Use projenrc in java.
This will install projen
as a java dependency and will add a synth
task which
will compile & execute main()
from src/main/java/projenrc.java
.
projenrc_java_options
Optional
projenrc_java_options: ProjenrcOptions
- Type: projen.java.ProjenrcOptions
- Default: default options
Options related to projenrc in java.
projenrc_json
Optional
projenrc_json: bool
- Type: bool
- Default: false
Generate (once) .projenrc.json (in JSON). Set to false
in order to disable .projenrc.json generation.
projenrc_json_options
Optional
projenrc_json_options: ProjenrcJsonOptions
- Type: projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
~~projen_token_secret
~~Optional
- Deprecated: use
projenCredentials
projen_token_secret: str
- Type: str
- 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
readme: SampleReadmeProps
- Type: projen.SampleReadmeProps
- Default: { filename: 'README.md', contents: '# replace this' }
The README setup.
renovatebot
Optional
renovatebot: bool
- Type: bool
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebot_options
Optional
renovatebot_options: RenovatebotOptions
- Type: projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
sample
Optional
sample: bool
- Type: bool
- Default: true
Include sample code and test if the relevant directories don't exist.
sample_java_package
Optional
sample_java_package: str
- Type: str
- Default: "org.acme"
The java package to use for the code sample.
stale
Optional
stale: bool
- Type: bool
- Default: false
Auto-close of stale issues and pull request.
See staleOptions
for options.
stale_options
Optional
stale_options: StaleOptions
- Type: projen.github.StaleOptions
- Default: see defaults in
StaleOptions
Auto-close stale issues and pull requests.
To disable set stale
to false
.
test_deps
Optional
test_deps: typing.List[str]
- Type: typing.List[str]
- Default: []
List of test dependencies for this project. Dependencies use the format: <groupId>/<artifactId>@<semver>
.
Additional dependencies can be added via project.addTestDependency()
.
url
Optional
url: str
- Type: str
- Default: undefined
The URL, like the name, is not required.
This is a nice gesture for projects users, however, so that they know where the project lives.
version
Optional
version: str
- Type: str
- Default: "0.1.0"
This is the last piece of the naming puzzle.
groupId:artifactId denotes a single project but they cannot delineate which incarnation of that project we are talking about. Do we want the junit:junit of 2018 (version 4.12), or of 2007 (version 3.8.2)? In short: code changes, those changes should be versioned, and this element keeps those versions in line. It is also used within an artifact's repository to separate versions from each other. my-project version 1.0 files live in the directory structure $M2_REPO/org/codehaus/mojo/my-project/1.0.
vscode
Optional
vscode: bool
- Type: bool
- Default: true
Enable VSCode integration.
Enabled by default for root projects. Disabled for non-root projects.
LicenseOptions
License options.
Initializer
import aws.pdk.monorepo
aws.pdk.monorepo.LicenseOptions(
copyright_owner: str = None,
disable_default_licenses: bool = None,
license_text: str = None,
spdx: str = None
)
Properties
Name | Type | Description |
---|---|---|
copyright_owner |
str |
Copyright owner. |
disable_default_licenses |
bool |
Whether to disable the generation of default licenses. |
license_text |
str |
Arbitrary license text. |
spdx |
str |
License type (SPDX). |
copyright_owner
Optional
copyright_owner: str
- Type: str
Copyright owner.
If the license text for the given spdx has $copyright_owner, this option must be specified.
disable_default_licenses
Optional
disable_default_licenses: bool
- Type: bool
- Default: false
Whether to disable the generation of default licenses.
license_text
Optional
license_text: str
- Type: str
Arbitrary license text.
spdx
Optional
spdx: str
- Type: str
License type (SPDX).
https://github.com/projen/projen/tree/main/license-text for list of supported licenses
MonorepoJavaOptions
Configuration options for the NxMonorepoJavaProject.
Initializer
import aws.pdk.monorepo
aws.pdk.monorepo.MonorepoJavaOptions(
name: str,
artifact_id: str = None,
auto_approve_options: AutoApproveOptions = None,
auto_merge: bool = None,
auto_merge_options: AutoMergeOptions = None,
clobber: bool = None,
commit_generated: bool = None,
compile_options: MavenCompileOptions = None,
deps: typing.List[str] = None,
description: str = None,
dev_container: bool = None,
distdir: str = None,
github: bool = None,
github_options: GitHubOptions = None,
git_ignore_options: IgnoreFileOptions = None,
git_options: GitOptions = None,
gitpod: bool = None,
group_id: str = None,
junit: bool = None,
junit_options: JunitOptions = None,
logging: LoggerOptions = None,
mergify: bool = None,
mergify_options: MergifyOptions = None,
outdir: str = None,
packaging: str = None,
packaging_options: MavenPackagingOptions = None,
parent: Project = None,
parent_pom: ParentPom = None,
project_type: ProjectType = None,
projen_command: str = None,
projen_credentials: GithubCredentials = None,
projenrc_java: bool = None,
projenrc_java_options: ProjenrcOptions = None,
projenrc_json: bool = None,
projenrc_json_options: ProjenrcJsonOptions = None,
projen_token_secret: str = None,
readme: SampleReadmeProps = None,
renovatebot: bool = None,
renovatebot_options: RenovatebotOptions = None,
sample: bool = None,
sample_java_package: str = None,
stale: bool = None,
stale_options: StaleOptions = None,
test_deps: typing.List[str] = None,
url: str = None,
version: str = None,
vscode: bool = None,
default_release_branch: str = None,
disable_default_licenses: bool = None
)
Properties
Name | Type | Description |
---|---|---|
name |
str |
No description. |
artifact_id |
str |
The artifactId is generally the name that the project is known by. |
auto_approve_options |
projen.github.AutoApproveOptions |
Enable and configure the 'auto approve' workflow. |
auto_merge |
bool |
Enable automatic merging on GitHub. |
auto_merge_options |
projen.github.AutoMergeOptions |
Configure options for automatic merging on GitHub. |
clobber |
bool |
Add a clobber task which resets the repo to origin. |
commit_generated |
bool |
Whether to commit the managed files by default. |
compile_options |
projen.java.MavenCompileOptions |
Compile options. |
deps |
typing.List[str] |
List of runtime dependencies for this project. Dependencies use the format: <groupId>/<artifactId>@<semver> . |
description |
str |
Description of a project is always good. |
dev_container |
bool |
Add a VSCode development environment (used for GitHub Codespaces). |
distdir |
str |
Final artifact output directory. |
github |
bool |
Enable GitHub integration. |
github_options |
projen.github.GitHubOptions |
Options for GitHub integration. |
git_ignore_options |
projen.IgnoreFileOptions |
Configuration options for .gitignore file. |
git_options |
projen.GitOptions |
Configuration options for git. |
gitpod |
bool |
Add a Gitpod development environment. |
group_id |
str |
This is generally unique amongst an organization or a project. |
junit |
bool |
Include junit tests. |
junit_options |
projen.java.JunitOptions |
junit options. |
logging |
projen.LoggerOptions |
Configure logging options such as verbosity. |
mergify |
bool |
Whether mergify should be enabled on this repository or not. |
mergify_options |
projen.github.MergifyOptions |
Options for mergify. |
outdir |
str |
The root directory of the project. Relative to this directory, all files are synthesized. |
packaging |
str |
Project packaging format. |
packaging_options |
projen.java.MavenPackagingOptions |
Packaging options. |
parent |
projen.Project |
The parent project, if this project is part of a bigger project. |
parent_pom |
projen.java.ParentPom |
A Parent Pom can be used to have a child project inherit properties/plugins/ect in order to reduce duplication and keep standards across a large amount of repos. |
project_type |
projen.ProjectType |
Which type of project this is (library/app). |
projen_command |
str |
The shell command to use in order to run the projen CLI. |
projen_credentials |
projen.github.GithubCredentials |
Choose a method of providing GitHub API access for projen workflows. |
projenrc_java |
bool |
Use projenrc in java. |
projenrc_java_options |
projen.java.ProjenrcOptions |
Options related to projenrc in java. |
projenrc_json |
bool |
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation. |
projenrc_json_options |
projen.ProjenrcJsonOptions |
Options for .projenrc.json. |
projen_token_secret |
str |
The name of a secret which includes a GitHub Personal Access Token to be used by projen workflows. |
readme |
projen.SampleReadmeProps |
The README setup. |
renovatebot |
bool |
Use renovatebot to handle dependency upgrades. |
renovatebot_options |
projen.RenovatebotOptions |
Options for renovatebot. |
sample |
bool |
Include sample code and test if the relevant directories don't exist. |
sample_java_package |
str |
The java package to use for the code sample. |
stale |
bool |
Auto-close of stale issues and pull request. |
stale_options |
projen.github.StaleOptions |
Auto-close stale issues and pull requests. |
test_deps |
typing.List[str] |
List of test dependencies for this project. Dependencies use the format: <groupId>/<artifactId>@<semver> . |
url |
str |
The URL, like the name, is not required. |
version |
str |
This is the last piece of the naming puzzle. |
vscode |
bool |
Enable VSCode integration. |
default_release_branch |
str |
No description. |
disable_default_licenses |
bool |
Whether to disable the generation of default licenses. |
name
Required
name: str
- Type: str
- Default: $BASEDIR
artifact_id
Optional
artifact_id: str
- Type: str
- Default: "my-app"
The artifactId is generally the name that the project is known by.
Although the groupId is important, people within the group will rarely mention the groupId in discussion (they are often all be the same ID, such as the MojoHaus project groupId: org.codehaus.mojo). It, along with the groupId, creates a key that separates this project from every other project in the world (at least, it should :) ). Along with the groupId, the artifactId fully defines the artifact's living quarters within the repository. In the case of the above project, my-project lives in $M2_REPO/org/codehaus/mojo/my-project.
auto_approve_options
Optional
auto_approve_options: AutoApproveOptions
- Type: projen.github.AutoApproveOptions
- Default: auto approve is disabled
Enable and configure the 'auto approve' workflow.
auto_merge
Optional
auto_merge: bool
- Type: bool
- Default: true
Enable automatic merging on GitHub.
Has no effect if github.mergify
is set to false.
auto_merge_options
Optional
auto_merge_options: 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
clobber: bool
- Type: bool
- Default: true, but false for subprojects
Add a clobber
task which resets the repo to origin.
commit_generated
Optional
commit_generated: bool
- Type: bool
- Default: true
Whether to commit the managed files by default.
compile_options
Optional
compile_options: MavenCompileOptions
- Type: projen.java.MavenCompileOptions
- Default: defaults
Compile options.
deps
Optional
deps: typing.List[str]
- Type: typing.List[str]
- Default: []
List of runtime dependencies for this project. Dependencies use the format: <groupId>/<artifactId>@<semver>
.
Additional dependencies can be added via project.addDependency()
.
description
Optional
description: str
- Type: str
- Default: undefined
Description of a project is always good.
Although this should not replace formal documentation, a quick comment to any readers of the POM is always helpful.
dev_container
Optional
dev_container: bool
- Type: bool
- Default: false
Add a VSCode development environment (used for GitHub Codespaces).
distdir
Optional
distdir: str
- Type: str
- Default: "dist/java"
Final artifact output directory.
github
Optional
github: bool
- Type: bool
- Default: true
Enable GitHub integration.
Enabled by default for root projects. Disabled for non-root projects.
github_options
Optional
github_options: GitHubOptions
- Type: projen.github.GitHubOptions
- Default: see GitHubOptions
Options for GitHub integration.
git_ignore_options
Optional
git_ignore_options: IgnoreFileOptions
- Type: projen.IgnoreFileOptions
Configuration options for .gitignore file.
git_options
Optional
git_options: GitOptions
- Type: projen.GitOptions
Configuration options for git.
gitpod
Optional
gitpod: bool
- Type: bool
- Default: false
Add a Gitpod development environment.
group_id
Optional
group_id: str
- Type: str
- Default: "org.acme"
This is generally unique amongst an organization or a project.
For example, all core Maven artifacts do (well, should) live under the groupId org.apache.maven. Group ID's do not necessarily use the dot notation, for example, the junit project. Note that the dot-notated groupId does not have to correspond to the package structure that the project contains. It is, however, a good practice to follow. When stored within a repository, the group acts much like the Java packaging structure does in an operating system. The dots are replaced by OS specific directory separators (such as '/' in Unix) which becomes a relative directory structure from the base repository. In the example given, the org.codehaus.mojo group lives within the directory $M2_REPO/org/codehaus/mojo.
junit
Optional
junit: bool
- Type: bool
- Default: true
Include junit tests.
junit_options
Optional
junit_options: JunitOptions
- Type: projen.java.JunitOptions
- Default: defaults
junit options.
logging
Optional
logging: LoggerOptions
- Type: projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
~~mergify
~~Optional
- Deprecated: use
githubOptions.mergify
instead
mergify: bool
- Type: bool
- Default: true
Whether mergify should be enabled on this repository or not.
~~mergify_options
~~Optional
- Deprecated: use
githubOptions.mergifyOptions
instead
mergify_options: MergifyOptions
- Type: projen.github.MergifyOptions
- Default: default options
Options for mergify.
outdir
Optional
outdir: str
- Type: str
- 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 subprojects.
packaging
Optional
packaging: str
- Type: str
- Default: "jar"
Project packaging format.
packaging_options
Optional
packaging_options: MavenPackagingOptions
- Type: projen.java.MavenPackagingOptions
- Default: defaults
Packaging options.
parent
Optional
parent: Project
- Type: projen.Project
The parent project, if this project is part of a bigger project.
parent_pom
Optional
parent_pom: ParentPom
- Type: projen.java.ParentPom
- Default: undefined
A Parent Pom can be used to have a child project inherit properties/plugins/ect in order to reduce duplication and keep standards across a large amount of repos.
~~project_type
~~Optional
- Deprecated: no longer supported at the base project level
project_type: ProjectType
- Type: projen.ProjectType
- Default: ProjectType.UNKNOWN
Which type of project this is (library/app).
projen_command
Optional
projen_command: str
- Type: str
- Default: "npx projen"
The shell command to use in order to run the projen CLI.
Can be used to customize in special environments.
projen_credentials
Optional
projen_credentials: 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.
projenrc_java
Optional
projenrc_java: bool
- Type: bool
- Default: true
Use projenrc in java.
This will install projen
as a java dependency and will add a synth
task which
will compile & execute main()
from src/main/java/projenrc.java
.
projenrc_java_options
Optional
projenrc_java_options: ProjenrcOptions
- Type: projen.java.ProjenrcOptions
- Default: default options
Options related to projenrc in java.
projenrc_json
Optional
projenrc_json: bool
- Type: bool
- Default: false
Generate (once) .projenrc.json (in JSON). Set to false
in order to disable .projenrc.json generation.
projenrc_json_options
Optional
projenrc_json_options: ProjenrcJsonOptions
- Type: projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
~~projen_token_secret
~~Optional
- Deprecated: use
projenCredentials
projen_token_secret: str
- Type: str
- 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
readme: SampleReadmeProps
- Type: projen.SampleReadmeProps
- Default: { filename: 'README.md', contents: '# replace this' }
The README setup.
renovatebot
Optional
renovatebot: bool
- Type: bool
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebot_options
Optional
renovatebot_options: RenovatebotOptions
- Type: projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
sample
Optional
sample: bool
- Type: bool
- Default: true
Include sample code and test if the relevant directories don't exist.
sample_java_package
Optional
sample_java_package: str
- Type: str
- Default: "org.acme"
The java package to use for the code sample.
stale
Optional
stale: bool
- Type: bool
- Default: false
Auto-close of stale issues and pull request.
See staleOptions
for options.
stale_options
Optional
stale_options: StaleOptions
- Type: projen.github.StaleOptions
- Default: see defaults in
StaleOptions
Auto-close stale issues and pull requests.
To disable set stale
to false
.
test_deps
Optional
test_deps: typing.List[str]
- Type: typing.List[str]
- Default: []
List of test dependencies for this project. Dependencies use the format: <groupId>/<artifactId>@<semver>
.
Additional dependencies can be added via project.addTestDependency()
.
url
Optional
url: str
- Type: str
- Default: undefined
The URL, like the name, is not required.
This is a nice gesture for projects users, however, so that they know where the project lives.
version
Optional
version: str
- Type: str
- Default: "0.1.0"
This is the last piece of the naming puzzle.
groupId:artifactId denotes a single project but they cannot delineate which incarnation of that project we are talking about. Do we want the junit:junit of 2018 (version 4.12), or of 2007 (version 3.8.2)? In short: code changes, those changes should be versioned, and this element keeps those versions in line. It is also used within an artifact's repository to separate versions from each other. my-project version 1.0 files live in the directory structure $M2_REPO/org/codehaus/mojo/my-project/1.0.
vscode
Optional
vscode: bool
- Type: bool
- Default: true
Enable VSCode integration.
Enabled by default for root projects. Disabled for non-root projects.
default_release_branch
Optional
default_release_branch: str
- Type: str
disable_default_licenses
Optional
disable_default_licenses: bool
- Type: bool
- Default: false
Whether to disable the generation of default licenses.
MonorepoPythonProjectOptions
Configuration options for the NxMonorepoPythonProject.
Initializer
import aws.pdk.monorepo
aws.pdk.monorepo.MonorepoPythonProjectOptions(
module_name: str,
name: str,
author_email: str = None,
author_name: str = None,
auto_approve_options: AutoApproveOptions = None,
auto_merge: bool = None,
auto_merge_options: AutoMergeOptions = None,
classifiers: typing.List[str] = None,
clobber: bool = None,
commit_generated: bool = None,
deps: typing.List[str] = None,
description: str = None,
dev_container: bool = None,
dev_deps: typing.List[str] = None,
github: bool = None,
github_options: GitHubOptions = None,
git_ignore_options: IgnoreFileOptions = None,
git_options: GitOptions = None,
gitpod: bool = None,
homepage: str = None,
license: str = None,
logging: LoggerOptions = None,
mergify: bool = None,
mergify_options: MergifyOptions = None,
outdir: str = None,
package_name: str = None,
parent: Project = None,
poetry_options: PoetryPyprojectOptionsWithoutDeps = None,
project_type: ProjectType = None,
projen_command: str = None,
projen_credentials: GithubCredentials = None,
projenrc_json: bool = None,
projenrc_json_options: ProjenrcJsonOptions = None,
projenrc_python_options: ProjenrcOptions = None,
projen_token_secret: str = None,
pytest: bool = None,
pytest_options: PytestOptions = None,
python_exec: str = None,
readme: SampleReadmeProps = None,
renovatebot: bool = None,
renovatebot_options: RenovatebotOptions = None,
sample: bool = None,
setup_config: typing.Mapping[typing.Any] = None,
setuptools: bool = None,
stale: bool = None,
stale_options: StaleOptions = None,
version: str = None,
vscode: bool = None,
default_release_branch: str = None,
license_options: LicenseOptions = None
)
Properties
Name | Type | Description |
---|---|---|
module_name |
str |
No description. |
name |
str |
No description. |
author_email |
str |
Author's e-mail. |
author_name |
str |
Author's name. |
auto_approve_options |
projen.github.AutoApproveOptions |
Enable and configure the 'auto approve' workflow. |
auto_merge |
bool |
Enable automatic merging on GitHub. |
auto_merge_options |
projen.github.AutoMergeOptions |
Configure options for automatic merging on GitHub. |
classifiers |
typing.List[str] |
A list of PyPI trove classifiers that describe the project. |
clobber |
bool |
Add a clobber task which resets the repo to origin. |
commit_generated |
bool |
Whether to commit the managed files by default. |
deps |
typing.List[str] |
List of runtime dependencies for this project. Dependencies use the format: <module>@<semver> . |
description |
str |
A short description of the package. |
dev_container |
bool |
Add a VSCode development environment (used for GitHub Codespaces). |
dev_deps |
typing.List[str] |
List of dev dependencies for this project. Dependencies use the format: <module>@<semver> . |
github |
bool |
Enable GitHub integration. |
github_options |
projen.github.GitHubOptions |
Options for GitHub integration. |
git_ignore_options |
projen.IgnoreFileOptions |
Configuration options for .gitignore file. |
git_options |
projen.GitOptions |
Configuration options for git. |
gitpod |
bool |
Add a Gitpod development environment. |
homepage |
str |
A URL to the website of the project. |
license |
str |
License of this package as an SPDX identifier. |
logging |
projen.LoggerOptions |
Configure logging options such as verbosity. |
mergify |
bool |
Whether mergify should be enabled on this repository or not. |
mergify_options |
projen.github.MergifyOptions |
Options for mergify. |
outdir |
str |
The root directory of the project. Relative to this directory, all files are synthesized. |
package_name |
str |
Package name. |
parent |
projen.Project |
The parent project, if this project is part of a bigger project. |
poetry_options |
projen.python.PoetryPyprojectOptionsWithoutDeps |
Additional options to set for poetry if using poetry. |
project_type |
projen.ProjectType |
Which type of project this is (library/app). |
projen_command |
str |
The shell command to use in order to run the projen CLI. |
projen_credentials |
projen.github.GithubCredentials |
Choose a method of providing GitHub API access for projen workflows. |
projenrc_json |
bool |
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation. |
projenrc_json_options |
projen.ProjenrcJsonOptions |
Options for .projenrc.json. |
projenrc_python_options |
projen.python.ProjenrcOptions |
Options related to projenrc in python. |
projen_token_secret |
str |
The name of a secret which includes a GitHub Personal Access Token to be used by projen workflows. |
pytest |
bool |
Include pytest tests. |
pytest_options |
projen.python.PytestOptions |
pytest options. |
python_exec |
str |
Path to the python executable to use. |
readme |
projen.SampleReadmeProps |
The README setup. |
renovatebot |
bool |
Use renovatebot to handle dependency upgrades. |
renovatebot_options |
projen.RenovatebotOptions |
Options for renovatebot. |
sample |
bool |
Include sample code and test if the relevant directories don't exist. |
setup_config |
typing.Mapping[typing.Any] |
Additional fields to pass in the setup() function if using setuptools. |
setuptools |
bool |
Use setuptools with a setup.py script for packaging and publishing. |
stale |
bool |
Auto-close of stale issues and pull request. |
stale_options |
projen.github.StaleOptions |
Auto-close stale issues and pull requests. |
version |
str |
Version of the package. |
vscode |
bool |
Enable VSCode integration. |
default_release_branch |
str |
No description. |
license_options |
LicenseOptions |
Default license to apply to all PDK managed packages. |
module_name
Required
module_name: str
- Type: str
- Default: $PYTHON_MODULE_NAME
name
Required
name: str
- Type: str
- Default: $BASEDIR
author_email
Optional
author_email: str
- Type: str
- Default: $GIT_USER_EMAIL
Author's e-mail.
author_name
Optional
author_name: str
- Type: str
- Default: $GIT_USER_NAME
Author's name.
auto_approve_options
Optional
auto_approve_options: AutoApproveOptions
- Type: projen.github.AutoApproveOptions
- Default: auto approve is disabled
Enable and configure the 'auto approve' workflow.
auto_merge
Optional
auto_merge: bool
- Type: bool
- Default: true
Enable automatic merging on GitHub.
Has no effect if github.mergify
is set to false.
auto_merge_options
Optional
auto_merge_options: 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.
classifiers
Optional
classifiers: typing.List[str]
- Type: typing.List[str]
A list of PyPI trove classifiers that describe the project.
clobber
Optional
clobber: bool
- Type: bool
- Default: true, but false for subprojects
Add a clobber
task which resets the repo to origin.
commit_generated
Optional
commit_generated: bool
- Type: bool
- Default: true
Whether to commit the managed files by default.
deps
Optional
deps: typing.List[str]
- Type: typing.List[str]
- Default: []
List of runtime dependencies for this project. Dependencies use the format: <module>@<semver>
.
Additional dependencies can be added via project.addDependency()
.
description
Optional
description: str
- Type: str
A short description of the package.
dev_container
Optional
dev_container: bool
- Type: bool
- Default: false
Add a VSCode development environment (used for GitHub Codespaces).
dev_deps
Optional
dev_deps: typing.List[str]
- Type: typing.List[str]
- Default: []
List of dev dependencies for this project. Dependencies use the format: <module>@<semver>
.
Additional dependencies can be added via project.addDevDependency()
.
github
Optional
github: bool
- Type: bool
- Default: true
Enable GitHub integration.
Enabled by default for root projects. Disabled for non-root projects.
github_options
Optional
github_options: GitHubOptions
- Type: projen.github.GitHubOptions
- Default: see GitHubOptions
Options for GitHub integration.
git_ignore_options
Optional
git_ignore_options: IgnoreFileOptions
- Type: projen.IgnoreFileOptions
Configuration options for .gitignore file.
git_options
Optional
git_options: GitOptions
- Type: projen.GitOptions
Configuration options for git.
gitpod
Optional
gitpod: bool
- Type: bool
- Default: false
Add a Gitpod development environment.
homepage
Optional
homepage: str
- Type: str
A URL to the website of the project.
license
Optional
license: str
- Type: str
License of this package as an SPDX identifier.
logging
Optional
logging: LoggerOptions
- Type: projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
~~mergify
~~Optional
- Deprecated: use
githubOptions.mergify
instead
mergify: bool
- Type: bool
- Default: true
Whether mergify should be enabled on this repository or not.
~~mergify_options
~~Optional
- Deprecated: use
githubOptions.mergifyOptions
instead
mergify_options: MergifyOptions
- Type: projen.github.MergifyOptions
- Default: default options
Options for mergify.
outdir
Optional
outdir: str
- Type: str
- 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 subprojects.
package_name
Optional
package_name: str
- Type: str
Package name.
parent
Optional
parent: Project
- Type: projen.Project
The parent project, if this project is part of a bigger project.
poetry_options
Optional
poetry_options: PoetryPyprojectOptionsWithoutDeps
- Type: projen.python.PoetryPyprojectOptionsWithoutDeps
Additional options to set for poetry if using poetry.
~~project_type
~~Optional
- Deprecated: no longer supported at the base project level
project_type: ProjectType
- Type: projen.ProjectType
- Default: ProjectType.UNKNOWN
Which type of project this is (library/app).
projen_command
Optional
projen_command: str
- Type: str
- Default: "npx projen"
The shell command to use in order to run the projen CLI.
Can be used to customize in special environments.
projen_credentials
Optional
projen_credentials: 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.
projenrc_json
Optional
projenrc_json: bool
- Type: bool
- Default: false
Generate (once) .projenrc.json (in JSON). Set to false
in order to disable .projenrc.json generation.
projenrc_json_options
Optional
projenrc_json_options: ProjenrcJsonOptions
- Type: projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
projenrc_python_options
Optional
projenrc_python_options: ProjenrcOptions
- Type: projen.python.ProjenrcOptions
- Default: default options
Options related to projenrc in python.
~~projen_token_secret
~~Optional
- Deprecated: use
projenCredentials
projen_token_secret: str
- Type: str
- 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.
pytest
Optional
pytest: bool
- Type: bool
- Default: true
Include pytest tests.
pytest_options
Optional
pytest_options: PytestOptions
- Type: projen.python.PytestOptions
- Default: defaults
pytest options.
python_exec
Optional
python_exec: str
- Type: str
- Default: "python"
Path to the python executable to use.
readme
Optional
readme: SampleReadmeProps
- Type: projen.SampleReadmeProps
- Default: { filename: 'README.md', contents: '# replace this' }
The README setup.
renovatebot
Optional
renovatebot: bool
- Type: bool
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebot_options
Optional
renovatebot_options: RenovatebotOptions
- Type: projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
sample
Optional
sample: bool
- Type: bool
- Default: true
Include sample code and test if the relevant directories don't exist.
setup_config
Optional
setup_config: typing.Mapping[typing.Any]
- Type: typing.Mapping[typing.Any]
Additional fields to pass in the setup() function if using setuptools.
setuptools
Optional
setuptools: bool
- Type: bool
- Default: true, unless poetry is true, then false
Use setuptools with a setup.py script for packaging and publishing.
stale
Optional
stale: bool
- Type: bool
- Default: false
Auto-close of stale issues and pull request.
See staleOptions
for options.
stale_options
Optional
stale_options: StaleOptions
- Type: projen.github.StaleOptions
- Default: see defaults in
StaleOptions
Auto-close stale issues and pull requests.
To disable set stale
to false
.
version
Optional
version: str
- Type: str
- Default: "0.1.0"
Version of the package.
vscode
Optional
vscode: bool
- Type: bool
- Default: true
Enable VSCode integration.
Enabled by default for root projects. Disabled for non-root projects.
default_release_branch
Optional
default_release_branch: str
- Type: str
license_options
Optional
license_options: LicenseOptions
- Type: LicenseOptions
- Default: Apache-2.0
Default license to apply to all PDK managed packages.
MonorepoTsProjectOptions
Configuration options for the MonorepoTsProject.
Initializer
import aws.pdk.monorepo
aws.pdk.monorepo.MonorepoTsProjectOptions(
name: str,
allow_library_dependencies: bool = None,
artifacts_directory: str = None,
author_email: str = None,
author_name: str = None,
author_organization: bool = None,
author_url: str = None,
auto_approve_options: AutoApproveOptions = None,
auto_approve_upgrades: bool = None,
auto_detect_bin: bool = None,
auto_merge: bool = None,
auto_merge_options: AutoMergeOptions = None,
bin: typing.Mapping[str] = None,
bugs_email: str = None,
bugs_url: str = None,
build_workflow: bool = None,
build_workflow_options: BuildWorkflowOptions = None,
build_workflow_triggers: Triggers = None,
bundled_deps: typing.List[str] = None,
bundler_options: BundlerOptions = None,
check_licenses: LicenseCheckerOptions = None,
clobber: bool = None,
code_artifact_options: CodeArtifactOptions = None,
code_cov: bool = None,
code_cov_token_secret: str = None,
commit_generated: bool = None,
copyright_owner: str = None,
copyright_period: str = None,
default_release_branch: str = None,
dependabot: bool = None,
dependabot_options: DependabotOptions = None,
deps: typing.List[str] = None,
deps_upgrade: bool = None,
deps_upgrade_options: UpgradeDependenciesOptions = None,
description: str = None,
dev_container: bool = None,
dev_deps: typing.List[str] = None,
disable_tsconfig: bool = None,
disable_tsconfig_dev: bool = None,
docgen: bool = None,
docs_directory: str = None,
entrypoint: str = None,
entrypoint_types: str = None,
eslint: bool = None,
eslint_options: EslintOptions = None,
github: bool = None,
github_options: GitHubOptions = None,
gitignore: typing.List[str] = None,
git_ignore_options: IgnoreFileOptions = None,
git_options: GitOptions = None,
gitpod: bool = None,
homepage: str = None,
jest: bool = None,
jest_options: JestOptions = None,
jsii_release_version: str = None,
keywords: typing.List[str] = None,
libdir: str = None,
license: str = None,
licensed: bool = None,
logging: LoggerOptions = None,
major_version: typing.Union[int, float] = None,
max_node_version: str = None,
mergify: bool = None,
mergify_options: MergifyOptions = None,
min_major_version: typing.Union[int, float] = None,
min_node_version: str = None,
mutable_build: bool = None,
npm_access: NpmAccess = None,
npm_dist_tag: str = None,
npmignore: typing.List[str] = None,
npmignore_enabled: bool = None,
npm_ignore_options: IgnoreFileOptions = None,
npm_provenance: bool = None,
npm_registry: str = None,
npm_registry_url: str = None,
npm_token_secret: str = None,
outdir: str = None,
package: bool = None,
package_manager: NodePackageManager = None,
package_name: str = None,
parent: Project = None,
peer_dependency_options: PeerDependencyOptions = None,
peer_deps: typing.List[str] = None,
pnpm_version: str = None,
post_build_steps: typing.List[JobStep] = None,
prerelease: str = None,
prettier: bool = None,
prettier_options: PrettierOptions = None,
project_type: ProjectType = None,
projen_command: str = None,
projen_credentials: GithubCredentials = None,
projen_dev_dependency: bool = None,
projenrc_js: bool = None,
projenrc_json: bool = None,
projenrc_json_options: ProjenrcJsonOptions = None,
projenrc_js_options: ProjenrcOptions = None,
projenrc_ts: bool = None,
projenrc_ts_options: ProjenrcOptions = None,
projen_token_secret: str = None,
projen_version: str = None,
publish_dry_run: bool = None,
publish_tasks: bool = None,
pull_request_template: bool = None,
pull_request_template_contents: typing.List[str] = None,
readme: SampleReadmeProps = None,
releasable_commits: ReleasableCommits = None,
release: bool = None,
release_branches: typing.Mapping[BranchOptions] = None,
release_every_commit: bool = None,
release_failure_issue: bool = None,
release_failure_issue_label: str = None,
release_schedule: str = None,
release_tag_prefix: str = None,
release_to_npm: bool = None,
release_trigger: ReleaseTrigger = None,
release_workflow: bool = None,
release_workflow_name: str = None,
release_workflow_setup_steps: typing.List[JobStep] = None,
renovatebot: bool = None,
renovatebot_options: RenovatebotOptions = None,
repository: str = None,
repository_directory: str = None,
sample_code: bool = None,
scoped_packages_options: typing.List[ScopedPackagesOptions] = None,
scripts: typing.Mapping[str] = None,
srcdir: str = None,
stability: str = None,
stale: bool = None,
stale_options: StaleOptions = None,
testdir: str = None,
tsconfig: TypescriptConfigOptions = None,
tsconfig_dev: TypescriptConfigOptions = None,
tsconfig_dev_file: str = None,
ts_jest_options: TsJestOptions = None,
typescript_version: str = None,
versionrc_options: typing.Mapping[typing.Any] = None,
vscode: bool = None,
workflow_bootstrap_steps: typing.List[JobStep] = None,
workflow_container_image: str = None,
workflow_git_identity: GitIdentity = None,
workflow_node_version: str = None,
workflow_package_cache: bool = None,
workflow_runs_on: typing.List[str] = None,
workflow_runs_on_group: GroupRunnerOptions = None,
yarn_berry_options: YarnBerryOptions = None,
disable_node_warnings: bool = None,
license_options: LicenseOptions = None,
monorepo_upgrade_deps: bool = None,
monorepo_upgrade_deps_options: MonorepoUpgradeDepsOptions = None,
workspace_config: WorkspaceConfig = None
)
Properties
Name | Type | Description |
---|---|---|
name |
str |
No description. |
allow_library_dependencies |
bool |
Allow the project to include peerDependencies and bundledDependencies . |
artifacts_directory |
str |
A directory which will contain build artifacts. |
author_email |
str |
Author's e-mail. |
author_name |
str |
Author's name. |
author_organization |
bool |
Is the author an organization. |
author_url |
str |
Author's URL / Website. |
auto_approve_options |
projen.github.AutoApproveOptions |
Enable and configure the 'auto approve' workflow. |
auto_approve_upgrades |
bool |
Automatically approve deps upgrade PRs, allowing them to be merged by mergify (if configued). |
auto_detect_bin |
bool |
Automatically add all executables under the bin directory to your package.json file under the bin section. |
auto_merge |
bool |
Enable automatic merging on GitHub. |
auto_merge_options |
projen.github.AutoMergeOptions |
Configure options for automatic merging on GitHub. |
bin |
typing.Mapping[str] |
Binary programs vended with your module. |
bugs_email |
str |
The email address to which issues should be reported. |
bugs_url |
str |
The url to your project's issue tracker. |
build_workflow |
bool |
Define a GitHub workflow for building PRs. |
build_workflow_options |
projen.javascript.BuildWorkflowOptions |
Options for PR build workflow. |
build_workflow_triggers |
projen.github.workflows.Triggers |
Build workflow triggers. |
bundled_deps |
typing.List[str] |
List of dependencies to bundle into this module. |
bundler_options |
projen.javascript.BundlerOptions |
Options for Bundler . |
check_licenses |
projen.javascript.LicenseCheckerOptions |
Configure which licenses should be deemed acceptable for use by dependencies. |
clobber |
bool |
Add a clobber task which resets the repo to origin. |
code_artifact_options |
projen.javascript.CodeArtifactOptions |
Options for npm packages using AWS CodeArtifact. |
code_cov |
bool |
Define a GitHub workflow step for sending code coverage metrics to https://codecov.io/ Uses codecov/codecov-action@v4 A secret is required for private repos. Configured with @codeCovTokenSecret . |
code_cov_token_secret |
str |
Define the secret name for a specified https://codecov.io/ token A secret is required to send coverage for private repositories. |
commit_generated |
bool |
Whether to commit the managed files by default. |
copyright_owner |
str |
License copyright owner. |
copyright_period |
str |
The copyright years to put in the LICENSE file. |
default_release_branch |
str |
The name of the main release branch. |
dependabot |
bool |
Use dependabot to handle dependency upgrades. |
dependabot_options |
projen.github.DependabotOptions |
Options for dependabot. |
deps |
typing.List[str] |
Runtime dependencies of this module. |
deps_upgrade |
bool |
Use tasks and github workflows to handle dependency upgrades. |
deps_upgrade_options |
projen.javascript.UpgradeDependenciesOptions |
Options for UpgradeDependencies . |
description |
str |
The description is just a string that helps people understand the purpose of the package. |
dev_container |
bool |
Add a VSCode development environment (used for GitHub Codespaces). |
dev_deps |
typing.List[str] |
Build dependencies for this module. |
disable_tsconfig |
bool |
Do not generate a tsconfig.json file (used by jsii projects since tsconfig.json is generated by the jsii compiler). |
disable_tsconfig_dev |
bool |
Do not generate a tsconfig.dev.json file. |
docgen |
bool |
Docgen by Typedoc. |
docs_directory |
str |
Docs directory. |
entrypoint |
str |
Module entrypoint (main in package.json ). Set to an empty string to not include main in your package.json. |
entrypoint_types |
str |
The .d.ts file that includes the type declarations for this module. |
eslint |
bool |
Setup eslint. |
eslint_options |
projen.javascript.EslintOptions |
Eslint options. |
github |
bool |
Enable GitHub integration. |
github_options |
projen.github.GitHubOptions |
Options for GitHub integration. |
gitignore |
typing.List[str] |
Additional entries to .gitignore. |
git_ignore_options |
projen.IgnoreFileOptions |
Configuration options for .gitignore file. |
git_options |
projen.GitOptions |
Configuration options for git. |
gitpod |
bool |
Add a Gitpod development environment. |
homepage |
str |
Package's Homepage / Website. |
jest |
bool |
Setup jest unit tests. |
jest_options |
projen.javascript.JestOptions |
Jest options. |
jsii_release_version |
str |
Version requirement of publib which is used to publish modules to npm. |
keywords |
typing.List[str] |
Keywords to include in package.json . |
libdir |
str |
Typescript artifacts output directory. |
license |
str |
License's SPDX identifier. |
licensed |
bool |
Indicates if a license should be added. |
logging |
projen.LoggerOptions |
Configure logging options such as verbosity. |
major_version |
typing.Union[int, float] |
Major version to release from the default branch. |
max_node_version |
str |
Minimum node.js version to require via engines (inclusive). |
mergify |
bool |
Whether mergify should be enabled on this repository or not. |
mergify_options |
projen.github.MergifyOptions |
Options for mergify. |
min_major_version |
typing.Union[int, float] |
Minimal Major version to release. |
min_node_version |
str |
Minimum Node.js version to require via package.json engines (inclusive). |
mutable_build |
bool |
Automatically update files modified during builds to pull-request branches. |
npm_access |
projen.javascript.NpmAccess |
Access level of the npm package. |
npm_dist_tag |
str |
The npmDistTag to use when publishing from the default branch. |
npmignore |
typing.List[str] |
Additional entries to .npmignore. |
npmignore_enabled |
bool |
Defines an .npmignore file. Normally this is only needed for libraries that are packaged as tarballs. |
npm_ignore_options |
projen.IgnoreFileOptions |
Configuration options for .npmignore file. |
npm_provenance |
bool |
Should provenance statements be generated when the package is published. |
npm_registry |
str |
The host name of the npm registry to publish to. |
npm_registry_url |
str |
The base URL of the npm package registry. |
npm_token_secret |
str |
GitHub secret which contains the NPM token to use when publishing packages. |
outdir |
str |
The root directory of the project. Relative to this directory, all files are synthesized. |
package |
bool |
Defines a package task that will produce an npm tarball under the artifacts directory (e.g. dist ). |
package_manager |
projen.javascript.NodePackageManager |
The Node Package Manager used to execute scripts. |
package_name |
str |
The "name" in package.json. |
parent |
projen.Project |
The parent project, if this project is part of a bigger project. |
peer_dependency_options |
projen.javascript.PeerDependencyOptions |
Options for peerDeps . |
peer_deps |
typing.List[str] |
Peer dependencies for this module. |
pnpm_version |
str |
The version of PNPM to use if using PNPM as a package manager. |
post_build_steps |
typing.List[projen.github.workflows.JobStep] |
Steps to execute after build as part of the release workflow. |
prerelease |
str |
Bump versions from the default branch as pre-releases (e.g. "beta", "alpha", "pre"). |
prettier |
bool |
Setup prettier. |
prettier_options |
projen.javascript.PrettierOptions |
Prettier options. |
project_type |
projen.ProjectType |
Which type of project this is (library/app). |
projen_command |
str |
The shell command to use in order to run the projen CLI. |
projen_credentials |
projen.github.GithubCredentials |
Choose a method of providing GitHub API access for projen workflows. |
projen_dev_dependency |
bool |
Indicates of "projen" should be installed as a devDependency. |
projenrc_js |
bool |
Generate (once) .projenrc.js (in JavaScript). Set to false in order to disable .projenrc.js generation. |
projenrc_json |
bool |
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation. |
projenrc_json_options |
projen.ProjenrcJsonOptions |
Options for .projenrc.json. |
projenrc_js_options |
projen.javascript.ProjenrcOptions |
Options for .projenrc.js. |
projenrc_ts |
bool |
Use TypeScript for your projenrc file (.projenrc.ts ). |
projenrc_ts_options |
projen.typescript.ProjenrcOptions |
Options for .projenrc.ts. |
projen_token_secret |
str |
The name of a secret which includes a GitHub Personal Access Token to be used by projen workflows. |
projen_version |
str |
Version of projen to install. |
publish_dry_run |
bool |
Instead of actually publishing to package managers, just print the publishing command. |
publish_tasks |
bool |
Define publishing tasks that can be executed manually as well as workflows. |
pull_request_template |
bool |
Include a GitHub pull request template. |
pull_request_template_contents |
typing.List[str] |
The contents of the pull request template. |
readme |
projen.SampleReadmeProps |
The README setup. |
releasable_commits |
projen.ReleasableCommits |
Find commits that should be considered releasable Used to decide if a release is required. |
release |
bool |
Add release management to this project. |
release_branches |
typing.Mapping[projen.release.BranchOptions] |
Defines additional release branches. |
release_every_commit |
bool |
Automatically release new versions every commit to one of branches in releaseBranches . |
release_failure_issue |
bool |
Create a github issue on every failed publishing task. |
release_failure_issue_label |
str |
The label to apply to issues indicating publish failures. |
release_schedule |
str |
CRON schedule to trigger new releases. |
release_tag_prefix |
str |
Automatically add the given prefix to release tags. |
release_to_npm |
bool |
Automatically release to npm when new versions are introduced. |
release_trigger |
projen.release.ReleaseTrigger |
The release trigger to use. |
release_workflow |
bool |
DEPRECATED: renamed to release . |
release_workflow_name |
str |
The name of the default release workflow. |
release_workflow_setup_steps |
typing.List[projen.github.workflows.JobStep] |
A set of workflow steps to execute in order to setup the workflow container. |
renovatebot |
bool |
Use renovatebot to handle dependency upgrades. |
renovatebot_options |
projen.RenovatebotOptions |
Options for renovatebot. |
repository |
str |
The repository is the location where the actual code for your package lives. |
repository_directory |
str |
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. |
sample_code |
bool |
Generate one-time sample in src/ and test/ if there are no files there. |
scoped_packages_options |
typing.List[projen.javascript.ScopedPackagesOptions] |
Options for privately hosted scoped packages. |
scripts |
typing.Mapping[str] |
npm scripts to include. |
srcdir |
str |
Typescript sources directory. |
stability |
str |
Package's Stability. |
stale |
bool |
Auto-close of stale issues and pull request. |
stale_options |
projen.github.StaleOptions |
Auto-close stale issues and pull requests. |
testdir |
str |
Jest tests directory. |
tsconfig |
projen.javascript.TypescriptConfigOptions |
Custom TSConfig. |
tsconfig_dev |
projen.javascript.TypescriptConfigOptions |
Custom tsconfig options for the development tsconfig.json file (used for testing). |
tsconfig_dev_file |
str |
The name of the development tsconfig.json file. |
ts_jest_options |
projen.typescript.TsJestOptions |
Options for ts-jest. |
typescript_version |
str |
TypeScript version to use. |
versionrc_options |
typing.Mapping[typing.Any] |
Custom configuration used when creating changelog with standard-version package. |
vscode |
bool |
Enable VSCode integration. |
workflow_bootstrap_steps |
typing.List[projen.github.workflows.JobStep] |
Workflow steps to use in order to bootstrap this repo. |
workflow_container_image |
str |
Container image to use for GitHub workflows. |
workflow_git_identity |
projen.github.GitIdentity |
The git identity to use in workflows. |
workflow_node_version |
str |
The node version to use in GitHub workflows. |
workflow_package_cache |
bool |
Enable Node.js package cache in GitHub workflows. |
workflow_runs_on |
typing.List[str] |
Github Runner selection labels. |
workflow_runs_on_group |
projen.GroupRunnerOptions |
Github Runner Group selection options. |
yarn_berry_options |
projen.javascript.YarnBerryOptions |
Options for Yarn Berry. |
disable_node_warnings |
bool |
Disable node warnings from being emitted during build tasks. |
license_options |
LicenseOptions |
Default license to apply to all PDK managed packages. |
monorepo_upgrade_deps |
bool |
Whether to include an upgrade-deps task at the root of the monorepo which will upgrade all dependencies. |
monorepo_upgrade_deps_options |
MonorepoUpgradeDepsOptions |
Monorepo Upgrade Deps options. |
workspace_config |
WorkspaceConfig |
Configuration for workspace. |
name
Required
name: str
- Type: str
- Default: $BASEDIR
allow_library_dependencies
Optional
allow_library_dependencies: bool
- Type: bool
- 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.
artifacts_directory
Optional
artifacts_directory: str
- Type: str
- Default: "dist"
A directory which will contain build artifacts.
author_email
Optional
author_email: str
- Type: str
Author's e-mail.
author_name
Optional
author_name: str
- Type: str
Author's name.
author_organization
Optional
author_organization: bool
- Type: bool
Is the author an organization.
author_url
Optional
author_url: str
- Type: str
Author's URL / Website.
auto_approve_options
Optional
auto_approve_options: AutoApproveOptions
- Type: projen.github.AutoApproveOptions
- Default: auto approve is disabled
Enable and configure the 'auto approve' workflow.
auto_approve_upgrades
Optional
auto_approve_upgrades: bool
- Type: bool
- 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.
auto_detect_bin
Optional
auto_detect_bin: bool
- Type: bool
- Default: true
Automatically add all executables under the bin
directory to your package.json
file under the bin
section.
auto_merge
Optional
auto_merge: bool
- Type: bool
- Default: true
Enable automatic merging on GitHub.
Has no effect if github.mergify
is set to false.
auto_merge_options
Optional
auto_merge_options: 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.
bin
Optional
bin: typing.Mapping[str]
- Type: typing.Mapping[str]
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.
bugs_email
Optional
bugs_email: str
- Type: str
The email address to which issues should be reported.
bugs_url
Optional
bugs_url: str
- Type: str
The url to your project's issue tracker.
build_workflow
Optional
build_workflow: bool
- Type: bool
- Default: true if not a subproject
Define a GitHub workflow for building PRs.
build_workflow_options
Optional
build_workflow_options: BuildWorkflowOptions
- Type: projen.javascript.BuildWorkflowOptions
Options for PR build workflow.
~~build_workflow_triggers
~~Optional
- Deprecated: - Use
buildWorkflowOptions.workflowTriggers
build_workflow_triggers: Triggers
- Type: projen.github.workflows.Triggers
- Default: "{ pullRequest: {}, workflowDispatch: {} }"
Build workflow triggers.
bundled_deps
Optional
bundled_deps: typing.List[str]
- Type: typing.List[str]
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.
bundler_options
Optional
bundler_options: BundlerOptions
- Type: projen.javascript.BundlerOptions
Options for Bundler
.
check_licenses
Optional
check_licenses: LicenseCheckerOptions
- Type: projen.javascript.LicenseCheckerOptions
- Default: no license checks are run during the build and all licenses will be accepted
Configure which licenses should be deemed acceptable for use by dependencies.
This setting will cause the build to fail, if any prohibited or not allowed licenses ares encountered.
clobber
Optional
clobber: bool
- Type: bool
- Default: true, but false for subprojects
Add a clobber
task which resets the repo to origin.
code_artifact_options
Optional
code_artifact_options: 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
code_cov
Optional
code_cov: bool
- Type: bool
- Default: false
Define a GitHub workflow step for sending code coverage metrics to https://codecov.io/ Uses codecov/codecov-action@v4 A secret is required for private repos. Configured with @codeCovTokenSecret
.
code_cov_token_secret
Optional
code_cov_token_secret: str
- Type: str
- 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.
commit_generated
Optional
commit_generated: bool
- Type: bool
- Default: true
Whether to commit the managed files by default.
copyright_owner
Optional
copyright_owner: str
- Type: str
- Default: defaults to the value of authorName or "" if
authorName
is undefined.
License copyright owner.
copyright_period
Optional
copyright_period: str
- Type: str
- Default: current year
The copyright years to put in the LICENSE file.
default_release_branch
Optional
default_release_branch: str
- Type: str
- Default: "main"
The name of the main release branch.
dependabot
Optional
dependabot: bool
- Type: bool
- Default: false
Use dependabot to handle dependency upgrades.
Cannot be used in conjunction with depsUpgrade
.
dependabot_options
Optional
dependabot_options: DependabotOptions
- Type: projen.github.DependabotOptions
- Default: default options
Options for dependabot.
deps
Optional
deps: typing.List[str]
- Type: typing.List[str]
- 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.
deps_upgrade
Optional
deps_upgrade: bool
- Type: bool
- Default: true
Use tasks and github workflows to handle dependency upgrades.
Cannot be used in conjunction with dependabot
.
deps_upgrade_options
Optional
deps_upgrade_options: UpgradeDependenciesOptions
- Type: projen.javascript.UpgradeDependenciesOptions
- Default: default options
Options for UpgradeDependencies
.
description
Optional
description: str
- Type: str
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
dev_container
Optional
dev_container: bool
- Type: bool
- Default: false
Add a VSCode development environment (used for GitHub Codespaces).
dev_deps
Optional
dev_deps: typing.List[str]
- Type: typing.List[str]
- 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.
disable_tsconfig
Optional
disable_tsconfig: bool
- Type: bool
- Default: false
Do not generate a tsconfig.json
file (used by jsii projects since tsconfig.json is generated by the jsii compiler).
disable_tsconfig_dev
Optional
disable_tsconfig_dev: bool
- Type: bool
- Default: false
Do not generate a tsconfig.dev.json
file.
docgen
Optional
docgen: bool
- Type: bool
- Default: false
Docgen by Typedoc.
docs_directory
Optional
docs_directory: str
- Type: str
- Default: "docs"
Docs directory.
entrypoint
Optional
entrypoint: str
- Type: str
- Default: "lib/index.js"
Module entrypoint (main
in package.json
). Set to an empty string to not include main
in your package.json.
entrypoint_types
Optional
entrypoint_types: str
- Type: str
- 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
eslint: bool
- Type: bool
- Default: true
Setup eslint.
eslint_options
Optional
eslint_options: EslintOptions
- Type: projen.javascript.EslintOptions
- Default: opinionated default options
Eslint options.
github
Optional
github: bool
- Type: bool
- Default: true
Enable GitHub integration.
Enabled by default for root projects. Disabled for non-root projects.
github_options
Optional
github_options: GitHubOptions
- Type: projen.github.GitHubOptions
- Default: see GitHubOptions
Options for GitHub integration.
gitignore
Optional
gitignore: typing.List[str]
- Type: typing.List[str]
Additional entries to .gitignore.
git_ignore_options
Optional
git_ignore_options: IgnoreFileOptions
- Type: projen.IgnoreFileOptions
Configuration options for .gitignore file.
git_options
Optional
git_options: GitOptions
- Type: projen.GitOptions
Configuration options for git.
gitpod
Optional
gitpod: bool
- Type: bool
- Default: false
Add a Gitpod development environment.
homepage
Optional
homepage: str
- Type: str
Package's Homepage / Website.
jest
Optional
jest: bool
- Type: bool
- Default: true
Setup jest unit tests.
jest_options
Optional
jest_options: JestOptions
- Type: projen.javascript.JestOptions
- Default: default options
Jest options.
jsii_release_version
Optional
jsii_release_version: str
- Type: str
- Default: "latest"
Version requirement of publib
which is used to publish modules to npm.
keywords
Optional
keywords: typing.List[str]
- Type: typing.List[str]
Keywords to include in package.json
.
libdir
Optional
libdir: str
- Type: str
- Default: "lib"
Typescript artifacts output directory.
license
Optional
license: str
- Type: str
- 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
licensed: bool
- Type: bool
- Default: true
Indicates if a license should be added.
logging
Optional
logging: LoggerOptions
- Type: projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
major_version
Optional
major_version: typing.Union[int, float]
- Type: typing.Union[int, float]
- 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.
max_node_version
Optional
max_node_version: str
- Type: str
- Default: no max
Minimum node.js version to require via engines
(inclusive).
~~mergify
~~Optional
- Deprecated: use
githubOptions.mergify
instead
mergify: bool
- Type: bool
- Default: true
Whether mergify should be enabled on this repository or not.
~~mergify_options
~~Optional
- Deprecated: use
githubOptions.mergifyOptions
instead
mergify_options: MergifyOptions
- Type: projen.github.MergifyOptions
- Default: default options
Options for mergify.
min_major_version
Optional
min_major_version: typing.Union[int, float]
- Type: typing.Union[int, float]
- 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
.
min_node_version
Optional
min_node_version: str
- Type: str
- Default: no "engines" specified
Minimum Node.js version to require via package.json engines
(inclusive).
~~mutable_build
~~Optional
- Deprecated: - Use
buildWorkflowOptions.mutableBuild
mutable_build: bool
- Type: bool
- 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.
npm_access
Optional
npm_access: NpmAccess
- Type: projen.javascript.NpmAccess
- Default: for scoped packages (e.g.
foo@bar
), the default isNpmAccess.RESTRICTED
, for non-scoped packages, the default isNpmAccess.PUBLIC
.
Access level of the npm package.
npm_dist_tag
Optional
npm_dist_tag: str
- Type: str
- 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.
~~npmignore
~~Optional
- Deprecated: - use
project.addPackageIgnore
npmignore: typing.List[str]
- Type: typing.List[str]
Additional entries to .npmignore.
npmignore_enabled
Optional
npmignore_enabled: bool
- Type: bool
- Default: true
Defines an .npmignore file. Normally this is only needed for libraries that are packaged as tarballs.
npm_ignore_options
Optional
npm_ignore_options: IgnoreFileOptions
- Type: projen.IgnoreFileOptions
Configuration options for .npmignore file.
npm_provenance
Optional
npm_provenance: bool
- Type: bool
- Default: true for public packages, false otherwise
Should provenance statements be generated when the package is published.
A supported package manager is required to publish a package with npm provenance statements and you will need to use a supported CI/CD provider.
Note that the projen Release
and Publisher
components are using publib
to publish packages,
which is using npm internally and supports provenance statements independently of the package manager used.
~~npm_registry
~~Optional
- Deprecated: use
npmRegistryUrl
instead
npm_registry: str
- Type: str
The host name of the npm registry to publish to.
Cannot be set together with npmRegistryUrl
.
npm_registry_url
Optional
npm_registry_url: str
- Type: str
- Default: "https://registry.npmjs.org"
The base URL of the npm package registry.
Must be a URL (e.g. start with "https://" or "http://")
npm_token_secret
Optional
npm_token_secret: str
- Type: str
- Default: "NPM_TOKEN"
GitHub secret which contains the NPM token to use when publishing packages.
outdir
Optional
outdir: str
- Type: str
- 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 subprojects.
package
Optional
package: bool
- Type: bool
- Default: true
Defines a package
task that will produce an npm tarball under the artifacts directory (e.g. dist
).
package_manager
Optional
package_manager: NodePackageManager
- Type: projen.javascript.NodePackageManager
- Default: NodePackageManager.YARN_CLASSIC
The Node Package Manager used to execute scripts.
package_name
Optional
package_name: str
- Type: str
- Default: defaults to project name
The "name" in package.json.
parent
Optional
parent: Project
- Type: projen.Project
The parent project, if this project is part of a bigger project.
peer_dependency_options
Optional
peer_dependency_options: PeerDependencyOptions
- Type: projen.javascript.PeerDependencyOptions
Options for peerDeps
.
peer_deps
Optional
peer_deps: typing.List[str]
- Type: typing.List[str]
- 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.
pnpm_version
Optional
pnpm_version: str
- Type: str
- Default: "7"
The version of PNPM to use if using PNPM as a package manager.
post_build_steps
Optional
post_build_steps: typing.List[JobStep]
- Type: typing.List[projen.github.workflows.JobStep]
- Default: []
Steps to execute after build as part of the release workflow.
prerelease
Optional
prerelease: str
- Type: str
- Default: normal semantic versions
Bump versions from the default branch as pre-releases (e.g. "beta", "alpha", "pre").
prettier
Optional
prettier: bool
- Type: bool
- Default: false
Setup prettier.
prettier_options
Optional
prettier_options: PrettierOptions
- Type: projen.javascript.PrettierOptions
- Default: default options
Prettier options.
~~project_type
~~Optional
- Deprecated: no longer supported at the base project level
project_type: ProjectType
- Type: projen.ProjectType
- Default: ProjectType.UNKNOWN
Which type of project this is (library/app).
projen_command
Optional
projen_command: str
- Type: str
- Default: "npx projen"
The shell command to use in order to run the projen CLI.
Can be used to customize in special environments.
projen_credentials
Optional
projen_credentials: 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.
projen_dev_dependency
Optional
projen_dev_dependency: bool
- Type: bool
- Default: true if not a subproject
Indicates of "projen" should be installed as a devDependency.
projenrc_js
Optional
projenrc_js: bool
- Type: bool
- Default: true if projenrcJson is false
Generate (once) .projenrc.js (in JavaScript). Set to false
in order to disable .projenrc.js generation.
projenrc_json
Optional
projenrc_json: bool
- Type: bool
- Default: false
Generate (once) .projenrc.json (in JSON). Set to false
in order to disable .projenrc.json generation.
projenrc_json_options
Optional
projenrc_json_options: ProjenrcJsonOptions
- Type: projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
projenrc_js_options
Optional
projenrc_js_options: ProjenrcOptions
- Type: projen.javascript.ProjenrcOptions
- Default: default options
Options for .projenrc.js.
projenrc_ts
Optional
projenrc_ts: bool
- Type: bool
- Default: false
Use TypeScript for your projenrc file (.projenrc.ts
).
projenrc_ts_options
Optional
projenrc_ts_options: ProjenrcOptions
- Type: projen.typescript.ProjenrcOptions
Options for .projenrc.ts.
~~projen_token_secret
~~Optional
- Deprecated: use
projenCredentials
projen_token_secret: str
- Type: str
- 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.
projen_version
Optional
projen_version: str
- Type: str
- Default: Defaults to the latest version.
Version of projen to install.
publish_dry_run
Optional
publish_dry_run: bool
- Type: bool
- Default: false
Instead of actually publishing to package managers, just print the publishing command.
publish_tasks
Optional
publish_tasks: bool
- Type: bool
- 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.
pull_request_template
Optional
pull_request_template: bool
- Type: bool
- Default: true
Include a GitHub pull request template.
pull_request_template_contents
Optional
pull_request_template_contents: typing.List[str]
- Type: typing.List[str]
- Default: default content
The contents of the pull request template.
readme
Optional
readme: SampleReadmeProps
- Type: projen.SampleReadmeProps
- Default: { filename: 'README.md', contents: '# replace this' }
The README setup.
releasable_commits
Optional
releasable_commits: ReleasableCommits
- Type: projen.ReleasableCommits
- Default: ReleasableCommits.everyCommit()
Find commits that should be considered releasable Used to decide if a release is required.
release
Optional
release: bool
- Type: bool
- Default: true (false for subprojects)
Add release management to this project.
release_branches
Optional
release_branches: typing.Mapping[BranchOptions]
- Type: typing.Mapping[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.
~~release_every_commit
~~Optional
- Deprecated: Use
releaseTrigger: ReleaseTrigger.continuous()
instead
release_every_commit: bool
- Type: bool
- Default: true
Automatically release new versions every commit to one of branches in releaseBranches
.
release_failure_issue
Optional
release_failure_issue: bool
- Type: bool
- Default: false
Create a github issue on every failed publishing task.
release_failure_issue_label
Optional
release_failure_issue_label: str
- Type: str
- Default: "failed-release"
The label to apply to issues indicating publish failures.
Only applies if releaseFailureIssue
is true.
~~release_schedule
~~Optional
- Deprecated: Use
releaseTrigger: ReleaseTrigger.scheduled()
instead
release_schedule: str
- Type: str
- Default: no scheduled releases
CRON schedule to trigger new releases.
release_tag_prefix
Optional
release_tag_prefix: str
- Type: str
- 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.
release_to_npm
Optional
release_to_npm: bool
- Type: bool
- Default: false
Automatically release to npm when new versions are introduced.
release_trigger
Optional
release_trigger: ReleaseTrigger
- Type: projen.release.ReleaseTrigger
- Default: Continuous releases (
ReleaseTrigger.continuous()
)
The release trigger to use.
~~release_workflow
~~Optional
- Deprecated: see
release
.
release_workflow: bool
- Type: bool
- Default: true if not a subproject
DEPRECATED: renamed to release
.
release_workflow_name
Optional
release_workflow_name: str
- Type: str
- Default: "release"
The name of the default release workflow.
release_workflow_setup_steps
Optional
release_workflow_setup_steps: typing.List[JobStep]
- Type: typing.List[projen.github.workflows.JobStep]
A set of workflow steps to execute in order to setup the workflow container.
renovatebot
Optional
renovatebot: bool
- Type: bool
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebot_options
Optional
renovatebot_options: RenovatebotOptions
- Type: projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
repository
Optional
repository: str
- Type: str
The repository is the location where the actual code for your package lives.
See https://classic.yarnpkg.com/en/docs/package-json/#toc-repository
repository_directory
Optional
repository_directory: str
- Type: str
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.
sample_code
Optional
sample_code: bool
- Type: bool
- Default: true
Generate one-time sample in src/
and test/
if there are no files there.
scoped_packages_options
Optional
scoped_packages_options: typing.List[ScopedPackagesOptions]
- Type: typing.List[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()
orpackage.setScript()
scripts: typing.Mapping[str]
- Type: typing.Mapping[str]
- 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.
srcdir
Optional
srcdir: str
- Type: str
- Default: "src"
Typescript sources directory.
stability
Optional
stability: str
- Type: str
Package's Stability.
stale
Optional
stale: bool
- Type: bool
- Default: false
Auto-close of stale issues and pull request.
See staleOptions
for options.
stale_options
Optional
stale_options: StaleOptions
- Type: projen.github.StaleOptions
- Default: see defaults in
StaleOptions
Auto-close stale issues and pull requests.
To disable set stale
to false
.
testdir
Optional
testdir: str
- Type: str
- 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
tsconfig: TypescriptConfigOptions
- Type: projen.javascript.TypescriptConfigOptions
- Default: default options
Custom TSConfig.
tsconfig_dev
Optional
tsconfig_dev: TypescriptConfigOptions
- Type: projen.javascript.TypescriptConfigOptions
- Default: use the production tsconfig options
Custom tsconfig options for the development tsconfig.json file (used for testing).
tsconfig_dev_file
Optional
tsconfig_dev_file: str
- Type: str
- Default: "tsconfig.dev.json"
The name of the development tsconfig.json file.
ts_jest_options
Optional
ts_jest_options: TsJestOptions
- Type: projen.typescript.TsJestOptions
Options for ts-jest.
typescript_version
Optional
typescript_version: str
- Type: str
- 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
).
versionrc_options
Optional
versionrc_options: typing.Mapping[typing.Any]
- Type: typing.Mapping[typing.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.
vscode
Optional
vscode: bool
- Type: bool
- Default: true
Enable VSCode integration.
Enabled by default for root projects. Disabled for non-root projects.
workflow_bootstrap_steps
Optional
workflow_bootstrap_steps: typing.List[JobStep]
- Type: typing.List[projen.github.workflows.JobStep]
- Default: "yarn install --frozen-lockfile && yarn projen"
Workflow steps to use in order to bootstrap this repo.
workflow_container_image
Optional
workflow_container_image: str
- Type: str
- Default: default image
Container image to use for GitHub workflows.
workflow_git_identity
Optional
workflow_git_identity: GitIdentity
- Type: projen.github.GitIdentity
- Default: GitHub Actions
The git identity to use in workflows.
workflow_node_version
Optional
workflow_node_version: str
- Type: str
- Default: same as
minNodeVersion
The node version to use in GitHub workflows.
workflow_package_cache
Optional
workflow_package_cache: bool
- Type: bool
- Default: false
Enable Node.js package cache in GitHub workflows.
workflow_runs_on
Optional
workflow_runs_on: typing.List[str]
- Type: typing.List[str]
- Default: ["ubuntu-latest"]
Github Runner selection labels.
workflow_runs_on_group
Optional
workflow_runs_on_group: GroupRunnerOptions
- Type: projen.GroupRunnerOptions
Github Runner Group selection options.
yarn_berry_options
Optional
yarn_berry_options: YarnBerryOptions
- Type: projen.javascript.YarnBerryOptions
- Default: Yarn Berry v4 with all default options
Options for Yarn Berry.
disable_node_warnings
Optional
disable_node_warnings: bool
- Type: bool
- Default: false
Disable node warnings from being emitted during build tasks.
license_options
Optional
license_options: LicenseOptions
- Type: LicenseOptions
- Default: Apache-2.0
Default license to apply to all PDK managed packages.
monorepo_upgrade_deps
Optional
monorepo_upgrade_deps: bool
- Type: bool
- Default: true
Whether to include an upgrade-deps task at the root of the monorepo which will upgrade all dependencies.
monorepo_upgrade_deps_options
Optional
monorepo_upgrade_deps_options: MonorepoUpgradeDepsOptions
- Type: MonorepoUpgradeDepsOptions
- Default: undefined
Monorepo Upgrade Deps options.
This is only used if monorepoUpgradeDeps is true.
workspace_config
Optional
workspace_config: WorkspaceConfig
- Type: WorkspaceConfig
Configuration for workspace.
MonorepoUpgradeDepsOptions
Configuration for Monorepo Upgrade Deps task.
Initializer
import aws.pdk.monorepo
aws.pdk.monorepo.MonorepoUpgradeDepsOptions(
syncpack_config: SyncpackConfig = None,
task_name: str = None
)
Properties
Name | Type | Description |
---|---|---|
syncpack_config |
aws.pdk.monorepo.Syncpack.SyncpackConfig |
Syncpack configuration. |
task_name |
str |
Name of the task to create. |
syncpack_config
Optional
syncpack_config: SyncpackConfig
- Type: aws.pdk.monorepo.Syncpack.SyncpackConfig
- Default: Syncpack.DEFAULT_CONFIG
Syncpack configuration.
No merging is performed and as such a complete syncpackConfig is required if supplied.
task_name
Optional
task_name: str
- Type: str
- Default: upgrade-deps
Name of the task to create.
NxConfiguratorOptions
NXConfigurator options.
Initializer
import aws.pdk.monorepo
aws.pdk.monorepo.NxConfiguratorOptions(
default_release_branch: str = None,
license_options: LicenseOptions = None
)
Properties
Name | Type | Description |
---|---|---|
default_release_branch |
str |
Branch that NX affected should run against. |
license_options |
LicenseOptions |
Default package license config. |
default_release_branch
Optional
default_release_branch: str
- Type: str
Branch that NX affected should run against.
license_options
Optional
license_options: LicenseOptions
- Type: LicenseOptions
Default package license config.
If nothing is specified, all packages will default to Apache-2.0 (unless they have their own License component).
NxJsonConfiguration
https://github.com/nrwl/nx/blob/master/packages/nx/src/config/nx-json.ts
Initializer
from aws.pdk.monorepo import nx
Nx.NxJsonConfiguration(
affected: INxAffectedConfig = None,
default_project: str = None,
extends: str = None,
named_inputs: typing.Mapping[typing.List[str]] = None,
npm_scope: str = None,
plugins: typing.List[str] = None,
plugins_config: typing.Mapping[typing.Any] = None,
target_defaults: typing.Mapping[IProjectTarget] = None,
tasks_runner_options: typing.Mapping[typing.Any] = None,
workspace_layout: IWorkspaceLayout = None
)
Properties
Name | Type | Description |
---|---|---|
affected |
aws.pdk.monorepo.Nx.INxAffectedConfig |
Default options for nx affected . |
default_project |
str |
Default project. |
extends |
str |
Some presets use the extends property to hide some default options in a separate json file. |
named_inputs |
typing.Mapping[typing.List[str]] |
Named inputs. |
npm_scope |
str |
Tells Nx what prefix to use when generating library imports. |
plugins |
typing.List[str] |
Plugins for extending the project graph. |
plugins_config |
typing.Mapping[typing.Any] |
Configuration for Nx Plugins. |
target_defaults |
typing.Mapping[aws.pdk.monorepo.Nx.IProjectTarget] |
Dependencies between different target names across all projects. |
tasks_runner_options |
typing.Mapping[typing.Any] |
Available Task Runners. |
workspace_layout |
aws.pdk.monorepo.Nx.IWorkspaceLayout |
Where new apps + libs should be placed. |
affected
Optional
affected: INxAffectedConfig
- Type: aws.pdk.monorepo.Nx.INxAffectedConfig
Default options for nx affected
.
default_project
Optional
default_project: str
- Type: str
Default project.
When project isn't provided, the default project will be used. Convenient for small workspaces with one main application.
extends
Optional
extends: str
- Type: str
- Default: "nx/presets/npm.json"
Some presets use the extends property to hide some default options in a separate json file.
The json file specified in the extends property is located in your node_modules folder. The Nx preset files are specified in the nx package.
named_inputs
Optional
named_inputs: typing.Mapping[typing.List[str]]
- Type: typing.Mapping[typing.List[str]]
Named inputs.
npm_scope
Optional
npm_scope: str
- Type: str
Tells Nx what prefix to use when generating library imports.
plugins
Optional
plugins: typing.List[str]
- Type: typing.List[str]
Plugins for extending the project graph.
plugins_config
Optional
plugins_config: typing.Mapping[typing.Any]
- Type: typing.Mapping[typing.Any]
Configuration for Nx Plugins.
target_defaults
Optional
target_defaults: typing.Mapping[IProjectTarget]
- Type: typing.Mapping[aws.pdk.monorepo.Nx.IProjectTarget]
Dependencies between different target names across all projects.
tasks_runner_options
Optional
tasks_runner_options: typing.Mapping[typing.Any]
- Type: typing.Mapping[typing.Any]
Available Task Runners.
workspace_layout
Optional
workspace_layout: IWorkspaceLayout
- Type: aws.pdk.monorepo.Nx.IWorkspaceLayout
Where new apps + libs should be placed.
ProjectConfig
https://github.com/nrwl/nx/blob/master/packages/nx/schemas/project-schema.json
Initializer
from aws.pdk.monorepo import nx
Nx.ProjectConfig(
implicit_dependencies: typing.List[str] = None,
included_scripts: typing.List[str] = None,
name: str = None,
named_inputs: typing.Mapping[typing.List[str]] = None,
root: str = None,
tags: typing.List[str] = None,
targets: typing.Mapping[IProjectTarget] = None
)
Properties
Name | Type | Description |
---|---|---|
implicit_dependencies |
typing.List[str] |
Implicit dependencies. |
included_scripts |
typing.List[str] |
Explicit list of scripts for Nx to include. |
name |
str |
Name of project. |
named_inputs |
typing.Mapping[typing.List[str]] |
Named inputs. |
root |
str |
Project root dir path relative to workspace. |
tags |
typing.List[str] |
Project tag annotations. |
targets |
typing.Mapping[aws.pdk.monorepo.Nx.IProjectTarget] |
Targets configuration. |
implicit_dependencies
Optional
implicit_dependencies: typing.List[str]
- Type: typing.List[str]
Implicit dependencies.
https://nx.dev/reference/project-configuration#implicitdependencies
included_scripts
Optional
included_scripts: typing.List[str]
- Type: typing.List[str]
Explicit list of scripts for Nx to include.
https://nx.dev/reference/project-configuration#ignoring-package.json-scripts
name
Optional
name: str
- Type: str
Name of project.
named_inputs
Optional
named_inputs: typing.Mapping[typing.List[str]]
- Type: typing.Mapping[typing.List[str]]
Named inputs.
root
Optional
root: str
- Type: str
Project root dir path relative to workspace.
tags
Optional
tags: typing.List[str]
- Type: typing.List[str]
Project tag annotations.
targets
Optional
targets: typing.Mapping[IProjectTarget]
- Type: typing.Mapping[aws.pdk.monorepo.Nx.IProjectTarget]
Targets configuration.
PythonProjectOptions
PythonProjectOptions.
Initializer
import aws.pdk.monorepo
aws.pdk.monorepo.PythonProjectOptions(
module_name: str,
name: str,
author_email: str = None,
author_name: str = None,
auto_approve_options: AutoApproveOptions = None,
auto_merge: bool = None,
auto_merge_options: AutoMergeOptions = None,
classifiers: typing.List[str] = None,
clobber: bool = None,
commit_generated: bool = None,
deps: typing.List[str] = None,
description: str = None,
dev_container: bool = None,
dev_deps: typing.List[str] = None,
github: bool = None,
github_options: GitHubOptions = None,
git_ignore_options: IgnoreFileOptions = None,
git_options: GitOptions = None,
gitpod: bool = None,
homepage: str = None,
license: str = None,
logging: LoggerOptions = None,
mergify: bool = None,
mergify_options: MergifyOptions = None,
outdir: str = None,
package_name: str = None,
parent: Project = None,
poetry_options: PoetryPyprojectOptionsWithoutDeps = None,
project_type: ProjectType = None,
projen_command: str = None,
projen_credentials: GithubCredentials = None,
projenrc_json: bool = None,
projenrc_json_options: ProjenrcJsonOptions = None,
projenrc_python_options: ProjenrcOptions = None,
projen_token_secret: str = None,
pytest: bool = None,
pytest_options: PytestOptions = None,
python_exec: str = None,
readme: SampleReadmeProps = None,
renovatebot: bool = None,
renovatebot_options: RenovatebotOptions = None,
sample: bool = None,
setup_config: typing.Mapping[typing.Any] = None,
setuptools: bool = None,
stale: bool = None,
stale_options: StaleOptions = None,
version: str = None,
vscode: bool = None
)
Properties
Name | Type | Description |
---|---|---|
module_name |
str |
No description. |
name |
str |
No description. |
author_email |
str |
Author's e-mail. |
author_name |
str |
Author's name. |
auto_approve_options |
projen.github.AutoApproveOptions |
Enable and configure the 'auto approve' workflow. |
auto_merge |
bool |
Enable automatic merging on GitHub. |
auto_merge_options |
projen.github.AutoMergeOptions |
Configure options for automatic merging on GitHub. |
classifiers |
typing.List[str] |
A list of PyPI trove classifiers that describe the project. |
clobber |
bool |
Add a clobber task which resets the repo to origin. |
commit_generated |
bool |
Whether to commit the managed files by default. |
deps |
typing.List[str] |
List of runtime dependencies for this project. Dependencies use the format: <module>@<semver> . |
description |
str |
A short description of the package. |
dev_container |
bool |
Add a VSCode development environment (used for GitHub Codespaces). |
dev_deps |
typing.List[str] |
List of dev dependencies for this project. Dependencies use the format: <module>@<semver> . |
github |
bool |
Enable GitHub integration. |
github_options |
projen.github.GitHubOptions |
Options for GitHub integration. |
git_ignore_options |
projen.IgnoreFileOptions |
Configuration options for .gitignore file. |
git_options |
projen.GitOptions |
Configuration options for git. |
gitpod |
bool |
Add a Gitpod development environment. |
homepage |
str |
A URL to the website of the project. |
license |
str |
License of this package as an SPDX identifier. |
logging |
projen.LoggerOptions |
Configure logging options such as verbosity. |
mergify |
bool |
Whether mergify should be enabled on this repository or not. |
mergify_options |
projen.github.MergifyOptions |
Options for mergify. |
outdir |
str |
The root directory of the project. Relative to this directory, all files are synthesized. |
package_name |
str |
Package name. |
parent |
projen.Project |
The parent project, if this project is part of a bigger project. |
poetry_options |
projen.python.PoetryPyprojectOptionsWithoutDeps |
Additional options to set for poetry if using poetry. |
project_type |
projen.ProjectType |
Which type of project this is (library/app). |
projen_command |
str |
The shell command to use in order to run the projen CLI. |
projen_credentials |
projen.github.GithubCredentials |
Choose a method of providing GitHub API access for projen workflows. |
projenrc_json |
bool |
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation. |
projenrc_json_options |
projen.ProjenrcJsonOptions |
Options for .projenrc.json. |
projenrc_python_options |
projen.python.ProjenrcOptions |
Options related to projenrc in python. |
projen_token_secret |
str |
The name of a secret which includes a GitHub Personal Access Token to be used by projen workflows. |
pytest |
bool |
Include pytest tests. |
pytest_options |
projen.python.PytestOptions |
pytest options. |
python_exec |
str |
Path to the python executable to use. |
readme |
projen.SampleReadmeProps |
The README setup. |
renovatebot |
bool |
Use renovatebot to handle dependency upgrades. |
renovatebot_options |
projen.RenovatebotOptions |
Options for renovatebot. |
sample |
bool |
Include sample code and test if the relevant directories don't exist. |
setup_config |
typing.Mapping[typing.Any] |
Additional fields to pass in the setup() function if using setuptools. |
setuptools |
bool |
Use setuptools with a setup.py script for packaging and publishing. |
stale |
bool |
Auto-close of stale issues and pull request. |
stale_options |
projen.github.StaleOptions |
Auto-close stale issues and pull requests. |
version |
str |
Version of the package. |
vscode |
bool |
Enable VSCode integration. |
module_name
Required
module_name: str
- Type: str
- Default: $PYTHON_MODULE_NAME
name
Required
name: str
- Type: str
- Default: $BASEDIR
author_email
Optional
author_email: str
- Type: str
- Default: $GIT_USER_EMAIL
Author's e-mail.
author_name
Optional
author_name: str
- Type: str
- Default: $GIT_USER_NAME
Author's name.
auto_approve_options
Optional
auto_approve_options: AutoApproveOptions
- Type: projen.github.AutoApproveOptions
- Default: auto approve is disabled
Enable and configure the 'auto approve' workflow.
auto_merge
Optional
auto_merge: bool
- Type: bool
- Default: true
Enable automatic merging on GitHub.
Has no effect if github.mergify
is set to false.
auto_merge_options
Optional
auto_merge_options: 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.
classifiers
Optional
classifiers: typing.List[str]
- Type: typing.List[str]
A list of PyPI trove classifiers that describe the project.
clobber
Optional
clobber: bool
- Type: bool
- Default: true, but false for subprojects
Add a clobber
task which resets the repo to origin.
commit_generated
Optional
commit_generated: bool
- Type: bool
- Default: true
Whether to commit the managed files by default.
deps
Optional
deps: typing.List[str]
- Type: typing.List[str]
- Default: []
List of runtime dependencies for this project. Dependencies use the format: <module>@<semver>
.
Additional dependencies can be added via project.addDependency()
.
description
Optional
description: str
- Type: str
A short description of the package.
dev_container
Optional
dev_container: bool
- Type: bool
- Default: false
Add a VSCode development environment (used for GitHub Codespaces).
dev_deps
Optional
dev_deps: typing.List[str]
- Type: typing.List[str]
- Default: []
List of dev dependencies for this project. Dependencies use the format: <module>@<semver>
.
Additional dependencies can be added via project.addDevDependency()
.
github
Optional
github: bool
- Type: bool
- Default: true
Enable GitHub integration.
Enabled by default for root projects. Disabled for non-root projects.
github_options
Optional
github_options: GitHubOptions
- Type: projen.github.GitHubOptions
- Default: see GitHubOptions
Options for GitHub integration.
git_ignore_options
Optional
git_ignore_options: IgnoreFileOptions
- Type: projen.IgnoreFileOptions
Configuration options for .gitignore file.
git_options
Optional
git_options: GitOptions
- Type: projen.GitOptions
Configuration options for git.
gitpod
Optional
gitpod: bool
- Type: bool
- Default: false
Add a Gitpod development environment.
homepage
Optional
homepage: str
- Type: str
A URL to the website of the project.
license
Optional
license: str
- Type: str
License of this package as an SPDX identifier.
logging
Optional
logging: LoggerOptions
- Type: projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
~~mergify
~~Optional
- Deprecated: use
githubOptions.mergify
instead
mergify: bool
- Type: bool
- Default: true
Whether mergify should be enabled on this repository or not.
~~mergify_options
~~Optional
- Deprecated: use
githubOptions.mergifyOptions
instead
mergify_options: MergifyOptions
- Type: projen.github.MergifyOptions
- Default: default options
Options for mergify.
outdir
Optional
outdir: str
- Type: str
- 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 subprojects.
package_name
Optional
package_name: str
- Type: str
Package name.
parent
Optional
parent: Project
- Type: projen.Project
The parent project, if this project is part of a bigger project.
poetry_options
Optional
poetry_options: PoetryPyprojectOptionsWithoutDeps
- Type: projen.python.PoetryPyprojectOptionsWithoutDeps
Additional options to set for poetry if using poetry.
~~project_type
~~Optional
- Deprecated: no longer supported at the base project level
project_type: ProjectType
- Type: projen.ProjectType
- Default: ProjectType.UNKNOWN
Which type of project this is (library/app).
projen_command
Optional
projen_command: str
- Type: str
- Default: "npx projen"
The shell command to use in order to run the projen CLI.
Can be used to customize in special environments.
projen_credentials
Optional
projen_credentials: 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.
projenrc_json
Optional
projenrc_json: bool
- Type: bool
- Default: false
Generate (once) .projenrc.json (in JSON). Set to false
in order to disable .projenrc.json generation.
projenrc_json_options
Optional
projenrc_json_options: ProjenrcJsonOptions
- Type: projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
projenrc_python_options
Optional
projenrc_python_options: ProjenrcOptions
- Type: projen.python.ProjenrcOptions
- Default: default options
Options related to projenrc in python.
~~projen_token_secret
~~Optional
- Deprecated: use
projenCredentials
projen_token_secret: str
- Type: str
- 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.
pytest
Optional
pytest: bool
- Type: bool
- Default: true
Include pytest tests.
pytest_options
Optional
pytest_options: PytestOptions
- Type: projen.python.PytestOptions
- Default: defaults
pytest options.
python_exec
Optional
python_exec: str
- Type: str
- Default: "python"
Path to the python executable to use.
readme
Optional
readme: SampleReadmeProps
- Type: projen.SampleReadmeProps
- Default: { filename: 'README.md', contents: '# replace this' }
The README setup.
renovatebot
Optional
renovatebot: bool
- Type: bool
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebot_options
Optional
renovatebot_options: RenovatebotOptions
- Type: projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
sample
Optional
sample: bool
- Type: bool
- Default: true
Include sample code and test if the relevant directories don't exist.
setup_config
Optional
setup_config: typing.Mapping[typing.Any]
- Type: typing.Mapping[typing.Any]
Additional fields to pass in the setup() function if using setuptools.
setuptools
Optional
setuptools: bool
- Type: bool
- Default: true, unless poetry is true, then false
Use setuptools with a setup.py script for packaging and publishing.
stale
Optional
stale: bool
- Type: bool
- Default: false
Auto-close of stale issues and pull request.
See staleOptions
for options.
stale_options
Optional
stale_options: StaleOptions
- Type: projen.github.StaleOptions
- Default: see defaults in
StaleOptions
Auto-close stale issues and pull requests.
To disable set stale
to false
.
version
Optional
version: str
- Type: str
- Default: "0.1.0"
Version of the package.
vscode
Optional
vscode: bool
- Type: bool
- Default: true
Enable VSCode integration.
Enabled by default for root projects. Disabled for non-root projects.
RunManyOptions
Initializer
from aws.pdk.monorepo import nx
Nx.RunManyOptions(
target: str,
configuration: str = None,
exclude: str = None,
ignore_cycles: bool = None,
no_bail: bool = None,
output_style: str = None,
parallel: typing.Union[int, float] = None,
projects: typing.List[str] = None,
runner: str = None,
skip_cache: bool = None,
verbose: bool = None
)
Properties
Name | Type | Description |
---|---|---|
target |
str |
Task to run for affected projects. |
configuration |
str |
This is the configuration to use when performing tasks on projects. |
exclude |
str |
Exclude certain projects from being processed. |
ignore_cycles |
bool |
Ignore cycles in the task graph. |
no_bail |
bool |
Do not stop command execution after the first failed task. |
output_style |
str |
Defines how Nx emits outputs tasks logs. |
parallel |
typing.Union[int, float] |
Max number of parallel processes. |
projects |
typing.List[str] |
Project to run as list project names and/or patterns. |
runner |
str |
This is the name of the tasks runner configuration in nx.json. |
skip_cache |
bool |
Rerun the tasks even when the results are available in the cache. |
verbose |
bool |
Prints additional information about the commands (e.g. stack traces). |
target
Required
target: str
- Type: str
Task to run for affected projects.
configuration
Optional
configuration: str
- Type: str
This is the configuration to use when performing tasks on projects.
exclude
Optional
exclude: str
- Type: str
Exclude certain projects from being processed.
ignore_cycles
Optional
ignore_cycles: bool
- Type: bool
Ignore cycles in the task graph.
no_bail
Optional
no_bail: bool
- Type: bool
Do not stop command execution after the first failed task.
output_style
Optional
output_style: str
- Type: str
- Default: "stream"
Defines how Nx emits outputs tasks logs.
parallel
Optional
parallel: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: 3
Max number of parallel processes.
projects
Optional
projects: typing.List[str]
- Type: typing.List[str]
Project to run as list project names and/or patterns.
runner
Optional
runner: str
- Type: str
This is the name of the tasks runner configuration in nx.json.
skip_cache
Optional
skip_cache: bool
- Type: bool
Rerun the tasks even when the results are available in the cache.
verbose
Optional
verbose: bool
- Type: bool
Prints additional information about the commands (e.g. stack traces).
SyncpackConfig
Configuration for Syncpack.
Initializer
from aws.pdk.monorepo import syncpack
Syncpack.SyncpackConfig(
custom_types: typing.Mapping[typing.Union[NameAndVersionProps, NamedVersionString, UnnamedVersionString, VersionsByName]] = None,
dependency_types: typing.List[str] = None,
filter: str = None,
format_bugs: bool = None,
format_repository: bool = None,
indent: str = None,
lint_formatting: bool = None,
lint_semver_ranges: bool = None,
lint_versions: bool = None,
semver_groups: typing.List[typing.Union[Disabled, Ignored, WithRange]] = None,
sort_az: typing.List[str] = None,
sort_exports: typing.List[str] = None,
sort_first: typing.List[str] = None,
sort_packages: bool = None,
source: typing.List[str] = None,
specifier_types: typing.List[str] = None,
version_groups: typing.List[typing.Union[Banned, Ignored, Pinned, SnappedTo, SameRange, Standard]] = None
)
Properties
Name | Type | Description |
---|---|---|
custom_types |
typing.Mapping[typing.Union[aws.pdk.monorepo.Syncpack.CustomTypeConfig.NameAndVersionProps, aws.pdk.monorepo.Syncpack.CustomTypeConfig.NamedVersionString, aws.pdk.monorepo.Syncpack.CustomTypeConfig.UnnamedVersionString, aws.pdk.monorepo.Syncpack.CustomTypeConfig.VersionsByName]] |
No description. |
dependency_types |
typing.List[str] |
No description. |
filter |
str |
No description. |
format_bugs |
bool |
No description. |
format_repository |
bool |
No description. |
indent |
str |
No description. |
lint_formatting |
bool |
No description. |
lint_semver_ranges |
bool |
No description. |
lint_versions |
bool |
No description. |
semver_groups |
typing.List[typing.Union[aws.pdk.monorepo.Syncpack.SemverGroupConfig.Disabled, aws.pdk.monorepo.Syncpack.SemverGroupConfig.Ignored, aws.pdk.monorepo.Syncpack.SemverGroupConfig.WithRange]] |
No description. |
sort_az |
typing.List[str] |
No description. |
sort_exports |
typing.List[str] |
No description. |
sort_first |
typing.List[str] |
No description. |
sort_packages |
bool |
No description. |
source |
typing.List[str] |
No description. |
specifier_types |
typing.List[str] |
No description. |
version_groups |
typing.List[typing.Union[aws.pdk.monorepo.Syncpack.VersionGroupConfig.Banned, aws.pdk.monorepo.Syncpack.VersionGroupConfig.Ignored, aws.pdk.monorepo.Syncpack.VersionGroupConfig.Pinned, aws.pdk.monorepo.Syncpack.VersionGroupConfig.SnappedTo, aws.pdk.monorepo.Syncpack.VersionGroupConfig.SameRange, aws.pdk.monorepo.Syncpack.VersionGroupConfig.Standard]] |
No description. |
custom_types
Optional
custom_types: typing.Mapping[typing.Union[NameAndVersionProps, NamedVersionString, UnnamedVersionString, VersionsByName]]
- Type: typing.Mapping[typing.Union[aws.pdk.monorepo.Syncpack.CustomTypeConfig.NameAndVersionProps, aws.pdk.monorepo.Syncpack.CustomTypeConfig.NamedVersionString, aws.pdk.monorepo.Syncpack.CustomTypeConfig.UnnamedVersionString, aws.pdk.monorepo.Syncpack.CustomTypeConfig.VersionsByName]]
dependency_types
Optional
dependency_types: typing.List[str]
- Type: typing.List[str]
https://jamiemason.github.io/syncpack/config/dependency-types
filter
Optional
filter: str
- Type: str
format_bugs
Optional
format_bugs: bool
- Type: bool
format_repository
Optional
format_repository: bool
- Type: bool
https://jamiemason.github.io/syncpack/config/format-repository
indent
Optional
indent: str
- Type: str
lint_formatting
Optional
lint_formatting: bool
- Type: bool
https://jamiemason.github.io/syncpack/config/lint-formatting
lint_semver_ranges
Optional
lint_semver_ranges: bool
- Type: bool
https://jamiemason.github.io/syncpack/config/lint-semver-ranges
lint_versions
Optional
lint_versions: bool
- Type: bool
semver_groups
Optional
semver_groups: typing.List[typing.Union[Disabled, Ignored, WithRange]]
- Type: typing.List[typing.Union[aws.pdk.monorepo.Syncpack.SemverGroupConfig.Disabled, aws.pdk.monorepo.Syncpack.SemverGroupConfig.Ignored, aws.pdk.monorepo.Syncpack.SemverGroupConfig.WithRange]]
sort_az
Optional
sort_az: typing.List[str]
- Type: typing.List[str]
sort_exports
Optional
sort_exports: typing.List[str]
- Type: typing.List[str]
sort_first
Optional
sort_first: typing.List[str]
- Type: typing.List[str]
sort_packages
Optional
sort_packages: bool
- Type: bool
source
Optional
source: typing.List[str]
- Type: typing.List[str]
specifier_types
Optional
specifier_types: typing.List[str]
- Type: typing.List[str]
https://jamiemason.github.io/syncpack/config/specifier-types
version_groups
Optional
version_groups: typing.List[typing.Union[Banned, Ignored, Pinned, SnappedTo, SameRange, Standard]]
- Type: typing.List[typing.Union[aws.pdk.monorepo.Syncpack.VersionGroupConfig.Banned, aws.pdk.monorepo.Syncpack.VersionGroupConfig.Ignored, aws.pdk.monorepo.Syncpack.VersionGroupConfig.Pinned, aws.pdk.monorepo.Syncpack.VersionGroupConfig.SnappedTo, aws.pdk.monorepo.Syncpack.VersionGroupConfig.SameRange, aws.pdk.monorepo.Syncpack.VersionGroupConfig.Standard]]
TypeScriptProjectOptions
TypeScriptProjectOptions.
Initializer
import aws.pdk.monorepo
aws.pdk.monorepo.TypeScriptProjectOptions(
name: str,
allow_library_dependencies: bool = None,
artifacts_directory: str = None,
author_email: str = None,
author_name: str = None,
author_organization: bool = None,
author_url: str = None,
auto_approve_options: AutoApproveOptions = None,
auto_approve_upgrades: bool = None,
auto_detect_bin: bool = None,
auto_merge: bool = None,
auto_merge_options: AutoMergeOptions = None,
bin: typing.Mapping[str] = None,
bugs_email: str = None,
bugs_url: str = None,
build_workflow: bool = None,
build_workflow_options: BuildWorkflowOptions = None,
build_workflow_triggers: Triggers = None,
bundled_deps: typing.List[str] = None,
bundler_options: BundlerOptions = None,
check_licenses: LicenseCheckerOptions = None,
clobber: bool = None,
code_artifact_options: CodeArtifactOptions = None,
code_cov: bool = None,
code_cov_token_secret: str = None,
commit_generated: bool = None,
copyright_owner: str = None,
copyright_period: str = None,
default_release_branch: str = None,
dependabot: bool = None,
dependabot_options: DependabotOptions = None,
deps: typing.List[str] = None,
deps_upgrade: bool = None,
deps_upgrade_options: UpgradeDependenciesOptions = None,
description: str = None,
dev_container: bool = None,
dev_deps: typing.List[str] = None,
disable_tsconfig: bool = None,
disable_tsconfig_dev: bool = None,
docgen: bool = None,
docs_directory: str = None,
entrypoint: str = None,
entrypoint_types: str = None,
eslint: bool = None,
eslint_options: EslintOptions = None,
github: bool = None,
github_options: GitHubOptions = None,
gitignore: typing.List[str] = None,
git_ignore_options: IgnoreFileOptions = None,
git_options: GitOptions = None,
gitpod: bool = None,
homepage: str = None,
jest: bool = None,
jest_options: JestOptions = None,
jsii_release_version: str = None,
keywords: typing.List[str] = None,
libdir: str = None,
license: str = None,
licensed: bool = None,
logging: LoggerOptions = None,
major_version: typing.Union[int, float] = None,
max_node_version: str = None,
mergify: bool = None,
mergify_options: MergifyOptions = None,
min_major_version: typing.Union[int, float] = None,
min_node_version: str = None,
mutable_build: bool = None,
npm_access: NpmAccess = None,
npm_dist_tag: str = None,
npmignore: typing.List[str] = None,
npmignore_enabled: bool = None,
npm_ignore_options: IgnoreFileOptions = None,
npm_provenance: bool = None,
npm_registry: str = None,
npm_registry_url: str = None,
npm_token_secret: str = None,
outdir: str = None,
package: bool = None,
package_manager: NodePackageManager = None,
package_name: str = None,
parent: Project = None,
peer_dependency_options: PeerDependencyOptions = None,
peer_deps: typing.List[str] = None,
pnpm_version: str = None,
post_build_steps: typing.List[JobStep] = None,
prerelease: str = None,
prettier: bool = None,
prettier_options: PrettierOptions = None,
project_type: ProjectType = None,
projen_command: str = None,
projen_credentials: GithubCredentials = None,
projen_dev_dependency: bool = None,
projenrc_js: bool = None,
projenrc_json: bool = None,
projenrc_json_options: ProjenrcJsonOptions = None,
projenrc_js_options: ProjenrcOptions = None,
projenrc_ts: bool = None,
projenrc_ts_options: ProjenrcOptions = None,
projen_token_secret: str = None,
projen_version: str = None,
publish_dry_run: bool = None,
publish_tasks: bool = None,
pull_request_template: bool = None,
pull_request_template_contents: typing.List[str] = None,
readme: SampleReadmeProps = None,
releasable_commits: ReleasableCommits = None,
release: bool = None,
release_branches: typing.Mapping[BranchOptions] = None,
release_every_commit: bool = None,
release_failure_issue: bool = None,
release_failure_issue_label: str = None,
release_schedule: str = None,
release_tag_prefix: str = None,
release_to_npm: bool = None,
release_trigger: ReleaseTrigger = None,
release_workflow: bool = None,
release_workflow_name: str = None,
release_workflow_setup_steps: typing.List[JobStep] = None,
renovatebot: bool = None,
renovatebot_options: RenovatebotOptions = None,
repository: str = None,
repository_directory: str = None,
sample_code: bool = None,
scoped_packages_options: typing.List[ScopedPackagesOptions] = None,
scripts: typing.Mapping[str] = None,
srcdir: str = None,
stability: str = None,
stale: bool = None,
stale_options: StaleOptions = None,
testdir: str = None,
tsconfig: TypescriptConfigOptions = None,
tsconfig_dev: TypescriptConfigOptions = None,
tsconfig_dev_file: str = None,
ts_jest_options: TsJestOptions = None,
typescript_version: str = None,
versionrc_options: typing.Mapping[typing.Any] = None,
vscode: bool = None,
workflow_bootstrap_steps: typing.List[JobStep] = None,
workflow_container_image: str = None,
workflow_git_identity: GitIdentity = None,
workflow_node_version: str = None,
workflow_package_cache: bool = None,
workflow_runs_on: typing.List[str] = None,
workflow_runs_on_group: GroupRunnerOptions = None,
yarn_berry_options: YarnBerryOptions = None
)
Properties
Name | Type | Description |
---|---|---|
name |
str |
No description. |
allow_library_dependencies |
bool |
Allow the project to include peerDependencies and bundledDependencies . |
artifacts_directory |
str |
A directory which will contain build artifacts. |
author_email |
str |
Author's e-mail. |
author_name |
str |
Author's name. |
author_organization |
bool |
Is the author an organization. |
author_url |
str |
Author's URL / Website. |
auto_approve_options |
projen.github.AutoApproveOptions |
Enable and configure the 'auto approve' workflow. |
auto_approve_upgrades |
bool |
Automatically approve deps upgrade PRs, allowing them to be merged by mergify (if configued). |
auto_detect_bin |
bool |
Automatically add all executables under the bin directory to your package.json file under the bin section. |
auto_merge |
bool |
Enable automatic merging on GitHub. |
auto_merge_options |
projen.github.AutoMergeOptions |
Configure options for automatic merging on GitHub. |
bin |
typing.Mapping[str] |
Binary programs vended with your module. |
bugs_email |
str |
The email address to which issues should be reported. |
bugs_url |
str |
The url to your project's issue tracker. |
build_workflow |
bool |
Define a GitHub workflow for building PRs. |
build_workflow_options |
projen.javascript.BuildWorkflowOptions |
Options for PR build workflow. |
build_workflow_triggers |
projen.github.workflows.Triggers |
Build workflow triggers. |
bundled_deps |
typing.List[str] |
List of dependencies to bundle into this module. |
bundler_options |
projen.javascript.BundlerOptions |
Options for Bundler . |
check_licenses |
projen.javascript.LicenseCheckerOptions |
Configure which licenses should be deemed acceptable for use by dependencies. |
clobber |
bool |
Add a clobber task which resets the repo to origin. |
code_artifact_options |
projen.javascript.CodeArtifactOptions |
Options for npm packages using AWS CodeArtifact. |
code_cov |
bool |
Define a GitHub workflow step for sending code coverage metrics to https://codecov.io/ Uses codecov/codecov-action@v4 A secret is required for private repos. Configured with @codeCovTokenSecret . |
code_cov_token_secret |
str |
Define the secret name for a specified https://codecov.io/ token A secret is required to send coverage for private repositories. |
commit_generated |
bool |
Whether to commit the managed files by default. |
copyright_owner |
str |
License copyright owner. |
copyright_period |
str |
The copyright years to put in the LICENSE file. |
default_release_branch |
str |
The name of the main release branch. |
dependabot |
bool |
Use dependabot to handle dependency upgrades. |
dependabot_options |
projen.github.DependabotOptions |
Options for dependabot. |
deps |
typing.List[str] |
Runtime dependencies of this module. |
deps_upgrade |
bool |
Use tasks and github workflows to handle dependency upgrades. |
deps_upgrade_options |
projen.javascript.UpgradeDependenciesOptions |
Options for UpgradeDependencies . |
description |
str |
The description is just a string that helps people understand the purpose of the package. |
dev_container |
bool |
Add a VSCode development environment (used for GitHub Codespaces). |
dev_deps |
typing.List[str] |
Build dependencies for this module. |
disable_tsconfig |
bool |
Do not generate a tsconfig.json file (used by jsii projects since tsconfig.json is generated by the jsii compiler). |
disable_tsconfig_dev |
bool |
Do not generate a tsconfig.dev.json file. |
docgen |
bool |
Docgen by Typedoc. |
docs_directory |
str |
Docs directory. |
entrypoint |
str |
Module entrypoint (main in package.json ). Set to an empty string to not include main in your package.json. |
entrypoint_types |
str |
The .d.ts file that includes the type declarations for this module. |
eslint |
bool |
Setup eslint. |
eslint_options |
projen.javascript.EslintOptions |
Eslint options. |
github |
bool |
Enable GitHub integration. |
github_options |
projen.github.GitHubOptions |
Options for GitHub integration. |
gitignore |
typing.List[str] |
Additional entries to .gitignore. |
git_ignore_options |
projen.IgnoreFileOptions |
Configuration options for .gitignore file. |
git_options |
projen.GitOptions |
Configuration options for git. |
gitpod |
bool |
Add a Gitpod development environment. |
homepage |
str |
Package's Homepage / Website. |
jest |
bool |
Setup jest unit tests. |
jest_options |
projen.javascript.JestOptions |
Jest options. |
jsii_release_version |
str |
Version requirement of publib which is used to publish modules to npm. |
keywords |
typing.List[str] |
Keywords to include in package.json . |
libdir |
str |
Typescript artifacts output directory. |
license |
str |
License's SPDX identifier. |
licensed |
bool |
Indicates if a license should be added. |
logging |
projen.LoggerOptions |
Configure logging options such as verbosity. |
major_version |
typing.Union[int, float] |
Major version to release from the default branch. |
max_node_version |
str |
Minimum node.js version to require via engines (inclusive). |
mergify |
bool |
Whether mergify should be enabled on this repository or not. |
mergify_options |
projen.github.MergifyOptions |
Options for mergify. |
min_major_version |
typing.Union[int, float] |
Minimal Major version to release. |
min_node_version |
str |
Minimum Node.js version to require via package.json engines (inclusive). |
mutable_build |
bool |
Automatically update files modified during builds to pull-request branches. |
npm_access |
projen.javascript.NpmAccess |
Access level of the npm package. |
npm_dist_tag |
str |
The npmDistTag to use when publishing from the default branch. |
npmignore |
typing.List[str] |
Additional entries to .npmignore. |
npmignore_enabled |
bool |
Defines an .npmignore file. Normally this is only needed for libraries that are packaged as tarballs. |
npm_ignore_options |
projen.IgnoreFileOptions |
Configuration options for .npmignore file. |
npm_provenance |
bool |
Should provenance statements be generated when the package is published. |
npm_registry |
str |
The host name of the npm registry to publish to. |
npm_registry_url |
str |
The base URL of the npm package registry. |
npm_token_secret |
str |
GitHub secret which contains the NPM token to use when publishing packages. |
outdir |
str |
The root directory of the project. Relative to this directory, all files are synthesized. |
package |
bool |
Defines a package task that will produce an npm tarball under the artifacts directory (e.g. dist ). |
package_manager |
projen.javascript.NodePackageManager |
The Node Package Manager used to execute scripts. |
package_name |
str |
The "name" in package.json. |
parent |
projen.Project |
The parent project, if this project is part of a bigger project. |
peer_dependency_options |
projen.javascript.PeerDependencyOptions |
Options for peerDeps . |
peer_deps |
typing.List[str] |
Peer dependencies for this module. |
pnpm_version |
str |
The version of PNPM to use if using PNPM as a package manager. |
post_build_steps |
typing.List[projen.github.workflows.JobStep] |
Steps to execute after build as part of the release workflow. |
prerelease |
str |
Bump versions from the default branch as pre-releases (e.g. "beta", "alpha", "pre"). |
prettier |
bool |
Setup prettier. |
prettier_options |
projen.javascript.PrettierOptions |
Prettier options. |
project_type |
projen.ProjectType |
Which type of project this is (library/app). |
projen_command |
str |
The shell command to use in order to run the projen CLI. |
projen_credentials |
projen.github.GithubCredentials |
Choose a method of providing GitHub API access for projen workflows. |
projen_dev_dependency |
bool |
Indicates of "projen" should be installed as a devDependency. |
projenrc_js |
bool |
Generate (once) .projenrc.js (in JavaScript). Set to false in order to disable .projenrc.js generation. |
projenrc_json |
bool |
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation. |
projenrc_json_options |
projen.ProjenrcJsonOptions |
Options for .projenrc.json. |
projenrc_js_options |
projen.javascript.ProjenrcOptions |
Options for .projenrc.js. |
projenrc_ts |
bool |
Use TypeScript for your projenrc file (.projenrc.ts ). |
projenrc_ts_options |
projen.typescript.ProjenrcOptions |
Options for .projenrc.ts. |
projen_token_secret |
str |
The name of a secret which includes a GitHub Personal Access Token to be used by projen workflows. |
projen_version |
str |
Version of projen to install. |
publish_dry_run |
bool |
Instead of actually publishing to package managers, just print the publishing command. |
publish_tasks |
bool |
Define publishing tasks that can be executed manually as well as workflows. |
pull_request_template |
bool |
Include a GitHub pull request template. |
pull_request_template_contents |
typing.List[str] |
The contents of the pull request template. |
readme |
projen.SampleReadmeProps |
The README setup. |
releasable_commits |
projen.ReleasableCommits |
Find commits that should be considered releasable Used to decide if a release is required. |
release |
bool |
Add release management to this project. |
release_branches |
typing.Mapping[projen.release.BranchOptions] |
Defines additional release branches. |
release_every_commit |
bool |
Automatically release new versions every commit to one of branches in releaseBranches . |
release_failure_issue |
bool |
Create a github issue on every failed publishing task. |
release_failure_issue_label |
str |
The label to apply to issues indicating publish failures. |
release_schedule |
str |
CRON schedule to trigger new releases. |
release_tag_prefix |
str |
Automatically add the given prefix to release tags. |
release_to_npm |
bool |
Automatically release to npm when new versions are introduced. |
release_trigger |
projen.release.ReleaseTrigger |
The release trigger to use. |
release_workflow |
bool |
DEPRECATED: renamed to release . |
release_workflow_name |
str |
The name of the default release workflow. |
release_workflow_setup_steps |
typing.List[projen.github.workflows.JobStep] |
A set of workflow steps to execute in order to setup the workflow container. |
renovatebot |
bool |
Use renovatebot to handle dependency upgrades. |
renovatebot_options |
projen.RenovatebotOptions |
Options for renovatebot. |
repository |
str |
The repository is the location where the actual code for your package lives. |
repository_directory |
str |
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. |
sample_code |
bool |
Generate one-time sample in src/ and test/ if there are no files there. |
scoped_packages_options |
typing.List[projen.javascript.ScopedPackagesOptions] |
Options for privately hosted scoped packages. |
scripts |
typing.Mapping[str] |
npm scripts to include. |
srcdir |
str |
Typescript sources directory. |
stability |
str |
Package's Stability. |
stale |
bool |
Auto-close of stale issues and pull request. |
stale_options |
projen.github.StaleOptions |
Auto-close stale issues and pull requests. |
testdir |
str |
Jest tests directory. |
tsconfig |
projen.javascript.TypescriptConfigOptions |
Custom TSConfig. |
tsconfig_dev |
projen.javascript.TypescriptConfigOptions |
Custom tsconfig options for the development tsconfig.json file (used for testing). |
tsconfig_dev_file |
str |
The name of the development tsconfig.json file. |
ts_jest_options |
projen.typescript.TsJestOptions |
Options for ts-jest. |
typescript_version |
str |
TypeScript version to use. |
versionrc_options |
typing.Mapping[typing.Any] |
Custom configuration used when creating changelog with standard-version package. |
vscode |
bool |
Enable VSCode integration. |
workflow_bootstrap_steps |
typing.List[projen.github.workflows.JobStep] |
Workflow steps to use in order to bootstrap this repo. |
workflow_container_image |
str |
Container image to use for GitHub workflows. |
workflow_git_identity |
projen.github.GitIdentity |
The git identity to use in workflows. |
workflow_node_version |
str |
The node version to use in GitHub workflows. |
workflow_package_cache |
bool |
Enable Node.js package cache in GitHub workflows. |
workflow_runs_on |
typing.List[str] |
Github Runner selection labels. |
workflow_runs_on_group |
projen.GroupRunnerOptions |
Github Runner Group selection options. |
yarn_berry_options |
projen.javascript.YarnBerryOptions |
Options for Yarn Berry. |
name
Required
name: str
- Type: str
- Default: $BASEDIR
allow_library_dependencies
Optional
allow_library_dependencies: bool
- Type: bool
- 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.
artifacts_directory
Optional
artifacts_directory: str
- Type: str
- Default: "dist"
A directory which will contain build artifacts.
author_email
Optional
author_email: str
- Type: str
Author's e-mail.
author_name
Optional
author_name: str
- Type: str
Author's name.
author_organization
Optional
author_organization: bool
- Type: bool
Is the author an organization.
author_url
Optional
author_url: str
- Type: str
Author's URL / Website.
auto_approve_options
Optional
auto_approve_options: AutoApproveOptions
- Type: projen.github.AutoApproveOptions
- Default: auto approve is disabled
Enable and configure the 'auto approve' workflow.
auto_approve_upgrades
Optional
auto_approve_upgrades: bool
- Type: bool
- 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.
auto_detect_bin
Optional
auto_detect_bin: bool
- Type: bool
- Default: true
Automatically add all executables under the bin
directory to your package.json
file under the bin
section.
auto_merge
Optional
auto_merge: bool
- Type: bool
- Default: true
Enable automatic merging on GitHub.
Has no effect if github.mergify
is set to false.
auto_merge_options
Optional
auto_merge_options: 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.
bin
Optional
bin: typing.Mapping[str]
- Type: typing.Mapping[str]
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.
bugs_email
Optional
bugs_email: str
- Type: str
The email address to which issues should be reported.
bugs_url
Optional
bugs_url: str
- Type: str
The url to your project's issue tracker.
build_workflow
Optional
build_workflow: bool
- Type: bool
- Default: true if not a subproject
Define a GitHub workflow for building PRs.
build_workflow_options
Optional
build_workflow_options: BuildWorkflowOptions
- Type: projen.javascript.BuildWorkflowOptions
Options for PR build workflow.
~~build_workflow_triggers
~~Optional
- Deprecated: - Use
buildWorkflowOptions.workflowTriggers
build_workflow_triggers: Triggers
- Type: projen.github.workflows.Triggers
- Default: "{ pullRequest: {}, workflowDispatch: {} }"
Build workflow triggers.
bundled_deps
Optional
bundled_deps: typing.List[str]
- Type: typing.List[str]
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.
bundler_options
Optional
bundler_options: BundlerOptions
- Type: projen.javascript.BundlerOptions
Options for Bundler
.
check_licenses
Optional
check_licenses: LicenseCheckerOptions
- Type: projen.javascript.LicenseCheckerOptions
- Default: no license checks are run during the build and all licenses will be accepted
Configure which licenses should be deemed acceptable for use by dependencies.
This setting will cause the build to fail, if any prohibited or not allowed licenses ares encountered.
clobber
Optional
clobber: bool
- Type: bool
- Default: true, but false for subprojects
Add a clobber
task which resets the repo to origin.
code_artifact_options
Optional
code_artifact_options: 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
code_cov
Optional
code_cov: bool
- Type: bool
- Default: false
Define a GitHub workflow step for sending code coverage metrics to https://codecov.io/ Uses codecov/codecov-action@v4 A secret is required for private repos. Configured with @codeCovTokenSecret
.
code_cov_token_secret
Optional
code_cov_token_secret: str
- Type: str
- 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.
commit_generated
Optional
commit_generated: bool
- Type: bool
- Default: true
Whether to commit the managed files by default.
copyright_owner
Optional
copyright_owner: str
- Type: str
- Default: defaults to the value of authorName or "" if
authorName
is undefined.
License copyright owner.
copyright_period
Optional
copyright_period: str
- Type: str
- Default: current year
The copyright years to put in the LICENSE file.
default_release_branch
Optional
default_release_branch: str
- Type: str
- Default: "main"
The name of the main release branch.
dependabot
Optional
dependabot: bool
- Type: bool
- Default: false
Use dependabot to handle dependency upgrades.
Cannot be used in conjunction with depsUpgrade
.
dependabot_options
Optional
dependabot_options: DependabotOptions
- Type: projen.github.DependabotOptions
- Default: default options
Options for dependabot.
deps
Optional
deps: typing.List[str]
- Type: typing.List[str]
- 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.
deps_upgrade
Optional
deps_upgrade: bool
- Type: bool
- Default: true
Use tasks and github workflows to handle dependency upgrades.
Cannot be used in conjunction with dependabot
.
deps_upgrade_options
Optional
deps_upgrade_options: UpgradeDependenciesOptions
- Type: projen.javascript.UpgradeDependenciesOptions
- Default: default options
Options for UpgradeDependencies
.
description
Optional
description: str
- Type: str
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
dev_container
Optional
dev_container: bool
- Type: bool
- Default: false
Add a VSCode development environment (used for GitHub Codespaces).
dev_deps
Optional
dev_deps: typing.List[str]
- Type: typing.List[str]
- 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.
disable_tsconfig
Optional
disable_tsconfig: bool
- Type: bool
- Default: false
Do not generate a tsconfig.json
file (used by jsii projects since tsconfig.json is generated by the jsii compiler).
disable_tsconfig_dev
Optional
disable_tsconfig_dev: bool
- Type: bool
- Default: false
Do not generate a tsconfig.dev.json
file.
docgen
Optional
docgen: bool
- Type: bool
- Default: false
Docgen by Typedoc.
docs_directory
Optional
docs_directory: str
- Type: str
- Default: "docs"
Docs directory.
entrypoint
Optional
entrypoint: str
- Type: str
- Default: "lib/index.js"
Module entrypoint (main
in package.json
). Set to an empty string to not include main
in your package.json.
entrypoint_types
Optional
entrypoint_types: str
- Type: str
- 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
eslint: bool
- Type: bool
- Default: true
Setup eslint.
eslint_options
Optional
eslint_options: EslintOptions
- Type: projen.javascript.EslintOptions
- Default: opinionated default options
Eslint options.
github
Optional
github: bool
- Type: bool
- Default: true
Enable GitHub integration.
Enabled by default for root projects. Disabled for non-root projects.
github_options
Optional
github_options: GitHubOptions
- Type: projen.github.GitHubOptions
- Default: see GitHubOptions
Options for GitHub integration.
gitignore
Optional
gitignore: typing.List[str]
- Type: typing.List[str]
Additional entries to .gitignore.
git_ignore_options
Optional
git_ignore_options: IgnoreFileOptions
- Type: projen.IgnoreFileOptions
Configuration options for .gitignore file.
git_options
Optional
git_options: GitOptions
- Type: projen.GitOptions
Configuration options for git.
gitpod
Optional
gitpod: bool
- Type: bool
- Default: false
Add a Gitpod development environment.
homepage
Optional
homepage: str
- Type: str
Package's Homepage / Website.
jest
Optional
jest: bool
- Type: bool
- Default: true
Setup jest unit tests.
jest_options
Optional
jest_options: JestOptions
- Type: projen.javascript.JestOptions
- Default: default options
Jest options.
jsii_release_version
Optional
jsii_release_version: str
- Type: str
- Default: "latest"
Version requirement of publib
which is used to publish modules to npm.
keywords
Optional
keywords: typing.List[str]
- Type: typing.List[str]
Keywords to include in package.json
.
libdir
Optional
libdir: str
- Type: str
- Default: "lib"
Typescript artifacts output directory.
license
Optional
license: str
- Type: str
- 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
licensed: bool
- Type: bool
- Default: true
Indicates if a license should be added.
logging
Optional
logging: LoggerOptions
- Type: projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
major_version
Optional
major_version: typing.Union[int, float]
- Type: typing.Union[int, float]
- 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.
max_node_version
Optional
max_node_version: str
- Type: str
- Default: no max
Minimum node.js version to require via engines
(inclusive).
~~mergify
~~Optional
- Deprecated: use
githubOptions.mergify
instead
mergify: bool
- Type: bool
- Default: true
Whether mergify should be enabled on this repository or not.
~~mergify_options
~~Optional
- Deprecated: use
githubOptions.mergifyOptions
instead
mergify_options: MergifyOptions
- Type: projen.github.MergifyOptions
- Default: default options
Options for mergify.
min_major_version
Optional
min_major_version: typing.Union[int, float]
- Type: typing.Union[int, float]
- 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
.
min_node_version
Optional
min_node_version: str
- Type: str
- Default: no "engines" specified
Minimum Node.js version to require via package.json engines
(inclusive).
~~mutable_build
~~Optional
- Deprecated: - Use
buildWorkflowOptions.mutableBuild
mutable_build: bool
- Type: bool
- 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.
npm_access
Optional
npm_access: NpmAccess
- Type: projen.javascript.NpmAccess
- Default: for scoped packages (e.g.
foo@bar
), the default isNpmAccess.RESTRICTED
, for non-scoped packages, the default isNpmAccess.PUBLIC
.
Access level of the npm package.
npm_dist_tag
Optional
npm_dist_tag: str
- Type: str
- 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.
~~npmignore
~~Optional
- Deprecated: - use
project.addPackageIgnore
npmignore: typing.List[str]
- Type: typing.List[str]
Additional entries to .npmignore.
npmignore_enabled
Optional
npmignore_enabled: bool
- Type: bool
- Default: true
Defines an .npmignore file. Normally this is only needed for libraries that are packaged as tarballs.
npm_ignore_options
Optional
npm_ignore_options: IgnoreFileOptions
- Type: projen.IgnoreFileOptions
Configuration options for .npmignore file.
npm_provenance
Optional
npm_provenance: bool
- Type: bool
- Default: true for public packages, false otherwise
Should provenance statements be generated when the package is published.
A supported package manager is required to publish a package with npm provenance statements and you will need to use a supported CI/CD provider.
Note that the projen Release
and Publisher
components are using publib
to publish packages,
which is using npm internally and supports provenance statements independently of the package manager used.
~~npm_registry
~~Optional
- Deprecated: use
npmRegistryUrl
instead
npm_registry: str
- Type: str
The host name of the npm registry to publish to.
Cannot be set together with npmRegistryUrl
.
npm_registry_url
Optional
npm_registry_url: str
- Type: str
- Default: "https://registry.npmjs.org"
The base URL of the npm package registry.
Must be a URL (e.g. start with "https://" or "http://")
npm_token_secret
Optional
npm_token_secret: str
- Type: str
- Default: "NPM_TOKEN"
GitHub secret which contains the NPM token to use when publishing packages.
outdir
Optional
outdir: str
- Type: str
- 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 subprojects.
package
Optional
package: bool
- Type: bool
- Default: true
Defines a package
task that will produce an npm tarball under the artifacts directory (e.g. dist
).
package_manager
Optional
package_manager: NodePackageManager
- Type: projen.javascript.NodePackageManager
- Default: NodePackageManager.YARN_CLASSIC
The Node Package Manager used to execute scripts.
package_name
Optional
package_name: str
- Type: str
- Default: defaults to project name
The "name" in package.json.
parent
Optional
parent: Project
- Type: projen.Project
The parent project, if this project is part of a bigger project.
peer_dependency_options
Optional
peer_dependency_options: PeerDependencyOptions
- Type: projen.javascript.PeerDependencyOptions
Options for peerDeps
.
peer_deps
Optional
peer_deps: typing.List[str]
- Type: typing.List[str]
- 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.
pnpm_version
Optional
pnpm_version: str
- Type: str
- Default: "7"
The version of PNPM to use if using PNPM as a package manager.
post_build_steps
Optional
post_build_steps: typing.List[JobStep]
- Type: typing.List[projen.github.workflows.JobStep]
- Default: []
Steps to execute after build as part of the release workflow.
prerelease
Optional
prerelease: str
- Type: str
- Default: normal semantic versions
Bump versions from the default branch as pre-releases (e.g. "beta", "alpha", "pre").
prettier
Optional
prettier: bool
- Type: bool
- Default: false
Setup prettier.
prettier_options
Optional
prettier_options: PrettierOptions
- Type: projen.javascript.PrettierOptions
- Default: default options
Prettier options.
~~project_type
~~Optional
- Deprecated: no longer supported at the base project level
project_type: ProjectType
- Type: projen.ProjectType
- Default: ProjectType.UNKNOWN
Which type of project this is (library/app).
projen_command
Optional
projen_command: str
- Type: str
- Default: "npx projen"
The shell command to use in order to run the projen CLI.
Can be used to customize in special environments.
projen_credentials
Optional
projen_credentials: 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.
projen_dev_dependency
Optional
projen_dev_dependency: bool
- Type: bool
- Default: true if not a subproject
Indicates of "projen" should be installed as a devDependency.
projenrc_js
Optional
projenrc_js: bool
- Type: bool
- Default: true if projenrcJson is false
Generate (once) .projenrc.js (in JavaScript). Set to false
in order to disable .projenrc.js generation.
projenrc_json
Optional
projenrc_json: bool
- Type: bool
- Default: false
Generate (once) .projenrc.json (in JSON). Set to false
in order to disable .projenrc.json generation.
projenrc_json_options
Optional
projenrc_json_options: ProjenrcJsonOptions
- Type: projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
projenrc_js_options
Optional
projenrc_js_options: ProjenrcOptions
- Type: projen.javascript.ProjenrcOptions
- Default: default options
Options for .projenrc.js.
projenrc_ts
Optional
projenrc_ts: bool
- Type: bool
- Default: false
Use TypeScript for your projenrc file (.projenrc.ts
).
projenrc_ts_options
Optional
projenrc_ts_options: ProjenrcOptions
- Type: projen.typescript.ProjenrcOptions
Options for .projenrc.ts.
~~projen_token_secret
~~Optional
- Deprecated: use
projenCredentials
projen_token_secret: str
- Type: str
- 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.
projen_version
Optional
projen_version: str
- Type: str
- Default: Defaults to the latest version.
Version of projen to install.
publish_dry_run
Optional
publish_dry_run: bool
- Type: bool
- Default: false
Instead of actually publishing to package managers, just print the publishing command.
publish_tasks
Optional
publish_tasks: bool
- Type: bool
- 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.
pull_request_template
Optional
pull_request_template: bool
- Type: bool
- Default: true
Include a GitHub pull request template.
pull_request_template_contents
Optional
pull_request_template_contents: typing.List[str]
- Type: typing.List[str]
- Default: default content
The contents of the pull request template.
readme
Optional
readme: SampleReadmeProps
- Type: projen.SampleReadmeProps
- Default: { filename: 'README.md', contents: '# replace this' }
The README setup.
releasable_commits
Optional
releasable_commits: ReleasableCommits
- Type: projen.ReleasableCommits
- Default: ReleasableCommits.everyCommit()
Find commits that should be considered releasable Used to decide if a release is required.
release
Optional
release: bool
- Type: bool
- Default: true (false for subprojects)
Add release management to this project.
release_branches
Optional
release_branches: typing.Mapping[BranchOptions]
- Type: typing.Mapping[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.
~~release_every_commit
~~Optional
- Deprecated: Use
releaseTrigger: ReleaseTrigger.continuous()
instead
release_every_commit: bool
- Type: bool
- Default: true
Automatically release new versions every commit to one of branches in releaseBranches
.
release_failure_issue
Optional
release_failure_issue: bool
- Type: bool
- Default: false
Create a github issue on every failed publishing task.
release_failure_issue_label
Optional
release_failure_issue_label: str
- Type: str
- Default: "failed-release"
The label to apply to issues indicating publish failures.
Only applies if releaseFailureIssue
is true.
~~release_schedule
~~Optional
- Deprecated: Use
releaseTrigger: ReleaseTrigger.scheduled()
instead
release_schedule: str
- Type: str
- Default: no scheduled releases
CRON schedule to trigger new releases.
release_tag_prefix
Optional
release_tag_prefix: str
- Type: str
- 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.
release_to_npm
Optional
release_to_npm: bool
- Type: bool
- Default: false
Automatically release to npm when new versions are introduced.
release_trigger
Optional
release_trigger: ReleaseTrigger
- Type: projen.release.ReleaseTrigger
- Default: Continuous releases (
ReleaseTrigger.continuous()
)
The release trigger to use.
~~release_workflow
~~Optional
- Deprecated: see
release
.
release_workflow: bool
- Type: bool
- Default: true if not a subproject
DEPRECATED: renamed to release
.
release_workflow_name
Optional
release_workflow_name: str
- Type: str
- Default: "release"
The name of the default release workflow.
release_workflow_setup_steps
Optional
release_workflow_setup_steps: typing.List[JobStep]
- Type: typing.List[projen.github.workflows.JobStep]
A set of workflow steps to execute in order to setup the workflow container.
renovatebot
Optional
renovatebot: bool
- Type: bool
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebot_options
Optional
renovatebot_options: RenovatebotOptions
- Type: projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
repository
Optional
repository: str
- Type: str
The repository is the location where the actual code for your package lives.
See https://classic.yarnpkg.com/en/docs/package-json/#toc-repository
repository_directory
Optional
repository_directory: str
- Type: str
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.
sample_code
Optional
sample_code: bool
- Type: bool
- Default: true
Generate one-time sample in src/
and test/
if there are no files there.
scoped_packages_options
Optional
scoped_packages_options: typing.List[ScopedPackagesOptions]
- Type: typing.List[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()
orpackage.setScript()
scripts: typing.Mapping[str]
- Type: typing.Mapping[str]
- 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.
srcdir
Optional
srcdir: str
- Type: str
- Default: "src"
Typescript sources directory.
stability
Optional
stability: str
- Type: str
Package's Stability.
stale
Optional
stale: bool
- Type: bool
- Default: false
Auto-close of stale issues and pull request.
See staleOptions
for options.
stale_options
Optional
stale_options: StaleOptions
- Type: projen.github.StaleOptions
- Default: see defaults in
StaleOptions
Auto-close stale issues and pull requests.
To disable set stale
to false
.
testdir
Optional
testdir: str
- Type: str
- 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
tsconfig: TypescriptConfigOptions
- Type: projen.javascript.TypescriptConfigOptions
- Default: default options
Custom TSConfig.
tsconfig_dev
Optional
tsconfig_dev: TypescriptConfigOptions
- Type: projen.javascript.TypescriptConfigOptions
- Default: use the production tsconfig options
Custom tsconfig options for the development tsconfig.json file (used for testing).
tsconfig_dev_file
Optional
tsconfig_dev_file: str
- Type: str
- Default: "tsconfig.dev.json"
The name of the development tsconfig.json file.
ts_jest_options
Optional
ts_jest_options: TsJestOptions
- Type: projen.typescript.TsJestOptions
Options for ts-jest.
typescript_version
Optional
typescript_version: str
- Type: str
- 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
).
versionrc_options
Optional
versionrc_options: typing.Mapping[typing.Any]
- Type: typing.Mapping[typing.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.
vscode
Optional
vscode: bool
- Type: bool
- Default: true
Enable VSCode integration.
Enabled by default for root projects. Disabled for non-root projects.
workflow_bootstrap_steps
Optional
workflow_bootstrap_steps: typing.List[JobStep]
- Type: typing.List[projen.github.workflows.JobStep]
- Default: "yarn install --frozen-lockfile && yarn projen"
Workflow steps to use in order to bootstrap this repo.
workflow_container_image
Optional
workflow_container_image: str
- Type: str
- Default: default image
Container image to use for GitHub workflows.
workflow_git_identity
Optional
workflow_git_identity: GitIdentity
- Type: projen.github.GitIdentity
- Default: GitHub Actions
The git identity to use in workflows.
workflow_node_version
Optional
workflow_node_version: str
- Type: str
- Default: same as
minNodeVersion
The node version to use in GitHub workflows.
workflow_package_cache
Optional
workflow_package_cache: bool
- Type: bool
- Default: false
Enable Node.js package cache in GitHub workflows.
workflow_runs_on
Optional
workflow_runs_on: typing.List[str]
- Type: typing.List[str]
- Default: ["ubuntu-latest"]
Github Runner selection labels.
workflow_runs_on_group
Optional
workflow_runs_on_group: GroupRunnerOptions
- Type: projen.GroupRunnerOptions
Github Runner Group selection options.
yarn_berry_options
Optional
yarn_berry_options: YarnBerryOptions
- Type: projen.javascript.YarnBerryOptions
- Default: Yarn Berry v4 with all default options
Options for Yarn Berry.
WorkspaceConfig
Workspace configurations.
Initializer
import aws.pdk.monorepo
aws.pdk.monorepo.WorkspaceConfig(
additional_packages: typing.List[str] = None,
link_local_workspace_bins: bool = None,
yarn: YarnWorkspaceConfig = None
)
Properties
Name | Type | Description |
---|---|---|
additional_packages |
typing.List[str] |
List of additional package globs to include in the workspace. |
link_local_workspace_bins |
bool |
Links all local workspace project bins so they can be used for local development. |
yarn |
YarnWorkspaceConfig |
Yarn workspace config. |
additional_packages
Optional
additional_packages: typing.List[str]
- Type: typing.List[str]
List of additional package globs to include in the workspace.
All packages which are parented by the monorepo are automatically added to the workspace, but you can use this property to specify any additional paths to packages which may not be managed by projen.
link_local_workspace_bins
Optional
link_local_workspace_bins: bool
- Type: bool
Links all local workspace project bins so they can be used for local development.
Package bins are only linked when installed from the registry, however it is very useful for monorepo development to also utilize these bin scripts. When enabled, this flag will recursively link all bins from packages.json files to the root node_modules/.bin.
yarn
Optional
yarn: YarnWorkspaceConfig
- Type: YarnWorkspaceConfig
Yarn workspace config.
WorkspaceConfig
NX workspace configurations.
Initializer
from aws.pdk.monorepo import nx
Nx.WorkspaceConfig(
cacheable_operations: typing.List[str] = None,
default_build_outputs: typing.List[str] = None,
non_native_hasher: bool = None,
nx_cloud_read_only_access_token: str = None,
nx_ignore: typing.List[str] = None
)
Properties
Name | Type | Description |
---|---|---|
cacheable_operations |
typing.List[str] |
Defines the list of targets/operations that are cached by Nx. |
default_build_outputs |
typing.List[str] |
No description. |
non_native_hasher |
bool |
Use non-native hasher for nx tasks. |
nx_cloud_read_only_access_token |
str |
Read only access token if enabling nx cloud. |
nx_ignore |
typing.List[str] |
List of patterns to include in the .nxignore file. |
cacheable_operations
Optional
cacheable_operations: typing.List[str]
- Type: typing.List[str]
- Default: ["build", "test"]
Defines the list of targets/operations that are cached by Nx.
default_build_outputs
Optional
default_build_outputs: typing.List[str]
- Type: typing.List[str]
non_native_hasher
Optional
non_native_hasher: bool
- Type: bool
Use non-native hasher for nx tasks.
Sets NX_NON_NATIVE_HASHER=true
environment variable on nx based tasks.
nx_cloud_read_only_access_token
Optional
nx_cloud_read_only_access_token: str
- Type: str
Read only access token if enabling nx cloud.
nx_ignore
Optional
nx_ignore: typing.List[str]
- Type: typing.List[str]
List of patterns to include in the .nxignore file.
YarnWorkspaceConfig
Yarn related workspace config.
Initializer
import aws.pdk.monorepo
aws.pdk.monorepo.YarnWorkspaceConfig(
disable_no_hoist_bundled: bool = None,
no_hoist: typing.List[str] = None
)
Properties
Name | Type | Description |
---|---|---|
disable_no_hoist_bundled |
bool |
Disable automatically applying noHoist logic for all sub-project "bundledDependencies". |
no_hoist |
typing.List[str] |
List of package globs to exclude from hoisting in the workspace. |
disable_no_hoist_bundled
Optional
disable_no_hoist_bundled: bool
- Type: bool
- Default: false
Disable automatically applying noHoist
logic for all sub-project "bundledDependencies".
no_hoist
Optional
no_hoist: typing.List[str]
- Type: typing.List[str]
List of package globs to exclude from hoisting in the workspace.
Protocols
IInput
- Implemented By: aws.pdk.monorepo.Nx.IInput
Properties
Name | Type | Description |
---|---|---|
env |
str |
No description. |
fileset |
str |
No description. |
runtime |
str |
No description. |
env
Optional
env: str
- Type: str
fileset
Optional
fileset: str
- Type: str
runtime
Optional
runtime: str
- Type: str
INxAffectedConfig
- Implemented By: aws.pdk.monorepo.Nx.INxAffectedConfig
Default options for nx affected
.
Properties
Name | Type | Description |
---|---|---|
default_base |
str |
Default based branch used by affected commands. |
default_base
Optional
default_base: str
- Type: str
Default based branch used by affected commands.
INxProjectCore
- Implemented By: MonorepoJavaProject, MonorepoPythonProject, MonorepoTsProject, NxConfigurator, INxProjectCore
Interface that all NXProject implementations should implement.
Methods
Name | Description |
---|---|
add_implicit_dependency |
Create an implicit dependency between two Projects. |
add_java_dependency |
Adds a dependency between two Java Projects in the monorepo. |
add_nx_run_many_task |
Add project task that executes npx nx run-many ... style command. |
add_python_poetry_dependency |
Adds a dependency between two Python Projects in the monorepo. |
compose_nx_run_many_command |
Helper to format npx nx run-many ... style command. |
exec_nx_run_many_command |
Helper to format npx nx run-many ... style command execution in package manager. |
add_implicit_dependency
def add_implicit_dependency(
dependent: Project,
dependee: typing.Union[str, Project]
) -> None
Create an implicit dependency between two Projects.
This is typically used in polygot repos where a Typescript project wants a build dependency on a Python project as an example.
dependent
Required
- Type: projen.Project
project you want to have the dependency.
dependee
Required
- Type: typing.Union[str, projen.Project]
project you wish to depend on.
add_java_dependency
def add_java_dependency(
dependent: JavaProject,
dependee: JavaProject
) -> None
Adds a dependency between two Java Projects in the monorepo.
dependent
Required
- Type: projen.java.JavaProject
project you want to have the dependency.
dependee
Required
- Type: projen.java.JavaProject
project you wish to depend on.
add_nx_run_many_task
def add_nx_run_many_task(
name: str,
target: str,
configuration: str = None,
exclude: str = None,
ignore_cycles: bool = None,
no_bail: bool = None,
output_style: str = None,
parallel: typing.Union[int, float] = None,
projects: typing.List[str] = None,
runner: str = None,
skip_cache: bool = None,
verbose: bool = None
) -> Task
Add project task that executes npx nx run-many ...
style command.
name
Required
- Type: str
task name.
target
Required
- Type: str
Task to run for affected projects.
configuration
Optional
- Type: str
This is the configuration to use when performing tasks on projects.
exclude
Optional
- Type: str
Exclude certain projects from being processed.
ignore_cycles
Optional
- Type: bool
Ignore cycles in the task graph.
no_bail
Optional
- Type: bool
Do not stop command execution after the first failed task.
output_style
Optional
- Type: str
- Default: "stream"
Defines how Nx emits outputs tasks logs.
parallel
Optional
- Type: typing.Union[int, float]
- Default: 3
Max number of parallel processes.
projects
Optional
- Type: typing.List[str]
Project to run as list project names and/or patterns.
runner
Optional
- Type: str
This is the name of the tasks runner configuration in nx.json.
skip_cache
Optional
- Type: bool
Rerun the tasks even when the results are available in the cache.
verbose
Optional
- Type: bool
Prints additional information about the commands (e.g. stack traces).
add_python_poetry_dependency
def add_python_poetry_dependency(
dependent: PythonProject,
dependee: PythonProject
) -> None
Adds a dependency between two Python Projects in the monorepo.
The dependent must have Poetry enabled.
dependent
Required
- Type: projen.python.PythonProject
project you want to have the dependency (must be a Poetry Python Project).
dependee
Required
- Type: projen.python.PythonProject
project you wish to depend on.
compose_nx_run_many_command
def compose_nx_run_many_command(
target: str,
configuration: str = None,
exclude: str = None,
ignore_cycles: bool = None,
no_bail: bool = None,
output_style: str = None,
parallel: typing.Union[int, float] = None,
projects: typing.List[str] = None,
runner: str = None,
skip_cache: bool = None,
verbose: bool = None
) -> typing.List[str]
Helper to format npx nx run-many ...
style command.
target
Required
- Type: str
Task to run for affected projects.
configuration
Optional
- Type: str
This is the configuration to use when performing tasks on projects.
exclude
Optional
- Type: str
Exclude certain projects from being processed.
ignore_cycles
Optional
- Type: bool
Ignore cycles in the task graph.
no_bail
Optional
- Type: bool
Do not stop command execution after the first failed task.
output_style
Optional
- Type: str
- Default: "stream"
Defines how Nx emits outputs tasks logs.
parallel
Optional
- Type: typing.Union[int, float]
- Default: 3
Max number of parallel processes.
projects
Optional
- Type: typing.List[str]
Project to run as list project names and/or patterns.
runner
Optional
- Type: str
This is the name of the tasks runner configuration in nx.json.
skip_cache
Optional
- Type: bool
Rerun the tasks even when the results are available in the cache.
verbose
Optional
- Type: bool
Prints additional information about the commands (e.g. stack traces).
exec_nx_run_many_command
def exec_nx_run_many_command(
target: str,
configuration: str = None,
exclude: str = None,
ignore_cycles: bool = None,
no_bail: bool = None,
output_style: str = None,
parallel: typing.Union[int, float] = None,
projects: typing.List[str] = None,
runner: str = None,
skip_cache: bool = None,
verbose: bool = None
) -> str
Helper to format npx nx run-many ...
style command execution in package manager.
target
Required
- Type: str
Task to run for affected projects.
configuration
Optional
- Type: str
This is the configuration to use when performing tasks on projects.
exclude
Optional
- Type: str
Exclude certain projects from being processed.
ignore_cycles
Optional
- Type: bool
Ignore cycles in the task graph.
no_bail
Optional
- Type: bool
Do not stop command execution after the first failed task.
output_style
Optional
- Type: str
- Default: "stream"
Defines how Nx emits outputs tasks logs.
parallel
Optional
- Type: typing.Union[int, float]
- Default: 3
Max number of parallel processes.
projects
Optional
- Type: typing.List[str]
Project to run as list project names and/or patterns.
runner
Optional
- Type: str
This is the name of the tasks runner configuration in nx.json.
skip_cache
Optional
- Type: bool
Rerun the tasks even when the results are available in the cache.
verbose
Optional
- Type: bool
Prints additional information about the commands (e.g. stack traces).
Properties
Name | Type | Description |
---|---|---|
nx |
NxWorkspace |
Return the NxWorkspace instance. |
nx
Required
nx: NxWorkspace
- Type: NxWorkspace
Return the NxWorkspace instance.
This should be implemented using a getter.
IProjectTarget
- Implemented By: aws.pdk.monorepo.Nx.IProjectTarget
Project Target.
Properties
Name | Type | Description |
---|---|---|
depends_on |
typing.List[typing.Union[str, aws.pdk.monorepo.Nx.ITargetDependency]] |
List of Target Dependencies. |
executor |
str |
The function that Nx will invoke when you run this target. |
inputs |
typing.List[typing.Union[str, aws.pdk.monorepo.Nx.IInput]] |
List of inputs to hash for cache key, relative to the root of the monorepo. |
options |
typing.Any |
Contains whatever configuration properties the executor needs to run. |
outputs |
typing.List[str] |
List of outputs to cache, relative to the root of the monorepo. |
depends_on
Optional
depends_on: typing.List[typing.Union[str, ITargetDependency]]
- Type: typing.List[typing.Union[str, aws.pdk.monorepo.Nx.ITargetDependency]]
List of Target Dependencies.
executor
Optional
executor: str
- Type: str
The function that Nx will invoke when you run this target.
inputs
Optional
inputs: typing.List[typing.Union[str, IInput]]
- Type: typing.List[typing.Union[str, aws.pdk.monorepo.Nx.IInput]]
List of inputs to hash for cache key, relative to the root of the monorepo.
note: must start with leading /
options
Optional
options: typing.Any
- Type: typing.Any
Contains whatever configuration properties the executor needs to run.
outputs
Optional
outputs: typing.List[str]
- Type: typing.List[str]
List of outputs to cache, relative to the root of the monorepo.
note: must start with leading /
ITargetDependency
- Implemented By: aws.pdk.monorepo.Nx.ITargetDependency
Represents an NX Target Dependency.
Properties
Name | Type | Description |
---|---|---|
projects |
aws.pdk.monorepo.Nx.TargetDependencyProject |
Target dependencies. |
target |
str |
Projen target i.e: build, test, etc. |
projects
Required
projects: TargetDependencyProject
- Type: aws.pdk.monorepo.Nx.TargetDependencyProject
Target dependencies.
target
Required
target: str
- Type: str
Projen target i.e: build, test, etc.
IWorkspaceLayout
- Implemented By: aws.pdk.monorepo.Nx.IWorkspaceLayout
Where new apps + libs should be placed.
Properties
Name | Type | Description |
---|---|---|
apps_dir |
str |
No description. |
libs_dir |
str |
No description. |
apps_dir
Required
apps_dir: str
- Type: str
libs_dir
Required
libs_dir: str
- Type: str
Enums
TargetDependencyProject
Supported enums for a TargetDependency.
Members
Name | Description |
---|---|
SELF |
Only rely on the package where the target is called. |
DEPENDENCIES |
Target relies on executing the target against all dependencies first. |
SELF
Only rely on the package where the target is called.
This is usually done for test like targets where you only want to run unit tests on the target packages without testing all dependent packages.
DEPENDENCIES
Target relies on executing the target against all dependencies first.
This is usually done for build like targets where you want to build all dependant projects first.