API Reference
Constructs
OpenApiAsyncDefinition
The OpenAPI Spec.
Initializers
import software.aws.pdk.type_safe_api.OpenApiAsyncDefinition;
OpenApiAsyncDefinition.Builder.create(Project project)
.openApiOptions(OpenApiModelOptions)
// .handlerLanguages(java.util.List<Language>)
.build();
| Name | Type | Description |
|---|---|---|
project |
io.github.cdklabs.projen.Project |
No description. |
openApiOptions |
OpenApiModelOptions |
Options for the openapi model. |
handlerLanguages |
java.util.List<Language> |
The languages users have specified for handler projects (if any). |
projectRequired
- Type: io.github.cdklabs.projen.Project
openApiOptionsRequired
- Type: OpenApiModelOptions
Options for the openapi model.
handlerLanguagesOptional
- Type: java.util.List<Language>
The languages users have specified for handler projects (if any).
Methods
| Name | Description |
|---|---|
toString |
Returns a string representation of this construct. |
postSynthesize |
Called after synthesis. |
preSynthesize |
Called before synthesis. |
synthesize |
Synthesizes files to the project output directory. |
toString
public java.lang.String toString()
Returns a string representation of this construct.
postSynthesize
public void postSynthesize()
Called after synthesis.
Order is not guaranteed.
preSynthesize
public void preSynthesize()
Called before synthesis.
synthesize
public void synthesize()
Synthesizes files to the project output directory.
Static Functions
| Name | Description |
|---|---|
isConstruct |
Checks if x is a construct. |
isComponent |
Test whether the given construct is a component. |
isConstruct
import software.aws.pdk.type_safe_api.OpenApiAsyncDefinition;
OpenApiAsyncDefinition.isConstruct(java.lang.Object x)
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.
xRequired
- Type: java.lang.Object
Any object.
isComponent
import software.aws.pdk.type_safe_api.OpenApiAsyncDefinition;
OpenApiAsyncDefinition.isComponent(java.lang.Object x)
Test whether the given construct is a component.
xRequired
- Type: java.lang.Object
Properties
| Name | Type | Description |
|---|---|---|
node |
software.constructs.Node |
The tree node. |
project |
io.github.cdklabs.projen.Project |
No description. |
openApiSpecificationPath |
java.lang.String |
Path to the root OpenAPI specification file. |
nodeRequired
public Node getNode();
- Type: software.constructs.Node
The tree node.
projectRequired
public Project getProject();
- Type: io.github.cdklabs.projen.Project
openApiSpecificationPathRequired
public java.lang.String getOpenApiSpecificationPath();
- Type: java.lang.String
Path to the root OpenAPI specification file.
OpenApiAsyncModelProject
Project for defining an OpenAPI model for a WebSocket API.
Initializers
import software.aws.pdk.type_safe_api.OpenApiAsyncModelProject;
OpenApiAsyncModelProject.Builder.create()
.name(java.lang.String)
// .commitGenerated(java.lang.Boolean)
// .gitIgnoreOptions(IgnoreFileOptions)
// .gitOptions(GitOptions)
// .logging(LoggerOptions)
// .outdir(java.lang.String)
// .parent(Project)
// .projenCommand(java.lang.String)
// .projenrcJson(java.lang.Boolean)
// .projenrcJsonOptions(ProjenrcJsonOptions)
// .renovatebot(java.lang.Boolean)
// .renovatebotOptions(RenovatebotOptions)
.openApiOptions(OpenApiModelOptions)
// .handlerLanguages(java.util.List<Language>)
.parsedSpecFile(java.lang.String)
.asyncApiSpecFile(java.lang.String)
.build();
| Name | Type | Description |
|---|---|---|
name |
java.lang.String |
This is the name of your project. |
commitGenerated |
java.lang.Boolean |
Whether to commit the managed files by default. |
gitIgnoreOptions |
io.github.cdklabs.projen.IgnoreFileOptions |
Configuration options for .gitignore file. |
gitOptions |
io.github.cdklabs.projen.GitOptions |
Configuration options for git. |
logging |
io.github.cdklabs.projen.LoggerOptions |
Configure logging options such as verbosity. |
outdir |
java.lang.String |
The root directory of the project. |
parent |
io.github.cdklabs.projen.Project |
The parent project, if this project is part of a bigger project. |
projenCommand |
java.lang.String |
The shell command to use in order to run the projen CLI. |
projenrcJson |
java.lang.Boolean |
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation. |
projenrcJsonOptions |
io.github.cdklabs.projen.ProjenrcJsonOptions |
Options for .projenrc.json. |
renovatebot |
java.lang.Boolean |
Use renovatebot to handle dependency upgrades. |
renovatebotOptions |
io.github.cdklabs.projen.RenovatebotOptions |
Options for renovatebot. |
openApiOptions |
OpenApiModelOptions |
Options for the openapi model. |
handlerLanguages |
java.util.List<Language> |
The languages users have specified for handler projects (if any). |
parsedSpecFile |
java.lang.String |
Path of the parsed/bundled OpenAPI specification (relative to the project root). |
asyncApiSpecFile |
java.lang.String |
Path to the generated AsyncAPI specification (relative to the project root). |
nameRequired
- Type: java.lang.String
- Default: $BASEDIR
This is the name of your project.
commitGeneratedOptional
- Type: java.lang.Boolean
- Default: true
Whether to commit the managed files by default.
gitIgnoreOptionsOptional
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptionsOptional
- Type: io.github.cdklabs.projen.GitOptions
Configuration options for git.
loggingOptional
- Type: io.github.cdklabs.projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
outdirOptional
- Type: java.lang.String
- Default: "."
The root directory of the project.
Relative to this directory, all files are synthesized.
If this project has a parent, this directory is relative to the parent directory and it cannot be the same as the parent or any of it's other subprojects.
parentOptional
- Type: io.github.cdklabs.projen.Project
The parent project, if this project is part of a bigger project.
projenCommandOptional
- Type: java.lang.String
- Default: "npx projen"
The shell command to use in order to run the projen CLI.
Can be used to customize in special environments.
projenrcJsonOptional
- Type: java.lang.Boolean
- Default: false
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation.
projenrcJsonOptionsOptional
- Type: io.github.cdklabs.projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
renovatebotOptional
- Type: java.lang.Boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptionsOptional
- Type: io.github.cdklabs.projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
openApiOptionsRequired
- Type: OpenApiModelOptions
Options for the openapi model.
handlerLanguagesOptional
- Type: java.util.List<Language>
The languages users have specified for handler projects (if any).
parsedSpecFileRequired
- Type: java.lang.String
Path of the parsed/bundled OpenAPI specification (relative to the project root).
asyncApiSpecFileRequired
- Type: java.lang.String
Path to the generated AsyncAPI specification (relative to the project root).
Methods
| Name | Description |
|---|---|
toString |
Returns a string representation of this construct. |
addExcludeFromCleanup |
Exclude the matching files from pre-synth cleanup. |
addGitIgnore |
Adds a .gitignore pattern. |
addPackageIgnore |
Exclude these files from the bundled package. |
addTask |
Adds a new task to this project. |
addTip |
Prints a "tip" message during synthesis. |
annotateGenerated |
Consider a set of files as "generated". |
postSynthesize |
Called after all components are synthesized. |
preSynthesize |
Called before all components are synthesized. |
removeTask |
Removes a task from a project. |
runTaskCommand |
Returns the shell command to execute in order to run a task. |
synth |
Synthesize all project files into outdir. |
tryFindFile |
Finds a file at the specified relative path within this project and all its subprojects. |
tryFindJsonFile |
Finds a json file by name. |
tryFindObjectFile |
Finds an object file (like JsonFile, YamlFile, etc.) by name. |
tryRemoveFile |
Finds a file at the specified relative path within this project and removes it. |
toString
public java.lang.String toString()
Returns a string representation of this construct.
addExcludeFromCleanup
public void addExcludeFromCleanup(java.lang.String globs)
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.
globsRequired
- Type: java.lang.String
The glob patterns to match.
addGitIgnore
public void addGitIgnore(java.lang.String pattern)
Adds a .gitignore pattern.
patternRequired
- Type: java.lang.String
The glob pattern to ignore.
addPackageIgnore
public void addPackageIgnore(java.lang.String _pattern)
Exclude these files from the bundled package.
Implemented by project types based on the
packaging mechanism. For example, NodeProject delegates this to .npmignore.
_patternRequired
- Type: java.lang.String
The glob pattern to exclude.
addTask
public Task addTask(java.lang.String name)
public Task addTask(java.lang.String name, TaskOptions props)
Adds a new task to this project.
This will fail if the project already has a task with this name.
nameRequired
- Type: java.lang.String
The task name to add.
propsOptional
- Type: io.github.cdklabs.projen.TaskOptions
Task properties.
~~addTip~~
public void addTip(java.lang.String message)
Prints a "tip" message during synthesis.
messageRequired
- Type: java.lang.String
The message.
annotateGenerated
public void annotateGenerated(java.lang.String _glob)
Consider a set of files as "generated".
This method is implemented by derived classes and used for example, to add git attributes to tell GitHub that certain files are generated.
_globRequired
- Type: java.lang.String
the glob pattern to match (could be a file path).
postSynthesize
public void postSynthesize()
Called after all components are synthesized.
Order is not guaranteed.
preSynthesize
public void preSynthesize()
Called before all components are synthesized.
removeTask
public Task removeTask(java.lang.String name)
Removes a task from a project.
nameRequired
- Type: java.lang.String
The name of the task to remove.
runTaskCommand
public java.lang.String runTaskCommand(Task task)
Returns the shell command to execute in order to run a task.
By default, this is npx projen@<version> <task>
taskRequired
- Type: io.github.cdklabs.projen.Task
The task for which the command is required.
synth
public void synth()
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()"
tryFindFile
public FileBase tryFindFile(java.lang.String filePath)
Finds a file at the specified relative path within this project and all its subprojects.
filePathRequired
- Type: java.lang.String
The file path.
If this path is relative, it will be resolved from the root of this project.
~~tryFindJsonFile~~
public JsonFile tryFindJsonFile(java.lang.String filePath)
Finds a json file by name.
filePathRequired
- Type: java.lang.String
The file path.
tryFindObjectFile
public ObjectFile tryFindObjectFile(java.lang.String filePath)
Finds an object file (like JsonFile, YamlFile, etc.) by name.
filePathRequired
- Type: java.lang.String
The file path.
tryRemoveFile
public FileBase tryRemoveFile(java.lang.String filePath)
Finds a file at the specified relative path within this project and removes it.
filePathRequired
- Type: java.lang.String
The file path.
If this path is relative, it will be resolved from the root of this project.
Static Functions
| Name | Description |
|---|---|
isConstruct |
Checks if x is a construct. |
isProject |
Test whether the given construct is a project. |
of |
Find the closest ancestor project for given construct. |
isConstruct
import software.aws.pdk.type_safe_api.OpenApiAsyncModelProject;
OpenApiAsyncModelProject.isConstruct(java.lang.Object x)
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.
xRequired
- Type: java.lang.Object
Any object.
isProject
import software.aws.pdk.type_safe_api.OpenApiAsyncModelProject;
OpenApiAsyncModelProject.isProject(java.lang.Object x)
Test whether the given construct is a project.
xRequired
- Type: java.lang.Object
of
import software.aws.pdk.type_safe_api.OpenApiAsyncModelProject;
OpenApiAsyncModelProject.of(IConstruct construct)
Find the closest ancestor project for given construct.
When given a project, this it the project itself.
constructRequired
- Type: software.constructs.IConstruct
Properties
| Name | Type | Description |
|---|---|---|
node |
software.constructs.Node |
The tree node. |
buildTask |
io.github.cdklabs.projen.Task |
No description. |
commitGenerated |
java.lang.Boolean |
Whether to commit the managed files by default. |
compileTask |
io.github.cdklabs.projen.Task |
No description. |
components |
java.util.List |
Returns all the components within this project. |
deps |
io.github.cdklabs.projen.Dependencies |
Project dependencies. |
ejected |
java.lang.Boolean |
Whether or not the project is being ejected. |
files |
java.util.List |
All files in this project. |
gitattributes |
io.github.cdklabs.projen.GitAttributesFile |
The .gitattributes file for this repository. |
gitignore |
io.github.cdklabs.projen.IgnoreFile |
.gitignore. |
logger |
io.github.cdklabs.projen.Logger |
Logging utilities. |
name |
java.lang.String |
Project name. |
outdir |
java.lang.String |
Absolute output directory of this project. |
packageTask |
io.github.cdklabs.projen.Task |
No description. |
postCompileTask |
io.github.cdklabs.projen.Task |
No description. |
preCompileTask |
io.github.cdklabs.projen.Task |
No description. |
projectBuild |
io.github.cdklabs.projen.ProjectBuild |
Manages the build process of the project. |
projenCommand |
java.lang.String |
The command to use in order to run the projen CLI. |
root |
io.github.cdklabs.projen.Project |
The root project. |
subprojects |
java.util.List |
Returns all the subprojects within this project. |
tasks |
io.github.cdklabs.projen.Tasks |
Project tasks. |
testTask |
io.github.cdklabs.projen.Task |
No description. |
defaultTask |
io.github.cdklabs.projen.Task |
This is the "default" task, the one that executes "projen". |
initProject |
io.github.cdklabs.projen.InitProject |
The options used when this project is bootstrapped via projen new. |
parent |
io.github.cdklabs.projen.Project |
A parent project. |
apiName |
java.lang.String |
Name of the API. |
definition |
OpenApiAsyncDefinition |
OpenAPI specification component. |
nodeRequired
public Node getNode();
- Type: software.constructs.Node
The tree node.
buildTaskRequired
public Task getBuildTask();
- Type: io.github.cdklabs.projen.Task
commitGeneratedRequired
public java.lang.Boolean getCommitGenerated();
- Type: java.lang.Boolean
Whether to commit the managed files by default.
compileTaskRequired
public Task getCompileTask();
- Type: io.github.cdklabs.projen.Task
componentsRequired
public java.util.List<Component> getComponents();
- Type: java.util.List
Returns all the components within this project.
depsRequired
public Dependencies getDeps();
- Type: io.github.cdklabs.projen.Dependencies
Project dependencies.
ejectedRequired
public java.lang.Boolean getEjected();
- Type: java.lang.Boolean
Whether or not the project is being ejected.
filesRequired
public java.util.List<FileBase> getFiles();
- Type: java.util.List
All files in this project.
gitattributesRequired
public GitAttributesFile getGitattributes();
- Type: io.github.cdklabs.projen.GitAttributesFile
The .gitattributes file for this repository.
gitignoreRequired
public IgnoreFile getGitignore();
- Type: io.github.cdklabs.projen.IgnoreFile
.gitignore.
loggerRequired
public Logger getLogger();
- Type: io.github.cdklabs.projen.Logger
Logging utilities.
nameRequired
public java.lang.String getName();
- Type: java.lang.String
Project name.
outdirRequired
public java.lang.String getOutdir();
- Type: java.lang.String
Absolute output directory of this project.
packageTaskRequired
public Task getPackageTask();
- Type: io.github.cdklabs.projen.Task
postCompileTaskRequired
public Task getPostCompileTask();
- Type: io.github.cdklabs.projen.Task
preCompileTaskRequired
public Task getPreCompileTask();
- Type: io.github.cdklabs.projen.Task
projectBuildRequired
public ProjectBuild getProjectBuild();
- Type: io.github.cdklabs.projen.ProjectBuild
Manages the build process of the project.
projenCommandRequired
public java.lang.String getProjenCommand();
- Type: java.lang.String
The command to use in order to run the projen CLI.
rootRequired
public Project getRoot();
- Type: io.github.cdklabs.projen.Project
The root project.
subprojectsRequired
public java.util.List<Project> getSubprojects();
- Type: java.util.List
Returns all the subprojects within this project.
tasksRequired
public Tasks getTasks();
- Type: io.github.cdklabs.projen.Tasks
Project tasks.
testTaskRequired
public Task getTestTask();
- Type: io.github.cdklabs.projen.Task
defaultTaskOptional
public Task getDefaultTask();
- Type: io.github.cdklabs.projen.Task
This is the "default" task, the one that executes "projen".
Undefined if the project is being ejected.
initProjectOptional
public InitProject getInitProject();
- Type: io.github.cdklabs.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.
parentOptional
public Project getParent();
- Type: io.github.cdklabs.projen.Project
A parent project.
If undefined, this is the root project.
apiNameRequired
public java.lang.String getApiName();
- Type: java.lang.String
Name of the API.
definitionRequired
public OpenApiAsyncDefinition getDefinition();
- Type: OpenApiAsyncDefinition
OpenAPI specification component.
Constants
| Name | Type | Description |
|---|---|---|
DEFAULT_TASK |
java.lang.String |
The name of the default task (the task executed when projen is run without arguments). |
DEFAULT_TASKRequired
public java.lang.String getDefaultTask();
- Type: java.lang.String
The name of the default task (the task executed when projen is run without arguments).
Normally this task should synthesize the project files.
OpenApiDefinition
The OpenAPI Spec.
Initializers
import software.aws.pdk.type_safe_api.OpenApiDefinition;
OpenApiDefinition.Builder.create(Project project)
.openApiOptions(OpenApiModelOptions)
// .handlerLanguages(java.util.List<Language>)
.build();
| Name | Type | Description |
|---|---|---|
project |
io.github.cdklabs.projen.Project |
No description. |
openApiOptions |
OpenApiModelOptions |
Options for the openapi model. |
handlerLanguages |
java.util.List<Language> |
The languages users have specified for handler projects (if any). |
projectRequired
- Type: io.github.cdklabs.projen.Project
openApiOptionsRequired
- Type: OpenApiModelOptions
Options for the openapi model.
handlerLanguagesOptional
- Type: java.util.List<Language>
The languages users have specified for handler projects (if any).
Methods
| Name | Description |
|---|---|
toString |
Returns a string representation of this construct. |
postSynthesize |
Called after synthesis. |
preSynthesize |
Called before synthesis. |
synthesize |
Synthesizes files to the project output directory. |
toString
public java.lang.String toString()
Returns a string representation of this construct.
postSynthesize
public void postSynthesize()
Called after synthesis.
Order is not guaranteed.
preSynthesize
public void preSynthesize()
Called before synthesis.
synthesize
public void synthesize()
Synthesizes files to the project output directory.
Static Functions
| Name | Description |
|---|---|
isConstruct |
Checks if x is a construct. |
isComponent |
Test whether the given construct is a component. |
isConstruct
import software.aws.pdk.type_safe_api.OpenApiDefinition;
OpenApiDefinition.isConstruct(java.lang.Object x)
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.
xRequired
- Type: java.lang.Object
Any object.
isComponent
import software.aws.pdk.type_safe_api.OpenApiDefinition;
OpenApiDefinition.isComponent(java.lang.Object x)
Test whether the given construct is a component.
xRequired
- Type: java.lang.Object
Properties
| Name | Type | Description |
|---|---|---|
node |
software.constructs.Node |
The tree node. |
project |
io.github.cdklabs.projen.Project |
No description. |
openApiSpecificationPath |
java.lang.String |
Path to the root OpenAPI specification file. |
nodeRequired
public Node getNode();
- Type: software.constructs.Node
The tree node.
projectRequired
public Project getProject();
- Type: io.github.cdklabs.projen.Project
openApiSpecificationPathRequired
public java.lang.String getOpenApiSpecificationPath();
- Type: java.lang.String
Path to the root OpenAPI specification file.
OpenApiModelProject
Project for defining an OpenAPI model for a REST API.
Initializers
import software.aws.pdk.type_safe_api.OpenApiModelProject;
OpenApiModelProject.Builder.create()
.name(java.lang.String)
// .commitGenerated(java.lang.Boolean)
// .gitIgnoreOptions(IgnoreFileOptions)
// .gitOptions(GitOptions)
// .logging(LoggerOptions)
// .outdir(java.lang.String)
// .parent(Project)
// .projenCommand(java.lang.String)
// .projenrcJson(java.lang.Boolean)
// .projenrcJsonOptions(ProjenrcJsonOptions)
// .renovatebot(java.lang.Boolean)
// .renovatebotOptions(RenovatebotOptions)
.openApiOptions(OpenApiModelOptions)
// .handlerLanguages(java.util.List<Language>)
.parsedSpecFile(java.lang.String)
.build();
| Name | Type | Description |
|---|---|---|
name |
java.lang.String |
This is the name of your project. |
commitGenerated |
java.lang.Boolean |
Whether to commit the managed files by default. |
gitIgnoreOptions |
io.github.cdklabs.projen.IgnoreFileOptions |
Configuration options for .gitignore file. |
gitOptions |
io.github.cdklabs.projen.GitOptions |
Configuration options for git. |
logging |
io.github.cdklabs.projen.LoggerOptions |
Configure logging options such as verbosity. |
outdir |
java.lang.String |
The root directory of the project. |
parent |
io.github.cdklabs.projen.Project |
The parent project, if this project is part of a bigger project. |
projenCommand |
java.lang.String |
The shell command to use in order to run the projen CLI. |
projenrcJson |
java.lang.Boolean |
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation. |
projenrcJsonOptions |
io.github.cdklabs.projen.ProjenrcJsonOptions |
Options for .projenrc.json. |
renovatebot |
java.lang.Boolean |
Use renovatebot to handle dependency upgrades. |
renovatebotOptions |
io.github.cdklabs.projen.RenovatebotOptions |
Options for renovatebot. |
openApiOptions |
OpenApiModelOptions |
Options for the openapi model. |
handlerLanguages |
java.util.List<Language> |
The languages users have specified for handler projects (if any). |
parsedSpecFile |
java.lang.String |
Path of the parsed/bundled OpenAPI specification (relative to the project root). |
nameRequired
- Type: java.lang.String
- Default: $BASEDIR
This is the name of your project.
commitGeneratedOptional
- Type: java.lang.Boolean
- Default: true
Whether to commit the managed files by default.
gitIgnoreOptionsOptional
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptionsOptional
- Type: io.github.cdklabs.projen.GitOptions
Configuration options for git.
loggingOptional
- Type: io.github.cdklabs.projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
outdirOptional
- Type: java.lang.String
- Default: "."
The root directory of the project.
Relative to this directory, all files are synthesized.
If this project has a parent, this directory is relative to the parent directory and it cannot be the same as the parent or any of it's other subprojects.
parentOptional
- Type: io.github.cdklabs.projen.Project
The parent project, if this project is part of a bigger project.
projenCommandOptional
- Type: java.lang.String
- Default: "npx projen"
The shell command to use in order to run the projen CLI.
Can be used to customize in special environments.
projenrcJsonOptional
- Type: java.lang.Boolean
- Default: false
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation.
projenrcJsonOptionsOptional
- Type: io.github.cdklabs.projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
renovatebotOptional
- Type: java.lang.Boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptionsOptional
- Type: io.github.cdklabs.projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
openApiOptionsRequired
- Type: OpenApiModelOptions
Options for the openapi model.
handlerLanguagesOptional
- Type: java.util.List<Language>
The languages users have specified for handler projects (if any).
parsedSpecFileRequired
- Type: java.lang.String
Path of the parsed/bundled OpenAPI specification (relative to the project root).
Methods
| Name | Description |
|---|---|
toString |
Returns a string representation of this construct. |
addExcludeFromCleanup |
Exclude the matching files from pre-synth cleanup. |
addGitIgnore |
Adds a .gitignore pattern. |
addPackageIgnore |
Exclude these files from the bundled package. |
addTask |
Adds a new task to this project. |
addTip |
Prints a "tip" message during synthesis. |
annotateGenerated |
Consider a set of files as "generated". |
postSynthesize |
Called after all components are synthesized. |
preSynthesize |
Called before all components are synthesized. |
removeTask |
Removes a task from a project. |
runTaskCommand |
Returns the shell command to execute in order to run a task. |
synth |
Synthesize all project files into outdir. |
tryFindFile |
Finds a file at the specified relative path within this project and all its subprojects. |
tryFindJsonFile |
Finds a json file by name. |
tryFindObjectFile |
Finds an object file (like JsonFile, YamlFile, etc.) by name. |
tryRemoveFile |
Finds a file at the specified relative path within this project and removes it. |
toString
public java.lang.String toString()
Returns a string representation of this construct.
addExcludeFromCleanup
public void addExcludeFromCleanup(java.lang.String globs)
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.
globsRequired
- Type: java.lang.String
The glob patterns to match.
addGitIgnore
public void addGitIgnore(java.lang.String pattern)
Adds a .gitignore pattern.
patternRequired
- Type: java.lang.String
The glob pattern to ignore.
addPackageIgnore
public void addPackageIgnore(java.lang.String _pattern)
Exclude these files from the bundled package.
Implemented by project types based on the
packaging mechanism. For example, NodeProject delegates this to .npmignore.
_patternRequired
- Type: java.lang.String
The glob pattern to exclude.
addTask
public Task addTask(java.lang.String name)
public Task addTask(java.lang.String name, TaskOptions props)
Adds a new task to this project.
This will fail if the project already has a task with this name.
nameRequired
- Type: java.lang.String
The task name to add.
propsOptional
- Type: io.github.cdklabs.projen.TaskOptions
Task properties.
~~addTip~~
public void addTip(java.lang.String message)
Prints a "tip" message during synthesis.
messageRequired
- Type: java.lang.String
The message.
annotateGenerated
public void annotateGenerated(java.lang.String _glob)
Consider a set of files as "generated".
This method is implemented by derived classes and used for example, to add git attributes to tell GitHub that certain files are generated.
_globRequired
- Type: java.lang.String
the glob pattern to match (could be a file path).
postSynthesize
public void postSynthesize()
Called after all components are synthesized.
Order is not guaranteed.
preSynthesize
public void preSynthesize()
Called before all components are synthesized.
removeTask
public Task removeTask(java.lang.String name)
Removes a task from a project.
nameRequired
- Type: java.lang.String
The name of the task to remove.
runTaskCommand
public java.lang.String runTaskCommand(Task task)
Returns the shell command to execute in order to run a task.
By default, this is npx projen@<version> <task>
taskRequired
- Type: io.github.cdklabs.projen.Task
The task for which the command is required.
synth
public void synth()
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()"
tryFindFile
public FileBase tryFindFile(java.lang.String filePath)
Finds a file at the specified relative path within this project and all its subprojects.
filePathRequired
- Type: java.lang.String
The file path.
If this path is relative, it will be resolved from the root of this project.
~~tryFindJsonFile~~
public JsonFile tryFindJsonFile(java.lang.String filePath)
Finds a json file by name.
filePathRequired
- Type: java.lang.String
The file path.
tryFindObjectFile
public ObjectFile tryFindObjectFile(java.lang.String filePath)
Finds an object file (like JsonFile, YamlFile, etc.) by name.
filePathRequired
- Type: java.lang.String
The file path.
tryRemoveFile
public FileBase tryRemoveFile(java.lang.String filePath)
Finds a file at the specified relative path within this project and removes it.
filePathRequired
- Type: java.lang.String
The file path.
If this path is relative, it will be resolved from the root of this project.
Static Functions
| Name | Description |
|---|---|
isConstruct |
Checks if x is a construct. |
isProject |
Test whether the given construct is a project. |
of |
Find the closest ancestor project for given construct. |
isConstruct
import software.aws.pdk.type_safe_api.OpenApiModelProject;
OpenApiModelProject.isConstruct(java.lang.Object x)
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.
xRequired
- Type: java.lang.Object
Any object.
isProject
import software.aws.pdk.type_safe_api.OpenApiModelProject;
OpenApiModelProject.isProject(java.lang.Object x)
Test whether the given construct is a project.
xRequired
- Type: java.lang.Object
of
import software.aws.pdk.type_safe_api.OpenApiModelProject;
OpenApiModelProject.of(IConstruct construct)
Find the closest ancestor project for given construct.
When given a project, this it the project itself.
constructRequired
- Type: software.constructs.IConstruct
Properties
| Name | Type | Description |
|---|---|---|
node |
software.constructs.Node |
The tree node. |
buildTask |
io.github.cdklabs.projen.Task |
No description. |
commitGenerated |
java.lang.Boolean |
Whether to commit the managed files by default. |
compileTask |
io.github.cdklabs.projen.Task |
No description. |
components |
java.util.List |
Returns all the components within this project. |
deps |
io.github.cdklabs.projen.Dependencies |
Project dependencies. |
ejected |
java.lang.Boolean |
Whether or not the project is being ejected. |
files |
java.util.List |
All files in this project. |
gitattributes |
io.github.cdklabs.projen.GitAttributesFile |
The .gitattributes file for this repository. |
gitignore |
io.github.cdklabs.projen.IgnoreFile |
.gitignore. |
logger |
io.github.cdklabs.projen.Logger |
Logging utilities. |
name |
java.lang.String |
Project name. |
outdir |
java.lang.String |
Absolute output directory of this project. |
packageTask |
io.github.cdklabs.projen.Task |
No description. |
postCompileTask |
io.github.cdklabs.projen.Task |
No description. |
preCompileTask |
io.github.cdklabs.projen.Task |
No description. |
projectBuild |
io.github.cdklabs.projen.ProjectBuild |
Manages the build process of the project. |
projenCommand |
java.lang.String |
The command to use in order to run the projen CLI. |
root |
io.github.cdklabs.projen.Project |
The root project. |
subprojects |
java.util.List |
Returns all the subprojects within this project. |
tasks |
io.github.cdklabs.projen.Tasks |
Project tasks. |
testTask |
io.github.cdklabs.projen.Task |
No description. |
defaultTask |
io.github.cdklabs.projen.Task |
This is the "default" task, the one that executes "projen". |
initProject |
io.github.cdklabs.projen.InitProject |
The options used when this project is bootstrapped via projen new. |
parent |
io.github.cdklabs.projen.Project |
A parent project. |
apiName |
java.lang.String |
Name of the API. |
definition |
OpenApiDefinition |
OpenAPI specification component. |
nodeRequired
public Node getNode();
- Type: software.constructs.Node
The tree node.
buildTaskRequired
public Task getBuildTask();
- Type: io.github.cdklabs.projen.Task
commitGeneratedRequired
public java.lang.Boolean getCommitGenerated();
- Type: java.lang.Boolean
Whether to commit the managed files by default.
compileTaskRequired
public Task getCompileTask();
- Type: io.github.cdklabs.projen.Task
componentsRequired
public java.util.List<Component> getComponents();
- Type: java.util.List
Returns all the components within this project.
depsRequired
public Dependencies getDeps();
- Type: io.github.cdklabs.projen.Dependencies
Project dependencies.
ejectedRequired
public java.lang.Boolean getEjected();
- Type: java.lang.Boolean
Whether or not the project is being ejected.
filesRequired
public java.util.List<FileBase> getFiles();
- Type: java.util.List
All files in this project.
gitattributesRequired
public GitAttributesFile getGitattributes();
- Type: io.github.cdklabs.projen.GitAttributesFile
The .gitattributes file for this repository.
gitignoreRequired
public IgnoreFile getGitignore();
- Type: io.github.cdklabs.projen.IgnoreFile
.gitignore.
loggerRequired
public Logger getLogger();
- Type: io.github.cdklabs.projen.Logger
Logging utilities.
nameRequired
public java.lang.String getName();
- Type: java.lang.String
Project name.
outdirRequired
public java.lang.String getOutdir();
- Type: java.lang.String
Absolute output directory of this project.
packageTaskRequired
public Task getPackageTask();
- Type: io.github.cdklabs.projen.Task
postCompileTaskRequired
public Task getPostCompileTask();
- Type: io.github.cdklabs.projen.Task
preCompileTaskRequired
public Task getPreCompileTask();
- Type: io.github.cdklabs.projen.Task
projectBuildRequired
public ProjectBuild getProjectBuild();
- Type: io.github.cdklabs.projen.ProjectBuild
Manages the build process of the project.
projenCommandRequired
public java.lang.String getProjenCommand();
- Type: java.lang.String
The command to use in order to run the projen CLI.
rootRequired
public Project getRoot();
- Type: io.github.cdklabs.projen.Project
The root project.
subprojectsRequired
public java.util.List<Project> getSubprojects();
- Type: java.util.List
Returns all the subprojects within this project.
tasksRequired
public Tasks getTasks();
- Type: io.github.cdklabs.projen.Tasks
Project tasks.
testTaskRequired
public Task getTestTask();
- Type: io.github.cdklabs.projen.Task
defaultTaskOptional
public Task getDefaultTask();
- Type: io.github.cdklabs.projen.Task
This is the "default" task, the one that executes "projen".
Undefined if the project is being ejected.
initProjectOptional
public InitProject getInitProject();
- Type: io.github.cdklabs.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.
parentOptional
public Project getParent();
- Type: io.github.cdklabs.projen.Project
A parent project.
If undefined, this is the root project.
apiNameRequired
public java.lang.String getApiName();
- Type: java.lang.String
Name of the API.
definitionRequired
public OpenApiDefinition getDefinition();
- Type: OpenApiDefinition
OpenAPI specification component.
Constants
| Name | Type | Description |
|---|---|---|
DEFAULT_TASK |
java.lang.String |
The name of the default task (the task executed when projen is run without arguments). |
DEFAULT_TASKRequired
public java.lang.String getDefaultTask();
- Type: java.lang.String
The name of the default task (the task executed when projen is run without arguments).
Normally this task should synthesize the project files.
OpenApiProjectDefinition
The OpenAPI Spec.
Initializers
import software.aws.pdk.type_safe_api.OpenApiProjectDefinition;
OpenApiProjectDefinition.Builder.create(Project project)
.openApiOptions(OpenApiModelOptions)
// .handlerLanguages(java.util.List<Language>)
.build();
| Name | Type | Description |
|---|---|---|
project |
io.github.cdklabs.projen.Project |
No description. |
openApiOptions |
OpenApiModelOptions |
Options for the openapi model. |
handlerLanguages |
java.util.List<Language> |
The languages users have specified for handler projects (if any). |
projectRequired
- Type: io.github.cdklabs.projen.Project
openApiOptionsRequired
- Type: OpenApiModelOptions
Options for the openapi model.
handlerLanguagesOptional
- Type: java.util.List<Language>
The languages users have specified for handler projects (if any).
Methods
| Name | Description |
|---|---|
toString |
Returns a string representation of this construct. |
postSynthesize |
Called after synthesis. |
preSynthesize |
Called before synthesis. |
synthesize |
Synthesizes files to the project output directory. |
toString
public java.lang.String toString()
Returns a string representation of this construct.
postSynthesize
public void postSynthesize()
Called after synthesis.
Order is not guaranteed.
preSynthesize
public void preSynthesize()
Called before synthesis.
synthesize
public void synthesize()
Synthesizes files to the project output directory.
Static Functions
| Name | Description |
|---|---|
isConstruct |
Checks if x is a construct. |
isComponent |
Test whether the given construct is a component. |
isConstruct
import software.aws.pdk.type_safe_api.OpenApiProjectDefinition;
OpenApiProjectDefinition.isConstruct(java.lang.Object x)
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.
xRequired
- Type: java.lang.Object
Any object.
isComponent
import software.aws.pdk.type_safe_api.OpenApiProjectDefinition;
OpenApiProjectDefinition.isComponent(java.lang.Object x)
Test whether the given construct is a component.
xRequired
- Type: java.lang.Object
Properties
| Name | Type | Description |
|---|---|---|
node |
software.constructs.Node |
The tree node. |
project |
io.github.cdklabs.projen.Project |
No description. |
openApiSpecificationPath |
java.lang.String |
Path to the root OpenAPI specification file. |
nodeRequired
public Node getNode();
- Type: software.constructs.Node
The tree node.
projectRequired
public Project getProject();
- Type: io.github.cdklabs.projen.Project
openApiSpecificationPathRequired
public java.lang.String getOpenApiSpecificationPath();
- Type: java.lang.String
Path to the root OpenAPI specification file.
SmithyAsyncModelProject
Smithy model project for a WebSocket API.
Initializers
import software.aws.pdk.type_safe_api.SmithyAsyncModelProject;
SmithyAsyncModelProject.Builder.create()
.name(java.lang.String)
// .commitGenerated(java.lang.Boolean)
// .gitIgnoreOptions(IgnoreFileOptions)
// .gitOptions(GitOptions)
// .logging(LoggerOptions)
// .outdir(java.lang.String)
// .parent(Project)
// .projenCommand(java.lang.String)
// .projenrcJson(java.lang.Boolean)
// .projenrcJsonOptions(ProjenrcJsonOptions)
// .renovatebot(java.lang.Boolean)
// .renovatebotOptions(RenovatebotOptions)
.smithyOptions(SmithyModelOptions)
// .handlerLanguages(java.util.List<Language>)
.parsedSpecFile(java.lang.String)
.asyncApiSpecFile(java.lang.String)
.build();
| Name | Type | Description |
|---|---|---|
name |
java.lang.String |
This is the name of your project. |
commitGenerated |
java.lang.Boolean |
Whether to commit the managed files by default. |
gitIgnoreOptions |
io.github.cdklabs.projen.IgnoreFileOptions |
Configuration options for .gitignore file. |
gitOptions |
io.github.cdklabs.projen.GitOptions |
Configuration options for git. |
logging |
io.github.cdklabs.projen.LoggerOptions |
Configure logging options such as verbosity. |
outdir |
java.lang.String |
The root directory of the project. |
parent |
io.github.cdklabs.projen.Project |
The parent project, if this project is part of a bigger project. |
projenCommand |
java.lang.String |
The shell command to use in order to run the projen CLI. |
projenrcJson |
java.lang.Boolean |
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation. |
projenrcJsonOptions |
io.github.cdklabs.projen.ProjenrcJsonOptions |
Options for .projenrc.json. |
renovatebot |
java.lang.Boolean |
Use renovatebot to handle dependency upgrades. |
renovatebotOptions |
io.github.cdklabs.projen.RenovatebotOptions |
Options for renovatebot. |
smithyOptions |
SmithyModelOptions |
Smithy engine options. |
handlerLanguages |
java.util.List<Language> |
The languages users have specified for handler projects (if any). |
parsedSpecFile |
java.lang.String |
Path of the parsed/bundled OpenAPI specification (relative to the project root). |
asyncApiSpecFile |
java.lang.String |
Path to the generated AsyncAPI specification (relative to the project root). |
nameRequired
- Type: java.lang.String
- Default: $BASEDIR
This is the name of your project.
commitGeneratedOptional
- Type: java.lang.Boolean
- Default: true
Whether to commit the managed files by default.
gitIgnoreOptionsOptional
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptionsOptional
- Type: io.github.cdklabs.projen.GitOptions
Configuration options for git.
loggingOptional
- Type: io.github.cdklabs.projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
outdirOptional
- Type: java.lang.String
- Default: "."
The root directory of the project.
Relative to this directory, all files are synthesized.
If this project has a parent, this directory is relative to the parent directory and it cannot be the same as the parent or any of it's other subprojects.
parentOptional
- Type: io.github.cdklabs.projen.Project
The parent project, if this project is part of a bigger project.
projenCommandOptional
- Type: java.lang.String
- Default: "npx projen"
The shell command to use in order to run the projen CLI.
Can be used to customize in special environments.
projenrcJsonOptional
- Type: java.lang.Boolean
- Default: false
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation.
projenrcJsonOptionsOptional
- Type: io.github.cdklabs.projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
renovatebotOptional
- Type: java.lang.Boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptionsOptional
- Type: io.github.cdklabs.projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
smithyOptionsRequired
- Type: SmithyModelOptions
Smithy engine options.
handlerLanguagesOptional
- Type: java.util.List<Language>
The languages users have specified for handler projects (if any).
parsedSpecFileRequired
- Type: java.lang.String
Path of the parsed/bundled OpenAPI specification (relative to the project root).
asyncApiSpecFileRequired
- Type: java.lang.String
Path to the generated AsyncAPI specification (relative to the project root).
Methods
| Name | Description |
|---|---|
toString |
Returns a string representation of this construct. |
addExcludeFromCleanup |
Exclude the matching files from pre-synth cleanup. |
addGitIgnore |
Adds a .gitignore pattern. |
addPackageIgnore |
Exclude these files from the bundled package. |
addTask |
Adds a new task to this project. |
addTip |
Prints a "tip" message during synthesis. |
annotateGenerated |
Consider a set of files as "generated". |
postSynthesize |
Called after all components are synthesized. |
preSynthesize |
Called before all components are synthesized. |
removeTask |
Removes a task from a project. |
runTaskCommand |
Returns the shell command to execute in order to run a task. |
synth |
Synthesize all project files into outdir. |
tryFindFile |
Finds a file at the specified relative path within this project and all its subprojects. |
tryFindJsonFile |
Finds a json file by name. |
tryFindObjectFile |
Finds an object file (like JsonFile, YamlFile, etc.) by name. |
tryRemoveFile |
Finds a file at the specified relative path within this project and removes it. |
addSmithyDeps |
Add a dependency on other smithy projects. |
smithyProjectDefinition |
Returns the smithy project definition. |
toString
public java.lang.String toString()
Returns a string representation of this construct.
addExcludeFromCleanup
public void addExcludeFromCleanup(java.lang.String globs)
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.
globsRequired
- Type: java.lang.String
The glob patterns to match.
addGitIgnore
public void addGitIgnore(java.lang.String pattern)
Adds a .gitignore pattern.
patternRequired
- Type: java.lang.String
The glob pattern to ignore.
addPackageIgnore
public void addPackageIgnore(java.lang.String _pattern)
Exclude these files from the bundled package.
Implemented by project types based on the
packaging mechanism. For example, NodeProject delegates this to .npmignore.
_patternRequired
- Type: java.lang.String
The glob pattern to exclude.
addTask
public Task addTask(java.lang.String name)
public Task addTask(java.lang.String name, TaskOptions props)
Adds a new task to this project.
This will fail if the project already has a task with this name.
nameRequired
- Type: java.lang.String
The task name to add.
propsOptional
- Type: io.github.cdklabs.projen.TaskOptions
Task properties.
~~addTip~~
public void addTip(java.lang.String message)
Prints a "tip" message during synthesis.
messageRequired
- Type: java.lang.String
The message.
annotateGenerated
public void annotateGenerated(java.lang.String _glob)
Consider a set of files as "generated".
This method is implemented by derived classes and used for example, to add git attributes to tell GitHub that certain files are generated.
_globRequired
- Type: java.lang.String
the glob pattern to match (could be a file path).
postSynthesize
public void postSynthesize()
Called after all components are synthesized.
Order is not guaranteed.
preSynthesize
public void preSynthesize()
Called before all components are synthesized.
removeTask
public Task removeTask(java.lang.String name)
Removes a task from a project.
nameRequired
- Type: java.lang.String
The name of the task to remove.
runTaskCommand
public java.lang.String runTaskCommand(Task task)
Returns the shell command to execute in order to run a task.
By default, this is npx projen@<version> <task>
taskRequired
- Type: io.github.cdklabs.projen.Task
The task for which the command is required.
synth
public void synth()
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()"
tryFindFile
public FileBase tryFindFile(java.lang.String filePath)
Finds a file at the specified relative path within this project and all its subprojects.
filePathRequired
- Type: java.lang.String
The file path.
If this path is relative, it will be resolved from the root of this project.
~~tryFindJsonFile~~
public JsonFile tryFindJsonFile(java.lang.String filePath)
Finds a json file by name.
filePathRequired
- Type: java.lang.String
The file path.
tryFindObjectFile
public ObjectFile tryFindObjectFile(java.lang.String filePath)
Finds an object file (like JsonFile, YamlFile, etc.) by name.
filePathRequired
- Type: java.lang.String
The file path.
tryRemoveFile
public FileBase tryRemoveFile(java.lang.String filePath)
Finds a file at the specified relative path within this project and removes it.
filePathRequired
- Type: java.lang.String
The file path.
If this path is relative, it will be resolved from the root of this project.
addSmithyDeps
public void addSmithyDeps(SmithyBaseProject deps)
Add a dependency on other smithy projects.
depsRequired
- Type: SmithyBaseProject
smithyProjectDefinition
public SmithyProjectDefinition smithyProjectDefinition()
Returns the smithy project definition.
Static Functions
| Name | Description |
|---|---|
isConstruct |
Checks if x is a construct. |
isProject |
Test whether the given construct is a project. |
of |
Find the closest ancestor project for given construct. |
isConstruct
import software.aws.pdk.type_safe_api.SmithyAsyncModelProject;
SmithyAsyncModelProject.isConstruct(java.lang.Object x)
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.
xRequired
- Type: java.lang.Object
Any object.
isProject
import software.aws.pdk.type_safe_api.SmithyAsyncModelProject;
SmithyAsyncModelProject.isProject(java.lang.Object x)
Test whether the given construct is a project.
xRequired
- Type: java.lang.Object
of
import software.aws.pdk.type_safe_api.SmithyAsyncModelProject;
SmithyAsyncModelProject.of(IConstruct construct)
Find the closest ancestor project for given construct.
When given a project, this it the project itself.
constructRequired
- Type: software.constructs.IConstruct
Properties
| Name | Type | Description |
|---|---|---|
node |
software.constructs.Node |
The tree node. |
buildTask |
io.github.cdklabs.projen.Task |
No description. |
commitGenerated |
java.lang.Boolean |
Whether to commit the managed files by default. |
compileTask |
io.github.cdklabs.projen.Task |
No description. |
components |
java.util.List |
Returns all the components within this project. |
deps |
io.github.cdklabs.projen.Dependencies |
Project dependencies. |
ejected |
java.lang.Boolean |
Whether or not the project is being ejected. |
files |
java.util.List |
All files in this project. |
gitattributes |
io.github.cdklabs.projen.GitAttributesFile |
The .gitattributes file for this repository. |
gitignore |
io.github.cdklabs.projen.IgnoreFile |
.gitignore. |
logger |
io.github.cdklabs.projen.Logger |
Logging utilities. |
name |
java.lang.String |
Project name. |
outdir |
java.lang.String |
Absolute output directory of this project. |
packageTask |
io.github.cdklabs.projen.Task |
No description. |
postCompileTask |
io.github.cdklabs.projen.Task |
No description. |
preCompileTask |
io.github.cdklabs.projen.Task |
No description. |
projectBuild |
io.github.cdklabs.projen.ProjectBuild |
Manages the build process of the project. |
projenCommand |
java.lang.String |
The command to use in order to run the projen CLI. |
root |
io.github.cdklabs.projen.Project |
The root project. |
subprojects |
java.util.List |
Returns all the subprojects within this project. |
tasks |
io.github.cdklabs.projen.Tasks |
Project tasks. |
testTask |
io.github.cdklabs.projen.Task |
No description. |
defaultTask |
io.github.cdklabs.projen.Task |
This is the "default" task, the one that executes "projen". |
initProject |
io.github.cdklabs.projen.InitProject |
The options used when this project is bootstrapped via projen new. |
parent |
io.github.cdklabs.projen.Project |
A parent project. |
apiName |
java.lang.String |
Name of the API. |
definition |
SmithyServiceProjectDefinition |
Smithy model and build settings. |
nodeRequired
public Node getNode();
- Type: software.constructs.Node
The tree node.
buildTaskRequired
public Task getBuildTask();
- Type: io.github.cdklabs.projen.Task
commitGeneratedRequired
public java.lang.Boolean getCommitGenerated();
- Type: java.lang.Boolean
Whether to commit the managed files by default.
compileTaskRequired
public Task getCompileTask();
- Type: io.github.cdklabs.projen.Task
componentsRequired
public java.util.List<Component> getComponents();
- Type: java.util.List
Returns all the components within this project.
depsRequired
public Dependencies getDeps();
- Type: io.github.cdklabs.projen.Dependencies
Project dependencies.
ejectedRequired
public java.lang.Boolean getEjected();
- Type: java.lang.Boolean
Whether or not the project is being ejected.
filesRequired
public java.util.List<FileBase> getFiles();
- Type: java.util.List
All files in this project.
gitattributesRequired
public GitAttributesFile getGitattributes();
- Type: io.github.cdklabs.projen.GitAttributesFile
The .gitattributes file for this repository.
gitignoreRequired
public IgnoreFile getGitignore();
- Type: io.github.cdklabs.projen.IgnoreFile
.gitignore.
loggerRequired
public Logger getLogger();
- Type: io.github.cdklabs.projen.Logger
Logging utilities.
nameRequired
public java.lang.String getName();
- Type: java.lang.String
Project name.
outdirRequired
public java.lang.String getOutdir();
- Type: java.lang.String
Absolute output directory of this project.
packageTaskRequired
public Task getPackageTask();
- Type: io.github.cdklabs.projen.Task
postCompileTaskRequired
public Task getPostCompileTask();
- Type: io.github.cdklabs.projen.Task
preCompileTaskRequired
public Task getPreCompileTask();
- Type: io.github.cdklabs.projen.Task
projectBuildRequired
public ProjectBuild getProjectBuild();
- Type: io.github.cdklabs.projen.ProjectBuild
Manages the build process of the project.
projenCommandRequired
public java.lang.String getProjenCommand();
- Type: java.lang.String
The command to use in order to run the projen CLI.
rootRequired
public Project getRoot();
- Type: io.github.cdklabs.projen.Project
The root project.
subprojectsRequired
public java.util.List<Project> getSubprojects();
- Type: java.util.List
Returns all the subprojects within this project.
tasksRequired
public Tasks getTasks();
- Type: io.github.cdklabs.projen.Tasks
Project tasks.
testTaskRequired
public Task getTestTask();
- Type: io.github.cdklabs.projen.Task
defaultTaskOptional
public Task getDefaultTask();
- Type: io.github.cdklabs.projen.Task
This is the "default" task, the one that executes "projen".
Undefined if the project is being ejected.
initProjectOptional
public InitProject getInitProject();
- Type: io.github.cdklabs.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.
parentOptional
public Project getParent();
- Type: io.github.cdklabs.projen.Project
A parent project.
If undefined, this is the root project.
apiNameRequired
public java.lang.String getApiName();
- Type: java.lang.String
Name of the API.
definitionRequired
public SmithyServiceProjectDefinition getDefinition();
Smithy model and build settings.
Constants
| Name | Type | Description |
|---|---|---|
DEFAULT_TASK |
java.lang.String |
The name of the default task (the task executed when projen is run without arguments). |
DEFAULT_TASKRequired
public java.lang.String getDefaultTask();
- Type: java.lang.String
The name of the default task (the task executed when projen is run without arguments).
Normally this task should synthesize the project files.
SmithyBaseProject
Base project for Smithy projects.
Initializers
import software.aws.pdk.type_safe_api.SmithyBaseProject;
SmithyBaseProject.Builder.create()
.name(java.lang.String)
// .commitGenerated(java.lang.Boolean)
// .gitIgnoreOptions(IgnoreFileOptions)
// .gitOptions(GitOptions)
// .logging(LoggerOptions)
// .outdir(java.lang.String)
// .parent(Project)
// .projenCommand(java.lang.String)
// .projenrcJson(java.lang.Boolean)
// .projenrcJsonOptions(ProjenrcJsonOptions)
// .renovatebot(java.lang.Boolean)
// .renovatebotOptions(RenovatebotOptions)
.build();
| Name | Type | Description |
|---|---|---|
name |
java.lang.String |
This is the name of your project. |
commitGenerated |
java.lang.Boolean |
Whether to commit the managed files by default. |
gitIgnoreOptions |
io.github.cdklabs.projen.IgnoreFileOptions |
Configuration options for .gitignore file. |
gitOptions |
io.github.cdklabs.projen.GitOptions |
Configuration options for git. |
logging |
io.github.cdklabs.projen.LoggerOptions |
Configure logging options such as verbosity. |
outdir |
java.lang.String |
The root directory of the project. |
parent |
io.github.cdklabs.projen.Project |
The parent project, if this project is part of a bigger project. |
projenCommand |
java.lang.String |
The shell command to use in order to run the projen CLI. |
projenrcJson |
java.lang.Boolean |
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation. |
projenrcJsonOptions |
io.github.cdklabs.projen.ProjenrcJsonOptions |
Options for .projenrc.json. |
renovatebot |
java.lang.Boolean |
Use renovatebot to handle dependency upgrades. |
renovatebotOptions |
io.github.cdklabs.projen.RenovatebotOptions |
Options for renovatebot. |
nameRequired
- Type: java.lang.String
- Default: $BASEDIR
This is the name of your project.
commitGeneratedOptional
- Type: java.lang.Boolean
- Default: true
Whether to commit the managed files by default.
gitIgnoreOptionsOptional
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptionsOptional
- Type: io.github.cdklabs.projen.GitOptions
Configuration options for git.
loggingOptional
- Type: io.github.cdklabs.projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
outdirOptional
- Type: java.lang.String
- Default: "."
The root directory of the project.
Relative to this directory, all files are synthesized.
If this project has a parent, this directory is relative to the parent directory and it cannot be the same as the parent or any of it's other subprojects.
parentOptional
- Type: io.github.cdklabs.projen.Project
The parent project, if this project is part of a bigger project.
projenCommandOptional
- Type: java.lang.String
- Default: "npx projen"
The shell command to use in order to run the projen CLI.
Can be used to customize in special environments.
projenrcJsonOptional
- Type: java.lang.Boolean
- Default: false
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation.
projenrcJsonOptionsOptional
- Type: io.github.cdklabs.projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
renovatebotOptional
- Type: java.lang.Boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptionsOptional
- Type: io.github.cdklabs.projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
Methods
| Name | Description |
|---|---|
toString |
Returns a string representation of this construct. |
addExcludeFromCleanup |
Exclude the matching files from pre-synth cleanup. |
addGitIgnore |
Adds a .gitignore pattern. |
addPackageIgnore |
Exclude these files from the bundled package. |
addTask |
Adds a new task to this project. |
addTip |
Prints a "tip" message during synthesis. |
annotateGenerated |
Consider a set of files as "generated". |
postSynthesize |
Called after all components are synthesized. |
preSynthesize |
Called before all components are synthesized. |
removeTask |
Removes a task from a project. |
runTaskCommand |
Returns the shell command to execute in order to run a task. |
synth |
Synthesize all project files into outdir. |
tryFindFile |
Finds a file at the specified relative path within this project and all its subprojects. |
tryFindJsonFile |
Finds a json file by name. |
tryFindObjectFile |
Finds an object file (like JsonFile, YamlFile, etc.) by name. |
tryRemoveFile |
Finds a file at the specified relative path within this project and removes it. |
addSmithyDeps |
Add a dependency on other smithy projects. |
smithyProjectDefinition |
Returns the smithy project definition. |
toString
public java.lang.String toString()
Returns a string representation of this construct.
addExcludeFromCleanup
public void addExcludeFromCleanup(java.lang.String globs)
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.
globsRequired
- Type: java.lang.String
The glob patterns to match.
addGitIgnore
public void addGitIgnore(java.lang.String pattern)
Adds a .gitignore pattern.
patternRequired
- Type: java.lang.String
The glob pattern to ignore.
addPackageIgnore
public void addPackageIgnore(java.lang.String _pattern)
Exclude these files from the bundled package.
Implemented by project types based on the
packaging mechanism. For example, NodeProject delegates this to .npmignore.
_patternRequired
- Type: java.lang.String
The glob pattern to exclude.
addTask
public Task addTask(java.lang.String name)
public Task addTask(java.lang.String name, TaskOptions props)
Adds a new task to this project.
This will fail if the project already has a task with this name.
nameRequired
- Type: java.lang.String
The task name to add.
propsOptional
- Type: io.github.cdklabs.projen.TaskOptions
Task properties.
~~addTip~~
public void addTip(java.lang.String message)
Prints a "tip" message during synthesis.
messageRequired
- Type: java.lang.String
The message.
annotateGenerated
public void annotateGenerated(java.lang.String _glob)
Consider a set of files as "generated".
This method is implemented by derived classes and used for example, to add git attributes to tell GitHub that certain files are generated.
_globRequired
- Type: java.lang.String
the glob pattern to match (could be a file path).
postSynthesize
public void postSynthesize()
Called after all components are synthesized.
Order is not guaranteed.
preSynthesize
public void preSynthesize()
Called before all components are synthesized.
removeTask
public Task removeTask(java.lang.String name)
Removes a task from a project.
nameRequired
- Type: java.lang.String
The name of the task to remove.
runTaskCommand
public java.lang.String runTaskCommand(Task task)
Returns the shell command to execute in order to run a task.
By default, this is npx projen@<version> <task>
taskRequired
- Type: io.github.cdklabs.projen.Task
The task for which the command is required.
synth
public void synth()
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()"
tryFindFile
public FileBase tryFindFile(java.lang.String filePath)
Finds a file at the specified relative path within this project and all its subprojects.
filePathRequired
- Type: java.lang.String
The file path.
If this path is relative, it will be resolved from the root of this project.
~~tryFindJsonFile~~
public JsonFile tryFindJsonFile(java.lang.String filePath)
Finds a json file by name.
filePathRequired
- Type: java.lang.String
The file path.
tryFindObjectFile
public ObjectFile tryFindObjectFile(java.lang.String filePath)
Finds an object file (like JsonFile, YamlFile, etc.) by name.
filePathRequired
- Type: java.lang.String
The file path.
tryRemoveFile
public FileBase tryRemoveFile(java.lang.String filePath)
Finds a file at the specified relative path within this project and removes it.
filePathRequired
- Type: java.lang.String
The file path.
If this path is relative, it will be resolved from the root of this project.
addSmithyDeps
public void addSmithyDeps(SmithyBaseProject deps)
Add a dependency on other smithy projects.
depsRequired
- Type: SmithyBaseProject
smithyProjectDefinition
public SmithyProjectDefinition smithyProjectDefinition()
Returns the smithy project definition.
Static Functions
| Name | Description |
|---|---|
isConstruct |
Checks if x is a construct. |
isProject |
Test whether the given construct is a project. |
of |
Find the closest ancestor project for given construct. |
isConstruct
import software.aws.pdk.type_safe_api.SmithyBaseProject;
SmithyBaseProject.isConstruct(java.lang.Object x)
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.
xRequired
- Type: java.lang.Object
Any object.
isProject
import software.aws.pdk.type_safe_api.SmithyBaseProject;
SmithyBaseProject.isProject(java.lang.Object x)
Test whether the given construct is a project.
xRequired
- Type: java.lang.Object
of
import software.aws.pdk.type_safe_api.SmithyBaseProject;
SmithyBaseProject.of(IConstruct construct)
Find the closest ancestor project for given construct.
When given a project, this it the project itself.
constructRequired
- Type: software.constructs.IConstruct
Properties
| Name | Type | Description |
|---|---|---|
node |
software.constructs.Node |
The tree node. |
buildTask |
io.github.cdklabs.projen.Task |
No description. |
commitGenerated |
java.lang.Boolean |
Whether to commit the managed files by default. |
compileTask |
io.github.cdklabs.projen.Task |
No description. |
components |
java.util.List |
Returns all the components within this project. |
deps |
io.github.cdklabs.projen.Dependencies |
Project dependencies. |
ejected |
java.lang.Boolean |
Whether or not the project is being ejected. |
files |
java.util.List |
All files in this project. |
gitattributes |
io.github.cdklabs.projen.GitAttributesFile |
The .gitattributes file for this repository. |
gitignore |
io.github.cdklabs.projen.IgnoreFile |
.gitignore. |
logger |
io.github.cdklabs.projen.Logger |
Logging utilities. |
name |
java.lang.String |
Project name. |
outdir |
java.lang.String |
Absolute output directory of this project. |
packageTask |
io.github.cdklabs.projen.Task |
No description. |
postCompileTask |
io.github.cdklabs.projen.Task |
No description. |
preCompileTask |
io.github.cdklabs.projen.Task |
No description. |
projectBuild |
io.github.cdklabs.projen.ProjectBuild |
Manages the build process of the project. |
projenCommand |
java.lang.String |
The command to use in order to run the projen CLI. |
root |
io.github.cdklabs.projen.Project |
The root project. |
subprojects |
java.util.List |
Returns all the subprojects within this project. |
tasks |
io.github.cdklabs.projen.Tasks |
Project tasks. |
testTask |
io.github.cdklabs.projen.Task |
No description. |
defaultTask |
io.github.cdklabs.projen.Task |
This is the "default" task, the one that executes "projen". |
initProject |
io.github.cdklabs.projen.InitProject |
The options used when this project is bootstrapped via projen new. |
parent |
io.github.cdklabs.projen.Project |
A parent project. |
nodeRequired
public Node getNode();
- Type: software.constructs.Node
The tree node.
buildTaskRequired
public Task getBuildTask();
- Type: io.github.cdklabs.projen.Task
commitGeneratedRequired
public java.lang.Boolean getCommitGenerated();
- Type: java.lang.Boolean
Whether to commit the managed files by default.
compileTaskRequired
public Task getCompileTask();
- Type: io.github.cdklabs.projen.Task
componentsRequired
public java.util.List<Component> getComponents();
- Type: java.util.List
Returns all the components within this project.
depsRequired
public Dependencies getDeps();
- Type: io.github.cdklabs.projen.Dependencies
Project dependencies.
ejectedRequired
public java.lang.Boolean getEjected();
- Type: java.lang.Boolean
Whether or not the project is being ejected.
filesRequired
public java.util.List<FileBase> getFiles();
- Type: java.util.List
All files in this project.
gitattributesRequired
public GitAttributesFile getGitattributes();
- Type: io.github.cdklabs.projen.GitAttributesFile
The .gitattributes file for this repository.
gitignoreRequired
public IgnoreFile getGitignore();
- Type: io.github.cdklabs.projen.IgnoreFile
.gitignore.
loggerRequired
public Logger getLogger();
- Type: io.github.cdklabs.projen.Logger
Logging utilities.
nameRequired
public java.lang.String getName();
- Type: java.lang.String
Project name.
outdirRequired
public java.lang.String getOutdir();
- Type: java.lang.String
Absolute output directory of this project.
packageTaskRequired
public Task getPackageTask();
- Type: io.github.cdklabs.projen.Task
postCompileTaskRequired
public Task getPostCompileTask();
- Type: io.github.cdklabs.projen.Task
preCompileTaskRequired
public Task getPreCompileTask();
- Type: io.github.cdklabs.projen.Task
projectBuildRequired
public ProjectBuild getProjectBuild();
- Type: io.github.cdklabs.projen.ProjectBuild
Manages the build process of the project.
projenCommandRequired
public java.lang.String getProjenCommand();
- Type: java.lang.String
The command to use in order to run the projen CLI.
rootRequired
public Project getRoot();
- Type: io.github.cdklabs.projen.Project
The root project.
subprojectsRequired
public java.util.List<Project> getSubprojects();
- Type: java.util.List
Returns all the subprojects within this project.
tasksRequired
public Tasks getTasks();
- Type: io.github.cdklabs.projen.Tasks
Project tasks.
testTaskRequired
public Task getTestTask();
- Type: io.github.cdklabs.projen.Task
defaultTaskOptional
public Task getDefaultTask();
- Type: io.github.cdklabs.projen.Task
This is the "default" task, the one that executes "projen".
Undefined if the project is being ejected.
initProjectOptional
public InitProject getInitProject();
- Type: io.github.cdklabs.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.
parentOptional
public Project getParent();
- Type: io.github.cdklabs.projen.Project
A parent project.
If undefined, this is the root project.
Constants
| Name | Type | Description |
|---|---|---|
DEFAULT_TASK |
java.lang.String |
The name of the default task (the task executed when projen is run without arguments). |
DEFAULT_TASKRequired
public java.lang.String getDefaultTask();
- Type: java.lang.String
The name of the default task (the task executed when projen is run without arguments).
Normally this task should synthesize the project files.
SmithyModelProject
Smithy model project for a REST API.
Initializers
import software.aws.pdk.type_safe_api.SmithyModelProject;
SmithyModelProject.Builder.create()
.name(java.lang.String)
// .commitGenerated(java.lang.Boolean)
// .gitIgnoreOptions(IgnoreFileOptions)
// .gitOptions(GitOptions)
// .logging(LoggerOptions)
// .outdir(java.lang.String)
// .parent(Project)
// .projenCommand(java.lang.String)
// .projenrcJson(java.lang.Boolean)
// .projenrcJsonOptions(ProjenrcJsonOptions)
// .renovatebot(java.lang.Boolean)
// .renovatebotOptions(RenovatebotOptions)
.smithyOptions(SmithyModelOptions)
// .handlerLanguages(java.util.List<Language>)
.parsedSpecFile(java.lang.String)
.build();
| Name | Type | Description |
|---|---|---|
name |
java.lang.String |
This is the name of your project. |
commitGenerated |
java.lang.Boolean |
Whether to commit the managed files by default. |
gitIgnoreOptions |
io.github.cdklabs.projen.IgnoreFileOptions |
Configuration options for .gitignore file. |
gitOptions |
io.github.cdklabs.projen.GitOptions |
Configuration options for git. |
logging |
io.github.cdklabs.projen.LoggerOptions |
Configure logging options such as verbosity. |
outdir |
java.lang.String |
The root directory of the project. |
parent |
io.github.cdklabs.projen.Project |
The parent project, if this project is part of a bigger project. |
projenCommand |
java.lang.String |
The shell command to use in order to run the projen CLI. |
projenrcJson |
java.lang.Boolean |
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation. |
projenrcJsonOptions |
io.github.cdklabs.projen.ProjenrcJsonOptions |
Options for .projenrc.json. |
renovatebot |
java.lang.Boolean |
Use renovatebot to handle dependency upgrades. |
renovatebotOptions |
io.github.cdklabs.projen.RenovatebotOptions |
Options for renovatebot. |
smithyOptions |
SmithyModelOptions |
Smithy engine options. |
handlerLanguages |
java.util.List<Language> |
The languages users have specified for handler projects (if any). |
parsedSpecFile |
java.lang.String |
Path of the parsed/bundled OpenAPI specification (relative to the project root). |
nameRequired
- Type: java.lang.String
- Default: $BASEDIR
This is the name of your project.
commitGeneratedOptional
- Type: java.lang.Boolean
- Default: true
Whether to commit the managed files by default.
gitIgnoreOptionsOptional
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptionsOptional
- Type: io.github.cdklabs.projen.GitOptions
Configuration options for git.
loggingOptional
- Type: io.github.cdklabs.projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
outdirOptional
- Type: java.lang.String
- Default: "."
The root directory of the project.
Relative to this directory, all files are synthesized.
If this project has a parent, this directory is relative to the parent directory and it cannot be the same as the parent or any of it's other subprojects.
parentOptional
- Type: io.github.cdklabs.projen.Project
The parent project, if this project is part of a bigger project.
projenCommandOptional
- Type: java.lang.String
- Default: "npx projen"
The shell command to use in order to run the projen CLI.
Can be used to customize in special environments.
projenrcJsonOptional
- Type: java.lang.Boolean
- Default: false
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation.
projenrcJsonOptionsOptional
- Type: io.github.cdklabs.projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
renovatebotOptional
- Type: java.lang.Boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptionsOptional
- Type: io.github.cdklabs.projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
smithyOptionsRequired
- Type: SmithyModelOptions
Smithy engine options.
handlerLanguagesOptional
- Type: java.util.List<Language>
The languages users have specified for handler projects (if any).
parsedSpecFileRequired
- Type: java.lang.String
Path of the parsed/bundled OpenAPI specification (relative to the project root).
Methods
| Name | Description |
|---|---|
toString |
Returns a string representation of this construct. |
addExcludeFromCleanup |
Exclude the matching files from pre-synth cleanup. |
addGitIgnore |
Adds a .gitignore pattern. |
addPackageIgnore |
Exclude these files from the bundled package. |
addTask |
Adds a new task to this project. |
addTip |
Prints a "tip" message during synthesis. |
annotateGenerated |
Consider a set of files as "generated". |
postSynthesize |
Called after all components are synthesized. |
preSynthesize |
Called before all components are synthesized. |
removeTask |
Removes a task from a project. |
runTaskCommand |
Returns the shell command to execute in order to run a task. |
synth |
Synthesize all project files into outdir. |
tryFindFile |
Finds a file at the specified relative path within this project and all its subprojects. |
tryFindJsonFile |
Finds a json file by name. |
tryFindObjectFile |
Finds an object file (like JsonFile, YamlFile, etc.) by name. |
tryRemoveFile |
Finds a file at the specified relative path within this project and removes it. |
addSmithyDeps |
Add a dependency on other smithy projects. |
smithyProjectDefinition |
Returns the smithy project definition. |
toString
public java.lang.String toString()
Returns a string representation of this construct.
addExcludeFromCleanup
public void addExcludeFromCleanup(java.lang.String globs)
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.
globsRequired
- Type: java.lang.String
The glob patterns to match.
addGitIgnore
public void addGitIgnore(java.lang.String pattern)
Adds a .gitignore pattern.
patternRequired
- Type: java.lang.String
The glob pattern to ignore.
addPackageIgnore
public void addPackageIgnore(java.lang.String _pattern)
Exclude these files from the bundled package.
Implemented by project types based on the
packaging mechanism. For example, NodeProject delegates this to .npmignore.
_patternRequired
- Type: java.lang.String
The glob pattern to exclude.
addTask
public Task addTask(java.lang.String name)
public Task addTask(java.lang.String name, TaskOptions props)
Adds a new task to this project.
This will fail if the project already has a task with this name.
nameRequired
- Type: java.lang.String
The task name to add.
propsOptional
- Type: io.github.cdklabs.projen.TaskOptions
Task properties.
~~addTip~~
public void addTip(java.lang.String message)
Prints a "tip" message during synthesis.
messageRequired
- Type: java.lang.String
The message.
annotateGenerated
public void annotateGenerated(java.lang.String _glob)
Consider a set of files as "generated".
This method is implemented by derived classes and used for example, to add git attributes to tell GitHub that certain files are generated.
_globRequired
- Type: java.lang.String
the glob pattern to match (could be a file path).
postSynthesize
public void postSynthesize()
Called after all components are synthesized.
Order is not guaranteed.
preSynthesize
public void preSynthesize()
Called before all components are synthesized.
removeTask
public Task removeTask(java.lang.String name)
Removes a task from a project.
nameRequired
- Type: java.lang.String
The name of the task to remove.
runTaskCommand
public java.lang.String runTaskCommand(Task task)
Returns the shell command to execute in order to run a task.
By default, this is npx projen@<version> <task>
taskRequired
- Type: io.github.cdklabs.projen.Task
The task for which the command is required.
synth
public void synth()
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()"
tryFindFile
public FileBase tryFindFile(java.lang.String filePath)
Finds a file at the specified relative path within this project and all its subprojects.
filePathRequired
- Type: java.lang.String
The file path.
If this path is relative, it will be resolved from the root of this project.
~~tryFindJsonFile~~
public JsonFile tryFindJsonFile(java.lang.String filePath)
Finds a json file by name.
filePathRequired
- Type: java.lang.String
The file path.
tryFindObjectFile
public ObjectFile tryFindObjectFile(java.lang.String filePath)
Finds an object file (like JsonFile, YamlFile, etc.) by name.
filePathRequired
- Type: java.lang.String
The file path.
tryRemoveFile
public FileBase tryRemoveFile(java.lang.String filePath)
Finds a file at the specified relative path within this project and removes it.
filePathRequired
- Type: java.lang.String
The file path.
If this path is relative, it will be resolved from the root of this project.
addSmithyDeps
public void addSmithyDeps(SmithyBaseProject deps)
Add a dependency on other smithy projects.
depsRequired
- Type: SmithyBaseProject
smithyProjectDefinition
public SmithyProjectDefinition smithyProjectDefinition()
Returns the smithy project definition.
Static Functions
| Name | Description |
|---|---|
isConstruct |
Checks if x is a construct. |
isProject |
Test whether the given construct is a project. |
of |
Find the closest ancestor project for given construct. |
isConstruct
import software.aws.pdk.type_safe_api.SmithyModelProject;
SmithyModelProject.isConstruct(java.lang.Object x)
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.
xRequired
- Type: java.lang.Object
Any object.
isProject
import software.aws.pdk.type_safe_api.SmithyModelProject;
SmithyModelProject.isProject(java.lang.Object x)
Test whether the given construct is a project.
xRequired
- Type: java.lang.Object
of
import software.aws.pdk.type_safe_api.SmithyModelProject;
SmithyModelProject.of(IConstruct construct)
Find the closest ancestor project for given construct.
When given a project, this it the project itself.
constructRequired
- Type: software.constructs.IConstruct
Properties
| Name | Type | Description |
|---|---|---|
node |
software.constructs.Node |
The tree node. |
buildTask |
io.github.cdklabs.projen.Task |
No description. |
commitGenerated |
java.lang.Boolean |
Whether to commit the managed files by default. |
compileTask |
io.github.cdklabs.projen.Task |
No description. |
components |
java.util.List |
Returns all the components within this project. |
deps |
io.github.cdklabs.projen.Dependencies |
Project dependencies. |
ejected |
java.lang.Boolean |
Whether or not the project is being ejected. |
files |
java.util.List |
All files in this project. |
gitattributes |
io.github.cdklabs.projen.GitAttributesFile |
The .gitattributes file for this repository. |
gitignore |
io.github.cdklabs.projen.IgnoreFile |
.gitignore. |
logger |
io.github.cdklabs.projen.Logger |
Logging utilities. |
name |
java.lang.String |
Project name. |
outdir |
java.lang.String |
Absolute output directory of this project. |
packageTask |
io.github.cdklabs.projen.Task |
No description. |
postCompileTask |
io.github.cdklabs.projen.Task |
No description. |
preCompileTask |
io.github.cdklabs.projen.Task |
No description. |
projectBuild |
io.github.cdklabs.projen.ProjectBuild |
Manages the build process of the project. |
projenCommand |
java.lang.String |
The command to use in order to run the projen CLI. |
root |
io.github.cdklabs.projen.Project |
The root project. |
subprojects |
java.util.List |
Returns all the subprojects within this project. |
tasks |
io.github.cdklabs.projen.Tasks |
Project tasks. |
testTask |
io.github.cdklabs.projen.Task |
No description. |
defaultTask |
io.github.cdklabs.projen.Task |
This is the "default" task, the one that executes "projen". |
initProject |
io.github.cdklabs.projen.InitProject |
The options used when this project is bootstrapped via projen new. |
parent |
io.github.cdklabs.projen.Project |
A parent project. |
apiName |
java.lang.String |
Name of the API. |
definition |
SmithyServiceProjectDefinition |
Smithy model and build settings. |
nodeRequired
public Node getNode();
- Type: software.constructs.Node
The tree node.
buildTaskRequired
public Task getBuildTask();
- Type: io.github.cdklabs.projen.Task
commitGeneratedRequired
public java.lang.Boolean getCommitGenerated();
- Type: java.lang.Boolean
Whether to commit the managed files by default.
compileTaskRequired
public Task getCompileTask();
- Type: io.github.cdklabs.projen.Task
componentsRequired
public java.util.List<Component> getComponents();
- Type: java.util.List
Returns all the components within this project.
depsRequired
public Dependencies getDeps();
- Type: io.github.cdklabs.projen.Dependencies
Project dependencies.
ejectedRequired
public java.lang.Boolean getEjected();
- Type: java.lang.Boolean
Whether or not the project is being ejected.
filesRequired
public java.util.List<FileBase> getFiles();
- Type: java.util.List
All files in this project.
gitattributesRequired
public GitAttributesFile getGitattributes();
- Type: io.github.cdklabs.projen.GitAttributesFile
The .gitattributes file for this repository.
gitignoreRequired
public IgnoreFile getGitignore();
- Type: io.github.cdklabs.projen.IgnoreFile
.gitignore.
loggerRequired
public Logger getLogger();
- Type: io.github.cdklabs.projen.Logger
Logging utilities.
nameRequired
public java.lang.String getName();
- Type: java.lang.String
Project name.
outdirRequired
public java.lang.String getOutdir();
- Type: java.lang.String
Absolute output directory of this project.
packageTaskRequired
public Task getPackageTask();
- Type: io.github.cdklabs.projen.Task
postCompileTaskRequired
public Task getPostCompileTask();
- Type: io.github.cdklabs.projen.Task
preCompileTaskRequired
public Task getPreCompileTask();
- Type: io.github.cdklabs.projen.Task
projectBuildRequired
public ProjectBuild getProjectBuild();
- Type: io.github.cdklabs.projen.ProjectBuild
Manages the build process of the project.
projenCommandRequired
public java.lang.String getProjenCommand();
- Type: java.lang.String
The command to use in order to run the projen CLI.
rootRequired
public Project getRoot();
- Type: io.github.cdklabs.projen.Project
The root project.
subprojectsRequired
public java.util.List<Project> getSubprojects();
- Type: java.util.List
Returns all the subprojects within this project.
tasksRequired
public Tasks getTasks();
- Type: io.github.cdklabs.projen.Tasks
Project tasks.
testTaskRequired
public Task getTestTask();
- Type: io.github.cdklabs.projen.Task
defaultTaskOptional
public Task getDefaultTask();
- Type: io.github.cdklabs.projen.Task
This is the "default" task, the one that executes "projen".
Undefined if the project is being ejected.
initProjectOptional
public InitProject getInitProject();
- Type: io.github.cdklabs.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.
parentOptional
public Project getParent();
- Type: io.github.cdklabs.projen.Project
A parent project.
If undefined, this is the root project.
apiNameRequired
public java.lang.String getApiName();
- Type: java.lang.String
Name of the API.
definitionRequired
public SmithyServiceProjectDefinition getDefinition();
Smithy model and build settings.
Constants
| Name | Type | Description |
|---|---|---|
DEFAULT_TASK |
java.lang.String |
The name of the default task (the task executed when projen is run without arguments). |
DEFAULT_TASKRequired
public java.lang.String getDefaultTask();
- Type: java.lang.String
The name of the default task (the task executed when projen is run without arguments).
Normally this task should synthesize the project files.
SmithyProjectDefinition
Definition for a Smithy project.
Initializers
import software.aws.pdk.type_safe_api.SmithyProjectDefinition;
SmithyProjectDefinition.Builder.create(Project project)
// .ignoreGradleWrapper(java.lang.Boolean)
// .ignoreSmithyBuildOutput(java.lang.Boolean)
// .smithyBuildOptions(SmithyBuildOptions)
.build();
| Name | Type | Description |
|---|---|---|
project |
io.github.cdklabs.projen.Project |
No description. |
ignoreGradleWrapper |
java.lang.Boolean |
Set to false if you would like to check in your gradle wrapper. |
ignoreSmithyBuildOutput |
java.lang.Boolean |
Set to false if you would like to check in your smithy build output or have more fine-grained control over what is checked in, eg if you add other projections to the smithy-build.json file. |
smithyBuildOptions |
SmithyBuildOptions |
Smithy build options. |
projectRequired
- Type: io.github.cdklabs.projen.Project
ignoreGradleWrapperOptional
- Type: java.lang.Boolean
- Default: true
Set to false if you would like to check in your gradle wrapper.
Do so if you would like to use a different version of gradle to the one provided by default
ignoreSmithyBuildOutputOptional
- Type: java.lang.Boolean
- Default: true
Set to false if you would like to check in your smithy build output or have more fine-grained control over what is checked in, eg if you add other projections to the smithy-build.json file.
smithyBuildOptionsOptional
- Type: SmithyBuildOptions
Smithy build options.
Methods
| Name | Description |
|---|---|
toString |
Returns a string representation of this construct. |
postSynthesize |
Called after synthesis. |
preSynthesize |
Called before synthesis. |
synthesize |
Synthesizes files to the project output directory. |
addDeps |
Add maven-style or local file dependencies to the smithy model project. |
addSmithyDeps |
Add dependencies on other smithy models, such that their shapes can be imported in this project. |
addSources |
Add additional paths to model source files or directories. |
toString
public java.lang.String toString()
Returns a string representation of this construct.
postSynthesize
public void postSynthesize()
Called after synthesis.
Order is not guaranteed.
preSynthesize
public void preSynthesize()
Called before synthesis.
synthesize
public void synthesize()
Synthesizes files to the project output directory.
addDeps
public void addDeps(java.lang.String deps)
Add maven-style or local file dependencies to the smithy model project.
depsRequired
- Type: java.lang.String
dependencies to add, eg "software.amazon.smithy:smithy-validation-model:1.27.2" or "file://../some/path/build/lib/my-shapes.jar.
addSmithyDeps
public void addSmithyDeps(SmithyProjectDefinition deps)
Add dependencies on other smithy models, such that their shapes can be imported in this project.
depsRequired
- Type: SmithyProjectDefinition
smithy definitions to depend on.
addSources
public void addSources(java.lang.String sources)
Add additional paths to model source files or directories.
Paths should be relative to the project outdir. Any absolute paths will be resolved as relative paths.
sourcesRequired
- Type: java.lang.String
Static Functions
| Name | Description |
|---|---|
isConstruct |
Checks if x is a construct. |
isComponent |
Test whether the given construct is a component. |
isConstruct
import software.aws.pdk.type_safe_api.SmithyProjectDefinition;
SmithyProjectDefinition.isConstruct(java.lang.Object x)
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.
xRequired
- Type: java.lang.Object
Any object.
isComponent
import software.aws.pdk.type_safe_api.SmithyProjectDefinition;
SmithyProjectDefinition.isComponent(java.lang.Object x)
Test whether the given construct is a component.
xRequired
- Type: java.lang.Object
Properties
| Name | Type | Description |
|---|---|---|
node |
software.constructs.Node |
The tree node. |
project |
io.github.cdklabs.projen.Project |
No description. |
gradleProjectName |
java.lang.String |
Name of the gradle project. |
modelDir |
java.lang.String |
Directory of model source code. |
nodeRequired
public Node getNode();
- Type: software.constructs.Node
The tree node.
projectRequired
public Project getProject();
- Type: io.github.cdklabs.projen.Project
gradleProjectNameRequired
public java.lang.String getGradleProjectName();
- Type: java.lang.String
Name of the gradle project.
modelDirRequired
public java.lang.String getModelDir();
- Type: java.lang.String
Directory of model source code.
SmithyServiceProjectDefinition
Creates a project which defines a Smithy service, and transforms the Smithy model to OpenAPI.
Initializers
import software.aws.pdk.type_safe_api.SmithyServiceProjectDefinition;
SmithyServiceProjectDefinition.Builder.create(Project project)
.smithyOptions(SmithyModelOptions)
// .handlerLanguages(java.util.List<Language>)
.build();
| Name | Type | Description |
|---|---|---|
project |
io.github.cdklabs.projen.Project |
No description. |
smithyOptions |
SmithyModelOptions |
Smithy engine options. |
handlerLanguages |
java.util.List<Language> |
The languages users have specified for handler projects (if any). |
projectRequired
- Type: io.github.cdklabs.projen.Project
smithyOptionsRequired
- Type: SmithyModelOptions
Smithy engine options.
handlerLanguagesOptional
- Type: java.util.List<Language>
The languages users have specified for handler projects (if any).
Methods
| Name | Description |
|---|---|
toString |
Returns a string representation of this construct. |
postSynthesize |
Called after synthesis. |
preSynthesize |
Called before synthesis. |
synthesize |
Synthesizes files to the project output directory. |
addDeps |
Add maven-style or local file dependencies to the smithy model project. |
addSmithyDeps |
Add dependencies on other smithy models, such that their shapes can be imported in this project. |
addSources |
Add additional paths to model source files or directories. |
toString
public java.lang.String toString()
Returns a string representation of this construct.
postSynthesize
public void postSynthesize()
Called after synthesis.
Order is not guaranteed.
preSynthesize
public void preSynthesize()
Called before synthesis.
synthesize
public void synthesize()
Synthesizes files to the project output directory.
addDeps
public void addDeps(java.lang.String deps)
Add maven-style or local file dependencies to the smithy model project.
depsRequired
- Type: java.lang.String
dependencies to add, eg "software.amazon.smithy:smithy-validation-model:1.27.2" or "file://../some/path/build/lib/my-shapes.jar.
addSmithyDeps
public void addSmithyDeps(SmithyProjectDefinition deps)
Add dependencies on other smithy models, such that their shapes can be imported in this project.
depsRequired
- Type: SmithyProjectDefinition
smithy definitions to depend on.
addSources
public void addSources(java.lang.String sources)
Add additional paths to model source files or directories.
Paths should be relative to the project outdir. Any absolute paths will be resolved as relative paths.
sourcesRequired
- Type: java.lang.String
Static Functions
| Name | Description |
|---|---|
isConstruct |
Checks if x is a construct. |
isComponent |
Test whether the given construct is a component. |
isConstruct
import software.aws.pdk.type_safe_api.SmithyServiceProjectDefinition;
SmithyServiceProjectDefinition.isConstruct(java.lang.Object x)
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.
xRequired
- Type: java.lang.Object
Any object.
isComponent
import software.aws.pdk.type_safe_api.SmithyServiceProjectDefinition;
SmithyServiceProjectDefinition.isComponent(java.lang.Object x)
Test whether the given construct is a component.
xRequired
- Type: java.lang.Object
Properties
| Name | Type | Description |
|---|---|---|
node |
software.constructs.Node |
The tree node. |
project |
io.github.cdklabs.projen.Project |
No description. |
gradleProjectName |
java.lang.String |
Name of the gradle project. |
modelDir |
java.lang.String |
Directory of model source code. |
generatedModelDir |
java.lang.String |
Directory of generated model source code. |
openApiSpecificationPath |
java.lang.String |
Path to the generated OpenAPI specification, relative to the project outdir. |
smithyJsonModelPath |
java.lang.String |
Path to the json Smithy model, relative to the project outdir. |
nodeRequired
public Node getNode();
- Type: software.constructs.Node
The tree node.
projectRequired
public Project getProject();
- Type: io.github.cdklabs.projen.Project
gradleProjectNameRequired
public java.lang.String getGradleProjectName();
- Type: java.lang.String
Name of the gradle project.
modelDirRequired
public java.lang.String getModelDir();
- Type: java.lang.String
Directory of model source code.
generatedModelDirRequired
public java.lang.String getGeneratedModelDir();
- Type: java.lang.String
Directory of generated model source code.
openApiSpecificationPathRequired
public java.lang.String getOpenApiSpecificationPath();
- Type: java.lang.String
Path to the generated OpenAPI specification, relative to the project outdir.
smithyJsonModelPathRequired
public java.lang.String getSmithyJsonModelPath();
- Type: java.lang.String
Path to the json Smithy model, relative to the project outdir.
SmithyShapeLibraryProject
A project for defining a library of Smithy shapes which can be consumed by other projects.
Initializers
import software.aws.pdk.type_safe_api.SmithyShapeLibraryProject;
SmithyShapeLibraryProject.Builder.create()
.name(java.lang.String)
// .commitGenerated(java.lang.Boolean)
// .gitIgnoreOptions(IgnoreFileOptions)
// .gitOptions(GitOptions)
// .logging(LoggerOptions)
// .outdir(java.lang.String)
// .parent(Project)
// .projenCommand(java.lang.String)
// .projenrcJson(java.lang.Boolean)
// .projenrcJsonOptions(ProjenrcJsonOptions)
// .renovatebot(java.lang.Boolean)
// .renovatebotOptions(RenovatebotOptions)
// .ignoreGradleWrapper(java.lang.Boolean)
// .ignoreSmithyBuildOutput(java.lang.Boolean)
// .smithyBuildOptions(SmithyBuildOptions)
.build();
| Name | Type | Description |
|---|---|---|
name |
java.lang.String |
This is the name of your project. |
commitGenerated |
java.lang.Boolean |
Whether to commit the managed files by default. |
gitIgnoreOptions |
io.github.cdklabs.projen.IgnoreFileOptions |
Configuration options for .gitignore file. |
gitOptions |
io.github.cdklabs.projen.GitOptions |
Configuration options for git. |
logging |
io.github.cdklabs.projen.LoggerOptions |
Configure logging options such as verbosity. |
outdir |
java.lang.String |
The root directory of the project. |
parent |
io.github.cdklabs.projen.Project |
The parent project, if this project is part of a bigger project. |
projenCommand |
java.lang.String |
The shell command to use in order to run the projen CLI. |
projenrcJson |
java.lang.Boolean |
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation. |
projenrcJsonOptions |
io.github.cdklabs.projen.ProjenrcJsonOptions |
Options for .projenrc.json. |
renovatebot |
java.lang.Boolean |
Use renovatebot to handle dependency upgrades. |
renovatebotOptions |
io.github.cdklabs.projen.RenovatebotOptions |
Options for renovatebot. |
ignoreGradleWrapper |
java.lang.Boolean |
Set to false if you would like to check in your gradle wrapper. |
ignoreSmithyBuildOutput |
java.lang.Boolean |
Set to false if you would like to check in your smithy build output or have more fine-grained control over what is checked in, eg if you add other projections to the smithy-build.json file. |
smithyBuildOptions |
SmithyBuildOptions |
Smithy build options. |
nameRequired
- Type: java.lang.String
- Default: $BASEDIR
This is the name of your project.
commitGeneratedOptional
- Type: java.lang.Boolean
- Default: true
Whether to commit the managed files by default.
gitIgnoreOptionsOptional
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptionsOptional
- Type: io.github.cdklabs.projen.GitOptions
Configuration options for git.
loggingOptional
- Type: io.github.cdklabs.projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
outdirOptional
- Type: java.lang.String
- Default: "."
The root directory of the project.
Relative to this directory, all files are synthesized.
If this project has a parent, this directory is relative to the parent directory and it cannot be the same as the parent or any of it's other subprojects.
parentOptional
- Type: io.github.cdklabs.projen.Project
The parent project, if this project is part of a bigger project.
projenCommandOptional
- Type: java.lang.String
- Default: "npx projen"
The shell command to use in order to run the projen CLI.
Can be used to customize in special environments.
projenrcJsonOptional
- Type: java.lang.Boolean
- Default: false
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation.
projenrcJsonOptionsOptional
- Type: io.github.cdklabs.projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
renovatebotOptional
- Type: java.lang.Boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptionsOptional
- Type: io.github.cdklabs.projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
ignoreGradleWrapperOptional
- Type: java.lang.Boolean
- Default: true
Set to false if you would like to check in your gradle wrapper.
Do so if you would like to use a different version of gradle to the one provided by default
ignoreSmithyBuildOutputOptional
- Type: java.lang.Boolean
- Default: true
Set to false if you would like to check in your smithy build output or have more fine-grained control over what is checked in, eg if you add other projections to the smithy-build.json file.
smithyBuildOptionsOptional
- Type: SmithyBuildOptions
Smithy build options.
Methods
| Name | Description |
|---|---|
toString |
Returns a string representation of this construct. |
addExcludeFromCleanup |
Exclude the matching files from pre-synth cleanup. |
addGitIgnore |
Adds a .gitignore pattern. |
addPackageIgnore |
Exclude these files from the bundled package. |
addTask |
Adds a new task to this project. |
addTip |
Prints a "tip" message during synthesis. |
annotateGenerated |
Consider a set of files as "generated". |
postSynthesize |
Called after all components are synthesized. |
preSynthesize |
Called before all components are synthesized. |
removeTask |
Removes a task from a project. |
runTaskCommand |
Returns the shell command to execute in order to run a task. |
synth |
Synthesize all project files into outdir. |
tryFindFile |
Finds a file at the specified relative path within this project and all its subprojects. |
tryFindJsonFile |
Finds a json file by name. |
tryFindObjectFile |
Finds an object file (like JsonFile, YamlFile, etc.) by name. |
tryRemoveFile |
Finds a file at the specified relative path within this project and removes it. |
addSmithyDeps |
Add a dependency on other smithy projects. |
smithyProjectDefinition |
Returns the smithy project definition. |
toString
public java.lang.String toString()
Returns a string representation of this construct.
addExcludeFromCleanup
public void addExcludeFromCleanup(java.lang.String globs)
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.
globsRequired
- Type: java.lang.String
The glob patterns to match.
addGitIgnore
public void addGitIgnore(java.lang.String pattern)
Adds a .gitignore pattern.
patternRequired
- Type: java.lang.String
The glob pattern to ignore.
addPackageIgnore
public void addPackageIgnore(java.lang.String _pattern)
Exclude these files from the bundled package.
Implemented by project types based on the
packaging mechanism. For example, NodeProject delegates this to .npmignore.
_patternRequired
- Type: java.lang.String
The glob pattern to exclude.
addTask
public Task addTask(java.lang.String name)
public Task addTask(java.lang.String name, TaskOptions props)
Adds a new task to this project.
This will fail if the project already has a task with this name.
nameRequired
- Type: java.lang.String
The task name to add.
propsOptional
- Type: io.github.cdklabs.projen.TaskOptions
Task properties.
~~addTip~~
public void addTip(java.lang.String message)
Prints a "tip" message during synthesis.
messageRequired
- Type: java.lang.String
The message.
annotateGenerated
public void annotateGenerated(java.lang.String _glob)
Consider a set of files as "generated".
This method is implemented by derived classes and used for example, to add git attributes to tell GitHub that certain files are generated.
_globRequired
- Type: java.lang.String
the glob pattern to match (could be a file path).
postSynthesize
public void postSynthesize()
Called after all components are synthesized.
Order is not guaranteed.
preSynthesize
public void preSynthesize()
Called before all components are synthesized.
removeTask
public Task removeTask(java.lang.String name)
Removes a task from a project.
nameRequired
- Type: java.lang.String
The name of the task to remove.
runTaskCommand
public java.lang.String runTaskCommand(Task task)
Returns the shell command to execute in order to run a task.
By default, this is npx projen@<version> <task>
taskRequired
- Type: io.github.cdklabs.projen.Task
The task for which the command is required.
synth
public void synth()
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()"
tryFindFile
public FileBase tryFindFile(java.lang.String filePath)
Finds a file at the specified relative path within this project and all its subprojects.
filePathRequired
- Type: java.lang.String
The file path.
If this path is relative, it will be resolved from the root of this project.
~~tryFindJsonFile~~
public JsonFile tryFindJsonFile(java.lang.String filePath)
Finds a json file by name.
filePathRequired
- Type: java.lang.String
The file path.
tryFindObjectFile
public ObjectFile tryFindObjectFile(java.lang.String filePath)
Finds an object file (like JsonFile, YamlFile, etc.) by name.
filePathRequired
- Type: java.lang.String
The file path.
tryRemoveFile
public FileBase tryRemoveFile(java.lang.String filePath)
Finds a file at the specified relative path within this project and removes it.
filePathRequired
- Type: java.lang.String
The file path.
If this path is relative, it will be resolved from the root of this project.
addSmithyDeps
public void addSmithyDeps(SmithyBaseProject deps)
Add a dependency on other smithy projects.
depsRequired
- Type: SmithyBaseProject
smithyProjectDefinition
public SmithyProjectDefinition smithyProjectDefinition()
Returns the smithy project definition.
Static Functions
| Name | Description |
|---|---|
isConstruct |
Checks if x is a construct. |
isProject |
Test whether the given construct is a project. |
of |
Find the closest ancestor project for given construct. |
isConstruct
import software.aws.pdk.type_safe_api.SmithyShapeLibraryProject;
SmithyShapeLibraryProject.isConstruct(java.lang.Object x)
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.
xRequired
- Type: java.lang.Object
Any object.
isProject
import software.aws.pdk.type_safe_api.SmithyShapeLibraryProject;
SmithyShapeLibraryProject.isProject(java.lang.Object x)
Test whether the given construct is a project.
xRequired
- Type: java.lang.Object
of
import software.aws.pdk.type_safe_api.SmithyShapeLibraryProject;
SmithyShapeLibraryProject.of(IConstruct construct)
Find the closest ancestor project for given construct.
When given a project, this it the project itself.
constructRequired
- Type: software.constructs.IConstruct
Properties
| Name | Type | Description |
|---|---|---|
node |
software.constructs.Node |
The tree node. |
buildTask |
io.github.cdklabs.projen.Task |
No description. |
commitGenerated |
java.lang.Boolean |
Whether to commit the managed files by default. |
compileTask |
io.github.cdklabs.projen.Task |
No description. |
components |
java.util.List |
Returns all the components within this project. |
deps |
io.github.cdklabs.projen.Dependencies |
Project dependencies. |
ejected |
java.lang.Boolean |
Whether or not the project is being ejected. |
files |
java.util.List |
All files in this project. |
gitattributes |
io.github.cdklabs.projen.GitAttributesFile |
The .gitattributes file for this repository. |
gitignore |
io.github.cdklabs.projen.IgnoreFile |
.gitignore. |
logger |
io.github.cdklabs.projen.Logger |
Logging utilities. |
name |
java.lang.String |
Project name. |
outdir |
java.lang.String |
Absolute output directory of this project. |
packageTask |
io.github.cdklabs.projen.Task |
No description. |
postCompileTask |
io.github.cdklabs.projen.Task |
No description. |
preCompileTask |
io.github.cdklabs.projen.Task |
No description. |
projectBuild |
io.github.cdklabs.projen.ProjectBuild |
Manages the build process of the project. |
projenCommand |
java.lang.String |
The command to use in order to run the projen CLI. |
root |
io.github.cdklabs.projen.Project |
The root project. |
subprojects |
java.util.List |
Returns all the subprojects within this project. |
tasks |
io.github.cdklabs.projen.Tasks |
Project tasks. |
testTask |
io.github.cdklabs.projen.Task |
No description. |
defaultTask |
io.github.cdklabs.projen.Task |
This is the "default" task, the one that executes "projen". |
initProject |
io.github.cdklabs.projen.InitProject |
The options used when this project is bootstrapped via projen new. |
parent |
io.github.cdklabs.projen.Project |
A parent project. |
definition |
SmithyProjectDefinition |
Smithy model and build settings. |
nodeRequired
public Node getNode();
- Type: software.constructs.Node
The tree node.
buildTaskRequired
public Task getBuildTask();
- Type: io.github.cdklabs.projen.Task
commitGeneratedRequired
public java.lang.Boolean getCommitGenerated();
- Type: java.lang.Boolean
Whether to commit the managed files by default.
compileTaskRequired
public Task getCompileTask();
- Type: io.github.cdklabs.projen.Task
componentsRequired
public java.util.List<Component> getComponents();
- Type: java.util.List
Returns all the components within this project.
depsRequired
public Dependencies getDeps();
- Type: io.github.cdklabs.projen.Dependencies
Project dependencies.
ejectedRequired
public java.lang.Boolean getEjected();
- Type: java.lang.Boolean
Whether or not the project is being ejected.
filesRequired
public java.util.List<FileBase> getFiles();
- Type: java.util.List
All files in this project.
gitattributesRequired
public GitAttributesFile getGitattributes();
- Type: io.github.cdklabs.projen.GitAttributesFile
The .gitattributes file for this repository.
gitignoreRequired
public IgnoreFile getGitignore();
- Type: io.github.cdklabs.projen.IgnoreFile
.gitignore.
loggerRequired
public Logger getLogger();
- Type: io.github.cdklabs.projen.Logger
Logging utilities.
nameRequired
public java.lang.String getName();
- Type: java.lang.String
Project name.
outdirRequired
public java.lang.String getOutdir();
- Type: java.lang.String
Absolute output directory of this project.
packageTaskRequired
public Task getPackageTask();
- Type: io.github.cdklabs.projen.Task
postCompileTaskRequired
public Task getPostCompileTask();
- Type: io.github.cdklabs.projen.Task
preCompileTaskRequired
public Task getPreCompileTask();
- Type: io.github.cdklabs.projen.Task
projectBuildRequired
public ProjectBuild getProjectBuild();
- Type: io.github.cdklabs.projen.ProjectBuild
Manages the build process of the project.
projenCommandRequired
public java.lang.String getProjenCommand();
- Type: java.lang.String
The command to use in order to run the projen CLI.
rootRequired
public Project getRoot();
- Type: io.github.cdklabs.projen.Project
The root project.
subprojectsRequired
public java.util.List<Project> getSubprojects();
- Type: java.util.List
Returns all the subprojects within this project.
tasksRequired
public Tasks getTasks();
- Type: io.github.cdklabs.projen.Tasks
Project tasks.
testTaskRequired
public Task getTestTask();
- Type: io.github.cdklabs.projen.Task
defaultTaskOptional
public Task getDefaultTask();
- Type: io.github.cdklabs.projen.Task
This is the "default" task, the one that executes "projen".
Undefined if the project is being ejected.
initProjectOptional
public InitProject getInitProject();
- Type: io.github.cdklabs.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.
parentOptional
public Project getParent();
- Type: io.github.cdklabs.projen.Project
A parent project.
If undefined, this is the root project.
definitionRequired
public SmithyProjectDefinition getDefinition();
- Type: SmithyProjectDefinition
Smithy model and build settings.
Constants
| Name | Type | Description |
|---|---|---|
DEFAULT_TASK |
java.lang.String |
The name of the default task (the task executed when projen is run without arguments). |
DEFAULT_TASKRequired
public java.lang.String getDefaultTask();
- Type: java.lang.String
The name of the default task (the task executed when projen is run without arguments).
Normally this task should synthesize the project files.
SnapStartFunction
A lambda function which enables SnapStart on published versions by default.
Initializers
import software.aws.pdk.type_safe_api.SnapStartFunction;
SnapStartFunction.Builder.create(Construct scope, java.lang.String id)
// .maxEventAge(Duration)
// .onFailure(IDestination)
// .onSuccess(IDestination)
// .retryAttempts(java.lang.Number)
// .adotInstrumentation(AdotInstrumentationConfig)
// .allowAllIpv6Outbound(java.lang.Boolean)
// .allowAllOutbound(java.lang.Boolean)
// .allowPublicSubnet(java.lang.Boolean)
// .applicationLogLevel(java.lang.String)
// .applicationLogLevelV2(ApplicationLogLevel)
// .architecture(Architecture)
// .codeSigningConfig(ICodeSigningConfig)
// .currentVersionOptions(VersionOptions)
// .deadLetterQueue(IQueue)
// .deadLetterQueueEnabled(java.lang.Boolean)
// .deadLetterTopic(ITopic)
// .description(java.lang.String)
// .environment(java.util.Map<java.lang.String, java.lang.String>)
// .environmentEncryption(IKey)
// .ephemeralStorageSize(Size)
// .events(java.util.List<IEventSource>)
// .filesystem(FileSystem)
// .functionName(java.lang.String)
// .initialPolicy(java.util.List<PolicyStatement>)
// .insightsVersion(LambdaInsightsVersion)
// .ipv6AllowedForDualStack(java.lang.Boolean)
// .layers(java.util.List<ILayerVersion>)
// .logFormat(java.lang.String)
// .loggingFormat(LoggingFormat)
// .logGroup(ILogGroup)
// .logRetention(RetentionDays)
// .logRetentionRetryOptions(LogRetentionRetryOptions)
// .logRetentionRole(IRole)
// .memorySize(java.lang.Number)
// .paramsAndSecrets(ParamsAndSecretsLayerVersion)
// .profiling(java.lang.Boolean)
// .profilingGroup(IProfilingGroup)
// .recursiveLoop(RecursiveLoop)
// .reservedConcurrentExecutions(java.lang.Number)
// .role(IRole)
// .runtimeManagementMode(RuntimeManagementMode)
// .securityGroups(java.util.List<ISecurityGroup>)
// .snapStart(SnapStartConf)
// .systemLogLevel(java.lang.String)
// .systemLogLevelV2(SystemLogLevel)
// .timeout(Duration)
// .tracing(Tracing)
// .vpc(IVpc)
// .vpcSubnets(SubnetSelection)
.code(Code)
.handler(java.lang.String)
.runtime(Runtime)
// .disableSnapStart(java.lang.Boolean)
.build();
| Name | Type | Description |
|---|---|---|
scope |
software.constructs.Construct |
No description. |
id |
java.lang.String |
No description. |
maxEventAge |
software.amazon.awscdk.Duration |
The maximum age of a request that Lambda sends to a function for processing. |
onFailure |
software.amazon.awscdk.services.lambda.IDestination |
The destination for failed invocations. |
onSuccess |
software.amazon.awscdk.services.lambda.IDestination |
The destination for successful invocations. |
retryAttempts |
java.lang.Number |
The maximum number of times to retry when the function returns an error. |
adotInstrumentation |
software.amazon.awscdk.services.lambda.AdotInstrumentationConfig |
Specify the configuration of AWS Distro for OpenTelemetry (ADOT) instrumentation. |
allowAllIpv6Outbound |
java.lang.Boolean |
Whether to allow the Lambda to send all ipv6 network traffic. |
allowAllOutbound |
java.lang.Boolean |
Whether to allow the Lambda to send all network traffic (except ipv6). |
allowPublicSubnet |
java.lang.Boolean |
Lambda Functions in a public subnet can NOT access the internet. |
applicationLogLevel |
java.lang.String |
Sets the application log level for the function. |
applicationLogLevelV2 |
software.amazon.awscdk.services.lambda.ApplicationLogLevel |
Sets the application log level for the function. |
architecture |
software.amazon.awscdk.services.lambda.Architecture |
The system architectures compatible with this lambda function. |
codeSigningConfig |
software.amazon.awscdk.services.lambda.ICodeSigningConfig |
Code signing config associated with this function. |
currentVersionOptions |
software.amazon.awscdk.services.lambda.VersionOptions |
Options for the lambda.Version resource automatically created by the fn.currentVersion method. |
deadLetterQueue |
software.amazon.awscdk.services.sqs.IQueue |
The SQS queue to use if DLQ is enabled. |
deadLetterQueueEnabled |
java.lang.Boolean |
Enabled DLQ. |
deadLetterTopic |
software.amazon.awscdk.services.sns.ITopic |
The SNS topic to use as a DLQ. |
description |
java.lang.String |
A description of the function. |
environment |
java.util.Map |
Key-value pairs that Lambda caches and makes available for your Lambda functions. |
environmentEncryption |
software.amazon.awscdk.services.kms.IKey |
The AWS KMS key that's used to encrypt your function's environment variables. |
ephemeralStorageSize |
software.amazon.awscdk.Size |
The size of the function’s /tmp directory in MiB. |
events |
java.util.List |
Event sources for this function. |
filesystem |
software.amazon.awscdk.services.lambda.FileSystem |
The filesystem configuration for the lambda function. |
functionName |
java.lang.String |
A name for the function. |
initialPolicy |
java.util.List |
Initial policy statements to add to the created Lambda Role. |
insightsVersion |
software.amazon.awscdk.services.lambda.LambdaInsightsVersion |
Specify the version of CloudWatch Lambda insights to use for monitoring. |
ipv6AllowedForDualStack |
java.lang.Boolean |
Allows outbound IPv6 traffic on VPC functions that are connected to dual-stack subnets. |
layers |
java.util.List |
A list of layers to add to the function's execution environment. |
logFormat |
java.lang.String |
Sets the logFormat for the function. |
loggingFormat |
software.amazon.awscdk.services.lambda.LoggingFormat |
Sets the loggingFormat for the function. |
logGroup |
software.amazon.awscdk.services.logs.ILogGroup |
The log group the function sends logs to. |
logRetention |
software.amazon.awscdk.services.logs.RetentionDays |
The number of days log events are kept in CloudWatch Logs. |
logRetentionRetryOptions |
software.amazon.awscdk.services.lambda.LogRetentionRetryOptions |
When log retention is specified, a custom resource attempts to create the CloudWatch log group. |
logRetentionRole |
software.amazon.awscdk.services.iam.IRole |
The IAM role for the Lambda function associated with the custom resource that sets the retention policy. |
memorySize |
java.lang.Number |
The amount of memory, in MB, that is allocated to your Lambda function. |
paramsAndSecrets |
software.amazon.awscdk.services.lambda.ParamsAndSecretsLayerVersion |
Specify the configuration of Parameters and Secrets Extension. |
profiling |
java.lang.Boolean |
Enable profiling. |
profilingGroup |
software.amazon.awscdk.services.codeguruprofiler.IProfilingGroup |
Profiling Group. |
recursiveLoop |
software.amazon.awscdk.services.lambda.RecursiveLoop |
Sets the Recursive Loop Protection for Lambda Function. |
reservedConcurrentExecutions |
java.lang.Number |
The maximum of concurrent executions you want to reserve for the function. |
role |
software.amazon.awscdk.services.iam.IRole |
Lambda execution role. |
runtimeManagementMode |
software.amazon.awscdk.services.lambda.RuntimeManagementMode |
Sets the runtime management configuration for a function's version. |
securityGroups |
java.util.List |
The list of security groups to associate with the Lambda's network interfaces. |
snapStart |
software.amazon.awscdk.services.lambda.SnapStartConf |
Enable SnapStart for Lambda Function. |
systemLogLevel |
java.lang.String |
Sets the system log level for the function. |
systemLogLevelV2 |
software.amazon.awscdk.services.lambda.SystemLogLevel |
Sets the system log level for the function. |
timeout |
software.amazon.awscdk.Duration |
The function execution time (in seconds) after which Lambda terminates the function. |
tracing |
software.amazon.awscdk.services.lambda.Tracing |
Enable AWS X-Ray Tracing for Lambda Function. |
vpc |
software.amazon.awscdk.services.ec2.IVpc |
VPC network to place Lambda network interfaces. |
vpcSubnets |
software.amazon.awscdk.services.ec2.SubnetSelection |
Where to place the network interfaces within the VPC. |
code |
software.amazon.awscdk.services.lambda.Code |
The source code of your Lambda function. |
handler |
java.lang.String |
The name of the method within your code that Lambda calls to execute your function. |
runtime |
software.amazon.awscdk.services.lambda.Runtime |
The runtime environment for the Lambda function that you are uploading. |
disableSnapStart |
java.lang.Boolean |
When true, disable snap start. |
scopeRequired
- Type: software.constructs.Construct
idRequired
- Type: java.lang.String
maxEventAgeOptional
- Type: software.amazon.awscdk.Duration
- Default: Duration.hours(6)
The maximum age of a request that Lambda sends to a function for processing.
Minimum: 60 seconds Maximum: 6 hours
onFailureOptional
- Type: software.amazon.awscdk.services.lambda.IDestination
- Default: no destination
The destination for failed invocations.
onSuccessOptional
- Type: software.amazon.awscdk.services.lambda.IDestination
- Default: no destination
The destination for successful invocations.
retryAttemptsOptional
- Type: java.lang.Number
- Default: 2
The maximum number of times to retry when the function returns an error.
Minimum: 0 Maximum: 2
adotInstrumentationOptional
- Type: software.amazon.awscdk.services.lambda.AdotInstrumentationConfig
- Default: No ADOT instrumentation
Specify the configuration of AWS Distro for OpenTelemetry (ADOT) instrumentation.
allowAllIpv6OutboundOptional
- Type: java.lang.Boolean
- Default: false
Whether to allow the Lambda to send all ipv6 network traffic.
If set to true, there will only be a single egress rule which allows all outbound ipv6 traffic. If set to false, you must individually add traffic rules to allow the Lambda to connect to network targets using ipv6.
Do not specify this property if the securityGroups or securityGroup property is set.
Instead, configure allowAllIpv6Outbound directly on the security group.
allowAllOutboundOptional
- Type: java.lang.Boolean
- Default: true
Whether to allow the Lambda to send all network traffic (except ipv6).
If set to false, you must individually add traffic rules to allow the Lambda to connect to network targets.
Do not specify this property if the securityGroups or securityGroup property is set.
Instead, configure allowAllOutbound directly on the security group.
allowPublicSubnetOptional
- Type: java.lang.Boolean
- Default: false
Lambda Functions in a public subnet can NOT access the internet.
Use this property to acknowledge this limitation and still place the function in a public subnet.
~~applicationLogLevel~~Optional
-
Deprecated: Use
applicationLogLevelV2as a property instead. -
Type: java.lang.String
- Default: "INFO"
Sets the application log level for the function.
applicationLogLevelV2Optional
- Type: software.amazon.awscdk.services.lambda.ApplicationLogLevel
- Default: ApplicationLogLevel.INFO
Sets the application log level for the function.
architectureOptional
- Type: software.amazon.awscdk.services.lambda.Architecture
- Default: Architecture.X86_64
The system architectures compatible with this lambda function.
codeSigningConfigOptional
- Type: software.amazon.awscdk.services.lambda.ICodeSigningConfig
- Default: Not Sign the Code
Code signing config associated with this function.
currentVersionOptionsOptional
- Type: software.amazon.awscdk.services.lambda.VersionOptions
- Default: default options as described in
VersionOptions
Options for the lambda.Version resource automatically created by the fn.currentVersion method.
deadLetterQueueOptional
- Type: software.amazon.awscdk.services.sqs.IQueue
- Default: SQS queue with 14 day retention period if
deadLetterQueueEnabledistrue
The SQS queue to use if DLQ is enabled.
If SNS topic is desired, specify deadLetterTopic property instead.
deadLetterQueueEnabledOptional
- Type: java.lang.Boolean
- Default: false unless
deadLetterQueueis set, which implies DLQ is enabled.
Enabled DLQ.
If deadLetterQueue is undefined,
an SQS queue with default options will be defined for your Function.
deadLetterTopicOptional
- Type: software.amazon.awscdk.services.sns.ITopic
- Default: no SNS topic
The SNS topic to use as a DLQ.
Note that if deadLetterQueueEnabled is set to true, an SQS queue will be created
rather than an SNS topic. Using an SNS topic as a DLQ requires this property to be set explicitly.
descriptionOptional
- Type: java.lang.String
- Default: No description.
A description of the function.
environmentOptional
- Type: java.util.Map
- Default: No environment variables.
Key-value pairs that Lambda caches and makes available for your Lambda functions.
Use environment variables to apply configuration changes, such as test and production environment configurations, without changing your Lambda function source code.
environmentEncryptionOptional
- Type: software.amazon.awscdk.services.kms.IKey
- Default: AWS Lambda creates and uses an AWS managed customer master key (CMK).
The AWS KMS key that's used to encrypt your function's environment variables.
ephemeralStorageSizeOptional
- Type: software.amazon.awscdk.Size
- Default: 512 MiB
The size of the function’s /tmp directory in MiB.
eventsOptional
- Type: java.util.List
- Default: No event sources.
Event sources for this function.
You can also add event sources using addEventSource.
filesystemOptional
- Type: software.amazon.awscdk.services.lambda.FileSystem
- Default: will not mount any filesystem
The filesystem configuration for the lambda function.
functionNameOptional
- Type: java.lang.String
- Default: AWS CloudFormation generates a unique physical ID and uses that ID for the function's name. For more information, see Name Type.
A name for the function.
initialPolicyOptional
- Type: java.util.List
- Default: No policy statements are added to the created Lambda role.
Initial policy statements to add to the created Lambda Role.
You can call addToRolePolicy to the created lambda to add statements post creation.
insightsVersionOptional
- Type: software.amazon.awscdk.services.lambda.LambdaInsightsVersion
- Default: No Lambda Insights
Specify the version of CloudWatch Lambda insights to use for monitoring.
ipv6AllowedForDualStackOptional
- Type: java.lang.Boolean
- Default: false
Allows outbound IPv6 traffic on VPC functions that are connected to dual-stack subnets.
Only used if 'vpc' is supplied.
layersOptional
- Type: java.util.List
- Default: No layers.
A list of layers to add to the function's execution environment.
You can configure your Lambda function to pull in additional code during initialization in the form of layers. Layers are packages of libraries or other dependencies that can be used by multiple functions.
~~logFormat~~Optional
-
Deprecated: Use
loggingFormatas a property instead. -
Type: java.lang.String
- Default: "Text"
Sets the logFormat for the function.
loggingFormatOptional
- Type: software.amazon.awscdk.services.lambda.LoggingFormat
- Default: LoggingFormat.TEXT
Sets the loggingFormat for the function.
logGroupOptional
- Type: software.amazon.awscdk.services.logs.ILogGroup
- Default:
/aws/lambda/${this.functionName}- default log group created by Lambda
The log group the function sends logs to.
By default, Lambda functions send logs to an automatically created default log group named /aws/lambda/\<function name>. However you cannot change the properties of this auto-created log group using the AWS CDK, e.g. you cannot set a different log retention.
Use the logGroup property to create a fully customizable LogGroup ahead of time, and instruct the Lambda function to send logs to it.
Providing a user-controlled log group was rolled out to commercial regions on 2023-11-16. If you are deploying to another type of region, please check regional availability first.
logRetentionOptional
- Type: software.amazon.awscdk.services.logs.RetentionDays
- Default: logs.RetentionDays.INFINITE
The number of days log events are kept in CloudWatch Logs.
When updating
this property, unsetting it doesn't remove the log retention policy. To
remove the retention policy, set the value to INFINITE.
This is a legacy API and we strongly recommend you move away from it if you can.
Instead create a fully customizable log group with logs.LogGroup and use the logGroup property
to instruct the Lambda function to send logs to it.
Migrating from logRetention to logGroup will cause the name of the log group to change.
Users and code and referencing the name verbatim will have to adjust.
In AWS CDK code, you can access the log group name directly from the LogGroup construct:
import * as logs from 'aws-cdk-lib/aws-logs';
declare const myLogGroup: logs.LogGroup;
myLogGroup.logGroupName;
logRetentionRetryOptionsOptional
- Type: software.amazon.awscdk.services.lambda.LogRetentionRetryOptions
- Default: Default AWS SDK retry options.
When log retention is specified, a custom resource attempts to create the CloudWatch log group.
These options control the retry policy when interacting with CloudWatch APIs.
This is a legacy API and we strongly recommend you migrate to logGroup if you can.
logGroup allows you to create a fully customizable log group and instruct the Lambda function to send logs to it.
logRetentionRoleOptional
- Type: software.amazon.awscdk.services.iam.IRole
- Default: A new role is created.
The IAM role for the Lambda function associated with the custom resource that sets the retention policy.
This is a legacy API and we strongly recommend you migrate to logGroup if you can.
logGroup allows you to create a fully customizable log group and instruct the Lambda function to send logs to it.
memorySizeOptional
- Type: java.lang.Number
- Default: 128
The amount of memory, in MB, that is allocated to your Lambda function.
Lambda uses this value to proportionally allocate the amount of CPU power. For more information, see Resource Model in the AWS Lambda Developer Guide.
paramsAndSecretsOptional
- Type: software.amazon.awscdk.services.lambda.ParamsAndSecretsLayerVersion
- Default: No Parameters and Secrets Extension
Specify the configuration of Parameters and Secrets Extension.
https://docs.aws.amazon.com/systems-manager/latest/userguide/ps-integration-lambda-extensions.html
profilingOptional
- Type: java.lang.Boolean
- Default: No profiling.
Enable profiling.
https://docs.aws.amazon.com/codeguru/latest/profiler-ug/setting-up-lambda.html
profilingGroupOptional
- Type: software.amazon.awscdk.services.codeguruprofiler.IProfilingGroup
- Default: A new profiling group will be created if
profilingis set.
Profiling Group.
https://docs.aws.amazon.com/codeguru/latest/profiler-ug/setting-up-lambda.html
recursiveLoopOptional
- Type: software.amazon.awscdk.services.lambda.RecursiveLoop
- Default: RecursiveLoop.Terminate
Sets the Recursive Loop Protection for Lambda Function.
It lets Lambda detect and terminate unintended recusrive loops.
reservedConcurrentExecutionsOptional
- Type: java.lang.Number
- Default: No specific limit - account limit.
The maximum of concurrent executions you want to reserve for the function.
https://docs.aws.amazon.com/lambda/latest/dg/concurrent-executions.html
roleOptional
- Type: software.amazon.awscdk.services.iam.IRole
- Default: A unique role will be generated for this lambda function. Both supplied and generated roles can always be changed by calling
addToRolePolicy.
Lambda execution role.
This is the role that will be assumed by the function upon execution. It controls the permissions that the function will have. The Role must be assumable by the 'lambda.amazonaws.com' service principal.
The default Role automatically has permissions granted for Lambda execution. If you provide a Role, you must add the relevant AWS managed policies yourself.
The relevant managed policies are "service-role/AWSLambdaBasicExecutionRole" and "service-role/AWSLambdaVPCAccessExecutionRole".
runtimeManagementModeOptional
- Type: software.amazon.awscdk.services.lambda.RuntimeManagementMode
- Default: Auto
Sets the runtime management configuration for a function's version.
securityGroupsOptional
- Type: java.util.List
- Default: If the function is placed within a VPC and a security group is not specified, either by this or securityGroup prop, a dedicated security group will be created for this function.
The list of security groups to associate with the Lambda's network interfaces.
Only used if 'vpc' is supplied.
snapStartOptional
- Type: software.amazon.awscdk.services.lambda.SnapStartConf
- Default: No snapstart
Enable SnapStart for Lambda Function.
SnapStart is currently supported only for Java 11, 17 runtime
~~systemLogLevel~~Optional
-
Deprecated: Use
systemLogLevelV2as a property instead. -
Type: java.lang.String
- Default: "INFO"
Sets the system log level for the function.
systemLogLevelV2Optional
- Type: software.amazon.awscdk.services.lambda.SystemLogLevel
- Default: SystemLogLevel.INFO
Sets the system log level for the function.
timeoutOptional
- Type: software.amazon.awscdk.Duration
- Default: Duration.seconds(3)
The function execution time (in seconds) after which Lambda terminates the function.
Because the execution time affects cost, set this value based on the function's expected execution time.
tracingOptional
- Type: software.amazon.awscdk.services.lambda.Tracing
- Default: Tracing.Disabled
Enable AWS X-Ray Tracing for Lambda Function.
vpcOptional
- Type: software.amazon.awscdk.services.ec2.IVpc
- Default: Function is not placed within a VPC.
VPC network to place Lambda network interfaces.
Specify this if the Lambda function needs to access resources in a VPC.
This is required when vpcSubnets is specified.
vpcSubnetsOptional
- Type: software.amazon.awscdk.services.ec2.SubnetSelection
- Default: the Vpc default strategy if not specified
Where to place the network interfaces within the VPC.
This requires vpc to be specified in order for interfaces to actually be
placed in the subnets. If vpc is not specify, this will raise an error.
Note: Internet access for Lambda Functions requires a NAT Gateway, so picking
public subnets is not allowed (unless allowPublicSubnet is set to true).
codeRequired
- Type: software.amazon.awscdk.services.lambda.Code
The source code of your Lambda function.
You can point to a file in an Amazon Simple Storage Service (Amazon S3) bucket or specify your source code as inline text.
handlerRequired
- Type: java.lang.String
The name of the method within your code that Lambda calls to execute your function.
The format includes the file name. It can also include namespaces and other qualifiers, depending on the runtime. For more information, see https://docs.aws.amazon.com/lambda/latest/dg/foundation-progmodel.html.
Use Handler.FROM_IMAGE when defining a function from a Docker image.
NOTE: If you specify your source code as inline text by specifying the ZipFile property within the Code property, specify index.function_name as the handler.
runtimeRequired
- Type: software.amazon.awscdk.services.lambda.Runtime
The runtime environment for the Lambda function that you are uploading.
For valid values, see the Runtime property in the AWS Lambda Developer Guide.
Use Runtime.FROM_IMAGE when defining a function from a Docker image.
disableSnapStartOptional
- Type: java.lang.Boolean
- Default: false
When true, disable snap start.
Methods
| Name | Description |
|---|---|
toString |
Returns a string representation of this construct. |
applyRemovalPolicy |
Apply the given removal policy to this resource. |
addEventSource |
Adds an event source to this function. |
addEventSourceMapping |
Adds an event source that maps to this AWS Lambda function. |
addFunctionUrl |
Adds a url to this lambda function. |
addPermission |
Adds a permission to the Lambda resource policy. |
addToRolePolicy |
Adds a statement to the IAM role assumed by the instance. |
configureAsyncInvoke |
Configures options for asynchronous invocation. |
considerWarningOnInvokeFunctionPermissions |
A warning will be added to functions under the following conditions: - permissions that include lambda:InvokeFunction are added to the unqualified function. |
grantInvoke |
Grant the given identity permissions to invoke this Lambda. |
grantInvokeCompositePrincipal |
Grant multiple principals the ability to invoke this Lambda via CompositePrincipal. |
grantInvokeLatestVersion |
Grant the given identity permissions to invoke the $LATEST version or unqualified version of this Lambda. |
grantInvokeUrl |
Grant the given identity permissions to invoke this Lambda Function URL. |
grantInvokeVersion |
Grant the given identity permissions to invoke the given version of this Lambda. |
metric |
Return the given named metric for this Function. |
metricDuration |
How long execution of this Lambda takes. |
metricErrors |
How many invocations of this Lambda fail. |
metricInvocations |
How often this Lambda is invoked. |
metricThrottles |
How often this Lambda is throttled. |
addAlias |
Defines an alias for this function. |
addEnvironment |
Adds an environment variable to this Lambda function. |
addLayers |
Adds one or more Lambda Layers to this Lambda function. |
invalidateVersionBasedOn |
Mix additional information into the hash of the Version object. |
toString
public java.lang.String toString()
Returns a string representation of this construct.
applyRemovalPolicy
public void applyRemovalPolicy(RemovalPolicy policy)
Apply the given removal policy to this resource.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS
account for data recovery and cleanup later (RemovalPolicy.RETAIN).
policyRequired
- Type: software.amazon.awscdk.RemovalPolicy
addEventSource
public void addEventSource(IEventSource source)
Adds an event source to this function.
Event sources are implemented in the aws-cdk-lib/aws-lambda-event-sources module.
The following example adds an SQS Queue as an event source:
import { SqsEventSource } from 'aws-cdk-lib/aws-lambda-event-sources';
myFunction.addEventSource(new SqsEventSource(myQueue));
sourceRequired
- Type: software.amazon.awscdk.services.lambda.IEventSource
addEventSourceMapping
public EventSourceMapping addEventSourceMapping(java.lang.String id, EventSourceMappingOptions options)
Adds an event source that maps to this AWS Lambda function.
idRequired
- Type: java.lang.String
optionsRequired
- Type: software.amazon.awscdk.services.lambda.EventSourceMappingOptions
addFunctionUrl
public FunctionUrl addFunctionUrl()
public FunctionUrl addFunctionUrl(FunctionUrlOptions options)
Adds a url to this lambda function.
optionsOptional
- Type: software.amazon.awscdk.services.lambda.FunctionUrlOptions
addPermission
public void addPermission(java.lang.String id, Permission permission)
Adds a permission to the Lambda resource policy.
idRequired
- Type: java.lang.String
The id for the permission construct.
permissionRequired
- Type: software.amazon.awscdk.services.lambda.Permission
The permission to grant to this Lambda function.
addToRolePolicy
public void addToRolePolicy(PolicyStatement statement)
Adds a statement to the IAM role assumed by the instance.
statementRequired
- Type: software.amazon.awscdk.services.iam.PolicyStatement
configureAsyncInvoke
public void configureAsyncInvoke(EventInvokeConfigOptions options)
Configures options for asynchronous invocation.
optionsRequired
- Type: software.amazon.awscdk.services.lambda.EventInvokeConfigOptions
considerWarningOnInvokeFunctionPermissions
public void considerWarningOnInvokeFunctionPermissions(Construct scope, java.lang.String action)
A warning will be added to functions under the following conditions: - permissions that include lambda:InvokeFunction are added to the unqualified function.
function.currentVersion is invoked before or after the permission is created.
This applies only to permissions on Lambda functions, not versions or aliases. This function is overridden as a noOp for QualifiedFunctionBase.
scopeRequired
- Type: software.constructs.Construct
actionRequired
- Type: java.lang.String
grantInvoke
public Grant grantInvoke(IGrantable grantee)
Grant the given identity permissions to invoke this Lambda.
granteeRequired
- Type: software.amazon.awscdk.services.iam.IGrantable
grantInvokeCompositePrincipal
public java.util.List<Grant> grantInvokeCompositePrincipal(CompositePrincipal compositePrincipal)
Grant multiple principals the ability to invoke this Lambda via CompositePrincipal.
compositePrincipalRequired
- Type: software.amazon.awscdk.services.iam.CompositePrincipal
grantInvokeLatestVersion
public Grant grantInvokeLatestVersion(IGrantable grantee)
Grant the given identity permissions to invoke the $LATEST version or unqualified version of this Lambda.
granteeRequired
- Type: software.amazon.awscdk.services.iam.IGrantable
grantInvokeUrl
public Grant grantInvokeUrl(IGrantable grantee)
Grant the given identity permissions to invoke this Lambda Function URL.
granteeRequired
- Type: software.amazon.awscdk.services.iam.IGrantable
grantInvokeVersion
public Grant grantInvokeVersion(IGrantable grantee, IVersion version)
Grant the given identity permissions to invoke the given version of this Lambda.
granteeRequired
- Type: software.amazon.awscdk.services.iam.IGrantable
versionRequired
- Type: software.amazon.awscdk.services.lambda.IVersion
metric
public Metric metric(java.lang.String metricName)
public Metric metric(java.lang.String metricName, MetricOptions props)
Return the given named metric for this Function.
metricNameRequired
- Type: java.lang.String
propsOptional
- Type: software.amazon.awscdk.services.cloudwatch.MetricOptions
metricDuration
public Metric metricDuration()
public Metric metricDuration(MetricOptions props)
How long execution of this Lambda takes.
Average over 5 minutes
propsOptional
- Type: software.amazon.awscdk.services.cloudwatch.MetricOptions
metricErrors
public Metric metricErrors()
public Metric metricErrors(MetricOptions props)
How many invocations of this Lambda fail.
Sum over 5 minutes
propsOptional
- Type: software.amazon.awscdk.services.cloudwatch.MetricOptions
metricInvocations
public Metric metricInvocations()
public Metric metricInvocations(MetricOptions props)
How often this Lambda is invoked.
Sum over 5 minutes
propsOptional
- Type: software.amazon.awscdk.services.cloudwatch.MetricOptions
metricThrottles
public Metric metricThrottles()
public Metric metricThrottles(MetricOptions props)
How often this Lambda is throttled.
Sum over 5 minutes
propsOptional
- Type: software.amazon.awscdk.services.cloudwatch.MetricOptions
addAlias
public Alias addAlias(java.lang.String aliasName)
public Alias addAlias(java.lang.String aliasName, AliasOptions options)
Defines an alias for this function.
The alias will automatically be updated to point to the latest version of the function as it is being updated during a deployment.
declare const fn: lambda.Function;
fn.addAlias('Live');
// Is equivalent to
new lambda.Alias(this, 'AliasLive', {
aliasName: 'Live',
version: fn.currentVersion,
});
aliasNameRequired
- Type: java.lang.String
The name of the alias.
optionsOptional
- Type: software.amazon.awscdk.services.lambda.AliasOptions
Alias options.
addEnvironment
public Function addEnvironment(java.lang.String key, java.lang.String value)
public Function addEnvironment(java.lang.String key, java.lang.String value, EnvironmentOptions options)
Adds an environment variable to this Lambda function.
If this is a ref to a Lambda function, this operation results in a no-op.
keyRequired
- Type: java.lang.String
The environment variable key.
valueRequired
- Type: java.lang.String
The environment variable's value.
optionsOptional
- Type: software.amazon.awscdk.services.lambda.EnvironmentOptions
Environment variable options.
addLayers
public void addLayers(ILayerVersion layers)
Adds one or more Lambda Layers to this Lambda function.
layersRequired
- Type: software.amazon.awscdk.services.lambda.ILayerVersion
the layers to be added.
invalidateVersionBasedOn
public void invalidateVersionBasedOn(java.lang.String x)
Mix additional information into the hash of the Version object.
The Lambda Function construct does its best to automatically create a new Version when anything about the Function changes (its code, its layers, any of the other properties).
However, you can sometimes source information from places that the CDK cannot look into, like the deploy-time values of SSM parameters. In those cases, the CDK would not force the creation of a new Version object when it actually should.
This method can be used to invalidate the current Version object. Pass in any string into this method, and make sure the string changes when you know a new Version needs to be created.
This method may be called more than once.
xRequired
- Type: java.lang.String
Static Functions
| Name | Description |
|---|---|
isConstruct |
Checks if x is a construct. |
isOwnedResource |
Returns true if the construct was created by CDK, and false otherwise. |
isResource |
Check whether the given construct is a Resource. |
classifyVersionProperty |
Record whether specific properties in the AWS::Lambda::Function resource should also be associated to the Version resource. |
fromFunctionArn |
Import a lambda function into the CDK using its ARN. |
fromFunctionAttributes |
Creates a Lambda function object which represents a function not defined within this stack. |
fromFunctionName |
Import a lambda function into the CDK using its name. |
metricAll |
Return the given named metric for this Lambda. |
metricAllConcurrentExecutions |
Metric for the number of concurrent executions across all Lambdas. |
metricAllDuration |
Metric for the Duration executing all Lambdas. |
metricAllErrors |
Metric for the number of Errors executing all Lambdas. |
metricAllInvocations |
Metric for the number of invocations of all Lambdas. |
metricAllThrottles |
Metric for the number of throttled invocations of all Lambdas. |
metricAllUnreservedConcurrentExecutions |
Metric for the number of unreserved concurrent executions across all Lambdas. |
isConstruct
import software.aws.pdk.type_safe_api.SnapStartFunction;
SnapStartFunction.isConstruct(java.lang.Object x)
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.
xRequired
- Type: java.lang.Object
Any object.
isOwnedResource
import software.aws.pdk.type_safe_api.SnapStartFunction;
SnapStartFunction.isOwnedResource(IConstruct construct)
Returns true if the construct was created by CDK, and false otherwise.
constructRequired
- Type: software.constructs.IConstruct
isResource
import software.aws.pdk.type_safe_api.SnapStartFunction;
SnapStartFunction.isResource(IConstruct construct)
Check whether the given construct is a Resource.
constructRequired
- Type: software.constructs.IConstruct
classifyVersionProperty
import software.aws.pdk.type_safe_api.SnapStartFunction;
SnapStartFunction.classifyVersionProperty(java.lang.String propertyName, java.lang.Boolean locked)
Record whether specific properties in the AWS::Lambda::Function resource should also be associated to the Version resource.
See 'currentVersion' section in the module README for more details.
propertyNameRequired
- Type: java.lang.String
The property to classify.
lockedRequired
- Type: java.lang.Boolean
whether the property should be associated to the version or not.
fromFunctionArn
import software.aws.pdk.type_safe_api.SnapStartFunction;
SnapStartFunction.fromFunctionArn(Construct scope, java.lang.String id, java.lang.String functionArn)
Import a lambda function into the CDK using its ARN.
For Function.addPermissions() to work on this imported lambda, make sure that is
in the same account and region as the stack you are importing it into.
scopeRequired
- Type: software.constructs.Construct
idRequired
- Type: java.lang.String
functionArnRequired
- Type: java.lang.String
fromFunctionAttributes
import software.aws.pdk.type_safe_api.SnapStartFunction;
SnapStartFunction.fromFunctionAttributes(Construct scope, java.lang.String id, FunctionAttributes attrs)
Creates a Lambda function object which represents a function not defined within this stack.
For Function.addPermissions() to work on this imported lambda, set the sameEnvironment property to true
if this imported lambda is in the same account and region as the stack you are importing it into.
scopeRequired
- Type: software.constructs.Construct
The parent construct.
idRequired
- Type: java.lang.String
The name of the lambda construct.
attrsRequired
- Type: software.amazon.awscdk.services.lambda.FunctionAttributes
the attributes of the function to import.
fromFunctionName
import software.aws.pdk.type_safe_api.SnapStartFunction;
SnapStartFunction.fromFunctionName(Construct scope, java.lang.String id, java.lang.String functionName)
Import a lambda function into the CDK using its name.
scopeRequired
- Type: software.constructs.Construct
idRequired
- Type: java.lang.String
functionNameRequired
- Type: java.lang.String
metricAll
import software.aws.pdk.type_safe_api.SnapStartFunction;
SnapStartFunction.metricAll(java.lang.String metricName),SnapStartFunction.metricAll(java.lang.String metricName, MetricOptions props)
Return the given named metric for this Lambda.
metricNameRequired
- Type: java.lang.String
propsOptional
- Type: software.amazon.awscdk.services.cloudwatch.MetricOptions
metricAllConcurrentExecutions
import software.aws.pdk.type_safe_api.SnapStartFunction;
SnapStartFunction.metricAllConcurrentExecutions(),SnapStartFunction.metricAllConcurrentExecutions(MetricOptions props)
Metric for the number of concurrent executions across all Lambdas.
propsOptional
- Type: software.amazon.awscdk.services.cloudwatch.MetricOptions
metricAllDuration
import software.aws.pdk.type_safe_api.SnapStartFunction;
SnapStartFunction.metricAllDuration(),SnapStartFunction.metricAllDuration(MetricOptions props)
Metric for the Duration executing all Lambdas.
propsOptional
- Type: software.amazon.awscdk.services.cloudwatch.MetricOptions
metricAllErrors
import software.aws.pdk.type_safe_api.SnapStartFunction;
SnapStartFunction.metricAllErrors(),SnapStartFunction.metricAllErrors(MetricOptions props)
Metric for the number of Errors executing all Lambdas.
propsOptional
- Type: software.amazon.awscdk.services.cloudwatch.MetricOptions
metricAllInvocations
import software.aws.pdk.type_safe_api.SnapStartFunction;
SnapStartFunction.metricAllInvocations(),SnapStartFunction.metricAllInvocations(MetricOptions props)
Metric for the number of invocations of all Lambdas.
propsOptional
- Type: software.amazon.awscdk.services.cloudwatch.MetricOptions
metricAllThrottles
import software.aws.pdk.type_safe_api.SnapStartFunction;
SnapStartFunction.metricAllThrottles(),SnapStartFunction.metricAllThrottles(MetricOptions props)
Metric for the number of throttled invocations of all Lambdas.
propsOptional
- Type: software.amazon.awscdk.services.cloudwatch.MetricOptions
metricAllUnreservedConcurrentExecutions
import software.aws.pdk.type_safe_api.SnapStartFunction;
SnapStartFunction.metricAllUnreservedConcurrentExecutions(),SnapStartFunction.metricAllUnreservedConcurrentExecutions(MetricOptions props)
Metric for the number of unreserved concurrent executions across all Lambdas.
propsOptional
- Type: software.amazon.awscdk.services.cloudwatch.MetricOptions
Properties
| Name | Type | Description |
|---|---|---|
node |
software.constructs.Node |
The tree node. |
env |
software.amazon.awscdk.ResourceEnvironment |
The environment this resource belongs to. |
stack |
software.amazon.awscdk.Stack |
The stack in which this resource is defined. |
architecture |
software.amazon.awscdk.services.lambda.Architecture |
The architecture of this Lambda Function (this is an optional attribute and defaults to X86_64). |
connections |
software.amazon.awscdk.services.ec2.Connections |
Access the Connections object. |
functionArn |
java.lang.String |
ARN of this function. |
functionName |
java.lang.String |
Name of this function. |
grantPrincipal |
software.amazon.awscdk.services.iam.IPrincipal |
The principal this Lambda Function is running as. |
isBoundToVpc |
java.lang.Boolean |
Whether or not this Lambda function was bound to a VPC. |
latestVersion |
software.amazon.awscdk.services.lambda.IVersion |
The $LATEST version of this function. |
permissionsNode |
software.constructs.Node |
The construct node where permissions are attached. |
resourceArnsForGrantInvoke |
java.util.List |
The ARN(s) to put into the resource field of the generated IAM policy for grantInvoke(). |
role |
software.amazon.awscdk.services.iam.IRole |
Execution role associated with this function. |
currentVersion |
software.amazon.awscdk.services.lambda.Version |
Returns a lambda.Version which represents the current version of this Lambda function. A new version will be created every time the function's configuration changes. |
logGroup |
software.amazon.awscdk.services.logs.ILogGroup |
The LogGroup where the Lambda function's logs are made available. |
runtime |
software.amazon.awscdk.services.lambda.Runtime |
The runtime configured for this lambda. |
deadLetterQueue |
software.amazon.awscdk.services.sqs.IQueue |
The DLQ (as queue) associated with this Lambda Function (this is an optional attribute). |
deadLetterTopic |
software.amazon.awscdk.services.sns.ITopic |
The DLQ (as topic) associated with this Lambda Function (this is an optional attribute). |
timeout |
software.amazon.awscdk.Duration |
The timeout configured for this lambda. |
nodeRequired
public Node getNode();
- Type: software.constructs.Node
The tree node.
envRequired
public ResourceEnvironment getEnv();
- Type: software.amazon.awscdk.ResourceEnvironment
The environment this resource belongs to.
For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
stackRequired
public Stack getStack();
- Type: software.amazon.awscdk.Stack
The stack in which this resource is defined.
architectureRequired
public Architecture getArchitecture();
- Type: software.amazon.awscdk.services.lambda.Architecture
The architecture of this Lambda Function (this is an optional attribute and defaults to X86_64).
connectionsRequired
public Connections getConnections();
- Type: software.amazon.awscdk.services.ec2.Connections
Access the Connections object.
Will fail if not a VPC-enabled Lambda Function
functionArnRequired
public java.lang.String getFunctionArn();
- Type: java.lang.String
ARN of this function.
functionNameRequired
public java.lang.String getFunctionName();
- Type: java.lang.String
Name of this function.
grantPrincipalRequired
public IPrincipal getGrantPrincipal();
- Type: software.amazon.awscdk.services.iam.IPrincipal
The principal this Lambda Function is running as.
isBoundToVpcRequired
public java.lang.Boolean getIsBoundToVpc();
- Type: java.lang.Boolean
Whether or not this Lambda function was bound to a VPC.
If this is is false, trying to access the connections object will fail.
latestVersionRequired
public IVersion getLatestVersion();
- Type: software.amazon.awscdk.services.lambda.IVersion
The $LATEST version of this function.
Note that this is reference to a non-specific AWS Lambda version, which means the function this version refers to can return different results in different invocations.
To obtain a reference to an explicit version which references the current
function configuration, use lambdaFunction.currentVersion instead.
permissionsNodeRequired
public Node getPermissionsNode();
- Type: software.constructs.Node
The construct node where permissions are attached.
resourceArnsForGrantInvokeRequired
public java.util.List<java.lang.String> getResourceArnsForGrantInvoke();
- Type: java.util.List
The ARN(s) to put into the resource field of the generated IAM policy for grantInvoke().
roleOptional
public IRole getRole();
- Type: software.amazon.awscdk.services.iam.IRole
Execution role associated with this function.
currentVersionRequired
public Version getCurrentVersion();
- Type: software.amazon.awscdk.services.lambda.Version
Returns a lambda.Version which represents the current version of this Lambda function. A new version will be created every time the function's configuration changes.
You can specify options for this version using the currentVersionOptions
prop when initializing the lambda.Function.
logGroupRequired
public ILogGroup getLogGroup();
- Type: software.amazon.awscdk.services.logs.ILogGroup
The LogGroup where the Lambda function's logs are made available.
If either logRetention is set or this property is called, a CloudFormation custom resource is added to the stack that
pre-creates the log group as part of the stack deployment, if it already doesn't exist, and sets the correct log retention
period (never expire, by default).
Further, if the log group already exists and the logRetention is not set, the custom resource will reset the log retention
to never expire even if it was configured with a different value.
runtimeRequired
public Runtime getRuntime();
- Type: software.amazon.awscdk.services.lambda.Runtime
The runtime configured for this lambda.
deadLetterQueueOptional
public IQueue getDeadLetterQueue();
- Type: software.amazon.awscdk.services.sqs.IQueue
The DLQ (as queue) associated with this Lambda Function (this is an optional attribute).
deadLetterTopicOptional
public ITopic getDeadLetterTopic();
- Type: software.amazon.awscdk.services.sns.ITopic
The DLQ (as topic) associated with this Lambda Function (this is an optional attribute).
timeoutOptional
public Duration getTimeout();
- Type: software.amazon.awscdk.Duration
The timeout configured for this lambda.
TypeSafeApiAsyncModelBuild
Adds a task to convert the OpenAPI specification into an AsyncAPI specification, which can be used for documentation generation.
Initializers
import software.aws.pdk.type_safe_api.TypeSafeApiAsyncModelBuild;
TypeSafeApiAsyncModelBuild.Builder.create(Project project)
.asyncApiSpecFile(java.lang.String)
.parsedSpecFile(java.lang.String)
.build();
| Name | Type | Description |
|---|---|---|
project |
io.github.cdklabs.projen.Project |
No description. |
asyncApiSpecFile |
java.lang.String |
Path to the generated AsyncAPI specification (relative to the project root). |
parsedSpecFile |
java.lang.String |
Path of the parsed/bundled OpenAPI specification (relative to the project root). |
projectRequired
- Type: io.github.cdklabs.projen.Project
asyncApiSpecFileRequired
- Type: java.lang.String
Path to the generated AsyncAPI specification (relative to the project root).
parsedSpecFileRequired
- Type: java.lang.String
Path of the parsed/bundled OpenAPI specification (relative to the project root).
Methods
| Name | Description |
|---|---|
toString |
Returns a string representation of this construct. |
postSynthesize |
Called after synthesis. |
preSynthesize |
Called before synthesis. |
synthesize |
Synthesizes files to the project output directory. |
toString
public java.lang.String toString()
Returns a string representation of this construct.
postSynthesize
public void postSynthesize()
Called after synthesis.
Order is not guaranteed.
preSynthesize
public void preSynthesize()
Called before synthesis.
synthesize
public void synthesize()
Synthesizes files to the project output directory.
Static Functions
| Name | Description |
|---|---|
isConstruct |
Checks if x is a construct. |
isComponent |
Test whether the given construct is a component. |
isConstruct
import software.aws.pdk.type_safe_api.TypeSafeApiAsyncModelBuild;
TypeSafeApiAsyncModelBuild.isConstruct(java.lang.Object x)
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.
xRequired
- Type: java.lang.Object
Any object.
isComponent
import software.aws.pdk.type_safe_api.TypeSafeApiAsyncModelBuild;
TypeSafeApiAsyncModelBuild.isComponent(java.lang.Object x)
Test whether the given construct is a component.
xRequired
- Type: java.lang.Object
Properties
| Name | Type | Description |
|---|---|---|
node |
software.constructs.Node |
The tree node. |
project |
io.github.cdklabs.projen.Project |
No description. |
nodeRequired
public Node getNode();
- Type: software.constructs.Node
The tree node.
projectRequired
public Project getProject();
- Type: io.github.cdklabs.projen.Project
TypeSafeApiModelBuild
Adds the build task for parsing/bundling an OpenAPI spec ready for use by code generation projects.
Initializers
import software.aws.pdk.type_safe_api.TypeSafeApiModelBuild;
TypeSafeApiModelBuild.Builder.create(Project project)
.parsedSpecFile(java.lang.String)
.openApiSpecificationPath(java.lang.String)
// .smithyJsonModelPath(java.lang.String)
.build();
| Name | Type | Description |
|---|---|---|
project |
io.github.cdklabs.projen.Project |
No description. |
parsedSpecFile |
java.lang.String |
Path of the parsed/bundled OpenAPI specification (relative to the project root). |
openApiSpecificationPath |
java.lang.String |
Path to the OpenAPI specification. |
smithyJsonModelPath |
java.lang.String |
Optional path to the Smithy JSON model (for Smithy projects only). |
projectRequired
- Type: io.github.cdklabs.projen.Project
parsedSpecFileRequired
- Type: java.lang.String
Path of the parsed/bundled OpenAPI specification (relative to the project root).
openApiSpecificationPathRequired
- Type: java.lang.String
Path to the OpenAPI specification.
smithyJsonModelPathOptional
- Type: java.lang.String
Optional path to the Smithy JSON model (for Smithy projects only).
Methods
| Name | Description |
|---|---|
toString |
Returns a string representation of this construct. |
postSynthesize |
Called after synthesis. |
preSynthesize |
Called before synthesis. |
synthesize |
Synthesizes files to the project output directory. |
toString
public java.lang.String toString()
Returns a string representation of this construct.
postSynthesize
public void postSynthesize()
Called after synthesis.
Order is not guaranteed.
preSynthesize
public void preSynthesize()
Called before synthesis.
synthesize
public void synthesize()
Synthesizes files to the project output directory.
Static Functions
| Name | Description |
|---|---|
isConstruct |
Checks if x is a construct. |
isComponent |
Test whether the given construct is a component. |
isConstruct
import software.aws.pdk.type_safe_api.TypeSafeApiModelBuild;
TypeSafeApiModelBuild.isConstruct(java.lang.Object x)
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.
xRequired
- Type: java.lang.Object
Any object.
isComponent
import software.aws.pdk.type_safe_api.TypeSafeApiModelBuild;
TypeSafeApiModelBuild.isComponent(java.lang.Object x)
Test whether the given construct is a component.
xRequired
- Type: java.lang.Object
Properties
| Name | Type | Description |
|---|---|---|
node |
software.constructs.Node |
The tree node. |
project |
io.github.cdklabs.projen.Project |
No description. |
nodeRequired
public Node getNode();
- Type: software.constructs.Node
The tree node.
projectRequired
public Project getProject();
- Type: io.github.cdklabs.projen.Project
TypeSafeApiProject
Project for a type-safe API, defined using Smithy or OpenAPI.
Generates a CDK construct to deploy your API, as well as client and server code to help build your API quickly.
Initializers
import software.aws.pdk.type_safe_api.TypeSafeApiProject;
TypeSafeApiProject.Builder.create()
.name(java.lang.String)
// .commitGenerated(java.lang.Boolean)
// .gitIgnoreOptions(IgnoreFileOptions)
// .gitOptions(GitOptions)
// .logging(LoggerOptions)
// .outdir(java.lang.String)
// .parent(Project)
// .projenCommand(java.lang.String)
// .projenrcJson(java.lang.Boolean)
// .projenrcJsonOptions(ProjenrcJsonOptions)
// .renovatebot(java.lang.Boolean)
// .renovatebotOptions(RenovatebotOptions)
.infrastructure(InfrastructureConfiguration)
.model(ModelConfiguration)
// .commitGeneratedCode(java.lang.Boolean)
// .documentation(DocumentationConfiguration)
// .handlers(HandlersConfiguration)
// .library(LibraryConfiguration)
// .runtime(RuntimeConfiguration)
.build();
| Name | Type | Description |
|---|---|---|
name |
java.lang.String |
This is the name of your project. |
commitGenerated |
java.lang.Boolean |
Whether to commit the managed files by default. |
gitIgnoreOptions |
io.github.cdklabs.projen.IgnoreFileOptions |
Configuration options for .gitignore file. |
gitOptions |
io.github.cdklabs.projen.GitOptions |
Configuration options for git. |
logging |
io.github.cdklabs.projen.LoggerOptions |
Configure logging options such as verbosity. |
outdir |
java.lang.String |
The root directory of the project. |
parent |
io.github.cdklabs.projen.Project |
The parent project, if this project is part of a bigger project. |
projenCommand |
java.lang.String |
The shell command to use in order to run the projen CLI. |
projenrcJson |
java.lang.Boolean |
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation. |
projenrcJsonOptions |
io.github.cdklabs.projen.ProjenrcJsonOptions |
Options for .projenrc.json. |
renovatebot |
java.lang.Boolean |
Use renovatebot to handle dependency upgrades. |
renovatebotOptions |
io.github.cdklabs.projen.RenovatebotOptions |
Options for renovatebot. |
infrastructure |
InfrastructureConfiguration |
Configuration for generated infrastructure. |
model |
ModelConfiguration |
Configuration for the API model. |
commitGeneratedCode |
java.lang.Boolean |
Whether to commit the code generated by the OpenAPI Generator. |
documentation |
DocumentationConfiguration |
Configuration for generated documentation. |
handlers |
HandlersConfiguration |
Configuration for lambda handlers for implementing the API. |
library |
LibraryConfiguration |
Configuration for generated libraries. |
runtime |
RuntimeConfiguration |
Configuration for generated runtime projects (containing types, clients and server code). |
nameRequired
- Type: java.lang.String
- Default: $BASEDIR
This is the name of your project.
commitGeneratedOptional
- Type: java.lang.Boolean
- Default: true
Whether to commit the managed files by default.
gitIgnoreOptionsOptional
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptionsOptional
- Type: io.github.cdklabs.projen.GitOptions
Configuration options for git.
loggingOptional
- Type: io.github.cdklabs.projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
outdirOptional
- Type: java.lang.String
- Default: "."
The root directory of the project.
Relative to this directory, all files are synthesized.
If this project has a parent, this directory is relative to the parent directory and it cannot be the same as the parent or any of it's other subprojects.
parentOptional
- Type: io.github.cdklabs.projen.Project
The parent project, if this project is part of a bigger project.
projenCommandOptional
- Type: java.lang.String
- Default: "npx projen"
The shell command to use in order to run the projen CLI.
Can be used to customize in special environments.
projenrcJsonOptional
- Type: java.lang.Boolean
- Default: false
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation.
projenrcJsonOptionsOptional
- Type: io.github.cdklabs.projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
renovatebotOptional
- Type: java.lang.Boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptionsOptional
- Type: io.github.cdklabs.projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
infrastructureRequired
Configuration for generated infrastructure.
modelRequired
- Type: ModelConfiguration
Configuration for the API model.
commitGeneratedCodeOptional
- Type: java.lang.Boolean
- Default: false
Whether to commit the code generated by the OpenAPI Generator.
documentationOptional
Configuration for generated documentation.
handlersOptional
- Type: HandlersConfiguration
Configuration for lambda handlers for implementing the API.
libraryOptional
- Type: LibraryConfiguration
Configuration for generated libraries.
Libraries are projects which are generated from your model, but are not fully-fledged runtimes, for example react hooks or clients in languages that aren't supported as runtimes.
runtimeOptional
- Type: RuntimeConfiguration
Configuration for generated runtime projects (containing types, clients and server code).
Methods
| Name | Description |
|---|---|
toString |
Returns a string representation of this construct. |
addExcludeFromCleanup |
Exclude the matching files from pre-synth cleanup. |
addGitIgnore |
Adds a .gitignore pattern. |
addPackageIgnore |
Exclude these files from the bundled package. |
addTask |
Adds a new task to this project. |
addTip |
Prints a "tip" message during synthesis. |
annotateGenerated |
Consider a set of files as "generated". |
postSynthesize |
Called after all components are synthesized. |
preSynthesize |
Called before all components are synthesized. |
removeTask |
Removes a task from a project. |
runTaskCommand |
Returns the shell command to execute in order to run a task. |
synth |
Synthesize all project files into outdir. |
tryFindFile |
Finds a file at the specified relative path within this project and all its subprojects. |
tryFindJsonFile |
Finds a json file by name. |
tryFindObjectFile |
Finds an object file (like JsonFile, YamlFile, etc.) by name. |
tryRemoveFile |
Finds a file at the specified relative path within this project and removes it. |
toString
public java.lang.String toString()
Returns a string representation of this construct.
addExcludeFromCleanup
public void addExcludeFromCleanup(java.lang.String globs)
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.
globsRequired
- Type: java.lang.String
The glob patterns to match.
addGitIgnore
public void addGitIgnore(java.lang.String pattern)
Adds a .gitignore pattern.
patternRequired
- Type: java.lang.String
The glob pattern to ignore.
addPackageIgnore
public void addPackageIgnore(java.lang.String _pattern)
Exclude these files from the bundled package.
Implemented by project types based on the
packaging mechanism. For example, NodeProject delegates this to .npmignore.
_patternRequired
- Type: java.lang.String
The glob pattern to exclude.
addTask
public Task addTask(java.lang.String name)
public Task addTask(java.lang.String name, TaskOptions props)
Adds a new task to this project.
This will fail if the project already has a task with this name.
nameRequired
- Type: java.lang.String
The task name to add.
propsOptional
- Type: io.github.cdklabs.projen.TaskOptions
Task properties.
~~addTip~~
public void addTip(java.lang.String message)
Prints a "tip" message during synthesis.
messageRequired
- Type: java.lang.String
The message.
annotateGenerated
public void annotateGenerated(java.lang.String _glob)
Consider a set of files as "generated".
This method is implemented by derived classes and used for example, to add git attributes to tell GitHub that certain files are generated.
_globRequired
- Type: java.lang.String
the glob pattern to match (could be a file path).
postSynthesize
public void postSynthesize()
Called after all components are synthesized.
Order is not guaranteed.
preSynthesize
public void preSynthesize()
Called before all components are synthesized.
removeTask
public Task removeTask(java.lang.String name)
Removes a task from a project.
nameRequired
- Type: java.lang.String
The name of the task to remove.
runTaskCommand
public java.lang.String runTaskCommand(Task task)
Returns the shell command to execute in order to run a task.
By default, this is npx projen@<version> <task>
taskRequired
- Type: io.github.cdklabs.projen.Task
The task for which the command is required.
synth
public void synth()
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()"
tryFindFile
public FileBase tryFindFile(java.lang.String filePath)
Finds a file at the specified relative path within this project and all its subprojects.
filePathRequired
- Type: java.lang.String
The file path.
If this path is relative, it will be resolved from the root of this project.
~~tryFindJsonFile~~
public JsonFile tryFindJsonFile(java.lang.String filePath)
Finds a json file by name.
filePathRequired
- Type: java.lang.String
The file path.
tryFindObjectFile
public ObjectFile tryFindObjectFile(java.lang.String filePath)
Finds an object file (like JsonFile, YamlFile, etc.) by name.
filePathRequired
- Type: java.lang.String
The file path.
tryRemoveFile
public FileBase tryRemoveFile(java.lang.String filePath)
Finds a file at the specified relative path within this project and removes it.
filePathRequired
- Type: java.lang.String
The file path.
If this path is relative, it will be resolved from the root of this project.
Static Functions
| Name | Description |
|---|---|
isConstruct |
Checks if x is a construct. |
isProject |
Test whether the given construct is a project. |
of |
Find the closest ancestor project for given construct. |
isConstruct
import software.aws.pdk.type_safe_api.TypeSafeApiProject;
TypeSafeApiProject.isConstruct(java.lang.Object x)
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.
xRequired
- Type: java.lang.Object
Any object.
isProject
import software.aws.pdk.type_safe_api.TypeSafeApiProject;
TypeSafeApiProject.isProject(java.lang.Object x)
Test whether the given construct is a project.
xRequired
- Type: java.lang.Object
of
import software.aws.pdk.type_safe_api.TypeSafeApiProject;
TypeSafeApiProject.of(IConstruct construct)
Find the closest ancestor project for given construct.
When given a project, this it the project itself.
constructRequired
- Type: software.constructs.IConstruct
Properties
| Name | Type | Description |
|---|---|---|
node |
software.constructs.Node |
The tree node. |
buildTask |
io.github.cdklabs.projen.Task |
No description. |
commitGenerated |
java.lang.Boolean |
Whether to commit the managed files by default. |
compileTask |
io.github.cdklabs.projen.Task |
No description. |
components |
java.util.List |
Returns all the components within this project. |
deps |
io.github.cdklabs.projen.Dependencies |
Project dependencies. |
ejected |
java.lang.Boolean |
Whether or not the project is being ejected. |
files |
java.util.List |
All files in this project. |
gitattributes |
io.github.cdklabs.projen.GitAttributesFile |
The .gitattributes file for this repository. |
gitignore |
io.github.cdklabs.projen.IgnoreFile |
.gitignore. |
logger |
io.github.cdklabs.projen.Logger |
Logging utilities. |
name |
java.lang.String |
Project name. |
outdir |
java.lang.String |
Absolute output directory of this project. |
packageTask |
io.github.cdklabs.projen.Task |
No description. |
postCompileTask |
io.github.cdklabs.projen.Task |
No description. |
preCompileTask |
io.github.cdklabs.projen.Task |
No description. |
projectBuild |
io.github.cdklabs.projen.ProjectBuild |
Manages the build process of the project. |
projenCommand |
java.lang.String |
The command to use in order to run the projen CLI. |
root |
io.github.cdklabs.projen.Project |
The root project. |
subprojects |
java.util.List |
Returns all the subprojects within this project. |
tasks |
io.github.cdklabs.projen.Tasks |
Project tasks. |
testTask |
io.github.cdklabs.projen.Task |
No description. |
defaultTask |
io.github.cdklabs.projen.Task |
This is the "default" task, the one that executes "projen". |
initProject |
io.github.cdklabs.projen.InitProject |
The options used when this project is bootstrapped via projen new. |
parent |
io.github.cdklabs.projen.Project |
A parent project. |
all |
ProjectCollections |
Collections of all sub-projects managed by this project. |
documentation |
GeneratedDocumentationProjects |
Generated documentation projects. |
handlers |
GeneratedCodeProjects |
Lambda handlers projects. |
infrastructure |
GeneratedCodeProjects |
Generated infrastructure projects. |
library |
GeneratedLibraryProjects |
Generated library projects. |
model |
ModelProject |
Project for the api model. |
runtime |
GeneratedCodeProjects |
Generated runtime projects. |
nodeRequired
public Node getNode();
- Type: software.constructs.Node
The tree node.
buildTaskRequired
public Task getBuildTask();
- Type: io.github.cdklabs.projen.Task
commitGeneratedRequired
public java.lang.Boolean getCommitGenerated();
- Type: java.lang.Boolean
Whether to commit the managed files by default.
compileTaskRequired
public Task getCompileTask();
- Type: io.github.cdklabs.projen.Task
componentsRequired
public java.util.List<Component> getComponents();
- Type: java.util.List
Returns all the components within this project.
depsRequired
public Dependencies getDeps();
- Type: io.github.cdklabs.projen.Dependencies
Project dependencies.
ejectedRequired
public java.lang.Boolean getEjected();
- Type: java.lang.Boolean
Whether or not the project is being ejected.
filesRequired
public java.util.List<FileBase> getFiles();
- Type: java.util.List
All files in this project.
gitattributesRequired
public GitAttributesFile getGitattributes();
- Type: io.github.cdklabs.projen.GitAttributesFile
The .gitattributes file for this repository.
gitignoreRequired
public IgnoreFile getGitignore();
- Type: io.github.cdklabs.projen.IgnoreFile
.gitignore.
loggerRequired
public Logger getLogger();
- Type: io.github.cdklabs.projen.Logger
Logging utilities.
nameRequired
public java.lang.String getName();
- Type: java.lang.String
Project name.
outdirRequired
public java.lang.String getOutdir();
- Type: java.lang.String
Absolute output directory of this project.
packageTaskRequired
public Task getPackageTask();
- Type: io.github.cdklabs.projen.Task
postCompileTaskRequired
public Task getPostCompileTask();
- Type: io.github.cdklabs.projen.Task
preCompileTaskRequired
public Task getPreCompileTask();
- Type: io.github.cdklabs.projen.Task
projectBuildRequired
public ProjectBuild getProjectBuild();
- Type: io.github.cdklabs.projen.ProjectBuild
Manages the build process of the project.
projenCommandRequired
public java.lang.String getProjenCommand();
- Type: java.lang.String
The command to use in order to run the projen CLI.
rootRequired
public Project getRoot();
- Type: io.github.cdklabs.projen.Project
The root project.
subprojectsRequired
public java.util.List<Project> getSubprojects();
- Type: java.util.List
Returns all the subprojects within this project.
tasksRequired
public Tasks getTasks();
- Type: io.github.cdklabs.projen.Tasks
Project tasks.
testTaskRequired
public Task getTestTask();
- Type: io.github.cdklabs.projen.Task
defaultTaskOptional
public Task getDefaultTask();
- Type: io.github.cdklabs.projen.Task
This is the "default" task, the one that executes "projen".
Undefined if the project is being ejected.
initProjectOptional
public InitProject getInitProject();
- Type: io.github.cdklabs.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.
parentOptional
public Project getParent();
- Type: io.github.cdklabs.projen.Project
A parent project.
If undefined, this is the root project.
allRequired
public ProjectCollections getAll();
- Type: ProjectCollections
Collections of all sub-projects managed by this project.
documentationRequired
public GeneratedDocumentationProjects getDocumentation();
Generated documentation projects.
Only the properties corresponding to specified documentation.formats will be defined.
handlersRequired
public GeneratedCodeProjects getHandlers();
- Type: GeneratedCodeProjects
Lambda handlers projects.
Only the properties corresponding to handlers.languages will be defined.
infrastructureRequired
public GeneratedCodeProjects getInfrastructure();
- Type: GeneratedCodeProjects
Generated infrastructure projects.
Only the property corresponding to infrastructure.language will be defined.
libraryRequired
public GeneratedLibraryProjects getLibrary();
- Type: GeneratedLibraryProjects
Generated library projects.
Only the properties corresponding to specified library.libraries will be defined.
modelRequired
public ModelProject getModel();
- Type: ModelProject
Project for the api model.
runtimeRequired
public GeneratedCodeProjects getRuntime();
- Type: GeneratedCodeProjects
Generated runtime projects.
When runtime.languages includes the corresponding language, the project can be
assumed to be defined.
Constants
| Name | Type | Description |
|---|---|---|
DEFAULT_TASK |
java.lang.String |
The name of the default task (the task executed when projen is run without arguments). |
DEFAULT_TASKRequired
public java.lang.String getDefaultTask();
- Type: java.lang.String
The name of the default task (the task executed when projen is run without arguments).
Normally this task should synthesize the project files.
TypeSafeRestApi
A construct for creating an api gateway rest api based on the definition in the OpenAPI spec.
Initializers
import software.aws.pdk.type_safe_api.TypeSafeRestApi;
TypeSafeRestApi.Builder.create(Construct scope, java.lang.String id)
// .cloudWatchRole(java.lang.Boolean)
// .cloudWatchRoleRemovalPolicy(RemovalPolicy)
// .deploy(java.lang.Boolean)
// .deployOptions(StageOptions)
// .description(java.lang.String)
// .disableExecuteApiEndpoint(java.lang.Boolean)
// .domainName(DomainNameOptions)
// .endpointExportName(java.lang.String)
// .endpointTypes(java.util.List<EndpointType>)
// .failOnWarnings(java.lang.Boolean)
// .parameters(java.util.Map<java.lang.String, java.lang.String>)
// .policy(PolicyDocument)
// .restApiName(java.lang.String)
// .retainDeployments(java.lang.Boolean)
.integrations(java.util.Map<java.lang.String, TypeSafeApiIntegration>)
.operationLookup(java.util.Map<java.lang.String, OperationDetails>)
// .apiKeyOptions(ApiKeyOptions)
// .corsOptions(CorsOptions)
// .defaultAuthorizer(Authorizer)
.specPath(java.lang.String)
// .gatewayResponses(java.util.List<GatewayResponseOptions>)
// .minCompressionSize(Size)
// .outputSpecBucket(IBucket)
// .webAclOptions(TypeSafeApiWebAclOptions)
.build();
| Name | Type | Description |
|---|---|---|
scope |
software.constructs.Construct |
No description. |
id |
java.lang.String |
No description. |
cloudWatchRole |
java.lang.Boolean |
Automatically configure an AWS CloudWatch role for API Gateway. |
cloudWatchRoleRemovalPolicy |
software.amazon.awscdk.RemovalPolicy |
The removal policy applied to the AWS CloudWatch role when this resource is removed from the application. |
deploy |
java.lang.Boolean |
Indicates if a Deployment should be automatically created for this API, and recreated when the API model (resources, methods) changes. |
deployOptions |
software.amazon.awscdk.services.apigateway.StageOptions |
Options for the API Gateway stage that will always point to the latest deployment when deploy is enabled. |
description |
java.lang.String |
A description of the RestApi construct. |
disableExecuteApiEndpoint |
java.lang.Boolean |
Specifies whether clients can invoke the API using the default execute-api endpoint. |
domainName |
software.amazon.awscdk.services.apigateway.DomainNameOptions |
Configure a custom domain name and map it to this API. |
endpointExportName |
java.lang.String |
Export name for the CfnOutput containing the API endpoint. |
endpointTypes |
java.util.List |
A list of the endpoint types of the API. |
failOnWarnings |
java.lang.Boolean |
Indicates whether to roll back the resource if a warning occurs while API Gateway is creating the RestApi resource. |
parameters |
java.util.Map |
Custom header parameters for the request. |
policy |
software.amazon.awscdk.services.iam.PolicyDocument |
A policy document that contains the permissions for this RestApi. |
restApiName |
java.lang.String |
A name for the API Gateway RestApi resource. |
retainDeployments |
java.lang.Boolean |
Retains old deployment resources when the API changes. |
integrations |
java.util.Map |
A mapping of API operation to its integration. |
operationLookup |
java.util.Map |
Details about each operation. |
apiKeyOptions |
ApiKeyOptions |
Options for API keys. |
corsOptions |
software.amazon.awscdk.services.apigateway.CorsOptions |
Cross Origin Resource Sharing options for the API. |
defaultAuthorizer |
Authorizer |
The default authorizer to use for your api. |
specPath |
java.lang.String |
Path to the JSON open api spec. |
gatewayResponses |
java.util.List |
Optional gateway responses for the API. |
minCompressionSize |
software.amazon.awscdk.Size |
A Size(in bytes, kibibytes, mebibytes etc) that is used to enable compression (with non-negative between 0 and 10485760 (10M) bytes, inclusive) or disable compression (when undefined) on an API. |
outputSpecBucket |
software.amazon.awscdk.services.s3.IBucket |
By default, the spec is prepared and outputted into the CDK assets bucket. |
webAclOptions |
TypeSafeApiWebAclOptions |
Options for the AWS WAF v2 WebACL associated with the api. |
scopeRequired
- Type: software.constructs.Construct
idRequired
- Type: java.lang.String
cloudWatchRoleOptional
- Type: java.lang.Boolean
- Default: false if
@aws-cdk/aws-apigateway:disableCloudWatchRoleis enabled, true otherwise
Automatically configure an AWS CloudWatch role for API Gateway.
cloudWatchRoleRemovalPolicyOptional
- Type: software.amazon.awscdk.RemovalPolicy
- Default: RemovalPolicy.RETAIN
The removal policy applied to the AWS CloudWatch role when this resource is removed from the application.
Requires cloudWatchRole to be enabled.
deployOptional
- Type: java.lang.Boolean
- Default: true
Indicates if a Deployment should be automatically created for this API, and recreated when the API model (resources, methods) changes.
Since API Gateway deployments are immutable, When this option is enabled (by default), an AWS::ApiGateway::Deployment resource will automatically created with a logical ID that hashes the API model (methods, resources and options). This means that when the model changes, the logical ID of this CloudFormation resource will change, and a new deployment will be created.
If this is set, latestDeployment will refer to the Deployment object
and deploymentStage will refer to a Stage that points to this
deployment. To customize the stage options, use the deployOptions
property.
A CloudFormation Output will also be defined with the root URL endpoint of this REST API.
deployOptionsOptional
- Type: software.amazon.awscdk.services.apigateway.StageOptions
- Default: Based on defaults of
StageOptions.
Options for the API Gateway stage that will always point to the latest deployment when deploy is enabled.
If deploy is disabled,
this value cannot be set.
descriptionOptional
- Type: java.lang.String
- Default: 'Automatically created by the RestApi construct'
A description of the RestApi construct.
disableExecuteApiEndpointOptional
- Type: java.lang.Boolean
- Default: false
Specifies whether clients can invoke the API using the default execute-api endpoint.
To require that clients use a custom domain name to invoke the API, disable the default endpoint.
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-restapi.html
domainNameOptional
- Type: software.amazon.awscdk.services.apigateway.DomainNameOptions
- Default: no domain name is defined, use
addDomainNameor directly define aDomainName.
Configure a custom domain name and map it to this API.
endpointExportNameOptional
- Type: java.lang.String
- Default: when no export name is given, output will be created without export
Export name for the CfnOutput containing the API endpoint.
endpointTypesOptional
- Type: java.util.List
- Default: EndpointType.EDGE
A list of the endpoint types of the API.
Use this property when creating an API.
failOnWarningsOptional
- Type: java.lang.Boolean
- Default: false
Indicates whether to roll back the resource if a warning occurs while API Gateway is creating the RestApi resource.
parametersOptional
- Type: java.util.Map
- Default: No parameters.
Custom header parameters for the request.
https://docs.aws.amazon.com/cli/latest/reference/apigateway/import-rest-api.html
policyOptional
- Type: software.amazon.awscdk.services.iam.PolicyDocument
- Default: No policy.
A policy document that contains the permissions for this RestApi.
restApiNameOptional
- Type: java.lang.String
- Default: ID of the RestApi construct.
A name for the API Gateway RestApi resource.
retainDeploymentsOptional
- Type: java.lang.Boolean
- Default: false
Retains old deployment resources when the API changes.
This allows manually reverting stages to point to old deployments via the AWS Console.
integrationsRequired
- Type: java.util.Map
TypeSafeApiIntegration\>
A mapping of API operation to its integration.
operationLookupRequired
- Type: java.util.Map
OperationDetails\>
Details about each operation.
apiKeyOptionsOptional
- Type: ApiKeyOptions
Options for API keys.
corsOptionsOptional
- Type: software.amazon.awscdk.services.apigateway.CorsOptions
Cross Origin Resource Sharing options for the API.
defaultAuthorizerOptional
- Type: Authorizer
The default authorizer to use for your api.
When omitted, no default authorizer is used. Authorizers specified at the integration level will override this for that operation.
specPathRequired
- Type: java.lang.String
Path to the JSON open api spec.
gatewayResponsesOptional
- Type: java.util.List
Optional gateway responses for the API.
Note that Type Safe API automatically configures request validation for you, and defines a default BAD_REQUEST_BODY gateway response which returns the validation error message. You can use this property to override this gateway response if desired.
minCompressionSizeOptional
- Type: software.amazon.awscdk.Size
- Default: Compression is disabled.
A Size(in bytes, kibibytes, mebibytes etc) that is used to enable compression (with non-negative between 0 and 10485760 (10M) bytes, inclusive) or disable compression (when undefined) on an API.
When compression is enabled, compression or decompression is not applied on the payload if the payload size is smaller than this value. Setting it to zero allows compression for any payload size.
outputSpecBucketOptional
- Type: software.amazon.awscdk.services.s3.IBucket
By default, the spec is prepared and outputted into the CDK assets bucket.
If this is undesired, use this option to specify the output bucket.
webAclOptionsOptional
- Type: TypeSafeApiWebAclOptions
Options for the AWS WAF v2 WebACL associated with the api.
By default, a Web ACL with the AWS default managed rule set will be associated with the API. These options may disable or override the defaults.
Methods
| Name | Description |
|---|---|
toString |
Returns a string representation of this construct. |
toString
public java.lang.String toString()
Returns a string representation of this construct.
Static Functions
| Name | Description |
|---|---|
isConstruct |
Checks if x is a construct. |
isConstruct
import software.aws.pdk.type_safe_api.TypeSafeRestApi;
TypeSafeRestApi.isConstruct(java.lang.Object x)
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.
xRequired
- Type: java.lang.Object
Any object.
Properties
| Name | Type | Description |
|---|---|---|
node |
software.constructs.Node |
The tree node. |
api |
software.amazon.awscdk.services.apigateway.SpecRestApi |
Underlying API Gateway API construct. |
extendedApiSpecification |
java.lang.Object |
The OpenAPI specification with applied API gateway extensions. |
ipSet |
software.amazon.awscdk.services.wafv2.CfnIPSet |
Reference to the IP set if created. |
webAcl |
software.amazon.awscdk.services.wafv2.CfnWebACL |
Reference to the webacl, if created. |
webAclAssociation |
software.amazon.awscdk.services.wafv2.CfnWebACLAssociation |
Reference to the web acl association if created. |
nodeRequired
public Node getNode();
- Type: software.constructs.Node
The tree node.
apiRequired
public SpecRestApi getApi();
- Type: software.amazon.awscdk.services.apigateway.SpecRestApi
Underlying API Gateway API construct.
extendedApiSpecificationRequired
public java.lang.Object getExtendedApiSpecification();
- Type: java.lang.Object
The OpenAPI specification with applied API gateway extensions.
ipSetOptional
public CfnIPSet getIpSet();
- Type: software.amazon.awscdk.services.wafv2.CfnIPSet
Reference to the IP set if created.
webAclOptional
public CfnWebACL getWebAcl();
- Type: software.amazon.awscdk.services.wafv2.CfnWebACL
Reference to the webacl, if created.
webAclAssociationOptional
public CfnWebACLAssociation getWebAclAssociation();
- Type: software.amazon.awscdk.services.wafv2.CfnWebACLAssociation
Reference to the web acl association if created.
TypeSafeWebsocketApi
A construct for creating a websocket API, based on the provided spec and integrations.
Initializers
import software.aws.pdk.type_safe_api.TypeSafeWebsocketApi;
TypeSafeWebsocketApi.Builder.create(Construct scope, java.lang.String id)
// .apiKeySelectionExpression(WebSocketApiKeySelectionExpression)
// .apiName(java.lang.String)
// .description(java.lang.String)
.integrations(java.util.Map<java.lang.String, TypeSafeWebsocketApiIntegration>)
.operationLookup(java.util.Map<java.lang.String, WebsocketOperationDetails>)
.specPath(java.lang.String)
// .authorizer(IWebSocketRouteAuthorizer)
// .connect(TypeSafeWebsocketApiIntegration)
// .disableAccessLogging(java.lang.Boolean)
// .disableGrantManagementAccessToLambdas(java.lang.Boolean)
// .disableMockIntegrationResponses(java.lang.Boolean)
// .disconnect(TypeSafeWebsocketApiIntegration)
// .stageProps(WebSocketStageProps)
.build();
| Name | Type | Description |
|---|---|---|
scope |
software.constructs.Construct |
No description. |
id |
java.lang.String |
No description. |
apiKeySelectionExpression |
software.amazon.awscdk.services.apigatewayv2.WebSocketApiKeySelectionExpression |
An API key selection expression. |
apiName |
java.lang.String |
Name for the WebSocket API resource. |
description |
java.lang.String |
The description of the API. |
integrations |
java.util.Map |
WebSocket routes and their corresponding integrations. |
operationLookup |
java.util.Map |
Details about each operation. |
specPath |
java.lang.String |
Path to the websocket api specification json file. |
authorizer |
software.amazon.awscdk.services.apigatewayv2.IWebSocketRouteAuthorizer |
Authorizer to use for the API (applied to the $connect route). |
connect |
TypeSafeWebsocketApiIntegration |
Integration for the $connect route (invoked when a new client connects). |
disableAccessLogging |
java.lang.Boolean |
Disable access logging. |
disableGrantManagementAccessToLambdas |
java.lang.Boolean |
By default, all lambda integrations are granted management API access for the websocket API to send messages, disconnect clients, etc. |
disableMockIntegrationResponses |
java.lang.Boolean |
By default, all mock integrations will automatically be configured with integration responses such that the integration is considered successful. |
disconnect |
TypeSafeWebsocketApiIntegration |
Integration for the $disconnect route (invoked when a client disconnects). |
stageProps |
WebSocketStageProps |
Options for the default stage. |
scopeRequired
- Type: software.constructs.Construct
idRequired
- Type: java.lang.String
apiKeySelectionExpressionOptional
- Type: software.amazon.awscdk.services.apigatewayv2.WebSocketApiKeySelectionExpression
- Default: Key is not required to access these APIs
An API key selection expression.
Providing this option will require an API Key be provided to access the API.
apiNameOptional
- Type: java.lang.String
- Default: id of the WebSocketApi construct.
Name for the WebSocket API resource.
descriptionOptional
- Type: java.lang.String
- Default: none
The description of the API.
integrationsRequired
- Type: java.util.Map
TypeSafeWebsocketApiIntegration\>
WebSocket routes and their corresponding integrations.
operationLookupRequired
- Type: java.util.Map
WebsocketOperationDetails\>
Details about each operation.
specPathRequired
- Type: java.lang.String
Path to the websocket api specification json file.
authorizerOptional
- Type: software.amazon.awscdk.services.apigatewayv2.IWebSocketRouteAuthorizer
- Default: NONE
Authorizer to use for the API (applied to the $connect route).
connectOptional
- Type: TypeSafeWebsocketApiIntegration
- Default: mocked
Integration for the $connect route (invoked when a new client connects).
disableAccessLoggingOptional
- Type: java.lang.Boolean
- Default: false
Disable access logging.
disableGrantManagementAccessToLambdasOptional
- Type: java.lang.Boolean
- Default: false
By default, all lambda integrations are granted management API access for the websocket API to send messages, disconnect clients, etc.
Set to true if you would like to manage these permissions manually.
disableMockIntegrationResponsesOptional
- Type: java.lang.Boolean
- Default: false
By default, all mock integrations will automatically be configured with integration responses such that the integration is considered successful.
Set to true to disable this (mock integrations will respond with errors)
disconnectOptional
- Type: TypeSafeWebsocketApiIntegration
- Default: mocked
Integration for the $disconnect route (invoked when a client disconnects).
stagePropsOptional
- Type: WebSocketStageProps
Options for the default stage.
Methods
| Name | Description |
|---|---|
toString |
Returns a string representation of this construct. |
toString
public java.lang.String toString()
Returns a string representation of this construct.
Static Functions
| Name | Description |
|---|---|
isConstruct |
Checks if x is a construct. |
isConstruct
import software.aws.pdk.type_safe_api.TypeSafeWebsocketApi;
TypeSafeWebsocketApi.isConstruct(java.lang.Object x)
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.
xRequired
- Type: java.lang.Object
Any object.
Properties
| Name | Type | Description |
|---|---|---|
node |
software.constructs.Node |
The tree node. |
api |
software.amazon.awscdk.services.apigatewayv2.WebSocketApi |
Reference to the websocket API. |
defaultStage |
software.amazon.awscdk.services.apigatewayv2.WebSocketStage |
Reference to the default deploy stage. |
nodeRequired
public Node getNode();
- Type: software.constructs.Node
The tree node.
apiRequired
public WebSocketApi getApi();
- Type: software.amazon.awscdk.services.apigatewayv2.WebSocketApi
Reference to the websocket API.
defaultStageRequired
public WebSocketStage getDefaultStage();
- Type: software.amazon.awscdk.services.apigatewayv2.WebSocketStage
Reference to the default deploy stage.
TypeSafeWebSocketApiProject
Project for a Type Safe WebSocket API, defined using Smithy or OpenAPI.
Generates a CDK construct to deploy your API, as well as client and server code to help build your API quickly.
Initializers
import software.aws.pdk.type_safe_api.TypeSafeWebSocketApiProject;
TypeSafeWebSocketApiProject.Builder.create()
.name(java.lang.String)
// .commitGenerated(java.lang.Boolean)
// .gitIgnoreOptions(IgnoreFileOptions)
// .gitOptions(GitOptions)
// .logging(LoggerOptions)
// .outdir(java.lang.String)
// .parent(Project)
// .projenCommand(java.lang.String)
// .projenrcJson(java.lang.Boolean)
// .projenrcJsonOptions(ProjenrcJsonOptions)
// .renovatebot(java.lang.Boolean)
// .renovatebotOptions(RenovatebotOptions)
.infrastructure(WebSocketInfrastructureConfiguration)
.model(TypeSafeWebSocketApiModelConfiguration)
// .documentation(WebSocketDocumentationConfiguration)
// .handlers(WebSocketHandlersConfiguration)
// .library(WebSocketLibraryConfiguration)
// .runtime(WebSocketRuntimeConfiguration)
.build();
| Name | Type | Description |
|---|---|---|
name |
java.lang.String |
This is the name of your project. |
commitGenerated |
java.lang.Boolean |
Whether to commit the managed files by default. |
gitIgnoreOptions |
io.github.cdklabs.projen.IgnoreFileOptions |
Configuration options for .gitignore file. |
gitOptions |
io.github.cdklabs.projen.GitOptions |
Configuration options for git. |
logging |
io.github.cdklabs.projen.LoggerOptions |
Configure logging options such as verbosity. |
outdir |
java.lang.String |
The root directory of the project. |
parent |
io.github.cdklabs.projen.Project |
The parent project, if this project is part of a bigger project. |
projenCommand |
java.lang.String |
The shell command to use in order to run the projen CLI. |
projenrcJson |
java.lang.Boolean |
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation. |
projenrcJsonOptions |
io.github.cdklabs.projen.ProjenrcJsonOptions |
Options for .projenrc.json. |
renovatebot |
java.lang.Boolean |
Use renovatebot to handle dependency upgrades. |
renovatebotOptions |
io.github.cdklabs.projen.RenovatebotOptions |
Options for renovatebot. |
infrastructure |
WebSocketInfrastructureConfiguration |
Configuration for generated infrastructure. |
model |
TypeSafeWebSocketApiModelConfiguration |
Configuration for the API model. |
documentation |
WebSocketDocumentationConfiguration |
Configuration for generated documentation. |
handlers |
WebSocketHandlersConfiguration |
Configuration for lambda handlers for implementing the API. |
library |
WebSocketLibraryConfiguration |
Configuration for generated libraries. |
runtime |
WebSocketRuntimeConfiguration |
Configuration for generated runtime projects (containing types, clients and server code). |
nameRequired
- Type: java.lang.String
- Default: $BASEDIR
This is the name of your project.
commitGeneratedOptional
- Type: java.lang.Boolean
- Default: true
Whether to commit the managed files by default.
gitIgnoreOptionsOptional
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptionsOptional
- Type: io.github.cdklabs.projen.GitOptions
Configuration options for git.
loggingOptional
- Type: io.github.cdklabs.projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
outdirOptional
- Type: java.lang.String
- Default: "."
The root directory of the project.
Relative to this directory, all files are synthesized.
If this project has a parent, this directory is relative to the parent directory and it cannot be the same as the parent or any of it's other subprojects.
parentOptional
- Type: io.github.cdklabs.projen.Project
The parent project, if this project is part of a bigger project.
projenCommandOptional
- Type: java.lang.String
- Default: "npx projen"
The shell command to use in order to run the projen CLI.
Can be used to customize in special environments.
projenrcJsonOptional
- Type: java.lang.Boolean
- Default: false
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation.
projenrcJsonOptionsOptional
- Type: io.github.cdklabs.projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
renovatebotOptional
- Type: java.lang.Boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptionsOptional
- Type: io.github.cdklabs.projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
infrastructureRequired
Configuration for generated infrastructure.
modelRequired
Configuration for the API model.
documentationOptional
Configuration for generated documentation.
handlersOptional
Configuration for lambda handlers for implementing the API.
libraryOptional
Configuration for generated libraries.
These include clients for interacting with your websocket API
runtimeOptional
Configuration for generated runtime projects (containing types, clients and server code).
Methods
| Name | Description |
|---|---|
toString |
Returns a string representation of this construct. |
addExcludeFromCleanup |
Exclude the matching files from pre-synth cleanup. |
addGitIgnore |
Adds a .gitignore pattern. |
addPackageIgnore |
Exclude these files from the bundled package. |
addTask |
Adds a new task to this project. |
addTip |
Prints a "tip" message during synthesis. |
annotateGenerated |
Consider a set of files as "generated". |
postSynthesize |
Called after all components are synthesized. |
preSynthesize |
Called before all components are synthesized. |
removeTask |
Removes a task from a project. |
runTaskCommand |
Returns the shell command to execute in order to run a task. |
synth |
Synthesize all project files into outdir. |
tryFindFile |
Finds a file at the specified relative path within this project and all its subprojects. |
tryFindJsonFile |
Finds a json file by name. |
tryFindObjectFile |
Finds an object file (like JsonFile, YamlFile, etc.) by name. |
tryRemoveFile |
Finds a file at the specified relative path within this project and removes it. |
toString
public java.lang.String toString()
Returns a string representation of this construct.
addExcludeFromCleanup
public void addExcludeFromCleanup(java.lang.String globs)
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.
globsRequired
- Type: java.lang.String
The glob patterns to match.
addGitIgnore
public void addGitIgnore(java.lang.String pattern)
Adds a .gitignore pattern.
patternRequired
- Type: java.lang.String
The glob pattern to ignore.
addPackageIgnore
public void addPackageIgnore(java.lang.String _pattern)
Exclude these files from the bundled package.
Implemented by project types based on the
packaging mechanism. For example, NodeProject delegates this to .npmignore.
_patternRequired
- Type: java.lang.String
The glob pattern to exclude.
addTask
public Task addTask(java.lang.String name)
public Task addTask(java.lang.String name, TaskOptions props)
Adds a new task to this project.
This will fail if the project already has a task with this name.
nameRequired
- Type: java.lang.String
The task name to add.
propsOptional
- Type: io.github.cdklabs.projen.TaskOptions
Task properties.
~~addTip~~
public void addTip(java.lang.String message)
Prints a "tip" message during synthesis.
messageRequired
- Type: java.lang.String
The message.
annotateGenerated
public void annotateGenerated(java.lang.String _glob)
Consider a set of files as "generated".
This method is implemented by derived classes and used for example, to add git attributes to tell GitHub that certain files are generated.
_globRequired
- Type: java.lang.String
the glob pattern to match (could be a file path).
postSynthesize
public void postSynthesize()
Called after all components are synthesized.
Order is not guaranteed.
preSynthesize
public void preSynthesize()
Called before all components are synthesized.
removeTask
public Task removeTask(java.lang.String name)
Removes a task from a project.
nameRequired
- Type: java.lang.String
The name of the task to remove.
runTaskCommand
public java.lang.String runTaskCommand(Task task)
Returns the shell command to execute in order to run a task.
By default, this is npx projen@<version> <task>
taskRequired
- Type: io.github.cdklabs.projen.Task
The task for which the command is required.
synth
public void synth()
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()"
tryFindFile
public FileBase tryFindFile(java.lang.String filePath)
Finds a file at the specified relative path within this project and all its subprojects.
filePathRequired
- Type: java.lang.String
The file path.
If this path is relative, it will be resolved from the root of this project.
~~tryFindJsonFile~~
public JsonFile tryFindJsonFile(java.lang.String filePath)
Finds a json file by name.
filePathRequired
- Type: java.lang.String
The file path.
tryFindObjectFile
public ObjectFile tryFindObjectFile(java.lang.String filePath)
Finds an object file (like JsonFile, YamlFile, etc.) by name.
filePathRequired
- Type: java.lang.String
The file path.
tryRemoveFile
public FileBase tryRemoveFile(java.lang.String filePath)
Finds a file at the specified relative path within this project and removes it.
filePathRequired
- Type: java.lang.String
The file path.
If this path is relative, it will be resolved from the root of this project.
Static Functions
| Name | Description |
|---|---|
isConstruct |
Checks if x is a construct. |
isProject |
Test whether the given construct is a project. |
of |
Find the closest ancestor project for given construct. |
isConstruct
import software.aws.pdk.type_safe_api.TypeSafeWebSocketApiProject;
TypeSafeWebSocketApiProject.isConstruct(java.lang.Object x)
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.
xRequired
- Type: java.lang.Object
Any object.
isProject
import software.aws.pdk.type_safe_api.TypeSafeWebSocketApiProject;
TypeSafeWebSocketApiProject.isProject(java.lang.Object x)
Test whether the given construct is a project.
xRequired
- Type: java.lang.Object
of
import software.aws.pdk.type_safe_api.TypeSafeWebSocketApiProject;
TypeSafeWebSocketApiProject.of(IConstruct construct)
Find the closest ancestor project for given construct.
When given a project, this it the project itself.
constructRequired
- Type: software.constructs.IConstruct
Properties
| Name | Type | Description |
|---|---|---|
node |
software.constructs.Node |
The tree node. |
buildTask |
io.github.cdklabs.projen.Task |
No description. |
commitGenerated |
java.lang.Boolean |
Whether to commit the managed files by default. |
compileTask |
io.github.cdklabs.projen.Task |
No description. |
components |
java.util.List |
Returns all the components within this project. |
deps |
io.github.cdklabs.projen.Dependencies |
Project dependencies. |
ejected |
java.lang.Boolean |
Whether or not the project is being ejected. |
files |
java.util.List |
All files in this project. |
gitattributes |
io.github.cdklabs.projen.GitAttributesFile |
The .gitattributes file for this repository. |
gitignore |
io.github.cdklabs.projen.IgnoreFile |
.gitignore. |
logger |
io.github.cdklabs.projen.Logger |
Logging utilities. |
name |
java.lang.String |
Project name. |
outdir |
java.lang.String |
Absolute output directory of this project. |
packageTask |
io.github.cdklabs.projen.Task |
No description. |
postCompileTask |
io.github.cdklabs.projen.Task |
No description. |
preCompileTask |
io.github.cdklabs.projen.Task |
No description. |
projectBuild |
io.github.cdklabs.projen.ProjectBuild |
Manages the build process of the project. |
projenCommand |
java.lang.String |
The command to use in order to run the projen CLI. |
root |
io.github.cdklabs.projen.Project |
The root project. |
subprojects |
java.util.List |
Returns all the subprojects within this project. |
tasks |
io.github.cdklabs.projen.Tasks |
Project tasks. |
testTask |
io.github.cdklabs.projen.Task |
No description. |
defaultTask |
io.github.cdklabs.projen.Task |
This is the "default" task, the one that executes "projen". |
initProject |
io.github.cdklabs.projen.InitProject |
The options used when this project is bootstrapped via projen new. |
parent |
io.github.cdklabs.projen.Project |
A parent project. |
all |
ProjectCollections |
Collections of all sub-projects managed by this project. |
documentation |
GeneratedWebSocketDocumentationProjects |
Generated documentation projects. |
handlers |
GeneratedCodeProjects |
Lambda handlers projects. |
infrastructure |
GeneratedCodeProjects |
Generated infrastructure projects. |
library |
GeneratedWebSocketLibraryProjects |
Generated library projects. |
model |
WebSocketModelProject |
Project for the api model. |
runtime |
GeneratedCodeProjects |
Generated runtime projects. |
nodeRequired
public Node getNode();
- Type: software.constructs.Node
The tree node.
buildTaskRequired
public Task getBuildTask();
- Type: io.github.cdklabs.projen.Task
commitGeneratedRequired
public java.lang.Boolean getCommitGenerated();
- Type: java.lang.Boolean
Whether to commit the managed files by default.
compileTaskRequired
public Task getCompileTask();
- Type: io.github.cdklabs.projen.Task
componentsRequired
public java.util.List<Component> getComponents();
- Type: java.util.List
Returns all the components within this project.
depsRequired
public Dependencies getDeps();
- Type: io.github.cdklabs.projen.Dependencies
Project dependencies.
ejectedRequired
public java.lang.Boolean getEjected();
- Type: java.lang.Boolean
Whether or not the project is being ejected.
filesRequired
public java.util.List<FileBase> getFiles();
- Type: java.util.List
All files in this project.
gitattributesRequired
public GitAttributesFile getGitattributes();
- Type: io.github.cdklabs.projen.GitAttributesFile
The .gitattributes file for this repository.
gitignoreRequired
public IgnoreFile getGitignore();
- Type: io.github.cdklabs.projen.IgnoreFile
.gitignore.
loggerRequired
public Logger getLogger();
- Type: io.github.cdklabs.projen.Logger
Logging utilities.
nameRequired
public java.lang.String getName();
- Type: java.lang.String
Project name.
outdirRequired
public java.lang.String getOutdir();
- Type: java.lang.String
Absolute output directory of this project.
packageTaskRequired
public Task getPackageTask();
- Type: io.github.cdklabs.projen.Task
postCompileTaskRequired
public Task getPostCompileTask();
- Type: io.github.cdklabs.projen.Task
preCompileTaskRequired
public Task getPreCompileTask();
- Type: io.github.cdklabs.projen.Task
projectBuildRequired
public ProjectBuild getProjectBuild();
- Type: io.github.cdklabs.projen.ProjectBuild
Manages the build process of the project.
projenCommandRequired
public java.lang.String getProjenCommand();
- Type: java.lang.String
The command to use in order to run the projen CLI.
rootRequired
public Project getRoot();
- Type: io.github.cdklabs.projen.Project
The root project.
subprojectsRequired
public java.util.List<Project> getSubprojects();
- Type: java.util.List
Returns all the subprojects within this project.
tasksRequired
public Tasks getTasks();
- Type: io.github.cdklabs.projen.Tasks
Project tasks.
testTaskRequired
public Task getTestTask();
- Type: io.github.cdklabs.projen.Task
defaultTaskOptional
public Task getDefaultTask();
- Type: io.github.cdklabs.projen.Task
This is the "default" task, the one that executes "projen".
Undefined if the project is being ejected.
initProjectOptional
public InitProject getInitProject();
- Type: io.github.cdklabs.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.
parentOptional
public Project getParent();
- Type: io.github.cdklabs.projen.Project
A parent project.
If undefined, this is the root project.
allRequired
public ProjectCollections getAll();
- Type: ProjectCollections
Collections of all sub-projects managed by this project.
documentationRequired
public GeneratedWebSocketDocumentationProjects getDocumentation();
Generated documentation projects.
Only the properties corresponding to specified documentation.formats will be defined.
handlersRequired
public GeneratedCodeProjects getHandlers();
- Type: GeneratedCodeProjects
Lambda handlers projects.
Only the properties corresponding to handlers.languages will be defined.
infrastructureRequired
public GeneratedCodeProjects getInfrastructure();
- Type: GeneratedCodeProjects
Generated infrastructure projects.
Only the property corresponding to infrastructure.language will be defined.
libraryRequired
public GeneratedWebSocketLibraryProjects getLibrary();
Generated library projects.
Only the properties corresponding to specified library.libraries will be defined.
modelRequired
public WebSocketModelProject getModel();
- Type: WebSocketModelProject
Project for the api model.
runtimeRequired
public GeneratedCodeProjects getRuntime();
- Type: GeneratedCodeProjects
Generated runtime projects.
When runtime.languages includes the corresponding language, the project can be
assumed to be defined.
Constants
| Name | Type | Description |
|---|---|---|
DEFAULT_TASK |
java.lang.String |
The name of the default task (the task executed when projen is run without arguments). |
DEFAULT_TASKRequired
public java.lang.String getDefaultTask();
- Type: java.lang.String
The name of the default task (the task executed when projen is run without arguments).
Normally this task should synthesize the project files.
TypeSpecAsyncDefinition
The TypeSpec model definition for an async api.
Initializers
import software.aws.pdk.type_safe_api.TypeSpecAsyncDefinition;
TypeSpecAsyncDefinition.Builder.create(NodeProject project)
.typeSpecOptions(TypeSpecModelOptions)
// .handlerLanguages(java.util.List<Language>)
.build();
| Name | Type | Description |
|---|---|---|
project |
io.github.cdklabs.projen.javascript.NodeProject |
No description. |
typeSpecOptions |
TypeSpecModelOptions |
TypeSpec model options. |
handlerLanguages |
java.util.List<Language> |
The languages users have specified for handler projects (if any). |
projectRequired
- Type: io.github.cdklabs.projen.javascript.NodeProject
typeSpecOptionsRequired
- Type: TypeSpecModelOptions
TypeSpec model options.
handlerLanguagesOptional
- Type: java.util.List<Language>
The languages users have specified for handler projects (if any).
Methods
| Name | Description |
|---|---|
toString |
Returns a string representation of this construct. |
postSynthesize |
Called after synthesis. |
preSynthesize |
Called before synthesis. |
synthesize |
Synthesizes files to the project output directory. |
toString
public java.lang.String toString()
Returns a string representation of this construct.
postSynthesize
public void postSynthesize()
Called after synthesis.
Order is not guaranteed.
preSynthesize
public void preSynthesize()
Called before synthesis.
synthesize
public void synthesize()
Synthesizes files to the project output directory.
Static Functions
| Name | Description |
|---|---|
isConstruct |
Checks if x is a construct. |
isComponent |
Test whether the given construct is a component. |
isConstruct
import software.aws.pdk.type_safe_api.TypeSpecAsyncDefinition;
TypeSpecAsyncDefinition.isConstruct(java.lang.Object x)
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.
xRequired
- Type: java.lang.Object
Any object.
isComponent
import software.aws.pdk.type_safe_api.TypeSpecAsyncDefinition;
TypeSpecAsyncDefinition.isComponent(java.lang.Object x)
Test whether the given construct is a component.
xRequired
- Type: java.lang.Object
Properties
| Name | Type | Description |
|---|---|---|
node |
software.constructs.Node |
The tree node. |
project |
io.github.cdklabs.projen.Project |
No description. |
openApiSpecificationPath |
java.lang.String |
Path to the generated OpenAPI specification. |
nodeRequired
public Node getNode();
- Type: software.constructs.Node
The tree node.
projectRequired
public Project getProject();
- Type: io.github.cdklabs.projen.Project
openApiSpecificationPathRequired
public java.lang.String getOpenApiSpecificationPath();
- Type: java.lang.String
Path to the generated OpenAPI specification.
TypeSpecAsyncModelProject
Model project for defining a WebSocket API in TypeSpec.
Initializers
import software.aws.pdk.type_safe_api.TypeSpecAsyncModelProject;
TypeSpecAsyncModelProject.Builder.create()
.name(java.lang.String)
// .commitGenerated(java.lang.Boolean)
// .gitIgnoreOptions(IgnoreFileOptions)
// .gitOptions(GitOptions)
// .logging(LoggerOptions)
// .outdir(java.lang.String)
// .parent(Project)
// .projenCommand(java.lang.String)
// .projenrcJson(java.lang.Boolean)
// .projenrcJsonOptions(ProjenrcJsonOptions)
// .renovatebot(java.lang.Boolean)
// .renovatebotOptions(RenovatebotOptions)
// .autoApproveOptions(AutoApproveOptions)
// .autoMerge(java.lang.Boolean)
// .autoMergeOptions(AutoMergeOptions)
// .clobber(java.lang.Boolean)
// .devContainer(java.lang.Boolean)
// .github(java.lang.Boolean)
// .githubOptions(GitHubOptions)
// .gitpod(java.lang.Boolean)
// .mergify(java.lang.Boolean)
// .mergifyOptions(MergifyOptions)
// .projectType(ProjectType)
// .projenCredentials(GithubCredentials)
// .projenTokenSecret(java.lang.String)
// .readme(SampleReadmeProps)
// .stale(java.lang.Boolean)
// .staleOptions(StaleOptions)
// .vscode(java.lang.Boolean)
// .allowLibraryDependencies(java.lang.Boolean)
// .authorEmail(java.lang.String)
// .authorName(java.lang.String)
// .authorOrganization(java.lang.Boolean)
// .authorUrl(java.lang.String)
// .autoDetectBin(java.lang.Boolean)
// .bin(java.util.Map<java.lang.String, java.lang.String>)
// .bugsEmail(java.lang.String)
// .bugsUrl(java.lang.String)
// .bundledDeps(java.util.List<java.lang.String>)
// .codeArtifactOptions(CodeArtifactOptions)
// .deps(java.util.List<java.lang.String>)
// .description(java.lang.String)
// .devDeps(java.util.List<java.lang.String>)
// .entrypoint(java.lang.String)
// .homepage(java.lang.String)
// .keywords(java.util.List<java.lang.String>)
// .license(java.lang.String)
// .licensed(java.lang.Boolean)
// .maxNodeVersion(java.lang.String)
// .minNodeVersion(java.lang.String)
// .npmAccess(NpmAccess)
// .npmProvenance(java.lang.Boolean)
// .npmRegistry(java.lang.String)
// .npmRegistryUrl(java.lang.String)
// .npmTokenSecret(java.lang.String)
// .packageManager(NodePackageManager)
// .packageName(java.lang.String)
// .peerDependencyOptions(PeerDependencyOptions)
// .peerDeps(java.util.List<java.lang.String>)
// .pnpmVersion(java.lang.String)
// .repository(java.lang.String)
// .repositoryDirectory(java.lang.String)
// .scopedPackagesOptions(java.util.List<ScopedPackagesOptions>)
// .scripts(java.util.Map<java.lang.String, java.lang.String>)
// .stability(java.lang.String)
// .yarnBerryOptions(YarnBerryOptions)
// .jsiiReleaseVersion(java.lang.String)
// .majorVersion(java.lang.Number)
// .minMajorVersion(java.lang.Number)
// .npmDistTag(java.lang.String)
// .postBuildSteps(java.util.List<JobStep>)
// .prerelease(java.lang.String)
// .publishDryRun(java.lang.Boolean)
// .publishTasks(java.lang.Boolean)
// .releasableCommits(ReleasableCommits)
// .releaseBranches(java.util.Map<java.lang.String, BranchOptions>)
// .releaseEveryCommit(java.lang.Boolean)
// .releaseFailureIssue(java.lang.Boolean)
// .releaseFailureIssueLabel(java.lang.String)
// .releaseSchedule(java.lang.String)
// .releaseTagPrefix(java.lang.String)
// .releaseTrigger(ReleaseTrigger)
// .releaseWorkflowName(java.lang.String)
// .releaseWorkflowSetupSteps(java.util.List<JobStep>)
// .versionrcOptions(java.util.Map<java.lang.String, java.lang.Object>)
// .workflowContainerImage(java.lang.String)
// .workflowRunsOn(java.util.List<java.lang.String>)
// .workflowRunsOnGroup(GroupRunnerOptions)
.defaultReleaseBranch(java.lang.String)
// .artifactsDirectory(java.lang.String)
// .autoApproveUpgrades(java.lang.Boolean)
// .buildWorkflow(java.lang.Boolean)
// .buildWorkflowOptions(BuildWorkflowOptions)
// .buildWorkflowTriggers(Triggers)
// .bundlerOptions(BundlerOptions)
// .checkLicenses(LicenseCheckerOptions)
// .codeCov(java.lang.Boolean)
// .codeCovTokenSecret(java.lang.String)
// .copyrightOwner(java.lang.String)
// .copyrightPeriod(java.lang.String)
// .dependabot(java.lang.Boolean)
// .dependabotOptions(DependabotOptions)
// .depsUpgrade(java.lang.Boolean)
// .depsUpgradeOptions(UpgradeDependenciesOptions)
// .gitignore(java.util.List<java.lang.String>)
// .jest(java.lang.Boolean)
// .jestOptions(JestOptions)
// .mutableBuild(java.lang.Boolean)
// .npmignore(java.util.List<java.lang.String>)
// .npmignoreEnabled(java.lang.Boolean)
// .npmIgnoreOptions(IgnoreFileOptions)
// .package(java.lang.Boolean)
// .prettier(java.lang.Boolean)
// .prettierOptions(PrettierOptions)
// .projenDevDependency(java.lang.Boolean)
// .projenrcJs(java.lang.Boolean)
// .projenrcJsOptions(ProjenrcOptions)
// .projenVersion(java.lang.String)
// .pullRequestTemplate(java.lang.Boolean)
// .pullRequestTemplateContents(java.util.List<java.lang.String>)
// .release(java.lang.Boolean)
// .releaseToNpm(java.lang.Boolean)
// .releaseWorkflow(java.lang.Boolean)
// .workflowBootstrapSteps(java.util.List<JobStep>)
// .workflowGitIdentity(GitIdentity)
// .workflowNodeVersion(java.lang.String)
// .workflowPackageCache(java.lang.Boolean)
.typeSpecOptions(TypeSpecModelOptions)
// .handlerLanguages(java.util.List<Language>)
.asyncApiSpecFile(java.lang.String)
.parsedSpecFile(java.lang.String)
.build();
| Name | Type | Description |
|---|---|---|
name |
java.lang.String |
This is the name of your project. |
commitGenerated |
java.lang.Boolean |
Whether to commit the managed files by default. |
gitIgnoreOptions |
io.github.cdklabs.projen.IgnoreFileOptions |
Configuration options for .gitignore file. |
gitOptions |
io.github.cdklabs.projen.GitOptions |
Configuration options for git. |
logging |
io.github.cdklabs.projen.LoggerOptions |
Configure logging options such as verbosity. |
outdir |
java.lang.String |
The root directory of the project. |
parent |
io.github.cdklabs.projen.Project |
The parent project, if this project is part of a bigger project. |
projenCommand |
java.lang.String |
The shell command to use in order to run the projen CLI. |
projenrcJson |
java.lang.Boolean |
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation. |
projenrcJsonOptions |
io.github.cdklabs.projen.ProjenrcJsonOptions |
Options for .projenrc.json. |
renovatebot |
java.lang.Boolean |
Use renovatebot to handle dependency upgrades. |
renovatebotOptions |
io.github.cdklabs.projen.RenovatebotOptions |
Options for renovatebot. |
autoApproveOptions |
io.github.cdklabs.projen.github.AutoApproveOptions |
Enable and configure the 'auto approve' workflow. |
autoMerge |
java.lang.Boolean |
Enable automatic merging on GitHub. |
autoMergeOptions |
io.github.cdklabs.projen.github.AutoMergeOptions |
Configure options for automatic merging on GitHub. |
clobber |
java.lang.Boolean |
Add a clobber task which resets the repo to origin. |
devContainer |
java.lang.Boolean |
Add a VSCode development environment (used for GitHub Codespaces). |
github |
java.lang.Boolean |
Enable GitHub integration. |
githubOptions |
io.github.cdklabs.projen.github.GitHubOptions |
Options for GitHub integration. |
gitpod |
java.lang.Boolean |
Add a Gitpod development environment. |
mergify |
java.lang.Boolean |
Whether mergify should be enabled on this repository or not. |
mergifyOptions |
io.github.cdklabs.projen.github.MergifyOptions |
Options for mergify. |
projectType |
io.github.cdklabs.projen.ProjectType |
Which type of project this is (library/app). |
projenCredentials |
io.github.cdklabs.projen.github.GithubCredentials |
Choose a method of providing GitHub API access for projen workflows. |
projenTokenSecret |
java.lang.String |
The name of a secret which includes a GitHub Personal Access Token to be used by projen workflows. |
readme |
io.github.cdklabs.projen.SampleReadmeProps |
The README setup. |
stale |
java.lang.Boolean |
Auto-close of stale issues and pull request. |
staleOptions |
io.github.cdklabs.projen.github.StaleOptions |
Auto-close stale issues and pull requests. |
vscode |
java.lang.Boolean |
Enable VSCode integration. |
allowLibraryDependencies |
java.lang.Boolean |
Allow the project to include peerDependencies and bundledDependencies. |
authorEmail |
java.lang.String |
Author's e-mail. |
authorName |
java.lang.String |
Author's name. |
authorOrganization |
java.lang.Boolean |
Is the author an organization. |
authorUrl |
java.lang.String |
Author's URL / Website. |
autoDetectBin |
java.lang.Boolean |
Automatically add all executables under the bin directory to your package.json file under the bin section. |
bin |
java.util.Map |
Binary programs vended with your module. |
bugsEmail |
java.lang.String |
The email address to which issues should be reported. |
bugsUrl |
java.lang.String |
The url to your project's issue tracker. |
bundledDeps |
java.util.List |
List of dependencies to bundle into this module. |
codeArtifactOptions |
io.github.cdklabs.projen.javascript.CodeArtifactOptions |
Options for npm packages using AWS CodeArtifact. |
deps |
java.util.List |
Runtime dependencies of this module. |
description |
java.lang.String |
The description is just a string that helps people understand the purpose of the package. |
devDeps |
java.util.List |
Build dependencies for this module. |
entrypoint |
java.lang.String |
Module entrypoint (main in package.json). |
homepage |
java.lang.String |
Package's Homepage / Website. |
keywords |
java.util.List |
Keywords to include in package.json. |
license |
java.lang.String |
License's SPDX identifier. |
licensed |
java.lang.Boolean |
Indicates if a license should be added. |
maxNodeVersion |
java.lang.String |
Minimum node.js version to require via engines (inclusive). |
minNodeVersion |
java.lang.String |
Minimum Node.js version to require via package.json engines (inclusive). |
npmAccess |
io.github.cdklabs.projen.javascript.NpmAccess |
Access level of the npm package. |
npmProvenance |
java.lang.Boolean |
Should provenance statements be generated when the package is published. |
npmRegistry |
java.lang.String |
The host name of the npm registry to publish to. |
npmRegistryUrl |
java.lang.String |
The base URL of the npm package registry. |
npmTokenSecret |
java.lang.String |
GitHub secret which contains the NPM token to use when publishing packages. |
packageManager |
io.github.cdklabs.projen.javascript.NodePackageManager |
The Node Package Manager used to execute scripts. |
packageName |
java.lang.String |
The "name" in package.json. |
peerDependencyOptions |
io.github.cdklabs.projen.javascript.PeerDependencyOptions |
Options for peerDeps. |
peerDeps |
java.util.List |
Peer dependencies for this module. |
pnpmVersion |
java.lang.String |
The version of PNPM to use if using PNPM as a package manager. |
repository |
java.lang.String |
The repository is the location where the actual code for your package lives. |
repositoryDirectory |
java.lang.String |
If the package.json for your package is not in the root directory (for example if it is part of a monorepo), you can specify the directory in which it lives. |
scopedPackagesOptions |
java.util.List |
Options for privately hosted scoped packages. |
scripts |
java.util.Map |
npm scripts to include. |
stability |
java.lang.String |
Package's Stability. |
yarnBerryOptions |
io.github.cdklabs.projen.javascript.YarnBerryOptions |
Options for Yarn Berry. |
jsiiReleaseVersion |
java.lang.String |
Version requirement of publib which is used to publish modules to npm. |
majorVersion |
java.lang.Number |
Major version to release from the default branch. |
minMajorVersion |
java.lang.Number |
Minimal Major version to release. |
npmDistTag |
java.lang.String |
The npmDistTag to use when publishing from the default branch. |
postBuildSteps |
java.util.List |
Steps to execute after build as part of the release workflow. |
prerelease |
java.lang.String |
Bump versions from the default branch as pre-releases (e.g. "beta", "alpha", "pre"). |
publishDryRun |
java.lang.Boolean |
Instead of actually publishing to package managers, just print the publishing command. |
publishTasks |
java.lang.Boolean |
Define publishing tasks that can be executed manually as well as workflows. |
releasableCommits |
io.github.cdklabs.projen.ReleasableCommits |
Find commits that should be considered releasable Used to decide if a release is required. |
releaseBranches |
java.util.Map |
Defines additional release branches. |
releaseEveryCommit |
java.lang.Boolean |
Automatically release new versions every commit to one of branches in releaseBranches. |
releaseFailureIssue |
java.lang.Boolean |
Create a github issue on every failed publishing task. |
releaseFailureIssueLabel |
java.lang.String |
The label to apply to issues indicating publish failures. |
releaseSchedule |
java.lang.String |
CRON schedule to trigger new releases. |
releaseTagPrefix |
java.lang.String |
Automatically add the given prefix to release tags. Useful if you are releasing on multiple branches with overlapping version numbers. |
releaseTrigger |
io.github.cdklabs.projen.release.ReleaseTrigger |
The release trigger to use. |
releaseWorkflowName |
java.lang.String |
The name of the default release workflow. |
releaseWorkflowSetupSteps |
java.util.List |
A set of workflow steps to execute in order to setup the workflow container. |
versionrcOptions |
java.util.Map |
Custom configuration used when creating changelog with standard-version package. |
workflowContainerImage |
java.lang.String |
Container image to use for GitHub workflows. |
workflowRunsOn |
java.util.List |
Github Runner selection labels. |
workflowRunsOnGroup |
io.github.cdklabs.projen.GroupRunnerOptions |
Github Runner Group selection options. |
defaultReleaseBranch |
java.lang.String |
The name of the main release branch. |
artifactsDirectory |
java.lang.String |
A directory which will contain build artifacts. |
autoApproveUpgrades |
java.lang.Boolean |
Automatically approve deps upgrade PRs, allowing them to be merged by mergify (if configued). |
buildWorkflow |
java.lang.Boolean |
Define a GitHub workflow for building PRs. |
buildWorkflowOptions |
io.github.cdklabs.projen.javascript.BuildWorkflowOptions |
Options for PR build workflow. |
buildWorkflowTriggers |
io.github.cdklabs.projen.github.workflows.Triggers |
Build workflow triggers. |
bundlerOptions |
io.github.cdklabs.projen.javascript.BundlerOptions |
Options for Bundler. |
checkLicenses |
io.github.cdklabs.projen.javascript.LicenseCheckerOptions |
Configure which licenses should be deemed acceptable for use by dependencies. |
codeCov |
java.lang.Boolean |
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. |
codeCovTokenSecret |
java.lang.String |
Define the secret name for a specified https://codecov.io/ token A secret is required to send coverage for private repositories. |
copyrightOwner |
java.lang.String |
License copyright owner. |
copyrightPeriod |
java.lang.String |
The copyright years to put in the LICENSE file. |
dependabot |
java.lang.Boolean |
Use dependabot to handle dependency upgrades. |
dependabotOptions |
io.github.cdklabs.projen.github.DependabotOptions |
Options for dependabot. |
depsUpgrade |
java.lang.Boolean |
Use tasks and github workflows to handle dependency upgrades. |
depsUpgradeOptions |
io.github.cdklabs.projen.javascript.UpgradeDependenciesOptions |
Options for UpgradeDependencies. |
gitignore |
java.util.List |
Additional entries to .gitignore. |
jest |
java.lang.Boolean |
Setup jest unit tests. |
jestOptions |
io.github.cdklabs.projen.javascript.JestOptions |
Jest options. |
mutableBuild |
java.lang.Boolean |
Automatically update files modified during builds to pull-request branches. |
npmignore |
java.util.List |
Additional entries to .npmignore. |
npmignoreEnabled |
java.lang.Boolean |
Defines an .npmignore file. Normally this is only needed for libraries that are packaged as tarballs. |
npmIgnoreOptions |
io.github.cdklabs.projen.IgnoreFileOptions |
Configuration options for .npmignore file. |
package |
java.lang.Boolean |
Defines a package task that will produce an npm tarball under the artifacts directory (e.g. dist). |
prettier |
java.lang.Boolean |
Setup prettier. |
prettierOptions |
io.github.cdklabs.projen.javascript.PrettierOptions |
Prettier options. |
projenDevDependency |
java.lang.Boolean |
Indicates of "projen" should be installed as a devDependency. |
projenrcJs |
java.lang.Boolean |
Generate (once) .projenrc.js (in JavaScript). Set to false in order to disable .projenrc.js generation. |
projenrcJsOptions |
io.github.cdklabs.projen.javascript.ProjenrcOptions |
Options for .projenrc.js. |
projenVersion |
java.lang.String |
Version of projen to install. |
pullRequestTemplate |
java.lang.Boolean |
Include a GitHub pull request template. |
pullRequestTemplateContents |
java.util.List |
The contents of the pull request template. |
release |
java.lang.Boolean |
Add release management to this project. |
releaseToNpm |
java.lang.Boolean |
Automatically release to npm when new versions are introduced. |
releaseWorkflow |
java.lang.Boolean |
DEPRECATED: renamed to release. |
workflowBootstrapSteps |
java.util.List |
Workflow steps to use in order to bootstrap this repo. |
workflowGitIdentity |
io.github.cdklabs.projen.github.GitIdentity |
The git identity to use in workflows. |
workflowNodeVersion |
java.lang.String |
The node version to use in GitHub workflows. |
workflowPackageCache |
java.lang.Boolean |
Enable Node.js package cache in GitHub workflows. |
typeSpecOptions |
TypeSpecModelOptions |
TypeSpec model options. |
handlerLanguages |
java.util.List<Language> |
The languages users have specified for handler projects (if any). |
asyncApiSpecFile |
java.lang.String |
Path to the generated AsyncAPI specification (relative to the project root). |
parsedSpecFile |
java.lang.String |
Path of the parsed/bundled OpenAPI specification (relative to the project root). |
nameRequired
- Type: java.lang.String
- Default: $BASEDIR
This is the name of your project.
commitGeneratedOptional
- Type: java.lang.Boolean
- Default: true
Whether to commit the managed files by default.
gitIgnoreOptionsOptional
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptionsOptional
- Type: io.github.cdklabs.projen.GitOptions
Configuration options for git.
loggingOptional
- Type: io.github.cdklabs.projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
outdirOptional
- Type: java.lang.String
- Default: "."
The root directory of the project.
Relative to this directory, all files are synthesized.
If this project has a parent, this directory is relative to the parent directory and it cannot be the same as the parent or any of it's other subprojects.
parentOptional
- Type: io.github.cdklabs.projen.Project
The parent project, if this project is part of a bigger project.
projenCommandOptional
- Type: java.lang.String
- Default: "npx projen"
The shell command to use in order to run the projen CLI.
Can be used to customize in special environments.
projenrcJsonOptional
- Type: java.lang.Boolean
- Default: false
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation.
projenrcJsonOptionsOptional
- Type: io.github.cdklabs.projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
renovatebotOptional
- Type: java.lang.Boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptionsOptional
- Type: io.github.cdklabs.projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
autoApproveOptionsOptional
- Type: io.github.cdklabs.projen.github.AutoApproveOptions
- Default: auto approve is disabled
Enable and configure the 'auto approve' workflow.
autoMergeOptional
- Type: java.lang.Boolean
- Default: true
Enable automatic merging on GitHub.
Has no effect if github.mergify
is set to false.
autoMergeOptionsOptional
- Type: io.github.cdklabs.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.
clobberOptional
- Type: java.lang.Boolean
- Default: true, but false for subprojects
Add a clobber task which resets the repo to origin.
devContainerOptional
- Type: java.lang.Boolean
- Default: false
Add a VSCode development environment (used for GitHub Codespaces).
githubOptional
- Type: java.lang.Boolean
- Default: true
Enable GitHub integration.
Enabled by default for root projects. Disabled for non-root projects.
githubOptionsOptional
- Type: io.github.cdklabs.projen.github.GitHubOptions
- Default: see GitHubOptions
Options for GitHub integration.
gitpodOptional
- Type: java.lang.Boolean
- Default: false
Add a Gitpod development environment.
~~mergify~~Optional
-
Deprecated: use
githubOptions.mergifyinstead -
Type: java.lang.Boolean
- Default: true
Whether mergify should be enabled on this repository or not.
~~mergifyOptions~~Optional
-
Deprecated: use
githubOptions.mergifyOptionsinstead -
Type: io.github.cdklabs.projen.github.MergifyOptions
- Default: default options
Options for mergify.
~~projectType~~Optional
-
Deprecated: no longer supported at the base project level
-
Type: io.github.cdklabs.projen.ProjectType
- Default: ProjectType.UNKNOWN
Which type of project this is (library/app).
projenCredentialsOptional
- Type: io.github.cdklabs.projen.github.GithubCredentials
- Default: use a personal access token named PROJEN_GITHUB_TOKEN
Choose a method of providing GitHub API access for projen workflows.
~~projenTokenSecret~~Optional
-
Deprecated: use
projenCredentials -
Type: java.lang.String
- Default: "PROJEN_GITHUB_TOKEN"
The name of a secret which includes a GitHub Personal Access Token to be used by projen workflows.
This token needs to have the repo, workflows
and packages scope.
readmeOptional
- Type: io.github.cdklabs.projen.SampleReadmeProps
- Default: { filename: 'README.md', contents: '# replace this' }
The README setup.
Example
"{ filename: 'readme.md', contents: '# title' }"
staleOptional
- Type: java.lang.Boolean
- Default: false
Auto-close of stale issues and pull request.
See staleOptions for options.
staleOptionsOptional
- Type: io.github.cdklabs.projen.github.StaleOptions
- Default: see defaults in
StaleOptions
Auto-close stale issues and pull requests.
To disable set stale to false.
vscodeOptional
- Type: java.lang.Boolean
- Default: true
Enable VSCode integration.
Enabled by default for root projects. Disabled for non-root projects.
allowLibraryDependenciesOptional
- Type: java.lang.Boolean
- Default: true
Allow the project to include peerDependencies and bundledDependencies.
This is normally only allowed for libraries. For apps, there's no meaning for specifying these.
authorEmailOptional
- Type: java.lang.String
Author's e-mail.
authorNameOptional
- Type: java.lang.String
Author's name.
authorOrganizationOptional
- Type: java.lang.Boolean
Is the author an organization.
authorUrlOptional
- Type: java.lang.String
Author's URL / Website.
autoDetectBinOptional
- Type: java.lang.Boolean
- Default: true
Automatically add all executables under the bin directory to your package.json file under the bin section.
binOptional
- Type: java.util.Map
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.
bugsEmailOptional
- Type: java.lang.String
The email address to which issues should be reported.
bugsUrlOptional
- Type: java.lang.String
The url to your project's issue tracker.
bundledDepsOptional
- Type: java.util.List
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.
codeArtifactOptionsOptional
- Type: io.github.cdklabs.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
depsOptional
- Type: java.util.List
- Default: []
Runtime dependencies of this module.
The recommendation is to only specify the module name here (e.g.
express). This will behave similar to yarn add or npm install in the
sense that it will add the module as a dependency to your package.json
file with the latest version (^). You can specify semver requirements in
the same syntax passed to npm i or yarn add (e.g. express@^2) and
this will be what you package.json will eventually include.
Example
[ 'express', 'lodash', 'foo@^2' ]
descriptionOptional
- Type: java.lang.String
The description is just a string that helps people understand the purpose of the package.
It can be used when searching for packages in a package manager as well. See https://classic.yarnpkg.com/en/docs/package-json/#toc-description
devDepsOptional
- Type: java.util.List
- Default: []
Build dependencies for this module.
These dependencies will only be available in your build environment but will not be fetched when this module is consumed.
The recommendation is to only specify the module name here (e.g.
express). This will behave similar to yarn add or npm install in the
sense that it will add the module as a dependency to your package.json
file with the latest version (^). You can specify semver requirements in
the same syntax passed to npm i or yarn add (e.g. express@^2) and
this will be what you package.json will eventually include.
Example
[ 'typescript', '@types/express' ]
entrypointOptional
- Type: java.lang.String
- Default: "lib/index.js"
Module entrypoint (main in package.json).
Set to an empty string to not include main in your package.json
homepageOptional
- Type: java.lang.String
Package's Homepage / Website.
keywordsOptional
- Type: java.util.List
Keywords to include in package.json.
licenseOptional
- Type: java.lang.String
- Default: "Apache-2.0"
License's SPDX identifier.
See https://github.com/projen/projen/tree/main/license-text for a list of supported licenses.
Use the licensed option if you want to no license to be specified.
licensedOptional
- Type: java.lang.Boolean
- Default: true
Indicates if a license should be added.
maxNodeVersionOptional
- Type: java.lang.String
- Default: no max
Minimum node.js version to require via engines (inclusive).
minNodeVersionOptional
- Type: java.lang.String
- Default: no "engines" specified
Minimum Node.js version to require via package.json engines (inclusive).
npmAccessOptional
- Type: io.github.cdklabs.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.
npmProvenanceOptional
- Type: java.lang.Boolean
- 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.
~~npmRegistry~~Optional
-
Deprecated: use
npmRegistryUrlinstead -
Type: java.lang.String
The host name of the npm registry to publish to.
Cannot be set together with npmRegistryUrl.
npmRegistryUrlOptional
- Type: java.lang.String
- Default: "https://registry.npmjs.org"
The base URL of the npm package registry.
Must be a URL (e.g. start with "https://" or "http://")
npmTokenSecretOptional
- Type: java.lang.String
- Default: "NPM_TOKEN"
GitHub secret which contains the NPM token to use when publishing packages.
packageManagerOptional
- Type: io.github.cdklabs.projen.javascript.NodePackageManager
- Default: NodePackageManager.YARN_CLASSIC
The Node Package Manager used to execute scripts.
packageNameOptional
- Type: java.lang.String
- Default: defaults to project name
The "name" in package.json.
peerDependencyOptionsOptional
- Type: io.github.cdklabs.projen.javascript.PeerDependencyOptions
Options for peerDeps.
peerDepsOptional
- Type: java.util.List
- 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.
pnpmVersionOptional
- Type: java.lang.String
- Default: "7"
The version of PNPM to use if using PNPM as a package manager.
repositoryOptional
- Type: java.lang.String
The repository is the location where the actual code for your package lives.
See https://classic.yarnpkg.com/en/docs/package-json/#toc-repository
repositoryDirectoryOptional
- Type: java.lang.String
If the package.json for your package is not in the root directory (for example if it is part of a monorepo), you can specify the directory in which it lives.
scopedPackagesOptionsOptional
- Type: java.util.List
- 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: java.util.Map
- 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.
stabilityOptional
- Type: java.lang.String
Package's Stability.
yarnBerryOptionsOptional
- Type: io.github.cdklabs.projen.javascript.YarnBerryOptions
- Default: Yarn Berry v4 with all default options
Options for Yarn Berry.
jsiiReleaseVersionOptional
- Type: java.lang.String
- Default: "latest"
Version requirement of publib which is used to publish modules to npm.
majorVersionOptional
- Type: java.lang.Number
- Default: Major version is not enforced.
Major version to release from the default branch.
If this is specified, we bump the latest version of this major version line. If not specified, we bump the global latest version.
minMajorVersionOptional
- Type: java.lang.Number
- Default: No minimum version is being enforced
Minimal Major version to release.
This can be useful to set to 1, as breaking changes before the 1.x major release are not incrementing the major version number.
Can not be set together with majorVersion.
npmDistTagOptional
- Type: java.lang.String
- Default: "latest"
The npmDistTag to use when publishing from the default branch.
To set the npm dist-tag for release branches, set the npmDistTag property
for each branch.
postBuildStepsOptional
- Type: java.util.List
- Default: []
Steps to execute after build as part of the release workflow.
prereleaseOptional
- Type: java.lang.String
- Default: normal semantic versions
Bump versions from the default branch as pre-releases (e.g. "beta", "alpha", "pre").
publishDryRunOptional
- Type: java.lang.Boolean
- Default: false
Instead of actually publishing to package managers, just print the publishing command.
publishTasksOptional
- Type: java.lang.Boolean
- Default: false
Define publishing tasks that can be executed manually as well as workflows.
Normally, publishing only happens within automated workflows. Enable this in order to create a publishing task for each publishing activity.
releasableCommitsOptional
- Type: io.github.cdklabs.projen.ReleasableCommits
- Default: ReleasableCommits.everyCommit()
Find commits that should be considered releasable Used to decide if a release is required.
releaseBranchesOptional
- Type: java.util.Map
- Default: no additional branches are used for release. you can use
addBranch()to add additional branches.
Defines additional release branches.
A workflow will be created for each
release branch which will publish releases from commits in this branch.
Each release branch must be assigned a major version number which is used
to enforce that versions published from that branch always use that major
version. If multiple branches are used, the majorVersion field must also
be provided for the default branch.
~~releaseEveryCommit~~Optional
-
Deprecated: Use
releaseTrigger: ReleaseTrigger.continuous()instead -
Type: java.lang.Boolean
- Default: true
Automatically release new versions every commit to one of branches in releaseBranches.
releaseFailureIssueOptional
- Type: java.lang.Boolean
- Default: false
Create a github issue on every failed publishing task.
releaseFailureIssueLabelOptional
- Type: java.lang.String
- Default: "failed-release"
The label to apply to issues indicating publish failures.
Only applies if releaseFailureIssue is true.
~~releaseSchedule~~Optional
-
Deprecated: Use
releaseTrigger: ReleaseTrigger.scheduled()instead -
Type: java.lang.String
- Default: no scheduled releases
CRON schedule to trigger new releases.
releaseTagPrefixOptional
- Type: java.lang.String
- Default: "v"
Automatically add the given prefix to release tags. Useful if you are releasing on multiple branches with overlapping version numbers.
Note: this prefix is used to detect the latest tagged version when bumping, so if you change this on a project with an existing version history, you may need to manually tag your latest release with the new prefix.
releaseTriggerOptional
- Type: io.github.cdklabs.projen.release.ReleaseTrigger
- Default: Continuous releases (
ReleaseTrigger.continuous())
The release trigger to use.
releaseWorkflowNameOptional
- Type: java.lang.String
- Default: "release"
The name of the default release workflow.
releaseWorkflowSetupStepsOptional
- Type: java.util.List
A set of workflow steps to execute in order to setup the workflow container.
versionrcOptionsOptional
- Type: java.util.Map
- 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.
workflowContainerImageOptional
- Type: java.lang.String
- Default: default image
Container image to use for GitHub workflows.
workflowRunsOnOptional
- Type: java.util.List
- Default: ["ubuntu-latest"]
Github Runner selection labels.
workflowRunsOnGroupOptional
- Type: io.github.cdklabs.projen.GroupRunnerOptions
Github Runner Group selection options.
defaultReleaseBranchRequired
- Type: java.lang.String
- Default: "main"
The name of the main release branch.
artifactsDirectoryOptional
- Type: java.lang.String
- Default: "dist"
A directory which will contain build artifacts.
autoApproveUpgradesOptional
- Type: java.lang.Boolean
- Default: true
Automatically approve deps upgrade PRs, allowing them to be merged by mergify (if configued).
Throw if set to true but autoApproveOptions are not defined.
buildWorkflowOptional
- Type: java.lang.Boolean
- Default: true if not a subproject
Define a GitHub workflow for building PRs.
buildWorkflowOptionsOptional
- Type: io.github.cdklabs.projen.javascript.BuildWorkflowOptions
Options for PR build workflow.
~~buildWorkflowTriggers~~Optional
-
Deprecated: - Use
buildWorkflowOptions.workflowTriggers -
Type: io.github.cdklabs.projen.github.workflows.Triggers
- Default: "{ pullRequest: {}, workflowDispatch: {} }"
Build workflow triggers.
bundlerOptionsOptional
- Type: io.github.cdklabs.projen.javascript.BundlerOptions
Options for Bundler.
checkLicensesOptional
- Type: io.github.cdklabs.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.
codeCovOptional
- Type: java.lang.Boolean
- 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.
codeCovTokenSecretOptional
- Type: java.lang.String
- Default: if this option is not specified, only public repositories are supported
Define the secret name for a specified https://codecov.io/ token A secret is required to send coverage for private repositories.
copyrightOwnerOptional
- Type: java.lang.String
- Default: defaults to the value of authorName or "" if
authorNameis undefined.
License copyright owner.
copyrightPeriodOptional
- Type: java.lang.String
- Default: current year
The copyright years to put in the LICENSE file.
dependabotOptional
- Type: java.lang.Boolean
- Default: false
Use dependabot to handle dependency upgrades.
Cannot be used in conjunction with depsUpgrade.
dependabotOptionsOptional
- Type: io.github.cdklabs.projen.github.DependabotOptions
- Default: default options
Options for dependabot.
depsUpgradeOptional
- Type: java.lang.Boolean
- Default: true
Use tasks and github workflows to handle dependency upgrades.
Cannot be used in conjunction with dependabot.
depsUpgradeOptionsOptional
- Type: io.github.cdklabs.projen.javascript.UpgradeDependenciesOptions
- Default: default options
Options for UpgradeDependencies.
gitignoreOptional
- Type: java.util.List
Additional entries to .gitignore.
jestOptional
- Type: java.lang.Boolean
- Default: true
Setup jest unit tests.
jestOptionsOptional
- Type: io.github.cdklabs.projen.javascript.JestOptions
- Default: default options
Jest options.
~~mutableBuild~~Optional
-
Deprecated: - Use
buildWorkflowOptions.mutableBuild -
Type: java.lang.Boolean
- Default: true
Automatically update files modified during builds to pull-request branches.
This means that any files synthesized by projen or e.g. test snapshots will always be up-to-date before a PR is merged.
Implies that PR builds do not have anti-tamper checks.
~~npmignore~~Optional
-
Deprecated: - use
project.addPackageIgnore -
Type: java.util.List
Additional entries to .npmignore.
npmignoreEnabledOptional
- Type: java.lang.Boolean
- Default: true
Defines an .npmignore file. Normally this is only needed for libraries that are packaged as tarballs.
npmIgnoreOptionsOptional
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .npmignore file.
packageOptional
- Type: java.lang.Boolean
- Default: true
Defines a package task that will produce an npm tarball under the artifacts directory (e.g. dist).
prettierOptional
- Type: java.lang.Boolean
- Default: false
Setup prettier.
prettierOptionsOptional
- Type: io.github.cdklabs.projen.javascript.PrettierOptions
- Default: default options
Prettier options.
projenDevDependencyOptional
- Type: java.lang.Boolean
- Default: true if not a subproject
Indicates of "projen" should be installed as a devDependency.
projenrcJsOptional
- Type: java.lang.Boolean
- Default: true if projenrcJson is false
Generate (once) .projenrc.js (in JavaScript). Set to false in order to disable .projenrc.js generation.
projenrcJsOptionsOptional
- Type: io.github.cdklabs.projen.javascript.ProjenrcOptions
- Default: default options
Options for .projenrc.js.
projenVersionOptional
- Type: java.lang.String
- Default: Defaults to the latest version.
Version of projen to install.
pullRequestTemplateOptional
- Type: java.lang.Boolean
- Default: true
Include a GitHub pull request template.
pullRequestTemplateContentsOptional
- Type: java.util.List
- Default: default content
The contents of the pull request template.
releaseOptional
- Type: java.lang.Boolean
- Default: true (false for subprojects)
Add release management to this project.
releaseToNpmOptional
- Type: java.lang.Boolean
- Default: false
Automatically release to npm when new versions are introduced.
~~releaseWorkflow~~Optional
-
Deprecated: see
release. -
Type: java.lang.Boolean
- Default: true if not a subproject
DEPRECATED: renamed to release.
workflowBootstrapStepsOptional
- Type: java.util.List
- Default: "yarn install --frozen-lockfile && yarn projen"
Workflow steps to use in order to bootstrap this repo.
workflowGitIdentityOptional
- Type: io.github.cdklabs.projen.github.GitIdentity
- Default: GitHub Actions
The git identity to use in workflows.
workflowNodeVersionOptional
- Type: java.lang.String
- Default: same as
minNodeVersion
The node version to use in GitHub workflows.
workflowPackageCacheOptional
- Type: java.lang.Boolean
- Default: false
Enable Node.js package cache in GitHub workflows.
typeSpecOptionsRequired
- Type: TypeSpecModelOptions
TypeSpec model options.
handlerLanguagesOptional
- Type: java.util.List<Language>
The languages users have specified for handler projects (if any).
asyncApiSpecFileRequired
- Type: java.lang.String
Path to the generated AsyncAPI specification (relative to the project root).
parsedSpecFileRequired
- Type: java.lang.String
Path of the parsed/bundled OpenAPI specification (relative to the project root).
Methods
| Name | Description |
|---|---|
toString |
Returns a string representation of this construct. |
addExcludeFromCleanup |
Exclude the matching files from pre-synth cleanup. |
addGitIgnore |
Adds a .gitignore pattern. |
addPackageIgnore |
Adds patterns to be ignored by npm. |
addTask |
Adds a new task to this project. |
addTip |
Prints a "tip" message during synthesis. |
annotateGenerated |
Marks the provided file(s) as being generated. |
postSynthesize |
Called after all components are synthesized. |
preSynthesize |
Called before all components are synthesized. |
removeTask |
Removes a task from a project. |
runTaskCommand |
Returns the shell command to execute in order to run a task. |
synth |
Synthesize all project files into outdir. |
tryFindFile |
Finds a file at the specified relative path within this project and all its subprojects. |
tryFindJsonFile |
Finds a json file by name. |
tryFindObjectFile |
Finds an object file (like JsonFile, YamlFile, etc.) by name. |
tryRemoveFile |
Finds a file at the specified relative path within this project and removes it. |
addBins |
No description. |
addBundledDeps |
Defines bundled dependencies. |
addCompileCommand |
DEPRECATED. |
addDeps |
Defines normal dependencies. |
addDevDeps |
Defines development/test dependencies. |
addFields |
Directly set fields in package.json. |
addKeywords |
Adds keywords to package.json (deduplicated). |
addPeerDeps |
Defines peer dependencies. |
addScripts |
Replaces the contents of multiple npm package.json scripts. |
addTestCommand |
DEPRECATED. |
hasScript |
Indicates if a script by the name name is defined. |
removeScript |
Removes the npm script (always successful). |
renderWorkflowSetup |
Returns the set of workflow steps which should be executed to bootstrap a workflow. |
setScript |
Replaces the contents of an npm package.json script. |
toString
public java.lang.String toString()
Returns a string representation of this construct.
addExcludeFromCleanup
public void addExcludeFromCleanup(java.lang.String globs)
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.
globsRequired
- Type: java.lang.String
The glob patterns to match.
addGitIgnore
public void addGitIgnore(java.lang.String pattern)
Adds a .gitignore pattern.
patternRequired
- Type: java.lang.String
The glob pattern to ignore.
addPackageIgnore
public void addPackageIgnore(java.lang.String pattern)
Adds patterns to be ignored by npm.
patternRequired
- Type: java.lang.String
The pattern to ignore.
addTask
public Task addTask(java.lang.String name)
public Task addTask(java.lang.String name, TaskOptions props)
Adds a new task to this project.
This will fail if the project already has a task with this name.
nameRequired
- Type: java.lang.String
The task name to add.
propsOptional
- Type: io.github.cdklabs.projen.TaskOptions
Task properties.
~~addTip~~
public void addTip(java.lang.String message)
Prints a "tip" message during synthesis.
messageRequired
- Type: java.lang.String
The message.
annotateGenerated
public void annotateGenerated(java.lang.String glob)
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
globRequired
- Type: java.lang.String
the glob pattern to match (could be a file path).
postSynthesize
public void postSynthesize()
Called after all components are synthesized.
Order is not guaranteed.
preSynthesize
public void preSynthesize()
Called before all components are synthesized.
removeTask
public Task removeTask(java.lang.String name)
Removes a task from a project.
nameRequired
- Type: java.lang.String
The name of the task to remove.
runTaskCommand
public java.lang.String runTaskCommand(Task task)
Returns the shell command to execute in order to run a task.
This will
typically be npx projen TASK.
taskRequired
- Type: io.github.cdklabs.projen.Task
The task for which the command is required.
synth
public void synth()
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()"
tryFindFile
public FileBase tryFindFile(java.lang.String filePath)
Finds a file at the specified relative path within this project and all its subprojects.
filePathRequired
- Type: java.lang.String
The file path.
If this path is relative, it will be resolved from the root of this project.
~~tryFindJsonFile~~
public JsonFile tryFindJsonFile(java.lang.String filePath)
Finds a json file by name.
filePathRequired
- Type: java.lang.String
The file path.
tryFindObjectFile
public ObjectFile tryFindObjectFile(java.lang.String filePath)
Finds an object file (like JsonFile, YamlFile, etc.) by name.
filePathRequired
- Type: java.lang.String
The file path.
tryRemoveFile
public FileBase tryRemoveFile(java.lang.String filePath)
Finds a file at the specified relative path within this project and removes it.
filePathRequired
- Type: java.lang.String
The file path.
If this path is relative, it will be resolved from the root of this project.
addBins
public void addBins(java.util.Map<java.lang.String, java.lang.String> bins)
binsRequired
- Type: java.util.Map
addBundledDeps
public void addBundledDeps(java.lang.String deps)
Defines bundled dependencies.
Bundled dependencies will be added as normal dependencies as well as to the
bundledDependencies section of your package.json.
depsRequired
- Type: java.lang.String
Names modules to install.
By default, the the dependency will
be installed in the next npx projen run and the version will be recorded
in your package.json file. You can upgrade manually or using yarn
add/upgrade. If you wish to specify a version range use this syntax:
module@^7.
~~addCompileCommand~~
public void addCompileCommand(java.lang.String commands)
DEPRECATED.
commandsRequired
- Type: java.lang.String
addDeps
public void addDeps(java.lang.String deps)
Defines normal dependencies.
depsRequired
- Type: java.lang.String
Names modules to install.
By default, the the dependency will
be installed in the next npx projen run and the version will be recorded
in your package.json file. You can upgrade manually or using yarn
add/upgrade. If you wish to specify a version range use this syntax:
module@^7.
addDevDeps
public void addDevDeps(java.lang.String deps)
Defines development/test dependencies.
depsRequired
- Type: java.lang.String
Names modules to install.
By default, the the dependency will
be installed in the next npx projen run and the version will be recorded
in your package.json file. You can upgrade manually or using yarn
add/upgrade. If you wish to specify a version range use this syntax:
module@^7.
addFields
public void addFields(java.util.Map<java.lang.String, java.lang.Object> fields)
Directly set fields in package.json.
fieldsRequired
- Type: java.util.Map
The fields to set.
addKeywords
public void addKeywords(java.lang.String keywords)
Adds keywords to package.json (deduplicated).
keywordsRequired
- Type: java.lang.String
The keywords to add.
addPeerDeps
public void addPeerDeps(java.lang.String deps)
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.
depsRequired
- Type: java.lang.String
Names modules to install.
By default, the the dependency will
be installed in the next npx projen run and the version will be recorded
in your package.json file. You can upgrade manually or using yarn
add/upgrade. If you wish to specify a version range use this syntax:
module@^7.
addScripts
public void addScripts(java.util.Map<java.lang.String, java.lang.String> scripts)
Replaces the contents of multiple npm package.json scripts.
scriptsRequired
- Type: java.util.Map
The scripts to set.
~~addTestCommand~~
public void addTestCommand(java.lang.String commands)
DEPRECATED.
commandsRequired
- Type: java.lang.String
~~hasScript~~
public java.lang.Boolean hasScript(java.lang.String name)
Indicates if a script by the name name is defined.
nameRequired
- Type: java.lang.String
The name of the script.
removeScript
public void removeScript(java.lang.String name)
Removes the npm script (always successful).
nameRequired
- Type: java.lang.String
The name of the script.
renderWorkflowSetup
public java.util.List<JobStep> renderWorkflowSetup()
public java.util.List<JobStep> renderWorkflowSetup(RenderWorkflowSetupOptions options)
Returns the set of workflow steps which should be executed to bootstrap a workflow.
optionsOptional
- Type: io.github.cdklabs.projen.javascript.RenderWorkflowSetupOptions
Options.
setScript
public void setScript(java.lang.String name, java.lang.String command)
Replaces the contents of an npm package.json script.
nameRequired
- Type: java.lang.String
The script name.
commandRequired
- Type: java.lang.String
The command to execute.
Static Functions
| Name | Description |
|---|---|
isConstruct |
Checks if x is a construct. |
isProject |
Test whether the given construct is a project. |
of |
Find the closest ancestor project for given construct. |
isConstruct
import software.aws.pdk.type_safe_api.TypeSpecAsyncModelProject;
TypeSpecAsyncModelProject.isConstruct(java.lang.Object x)
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.
xRequired
- Type: java.lang.Object
Any object.
isProject
import software.aws.pdk.type_safe_api.TypeSpecAsyncModelProject;
TypeSpecAsyncModelProject.isProject(java.lang.Object x)
Test whether the given construct is a project.
xRequired
- Type: java.lang.Object
of
import software.aws.pdk.type_safe_api.TypeSpecAsyncModelProject;
TypeSpecAsyncModelProject.of(IConstruct construct)
Find the closest ancestor project for given construct.
When given a project, this it the project itself.
constructRequired
- Type: software.constructs.IConstruct
Properties
| Name | Type | Description |
|---|---|---|
node |
software.constructs.Node |
The tree node. |
buildTask |
io.github.cdklabs.projen.Task |
No description. |
commitGenerated |
java.lang.Boolean |
Whether to commit the managed files by default. |
compileTask |
io.github.cdklabs.projen.Task |
No description. |
components |
java.util.List |
Returns all the components within this project. |
deps |
io.github.cdklabs.projen.Dependencies |
Project dependencies. |
ejected |
java.lang.Boolean |
Whether or not the project is being ejected. |
files |
java.util.List |
All files in this project. |
gitattributes |
io.github.cdklabs.projen.GitAttributesFile |
The .gitattributes file for this repository. |
gitignore |
io.github.cdklabs.projen.IgnoreFile |
.gitignore. |
logger |
io.github.cdklabs.projen.Logger |
Logging utilities. |
name |
java.lang.String |
Project name. |
outdir |
java.lang.String |
Absolute output directory of this project. |
packageTask |
io.github.cdklabs.projen.Task |
No description. |
postCompileTask |
io.github.cdklabs.projen.Task |
No description. |
preCompileTask |
io.github.cdklabs.projen.Task |
No description. |
projectBuild |
io.github.cdklabs.projen.ProjectBuild |
Manages the build process of the project. |
projenCommand |
java.lang.String |
The command to use in order to run the projen CLI. |
root |
io.github.cdklabs.projen.Project |
The root project. |
subprojects |
java.util.List |
Returns all the subprojects within this project. |
tasks |
io.github.cdklabs.projen.Tasks |
Project tasks. |
testTask |
io.github.cdklabs.projen.Task |
No description. |
defaultTask |
io.github.cdklabs.projen.Task |
This is the "default" task, the one that executes "projen". |
initProject |
io.github.cdklabs.projen.InitProject |
The options used when this project is bootstrapped via projen new. |
parent |
io.github.cdklabs.projen.Project |
A parent project. |
projectType |
io.github.cdklabs.projen.ProjectType |
No description. |
autoApprove |
io.github.cdklabs.projen.github.AutoApprove |
Auto approve set up for this project. |
devContainer |
io.github.cdklabs.projen.vscode.DevContainer |
Access for .devcontainer.json (used for GitHub Codespaces). |
github |
io.github.cdklabs.projen.github.GitHub |
Access all github components. |
gitpod |
io.github.cdklabs.projen.Gitpod |
Access for Gitpod. |
vscode |
io.github.cdklabs.projen.vscode.VsCode |
Access all VSCode components. |
allowLibraryDependencies |
java.lang.Boolean |
No description. |
artifactsDirectory |
java.lang.String |
The build output directory. |
artifactsJavascriptDirectory |
java.lang.String |
The location of the npm tarball after build (${artifactsDirectory}/js). |
bundler |
io.github.cdklabs.projen.javascript.Bundler |
No description. |
entrypoint |
java.lang.String |
No description. |
manifest |
java.lang.Object |
No description. |
npmrc |
io.github.cdklabs.projen.javascript.NpmConfig |
The .npmrc file. |
package |
io.github.cdklabs.projen.javascript.NodePackage |
API for managing the node package. |
packageManager |
io.github.cdklabs.projen.javascript.NodePackageManager |
The package manager to use. |
runScriptCommand |
java.lang.String |
The command to use to run scripts (e.g. yarn run or npm run depends on the package manager). |
autoMerge |
io.github.cdklabs.projen.github.AutoMerge |
Component that sets up mergify for merging approved pull requests. |
buildWorkflow |
io.github.cdklabs.projen.build.BuildWorkflow |
The PR build GitHub workflow. |
buildWorkflowJobId |
java.lang.String |
The job ID of the build workflow. |
jest |
io.github.cdklabs.projen.javascript.Jest |
The Jest configuration (if enabled). |
maxNodeVersion |
java.lang.String |
Maximum node version required by this package. |
minNodeVersion |
java.lang.String |
Minimum node.js version required by this package. |
npmignore |
io.github.cdklabs.projen.IgnoreFile |
The .npmignore file. |
prettier |
io.github.cdklabs.projen.javascript.Prettier |
No description. |
publisher |
io.github.cdklabs.projen.release.Publisher |
Package publisher. |
release |
io.github.cdklabs.projen.release.Release |
Release management. |
upgradeWorkflow |
io.github.cdklabs.projen.javascript.UpgradeDependencies |
The upgrade workflow. |
apiName |
java.lang.String |
No description. |
definition |
TypeSpecAsyncDefinition |
No description. |
nodeRequired
public Node getNode();
- Type: software.constructs.Node
The tree node.
buildTaskRequired
public Task getBuildTask();
- Type: io.github.cdklabs.projen.Task
commitGeneratedRequired
public java.lang.Boolean getCommitGenerated();
- Type: java.lang.Boolean
Whether to commit the managed files by default.
compileTaskRequired
public Task getCompileTask();
- Type: io.github.cdklabs.projen.Task
componentsRequired
public java.util.List<Component> getComponents();
- Type: java.util.List
Returns all the components within this project.
depsRequired
public Dependencies getDeps();
- Type: io.github.cdklabs.projen.Dependencies
Project dependencies.
ejectedRequired
public java.lang.Boolean getEjected();
- Type: java.lang.Boolean
Whether or not the project is being ejected.
filesRequired
public java.util.List<FileBase> getFiles();
- Type: java.util.List
All files in this project.
gitattributesRequired
public GitAttributesFile getGitattributes();
- Type: io.github.cdklabs.projen.GitAttributesFile
The .gitattributes file for this repository.
gitignoreRequired
public IgnoreFile getGitignore();
- Type: io.github.cdklabs.projen.IgnoreFile
.gitignore.
loggerRequired
public Logger getLogger();
- Type: io.github.cdklabs.projen.Logger
Logging utilities.
nameRequired
public java.lang.String getName();
- Type: java.lang.String
Project name.
outdirRequired
public java.lang.String getOutdir();
- Type: java.lang.String
Absolute output directory of this project.
packageTaskRequired
public Task getPackageTask();
- Type: io.github.cdklabs.projen.Task
postCompileTaskRequired
public Task getPostCompileTask();
- Type: io.github.cdklabs.projen.Task
preCompileTaskRequired
public Task getPreCompileTask();
- Type: io.github.cdklabs.projen.Task
projectBuildRequired
public ProjectBuild getProjectBuild();
- Type: io.github.cdklabs.projen.ProjectBuild
Manages the build process of the project.
projenCommandRequired
public java.lang.String getProjenCommand();
- Type: java.lang.String
The command to use in order to run the projen CLI.
rootRequired
public Project getRoot();
- Type: io.github.cdklabs.projen.Project
The root project.
subprojectsRequired
public java.util.List<Project> getSubprojects();
- Type: java.util.List
Returns all the subprojects within this project.
tasksRequired
public Tasks getTasks();
- Type: io.github.cdklabs.projen.Tasks
Project tasks.
testTaskRequired
public Task getTestTask();
- Type: io.github.cdklabs.projen.Task
defaultTaskOptional
public Task getDefaultTask();
- Type: io.github.cdklabs.projen.Task
This is the "default" task, the one that executes "projen".
Undefined if the project is being ejected.
initProjectOptional
public InitProject getInitProject();
- Type: io.github.cdklabs.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.
parentOptional
public Project getParent();
- Type: io.github.cdklabs.projen.Project
A parent project.
If undefined, this is the root project.
projectTypeRequired
public ProjectType getProjectType();
- Type: io.github.cdklabs.projen.ProjectType
autoApproveOptional
public AutoApprove getAutoApprove();
- Type: io.github.cdklabs.projen.github.AutoApprove
Auto approve set up for this project.
devContainerOptional
public DevContainer getDevContainer();
- Type: io.github.cdklabs.projen.vscode.DevContainer
Access for .devcontainer.json (used for GitHub Codespaces).
This will be undefined if devContainer boolean is false
githubOptional
public GitHub getGithub();
- Type: io.github.cdklabs.projen.github.GitHub
Access all github components.
This will be undefined for subprojects.
gitpodOptional
public Gitpod getGitpod();
- Type: io.github.cdklabs.projen.Gitpod
Access for Gitpod.
This will be undefined if gitpod boolean is false
vscodeOptional
public VsCode getVscode();
- Type: io.github.cdklabs.projen.vscode.VsCode
Access all VSCode components.
This will be undefined for subprojects.
~~allowLibraryDependencies~~Required
- Deprecated: use
package.allowLibraryDependencies
public java.lang.Boolean getAllowLibraryDependencies();
- Type: java.lang.Boolean
artifactsDirectoryRequired
public java.lang.String getArtifactsDirectory();
- Type: java.lang.String
The build output directory.
An npm tarball will be created under the js
subdirectory. For example, if this is set to dist (the default), the npm
tarball will be placed under dist/js/boom-boom-1.2.3.tg.
artifactsJavascriptDirectoryRequired
public java.lang.String getArtifactsJavascriptDirectory();
- Type: java.lang.String
The location of the npm tarball after build (${artifactsDirectory}/js).
bundlerRequired
public Bundler getBundler();
- Type: io.github.cdklabs.projen.javascript.Bundler
~~entrypoint~~Required
- Deprecated: use
package.entrypoint
public java.lang.String getEntrypoint();
- Type: java.lang.String
~~manifest~~Required
- Deprecated: use
package.addField(x, y)
public java.lang.Object getManifest();
- Type: java.lang.Object
npmrcRequired
public NpmConfig getNpmrc();
- Type: io.github.cdklabs.projen.javascript.NpmConfig
The .npmrc file.
packageRequired
public NodePackage getPackage();
- Type: io.github.cdklabs.projen.javascript.NodePackage
API for managing the node package.
~~packageManager~~Required
- Deprecated: use
package.packageManager
public NodePackageManager getPackageManager();
- Type: io.github.cdklabs.projen.javascript.NodePackageManager
The package manager to use.
runScriptCommandRequired
public java.lang.String getRunScriptCommand();
- Type: java.lang.String
The command to use to run scripts (e.g. yarn run or npm run depends on the package manager).
autoMergeOptional
public AutoMerge getAutoMerge();
- Type: io.github.cdklabs.projen.github.AutoMerge
Component that sets up mergify for merging approved pull requests.
buildWorkflowOptional
public BuildWorkflow getBuildWorkflow();
- Type: io.github.cdklabs.projen.build.BuildWorkflow
The PR build GitHub workflow.
undefined if buildWorkflow is disabled.
buildWorkflowJobIdOptional
public java.lang.String getBuildWorkflowJobId();
- Type: java.lang.String
The job ID of the build workflow.
jestOptional
public Jest getJest();
- Type: io.github.cdklabs.projen.javascript.Jest
The Jest configuration (if enabled).
maxNodeVersionOptional
public java.lang.String getMaxNodeVersion();
- Type: java.lang.String
Maximum node version required by this package.
minNodeVersionOptional
public java.lang.String getMinNodeVersion();
- Type: java.lang.String
Minimum node.js version required by this package.
npmignoreOptional
public IgnoreFile getNpmignore();
- Type: io.github.cdklabs.projen.IgnoreFile
The .npmignore file.
prettierOptional
public Prettier getPrettier();
- Type: io.github.cdklabs.projen.javascript.Prettier
~~publisher~~Optional
- Deprecated: use
release.publisher.
public Publisher getPublisher();
- Type: io.github.cdklabs.projen.release.Publisher
Package publisher.
This will be undefined if the project does not have a
release workflow.
releaseOptional
public Release getRelease();
- Type: io.github.cdklabs.projen.release.Release
Release management.
upgradeWorkflowOptional
public UpgradeDependencies getUpgradeWorkflow();
- Type: io.github.cdklabs.projen.javascript.UpgradeDependencies
The upgrade workflow.
apiNameRequired
public java.lang.String getApiName();
- Type: java.lang.String
definitionRequired
public TypeSpecAsyncDefinition getDefinition();
- Type: TypeSpecAsyncDefinition
Constants
| Name | Type | Description |
|---|---|---|
DEFAULT_TASK |
java.lang.String |
The name of the default task (the task executed when projen is run without arguments). |
DEFAULT_TASKRequired
public java.lang.String getDefaultTask();
- Type: java.lang.String
The name of the default task (the task executed when projen is run without arguments).
Normally this task should synthesize the project files.
TypeSpecDefinition
The TypeSpec model definition.
Initializers
import software.aws.pdk.type_safe_api.TypeSpecDefinition;
TypeSpecDefinition.Builder.create(NodeProject project)
.typeSpecOptions(TypeSpecModelOptions)
// .handlerLanguages(java.util.List<Language>)
.build();
| Name | Type | Description |
|---|---|---|
project |
io.github.cdklabs.projen.javascript.NodeProject |
No description. |
typeSpecOptions |
TypeSpecModelOptions |
TypeSpec model options. |
handlerLanguages |
java.util.List<Language> |
The languages users have specified for handler projects (if any). |
projectRequired
- Type: io.github.cdklabs.projen.javascript.NodeProject
typeSpecOptionsRequired
- Type: TypeSpecModelOptions
TypeSpec model options.
handlerLanguagesOptional
- Type: java.util.List<Language>
The languages users have specified for handler projects (if any).
Methods
| Name | Description |
|---|---|
toString |
Returns a string representation of this construct. |
postSynthesize |
Called after synthesis. |
preSynthesize |
Called before synthesis. |
synthesize |
Synthesizes files to the project output directory. |
toString
public java.lang.String toString()
Returns a string representation of this construct.
postSynthesize
public void postSynthesize()
Called after synthesis.
Order is not guaranteed.
preSynthesize
public void preSynthesize()
Called before synthesis.
synthesize
public void synthesize()
Synthesizes files to the project output directory.
Static Functions
| Name | Description |
|---|---|
isConstruct |
Checks if x is a construct. |
isComponent |
Test whether the given construct is a component. |
isConstruct
import software.aws.pdk.type_safe_api.TypeSpecDefinition;
TypeSpecDefinition.isConstruct(java.lang.Object x)
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.
xRequired
- Type: java.lang.Object
Any object.
isComponent
import software.aws.pdk.type_safe_api.TypeSpecDefinition;
TypeSpecDefinition.isComponent(java.lang.Object x)
Test whether the given construct is a component.
xRequired
- Type: java.lang.Object
Properties
| Name | Type | Description |
|---|---|---|
node |
software.constructs.Node |
The tree node. |
project |
io.github.cdklabs.projen.Project |
No description. |
openApiSpecificationPath |
java.lang.String |
Path to the generated OpenAPI specification. |
nodeRequired
public Node getNode();
- Type: software.constructs.Node
The tree node.
projectRequired
public Project getProject();
- Type: io.github.cdklabs.projen.Project
openApiSpecificationPathRequired
public java.lang.String getOpenApiSpecificationPath();
- Type: java.lang.String
Path to the generated OpenAPI specification.
TypeSpecModelProject
Model project for defining a REST API in TypeSpec.
Initializers
import software.aws.pdk.type_safe_api.TypeSpecModelProject;
TypeSpecModelProject.Builder.create()
.name(java.lang.String)
// .commitGenerated(java.lang.Boolean)
// .gitIgnoreOptions(IgnoreFileOptions)
// .gitOptions(GitOptions)
// .logging(LoggerOptions)
// .outdir(java.lang.String)
// .parent(Project)
// .projenCommand(java.lang.String)
// .projenrcJson(java.lang.Boolean)
// .projenrcJsonOptions(ProjenrcJsonOptions)
// .renovatebot(java.lang.Boolean)
// .renovatebotOptions(RenovatebotOptions)
// .autoApproveOptions(AutoApproveOptions)
// .autoMerge(java.lang.Boolean)
// .autoMergeOptions(AutoMergeOptions)
// .clobber(java.lang.Boolean)
// .devContainer(java.lang.Boolean)
// .github(java.lang.Boolean)
// .githubOptions(GitHubOptions)
// .gitpod(java.lang.Boolean)
// .mergify(java.lang.Boolean)
// .mergifyOptions(MergifyOptions)
// .projectType(ProjectType)
// .projenCredentials(GithubCredentials)
// .projenTokenSecret(java.lang.String)
// .readme(SampleReadmeProps)
// .stale(java.lang.Boolean)
// .staleOptions(StaleOptions)
// .vscode(java.lang.Boolean)
// .allowLibraryDependencies(java.lang.Boolean)
// .authorEmail(java.lang.String)
// .authorName(java.lang.String)
// .authorOrganization(java.lang.Boolean)
// .authorUrl(java.lang.String)
// .autoDetectBin(java.lang.Boolean)
// .bin(java.util.Map<java.lang.String, java.lang.String>)
// .bugsEmail(java.lang.String)
// .bugsUrl(java.lang.String)
// .bundledDeps(java.util.List<java.lang.String>)
// .codeArtifactOptions(CodeArtifactOptions)
// .deps(java.util.List<java.lang.String>)
// .description(java.lang.String)
// .devDeps(java.util.List<java.lang.String>)
// .entrypoint(java.lang.String)
// .homepage(java.lang.String)
// .keywords(java.util.List<java.lang.String>)
// .license(java.lang.String)
// .licensed(java.lang.Boolean)
// .maxNodeVersion(java.lang.String)
// .minNodeVersion(java.lang.String)
// .npmAccess(NpmAccess)
// .npmProvenance(java.lang.Boolean)
// .npmRegistry(java.lang.String)
// .npmRegistryUrl(java.lang.String)
// .npmTokenSecret(java.lang.String)
// .packageManager(NodePackageManager)
// .packageName(java.lang.String)
// .peerDependencyOptions(PeerDependencyOptions)
// .peerDeps(java.util.List<java.lang.String>)
// .pnpmVersion(java.lang.String)
// .repository(java.lang.String)
// .repositoryDirectory(java.lang.String)
// .scopedPackagesOptions(java.util.List<ScopedPackagesOptions>)
// .scripts(java.util.Map<java.lang.String, java.lang.String>)
// .stability(java.lang.String)
// .yarnBerryOptions(YarnBerryOptions)
// .jsiiReleaseVersion(java.lang.String)
// .majorVersion(java.lang.Number)
// .minMajorVersion(java.lang.Number)
// .npmDistTag(java.lang.String)
// .postBuildSteps(java.util.List<JobStep>)
// .prerelease(java.lang.String)
// .publishDryRun(java.lang.Boolean)
// .publishTasks(java.lang.Boolean)
// .releasableCommits(ReleasableCommits)
// .releaseBranches(java.util.Map<java.lang.String, BranchOptions>)
// .releaseEveryCommit(java.lang.Boolean)
// .releaseFailureIssue(java.lang.Boolean)
// .releaseFailureIssueLabel(java.lang.String)
// .releaseSchedule(java.lang.String)
// .releaseTagPrefix(java.lang.String)
// .releaseTrigger(ReleaseTrigger)
// .releaseWorkflowName(java.lang.String)
// .releaseWorkflowSetupSteps(java.util.List<JobStep>)
// .versionrcOptions(java.util.Map<java.lang.String, java.lang.Object>)
// .workflowContainerImage(java.lang.String)
// .workflowRunsOn(java.util.List<java.lang.String>)
// .workflowRunsOnGroup(GroupRunnerOptions)
.defaultReleaseBranch(java.lang.String)
// .artifactsDirectory(java.lang.String)
// .autoApproveUpgrades(java.lang.Boolean)
// .buildWorkflow(java.lang.Boolean)
// .buildWorkflowOptions(BuildWorkflowOptions)
// .buildWorkflowTriggers(Triggers)
// .bundlerOptions(BundlerOptions)
// .checkLicenses(LicenseCheckerOptions)
// .codeCov(java.lang.Boolean)
// .codeCovTokenSecret(java.lang.String)
// .copyrightOwner(java.lang.String)
// .copyrightPeriod(java.lang.String)
// .dependabot(java.lang.Boolean)
// .dependabotOptions(DependabotOptions)
// .depsUpgrade(java.lang.Boolean)
// .depsUpgradeOptions(UpgradeDependenciesOptions)
// .gitignore(java.util.List<java.lang.String>)
// .jest(java.lang.Boolean)
// .jestOptions(JestOptions)
// .mutableBuild(java.lang.Boolean)
// .npmignore(java.util.List<java.lang.String>)
// .npmignoreEnabled(java.lang.Boolean)
// .npmIgnoreOptions(IgnoreFileOptions)
// .package(java.lang.Boolean)
// .prettier(java.lang.Boolean)
// .prettierOptions(PrettierOptions)
// .projenDevDependency(java.lang.Boolean)
// .projenrcJs(java.lang.Boolean)
// .projenrcJsOptions(ProjenrcOptions)
// .projenVersion(java.lang.String)
// .pullRequestTemplate(java.lang.Boolean)
// .pullRequestTemplateContents(java.util.List<java.lang.String>)
// .release(java.lang.Boolean)
// .releaseToNpm(java.lang.Boolean)
// .releaseWorkflow(java.lang.Boolean)
// .workflowBootstrapSteps(java.util.List<JobStep>)
// .workflowGitIdentity(GitIdentity)
// .workflowNodeVersion(java.lang.String)
// .workflowPackageCache(java.lang.Boolean)
.typeSpecOptions(TypeSpecModelOptions)
// .handlerLanguages(java.util.List<Language>)
.parsedSpecFile(java.lang.String)
.build();
| Name | Type | Description |
|---|---|---|
name |
java.lang.String |
This is the name of your project. |
commitGenerated |
java.lang.Boolean |
Whether to commit the managed files by default. |
gitIgnoreOptions |
io.github.cdklabs.projen.IgnoreFileOptions |
Configuration options for .gitignore file. |
gitOptions |
io.github.cdklabs.projen.GitOptions |
Configuration options for git. |
logging |
io.github.cdklabs.projen.LoggerOptions |
Configure logging options such as verbosity. |
outdir |
java.lang.String |
The root directory of the project. |
parent |
io.github.cdklabs.projen.Project |
The parent project, if this project is part of a bigger project. |
projenCommand |
java.lang.String |
The shell command to use in order to run the projen CLI. |
projenrcJson |
java.lang.Boolean |
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation. |
projenrcJsonOptions |
io.github.cdklabs.projen.ProjenrcJsonOptions |
Options for .projenrc.json. |
renovatebot |
java.lang.Boolean |
Use renovatebot to handle dependency upgrades. |
renovatebotOptions |
io.github.cdklabs.projen.RenovatebotOptions |
Options for renovatebot. |
autoApproveOptions |
io.github.cdklabs.projen.github.AutoApproveOptions |
Enable and configure the 'auto approve' workflow. |
autoMerge |
java.lang.Boolean |
Enable automatic merging on GitHub. |
autoMergeOptions |
io.github.cdklabs.projen.github.AutoMergeOptions |
Configure options for automatic merging on GitHub. |
clobber |
java.lang.Boolean |
Add a clobber task which resets the repo to origin. |
devContainer |
java.lang.Boolean |
Add a VSCode development environment (used for GitHub Codespaces). |
github |
java.lang.Boolean |
Enable GitHub integration. |
githubOptions |
io.github.cdklabs.projen.github.GitHubOptions |
Options for GitHub integration. |
gitpod |
java.lang.Boolean |
Add a Gitpod development environment. |
mergify |
java.lang.Boolean |
Whether mergify should be enabled on this repository or not. |
mergifyOptions |
io.github.cdklabs.projen.github.MergifyOptions |
Options for mergify. |
projectType |
io.github.cdklabs.projen.ProjectType |
Which type of project this is (library/app). |
projenCredentials |
io.github.cdklabs.projen.github.GithubCredentials |
Choose a method of providing GitHub API access for projen workflows. |
projenTokenSecret |
java.lang.String |
The name of a secret which includes a GitHub Personal Access Token to be used by projen workflows. |
readme |
io.github.cdklabs.projen.SampleReadmeProps |
The README setup. |
stale |
java.lang.Boolean |
Auto-close of stale issues and pull request. |
staleOptions |
io.github.cdklabs.projen.github.StaleOptions |
Auto-close stale issues and pull requests. |
vscode |
java.lang.Boolean |
Enable VSCode integration. |
allowLibraryDependencies |
java.lang.Boolean |
Allow the project to include peerDependencies and bundledDependencies. |
authorEmail |
java.lang.String |
Author's e-mail. |
authorName |
java.lang.String |
Author's name. |
authorOrganization |
java.lang.Boolean |
Is the author an organization. |
authorUrl |
java.lang.String |
Author's URL / Website. |
autoDetectBin |
java.lang.Boolean |
Automatically add all executables under the bin directory to your package.json file under the bin section. |
bin |
java.util.Map |
Binary programs vended with your module. |
bugsEmail |
java.lang.String |
The email address to which issues should be reported. |
bugsUrl |
java.lang.String |
The url to your project's issue tracker. |
bundledDeps |
java.util.List |
List of dependencies to bundle into this module. |
codeArtifactOptions |
io.github.cdklabs.projen.javascript.CodeArtifactOptions |
Options for npm packages using AWS CodeArtifact. |
deps |
java.util.List |
Runtime dependencies of this module. |
description |
java.lang.String |
The description is just a string that helps people understand the purpose of the package. |
devDeps |
java.util.List |
Build dependencies for this module. |
entrypoint |
java.lang.String |
Module entrypoint (main in package.json). |
homepage |
java.lang.String |
Package's Homepage / Website. |
keywords |
java.util.List |
Keywords to include in package.json. |
license |
java.lang.String |
License's SPDX identifier. |
licensed |
java.lang.Boolean |
Indicates if a license should be added. |
maxNodeVersion |
java.lang.String |
Minimum node.js version to require via engines (inclusive). |
minNodeVersion |
java.lang.String |
Minimum Node.js version to require via package.json engines (inclusive). |
npmAccess |
io.github.cdklabs.projen.javascript.NpmAccess |
Access level of the npm package. |
npmProvenance |
java.lang.Boolean |
Should provenance statements be generated when the package is published. |
npmRegistry |
java.lang.String |
The host name of the npm registry to publish to. |
npmRegistryUrl |
java.lang.String |
The base URL of the npm package registry. |
npmTokenSecret |
java.lang.String |
GitHub secret which contains the NPM token to use when publishing packages. |
packageManager |
io.github.cdklabs.projen.javascript.NodePackageManager |
The Node Package Manager used to execute scripts. |
packageName |
java.lang.String |
The "name" in package.json. |
peerDependencyOptions |
io.github.cdklabs.projen.javascript.PeerDependencyOptions |
Options for peerDeps. |
peerDeps |
java.util.List |
Peer dependencies for this module. |
pnpmVersion |
java.lang.String |
The version of PNPM to use if using PNPM as a package manager. |
repository |
java.lang.String |
The repository is the location where the actual code for your package lives. |
repositoryDirectory |
java.lang.String |
If the package.json for your package is not in the root directory (for example if it is part of a monorepo), you can specify the directory in which it lives. |
scopedPackagesOptions |
java.util.List |
Options for privately hosted scoped packages. |
scripts |
java.util.Map |
npm scripts to include. |
stability |
java.lang.String |
Package's Stability. |
yarnBerryOptions |
io.github.cdklabs.projen.javascript.YarnBerryOptions |
Options for Yarn Berry. |
jsiiReleaseVersion |
java.lang.String |
Version requirement of publib which is used to publish modules to npm. |
majorVersion |
java.lang.Number |
Major version to release from the default branch. |
minMajorVersion |
java.lang.Number |
Minimal Major version to release. |
npmDistTag |
java.lang.String |
The npmDistTag to use when publishing from the default branch. |
postBuildSteps |
java.util.List |
Steps to execute after build as part of the release workflow. |
prerelease |
java.lang.String |
Bump versions from the default branch as pre-releases (e.g. "beta", "alpha", "pre"). |
publishDryRun |
java.lang.Boolean |
Instead of actually publishing to package managers, just print the publishing command. |
publishTasks |
java.lang.Boolean |
Define publishing tasks that can be executed manually as well as workflows. |
releasableCommits |
io.github.cdklabs.projen.ReleasableCommits |
Find commits that should be considered releasable Used to decide if a release is required. |
releaseBranches |
java.util.Map |
Defines additional release branches. |
releaseEveryCommit |
java.lang.Boolean |
Automatically release new versions every commit to one of branches in releaseBranches. |
releaseFailureIssue |
java.lang.Boolean |
Create a github issue on every failed publishing task. |
releaseFailureIssueLabel |
java.lang.String |
The label to apply to issues indicating publish failures. |
releaseSchedule |
java.lang.String |
CRON schedule to trigger new releases. |
releaseTagPrefix |
java.lang.String |
Automatically add the given prefix to release tags. Useful if you are releasing on multiple branches with overlapping version numbers. |
releaseTrigger |
io.github.cdklabs.projen.release.ReleaseTrigger |
The release trigger to use. |
releaseWorkflowName |
java.lang.String |
The name of the default release workflow. |
releaseWorkflowSetupSteps |
java.util.List |
A set of workflow steps to execute in order to setup the workflow container. |
versionrcOptions |
java.util.Map |
Custom configuration used when creating changelog with standard-version package. |
workflowContainerImage |
java.lang.String |
Container image to use for GitHub workflows. |
workflowRunsOn |
java.util.List |
Github Runner selection labels. |
workflowRunsOnGroup |
io.github.cdklabs.projen.GroupRunnerOptions |
Github Runner Group selection options. |
defaultReleaseBranch |
java.lang.String |
The name of the main release branch. |
artifactsDirectory |
java.lang.String |
A directory which will contain build artifacts. |
autoApproveUpgrades |
java.lang.Boolean |
Automatically approve deps upgrade PRs, allowing them to be merged by mergify (if configued). |
buildWorkflow |
java.lang.Boolean |
Define a GitHub workflow for building PRs. |
buildWorkflowOptions |
io.github.cdklabs.projen.javascript.BuildWorkflowOptions |
Options for PR build workflow. |
buildWorkflowTriggers |
io.github.cdklabs.projen.github.workflows.Triggers |
Build workflow triggers. |
bundlerOptions |
io.github.cdklabs.projen.javascript.BundlerOptions |
Options for Bundler. |
checkLicenses |
io.github.cdklabs.projen.javascript.LicenseCheckerOptions |
Configure which licenses should be deemed acceptable for use by dependencies. |
codeCov |
java.lang.Boolean |
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. |
codeCovTokenSecret |
java.lang.String |
Define the secret name for a specified https://codecov.io/ token A secret is required to send coverage for private repositories. |
copyrightOwner |
java.lang.String |
License copyright owner. |
copyrightPeriod |
java.lang.String |
The copyright years to put in the LICENSE file. |
dependabot |
java.lang.Boolean |
Use dependabot to handle dependency upgrades. |
dependabotOptions |
io.github.cdklabs.projen.github.DependabotOptions |
Options for dependabot. |
depsUpgrade |
java.lang.Boolean |
Use tasks and github workflows to handle dependency upgrades. |
depsUpgradeOptions |
io.github.cdklabs.projen.javascript.UpgradeDependenciesOptions |
Options for UpgradeDependencies. |
gitignore |
java.util.List |
Additional entries to .gitignore. |
jest |
java.lang.Boolean |
Setup jest unit tests. |
jestOptions |
io.github.cdklabs.projen.javascript.JestOptions |
Jest options. |
mutableBuild |
java.lang.Boolean |
Automatically update files modified during builds to pull-request branches. |
npmignore |
java.util.List |
Additional entries to .npmignore. |
npmignoreEnabled |
java.lang.Boolean |
Defines an .npmignore file. Normally this is only needed for libraries that are packaged as tarballs. |
npmIgnoreOptions |
io.github.cdklabs.projen.IgnoreFileOptions |
Configuration options for .npmignore file. |
package |
java.lang.Boolean |
Defines a package task that will produce an npm tarball under the artifacts directory (e.g. dist). |
prettier |
java.lang.Boolean |
Setup prettier. |
prettierOptions |
io.github.cdklabs.projen.javascript.PrettierOptions |
Prettier options. |
projenDevDependency |
java.lang.Boolean |
Indicates of "projen" should be installed as a devDependency. |
projenrcJs |
java.lang.Boolean |
Generate (once) .projenrc.js (in JavaScript). Set to false in order to disable .projenrc.js generation. |
projenrcJsOptions |
io.github.cdklabs.projen.javascript.ProjenrcOptions |
Options for .projenrc.js. |
projenVersion |
java.lang.String |
Version of projen to install. |
pullRequestTemplate |
java.lang.Boolean |
Include a GitHub pull request template. |
pullRequestTemplateContents |
java.util.List |
The contents of the pull request template. |
release |
java.lang.Boolean |
Add release management to this project. |
releaseToNpm |
java.lang.Boolean |
Automatically release to npm when new versions are introduced. |
releaseWorkflow |
java.lang.Boolean |
DEPRECATED: renamed to release. |
workflowBootstrapSteps |
java.util.List |
Workflow steps to use in order to bootstrap this repo. |
workflowGitIdentity |
io.github.cdklabs.projen.github.GitIdentity |
The git identity to use in workflows. |
workflowNodeVersion |
java.lang.String |
The node version to use in GitHub workflows. |
workflowPackageCache |
java.lang.Boolean |
Enable Node.js package cache in GitHub workflows. |
typeSpecOptions |
TypeSpecModelOptions |
TypeSpec model options. |
handlerLanguages |
java.util.List<Language> |
The languages users have specified for handler projects (if any). |
parsedSpecFile |
java.lang.String |
Path of the parsed/bundled OpenAPI specification (relative to the project root). |
nameRequired
- Type: java.lang.String
- Default: $BASEDIR
This is the name of your project.
commitGeneratedOptional
- Type: java.lang.Boolean
- Default: true
Whether to commit the managed files by default.
gitIgnoreOptionsOptional
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptionsOptional
- Type: io.github.cdklabs.projen.GitOptions
Configuration options for git.
loggingOptional
- Type: io.github.cdklabs.projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
outdirOptional
- Type: java.lang.String
- Default: "."
The root directory of the project.
Relative to this directory, all files are synthesized.
If this project has a parent, this directory is relative to the parent directory and it cannot be the same as the parent or any of it's other subprojects.
parentOptional
- Type: io.github.cdklabs.projen.Project
The parent project, if this project is part of a bigger project.
projenCommandOptional
- Type: java.lang.String
- Default: "npx projen"
The shell command to use in order to run the projen CLI.
Can be used to customize in special environments.
projenrcJsonOptional
- Type: java.lang.Boolean
- Default: false
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation.
projenrcJsonOptionsOptional
- Type: io.github.cdklabs.projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
renovatebotOptional
- Type: java.lang.Boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptionsOptional
- Type: io.github.cdklabs.projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
autoApproveOptionsOptional
- Type: io.github.cdklabs.projen.github.AutoApproveOptions
- Default: auto approve is disabled
Enable and configure the 'auto approve' workflow.
autoMergeOptional
- Type: java.lang.Boolean
- Default: true
Enable automatic merging on GitHub.
Has no effect if github.mergify
is set to false.
autoMergeOptionsOptional
- Type: io.github.cdklabs.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.
clobberOptional
- Type: java.lang.Boolean
- Default: true, but false for subprojects
Add a clobber task which resets the repo to origin.
devContainerOptional
- Type: java.lang.Boolean
- Default: false
Add a VSCode development environment (used for GitHub Codespaces).
githubOptional
- Type: java.lang.Boolean
- Default: true
Enable GitHub integration.
Enabled by default for root projects. Disabled for non-root projects.
githubOptionsOptional
- Type: io.github.cdklabs.projen.github.GitHubOptions
- Default: see GitHubOptions
Options for GitHub integration.
gitpodOptional
- Type: java.lang.Boolean
- Default: false
Add a Gitpod development environment.
~~mergify~~Optional
-
Deprecated: use
githubOptions.mergifyinstead -
Type: java.lang.Boolean
- Default: true
Whether mergify should be enabled on this repository or not.
~~mergifyOptions~~Optional
-
Deprecated: use
githubOptions.mergifyOptionsinstead -
Type: io.github.cdklabs.projen.github.MergifyOptions
- Default: default options
Options for mergify.
~~projectType~~Optional
-
Deprecated: no longer supported at the base project level
-
Type: io.github.cdklabs.projen.ProjectType
- Default: ProjectType.UNKNOWN
Which type of project this is (library/app).
projenCredentialsOptional
- Type: io.github.cdklabs.projen.github.GithubCredentials
- Default: use a personal access token named PROJEN_GITHUB_TOKEN
Choose a method of providing GitHub API access for projen workflows.
~~projenTokenSecret~~Optional
-
Deprecated: use
projenCredentials -
Type: java.lang.String
- Default: "PROJEN_GITHUB_TOKEN"
The name of a secret which includes a GitHub Personal Access Token to be used by projen workflows.
This token needs to have the repo, workflows
and packages scope.
readmeOptional
- Type: io.github.cdklabs.projen.SampleReadmeProps
- Default: { filename: 'README.md', contents: '# replace this' }
The README setup.
Example
"{ filename: 'readme.md', contents: '# title' }"
staleOptional
- Type: java.lang.Boolean
- Default: false
Auto-close of stale issues and pull request.
See staleOptions for options.
staleOptionsOptional
- Type: io.github.cdklabs.projen.github.StaleOptions
- Default: see defaults in
StaleOptions
Auto-close stale issues and pull requests.
To disable set stale to false.
vscodeOptional
- Type: java.lang.Boolean
- Default: true
Enable VSCode integration.
Enabled by default for root projects. Disabled for non-root projects.
allowLibraryDependenciesOptional
- Type: java.lang.Boolean
- Default: true
Allow the project to include peerDependencies and bundledDependencies.
This is normally only allowed for libraries. For apps, there's no meaning for specifying these.
authorEmailOptional
- Type: java.lang.String
Author's e-mail.
authorNameOptional
- Type: java.lang.String
Author's name.
authorOrganizationOptional
- Type: java.lang.Boolean
Is the author an organization.
authorUrlOptional
- Type: java.lang.String
Author's URL / Website.
autoDetectBinOptional
- Type: java.lang.Boolean
- Default: true
Automatically add all executables under the bin directory to your package.json file under the bin section.
binOptional
- Type: java.util.Map
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.
bugsEmailOptional
- Type: java.lang.String
The email address to which issues should be reported.
bugsUrlOptional
- Type: java.lang.String
The url to your project's issue tracker.
bundledDepsOptional
- Type: java.util.List
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.
codeArtifactOptionsOptional
- Type: io.github.cdklabs.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
depsOptional
- Type: java.util.List
- Default: []
Runtime dependencies of this module.
The recommendation is to only specify the module name here (e.g.
express). This will behave similar to yarn add or npm install in the
sense that it will add the module as a dependency to your package.json
file with the latest version (^). You can specify semver requirements in
the same syntax passed to npm i or yarn add (e.g. express@^2) and
this will be what you package.json will eventually include.
Example
[ 'express', 'lodash', 'foo@^2' ]
descriptionOptional
- Type: java.lang.String
The description is just a string that helps people understand the purpose of the package.
It can be used when searching for packages in a package manager as well. See https://classic.yarnpkg.com/en/docs/package-json/#toc-description
devDepsOptional
- Type: java.util.List
- Default: []
Build dependencies for this module.
These dependencies will only be available in your build environment but will not be fetched when this module is consumed.
The recommendation is to only specify the module name here (e.g.
express). This will behave similar to yarn add or npm install in the
sense that it will add the module as a dependency to your package.json
file with the latest version (^). You can specify semver requirements in
the same syntax passed to npm i or yarn add (e.g. express@^2) and
this will be what you package.json will eventually include.
Example
[ 'typescript', '@types/express' ]
entrypointOptional
- Type: java.lang.String
- Default: "lib/index.js"
Module entrypoint (main in package.json).
Set to an empty string to not include main in your package.json
homepageOptional
- Type: java.lang.String
Package's Homepage / Website.
keywordsOptional
- Type: java.util.List
Keywords to include in package.json.
licenseOptional
- Type: java.lang.String
- Default: "Apache-2.0"
License's SPDX identifier.
See https://github.com/projen/projen/tree/main/license-text for a list of supported licenses.
Use the licensed option if you want to no license to be specified.
licensedOptional
- Type: java.lang.Boolean
- Default: true
Indicates if a license should be added.
maxNodeVersionOptional
- Type: java.lang.String
- Default: no max
Minimum node.js version to require via engines (inclusive).
minNodeVersionOptional
- Type: java.lang.String
- Default: no "engines" specified
Minimum Node.js version to require via package.json engines (inclusive).
npmAccessOptional
- Type: io.github.cdklabs.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.
npmProvenanceOptional
- Type: java.lang.Boolean
- 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.
~~npmRegistry~~Optional
-
Deprecated: use
npmRegistryUrlinstead -
Type: java.lang.String
The host name of the npm registry to publish to.
Cannot be set together with npmRegistryUrl.
npmRegistryUrlOptional
- Type: java.lang.String
- Default: "https://registry.npmjs.org"
The base URL of the npm package registry.
Must be a URL (e.g. start with "https://" or "http://")
npmTokenSecretOptional
- Type: java.lang.String
- Default: "NPM_TOKEN"
GitHub secret which contains the NPM token to use when publishing packages.
packageManagerOptional
- Type: io.github.cdklabs.projen.javascript.NodePackageManager
- Default: NodePackageManager.YARN_CLASSIC
The Node Package Manager used to execute scripts.
packageNameOptional
- Type: java.lang.String
- Default: defaults to project name
The "name" in package.json.
peerDependencyOptionsOptional
- Type: io.github.cdklabs.projen.javascript.PeerDependencyOptions
Options for peerDeps.
peerDepsOptional
- Type: java.util.List
- 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.
pnpmVersionOptional
- Type: java.lang.String
- Default: "7"
The version of PNPM to use if using PNPM as a package manager.
repositoryOptional
- Type: java.lang.String
The repository is the location where the actual code for your package lives.
See https://classic.yarnpkg.com/en/docs/package-json/#toc-repository
repositoryDirectoryOptional
- Type: java.lang.String
If the package.json for your package is not in the root directory (for example if it is part of a monorepo), you can specify the directory in which it lives.
scopedPackagesOptionsOptional
- Type: java.util.List
- 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: java.util.Map
- 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.
stabilityOptional
- Type: java.lang.String
Package's Stability.
yarnBerryOptionsOptional
- Type: io.github.cdklabs.projen.javascript.YarnBerryOptions
- Default: Yarn Berry v4 with all default options
Options for Yarn Berry.
jsiiReleaseVersionOptional
- Type: java.lang.String
- Default: "latest"
Version requirement of publib which is used to publish modules to npm.
majorVersionOptional
- Type: java.lang.Number
- Default: Major version is not enforced.
Major version to release from the default branch.
If this is specified, we bump the latest version of this major version line. If not specified, we bump the global latest version.
minMajorVersionOptional
- Type: java.lang.Number
- Default: No minimum version is being enforced
Minimal Major version to release.
This can be useful to set to 1, as breaking changes before the 1.x major release are not incrementing the major version number.
Can not be set together with majorVersion.
npmDistTagOptional
- Type: java.lang.String
- Default: "latest"
The npmDistTag to use when publishing from the default branch.
To set the npm dist-tag for release branches, set the npmDistTag property
for each branch.
postBuildStepsOptional
- Type: java.util.List
- Default: []
Steps to execute after build as part of the release workflow.
prereleaseOptional
- Type: java.lang.String
- Default: normal semantic versions
Bump versions from the default branch as pre-releases (e.g. "beta", "alpha", "pre").
publishDryRunOptional
- Type: java.lang.Boolean
- Default: false
Instead of actually publishing to package managers, just print the publishing command.
publishTasksOptional
- Type: java.lang.Boolean
- Default: false
Define publishing tasks that can be executed manually as well as workflows.
Normally, publishing only happens within automated workflows. Enable this in order to create a publishing task for each publishing activity.
releasableCommitsOptional
- Type: io.github.cdklabs.projen.ReleasableCommits
- Default: ReleasableCommits.everyCommit()
Find commits that should be considered releasable Used to decide if a release is required.
releaseBranchesOptional
- Type: java.util.Map
- Default: no additional branches are used for release. you can use
addBranch()to add additional branches.
Defines additional release branches.
A workflow will be created for each
release branch which will publish releases from commits in this branch.
Each release branch must be assigned a major version number which is used
to enforce that versions published from that branch always use that major
version. If multiple branches are used, the majorVersion field must also
be provided for the default branch.
~~releaseEveryCommit~~Optional
-
Deprecated: Use
releaseTrigger: ReleaseTrigger.continuous()instead -
Type: java.lang.Boolean
- Default: true
Automatically release new versions every commit to one of branches in releaseBranches.
releaseFailureIssueOptional
- Type: java.lang.Boolean
- Default: false
Create a github issue on every failed publishing task.
releaseFailureIssueLabelOptional
- Type: java.lang.String
- Default: "failed-release"
The label to apply to issues indicating publish failures.
Only applies if releaseFailureIssue is true.
~~releaseSchedule~~Optional
-
Deprecated: Use
releaseTrigger: ReleaseTrigger.scheduled()instead -
Type: java.lang.String
- Default: no scheduled releases
CRON schedule to trigger new releases.
releaseTagPrefixOptional
- Type: java.lang.String
- Default: "v"
Automatically add the given prefix to release tags. Useful if you are releasing on multiple branches with overlapping version numbers.
Note: this prefix is used to detect the latest tagged version when bumping, so if you change this on a project with an existing version history, you may need to manually tag your latest release with the new prefix.
releaseTriggerOptional
- Type: io.github.cdklabs.projen.release.ReleaseTrigger
- Default: Continuous releases (
ReleaseTrigger.continuous())
The release trigger to use.
releaseWorkflowNameOptional
- Type: java.lang.String
- Default: "release"
The name of the default release workflow.
releaseWorkflowSetupStepsOptional
- Type: java.util.List
A set of workflow steps to execute in order to setup the workflow container.
versionrcOptionsOptional
- Type: java.util.Map
- 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.
workflowContainerImageOptional
- Type: java.lang.String
- Default: default image
Container image to use for GitHub workflows.
workflowRunsOnOptional
- Type: java.util.List
- Default: ["ubuntu-latest"]
Github Runner selection labels.
workflowRunsOnGroupOptional
- Type: io.github.cdklabs.projen.GroupRunnerOptions
Github Runner Group selection options.
defaultReleaseBranchRequired
- Type: java.lang.String
- Default: "main"
The name of the main release branch.
artifactsDirectoryOptional
- Type: java.lang.String
- Default: "dist"
A directory which will contain build artifacts.
autoApproveUpgradesOptional
- Type: java.lang.Boolean
- Default: true
Automatically approve deps upgrade PRs, allowing them to be merged by mergify (if configued).
Throw if set to true but autoApproveOptions are not defined.
buildWorkflowOptional
- Type: java.lang.Boolean
- Default: true if not a subproject
Define a GitHub workflow for building PRs.
buildWorkflowOptionsOptional
- Type: io.github.cdklabs.projen.javascript.BuildWorkflowOptions
Options for PR build workflow.
~~buildWorkflowTriggers~~Optional
-
Deprecated: - Use
buildWorkflowOptions.workflowTriggers -
Type: io.github.cdklabs.projen.github.workflows.Triggers
- Default: "{ pullRequest: {}, workflowDispatch: {} }"
Build workflow triggers.
bundlerOptionsOptional
- Type: io.github.cdklabs.projen.javascript.BundlerOptions
Options for Bundler.
checkLicensesOptional
- Type: io.github.cdklabs.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.
codeCovOptional
- Type: java.lang.Boolean
- 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.
codeCovTokenSecretOptional
- Type: java.lang.String
- Default: if this option is not specified, only public repositories are supported
Define the secret name for a specified https://codecov.io/ token A secret is required to send coverage for private repositories.
copyrightOwnerOptional
- Type: java.lang.String
- Default: defaults to the value of authorName or "" if
authorNameis undefined.
License copyright owner.
copyrightPeriodOptional
- Type: java.lang.String
- Default: current year
The copyright years to put in the LICENSE file.
dependabotOptional
- Type: java.lang.Boolean
- Default: false
Use dependabot to handle dependency upgrades.
Cannot be used in conjunction with depsUpgrade.
dependabotOptionsOptional
- Type: io.github.cdklabs.projen.github.DependabotOptions
- Default: default options
Options for dependabot.
depsUpgradeOptional
- Type: java.lang.Boolean
- Default: true
Use tasks and github workflows to handle dependency upgrades.
Cannot be used in conjunction with dependabot.
depsUpgradeOptionsOptional
- Type: io.github.cdklabs.projen.javascript.UpgradeDependenciesOptions
- Default: default options
Options for UpgradeDependencies.
gitignoreOptional
- Type: java.util.List
Additional entries to .gitignore.
jestOptional
- Type: java.lang.Boolean
- Default: true
Setup jest unit tests.
jestOptionsOptional
- Type: io.github.cdklabs.projen.javascript.JestOptions
- Default: default options
Jest options.
~~mutableBuild~~Optional
-
Deprecated: - Use
buildWorkflowOptions.mutableBuild -
Type: java.lang.Boolean
- Default: true
Automatically update files modified during builds to pull-request branches.
This means that any files synthesized by projen or e.g. test snapshots will always be up-to-date before a PR is merged.
Implies that PR builds do not have anti-tamper checks.
~~npmignore~~Optional
-
Deprecated: - use
project.addPackageIgnore -
Type: java.util.List
Additional entries to .npmignore.
npmignoreEnabledOptional
- Type: java.lang.Boolean
- Default: true
Defines an .npmignore file. Normally this is only needed for libraries that are packaged as tarballs.
npmIgnoreOptionsOptional
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .npmignore file.
packageOptional
- Type: java.lang.Boolean
- Default: true
Defines a package task that will produce an npm tarball under the artifacts directory (e.g. dist).
prettierOptional
- Type: java.lang.Boolean
- Default: false
Setup prettier.
prettierOptionsOptional
- Type: io.github.cdklabs.projen.javascript.PrettierOptions
- Default: default options
Prettier options.
projenDevDependencyOptional
- Type: java.lang.Boolean
- Default: true if not a subproject
Indicates of "projen" should be installed as a devDependency.
projenrcJsOptional
- Type: java.lang.Boolean
- Default: true if projenrcJson is false
Generate (once) .projenrc.js (in JavaScript). Set to false in order to disable .projenrc.js generation.
projenrcJsOptionsOptional
- Type: io.github.cdklabs.projen.javascript.ProjenrcOptions
- Default: default options
Options for .projenrc.js.
projenVersionOptional
- Type: java.lang.String
- Default: Defaults to the latest version.
Version of projen to install.
pullRequestTemplateOptional
- Type: java.lang.Boolean
- Default: true
Include a GitHub pull request template.
pullRequestTemplateContentsOptional
- Type: java.util.List
- Default: default content
The contents of the pull request template.
releaseOptional
- Type: java.lang.Boolean
- Default: true (false for subprojects)
Add release management to this project.
releaseToNpmOptional
- Type: java.lang.Boolean
- Default: false
Automatically release to npm when new versions are introduced.
~~releaseWorkflow~~Optional
-
Deprecated: see
release. -
Type: java.lang.Boolean
- Default: true if not a subproject
DEPRECATED: renamed to release.
workflowBootstrapStepsOptional
- Type: java.util.List
- Default: "yarn install --frozen-lockfile && yarn projen"
Workflow steps to use in order to bootstrap this repo.
workflowGitIdentityOptional
- Type: io.github.cdklabs.projen.github.GitIdentity
- Default: GitHub Actions
The git identity to use in workflows.
workflowNodeVersionOptional
- Type: java.lang.String
- Default: same as
minNodeVersion
The node version to use in GitHub workflows.
workflowPackageCacheOptional
- Type: java.lang.Boolean
- Default: false
Enable Node.js package cache in GitHub workflows.
typeSpecOptionsRequired
- Type: TypeSpecModelOptions
TypeSpec model options.
handlerLanguagesOptional
- Type: java.util.List<Language>
The languages users have specified for handler projects (if any).
parsedSpecFileRequired
- Type: java.lang.String
Path of the parsed/bundled OpenAPI specification (relative to the project root).
Methods
| Name | Description |
|---|---|
toString |
Returns a string representation of this construct. |
addExcludeFromCleanup |
Exclude the matching files from pre-synth cleanup. |
addGitIgnore |
Adds a .gitignore pattern. |
addPackageIgnore |
Adds patterns to be ignored by npm. |
addTask |
Adds a new task to this project. |
addTip |
Prints a "tip" message during synthesis. |
annotateGenerated |
Marks the provided file(s) as being generated. |
postSynthesize |
Called after all components are synthesized. |
preSynthesize |
Called before all components are synthesized. |
removeTask |
Removes a task from a project. |
runTaskCommand |
Returns the shell command to execute in order to run a task. |
synth |
Synthesize all project files into outdir. |
tryFindFile |
Finds a file at the specified relative path within this project and all its subprojects. |
tryFindJsonFile |
Finds a json file by name. |
tryFindObjectFile |
Finds an object file (like JsonFile, YamlFile, etc.) by name. |
tryRemoveFile |
Finds a file at the specified relative path within this project and removes it. |
addBins |
No description. |
addBundledDeps |
Defines bundled dependencies. |
addCompileCommand |
DEPRECATED. |
addDeps |
Defines normal dependencies. |
addDevDeps |
Defines development/test dependencies. |
addFields |
Directly set fields in package.json. |
addKeywords |
Adds keywords to package.json (deduplicated). |
addPeerDeps |
Defines peer dependencies. |
addScripts |
Replaces the contents of multiple npm package.json scripts. |
addTestCommand |
DEPRECATED. |
hasScript |
Indicates if a script by the name name is defined. |
removeScript |
Removes the npm script (always successful). |
renderWorkflowSetup |
Returns the set of workflow steps which should be executed to bootstrap a workflow. |
setScript |
Replaces the contents of an npm package.json script. |
toString
public java.lang.String toString()
Returns a string representation of this construct.
addExcludeFromCleanup
public void addExcludeFromCleanup(java.lang.String globs)
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.
globsRequired
- Type: java.lang.String
The glob patterns to match.
addGitIgnore
public void addGitIgnore(java.lang.String pattern)
Adds a .gitignore pattern.
patternRequired
- Type: java.lang.String
The glob pattern to ignore.
addPackageIgnore
public void addPackageIgnore(java.lang.String pattern)
Adds patterns to be ignored by npm.
patternRequired
- Type: java.lang.String
The pattern to ignore.
addTask
public Task addTask(java.lang.String name)
public Task addTask(java.lang.String name, TaskOptions props)
Adds a new task to this project.
This will fail if the project already has a task with this name.
nameRequired
- Type: java.lang.String
The task name to add.
propsOptional
- Type: io.github.cdklabs.projen.TaskOptions
Task properties.
~~addTip~~
public void addTip(java.lang.String message)
Prints a "tip" message during synthesis.
messageRequired
- Type: java.lang.String
The message.
annotateGenerated
public void annotateGenerated(java.lang.String glob)
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
globRequired
- Type: java.lang.String
the glob pattern to match (could be a file path).
postSynthesize
public void postSynthesize()
Called after all components are synthesized.
Order is not guaranteed.
preSynthesize
public void preSynthesize()
Called before all components are synthesized.
removeTask
public Task removeTask(java.lang.String name)
Removes a task from a project.
nameRequired
- Type: java.lang.String
The name of the task to remove.
runTaskCommand
public java.lang.String runTaskCommand(Task task)
Returns the shell command to execute in order to run a task.
This will
typically be npx projen TASK.
taskRequired
- Type: io.github.cdklabs.projen.Task
The task for which the command is required.
synth
public void synth()
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()"
tryFindFile
public FileBase tryFindFile(java.lang.String filePath)
Finds a file at the specified relative path within this project and all its subprojects.
filePathRequired
- Type: java.lang.String
The file path.
If this path is relative, it will be resolved from the root of this project.
~~tryFindJsonFile~~
public JsonFile tryFindJsonFile(java.lang.String filePath)
Finds a json file by name.
filePathRequired
- Type: java.lang.String
The file path.
tryFindObjectFile
public ObjectFile tryFindObjectFile(java.lang.String filePath)
Finds an object file (like JsonFile, YamlFile, etc.) by name.
filePathRequired
- Type: java.lang.String
The file path.
tryRemoveFile
public FileBase tryRemoveFile(java.lang.String filePath)
Finds a file at the specified relative path within this project and removes it.
filePathRequired
- Type: java.lang.String
The file path.
If this path is relative, it will be resolved from the root of this project.
addBins
public void addBins(java.util.Map<java.lang.String, java.lang.String> bins)
binsRequired
- Type: java.util.Map
addBundledDeps
public void addBundledDeps(java.lang.String deps)
Defines bundled dependencies.
Bundled dependencies will be added as normal dependencies as well as to the
bundledDependencies section of your package.json.
depsRequired
- Type: java.lang.String
Names modules to install.
By default, the the dependency will
be installed in the next npx projen run and the version will be recorded
in your package.json file. You can upgrade manually or using yarn
add/upgrade. If you wish to specify a version range use this syntax:
module@^7.
~~addCompileCommand~~
public void addCompileCommand(java.lang.String commands)
DEPRECATED.
commandsRequired
- Type: java.lang.String
addDeps
public void addDeps(java.lang.String deps)
Defines normal dependencies.
depsRequired
- Type: java.lang.String
Names modules to install.
By default, the the dependency will
be installed in the next npx projen run and the version will be recorded
in your package.json file. You can upgrade manually or using yarn
add/upgrade. If you wish to specify a version range use this syntax:
module@^7.
addDevDeps
public void addDevDeps(java.lang.String deps)
Defines development/test dependencies.
depsRequired
- Type: java.lang.String
Names modules to install.
By default, the the dependency will
be installed in the next npx projen run and the version will be recorded
in your package.json file. You can upgrade manually or using yarn
add/upgrade. If you wish to specify a version range use this syntax:
module@^7.
addFields
public void addFields(java.util.Map<java.lang.String, java.lang.Object> fields)
Directly set fields in package.json.
fieldsRequired
- Type: java.util.Map
The fields to set.
addKeywords
public void addKeywords(java.lang.String keywords)
Adds keywords to package.json (deduplicated).
keywordsRequired
- Type: java.lang.String
The keywords to add.
addPeerDeps
public void addPeerDeps(java.lang.String deps)
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.
depsRequired
- Type: java.lang.String
Names modules to install.
By default, the the dependency will
be installed in the next npx projen run and the version will be recorded
in your package.json file. You can upgrade manually or using yarn
add/upgrade. If you wish to specify a version range use this syntax:
module@^7.
addScripts
public void addScripts(java.util.Map<java.lang.String, java.lang.String> scripts)
Replaces the contents of multiple npm package.json scripts.
scriptsRequired
- Type: java.util.Map
The scripts to set.
~~addTestCommand~~
public void addTestCommand(java.lang.String commands)
DEPRECATED.
commandsRequired
- Type: java.lang.String
~~hasScript~~
public java.lang.Boolean hasScript(java.lang.String name)
Indicates if a script by the name name is defined.
nameRequired
- Type: java.lang.String
The name of the script.
removeScript
public void removeScript(java.lang.String name)
Removes the npm script (always successful).
nameRequired
- Type: java.lang.String
The name of the script.
renderWorkflowSetup
public java.util.List<JobStep> renderWorkflowSetup()
public java.util.List<JobStep> renderWorkflowSetup(RenderWorkflowSetupOptions options)
Returns the set of workflow steps which should be executed to bootstrap a workflow.
optionsOptional
- Type: io.github.cdklabs.projen.javascript.RenderWorkflowSetupOptions
Options.
setScript
public void setScript(java.lang.String name, java.lang.String command)
Replaces the contents of an npm package.json script.
nameRequired
- Type: java.lang.String
The script name.
commandRequired
- Type: java.lang.String
The command to execute.
Static Functions
| Name | Description |
|---|---|
isConstruct |
Checks if x is a construct. |
isProject |
Test whether the given construct is a project. |
of |
Find the closest ancestor project for given construct. |
isConstruct
import software.aws.pdk.type_safe_api.TypeSpecModelProject;
TypeSpecModelProject.isConstruct(java.lang.Object x)
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.
xRequired
- Type: java.lang.Object
Any object.
isProject
import software.aws.pdk.type_safe_api.TypeSpecModelProject;
TypeSpecModelProject.isProject(java.lang.Object x)
Test whether the given construct is a project.
xRequired
- Type: java.lang.Object
of
import software.aws.pdk.type_safe_api.TypeSpecModelProject;
TypeSpecModelProject.of(IConstruct construct)
Find the closest ancestor project for given construct.
When given a project, this it the project itself.
constructRequired
- Type: software.constructs.IConstruct
Properties
| Name | Type | Description |
|---|---|---|
node |
software.constructs.Node |
The tree node. |
buildTask |
io.github.cdklabs.projen.Task |
No description. |
commitGenerated |
java.lang.Boolean |
Whether to commit the managed files by default. |
compileTask |
io.github.cdklabs.projen.Task |
No description. |
components |
java.util.List |
Returns all the components within this project. |
deps |
io.github.cdklabs.projen.Dependencies |
Project dependencies. |
ejected |
java.lang.Boolean |
Whether or not the project is being ejected. |
files |
java.util.List |
All files in this project. |
gitattributes |
io.github.cdklabs.projen.GitAttributesFile |
The .gitattributes file for this repository. |
gitignore |
io.github.cdklabs.projen.IgnoreFile |
.gitignore. |
logger |
io.github.cdklabs.projen.Logger |
Logging utilities. |
name |
java.lang.String |
Project name. |
outdir |
java.lang.String |
Absolute output directory of this project. |
packageTask |
io.github.cdklabs.projen.Task |
No description. |
postCompileTask |
io.github.cdklabs.projen.Task |
No description. |
preCompileTask |
io.github.cdklabs.projen.Task |
No description. |
projectBuild |
io.github.cdklabs.projen.ProjectBuild |
Manages the build process of the project. |
projenCommand |
java.lang.String |
The command to use in order to run the projen CLI. |
root |
io.github.cdklabs.projen.Project |
The root project. |
subprojects |
java.util.List |
Returns all the subprojects within this project. |
tasks |
io.github.cdklabs.projen.Tasks |
Project tasks. |
testTask |
io.github.cdklabs.projen.Task |
No description. |
defaultTask |
io.github.cdklabs.projen.Task |
This is the "default" task, the one that executes "projen". |
initProject |
io.github.cdklabs.projen.InitProject |
The options used when this project is bootstrapped via projen new. |
parent |
io.github.cdklabs.projen.Project |
A parent project. |
projectType |
io.github.cdklabs.projen.ProjectType |
No description. |
autoApprove |
io.github.cdklabs.projen.github.AutoApprove |
Auto approve set up for this project. |
devContainer |
io.github.cdklabs.projen.vscode.DevContainer |
Access for .devcontainer.json (used for GitHub Codespaces). |
github |
io.github.cdklabs.projen.github.GitHub |
Access all github components. |
gitpod |
io.github.cdklabs.projen.Gitpod |
Access for Gitpod. |
vscode |
io.github.cdklabs.projen.vscode.VsCode |
Access all VSCode components. |
allowLibraryDependencies |
java.lang.Boolean |
No description. |
artifactsDirectory |
java.lang.String |
The build output directory. |
artifactsJavascriptDirectory |
java.lang.String |
The location of the npm tarball after build (${artifactsDirectory}/js). |
bundler |
io.github.cdklabs.projen.javascript.Bundler |
No description. |
entrypoint |
java.lang.String |
No description. |
manifest |
java.lang.Object |
No description. |
npmrc |
io.github.cdklabs.projen.javascript.NpmConfig |
The .npmrc file. |
package |
io.github.cdklabs.projen.javascript.NodePackage |
API for managing the node package. |
packageManager |
io.github.cdklabs.projen.javascript.NodePackageManager |
The package manager to use. |
runScriptCommand |
java.lang.String |
The command to use to run scripts (e.g. yarn run or npm run depends on the package manager). |
autoMerge |
io.github.cdklabs.projen.github.AutoMerge |
Component that sets up mergify for merging approved pull requests. |
buildWorkflow |
io.github.cdklabs.projen.build.BuildWorkflow |
The PR build GitHub workflow. |
buildWorkflowJobId |
java.lang.String |
The job ID of the build workflow. |
jest |
io.github.cdklabs.projen.javascript.Jest |
The Jest configuration (if enabled). |
maxNodeVersion |
java.lang.String |
Maximum node version required by this package. |
minNodeVersion |
java.lang.String |
Minimum node.js version required by this package. |
npmignore |
io.github.cdklabs.projen.IgnoreFile |
The .npmignore file. |
prettier |
io.github.cdklabs.projen.javascript.Prettier |
No description. |
publisher |
io.github.cdklabs.projen.release.Publisher |
Package publisher. |
release |
io.github.cdklabs.projen.release.Release |
Release management. |
upgradeWorkflow |
io.github.cdklabs.projen.javascript.UpgradeDependencies |
The upgrade workflow. |
apiName |
java.lang.String |
No description. |
definition |
TypeSpecDefinition |
No description. |
nodeRequired
public Node getNode();
- Type: software.constructs.Node
The tree node.
buildTaskRequired
public Task getBuildTask();
- Type: io.github.cdklabs.projen.Task
commitGeneratedRequired
public java.lang.Boolean getCommitGenerated();
- Type: java.lang.Boolean
Whether to commit the managed files by default.
compileTaskRequired
public Task getCompileTask();
- Type: io.github.cdklabs.projen.Task
componentsRequired
public java.util.List<Component> getComponents();
- Type: java.util.List
Returns all the components within this project.
depsRequired
public Dependencies getDeps();
- Type: io.github.cdklabs.projen.Dependencies
Project dependencies.
ejectedRequired
public java.lang.Boolean getEjected();
- Type: java.lang.Boolean
Whether or not the project is being ejected.
filesRequired
public java.util.List<FileBase> getFiles();
- Type: java.util.List
All files in this project.
gitattributesRequired
public GitAttributesFile getGitattributes();
- Type: io.github.cdklabs.projen.GitAttributesFile
The .gitattributes file for this repository.
gitignoreRequired
public IgnoreFile getGitignore();
- Type: io.github.cdklabs.projen.IgnoreFile
.gitignore.
loggerRequired
public Logger getLogger();
- Type: io.github.cdklabs.projen.Logger
Logging utilities.
nameRequired
public java.lang.String getName();
- Type: java.lang.String
Project name.
outdirRequired
public java.lang.String getOutdir();
- Type: java.lang.String
Absolute output directory of this project.
packageTaskRequired
public Task getPackageTask();
- Type: io.github.cdklabs.projen.Task
postCompileTaskRequired
public Task getPostCompileTask();
- Type: io.github.cdklabs.projen.Task
preCompileTaskRequired
public Task getPreCompileTask();
- Type: io.github.cdklabs.projen.Task
projectBuildRequired
public ProjectBuild getProjectBuild();
- Type: io.github.cdklabs.projen.ProjectBuild
Manages the build process of the project.
projenCommandRequired
public java.lang.String getProjenCommand();
- Type: java.lang.String
The command to use in order to run the projen CLI.
rootRequired
public Project getRoot();
- Type: io.github.cdklabs.projen.Project
The root project.
subprojectsRequired
public java.util.List<Project> getSubprojects();
- Type: java.util.List
Returns all the subprojects within this project.
tasksRequired
public Tasks getTasks();
- Type: io.github.cdklabs.projen.Tasks
Project tasks.
testTaskRequired
public Task getTestTask();
- Type: io.github.cdklabs.projen.Task
defaultTaskOptional
public Task getDefaultTask();
- Type: io.github.cdklabs.projen.Task
This is the "default" task, the one that executes "projen".
Undefined if the project is being ejected.
initProjectOptional
public InitProject getInitProject();
- Type: io.github.cdklabs.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.
parentOptional
public Project getParent();
- Type: io.github.cdklabs.projen.Project
A parent project.
If undefined, this is the root project.
projectTypeRequired
public ProjectType getProjectType();
- Type: io.github.cdklabs.projen.ProjectType
autoApproveOptional
public AutoApprove getAutoApprove();
- Type: io.github.cdklabs.projen.github.AutoApprove
Auto approve set up for this project.
devContainerOptional
public DevContainer getDevContainer();
- Type: io.github.cdklabs.projen.vscode.DevContainer
Access for .devcontainer.json (used for GitHub Codespaces).
This will be undefined if devContainer boolean is false
githubOptional
public GitHub getGithub();
- Type: io.github.cdklabs.projen.github.GitHub
Access all github components.
This will be undefined for subprojects.
gitpodOptional
public Gitpod getGitpod();
- Type: io.github.cdklabs.projen.Gitpod
Access for Gitpod.
This will be undefined if gitpod boolean is false
vscodeOptional
public VsCode getVscode();
- Type: io.github.cdklabs.projen.vscode.VsCode
Access all VSCode components.
This will be undefined for subprojects.
~~allowLibraryDependencies~~Required
- Deprecated: use
package.allowLibraryDependencies
public java.lang.Boolean getAllowLibraryDependencies();
- Type: java.lang.Boolean
artifactsDirectoryRequired
public java.lang.String getArtifactsDirectory();
- Type: java.lang.String
The build output directory.
An npm tarball will be created under the js
subdirectory. For example, if this is set to dist (the default), the npm
tarball will be placed under dist/js/boom-boom-1.2.3.tg.
artifactsJavascriptDirectoryRequired
public java.lang.String getArtifactsJavascriptDirectory();
- Type: java.lang.String
The location of the npm tarball after build (${artifactsDirectory}/js).
bundlerRequired
public Bundler getBundler();
- Type: io.github.cdklabs.projen.javascript.Bundler
~~entrypoint~~Required
- Deprecated: use
package.entrypoint
public java.lang.String getEntrypoint();
- Type: java.lang.String
~~manifest~~Required
- Deprecated: use
package.addField(x, y)
public java.lang.Object getManifest();
- Type: java.lang.Object
npmrcRequired
public NpmConfig getNpmrc();
- Type: io.github.cdklabs.projen.javascript.NpmConfig
The .npmrc file.
packageRequired
public NodePackage getPackage();
- Type: io.github.cdklabs.projen.javascript.NodePackage
API for managing the node package.
~~packageManager~~Required
- Deprecated: use
package.packageManager
public NodePackageManager getPackageManager();
- Type: io.github.cdklabs.projen.javascript.NodePackageManager
The package manager to use.
runScriptCommandRequired
public java.lang.String getRunScriptCommand();
- Type: java.lang.String
The command to use to run scripts (e.g. yarn run or npm run depends on the package manager).
autoMergeOptional
public AutoMerge getAutoMerge();
- Type: io.github.cdklabs.projen.github.AutoMerge
Component that sets up mergify for merging approved pull requests.
buildWorkflowOptional
public BuildWorkflow getBuildWorkflow();
- Type: io.github.cdklabs.projen.build.BuildWorkflow
The PR build GitHub workflow.
undefined if buildWorkflow is disabled.
buildWorkflowJobIdOptional
public java.lang.String getBuildWorkflowJobId();
- Type: java.lang.String
The job ID of the build workflow.
jestOptional
public Jest getJest();
- Type: io.github.cdklabs.projen.javascript.Jest
The Jest configuration (if enabled).
maxNodeVersionOptional
public java.lang.String getMaxNodeVersion();
- Type: java.lang.String
Maximum node version required by this package.
minNodeVersionOptional
public java.lang.String getMinNodeVersion();
- Type: java.lang.String
Minimum node.js version required by this package.
npmignoreOptional
public IgnoreFile getNpmignore();
- Type: io.github.cdklabs.projen.IgnoreFile
The .npmignore file.
prettierOptional
public Prettier getPrettier();
- Type: io.github.cdklabs.projen.javascript.Prettier
~~publisher~~Optional
- Deprecated: use
release.publisher.
public Publisher getPublisher();
- Type: io.github.cdklabs.projen.release.Publisher
Package publisher.
This will be undefined if the project does not have a
release workflow.
releaseOptional
public Release getRelease();
- Type: io.github.cdklabs.projen.release.Release
Release management.
upgradeWorkflowOptional
public UpgradeDependencies getUpgradeWorkflow();
- Type: io.github.cdklabs.projen.javascript.UpgradeDependencies
The upgrade workflow.
apiNameRequired
public java.lang.String getApiName();
- Type: java.lang.String
definitionRequired
public TypeSpecDefinition getDefinition();
- Type: TypeSpecDefinition
Constants
| Name | Type | Description |
|---|---|---|
DEFAULT_TASK |
java.lang.String |
The name of the default task (the task executed when projen is run without arguments). |
DEFAULT_TASKRequired
public java.lang.String getDefaultTask();
- Type: java.lang.String
The name of the default task (the task executed when projen is run without arguments).
Normally this task should synthesize the project files.
TypeSpecProjectDefinition
Creates a project which allows APIs to be defined in TypeSpec.
Initializers
import software.aws.pdk.type_safe_api.TypeSpecProjectDefinition;
TypeSpecProjectDefinition.Builder.create(NodeProject project)
.typeSpecOptions(TypeSpecModelOptions)
// .handlerLanguages(java.util.List<Language>)
.build();
| Name | Type | Description |
|---|---|---|
project |
io.github.cdklabs.projen.javascript.NodeProject |
No description. |
typeSpecOptions |
TypeSpecModelOptions |
TypeSpec model options. |
handlerLanguages |
java.util.List<Language> |
The languages users have specified for handler projects (if any). |
projectRequired
- Type: io.github.cdklabs.projen.javascript.NodeProject
typeSpecOptionsRequired
- Type: TypeSpecModelOptions
TypeSpec model options.
handlerLanguagesOptional
- Type: java.util.List<Language>
The languages users have specified for handler projects (if any).
Methods
| Name | Description |
|---|---|
toString |
Returns a string representation of this construct. |
postSynthesize |
Called after synthesis. |
preSynthesize |
Called before synthesis. |
synthesize |
Synthesizes files to the project output directory. |
toString
public java.lang.String toString()
Returns a string representation of this construct.
postSynthesize
public void postSynthesize()
Called after synthesis.
Order is not guaranteed.
preSynthesize
public void preSynthesize()
Called before synthesis.
synthesize
public void synthesize()
Synthesizes files to the project output directory.
Static Functions
| Name | Description |
|---|---|
isConstruct |
Checks if x is a construct. |
isComponent |
Test whether the given construct is a component. |
isConstruct
import software.aws.pdk.type_safe_api.TypeSpecProjectDefinition;
TypeSpecProjectDefinition.isConstruct(java.lang.Object x)
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.
xRequired
- Type: java.lang.Object
Any object.
isComponent
import software.aws.pdk.type_safe_api.TypeSpecProjectDefinition;
TypeSpecProjectDefinition.isComponent(java.lang.Object x)
Test whether the given construct is a component.
xRequired
- Type: java.lang.Object
Properties
| Name | Type | Description |
|---|---|---|
node |
software.constructs.Node |
The tree node. |
project |
io.github.cdklabs.projen.Project |
No description. |
openApiSpecificationPath |
java.lang.String |
Path to the generated OpenAPI specification. |
nodeRequired
public Node getNode();
- Type: software.constructs.Node
The tree node.
projectRequired
public Project getProject();
- Type: io.github.cdklabs.projen.Project
openApiSpecificationPathRequired
public java.lang.String getOpenApiSpecificationPath();
- Type: java.lang.String
Path to the generated OpenAPI specification.
Structs
ApiGatewayIntegration
Represents an api gateway integration.
Initializer
import software.aws.pdk.type_safe_api.ApiGatewayIntegration;
ApiGatewayIntegration.builder()
// .cacheKeyParameters(java.util.List<java.lang.String>)
// .cacheNamespace(java.lang.String)
// .connectionId(java.lang.String)
// .connectionType(java.lang.String)
// .contentHandling(java.lang.String)
// .credentials(java.lang.String)
// .httpMethod(java.lang.String)
// .passthroughBehavior(java.lang.String)
// .requestParameters(java.util.Map<java.lang.String, java.lang.String>)
// .requestTemplates(java.util.Map<java.lang.String, java.lang.String>)
// .responses(java.util.Map<java.lang.String, ApiGatewayIntegrationResponse>)
// .timeoutInMillis(java.lang.Number)
// .tlsConfig(ApiGatewayIntegrationTlsConfig)
// .type(java.lang.String)
// .uri(java.lang.String)
.build();
Properties
| Name | Type | Description |
|---|---|---|
cacheKeyParameters |
java.util.List |
A list of request parameters whose values are to be cached. |
cacheNamespace |
java.lang.String |
An API-specific tag group of related cached parameters. |
connectionId |
java.lang.String |
The ID of a VpcLink for the private integration. |
connectionType |
java.lang.String |
The integration connection type. |
contentHandling |
java.lang.String |
Request payload encoding conversion types. |
credentials |
java.lang.String |
For AWS IAM role-based credentials, specify the ARN of an appropriate IAM role. |
httpMethod |
java.lang.String |
The HTTP method used in the integration request. |
passthroughBehavior |
java.lang.String |
Specifies how a request payload of unmapped content type is passed through the integration request without modification. |
requestParameters |
java.util.Map |
Specifies mappings from method request parameters to integration request parameters. |
requestTemplates |
java.util.Map |
Mapping templates for a request payload of specified MIME types. |
responses |
java.util.Map |
Defines the method's responses and specifies desired parameter mappings or payload mappings from integration responses to method responses. |
timeoutInMillis |
java.lang.Number |
Custom timeout between 50 and 29,000 milliseconds. |
tlsConfig |
ApiGatewayIntegrationTlsConfig |
Specifies the TLS configuration for an integration. |
type |
java.lang.String |
The type of integration with the specified backend. |
uri |
java.lang.String |
The endpoint URI of the backend. |
cacheKeyParametersOptional
public java.util.List<java.lang.String> getCacheKeyParameters();
- Type: java.util.List
A list of request parameters whose values are to be cached.
cacheNamespaceOptional
public java.lang.String getCacheNamespace();
- Type: java.lang.String
An API-specific tag group of related cached parameters.
connectionIdOptional
public java.lang.String getConnectionId();
- Type: java.lang.String
The ID of a VpcLink for the private integration.
https://docs.aws.amazon.com/apigateway/latest/api/API_VpcLink.html
connectionTypeOptional
public java.lang.String getConnectionType();
- Type: java.lang.String
The integration connection type.
The valid value is "VPC_LINK" for private integration or "INTERNET", otherwise.
contentHandlingOptional
public java.lang.String getContentHandling();
- Type: java.lang.String
Request payload encoding conversion types.
Valid values are 1) CONVERT_TO_TEXT, for converting a binary payload into a base64-encoded string or converting a text payload into a utf-8-encoded string or passing through the text payload natively without modification, and 2) CONVERT_TO_BINARY, for converting a text payload into a base64-decoded blob or passing through a binary payload natively without modification.
credentialsOptional
public java.lang.String getCredentials();
- Type: java.lang.String
For AWS IAM role-based credentials, specify the ARN of an appropriate IAM role.
If unspecified, credentials default to resource-based permissions that must be added manually to allow the API to access the resource. For more information, see Granting Permissions Using a Resource Policy.
Note: When using IAM credentials, make sure that AWS STS Regional endpoints are enabled for the Region where this API is deployed for best performance.
httpMethodOptional
public java.lang.String getHttpMethod();
- Type: java.lang.String
The HTTP method used in the integration request.
For Lambda function invocations, the value must be POST.
passthroughBehaviorOptional
public java.lang.String getPassthroughBehavior();
- Type: java.lang.String
Specifies how a request payload of unmapped content type is passed through the integration request without modification.
Supported values are when_no_templates, when_no_match, and never.
https://docs.aws.amazon.com/apigateway/latest/api/API_Integration.html#passthroughBehavior
requestParametersOptional
public java.util.Map<java.lang.String, java.lang.String> getRequestParameters();
- Type: java.util.Map
Specifies mappings from method request parameters to integration request parameters.
Supported request parameters are querystring, path, header, and body.
requestTemplatesOptional
public java.util.Map<java.lang.String, java.lang.String> getRequestTemplates();
- Type: java.util.Map
Mapping templates for a request payload of specified MIME types.
responsesOptional
public java.util.Map<java.lang.String, ApiGatewayIntegrationResponse> getResponses();
- Type: java.util.Map
ApiGatewayIntegrationResponse\>
Defines the method's responses and specifies desired parameter mappings or payload mappings from integration responses to method responses.
timeoutInMillisOptional
public java.lang.Number getTimeoutInMillis();
- Type: java.lang.Number
Custom timeout between 50 and 29,000 milliseconds.
The default value is 29,000 milliseconds or 29 seconds.
tlsConfigOptional
public ApiGatewayIntegrationTlsConfig getTlsConfig();
Specifies the TLS configuration for an integration.
typeOptional
public java.lang.String getType();
- Type: java.lang.String
The type of integration with the specified backend.
https://docs.aws.amazon.com/apigateway/latest/api/API_Integration.html#type
uriOptional
public java.lang.String getUri();
- Type: java.lang.String
The endpoint URI of the backend.
For integrations of the aws type, this is an ARN value. For the HTTP integration, this is the URL of the HTTP endpoint including the https or http scheme.
ApiGatewayIntegrationResponse
API Gateway integration response.
https://docs.aws.amazon.com/apigateway/latest/api/API_Integration.html
Initializer
import software.aws.pdk.type_safe_api.ApiGatewayIntegrationResponse;
ApiGatewayIntegrationResponse.builder()
.responseParameters(java.util.Map<java.lang.String, java.lang.String>)
.responseTemplates(java.util.Map<java.lang.String, java.lang.String>)
.statusCode(java.lang.String)
// .contentHandling(java.lang.String)
.build();
Properties
| Name | Type | Description |
|---|---|---|
responseParameters |
java.util.Map |
Specifies parameter mappings for the response. |
responseTemplates |
java.util.Map |
Specifies MIME type-specific mapping templates for the response’s payload. |
statusCode |
java.lang.String |
HTTP status code for the method response. |
contentHandling |
java.lang.String |
Response payload encoding conversion types. |
responseParametersRequired
public java.util.Map<java.lang.String, java.lang.String> getResponseParameters();
- Type: java.util.Map
Specifies parameter mappings for the response.
responseTemplatesRequired
public java.util.Map<java.lang.String, java.lang.String> getResponseTemplates();
- Type: java.util.Map
Specifies MIME type-specific mapping templates for the response’s payload.
statusCodeRequired
public java.lang.String getStatusCode();
- Type: java.lang.String
HTTP status code for the method response.
contentHandlingOptional
public java.lang.String getContentHandling();
- Type: java.lang.String
Response payload encoding conversion types.
Valid values are 1) CONVERT_TO_TEXT, for converting a binary payload into a base64-encoded string or converting a text payload into a utf-8-encoded string or passing through the text payload natively without modification, and 2) CONVERT_TO_BINARY, for converting a text payload into a base64-decoded blob or passing through a binary payload natively without modification.
ApiGatewayIntegrationTlsConfig
Specifies the TLS configuration for an integration.
Initializer
import software.aws.pdk.type_safe_api.ApiGatewayIntegrationTlsConfig;
ApiGatewayIntegrationTlsConfig.builder()
// .insecureSkipVerification(java.lang.Boolean)
.build();
Properties
| Name | Type | Description |
|---|---|---|
insecureSkipVerification |
java.lang.Boolean |
Specifies whether or not API Gateway skips verification that the certificate for an integration endpoint is issued by a supported certificate authority. |
insecureSkipVerificationOptional
public java.lang.Boolean getInsecureSkipVerification();
- Type: java.lang.Boolean
Specifies whether or not API Gateway skips verification that the certificate for an integration endpoint is issued by a supported certificate authority.
This isn’t recommended, but it enables you to use certificates that are signed by private certificate authorities, or certificates that are self-signed. If enabled, API Gateway still performs basic certificate validation, which includes checking the certificate's expiration date, hostname, and presence of a root certificate authority. Supported only for HTTP and HTTP_PROXY integrations.
ApiKeyOptions
Options for API keys.
Initializer
import software.aws.pdk.type_safe_api.ApiKeyOptions;
ApiKeyOptions.builder()
.source(ApiKeySourceType)
// .requiredByDefault(java.lang.Boolean)
.build();
Properties
| Name | Type | Description |
|---|---|---|
source |
software.amazon.awscdk.services.apigateway.ApiKeySourceType |
Source type for an API key. |
requiredByDefault |
java.lang.Boolean |
Set to true to require an API key on all operations by default. |
sourceRequired
public ApiKeySourceType getSource();
- Type: software.amazon.awscdk.services.apigateway.ApiKeySourceType
Source type for an API key.
requiredByDefaultOptional
public java.lang.Boolean getRequiredByDefault();
- Type: java.lang.Boolean
Set to true to require an API key on all operations by default.
Only applicable when the source is HEADER.
AuthorizerProps
Properties for an authorizer.
Initializer
import software.aws.pdk.type_safe_api.AuthorizerProps;
AuthorizerProps.builder()
.authorizationType(AuthorizationType)
.authorizerId(java.lang.String)
// .authorizationScopes(java.util.List<java.lang.String>)
.build();
Properties
| Name | Type | Description |
|---|---|---|
authorizationType |
software.amazon.awscdk.services.apigateway.AuthorizationType |
The type of the authorizer. |
authorizerId |
java.lang.String |
The unique identifier for the authorizer. |
authorizationScopes |
java.util.List |
Scopes for the authorizer, if any. |
authorizationTypeRequired
public AuthorizationType getAuthorizationType();
- Type: software.amazon.awscdk.services.apigateway.AuthorizationType
The type of the authorizer.
authorizerIdRequired
public java.lang.String getAuthorizerId();
- Type: java.lang.String
The unique identifier for the authorizer.
authorizationScopesOptional
public java.util.List<java.lang.String> getAuthorizationScopes();
- Type: java.util.List
Scopes for the authorizer, if any.
CidrAllowList
Representation of a CIDR range.
Initializer
import software.aws.pdk.type_safe_api.CidrAllowList;
CidrAllowList.builder()
.cidrRanges(java.util.List<java.lang.String>)
.cidrType(java.lang.String)
.build();
Properties
| Name | Type | Description |
|---|---|---|
cidrRanges |
java.util.List |
Specify an IPv4 address by using CIDR notation. |
cidrType |
java.lang.String |
Type of CIDR range. |
cidrRangesRequired
public java.util.List<java.lang.String> getCidrRanges();
- Type: java.util.List
Specify an IPv4 address by using CIDR notation.
For example: To configure AWS WAF to allow, block, or count requests that originated from the IP address 192.0.2.44, specify 192.0.2.44/32 . To configure AWS WAF to allow, block, or count requests that originated from IP addresses from 192.0.2.0 to 192.0.2.255, specify 192.0.2.0/24 .
For more information about CIDR notation, see the Wikipedia entry Classless Inter-Domain Routing .
Specify an IPv6 address by using CIDR notation. For example: To configure AWS WAF to allow, block, or count requests that originated from the IP address 1111:0000:0000:0000:0000:0000:0000:0111, specify 1111:0000:0000:0000:0000:0000:0000:0111/128 . To configure AWS WAF to allow, block, or count requests that originated from IP addresses 1111:0000:0000:0000:0000:0000:0000:0000 to 1111:0000:0000:0000:ffff:ffff:ffff:ffff, specify 1111:0000:0000:0000:0000:0000:0000:0000/64 .
cidrTypeRequired
public java.lang.String getCidrType();
- Type: java.lang.String
Type of CIDR range.
CodeGenerationSourceOptions
Options for the source files used for code generation.
Initializer
import software.aws.pdk.type_safe_api.CodeGenerationSourceOptions;
CodeGenerationSourceOptions.builder()
.specPath(java.lang.String)
.build();
Properties
| Name | Type | Description |
|---|---|---|
specPath |
java.lang.String |
Path to the OpenAPI specification. |
specPathRequired
public java.lang.String getSpecPath();
- Type: java.lang.String
Path to the OpenAPI specification.
CognitoAuthorizerProps
Properties used to configure a cognito authorizer.
Initializer
import software.aws.pdk.type_safe_api.CognitoAuthorizerProps;
CognitoAuthorizerProps.builder()
.authorizerId(java.lang.String)
.userPools(java.util.List<IUserPool>)
// .authorizationScopes(java.util.List<java.lang.String>)
.build();
Properties
| Name | Type | Description |
|---|---|---|
authorizerId |
java.lang.String |
Unique identifier for this authorizer. |
userPools |
java.util.List |
The Cognito user pools associated with this authorizer. |
authorizationScopes |
java.util.List |
A list of authorization scopes configured on the method. |
authorizerIdRequired
public java.lang.String getAuthorizerId();
- Type: java.lang.String
Unique identifier for this authorizer.
userPoolsRequired
public java.util.List<IUserPool> getUserPools();
- Type: java.util.List
The Cognito user pools associated with this authorizer.
authorizationScopesOptional
public java.util.List<java.lang.String> getAuthorizationScopes();
- Type: java.util.List
- Default: []
A list of authorization scopes configured on the method.
When used as the default authorizer, these scopes will be applied to all methods without an authorizer at the integration level.
CustomAuthorizerProps
Properties used to configure a custom authorizer.
Initializer
import software.aws.pdk.type_safe_api.CustomAuthorizerProps;
CustomAuthorizerProps.builder()
.authorizerId(java.lang.String)
.function(IFunction)
// .authorizerResultTtlInSeconds(java.lang.Number)
// .identitySource(java.lang.String)
// .type(CustomAuthorizerType)
.build();
Properties
| Name | Type | Description |
|---|---|---|
authorizerId |
java.lang.String |
Unique identifier for this authorizer. |
function |
software.amazon.awscdk.services.lambda.IFunction |
The lambda function used to authorize requests. |
authorizerResultTtlInSeconds |
java.lang.Number |
The number of seconds during which the authorizer result is cached. |
identitySource |
java.lang.String |
The source of the identity in an incoming request. |
type |
CustomAuthorizerType |
The type of custom authorizer. |
authorizerIdRequired
public java.lang.String getAuthorizerId();
- Type: java.lang.String
Unique identifier for this authorizer.
functionRequired
public IFunction getFunction();
- Type: software.amazon.awscdk.services.lambda.IFunction
The lambda function used to authorize requests.
authorizerResultTtlInSecondsOptional
public java.lang.Number getAuthorizerResultTtlInSeconds();
- Type: java.lang.Number
- Default: 300
The number of seconds during which the authorizer result is cached.
identitySourceOptional
public java.lang.String getIdentitySource();
- Type: java.lang.String
- Default: "method.request.header.Authorization"
The source of the identity in an incoming request.
typeOptional
public CustomAuthorizerType getType();
- Type: CustomAuthorizerType
- Default: CustomAuthorizerType.TOKEN
The type of custom authorizer.
CustomIntegrationResponseSetProps
Properties for a custom integration response set.
Initializer
import software.aws.pdk.type_safe_api.CustomIntegrationResponseSetProps;
CustomIntegrationResponseSetProps.builder()
// .responses(java.util.Map<java.lang.String, ApiGatewayIntegrationResponse>)
.build();
Properties
| Name | Type | Description |
|---|---|---|
responses |
java.util.Map |
The responses to add to the integration response. |
responsesOptional
public java.util.Map<java.lang.String, ApiGatewayIntegrationResponse> getResponses();
- Type: java.util.Map
ApiGatewayIntegrationResponse\>
The responses to add to the integration response.
DefaultPassthroughIntegrationResponseSetProps
Options for the DefaultPassthroughIntegrationResponseSet.
Initializer
import software.aws.pdk.type_safe_api.DefaultPassthroughIntegrationResponseSetProps;
DefaultPassthroughIntegrationResponseSetProps.builder()
// .statusCode(java.lang.Number)
.build();
Properties
| Name | Type | Description |
|---|---|---|
statusCode |
java.lang.Number |
Override the status code returned by the default integration response. |
statusCodeOptional
public java.lang.Number getStatusCode();
- Type: java.lang.Number
- Default: 200
Override the status code returned by the default integration response.
DocumentationConfiguration
Configuration for generated documentation.
Initializer
import software.aws.pdk.type_safe_api.DocumentationConfiguration;
DocumentationConfiguration.builder()
.formats(java.util.List<DocumentationFormat>)
// .options(GeneratedDocumentationOptions)
.build();
Properties
| Name | Type | Description |
|---|---|---|
formats |
java.util.List<DocumentationFormat> |
Formats for generated documentation. |
options |
GeneratedDocumentationOptions |
Options for the generated documentation projects. |
formatsRequired
public java.util.List<DocumentationFormat> getFormats();
- Type: java.util.List<DocumentationFormat>
Formats for generated documentation.
optionsOptional
public GeneratedDocumentationOptions getOptions();
Options for the generated documentation projects.
Note that only those provided for the specified formats will apply
GeneratedAsyncApiHtmlDocumentationOptions
Options for the async api html documentation project.
Initializer
import software.aws.pdk.type_safe_api.GeneratedAsyncApiHtmlDocumentationOptions;
GeneratedAsyncApiHtmlDocumentationOptions.builder()
// .commitGeneratedCode(java.lang.Boolean)
.build();
Properties
| Name | Type | Description |
|---|---|---|
commitGeneratedCode |
java.lang.Boolean |
Whether to commit the code generated by the OpenAPI Generator. |
commitGeneratedCodeOptional
public java.lang.Boolean getCommitGeneratedCode();
- Type: java.lang.Boolean
- Default: false
Whether to commit the code generated by the OpenAPI Generator.
GeneratedAsyncApiMarkdownDocumentationOptions
Options for the async api markdown documentation project.
Initializer
import software.aws.pdk.type_safe_api.GeneratedAsyncApiMarkdownDocumentationOptions;
GeneratedAsyncApiMarkdownDocumentationOptions.builder()
// .commitGeneratedCode(java.lang.Boolean)
.build();
Properties
| Name | Type | Description |
|---|---|---|
commitGeneratedCode |
java.lang.Boolean |
Whether to commit the code generated by the OpenAPI Generator. |
commitGeneratedCodeOptional
public java.lang.Boolean getCommitGeneratedCode();
- Type: java.lang.Boolean
- Default: false
Whether to commit the code generated by the OpenAPI Generator.
GeneratedCodeProjects
Generated code projects.
Initializer
import software.aws.pdk.type_safe_api.GeneratedCodeProjects;
GeneratedCodeProjects.builder()
// .java(JavaProject)
// .python(PythonProject)
// .typescript(TypeScriptProject)
.build();
Properties
| Name | Type | Description |
|---|---|---|
java |
io.github.cdklabs.projen.java.JavaProject |
Generated java project. |
python |
io.github.cdklabs.projen.python.PythonProject |
Generated python project. |
typescript |
io.github.cdklabs.projen.typescript.TypeScriptProject |
Generated typescript project. |
javaOptional
public JavaProject getJava();
- Type: io.github.cdklabs.projen.java.JavaProject
Generated java project.
pythonOptional
public PythonProject getPython();
- Type: io.github.cdklabs.projen.python.PythonProject
Generated python project.
typescriptOptional
public TypeScriptProject getTypescript();
- Type: io.github.cdklabs.projen.typescript.TypeScriptProject
Generated typescript project.
GeneratedDocumentationOptions
Options for generated documentation projects.
Initializer
import software.aws.pdk.type_safe_api.GeneratedDocumentationOptions;
GeneratedDocumentationOptions.builder()
// .htmlRedoc(GeneratedHtmlRedocDocumentationOptions)
// .markdown(GeneratedMarkdownDocumentationOptions)
// .plantuml(GeneratedPlantumlDocumentationOptions)
.build();
Properties
| Name | Type | Description |
|---|---|---|
htmlRedoc |
GeneratedHtmlRedocDocumentationOptions |
Generated html redoc documentation project options. |
markdown |
GeneratedMarkdownDocumentationOptions |
Generated markdown documentation project options. |
plantuml |
GeneratedPlantumlDocumentationOptions |
Generated plantuml documentation project options. |
htmlRedocOptional
public GeneratedHtmlRedocDocumentationOptions getHtmlRedoc();
Generated html redoc documentation project options.
markdownOptional
public GeneratedMarkdownDocumentationOptions getMarkdown();
Generated markdown documentation project options.
plantumlOptional
public GeneratedPlantumlDocumentationOptions getPlantuml();
Generated plantuml documentation project options.
GeneratedDocumentationProjects
Generated documentation project references.
Initializer
import software.aws.pdk.type_safe_api.GeneratedDocumentationProjects;
GeneratedDocumentationProjects.builder()
// .htmlRedoc(Project)
// .markdown(Project)
// .plantuml(Project)
.build();
Properties
| Name | Type | Description |
|---|---|---|
htmlRedoc |
io.github.cdklabs.projen.Project |
Generated html redoc documentation project. |
markdown |
io.github.cdklabs.projen.Project |
Generated markdown documentation project. |
plantuml |
io.github.cdklabs.projen.Project |
Generated plantuml documentation project. |
htmlRedocOptional
public Project getHtmlRedoc();
- Type: io.github.cdklabs.projen.Project
Generated html redoc documentation project.
markdownOptional
public Project getMarkdown();
- Type: io.github.cdklabs.projen.Project
Generated markdown documentation project.
plantumlOptional
public Project getPlantuml();
- Type: io.github.cdklabs.projen.Project
Generated plantuml documentation project.
GeneratedHandlersCodeOptions
Options for lambda handler projects for implementing API operations.
Initializer
import software.aws.pdk.type_safe_api.GeneratedHandlersCodeOptions;
GeneratedHandlersCodeOptions.builder()
// .java(GeneratedJavaHandlersOptions)
// .python(GeneratedPythonHandlersOptions)
// .typescript(GeneratedTypeScriptHandlersOptions)
.build();
Properties
| Name | Type | Description |
|---|---|---|
java |
GeneratedJavaHandlersOptions |
Options for the java handlers project. |
python |
GeneratedPythonHandlersOptions |
Options for the python handlers project. |
typescript |
GeneratedTypeScriptHandlersOptions |
Options for the typescript handlers project. |
javaOptional
public GeneratedJavaHandlersOptions getJava();
Options for the java handlers project.
These override the default inferred options.
pythonOptional
public GeneratedPythonHandlersOptions getPython();
Options for the python handlers project.
These override the default inferred options.
typescriptOptional
public GeneratedTypeScriptHandlersOptions getTypescript();
Options for the typescript handlers project.
These override the default inferred options.
GeneratedHtml2DocumentationOptions
Options for the html2 documentation project.
Initializer
import software.aws.pdk.type_safe_api.GeneratedHtml2DocumentationOptions;
GeneratedHtml2DocumentationOptions.builder()
// .commitGeneratedCode(java.lang.Boolean)
.build();
Properties
| Name | Type | Description |
|---|---|---|
commitGeneratedCode |
java.lang.Boolean |
Whether to commit the code generated by the OpenAPI Generator. |
commitGeneratedCodeOptional
public java.lang.Boolean getCommitGeneratedCode();
- Type: java.lang.Boolean
- Default: false
Whether to commit the code generated by the OpenAPI Generator.
GeneratedHtmlRedocDocumentationOptions
Options for the html redoc documentation project.
Initializer
import software.aws.pdk.type_safe_api.GeneratedHtmlRedocDocumentationOptions;
GeneratedHtmlRedocDocumentationOptions.builder()
// .commitGeneratedCode(java.lang.Boolean)
.build();
Properties
| Name | Type | Description |
|---|---|---|
commitGeneratedCode |
java.lang.Boolean |
Whether to commit the code generated by the OpenAPI Generator. |
commitGeneratedCodeOptional
public java.lang.Boolean getCommitGeneratedCode();
- Type: java.lang.Boolean
- Default: false
Whether to commit the code generated by the OpenAPI Generator.
GeneratedInfrastructureCodeOptions
Options for generated infrastructure.
Initializer
import software.aws.pdk.type_safe_api.GeneratedInfrastructureCodeOptions;
GeneratedInfrastructureCodeOptions.builder()
// .java(GeneratedJavaInfrastructureOptions)
// .python(GeneratedPythonInfrastructureOptions)
// .typescript(GeneratedTypeScriptInfrastructureOptions)
.build();
Properties
| Name | Type | Description |
|---|---|---|
java |
GeneratedJavaInfrastructureOptions |
Options for the generated java infrastructure project. |
python |
GeneratedPythonInfrastructureOptions |
Options for the generated python infrastructure project. |
typescript |
GeneratedTypeScriptInfrastructureOptions |
Options for the generated typescript infrastructure project. |
javaOptional
public GeneratedJavaInfrastructureOptions getJava();
Options for the generated java infrastructure project.
These override the default inferred options.
pythonOptional
public GeneratedPythonInfrastructureOptions getPython();
Options for the generated python infrastructure project.
These override the default inferred options.
typescriptOptional
public GeneratedTypeScriptInfrastructureOptions getTypescript();
Options for the generated typescript infrastructure project.
These override the default inferred options.
GeneratedJavaHandlersOptions
Options for configuring a generated java handlers project.
Initializer
import software.aws.pdk.type_safe_api.GeneratedJavaHandlersOptions;
GeneratedJavaHandlersOptions.builder()
// .artifactId(java.lang.String)
// .autoApproveOptions(AutoApproveOptions)
// .autoMerge(java.lang.Boolean)
// .autoMergeOptions(AutoMergeOptions)
// .clobber(java.lang.Boolean)
// .commitGenerated(java.lang.Boolean)
// .compileOptions(MavenCompileOptions)
// .deps(java.util.List<java.lang.String>)
// .description(java.lang.String)
// .devContainer(java.lang.Boolean)
// .distdir(java.lang.String)
// .github(java.lang.Boolean)
// .githubOptions(GitHubOptions)
// .gitIgnoreOptions(IgnoreFileOptions)
// .gitOptions(GitOptions)
// .gitpod(java.lang.Boolean)
// .groupId(java.lang.String)
// .junit(java.lang.Boolean)
// .junitOptions(JunitOptions)
// .logging(LoggerOptions)
// .mergify(java.lang.Boolean)
// .mergifyOptions(MergifyOptions)
// .name(java.lang.String)
// .outdir(java.lang.String)
// .packaging(java.lang.String)
// .packagingOptions(MavenPackagingOptions)
// .parent(Project)
// .parentPom(ParentPom)
// .projectType(ProjectType)
// .projenCommand(java.lang.String)
// .projenCredentials(GithubCredentials)
// .projenrcJava(java.lang.Boolean)
// .projenrcJavaOptions(ProjenrcOptions)
// .projenrcJson(java.lang.Boolean)
// .projenrcJsonOptions(ProjenrcJsonOptions)
// .projenTokenSecret(java.lang.String)
// .readme(SampleReadmeProps)
// .renovatebot(java.lang.Boolean)
// .renovatebotOptions(RenovatebotOptions)
// .sample(java.lang.Boolean)
// .sampleJavaPackage(java.lang.String)
// .stale(java.lang.Boolean)
// .staleOptions(StaleOptions)
// .testDeps(java.util.List<java.lang.String>)
// .url(java.lang.String)
// .version(java.lang.String)
// .vscode(java.lang.Boolean)
// .commitGeneratedCode(java.lang.Boolean)
// .runtimeVersion(JavaVersion)
.build();
Properties
| Name | Type | Description |
|---|---|---|
artifactId |
java.lang.String |
The artifactId is generally the name that the project is known by. |
autoApproveOptions |
io.github.cdklabs.projen.github.AutoApproveOptions |
Enable and configure the 'auto approve' workflow. |
autoMerge |
java.lang.Boolean |
Enable automatic merging on GitHub. |
autoMergeOptions |
io.github.cdklabs.projen.github.AutoMergeOptions |
Configure options for automatic merging on GitHub. |
clobber |
java.lang.Boolean |
Add a clobber task which resets the repo to origin. |
commitGenerated |
java.lang.Boolean |
Whether to commit the managed files by default. |
compileOptions |
io.github.cdklabs.projen.java.MavenCompileOptions |
Compile options. |
deps |
java.util.List |
List of runtime dependencies for this project. Dependencies use the format: <groupId>/<artifactId>@<semver>. |
description |
java.lang.String |
Description of a project is always good. |
devContainer |
java.lang.Boolean |
Add a VSCode development environment (used for GitHub Codespaces). |
distdir |
java.lang.String |
Final artifact output directory. |
github |
java.lang.Boolean |
Enable GitHub integration. |
githubOptions |
io.github.cdklabs.projen.github.GitHubOptions |
Options for GitHub integration. |
gitIgnoreOptions |
io.github.cdklabs.projen.IgnoreFileOptions |
Configuration options for .gitignore file. |
gitOptions |
io.github.cdklabs.projen.GitOptions |
Configuration options for git. |
gitpod |
java.lang.Boolean |
Add a Gitpod development environment. |
groupId |
java.lang.String |
This is generally unique amongst an organization or a project. |
junit |
java.lang.Boolean |
Include junit tests. |
junitOptions |
io.github.cdklabs.projen.java.JunitOptions |
junit options. |
logging |
io.github.cdklabs.projen.LoggerOptions |
Configure logging options such as verbosity. |
mergify |
java.lang.Boolean |
Whether mergify should be enabled on this repository or not. |
mergifyOptions |
io.github.cdklabs.projen.github.MergifyOptions |
Options for mergify. |
name |
java.lang.String |
This is the name of your project. |
outdir |
java.lang.String |
The root directory of the project. Relative to this directory, all files are synthesized. |
packaging |
java.lang.String |
Project packaging format. |
packagingOptions |
io.github.cdklabs.projen.java.MavenPackagingOptions |
Packaging options. |
parent |
io.github.cdklabs.projen.Project |
The parent project, if this project is part of a bigger project. |
parentPom |
io.github.cdklabs.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. |
projectType |
io.github.cdklabs.projen.ProjectType |
Which type of project this is (library/app). |
projenCommand |
java.lang.String |
The shell command to use in order to run the projen CLI. |
projenCredentials |
io.github.cdklabs.projen.github.GithubCredentials |
Choose a method of providing GitHub API access for projen workflows. |
projenrcJava |
java.lang.Boolean |
Use projenrc in java. |
projenrcJavaOptions |
io.github.cdklabs.projen.java.ProjenrcOptions |
Options related to projenrc in java. |
projenrcJson |
java.lang.Boolean |
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation. |
projenrcJsonOptions |
io.github.cdklabs.projen.ProjenrcJsonOptions |
Options for .projenrc.json. |
projenTokenSecret |
java.lang.String |
The name of a secret which includes a GitHub Personal Access Token to be used by projen workflows. |
readme |
io.github.cdklabs.projen.SampleReadmeProps |
The README setup. |
renovatebot |
java.lang.Boolean |
Use renovatebot to handle dependency upgrades. |
renovatebotOptions |
io.github.cdklabs.projen.RenovatebotOptions |
Options for renovatebot. |
sample |
java.lang.Boolean |
Include sample code and test if the relevant directories don't exist. |
sampleJavaPackage |
java.lang.String |
The java package to use for the code sample. |
stale |
java.lang.Boolean |
Auto-close of stale issues and pull request. |
staleOptions |
io.github.cdklabs.projen.github.StaleOptions |
Auto-close stale issues and pull requests. |
testDeps |
java.util.List |
List of test dependencies for this project. Dependencies use the format: <groupId>/<artifactId>@<semver>. |
url |
java.lang.String |
The URL, like the name, is not required. |
version |
java.lang.String |
This is the last piece of the naming puzzle. |
vscode |
java.lang.Boolean |
Enable VSCode integration. |
commitGeneratedCode |
java.lang.Boolean |
Whether to commit the code generated by the OpenAPI Generator. |
runtimeVersion |
JavaVersion |
Runtime version to target for the handlers. |
artifactIdOptional
public java.lang.String getArtifactId();
- Type: java.lang.String
- 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.
autoApproveOptionsOptional
public AutoApproveOptions getAutoApproveOptions();
- Type: io.github.cdklabs.projen.github.AutoApproveOptions
- Default: auto approve is disabled
Enable and configure the 'auto approve' workflow.
autoMergeOptional
public java.lang.Boolean getAutoMerge();
- Type: java.lang.Boolean
- Default: true
Enable automatic merging on GitHub.
Has no effect if github.mergify
is set to false.
autoMergeOptionsOptional
public AutoMergeOptions getAutoMergeOptions();
- Type: io.github.cdklabs.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.
clobberOptional
public java.lang.Boolean getClobber();
- Type: java.lang.Boolean
- Default: true, but false for subprojects
Add a clobber task which resets the repo to origin.
commitGeneratedOptional
public java.lang.Boolean getCommitGenerated();
- Type: java.lang.Boolean
- Default: true
Whether to commit the managed files by default.
compileOptionsOptional
public MavenCompileOptions getCompileOptions();
- Type: io.github.cdklabs.projen.java.MavenCompileOptions
- Default: defaults
Compile options.
depsOptional
public java.util.List<java.lang.String> getDeps();
- Type: java.util.List
- Default: []
List of runtime dependencies for this project. Dependencies use the format: <groupId>/<artifactId>@<semver>.
Additional dependencies can be added via project.addDependency().
descriptionOptional
public java.lang.String getDescription();
- Type: java.lang.String
- 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.
devContainerOptional
public java.lang.Boolean getDevContainer();
- Type: java.lang.Boolean
- Default: false
Add a VSCode development environment (used for GitHub Codespaces).
distdirOptional
public java.lang.String getDistdir();
- Type: java.lang.String
- Default: "dist/java"
Final artifact output directory.
githubOptional
public java.lang.Boolean getGithub();
- Type: java.lang.Boolean
- Default: true
Enable GitHub integration.
Enabled by default for root projects. Disabled for non-root projects.
githubOptionsOptional
public GitHubOptions getGithubOptions();
- Type: io.github.cdklabs.projen.github.GitHubOptions
- Default: see GitHubOptions
Options for GitHub integration.
gitIgnoreOptionsOptional
public IgnoreFileOptions getGitIgnoreOptions();
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptionsOptional
public GitOptions getGitOptions();
- Type: io.github.cdklabs.projen.GitOptions
Configuration options for git.
gitpodOptional
public java.lang.Boolean getGitpod();
- Type: java.lang.Boolean
- Default: false
Add a Gitpod development environment.
groupIdOptional
public java.lang.String getGroupId();
- Type: java.lang.String
- 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.
junitOptional
public java.lang.Boolean getJunit();
- Type: java.lang.Boolean
- Default: true
Include junit tests.
junitOptionsOptional
public JunitOptions getJunitOptions();
- Type: io.github.cdklabs.projen.java.JunitOptions
- Default: defaults
junit options.
loggingOptional
public LoggerOptions getLogging();
- Type: io.github.cdklabs.projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
~~mergify~~Optional
- Deprecated: use
githubOptions.mergifyinstead
public java.lang.Boolean getMergify();
- Type: java.lang.Boolean
- Default: true
Whether mergify should be enabled on this repository or not.
~~mergifyOptions~~Optional
- Deprecated: use
githubOptions.mergifyOptionsinstead
public MergifyOptions getMergifyOptions();
- Type: io.github.cdklabs.projen.github.MergifyOptions
- Default: default options
Options for mergify.
nameOptional
public java.lang.String getName();
- Type: java.lang.String
- Default: $BASEDIR
This is the name of your project.
outdirOptional
public java.lang.String getOutdir();
- Type: java.lang.String
- Default: "."
The root directory of the project. Relative to this directory, all files are synthesized.
If this project has a parent, this directory is relative to the parent directory and it cannot be the same as the parent or any of it's other subprojects.
packagingOptional
public java.lang.String getPackaging();
- Type: java.lang.String
- Default: "jar"
Project packaging format.
packagingOptionsOptional
public MavenPackagingOptions getPackagingOptions();
- Type: io.github.cdklabs.projen.java.MavenPackagingOptions
- Default: defaults
Packaging options.
parentOptional
public Project getParent();
- Type: io.github.cdklabs.projen.Project
The parent project, if this project is part of a bigger project.
parentPomOptional
public ParentPom getParentPom();
- Type: io.github.cdklabs.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.
~~projectType~~Optional
- Deprecated: no longer supported at the base project level
public ProjectType getProjectType();
- Type: io.github.cdklabs.projen.ProjectType
- Default: ProjectType.UNKNOWN
Which type of project this is (library/app).
projenCommandOptional
public java.lang.String getProjenCommand();
- Type: java.lang.String
- Default: "npx projen"
The shell command to use in order to run the projen CLI.
Can be used to customize in special environments.
projenCredentialsOptional
public GithubCredentials getProjenCredentials();
- Type: io.github.cdklabs.projen.github.GithubCredentials
- Default: use a personal access token named PROJEN_GITHUB_TOKEN
Choose a method of providing GitHub API access for projen workflows.
projenrcJavaOptional
public java.lang.Boolean getProjenrcJava();
- Type: java.lang.Boolean
- 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.
projenrcJavaOptionsOptional
public ProjenrcOptions getProjenrcJavaOptions();
- Type: io.github.cdklabs.projen.java.ProjenrcOptions
- Default: default options
Options related to projenrc in java.
projenrcJsonOptional
public java.lang.Boolean getProjenrcJson();
- Type: java.lang.Boolean
- Default: false
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation.
projenrcJsonOptionsOptional
public ProjenrcJsonOptions getProjenrcJsonOptions();
- Type: io.github.cdklabs.projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
~~projenTokenSecret~~Optional
- Deprecated: use
projenCredentials
public java.lang.String getProjenTokenSecret();
- Type: java.lang.String
- Default: "PROJEN_GITHUB_TOKEN"
The name of a secret which includes a GitHub Personal Access Token to be used by projen workflows.
This token needs to have the repo, workflows
and packages scope.
readmeOptional
public SampleReadmeProps getReadme();
- Type: io.github.cdklabs.projen.SampleReadmeProps
- Default: { filename: 'README.md', contents: '# replace this' }
The README setup.
renovatebotOptional
public java.lang.Boolean getRenovatebot();
- Type: java.lang.Boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptionsOptional
public RenovatebotOptions getRenovatebotOptions();
- Type: io.github.cdklabs.projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
sampleOptional
public java.lang.Boolean getSample();
- Type: java.lang.Boolean
- Default: true
Include sample code and test if the relevant directories don't exist.
sampleJavaPackageOptional
public java.lang.String getSampleJavaPackage();
- Type: java.lang.String
- Default: "org.acme"
The java package to use for the code sample.
staleOptional
public java.lang.Boolean getStale();
- Type: java.lang.Boolean
- Default: false
Auto-close of stale issues and pull request.
See staleOptions for options.
staleOptionsOptional
public StaleOptions getStaleOptions();
- Type: io.github.cdklabs.projen.github.StaleOptions
- Default: see defaults in
StaleOptions
Auto-close stale issues and pull requests.
To disable set stale to false.
testDepsOptional
public java.util.List<java.lang.String> getTestDeps();
- Type: java.util.List
- Default: []
List of test dependencies for this project. Dependencies use the format: <groupId>/<artifactId>@<semver>.
Additional dependencies can be added via project.addTestDependency().
urlOptional
public java.lang.String getUrl();
- Type: java.lang.String
- 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.
versionOptional
public java.lang.String getVersion();
- Type: java.lang.String
- 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.
vscodeOptional
public java.lang.Boolean getVscode();
- Type: java.lang.Boolean
- Default: true
Enable VSCode integration.
Enabled by default for root projects. Disabled for non-root projects.
commitGeneratedCodeOptional
public java.lang.Boolean getCommitGeneratedCode();
- Type: java.lang.Boolean
- Default: false
Whether to commit the code generated by the OpenAPI Generator.
runtimeVersionOptional
public JavaVersion getRuntimeVersion();
- Type: JavaVersion
- Default: JavaVersion.JAVA_17
Runtime version to target for the handlers.
GeneratedJavaInfrastructureOptions
Options for configuring a generated java infrastructure project.
Initializer
import software.aws.pdk.type_safe_api.GeneratedJavaInfrastructureOptions;
GeneratedJavaInfrastructureOptions.builder()
// .artifactId(java.lang.String)
// .autoApproveOptions(AutoApproveOptions)
// .autoMerge(java.lang.Boolean)
// .autoMergeOptions(AutoMergeOptions)
// .clobber(java.lang.Boolean)
// .commitGenerated(java.lang.Boolean)
// .compileOptions(MavenCompileOptions)
// .deps(java.util.List<java.lang.String>)
// .description(java.lang.String)
// .devContainer(java.lang.Boolean)
// .distdir(java.lang.String)
// .github(java.lang.Boolean)
// .githubOptions(GitHubOptions)
// .gitIgnoreOptions(IgnoreFileOptions)
// .gitOptions(GitOptions)
// .gitpod(java.lang.Boolean)
// .groupId(java.lang.String)
// .junit(java.lang.Boolean)
// .junitOptions(JunitOptions)
// .logging(LoggerOptions)
// .mergify(java.lang.Boolean)
// .mergifyOptions(MergifyOptions)
// .name(java.lang.String)
// .outdir(java.lang.String)
// .packaging(java.lang.String)
// .packagingOptions(MavenPackagingOptions)
// .parent(Project)
// .parentPom(ParentPom)
// .projectType(ProjectType)
// .projenCommand(java.lang.String)
// .projenCredentials(GithubCredentials)
// .projenrcJava(java.lang.Boolean)
// .projenrcJavaOptions(ProjenrcOptions)
// .projenrcJson(java.lang.Boolean)
// .projenrcJsonOptions(ProjenrcJsonOptions)
// .projenTokenSecret(java.lang.String)
// .readme(SampleReadmeProps)
// .renovatebot(java.lang.Boolean)
// .renovatebotOptions(RenovatebotOptions)
// .sample(java.lang.Boolean)
// .sampleJavaPackage(java.lang.String)
// .stale(java.lang.Boolean)
// .staleOptions(StaleOptions)
// .testDeps(java.util.List<java.lang.String>)
// .url(java.lang.String)
// .version(java.lang.String)
// .vscode(java.lang.Boolean)
// .commitGeneratedCode(java.lang.Boolean)
// .mockDataOptions(MockResponseDataGenerationOptions)
.build();
Properties
| Name | Type | Description |
|---|---|---|
artifactId |
java.lang.String |
The artifactId is generally the name that the project is known by. |
autoApproveOptions |
io.github.cdklabs.projen.github.AutoApproveOptions |
Enable and configure the 'auto approve' workflow. |
autoMerge |
java.lang.Boolean |
Enable automatic merging on GitHub. |
autoMergeOptions |
io.github.cdklabs.projen.github.AutoMergeOptions |
Configure options for automatic merging on GitHub. |
clobber |
java.lang.Boolean |
Add a clobber task which resets the repo to origin. |
commitGenerated |
java.lang.Boolean |
Whether to commit the managed files by default. |
compileOptions |
io.github.cdklabs.projen.java.MavenCompileOptions |
Compile options. |
deps |
java.util.List |
List of runtime dependencies for this project. Dependencies use the format: <groupId>/<artifactId>@<semver>. |
description |
java.lang.String |
Description of a project is always good. |
devContainer |
java.lang.Boolean |
Add a VSCode development environment (used for GitHub Codespaces). |
distdir |
java.lang.String |
Final artifact output directory. |
github |
java.lang.Boolean |
Enable GitHub integration. |
githubOptions |
io.github.cdklabs.projen.github.GitHubOptions |
Options for GitHub integration. |
gitIgnoreOptions |
io.github.cdklabs.projen.IgnoreFileOptions |
Configuration options for .gitignore file. |
gitOptions |
io.github.cdklabs.projen.GitOptions |
Configuration options for git. |
gitpod |
java.lang.Boolean |
Add a Gitpod development environment. |
groupId |
java.lang.String |
This is generally unique amongst an organization or a project. |
junit |
java.lang.Boolean |
Include junit tests. |
junitOptions |
io.github.cdklabs.projen.java.JunitOptions |
junit options. |
logging |
io.github.cdklabs.projen.LoggerOptions |
Configure logging options such as verbosity. |
mergify |
java.lang.Boolean |
Whether mergify should be enabled on this repository or not. |
mergifyOptions |
io.github.cdklabs.projen.github.MergifyOptions |
Options for mergify. |
name |
java.lang.String |
This is the name of your project. |
outdir |
java.lang.String |
The root directory of the project. Relative to this directory, all files are synthesized. |
packaging |
java.lang.String |
Project packaging format. |
packagingOptions |
io.github.cdklabs.projen.java.MavenPackagingOptions |
Packaging options. |
parent |
io.github.cdklabs.projen.Project |
The parent project, if this project is part of a bigger project. |
parentPom |
io.github.cdklabs.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. |
projectType |
io.github.cdklabs.projen.ProjectType |
Which type of project this is (library/app). |
projenCommand |
java.lang.String |
The shell command to use in order to run the projen CLI. |
projenCredentials |
io.github.cdklabs.projen.github.GithubCredentials |
Choose a method of providing GitHub API access for projen workflows. |
projenrcJava |
java.lang.Boolean |
Use projenrc in java. |
projenrcJavaOptions |
io.github.cdklabs.projen.java.ProjenrcOptions |
Options related to projenrc in java. |
projenrcJson |
java.lang.Boolean |
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation. |
projenrcJsonOptions |
io.github.cdklabs.projen.ProjenrcJsonOptions |
Options for .projenrc.json. |
projenTokenSecret |
java.lang.String |
The name of a secret which includes a GitHub Personal Access Token to be used by projen workflows. |
readme |
io.github.cdklabs.projen.SampleReadmeProps |
The README setup. |
renovatebot |
java.lang.Boolean |
Use renovatebot to handle dependency upgrades. |
renovatebotOptions |
io.github.cdklabs.projen.RenovatebotOptions |
Options for renovatebot. |
sample |
java.lang.Boolean |
Include sample code and test if the relevant directories don't exist. |
sampleJavaPackage |
java.lang.String |
The java package to use for the code sample. |
stale |
java.lang.Boolean |
Auto-close of stale issues and pull request. |
staleOptions |
io.github.cdklabs.projen.github.StaleOptions |
Auto-close stale issues and pull requests. |
testDeps |
java.util.List |
List of test dependencies for this project. Dependencies use the format: <groupId>/<artifactId>@<semver>. |
url |
java.lang.String |
The URL, like the name, is not required. |
version |
java.lang.String |
This is the last piece of the naming puzzle. |
vscode |
java.lang.Boolean |
Enable VSCode integration. |
commitGeneratedCode |
java.lang.Boolean |
Whether to commit the code generated by the OpenAPI Generator. |
mockDataOptions |
MockResponseDataGenerationOptions |
Options for the generated mock response data. |
artifactIdOptional
public java.lang.String getArtifactId();
- Type: java.lang.String
- 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.
autoApproveOptionsOptional
public AutoApproveOptions getAutoApproveOptions();
- Type: io.github.cdklabs.projen.github.AutoApproveOptions
- Default: auto approve is disabled
Enable and configure the 'auto approve' workflow.
autoMergeOptional
public java.lang.Boolean getAutoMerge();
- Type: java.lang.Boolean
- Default: true
Enable automatic merging on GitHub.
Has no effect if github.mergify
is set to false.
autoMergeOptionsOptional
public AutoMergeOptions getAutoMergeOptions();
- Type: io.github.cdklabs.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.
clobberOptional
public java.lang.Boolean getClobber();
- Type: java.lang.Boolean
- Default: true, but false for subprojects
Add a clobber task which resets the repo to origin.
commitGeneratedOptional
public java.lang.Boolean getCommitGenerated();
- Type: java.lang.Boolean
- Default: true
Whether to commit the managed files by default.
compileOptionsOptional
public MavenCompileOptions getCompileOptions();
- Type: io.github.cdklabs.projen.java.MavenCompileOptions
- Default: defaults
Compile options.
depsOptional
public java.util.List<java.lang.String> getDeps();
- Type: java.util.List
- Default: []
List of runtime dependencies for this project. Dependencies use the format: <groupId>/<artifactId>@<semver>.
Additional dependencies can be added via project.addDependency().
descriptionOptional
public java.lang.String getDescription();
- Type: java.lang.String
- 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.
devContainerOptional
public java.lang.Boolean getDevContainer();
- Type: java.lang.Boolean
- Default: false
Add a VSCode development environment (used for GitHub Codespaces).
distdirOptional
public java.lang.String getDistdir();
- Type: java.lang.String
- Default: "dist/java"
Final artifact output directory.
githubOptional
public java.lang.Boolean getGithub();
- Type: java.lang.Boolean
- Default: true
Enable GitHub integration.
Enabled by default for root projects. Disabled for non-root projects.
githubOptionsOptional
public GitHubOptions getGithubOptions();
- Type: io.github.cdklabs.projen.github.GitHubOptions
- Default: see GitHubOptions
Options for GitHub integration.
gitIgnoreOptionsOptional
public IgnoreFileOptions getGitIgnoreOptions();
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptionsOptional
public GitOptions getGitOptions();
- Type: io.github.cdklabs.projen.GitOptions
Configuration options for git.
gitpodOptional
public java.lang.Boolean getGitpod();
- Type: java.lang.Boolean
- Default: false
Add a Gitpod development environment.
groupIdOptional
public java.lang.String getGroupId();
- Type: java.lang.String
- 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.
junitOptional
public java.lang.Boolean getJunit();
- Type: java.lang.Boolean
- Default: true
Include junit tests.
junitOptionsOptional
public JunitOptions getJunitOptions();
- Type: io.github.cdklabs.projen.java.JunitOptions
- Default: defaults
junit options.
loggingOptional
public LoggerOptions getLogging();
- Type: io.github.cdklabs.projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
~~mergify~~Optional
- Deprecated: use
githubOptions.mergifyinstead
public java.lang.Boolean getMergify();
- Type: java.lang.Boolean
- Default: true
Whether mergify should be enabled on this repository or not.
~~mergifyOptions~~Optional
- Deprecated: use
githubOptions.mergifyOptionsinstead
public MergifyOptions getMergifyOptions();
- Type: io.github.cdklabs.projen.github.MergifyOptions
- Default: default options
Options for mergify.
nameOptional
public java.lang.String getName();
- Type: java.lang.String
- Default: $BASEDIR
This is the name of your project.
outdirOptional
public java.lang.String getOutdir();
- Type: java.lang.String
- Default: "."
The root directory of the project. Relative to this directory, all files are synthesized.
If this project has a parent, this directory is relative to the parent directory and it cannot be the same as the parent or any of it's other subprojects.
packagingOptional
public java.lang.String getPackaging();
- Type: java.lang.String
- Default: "jar"
Project packaging format.
packagingOptionsOptional
public MavenPackagingOptions getPackagingOptions();
- Type: io.github.cdklabs.projen.java.MavenPackagingOptions
- Default: defaults
Packaging options.
parentOptional
public Project getParent();
- Type: io.github.cdklabs.projen.Project
The parent project, if this project is part of a bigger project.
parentPomOptional
public ParentPom getParentPom();
- Type: io.github.cdklabs.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.
~~projectType~~Optional
- Deprecated: no longer supported at the base project level
public ProjectType getProjectType();
- Type: io.github.cdklabs.projen.ProjectType
- Default: ProjectType.UNKNOWN
Which type of project this is (library/app).
projenCommandOptional
public java.lang.String getProjenCommand();
- Type: java.lang.String
- Default: "npx projen"
The shell command to use in order to run the projen CLI.
Can be used to customize in special environments.
projenCredentialsOptional
public GithubCredentials getProjenCredentials();
- Type: io.github.cdklabs.projen.github.GithubCredentials
- Default: use a personal access token named PROJEN_GITHUB_TOKEN
Choose a method of providing GitHub API access for projen workflows.
projenrcJavaOptional
public java.lang.Boolean getProjenrcJava();
- Type: java.lang.Boolean
- 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.
projenrcJavaOptionsOptional
public ProjenrcOptions getProjenrcJavaOptions();
- Type: io.github.cdklabs.projen.java.ProjenrcOptions
- Default: default options
Options related to projenrc in java.
projenrcJsonOptional
public java.lang.Boolean getProjenrcJson();
- Type: java.lang.Boolean
- Default: false
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation.
projenrcJsonOptionsOptional
public ProjenrcJsonOptions getProjenrcJsonOptions();
- Type: io.github.cdklabs.projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
~~projenTokenSecret~~Optional
- Deprecated: use
projenCredentials
public java.lang.String getProjenTokenSecret();
- Type: java.lang.String
- Default: "PROJEN_GITHUB_TOKEN"
The name of a secret which includes a GitHub Personal Access Token to be used by projen workflows.
This token needs to have the repo, workflows
and packages scope.
readmeOptional
public SampleReadmeProps getReadme();
- Type: io.github.cdklabs.projen.SampleReadmeProps
- Default: { filename: 'README.md', contents: '# replace this' }
The README setup.
renovatebotOptional
public java.lang.Boolean getRenovatebot();
- Type: java.lang.Boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptionsOptional
public RenovatebotOptions getRenovatebotOptions();
- Type: io.github.cdklabs.projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
sampleOptional
public java.lang.Boolean getSample();
- Type: java.lang.Boolean
- Default: true
Include sample code and test if the relevant directories don't exist.
sampleJavaPackageOptional
public java.lang.String getSampleJavaPackage();
- Type: java.lang.String
- Default: "org.acme"
The java package to use for the code sample.
staleOptional
public java.lang.Boolean getStale();
- Type: java.lang.Boolean
- Default: false
Auto-close of stale issues and pull request.
See staleOptions for options.
staleOptionsOptional
public StaleOptions getStaleOptions();
- Type: io.github.cdklabs.projen.github.StaleOptions
- Default: see defaults in
StaleOptions
Auto-close stale issues and pull requests.
To disable set stale to false.
testDepsOptional
public java.util.List<java.lang.String> getTestDeps();
- Type: java.util.List
- Default: []
List of test dependencies for this project. Dependencies use the format: <groupId>/<artifactId>@<semver>.
Additional dependencies can be added via project.addTestDependency().
urlOptional
public java.lang.String getUrl();
- Type: java.lang.String
- 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.
versionOptional
public java.lang.String getVersion();
- Type: java.lang.String
- 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.
vscodeOptional
public java.lang.Boolean getVscode();
- Type: java.lang.Boolean
- Default: true
Enable VSCode integration.
Enabled by default for root projects. Disabled for non-root projects.
commitGeneratedCodeOptional
public java.lang.Boolean getCommitGeneratedCode();
- Type: java.lang.Boolean
- Default: false
Whether to commit the code generated by the OpenAPI Generator.
mockDataOptionsOptional
public MockResponseDataGenerationOptions getMockDataOptions();
Options for the generated mock response data.
GeneratedJavaRuntimeOptions
Options for configuring a generated java runtime project.
Initializer
import software.aws.pdk.type_safe_api.GeneratedJavaRuntimeOptions;
GeneratedJavaRuntimeOptions.builder()
// .artifactId(java.lang.String)
// .autoApproveOptions(AutoApproveOptions)
// .autoMerge(java.lang.Boolean)
// .autoMergeOptions(AutoMergeOptions)
// .clobber(java.lang.Boolean)
// .commitGenerated(java.lang.Boolean)
// .compileOptions(MavenCompileOptions)
// .deps(java.util.List<java.lang.String>)
// .description(java.lang.String)
// .devContainer(java.lang.Boolean)
// .distdir(java.lang.String)
// .github(java.lang.Boolean)
// .githubOptions(GitHubOptions)
// .gitIgnoreOptions(IgnoreFileOptions)
// .gitOptions(GitOptions)
// .gitpod(java.lang.Boolean)
// .groupId(java.lang.String)
// .junit(java.lang.Boolean)
// .junitOptions(JunitOptions)
// .logging(LoggerOptions)
// .mergify(java.lang.Boolean)
// .mergifyOptions(MergifyOptions)
// .name(java.lang.String)
// .outdir(java.lang.String)
// .packaging(java.lang.String)
// .packagingOptions(MavenPackagingOptions)
// .parent(Project)
// .parentPom(ParentPom)
// .projectType(ProjectType)
// .projenCommand(java.lang.String)
// .projenCredentials(GithubCredentials)
// .projenrcJava(java.lang.Boolean)
// .projenrcJavaOptions(ProjenrcOptions)
// .projenrcJson(java.lang.Boolean)
// .projenrcJsonOptions(ProjenrcJsonOptions)
// .projenTokenSecret(java.lang.String)
// .readme(SampleReadmeProps)
// .renovatebot(java.lang.Boolean)
// .renovatebotOptions(RenovatebotOptions)
// .sample(java.lang.Boolean)
// .sampleJavaPackage(java.lang.String)
// .stale(java.lang.Boolean)
// .staleOptions(StaleOptions)
// .testDeps(java.util.List<java.lang.String>)
// .url(java.lang.String)
// .version(java.lang.String)
// .vscode(java.lang.Boolean)
// .commitGeneratedCode(java.lang.Boolean)
.build();
Properties
| Name | Type | Description |
|---|---|---|
artifactId |
java.lang.String |
The artifactId is generally the name that the project is known by. |
autoApproveOptions |
io.github.cdklabs.projen.github.AutoApproveOptions |
Enable and configure the 'auto approve' workflow. |
autoMerge |
java.lang.Boolean |
Enable automatic merging on GitHub. |
autoMergeOptions |
io.github.cdklabs.projen.github.AutoMergeOptions |
Configure options for automatic merging on GitHub. |
clobber |
java.lang.Boolean |
Add a clobber task which resets the repo to origin. |
commitGenerated |
java.lang.Boolean |
Whether to commit the managed files by default. |
compileOptions |
io.github.cdklabs.projen.java.MavenCompileOptions |
Compile options. |
deps |
java.util.List |
List of runtime dependencies for this project. Dependencies use the format: <groupId>/<artifactId>@<semver>. |
description |
java.lang.String |
Description of a project is always good. |
devContainer |
java.lang.Boolean |
Add a VSCode development environment (used for GitHub Codespaces). |
distdir |
java.lang.String |
Final artifact output directory. |
github |
java.lang.Boolean |
Enable GitHub integration. |
githubOptions |
io.github.cdklabs.projen.github.GitHubOptions |
Options for GitHub integration. |
gitIgnoreOptions |
io.github.cdklabs.projen.IgnoreFileOptions |
Configuration options for .gitignore file. |
gitOptions |
io.github.cdklabs.projen.GitOptions |
Configuration options for git. |
gitpod |
java.lang.Boolean |
Add a Gitpod development environment. |
groupId |
java.lang.String |
This is generally unique amongst an organization or a project. |
junit |
java.lang.Boolean |
Include junit tests. |
junitOptions |
io.github.cdklabs.projen.java.JunitOptions |
junit options. |
logging |
io.github.cdklabs.projen.LoggerOptions |
Configure logging options such as verbosity. |
mergify |
java.lang.Boolean |
Whether mergify should be enabled on this repository or not. |
mergifyOptions |
io.github.cdklabs.projen.github.MergifyOptions |
Options for mergify. |
name |
java.lang.String |
This is the name of your project. |
outdir |
java.lang.String |
The root directory of the project. Relative to this directory, all files are synthesized. |
packaging |
java.lang.String |
Project packaging format. |
packagingOptions |
io.github.cdklabs.projen.java.MavenPackagingOptions |
Packaging options. |
parent |
io.github.cdklabs.projen.Project |
The parent project, if this project is part of a bigger project. |
parentPom |
io.github.cdklabs.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. |
projectType |
io.github.cdklabs.projen.ProjectType |
Which type of project this is (library/app). |
projenCommand |
java.lang.String |
The shell command to use in order to run the projen CLI. |
projenCredentials |
io.github.cdklabs.projen.github.GithubCredentials |
Choose a method of providing GitHub API access for projen workflows. |
projenrcJava |
java.lang.Boolean |
Use projenrc in java. |
projenrcJavaOptions |
io.github.cdklabs.projen.java.ProjenrcOptions |
Options related to projenrc in java. |
projenrcJson |
java.lang.Boolean |
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation. |
projenrcJsonOptions |
io.github.cdklabs.projen.ProjenrcJsonOptions |
Options for .projenrc.json. |
projenTokenSecret |
java.lang.String |
The name of a secret which includes a GitHub Personal Access Token to be used by projen workflows. |
readme |
io.github.cdklabs.projen.SampleReadmeProps |
The README setup. |
renovatebot |
java.lang.Boolean |
Use renovatebot to handle dependency upgrades. |
renovatebotOptions |
io.github.cdklabs.projen.RenovatebotOptions |
Options for renovatebot. |
sample |
java.lang.Boolean |
Include sample code and test if the relevant directories don't exist. |
sampleJavaPackage |
java.lang.String |
The java package to use for the code sample. |
stale |
java.lang.Boolean |
Auto-close of stale issues and pull request. |
staleOptions |
io.github.cdklabs.projen.github.StaleOptions |
Auto-close stale issues and pull requests. |
testDeps |
java.util.List |
List of test dependencies for this project. Dependencies use the format: <groupId>/<artifactId>@<semver>. |
url |
java.lang.String |
The URL, like the name, is not required. |
version |
java.lang.String |
This is the last piece of the naming puzzle. |
vscode |
java.lang.Boolean |
Enable VSCode integration. |
commitGeneratedCode |
java.lang.Boolean |
Whether to commit the code generated by the OpenAPI Generator. |
artifactIdOptional
public java.lang.String getArtifactId();
- Type: java.lang.String
- 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.
autoApproveOptionsOptional
public AutoApproveOptions getAutoApproveOptions();
- Type: io.github.cdklabs.projen.github.AutoApproveOptions
- Default: auto approve is disabled
Enable and configure the 'auto approve' workflow.
autoMergeOptional
public java.lang.Boolean getAutoMerge();
- Type: java.lang.Boolean
- Default: true
Enable automatic merging on GitHub.
Has no effect if github.mergify
is set to false.
autoMergeOptionsOptional
public AutoMergeOptions getAutoMergeOptions();
- Type: io.github.cdklabs.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.
clobberOptional
public java.lang.Boolean getClobber();
- Type: java.lang.Boolean
- Default: true, but false for subprojects
Add a clobber task which resets the repo to origin.
commitGeneratedOptional
public java.lang.Boolean getCommitGenerated();
- Type: java.lang.Boolean
- Default: true
Whether to commit the managed files by default.
compileOptionsOptional
public MavenCompileOptions getCompileOptions();
- Type: io.github.cdklabs.projen.java.MavenCompileOptions
- Default: defaults
Compile options.
depsOptional
public java.util.List<java.lang.String> getDeps();
- Type: java.util.List
- Default: []
List of runtime dependencies for this project. Dependencies use the format: <groupId>/<artifactId>@<semver>.
Additional dependencies can be added via project.addDependency().
descriptionOptional
public java.lang.String getDescription();
- Type: java.lang.String
- 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.
devContainerOptional
public java.lang.Boolean getDevContainer();
- Type: java.lang.Boolean
- Default: false
Add a VSCode development environment (used for GitHub Codespaces).
distdirOptional
public java.lang.String getDistdir();
- Type: java.lang.String
- Default: "dist/java"
Final artifact output directory.
githubOptional
public java.lang.Boolean getGithub();
- Type: java.lang.Boolean
- Default: true
Enable GitHub integration.
Enabled by default for root projects. Disabled for non-root projects.
githubOptionsOptional
public GitHubOptions getGithubOptions();
- Type: io.github.cdklabs.projen.github.GitHubOptions
- Default: see GitHubOptions
Options for GitHub integration.
gitIgnoreOptionsOptional
public IgnoreFileOptions getGitIgnoreOptions();
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptionsOptional
public GitOptions getGitOptions();
- Type: io.github.cdklabs.projen.GitOptions
Configuration options for git.
gitpodOptional
public java.lang.Boolean getGitpod();
- Type: java.lang.Boolean
- Default: false
Add a Gitpod development environment.
groupIdOptional
public java.lang.String getGroupId();
- Type: java.lang.String
- 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.
junitOptional
public java.lang.Boolean getJunit();
- Type: java.lang.Boolean
- Default: true
Include junit tests.
junitOptionsOptional
public JunitOptions getJunitOptions();
- Type: io.github.cdklabs.projen.java.JunitOptions
- Default: defaults
junit options.
loggingOptional
public LoggerOptions getLogging();
- Type: io.github.cdklabs.projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
~~mergify~~Optional
- Deprecated: use
githubOptions.mergifyinstead
public java.lang.Boolean getMergify();
- Type: java.lang.Boolean
- Default: true
Whether mergify should be enabled on this repository or not.
~~mergifyOptions~~Optional
- Deprecated: use
githubOptions.mergifyOptionsinstead
public MergifyOptions getMergifyOptions();
- Type: io.github.cdklabs.projen.github.MergifyOptions
- Default: default options
Options for mergify.
nameOptional
public java.lang.String getName();
- Type: java.lang.String
- Default: $BASEDIR
This is the name of your project.
outdirOptional
public java.lang.String getOutdir();
- Type: java.lang.String
- Default: "."
The root directory of the project. Relative to this directory, all files are synthesized.
If this project has a parent, this directory is relative to the parent directory and it cannot be the same as the parent or any of it's other subprojects.
packagingOptional
public java.lang.String getPackaging();
- Type: java.lang.String
- Default: "jar"
Project packaging format.
packagingOptionsOptional
public MavenPackagingOptions getPackagingOptions();
- Type: io.github.cdklabs.projen.java.MavenPackagingOptions
- Default: defaults
Packaging options.
parentOptional
public Project getParent();
- Type: io.github.cdklabs.projen.Project
The parent project, if this project is part of a bigger project.
parentPomOptional
public ParentPom getParentPom();
- Type: io.github.cdklabs.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.
~~projectType~~Optional
- Deprecated: no longer supported at the base project level
public ProjectType getProjectType();
- Type: io.github.cdklabs.projen.ProjectType
- Default: ProjectType.UNKNOWN
Which type of project this is (library/app).
projenCommandOptional
public java.lang.String getProjenCommand();
- Type: java.lang.String
- Default: "npx projen"
The shell command to use in order to run the projen CLI.
Can be used to customize in special environments.
projenCredentialsOptional
public GithubCredentials getProjenCredentials();
- Type: io.github.cdklabs.projen.github.GithubCredentials
- Default: use a personal access token named PROJEN_GITHUB_TOKEN
Choose a method of providing GitHub API access for projen workflows.
projenrcJavaOptional
public java.lang.Boolean getProjenrcJava();
- Type: java.lang.Boolean
- 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.
projenrcJavaOptionsOptional
public ProjenrcOptions getProjenrcJavaOptions();
- Type: io.github.cdklabs.projen.java.ProjenrcOptions
- Default: default options
Options related to projenrc in java.
projenrcJsonOptional
public java.lang.Boolean getProjenrcJson();
- Type: java.lang.Boolean
- Default: false
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation.
projenrcJsonOptionsOptional
public ProjenrcJsonOptions getProjenrcJsonOptions();
- Type: io.github.cdklabs.projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
~~projenTokenSecret~~Optional
- Deprecated: use
projenCredentials
public java.lang.String getProjenTokenSecret();
- Type: java.lang.String
- Default: "PROJEN_GITHUB_TOKEN"
The name of a secret which includes a GitHub Personal Access Token to be used by projen workflows.
This token needs to have the repo, workflows
and packages scope.
readmeOptional
public SampleReadmeProps getReadme();
- Type: io.github.cdklabs.projen.SampleReadmeProps
- Default: { filename: 'README.md', contents: '# replace this' }
The README setup.
renovatebotOptional
public java.lang.Boolean getRenovatebot();
- Type: java.lang.Boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptionsOptional
public RenovatebotOptions getRenovatebotOptions();
- Type: io.github.cdklabs.projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
sampleOptional
public java.lang.Boolean getSample();
- Type: java.lang.Boolean
- Default: true
Include sample code and test if the relevant directories don't exist.
sampleJavaPackageOptional
public java.lang.String getSampleJavaPackage();
- Type: java.lang.String
- Default: "org.acme"
The java package to use for the code sample.
staleOptional
public java.lang.Boolean getStale();
- Type: java.lang.Boolean
- Default: false
Auto-close of stale issues and pull request.
See staleOptions for options.
staleOptionsOptional
public StaleOptions getStaleOptions();
- Type: io.github.cdklabs.projen.github.StaleOptions
- Default: see defaults in
StaleOptions
Auto-close stale issues and pull requests.
To disable set stale to false.
testDepsOptional
public java.util.List<java.lang.String> getTestDeps();
- Type: java.util.List
- Default: []
List of test dependencies for this project. Dependencies use the format: <groupId>/<artifactId>@<semver>.
Additional dependencies can be added via project.addTestDependency().
urlOptional
public java.lang.String getUrl();
- Type: java.lang.String
- 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.
versionOptional
public java.lang.String getVersion();
- Type: java.lang.String
- 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.
vscodeOptional
public java.lang.Boolean getVscode();
- Type: java.lang.Boolean
- Default: true
Enable VSCode integration.
Enabled by default for root projects. Disabled for non-root projects.
commitGeneratedCodeOptional
public java.lang.Boolean getCommitGeneratedCode();
- Type: java.lang.Boolean
- Default: false
Whether to commit the code generated by the OpenAPI Generator.
GeneratedLibraryOptions
Options for generated libraries.
Initializer
import software.aws.pdk.type_safe_api.GeneratedLibraryOptions;
GeneratedLibraryOptions.builder()
// .typescriptReactQueryHooks(GeneratedTypeScriptReactQueryHooksOptions)
.build();
Properties
| Name | Type | Description |
|---|---|---|
typescriptReactQueryHooks |
GeneratedTypeScriptReactQueryHooksOptions |
Options for the generated typescript react-query hooks library. |
typescriptReactQueryHooksOptional
public GeneratedTypeScriptReactQueryHooksOptions getTypescriptReactQueryHooks();
Options for the generated typescript react-query hooks library.
These override the default inferred options.
GeneratedLibraryProjects
Generated library projects.
Initializer
import software.aws.pdk.type_safe_api.GeneratedLibraryProjects;
GeneratedLibraryProjects.builder()
// .typescriptReactQueryHooks(TypeScriptProject)
.build();
Properties
| Name | Type | Description |
|---|---|---|
typescriptReactQueryHooks |
io.github.cdklabs.projen.typescript.TypeScriptProject |
Generated typescript react-query hooks project. |
typescriptReactQueryHooksOptional
public TypeScriptProject getTypescriptReactQueryHooks();
- Type: io.github.cdklabs.projen.typescript.TypeScriptProject
Generated typescript react-query hooks project.
GeneratedMarkdownDocumentationOptions
Options for the markdown documentation project.
Initializer
import software.aws.pdk.type_safe_api.GeneratedMarkdownDocumentationOptions;
GeneratedMarkdownDocumentationOptions.builder()
// .commitGeneratedCode(java.lang.Boolean)
.build();
Properties
| Name | Type | Description |
|---|---|---|
commitGeneratedCode |
java.lang.Boolean |
Whether to commit the code generated by the OpenAPI Generator. |
commitGeneratedCodeOptional
public java.lang.Boolean getCommitGeneratedCode();
- Type: java.lang.Boolean
- Default: false
Whether to commit the code generated by the OpenAPI Generator.
GeneratedPlantumlDocumentationOptions
Options for the plantuml documentation project.
Initializer
import software.aws.pdk.type_safe_api.GeneratedPlantumlDocumentationOptions;
GeneratedPlantumlDocumentationOptions.builder()
// .commitGeneratedCode(java.lang.Boolean)
.build();
Properties
| Name | Type | Description |
|---|---|---|
commitGeneratedCode |
java.lang.Boolean |
Whether to commit the code generated by the OpenAPI Generator. |
commitGeneratedCodeOptional
public java.lang.Boolean getCommitGeneratedCode();
- Type: java.lang.Boolean
- Default: false
Whether to commit the code generated by the OpenAPI Generator.
GeneratedProjectOptions
Options for a code project generated with OpenAPI Generator.
Initializer
import software.aws.pdk.type_safe_api.GeneratedProjectOptions;
GeneratedProjectOptions.builder()
// .commitGeneratedCode(java.lang.Boolean)
.build();
Properties
| Name | Type | Description |
|---|---|---|
commitGeneratedCode |
java.lang.Boolean |
Whether to commit the code generated by the OpenAPI Generator. |
commitGeneratedCodeOptional
public java.lang.Boolean getCommitGeneratedCode();
- Type: java.lang.Boolean
- Default: false
Whether to commit the code generated by the OpenAPI Generator.
GeneratedPythonHandlersOptions
Options for configuring a generated python handlers project.
Initializer
import software.aws.pdk.type_safe_api.GeneratedPythonHandlersOptions;
GeneratedPythonHandlersOptions.builder()
// .authorEmail(java.lang.String)
// .authorName(java.lang.String)
// .autoApproveOptions(AutoApproveOptions)
// .autoMerge(java.lang.Boolean)
// .autoMergeOptions(AutoMergeOptions)
// .classifiers(java.util.List<java.lang.String>)
// .clobber(java.lang.Boolean)
// .commitGenerated(java.lang.Boolean)
// .deps(java.util.List<java.lang.String>)
// .description(java.lang.String)
// .devContainer(java.lang.Boolean)
// .devDeps(java.util.List<java.lang.String>)
// .github(java.lang.Boolean)
// .githubOptions(GitHubOptions)
// .gitIgnoreOptions(IgnoreFileOptions)
// .gitOptions(GitOptions)
// .gitpod(java.lang.Boolean)
// .homepage(java.lang.String)
// .license(java.lang.String)
// .logging(LoggerOptions)
// .mergify(java.lang.Boolean)
// .mergifyOptions(MergifyOptions)
// .moduleName(java.lang.String)
// .name(java.lang.String)
// .outdir(java.lang.String)
// .packageName(java.lang.String)
// .parent(Project)
// .poetryOptions(PoetryPyprojectOptionsWithoutDeps)
// .projectType(ProjectType)
// .projenCommand(java.lang.String)
// .projenCredentials(GithubCredentials)
// .projenrcJson(java.lang.Boolean)
// .projenrcJsonOptions(ProjenrcJsonOptions)
// .projenrcPythonOptions(ProjenrcOptions)
// .projenTokenSecret(java.lang.String)
// .pytest(java.lang.Boolean)
// .pytestOptions(PytestOptions)
// .pythonExec(java.lang.String)
// .readme(SampleReadmeProps)
// .renovatebot(java.lang.Boolean)
// .renovatebotOptions(RenovatebotOptions)
// .sample(java.lang.Boolean)
// .setupConfig(java.util.Map<java.lang.String, java.lang.Object>)
// .setuptools(java.lang.Boolean)
// .stale(java.lang.Boolean)
// .staleOptions(StaleOptions)
// .version(java.lang.String)
// .vscode(java.lang.Boolean)
// .commitGeneratedCode(java.lang.Boolean)
// .architecture(Architecture)
// .runtimeVersion(PythonVersion)
.build();
Properties
| Name | Type | Description |
|---|---|---|
authorEmail |
java.lang.String |
Author's e-mail. |
authorName |
java.lang.String |
Author's name. |
autoApproveOptions |
io.github.cdklabs.projen.github.AutoApproveOptions |
Enable and configure the 'auto approve' workflow. |
autoMerge |
java.lang.Boolean |
Enable automatic merging on GitHub. |
autoMergeOptions |
io.github.cdklabs.projen.github.AutoMergeOptions |
Configure options for automatic merging on GitHub. |
classifiers |
java.util.List |
A list of PyPI trove classifiers that describe the project. |
clobber |
java.lang.Boolean |
Add a clobber task which resets the repo to origin. |
commitGenerated |
java.lang.Boolean |
Whether to commit the managed files by default. |
deps |
java.util.List |
List of runtime dependencies for this project. Dependencies use the format: <module>@<semver>. |
description |
java.lang.String |
A short description of the package. |
devContainer |
java.lang.Boolean |
Add a VSCode development environment (used for GitHub Codespaces). |
devDeps |
java.util.List |
List of dev dependencies for this project. Dependencies use the format: <module>@<semver>. |
github |
java.lang.Boolean |
Enable GitHub integration. |
githubOptions |
io.github.cdklabs.projen.github.GitHubOptions |
Options for GitHub integration. |
gitIgnoreOptions |
io.github.cdklabs.projen.IgnoreFileOptions |
Configuration options for .gitignore file. |
gitOptions |
io.github.cdklabs.projen.GitOptions |
Configuration options for git. |
gitpod |
java.lang.Boolean |
Add a Gitpod development environment. |
homepage |
java.lang.String |
A URL to the website of the project. |
license |
java.lang.String |
License of this package as an SPDX identifier. |
logging |
io.github.cdklabs.projen.LoggerOptions |
Configure logging options such as verbosity. |
mergify |
java.lang.Boolean |
Whether mergify should be enabled on this repository or not. |
mergifyOptions |
io.github.cdklabs.projen.github.MergifyOptions |
Options for mergify. |
moduleName |
java.lang.String |
Name of the python package as used in imports and filenames. |
name |
java.lang.String |
This is the name of your project. |
outdir |
java.lang.String |
The root directory of the project. Relative to this directory, all files are synthesized. |
packageName |
java.lang.String |
Package name. |
parent |
io.github.cdklabs.projen.Project |
The parent project, if this project is part of a bigger project. |
poetryOptions |
io.github.cdklabs.projen.python.PoetryPyprojectOptionsWithoutDeps |
Additional options to set for poetry if using poetry. |
projectType |
io.github.cdklabs.projen.ProjectType |
Which type of project this is (library/app). |
projenCommand |
java.lang.String |
The shell command to use in order to run the projen CLI. |
projenCredentials |
io.github.cdklabs.projen.github.GithubCredentials |
Choose a method of providing GitHub API access for projen workflows. |
projenrcJson |
java.lang.Boolean |
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation. |
projenrcJsonOptions |
io.github.cdklabs.projen.ProjenrcJsonOptions |
Options for .projenrc.json. |
projenrcPythonOptions |
io.github.cdklabs.projen.python.ProjenrcOptions |
Options related to projenrc in python. |
projenTokenSecret |
java.lang.String |
The name of a secret which includes a GitHub Personal Access Token to be used by projen workflows. |
pytest |
java.lang.Boolean |
Include pytest tests. |
pytestOptions |
io.github.cdklabs.projen.python.PytestOptions |
pytest options. |
pythonExec |
java.lang.String |
Path to the python executable to use. |
readme |
io.github.cdklabs.projen.SampleReadmeProps |
The README setup. |
renovatebot |
java.lang.Boolean |
Use renovatebot to handle dependency upgrades. |
renovatebotOptions |
io.github.cdklabs.projen.RenovatebotOptions |
Options for renovatebot. |
sample |
java.lang.Boolean |
Include sample code and test if the relevant directories don't exist. |
setupConfig |
java.util.Map |
Additional fields to pass in the setup() function if using setuptools. |
setuptools |
java.lang.Boolean |
Use setuptools with a setup.py script for packaging and publishing. |
stale |
java.lang.Boolean |
Auto-close of stale issues and pull request. |
staleOptions |
io.github.cdklabs.projen.github.StaleOptions |
Auto-close stale issues and pull requests. |
version |
java.lang.String |
Version of the package. |
vscode |
java.lang.Boolean |
Enable VSCode integration. |
commitGeneratedCode |
java.lang.Boolean |
Whether to commit the code generated by the OpenAPI Generator. |
architecture |
Architecture |
The architecture to target for python handlers. |
runtimeVersion |
PythonVersion |
Runtime version to target for the handlers. |
authorEmailOptional
public java.lang.String getAuthorEmail();
- Type: java.lang.String
- Default: $GIT_USER_EMAIL
Author's e-mail.
authorNameOptional
public java.lang.String getAuthorName();
- Type: java.lang.String
- Default: $GIT_USER_NAME
Author's name.
autoApproveOptionsOptional
public AutoApproveOptions getAutoApproveOptions();
- Type: io.github.cdklabs.projen.github.AutoApproveOptions
- Default: auto approve is disabled
Enable and configure the 'auto approve' workflow.
autoMergeOptional
public java.lang.Boolean getAutoMerge();
- Type: java.lang.Boolean
- Default: true
Enable automatic merging on GitHub.
Has no effect if github.mergify
is set to false.
autoMergeOptionsOptional
public AutoMergeOptions getAutoMergeOptions();
- Type: io.github.cdklabs.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.
classifiersOptional
public java.util.List<java.lang.String> getClassifiers();
- Type: java.util.List
A list of PyPI trove classifiers that describe the project.
clobberOptional
public java.lang.Boolean getClobber();
- Type: java.lang.Boolean
- Default: true, but false for subprojects
Add a clobber task which resets the repo to origin.
commitGeneratedOptional
public java.lang.Boolean getCommitGenerated();
- Type: java.lang.Boolean
- Default: true
Whether to commit the managed files by default.
depsOptional
public java.util.List<java.lang.String> getDeps();
- Type: java.util.List
- Default: []
List of runtime dependencies for this project. Dependencies use the format: <module>@<semver>.
Additional dependencies can be added via project.addDependency().
descriptionOptional
public java.lang.String getDescription();
- Type: java.lang.String
A short description of the package.
devContainerOptional
public java.lang.Boolean getDevContainer();
- Type: java.lang.Boolean
- Default: false
Add a VSCode development environment (used for GitHub Codespaces).
devDepsOptional
public java.util.List<java.lang.String> getDevDeps();
- Type: java.util.List
- Default: []
List of dev dependencies for this project. Dependencies use the format: <module>@<semver>.
Additional dependencies can be added via project.addDevDependency().
githubOptional
public java.lang.Boolean getGithub();
- Type: java.lang.Boolean
- Default: true
Enable GitHub integration.
Enabled by default for root projects. Disabled for non-root projects.
githubOptionsOptional
public GitHubOptions getGithubOptions();
- Type: io.github.cdklabs.projen.github.GitHubOptions
- Default: see GitHubOptions
Options for GitHub integration.
gitIgnoreOptionsOptional
public IgnoreFileOptions getGitIgnoreOptions();
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptionsOptional
public GitOptions getGitOptions();
- Type: io.github.cdklabs.projen.GitOptions
Configuration options for git.
gitpodOptional
public java.lang.Boolean getGitpod();
- Type: java.lang.Boolean
- Default: false
Add a Gitpod development environment.
homepageOptional
public java.lang.String getHomepage();
- Type: java.lang.String
A URL to the website of the project.
licenseOptional
public java.lang.String getLicense();
- Type: java.lang.String
License of this package as an SPDX identifier.
loggingOptional
public LoggerOptions getLogging();
- Type: io.github.cdklabs.projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
~~mergify~~Optional
- Deprecated: use
githubOptions.mergifyinstead
public java.lang.Boolean getMergify();
- Type: java.lang.Boolean
- Default: true
Whether mergify should be enabled on this repository or not.
~~mergifyOptions~~Optional
- Deprecated: use
githubOptions.mergifyOptionsinstead
public MergifyOptions getMergifyOptions();
- Type: io.github.cdklabs.projen.github.MergifyOptions
- Default: default options
Options for mergify.
moduleNameOptional
public java.lang.String getModuleName();
- Type: java.lang.String
- Default: $PYTHON_MODULE_NAME
Name of the python package as used in imports and filenames.
Must only consist of alphanumeric characters and underscores.
nameOptional
public java.lang.String getName();
- Type: java.lang.String
- Default: $BASEDIR
This is the name of your project.
outdirOptional
public java.lang.String getOutdir();
- Type: java.lang.String
- Default: "."
The root directory of the project. Relative to this directory, all files are synthesized.
If this project has a parent, this directory is relative to the parent directory and it cannot be the same as the parent or any of it's other subprojects.
packageNameOptional
public java.lang.String getPackageName();
- Type: java.lang.String
Package name.
parentOptional
public Project getParent();
- Type: io.github.cdklabs.projen.Project
The parent project, if this project is part of a bigger project.
poetryOptionsOptional
public PoetryPyprojectOptionsWithoutDeps getPoetryOptions();
- Type: io.github.cdklabs.projen.python.PoetryPyprojectOptionsWithoutDeps
Additional options to set for poetry if using poetry.
~~projectType~~Optional
- Deprecated: no longer supported at the base project level
public ProjectType getProjectType();
- Type: io.github.cdklabs.projen.ProjectType
- Default: ProjectType.UNKNOWN
Which type of project this is (library/app).
projenCommandOptional
public java.lang.String getProjenCommand();
- Type: java.lang.String
- Default: "npx projen"
The shell command to use in order to run the projen CLI.
Can be used to customize in special environments.
projenCredentialsOptional
public GithubCredentials getProjenCredentials();
- Type: io.github.cdklabs.projen.github.GithubCredentials
- Default: use a personal access token named PROJEN_GITHUB_TOKEN
Choose a method of providing GitHub API access for projen workflows.
projenrcJsonOptional
public java.lang.Boolean getProjenrcJson();
- Type: java.lang.Boolean
- Default: false
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation.
projenrcJsonOptionsOptional
public ProjenrcJsonOptions getProjenrcJsonOptions();
- Type: io.github.cdklabs.projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
projenrcPythonOptionsOptional
public ProjenrcOptions getProjenrcPythonOptions();
- Type: io.github.cdklabs.projen.python.ProjenrcOptions
- Default: default options
Options related to projenrc in python.
~~projenTokenSecret~~Optional
- Deprecated: use
projenCredentials
public java.lang.String getProjenTokenSecret();
- Type: java.lang.String
- Default: "PROJEN_GITHUB_TOKEN"
The name of a secret which includes a GitHub Personal Access Token to be used by projen workflows.
This token needs to have the repo, workflows
and packages scope.
pytestOptional
public java.lang.Boolean getPytest();
- Type: java.lang.Boolean
- Default: true
Include pytest tests.
pytestOptionsOptional
public PytestOptions getPytestOptions();
- Type: io.github.cdklabs.projen.python.PytestOptions
- Default: defaults
pytest options.
pythonExecOptional
public java.lang.String getPythonExec();
- Type: java.lang.String
- Default: "python"
Path to the python executable to use.
readmeOptional
public SampleReadmeProps getReadme();
- Type: io.github.cdklabs.projen.SampleReadmeProps
- Default: { filename: 'README.md', contents: '# replace this' }
The README setup.
renovatebotOptional
public java.lang.Boolean getRenovatebot();
- Type: java.lang.Boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptionsOptional
public RenovatebotOptions getRenovatebotOptions();
- Type: io.github.cdklabs.projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
sampleOptional
public java.lang.Boolean getSample();
- Type: java.lang.Boolean
- Default: true
Include sample code and test if the relevant directories don't exist.
setupConfigOptional
public java.util.Map<java.lang.String, java.lang.Object> getSetupConfig();
- Type: java.util.Map
Additional fields to pass in the setup() function if using setuptools.
setuptoolsOptional
public java.lang.Boolean getSetuptools();
- Type: java.lang.Boolean
- Default: true, unless poetry is true, then false
Use setuptools with a setup.py script for packaging and publishing.
staleOptional
public java.lang.Boolean getStale();
- Type: java.lang.Boolean
- Default: false
Auto-close of stale issues and pull request.
See staleOptions for options.
staleOptionsOptional
public StaleOptions getStaleOptions();
- Type: io.github.cdklabs.projen.github.StaleOptions
- Default: see defaults in
StaleOptions
Auto-close stale issues and pull requests.
To disable set stale to false.
versionOptional
public java.lang.String getVersion();
- Type: java.lang.String
- Default: "0.1.0"
Version of the package.
vscodeOptional
public java.lang.Boolean getVscode();
- Type: java.lang.Boolean
- Default: true
Enable VSCode integration.
Enabled by default for root projects. Disabled for non-root projects.
commitGeneratedCodeOptional
public java.lang.Boolean getCommitGeneratedCode();
- Type: java.lang.Boolean
- Default: false
Whether to commit the code generated by the OpenAPI Generator.
architectureOptional
public Architecture getArchitecture();
- Type: Architecture
- Default: Architecture.X86_64
The architecture to target for python handlers.
This determines the --platform argument passed to the pip install command used to build the lambda distributable.
https://docs.aws.amazon.com/lambda/latest/dg/python-package.html#python-package-native-libraries
runtimeVersionOptional
public PythonVersion getRuntimeVersion();
- Type: PythonVersion
- Default: PythonVersion.PYTHON_3_13
Runtime version to target for the handlers.
GeneratedPythonInfrastructureOptions
Options for configuring a generated python infrastructure project.
Initializer
import software.aws.pdk.type_safe_api.GeneratedPythonInfrastructureOptions;
GeneratedPythonInfrastructureOptions.builder()
// .authorEmail(java.lang.String)
// .authorName(java.lang.String)
// .autoApproveOptions(AutoApproveOptions)
// .autoMerge(java.lang.Boolean)
// .autoMergeOptions(AutoMergeOptions)
// .classifiers(java.util.List<java.lang.String>)
// .clobber(java.lang.Boolean)
// .commitGenerated(java.lang.Boolean)
// .deps(java.util.List<java.lang.String>)
// .description(java.lang.String)
// .devContainer(java.lang.Boolean)
// .devDeps(java.util.List<java.lang.String>)
// .github(java.lang.Boolean)
// .githubOptions(GitHubOptions)
// .gitIgnoreOptions(IgnoreFileOptions)
// .gitOptions(GitOptions)
// .gitpod(java.lang.Boolean)
// .homepage(java.lang.String)
// .license(java.lang.String)
// .logging(LoggerOptions)
// .mergify(java.lang.Boolean)
// .mergifyOptions(MergifyOptions)
// .moduleName(java.lang.String)
// .name(java.lang.String)
// .outdir(java.lang.String)
// .packageName(java.lang.String)
// .parent(Project)
// .poetryOptions(PoetryPyprojectOptionsWithoutDeps)
// .projectType(ProjectType)
// .projenCommand(java.lang.String)
// .projenCredentials(GithubCredentials)
// .projenrcJson(java.lang.Boolean)
// .projenrcJsonOptions(ProjenrcJsonOptions)
// .projenrcPythonOptions(ProjenrcOptions)
// .projenTokenSecret(java.lang.String)
// .pytest(java.lang.Boolean)
// .pytestOptions(PytestOptions)
// .pythonExec(java.lang.String)
// .readme(SampleReadmeProps)
// .renovatebot(java.lang.Boolean)
// .renovatebotOptions(RenovatebotOptions)
// .sample(java.lang.Boolean)
// .setupConfig(java.util.Map<java.lang.String, java.lang.Object>)
// .setuptools(java.lang.Boolean)
// .stale(java.lang.Boolean)
// .staleOptions(StaleOptions)
// .version(java.lang.String)
// .vscode(java.lang.Boolean)
// .commitGeneratedCode(java.lang.Boolean)
// .mockDataOptions(MockResponseDataGenerationOptions)
.build();
Properties
| Name | Type | Description |
|---|---|---|
authorEmail |
java.lang.String |
Author's e-mail. |
authorName |
java.lang.String |
Author's name. |
autoApproveOptions |
io.github.cdklabs.projen.github.AutoApproveOptions |
Enable and configure the 'auto approve' workflow. |
autoMerge |
java.lang.Boolean |
Enable automatic merging on GitHub. |
autoMergeOptions |
io.github.cdklabs.projen.github.AutoMergeOptions |
Configure options for automatic merging on GitHub. |
classifiers |
java.util.List |
A list of PyPI trove classifiers that describe the project. |
clobber |
java.lang.Boolean |
Add a clobber task which resets the repo to origin. |
commitGenerated |
java.lang.Boolean |
Whether to commit the managed files by default. |
deps |
java.util.List |
List of runtime dependencies for this project. Dependencies use the format: <module>@<semver>. |
description |
java.lang.String |
A short description of the package. |
devContainer |
java.lang.Boolean |
Add a VSCode development environment (used for GitHub Codespaces). |
devDeps |
java.util.List |
List of dev dependencies for this project. Dependencies use the format: <module>@<semver>. |
github |
java.lang.Boolean |
Enable GitHub integration. |
githubOptions |
io.github.cdklabs.projen.github.GitHubOptions |
Options for GitHub integration. |
gitIgnoreOptions |
io.github.cdklabs.projen.IgnoreFileOptions |
Configuration options for .gitignore file. |
gitOptions |
io.github.cdklabs.projen.GitOptions |
Configuration options for git. |
gitpod |
java.lang.Boolean |
Add a Gitpod development environment. |
homepage |
java.lang.String |
A URL to the website of the project. |
license |
java.lang.String |
License of this package as an SPDX identifier. |
logging |
io.github.cdklabs.projen.LoggerOptions |
Configure logging options such as verbosity. |
mergify |
java.lang.Boolean |
Whether mergify should be enabled on this repository or not. |
mergifyOptions |
io.github.cdklabs.projen.github.MergifyOptions |
Options for mergify. |
moduleName |
java.lang.String |
Name of the python package as used in imports and filenames. |
name |
java.lang.String |
This is the name of your project. |
outdir |
java.lang.String |
The root directory of the project. Relative to this directory, all files are synthesized. |
packageName |
java.lang.String |
Package name. |
parent |
io.github.cdklabs.projen.Project |
The parent project, if this project is part of a bigger project. |
poetryOptions |
io.github.cdklabs.projen.python.PoetryPyprojectOptionsWithoutDeps |
Additional options to set for poetry if using poetry. |
projectType |
io.github.cdklabs.projen.ProjectType |
Which type of project this is (library/app). |
projenCommand |
java.lang.String |
The shell command to use in order to run the projen CLI. |
projenCredentials |
io.github.cdklabs.projen.github.GithubCredentials |
Choose a method of providing GitHub API access for projen workflows. |
projenrcJson |
java.lang.Boolean |
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation. |
projenrcJsonOptions |
io.github.cdklabs.projen.ProjenrcJsonOptions |
Options for .projenrc.json. |
projenrcPythonOptions |
io.github.cdklabs.projen.python.ProjenrcOptions |
Options related to projenrc in python. |
projenTokenSecret |
java.lang.String |
The name of a secret which includes a GitHub Personal Access Token to be used by projen workflows. |
pytest |
java.lang.Boolean |
Include pytest tests. |
pytestOptions |
io.github.cdklabs.projen.python.PytestOptions |
pytest options. |
pythonExec |
java.lang.String |
Path to the python executable to use. |
readme |
io.github.cdklabs.projen.SampleReadmeProps |
The README setup. |
renovatebot |
java.lang.Boolean |
Use renovatebot to handle dependency upgrades. |
renovatebotOptions |
io.github.cdklabs.projen.RenovatebotOptions |
Options for renovatebot. |
sample |
java.lang.Boolean |
Include sample code and test if the relevant directories don't exist. |
setupConfig |
java.util.Map |
Additional fields to pass in the setup() function if using setuptools. |
setuptools |
java.lang.Boolean |
Use setuptools with a setup.py script for packaging and publishing. |
stale |
java.lang.Boolean |
Auto-close of stale issues and pull request. |
staleOptions |
io.github.cdklabs.projen.github.StaleOptions |
Auto-close stale issues and pull requests. |
version |
java.lang.String |
Version of the package. |
vscode |
java.lang.Boolean |
Enable VSCode integration. |
commitGeneratedCode |
java.lang.Boolean |
Whether to commit the code generated by the OpenAPI Generator. |
mockDataOptions |
MockResponseDataGenerationOptions |
Options for the generated mock response data. |
authorEmailOptional
public java.lang.String getAuthorEmail();
- Type: java.lang.String
- Default: $GIT_USER_EMAIL
Author's e-mail.
authorNameOptional
public java.lang.String getAuthorName();
- Type: java.lang.String
- Default: $GIT_USER_NAME
Author's name.
autoApproveOptionsOptional
public AutoApproveOptions getAutoApproveOptions();
- Type: io.github.cdklabs.projen.github.AutoApproveOptions
- Default: auto approve is disabled
Enable and configure the 'auto approve' workflow.
autoMergeOptional
public java.lang.Boolean getAutoMerge();
- Type: java.lang.Boolean
- Default: true
Enable automatic merging on GitHub.
Has no effect if github.mergify
is set to false.
autoMergeOptionsOptional
public AutoMergeOptions getAutoMergeOptions();
- Type: io.github.cdklabs.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.
classifiersOptional
public java.util.List<java.lang.String> getClassifiers();
- Type: java.util.List
A list of PyPI trove classifiers that describe the project.
clobberOptional
public java.lang.Boolean getClobber();
- Type: java.lang.Boolean
- Default: true, but false for subprojects
Add a clobber task which resets the repo to origin.
commitGeneratedOptional
public java.lang.Boolean getCommitGenerated();
- Type: java.lang.Boolean
- Default: true
Whether to commit the managed files by default.
depsOptional
public java.util.List<java.lang.String> getDeps();
- Type: java.util.List
- Default: []
List of runtime dependencies for this project. Dependencies use the format: <module>@<semver>.
Additional dependencies can be added via project.addDependency().
descriptionOptional
public java.lang.String getDescription();
- Type: java.lang.String
A short description of the package.
devContainerOptional
public java.lang.Boolean getDevContainer();
- Type: java.lang.Boolean
- Default: false
Add a VSCode development environment (used for GitHub Codespaces).
devDepsOptional
public java.util.List<java.lang.String> getDevDeps();
- Type: java.util.List
- Default: []
List of dev dependencies for this project. Dependencies use the format: <module>@<semver>.
Additional dependencies can be added via project.addDevDependency().
githubOptional
public java.lang.Boolean getGithub();
- Type: java.lang.Boolean
- Default: true
Enable GitHub integration.
Enabled by default for root projects. Disabled for non-root projects.
githubOptionsOptional
public GitHubOptions getGithubOptions();
- Type: io.github.cdklabs.projen.github.GitHubOptions
- Default: see GitHubOptions
Options for GitHub integration.
gitIgnoreOptionsOptional
public IgnoreFileOptions getGitIgnoreOptions();
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptionsOptional
public GitOptions getGitOptions();
- Type: io.github.cdklabs.projen.GitOptions
Configuration options for git.
gitpodOptional
public java.lang.Boolean getGitpod();
- Type: java.lang.Boolean
- Default: false
Add a Gitpod development environment.
homepageOptional
public java.lang.String getHomepage();
- Type: java.lang.String
A URL to the website of the project.
licenseOptional
public java.lang.String getLicense();
- Type: java.lang.String
License of this package as an SPDX identifier.
loggingOptional
public LoggerOptions getLogging();
- Type: io.github.cdklabs.projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
~~mergify~~Optional
- Deprecated: use
githubOptions.mergifyinstead
public java.lang.Boolean getMergify();
- Type: java.lang.Boolean
- Default: true
Whether mergify should be enabled on this repository or not.
~~mergifyOptions~~Optional
- Deprecated: use
githubOptions.mergifyOptionsinstead
public MergifyOptions getMergifyOptions();
- Type: io.github.cdklabs.projen.github.MergifyOptions
- Default: default options
Options for mergify.
moduleNameOptional
public java.lang.String getModuleName();
- Type: java.lang.String
- Default: $PYTHON_MODULE_NAME
Name of the python package as used in imports and filenames.
Must only consist of alphanumeric characters and underscores.
nameOptional
public java.lang.String getName();
- Type: java.lang.String
- Default: $BASEDIR
This is the name of your project.
outdirOptional
public java.lang.String getOutdir();
- Type: java.lang.String
- Default: "."
The root directory of the project. Relative to this directory, all files are synthesized.
If this project has a parent, this directory is relative to the parent directory and it cannot be the same as the parent or any of it's other subprojects.
packageNameOptional
public java.lang.String getPackageName();
- Type: java.lang.String
Package name.
parentOptional
public Project getParent();
- Type: io.github.cdklabs.projen.Project
The parent project, if this project is part of a bigger project.
poetryOptionsOptional
public PoetryPyprojectOptionsWithoutDeps getPoetryOptions();
- Type: io.github.cdklabs.projen.python.PoetryPyprojectOptionsWithoutDeps
Additional options to set for poetry if using poetry.
~~projectType~~Optional
- Deprecated: no longer supported at the base project level
public ProjectType getProjectType();
- Type: io.github.cdklabs.projen.ProjectType
- Default: ProjectType.UNKNOWN
Which type of project this is (library/app).
projenCommandOptional
public java.lang.String getProjenCommand();
- Type: java.lang.String
- Default: "npx projen"
The shell command to use in order to run the projen CLI.
Can be used to customize in special environments.
projenCredentialsOptional
public GithubCredentials getProjenCredentials();
- Type: io.github.cdklabs.projen.github.GithubCredentials
- Default: use a personal access token named PROJEN_GITHUB_TOKEN
Choose a method of providing GitHub API access for projen workflows.
projenrcJsonOptional
public java.lang.Boolean getProjenrcJson();
- Type: java.lang.Boolean
- Default: false
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation.
projenrcJsonOptionsOptional
public ProjenrcJsonOptions getProjenrcJsonOptions();
- Type: io.github.cdklabs.projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
projenrcPythonOptionsOptional
public ProjenrcOptions getProjenrcPythonOptions();
- Type: io.github.cdklabs.projen.python.ProjenrcOptions
- Default: default options
Options related to projenrc in python.
~~projenTokenSecret~~Optional
- Deprecated: use
projenCredentials
public java.lang.String getProjenTokenSecret();
- Type: java.lang.String
- Default: "PROJEN_GITHUB_TOKEN"
The name of a secret which includes a GitHub Personal Access Token to be used by projen workflows.
This token needs to have the repo, workflows
and packages scope.
pytestOptional
public java.lang.Boolean getPytest();
- Type: java.lang.Boolean
- Default: true
Include pytest tests.
pytestOptionsOptional
public PytestOptions getPytestOptions();
- Type: io.github.cdklabs.projen.python.PytestOptions
- Default: defaults
pytest options.
pythonExecOptional
public java.lang.String getPythonExec();
- Type: java.lang.String
- Default: "python"
Path to the python executable to use.
readmeOptional
public SampleReadmeProps getReadme();
- Type: io.github.cdklabs.projen.SampleReadmeProps
- Default: { filename: 'README.md', contents: '# replace this' }
The README setup.
renovatebotOptional
public java.lang.Boolean getRenovatebot();
- Type: java.lang.Boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptionsOptional
public RenovatebotOptions getRenovatebotOptions();
- Type: io.github.cdklabs.projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
sampleOptional
public java.lang.Boolean getSample();
- Type: java.lang.Boolean
- Default: true
Include sample code and test if the relevant directories don't exist.
setupConfigOptional
public java.util.Map<java.lang.String, java.lang.Object> getSetupConfig();
- Type: java.util.Map
Additional fields to pass in the setup() function if using setuptools.
setuptoolsOptional
public java.lang.Boolean getSetuptools();
- Type: java.lang.Boolean
- Default: true, unless poetry is true, then false
Use setuptools with a setup.py script for packaging and publishing.
staleOptional
public java.lang.Boolean getStale();
- Type: java.lang.Boolean
- Default: false
Auto-close of stale issues and pull request.
See staleOptions for options.
staleOptionsOptional
public StaleOptions getStaleOptions();
- Type: io.github.cdklabs.projen.github.StaleOptions
- Default: see defaults in
StaleOptions
Auto-close stale issues and pull requests.
To disable set stale to false.
versionOptional
public java.lang.String getVersion();
- Type: java.lang.String
- Default: "0.1.0"
Version of the package.
vscodeOptional
public java.lang.Boolean getVscode();
- Type: java.lang.Boolean
- Default: true
Enable VSCode integration.
Enabled by default for root projects. Disabled for non-root projects.
commitGeneratedCodeOptional
public java.lang.Boolean getCommitGeneratedCode();
- Type: java.lang.Boolean
- Default: false
Whether to commit the code generated by the OpenAPI Generator.
mockDataOptionsOptional
public MockResponseDataGenerationOptions getMockDataOptions();
Options for the generated mock response data.
GeneratedPythonRuntimeOptions
Options for configuring a generated python runtime project.
Initializer
import software.aws.pdk.type_safe_api.GeneratedPythonRuntimeOptions;
GeneratedPythonRuntimeOptions.builder()
// .authorEmail(java.lang.String)
// .authorName(java.lang.String)
// .autoApproveOptions(AutoApproveOptions)
// .autoMerge(java.lang.Boolean)
// .autoMergeOptions(AutoMergeOptions)
// .classifiers(java.util.List<java.lang.String>)
// .clobber(java.lang.Boolean)
// .commitGenerated(java.lang.Boolean)
// .deps(java.util.List<java.lang.String>)
// .description(java.lang.String)
// .devContainer(java.lang.Boolean)
// .devDeps(java.util.List<java.lang.String>)
// .github(java.lang.Boolean)
// .githubOptions(GitHubOptions)
// .gitIgnoreOptions(IgnoreFileOptions)
// .gitOptions(GitOptions)
// .gitpod(java.lang.Boolean)
// .homepage(java.lang.String)
// .license(java.lang.String)
// .logging(LoggerOptions)
// .mergify(java.lang.Boolean)
// .mergifyOptions(MergifyOptions)
// .moduleName(java.lang.String)
// .name(java.lang.String)
// .outdir(java.lang.String)
// .packageName(java.lang.String)
// .parent(Project)
// .poetryOptions(PoetryPyprojectOptionsWithoutDeps)
// .projectType(ProjectType)
// .projenCommand(java.lang.String)
// .projenCredentials(GithubCredentials)
// .projenrcJson(java.lang.Boolean)
// .projenrcJsonOptions(ProjenrcJsonOptions)
// .projenrcPythonOptions(ProjenrcOptions)
// .projenTokenSecret(java.lang.String)
// .pytest(java.lang.Boolean)
// .pytestOptions(PytestOptions)
// .pythonExec(java.lang.String)
// .readme(SampleReadmeProps)
// .renovatebot(java.lang.Boolean)
// .renovatebotOptions(RenovatebotOptions)
// .sample(java.lang.Boolean)
// .setupConfig(java.util.Map<java.lang.String, java.lang.Object>)
// .setuptools(java.lang.Boolean)
// .stale(java.lang.Boolean)
// .staleOptions(StaleOptions)
// .version(java.lang.String)
// .vscode(java.lang.Boolean)
// .commitGeneratedCode(java.lang.Boolean)
.build();
Properties
| Name | Type | Description |
|---|---|---|
authorEmail |
java.lang.String |
Author's e-mail. |
authorName |
java.lang.String |
Author's name. |
autoApproveOptions |
io.github.cdklabs.projen.github.AutoApproveOptions |
Enable and configure the 'auto approve' workflow. |
autoMerge |
java.lang.Boolean |
Enable automatic merging on GitHub. |
autoMergeOptions |
io.github.cdklabs.projen.github.AutoMergeOptions |
Configure options for automatic merging on GitHub. |
classifiers |
java.util.List |
A list of PyPI trove classifiers that describe the project. |
clobber |
java.lang.Boolean |
Add a clobber task which resets the repo to origin. |
commitGenerated |
java.lang.Boolean |
Whether to commit the managed files by default. |
deps |
java.util.List |
List of runtime dependencies for this project. Dependencies use the format: <module>@<semver>. |
description |
java.lang.String |
A short description of the package. |
devContainer |
java.lang.Boolean |
Add a VSCode development environment (used for GitHub Codespaces). |
devDeps |
java.util.List |
List of dev dependencies for this project. Dependencies use the format: <module>@<semver>. |
github |
java.lang.Boolean |
Enable GitHub integration. |
githubOptions |
io.github.cdklabs.projen.github.GitHubOptions |
Options for GitHub integration. |
gitIgnoreOptions |
io.github.cdklabs.projen.IgnoreFileOptions |
Configuration options for .gitignore file. |
gitOptions |
io.github.cdklabs.projen.GitOptions |
Configuration options for git. |
gitpod |
java.lang.Boolean |
Add a Gitpod development environment. |
homepage |
java.lang.String |
A URL to the website of the project. |
license |
java.lang.String |
License of this package as an SPDX identifier. |
logging |
io.github.cdklabs.projen.LoggerOptions |
Configure logging options such as verbosity. |
mergify |
java.lang.Boolean |
Whether mergify should be enabled on this repository or not. |
mergifyOptions |
io.github.cdklabs.projen.github.MergifyOptions |
Options for mergify. |
moduleName |
java.lang.String |
Name of the python package as used in imports and filenames. |
name |
java.lang.String |
This is the name of your project. |
outdir |
java.lang.String |
The root directory of the project. Relative to this directory, all files are synthesized. |
packageName |
java.lang.String |
Package name. |
parent |
io.github.cdklabs.projen.Project |
The parent project, if this project is part of a bigger project. |
poetryOptions |
io.github.cdklabs.projen.python.PoetryPyprojectOptionsWithoutDeps |
Additional options to set for poetry if using poetry. |
projectType |
io.github.cdklabs.projen.ProjectType |
Which type of project this is (library/app). |
projenCommand |
java.lang.String |
The shell command to use in order to run the projen CLI. |
projenCredentials |
io.github.cdklabs.projen.github.GithubCredentials |
Choose a method of providing GitHub API access for projen workflows. |
projenrcJson |
java.lang.Boolean |
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation. |
projenrcJsonOptions |
io.github.cdklabs.projen.ProjenrcJsonOptions |
Options for .projenrc.json. |
projenrcPythonOptions |
io.github.cdklabs.projen.python.ProjenrcOptions |
Options related to projenrc in python. |
projenTokenSecret |
java.lang.String |
The name of a secret which includes a GitHub Personal Access Token to be used by projen workflows. |
pytest |
java.lang.Boolean |
Include pytest tests. |
pytestOptions |
io.github.cdklabs.projen.python.PytestOptions |
pytest options. |
pythonExec |
java.lang.String |
Path to the python executable to use. |
readme |
io.github.cdklabs.projen.SampleReadmeProps |
The README setup. |
renovatebot |
java.lang.Boolean |
Use renovatebot to handle dependency upgrades. |
renovatebotOptions |
io.github.cdklabs.projen.RenovatebotOptions |
Options for renovatebot. |
sample |
java.lang.Boolean |
Include sample code and test if the relevant directories don't exist. |
setupConfig |
java.util.Map |
Additional fields to pass in the setup() function if using setuptools. |
setuptools |
java.lang.Boolean |
Use setuptools with a setup.py script for packaging and publishing. |
stale |
java.lang.Boolean |
Auto-close of stale issues and pull request. |
staleOptions |
io.github.cdklabs.projen.github.StaleOptions |
Auto-close stale issues and pull requests. |
version |
java.lang.String |
Version of the package. |
vscode |
java.lang.Boolean |
Enable VSCode integration. |
commitGeneratedCode |
java.lang.Boolean |
Whether to commit the code generated by the OpenAPI Generator. |
authorEmailOptional
public java.lang.String getAuthorEmail();
- Type: java.lang.String
- Default: $GIT_USER_EMAIL
Author's e-mail.
authorNameOptional
public java.lang.String getAuthorName();
- Type: java.lang.String
- Default: $GIT_USER_NAME
Author's name.
autoApproveOptionsOptional
public AutoApproveOptions getAutoApproveOptions();
- Type: io.github.cdklabs.projen.github.AutoApproveOptions
- Default: auto approve is disabled
Enable and configure the 'auto approve' workflow.
autoMergeOptional
public java.lang.Boolean getAutoMerge();
- Type: java.lang.Boolean
- Default: true
Enable automatic merging on GitHub.
Has no effect if github.mergify
is set to false.
autoMergeOptionsOptional
public AutoMergeOptions getAutoMergeOptions();
- Type: io.github.cdklabs.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.
classifiersOptional
public java.util.List<java.lang.String> getClassifiers();
- Type: java.util.List
A list of PyPI trove classifiers that describe the project.
clobberOptional
public java.lang.Boolean getClobber();
- Type: java.lang.Boolean
- Default: true, but false for subprojects
Add a clobber task which resets the repo to origin.
commitGeneratedOptional
public java.lang.Boolean getCommitGenerated();
- Type: java.lang.Boolean
- Default: true
Whether to commit the managed files by default.
depsOptional
public java.util.List<java.lang.String> getDeps();
- Type: java.util.List
- Default: []
List of runtime dependencies for this project. Dependencies use the format: <module>@<semver>.
Additional dependencies can be added via project.addDependency().
descriptionOptional
public java.lang.String getDescription();
- Type: java.lang.String
A short description of the package.
devContainerOptional
public java.lang.Boolean getDevContainer();
- Type: java.lang.Boolean
- Default: false
Add a VSCode development environment (used for GitHub Codespaces).
devDepsOptional
public java.util.List<java.lang.String> getDevDeps();
- Type: java.util.List
- Default: []
List of dev dependencies for this project. Dependencies use the format: <module>@<semver>.
Additional dependencies can be added via project.addDevDependency().
githubOptional
public java.lang.Boolean getGithub();
- Type: java.lang.Boolean
- Default: true
Enable GitHub integration.
Enabled by default for root projects. Disabled for non-root projects.
githubOptionsOptional
public GitHubOptions getGithubOptions();
- Type: io.github.cdklabs.projen.github.GitHubOptions
- Default: see GitHubOptions
Options for GitHub integration.
gitIgnoreOptionsOptional
public IgnoreFileOptions getGitIgnoreOptions();
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptionsOptional
public GitOptions getGitOptions();
- Type: io.github.cdklabs.projen.GitOptions
Configuration options for git.
gitpodOptional
public java.lang.Boolean getGitpod();
- Type: java.lang.Boolean
- Default: false
Add a Gitpod development environment.
homepageOptional
public java.lang.String getHomepage();
- Type: java.lang.String
A URL to the website of the project.
licenseOptional
public java.lang.String getLicense();
- Type: java.lang.String
License of this package as an SPDX identifier.
loggingOptional
public LoggerOptions getLogging();
- Type: io.github.cdklabs.projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
~~mergify~~Optional
- Deprecated: use
githubOptions.mergifyinstead
public java.lang.Boolean getMergify();
- Type: java.lang.Boolean
- Default: true
Whether mergify should be enabled on this repository or not.
~~mergifyOptions~~Optional
- Deprecated: use
githubOptions.mergifyOptionsinstead
public MergifyOptions getMergifyOptions();
- Type: io.github.cdklabs.projen.github.MergifyOptions
- Default: default options
Options for mergify.
moduleNameOptional
public java.lang.String getModuleName();
- Type: java.lang.String
- Default: $PYTHON_MODULE_NAME
Name of the python package as used in imports and filenames.
Must only consist of alphanumeric characters and underscores.
nameOptional
public java.lang.String getName();
- Type: java.lang.String
- Default: $BASEDIR
This is the name of your project.
outdirOptional
public java.lang.String getOutdir();
- Type: java.lang.String
- Default: "."
The root directory of the project. Relative to this directory, all files are synthesized.
If this project has a parent, this directory is relative to the parent directory and it cannot be the same as the parent or any of it's other subprojects.
packageNameOptional
public java.lang.String getPackageName();
- Type: java.lang.String
Package name.
parentOptional
public Project getParent();
- Type: io.github.cdklabs.projen.Project
The parent project, if this project is part of a bigger project.
poetryOptionsOptional
public PoetryPyprojectOptionsWithoutDeps getPoetryOptions();
- Type: io.github.cdklabs.projen.python.PoetryPyprojectOptionsWithoutDeps
Additional options to set for poetry if using poetry.
~~projectType~~Optional
- Deprecated: no longer supported at the base project level
public ProjectType getProjectType();
- Type: io.github.cdklabs.projen.ProjectType
- Default: ProjectType.UNKNOWN
Which type of project this is (library/app).
projenCommandOptional
public java.lang.String getProjenCommand();
- Type: java.lang.String
- Default: "npx projen"
The shell command to use in order to run the projen CLI.
Can be used to customize in special environments.
projenCredentialsOptional
public GithubCredentials getProjenCredentials();
- Type: io.github.cdklabs.projen.github.GithubCredentials
- Default: use a personal access token named PROJEN_GITHUB_TOKEN
Choose a method of providing GitHub API access for projen workflows.
projenrcJsonOptional
public java.lang.Boolean getProjenrcJson();
- Type: java.lang.Boolean
- Default: false
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation.
projenrcJsonOptionsOptional
public ProjenrcJsonOptions getProjenrcJsonOptions();
- Type: io.github.cdklabs.projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
projenrcPythonOptionsOptional
public ProjenrcOptions getProjenrcPythonOptions();
- Type: io.github.cdklabs.projen.python.ProjenrcOptions
- Default: default options
Options related to projenrc in python.
~~projenTokenSecret~~Optional
- Deprecated: use
projenCredentials
public java.lang.String getProjenTokenSecret();
- Type: java.lang.String
- Default: "PROJEN_GITHUB_TOKEN"
The name of a secret which includes a GitHub Personal Access Token to be used by projen workflows.
This token needs to have the repo, workflows
and packages scope.
pytestOptional
public java.lang.Boolean getPytest();
- Type: java.lang.Boolean
- Default: true
Include pytest tests.
pytestOptionsOptional
public PytestOptions getPytestOptions();
- Type: io.github.cdklabs.projen.python.PytestOptions
- Default: defaults
pytest options.
pythonExecOptional
public java.lang.String getPythonExec();
- Type: java.lang.String
- Default: "python"
Path to the python executable to use.
readmeOptional
public SampleReadmeProps getReadme();
- Type: io.github.cdklabs.projen.SampleReadmeProps
- Default: { filename: 'README.md', contents: '# replace this' }
The README setup.
renovatebotOptional
public java.lang.Boolean getRenovatebot();
- Type: java.lang.Boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptionsOptional
public RenovatebotOptions getRenovatebotOptions();
- Type: io.github.cdklabs.projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
sampleOptional
public java.lang.Boolean getSample();
- Type: java.lang.Boolean
- Default: true
Include sample code and test if the relevant directories don't exist.
setupConfigOptional
public java.util.Map<java.lang.String, java.lang.Object> getSetupConfig();
- Type: java.util.Map
Additional fields to pass in the setup() function if using setuptools.
setuptoolsOptional
public java.lang.Boolean getSetuptools();
- Type: java.lang.Boolean
- Default: true, unless poetry is true, then false
Use setuptools with a setup.py script for packaging and publishing.
staleOptional
public java.lang.Boolean getStale();
- Type: java.lang.Boolean
- Default: false
Auto-close of stale issues and pull request.
See staleOptions for options.
staleOptionsOptional
public StaleOptions getStaleOptions();
- Type: io.github.cdklabs.projen.github.StaleOptions
- Default: see defaults in
StaleOptions
Auto-close stale issues and pull requests.
To disable set stale to false.
versionOptional
public java.lang.String getVersion();
- Type: java.lang.String
- Default: "0.1.0"
Version of the package.
vscodeOptional
public java.lang.Boolean getVscode();
- Type: java.lang.Boolean
- Default: true
Enable VSCode integration.
Enabled by default for root projects. Disabled for non-root projects.
commitGeneratedCodeOptional
public java.lang.Boolean getCommitGeneratedCode();
- Type: java.lang.Boolean
- Default: false
Whether to commit the code generated by the OpenAPI Generator.
GeneratedRuntimeCodeOptions
Options for generated runtimes.
Initializer
import software.aws.pdk.type_safe_api.GeneratedRuntimeCodeOptions;
GeneratedRuntimeCodeOptions.builder()
// .java(GeneratedJavaRuntimeOptions)
// .python(GeneratedPythonRuntimeOptions)
// .typescript(GeneratedTypeScriptRuntimeOptions)
.build();
Properties
| Name | Type | Description |
|---|---|---|
java |
GeneratedJavaRuntimeOptions |
Options for a generated java project. |
python |
GeneratedPythonRuntimeOptions |
Options for a generated python project. |
typescript |
GeneratedTypeScriptRuntimeOptions |
Options for a generated typescript project. |
javaOptional
public GeneratedJavaRuntimeOptions getJava();
Options for a generated java project.
These override the default inferred options.
pythonOptional
public GeneratedPythonRuntimeOptions getPython();
Options for a generated python project.
These override the default inferred options.
typescriptOptional
public GeneratedTypeScriptRuntimeOptions getTypescript();
Options for a generated typescript project.
These override the default inferred options.
GeneratedTypeScriptHandlersOptions
Options for configuring a generated typescript handlers project.
Initializer
import software.aws.pdk.type_safe_api.GeneratedTypeScriptHandlersOptions;
GeneratedTypeScriptHandlersOptions.builder()
// .allowLibraryDependencies(java.lang.Boolean)
// .artifactsDirectory(java.lang.String)
// .authorEmail(java.lang.String)
// .authorName(java.lang.String)
// .authorOrganization(java.lang.Boolean)
// .authorUrl(java.lang.String)
// .autoApproveOptions(AutoApproveOptions)
// .autoApproveUpgrades(java.lang.Boolean)
// .autoDetectBin(java.lang.Boolean)
// .autoMerge(java.lang.Boolean)
// .autoMergeOptions(AutoMergeOptions)
// .bin(java.util.Map<java.lang.String, java.lang.String>)
// .bugsEmail(java.lang.String)
// .bugsUrl(java.lang.String)
// .buildWorkflow(java.lang.Boolean)
// .buildWorkflowOptions(BuildWorkflowOptions)
// .buildWorkflowTriggers(Triggers)
// .bundledDeps(java.util.List<java.lang.String>)
// .bundlerOptions(BundlerOptions)
// .checkLicenses(LicenseCheckerOptions)
// .clobber(java.lang.Boolean)
// .codeArtifactOptions(CodeArtifactOptions)
// .codeCov(java.lang.Boolean)
// .codeCovTokenSecret(java.lang.String)
// .commitGenerated(java.lang.Boolean)
// .copyrightOwner(java.lang.String)
// .copyrightPeriod(java.lang.String)
// .defaultReleaseBranch(java.lang.String)
// .dependabot(java.lang.Boolean)
// .dependabotOptions(DependabotOptions)
// .deps(java.util.List<java.lang.String>)
// .depsUpgrade(java.lang.Boolean)
// .depsUpgradeOptions(UpgradeDependenciesOptions)
// .description(java.lang.String)
// .devContainer(java.lang.Boolean)
// .devDeps(java.util.List<java.lang.String>)
// .disableTsconfig(java.lang.Boolean)
// .disableTsconfigDev(java.lang.Boolean)
// .docgen(java.lang.Boolean)
// .docsDirectory(java.lang.String)
// .entrypoint(java.lang.String)
// .entrypointTypes(java.lang.String)
// .eslint(java.lang.Boolean)
// .eslintOptions(EslintOptions)
// .github(java.lang.Boolean)
// .githubOptions(GitHubOptions)
// .gitignore(java.util.List<java.lang.String>)
// .gitIgnoreOptions(IgnoreFileOptions)
// .gitOptions(GitOptions)
// .gitpod(java.lang.Boolean)
// .homepage(java.lang.String)
// .jest(java.lang.Boolean)
// .jestOptions(JestOptions)
// .jsiiReleaseVersion(java.lang.String)
// .keywords(java.util.List<java.lang.String>)
// .libdir(java.lang.String)
// .license(java.lang.String)
// .licensed(java.lang.Boolean)
// .logging(LoggerOptions)
// .majorVersion(java.lang.Number)
// .maxNodeVersion(java.lang.String)
// .mergify(java.lang.Boolean)
// .mergifyOptions(MergifyOptions)
// .minMajorVersion(java.lang.Number)
// .minNodeVersion(java.lang.String)
// .mutableBuild(java.lang.Boolean)
// .name(java.lang.String)
// .npmAccess(NpmAccess)
// .npmDistTag(java.lang.String)
// .npmignore(java.util.List<java.lang.String>)
// .npmignoreEnabled(java.lang.Boolean)
// .npmIgnoreOptions(IgnoreFileOptions)
// .npmProvenance(java.lang.Boolean)
// .npmRegistry(java.lang.String)
// .npmRegistryUrl(java.lang.String)
// .npmTokenSecret(java.lang.String)
// .outdir(java.lang.String)
// .package(java.lang.Boolean)
// .packageManager(NodePackageManager)
// .packageName(java.lang.String)
// .parent(Project)
// .peerDependencyOptions(PeerDependencyOptions)
// .peerDeps(java.util.List<java.lang.String>)
// .pnpmVersion(java.lang.String)
// .postBuildSteps(java.util.List<JobStep>)
// .prerelease(java.lang.String)
// .prettier(java.lang.Boolean)
// .prettierOptions(PrettierOptions)
// .projectType(ProjectType)
// .projenCommand(java.lang.String)
// .projenCredentials(GithubCredentials)
// .projenDevDependency(java.lang.Boolean)
// .projenrcJs(java.lang.Boolean)
// .projenrcJson(java.lang.Boolean)
// .projenrcJsonOptions(ProjenrcJsonOptions)
// .projenrcJsOptions(ProjenrcOptions)
// .projenrcTs(java.lang.Boolean)
// .projenrcTsOptions(ProjenrcOptions)
// .projenTokenSecret(java.lang.String)
// .projenVersion(java.lang.String)
// .publishDryRun(java.lang.Boolean)
// .publishTasks(java.lang.Boolean)
// .pullRequestTemplate(java.lang.Boolean)
// .pullRequestTemplateContents(java.util.List<java.lang.String>)
// .readme(SampleReadmeProps)
// .releasableCommits(ReleasableCommits)
// .release(java.lang.Boolean)
// .releaseBranches(java.util.Map<java.lang.String, BranchOptions>)
// .releaseEveryCommit(java.lang.Boolean)
// .releaseFailureIssue(java.lang.Boolean)
// .releaseFailureIssueLabel(java.lang.String)
// .releaseSchedule(java.lang.String)
// .releaseTagPrefix(java.lang.String)
// .releaseToNpm(java.lang.Boolean)
// .releaseTrigger(ReleaseTrigger)
// .releaseWorkflow(java.lang.Boolean)
// .releaseWorkflowName(java.lang.String)
// .releaseWorkflowSetupSteps(java.util.List<JobStep>)
// .renovatebot(java.lang.Boolean)
// .renovatebotOptions(RenovatebotOptions)
// .repository(java.lang.String)
// .repositoryDirectory(java.lang.String)
// .sampleCode(java.lang.Boolean)
// .scopedPackagesOptions(java.util.List<ScopedPackagesOptions>)
// .scripts(java.util.Map<java.lang.String, java.lang.String>)
// .srcdir(java.lang.String)
// .stability(java.lang.String)
// .stale(java.lang.Boolean)
// .staleOptions(StaleOptions)
// .testdir(java.lang.String)
// .tsconfig(TypescriptConfigOptions)
// .tsconfigDev(TypescriptConfigOptions)
// .tsconfigDevFile(java.lang.String)
// .tsJestOptions(TsJestOptions)
// .typescriptVersion(java.lang.String)
// .versionrcOptions(java.util.Map<java.lang.String, java.lang.Object>)
// .vscode(java.lang.Boolean)
// .workflowBootstrapSteps(java.util.List<JobStep>)
// .workflowContainerImage(java.lang.String)
// .workflowGitIdentity(GitIdentity)
// .workflowNodeVersion(java.lang.String)
// .workflowPackageCache(java.lang.Boolean)
// .workflowRunsOn(java.util.List<java.lang.String>)
// .workflowRunsOnGroup(GroupRunnerOptions)
// .yarnBerryOptions(YarnBerryOptions)
// .commitGeneratedCode(java.lang.Boolean)
// .handlerEntryPoints(java.util.List<java.lang.String>)
// .runtimeVersion(NodeVersion)
.build();
Properties
| Name | Type | Description |
|---|---|---|
allowLibraryDependencies |
java.lang.Boolean |
Allow the project to include peerDependencies and bundledDependencies. |
artifactsDirectory |
java.lang.String |
A directory which will contain build artifacts. |
authorEmail |
java.lang.String |
Author's e-mail. |
authorName |
java.lang.String |
Author's name. |
authorOrganization |
java.lang.Boolean |
Is the author an organization. |
authorUrl |
java.lang.String |
Author's URL / Website. |
autoApproveOptions |
io.github.cdklabs.projen.github.AutoApproveOptions |
Enable and configure the 'auto approve' workflow. |
autoApproveUpgrades |
java.lang.Boolean |
Automatically approve deps upgrade PRs, allowing them to be merged by mergify (if configued). |
autoDetectBin |
java.lang.Boolean |
Automatically add all executables under the bin directory to your package.json file under the bin section. |
autoMerge |
java.lang.Boolean |
Enable automatic merging on GitHub. |
autoMergeOptions |
io.github.cdklabs.projen.github.AutoMergeOptions |
Configure options for automatic merging on GitHub. |
bin |
java.util.Map |
Binary programs vended with your module. |
bugsEmail |
java.lang.String |
The email address to which issues should be reported. |
bugsUrl |
java.lang.String |
The url to your project's issue tracker. |
buildWorkflow |
java.lang.Boolean |
Define a GitHub workflow for building PRs. |
buildWorkflowOptions |
io.github.cdklabs.projen.javascript.BuildWorkflowOptions |
Options for PR build workflow. |
buildWorkflowTriggers |
io.github.cdklabs.projen.github.workflows.Triggers |
Build workflow triggers. |
bundledDeps |
java.util.List |
List of dependencies to bundle into this module. |
bundlerOptions |
io.github.cdklabs.projen.javascript.BundlerOptions |
Options for Bundler. |
checkLicenses |
io.github.cdklabs.projen.javascript.LicenseCheckerOptions |
Configure which licenses should be deemed acceptable for use by dependencies. |
clobber |
java.lang.Boolean |
Add a clobber task which resets the repo to origin. |
codeArtifactOptions |
io.github.cdklabs.projen.javascript.CodeArtifactOptions |
Options for npm packages using AWS CodeArtifact. |
codeCov |
java.lang.Boolean |
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. |
codeCovTokenSecret |
java.lang.String |
Define the secret name for a specified https://codecov.io/ token A secret is required to send coverage for private repositories. |
commitGenerated |
java.lang.Boolean |
Whether to commit the managed files by default. |
copyrightOwner |
java.lang.String |
License copyright owner. |
copyrightPeriod |
java.lang.String |
The copyright years to put in the LICENSE file. |
defaultReleaseBranch |
java.lang.String |
The name of the main release branch. |
dependabot |
java.lang.Boolean |
Use dependabot to handle dependency upgrades. |
dependabotOptions |
io.github.cdklabs.projen.github.DependabotOptions |
Options for dependabot. |
deps |
java.util.List |
Runtime dependencies of this module. |
depsUpgrade |
java.lang.Boolean |
Use tasks and github workflows to handle dependency upgrades. |
depsUpgradeOptions |
io.github.cdklabs.projen.javascript.UpgradeDependenciesOptions |
Options for UpgradeDependencies. |
description |
java.lang.String |
The description is just a string that helps people understand the purpose of the package. |
devContainer |
java.lang.Boolean |
Add a VSCode development environment (used for GitHub Codespaces). |
devDeps |
java.util.List |
Build dependencies for this module. |
disableTsconfig |
java.lang.Boolean |
Do not generate a tsconfig.json file (used by jsii projects since tsconfig.json is generated by the jsii compiler). |
disableTsconfigDev |
java.lang.Boolean |
Do not generate a tsconfig.dev.json file. |
docgen |
java.lang.Boolean |
Docgen by Typedoc. |
docsDirectory |
java.lang.String |
Docs directory. |
entrypoint |
java.lang.String |
Module entrypoint (main in package.json). Set to an empty string to not include main in your package.json. |
entrypointTypes |
java.lang.String |
The .d.ts file that includes the type declarations for this module. |
eslint |
java.lang.Boolean |
Setup eslint. |
eslintOptions |
io.github.cdklabs.projen.javascript.EslintOptions |
Eslint options. |
github |
java.lang.Boolean |
Enable GitHub integration. |
githubOptions |
io.github.cdklabs.projen.github.GitHubOptions |
Options for GitHub integration. |
gitignore |
java.util.List |
Additional entries to .gitignore. |
gitIgnoreOptions |
io.github.cdklabs.projen.IgnoreFileOptions |
Configuration options for .gitignore file. |
gitOptions |
io.github.cdklabs.projen.GitOptions |
Configuration options for git. |
gitpod |
java.lang.Boolean |
Add a Gitpod development environment. |
homepage |
java.lang.String |
Package's Homepage / Website. |
jest |
java.lang.Boolean |
Setup jest unit tests. |
jestOptions |
io.github.cdklabs.projen.javascript.JestOptions |
Jest options. |
jsiiReleaseVersion |
java.lang.String |
Version requirement of publib which is used to publish modules to npm. |
keywords |
java.util.List |
Keywords to include in package.json. |
libdir |
java.lang.String |
Typescript artifacts output directory. |
license |
java.lang.String |
License's SPDX identifier. |
licensed |
java.lang.Boolean |
Indicates if a license should be added. |
logging |
io.github.cdklabs.projen.LoggerOptions |
Configure logging options such as verbosity. |
majorVersion |
java.lang.Number |
Major version to release from the default branch. |
maxNodeVersion |
java.lang.String |
Minimum node.js version to require via engines (inclusive). |
mergify |
java.lang.Boolean |
Whether mergify should be enabled on this repository or not. |
mergifyOptions |
io.github.cdklabs.projen.github.MergifyOptions |
Options for mergify. |
minMajorVersion |
java.lang.Number |
Minimal Major version to release. |
minNodeVersion |
java.lang.String |
Minimum Node.js version to require via package.json engines (inclusive). |
mutableBuild |
java.lang.Boolean |
Automatically update files modified during builds to pull-request branches. |
name |
java.lang.String |
This is the name of your project. |
npmAccess |
io.github.cdklabs.projen.javascript.NpmAccess |
Access level of the npm package. |
npmDistTag |
java.lang.String |
The npmDistTag to use when publishing from the default branch. |
npmignore |
java.util.List |
Additional entries to .npmignore. |
npmignoreEnabled |
java.lang.Boolean |
Defines an .npmignore file. Normally this is only needed for libraries that are packaged as tarballs. |
npmIgnoreOptions |
io.github.cdklabs.projen.IgnoreFileOptions |
Configuration options for .npmignore file. |
npmProvenance |
java.lang.Boolean |
Should provenance statements be generated when the package is published. |
npmRegistry |
java.lang.String |
The host name of the npm registry to publish to. |
npmRegistryUrl |
java.lang.String |
The base URL of the npm package registry. |
npmTokenSecret |
java.lang.String |
GitHub secret which contains the NPM token to use when publishing packages. |
outdir |
java.lang.String |
The root directory of the project. Relative to this directory, all files are synthesized. |
package |
java.lang.Boolean |
Defines a package task that will produce an npm tarball under the artifacts directory (e.g. dist). |
packageManager |
io.github.cdklabs.projen.javascript.NodePackageManager |
The Node Package Manager used to execute scripts. |
packageName |
java.lang.String |
The "name" in package.json. |
parent |
io.github.cdklabs.projen.Project |
The parent project, if this project is part of a bigger project. |
peerDependencyOptions |
io.github.cdklabs.projen.javascript.PeerDependencyOptions |
Options for peerDeps. |
peerDeps |
java.util.List |
Peer dependencies for this module. |
pnpmVersion |
java.lang.String |
The version of PNPM to use if using PNPM as a package manager. |
postBuildSteps |
java.util.List |
Steps to execute after build as part of the release workflow. |
prerelease |
java.lang.String |
Bump versions from the default branch as pre-releases (e.g. "beta", "alpha", "pre"). |
prettier |
java.lang.Boolean |
Setup prettier. |
prettierOptions |
io.github.cdklabs.projen.javascript.PrettierOptions |
Prettier options. |
projectType |
io.github.cdklabs.projen.ProjectType |
Which type of project this is (library/app). |
projenCommand |
java.lang.String |
The shell command to use in order to run the projen CLI. |
projenCredentials |
io.github.cdklabs.projen.github.GithubCredentials |
Choose a method of providing GitHub API access for projen workflows. |
projenDevDependency |
java.lang.Boolean |
Indicates of "projen" should be installed as a devDependency. |
projenrcJs |
java.lang.Boolean |
Generate (once) .projenrc.js (in JavaScript). Set to false in order to disable .projenrc.js generation. |
projenrcJson |
java.lang.Boolean |
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation. |
projenrcJsonOptions |
io.github.cdklabs.projen.ProjenrcJsonOptions |
Options for .projenrc.json. |
projenrcJsOptions |
io.github.cdklabs.projen.javascript.ProjenrcOptions |
Options for .projenrc.js. |
projenrcTs |
java.lang.Boolean |
Use TypeScript for your projenrc file (.projenrc.ts). |
projenrcTsOptions |
io.github.cdklabs.projen.typescript.ProjenrcOptions |
Options for .projenrc.ts. |
projenTokenSecret |
java.lang.String |
The name of a secret which includes a GitHub Personal Access Token to be used by projen workflows. |
projenVersion |
java.lang.String |
Version of projen to install. |
publishDryRun |
java.lang.Boolean |
Instead of actually publishing to package managers, just print the publishing command. |
publishTasks |
java.lang.Boolean |
Define publishing tasks that can be executed manually as well as workflows. |
pullRequestTemplate |
java.lang.Boolean |
Include a GitHub pull request template. |
pullRequestTemplateContents |
java.util.List |
The contents of the pull request template. |
readme |
io.github.cdklabs.projen.SampleReadmeProps |
The README setup. |
releasableCommits |
io.github.cdklabs.projen.ReleasableCommits |
Find commits that should be considered releasable Used to decide if a release is required. |
release |
java.lang.Boolean |
Add release management to this project. |
releaseBranches |
java.util.Map |
Defines additional release branches. |
releaseEveryCommit |
java.lang.Boolean |
Automatically release new versions every commit to one of branches in releaseBranches. |
releaseFailureIssue |
java.lang.Boolean |
Create a github issue on every failed publishing task. |
releaseFailureIssueLabel |
java.lang.String |
The label to apply to issues indicating publish failures. |
releaseSchedule |
java.lang.String |
CRON schedule to trigger new releases. |
releaseTagPrefix |
java.lang.String |
Automatically add the given prefix to release tags. |
releaseToNpm |
java.lang.Boolean |
Automatically release to npm when new versions are introduced. |
releaseTrigger |
io.github.cdklabs.projen.release.ReleaseTrigger |
The release trigger to use. |
releaseWorkflow |
java.lang.Boolean |
DEPRECATED: renamed to release. |
releaseWorkflowName |
java.lang.String |
The name of the default release workflow. |
releaseWorkflowSetupSteps |
java.util.List |
A set of workflow steps to execute in order to setup the workflow container. |
renovatebot |
java.lang.Boolean |
Use renovatebot to handle dependency upgrades. |
renovatebotOptions |
io.github.cdklabs.projen.RenovatebotOptions |
Options for renovatebot. |
repository |
java.lang.String |
The repository is the location where the actual code for your package lives. |
repositoryDirectory |
java.lang.String |
If the package.json for your package is not in the root directory (for example if it is part of a monorepo), you can specify the directory in which it lives. |
sampleCode |
java.lang.Boolean |
Generate one-time sample in src/ and test/ if there are no files there. |
scopedPackagesOptions |
java.util.List |
Options for privately hosted scoped packages. |
scripts |
java.util.Map |
npm scripts to include. |
srcdir |
java.lang.String |
Typescript sources directory. |
stability |
java.lang.String |
Package's Stability. |
stale |
java.lang.Boolean |
Auto-close of stale issues and pull request. |
staleOptions |
io.github.cdklabs.projen.github.StaleOptions |
Auto-close stale issues and pull requests. |
testdir |
java.lang.String |
Jest tests directory. |
tsconfig |
io.github.cdklabs.projen.javascript.TypescriptConfigOptions |
Custom TSConfig. |
tsconfigDev |
io.github.cdklabs.projen.javascript.TypescriptConfigOptions |
Custom tsconfig options for the development tsconfig.json file (used for testing). |
tsconfigDevFile |
java.lang.String |
The name of the development tsconfig.json file. |
tsJestOptions |
io.github.cdklabs.projen.typescript.TsJestOptions |
Options for ts-jest. |
typescriptVersion |
java.lang.String |
TypeScript version to use. |
versionrcOptions |
java.util.Map |
Custom configuration used when creating changelog with standard-version package. |
vscode |
java.lang.Boolean |
Enable VSCode integration. |
workflowBootstrapSteps |
java.util.List |
Workflow steps to use in order to bootstrap this repo. |
workflowContainerImage |
java.lang.String |
Container image to use for GitHub workflows. |
workflowGitIdentity |
io.github.cdklabs.projen.github.GitIdentity |
The git identity to use in workflows. |
workflowNodeVersion |
java.lang.String |
The node version to use in GitHub workflows. |
workflowPackageCache |
java.lang.Boolean |
Enable Node.js package cache in GitHub workflows. |
workflowRunsOn |
java.util.List |
Github Runner selection labels. |
workflowRunsOnGroup |
io.github.cdklabs.projen.GroupRunnerOptions |
Github Runner Group selection options. |
yarnBerryOptions |
io.github.cdklabs.projen.javascript.YarnBerryOptions |
Options for Yarn Berry. |
commitGeneratedCode |
java.lang.Boolean |
Whether to commit the code generated by the OpenAPI Generator. |
handlerEntryPoints |
java.util.List |
Globs for lambda handler entry points, used by esbuild. |
runtimeVersion |
NodeVersion |
Runtime version to target for the handlers. |
allowLibraryDependenciesOptional
public java.lang.Boolean getAllowLibraryDependencies();
- Type: java.lang.Boolean
- Default: true
Allow the project to include peerDependencies and bundledDependencies.
This is normally only allowed for libraries. For apps, there's no meaning for specifying these.
artifactsDirectoryOptional
public java.lang.String getArtifactsDirectory();
- Type: java.lang.String
- Default: "dist"
A directory which will contain build artifacts.
authorEmailOptional
public java.lang.String getAuthorEmail();
- Type: java.lang.String
Author's e-mail.
authorNameOptional
public java.lang.String getAuthorName();
- Type: java.lang.String
Author's name.
authorOrganizationOptional
public java.lang.Boolean getAuthorOrganization();
- Type: java.lang.Boolean
Is the author an organization.
authorUrlOptional
public java.lang.String getAuthorUrl();
- Type: java.lang.String
Author's URL / Website.
autoApproveOptionsOptional
public AutoApproveOptions getAutoApproveOptions();
- Type: io.github.cdklabs.projen.github.AutoApproveOptions
- Default: auto approve is disabled
Enable and configure the 'auto approve' workflow.
autoApproveUpgradesOptional
public java.lang.Boolean getAutoApproveUpgrades();
- Type: java.lang.Boolean
- Default: true
Automatically approve deps upgrade PRs, allowing them to be merged by mergify (if configued).
Throw if set to true but autoApproveOptions are not defined.
autoDetectBinOptional
public java.lang.Boolean getAutoDetectBin();
- Type: java.lang.Boolean
- Default: true
Automatically add all executables under the bin directory to your package.json file under the bin section.
autoMergeOptional
public java.lang.Boolean getAutoMerge();
- Type: java.lang.Boolean
- Default: true
Enable automatic merging on GitHub.
Has no effect if github.mergify
is set to false.
autoMergeOptionsOptional
public AutoMergeOptions getAutoMergeOptions();
- Type: io.github.cdklabs.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.
binOptional
public java.util.Map<java.lang.String, java.lang.String> getBin();
- Type: java.util.Map
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.
bugsEmailOptional
public java.lang.String getBugsEmail();
- Type: java.lang.String
The email address to which issues should be reported.
bugsUrlOptional
public java.lang.String getBugsUrl();
- Type: java.lang.String
The url to your project's issue tracker.
buildWorkflowOptional
public java.lang.Boolean getBuildWorkflow();
- Type: java.lang.Boolean
- Default: true if not a subproject
Define a GitHub workflow for building PRs.
buildWorkflowOptionsOptional
public BuildWorkflowOptions getBuildWorkflowOptions();
- Type: io.github.cdklabs.projen.javascript.BuildWorkflowOptions
Options for PR build workflow.
~~buildWorkflowTriggers~~Optional
- Deprecated: - Use
buildWorkflowOptions.workflowTriggers
public Triggers getBuildWorkflowTriggers();
- Type: io.github.cdklabs.projen.github.workflows.Triggers
- Default: "{ pullRequest: {}, workflowDispatch: {} }"
Build workflow triggers.
bundledDepsOptional
public java.util.List<java.lang.String> getBundledDeps();
- Type: java.util.List
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.
bundlerOptionsOptional
public BundlerOptions getBundlerOptions();
- Type: io.github.cdklabs.projen.javascript.BundlerOptions
Options for Bundler.
checkLicensesOptional
public LicenseCheckerOptions getCheckLicenses();
- Type: io.github.cdklabs.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.
clobberOptional
public java.lang.Boolean getClobber();
- Type: java.lang.Boolean
- Default: true, but false for subprojects
Add a clobber task which resets the repo to origin.
codeArtifactOptionsOptional
public CodeArtifactOptions getCodeArtifactOptions();
- Type: io.github.cdklabs.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
codeCovOptional
public java.lang.Boolean getCodeCov();
- Type: java.lang.Boolean
- 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.
codeCovTokenSecretOptional
public java.lang.String getCodeCovTokenSecret();
- Type: java.lang.String
- Default: if this option is not specified, only public repositories are supported
Define the secret name for a specified https://codecov.io/ token A secret is required to send coverage for private repositories.
commitGeneratedOptional
public java.lang.Boolean getCommitGenerated();
- Type: java.lang.Boolean
- Default: true
Whether to commit the managed files by default.
copyrightOwnerOptional
public java.lang.String getCopyrightOwner();
- Type: java.lang.String
- Default: defaults to the value of authorName or "" if
authorNameis undefined.
License copyright owner.
copyrightPeriodOptional
public java.lang.String getCopyrightPeriod();
- Type: java.lang.String
- Default: current year
The copyright years to put in the LICENSE file.
defaultReleaseBranchOptional
public java.lang.String getDefaultReleaseBranch();
- Type: java.lang.String
- Default: "main"
The name of the main release branch.
dependabotOptional
public java.lang.Boolean getDependabot();
- Type: java.lang.Boolean
- Default: false
Use dependabot to handle dependency upgrades.
Cannot be used in conjunction with depsUpgrade.
dependabotOptionsOptional
public DependabotOptions getDependabotOptions();
- Type: io.github.cdklabs.projen.github.DependabotOptions
- Default: default options
Options for dependabot.
depsOptional
public java.util.List<java.lang.String> getDeps();
- Type: java.util.List
- 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.
depsUpgradeOptional
public java.lang.Boolean getDepsUpgrade();
- Type: java.lang.Boolean
- Default: true
Use tasks and github workflows to handle dependency upgrades.
Cannot be used in conjunction with dependabot.
depsUpgradeOptionsOptional
public UpgradeDependenciesOptions getDepsUpgradeOptions();
- Type: io.github.cdklabs.projen.javascript.UpgradeDependenciesOptions
- Default: default options
Options for UpgradeDependencies.
descriptionOptional
public java.lang.String getDescription();
- Type: java.lang.String
The description is just a string that helps people understand the purpose of the package.
It can be used when searching for packages in a package manager as well. See https://classic.yarnpkg.com/en/docs/package-json/#toc-description
devContainerOptional
public java.lang.Boolean getDevContainer();
- Type: java.lang.Boolean
- Default: false
Add a VSCode development environment (used for GitHub Codespaces).
devDepsOptional
public java.util.List<java.lang.String> getDevDeps();
- Type: java.util.List
- 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.
disableTsconfigOptional
public java.lang.Boolean getDisableTsconfig();
- Type: java.lang.Boolean
- Default: false
Do not generate a tsconfig.json file (used by jsii projects since tsconfig.json is generated by the jsii compiler).
disableTsconfigDevOptional
public java.lang.Boolean getDisableTsconfigDev();
- Type: java.lang.Boolean
- Default: false
Do not generate a tsconfig.dev.json file.
docgenOptional
public java.lang.Boolean getDocgen();
- Type: java.lang.Boolean
- Default: false
Docgen by Typedoc.
docsDirectoryOptional
public java.lang.String getDocsDirectory();
- Type: java.lang.String
- Default: "docs"
Docs directory.
entrypointOptional
public java.lang.String getEntrypoint();
- Type: java.lang.String
- Default: "lib/index.js"
Module entrypoint (main in package.json). Set to an empty string to not include main in your package.json.
entrypointTypesOptional
public java.lang.String getEntrypointTypes();
- Type: java.lang.String
- Default: .d.ts file derived from the project's entrypoint (usually lib/index.d.ts)
The .d.ts file that includes the type declarations for this module.
eslintOptional
public java.lang.Boolean getEslint();
- Type: java.lang.Boolean
- Default: true
Setup eslint.
eslintOptionsOptional
public EslintOptions getEslintOptions();
- Type: io.github.cdklabs.projen.javascript.EslintOptions
- Default: opinionated default options
Eslint options.
githubOptional
public java.lang.Boolean getGithub();
- Type: java.lang.Boolean
- Default: true
Enable GitHub integration.
Enabled by default for root projects. Disabled for non-root projects.
githubOptionsOptional
public GitHubOptions getGithubOptions();
- Type: io.github.cdklabs.projen.github.GitHubOptions
- Default: see GitHubOptions
Options for GitHub integration.
gitignoreOptional
public java.util.List<java.lang.String> getGitignore();
- Type: java.util.List
Additional entries to .gitignore.
gitIgnoreOptionsOptional
public IgnoreFileOptions getGitIgnoreOptions();
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptionsOptional
public GitOptions getGitOptions();
- Type: io.github.cdklabs.projen.GitOptions
Configuration options for git.
gitpodOptional
public java.lang.Boolean getGitpod();
- Type: java.lang.Boolean
- Default: false
Add a Gitpod development environment.
homepageOptional
public java.lang.String getHomepage();
- Type: java.lang.String
Package's Homepage / Website.
jestOptional
public java.lang.Boolean getJest();
- Type: java.lang.Boolean
- Default: true
Setup jest unit tests.
jestOptionsOptional
public JestOptions getJestOptions();
- Type: io.github.cdklabs.projen.javascript.JestOptions
- Default: default options
Jest options.
jsiiReleaseVersionOptional
public java.lang.String getJsiiReleaseVersion();
- Type: java.lang.String
- Default: "latest"
Version requirement of publib which is used to publish modules to npm.
keywordsOptional
public java.util.List<java.lang.String> getKeywords();
- Type: java.util.List
Keywords to include in package.json.
libdirOptional
public java.lang.String getLibdir();
- Type: java.lang.String
- Default: "lib"
Typescript artifacts output directory.
licenseOptional
public java.lang.String getLicense();
- Type: java.lang.String
- Default: "Apache-2.0"
License's SPDX identifier.
See https://github.com/projen/projen/tree/main/license-text for a list of supported licenses.
Use the licensed option if you want to no license to be specified.
licensedOptional
public java.lang.Boolean getLicensed();
- Type: java.lang.Boolean
- Default: true
Indicates if a license should be added.
loggingOptional
public LoggerOptions getLogging();
- Type: io.github.cdklabs.projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
majorVersionOptional
public java.lang.Number getMajorVersion();
- Type: java.lang.Number
- Default: Major version is not enforced.
Major version to release from the default branch.
If this is specified, we bump the latest version of this major version line. If not specified, we bump the global latest version.
maxNodeVersionOptional
public java.lang.String getMaxNodeVersion();
- Type: java.lang.String
- Default: no max
Minimum node.js version to require via engines (inclusive).
~~mergify~~Optional
- Deprecated: use
githubOptions.mergifyinstead
public java.lang.Boolean getMergify();
- Type: java.lang.Boolean
- Default: true
Whether mergify should be enabled on this repository or not.
~~mergifyOptions~~Optional
- Deprecated: use
githubOptions.mergifyOptionsinstead
public MergifyOptions getMergifyOptions();
- Type: io.github.cdklabs.projen.github.MergifyOptions
- Default: default options
Options for mergify.
minMajorVersionOptional
public java.lang.Number getMinMajorVersion();
- Type: java.lang.Number
- Default: No minimum version is being enforced
Minimal Major version to release.
This can be useful to set to 1, as breaking changes before the 1.x major release are not incrementing the major version number.
Can not be set together with majorVersion.
minNodeVersionOptional
public java.lang.String getMinNodeVersion();
- Type: java.lang.String
- Default: no "engines" specified
Minimum Node.js version to require via package.json engines (inclusive).
~~mutableBuild~~Optional
- Deprecated: - Use
buildWorkflowOptions.mutableBuild
public java.lang.Boolean getMutableBuild();
- Type: java.lang.Boolean
- Default: true
Automatically update files modified during builds to pull-request branches.
This means that any files synthesized by projen or e.g. test snapshots will always be up-to-date before a PR is merged.
Implies that PR builds do not have anti-tamper checks.
nameOptional
public java.lang.String getName();
- Type: java.lang.String
- Default: $BASEDIR
This is the name of your project.
npmAccessOptional
public NpmAccess getNpmAccess();
- Type: io.github.cdklabs.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.
npmDistTagOptional
public java.lang.String getNpmDistTag();
- Type: java.lang.String
- Default: "latest"
The npmDistTag to use when publishing from the default branch.
To set the npm dist-tag for release branches, set the npmDistTag property
for each branch.
~~npmignore~~Optional
- Deprecated: - use
project.addPackageIgnore
public java.util.List<java.lang.String> getNpmignore();
- Type: java.util.List
Additional entries to .npmignore.
npmignoreEnabledOptional
public java.lang.Boolean getNpmignoreEnabled();
- Type: java.lang.Boolean
- Default: true
Defines an .npmignore file. Normally this is only needed for libraries that are packaged as tarballs.
npmIgnoreOptionsOptional
public IgnoreFileOptions getNpmIgnoreOptions();
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .npmignore file.
npmProvenanceOptional
public java.lang.Boolean getNpmProvenance();
- Type: java.lang.Boolean
- 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.
~~npmRegistry~~Optional
- Deprecated: use
npmRegistryUrlinstead
public java.lang.String getNpmRegistry();
- Type: java.lang.String
The host name of the npm registry to publish to.
Cannot be set together with npmRegistryUrl.
npmRegistryUrlOptional
public java.lang.String getNpmRegistryUrl();
- Type: java.lang.String
- Default: "https://registry.npmjs.org"
The base URL of the npm package registry.
Must be a URL (e.g. start with "https://" or "http://")
npmTokenSecretOptional
public java.lang.String getNpmTokenSecret();
- Type: java.lang.String
- Default: "NPM_TOKEN"
GitHub secret which contains the NPM token to use when publishing packages.
outdirOptional
public java.lang.String getOutdir();
- Type: java.lang.String
- Default: "."
The root directory of the project. Relative to this directory, all files are synthesized.
If this project has a parent, this directory is relative to the parent directory and it cannot be the same as the parent or any of it's other subprojects.
packageOptional
public java.lang.Boolean getPackage();
- Type: java.lang.Boolean
- Default: true
Defines a package task that will produce an npm tarball under the artifacts directory (e.g. dist).
packageManagerOptional
public NodePackageManager getPackageManager();
- Type: io.github.cdklabs.projen.javascript.NodePackageManager
- Default: NodePackageManager.YARN_CLASSIC
The Node Package Manager used to execute scripts.
packageNameOptional
public java.lang.String getPackageName();
- Type: java.lang.String
- Default: defaults to project name
The "name" in package.json.
parentOptional
public Project getParent();
- Type: io.github.cdklabs.projen.Project
The parent project, if this project is part of a bigger project.
peerDependencyOptionsOptional
public PeerDependencyOptions getPeerDependencyOptions();
- Type: io.github.cdklabs.projen.javascript.PeerDependencyOptions
Options for peerDeps.
peerDepsOptional
public java.util.List<java.lang.String> getPeerDeps();
- Type: java.util.List
- 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.
pnpmVersionOptional
public java.lang.String getPnpmVersion();
- Type: java.lang.String
- Default: "7"
The version of PNPM to use if using PNPM as a package manager.
postBuildStepsOptional
public java.util.List<JobStep> getPostBuildSteps();
- Type: java.util.List
- Default: []
Steps to execute after build as part of the release workflow.
prereleaseOptional
public java.lang.String getPrerelease();
- Type: java.lang.String
- Default: normal semantic versions
Bump versions from the default branch as pre-releases (e.g. "beta", "alpha", "pre").
prettierOptional
public java.lang.Boolean getPrettier();
- Type: java.lang.Boolean
- Default: false
Setup prettier.
prettierOptionsOptional
public PrettierOptions getPrettierOptions();
- Type: io.github.cdklabs.projen.javascript.PrettierOptions
- Default: default options
Prettier options.
~~projectType~~Optional
- Deprecated: no longer supported at the base project level
public ProjectType getProjectType();
- Type: io.github.cdklabs.projen.ProjectType
- Default: ProjectType.UNKNOWN
Which type of project this is (library/app).
projenCommandOptional
public java.lang.String getProjenCommand();
- Type: java.lang.String
- Default: "npx projen"
The shell command to use in order to run the projen CLI.
Can be used to customize in special environments.
projenCredentialsOptional
public GithubCredentials getProjenCredentials();
- Type: io.github.cdklabs.projen.github.GithubCredentials
- Default: use a personal access token named PROJEN_GITHUB_TOKEN
Choose a method of providing GitHub API access for projen workflows.
projenDevDependencyOptional
public java.lang.Boolean getProjenDevDependency();
- Type: java.lang.Boolean
- Default: true if not a subproject
Indicates of "projen" should be installed as a devDependency.
projenrcJsOptional
public java.lang.Boolean getProjenrcJs();
- Type: java.lang.Boolean
- Default: true if projenrcJson is false
Generate (once) .projenrc.js (in JavaScript). Set to false in order to disable .projenrc.js generation.
projenrcJsonOptional
public java.lang.Boolean getProjenrcJson();
- Type: java.lang.Boolean
- Default: false
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation.
projenrcJsonOptionsOptional
public ProjenrcJsonOptions getProjenrcJsonOptions();
- Type: io.github.cdklabs.projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
projenrcJsOptionsOptional
public ProjenrcOptions getProjenrcJsOptions();
- Type: io.github.cdklabs.projen.javascript.ProjenrcOptions
- Default: default options
Options for .projenrc.js.
projenrcTsOptional
public java.lang.Boolean getProjenrcTs();
- Type: java.lang.Boolean
- Default: false
Use TypeScript for your projenrc file (.projenrc.ts).
projenrcTsOptionsOptional
public ProjenrcOptions getProjenrcTsOptions();
- Type: io.github.cdklabs.projen.typescript.ProjenrcOptions
Options for .projenrc.ts.
~~projenTokenSecret~~Optional
- Deprecated: use
projenCredentials
public java.lang.String getProjenTokenSecret();
- Type: java.lang.String
- Default: "PROJEN_GITHUB_TOKEN"
The name of a secret which includes a GitHub Personal Access Token to be used by projen workflows.
This token needs to have the repo, workflows
and packages scope.
projenVersionOptional
public java.lang.String getProjenVersion();
- Type: java.lang.String
- Default: Defaults to the latest version.
Version of projen to install.
publishDryRunOptional
public java.lang.Boolean getPublishDryRun();
- Type: java.lang.Boolean
- Default: false
Instead of actually publishing to package managers, just print the publishing command.
publishTasksOptional
public java.lang.Boolean getPublishTasks();
- Type: java.lang.Boolean
- Default: false
Define publishing tasks that can be executed manually as well as workflows.
Normally, publishing only happens within automated workflows. Enable this in order to create a publishing task for each publishing activity.
pullRequestTemplateOptional
public java.lang.Boolean getPullRequestTemplate();
- Type: java.lang.Boolean
- Default: true
Include a GitHub pull request template.
pullRequestTemplateContentsOptional
public java.util.List<java.lang.String> getPullRequestTemplateContents();
- Type: java.util.List
- Default: default content
The contents of the pull request template.
readmeOptional
public SampleReadmeProps getReadme();
- Type: io.github.cdklabs.projen.SampleReadmeProps
- Default: { filename: 'README.md', contents: '# replace this' }
The README setup.
releasableCommitsOptional
public ReleasableCommits getReleasableCommits();
- Type: io.github.cdklabs.projen.ReleasableCommits
- Default: ReleasableCommits.everyCommit()
Find commits that should be considered releasable Used to decide if a release is required.
releaseOptional
public java.lang.Boolean getRelease();
- Type: java.lang.Boolean
- Default: true (false for subprojects)
Add release management to this project.
releaseBranchesOptional
public java.util.Map<java.lang.String, BranchOptions> getReleaseBranches();
- Type: java.util.Map
- Default: no additional branches are used for release. you can use
addBranch()to add additional branches.
Defines additional release branches.
A workflow will be created for each
release branch which will publish releases from commits in this branch.
Each release branch must be assigned a major version number which is used
to enforce that versions published from that branch always use that major
version. If multiple branches are used, the majorVersion field must also
be provided for the default branch.
~~releaseEveryCommit~~Optional
- Deprecated: Use
releaseTrigger: ReleaseTrigger.continuous()instead
public java.lang.Boolean getReleaseEveryCommit();
- Type: java.lang.Boolean
- Default: true
Automatically release new versions every commit to one of branches in releaseBranches.
releaseFailureIssueOptional
public java.lang.Boolean getReleaseFailureIssue();
- Type: java.lang.Boolean
- Default: false
Create a github issue on every failed publishing task.
releaseFailureIssueLabelOptional
public java.lang.String getReleaseFailureIssueLabel();
- Type: java.lang.String
- Default: "failed-release"
The label to apply to issues indicating publish failures.
Only applies if releaseFailureIssue is true.
~~releaseSchedule~~Optional
- Deprecated: Use
releaseTrigger: ReleaseTrigger.scheduled()instead
public java.lang.String getReleaseSchedule();
- Type: java.lang.String
- Default: no scheduled releases
CRON schedule to trigger new releases.
releaseTagPrefixOptional
public java.lang.String getReleaseTagPrefix();
- Type: java.lang.String
- Default: "v"
Automatically add the given prefix to release tags.
Useful if you are releasing on multiple branches with overlapping version numbers. Note: this prefix is used to detect the latest tagged version when bumping, so if you change this on a project with an existing version history, you may need to manually tag your latest release with the new prefix.
releaseToNpmOptional
public java.lang.Boolean getReleaseToNpm();
- Type: java.lang.Boolean
- Default: false
Automatically release to npm when new versions are introduced.
releaseTriggerOptional
public ReleaseTrigger getReleaseTrigger();
- Type: io.github.cdklabs.projen.release.ReleaseTrigger
- Default: Continuous releases (
ReleaseTrigger.continuous())
The release trigger to use.
~~releaseWorkflow~~Optional
- Deprecated: see
release.
public java.lang.Boolean getReleaseWorkflow();
- Type: java.lang.Boolean
- Default: true if not a subproject
DEPRECATED: renamed to release.
releaseWorkflowNameOptional
public java.lang.String getReleaseWorkflowName();
- Type: java.lang.String
- Default: "release"
The name of the default release workflow.
releaseWorkflowSetupStepsOptional
public java.util.List<JobStep> getReleaseWorkflowSetupSteps();
- Type: java.util.List
A set of workflow steps to execute in order to setup the workflow container.
renovatebotOptional
public java.lang.Boolean getRenovatebot();
- Type: java.lang.Boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptionsOptional
public RenovatebotOptions getRenovatebotOptions();
- Type: io.github.cdklabs.projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
repositoryOptional
public java.lang.String getRepository();
- Type: java.lang.String
The repository is the location where the actual code for your package lives.
See https://classic.yarnpkg.com/en/docs/package-json/#toc-repository
repositoryDirectoryOptional
public java.lang.String getRepositoryDirectory();
- Type: java.lang.String
If the package.json for your package is not in the root directory (for example if it is part of a monorepo), you can specify the directory in which it lives.
sampleCodeOptional
public java.lang.Boolean getSampleCode();
- Type: java.lang.Boolean
- Default: true
Generate one-time sample in src/ and test/ if there are no files there.
scopedPackagesOptionsOptional
public java.util.List<ScopedPackagesOptions> getScopedPackagesOptions();
- Type: java.util.List
- Default: fetch all scoped packages from the public npm registry
Options for privately hosted scoped packages.
~~scripts~~Optional
- Deprecated: use
project.addTask()orpackage.setScript()
public java.util.Map<java.lang.String, java.lang.String> getScripts();
- Type: java.util.Map
- 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.
srcdirOptional
public java.lang.String getSrcdir();
- Type: java.lang.String
- Default: "src"
Typescript sources directory.
stabilityOptional
public java.lang.String getStability();
- Type: java.lang.String
Package's Stability.
staleOptional
public java.lang.Boolean getStale();
- Type: java.lang.Boolean
- Default: false
Auto-close of stale issues and pull request.
See staleOptions for options.
staleOptionsOptional
public StaleOptions getStaleOptions();
- Type: io.github.cdklabs.projen.github.StaleOptions
- Default: see defaults in
StaleOptions
Auto-close stale issues and pull requests.
To disable set stale to false.
testdirOptional
public java.lang.String getTestdir();
- Type: java.lang.String
- Default: "test"
Jest tests directory.
Tests files should be named xxx.test.ts.
If this directory is under srcdir (e.g. src/test, src/__tests__),
then tests are going to be compiled into lib/ and executed as javascript.
If the test directory is outside of src, then we configure jest to
compile the code in-memory.
tsconfigOptional
public TypescriptConfigOptions getTsconfig();
- Type: io.github.cdklabs.projen.javascript.TypescriptConfigOptions
- Default: default options
Custom TSConfig.
tsconfigDevOptional
public TypescriptConfigOptions getTsconfigDev();
- Type: io.github.cdklabs.projen.javascript.TypescriptConfigOptions
- Default: use the production tsconfig options
Custom tsconfig options for the development tsconfig.json file (used for testing).
tsconfigDevFileOptional
public java.lang.String getTsconfigDevFile();
- Type: java.lang.String
- Default: "tsconfig.dev.json"
The name of the development tsconfig.json file.
tsJestOptionsOptional
public TsJestOptions getTsJestOptions();
- Type: io.github.cdklabs.projen.typescript.TsJestOptions
Options for ts-jest.
typescriptVersionOptional
public java.lang.String getTypescriptVersion();
- Type: java.lang.String
- Default: "latest"
TypeScript version to use.
NOTE: Typescript is not semantically versioned and should remain on the
same minor, so we recommend using a ~ dependency (e.g. ~1.2.3).
versionrcOptionsOptional
public java.util.Map<java.lang.String, java.lang.Object> getVersionrcOptions();
- Type: java.util.Map
- 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.
vscodeOptional
public java.lang.Boolean getVscode();
- Type: java.lang.Boolean
- Default: true
Enable VSCode integration.
Enabled by default for root projects. Disabled for non-root projects.
workflowBootstrapStepsOptional
public java.util.List<JobStep> getWorkflowBootstrapSteps();
- Type: java.util.List
- Default: "yarn install --frozen-lockfile && yarn projen"
Workflow steps to use in order to bootstrap this repo.
workflowContainerImageOptional
public java.lang.String getWorkflowContainerImage();
- Type: java.lang.String
- Default: default image
Container image to use for GitHub workflows.
workflowGitIdentityOptional
public GitIdentity getWorkflowGitIdentity();
- Type: io.github.cdklabs.projen.github.GitIdentity
- Default: GitHub Actions
The git identity to use in workflows.
workflowNodeVersionOptional
public java.lang.String getWorkflowNodeVersion();
- Type: java.lang.String
- Default: same as
minNodeVersion
The node version to use in GitHub workflows.
workflowPackageCacheOptional
public java.lang.Boolean getWorkflowPackageCache();
- Type: java.lang.Boolean
- Default: false
Enable Node.js package cache in GitHub workflows.
workflowRunsOnOptional
public java.util.List<java.lang.String> getWorkflowRunsOn();
- Type: java.util.List
- Default: ["ubuntu-latest"]
Github Runner selection labels.
workflowRunsOnGroupOptional
public GroupRunnerOptions getWorkflowRunsOnGroup();
- Type: io.github.cdklabs.projen.GroupRunnerOptions
Github Runner Group selection options.
yarnBerryOptionsOptional
public YarnBerryOptions getYarnBerryOptions();
- Type: io.github.cdklabs.projen.javascript.YarnBerryOptions
- Default: Yarn Berry v4 with all default options
Options for Yarn Berry.
commitGeneratedCodeOptional
public java.lang.Boolean getCommitGeneratedCode();
- Type: java.lang.Boolean
- Default: false
Whether to commit the code generated by the OpenAPI Generator.
handlerEntryPointsOptional
public java.util.List<java.lang.String> getHandlerEntryPoints();
- Type: java.util.List
- Default: src/*.ts - all files directly under the src directory
Globs for lambda handler entry points, used by esbuild.
runtimeVersionOptional
public NodeVersion getRuntimeVersion();
- Type: NodeVersion
- Default: NodeVersion.NODE_22
Runtime version to target for the handlers.
GeneratedTypeScriptInfrastructureOptions
Options for configuring a generated typescript infrastructure project.
Initializer
import software.aws.pdk.type_safe_api.GeneratedTypeScriptInfrastructureOptions;
GeneratedTypeScriptInfrastructureOptions.builder()
// .allowLibraryDependencies(java.lang.Boolean)
// .artifactsDirectory(java.lang.String)
// .authorEmail(java.lang.String)
// .authorName(java.lang.String)
// .authorOrganization(java.lang.Boolean)
// .authorUrl(java.lang.String)
// .autoApproveOptions(AutoApproveOptions)
// .autoApproveUpgrades(java.lang.Boolean)
// .autoDetectBin(java.lang.Boolean)
// .autoMerge(java.lang.Boolean)
// .autoMergeOptions(AutoMergeOptions)
// .bin(java.util.Map<java.lang.String, java.lang.String>)
// .bugsEmail(java.lang.String)
// .bugsUrl(java.lang.String)
// .buildWorkflow(java.lang.Boolean)
// .buildWorkflowOptions(BuildWorkflowOptions)
// .buildWorkflowTriggers(Triggers)
// .bundledDeps(java.util.List<java.lang.String>)
// .bundlerOptions(BundlerOptions)
// .checkLicenses(LicenseCheckerOptions)
// .clobber(java.lang.Boolean)
// .codeArtifactOptions(CodeArtifactOptions)
// .codeCov(java.lang.Boolean)
// .codeCovTokenSecret(java.lang.String)
// .commitGenerated(java.lang.Boolean)
// .copyrightOwner(java.lang.String)
// .copyrightPeriod(java.lang.String)
// .defaultReleaseBranch(java.lang.String)
// .dependabot(java.lang.Boolean)
// .dependabotOptions(DependabotOptions)
// .deps(java.util.List<java.lang.String>)
// .depsUpgrade(java.lang.Boolean)
// .depsUpgradeOptions(UpgradeDependenciesOptions)
// .description(java.lang.String)
// .devContainer(java.lang.Boolean)
// .devDeps(java.util.List<java.lang.String>)
// .disableTsconfig(java.lang.Boolean)
// .disableTsconfigDev(java.lang.Boolean)
// .docgen(java.lang.Boolean)
// .docsDirectory(java.lang.String)
// .entrypoint(java.lang.String)
// .entrypointTypes(java.lang.String)
// .eslint(java.lang.Boolean)
// .eslintOptions(EslintOptions)
// .github(java.lang.Boolean)
// .githubOptions(GitHubOptions)
// .gitignore(java.util.List<java.lang.String>)
// .gitIgnoreOptions(IgnoreFileOptions)
// .gitOptions(GitOptions)
// .gitpod(java.lang.Boolean)
// .homepage(java.lang.String)
// .jest(java.lang.Boolean)
// .jestOptions(JestOptions)
// .jsiiReleaseVersion(java.lang.String)
// .keywords(java.util.List<java.lang.String>)
// .libdir(java.lang.String)
// .license(java.lang.String)
// .licensed(java.lang.Boolean)
// .logging(LoggerOptions)
// .majorVersion(java.lang.Number)
// .maxNodeVersion(java.lang.String)
// .mergify(java.lang.Boolean)
// .mergifyOptions(MergifyOptions)
// .minMajorVersion(java.lang.Number)
// .minNodeVersion(java.lang.String)
// .mutableBuild(java.lang.Boolean)
// .name(java.lang.String)
// .npmAccess(NpmAccess)
// .npmDistTag(java.lang.String)
// .npmignore(java.util.List<java.lang.String>)
// .npmignoreEnabled(java.lang.Boolean)
// .npmIgnoreOptions(IgnoreFileOptions)
// .npmProvenance(java.lang.Boolean)
// .npmRegistry(java.lang.String)
// .npmRegistryUrl(java.lang.String)
// .npmTokenSecret(java.lang.String)
// .outdir(java.lang.String)
// .package(java.lang.Boolean)
// .packageManager(NodePackageManager)
// .packageName(java.lang.String)
// .parent(Project)
// .peerDependencyOptions(PeerDependencyOptions)
// .peerDeps(java.util.List<java.lang.String>)
// .pnpmVersion(java.lang.String)
// .postBuildSteps(java.util.List<JobStep>)
// .prerelease(java.lang.String)
// .prettier(java.lang.Boolean)
// .prettierOptions(PrettierOptions)
// .projectType(ProjectType)
// .projenCommand(java.lang.String)
// .projenCredentials(GithubCredentials)
// .projenDevDependency(java.lang.Boolean)
// .projenrcJs(java.lang.Boolean)
// .projenrcJson(java.lang.Boolean)
// .projenrcJsonOptions(ProjenrcJsonOptions)
// .projenrcJsOptions(ProjenrcOptions)
// .projenrcTs(java.lang.Boolean)
// .projenrcTsOptions(ProjenrcOptions)
// .projenTokenSecret(java.lang.String)
// .projenVersion(java.lang.String)
// .publishDryRun(java.lang.Boolean)
// .publishTasks(java.lang.Boolean)
// .pullRequestTemplate(java.lang.Boolean)
// .pullRequestTemplateContents(java.util.List<java.lang.String>)
// .readme(SampleReadmeProps)
// .releasableCommits(ReleasableCommits)
// .release(java.lang.Boolean)
// .releaseBranches(java.util.Map<java.lang.String, BranchOptions>)
// .releaseEveryCommit(java.lang.Boolean)
// .releaseFailureIssue(java.lang.Boolean)
// .releaseFailureIssueLabel(java.lang.String)
// .releaseSchedule(java.lang.String)
// .releaseTagPrefix(java.lang.String)
// .releaseToNpm(java.lang.Boolean)
// .releaseTrigger(ReleaseTrigger)
// .releaseWorkflow(java.lang.Boolean)
// .releaseWorkflowName(java.lang.String)
// .releaseWorkflowSetupSteps(java.util.List<JobStep>)
// .renovatebot(java.lang.Boolean)
// .renovatebotOptions(RenovatebotOptions)
// .repository(java.lang.String)
// .repositoryDirectory(java.lang.String)
// .sampleCode(java.lang.Boolean)
// .scopedPackagesOptions(java.util.List<ScopedPackagesOptions>)
// .scripts(java.util.Map<java.lang.String, java.lang.String>)
// .srcdir(java.lang.String)
// .stability(java.lang.String)
// .stale(java.lang.Boolean)
// .staleOptions(StaleOptions)
// .testdir(java.lang.String)
// .tsconfig(TypescriptConfigOptions)
// .tsconfigDev(TypescriptConfigOptions)
// .tsconfigDevFile(java.lang.String)
// .tsJestOptions(TsJestOptions)
// .typescriptVersion(java.lang.String)
// .versionrcOptions(java.util.Map<java.lang.String, java.lang.Object>)
// .vscode(java.lang.Boolean)
// .workflowBootstrapSteps(java.util.List<JobStep>)
// .workflowContainerImage(java.lang.String)
// .workflowGitIdentity(GitIdentity)
// .workflowNodeVersion(java.lang.String)
// .workflowPackageCache(java.lang.Boolean)
// .workflowRunsOn(java.util.List<java.lang.String>)
// .workflowRunsOnGroup(GroupRunnerOptions)
// .yarnBerryOptions(YarnBerryOptions)
// .commitGeneratedCode(java.lang.Boolean)
// .mockDataOptions(MockResponseDataGenerationOptions)
.build();
Properties
| Name | Type | Description |
|---|---|---|
allowLibraryDependencies |
java.lang.Boolean |
Allow the project to include peerDependencies and bundledDependencies. |
artifactsDirectory |
java.lang.String |
A directory which will contain build artifacts. |
authorEmail |
java.lang.String |
Author's e-mail. |
authorName |
java.lang.String |
Author's name. |
authorOrganization |
java.lang.Boolean |
Is the author an organization. |
authorUrl |
java.lang.String |
Author's URL / Website. |
autoApproveOptions |
io.github.cdklabs.projen.github.AutoApproveOptions |
Enable and configure the 'auto approve' workflow. |
autoApproveUpgrades |
java.lang.Boolean |
Automatically approve deps upgrade PRs, allowing them to be merged by mergify (if configued). |
autoDetectBin |
java.lang.Boolean |
Automatically add all executables under the bin directory to your package.json file under the bin section. |
autoMerge |
java.lang.Boolean |
Enable automatic merging on GitHub. |
autoMergeOptions |
io.github.cdklabs.projen.github.AutoMergeOptions |
Configure options for automatic merging on GitHub. |
bin |
java.util.Map |
Binary programs vended with your module. |
bugsEmail |
java.lang.String |
The email address to which issues should be reported. |
bugsUrl |
java.lang.String |
The url to your project's issue tracker. |
buildWorkflow |
java.lang.Boolean |
Define a GitHub workflow for building PRs. |
buildWorkflowOptions |
io.github.cdklabs.projen.javascript.BuildWorkflowOptions |
Options for PR build workflow. |
buildWorkflowTriggers |
io.github.cdklabs.projen.github.workflows.Triggers |
Build workflow triggers. |
bundledDeps |
java.util.List |
List of dependencies to bundle into this module. |
bundlerOptions |
io.github.cdklabs.projen.javascript.BundlerOptions |
Options for Bundler. |
checkLicenses |
io.github.cdklabs.projen.javascript.LicenseCheckerOptions |
Configure which licenses should be deemed acceptable for use by dependencies. |
clobber |
java.lang.Boolean |
Add a clobber task which resets the repo to origin. |
codeArtifactOptions |
io.github.cdklabs.projen.javascript.CodeArtifactOptions |
Options for npm packages using AWS CodeArtifact. |
codeCov |
java.lang.Boolean |
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. |
codeCovTokenSecret |
java.lang.String |
Define the secret name for a specified https://codecov.io/ token A secret is required to send coverage for private repositories. |
commitGenerated |
java.lang.Boolean |
Whether to commit the managed files by default. |
copyrightOwner |
java.lang.String |
License copyright owner. |
copyrightPeriod |
java.lang.String |
The copyright years to put in the LICENSE file. |
defaultReleaseBranch |
java.lang.String |
The name of the main release branch. |
dependabot |
java.lang.Boolean |
Use dependabot to handle dependency upgrades. |
dependabotOptions |
io.github.cdklabs.projen.github.DependabotOptions |
Options for dependabot. |
deps |
java.util.List |
Runtime dependencies of this module. |
depsUpgrade |
java.lang.Boolean |
Use tasks and github workflows to handle dependency upgrades. |
depsUpgradeOptions |
io.github.cdklabs.projen.javascript.UpgradeDependenciesOptions |
Options for UpgradeDependencies. |
description |
java.lang.String |
The description is just a string that helps people understand the purpose of the package. |
devContainer |
java.lang.Boolean |
Add a VSCode development environment (used for GitHub Codespaces). |
devDeps |
java.util.List |
Build dependencies for this module. |
disableTsconfig |
java.lang.Boolean |
Do not generate a tsconfig.json file (used by jsii projects since tsconfig.json is generated by the jsii compiler). |
disableTsconfigDev |
java.lang.Boolean |
Do not generate a tsconfig.dev.json file. |
docgen |
java.lang.Boolean |
Docgen by Typedoc. |
docsDirectory |
java.lang.String |
Docs directory. |
entrypoint |
java.lang.String |
Module entrypoint (main in package.json). Set to an empty string to not include main in your package.json. |
entrypointTypes |
java.lang.String |
The .d.ts file that includes the type declarations for this module. |
eslint |
java.lang.Boolean |
Setup eslint. |
eslintOptions |
io.github.cdklabs.projen.javascript.EslintOptions |
Eslint options. |
github |
java.lang.Boolean |
Enable GitHub integration. |
githubOptions |
io.github.cdklabs.projen.github.GitHubOptions |
Options for GitHub integration. |
gitignore |
java.util.List |
Additional entries to .gitignore. |
gitIgnoreOptions |
io.github.cdklabs.projen.IgnoreFileOptions |
Configuration options for .gitignore file. |
gitOptions |
io.github.cdklabs.projen.GitOptions |
Configuration options for git. |
gitpod |
java.lang.Boolean |
Add a Gitpod development environment. |
homepage |
java.lang.String |
Package's Homepage / Website. |
jest |
java.lang.Boolean |
Setup jest unit tests. |
jestOptions |
io.github.cdklabs.projen.javascript.JestOptions |
Jest options. |
jsiiReleaseVersion |
java.lang.String |
Version requirement of publib which is used to publish modules to npm. |
keywords |
java.util.List |
Keywords to include in package.json. |
libdir |
java.lang.String |
Typescript artifacts output directory. |
license |
java.lang.String |
License's SPDX identifier. |
licensed |
java.lang.Boolean |
Indicates if a license should be added. |
logging |
io.github.cdklabs.projen.LoggerOptions |
Configure logging options such as verbosity. |
majorVersion |
java.lang.Number |
Major version to release from the default branch. |
maxNodeVersion |
java.lang.String |
Minimum node.js version to require via engines (inclusive). |
mergify |
java.lang.Boolean |
Whether mergify should be enabled on this repository or not. |
mergifyOptions |
io.github.cdklabs.projen.github.MergifyOptions |
Options for mergify. |
minMajorVersion |
java.lang.Number |
Minimal Major version to release. |
minNodeVersion |
java.lang.String |
Minimum Node.js version to require via package.json engines (inclusive). |
mutableBuild |
java.lang.Boolean |
Automatically update files modified during builds to pull-request branches. |
name |
java.lang.String |
This is the name of your project. |
npmAccess |
io.github.cdklabs.projen.javascript.NpmAccess |
Access level of the npm package. |
npmDistTag |
java.lang.String |
The npmDistTag to use when publishing from the default branch. |
npmignore |
java.util.List |
Additional entries to .npmignore. |
npmignoreEnabled |
java.lang.Boolean |
Defines an .npmignore file. Normally this is only needed for libraries that are packaged as tarballs. |
npmIgnoreOptions |
io.github.cdklabs.projen.IgnoreFileOptions |
Configuration options for .npmignore file. |
npmProvenance |
java.lang.Boolean |
Should provenance statements be generated when the package is published. |
npmRegistry |
java.lang.String |
The host name of the npm registry to publish to. |
npmRegistryUrl |
java.lang.String |
The base URL of the npm package registry. |
npmTokenSecret |
java.lang.String |
GitHub secret which contains the NPM token to use when publishing packages. |
outdir |
java.lang.String |
The root directory of the project. Relative to this directory, all files are synthesized. |
package |
java.lang.Boolean |
Defines a package task that will produce an npm tarball under the artifacts directory (e.g. dist). |
packageManager |
io.github.cdklabs.projen.javascript.NodePackageManager |
The Node Package Manager used to execute scripts. |
packageName |
java.lang.String |
The "name" in package.json. |
parent |
io.github.cdklabs.projen.Project |
The parent project, if this project is part of a bigger project. |
peerDependencyOptions |
io.github.cdklabs.projen.javascript.PeerDependencyOptions |
Options for peerDeps. |
peerDeps |
java.util.List |
Peer dependencies for this module. |
pnpmVersion |
java.lang.String |
The version of PNPM to use if using PNPM as a package manager. |
postBuildSteps |
java.util.List |
Steps to execute after build as part of the release workflow. |
prerelease |
java.lang.String |
Bump versions from the default branch as pre-releases (e.g. "beta", "alpha", "pre"). |
prettier |
java.lang.Boolean |
Setup prettier. |
prettierOptions |
io.github.cdklabs.projen.javascript.PrettierOptions |
Prettier options. |
projectType |
io.github.cdklabs.projen.ProjectType |
Which type of project this is (library/app). |
projenCommand |
java.lang.String |
The shell command to use in order to run the projen CLI. |
projenCredentials |
io.github.cdklabs.projen.github.GithubCredentials |
Choose a method of providing GitHub API access for projen workflows. |
projenDevDependency |
java.lang.Boolean |
Indicates of "projen" should be installed as a devDependency. |
projenrcJs |
java.lang.Boolean |
Generate (once) .projenrc.js (in JavaScript). Set to false in order to disable .projenrc.js generation. |
projenrcJson |
java.lang.Boolean |
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation. |
projenrcJsonOptions |
io.github.cdklabs.projen.ProjenrcJsonOptions |
Options for .projenrc.json. |
projenrcJsOptions |
io.github.cdklabs.projen.javascript.ProjenrcOptions |
Options for .projenrc.js. |
projenrcTs |
java.lang.Boolean |
Use TypeScript for your projenrc file (.projenrc.ts). |
projenrcTsOptions |
io.github.cdklabs.projen.typescript.ProjenrcOptions |
Options for .projenrc.ts. |
projenTokenSecret |
java.lang.String |
The name of a secret which includes a GitHub Personal Access Token to be used by projen workflows. |
projenVersion |
java.lang.String |
Version of projen to install. |
publishDryRun |
java.lang.Boolean |
Instead of actually publishing to package managers, just print the publishing command. |
publishTasks |
java.lang.Boolean |
Define publishing tasks that can be executed manually as well as workflows. |
pullRequestTemplate |
java.lang.Boolean |
Include a GitHub pull request template. |
pullRequestTemplateContents |
java.util.List |
The contents of the pull request template. |
readme |
io.github.cdklabs.projen.SampleReadmeProps |
The README setup. |
releasableCommits |
io.github.cdklabs.projen.ReleasableCommits |
Find commits that should be considered releasable Used to decide if a release is required. |
release |
java.lang.Boolean |
Add release management to this project. |
releaseBranches |
java.util.Map |
Defines additional release branches. |
releaseEveryCommit |
java.lang.Boolean |
Automatically release new versions every commit to one of branches in releaseBranches. |
releaseFailureIssue |
java.lang.Boolean |
Create a github issue on every failed publishing task. |
releaseFailureIssueLabel |
java.lang.String |
The label to apply to issues indicating publish failures. |
releaseSchedule |
java.lang.String |
CRON schedule to trigger new releases. |
releaseTagPrefix |
java.lang.String |
Automatically add the given prefix to release tags. |
releaseToNpm |
java.lang.Boolean |
Automatically release to npm when new versions are introduced. |
releaseTrigger |
io.github.cdklabs.projen.release.ReleaseTrigger |
The release trigger to use. |
releaseWorkflow |
java.lang.Boolean |
DEPRECATED: renamed to release. |
releaseWorkflowName |
java.lang.String |
The name of the default release workflow. |
releaseWorkflowSetupSteps |
java.util.List |
A set of workflow steps to execute in order to setup the workflow container. |
renovatebot |
java.lang.Boolean |
Use renovatebot to handle dependency upgrades. |
renovatebotOptions |
io.github.cdklabs.projen.RenovatebotOptions |
Options for renovatebot. |
repository |
java.lang.String |
The repository is the location where the actual code for your package lives. |
repositoryDirectory |
java.lang.String |
If the package.json for your package is not in the root directory (for example if it is part of a monorepo), you can specify the directory in which it lives. |
sampleCode |
java.lang.Boolean |
Generate one-time sample in src/ and test/ if there are no files there. |
scopedPackagesOptions |
java.util.List |
Options for privately hosted scoped packages. |
scripts |
java.util.Map |
npm scripts to include. |
srcdir |
java.lang.String |
Typescript sources directory. |
stability |
java.lang.String |
Package's Stability. |
stale |
java.lang.Boolean |
Auto-close of stale issues and pull request. |
staleOptions |
io.github.cdklabs.projen.github.StaleOptions |
Auto-close stale issues and pull requests. |
testdir |
java.lang.String |
Jest tests directory. |
tsconfig |
io.github.cdklabs.projen.javascript.TypescriptConfigOptions |
Custom TSConfig. |
tsconfigDev |
io.github.cdklabs.projen.javascript.TypescriptConfigOptions |
Custom tsconfig options for the development tsconfig.json file (used for testing). |
tsconfigDevFile |
java.lang.String |
The name of the development tsconfig.json file. |
tsJestOptions |
io.github.cdklabs.projen.typescript.TsJestOptions |
Options for ts-jest. |
typescriptVersion |
java.lang.String |
TypeScript version to use. |
versionrcOptions |
java.util.Map |
Custom configuration used when creating changelog with standard-version package. |
vscode |
java.lang.Boolean |
Enable VSCode integration. |
workflowBootstrapSteps |
java.util.List |
Workflow steps to use in order to bootstrap this repo. |
workflowContainerImage |
java.lang.String |
Container image to use for GitHub workflows. |
workflowGitIdentity |
io.github.cdklabs.projen.github.GitIdentity |
The git identity to use in workflows. |
workflowNodeVersion |
java.lang.String |
The node version to use in GitHub workflows. |
workflowPackageCache |
java.lang.Boolean |
Enable Node.js package cache in GitHub workflows. |
workflowRunsOn |
java.util.List |
Github Runner selection labels. |
workflowRunsOnGroup |
io.github.cdklabs.projen.GroupRunnerOptions |
Github Runner Group selection options. |
yarnBerryOptions |
io.github.cdklabs.projen.javascript.YarnBerryOptions |
Options for Yarn Berry. |
commitGeneratedCode |
java.lang.Boolean |
Whether to commit the code generated by the OpenAPI Generator. |
mockDataOptions |
MockResponseDataGenerationOptions |
Options for the generated mock response data. |
allowLibraryDependenciesOptional
public java.lang.Boolean getAllowLibraryDependencies();
- Type: java.lang.Boolean
- Default: true
Allow the project to include peerDependencies and bundledDependencies.
This is normally only allowed for libraries. For apps, there's no meaning for specifying these.
artifactsDirectoryOptional
public java.lang.String getArtifactsDirectory();
- Type: java.lang.String
- Default: "dist"
A directory which will contain build artifacts.
authorEmailOptional
public java.lang.String getAuthorEmail();
- Type: java.lang.String
Author's e-mail.
authorNameOptional
public java.lang.String getAuthorName();
- Type: java.lang.String
Author's name.
authorOrganizationOptional
public java.lang.Boolean getAuthorOrganization();
- Type: java.lang.Boolean
Is the author an organization.
authorUrlOptional
public java.lang.String getAuthorUrl();
- Type: java.lang.String
Author's URL / Website.
autoApproveOptionsOptional
public AutoApproveOptions getAutoApproveOptions();
- Type: io.github.cdklabs.projen.github.AutoApproveOptions
- Default: auto approve is disabled
Enable and configure the 'auto approve' workflow.
autoApproveUpgradesOptional
public java.lang.Boolean getAutoApproveUpgrades();
- Type: java.lang.Boolean
- Default: true
Automatically approve deps upgrade PRs, allowing them to be merged by mergify (if configued).
Throw if set to true but autoApproveOptions are not defined.
autoDetectBinOptional
public java.lang.Boolean getAutoDetectBin();
- Type: java.lang.Boolean
- Default: true
Automatically add all executables under the bin directory to your package.json file under the bin section.
autoMergeOptional
public java.lang.Boolean getAutoMerge();
- Type: java.lang.Boolean
- Default: true
Enable automatic merging on GitHub.
Has no effect if github.mergify
is set to false.
autoMergeOptionsOptional
public AutoMergeOptions getAutoMergeOptions();
- Type: io.github.cdklabs.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.
binOptional
public java.util.Map<java.lang.String, java.lang.String> getBin();
- Type: java.util.Map
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.
bugsEmailOptional
public java.lang.String getBugsEmail();
- Type: java.lang.String
The email address to which issues should be reported.
bugsUrlOptional
public java.lang.String getBugsUrl();
- Type: java.lang.String
The url to your project's issue tracker.
buildWorkflowOptional
public java.lang.Boolean getBuildWorkflow();
- Type: java.lang.Boolean
- Default: true if not a subproject
Define a GitHub workflow for building PRs.
buildWorkflowOptionsOptional
public BuildWorkflowOptions getBuildWorkflowOptions();
- Type: io.github.cdklabs.projen.javascript.BuildWorkflowOptions
Options for PR build workflow.
~~buildWorkflowTriggers~~Optional
- Deprecated: - Use
buildWorkflowOptions.workflowTriggers
public Triggers getBuildWorkflowTriggers();
- Type: io.github.cdklabs.projen.github.workflows.Triggers
- Default: "{ pullRequest: {}, workflowDispatch: {} }"
Build workflow triggers.
bundledDepsOptional
public java.util.List<java.lang.String> getBundledDeps();
- Type: java.util.List
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.
bundlerOptionsOptional
public BundlerOptions getBundlerOptions();
- Type: io.github.cdklabs.projen.javascript.BundlerOptions
Options for Bundler.
checkLicensesOptional
public LicenseCheckerOptions getCheckLicenses();
- Type: io.github.cdklabs.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.
clobberOptional
public java.lang.Boolean getClobber();
- Type: java.lang.Boolean
- Default: true, but false for subprojects
Add a clobber task which resets the repo to origin.
codeArtifactOptionsOptional
public CodeArtifactOptions getCodeArtifactOptions();
- Type: io.github.cdklabs.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
codeCovOptional
public java.lang.Boolean getCodeCov();
- Type: java.lang.Boolean
- 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.
codeCovTokenSecretOptional
public java.lang.String getCodeCovTokenSecret();
- Type: java.lang.String
- Default: if this option is not specified, only public repositories are supported
Define the secret name for a specified https://codecov.io/ token A secret is required to send coverage for private repositories.
commitGeneratedOptional
public java.lang.Boolean getCommitGenerated();
- Type: java.lang.Boolean
- Default: true
Whether to commit the managed files by default.
copyrightOwnerOptional
public java.lang.String getCopyrightOwner();
- Type: java.lang.String
- Default: defaults to the value of authorName or "" if
authorNameis undefined.
License copyright owner.
copyrightPeriodOptional
public java.lang.String getCopyrightPeriod();
- Type: java.lang.String
- Default: current year
The copyright years to put in the LICENSE file.
defaultReleaseBranchOptional
public java.lang.String getDefaultReleaseBranch();
- Type: java.lang.String
- Default: "main"
The name of the main release branch.
dependabotOptional
public java.lang.Boolean getDependabot();
- Type: java.lang.Boolean
- Default: false
Use dependabot to handle dependency upgrades.
Cannot be used in conjunction with depsUpgrade.
dependabotOptionsOptional
public DependabotOptions getDependabotOptions();
- Type: io.github.cdklabs.projen.github.DependabotOptions
- Default: default options
Options for dependabot.
depsOptional
public java.util.List<java.lang.String> getDeps();
- Type: java.util.List
- 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.
depsUpgradeOptional
public java.lang.Boolean getDepsUpgrade();
- Type: java.lang.Boolean
- Default: true
Use tasks and github workflows to handle dependency upgrades.
Cannot be used in conjunction with dependabot.
depsUpgradeOptionsOptional
public UpgradeDependenciesOptions getDepsUpgradeOptions();
- Type: io.github.cdklabs.projen.javascript.UpgradeDependenciesOptions
- Default: default options
Options for UpgradeDependencies.
descriptionOptional
public java.lang.String getDescription();
- Type: java.lang.String
The description is just a string that helps people understand the purpose of the package.
It can be used when searching for packages in a package manager as well. See https://classic.yarnpkg.com/en/docs/package-json/#toc-description
devContainerOptional
public java.lang.Boolean getDevContainer();
- Type: java.lang.Boolean
- Default: false
Add a VSCode development environment (used for GitHub Codespaces).
devDepsOptional
public java.util.List<java.lang.String> getDevDeps();
- Type: java.util.List
- 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.
disableTsconfigOptional
public java.lang.Boolean getDisableTsconfig();
- Type: java.lang.Boolean
- Default: false
Do not generate a tsconfig.json file (used by jsii projects since tsconfig.json is generated by the jsii compiler).
disableTsconfigDevOptional
public java.lang.Boolean getDisableTsconfigDev();
- Type: java.lang.Boolean
- Default: false
Do not generate a tsconfig.dev.json file.
docgenOptional
public java.lang.Boolean getDocgen();
- Type: java.lang.Boolean
- Default: false
Docgen by Typedoc.
docsDirectoryOptional
public java.lang.String getDocsDirectory();
- Type: java.lang.String
- Default: "docs"
Docs directory.
entrypointOptional
public java.lang.String getEntrypoint();
- Type: java.lang.String
- Default: "lib/index.js"
Module entrypoint (main in package.json). Set to an empty string to not include main in your package.json.
entrypointTypesOptional
public java.lang.String getEntrypointTypes();
- Type: java.lang.String
- Default: .d.ts file derived from the project's entrypoint (usually lib/index.d.ts)
The .d.ts file that includes the type declarations for this module.
eslintOptional
public java.lang.Boolean getEslint();
- Type: java.lang.Boolean
- Default: true
Setup eslint.
eslintOptionsOptional
public EslintOptions getEslintOptions();
- Type: io.github.cdklabs.projen.javascript.EslintOptions
- Default: opinionated default options
Eslint options.
githubOptional
public java.lang.Boolean getGithub();
- Type: java.lang.Boolean
- Default: true
Enable GitHub integration.
Enabled by default for root projects. Disabled for non-root projects.
githubOptionsOptional
public GitHubOptions getGithubOptions();
- Type: io.github.cdklabs.projen.github.GitHubOptions
- Default: see GitHubOptions
Options for GitHub integration.
gitignoreOptional
public java.util.List<java.lang.String> getGitignore();
- Type: java.util.List
Additional entries to .gitignore.
gitIgnoreOptionsOptional
public IgnoreFileOptions getGitIgnoreOptions();
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptionsOptional
public GitOptions getGitOptions();
- Type: io.github.cdklabs.projen.GitOptions
Configuration options for git.
gitpodOptional
public java.lang.Boolean getGitpod();
- Type: java.lang.Boolean
- Default: false
Add a Gitpod development environment.
homepageOptional
public java.lang.String getHomepage();
- Type: java.lang.String
Package's Homepage / Website.
jestOptional
public java.lang.Boolean getJest();
- Type: java.lang.Boolean
- Default: true
Setup jest unit tests.
jestOptionsOptional
public JestOptions getJestOptions();
- Type: io.github.cdklabs.projen.javascript.JestOptions
- Default: default options
Jest options.
jsiiReleaseVersionOptional
public java.lang.String getJsiiReleaseVersion();
- Type: java.lang.String
- Default: "latest"
Version requirement of publib which is used to publish modules to npm.
keywordsOptional
public java.util.List<java.lang.String> getKeywords();
- Type: java.util.List
Keywords to include in package.json.
libdirOptional
public java.lang.String getLibdir();
- Type: java.lang.String
- Default: "lib"
Typescript artifacts output directory.
licenseOptional
public java.lang.String getLicense();
- Type: java.lang.String
- Default: "Apache-2.0"
License's SPDX identifier.
See https://github.com/projen/projen/tree/main/license-text for a list of supported licenses.
Use the licensed option if you want to no license to be specified.
licensedOptional
public java.lang.Boolean getLicensed();
- Type: java.lang.Boolean
- Default: true
Indicates if a license should be added.
loggingOptional
public LoggerOptions getLogging();
- Type: io.github.cdklabs.projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
majorVersionOptional
public java.lang.Number getMajorVersion();
- Type: java.lang.Number
- Default: Major version is not enforced.
Major version to release from the default branch.
If this is specified, we bump the latest version of this major version line. If not specified, we bump the global latest version.
maxNodeVersionOptional
public java.lang.String getMaxNodeVersion();
- Type: java.lang.String
- Default: no max
Minimum node.js version to require via engines (inclusive).
~~mergify~~Optional
- Deprecated: use
githubOptions.mergifyinstead
public java.lang.Boolean getMergify();
- Type: java.lang.Boolean
- Default: true
Whether mergify should be enabled on this repository or not.
~~mergifyOptions~~Optional
- Deprecated: use
githubOptions.mergifyOptionsinstead
public MergifyOptions getMergifyOptions();
- Type: io.github.cdklabs.projen.github.MergifyOptions
- Default: default options
Options for mergify.
minMajorVersionOptional
public java.lang.Number getMinMajorVersion();
- Type: java.lang.Number
- Default: No minimum version is being enforced
Minimal Major version to release.
This can be useful to set to 1, as breaking changes before the 1.x major release are not incrementing the major version number.
Can not be set together with majorVersion.
minNodeVersionOptional
public java.lang.String getMinNodeVersion();
- Type: java.lang.String
- Default: no "engines" specified
Minimum Node.js version to require via package.json engines (inclusive).
~~mutableBuild~~Optional
- Deprecated: - Use
buildWorkflowOptions.mutableBuild
public java.lang.Boolean getMutableBuild();
- Type: java.lang.Boolean
- Default: true
Automatically update files modified during builds to pull-request branches.
This means that any files synthesized by projen or e.g. test snapshots will always be up-to-date before a PR is merged.
Implies that PR builds do not have anti-tamper checks.
nameOptional
public java.lang.String getName();
- Type: java.lang.String
- Default: $BASEDIR
This is the name of your project.
npmAccessOptional
public NpmAccess getNpmAccess();
- Type: io.github.cdklabs.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.
npmDistTagOptional
public java.lang.String getNpmDistTag();
- Type: java.lang.String
- Default: "latest"
The npmDistTag to use when publishing from the default branch.
To set the npm dist-tag for release branches, set the npmDistTag property
for each branch.
~~npmignore~~Optional
- Deprecated: - use
project.addPackageIgnore
public java.util.List<java.lang.String> getNpmignore();
- Type: java.util.List
Additional entries to .npmignore.
npmignoreEnabledOptional
public java.lang.Boolean getNpmignoreEnabled();
- Type: java.lang.Boolean
- Default: true
Defines an .npmignore file. Normally this is only needed for libraries that are packaged as tarballs.
npmIgnoreOptionsOptional
public IgnoreFileOptions getNpmIgnoreOptions();
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .npmignore file.
npmProvenanceOptional
public java.lang.Boolean getNpmProvenance();
- Type: java.lang.Boolean
- 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.
~~npmRegistry~~Optional
- Deprecated: use
npmRegistryUrlinstead
public java.lang.String getNpmRegistry();
- Type: java.lang.String
The host name of the npm registry to publish to.
Cannot be set together with npmRegistryUrl.
npmRegistryUrlOptional
public java.lang.String getNpmRegistryUrl();
- Type: java.lang.String
- Default: "https://registry.npmjs.org"
The base URL of the npm package registry.
Must be a URL (e.g. start with "https://" or "http://")
npmTokenSecretOptional
public java.lang.String getNpmTokenSecret();
- Type: java.lang.String
- Default: "NPM_TOKEN"
GitHub secret which contains the NPM token to use when publishing packages.
outdirOptional
public java.lang.String getOutdir();
- Type: java.lang.String
- Default: "."
The root directory of the project. Relative to this directory, all files are synthesized.
If this project has a parent, this directory is relative to the parent directory and it cannot be the same as the parent or any of it's other subprojects.
packageOptional
public java.lang.Boolean getPackage();
- Type: java.lang.Boolean
- Default: true
Defines a package task that will produce an npm tarball under the artifacts directory (e.g. dist).
packageManagerOptional
public NodePackageManager getPackageManager();
- Type: io.github.cdklabs.projen.javascript.NodePackageManager
- Default: NodePackageManager.YARN_CLASSIC
The Node Package Manager used to execute scripts.
packageNameOptional
public java.lang.String getPackageName();
- Type: java.lang.String
- Default: defaults to project name
The "name" in package.json.
parentOptional
public Project getParent();
- Type: io.github.cdklabs.projen.Project
The parent project, if this project is part of a bigger project.
peerDependencyOptionsOptional
public PeerDependencyOptions getPeerDependencyOptions();
- Type: io.github.cdklabs.projen.javascript.PeerDependencyOptions
Options for peerDeps.
peerDepsOptional
public java.util.List<java.lang.String> getPeerDeps();
- Type: java.util.List
- 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.
pnpmVersionOptional
public java.lang.String getPnpmVersion();
- Type: java.lang.String
- Default: "7"
The version of PNPM to use if using PNPM as a package manager.
postBuildStepsOptional
public java.util.List<JobStep> getPostBuildSteps();
- Type: java.util.List
- Default: []
Steps to execute after build as part of the release workflow.
prereleaseOptional
public java.lang.String getPrerelease();
- Type: java.lang.String
- Default: normal semantic versions
Bump versions from the default branch as pre-releases (e.g. "beta", "alpha", "pre").
prettierOptional
public java.lang.Boolean getPrettier();
- Type: java.lang.Boolean
- Default: false
Setup prettier.
prettierOptionsOptional
public PrettierOptions getPrettierOptions();
- Type: io.github.cdklabs.projen.javascript.PrettierOptions
- Default: default options
Prettier options.
~~projectType~~Optional
- Deprecated: no longer supported at the base project level
public ProjectType getProjectType();
- Type: io.github.cdklabs.projen.ProjectType
- Default: ProjectType.UNKNOWN
Which type of project this is (library/app).
projenCommandOptional
public java.lang.String getProjenCommand();
- Type: java.lang.String
- Default: "npx projen"
The shell command to use in order to run the projen CLI.
Can be used to customize in special environments.
projenCredentialsOptional
public GithubCredentials getProjenCredentials();
- Type: io.github.cdklabs.projen.github.GithubCredentials
- Default: use a personal access token named PROJEN_GITHUB_TOKEN
Choose a method of providing GitHub API access for projen workflows.
projenDevDependencyOptional
public java.lang.Boolean getProjenDevDependency();
- Type: java.lang.Boolean
- Default: true if not a subproject
Indicates of "projen" should be installed as a devDependency.
projenrcJsOptional
public java.lang.Boolean getProjenrcJs();
- Type: java.lang.Boolean
- Default: true if projenrcJson is false
Generate (once) .projenrc.js (in JavaScript). Set to false in order to disable .projenrc.js generation.
projenrcJsonOptional
public java.lang.Boolean getProjenrcJson();
- Type: java.lang.Boolean
- Default: false
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation.
projenrcJsonOptionsOptional
public ProjenrcJsonOptions getProjenrcJsonOptions();
- Type: io.github.cdklabs.projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
projenrcJsOptionsOptional
public ProjenrcOptions getProjenrcJsOptions();
- Type: io.github.cdklabs.projen.javascript.ProjenrcOptions
- Default: default options
Options for .projenrc.js.
projenrcTsOptional
public java.lang.Boolean getProjenrcTs();
- Type: java.lang.Boolean
- Default: false
Use TypeScript for your projenrc file (.projenrc.ts).
projenrcTsOptionsOptional
public ProjenrcOptions getProjenrcTsOptions();
- Type: io.github.cdklabs.projen.typescript.ProjenrcOptions
Options for .projenrc.ts.
~~projenTokenSecret~~Optional
- Deprecated: use
projenCredentials
public java.lang.String getProjenTokenSecret();
- Type: java.lang.String
- Default: "PROJEN_GITHUB_TOKEN"
The name of a secret which includes a GitHub Personal Access Token to be used by projen workflows.
This token needs to have the repo, workflows
and packages scope.
projenVersionOptional
public java.lang.String getProjenVersion();
- Type: java.lang.String
- Default: Defaults to the latest version.
Version of projen to install.
publishDryRunOptional
public java.lang.Boolean getPublishDryRun();
- Type: java.lang.Boolean
- Default: false
Instead of actually publishing to package managers, just print the publishing command.
publishTasksOptional
public java.lang.Boolean getPublishTasks();
- Type: java.lang.Boolean
- Default: false
Define publishing tasks that can be executed manually as well as workflows.
Normally, publishing only happens within automated workflows. Enable this in order to create a publishing task for each publishing activity.
pullRequestTemplateOptional
public java.lang.Boolean getPullRequestTemplate();
- Type: java.lang.Boolean
- Default: true
Include a GitHub pull request template.
pullRequestTemplateContentsOptional
public java.util.List<java.lang.String> getPullRequestTemplateContents();
- Type: java.util.List
- Default: default content
The contents of the pull request template.
readmeOptional
public SampleReadmeProps getReadme();
- Type: io.github.cdklabs.projen.SampleReadmeProps
- Default: { filename: 'README.md', contents: '# replace this' }
The README setup.
releasableCommitsOptional
public ReleasableCommits getReleasableCommits();
- Type: io.github.cdklabs.projen.ReleasableCommits
- Default: ReleasableCommits.everyCommit()
Find commits that should be considered releasable Used to decide if a release is required.
releaseOptional
public java.lang.Boolean getRelease();
- Type: java.lang.Boolean
- Default: true (false for subprojects)
Add release management to this project.
releaseBranchesOptional
public java.util.Map<java.lang.String, BranchOptions> getReleaseBranches();
- Type: java.util.Map
- Default: no additional branches are used for release. you can use
addBranch()to add additional branches.
Defines additional release branches.
A workflow will be created for each
release branch which will publish releases from commits in this branch.
Each release branch must be assigned a major version number which is used
to enforce that versions published from that branch always use that major
version. If multiple branches are used, the majorVersion field must also
be provided for the default branch.
~~releaseEveryCommit~~Optional
- Deprecated: Use
releaseTrigger: ReleaseTrigger.continuous()instead
public java.lang.Boolean getReleaseEveryCommit();
- Type: java.lang.Boolean
- Default: true
Automatically release new versions every commit to one of branches in releaseBranches.
releaseFailureIssueOptional
public java.lang.Boolean getReleaseFailureIssue();
- Type: java.lang.Boolean
- Default: false
Create a github issue on every failed publishing task.
releaseFailureIssueLabelOptional
public java.lang.String getReleaseFailureIssueLabel();
- Type: java.lang.String
- Default: "failed-release"
The label to apply to issues indicating publish failures.
Only applies if releaseFailureIssue is true.
~~releaseSchedule~~Optional
- Deprecated: Use
releaseTrigger: ReleaseTrigger.scheduled()instead
public java.lang.String getReleaseSchedule();
- Type: java.lang.String
- Default: no scheduled releases
CRON schedule to trigger new releases.
releaseTagPrefixOptional
public java.lang.String getReleaseTagPrefix();
- Type: java.lang.String
- Default: "v"
Automatically add the given prefix to release tags.
Useful if you are releasing on multiple branches with overlapping version numbers. Note: this prefix is used to detect the latest tagged version when bumping, so if you change this on a project with an existing version history, you may need to manually tag your latest release with the new prefix.
releaseToNpmOptional
public java.lang.Boolean getReleaseToNpm();
- Type: java.lang.Boolean
- Default: false
Automatically release to npm when new versions are introduced.
releaseTriggerOptional
public ReleaseTrigger getReleaseTrigger();
- Type: io.github.cdklabs.projen.release.ReleaseTrigger
- Default: Continuous releases (
ReleaseTrigger.continuous())
The release trigger to use.
~~releaseWorkflow~~Optional
- Deprecated: see
release.
public java.lang.Boolean getReleaseWorkflow();
- Type: java.lang.Boolean
- Default: true if not a subproject
DEPRECATED: renamed to release.
releaseWorkflowNameOptional
public java.lang.String getReleaseWorkflowName();
- Type: java.lang.String
- Default: "release"
The name of the default release workflow.
releaseWorkflowSetupStepsOptional
public java.util.List<JobStep> getReleaseWorkflowSetupSteps();
- Type: java.util.List
A set of workflow steps to execute in order to setup the workflow container.
renovatebotOptional
public java.lang.Boolean getRenovatebot();
- Type: java.lang.Boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptionsOptional
public RenovatebotOptions getRenovatebotOptions();
- Type: io.github.cdklabs.projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
repositoryOptional
public java.lang.String getRepository();
- Type: java.lang.String
The repository is the location where the actual code for your package lives.
See https://classic.yarnpkg.com/en/docs/package-json/#toc-repository
repositoryDirectoryOptional
public java.lang.String getRepositoryDirectory();
- Type: java.lang.String
If the package.json for your package is not in the root directory (for example if it is part of a monorepo), you can specify the directory in which it lives.
sampleCodeOptional
public java.lang.Boolean getSampleCode();
- Type: java.lang.Boolean
- Default: true
Generate one-time sample in src/ and test/ if there are no files there.
scopedPackagesOptionsOptional
public java.util.List<ScopedPackagesOptions> getScopedPackagesOptions();
- Type: java.util.List
- Default: fetch all scoped packages from the public npm registry
Options for privately hosted scoped packages.
~~scripts~~Optional
- Deprecated: use
project.addTask()orpackage.setScript()
public java.util.Map<java.lang.String, java.lang.String> getScripts();
- Type: java.util.Map
- 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.
srcdirOptional
public java.lang.String getSrcdir();
- Type: java.lang.String
- Default: "src"
Typescript sources directory.
stabilityOptional
public java.lang.String getStability();
- Type: java.lang.String
Package's Stability.
staleOptional
public java.lang.Boolean getStale();
- Type: java.lang.Boolean
- Default: false
Auto-close of stale issues and pull request.
See staleOptions for options.
staleOptionsOptional
public StaleOptions getStaleOptions();
- Type: io.github.cdklabs.projen.github.StaleOptions
- Default: see defaults in
StaleOptions
Auto-close stale issues and pull requests.
To disable set stale to false.
testdirOptional
public java.lang.String getTestdir();
- Type: java.lang.String
- Default: "test"
Jest tests directory.
Tests files should be named xxx.test.ts.
If this directory is under srcdir (e.g. src/test, src/__tests__),
then tests are going to be compiled into lib/ and executed as javascript.
If the test directory is outside of src, then we configure jest to
compile the code in-memory.
tsconfigOptional
public TypescriptConfigOptions getTsconfig();
- Type: io.github.cdklabs.projen.javascript.TypescriptConfigOptions
- Default: default options
Custom TSConfig.
tsconfigDevOptional
public TypescriptConfigOptions getTsconfigDev();
- Type: io.github.cdklabs.projen.javascript.TypescriptConfigOptions
- Default: use the production tsconfig options
Custom tsconfig options for the development tsconfig.json file (used for testing).
tsconfigDevFileOptional
public java.lang.String getTsconfigDevFile();
- Type: java.lang.String
- Default: "tsconfig.dev.json"
The name of the development tsconfig.json file.
tsJestOptionsOptional
public TsJestOptions getTsJestOptions();
- Type: io.github.cdklabs.projen.typescript.TsJestOptions
Options for ts-jest.
typescriptVersionOptional
public java.lang.String getTypescriptVersion();
- Type: java.lang.String
- Default: "latest"
TypeScript version to use.
NOTE: Typescript is not semantically versioned and should remain on the
same minor, so we recommend using a ~ dependency (e.g. ~1.2.3).
versionrcOptionsOptional
public java.util.Map<java.lang.String, java.lang.Object> getVersionrcOptions();
- Type: java.util.Map
- 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.
vscodeOptional
public java.lang.Boolean getVscode();
- Type: java.lang.Boolean
- Default: true
Enable VSCode integration.
Enabled by default for root projects. Disabled for non-root projects.
workflowBootstrapStepsOptional
public java.util.List<JobStep> getWorkflowBootstrapSteps();
- Type: java.util.List
- Default: "yarn install --frozen-lockfile && yarn projen"
Workflow steps to use in order to bootstrap this repo.
workflowContainerImageOptional
public java.lang.String getWorkflowContainerImage();
- Type: java.lang.String
- Default: default image
Container image to use for GitHub workflows.
workflowGitIdentityOptional
public GitIdentity getWorkflowGitIdentity();
- Type: io.github.cdklabs.projen.github.GitIdentity
- Default: GitHub Actions
The git identity to use in workflows.
workflowNodeVersionOptional
public java.lang.String getWorkflowNodeVersion();
- Type: java.lang.String
- Default: same as
minNodeVersion
The node version to use in GitHub workflows.
workflowPackageCacheOptional
public java.lang.Boolean getWorkflowPackageCache();
- Type: java.lang.Boolean
- Default: false
Enable Node.js package cache in GitHub workflows.
workflowRunsOnOptional
public java.util.List<java.lang.String> getWorkflowRunsOn();
- Type: java.util.List
- Default: ["ubuntu-latest"]
Github Runner selection labels.
workflowRunsOnGroupOptional
public GroupRunnerOptions getWorkflowRunsOnGroup();
- Type: io.github.cdklabs.projen.GroupRunnerOptions
Github Runner Group selection options.
yarnBerryOptionsOptional
public YarnBerryOptions getYarnBerryOptions();
- Type: io.github.cdklabs.projen.javascript.YarnBerryOptions
- Default: Yarn Berry v4 with all default options
Options for Yarn Berry.
commitGeneratedCodeOptional
public java.lang.Boolean getCommitGeneratedCode();
- Type: java.lang.Boolean
- Default: false
Whether to commit the code generated by the OpenAPI Generator.
mockDataOptionsOptional
public MockResponseDataGenerationOptions getMockDataOptions();
Options for the generated mock response data.
GeneratedTypeScriptReactQueryHooksOptions
Options for configuring a generated typescript hooks library project.
Initializer
import software.aws.pdk.type_safe_api.GeneratedTypeScriptReactQueryHooksOptions;
GeneratedTypeScriptReactQueryHooksOptions.builder()
// .allowLibraryDependencies(java.lang.Boolean)
// .artifactsDirectory(java.lang.String)
// .authorEmail(java.lang.String)
// .authorName(java.lang.String)
// .authorOrganization(java.lang.Boolean)
// .authorUrl(java.lang.String)
// .autoApproveOptions(AutoApproveOptions)
// .autoApproveUpgrades(java.lang.Boolean)
// .autoDetectBin(java.lang.Boolean)
// .autoMerge(java.lang.Boolean)
// .autoMergeOptions(AutoMergeOptions)
// .bin(java.util.Map<java.lang.String, java.lang.String>)
// .bugsEmail(java.lang.String)
// .bugsUrl(java.lang.String)
// .buildWorkflow(java.lang.Boolean)
// .buildWorkflowOptions(BuildWorkflowOptions)
// .buildWorkflowTriggers(Triggers)
// .bundledDeps(java.util.List<java.lang.String>)
// .bundlerOptions(BundlerOptions)
// .checkLicenses(LicenseCheckerOptions)
// .clobber(java.lang.Boolean)
// .codeArtifactOptions(CodeArtifactOptions)
// .codeCov(java.lang.Boolean)
// .codeCovTokenSecret(java.lang.String)
// .commitGenerated(java.lang.Boolean)
// .copyrightOwner(java.lang.String)
// .copyrightPeriod(java.lang.String)
// .defaultReleaseBranch(java.lang.String)
// .dependabot(java.lang.Boolean)
// .dependabotOptions(DependabotOptions)
// .deps(java.util.List<java.lang.String>)
// .depsUpgrade(java.lang.Boolean)
// .depsUpgradeOptions(UpgradeDependenciesOptions)
// .description(java.lang.String)
// .devContainer(java.lang.Boolean)
// .devDeps(java.util.List<java.lang.String>)
// .disableTsconfig(java.lang.Boolean)
// .disableTsconfigDev(java.lang.Boolean)
// .docgen(java.lang.Boolean)
// .docsDirectory(java.lang.String)
// .entrypoint(java.lang.String)
// .entrypointTypes(java.lang.String)
// .eslint(java.lang.Boolean)
// .eslintOptions(EslintOptions)
// .github(java.lang.Boolean)
// .githubOptions(GitHubOptions)
// .gitignore(java.util.List<java.lang.String>)
// .gitIgnoreOptions(IgnoreFileOptions)
// .gitOptions(GitOptions)
// .gitpod(java.lang.Boolean)
// .homepage(java.lang.String)
// .jest(java.lang.Boolean)
// .jestOptions(JestOptions)
// .jsiiReleaseVersion(java.lang.String)
// .keywords(java.util.List<java.lang.String>)
// .libdir(java.lang.String)
// .license(java.lang.String)
// .licensed(java.lang.Boolean)
// .logging(LoggerOptions)
// .majorVersion(java.lang.Number)
// .maxNodeVersion(java.lang.String)
// .mergify(java.lang.Boolean)
// .mergifyOptions(MergifyOptions)
// .minMajorVersion(java.lang.Number)
// .minNodeVersion(java.lang.String)
// .mutableBuild(java.lang.Boolean)
// .name(java.lang.String)
// .npmAccess(NpmAccess)
// .npmDistTag(java.lang.String)
// .npmignore(java.util.List<java.lang.String>)
// .npmignoreEnabled(java.lang.Boolean)
// .npmIgnoreOptions(IgnoreFileOptions)
// .npmProvenance(java.lang.Boolean)
// .npmRegistry(java.lang.String)
// .npmRegistryUrl(java.lang.String)
// .npmTokenSecret(java.lang.String)
// .outdir(java.lang.String)
// .package(java.lang.Boolean)
// .packageManager(NodePackageManager)
// .packageName(java.lang.String)
// .parent(Project)
// .peerDependencyOptions(PeerDependencyOptions)
// .peerDeps(java.util.List<java.lang.String>)
// .pnpmVersion(java.lang.String)
// .postBuildSteps(java.util.List<JobStep>)
// .prerelease(java.lang.String)
// .prettier(java.lang.Boolean)
// .prettierOptions(PrettierOptions)
// .projectType(ProjectType)
// .projenCommand(java.lang.String)
// .projenCredentials(GithubCredentials)
// .projenDevDependency(java.lang.Boolean)
// .projenrcJs(java.lang.Boolean)
// .projenrcJson(java.lang.Boolean)
// .projenrcJsonOptions(ProjenrcJsonOptions)
// .projenrcJsOptions(ProjenrcOptions)
// .projenrcTs(java.lang.Boolean)
// .projenrcTsOptions(ProjenrcOptions)
// .projenTokenSecret(java.lang.String)
// .projenVersion(java.lang.String)
// .publishDryRun(java.lang.Boolean)
// .publishTasks(java.lang.Boolean)
// .pullRequestTemplate(java.lang.Boolean)
// .pullRequestTemplateContents(java.util.List<java.lang.String>)
// .readme(SampleReadmeProps)
// .releasableCommits(ReleasableCommits)
// .release(java.lang.Boolean)
// .releaseBranches(java.util.Map<java.lang.String, BranchOptions>)
// .releaseEveryCommit(java.lang.Boolean)
// .releaseFailureIssue(java.lang.Boolean)
// .releaseFailureIssueLabel(java.lang.String)
// .releaseSchedule(java.lang.String)
// .releaseTagPrefix(java.lang.String)
// .releaseToNpm(java.lang.Boolean)
// .releaseTrigger(ReleaseTrigger)
// .releaseWorkflow(java.lang.Boolean)
// .releaseWorkflowName(java.lang.String)
// .releaseWorkflowSetupSteps(java.util.List<JobStep>)
// .renovatebot(java.lang.Boolean)
// .renovatebotOptions(RenovatebotOptions)
// .repository(java.lang.String)
// .repositoryDirectory(java.lang.String)
// .sampleCode(java.lang.Boolean)
// .scopedPackagesOptions(java.util.List<ScopedPackagesOptions>)
// .scripts(java.util.Map<java.lang.String, java.lang.String>)
// .srcdir(java.lang.String)
// .stability(java.lang.String)
// .stale(java.lang.Boolean)
// .staleOptions(StaleOptions)
// .testdir(java.lang.String)
// .tsconfig(TypescriptConfigOptions)
// .tsconfigDev(TypescriptConfigOptions)
// .tsconfigDevFile(java.lang.String)
// .tsJestOptions(TsJestOptions)
// .typescriptVersion(java.lang.String)
// .versionrcOptions(java.util.Map<java.lang.String, java.lang.Object>)
// .vscode(java.lang.Boolean)
// .workflowBootstrapSteps(java.util.List<JobStep>)
// .workflowContainerImage(java.lang.String)
// .workflowGitIdentity(GitIdentity)
// .workflowNodeVersion(java.lang.String)
// .workflowPackageCache(java.lang.Boolean)
// .workflowRunsOn(java.util.List<java.lang.String>)
// .workflowRunsOnGroup(GroupRunnerOptions)
// .yarnBerryOptions(YarnBerryOptions)
// .commitGeneratedCode(java.lang.Boolean)
// .useReactQueryV5(java.lang.Boolean)
.build();
Properties
| Name | Type | Description |
|---|---|---|
allowLibraryDependencies |
java.lang.Boolean |
Allow the project to include peerDependencies and bundledDependencies. |
artifactsDirectory |
java.lang.String |
A directory which will contain build artifacts. |
authorEmail |
java.lang.String |
Author's e-mail. |
authorName |
java.lang.String |
Author's name. |
authorOrganization |
java.lang.Boolean |
Is the author an organization. |
authorUrl |
java.lang.String |
Author's URL / Website. |
autoApproveOptions |
io.github.cdklabs.projen.github.AutoApproveOptions |
Enable and configure the 'auto approve' workflow. |
autoApproveUpgrades |
java.lang.Boolean |
Automatically approve deps upgrade PRs, allowing them to be merged by mergify (if configued). |
autoDetectBin |
java.lang.Boolean |
Automatically add all executables under the bin directory to your package.json file under the bin section. |
autoMerge |
java.lang.Boolean |
Enable automatic merging on GitHub. |
autoMergeOptions |
io.github.cdklabs.projen.github.AutoMergeOptions |
Configure options for automatic merging on GitHub. |
bin |
java.util.Map |
Binary programs vended with your module. |
bugsEmail |
java.lang.String |
The email address to which issues should be reported. |
bugsUrl |
java.lang.String |
The url to your project's issue tracker. |
buildWorkflow |
java.lang.Boolean |
Define a GitHub workflow for building PRs. |
buildWorkflowOptions |
io.github.cdklabs.projen.javascript.BuildWorkflowOptions |
Options for PR build workflow. |
buildWorkflowTriggers |
io.github.cdklabs.projen.github.workflows.Triggers |
Build workflow triggers. |
bundledDeps |
java.util.List |
List of dependencies to bundle into this module. |
bundlerOptions |
io.github.cdklabs.projen.javascript.BundlerOptions |
Options for Bundler. |
checkLicenses |
io.github.cdklabs.projen.javascript.LicenseCheckerOptions |
Configure which licenses should be deemed acceptable for use by dependencies. |
clobber |
java.lang.Boolean |
Add a clobber task which resets the repo to origin. |
codeArtifactOptions |
io.github.cdklabs.projen.javascript.CodeArtifactOptions |
Options for npm packages using AWS CodeArtifact. |
codeCov |
java.lang.Boolean |
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. |
codeCovTokenSecret |
java.lang.String |
Define the secret name for a specified https://codecov.io/ token A secret is required to send coverage for private repositories. |
commitGenerated |
java.lang.Boolean |
Whether to commit the managed files by default. |
copyrightOwner |
java.lang.String |
License copyright owner. |
copyrightPeriod |
java.lang.String |
The copyright years to put in the LICENSE file. |
defaultReleaseBranch |
java.lang.String |
The name of the main release branch. |
dependabot |
java.lang.Boolean |
Use dependabot to handle dependency upgrades. |
dependabotOptions |
io.github.cdklabs.projen.github.DependabotOptions |
Options for dependabot. |
deps |
java.util.List |
Runtime dependencies of this module. |
depsUpgrade |
java.lang.Boolean |
Use tasks and github workflows to handle dependency upgrades. |
depsUpgradeOptions |
io.github.cdklabs.projen.javascript.UpgradeDependenciesOptions |
Options for UpgradeDependencies. |
description |
java.lang.String |
The description is just a string that helps people understand the purpose of the package. |
devContainer |
java.lang.Boolean |
Add a VSCode development environment (used for GitHub Codespaces). |
devDeps |
java.util.List |
Build dependencies for this module. |
disableTsconfig |
java.lang.Boolean |
Do not generate a tsconfig.json file (used by jsii projects since tsconfig.json is generated by the jsii compiler). |
disableTsconfigDev |
java.lang.Boolean |
Do not generate a tsconfig.dev.json file. |
docgen |
java.lang.Boolean |
Docgen by Typedoc. |
docsDirectory |
java.lang.String |
Docs directory. |
entrypoint |
java.lang.String |
Module entrypoint (main in package.json). Set to an empty string to not include main in your package.json. |
entrypointTypes |
java.lang.String |
The .d.ts file that includes the type declarations for this module. |
eslint |
java.lang.Boolean |
Setup eslint. |
eslintOptions |
io.github.cdklabs.projen.javascript.EslintOptions |
Eslint options. |
github |
java.lang.Boolean |
Enable GitHub integration. |
githubOptions |
io.github.cdklabs.projen.github.GitHubOptions |
Options for GitHub integration. |
gitignore |
java.util.List |
Additional entries to .gitignore. |
gitIgnoreOptions |
io.github.cdklabs.projen.IgnoreFileOptions |
Configuration options for .gitignore file. |
gitOptions |
io.github.cdklabs.projen.GitOptions |
Configuration options for git. |
gitpod |
java.lang.Boolean |
Add a Gitpod development environment. |
homepage |
java.lang.String |
Package's Homepage / Website. |
jest |
java.lang.Boolean |
Setup jest unit tests. |
jestOptions |
io.github.cdklabs.projen.javascript.JestOptions |
Jest options. |
jsiiReleaseVersion |
java.lang.String |
Version requirement of publib which is used to publish modules to npm. |
keywords |
java.util.List |
Keywords to include in package.json. |
libdir |
java.lang.String |
Typescript artifacts output directory. |
license |
java.lang.String |
License's SPDX identifier. |
licensed |
java.lang.Boolean |
Indicates if a license should be added. |
logging |
io.github.cdklabs.projen.LoggerOptions |
Configure logging options such as verbosity. |
majorVersion |
java.lang.Number |
Major version to release from the default branch. |
maxNodeVersion |
java.lang.String |
Minimum node.js version to require via engines (inclusive). |
mergify |
java.lang.Boolean |
Whether mergify should be enabled on this repository or not. |
mergifyOptions |
io.github.cdklabs.projen.github.MergifyOptions |
Options for mergify. |
minMajorVersion |
java.lang.Number |
Minimal Major version to release. |
minNodeVersion |
java.lang.String |
Minimum Node.js version to require via package.json engines (inclusive). |
mutableBuild |
java.lang.Boolean |
Automatically update files modified during builds to pull-request branches. |
name |
java.lang.String |
This is the name of your project. |
npmAccess |
io.github.cdklabs.projen.javascript.NpmAccess |
Access level of the npm package. |
npmDistTag |
java.lang.String |
The npmDistTag to use when publishing from the default branch. |
npmignore |
java.util.List |
Additional entries to .npmignore. |
npmignoreEnabled |
java.lang.Boolean |
Defines an .npmignore file. Normally this is only needed for libraries that are packaged as tarballs. |
npmIgnoreOptions |
io.github.cdklabs.projen.IgnoreFileOptions |
Configuration options for .npmignore file. |
npmProvenance |
java.lang.Boolean |
Should provenance statements be generated when the package is published. |
npmRegistry |
java.lang.String |
The host name of the npm registry to publish to. |
npmRegistryUrl |
java.lang.String |
The base URL of the npm package registry. |
npmTokenSecret |
java.lang.String |
GitHub secret which contains the NPM token to use when publishing packages. |
outdir |
java.lang.String |
The root directory of the project. Relative to this directory, all files are synthesized. |
package |
java.lang.Boolean |
Defines a package task that will produce an npm tarball under the artifacts directory (e.g. dist). |
packageManager |
io.github.cdklabs.projen.javascript.NodePackageManager |
The Node Package Manager used to execute scripts. |
packageName |
java.lang.String |
The "name" in package.json. |
parent |
io.github.cdklabs.projen.Project |
The parent project, if this project is part of a bigger project. |
peerDependencyOptions |
io.github.cdklabs.projen.javascript.PeerDependencyOptions |
Options for peerDeps. |
peerDeps |
java.util.List |
Peer dependencies for this module. |
pnpmVersion |
java.lang.String |
The version of PNPM to use if using PNPM as a package manager. |
postBuildSteps |
java.util.List |
Steps to execute after build as part of the release workflow. |
prerelease |
java.lang.String |
Bump versions from the default branch as pre-releases (e.g. "beta", "alpha", "pre"). |
prettier |
java.lang.Boolean |
Setup prettier. |
prettierOptions |
io.github.cdklabs.projen.javascript.PrettierOptions |
Prettier options. |
projectType |
io.github.cdklabs.projen.ProjectType |
Which type of project this is (library/app). |
projenCommand |
java.lang.String |
The shell command to use in order to run the projen CLI. |
projenCredentials |
io.github.cdklabs.projen.github.GithubCredentials |
Choose a method of providing GitHub API access for projen workflows. |
projenDevDependency |
java.lang.Boolean |
Indicates of "projen" should be installed as a devDependency. |
projenrcJs |
java.lang.Boolean |
Generate (once) .projenrc.js (in JavaScript). Set to false in order to disable .projenrc.js generation. |
projenrcJson |
java.lang.Boolean |
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation. |
projenrcJsonOptions |
io.github.cdklabs.projen.ProjenrcJsonOptions |
Options for .projenrc.json. |
projenrcJsOptions |
io.github.cdklabs.projen.javascript.ProjenrcOptions |
Options for .projenrc.js. |
projenrcTs |
java.lang.Boolean |
Use TypeScript for your projenrc file (.projenrc.ts). |
projenrcTsOptions |
io.github.cdklabs.projen.typescript.ProjenrcOptions |
Options for .projenrc.ts. |
projenTokenSecret |
java.lang.String |
The name of a secret which includes a GitHub Personal Access Token to be used by projen workflows. |
projenVersion |
java.lang.String |
Version of projen to install. |
publishDryRun |
java.lang.Boolean |
Instead of actually publishing to package managers, just print the publishing command. |
publishTasks |
java.lang.Boolean |
Define publishing tasks that can be executed manually as well as workflows. |
pullRequestTemplate |
java.lang.Boolean |
Include a GitHub pull request template. |
pullRequestTemplateContents |
java.util.List |
The contents of the pull request template. |
readme |
io.github.cdklabs.projen.SampleReadmeProps |
The README setup. |
releasableCommits |
io.github.cdklabs.projen.ReleasableCommits |
Find commits that should be considered releasable Used to decide if a release is required. |
release |
java.lang.Boolean |
Add release management to this project. |
releaseBranches |
java.util.Map |
Defines additional release branches. |
releaseEveryCommit |
java.lang.Boolean |
Automatically release new versions every commit to one of branches in releaseBranches. |
releaseFailureIssue |
java.lang.Boolean |
Create a github issue on every failed publishing task. |
releaseFailureIssueLabel |
java.lang.String |
The label to apply to issues indicating publish failures. |
releaseSchedule |
java.lang.String |
CRON schedule to trigger new releases. |
releaseTagPrefix |
java.lang.String |
Automatically add the given prefix to release tags. |
releaseToNpm |
java.lang.Boolean |
Automatically release to npm when new versions are introduced. |
releaseTrigger |
io.github.cdklabs.projen.release.ReleaseTrigger |
The release trigger to use. |
releaseWorkflow |
java.lang.Boolean |
DEPRECATED: renamed to release. |
releaseWorkflowName |
java.lang.String |
The name of the default release workflow. |
releaseWorkflowSetupSteps |
java.util.List |
A set of workflow steps to execute in order to setup the workflow container. |
renovatebot |
java.lang.Boolean |
Use renovatebot to handle dependency upgrades. |
renovatebotOptions |
io.github.cdklabs.projen.RenovatebotOptions |
Options for renovatebot. |
repository |
java.lang.String |
The repository is the location where the actual code for your package lives. |
repositoryDirectory |
java.lang.String |
If the package.json for your package is not in the root directory (for example if it is part of a monorepo), you can specify the directory in which it lives. |
sampleCode |
java.lang.Boolean |
Generate one-time sample in src/ and test/ if there are no files there. |
scopedPackagesOptions |
java.util.List |
Options for privately hosted scoped packages. |
scripts |
java.util.Map |
npm scripts to include. |
srcdir |
java.lang.String |
Typescript sources directory. |
stability |
java.lang.String |
Package's Stability. |
stale |
java.lang.Boolean |
Auto-close of stale issues and pull request. |
staleOptions |
io.github.cdklabs.projen.github.StaleOptions |
Auto-close stale issues and pull requests. |
testdir |
java.lang.String |
Jest tests directory. |
tsconfig |
io.github.cdklabs.projen.javascript.TypescriptConfigOptions |
Custom TSConfig. |
tsconfigDev |
io.github.cdklabs.projen.javascript.TypescriptConfigOptions |
Custom tsconfig options for the development tsconfig.json file (used for testing). |
tsconfigDevFile |
java.lang.String |
The name of the development tsconfig.json file. |
tsJestOptions |
io.github.cdklabs.projen.typescript.TsJestOptions |
Options for ts-jest. |
typescriptVersion |
java.lang.String |
TypeScript version to use. |
versionrcOptions |
java.util.Map |
Custom configuration used when creating changelog with standard-version package. |
vscode |
java.lang.Boolean |
Enable VSCode integration. |
workflowBootstrapSteps |
java.util.List |
Workflow steps to use in order to bootstrap this repo. |
workflowContainerImage |
java.lang.String |
Container image to use for GitHub workflows. |
workflowGitIdentity |
io.github.cdklabs.projen.github.GitIdentity |
The git identity to use in workflows. |
workflowNodeVersion |
java.lang.String |
The node version to use in GitHub workflows. |
workflowPackageCache |
java.lang.Boolean |
Enable Node.js package cache in GitHub workflows. |
workflowRunsOn |
java.util.List |
Github Runner selection labels. |
workflowRunsOnGroup |
io.github.cdklabs.projen.GroupRunnerOptions |
Github Runner Group selection options. |
yarnBerryOptions |
io.github.cdklabs.projen.javascript.YarnBerryOptions |
Options for Yarn Berry. |
commitGeneratedCode |
java.lang.Boolean |
Whether to commit the code generated by the OpenAPI Generator. |
useReactQueryV5 |
java.lang.Boolean |
Set to true to use. |
allowLibraryDependenciesOptional
public java.lang.Boolean getAllowLibraryDependencies();
- Type: java.lang.Boolean
- Default: true
Allow the project to include peerDependencies and bundledDependencies.
This is normally only allowed for libraries. For apps, there's no meaning for specifying these.
artifactsDirectoryOptional
public java.lang.String getArtifactsDirectory();
- Type: java.lang.String
- Default: "dist"
A directory which will contain build artifacts.
authorEmailOptional
public java.lang.String getAuthorEmail();
- Type: java.lang.String
Author's e-mail.
authorNameOptional
public java.lang.String getAuthorName();
- Type: java.lang.String
Author's name.
authorOrganizationOptional
public java.lang.Boolean getAuthorOrganization();
- Type: java.lang.Boolean
Is the author an organization.
authorUrlOptional
public java.lang.String getAuthorUrl();
- Type: java.lang.String
Author's URL / Website.
autoApproveOptionsOptional
public AutoApproveOptions getAutoApproveOptions();
- Type: io.github.cdklabs.projen.github.AutoApproveOptions
- Default: auto approve is disabled
Enable and configure the 'auto approve' workflow.
autoApproveUpgradesOptional
public java.lang.Boolean getAutoApproveUpgrades();
- Type: java.lang.Boolean
- Default: true
Automatically approve deps upgrade PRs, allowing them to be merged by mergify (if configued).
Throw if set to true but autoApproveOptions are not defined.
autoDetectBinOptional
public java.lang.Boolean getAutoDetectBin();
- Type: java.lang.Boolean
- Default: true
Automatically add all executables under the bin directory to your package.json file under the bin section.
autoMergeOptional
public java.lang.Boolean getAutoMerge();
- Type: java.lang.Boolean
- Default: true
Enable automatic merging on GitHub.
Has no effect if github.mergify
is set to false.
autoMergeOptionsOptional
public AutoMergeOptions getAutoMergeOptions();
- Type: io.github.cdklabs.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.
binOptional
public java.util.Map<java.lang.String, java.lang.String> getBin();
- Type: java.util.Map
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.
bugsEmailOptional
public java.lang.String getBugsEmail();
- Type: java.lang.String
The email address to which issues should be reported.
bugsUrlOptional
public java.lang.String getBugsUrl();
- Type: java.lang.String
The url to your project's issue tracker.
buildWorkflowOptional
public java.lang.Boolean getBuildWorkflow();
- Type: java.lang.Boolean
- Default: true if not a subproject
Define a GitHub workflow for building PRs.
buildWorkflowOptionsOptional
public BuildWorkflowOptions getBuildWorkflowOptions();
- Type: io.github.cdklabs.projen.javascript.BuildWorkflowOptions
Options for PR build workflow.
~~buildWorkflowTriggers~~Optional
- Deprecated: - Use
buildWorkflowOptions.workflowTriggers
public Triggers getBuildWorkflowTriggers();
- Type: io.github.cdklabs.projen.github.workflows.Triggers
- Default: "{ pullRequest: {}, workflowDispatch: {} }"
Build workflow triggers.
bundledDepsOptional
public java.util.List<java.lang.String> getBundledDeps();
- Type: java.util.List
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.
bundlerOptionsOptional
public BundlerOptions getBundlerOptions();
- Type: io.github.cdklabs.projen.javascript.BundlerOptions
Options for Bundler.
checkLicensesOptional
public LicenseCheckerOptions getCheckLicenses();
- Type: io.github.cdklabs.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.
clobberOptional
public java.lang.Boolean getClobber();
- Type: java.lang.Boolean
- Default: true, but false for subprojects
Add a clobber task which resets the repo to origin.
codeArtifactOptionsOptional
public CodeArtifactOptions getCodeArtifactOptions();
- Type: io.github.cdklabs.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
codeCovOptional
public java.lang.Boolean getCodeCov();
- Type: java.lang.Boolean
- 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.
codeCovTokenSecretOptional
public java.lang.String getCodeCovTokenSecret();
- Type: java.lang.String
- Default: if this option is not specified, only public repositories are supported
Define the secret name for a specified https://codecov.io/ token A secret is required to send coverage for private repositories.
commitGeneratedOptional
public java.lang.Boolean getCommitGenerated();
- Type: java.lang.Boolean
- Default: true
Whether to commit the managed files by default.
copyrightOwnerOptional
public java.lang.String getCopyrightOwner();
- Type: java.lang.String
- Default: defaults to the value of authorName or "" if
authorNameis undefined.
License copyright owner.
copyrightPeriodOptional
public java.lang.String getCopyrightPeriod();
- Type: java.lang.String
- Default: current year
The copyright years to put in the LICENSE file.
defaultReleaseBranchOptional
public java.lang.String getDefaultReleaseBranch();
- Type: java.lang.String
- Default: "main"
The name of the main release branch.
dependabotOptional
public java.lang.Boolean getDependabot();
- Type: java.lang.Boolean
- Default: false
Use dependabot to handle dependency upgrades.
Cannot be used in conjunction with depsUpgrade.
dependabotOptionsOptional
public DependabotOptions getDependabotOptions();
- Type: io.github.cdklabs.projen.github.DependabotOptions
- Default: default options
Options for dependabot.
depsOptional
public java.util.List<java.lang.String> getDeps();
- Type: java.util.List
- 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.
depsUpgradeOptional
public java.lang.Boolean getDepsUpgrade();
- Type: java.lang.Boolean
- Default: true
Use tasks and github workflows to handle dependency upgrades.
Cannot be used in conjunction with dependabot.
depsUpgradeOptionsOptional
public UpgradeDependenciesOptions getDepsUpgradeOptions();
- Type: io.github.cdklabs.projen.javascript.UpgradeDependenciesOptions
- Default: default options
Options for UpgradeDependencies.
descriptionOptional
public java.lang.String getDescription();
- Type: java.lang.String
The description is just a string that helps people understand the purpose of the package.
It can be used when searching for packages in a package manager as well. See https://classic.yarnpkg.com/en/docs/package-json/#toc-description
devContainerOptional
public java.lang.Boolean getDevContainer();
- Type: java.lang.Boolean
- Default: false
Add a VSCode development environment (used for GitHub Codespaces).
devDepsOptional
public java.util.List<java.lang.String> getDevDeps();
- Type: java.util.List
- 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.
disableTsconfigOptional
public java.lang.Boolean getDisableTsconfig();
- Type: java.lang.Boolean
- Default: false
Do not generate a tsconfig.json file (used by jsii projects since tsconfig.json is generated by the jsii compiler).
disableTsconfigDevOptional
public java.lang.Boolean getDisableTsconfigDev();
- Type: java.lang.Boolean
- Default: false
Do not generate a tsconfig.dev.json file.
docgenOptional
public java.lang.Boolean getDocgen();
- Type: java.lang.Boolean
- Default: false
Docgen by Typedoc.
docsDirectoryOptional
public java.lang.String getDocsDirectory();
- Type: java.lang.String
- Default: "docs"
Docs directory.
entrypointOptional
public java.lang.String getEntrypoint();
- Type: java.lang.String
- Default: "lib/index.js"
Module entrypoint (main in package.json). Set to an empty string to not include main in your package.json.
entrypointTypesOptional
public java.lang.String getEntrypointTypes();
- Type: java.lang.String
- Default: .d.ts file derived from the project's entrypoint (usually lib/index.d.ts)
The .d.ts file that includes the type declarations for this module.
eslintOptional
public java.lang.Boolean getEslint();
- Type: java.lang.Boolean
- Default: true
Setup eslint.
eslintOptionsOptional
public EslintOptions getEslintOptions();
- Type: io.github.cdklabs.projen.javascript.EslintOptions
- Default: opinionated default options
Eslint options.
githubOptional
public java.lang.Boolean getGithub();
- Type: java.lang.Boolean
- Default: true
Enable GitHub integration.
Enabled by default for root projects. Disabled for non-root projects.
githubOptionsOptional
public GitHubOptions getGithubOptions();
- Type: io.github.cdklabs.projen.github.GitHubOptions
- Default: see GitHubOptions
Options for GitHub integration.
gitignoreOptional
public java.util.List<java.lang.String> getGitignore();
- Type: java.util.List
Additional entries to .gitignore.
gitIgnoreOptionsOptional
public IgnoreFileOptions getGitIgnoreOptions();
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptionsOptional
public GitOptions getGitOptions();
- Type: io.github.cdklabs.projen.GitOptions
Configuration options for git.
gitpodOptional
public java.lang.Boolean getGitpod();
- Type: java.lang.Boolean
- Default: false
Add a Gitpod development environment.
homepageOptional
public java.lang.String getHomepage();
- Type: java.lang.String
Package's Homepage / Website.
jestOptional
public java.lang.Boolean getJest();
- Type: java.lang.Boolean
- Default: true
Setup jest unit tests.
jestOptionsOptional
public JestOptions getJestOptions();
- Type: io.github.cdklabs.projen.javascript.JestOptions
- Default: default options
Jest options.
jsiiReleaseVersionOptional
public java.lang.String getJsiiReleaseVersion();
- Type: java.lang.String
- Default: "latest"
Version requirement of publib which is used to publish modules to npm.
keywordsOptional
public java.util.List<java.lang.String> getKeywords();
- Type: java.util.List
Keywords to include in package.json.
libdirOptional
public java.lang.String getLibdir();
- Type: java.lang.String
- Default: "lib"
Typescript artifacts output directory.
licenseOptional
public java.lang.String getLicense();
- Type: java.lang.String
- Default: "Apache-2.0"
License's SPDX identifier.
See https://github.com/projen/projen/tree/main/license-text for a list of supported licenses.
Use the licensed option if you want to no license to be specified.
licensedOptional
public java.lang.Boolean getLicensed();
- Type: java.lang.Boolean
- Default: true
Indicates if a license should be added.
loggingOptional
public LoggerOptions getLogging();
- Type: io.github.cdklabs.projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
majorVersionOptional
public java.lang.Number getMajorVersion();
- Type: java.lang.Number
- Default: Major version is not enforced.
Major version to release from the default branch.
If this is specified, we bump the latest version of this major version line. If not specified, we bump the global latest version.
maxNodeVersionOptional
public java.lang.String getMaxNodeVersion();
- Type: java.lang.String
- Default: no max
Minimum node.js version to require via engines (inclusive).
~~mergify~~Optional
- Deprecated: use
githubOptions.mergifyinstead
public java.lang.Boolean getMergify();
- Type: java.lang.Boolean
- Default: true
Whether mergify should be enabled on this repository or not.
~~mergifyOptions~~Optional
- Deprecated: use
githubOptions.mergifyOptionsinstead
public MergifyOptions getMergifyOptions();
- Type: io.github.cdklabs.projen.github.MergifyOptions
- Default: default options
Options for mergify.
minMajorVersionOptional
public java.lang.Number getMinMajorVersion();
- Type: java.lang.Number
- Default: No minimum version is being enforced
Minimal Major version to release.
This can be useful to set to 1, as breaking changes before the 1.x major release are not incrementing the major version number.
Can not be set together with majorVersion.
minNodeVersionOptional
public java.lang.String getMinNodeVersion();
- Type: java.lang.String
- Default: no "engines" specified
Minimum Node.js version to require via package.json engines (inclusive).
~~mutableBuild~~Optional
- Deprecated: - Use
buildWorkflowOptions.mutableBuild
public java.lang.Boolean getMutableBuild();
- Type: java.lang.Boolean
- Default: true
Automatically update files modified during builds to pull-request branches.
This means that any files synthesized by projen or e.g. test snapshots will always be up-to-date before a PR is merged.
Implies that PR builds do not have anti-tamper checks.
nameOptional
public java.lang.String getName();
- Type: java.lang.String
- Default: $BASEDIR
This is the name of your project.
npmAccessOptional
public NpmAccess getNpmAccess();
- Type: io.github.cdklabs.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.
npmDistTagOptional
public java.lang.String getNpmDistTag();
- Type: java.lang.String
- Default: "latest"
The npmDistTag to use when publishing from the default branch.
To set the npm dist-tag for release branches, set the npmDistTag property
for each branch.
~~npmignore~~Optional
- Deprecated: - use
project.addPackageIgnore
public java.util.List<java.lang.String> getNpmignore();
- Type: java.util.List
Additional entries to .npmignore.
npmignoreEnabledOptional
public java.lang.Boolean getNpmignoreEnabled();
- Type: java.lang.Boolean
- Default: true
Defines an .npmignore file. Normally this is only needed for libraries that are packaged as tarballs.
npmIgnoreOptionsOptional
public IgnoreFileOptions getNpmIgnoreOptions();
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .npmignore file.
npmProvenanceOptional
public java.lang.Boolean getNpmProvenance();
- Type: java.lang.Boolean
- 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.
~~npmRegistry~~Optional
- Deprecated: use
npmRegistryUrlinstead
public java.lang.String getNpmRegistry();
- Type: java.lang.String
The host name of the npm registry to publish to.
Cannot be set together with npmRegistryUrl.
npmRegistryUrlOptional
public java.lang.String getNpmRegistryUrl();
- Type: java.lang.String
- Default: "https://registry.npmjs.org"
The base URL of the npm package registry.
Must be a URL (e.g. start with "https://" or "http://")
npmTokenSecretOptional
public java.lang.String getNpmTokenSecret();
- Type: java.lang.String
- Default: "NPM_TOKEN"
GitHub secret which contains the NPM token to use when publishing packages.
outdirOptional
public java.lang.String getOutdir();
- Type: java.lang.String
- Default: "."
The root directory of the project. Relative to this directory, all files are synthesized.
If this project has a parent, this directory is relative to the parent directory and it cannot be the same as the parent or any of it's other subprojects.
packageOptional
public java.lang.Boolean getPackage();
- Type: java.lang.Boolean
- Default: true
Defines a package task that will produce an npm tarball under the artifacts directory (e.g. dist).
packageManagerOptional
public NodePackageManager getPackageManager();
- Type: io.github.cdklabs.projen.javascript.NodePackageManager
- Default: NodePackageManager.YARN_CLASSIC
The Node Package Manager used to execute scripts.
packageNameOptional
public java.lang.String getPackageName();
- Type: java.lang.String
- Default: defaults to project name
The "name" in package.json.
parentOptional
public Project getParent();
- Type: io.github.cdklabs.projen.Project
The parent project, if this project is part of a bigger project.
peerDependencyOptionsOptional
public PeerDependencyOptions getPeerDependencyOptions();
- Type: io.github.cdklabs.projen.javascript.PeerDependencyOptions
Options for peerDeps.
peerDepsOptional
public java.util.List<java.lang.String> getPeerDeps();
- Type: java.util.List
- 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.
pnpmVersionOptional
public java.lang.String getPnpmVersion();
- Type: java.lang.String
- Default: "7"
The version of PNPM to use if using PNPM as a package manager.
postBuildStepsOptional
public java.util.List<JobStep> getPostBuildSteps();
- Type: java.util.List
- Default: []
Steps to execute after build as part of the release workflow.
prereleaseOptional
public java.lang.String getPrerelease();
- Type: java.lang.String
- Default: normal semantic versions
Bump versions from the default branch as pre-releases (e.g. "beta", "alpha", "pre").
prettierOptional
public java.lang.Boolean getPrettier();
- Type: java.lang.Boolean
- Default: false
Setup prettier.
prettierOptionsOptional
public PrettierOptions getPrettierOptions();
- Type: io.github.cdklabs.projen.javascript.PrettierOptions
- Default: default options
Prettier options.
~~projectType~~Optional
- Deprecated: no longer supported at the base project level
public ProjectType getProjectType();
- Type: io.github.cdklabs.projen.ProjectType
- Default: ProjectType.UNKNOWN
Which type of project this is (library/app).
projenCommandOptional
public java.lang.String getProjenCommand();
- Type: java.lang.String
- Default: "npx projen"
The shell command to use in order to run the projen CLI.
Can be used to customize in special environments.
projenCredentialsOptional
public GithubCredentials getProjenCredentials();
- Type: io.github.cdklabs.projen.github.GithubCredentials
- Default: use a personal access token named PROJEN_GITHUB_TOKEN
Choose a method of providing GitHub API access for projen workflows.
projenDevDependencyOptional
public java.lang.Boolean getProjenDevDependency();
- Type: java.lang.Boolean
- Default: true if not a subproject
Indicates of "projen" should be installed as a devDependency.
projenrcJsOptional
public java.lang.Boolean getProjenrcJs();
- Type: java.lang.Boolean
- Default: true if projenrcJson is false
Generate (once) .projenrc.js (in JavaScript). Set to false in order to disable .projenrc.js generation.
projenrcJsonOptional
public java.lang.Boolean getProjenrcJson();
- Type: java.lang.Boolean
- Default: false
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation.
projenrcJsonOptionsOptional
public ProjenrcJsonOptions getProjenrcJsonOptions();
- Type: io.github.cdklabs.projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
projenrcJsOptionsOptional
public ProjenrcOptions getProjenrcJsOptions();
- Type: io.github.cdklabs.projen.javascript.ProjenrcOptions
- Default: default options
Options for .projenrc.js.
projenrcTsOptional
public java.lang.Boolean getProjenrcTs();
- Type: java.lang.Boolean
- Default: false
Use TypeScript for your projenrc file (.projenrc.ts).
projenrcTsOptionsOptional
public ProjenrcOptions getProjenrcTsOptions();
- Type: io.github.cdklabs.projen.typescript.ProjenrcOptions
Options for .projenrc.ts.
~~projenTokenSecret~~Optional
- Deprecated: use
projenCredentials
public java.lang.String getProjenTokenSecret();
- Type: java.lang.String
- Default: "PROJEN_GITHUB_TOKEN"
The name of a secret which includes a GitHub Personal Access Token to be used by projen workflows.
This token needs to have the repo, workflows
and packages scope.
projenVersionOptional
public java.lang.String getProjenVersion();
- Type: java.lang.String
- Default: Defaults to the latest version.
Version of projen to install.
publishDryRunOptional
public java.lang.Boolean getPublishDryRun();
- Type: java.lang.Boolean
- Default: false
Instead of actually publishing to package managers, just print the publishing command.
publishTasksOptional
public java.lang.Boolean getPublishTasks();
- Type: java.lang.Boolean
- Default: false
Define publishing tasks that can be executed manually as well as workflows.
Normally, publishing only happens within automated workflows. Enable this in order to create a publishing task for each publishing activity.
pullRequestTemplateOptional
public java.lang.Boolean getPullRequestTemplate();
- Type: java.lang.Boolean
- Default: true
Include a GitHub pull request template.
pullRequestTemplateContentsOptional
public java.util.List<java.lang.String> getPullRequestTemplateContents();
- Type: java.util.List
- Default: default content
The contents of the pull request template.
readmeOptional
public SampleReadmeProps getReadme();
- Type: io.github.cdklabs.projen.SampleReadmeProps
- Default: { filename: 'README.md', contents: '# replace this' }
The README setup.
releasableCommitsOptional
public ReleasableCommits getReleasableCommits();
- Type: io.github.cdklabs.projen.ReleasableCommits
- Default: ReleasableCommits.everyCommit()
Find commits that should be considered releasable Used to decide if a release is required.
releaseOptional
public java.lang.Boolean getRelease();
- Type: java.lang.Boolean
- Default: true (false for subprojects)
Add release management to this project.
releaseBranchesOptional
public java.util.Map<java.lang.String, BranchOptions> getReleaseBranches();
- Type: java.util.Map
- Default: no additional branches are used for release. you can use
addBranch()to add additional branches.
Defines additional release branches.
A workflow will be created for each
release branch which will publish releases from commits in this branch.
Each release branch must be assigned a major version number which is used
to enforce that versions published from that branch always use that major
version. If multiple branches are used, the majorVersion field must also
be provided for the default branch.
~~releaseEveryCommit~~Optional
- Deprecated: Use
releaseTrigger: ReleaseTrigger.continuous()instead
public java.lang.Boolean getReleaseEveryCommit();
- Type: java.lang.Boolean
- Default: true
Automatically release new versions every commit to one of branches in releaseBranches.
releaseFailureIssueOptional
public java.lang.Boolean getReleaseFailureIssue();
- Type: java.lang.Boolean
- Default: false
Create a github issue on every failed publishing task.
releaseFailureIssueLabelOptional
public java.lang.String getReleaseFailureIssueLabel();
- Type: java.lang.String
- Default: "failed-release"
The label to apply to issues indicating publish failures.
Only applies if releaseFailureIssue is true.
~~releaseSchedule~~Optional
- Deprecated: Use
releaseTrigger: ReleaseTrigger.scheduled()instead
public java.lang.String getReleaseSchedule();
- Type: java.lang.String
- Default: no scheduled releases
CRON schedule to trigger new releases.
releaseTagPrefixOptional
public java.lang.String getReleaseTagPrefix();
- Type: java.lang.String
- Default: "v"
Automatically add the given prefix to release tags.
Useful if you are releasing on multiple branches with overlapping version numbers. Note: this prefix is used to detect the latest tagged version when bumping, so if you change this on a project with an existing version history, you may need to manually tag your latest release with the new prefix.
releaseToNpmOptional
public java.lang.Boolean getReleaseToNpm();
- Type: java.lang.Boolean
- Default: false
Automatically release to npm when new versions are introduced.
releaseTriggerOptional
public ReleaseTrigger getReleaseTrigger();
- Type: io.github.cdklabs.projen.release.ReleaseTrigger
- Default: Continuous releases (
ReleaseTrigger.continuous())
The release trigger to use.
~~releaseWorkflow~~Optional
- Deprecated: see
release.
public java.lang.Boolean getReleaseWorkflow();
- Type: java.lang.Boolean
- Default: true if not a subproject
DEPRECATED: renamed to release.
releaseWorkflowNameOptional
public java.lang.String getReleaseWorkflowName();
- Type: java.lang.String
- Default: "release"
The name of the default release workflow.
releaseWorkflowSetupStepsOptional
public java.util.List<JobStep> getReleaseWorkflowSetupSteps();
- Type: java.util.List
A set of workflow steps to execute in order to setup the workflow container.
renovatebotOptional
public java.lang.Boolean getRenovatebot();
- Type: java.lang.Boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptionsOptional
public RenovatebotOptions getRenovatebotOptions();
- Type: io.github.cdklabs.projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
repositoryOptional
public java.lang.String getRepository();
- Type: java.lang.String
The repository is the location where the actual code for your package lives.
See https://classic.yarnpkg.com/en/docs/package-json/#toc-repository
repositoryDirectoryOptional
public java.lang.String getRepositoryDirectory();
- Type: java.lang.String
If the package.json for your package is not in the root directory (for example if it is part of a monorepo), you can specify the directory in which it lives.
sampleCodeOptional
public java.lang.Boolean getSampleCode();
- Type: java.lang.Boolean
- Default: true
Generate one-time sample in src/ and test/ if there are no files there.
scopedPackagesOptionsOptional
public java.util.List<ScopedPackagesOptions> getScopedPackagesOptions();
- Type: java.util.List
- Default: fetch all scoped packages from the public npm registry
Options for privately hosted scoped packages.
~~scripts~~Optional
- Deprecated: use
project.addTask()orpackage.setScript()
public java.util.Map<java.lang.String, java.lang.String> getScripts();
- Type: java.util.Map
- 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.
srcdirOptional
public java.lang.String getSrcdir();
- Type: java.lang.String
- Default: "src"
Typescript sources directory.
stabilityOptional
public java.lang.String getStability();
- Type: java.lang.String
Package's Stability.
staleOptional
public java.lang.Boolean getStale();
- Type: java.lang.Boolean
- Default: false
Auto-close of stale issues and pull request.
See staleOptions for options.
staleOptionsOptional
public StaleOptions getStaleOptions();
- Type: io.github.cdklabs.projen.github.StaleOptions
- Default: see defaults in
StaleOptions
Auto-close stale issues and pull requests.
To disable set stale to false.
testdirOptional
public java.lang.String getTestdir();
- Type: java.lang.String
- Default: "test"
Jest tests directory.
Tests files should be named xxx.test.ts.
If this directory is under srcdir (e.g. src/test, src/__tests__),
then tests are going to be compiled into lib/ and executed as javascript.
If the test directory is outside of src, then we configure jest to
compile the code in-memory.
tsconfigOptional
public TypescriptConfigOptions getTsconfig();
- Type: io.github.cdklabs.projen.javascript.TypescriptConfigOptions
- Default: default options
Custom TSConfig.
tsconfigDevOptional
public TypescriptConfigOptions getTsconfigDev();
- Type: io.github.cdklabs.projen.javascript.TypescriptConfigOptions
- Default: use the production tsconfig options
Custom tsconfig options for the development tsconfig.json file (used for testing).
tsconfigDevFileOptional
public java.lang.String getTsconfigDevFile();
- Type: java.lang.String
- Default: "tsconfig.dev.json"
The name of the development tsconfig.json file.
tsJestOptionsOptional
public TsJestOptions getTsJestOptions();
- Type: io.github.cdklabs.projen.typescript.TsJestOptions
Options for ts-jest.
typescriptVersionOptional
public java.lang.String getTypescriptVersion();
- Type: java.lang.String
- Default: "latest"
TypeScript version to use.
NOTE: Typescript is not semantically versioned and should remain on the
same minor, so we recommend using a ~ dependency (e.g. ~1.2.3).
versionrcOptionsOptional
public java.util.Map<java.lang.String, java.lang.Object> getVersionrcOptions();
- Type: java.util.Map
- 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.
vscodeOptional
public java.lang.Boolean getVscode();
- Type: java.lang.Boolean
- Default: true
Enable VSCode integration.
Enabled by default for root projects. Disabled for non-root projects.
workflowBootstrapStepsOptional
public java.util.List<JobStep> getWorkflowBootstrapSteps();
- Type: java.util.List
- Default: "yarn install --frozen-lockfile && yarn projen"
Workflow steps to use in order to bootstrap this repo.
workflowContainerImageOptional
public java.lang.String getWorkflowContainerImage();
- Type: java.lang.String
- Default: default image
Container image to use for GitHub workflows.
workflowGitIdentityOptional
public GitIdentity getWorkflowGitIdentity();
- Type: io.github.cdklabs.projen.github.GitIdentity
- Default: GitHub Actions
The git identity to use in workflows.
workflowNodeVersionOptional
public java.lang.String getWorkflowNodeVersion();
- Type: java.lang.String
- Default: same as
minNodeVersion
The node version to use in GitHub workflows.
workflowPackageCacheOptional
public java.lang.Boolean getWorkflowPackageCache();
- Type: java.lang.Boolean
- Default: false
Enable Node.js package cache in GitHub workflows.
workflowRunsOnOptional
public java.util.List<java.lang.String> getWorkflowRunsOn();
- Type: java.util.List
- Default: ["ubuntu-latest"]
Github Runner selection labels.
workflowRunsOnGroupOptional
public GroupRunnerOptions getWorkflowRunsOnGroup();
- Type: io.github.cdklabs.projen.GroupRunnerOptions
Github Runner Group selection options.
yarnBerryOptionsOptional
public YarnBerryOptions getYarnBerryOptions();
- Type: io.github.cdklabs.projen.javascript.YarnBerryOptions
- Default: Yarn Berry v4 with all default options
Options for Yarn Berry.
commitGeneratedCodeOptional
public java.lang.Boolean getCommitGeneratedCode();
- Type: java.lang.Boolean
- Default: false
Whether to commit the code generated by the OpenAPI Generator.
useReactQueryV5Optional
public java.lang.Boolean getUseReactQueryV5();
- Type: java.lang.Boolean
- Default: false -
Set to true to use.
GeneratedTypeScriptRuntimeOptions
Options for configuring a generated typescript runtime project.
Initializer
import software.aws.pdk.type_safe_api.GeneratedTypeScriptRuntimeOptions;
GeneratedTypeScriptRuntimeOptions.builder()
// .allowLibraryDependencies(java.lang.Boolean)
// .artifactsDirectory(java.lang.String)
// .authorEmail(java.lang.String)
// .authorName(java.lang.String)
// .authorOrganization(java.lang.Boolean)
// .authorUrl(java.lang.String)
// .autoApproveOptions(AutoApproveOptions)
// .autoApproveUpgrades(java.lang.Boolean)
// .autoDetectBin(java.lang.Boolean)
// .autoMerge(java.lang.Boolean)
// .autoMergeOptions(AutoMergeOptions)
// .bin(java.util.Map<java.lang.String, java.lang.String>)
// .bugsEmail(java.lang.String)
// .bugsUrl(java.lang.String)
// .buildWorkflow(java.lang.Boolean)
// .buildWorkflowOptions(BuildWorkflowOptions)
// .buildWorkflowTriggers(Triggers)
// .bundledDeps(java.util.List<java.lang.String>)
// .bundlerOptions(BundlerOptions)
// .checkLicenses(LicenseCheckerOptions)
// .clobber(java.lang.Boolean)
// .codeArtifactOptions(CodeArtifactOptions)
// .codeCov(java.lang.Boolean)
// .codeCovTokenSecret(java.lang.String)
// .commitGenerated(java.lang.Boolean)
// .copyrightOwner(java.lang.String)
// .copyrightPeriod(java.lang.String)
// .defaultReleaseBranch(java.lang.String)
// .dependabot(java.lang.Boolean)
// .dependabotOptions(DependabotOptions)
// .deps(java.util.List<java.lang.String>)
// .depsUpgrade(java.lang.Boolean)
// .depsUpgradeOptions(UpgradeDependenciesOptions)
// .description(java.lang.String)
// .devContainer(java.lang.Boolean)
// .devDeps(java.util.List<java.lang.String>)
// .disableTsconfig(java.lang.Boolean)
// .disableTsconfigDev(java.lang.Boolean)
// .docgen(java.lang.Boolean)
// .docsDirectory(java.lang.String)
// .entrypoint(java.lang.String)
// .entrypointTypes(java.lang.String)
// .eslint(java.lang.Boolean)
// .eslintOptions(EslintOptions)
// .github(java.lang.Boolean)
// .githubOptions(GitHubOptions)
// .gitignore(java.util.List<java.lang.String>)
// .gitIgnoreOptions(IgnoreFileOptions)
// .gitOptions(GitOptions)
// .gitpod(java.lang.Boolean)
// .homepage(java.lang.String)
// .jest(java.lang.Boolean)
// .jestOptions(JestOptions)
// .jsiiReleaseVersion(java.lang.String)
// .keywords(java.util.List<java.lang.String>)
// .libdir(java.lang.String)
// .license(java.lang.String)
// .licensed(java.lang.Boolean)
// .logging(LoggerOptions)
// .majorVersion(java.lang.Number)
// .maxNodeVersion(java.lang.String)
// .mergify(java.lang.Boolean)
// .mergifyOptions(MergifyOptions)
// .minMajorVersion(java.lang.Number)
// .minNodeVersion(java.lang.String)
// .mutableBuild(java.lang.Boolean)
// .name(java.lang.String)
// .npmAccess(NpmAccess)
// .npmDistTag(java.lang.String)
// .npmignore(java.util.List<java.lang.String>)
// .npmignoreEnabled(java.lang.Boolean)
// .npmIgnoreOptions(IgnoreFileOptions)
// .npmProvenance(java.lang.Boolean)
// .npmRegistry(java.lang.String)
// .npmRegistryUrl(java.lang.String)
// .npmTokenSecret(java.lang.String)
// .outdir(java.lang.String)
// .package(java.lang.Boolean)
// .packageManager(NodePackageManager)
// .packageName(java.lang.String)
// .parent(Project)
// .peerDependencyOptions(PeerDependencyOptions)
// .peerDeps(java.util.List<java.lang.String>)
// .pnpmVersion(java.lang.String)
// .postBuildSteps(java.util.List<JobStep>)
// .prerelease(java.lang.String)
// .prettier(java.lang.Boolean)
// .prettierOptions(PrettierOptions)
// .projectType(ProjectType)
// .projenCommand(java.lang.String)
// .projenCredentials(GithubCredentials)
// .projenDevDependency(java.lang.Boolean)
// .projenrcJs(java.lang.Boolean)
// .projenrcJson(java.lang.Boolean)
// .projenrcJsonOptions(ProjenrcJsonOptions)
// .projenrcJsOptions(ProjenrcOptions)
// .projenrcTs(java.lang.Boolean)
// .projenrcTsOptions(ProjenrcOptions)
// .projenTokenSecret(java.lang.String)
// .projenVersion(java.lang.String)
// .publishDryRun(java.lang.Boolean)
// .publishTasks(java.lang.Boolean)
// .pullRequestTemplate(java.lang.Boolean)
// .pullRequestTemplateContents(java.util.List<java.lang.String>)
// .readme(SampleReadmeProps)
// .releasableCommits(ReleasableCommits)
// .release(java.lang.Boolean)
// .releaseBranches(java.util.Map<java.lang.String, BranchOptions>)
// .releaseEveryCommit(java.lang.Boolean)
// .releaseFailureIssue(java.lang.Boolean)
// .releaseFailureIssueLabel(java.lang.String)
// .releaseSchedule(java.lang.String)
// .releaseTagPrefix(java.lang.String)
// .releaseToNpm(java.lang.Boolean)
// .releaseTrigger(ReleaseTrigger)
// .releaseWorkflow(java.lang.Boolean)
// .releaseWorkflowName(java.lang.String)
// .releaseWorkflowSetupSteps(java.util.List<JobStep>)
// .renovatebot(java.lang.Boolean)
// .renovatebotOptions(RenovatebotOptions)
// .repository(java.lang.String)
// .repositoryDirectory(java.lang.String)
// .sampleCode(java.lang.Boolean)
// .scopedPackagesOptions(java.util.List<ScopedPackagesOptions>)
// .scripts(java.util.Map<java.lang.String, java.lang.String>)
// .srcdir(java.lang.String)
// .stability(java.lang.String)
// .stale(java.lang.Boolean)
// .staleOptions(StaleOptions)
// .testdir(java.lang.String)
// .tsconfig(TypescriptConfigOptions)
// .tsconfigDev(TypescriptConfigOptions)
// .tsconfigDevFile(java.lang.String)
// .tsJestOptions(TsJestOptions)
// .typescriptVersion(java.lang.String)
// .versionrcOptions(java.util.Map<java.lang.String, java.lang.Object>)
// .vscode(java.lang.Boolean)
// .workflowBootstrapSteps(java.util.List<JobStep>)
// .workflowContainerImage(java.lang.String)
// .workflowGitIdentity(GitIdentity)
// .workflowNodeVersion(java.lang.String)
// .workflowPackageCache(java.lang.Boolean)
// .workflowRunsOn(java.util.List<java.lang.String>)
// .workflowRunsOnGroup(GroupRunnerOptions)
// .yarnBerryOptions(YarnBerryOptions)
// .commitGeneratedCode(java.lang.Boolean)
.build();
Properties
| Name | Type | Description |
|---|---|---|
allowLibraryDependencies |
java.lang.Boolean |
Allow the project to include peerDependencies and bundledDependencies. |
artifactsDirectory |
java.lang.String |
A directory which will contain build artifacts. |
authorEmail |
java.lang.String |
Author's e-mail. |
authorName |
java.lang.String |
Author's name. |
authorOrganization |
java.lang.Boolean |
Is the author an organization. |
authorUrl |
java.lang.String |
Author's URL / Website. |
autoApproveOptions |
io.github.cdklabs.projen.github.AutoApproveOptions |
Enable and configure the 'auto approve' workflow. |
autoApproveUpgrades |
java.lang.Boolean |
Automatically approve deps upgrade PRs, allowing them to be merged by mergify (if configued). |
autoDetectBin |
java.lang.Boolean |
Automatically add all executables under the bin directory to your package.json file under the bin section. |
autoMerge |
java.lang.Boolean |
Enable automatic merging on GitHub. |
autoMergeOptions |
io.github.cdklabs.projen.github.AutoMergeOptions |
Configure options for automatic merging on GitHub. |
bin |
java.util.Map |
Binary programs vended with your module. |
bugsEmail |
java.lang.String |
The email address to which issues should be reported. |
bugsUrl |
java.lang.String |
The url to your project's issue tracker. |
buildWorkflow |
java.lang.Boolean |
Define a GitHub workflow for building PRs. |
buildWorkflowOptions |
io.github.cdklabs.projen.javascript.BuildWorkflowOptions |
Options for PR build workflow. |
buildWorkflowTriggers |
io.github.cdklabs.projen.github.workflows.Triggers |
Build workflow triggers. |
bundledDeps |
java.util.List |
List of dependencies to bundle into this module. |
bundlerOptions |
io.github.cdklabs.projen.javascript.BundlerOptions |
Options for Bundler. |
checkLicenses |
io.github.cdklabs.projen.javascript.LicenseCheckerOptions |
Configure which licenses should be deemed acceptable for use by dependencies. |
clobber |
java.lang.Boolean |
Add a clobber task which resets the repo to origin. |
codeArtifactOptions |
io.github.cdklabs.projen.javascript.CodeArtifactOptions |
Options for npm packages using AWS CodeArtifact. |
codeCov |
java.lang.Boolean |
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. |
codeCovTokenSecret |
java.lang.String |
Define the secret name for a specified https://codecov.io/ token A secret is required to send coverage for private repositories. |
commitGenerated |
java.lang.Boolean |
Whether to commit the managed files by default. |
copyrightOwner |
java.lang.String |
License copyright owner. |
copyrightPeriod |
java.lang.String |
The copyright years to put in the LICENSE file. |
defaultReleaseBranch |
java.lang.String |
The name of the main release branch. |
dependabot |
java.lang.Boolean |
Use dependabot to handle dependency upgrades. |
dependabotOptions |
io.github.cdklabs.projen.github.DependabotOptions |
Options for dependabot. |
deps |
java.util.List |
Runtime dependencies of this module. |
depsUpgrade |
java.lang.Boolean |
Use tasks and github workflows to handle dependency upgrades. |
depsUpgradeOptions |
io.github.cdklabs.projen.javascript.UpgradeDependenciesOptions |
Options for UpgradeDependencies. |
description |
java.lang.String |
The description is just a string that helps people understand the purpose of the package. |
devContainer |
java.lang.Boolean |
Add a VSCode development environment (used for GitHub Codespaces). |
devDeps |
java.util.List |
Build dependencies for this module. |
disableTsconfig |
java.lang.Boolean |
Do not generate a tsconfig.json file (used by jsii projects since tsconfig.json is generated by the jsii compiler). |
disableTsconfigDev |
java.lang.Boolean |
Do not generate a tsconfig.dev.json file. |
docgen |
java.lang.Boolean |
Docgen by Typedoc. |
docsDirectory |
java.lang.String |
Docs directory. |
entrypoint |
java.lang.String |
Module entrypoint (main in package.json). Set to an empty string to not include main in your package.json. |
entrypointTypes |
java.lang.String |
The .d.ts file that includes the type declarations for this module. |
eslint |
java.lang.Boolean |
Setup eslint. |
eslintOptions |
io.github.cdklabs.projen.javascript.EslintOptions |
Eslint options. |
github |
java.lang.Boolean |
Enable GitHub integration. |
githubOptions |
io.github.cdklabs.projen.github.GitHubOptions |
Options for GitHub integration. |
gitignore |
java.util.List |
Additional entries to .gitignore. |
gitIgnoreOptions |
io.github.cdklabs.projen.IgnoreFileOptions |
Configuration options for .gitignore file. |
gitOptions |
io.github.cdklabs.projen.GitOptions |
Configuration options for git. |
gitpod |
java.lang.Boolean |
Add a Gitpod development environment. |
homepage |
java.lang.String |
Package's Homepage / Website. |
jest |
java.lang.Boolean |
Setup jest unit tests. |
jestOptions |
io.github.cdklabs.projen.javascript.JestOptions |
Jest options. |
jsiiReleaseVersion |
java.lang.String |
Version requirement of publib which is used to publish modules to npm. |
keywords |
java.util.List |
Keywords to include in package.json. |
libdir |
java.lang.String |
Typescript artifacts output directory. |
license |
java.lang.String |
License's SPDX identifier. |
licensed |
java.lang.Boolean |
Indicates if a license should be added. |
logging |
io.github.cdklabs.projen.LoggerOptions |
Configure logging options such as verbosity. |
majorVersion |
java.lang.Number |
Major version to release from the default branch. |
maxNodeVersion |
java.lang.String |
Minimum node.js version to require via engines (inclusive). |
mergify |
java.lang.Boolean |
Whether mergify should be enabled on this repository or not. |
mergifyOptions |
io.github.cdklabs.projen.github.MergifyOptions |
Options for mergify. |
minMajorVersion |
java.lang.Number |
Minimal Major version to release. |
minNodeVersion |
java.lang.String |
Minimum Node.js version to require via package.json engines (inclusive). |
mutableBuild |
java.lang.Boolean |
Automatically update files modified during builds to pull-request branches. |
name |
java.lang.String |
This is the name of your project. |
npmAccess |
io.github.cdklabs.projen.javascript.NpmAccess |
Access level of the npm package. |
npmDistTag |
java.lang.String |
The npmDistTag to use when publishing from the default branch. |
npmignore |
java.util.List |
Additional entries to .npmignore. |
npmignoreEnabled |
java.lang.Boolean |
Defines an .npmignore file. Normally this is only needed for libraries that are packaged as tarballs. |
npmIgnoreOptions |
io.github.cdklabs.projen.IgnoreFileOptions |
Configuration options for .npmignore file. |
npmProvenance |
java.lang.Boolean |
Should provenance statements be generated when the package is published. |
npmRegistry |
java.lang.String |
The host name of the npm registry to publish to. |
npmRegistryUrl |
java.lang.String |
The base URL of the npm package registry. |
npmTokenSecret |
java.lang.String |
GitHub secret which contains the NPM token to use when publishing packages. |
outdir |
java.lang.String |
The root directory of the project. Relative to this directory, all files are synthesized. |
package |
java.lang.Boolean |
Defines a package task that will produce an npm tarball under the artifacts directory (e.g. dist). |
packageManager |
io.github.cdklabs.projen.javascript.NodePackageManager |
The Node Package Manager used to execute scripts. |
packageName |
java.lang.String |
The "name" in package.json. |
parent |
io.github.cdklabs.projen.Project |
The parent project, if this project is part of a bigger project. |
peerDependencyOptions |
io.github.cdklabs.projen.javascript.PeerDependencyOptions |
Options for peerDeps. |
peerDeps |
java.util.List |
Peer dependencies for this module. |
pnpmVersion |
java.lang.String |
The version of PNPM to use if using PNPM as a package manager. |
postBuildSteps |
java.util.List |
Steps to execute after build as part of the release workflow. |
prerelease |
java.lang.String |
Bump versions from the default branch as pre-releases (e.g. "beta", "alpha", "pre"). |
prettier |
java.lang.Boolean |
Setup prettier. |
prettierOptions |
io.github.cdklabs.projen.javascript.PrettierOptions |
Prettier options. |
projectType |
io.github.cdklabs.projen.ProjectType |
Which type of project this is (library/app). |
projenCommand |
java.lang.String |
The shell command to use in order to run the projen CLI. |
projenCredentials |
io.github.cdklabs.projen.github.GithubCredentials |
Choose a method of providing GitHub API access for projen workflows. |
projenDevDependency |
java.lang.Boolean |
Indicates of "projen" should be installed as a devDependency. |
projenrcJs |
java.lang.Boolean |
Generate (once) .projenrc.js (in JavaScript). Set to false in order to disable .projenrc.js generation. |
projenrcJson |
java.lang.Boolean |
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation. |
projenrcJsonOptions |
io.github.cdklabs.projen.ProjenrcJsonOptions |
Options for .projenrc.json. |
projenrcJsOptions |
io.github.cdklabs.projen.javascript.ProjenrcOptions |
Options for .projenrc.js. |
projenrcTs |
java.lang.Boolean |
Use TypeScript for your projenrc file (.projenrc.ts). |
projenrcTsOptions |
io.github.cdklabs.projen.typescript.ProjenrcOptions |
Options for .projenrc.ts. |
projenTokenSecret |
java.lang.String |
The name of a secret which includes a GitHub Personal Access Token to be used by projen workflows. |
projenVersion |
java.lang.String |
Version of projen to install. |
publishDryRun |
java.lang.Boolean |
Instead of actually publishing to package managers, just print the publishing command. |
publishTasks |
java.lang.Boolean |
Define publishing tasks that can be executed manually as well as workflows. |
pullRequestTemplate |
java.lang.Boolean |
Include a GitHub pull request template. |
pullRequestTemplateContents |
java.util.List |
The contents of the pull request template. |
readme |
io.github.cdklabs.projen.SampleReadmeProps |
The README setup. |
releasableCommits |
io.github.cdklabs.projen.ReleasableCommits |
Find commits that should be considered releasable Used to decide if a release is required. |
release |
java.lang.Boolean |
Add release management to this project. |
releaseBranches |
java.util.Map |
Defines additional release branches. |
releaseEveryCommit |
java.lang.Boolean |
Automatically release new versions every commit to one of branches in releaseBranches. |
releaseFailureIssue |
java.lang.Boolean |
Create a github issue on every failed publishing task. |
releaseFailureIssueLabel |
java.lang.String |
The label to apply to issues indicating publish failures. |
releaseSchedule |
java.lang.String |
CRON schedule to trigger new releases. |
releaseTagPrefix |
java.lang.String |
Automatically add the given prefix to release tags. |
releaseToNpm |
java.lang.Boolean |
Automatically release to npm when new versions are introduced. |
releaseTrigger |
io.github.cdklabs.projen.release.ReleaseTrigger |
The release trigger to use. |
releaseWorkflow |
java.lang.Boolean |
DEPRECATED: renamed to release. |
releaseWorkflowName |
java.lang.String |
The name of the default release workflow. |
releaseWorkflowSetupSteps |
java.util.List |
A set of workflow steps to execute in order to setup the workflow container. |
renovatebot |
java.lang.Boolean |
Use renovatebot to handle dependency upgrades. |
renovatebotOptions |
io.github.cdklabs.projen.RenovatebotOptions |
Options for renovatebot. |
repository |
java.lang.String |
The repository is the location where the actual code for your package lives. |
repositoryDirectory |
java.lang.String |
If the package.json for your package is not in the root directory (for example if it is part of a monorepo), you can specify the directory in which it lives. |
sampleCode |
java.lang.Boolean |
Generate one-time sample in src/ and test/ if there are no files there. |
scopedPackagesOptions |
java.util.List |
Options for privately hosted scoped packages. |
scripts |
java.util.Map |
npm scripts to include. |
srcdir |
java.lang.String |
Typescript sources directory. |
stability |
java.lang.String |
Package's Stability. |
stale |
java.lang.Boolean |
Auto-close of stale issues and pull request. |
staleOptions |
io.github.cdklabs.projen.github.StaleOptions |
Auto-close stale issues and pull requests. |
testdir |
java.lang.String |
Jest tests directory. |
tsconfig |
io.github.cdklabs.projen.javascript.TypescriptConfigOptions |
Custom TSConfig. |
tsconfigDev |
io.github.cdklabs.projen.javascript.TypescriptConfigOptions |
Custom tsconfig options for the development tsconfig.json file (used for testing). |
tsconfigDevFile |
java.lang.String |
The name of the development tsconfig.json file. |
tsJestOptions |
io.github.cdklabs.projen.typescript.TsJestOptions |
Options for ts-jest. |
typescriptVersion |
java.lang.String |
TypeScript version to use. |
versionrcOptions |
java.util.Map |
Custom configuration used when creating changelog with standard-version package. |
vscode |
java.lang.Boolean |
Enable VSCode integration. |
workflowBootstrapSteps |
java.util.List |
Workflow steps to use in order to bootstrap this repo. |
workflowContainerImage |
java.lang.String |
Container image to use for GitHub workflows. |
workflowGitIdentity |
io.github.cdklabs.projen.github.GitIdentity |
The git identity to use in workflows. |
workflowNodeVersion |
java.lang.String |
The node version to use in GitHub workflows. |
workflowPackageCache |
java.lang.Boolean |
Enable Node.js package cache in GitHub workflows. |
workflowRunsOn |
java.util.List |
Github Runner selection labels. |
workflowRunsOnGroup |
io.github.cdklabs.projen.GroupRunnerOptions |
Github Runner Group selection options. |
yarnBerryOptions |
io.github.cdklabs.projen.javascript.YarnBerryOptions |
Options for Yarn Berry. |
commitGeneratedCode |
java.lang.Boolean |
Whether to commit the code generated by the OpenAPI Generator. |
allowLibraryDependenciesOptional
public java.lang.Boolean getAllowLibraryDependencies();
- Type: java.lang.Boolean
- Default: true
Allow the project to include peerDependencies and bundledDependencies.
This is normally only allowed for libraries. For apps, there's no meaning for specifying these.
artifactsDirectoryOptional
public java.lang.String getArtifactsDirectory();
- Type: java.lang.String
- Default: "dist"
A directory which will contain build artifacts.
authorEmailOptional
public java.lang.String getAuthorEmail();
- Type: java.lang.String
Author's e-mail.
authorNameOptional
public java.lang.String getAuthorName();
- Type: java.lang.String
Author's name.
authorOrganizationOptional
public java.lang.Boolean getAuthorOrganization();
- Type: java.lang.Boolean
Is the author an organization.
authorUrlOptional
public java.lang.String getAuthorUrl();
- Type: java.lang.String
Author's URL / Website.
autoApproveOptionsOptional
public AutoApproveOptions getAutoApproveOptions();
- Type: io.github.cdklabs.projen.github.AutoApproveOptions
- Default: auto approve is disabled
Enable and configure the 'auto approve' workflow.
autoApproveUpgradesOptional
public java.lang.Boolean getAutoApproveUpgrades();
- Type: java.lang.Boolean
- Default: true
Automatically approve deps upgrade PRs, allowing them to be merged by mergify (if configued).
Throw if set to true but autoApproveOptions are not defined.
autoDetectBinOptional
public java.lang.Boolean getAutoDetectBin();
- Type: java.lang.Boolean
- Default: true
Automatically add all executables under the bin directory to your package.json file under the bin section.
autoMergeOptional
public java.lang.Boolean getAutoMerge();
- Type: java.lang.Boolean
- Default: true
Enable automatic merging on GitHub.
Has no effect if github.mergify
is set to false.
autoMergeOptionsOptional
public AutoMergeOptions getAutoMergeOptions();
- Type: io.github.cdklabs.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.
binOptional
public java.util.Map<java.lang.String, java.lang.String> getBin();
- Type: java.util.Map
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.
bugsEmailOptional
public java.lang.String getBugsEmail();
- Type: java.lang.String
The email address to which issues should be reported.
bugsUrlOptional
public java.lang.String getBugsUrl();
- Type: java.lang.String
The url to your project's issue tracker.
buildWorkflowOptional
public java.lang.Boolean getBuildWorkflow();
- Type: java.lang.Boolean
- Default: true if not a subproject
Define a GitHub workflow for building PRs.
buildWorkflowOptionsOptional
public BuildWorkflowOptions getBuildWorkflowOptions();
- Type: io.github.cdklabs.projen.javascript.BuildWorkflowOptions
Options for PR build workflow.
~~buildWorkflowTriggers~~Optional
- Deprecated: - Use
buildWorkflowOptions.workflowTriggers
public Triggers getBuildWorkflowTriggers();
- Type: io.github.cdklabs.projen.github.workflows.Triggers
- Default: "{ pullRequest: {}, workflowDispatch: {} }"
Build workflow triggers.
bundledDepsOptional
public java.util.List<java.lang.String> getBundledDeps();
- Type: java.util.List
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.
bundlerOptionsOptional
public BundlerOptions getBundlerOptions();
- Type: io.github.cdklabs.projen.javascript.BundlerOptions
Options for Bundler.
checkLicensesOptional
public LicenseCheckerOptions getCheckLicenses();
- Type: io.github.cdklabs.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.
clobberOptional
public java.lang.Boolean getClobber();
- Type: java.lang.Boolean
- Default: true, but false for subprojects
Add a clobber task which resets the repo to origin.
codeArtifactOptionsOptional
public CodeArtifactOptions getCodeArtifactOptions();
- Type: io.github.cdklabs.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
codeCovOptional
public java.lang.Boolean getCodeCov();
- Type: java.lang.Boolean
- 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.
codeCovTokenSecretOptional
public java.lang.String getCodeCovTokenSecret();
- Type: java.lang.String
- Default: if this option is not specified, only public repositories are supported
Define the secret name for a specified https://codecov.io/ token A secret is required to send coverage for private repositories.
commitGeneratedOptional
public java.lang.Boolean getCommitGenerated();
- Type: java.lang.Boolean
- Default: true
Whether to commit the managed files by default.
copyrightOwnerOptional
public java.lang.String getCopyrightOwner();
- Type: java.lang.String
- Default: defaults to the value of authorName or "" if
authorNameis undefined.
License copyright owner.
copyrightPeriodOptional
public java.lang.String getCopyrightPeriod();
- Type: java.lang.String
- Default: current year
The copyright years to put in the LICENSE file.
defaultReleaseBranchOptional
public java.lang.String getDefaultReleaseBranch();
- Type: java.lang.String
- Default: "main"
The name of the main release branch.
dependabotOptional
public java.lang.Boolean getDependabot();
- Type: java.lang.Boolean
- Default: false
Use dependabot to handle dependency upgrades.
Cannot be used in conjunction with depsUpgrade.
dependabotOptionsOptional
public DependabotOptions getDependabotOptions();
- Type: io.github.cdklabs.projen.github.DependabotOptions
- Default: default options
Options for dependabot.
depsOptional
public java.util.List<java.lang.String> getDeps();
- Type: java.util.List
- 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.
depsUpgradeOptional
public java.lang.Boolean getDepsUpgrade();
- Type: java.lang.Boolean
- Default: true
Use tasks and github workflows to handle dependency upgrades.
Cannot be used in conjunction with dependabot.
depsUpgradeOptionsOptional
public UpgradeDependenciesOptions getDepsUpgradeOptions();
- Type: io.github.cdklabs.projen.javascript.UpgradeDependenciesOptions
- Default: default options
Options for UpgradeDependencies.
descriptionOptional
public java.lang.String getDescription();
- Type: java.lang.String
The description is just a string that helps people understand the purpose of the package.
It can be used when searching for packages in a package manager as well. See https://classic.yarnpkg.com/en/docs/package-json/#toc-description
devContainerOptional
public java.lang.Boolean getDevContainer();
- Type: java.lang.Boolean
- Default: false
Add a VSCode development environment (used for GitHub Codespaces).
devDepsOptional
public java.util.List<java.lang.String> getDevDeps();
- Type: java.util.List
- 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.
disableTsconfigOptional
public java.lang.Boolean getDisableTsconfig();
- Type: java.lang.Boolean
- Default: false
Do not generate a tsconfig.json file (used by jsii projects since tsconfig.json is generated by the jsii compiler).
disableTsconfigDevOptional
public java.lang.Boolean getDisableTsconfigDev();
- Type: java.lang.Boolean
- Default: false
Do not generate a tsconfig.dev.json file.
docgenOptional
public java.lang.Boolean getDocgen();
- Type: java.lang.Boolean
- Default: false
Docgen by Typedoc.
docsDirectoryOptional
public java.lang.String getDocsDirectory();
- Type: java.lang.String
- Default: "docs"
Docs directory.
entrypointOptional
public java.lang.String getEntrypoint();
- Type: java.lang.String
- Default: "lib/index.js"
Module entrypoint (main in package.json). Set to an empty string to not include main in your package.json.
entrypointTypesOptional
public java.lang.String getEntrypointTypes();
- Type: java.lang.String
- Default: .d.ts file derived from the project's entrypoint (usually lib/index.d.ts)
The .d.ts file that includes the type declarations for this module.
eslintOptional
public java.lang.Boolean getEslint();
- Type: java.lang.Boolean
- Default: true
Setup eslint.
eslintOptionsOptional
public EslintOptions getEslintOptions();
- Type: io.github.cdklabs.projen.javascript.EslintOptions
- Default: opinionated default options
Eslint options.
githubOptional
public java.lang.Boolean getGithub();
- Type: java.lang.Boolean
- Default: true
Enable GitHub integration.
Enabled by default for root projects. Disabled for non-root projects.
githubOptionsOptional
public GitHubOptions getGithubOptions();
- Type: io.github.cdklabs.projen.github.GitHubOptions
- Default: see GitHubOptions
Options for GitHub integration.
gitignoreOptional
public java.util.List<java.lang.String> getGitignore();
- Type: java.util.List
Additional entries to .gitignore.
gitIgnoreOptionsOptional
public IgnoreFileOptions getGitIgnoreOptions();
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptionsOptional
public GitOptions getGitOptions();
- Type: io.github.cdklabs.projen.GitOptions
Configuration options for git.
gitpodOptional
public java.lang.Boolean getGitpod();
- Type: java.lang.Boolean
- Default: false
Add a Gitpod development environment.
homepageOptional
public java.lang.String getHomepage();
- Type: java.lang.String
Package's Homepage / Website.
jestOptional
public java.lang.Boolean getJest();
- Type: java.lang.Boolean
- Default: true
Setup jest unit tests.
jestOptionsOptional
public JestOptions getJestOptions();
- Type: io.github.cdklabs.projen.javascript.JestOptions
- Default: default options
Jest options.
jsiiReleaseVersionOptional
public java.lang.String getJsiiReleaseVersion();
- Type: java.lang.String
- Default: "latest"
Version requirement of publib which is used to publish modules to npm.
keywordsOptional
public java.util.List<java.lang.String> getKeywords();
- Type: java.util.List
Keywords to include in package.json.
libdirOptional
public java.lang.String getLibdir();
- Type: java.lang.String
- Default: "lib"
Typescript artifacts output directory.
licenseOptional
public java.lang.String getLicense();
- Type: java.lang.String
- Default: "Apache-2.0"
License's SPDX identifier.
See https://github.com/projen/projen/tree/main/license-text for a list of supported licenses.
Use the licensed option if you want to no license to be specified.
licensedOptional
public java.lang.Boolean getLicensed();
- Type: java.lang.Boolean
- Default: true
Indicates if a license should be added.
loggingOptional
public LoggerOptions getLogging();
- Type: io.github.cdklabs.projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
majorVersionOptional
public java.lang.Number getMajorVersion();
- Type: java.lang.Number
- Default: Major version is not enforced.
Major version to release from the default branch.
If this is specified, we bump the latest version of this major version line. If not specified, we bump the global latest version.
maxNodeVersionOptional
public java.lang.String getMaxNodeVersion();
- Type: java.lang.String
- Default: no max
Minimum node.js version to require via engines (inclusive).
~~mergify~~Optional
- Deprecated: use
githubOptions.mergifyinstead
public java.lang.Boolean getMergify();
- Type: java.lang.Boolean
- Default: true
Whether mergify should be enabled on this repository or not.
~~mergifyOptions~~Optional
- Deprecated: use
githubOptions.mergifyOptionsinstead
public MergifyOptions getMergifyOptions();
- Type: io.github.cdklabs.projen.github.MergifyOptions
- Default: default options
Options for mergify.
minMajorVersionOptional
public java.lang.Number getMinMajorVersion();
- Type: java.lang.Number
- Default: No minimum version is being enforced
Minimal Major version to release.
This can be useful to set to 1, as breaking changes before the 1.x major release are not incrementing the major version number.
Can not be set together with majorVersion.
minNodeVersionOptional
public java.lang.String getMinNodeVersion();
- Type: java.lang.String
- Default: no "engines" specified
Minimum Node.js version to require via package.json engines (inclusive).
~~mutableBuild~~Optional
- Deprecated: - Use
buildWorkflowOptions.mutableBuild
public java.lang.Boolean getMutableBuild();
- Type: java.lang.Boolean
- Default: true
Automatically update files modified during builds to pull-request branches.
This means that any files synthesized by projen or e.g. test snapshots will always be up-to-date before a PR is merged.
Implies that PR builds do not have anti-tamper checks.
nameOptional
public java.lang.String getName();
- Type: java.lang.String
- Default: $BASEDIR
This is the name of your project.
npmAccessOptional
public NpmAccess getNpmAccess();
- Type: io.github.cdklabs.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.
npmDistTagOptional
public java.lang.String getNpmDistTag();
- Type: java.lang.String
- Default: "latest"
The npmDistTag to use when publishing from the default branch.
To set the npm dist-tag for release branches, set the npmDistTag property
for each branch.
~~npmignore~~Optional
- Deprecated: - use
project.addPackageIgnore
public java.util.List<java.lang.String> getNpmignore();
- Type: java.util.List
Additional entries to .npmignore.
npmignoreEnabledOptional
public java.lang.Boolean getNpmignoreEnabled();
- Type: java.lang.Boolean
- Default: true
Defines an .npmignore file. Normally this is only needed for libraries that are packaged as tarballs.
npmIgnoreOptionsOptional
public IgnoreFileOptions getNpmIgnoreOptions();
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .npmignore file.
npmProvenanceOptional
public java.lang.Boolean getNpmProvenance();
- Type: java.lang.Boolean
- 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.
~~npmRegistry~~Optional
- Deprecated: use
npmRegistryUrlinstead
public java.lang.String getNpmRegistry();
- Type: java.lang.String
The host name of the npm registry to publish to.
Cannot be set together with npmRegistryUrl.
npmRegistryUrlOptional
public java.lang.String getNpmRegistryUrl();
- Type: java.lang.String
- Default: "https://registry.npmjs.org"
The base URL of the npm package registry.
Must be a URL (e.g. start with "https://" or "http://")
npmTokenSecretOptional
public java.lang.String getNpmTokenSecret();
- Type: java.lang.String
- Default: "NPM_TOKEN"
GitHub secret which contains the NPM token to use when publishing packages.
outdirOptional
public java.lang.String getOutdir();
- Type: java.lang.String
- Default: "."
The root directory of the project. Relative to this directory, all files are synthesized.
If this project has a parent, this directory is relative to the parent directory and it cannot be the same as the parent or any of it's other subprojects.
packageOptional
public java.lang.Boolean getPackage();
- Type: java.lang.Boolean
- Default: true
Defines a package task that will produce an npm tarball under the artifacts directory (e.g. dist).
packageManagerOptional
public NodePackageManager getPackageManager();
- Type: io.github.cdklabs.projen.javascript.NodePackageManager
- Default: NodePackageManager.YARN_CLASSIC
The Node Package Manager used to execute scripts.
packageNameOptional
public java.lang.String getPackageName();
- Type: java.lang.String
- Default: defaults to project name
The "name" in package.json.
parentOptional
public Project getParent();
- Type: io.github.cdklabs.projen.Project
The parent project, if this project is part of a bigger project.
peerDependencyOptionsOptional
public PeerDependencyOptions getPeerDependencyOptions();
- Type: io.github.cdklabs.projen.javascript.PeerDependencyOptions
Options for peerDeps.
peerDepsOptional
public java.util.List<java.lang.String> getPeerDeps();
- Type: java.util.List
- 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.
pnpmVersionOptional
public java.lang.String getPnpmVersion();
- Type: java.lang.String
- Default: "7"
The version of PNPM to use if using PNPM as a package manager.
postBuildStepsOptional
public java.util.List<JobStep> getPostBuildSteps();
- Type: java.util.List
- Default: []
Steps to execute after build as part of the release workflow.
prereleaseOptional
public java.lang.String getPrerelease();
- Type: java.lang.String
- Default: normal semantic versions
Bump versions from the default branch as pre-releases (e.g. "beta", "alpha", "pre").
prettierOptional
public java.lang.Boolean getPrettier();
- Type: java.lang.Boolean
- Default: false
Setup prettier.
prettierOptionsOptional
public PrettierOptions getPrettierOptions();
- Type: io.github.cdklabs.projen.javascript.PrettierOptions
- Default: default options
Prettier options.
~~projectType~~Optional
- Deprecated: no longer supported at the base project level
public ProjectType getProjectType();
- Type: io.github.cdklabs.projen.ProjectType
- Default: ProjectType.UNKNOWN
Which type of project this is (library/app).
projenCommandOptional
public java.lang.String getProjenCommand();
- Type: java.lang.String
- Default: "npx projen"
The shell command to use in order to run the projen CLI.
Can be used to customize in special environments.
projenCredentialsOptional
public GithubCredentials getProjenCredentials();
- Type: io.github.cdklabs.projen.github.GithubCredentials
- Default: use a personal access token named PROJEN_GITHUB_TOKEN
Choose a method of providing GitHub API access for projen workflows.
projenDevDependencyOptional
public java.lang.Boolean getProjenDevDependency();
- Type: java.lang.Boolean
- Default: true if not a subproject
Indicates of "projen" should be installed as a devDependency.
projenrcJsOptional
public java.lang.Boolean getProjenrcJs();
- Type: java.lang.Boolean
- Default: true if projenrcJson is false
Generate (once) .projenrc.js (in JavaScript). Set to false in order to disable .projenrc.js generation.
projenrcJsonOptional
public java.lang.Boolean getProjenrcJson();
- Type: java.lang.Boolean
- Default: false
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation.
projenrcJsonOptionsOptional
public ProjenrcJsonOptions getProjenrcJsonOptions();
- Type: io.github.cdklabs.projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
projenrcJsOptionsOptional
public ProjenrcOptions getProjenrcJsOptions();
- Type: io.github.cdklabs.projen.javascript.ProjenrcOptions
- Default: default options
Options for .projenrc.js.
projenrcTsOptional
public java.lang.Boolean getProjenrcTs();
- Type: java.lang.Boolean
- Default: false
Use TypeScript for your projenrc file (.projenrc.ts).
projenrcTsOptionsOptional
public ProjenrcOptions getProjenrcTsOptions();
- Type: io.github.cdklabs.projen.typescript.ProjenrcOptions
Options for .projenrc.ts.
~~projenTokenSecret~~Optional
- Deprecated: use
projenCredentials
public java.lang.String getProjenTokenSecret();
- Type: java.lang.String
- Default: "PROJEN_GITHUB_TOKEN"
The name of a secret which includes a GitHub Personal Access Token to be used by projen workflows.
This token needs to have the repo, workflows
and packages scope.
projenVersionOptional
public java.lang.String getProjenVersion();
- Type: java.lang.String
- Default: Defaults to the latest version.
Version of projen to install.
publishDryRunOptional
public java.lang.Boolean getPublishDryRun();
- Type: java.lang.Boolean
- Default: false
Instead of actually publishing to package managers, just print the publishing command.
publishTasksOptional
public java.lang.Boolean getPublishTasks();
- Type: java.lang.Boolean
- Default: false
Define publishing tasks that can be executed manually as well as workflows.
Normally, publishing only happens within automated workflows. Enable this in order to create a publishing task for each publishing activity.
pullRequestTemplateOptional
public java.lang.Boolean getPullRequestTemplate();
- Type: java.lang.Boolean
- Default: true
Include a GitHub pull request template.
pullRequestTemplateContentsOptional
public java.util.List<java.lang.String> getPullRequestTemplateContents();
- Type: java.util.List
- Default: default content
The contents of the pull request template.
readmeOptional
public SampleReadmeProps getReadme();
- Type: io.github.cdklabs.projen.SampleReadmeProps
- Default: { filename: 'README.md', contents: '# replace this' }
The README setup.
releasableCommitsOptional
public ReleasableCommits getReleasableCommits();
- Type: io.github.cdklabs.projen.ReleasableCommits
- Default: ReleasableCommits.everyCommit()
Find commits that should be considered releasable Used to decide if a release is required.
releaseOptional
public java.lang.Boolean getRelease();
- Type: java.lang.Boolean
- Default: true (false for subprojects)
Add release management to this project.
releaseBranchesOptional
public java.util.Map<java.lang.String, BranchOptions> getReleaseBranches();
- Type: java.util.Map
- Default: no additional branches are used for release. you can use
addBranch()to add additional branches.
Defines additional release branches.
A workflow will be created for each
release branch which will publish releases from commits in this branch.
Each release branch must be assigned a major version number which is used
to enforce that versions published from that branch always use that major
version. If multiple branches are used, the majorVersion field must also
be provided for the default branch.
~~releaseEveryCommit~~Optional
- Deprecated: Use
releaseTrigger: ReleaseTrigger.continuous()instead
public java.lang.Boolean getReleaseEveryCommit();
- Type: java.lang.Boolean
- Default: true
Automatically release new versions every commit to one of branches in releaseBranches.
releaseFailureIssueOptional
public java.lang.Boolean getReleaseFailureIssue();
- Type: java.lang.Boolean
- Default: false
Create a github issue on every failed publishing task.
releaseFailureIssueLabelOptional
public java.lang.String getReleaseFailureIssueLabel();
- Type: java.lang.String
- Default: "failed-release"
The label to apply to issues indicating publish failures.
Only applies if releaseFailureIssue is true.
~~releaseSchedule~~Optional
- Deprecated: Use
releaseTrigger: ReleaseTrigger.scheduled()instead
public java.lang.String getReleaseSchedule();
- Type: java.lang.String
- Default: no scheduled releases
CRON schedule to trigger new releases.
releaseTagPrefixOptional
public java.lang.String getReleaseTagPrefix();
- Type: java.lang.String
- Default: "v"
Automatically add the given prefix to release tags.
Useful if you are releasing on multiple branches with overlapping version numbers. Note: this prefix is used to detect the latest tagged version when bumping, so if you change this on a project with an existing version history, you may need to manually tag your latest release with the new prefix.
releaseToNpmOptional
public java.lang.Boolean getReleaseToNpm();
- Type: java.lang.Boolean
- Default: false
Automatically release to npm when new versions are introduced.
releaseTriggerOptional
public ReleaseTrigger getReleaseTrigger();
- Type: io.github.cdklabs.projen.release.ReleaseTrigger
- Default: Continuous releases (
ReleaseTrigger.continuous())
The release trigger to use.
~~releaseWorkflow~~Optional
- Deprecated: see
release.
public java.lang.Boolean getReleaseWorkflow();
- Type: java.lang.Boolean
- Default: true if not a subproject
DEPRECATED: renamed to release.
releaseWorkflowNameOptional
public java.lang.String getReleaseWorkflowName();
- Type: java.lang.String
- Default: "release"
The name of the default release workflow.
releaseWorkflowSetupStepsOptional
public java.util.List<JobStep> getReleaseWorkflowSetupSteps();
- Type: java.util.List
A set of workflow steps to execute in order to setup the workflow container.
renovatebotOptional
public java.lang.Boolean getRenovatebot();
- Type: java.lang.Boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptionsOptional
public RenovatebotOptions getRenovatebotOptions();
- Type: io.github.cdklabs.projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
repositoryOptional
public java.lang.String getRepository();
- Type: java.lang.String
The repository is the location where the actual code for your package lives.
See https://classic.yarnpkg.com/en/docs/package-json/#toc-repository
repositoryDirectoryOptional
public java.lang.String getRepositoryDirectory();
- Type: java.lang.String
If the package.json for your package is not in the root directory (for example if it is part of a monorepo), you can specify the directory in which it lives.
sampleCodeOptional
public java.lang.Boolean getSampleCode();
- Type: java.lang.Boolean
- Default: true
Generate one-time sample in src/ and test/ if there are no files there.
scopedPackagesOptionsOptional
public java.util.List<ScopedPackagesOptions> getScopedPackagesOptions();
- Type: java.util.List
- Default: fetch all scoped packages from the public npm registry
Options for privately hosted scoped packages.
~~scripts~~Optional
- Deprecated: use
project.addTask()orpackage.setScript()
public java.util.Map<java.lang.String, java.lang.String> getScripts();
- Type: java.util.Map
- 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.
srcdirOptional
public java.lang.String getSrcdir();
- Type: java.lang.String
- Default: "src"
Typescript sources directory.
stabilityOptional
public java.lang.String getStability();
- Type: java.lang.String
Package's Stability.
staleOptional
public java.lang.Boolean getStale();
- Type: java.lang.Boolean
- Default: false
Auto-close of stale issues and pull request.
See staleOptions for options.
staleOptionsOptional
public StaleOptions getStaleOptions();
- Type: io.github.cdklabs.projen.github.StaleOptions
- Default: see defaults in
StaleOptions
Auto-close stale issues and pull requests.
To disable set stale to false.
testdirOptional
public java.lang.String getTestdir();
- Type: java.lang.String
- Default: "test"
Jest tests directory.
Tests files should be named xxx.test.ts.
If this directory is under srcdir (e.g. src/test, src/__tests__),
then tests are going to be compiled into lib/ and executed as javascript.
If the test directory is outside of src, then we configure jest to
compile the code in-memory.
tsconfigOptional
public TypescriptConfigOptions getTsconfig();
- Type: io.github.cdklabs.projen.javascript.TypescriptConfigOptions
- Default: default options
Custom TSConfig.
tsconfigDevOptional
public TypescriptConfigOptions getTsconfigDev();
- Type: io.github.cdklabs.projen.javascript.TypescriptConfigOptions
- Default: use the production tsconfig options
Custom tsconfig options for the development tsconfig.json file (used for testing).
tsconfigDevFileOptional
public java.lang.String getTsconfigDevFile();
- Type: java.lang.String
- Default: "tsconfig.dev.json"
The name of the development tsconfig.json file.
tsJestOptionsOptional
public TsJestOptions getTsJestOptions();
- Type: io.github.cdklabs.projen.typescript.TsJestOptions
Options for ts-jest.
typescriptVersionOptional
public java.lang.String getTypescriptVersion();
- Type: java.lang.String
- Default: "latest"
TypeScript version to use.
NOTE: Typescript is not semantically versioned and should remain on the
same minor, so we recommend using a ~ dependency (e.g. ~1.2.3).
versionrcOptionsOptional
public java.util.Map<java.lang.String, java.lang.Object> getVersionrcOptions();
- Type: java.util.Map
- 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.
vscodeOptional
public java.lang.Boolean getVscode();
- Type: java.lang.Boolean
- Default: true
Enable VSCode integration.
Enabled by default for root projects. Disabled for non-root projects.
workflowBootstrapStepsOptional
public java.util.List<JobStep> getWorkflowBootstrapSteps();
- Type: java.util.List
- Default: "yarn install --frozen-lockfile && yarn projen"
Workflow steps to use in order to bootstrap this repo.
workflowContainerImageOptional
public java.lang.String getWorkflowContainerImage();
- Type: java.lang.String
- Default: default image
Container image to use for GitHub workflows.
workflowGitIdentityOptional
public GitIdentity getWorkflowGitIdentity();
- Type: io.github.cdklabs.projen.github.GitIdentity
- Default: GitHub Actions
The git identity to use in workflows.
workflowNodeVersionOptional
public java.lang.String getWorkflowNodeVersion();
- Type: java.lang.String
- Default: same as
minNodeVersion
The node version to use in GitHub workflows.
workflowPackageCacheOptional
public java.lang.Boolean getWorkflowPackageCache();
- Type: java.lang.Boolean
- Default: false
Enable Node.js package cache in GitHub workflows.
workflowRunsOnOptional
public java.util.List<java.lang.String> getWorkflowRunsOn();
- Type: java.util.List
- Default: ["ubuntu-latest"]
Github Runner selection labels.
workflowRunsOnGroupOptional
public GroupRunnerOptions getWorkflowRunsOnGroup();
- Type: io.github.cdklabs.projen.GroupRunnerOptions
Github Runner Group selection options.
yarnBerryOptionsOptional
public YarnBerryOptions getYarnBerryOptions();
- Type: io.github.cdklabs.projen.javascript.YarnBerryOptions
- Default: Yarn Berry v4 with all default options
Options for Yarn Berry.
commitGeneratedCodeOptional
public java.lang.Boolean getCommitGeneratedCode();
- Type: java.lang.Boolean
- Default: false
Whether to commit the code generated by the OpenAPI Generator.
GeneratedTypeScriptWebSocketClientOptions
Options for configuring a generated typescript websocket client library project.
Initializer
import software.aws.pdk.type_safe_api.GeneratedTypeScriptWebSocketClientOptions;
GeneratedTypeScriptWebSocketClientOptions.builder()
// .allowLibraryDependencies(java.lang.Boolean)
// .artifactsDirectory(java.lang.String)
// .authorEmail(java.lang.String)
// .authorName(java.lang.String)
// .authorOrganization(java.lang.Boolean)
// .authorUrl(java.lang.String)
// .autoApproveOptions(AutoApproveOptions)
// .autoApproveUpgrades(java.lang.Boolean)
// .autoDetectBin(java.lang.Boolean)
// .autoMerge(java.lang.Boolean)
// .autoMergeOptions(AutoMergeOptions)
// .bin(java.util.Map<java.lang.String, java.lang.String>)
// .bugsEmail(java.lang.String)
// .bugsUrl(java.lang.String)
// .buildWorkflow(java.lang.Boolean)
// .buildWorkflowOptions(BuildWorkflowOptions)
// .buildWorkflowTriggers(Triggers)
// .bundledDeps(java.util.List<java.lang.String>)
// .bundlerOptions(BundlerOptions)
// .checkLicenses(LicenseCheckerOptions)
// .clobber(java.lang.Boolean)
// .codeArtifactOptions(CodeArtifactOptions)
// .codeCov(java.lang.Boolean)
// .codeCovTokenSecret(java.lang.String)
// .commitGenerated(java.lang.Boolean)
// .copyrightOwner(java.lang.String)
// .copyrightPeriod(java.lang.String)
// .defaultReleaseBranch(java.lang.String)
// .dependabot(java.lang.Boolean)
// .dependabotOptions(DependabotOptions)
// .deps(java.util.List<java.lang.String>)
// .depsUpgrade(java.lang.Boolean)
// .depsUpgradeOptions(UpgradeDependenciesOptions)
// .description(java.lang.String)
// .devContainer(java.lang.Boolean)
// .devDeps(java.util.List<java.lang.String>)
// .disableTsconfig(java.lang.Boolean)
// .disableTsconfigDev(java.lang.Boolean)
// .docgen(java.lang.Boolean)
// .docsDirectory(java.lang.String)
// .entrypoint(java.lang.String)
// .entrypointTypes(java.lang.String)
// .eslint(java.lang.Boolean)
// .eslintOptions(EslintOptions)
// .github(java.lang.Boolean)
// .githubOptions(GitHubOptions)
// .gitignore(java.util.List<java.lang.String>)
// .gitIgnoreOptions(IgnoreFileOptions)
// .gitOptions(GitOptions)
// .gitpod(java.lang.Boolean)
// .homepage(java.lang.String)
// .jest(java.lang.Boolean)
// .jestOptions(JestOptions)
// .jsiiReleaseVersion(java.lang.String)
// .keywords(java.util.List<java.lang.String>)
// .libdir(java.lang.String)
// .license(java.lang.String)
// .licensed(java.lang.Boolean)
// .logging(LoggerOptions)
// .majorVersion(java.lang.Number)
// .maxNodeVersion(java.lang.String)
// .mergify(java.lang.Boolean)
// .mergifyOptions(MergifyOptions)
// .minMajorVersion(java.lang.Number)
// .minNodeVersion(java.lang.String)
// .mutableBuild(java.lang.Boolean)
// .name(java.lang.String)
// .npmAccess(NpmAccess)
// .npmDistTag(java.lang.String)
// .npmignore(java.util.List<java.lang.String>)
// .npmignoreEnabled(java.lang.Boolean)
// .npmIgnoreOptions(IgnoreFileOptions)
// .npmProvenance(java.lang.Boolean)
// .npmRegistry(java.lang.String)
// .npmRegistryUrl(java.lang.String)
// .npmTokenSecret(java.lang.String)
// .outdir(java.lang.String)
// .package(java.lang.Boolean)
// .packageManager(NodePackageManager)
// .packageName(java.lang.String)
// .parent(Project)
// .peerDependencyOptions(PeerDependencyOptions)
// .peerDeps(java.util.List<java.lang.String>)
// .pnpmVersion(java.lang.String)
// .postBuildSteps(java.util.List<JobStep>)
// .prerelease(java.lang.String)
// .prettier(java.lang.Boolean)
// .prettierOptions(PrettierOptions)
// .projectType(ProjectType)
// .projenCommand(java.lang.String)
// .projenCredentials(GithubCredentials)
// .projenDevDependency(java.lang.Boolean)
// .projenrcJs(java.lang.Boolean)
// .projenrcJson(java.lang.Boolean)
// .projenrcJsonOptions(ProjenrcJsonOptions)
// .projenrcJsOptions(ProjenrcOptions)
// .projenrcTs(java.lang.Boolean)
// .projenrcTsOptions(ProjenrcOptions)
// .projenTokenSecret(java.lang.String)
// .projenVersion(java.lang.String)
// .publishDryRun(java.lang.Boolean)
// .publishTasks(java.lang.Boolean)
// .pullRequestTemplate(java.lang.Boolean)
// .pullRequestTemplateContents(java.util.List<java.lang.String>)
// .readme(SampleReadmeProps)
// .releasableCommits(ReleasableCommits)
// .release(java.lang.Boolean)
// .releaseBranches(java.util.Map<java.lang.String, BranchOptions>)
// .releaseEveryCommit(java.lang.Boolean)
// .releaseFailureIssue(java.lang.Boolean)
// .releaseFailureIssueLabel(java.lang.String)
// .releaseSchedule(java.lang.String)
// .releaseTagPrefix(java.lang.String)
// .releaseToNpm(java.lang.Boolean)
// .releaseTrigger(ReleaseTrigger)
// .releaseWorkflow(java.lang.Boolean)
// .releaseWorkflowName(java.lang.String)
// .releaseWorkflowSetupSteps(java.util.List<JobStep>)
// .renovatebot(java.lang.Boolean)
// .renovatebotOptions(RenovatebotOptions)
// .repository(java.lang.String)
// .repositoryDirectory(java.lang.String)
// .sampleCode(java.lang.Boolean)
// .scopedPackagesOptions(java.util.List<ScopedPackagesOptions>)
// .scripts(java.util.Map<java.lang.String, java.lang.String>)
// .srcdir(java.lang.String)
// .stability(java.lang.String)
// .stale(java.lang.Boolean)
// .staleOptions(StaleOptions)
// .testdir(java.lang.String)
// .tsconfig(TypescriptConfigOptions)
// .tsconfigDev(TypescriptConfigOptions)
// .tsconfigDevFile(java.lang.String)
// .tsJestOptions(TsJestOptions)
// .typescriptVersion(java.lang.String)
// .versionrcOptions(java.util.Map<java.lang.String, java.lang.Object>)
// .vscode(java.lang.Boolean)
// .workflowBootstrapSteps(java.util.List<JobStep>)
// .workflowContainerImage(java.lang.String)
// .workflowGitIdentity(GitIdentity)
// .workflowNodeVersion(java.lang.String)
// .workflowPackageCache(java.lang.Boolean)
// .workflowRunsOn(java.util.List<java.lang.String>)
// .workflowRunsOnGroup(GroupRunnerOptions)
// .yarnBerryOptions(YarnBerryOptions)
// .commitGeneratedCode(java.lang.Boolean)
.build();
Properties
| Name | Type | Description |
|---|---|---|
allowLibraryDependencies |
java.lang.Boolean |
Allow the project to include peerDependencies and bundledDependencies. |
artifactsDirectory |
java.lang.String |
A directory which will contain build artifacts. |
authorEmail |
java.lang.String |
Author's e-mail. |
authorName |
java.lang.String |
Author's name. |
authorOrganization |
java.lang.Boolean |
Is the author an organization. |
authorUrl |
java.lang.String |
Author's URL / Website. |
autoApproveOptions |
io.github.cdklabs.projen.github.AutoApproveOptions |
Enable and configure the 'auto approve' workflow. |
autoApproveUpgrades |
java.lang.Boolean |
Automatically approve deps upgrade PRs, allowing them to be merged by mergify (if configued). |
autoDetectBin |
java.lang.Boolean |
Automatically add all executables under the bin directory to your package.json file under the bin section. |
autoMerge |
java.lang.Boolean |
Enable automatic merging on GitHub. |
autoMergeOptions |
io.github.cdklabs.projen.github.AutoMergeOptions |
Configure options for automatic merging on GitHub. |
bin |
java.util.Map |
Binary programs vended with your module. |
bugsEmail |
java.lang.String |
The email address to which issues should be reported. |
bugsUrl |
java.lang.String |
The url to your project's issue tracker. |
buildWorkflow |
java.lang.Boolean |
Define a GitHub workflow for building PRs. |
buildWorkflowOptions |
io.github.cdklabs.projen.javascript.BuildWorkflowOptions |
Options for PR build workflow. |
buildWorkflowTriggers |
io.github.cdklabs.projen.github.workflows.Triggers |
Build workflow triggers. |
bundledDeps |
java.util.List |
List of dependencies to bundle into this module. |
bundlerOptions |
io.github.cdklabs.projen.javascript.BundlerOptions |
Options for Bundler. |
checkLicenses |
io.github.cdklabs.projen.javascript.LicenseCheckerOptions |
Configure which licenses should be deemed acceptable for use by dependencies. |
clobber |
java.lang.Boolean |
Add a clobber task which resets the repo to origin. |
codeArtifactOptions |
io.github.cdklabs.projen.javascript.CodeArtifactOptions |
Options for npm packages using AWS CodeArtifact. |
codeCov |
java.lang.Boolean |
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. |
codeCovTokenSecret |
java.lang.String |
Define the secret name for a specified https://codecov.io/ token A secret is required to send coverage for private repositories. |
commitGenerated |
java.lang.Boolean |
Whether to commit the managed files by default. |
copyrightOwner |
java.lang.String |
License copyright owner. |
copyrightPeriod |
java.lang.String |
The copyright years to put in the LICENSE file. |
defaultReleaseBranch |
java.lang.String |
The name of the main release branch. |
dependabot |
java.lang.Boolean |
Use dependabot to handle dependency upgrades. |
dependabotOptions |
io.github.cdklabs.projen.github.DependabotOptions |
Options for dependabot. |
deps |
java.util.List |
Runtime dependencies of this module. |
depsUpgrade |
java.lang.Boolean |
Use tasks and github workflows to handle dependency upgrades. |
depsUpgradeOptions |
io.github.cdklabs.projen.javascript.UpgradeDependenciesOptions |
Options for UpgradeDependencies. |
description |
java.lang.String |
The description is just a string that helps people understand the purpose of the package. |
devContainer |
java.lang.Boolean |
Add a VSCode development environment (used for GitHub Codespaces). |
devDeps |
java.util.List |
Build dependencies for this module. |
disableTsconfig |
java.lang.Boolean |
Do not generate a tsconfig.json file (used by jsii projects since tsconfig.json is generated by the jsii compiler). |
disableTsconfigDev |
java.lang.Boolean |
Do not generate a tsconfig.dev.json file. |
docgen |
java.lang.Boolean |
Docgen by Typedoc. |
docsDirectory |
java.lang.String |
Docs directory. |
entrypoint |
java.lang.String |
Module entrypoint (main in package.json). Set to an empty string to not include main in your package.json. |
entrypointTypes |
java.lang.String |
The .d.ts file that includes the type declarations for this module. |
eslint |
java.lang.Boolean |
Setup eslint. |
eslintOptions |
io.github.cdklabs.projen.javascript.EslintOptions |
Eslint options. |
github |
java.lang.Boolean |
Enable GitHub integration. |
githubOptions |
io.github.cdklabs.projen.github.GitHubOptions |
Options for GitHub integration. |
gitignore |
java.util.List |
Additional entries to .gitignore. |
gitIgnoreOptions |
io.github.cdklabs.projen.IgnoreFileOptions |
Configuration options for .gitignore file. |
gitOptions |
io.github.cdklabs.projen.GitOptions |
Configuration options for git. |
gitpod |
java.lang.Boolean |
Add a Gitpod development environment. |
homepage |
java.lang.String |
Package's Homepage / Website. |
jest |
java.lang.Boolean |
Setup jest unit tests. |
jestOptions |
io.github.cdklabs.projen.javascript.JestOptions |
Jest options. |
jsiiReleaseVersion |
java.lang.String |
Version requirement of publib which is used to publish modules to npm. |
keywords |
java.util.List |
Keywords to include in package.json. |
libdir |
java.lang.String |
Typescript artifacts output directory. |
license |
java.lang.String |
License's SPDX identifier. |
licensed |
java.lang.Boolean |
Indicates if a license should be added. |
logging |
io.github.cdklabs.projen.LoggerOptions |
Configure logging options such as verbosity. |
majorVersion |
java.lang.Number |
Major version to release from the default branch. |
maxNodeVersion |
java.lang.String |
Minimum node.js version to require via engines (inclusive). |
mergify |
java.lang.Boolean |
Whether mergify should be enabled on this repository or not. |
mergifyOptions |
io.github.cdklabs.projen.github.MergifyOptions |
Options for mergify. |
minMajorVersion |
java.lang.Number |
Minimal Major version to release. |
minNodeVersion |
java.lang.String |
Minimum Node.js version to require via package.json engines (inclusive). |
mutableBuild |
java.lang.Boolean |
Automatically update files modified during builds to pull-request branches. |
name |
java.lang.String |
This is the name of your project. |
npmAccess |
io.github.cdklabs.projen.javascript.NpmAccess |
Access level of the npm package. |
npmDistTag |
java.lang.String |
The npmDistTag to use when publishing from the default branch. |
npmignore |
java.util.List |
Additional entries to .npmignore. |
npmignoreEnabled |
java.lang.Boolean |
Defines an .npmignore file. Normally this is only needed for libraries that are packaged as tarballs. |
npmIgnoreOptions |
io.github.cdklabs.projen.IgnoreFileOptions |
Configuration options for .npmignore file. |
npmProvenance |
java.lang.Boolean |
Should provenance statements be generated when the package is published. |
npmRegistry |
java.lang.String |
The host name of the npm registry to publish to. |
npmRegistryUrl |
java.lang.String |
The base URL of the npm package registry. |
npmTokenSecret |
java.lang.String |
GitHub secret which contains the NPM token to use when publishing packages. |
outdir |
java.lang.String |
The root directory of the project. Relative to this directory, all files are synthesized. |
package |
java.lang.Boolean |
Defines a package task that will produce an npm tarball under the artifacts directory (e.g. dist). |
packageManager |
io.github.cdklabs.projen.javascript.NodePackageManager |
The Node Package Manager used to execute scripts. |
packageName |
java.lang.String |
The "name" in package.json. |
parent |
io.github.cdklabs.projen.Project |
The parent project, if this project is part of a bigger project. |
peerDependencyOptions |
io.github.cdklabs.projen.javascript.PeerDependencyOptions |
Options for peerDeps. |
peerDeps |
java.util.List |
Peer dependencies for this module. |
pnpmVersion |
java.lang.String |
The version of PNPM to use if using PNPM as a package manager. |
postBuildSteps |
java.util.List |
Steps to execute after build as part of the release workflow. |
prerelease |
java.lang.String |
Bump versions from the default branch as pre-releases (e.g. "beta", "alpha", "pre"). |
prettier |
java.lang.Boolean |
Setup prettier. |
prettierOptions |
io.github.cdklabs.projen.javascript.PrettierOptions |
Prettier options. |
projectType |
io.github.cdklabs.projen.ProjectType |
Which type of project this is (library/app). |
projenCommand |
java.lang.String |
The shell command to use in order to run the projen CLI. |
projenCredentials |
io.github.cdklabs.projen.github.GithubCredentials |
Choose a method of providing GitHub API access for projen workflows. |
projenDevDependency |
java.lang.Boolean |
Indicates of "projen" should be installed as a devDependency. |
projenrcJs |
java.lang.Boolean |
Generate (once) .projenrc.js (in JavaScript). Set to false in order to disable .projenrc.js generation. |
projenrcJson |
java.lang.Boolean |
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation. |
projenrcJsonOptions |
io.github.cdklabs.projen.ProjenrcJsonOptions |
Options for .projenrc.json. |
projenrcJsOptions |
io.github.cdklabs.projen.javascript.ProjenrcOptions |
Options for .projenrc.js. |
projenrcTs |
java.lang.Boolean |
Use TypeScript for your projenrc file (.projenrc.ts). |
projenrcTsOptions |
io.github.cdklabs.projen.typescript.ProjenrcOptions |
Options for .projenrc.ts. |
projenTokenSecret |
java.lang.String |
The name of a secret which includes a GitHub Personal Access Token to be used by projen workflows. |
projenVersion |
java.lang.String |
Version of projen to install. |
publishDryRun |
java.lang.Boolean |
Instead of actually publishing to package managers, just print the publishing command. |
publishTasks |
java.lang.Boolean |
Define publishing tasks that can be executed manually as well as workflows. |
pullRequestTemplate |
java.lang.Boolean |
Include a GitHub pull request template. |
pullRequestTemplateContents |
java.util.List |
The contents of the pull request template. |
readme |
io.github.cdklabs.projen.SampleReadmeProps |
The README setup. |
releasableCommits |
io.github.cdklabs.projen.ReleasableCommits |
Find commits that should be considered releasable Used to decide if a release is required. |
release |
java.lang.Boolean |
Add release management to this project. |
releaseBranches |
java.util.Map |
Defines additional release branches. |
releaseEveryCommit |
java.lang.Boolean |
Automatically release new versions every commit to one of branches in releaseBranches. |
releaseFailureIssue |
java.lang.Boolean |
Create a github issue on every failed publishing task. |
releaseFailureIssueLabel |
java.lang.String |
The label to apply to issues indicating publish failures. |
releaseSchedule |
java.lang.String |
CRON schedule to trigger new releases. |
releaseTagPrefix |
java.lang.String |
Automatically add the given prefix to release tags. |
releaseToNpm |
java.lang.Boolean |
Automatically release to npm when new versions are introduced. |
releaseTrigger |
io.github.cdklabs.projen.release.ReleaseTrigger |
The release trigger to use. |
releaseWorkflow |
java.lang.Boolean |
DEPRECATED: renamed to release. |
releaseWorkflowName |
java.lang.String |
The name of the default release workflow. |
releaseWorkflowSetupSteps |
java.util.List |
A set of workflow steps to execute in order to setup the workflow container. |
renovatebot |
java.lang.Boolean |
Use renovatebot to handle dependency upgrades. |
renovatebotOptions |
io.github.cdklabs.projen.RenovatebotOptions |
Options for renovatebot. |
repository |
java.lang.String |
The repository is the location where the actual code for your package lives. |
repositoryDirectory |
java.lang.String |
If the package.json for your package is not in the root directory (for example if it is part of a monorepo), you can specify the directory in which it lives. |
sampleCode |
java.lang.Boolean |
Generate one-time sample in src/ and test/ if there are no files there. |
scopedPackagesOptions |
java.util.List |
Options for privately hosted scoped packages. |
scripts |
java.util.Map |
npm scripts to include. |
srcdir |
java.lang.String |
Typescript sources directory. |
stability |
java.lang.String |
Package's Stability. |
stale |
java.lang.Boolean |
Auto-close of stale issues and pull request. |
staleOptions |
io.github.cdklabs.projen.github.StaleOptions |
Auto-close stale issues and pull requests. |
testdir |
java.lang.String |
Jest tests directory. |
tsconfig |
io.github.cdklabs.projen.javascript.TypescriptConfigOptions |
Custom TSConfig. |
tsconfigDev |
io.github.cdklabs.projen.javascript.TypescriptConfigOptions |
Custom tsconfig options for the development tsconfig.json file (used for testing). |
tsconfigDevFile |
java.lang.String |
The name of the development tsconfig.json file. |
tsJestOptions |
io.github.cdklabs.projen.typescript.TsJestOptions |
Options for ts-jest. |
typescriptVersion |
java.lang.String |
TypeScript version to use. |
versionrcOptions |
java.util.Map |
Custom configuration used when creating changelog with standard-version package. |
vscode |
java.lang.Boolean |
Enable VSCode integration. |
workflowBootstrapSteps |
java.util.List |
Workflow steps to use in order to bootstrap this repo. |
workflowContainerImage |
java.lang.String |
Container image to use for GitHub workflows. |
workflowGitIdentity |
io.github.cdklabs.projen.github.GitIdentity |
The git identity to use in workflows. |
workflowNodeVersion |
java.lang.String |
The node version to use in GitHub workflows. |
workflowPackageCache |
java.lang.Boolean |
Enable Node.js package cache in GitHub workflows. |
workflowRunsOn |
java.util.List |
Github Runner selection labels. |
workflowRunsOnGroup |
io.github.cdklabs.projen.GroupRunnerOptions |
Github Runner Group selection options. |
yarnBerryOptions |
io.github.cdklabs.projen.javascript.YarnBerryOptions |
Options for Yarn Berry. |
commitGeneratedCode |
java.lang.Boolean |
Whether to commit the code generated by the OpenAPI Generator. |
allowLibraryDependenciesOptional
public java.lang.Boolean getAllowLibraryDependencies();
- Type: java.lang.Boolean
- Default: true
Allow the project to include peerDependencies and bundledDependencies.
This is normally only allowed for libraries. For apps, there's no meaning for specifying these.
artifactsDirectoryOptional
public java.lang.String getArtifactsDirectory();
- Type: java.lang.String
- Default: "dist"
A directory which will contain build artifacts.
authorEmailOptional
public java.lang.String getAuthorEmail();
- Type: java.lang.String
Author's e-mail.
authorNameOptional
public java.lang.String getAuthorName();
- Type: java.lang.String
Author's name.
authorOrganizationOptional
public java.lang.Boolean getAuthorOrganization();
- Type: java.lang.Boolean
Is the author an organization.
authorUrlOptional
public java.lang.String getAuthorUrl();
- Type: java.lang.String
Author's URL / Website.
autoApproveOptionsOptional
public AutoApproveOptions getAutoApproveOptions();
- Type: io.github.cdklabs.projen.github.AutoApproveOptions
- Default: auto approve is disabled
Enable and configure the 'auto approve' workflow.
autoApproveUpgradesOptional
public java.lang.Boolean getAutoApproveUpgrades();
- Type: java.lang.Boolean
- Default: true
Automatically approve deps upgrade PRs, allowing them to be merged by mergify (if configued).
Throw if set to true but autoApproveOptions are not defined.
autoDetectBinOptional
public java.lang.Boolean getAutoDetectBin();
- Type: java.lang.Boolean
- Default: true
Automatically add all executables under the bin directory to your package.json file under the bin section.
autoMergeOptional
public java.lang.Boolean getAutoMerge();
- Type: java.lang.Boolean
- Default: true
Enable automatic merging on GitHub.
Has no effect if github.mergify
is set to false.
autoMergeOptionsOptional
public AutoMergeOptions getAutoMergeOptions();
- Type: io.github.cdklabs.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.
binOptional
public java.util.Map<java.lang.String, java.lang.String> getBin();
- Type: java.util.Map
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.
bugsEmailOptional
public java.lang.String getBugsEmail();
- Type: java.lang.String
The email address to which issues should be reported.
bugsUrlOptional
public java.lang.String getBugsUrl();
- Type: java.lang.String
The url to your project's issue tracker.
buildWorkflowOptional
public java.lang.Boolean getBuildWorkflow();
- Type: java.lang.Boolean
- Default: true if not a subproject
Define a GitHub workflow for building PRs.
buildWorkflowOptionsOptional
public BuildWorkflowOptions getBuildWorkflowOptions();
- Type: io.github.cdklabs.projen.javascript.BuildWorkflowOptions
Options for PR build workflow.
~~buildWorkflowTriggers~~Optional
- Deprecated: - Use
buildWorkflowOptions.workflowTriggers
public Triggers getBuildWorkflowTriggers();
- Type: io.github.cdklabs.projen.github.workflows.Triggers
- Default: "{ pullRequest: {}, workflowDispatch: {} }"
Build workflow triggers.
bundledDepsOptional
public java.util.List<java.lang.String> getBundledDeps();
- Type: java.util.List
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.
bundlerOptionsOptional
public BundlerOptions getBundlerOptions();
- Type: io.github.cdklabs.projen.javascript.BundlerOptions
Options for Bundler.
checkLicensesOptional
public LicenseCheckerOptions getCheckLicenses();
- Type: io.github.cdklabs.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.
clobberOptional
public java.lang.Boolean getClobber();
- Type: java.lang.Boolean
- Default: true, but false for subprojects
Add a clobber task which resets the repo to origin.
codeArtifactOptionsOptional
public CodeArtifactOptions getCodeArtifactOptions();
- Type: io.github.cdklabs.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
codeCovOptional
public java.lang.Boolean getCodeCov();
- Type: java.lang.Boolean
- 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.
codeCovTokenSecretOptional
public java.lang.String getCodeCovTokenSecret();
- Type: java.lang.String
- Default: if this option is not specified, only public repositories are supported
Define the secret name for a specified https://codecov.io/ token A secret is required to send coverage for private repositories.
commitGeneratedOptional
public java.lang.Boolean getCommitGenerated();
- Type: java.lang.Boolean
- Default: true
Whether to commit the managed files by default.
copyrightOwnerOptional
public java.lang.String getCopyrightOwner();
- Type: java.lang.String
- Default: defaults to the value of authorName or "" if
authorNameis undefined.
License copyright owner.
copyrightPeriodOptional
public java.lang.String getCopyrightPeriod();
- Type: java.lang.String
- Default: current year
The copyright years to put in the LICENSE file.
defaultReleaseBranchOptional
public java.lang.String getDefaultReleaseBranch();
- Type: java.lang.String
- Default: "main"
The name of the main release branch.
dependabotOptional
public java.lang.Boolean getDependabot();
- Type: java.lang.Boolean
- Default: false
Use dependabot to handle dependency upgrades.
Cannot be used in conjunction with depsUpgrade.
dependabotOptionsOptional
public DependabotOptions getDependabotOptions();
- Type: io.github.cdklabs.projen.github.DependabotOptions
- Default: default options
Options for dependabot.
depsOptional
public java.util.List<java.lang.String> getDeps();
- Type: java.util.List
- 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.
depsUpgradeOptional
public java.lang.Boolean getDepsUpgrade();
- Type: java.lang.Boolean
- Default: true
Use tasks and github workflows to handle dependency upgrades.
Cannot be used in conjunction with dependabot.
depsUpgradeOptionsOptional
public UpgradeDependenciesOptions getDepsUpgradeOptions();
- Type: io.github.cdklabs.projen.javascript.UpgradeDependenciesOptions
- Default: default options
Options for UpgradeDependencies.
descriptionOptional
public java.lang.String getDescription();
- Type: java.lang.String
The description is just a string that helps people understand the purpose of the package.
It can be used when searching for packages in a package manager as well. See https://classic.yarnpkg.com/en/docs/package-json/#toc-description
devContainerOptional
public java.lang.Boolean getDevContainer();
- Type: java.lang.Boolean
- Default: false
Add a VSCode development environment (used for GitHub Codespaces).
devDepsOptional
public java.util.List<java.lang.String> getDevDeps();
- Type: java.util.List
- 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.
disableTsconfigOptional
public java.lang.Boolean getDisableTsconfig();
- Type: java.lang.Boolean
- Default: false
Do not generate a tsconfig.json file (used by jsii projects since tsconfig.json is generated by the jsii compiler).
disableTsconfigDevOptional
public java.lang.Boolean getDisableTsconfigDev();
- Type: java.lang.Boolean
- Default: false
Do not generate a tsconfig.dev.json file.
docgenOptional
public java.lang.Boolean getDocgen();
- Type: java.lang.Boolean
- Default: false
Docgen by Typedoc.
docsDirectoryOptional
public java.lang.String getDocsDirectory();
- Type: java.lang.String
- Default: "docs"
Docs directory.
entrypointOptional
public java.lang.String getEntrypoint();
- Type: java.lang.String
- Default: "lib/index.js"
Module entrypoint (main in package.json). Set to an empty string to not include main in your package.json.
entrypointTypesOptional
public java.lang.String getEntrypointTypes();
- Type: java.lang.String
- Default: .d.ts file derived from the project's entrypoint (usually lib/index.d.ts)
The .d.ts file that includes the type declarations for this module.
eslintOptional
public java.lang.Boolean getEslint();
- Type: java.lang.Boolean
- Default: true
Setup eslint.
eslintOptionsOptional
public EslintOptions getEslintOptions();
- Type: io.github.cdklabs.projen.javascript.EslintOptions
- Default: opinionated default options
Eslint options.
githubOptional
public java.lang.Boolean getGithub();
- Type: java.lang.Boolean
- Default: true
Enable GitHub integration.
Enabled by default for root projects. Disabled for non-root projects.
githubOptionsOptional
public GitHubOptions getGithubOptions();
- Type: io.github.cdklabs.projen.github.GitHubOptions
- Default: see GitHubOptions
Options for GitHub integration.
gitignoreOptional
public java.util.List<java.lang.String> getGitignore();
- Type: java.util.List
Additional entries to .gitignore.
gitIgnoreOptionsOptional
public IgnoreFileOptions getGitIgnoreOptions();
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptionsOptional
public GitOptions getGitOptions();
- Type: io.github.cdklabs.projen.GitOptions
Configuration options for git.
gitpodOptional
public java.lang.Boolean getGitpod();
- Type: java.lang.Boolean
- Default: false
Add a Gitpod development environment.
homepageOptional
public java.lang.String getHomepage();
- Type: java.lang.String
Package's Homepage / Website.
jestOptional
public java.lang.Boolean getJest();
- Type: java.lang.Boolean
- Default: true
Setup jest unit tests.
jestOptionsOptional
public JestOptions getJestOptions();
- Type: io.github.cdklabs.projen.javascript.JestOptions
- Default: default options
Jest options.
jsiiReleaseVersionOptional
public java.lang.String getJsiiReleaseVersion();
- Type: java.lang.String
- Default: "latest"
Version requirement of publib which is used to publish modules to npm.
keywordsOptional
public java.util.List<java.lang.String> getKeywords();
- Type: java.util.List
Keywords to include in package.json.
libdirOptional
public java.lang.String getLibdir();
- Type: java.lang.String
- Default: "lib"
Typescript artifacts output directory.
licenseOptional
public java.lang.String getLicense();
- Type: java.lang.String
- Default: "Apache-2.0"
License's SPDX identifier.
See https://github.com/projen/projen/tree/main/license-text for a list of supported licenses.
Use the licensed option if you want to no license to be specified.
licensedOptional
public java.lang.Boolean getLicensed();
- Type: java.lang.Boolean
- Default: true
Indicates if a license should be added.
loggingOptional
public LoggerOptions getLogging();
- Type: io.github.cdklabs.projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
majorVersionOptional
public java.lang.Number getMajorVersion();
- Type: java.lang.Number
- Default: Major version is not enforced.
Major version to release from the default branch.
If this is specified, we bump the latest version of this major version line. If not specified, we bump the global latest version.
maxNodeVersionOptional
public java.lang.String getMaxNodeVersion();
- Type: java.lang.String
- Default: no max
Minimum node.js version to require via engines (inclusive).
~~mergify~~Optional
- Deprecated: use
githubOptions.mergifyinstead
public java.lang.Boolean getMergify();
- Type: java.lang.Boolean
- Default: true
Whether mergify should be enabled on this repository or not.
~~mergifyOptions~~Optional
- Deprecated: use
githubOptions.mergifyOptionsinstead
public MergifyOptions getMergifyOptions();
- Type: io.github.cdklabs.projen.github.MergifyOptions
- Default: default options
Options for mergify.
minMajorVersionOptional
public java.lang.Number getMinMajorVersion();
- Type: java.lang.Number
- Default: No minimum version is being enforced
Minimal Major version to release.
This can be useful to set to 1, as breaking changes before the 1.x major release are not incrementing the major version number.
Can not be set together with majorVersion.
minNodeVersionOptional
public java.lang.String getMinNodeVersion();
- Type: java.lang.String
- Default: no "engines" specified
Minimum Node.js version to require via package.json engines (inclusive).
~~mutableBuild~~Optional
- Deprecated: - Use
buildWorkflowOptions.mutableBuild
public java.lang.Boolean getMutableBuild();
- Type: java.lang.Boolean
- Default: true
Automatically update files modified during builds to pull-request branches.
This means that any files synthesized by projen or e.g. test snapshots will always be up-to-date before a PR is merged.
Implies that PR builds do not have anti-tamper checks.
nameOptional
public java.lang.String getName();
- Type: java.lang.String
- Default: $BASEDIR
This is the name of your project.
npmAccessOptional
public NpmAccess getNpmAccess();
- Type: io.github.cdklabs.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.
npmDistTagOptional
public java.lang.String getNpmDistTag();
- Type: java.lang.String
- Default: "latest"
The npmDistTag to use when publishing from the default branch.
To set the npm dist-tag for release branches, set the npmDistTag property
for each branch.
~~npmignore~~Optional
- Deprecated: - use
project.addPackageIgnore
public java.util.List<java.lang.String> getNpmignore();
- Type: java.util.List
Additional entries to .npmignore.
npmignoreEnabledOptional
public java.lang.Boolean getNpmignoreEnabled();
- Type: java.lang.Boolean
- Default: true
Defines an .npmignore file. Normally this is only needed for libraries that are packaged as tarballs.
npmIgnoreOptionsOptional
public IgnoreFileOptions getNpmIgnoreOptions();
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .npmignore file.
npmProvenanceOptional
public java.lang.Boolean getNpmProvenance();
- Type: java.lang.Boolean
- 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.
~~npmRegistry~~Optional
- Deprecated: use
npmRegistryUrlinstead
public java.lang.String getNpmRegistry();
- Type: java.lang.String
The host name of the npm registry to publish to.
Cannot be set together with npmRegistryUrl.
npmRegistryUrlOptional
public java.lang.String getNpmRegistryUrl();
- Type: java.lang.String
- Default: "https://registry.npmjs.org"
The base URL of the npm package registry.
Must be a URL (e.g. start with "https://" or "http://")
npmTokenSecretOptional
public java.lang.String getNpmTokenSecret();
- Type: java.lang.String
- Default: "NPM_TOKEN"
GitHub secret which contains the NPM token to use when publishing packages.
outdirOptional
public java.lang.String getOutdir();
- Type: java.lang.String
- Default: "."
The root directory of the project. Relative to this directory, all files are synthesized.
If this project has a parent, this directory is relative to the parent directory and it cannot be the same as the parent or any of it's other subprojects.
packageOptional
public java.lang.Boolean getPackage();
- Type: java.lang.Boolean
- Default: true
Defines a package task that will produce an npm tarball under the artifacts directory (e.g. dist).
packageManagerOptional
public NodePackageManager getPackageManager();
- Type: io.github.cdklabs.projen.javascript.NodePackageManager
- Default: NodePackageManager.YARN_CLASSIC
The Node Package Manager used to execute scripts.
packageNameOptional
public java.lang.String getPackageName();
- Type: java.lang.String
- Default: defaults to project name
The "name" in package.json.
parentOptional
public Project getParent();
- Type: io.github.cdklabs.projen.Project
The parent project, if this project is part of a bigger project.
peerDependencyOptionsOptional
public PeerDependencyOptions getPeerDependencyOptions();
- Type: io.github.cdklabs.projen.javascript.PeerDependencyOptions
Options for peerDeps.
peerDepsOptional
public java.util.List<java.lang.String> getPeerDeps();
- Type: java.util.List
- 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.
pnpmVersionOptional
public java.lang.String getPnpmVersion();
- Type: java.lang.String
- Default: "7"
The version of PNPM to use if using PNPM as a package manager.
postBuildStepsOptional
public java.util.List<JobStep> getPostBuildSteps();
- Type: java.util.List
- Default: []
Steps to execute after build as part of the release workflow.
prereleaseOptional
public java.lang.String getPrerelease();
- Type: java.lang.String
- Default: normal semantic versions
Bump versions from the default branch as pre-releases (e.g. "beta", "alpha", "pre").
prettierOptional
public java.lang.Boolean getPrettier();
- Type: java.lang.Boolean
- Default: false
Setup prettier.
prettierOptionsOptional
public PrettierOptions getPrettierOptions();
- Type: io.github.cdklabs.projen.javascript.PrettierOptions
- Default: default options
Prettier options.
~~projectType~~Optional
- Deprecated: no longer supported at the base project level
public ProjectType getProjectType();
- Type: io.github.cdklabs.projen.ProjectType
- Default: ProjectType.UNKNOWN
Which type of project this is (library/app).
projenCommandOptional
public java.lang.String getProjenCommand();
- Type: java.lang.String
- Default: "npx projen"
The shell command to use in order to run the projen CLI.
Can be used to customize in special environments.
projenCredentialsOptional
public GithubCredentials getProjenCredentials();
- Type: io.github.cdklabs.projen.github.GithubCredentials
- Default: use a personal access token named PROJEN_GITHUB_TOKEN
Choose a method of providing GitHub API access for projen workflows.
projenDevDependencyOptional
public java.lang.Boolean getProjenDevDependency();
- Type: java.lang.Boolean
- Default: true if not a subproject
Indicates of "projen" should be installed as a devDependency.
projenrcJsOptional
public java.lang.Boolean getProjenrcJs();
- Type: java.lang.Boolean
- Default: true if projenrcJson is false
Generate (once) .projenrc.js (in JavaScript). Set to false in order to disable .projenrc.js generation.
projenrcJsonOptional
public java.lang.Boolean getProjenrcJson();
- Type: java.lang.Boolean
- Default: false
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation.
projenrcJsonOptionsOptional
public ProjenrcJsonOptions getProjenrcJsonOptions();
- Type: io.github.cdklabs.projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
projenrcJsOptionsOptional
public ProjenrcOptions getProjenrcJsOptions();
- Type: io.github.cdklabs.projen.javascript.ProjenrcOptions
- Default: default options
Options for .projenrc.js.
projenrcTsOptional
public java.lang.Boolean getProjenrcTs();
- Type: java.lang.Boolean
- Default: false
Use TypeScript for your projenrc file (.projenrc.ts).
projenrcTsOptionsOptional
public ProjenrcOptions getProjenrcTsOptions();
- Type: io.github.cdklabs.projen.typescript.ProjenrcOptions
Options for .projenrc.ts.
~~projenTokenSecret~~Optional
- Deprecated: use
projenCredentials
public java.lang.String getProjenTokenSecret();
- Type: java.lang.String
- Default: "PROJEN_GITHUB_TOKEN"
The name of a secret which includes a GitHub Personal Access Token to be used by projen workflows.
This token needs to have the repo, workflows
and packages scope.
projenVersionOptional
public java.lang.String getProjenVersion();
- Type: java.lang.String
- Default: Defaults to the latest version.
Version of projen to install.
publishDryRunOptional
public java.lang.Boolean getPublishDryRun();
- Type: java.lang.Boolean
- Default: false
Instead of actually publishing to package managers, just print the publishing command.
publishTasksOptional
public java.lang.Boolean getPublishTasks();
- Type: java.lang.Boolean
- Default: false
Define publishing tasks that can be executed manually as well as workflows.
Normally, publishing only happens within automated workflows. Enable this in order to create a publishing task for each publishing activity.
pullRequestTemplateOptional
public java.lang.Boolean getPullRequestTemplate();
- Type: java.lang.Boolean
- Default: true
Include a GitHub pull request template.
pullRequestTemplateContentsOptional
public java.util.List<java.lang.String> getPullRequestTemplateContents();
- Type: java.util.List
- Default: default content
The contents of the pull request template.
readmeOptional
public SampleReadmeProps getReadme();
- Type: io.github.cdklabs.projen.SampleReadmeProps
- Default: { filename: 'README.md', contents: '# replace this' }
The README setup.
releasableCommitsOptional
public ReleasableCommits getReleasableCommits();
- Type: io.github.cdklabs.projen.ReleasableCommits
- Default: ReleasableCommits.everyCommit()
Find commits that should be considered releasable Used to decide if a release is required.
releaseOptional
public java.lang.Boolean getRelease();
- Type: java.lang.Boolean
- Default: true (false for subprojects)
Add release management to this project.
releaseBranchesOptional
public java.util.Map<java.lang.String, BranchOptions> getReleaseBranches();
- Type: java.util.Map
- Default: no additional branches are used for release. you can use
addBranch()to add additional branches.
Defines additional release branches.
A workflow will be created for each
release branch which will publish releases from commits in this branch.
Each release branch must be assigned a major version number which is used
to enforce that versions published from that branch always use that major
version. If multiple branches are used, the majorVersion field must also
be provided for the default branch.
~~releaseEveryCommit~~Optional
- Deprecated: Use
releaseTrigger: ReleaseTrigger.continuous()instead
public java.lang.Boolean getReleaseEveryCommit();
- Type: java.lang.Boolean
- Default: true
Automatically release new versions every commit to one of branches in releaseBranches.
releaseFailureIssueOptional
public java.lang.Boolean getReleaseFailureIssue();
- Type: java.lang.Boolean
- Default: false
Create a github issue on every failed publishing task.
releaseFailureIssueLabelOptional
public java.lang.String getReleaseFailureIssueLabel();
- Type: java.lang.String
- Default: "failed-release"
The label to apply to issues indicating publish failures.
Only applies if releaseFailureIssue is true.
~~releaseSchedule~~Optional
- Deprecated: Use
releaseTrigger: ReleaseTrigger.scheduled()instead
public java.lang.String getReleaseSchedule();
- Type: java.lang.String
- Default: no scheduled releases
CRON schedule to trigger new releases.
releaseTagPrefixOptional
public java.lang.String getReleaseTagPrefix();
- Type: java.lang.String
- Default: "v"
Automatically add the given prefix to release tags.
Useful if you are releasing on multiple branches with overlapping version numbers. Note: this prefix is used to detect the latest tagged version when bumping, so if you change this on a project with an existing version history, you may need to manually tag your latest release with the new prefix.
releaseToNpmOptional
public java.lang.Boolean getReleaseToNpm();
- Type: java.lang.Boolean
- Default: false
Automatically release to npm when new versions are introduced.
releaseTriggerOptional
public ReleaseTrigger getReleaseTrigger();
- Type: io.github.cdklabs.projen.release.ReleaseTrigger
- Default: Continuous releases (
ReleaseTrigger.continuous())
The release trigger to use.
~~releaseWorkflow~~Optional
- Deprecated: see
release.
public java.lang.Boolean getReleaseWorkflow();
- Type: java.lang.Boolean
- Default: true if not a subproject
DEPRECATED: renamed to release.
releaseWorkflowNameOptional
public java.lang.String getReleaseWorkflowName();
- Type: java.lang.String
- Default: "release"
The name of the default release workflow.
releaseWorkflowSetupStepsOptional
public java.util.List<JobStep> getReleaseWorkflowSetupSteps();
- Type: java.util.List
A set of workflow steps to execute in order to setup the workflow container.
renovatebotOptional
public java.lang.Boolean getRenovatebot();
- Type: java.lang.Boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptionsOptional
public RenovatebotOptions getRenovatebotOptions();
- Type: io.github.cdklabs.projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
repositoryOptional
public java.lang.String getRepository();
- Type: java.lang.String
The repository is the location where the actual code for your package lives.
See https://classic.yarnpkg.com/en/docs/package-json/#toc-repository
repositoryDirectoryOptional
public java.lang.String getRepositoryDirectory();
- Type: java.lang.String
If the package.json for your package is not in the root directory (for example if it is part of a monorepo), you can specify the directory in which it lives.
sampleCodeOptional
public java.lang.Boolean getSampleCode();
- Type: java.lang.Boolean
- Default: true
Generate one-time sample in src/ and test/ if there are no files there.
scopedPackagesOptionsOptional
public java.util.List<ScopedPackagesOptions> getScopedPackagesOptions();
- Type: java.util.List
- Default: fetch all scoped packages from the public npm registry
Options for privately hosted scoped packages.
~~scripts~~Optional
- Deprecated: use
project.addTask()orpackage.setScript()
public java.util.Map<java.lang.String, java.lang.String> getScripts();
- Type: java.util.Map
- 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.
srcdirOptional
public java.lang.String getSrcdir();
- Type: java.lang.String
- Default: "src"
Typescript sources directory.
stabilityOptional
public java.lang.String getStability();
- Type: java.lang.String
Package's Stability.
staleOptional
public java.lang.Boolean getStale();
- Type: java.lang.Boolean
- Default: false
Auto-close of stale issues and pull request.
See staleOptions for options.
staleOptionsOptional
public StaleOptions getStaleOptions();
- Type: io.github.cdklabs.projen.github.StaleOptions
- Default: see defaults in
StaleOptions
Auto-close stale issues and pull requests.
To disable set stale to false.
testdirOptional
public java.lang.String getTestdir();
- Type: java.lang.String
- Default: "test"
Jest tests directory.
Tests files should be named xxx.test.ts.
If this directory is under srcdir (e.g. src/test, src/__tests__),
then tests are going to be compiled into lib/ and executed as javascript.
If the test directory is outside of src, then we configure jest to
compile the code in-memory.
tsconfigOptional
public TypescriptConfigOptions getTsconfig();
- Type: io.github.cdklabs.projen.javascript.TypescriptConfigOptions
- Default: default options
Custom TSConfig.
tsconfigDevOptional
public TypescriptConfigOptions getTsconfigDev();
- Type: io.github.cdklabs.projen.javascript.TypescriptConfigOptions
- Default: use the production tsconfig options
Custom tsconfig options for the development tsconfig.json file (used for testing).
tsconfigDevFileOptional
public java.lang.String getTsconfigDevFile();
- Type: java.lang.String
- Default: "tsconfig.dev.json"
The name of the development tsconfig.json file.
tsJestOptionsOptional
public TsJestOptions getTsJestOptions();
- Type: io.github.cdklabs.projen.typescript.TsJestOptions
Options for ts-jest.
typescriptVersionOptional
public java.lang.String getTypescriptVersion();
- Type: java.lang.String
- Default: "latest"
TypeScript version to use.
NOTE: Typescript is not semantically versioned and should remain on the
same minor, so we recommend using a ~ dependency (e.g. ~1.2.3).
versionrcOptionsOptional
public java.util.Map<java.lang.String, java.lang.Object> getVersionrcOptions();
- Type: java.util.Map
- 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.
vscodeOptional
public java.lang.Boolean getVscode();
- Type: java.lang.Boolean
- Default: true
Enable VSCode integration.
Enabled by default for root projects. Disabled for non-root projects.
workflowBootstrapStepsOptional
public java.util.List<JobStep> getWorkflowBootstrapSteps();
- Type: java.util.List
- Default: "yarn install --frozen-lockfile && yarn projen"
Workflow steps to use in order to bootstrap this repo.
workflowContainerImageOptional
public java.lang.String getWorkflowContainerImage();
- Type: java.lang.String
- Default: default image
Container image to use for GitHub workflows.
workflowGitIdentityOptional
public GitIdentity getWorkflowGitIdentity();
- Type: io.github.cdklabs.projen.github.GitIdentity
- Default: GitHub Actions
The git identity to use in workflows.
workflowNodeVersionOptional
public java.lang.String getWorkflowNodeVersion();
- Type: java.lang.String
- Default: same as
minNodeVersion
The node version to use in GitHub workflows.
workflowPackageCacheOptional
public java.lang.Boolean getWorkflowPackageCache();
- Type: java.lang.Boolean
- Default: false
Enable Node.js package cache in GitHub workflows.
workflowRunsOnOptional
public java.util.List<java.lang.String> getWorkflowRunsOn();
- Type: java.util.List
- Default: ["ubuntu-latest"]
Github Runner selection labels.
workflowRunsOnGroupOptional
public GroupRunnerOptions getWorkflowRunsOnGroup();
- Type: io.github.cdklabs.projen.GroupRunnerOptions
Github Runner Group selection options.
yarnBerryOptionsOptional
public YarnBerryOptions getYarnBerryOptions();
- Type: io.github.cdklabs.projen.javascript.YarnBerryOptions
- Default: Yarn Berry v4 with all default options
Options for Yarn Berry.
commitGeneratedCodeOptional
public java.lang.Boolean getCommitGeneratedCode();
- Type: java.lang.Boolean
- Default: false
Whether to commit the code generated by the OpenAPI Generator.
GeneratedTypeScriptWebSocketHooksOptions
Options for configuring a generated typescript websocket client library project.
Initializer
import software.aws.pdk.type_safe_api.GeneratedTypeScriptWebSocketHooksOptions;
GeneratedTypeScriptWebSocketHooksOptions.builder()
// .allowLibraryDependencies(java.lang.Boolean)
// .artifactsDirectory(java.lang.String)
// .authorEmail(java.lang.String)
// .authorName(java.lang.String)
// .authorOrganization(java.lang.Boolean)
// .authorUrl(java.lang.String)
// .autoApproveOptions(AutoApproveOptions)
// .autoApproveUpgrades(java.lang.Boolean)
// .autoDetectBin(java.lang.Boolean)
// .autoMerge(java.lang.Boolean)
// .autoMergeOptions(AutoMergeOptions)
// .bin(java.util.Map<java.lang.String, java.lang.String>)
// .bugsEmail(java.lang.String)
// .bugsUrl(java.lang.String)
// .buildWorkflow(java.lang.Boolean)
// .buildWorkflowOptions(BuildWorkflowOptions)
// .buildWorkflowTriggers(Triggers)
// .bundledDeps(java.util.List<java.lang.String>)
// .bundlerOptions(BundlerOptions)
// .checkLicenses(LicenseCheckerOptions)
// .clobber(java.lang.Boolean)
// .codeArtifactOptions(CodeArtifactOptions)
// .codeCov(java.lang.Boolean)
// .codeCovTokenSecret(java.lang.String)
// .commitGenerated(java.lang.Boolean)
// .copyrightOwner(java.lang.String)
// .copyrightPeriod(java.lang.String)
// .defaultReleaseBranch(java.lang.String)
// .dependabot(java.lang.Boolean)
// .dependabotOptions(DependabotOptions)
// .deps(java.util.List<java.lang.String>)
// .depsUpgrade(java.lang.Boolean)
// .depsUpgradeOptions(UpgradeDependenciesOptions)
// .description(java.lang.String)
// .devContainer(java.lang.Boolean)
// .devDeps(java.util.List<java.lang.String>)
// .disableTsconfig(java.lang.Boolean)
// .disableTsconfigDev(java.lang.Boolean)
// .docgen(java.lang.Boolean)
// .docsDirectory(java.lang.String)
// .entrypoint(java.lang.String)
// .entrypointTypes(java.lang.String)
// .eslint(java.lang.Boolean)
// .eslintOptions(EslintOptions)
// .github(java.lang.Boolean)
// .githubOptions(GitHubOptions)
// .gitignore(java.util.List<java.lang.String>)
// .gitIgnoreOptions(IgnoreFileOptions)
// .gitOptions(GitOptions)
// .gitpod(java.lang.Boolean)
// .homepage(java.lang.String)
// .jest(java.lang.Boolean)
// .jestOptions(JestOptions)
// .jsiiReleaseVersion(java.lang.String)
// .keywords(java.util.List<java.lang.String>)
// .libdir(java.lang.String)
// .license(java.lang.String)
// .licensed(java.lang.Boolean)
// .logging(LoggerOptions)
// .majorVersion(java.lang.Number)
// .maxNodeVersion(java.lang.String)
// .mergify(java.lang.Boolean)
// .mergifyOptions(MergifyOptions)
// .minMajorVersion(java.lang.Number)
// .minNodeVersion(java.lang.String)
// .mutableBuild(java.lang.Boolean)
// .name(java.lang.String)
// .npmAccess(NpmAccess)
// .npmDistTag(java.lang.String)
// .npmignore(java.util.List<java.lang.String>)
// .npmignoreEnabled(java.lang.Boolean)
// .npmIgnoreOptions(IgnoreFileOptions)
// .npmProvenance(java.lang.Boolean)
// .npmRegistry(java.lang.String)
// .npmRegistryUrl(java.lang.String)
// .npmTokenSecret(java.lang.String)
// .outdir(java.lang.String)
// .package(java.lang.Boolean)
// .packageManager(NodePackageManager)
// .packageName(java.lang.String)
// .parent(Project)
// .peerDependencyOptions(PeerDependencyOptions)
// .peerDeps(java.util.List<java.lang.String>)
// .pnpmVersion(java.lang.String)
// .postBuildSteps(java.util.List<JobStep>)
// .prerelease(java.lang.String)
// .prettier(java.lang.Boolean)
// .prettierOptions(PrettierOptions)
// .projectType(ProjectType)
// .projenCommand(java.lang.String)
// .projenCredentials(GithubCredentials)
// .projenDevDependency(java.lang.Boolean)
// .projenrcJs(java.lang.Boolean)
// .projenrcJson(java.lang.Boolean)
// .projenrcJsonOptions(ProjenrcJsonOptions)
// .projenrcJsOptions(ProjenrcOptions)
// .projenrcTs(java.lang.Boolean)
// .projenrcTsOptions(ProjenrcOptions)
// .projenTokenSecret(java.lang.String)
// .projenVersion(java.lang.String)
// .publishDryRun(java.lang.Boolean)
// .publishTasks(java.lang.Boolean)
// .pullRequestTemplate(java.lang.Boolean)
// .pullRequestTemplateContents(java.util.List<java.lang.String>)
// .readme(SampleReadmeProps)
// .releasableCommits(ReleasableCommits)
// .release(java.lang.Boolean)
// .releaseBranches(java.util.Map<java.lang.String, BranchOptions>)
// .releaseEveryCommit(java.lang.Boolean)
// .releaseFailureIssue(java.lang.Boolean)
// .releaseFailureIssueLabel(java.lang.String)
// .releaseSchedule(java.lang.String)
// .releaseTagPrefix(java.lang.String)
// .releaseToNpm(java.lang.Boolean)
// .releaseTrigger(ReleaseTrigger)
// .releaseWorkflow(java.lang.Boolean)
// .releaseWorkflowName(java.lang.String)
// .releaseWorkflowSetupSteps(java.util.List<JobStep>)
// .renovatebot(java.lang.Boolean)
// .renovatebotOptions(RenovatebotOptions)
// .repository(java.lang.String)
// .repositoryDirectory(java.lang.String)
// .sampleCode(java.lang.Boolean)
// .scopedPackagesOptions(java.util.List<ScopedPackagesOptions>)
// .scripts(java.util.Map<java.lang.String, java.lang.String>)
// .srcdir(java.lang.String)
// .stability(java.lang.String)
// .stale(java.lang.Boolean)
// .staleOptions(StaleOptions)
// .testdir(java.lang.String)
// .tsconfig(TypescriptConfigOptions)
// .tsconfigDev(TypescriptConfigOptions)
// .tsconfigDevFile(java.lang.String)
// .tsJestOptions(TsJestOptions)
// .typescriptVersion(java.lang.String)
// .versionrcOptions(java.util.Map<java.lang.String, java.lang.Object>)
// .vscode(java.lang.Boolean)
// .workflowBootstrapSteps(java.util.List<JobStep>)
// .workflowContainerImage(java.lang.String)
// .workflowGitIdentity(GitIdentity)
// .workflowNodeVersion(java.lang.String)
// .workflowPackageCache(java.lang.Boolean)
// .workflowRunsOn(java.util.List<java.lang.String>)
// .workflowRunsOnGroup(GroupRunnerOptions)
// .yarnBerryOptions(YarnBerryOptions)
// .commitGeneratedCode(java.lang.Boolean)
.build();
Properties
| Name | Type | Description |
|---|---|---|
allowLibraryDependencies |
java.lang.Boolean |
Allow the project to include peerDependencies and bundledDependencies. |
artifactsDirectory |
java.lang.String |
A directory which will contain build artifacts. |
authorEmail |
java.lang.String |
Author's e-mail. |
authorName |
java.lang.String |
Author's name. |
authorOrganization |
java.lang.Boolean |
Is the author an organization. |
authorUrl |
java.lang.String |
Author's URL / Website. |
autoApproveOptions |
io.github.cdklabs.projen.github.AutoApproveOptions |
Enable and configure the 'auto approve' workflow. |
autoApproveUpgrades |
java.lang.Boolean |
Automatically approve deps upgrade PRs, allowing them to be merged by mergify (if configued). |
autoDetectBin |
java.lang.Boolean |
Automatically add all executables under the bin directory to your package.json file under the bin section. |
autoMerge |
java.lang.Boolean |
Enable automatic merging on GitHub. |
autoMergeOptions |
io.github.cdklabs.projen.github.AutoMergeOptions |
Configure options for automatic merging on GitHub. |
bin |
java.util.Map |
Binary programs vended with your module. |
bugsEmail |
java.lang.String |
The email address to which issues should be reported. |
bugsUrl |
java.lang.String |
The url to your project's issue tracker. |
buildWorkflow |
java.lang.Boolean |
Define a GitHub workflow for building PRs. |
buildWorkflowOptions |
io.github.cdklabs.projen.javascript.BuildWorkflowOptions |
Options for PR build workflow. |
buildWorkflowTriggers |
io.github.cdklabs.projen.github.workflows.Triggers |
Build workflow triggers. |
bundledDeps |
java.util.List |
List of dependencies to bundle into this module. |
bundlerOptions |
io.github.cdklabs.projen.javascript.BundlerOptions |
Options for Bundler. |
checkLicenses |
io.github.cdklabs.projen.javascript.LicenseCheckerOptions |
Configure which licenses should be deemed acceptable for use by dependencies. |
clobber |
java.lang.Boolean |
Add a clobber task which resets the repo to origin. |
codeArtifactOptions |
io.github.cdklabs.projen.javascript.CodeArtifactOptions |
Options for npm packages using AWS CodeArtifact. |
codeCov |
java.lang.Boolean |
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. |
codeCovTokenSecret |
java.lang.String |
Define the secret name for a specified https://codecov.io/ token A secret is required to send coverage for private repositories. |
commitGenerated |
java.lang.Boolean |
Whether to commit the managed files by default. |
copyrightOwner |
java.lang.String |
License copyright owner. |
copyrightPeriod |
java.lang.String |
The copyright years to put in the LICENSE file. |
defaultReleaseBranch |
java.lang.String |
The name of the main release branch. |
dependabot |
java.lang.Boolean |
Use dependabot to handle dependency upgrades. |
dependabotOptions |
io.github.cdklabs.projen.github.DependabotOptions |
Options for dependabot. |
deps |
java.util.List |
Runtime dependencies of this module. |
depsUpgrade |
java.lang.Boolean |
Use tasks and github workflows to handle dependency upgrades. |
depsUpgradeOptions |
io.github.cdklabs.projen.javascript.UpgradeDependenciesOptions |
Options for UpgradeDependencies. |
description |
java.lang.String |
The description is just a string that helps people understand the purpose of the package. |
devContainer |
java.lang.Boolean |
Add a VSCode development environment (used for GitHub Codespaces). |
devDeps |
java.util.List |
Build dependencies for this module. |
disableTsconfig |
java.lang.Boolean |
Do not generate a tsconfig.json file (used by jsii projects since tsconfig.json is generated by the jsii compiler). |
disableTsconfigDev |
java.lang.Boolean |
Do not generate a tsconfig.dev.json file. |
docgen |
java.lang.Boolean |
Docgen by Typedoc. |
docsDirectory |
java.lang.String |
Docs directory. |
entrypoint |
java.lang.String |
Module entrypoint (main in package.json). Set to an empty string to not include main in your package.json. |
entrypointTypes |
java.lang.String |
The .d.ts file that includes the type declarations for this module. |
eslint |
java.lang.Boolean |
Setup eslint. |
eslintOptions |
io.github.cdklabs.projen.javascript.EslintOptions |
Eslint options. |
github |
java.lang.Boolean |
Enable GitHub integration. |
githubOptions |
io.github.cdklabs.projen.github.GitHubOptions |
Options for GitHub integration. |
gitignore |
java.util.List |
Additional entries to .gitignore. |
gitIgnoreOptions |
io.github.cdklabs.projen.IgnoreFileOptions |
Configuration options for .gitignore file. |
gitOptions |
io.github.cdklabs.projen.GitOptions |
Configuration options for git. |
gitpod |
java.lang.Boolean |
Add a Gitpod development environment. |
homepage |
java.lang.String |
Package's Homepage / Website. |
jest |
java.lang.Boolean |
Setup jest unit tests. |
jestOptions |
io.github.cdklabs.projen.javascript.JestOptions |
Jest options. |
jsiiReleaseVersion |
java.lang.String |
Version requirement of publib which is used to publish modules to npm. |
keywords |
java.util.List |
Keywords to include in package.json. |
libdir |
java.lang.String |
Typescript artifacts output directory. |
license |
java.lang.String |
License's SPDX identifier. |
licensed |
java.lang.Boolean |
Indicates if a license should be added. |
logging |
io.github.cdklabs.projen.LoggerOptions |
Configure logging options such as verbosity. |
majorVersion |
java.lang.Number |
Major version to release from the default branch. |
maxNodeVersion |
java.lang.String |
Minimum node.js version to require via engines (inclusive). |
mergify |
java.lang.Boolean |
Whether mergify should be enabled on this repository or not. |
mergifyOptions |
io.github.cdklabs.projen.github.MergifyOptions |
Options for mergify. |
minMajorVersion |
java.lang.Number |
Minimal Major version to release. |
minNodeVersion |
java.lang.String |
Minimum Node.js version to require via package.json engines (inclusive). |
mutableBuild |
java.lang.Boolean |
Automatically update files modified during builds to pull-request branches. |
name |
java.lang.String |
This is the name of your project. |
npmAccess |
io.github.cdklabs.projen.javascript.NpmAccess |
Access level of the npm package. |
npmDistTag |
java.lang.String |
The npmDistTag to use when publishing from the default branch. |
npmignore |
java.util.List |
Additional entries to .npmignore. |
npmignoreEnabled |
java.lang.Boolean |
Defines an .npmignore file. Normally this is only needed for libraries that are packaged as tarballs. |
npmIgnoreOptions |
io.github.cdklabs.projen.IgnoreFileOptions |
Configuration options for .npmignore file. |
npmProvenance |
java.lang.Boolean |
Should provenance statements be generated when the package is published. |
npmRegistry |
java.lang.String |
The host name of the npm registry to publish to. |
npmRegistryUrl |
java.lang.String |
The base URL of the npm package registry. |
npmTokenSecret |
java.lang.String |
GitHub secret which contains the NPM token to use when publishing packages. |
outdir |
java.lang.String |
The root directory of the project. Relative to this directory, all files are synthesized. |
package |
java.lang.Boolean |
Defines a package task that will produce an npm tarball under the artifacts directory (e.g. dist). |
packageManager |
io.github.cdklabs.projen.javascript.NodePackageManager |
The Node Package Manager used to execute scripts. |
packageName |
java.lang.String |
The "name" in package.json. |
parent |
io.github.cdklabs.projen.Project |
The parent project, if this project is part of a bigger project. |
peerDependencyOptions |
io.github.cdklabs.projen.javascript.PeerDependencyOptions |
Options for peerDeps. |
peerDeps |
java.util.List |
Peer dependencies for this module. |
pnpmVersion |
java.lang.String |
The version of PNPM to use if using PNPM as a package manager. |
postBuildSteps |
java.util.List |
Steps to execute after build as part of the release workflow. |
prerelease |
java.lang.String |
Bump versions from the default branch as pre-releases (e.g. "beta", "alpha", "pre"). |
prettier |
java.lang.Boolean |
Setup prettier. |
prettierOptions |
io.github.cdklabs.projen.javascript.PrettierOptions |
Prettier options. |
projectType |
io.github.cdklabs.projen.ProjectType |
Which type of project this is (library/app). |
projenCommand |
java.lang.String |
The shell command to use in order to run the projen CLI. |
projenCredentials |
io.github.cdklabs.projen.github.GithubCredentials |
Choose a method of providing GitHub API access for projen workflows. |
projenDevDependency |
java.lang.Boolean |
Indicates of "projen" should be installed as a devDependency. |
projenrcJs |
java.lang.Boolean |
Generate (once) .projenrc.js (in JavaScript). Set to false in order to disable .projenrc.js generation. |
projenrcJson |
java.lang.Boolean |
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation. |
projenrcJsonOptions |
io.github.cdklabs.projen.ProjenrcJsonOptions |
Options for .projenrc.json. |
projenrcJsOptions |
io.github.cdklabs.projen.javascript.ProjenrcOptions |
Options for .projenrc.js. |
projenrcTs |
java.lang.Boolean |
Use TypeScript for your projenrc file (.projenrc.ts). |
projenrcTsOptions |
io.github.cdklabs.projen.typescript.ProjenrcOptions |
Options for .projenrc.ts. |
projenTokenSecret |
java.lang.String |
The name of a secret which includes a GitHub Personal Access Token to be used by projen workflows. |
projenVersion |
java.lang.String |
Version of projen to install. |
publishDryRun |
java.lang.Boolean |
Instead of actually publishing to package managers, just print the publishing command. |
publishTasks |
java.lang.Boolean |
Define publishing tasks that can be executed manually as well as workflows. |
pullRequestTemplate |
java.lang.Boolean |
Include a GitHub pull request template. |
pullRequestTemplateContents |
java.util.List |
The contents of the pull request template. |
readme |
io.github.cdklabs.projen.SampleReadmeProps |
The README setup. |
releasableCommits |
io.github.cdklabs.projen.ReleasableCommits |
Find commits that should be considered releasable Used to decide if a release is required. |
release |
java.lang.Boolean |
Add release management to this project. |
releaseBranches |
java.util.Map |
Defines additional release branches. |
releaseEveryCommit |
java.lang.Boolean |
Automatically release new versions every commit to one of branches in releaseBranches. |
releaseFailureIssue |
java.lang.Boolean |
Create a github issue on every failed publishing task. |
releaseFailureIssueLabel |
java.lang.String |
The label to apply to issues indicating publish failures. |
releaseSchedule |
java.lang.String |
CRON schedule to trigger new releases. |
releaseTagPrefix |
java.lang.String |
Automatically add the given prefix to release tags. |
releaseToNpm |
java.lang.Boolean |
Automatically release to npm when new versions are introduced. |
releaseTrigger |
io.github.cdklabs.projen.release.ReleaseTrigger |
The release trigger to use. |
releaseWorkflow |
java.lang.Boolean |
DEPRECATED: renamed to release. |
releaseWorkflowName |
java.lang.String |
The name of the default release workflow. |
releaseWorkflowSetupSteps |
java.util.List |
A set of workflow steps to execute in order to setup the workflow container. |
renovatebot |
java.lang.Boolean |
Use renovatebot to handle dependency upgrades. |
renovatebotOptions |
io.github.cdklabs.projen.RenovatebotOptions |
Options for renovatebot. |
repository |
java.lang.String |
The repository is the location where the actual code for your package lives. |
repositoryDirectory |
java.lang.String |
If the package.json for your package is not in the root directory (for example if it is part of a monorepo), you can specify the directory in which it lives. |
sampleCode |
java.lang.Boolean |
Generate one-time sample in src/ and test/ if there are no files there. |
scopedPackagesOptions |
java.util.List |
Options for privately hosted scoped packages. |
scripts |
java.util.Map |
npm scripts to include. |
srcdir |
java.lang.String |
Typescript sources directory. |
stability |
java.lang.String |
Package's Stability. |
stale |
java.lang.Boolean |
Auto-close of stale issues and pull request. |
staleOptions |
io.github.cdklabs.projen.github.StaleOptions |
Auto-close stale issues and pull requests. |
testdir |
java.lang.String |
Jest tests directory. |
tsconfig |
io.github.cdklabs.projen.javascript.TypescriptConfigOptions |
Custom TSConfig. |
tsconfigDev |
io.github.cdklabs.projen.javascript.TypescriptConfigOptions |
Custom tsconfig options for the development tsconfig.json file (used for testing). |
tsconfigDevFile |
java.lang.String |
The name of the development tsconfig.json file. |
tsJestOptions |
io.github.cdklabs.projen.typescript.TsJestOptions |
Options for ts-jest. |
typescriptVersion |
java.lang.String |
TypeScript version to use. |
versionrcOptions |
java.util.Map |
Custom configuration used when creating changelog with standard-version package. |
vscode |
java.lang.Boolean |
Enable VSCode integration. |
workflowBootstrapSteps |
java.util.List |
Workflow steps to use in order to bootstrap this repo. |
workflowContainerImage |
java.lang.String |
Container image to use for GitHub workflows. |
workflowGitIdentity |
io.github.cdklabs.projen.github.GitIdentity |
The git identity to use in workflows. |
workflowNodeVersion |
java.lang.String |
The node version to use in GitHub workflows. |
workflowPackageCache |
java.lang.Boolean |
Enable Node.js package cache in GitHub workflows. |
workflowRunsOn |
java.util.List |
Github Runner selection labels. |
workflowRunsOnGroup |
io.github.cdklabs.projen.GroupRunnerOptions |
Github Runner Group selection options. |
yarnBerryOptions |
io.github.cdklabs.projen.javascript.YarnBerryOptions |
Options for Yarn Berry. |
commitGeneratedCode |
java.lang.Boolean |
Whether to commit the code generated by the OpenAPI Generator. |
allowLibraryDependenciesOptional
public java.lang.Boolean getAllowLibraryDependencies();
- Type: java.lang.Boolean
- Default: true
Allow the project to include peerDependencies and bundledDependencies.
This is normally only allowed for libraries. For apps, there's no meaning for specifying these.
artifactsDirectoryOptional
public java.lang.String getArtifactsDirectory();
- Type: java.lang.String
- Default: "dist"
A directory which will contain build artifacts.
authorEmailOptional
public java.lang.String getAuthorEmail();
- Type: java.lang.String
Author's e-mail.
authorNameOptional
public java.lang.String getAuthorName();
- Type: java.lang.String
Author's name.
authorOrganizationOptional
public java.lang.Boolean getAuthorOrganization();
- Type: java.lang.Boolean
Is the author an organization.
authorUrlOptional
public java.lang.String getAuthorUrl();
- Type: java.lang.String
Author's URL / Website.
autoApproveOptionsOptional
public AutoApproveOptions getAutoApproveOptions();
- Type: io.github.cdklabs.projen.github.AutoApproveOptions
- Default: auto approve is disabled
Enable and configure the 'auto approve' workflow.
autoApproveUpgradesOptional
public java.lang.Boolean getAutoApproveUpgrades();
- Type: java.lang.Boolean
- Default: true
Automatically approve deps upgrade PRs, allowing them to be merged by mergify (if configued).
Throw if set to true but autoApproveOptions are not defined.
autoDetectBinOptional
public java.lang.Boolean getAutoDetectBin();
- Type: java.lang.Boolean
- Default: true
Automatically add all executables under the bin directory to your package.json file under the bin section.
autoMergeOptional
public java.lang.Boolean getAutoMerge();
- Type: java.lang.Boolean
- Default: true
Enable automatic merging on GitHub.
Has no effect if github.mergify
is set to false.
autoMergeOptionsOptional
public AutoMergeOptions getAutoMergeOptions();
- Type: io.github.cdklabs.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.
binOptional
public java.util.Map<java.lang.String, java.lang.String> getBin();
- Type: java.util.Map
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.
bugsEmailOptional
public java.lang.String getBugsEmail();
- Type: java.lang.String
The email address to which issues should be reported.
bugsUrlOptional
public java.lang.String getBugsUrl();
- Type: java.lang.String
The url to your project's issue tracker.
buildWorkflowOptional
public java.lang.Boolean getBuildWorkflow();
- Type: java.lang.Boolean
- Default: true if not a subproject
Define a GitHub workflow for building PRs.
buildWorkflowOptionsOptional
public BuildWorkflowOptions getBuildWorkflowOptions();
- Type: io.github.cdklabs.projen.javascript.BuildWorkflowOptions
Options for PR build workflow.
~~buildWorkflowTriggers~~Optional
- Deprecated: - Use
buildWorkflowOptions.workflowTriggers
public Triggers getBuildWorkflowTriggers();
- Type: io.github.cdklabs.projen.github.workflows.Triggers
- Default: "{ pullRequest: {}, workflowDispatch: {} }"
Build workflow triggers.
bundledDepsOptional
public java.util.List<java.lang.String> getBundledDeps();
- Type: java.util.List
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.
bundlerOptionsOptional
public BundlerOptions getBundlerOptions();
- Type: io.github.cdklabs.projen.javascript.BundlerOptions
Options for Bundler.
checkLicensesOptional
public LicenseCheckerOptions getCheckLicenses();
- Type: io.github.cdklabs.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.
clobberOptional
public java.lang.Boolean getClobber();
- Type: java.lang.Boolean
- Default: true, but false for subprojects
Add a clobber task which resets the repo to origin.
codeArtifactOptionsOptional
public CodeArtifactOptions getCodeArtifactOptions();
- Type: io.github.cdklabs.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
codeCovOptional
public java.lang.Boolean getCodeCov();
- Type: java.lang.Boolean
- 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.
codeCovTokenSecretOptional
public java.lang.String getCodeCovTokenSecret();
- Type: java.lang.String
- Default: if this option is not specified, only public repositories are supported
Define the secret name for a specified https://codecov.io/ token A secret is required to send coverage for private repositories.
commitGeneratedOptional
public java.lang.Boolean getCommitGenerated();
- Type: java.lang.Boolean
- Default: true
Whether to commit the managed files by default.
copyrightOwnerOptional
public java.lang.String getCopyrightOwner();
- Type: java.lang.String
- Default: defaults to the value of authorName or "" if
authorNameis undefined.
License copyright owner.
copyrightPeriodOptional
public java.lang.String getCopyrightPeriod();
- Type: java.lang.String
- Default: current year
The copyright years to put in the LICENSE file.
defaultReleaseBranchOptional
public java.lang.String getDefaultReleaseBranch();
- Type: java.lang.String
- Default: "main"
The name of the main release branch.
dependabotOptional
public java.lang.Boolean getDependabot();
- Type: java.lang.Boolean
- Default: false
Use dependabot to handle dependency upgrades.
Cannot be used in conjunction with depsUpgrade.
dependabotOptionsOptional
public DependabotOptions getDependabotOptions();
- Type: io.github.cdklabs.projen.github.DependabotOptions
- Default: default options
Options for dependabot.
depsOptional
public java.util.List<java.lang.String> getDeps();
- Type: java.util.List
- 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.
depsUpgradeOptional
public java.lang.Boolean getDepsUpgrade();
- Type: java.lang.Boolean
- Default: true
Use tasks and github workflows to handle dependency upgrades.
Cannot be used in conjunction with dependabot.
depsUpgradeOptionsOptional
public UpgradeDependenciesOptions getDepsUpgradeOptions();
- Type: io.github.cdklabs.projen.javascript.UpgradeDependenciesOptions
- Default: default options
Options for UpgradeDependencies.
descriptionOptional
public java.lang.String getDescription();
- Type: java.lang.String
The description is just a string that helps people understand the purpose of the package.
It can be used when searching for packages in a package manager as well. See https://classic.yarnpkg.com/en/docs/package-json/#toc-description
devContainerOptional
public java.lang.Boolean getDevContainer();
- Type: java.lang.Boolean
- Default: false
Add a VSCode development environment (used for GitHub Codespaces).
devDepsOptional
public java.util.List<java.lang.String> getDevDeps();
- Type: java.util.List
- 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.
disableTsconfigOptional
public java.lang.Boolean getDisableTsconfig();
- Type: java.lang.Boolean
- Default: false
Do not generate a tsconfig.json file (used by jsii projects since tsconfig.json is generated by the jsii compiler).
disableTsconfigDevOptional
public java.lang.Boolean getDisableTsconfigDev();
- Type: java.lang.Boolean
- Default: false
Do not generate a tsconfig.dev.json file.
docgenOptional
public java.lang.Boolean getDocgen();
- Type: java.lang.Boolean
- Default: false
Docgen by Typedoc.
docsDirectoryOptional
public java.lang.String getDocsDirectory();
- Type: java.lang.String
- Default: "docs"
Docs directory.
entrypointOptional
public java.lang.String getEntrypoint();
- Type: java.lang.String
- Default: "lib/index.js"
Module entrypoint (main in package.json). Set to an empty string to not include main in your package.json.
entrypointTypesOptional
public java.lang.String getEntrypointTypes();
- Type: java.lang.String
- Default: .d.ts file derived from the project's entrypoint (usually lib/index.d.ts)
The .d.ts file that includes the type declarations for this module.
eslintOptional
public java.lang.Boolean getEslint();
- Type: java.lang.Boolean
- Default: true
Setup eslint.
eslintOptionsOptional
public EslintOptions getEslintOptions();
- Type: io.github.cdklabs.projen.javascript.EslintOptions
- Default: opinionated default options
Eslint options.
githubOptional
public java.lang.Boolean getGithub();
- Type: java.lang.Boolean
- Default: true
Enable GitHub integration.
Enabled by default for root projects. Disabled for non-root projects.
githubOptionsOptional
public GitHubOptions getGithubOptions();
- Type: io.github.cdklabs.projen.github.GitHubOptions
- Default: see GitHubOptions
Options for GitHub integration.
gitignoreOptional
public java.util.List<java.lang.String> getGitignore();
- Type: java.util.List
Additional entries to .gitignore.
gitIgnoreOptionsOptional
public IgnoreFileOptions getGitIgnoreOptions();
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptionsOptional
public GitOptions getGitOptions();
- Type: io.github.cdklabs.projen.GitOptions
Configuration options for git.
gitpodOptional
public java.lang.Boolean getGitpod();
- Type: java.lang.Boolean
- Default: false
Add a Gitpod development environment.
homepageOptional
public java.lang.String getHomepage();
- Type: java.lang.String
Package's Homepage / Website.
jestOptional
public java.lang.Boolean getJest();
- Type: java.lang.Boolean
- Default: true
Setup jest unit tests.
jestOptionsOptional
public JestOptions getJestOptions();
- Type: io.github.cdklabs.projen.javascript.JestOptions
- Default: default options
Jest options.
jsiiReleaseVersionOptional
public java.lang.String getJsiiReleaseVersion();
- Type: java.lang.String
- Default: "latest"
Version requirement of publib which is used to publish modules to npm.
keywordsOptional
public java.util.List<java.lang.String> getKeywords();
- Type: java.util.List
Keywords to include in package.json.
libdirOptional
public java.lang.String getLibdir();
- Type: java.lang.String
- Default: "lib"
Typescript artifacts output directory.
licenseOptional
public java.lang.String getLicense();
- Type: java.lang.String
- Default: "Apache-2.0"
License's SPDX identifier.
See https://github.com/projen/projen/tree/main/license-text for a list of supported licenses.
Use the licensed option if you want to no license to be specified.
licensedOptional
public java.lang.Boolean getLicensed();
- Type: java.lang.Boolean
- Default: true
Indicates if a license should be added.
loggingOptional
public LoggerOptions getLogging();
- Type: io.github.cdklabs.projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
majorVersionOptional
public java.lang.Number getMajorVersion();
- Type: java.lang.Number
- Default: Major version is not enforced.
Major version to release from the default branch.
If this is specified, we bump the latest version of this major version line. If not specified, we bump the global latest version.
maxNodeVersionOptional
public java.lang.String getMaxNodeVersion();
- Type: java.lang.String
- Default: no max
Minimum node.js version to require via engines (inclusive).
~~mergify~~Optional
- Deprecated: use
githubOptions.mergifyinstead
public java.lang.Boolean getMergify();
- Type: java.lang.Boolean
- Default: true
Whether mergify should be enabled on this repository or not.
~~mergifyOptions~~Optional
- Deprecated: use
githubOptions.mergifyOptionsinstead
public MergifyOptions getMergifyOptions();
- Type: io.github.cdklabs.projen.github.MergifyOptions
- Default: default options
Options for mergify.
minMajorVersionOptional
public java.lang.Number getMinMajorVersion();
- Type: java.lang.Number
- Default: No minimum version is being enforced
Minimal Major version to release.
This can be useful to set to 1, as breaking changes before the 1.x major release are not incrementing the major version number.
Can not be set together with majorVersion.
minNodeVersionOptional
public java.lang.String getMinNodeVersion();
- Type: java.lang.String
- Default: no "engines" specified
Minimum Node.js version to require via package.json engines (inclusive).
~~mutableBuild~~Optional
- Deprecated: - Use
buildWorkflowOptions.mutableBuild
public java.lang.Boolean getMutableBuild();
- Type: java.lang.Boolean
- Default: true
Automatically update files modified during builds to pull-request branches.
This means that any files synthesized by projen or e.g. test snapshots will always be up-to-date before a PR is merged.
Implies that PR builds do not have anti-tamper checks.
nameOptional
public java.lang.String getName();
- Type: java.lang.String
- Default: $BASEDIR
This is the name of your project.
npmAccessOptional
public NpmAccess getNpmAccess();
- Type: io.github.cdklabs.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.
npmDistTagOptional
public java.lang.String getNpmDistTag();
- Type: java.lang.String
- Default: "latest"
The npmDistTag to use when publishing from the default branch.
To set the npm dist-tag for release branches, set the npmDistTag property
for each branch.
~~npmignore~~Optional
- Deprecated: - use
project.addPackageIgnore
public java.util.List<java.lang.String> getNpmignore();
- Type: java.util.List
Additional entries to .npmignore.
npmignoreEnabledOptional
public java.lang.Boolean getNpmignoreEnabled();
- Type: java.lang.Boolean
- Default: true
Defines an .npmignore file. Normally this is only needed for libraries that are packaged as tarballs.
npmIgnoreOptionsOptional
public IgnoreFileOptions getNpmIgnoreOptions();
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .npmignore file.
npmProvenanceOptional
public java.lang.Boolean getNpmProvenance();
- Type: java.lang.Boolean
- 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.
~~npmRegistry~~Optional
- Deprecated: use
npmRegistryUrlinstead
public java.lang.String getNpmRegistry();
- Type: java.lang.String
The host name of the npm registry to publish to.
Cannot be set together with npmRegistryUrl.
npmRegistryUrlOptional
public java.lang.String getNpmRegistryUrl();
- Type: java.lang.String
- Default: "https://registry.npmjs.org"
The base URL of the npm package registry.
Must be a URL (e.g. start with "https://" or "http://")
npmTokenSecretOptional
public java.lang.String getNpmTokenSecret();
- Type: java.lang.String
- Default: "NPM_TOKEN"
GitHub secret which contains the NPM token to use when publishing packages.
outdirOptional
public java.lang.String getOutdir();
- Type: java.lang.String
- Default: "."
The root directory of the project. Relative to this directory, all files are synthesized.
If this project has a parent, this directory is relative to the parent directory and it cannot be the same as the parent or any of it's other subprojects.
packageOptional
public java.lang.Boolean getPackage();
- Type: java.lang.Boolean
- Default: true
Defines a package task that will produce an npm tarball under the artifacts directory (e.g. dist).
packageManagerOptional
public NodePackageManager getPackageManager();
- Type: io.github.cdklabs.projen.javascript.NodePackageManager
- Default: NodePackageManager.YARN_CLASSIC
The Node Package Manager used to execute scripts.
packageNameOptional
public java.lang.String getPackageName();
- Type: java.lang.String
- Default: defaults to project name
The "name" in package.json.
parentOptional
public Project getParent();
- Type: io.github.cdklabs.projen.Project
The parent project, if this project is part of a bigger project.
peerDependencyOptionsOptional
public PeerDependencyOptions getPeerDependencyOptions();
- Type: io.github.cdklabs.projen.javascript.PeerDependencyOptions
Options for peerDeps.
peerDepsOptional
public java.util.List<java.lang.String> getPeerDeps();
- Type: java.util.List
- 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.
pnpmVersionOptional
public java.lang.String getPnpmVersion();
- Type: java.lang.String
- Default: "7"
The version of PNPM to use if using PNPM as a package manager.
postBuildStepsOptional
public java.util.List<JobStep> getPostBuildSteps();
- Type: java.util.List
- Default: []
Steps to execute after build as part of the release workflow.
prereleaseOptional
public java.lang.String getPrerelease();
- Type: java.lang.String
- Default: normal semantic versions
Bump versions from the default branch as pre-releases (e.g. "beta", "alpha", "pre").
prettierOptional
public java.lang.Boolean getPrettier();
- Type: java.lang.Boolean
- Default: false
Setup prettier.
prettierOptionsOptional
public PrettierOptions getPrettierOptions();
- Type: io.github.cdklabs.projen.javascript.PrettierOptions
- Default: default options
Prettier options.
~~projectType~~Optional
- Deprecated: no longer supported at the base project level
public ProjectType getProjectType();
- Type: io.github.cdklabs.projen.ProjectType
- Default: ProjectType.UNKNOWN
Which type of project this is (library/app).
projenCommandOptional
public java.lang.String getProjenCommand();
- Type: java.lang.String
- Default: "npx projen"
The shell command to use in order to run the projen CLI.
Can be used to customize in special environments.
projenCredentialsOptional
public GithubCredentials getProjenCredentials();
- Type: io.github.cdklabs.projen.github.GithubCredentials
- Default: use a personal access token named PROJEN_GITHUB_TOKEN
Choose a method of providing GitHub API access for projen workflows.
projenDevDependencyOptional
public java.lang.Boolean getProjenDevDependency();
- Type: java.lang.Boolean
- Default: true if not a subproject
Indicates of "projen" should be installed as a devDependency.
projenrcJsOptional
public java.lang.Boolean getProjenrcJs();
- Type: java.lang.Boolean
- Default: true if projenrcJson is false
Generate (once) .projenrc.js (in JavaScript). Set to false in order to disable .projenrc.js generation.
projenrcJsonOptional
public java.lang.Boolean getProjenrcJson();
- Type: java.lang.Boolean
- Default: false
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation.
projenrcJsonOptionsOptional
public ProjenrcJsonOptions getProjenrcJsonOptions();
- Type: io.github.cdklabs.projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
projenrcJsOptionsOptional
public ProjenrcOptions getProjenrcJsOptions();
- Type: io.github.cdklabs.projen.javascript.ProjenrcOptions
- Default: default options
Options for .projenrc.js.
projenrcTsOptional
public java.lang.Boolean getProjenrcTs();
- Type: java.lang.Boolean
- Default: false
Use TypeScript for your projenrc file (.projenrc.ts).
projenrcTsOptionsOptional
public ProjenrcOptions getProjenrcTsOptions();
- Type: io.github.cdklabs.projen.typescript.ProjenrcOptions
Options for .projenrc.ts.
~~projenTokenSecret~~Optional
- Deprecated: use
projenCredentials
public java.lang.String getProjenTokenSecret();
- Type: java.lang.String
- Default: "PROJEN_GITHUB_TOKEN"
The name of a secret which includes a GitHub Personal Access Token to be used by projen workflows.
This token needs to have the repo, workflows
and packages scope.
projenVersionOptional
public java.lang.String getProjenVersion();
- Type: java.lang.String
- Default: Defaults to the latest version.
Version of projen to install.
publishDryRunOptional
public java.lang.Boolean getPublishDryRun();
- Type: java.lang.Boolean
- Default: false
Instead of actually publishing to package managers, just print the publishing command.
publishTasksOptional
public java.lang.Boolean getPublishTasks();
- Type: java.lang.Boolean
- Default: false
Define publishing tasks that can be executed manually as well as workflows.
Normally, publishing only happens within automated workflows. Enable this in order to create a publishing task for each publishing activity.
pullRequestTemplateOptional
public java.lang.Boolean getPullRequestTemplate();
- Type: java.lang.Boolean
- Default: true
Include a GitHub pull request template.
pullRequestTemplateContentsOptional
public java.util.List<java.lang.String> getPullRequestTemplateContents();
- Type: java.util.List
- Default: default content
The contents of the pull request template.
readmeOptional
public SampleReadmeProps getReadme();
- Type: io.github.cdklabs.projen.SampleReadmeProps
- Default: { filename: 'README.md', contents: '# replace this' }
The README setup.
releasableCommitsOptional
public ReleasableCommits getReleasableCommits();
- Type: io.github.cdklabs.projen.ReleasableCommits
- Default: ReleasableCommits.everyCommit()
Find commits that should be considered releasable Used to decide if a release is required.
releaseOptional
public java.lang.Boolean getRelease();
- Type: java.lang.Boolean
- Default: true (false for subprojects)
Add release management to this project.
releaseBranchesOptional
public java.util.Map<java.lang.String, BranchOptions> getReleaseBranches();
- Type: java.util.Map
- Default: no additional branches are used for release. you can use
addBranch()to add additional branches.
Defines additional release branches.
A workflow will be created for each
release branch which will publish releases from commits in this branch.
Each release branch must be assigned a major version number which is used
to enforce that versions published from that branch always use that major
version. If multiple branches are used, the majorVersion field must also
be provided for the default branch.
~~releaseEveryCommit~~Optional
- Deprecated: Use
releaseTrigger: ReleaseTrigger.continuous()instead
public java.lang.Boolean getReleaseEveryCommit();
- Type: java.lang.Boolean
- Default: true
Automatically release new versions every commit to one of branches in releaseBranches.
releaseFailureIssueOptional
public java.lang.Boolean getReleaseFailureIssue();
- Type: java.lang.Boolean
- Default: false
Create a github issue on every failed publishing task.
releaseFailureIssueLabelOptional
public java.lang.String getReleaseFailureIssueLabel();
- Type: java.lang.String
- Default: "failed-release"
The label to apply to issues indicating publish failures.
Only applies if releaseFailureIssue is true.
~~releaseSchedule~~Optional
- Deprecated: Use
releaseTrigger: ReleaseTrigger.scheduled()instead
public java.lang.String getReleaseSchedule();
- Type: java.lang.String
- Default: no scheduled releases
CRON schedule to trigger new releases.
releaseTagPrefixOptional
public java.lang.String getReleaseTagPrefix();
- Type: java.lang.String
- Default: "v"
Automatically add the given prefix to release tags.
Useful if you are releasing on multiple branches with overlapping version numbers. Note: this prefix is used to detect the latest tagged version when bumping, so if you change this on a project with an existing version history, you may need to manually tag your latest release with the new prefix.
releaseToNpmOptional
public java.lang.Boolean getReleaseToNpm();
- Type: java.lang.Boolean
- Default: false
Automatically release to npm when new versions are introduced.
releaseTriggerOptional
public ReleaseTrigger getReleaseTrigger();
- Type: io.github.cdklabs.projen.release.ReleaseTrigger
- Default: Continuous releases (
ReleaseTrigger.continuous())
The release trigger to use.
~~releaseWorkflow~~Optional
- Deprecated: see
release.
public java.lang.Boolean getReleaseWorkflow();
- Type: java.lang.Boolean
- Default: true if not a subproject
DEPRECATED: renamed to release.
releaseWorkflowNameOptional
public java.lang.String getReleaseWorkflowName();
- Type: java.lang.String
- Default: "release"
The name of the default release workflow.
releaseWorkflowSetupStepsOptional
public java.util.List<JobStep> getReleaseWorkflowSetupSteps();
- Type: java.util.List
A set of workflow steps to execute in order to setup the workflow container.
renovatebotOptional
public java.lang.Boolean getRenovatebot();
- Type: java.lang.Boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptionsOptional
public RenovatebotOptions getRenovatebotOptions();
- Type: io.github.cdklabs.projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
repositoryOptional
public java.lang.String getRepository();
- Type: java.lang.String
The repository is the location where the actual code for your package lives.
See https://classic.yarnpkg.com/en/docs/package-json/#toc-repository
repositoryDirectoryOptional
public java.lang.String getRepositoryDirectory();
- Type: java.lang.String
If the package.json for your package is not in the root directory (for example if it is part of a monorepo), you can specify the directory in which it lives.
sampleCodeOptional
public java.lang.Boolean getSampleCode();
- Type: java.lang.Boolean
- Default: true
Generate one-time sample in src/ and test/ if there are no files there.
scopedPackagesOptionsOptional
public java.util.List<ScopedPackagesOptions> getScopedPackagesOptions();
- Type: java.util.List
- Default: fetch all scoped packages from the public npm registry
Options for privately hosted scoped packages.
~~scripts~~Optional
- Deprecated: use
project.addTask()orpackage.setScript()
public java.util.Map<java.lang.String, java.lang.String> getScripts();
- Type: java.util.Map
- 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.
srcdirOptional
public java.lang.String getSrcdir();
- Type: java.lang.String
- Default: "src"
Typescript sources directory.
stabilityOptional
public java.lang.String getStability();
- Type: java.lang.String
Package's Stability.
staleOptional
public java.lang.Boolean getStale();
- Type: java.lang.Boolean
- Default: false
Auto-close of stale issues and pull request.
See staleOptions for options.
staleOptionsOptional
public StaleOptions getStaleOptions();
- Type: io.github.cdklabs.projen.github.StaleOptions
- Default: see defaults in
StaleOptions
Auto-close stale issues and pull requests.
To disable set stale to false.
testdirOptional
public java.lang.String getTestdir();
- Type: java.lang.String
- Default: "test"
Jest tests directory.
Tests files should be named xxx.test.ts.
If this directory is under srcdir (e.g. src/test, src/__tests__),
then tests are going to be compiled into lib/ and executed as javascript.
If the test directory is outside of src, then we configure jest to
compile the code in-memory.
tsconfigOptional
public TypescriptConfigOptions getTsconfig();
- Type: io.github.cdklabs.projen.javascript.TypescriptConfigOptions
- Default: default options
Custom TSConfig.
tsconfigDevOptional
public TypescriptConfigOptions getTsconfigDev();
- Type: io.github.cdklabs.projen.javascript.TypescriptConfigOptions
- Default: use the production tsconfig options
Custom tsconfig options for the development tsconfig.json file (used for testing).
tsconfigDevFileOptional
public java.lang.String getTsconfigDevFile();
- Type: java.lang.String
- Default: "tsconfig.dev.json"
The name of the development tsconfig.json file.
tsJestOptionsOptional
public TsJestOptions getTsJestOptions();
- Type: io.github.cdklabs.projen.typescript.TsJestOptions
Options for ts-jest.
typescriptVersionOptional
public java.lang.String getTypescriptVersion();
- Type: java.lang.String
- Default: "latest"
TypeScript version to use.
NOTE: Typescript is not semantically versioned and should remain on the
same minor, so we recommend using a ~ dependency (e.g. ~1.2.3).
versionrcOptionsOptional
public java.util.Map<java.lang.String, java.lang.Object> getVersionrcOptions();
- Type: java.util.Map
- 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.
vscodeOptional
public java.lang.Boolean getVscode();
- Type: java.lang.Boolean
- Default: true
Enable VSCode integration.
Enabled by default for root projects. Disabled for non-root projects.
workflowBootstrapStepsOptional
public java.util.List<JobStep> getWorkflowBootstrapSteps();
- Type: java.util.List
- Default: "yarn install --frozen-lockfile && yarn projen"
Workflow steps to use in order to bootstrap this repo.
workflowContainerImageOptional
public java.lang.String getWorkflowContainerImage();
- Type: java.lang.String
- Default: default image
Container image to use for GitHub workflows.
workflowGitIdentityOptional
public GitIdentity getWorkflowGitIdentity();
- Type: io.github.cdklabs.projen.github.GitIdentity
- Default: GitHub Actions
The git identity to use in workflows.
workflowNodeVersionOptional
public java.lang.String getWorkflowNodeVersion();
- Type: java.lang.String
- Default: same as
minNodeVersion
The node version to use in GitHub workflows.
workflowPackageCacheOptional
public java.lang.Boolean getWorkflowPackageCache();
- Type: java.lang.Boolean
- Default: false
Enable Node.js package cache in GitHub workflows.
workflowRunsOnOptional
public java.util.List<java.lang.String> getWorkflowRunsOn();
- Type: java.util.List
- Default: ["ubuntu-latest"]
Github Runner selection labels.
workflowRunsOnGroupOptional
public GroupRunnerOptions getWorkflowRunsOnGroup();
- Type: io.github.cdklabs.projen.GroupRunnerOptions
Github Runner Group selection options.
yarnBerryOptionsOptional
public YarnBerryOptions getYarnBerryOptions();
- Type: io.github.cdklabs.projen.javascript.YarnBerryOptions
- Default: Yarn Berry v4 with all default options
Options for Yarn Berry.
commitGeneratedCodeOptional
public java.lang.Boolean getCommitGeneratedCode();
- Type: java.lang.Boolean
- Default: false
Whether to commit the code generated by the OpenAPI Generator.
GeneratedWebSocketDocumentationOptions
Options for generated websocket documentation projects.
Initializer
import software.aws.pdk.type_safe_api.GeneratedWebSocketDocumentationOptions;
GeneratedWebSocketDocumentationOptions.builder()
// .html(GeneratedAsyncApiHtmlDocumentationOptions)
// .markdown(GeneratedAsyncApiMarkdownDocumentationOptions)
.build();
Properties
| Name | Type | Description |
|---|---|---|
html |
GeneratedAsyncApiHtmlDocumentationOptions |
Generated AsyncAPI html documentation project options. |
markdown |
GeneratedAsyncApiMarkdownDocumentationOptions |
Generated AsyncAPI markdown documentation project options. |
htmlOptional
public GeneratedAsyncApiHtmlDocumentationOptions getHtml();
Generated AsyncAPI html documentation project options.
markdownOptional
public GeneratedAsyncApiMarkdownDocumentationOptions getMarkdown();
Generated AsyncAPI markdown documentation project options.
GeneratedWebSocketDocumentationProjects
Initializer
import software.aws.pdk.type_safe_api.GeneratedWebSocketDocumentationProjects;
GeneratedWebSocketDocumentationProjects.builder()
// .html(Project)
// .markdown(Project)
.build();
Properties
| Name | Type | Description |
|---|---|---|
html |
io.github.cdklabs.projen.Project |
Generated AsyncAPI html documentation project. |
markdown |
io.github.cdklabs.projen.Project |
Generated AsyncAPI markdown documentation project. |
htmlOptional
public Project getHtml();
- Type: io.github.cdklabs.projen.Project
Generated AsyncAPI html documentation project.
markdownOptional
public Project getMarkdown();
- Type: io.github.cdklabs.projen.Project
Generated AsyncAPI markdown documentation project.
GeneratedWebSocketLibraryOptions
Initializer
import software.aws.pdk.type_safe_api.GeneratedWebSocketLibraryOptions;
GeneratedWebSocketLibraryOptions.builder()
// .typescriptWebSocketClient(GeneratedTypeScriptWebSocketClientOptions)
// .typescriptWebSocketHooks(GeneratedTypeScriptWebSocketHooksOptions)
.build();
Properties
| Name | Type | Description |
|---|---|---|
typescriptWebSocketClient |
GeneratedTypeScriptWebSocketClientOptions |
Options for the generated typescript websocket client library. |
typescriptWebSocketHooks |
GeneratedTypeScriptWebSocketHooksOptions |
Options for the generated typescript websocket hooks library. |
typescriptWebSocketClientOptional
public GeneratedTypeScriptWebSocketClientOptions getTypescriptWebSocketClient();
Options for the generated typescript websocket client library.
These override the default inferred options.
typescriptWebSocketHooksOptional
public GeneratedTypeScriptWebSocketHooksOptions getTypescriptWebSocketHooks();
Options for the generated typescript websocket hooks library.
These override the default inferred options.
GeneratedWebSocketLibraryProjects
Generated websocket library projects.
Initializer
import software.aws.pdk.type_safe_api.GeneratedWebSocketLibraryProjects;
GeneratedWebSocketLibraryProjects.builder()
// .typescriptWebSocketClient(TypeScriptProject)
// .typescriptWebSocketHooks(TypeScriptProject)
.build();
Properties
| Name | Type | Description |
|---|---|---|
typescriptWebSocketClient |
io.github.cdklabs.projen.typescript.TypeScriptProject |
Generated typescript websocket client project. |
typescriptWebSocketHooks |
io.github.cdklabs.projen.typescript.TypeScriptProject |
Generated typescript websocket hooks project. |
typescriptWebSocketClientOptional
public TypeScriptProject getTypescriptWebSocketClient();
- Type: io.github.cdklabs.projen.typescript.TypeScriptProject
Generated typescript websocket client project.
typescriptWebSocketHooksOptional
public TypeScriptProject getTypescriptWebSocketHooks();
- Type: io.github.cdklabs.projen.typescript.TypeScriptProject
Generated typescript websocket hooks project.
HandlersConfiguration
Configuration for generated lambda handlers.
Initializer
import software.aws.pdk.type_safe_api.HandlersConfiguration;
HandlersConfiguration.builder()
.languages(java.util.List<Language>)
// .options(GeneratedHandlersCodeOptions)
.build();
Properties
| Name | Type | Description |
|---|---|---|
languages |
java.util.List<Language> |
The languages lambda handlers are written in. |
options |
GeneratedHandlersCodeOptions |
Options for the infrastructure package. |
languagesRequired
public java.util.List<Language> getLanguages();
- Type: java.util.List<Language>
The languages lambda handlers are written in.
Specify multiple languages if you wish to implement different operations as AWS Lambda functions in different languages.
optionsOptional
public GeneratedHandlersCodeOptions getOptions();
Options for the infrastructure package.
Note that only those provided for the specified language will apply.
InfrastructureConfiguration
Configuration for generated infrastructure.
Initializer
import software.aws.pdk.type_safe_api.InfrastructureConfiguration;
InfrastructureConfiguration.builder()
.language(Language)
// .options(GeneratedInfrastructureCodeOptions)
.build();
Properties
| Name | Type | Description |
|---|---|---|
language |
Language |
The language to generate the type-safe CDK infrastructure in. |
options |
GeneratedInfrastructureCodeOptions |
Options for the infrastructure package. |
languageRequired
public Language getLanguage();
- Type: Language
The language to generate the type-safe CDK infrastructure in.
optionsOptional
public GeneratedInfrastructureCodeOptions getOptions();
Options for the infrastructure package.
Note that only those provided for the specified language will apply.
IntegrationGrantProps
Properties for granting the API access to invoke the operation.
Initializer
import software.aws.pdk.type_safe_api.IntegrationGrantProps;
IntegrationGrantProps.builder()
.method(java.lang.String)
.path(java.lang.String)
// .contentTypes(java.util.List<java.lang.String>)
.api(SpecRestApi)
.operationId(java.lang.String)
.operationLookup(java.util.Map<java.lang.String, OperationDetails>)
.scope(Construct)
.build();
Properties
| Name | Type | Description |
|---|---|---|
method |
java.lang.String |
The http method of this operation. |
path |
java.lang.String |
The path of this operation in the api. |
contentTypes |
java.util.List |
Content types accepted by this operation. |
api |
software.amazon.awscdk.services.apigateway.SpecRestApi |
The api to grant permissions for. |
operationId |
java.lang.String |
The ID of the operation for which permissions are being granted. |
operationLookup |
java.util.Map |
Details about all operations in the API. |
scope |
software.constructs.Construct |
The scope in which permission resources can be created. |
methodRequired
public java.lang.String getMethod();
- Type: java.lang.String
The http method of this operation.
pathRequired
public java.lang.String getPath();
- Type: java.lang.String
The path of this operation in the api.
contentTypesOptional
public java.util.List<java.lang.String> getContentTypes();
- Type: java.util.List
- Default: application/json
Content types accepted by this operation.
apiRequired
public SpecRestApi getApi();
- Type: software.amazon.awscdk.services.apigateway.SpecRestApi
The api to grant permissions for.
operationIdRequired
public java.lang.String getOperationId();
- Type: java.lang.String
The ID of the operation for which permissions are being granted.
operationLookupRequired
public java.util.Map<java.lang.String, OperationDetails> getOperationLookup();
- Type: java.util.Map
OperationDetails\>
Details about all operations in the API.
scopeRequired
public Construct getScope();
- Type: software.constructs.Construct
The scope in which permission resources can be created.
IntegrationRenderProps
Properties for rendering an integration into an API Gateway OpenAPI extension.
Initializer
import software.aws.pdk.type_safe_api.IntegrationRenderProps;
IntegrationRenderProps.builder()
.method(java.lang.String)
.path(java.lang.String)
// .contentTypes(java.util.List<java.lang.String>)
.operationId(java.lang.String)
.operationLookup(java.util.Map<java.lang.String, OperationDetails>)
.scope(Construct)
// .corsOptions(SerializedCorsOptions)
.build();
Properties
| Name | Type | Description |
|---|---|---|
method |
java.lang.String |
The http method of this operation. |
path |
java.lang.String |
The path of this operation in the api. |
contentTypes |
java.util.List |
Content types accepted by this operation. |
operationId |
java.lang.String |
The ID of the operation being rendered. |
operationLookup |
java.util.Map |
Details about all operations in the API. |
scope |
software.constructs.Construct |
The scope in which the integration is being rendered. |
corsOptions |
SerializedCorsOptions |
Cross Origin Resource Sharing options for the API. |
methodRequired
public java.lang.String getMethod();
- Type: java.lang.String
The http method of this operation.
pathRequired
public java.lang.String getPath();
- Type: java.lang.String
The path of this operation in the api.
contentTypesOptional
public java.util.List<java.lang.String> getContentTypes();
- Type: java.util.List
- Default: application/json
Content types accepted by this operation.
operationIdRequired
public java.lang.String getOperationId();
- Type: java.lang.String
The ID of the operation being rendered.
operationLookupRequired
public java.util.Map<java.lang.String, OperationDetails> getOperationLookup();
- Type: java.util.Map
OperationDetails\>
Details about all operations in the API.
scopeRequired
public Construct getScope();
- Type: software.constructs.Construct
The scope in which the integration is being rendered.
corsOptionsOptional
public SerializedCorsOptions getCorsOptions();
- Type: SerializedCorsOptions
Cross Origin Resource Sharing options for the API.
JavaProjectOptions
JavaProjectOptions.
Initializer
import software.aws.pdk.type_safe_api.JavaProjectOptions;
JavaProjectOptions.builder()
// .artifactId(java.lang.String)
// .autoApproveOptions(AutoApproveOptions)
// .autoMerge(java.lang.Boolean)
// .autoMergeOptions(AutoMergeOptions)
// .clobber(java.lang.Boolean)
// .commitGenerated(java.lang.Boolean)
// .compileOptions(MavenCompileOptions)
// .deps(java.util.List<java.lang.String>)
// .description(java.lang.String)
// .devContainer(java.lang.Boolean)
// .distdir(java.lang.String)
// .github(java.lang.Boolean)
// .githubOptions(GitHubOptions)
// .gitIgnoreOptions(IgnoreFileOptions)
// .gitOptions(GitOptions)
// .gitpod(java.lang.Boolean)
// .groupId(java.lang.String)
// .junit(java.lang.Boolean)
// .junitOptions(JunitOptions)
// .logging(LoggerOptions)
// .mergify(java.lang.Boolean)
// .mergifyOptions(MergifyOptions)
// .name(java.lang.String)
// .outdir(java.lang.String)
// .packaging(java.lang.String)
// .packagingOptions(MavenPackagingOptions)
// .parent(Project)
// .parentPom(ParentPom)
// .projectType(ProjectType)
// .projenCommand(java.lang.String)
// .projenCredentials(GithubCredentials)
// .projenrcJava(java.lang.Boolean)
// .projenrcJavaOptions(ProjenrcOptions)
// .projenrcJson(java.lang.Boolean)
// .projenrcJsonOptions(ProjenrcJsonOptions)
// .projenTokenSecret(java.lang.String)
// .readme(SampleReadmeProps)
// .renovatebot(java.lang.Boolean)
// .renovatebotOptions(RenovatebotOptions)
// .sample(java.lang.Boolean)
// .sampleJavaPackage(java.lang.String)
// .stale(java.lang.Boolean)
// .staleOptions(StaleOptions)
// .testDeps(java.util.List<java.lang.String>)
// .url(java.lang.String)
// .version(java.lang.String)
// .vscode(java.lang.Boolean)
.build();
Properties
| Name | Type | Description |
|---|---|---|
artifactId |
java.lang.String |
The artifactId is generally the name that the project is known by. |
autoApproveOptions |
io.github.cdklabs.projen.github.AutoApproveOptions |
Enable and configure the 'auto approve' workflow. |
autoMerge |
java.lang.Boolean |
Enable automatic merging on GitHub. |
autoMergeOptions |
io.github.cdklabs.projen.github.AutoMergeOptions |
Configure options for automatic merging on GitHub. |
clobber |
java.lang.Boolean |
Add a clobber task which resets the repo to origin. |
commitGenerated |
java.lang.Boolean |
Whether to commit the managed files by default. |
compileOptions |
io.github.cdklabs.projen.java.MavenCompileOptions |
Compile options. |
deps |
java.util.List |
List of runtime dependencies for this project. Dependencies use the format: <groupId>/<artifactId>@<semver>. |
description |
java.lang.String |
Description of a project is always good. |
devContainer |
java.lang.Boolean |
Add a VSCode development environment (used for GitHub Codespaces). |
distdir |
java.lang.String |
Final artifact output directory. |
github |
java.lang.Boolean |
Enable GitHub integration. |
githubOptions |
io.github.cdklabs.projen.github.GitHubOptions |
Options for GitHub integration. |
gitIgnoreOptions |
io.github.cdklabs.projen.IgnoreFileOptions |
Configuration options for .gitignore file. |
gitOptions |
io.github.cdklabs.projen.GitOptions |
Configuration options for git. |
gitpod |
java.lang.Boolean |
Add a Gitpod development environment. |
groupId |
java.lang.String |
This is generally unique amongst an organization or a project. |
junit |
java.lang.Boolean |
Include junit tests. |
junitOptions |
io.github.cdklabs.projen.java.JunitOptions |
junit options. |
logging |
io.github.cdklabs.projen.LoggerOptions |
Configure logging options such as verbosity. |
mergify |
java.lang.Boolean |
Whether mergify should be enabled on this repository or not. |
mergifyOptions |
io.github.cdklabs.projen.github.MergifyOptions |
Options for mergify. |
name |
java.lang.String |
This is the name of your project. |
outdir |
java.lang.String |
The root directory of the project. Relative to this directory, all files are synthesized. |
packaging |
java.lang.String |
Project packaging format. |
packagingOptions |
io.github.cdklabs.projen.java.MavenPackagingOptions |
Packaging options. |
parent |
io.github.cdklabs.projen.Project |
The parent project, if this project is part of a bigger project. |
parentPom |
io.github.cdklabs.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. |
projectType |
io.github.cdklabs.projen.ProjectType |
Which type of project this is (library/app). |
projenCommand |
java.lang.String |
The shell command to use in order to run the projen CLI. |
projenCredentials |
io.github.cdklabs.projen.github.GithubCredentials |
Choose a method of providing GitHub API access for projen workflows. |
projenrcJava |
java.lang.Boolean |
Use projenrc in java. |
projenrcJavaOptions |
io.github.cdklabs.projen.java.ProjenrcOptions |
Options related to projenrc in java. |
projenrcJson |
java.lang.Boolean |
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation. |
projenrcJsonOptions |
io.github.cdklabs.projen.ProjenrcJsonOptions |
Options for .projenrc.json. |
projenTokenSecret |
java.lang.String |
The name of a secret which includes a GitHub Personal Access Token to be used by projen workflows. |
readme |
io.github.cdklabs.projen.SampleReadmeProps |
The README setup. |
renovatebot |
java.lang.Boolean |
Use renovatebot to handle dependency upgrades. |
renovatebotOptions |
io.github.cdklabs.projen.RenovatebotOptions |
Options for renovatebot. |
sample |
java.lang.Boolean |
Include sample code and test if the relevant directories don't exist. |
sampleJavaPackage |
java.lang.String |
The java package to use for the code sample. |
stale |
java.lang.Boolean |
Auto-close of stale issues and pull request. |
staleOptions |
io.github.cdklabs.projen.github.StaleOptions |
Auto-close stale issues and pull requests. |
testDeps |
java.util.List |
List of test dependencies for this project. Dependencies use the format: <groupId>/<artifactId>@<semver>. |
url |
java.lang.String |
The URL, like the name, is not required. |
version |
java.lang.String |
This is the last piece of the naming puzzle. |
vscode |
java.lang.Boolean |
Enable VSCode integration. |
artifactIdOptional
public java.lang.String getArtifactId();
- Type: java.lang.String
- 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.
autoApproveOptionsOptional
public AutoApproveOptions getAutoApproveOptions();
- Type: io.github.cdklabs.projen.github.AutoApproveOptions
- Default: auto approve is disabled
Enable and configure the 'auto approve' workflow.
autoMergeOptional
public java.lang.Boolean getAutoMerge();
- Type: java.lang.Boolean
- Default: true
Enable automatic merging on GitHub.
Has no effect if github.mergify
is set to false.
autoMergeOptionsOptional
public AutoMergeOptions getAutoMergeOptions();
- Type: io.github.cdklabs.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.
clobberOptional
public java.lang.Boolean getClobber();
- Type: java.lang.Boolean
- Default: true, but false for subprojects
Add a clobber task which resets the repo to origin.
commitGeneratedOptional
public java.lang.Boolean getCommitGenerated();
- Type: java.lang.Boolean
- Default: true
Whether to commit the managed files by default.
compileOptionsOptional
public MavenCompileOptions getCompileOptions();
- Type: io.github.cdklabs.projen.java.MavenCompileOptions
- Default: defaults
Compile options.
depsOptional
public java.util.List<java.lang.String> getDeps();
- Type: java.util.List
- Default: []
List of runtime dependencies for this project. Dependencies use the format: <groupId>/<artifactId>@<semver>.
Additional dependencies can be added via project.addDependency().
descriptionOptional
public java.lang.String getDescription();
- Type: java.lang.String
- 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.
devContainerOptional
public java.lang.Boolean getDevContainer();
- Type: java.lang.Boolean
- Default: false
Add a VSCode development environment (used for GitHub Codespaces).
distdirOptional
public java.lang.String getDistdir();
- Type: java.lang.String
- Default: "dist/java"
Final artifact output directory.
githubOptional
public java.lang.Boolean getGithub();
- Type: java.lang.Boolean
- Default: true
Enable GitHub integration.
Enabled by default for root projects. Disabled for non-root projects.
githubOptionsOptional
public GitHubOptions getGithubOptions();
- Type: io.github.cdklabs.projen.github.GitHubOptions
- Default: see GitHubOptions
Options for GitHub integration.
gitIgnoreOptionsOptional
public IgnoreFileOptions getGitIgnoreOptions();
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptionsOptional
public GitOptions getGitOptions();
- Type: io.github.cdklabs.projen.GitOptions
Configuration options for git.
gitpodOptional
public java.lang.Boolean getGitpod();
- Type: java.lang.Boolean
- Default: false
Add a Gitpod development environment.
groupIdOptional
public java.lang.String getGroupId();
- Type: java.lang.String
- 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.
junitOptional
public java.lang.Boolean getJunit();
- Type: java.lang.Boolean
- Default: true
Include junit tests.
junitOptionsOptional
public JunitOptions getJunitOptions();
- Type: io.github.cdklabs.projen.java.JunitOptions
- Default: defaults
junit options.
loggingOptional
public LoggerOptions getLogging();
- Type: io.github.cdklabs.projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
~~mergify~~Optional
- Deprecated: use
githubOptions.mergifyinstead
public java.lang.Boolean getMergify();
- Type: java.lang.Boolean
- Default: true
Whether mergify should be enabled on this repository or not.
~~mergifyOptions~~Optional
- Deprecated: use
githubOptions.mergifyOptionsinstead
public MergifyOptions getMergifyOptions();
- Type: io.github.cdklabs.projen.github.MergifyOptions
- Default: default options
Options for mergify.
nameOptional
public java.lang.String getName();
- Type: java.lang.String
- Default: $BASEDIR
This is the name of your project.
outdirOptional
public java.lang.String getOutdir();
- Type: java.lang.String
- Default: "."
The root directory of the project. Relative to this directory, all files are synthesized.
If this project has a parent, this directory is relative to the parent directory and it cannot be the same as the parent or any of it's other subprojects.
packagingOptional
public java.lang.String getPackaging();
- Type: java.lang.String
- Default: "jar"
Project packaging format.
packagingOptionsOptional
public MavenPackagingOptions getPackagingOptions();
- Type: io.github.cdklabs.projen.java.MavenPackagingOptions
- Default: defaults
Packaging options.
parentOptional
public Project getParent();
- Type: io.github.cdklabs.projen.Project
The parent project, if this project is part of a bigger project.
parentPomOptional
public ParentPom getParentPom();
- Type: io.github.cdklabs.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.
~~projectType~~Optional
- Deprecated: no longer supported at the base project level
public ProjectType getProjectType();
- Type: io.github.cdklabs.projen.ProjectType
- Default: ProjectType.UNKNOWN
Which type of project this is (library/app).
projenCommandOptional
public java.lang.String getProjenCommand();
- Type: java.lang.String
- Default: "npx projen"
The shell command to use in order to run the projen CLI.
Can be used to customize in special environments.
projenCredentialsOptional
public GithubCredentials getProjenCredentials();
- Type: io.github.cdklabs.projen.github.GithubCredentials
- Default: use a personal access token named PROJEN_GITHUB_TOKEN
Choose a method of providing GitHub API access for projen workflows.
projenrcJavaOptional
public java.lang.Boolean getProjenrcJava();
- Type: java.lang.Boolean
- 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.
projenrcJavaOptionsOptional
public ProjenrcOptions getProjenrcJavaOptions();
- Type: io.github.cdklabs.projen.java.ProjenrcOptions
- Default: default options
Options related to projenrc in java.
projenrcJsonOptional
public java.lang.Boolean getProjenrcJson();
- Type: java.lang.Boolean
- Default: false
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation.
projenrcJsonOptionsOptional
public ProjenrcJsonOptions getProjenrcJsonOptions();
- Type: io.github.cdklabs.projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
~~projenTokenSecret~~Optional
- Deprecated: use
projenCredentials
public java.lang.String getProjenTokenSecret();
- Type: java.lang.String
- Default: "PROJEN_GITHUB_TOKEN"
The name of a secret which includes a GitHub Personal Access Token to be used by projen workflows.
This token needs to have the repo, workflows
and packages scope.
readmeOptional
public SampleReadmeProps getReadme();
- Type: io.github.cdklabs.projen.SampleReadmeProps
- Default: { filename: 'README.md', contents: '# replace this' }
The README setup.
renovatebotOptional
public java.lang.Boolean getRenovatebot();
- Type: java.lang.Boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptionsOptional
public RenovatebotOptions getRenovatebotOptions();
- Type: io.github.cdklabs.projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
sampleOptional
public java.lang.Boolean getSample();
- Type: java.lang.Boolean
- Default: true
Include sample code and test if the relevant directories don't exist.
sampleJavaPackageOptional
public java.lang.String getSampleJavaPackage();
- Type: java.lang.String
- Default: "org.acme"
The java package to use for the code sample.
staleOptional
public java.lang.Boolean getStale();
- Type: java.lang.Boolean
- Default: false
Auto-close of stale issues and pull request.
See staleOptions for options.
staleOptionsOptional
public StaleOptions getStaleOptions();
- Type: io.github.cdklabs.projen.github.StaleOptions
- Default: see defaults in
StaleOptions
Auto-close stale issues and pull requests.
To disable set stale to false.
testDepsOptional
public java.util.List<java.lang.String> getTestDeps();
- Type: java.util.List
- Default: []
List of test dependencies for this project. Dependencies use the format: <groupId>/<artifactId>@<semver>.
Additional dependencies can be added via project.addTestDependency().
urlOptional
public java.lang.String getUrl();
- Type: java.lang.String
- 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.
versionOptional
public java.lang.String getVersion();
- Type: java.lang.String
- 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.
vscodeOptional
public java.lang.Boolean getVscode();
- Type: java.lang.Boolean
- Default: true
Enable VSCode integration.
Enabled by default for root projects. Disabled for non-root projects.
LibraryConfiguration
Configuration for generated libraries.
Initializer
import software.aws.pdk.type_safe_api.LibraryConfiguration;
LibraryConfiguration.builder()
.libraries(java.util.List<Library>)
// .options(GeneratedLibraryOptions)
.build();
Properties
| Name | Type | Description |
|---|---|---|
libraries |
java.util.List<Library> |
The library to generate. |
options |
GeneratedLibraryOptions |
Options for the generated library package. |
librariesRequired
public java.util.List<Library> getLibraries();
- Type: java.util.List<Library>
The library to generate.
optionsOptional
public GeneratedLibraryOptions getOptions();
- Type: GeneratedLibraryOptions
Options for the generated library package.
Note that only options for the specified libraries will apply
ManagedRule
Initializer
import software.aws.pdk.type_safe_api.ManagedRule;
ManagedRule.builder()
.name(java.lang.String)
// .excludedRules(IResolvable)
// .excludedRules(java.util.List<IResolvable)
// .excludedRules(ExcludedRuleProperty>)
// .managedRuleGroupConfigs(IResolvable)
// .managedRuleGroupConfigs(java.util.List<IResolvable)
// .managedRuleGroupConfigs(ManagedRuleGroupConfigProperty>)
// .ruleActionOverrides(IResolvable)
// .ruleActionOverrides(java.util.List<IResolvable)
// .ruleActionOverrides(RuleActionOverrideProperty>)
// .scopeDownStatement(IResolvable)
// .scopeDownStatement(StatementProperty)
// .version(java.lang.String)
// .vendor(java.lang.String)
// .vendorName(java.lang.String)
.build();
Properties
| Name | Type | Description |
|---|---|---|
name |
java.lang.String |
The name of the managed rule group. |
excludedRules |
software.amazon.awscdk.IResolvable OR java.util.List |
Rules in the referenced rule group whose actions are set to Count . |
managedRuleGroupConfigs |
software.amazon.awscdk.IResolvable OR java.util.List |
Additional information that's used by a managed rule group. |
ruleActionOverrides |
software.amazon.awscdk.IResolvable OR java.util.List |
Action settings to use in the place of the rule actions that are configured inside the rule group. |
scopeDownStatement |
software.amazon.awscdk.IResolvable OR software.amazon.awscdk.services.wafv2.CfnWebACL.StatementProperty |
An optional nested statement that narrows the scope of the web requests that are evaluated by the managed rule group. |
version |
java.lang.String |
The version of the managed rule group to use. |
vendor |
java.lang.String |
The name of the managed rule group vendor. |
vendorName |
java.lang.String |
The name of the managed rule group vendor. |
nameRequired
public java.lang.String getName();
- Type: java.lang.String
The name of the managed rule group.
You use this, along with the vendor name, to identify the rule group.
excludedRulesOptional
public java.lang.Object getExcludedRules();
- Type: software.amazon.awscdk.IResolvable OR java.util.List
Rules in the referenced rule group whose actions are set to Count .
Instead of this option, use
RuleActionOverrides. It accepts any valid action setting, includingCount.
managedRuleGroupConfigsOptional
public java.lang.Object getManagedRuleGroupConfigs();
- Type: software.amazon.awscdk.IResolvable OR java.util.List
Additional information that's used by a managed rule group.
Many managed rule groups don't require this. The rule groups used for intelligent threat mitigation require additional configuration:
- Use the
AWSManagedRulesACFPRuleSetconfiguration object to configure the account creation fraud prevention managed rule group. The configuration includes the registration and sign-up pages of your application and the locations in the account creation request payload of data, such as the user email and phone number fields. - Use the
AWSManagedRulesATPRuleSetconfiguration object to configure the account takeover prevention managed rule group. The configuration includes the sign-in page of your application and the locations in the login request payload of data such as the username and password. - Use the
AWSManagedRulesBotControlRuleSetconfiguration object to configure the protection level that you want the Bot Control rule group to use.
ruleActionOverridesOptional
public java.lang.Object getRuleActionOverrides();
- Type: software.amazon.awscdk.IResolvable OR java.util.List
Action settings to use in the place of the rule actions that are configured inside the rule group.
You specify one override for each rule whose action you want to change.
You can use overrides for testing, for example you can override all of rule actions to Count and then monitor the resulting count metrics to understand how the rule group would handle your web traffic. You can also permanently override some or all actions, to modify how the rule group manages your web traffic.
scopeDownStatementOptional
public java.lang.Object getScopeDownStatement();
- Type: software.amazon.awscdk.IResolvable OR software.amazon.awscdk.services.wafv2.CfnWebACL.StatementProperty
An optional nested statement that narrows the scope of the web requests that are evaluated by the managed rule group.
Requests are only evaluated by the rule group if they match the scope-down statement. You can use any nestable Statement in the scope-down statement, and you can nest statements at any level, the same as you can for a rule statement.
versionOptional
public java.lang.String getVersion();
- Type: java.lang.String
The version of the managed rule group to use.
If you specify this, the version setting is fixed until you change it. If you don't specify this, AWS WAF uses the vendor's default version, and then keeps the version at the vendor's default when the vendor updates the managed rule group settings.
~~vendor~~Optional
- Deprecated: use the
vendorNameproperty instead. This property will be removed in the next major release.
public java.lang.String getVendor();
- Type: java.lang.String
The name of the managed rule group vendor.
You use this, along with the rule group name, to identify the rule group.
vendorNameOptional
public java.lang.String getVendorName();
- Type: java.lang.String
The name of the managed rule group vendor.
You use this, along with the rule group name, to identify a rule group.
Preferred to the property vendor
MethodAndPath
Structure to contain an API operation's method and path.
Initializer
import software.aws.pdk.type_safe_api.MethodAndPath;
MethodAndPath.builder()
.method(java.lang.String)
.path(java.lang.String)
.build();
Properties
| Name | Type | Description |
|---|---|---|
method |
java.lang.String |
The http method of this operation. |
path |
java.lang.String |
The path of this operation in the api. |
methodRequired
public java.lang.String getMethod();
- Type: java.lang.String
The http method of this operation.
pathRequired
public java.lang.String getPath();
- Type: java.lang.String
The path of this operation in the api.
MockIntegrationResponse
Properties for a mock integration response.
Initializer
import software.aws.pdk.type_safe_api.MockIntegrationResponse;
MockIntegrationResponse.builder()
.statusCode(java.lang.Number)
// .body(java.lang.String)
.build();
Properties
| Name | Type | Description |
|---|---|---|
statusCode |
java.lang.Number |
HTTP response status code. |
body |
java.lang.String |
Response body. |
statusCodeRequired
public java.lang.Number getStatusCode();
- Type: java.lang.Number
HTTP response status code.
bodyOptional
public java.lang.String getBody();
- Type: java.lang.String
Response body.
MockResponseDataGenerationOptions
Options for generating mock data.
Initializer
import software.aws.pdk.type_safe_api.MockResponseDataGenerationOptions;
MockResponseDataGenerationOptions.builder()
// .disable(java.lang.Boolean)
// .locale(java.lang.String)
// .maxArrayLength(java.lang.Number)
// .seed(java.lang.Number)
.build();
Properties
| Name | Type | Description |
|---|---|---|
disable |
java.lang.Boolean |
Set to true to disable generating mock data. |
locale |
java.lang.String |
Locale of generated data. |
maxArrayLength |
java.lang.Number |
Maximum length of generated arrays. |
seed |
java.lang.Number |
Seed for faker to generate data with. |
disableOptional
public java.lang.Boolean getDisable();
- Type: java.lang.Boolean
- Default: false
Set to true to disable generating mock data.
localeOptional
public java.lang.String getLocale();
- Type: java.lang.String
- Default: en
Locale of generated data.
https://fakerjs.dev/guide/localization.html#available-locales
maxArrayLengthOptional
public java.lang.Number getMaxArrayLength();
- Type: java.lang.Number
- Default: 3
Maximum length of generated arrays.
seedOptional
public java.lang.Number getSeed();
- Type: java.lang.Number
- Default: 1337
Seed for faker to generate data with.
MockResponseGenerationOptions
Options for generating mock data.
Initializer
import software.aws.pdk.type_safe_api.MockResponseGenerationOptions;
MockResponseGenerationOptions.builder()
// .mockDataOptions(MockResponseDataGenerationOptions)
.build();
Properties
| Name | Type | Description |
|---|---|---|
mockDataOptions |
MockResponseDataGenerationOptions |
Options for the generated mock response data. |
mockDataOptionsOptional
public MockResponseDataGenerationOptions getMockDataOptions();
Options for the generated mock response data.
ModelConfiguration
Configuration for modelling the API.
Initializer
import software.aws.pdk.type_safe_api.ModelConfiguration;
ModelConfiguration.builder()
.language(ModelLanguage)
.options(ModelOptions)
.build();
Properties
| Name | Type | Description |
|---|---|---|
language |
ModelLanguage |
The language the API model is defined in. |
options |
ModelOptions |
Options for the API model. |
languageRequired
public ModelLanguage getLanguage();
- Type: ModelLanguage
The language the API model is defined in.
optionsRequired
public ModelOptions getOptions();
- Type: ModelOptions
Options for the API model.
ModelOptions
Options for models.
Initializer
import software.aws.pdk.type_safe_api.ModelOptions;
ModelOptions.builder()
// .openapi(OpenApiModelOptions)
// .smithy(SmithyModelOptions)
// .typeSpec(TypeSpecModelOptions)
.build();
Properties
| Name | Type | Description |
|---|---|---|
openapi |
OpenApiModelOptions |
Options for the OpenAPI model - required when model language is OPENAPI. |
smithy |
SmithyModelOptions |
Options for the Smithy model - required when model language is SMITHY. |
typeSpec |
TypeSpecModelOptions |
Options for the TypeSpec model - required when the model language is TYPESPEC. |
openapiOptional
public OpenApiModelOptions getOpenapi();
- Type: OpenApiModelOptions
Options for the OpenAPI model - required when model language is OPENAPI.
smithyOptional
public SmithyModelOptions getSmithy();
- Type: SmithyModelOptions
Options for the Smithy model - required when model language is SMITHY.
typeSpecOptional
public TypeSpecModelOptions getTypeSpec();
- Type: TypeSpecModelOptions
Options for the TypeSpec model - required when the model language is TYPESPEC.
ModelProject
Model project references.
Initializer
import software.aws.pdk.type_safe_api.ModelProject;
ModelProject.builder()
.apiName(java.lang.String)
.outdir(java.lang.String)
.parsedSpecFile(java.lang.String)
// .openapi(OpenApiModelProject)
// .smithy(SmithyModelProject)
// .typeSpec(TypeSpecModelProject)
.build();
Properties
| Name | Type | Description |
|---|---|---|
apiName |
java.lang.String |
Name of the API. |
outdir |
java.lang.String |
Directory of the model project. |
parsedSpecFile |
java.lang.String |
Name of the bundled OpenAPI specification file. |
openapi |
OpenApiModelProject |
Reference to the OpenAPI model project. |
smithy |
SmithyModelProject |
Reference to the Smithy model project. |
typeSpec |
TypeSpecModelProject |
Reference to the TypeSpec model project. |
apiNameRequired
public java.lang.String getApiName();
- Type: java.lang.String
Name of the API.
outdirRequired
public java.lang.String getOutdir();
- Type: java.lang.String
Directory of the model project.
parsedSpecFileRequired
public java.lang.String getParsedSpecFile();
- Type: java.lang.String
Name of the bundled OpenAPI specification file.
openapiOptional
public OpenApiModelProject getOpenapi();
- Type: OpenApiModelProject
Reference to the OpenAPI model project.
Will be defined if the model language is OpenAPI
smithyOptional
public SmithyModelProject getSmithy();
- Type: SmithyModelProject
Reference to the Smithy model project.
Will be defined if the model language is Smithy
typeSpecOptional
public TypeSpecModelProject getTypeSpec();
- Type: TypeSpecModelProject
Reference to the TypeSpec model project.
Will be defined if the model language is TypeSpec
ModelProjectDetails
Common details for API model projects.
Initializer
import software.aws.pdk.type_safe_api.ModelProjectDetails;
ModelProjectDetails.builder()
.apiName(java.lang.String)
.outdir(java.lang.String)
.parsedSpecFile(java.lang.String)
.build();
Properties
| Name | Type | Description |
|---|---|---|
apiName |
java.lang.String |
Name of the API. |
outdir |
java.lang.String |
Directory of the model project. |
parsedSpecFile |
java.lang.String |
Name of the bundled OpenAPI specification file. |
apiNameRequired
public java.lang.String getApiName();
- Type: java.lang.String
Name of the API.
outdirRequired
public java.lang.String getOutdir();
- Type: java.lang.String
Directory of the model project.
parsedSpecFileRequired
public java.lang.String getParsedSpecFile();
- Type: java.lang.String
Name of the bundled OpenAPI specification file.
OpenApiAsyncDefinitionOptions
Options for the OpenAPI Spec.
Initializer
import software.aws.pdk.type_safe_api.OpenApiAsyncDefinitionOptions;
OpenApiAsyncDefinitionOptions.builder()
.openApiOptions(OpenApiModelOptions)
// .handlerLanguages(java.util.List<Language>)
.build();
Properties
| Name | Type | Description |
|---|---|---|
openApiOptions |
OpenApiModelOptions |
Options for the openapi model. |
handlerLanguages |
java.util.List<Language> |
The languages users have specified for handler projects (if any). |
openApiOptionsRequired
public OpenApiModelOptions getOpenApiOptions();
- Type: OpenApiModelOptions
Options for the openapi model.
handlerLanguagesOptional
public java.util.List<Language> getHandlerLanguages();
- Type: java.util.List<Language>
The languages users have specified for handler projects (if any).
OpenApiAsyncModelProjectOptions
Options for an OpenAPI WebSocket API model.
Initializer
import software.aws.pdk.type_safe_api.OpenApiAsyncModelProjectOptions;
OpenApiAsyncModelProjectOptions.builder()
.name(java.lang.String)
// .commitGenerated(java.lang.Boolean)
// .gitIgnoreOptions(IgnoreFileOptions)
// .gitOptions(GitOptions)
// .logging(LoggerOptions)
// .outdir(java.lang.String)
// .parent(Project)
// .projenCommand(java.lang.String)
// .projenrcJson(java.lang.Boolean)
// .projenrcJsonOptions(ProjenrcJsonOptions)
// .renovatebot(java.lang.Boolean)
// .renovatebotOptions(RenovatebotOptions)
.openApiOptions(OpenApiModelOptions)
// .handlerLanguages(java.util.List<Language>)
.parsedSpecFile(java.lang.String)
.asyncApiSpecFile(java.lang.String)
.build();
Properties
| Name | Type | Description |
|---|---|---|
name |
java.lang.String |
This is the name of your project. |
commitGenerated |
java.lang.Boolean |
Whether to commit the managed files by default. |
gitIgnoreOptions |
io.github.cdklabs.projen.IgnoreFileOptions |
Configuration options for .gitignore file. |
gitOptions |
io.github.cdklabs.projen.GitOptions |
Configuration options for git. |
logging |
io.github.cdklabs.projen.LoggerOptions |
Configure logging options such as verbosity. |
outdir |
java.lang.String |
The root directory of the project. |
parent |
io.github.cdklabs.projen.Project |
The parent project, if this project is part of a bigger project. |
projenCommand |
java.lang.String |
The shell command to use in order to run the projen CLI. |
projenrcJson |
java.lang.Boolean |
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation. |
projenrcJsonOptions |
io.github.cdklabs.projen.ProjenrcJsonOptions |
Options for .projenrc.json. |
renovatebot |
java.lang.Boolean |
Use renovatebot to handle dependency upgrades. |
renovatebotOptions |
io.github.cdklabs.projen.RenovatebotOptions |
Options for renovatebot. |
openApiOptions |
OpenApiModelOptions |
Options for the openapi model. |
handlerLanguages |
java.util.List<Language> |
The languages users have specified for handler projects (if any). |
parsedSpecFile |
java.lang.String |
Path of the parsed/bundled OpenAPI specification (relative to the project root). |
asyncApiSpecFile |
java.lang.String |
Path to the generated AsyncAPI specification (relative to the project root). |
nameRequired
public java.lang.String getName();
- Type: java.lang.String
- Default: $BASEDIR
This is the name of your project.
commitGeneratedOptional
public java.lang.Boolean getCommitGenerated();
- Type: java.lang.Boolean
- Default: true
Whether to commit the managed files by default.
gitIgnoreOptionsOptional
public IgnoreFileOptions getGitIgnoreOptions();
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptionsOptional
public GitOptions getGitOptions();
- Type: io.github.cdklabs.projen.GitOptions
Configuration options for git.
loggingOptional
public LoggerOptions getLogging();
- Type: io.github.cdklabs.projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
outdirOptional
public java.lang.String getOutdir();
- Type: java.lang.String
- Default: "."
The root directory of the project.
Relative to this directory, all files are synthesized.
If this project has a parent, this directory is relative to the parent directory and it cannot be the same as the parent or any of it's other subprojects.
parentOptional
public Project getParent();
- Type: io.github.cdklabs.projen.Project
The parent project, if this project is part of a bigger project.
projenCommandOptional
public java.lang.String getProjenCommand();
- Type: java.lang.String
- Default: "npx projen"
The shell command to use in order to run the projen CLI.
Can be used to customize in special environments.
projenrcJsonOptional
public java.lang.Boolean getProjenrcJson();
- Type: java.lang.Boolean
- Default: false
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation.
projenrcJsonOptionsOptional
public ProjenrcJsonOptions getProjenrcJsonOptions();
- Type: io.github.cdklabs.projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
renovatebotOptional
public java.lang.Boolean getRenovatebot();
- Type: java.lang.Boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptionsOptional
public RenovatebotOptions getRenovatebotOptions();
- Type: io.github.cdklabs.projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
openApiOptionsRequired
public OpenApiModelOptions getOpenApiOptions();
- Type: OpenApiModelOptions
Options for the openapi model.
handlerLanguagesOptional
public java.util.List<Language> getHandlerLanguages();
- Type: java.util.List<Language>
The languages users have specified for handler projects (if any).
parsedSpecFileRequired
public java.lang.String getParsedSpecFile();
- Type: java.lang.String
Path of the parsed/bundled OpenAPI specification (relative to the project root).
asyncApiSpecFileRequired
public java.lang.String getAsyncApiSpecFile();
- Type: java.lang.String
Path to the generated AsyncAPI specification (relative to the project root).
OpenApiDefinitionOptions
Options for the OpenAPI Spec.
Initializer
import software.aws.pdk.type_safe_api.OpenApiDefinitionOptions;
OpenApiDefinitionOptions.builder()
.openApiOptions(OpenApiModelOptions)
// .handlerLanguages(java.util.List<Language>)
.build();
Properties
| Name | Type | Description |
|---|---|---|
openApiOptions |
OpenApiModelOptions |
Options for the openapi model. |
handlerLanguages |
java.util.List<Language> |
The languages users have specified for handler projects (if any). |
openApiOptionsRequired
public OpenApiModelOptions getOpenApiOptions();
- Type: OpenApiModelOptions
Options for the openapi model.
handlerLanguagesOptional
public java.util.List<Language> getHandlerLanguages();
- Type: java.util.List<Language>
The languages users have specified for handler projects (if any).
OpenApiModelOptions
Options for the OpenAPI model.
Initializer
import software.aws.pdk.type_safe_api.OpenApiModelOptions;
OpenApiModelOptions.builder()
.title(java.lang.String)
.build();
Properties
| Name | Type | Description |
|---|---|---|
title |
java.lang.String |
The title in the OpenAPI specification. |
titleRequired
public java.lang.String getTitle();
- Type: java.lang.String
The title in the OpenAPI specification.
OpenApiModelProjectOptions
Initializer
import software.aws.pdk.type_safe_api.OpenApiModelProjectOptions;
OpenApiModelProjectOptions.builder()
.name(java.lang.String)
// .commitGenerated(java.lang.Boolean)
// .gitIgnoreOptions(IgnoreFileOptions)
// .gitOptions(GitOptions)
// .logging(LoggerOptions)
// .outdir(java.lang.String)
// .parent(Project)
// .projenCommand(java.lang.String)
// .projenrcJson(java.lang.Boolean)
// .projenrcJsonOptions(ProjenrcJsonOptions)
// .renovatebot(java.lang.Boolean)
// .renovatebotOptions(RenovatebotOptions)
.openApiOptions(OpenApiModelOptions)
// .handlerLanguages(java.util.List<Language>)
.parsedSpecFile(java.lang.String)
.build();
Properties
| Name | Type | Description |
|---|---|---|
name |
java.lang.String |
This is the name of your project. |
commitGenerated |
java.lang.Boolean |
Whether to commit the managed files by default. |
gitIgnoreOptions |
io.github.cdklabs.projen.IgnoreFileOptions |
Configuration options for .gitignore file. |
gitOptions |
io.github.cdklabs.projen.GitOptions |
Configuration options for git. |
logging |
io.github.cdklabs.projen.LoggerOptions |
Configure logging options such as verbosity. |
outdir |
java.lang.String |
The root directory of the project. |
parent |
io.github.cdklabs.projen.Project |
The parent project, if this project is part of a bigger project. |
projenCommand |
java.lang.String |
The shell command to use in order to run the projen CLI. |
projenrcJson |
java.lang.Boolean |
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation. |
projenrcJsonOptions |
io.github.cdklabs.projen.ProjenrcJsonOptions |
Options for .projenrc.json. |
renovatebot |
java.lang.Boolean |
Use renovatebot to handle dependency upgrades. |
renovatebotOptions |
io.github.cdklabs.projen.RenovatebotOptions |
Options for renovatebot. |
openApiOptions |
OpenApiModelOptions |
Options for the openapi model. |
handlerLanguages |
java.util.List<Language> |
The languages users have specified for handler projects (if any). |
parsedSpecFile |
java.lang.String |
Path of the parsed/bundled OpenAPI specification (relative to the project root). |
nameRequired
public java.lang.String getName();
- Type: java.lang.String
- Default: $BASEDIR
This is the name of your project.
commitGeneratedOptional
public java.lang.Boolean getCommitGenerated();
- Type: java.lang.Boolean
- Default: true
Whether to commit the managed files by default.
gitIgnoreOptionsOptional
public IgnoreFileOptions getGitIgnoreOptions();
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptionsOptional
public GitOptions getGitOptions();
- Type: io.github.cdklabs.projen.GitOptions
Configuration options for git.
loggingOptional
public LoggerOptions getLogging();
- Type: io.github.cdklabs.projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
outdirOptional
public java.lang.String getOutdir();
- Type: java.lang.String
- Default: "."
The root directory of the project.
Relative to this directory, all files are synthesized.
If this project has a parent, this directory is relative to the parent directory and it cannot be the same as the parent or any of it's other subprojects.
parentOptional
public Project getParent();
- Type: io.github.cdklabs.projen.Project
The parent project, if this project is part of a bigger project.
projenCommandOptional
public java.lang.String getProjenCommand();
- Type: java.lang.String
- Default: "npx projen"
The shell command to use in order to run the projen CLI.
Can be used to customize in special environments.
projenrcJsonOptional
public java.lang.Boolean getProjenrcJson();
- Type: java.lang.Boolean
- Default: false
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation.
projenrcJsonOptionsOptional
public ProjenrcJsonOptions getProjenrcJsonOptions();
- Type: io.github.cdklabs.projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
renovatebotOptional
public java.lang.Boolean getRenovatebot();
- Type: java.lang.Boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptionsOptional
public RenovatebotOptions getRenovatebotOptions();
- Type: io.github.cdklabs.projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
openApiOptionsRequired
public OpenApiModelOptions getOpenApiOptions();
- Type: OpenApiModelOptions
Options for the openapi model.
handlerLanguagesOptional
public java.util.List<Language> getHandlerLanguages();
- Type: java.util.List<Language>
The languages users have specified for handler projects (if any).
parsedSpecFileRequired
public java.lang.String getParsedSpecFile();
- Type: java.lang.String
Path of the parsed/bundled OpenAPI specification (relative to the project root).
OpenApiProjectDefinitionOptions
Options for the OpenAPI Spec.
Initializer
import software.aws.pdk.type_safe_api.OpenApiProjectDefinitionOptions;
OpenApiProjectDefinitionOptions.builder()
.openApiOptions(OpenApiModelOptions)
// .handlerLanguages(java.util.List<Language>)
.build();
Properties
| Name | Type | Description |
|---|---|---|
openApiOptions |
OpenApiModelOptions |
Options for the openapi model. |
handlerLanguages |
java.util.List<Language> |
The languages users have specified for handler projects (if any). |
openApiOptionsRequired
public OpenApiModelOptions getOpenApiOptions();
- Type: OpenApiModelOptions
Options for the openapi model.
handlerLanguagesOptional
public java.util.List<Language> getHandlerLanguages();
- Type: java.util.List<Language>
The languages users have specified for handler projects (if any).
OperationDetails
Details about an API operation.
Initializer
import software.aws.pdk.type_safe_api.OperationDetails;
OperationDetails.builder()
.method(java.lang.String)
.path(java.lang.String)
// .contentTypes(java.util.List<java.lang.String>)
.build();
Properties
| Name | Type | Description |
|---|---|---|
method |
java.lang.String |
The http method of this operation. |
path |
java.lang.String |
The path of this operation in the api. |
contentTypes |
java.util.List |
Content types accepted by this operation. |
methodRequired
public java.lang.String getMethod();
- Type: java.lang.String
The http method of this operation.
pathRequired
public java.lang.String getPath();
- Type: java.lang.String
The path of this operation in the api.
contentTypesOptional
public java.util.List<java.lang.String> getContentTypes();
- Type: java.util.List
- Default: application/json
Content types accepted by this operation.
PartialManagedRuleGroupStatementProperty
PartialManagedRuleGroupStatementProperty.
Initializer
import software.aws.pdk.type_safe_api.PartialManagedRuleGroupStatementProperty;
PartialManagedRuleGroupStatementProperty.builder()
.name(java.lang.String)
// .excludedRules(IResolvable)
// .excludedRules(java.util.List<IResolvable)
// .excludedRules(ExcludedRuleProperty>)
// .managedRuleGroupConfigs(IResolvable)
// .managedRuleGroupConfigs(java.util.List<IResolvable)
// .managedRuleGroupConfigs(ManagedRuleGroupConfigProperty>)
// .ruleActionOverrides(IResolvable)
// .ruleActionOverrides(java.util.List<IResolvable)
// .ruleActionOverrides(RuleActionOverrideProperty>)
// .scopeDownStatement(IResolvable)
// .scopeDownStatement(StatementProperty)
// .version(java.lang.String)
.build();
Properties
| Name | Type | Description |
|---|---|---|
name |
java.lang.String |
The name of the managed rule group. |
excludedRules |
software.amazon.awscdk.IResolvable OR java.util.List |
Rules in the referenced rule group whose actions are set to Count . |
managedRuleGroupConfigs |
software.amazon.awscdk.IResolvable OR java.util.List |
Additional information that's used by a managed rule group. |
ruleActionOverrides |
software.amazon.awscdk.IResolvable OR java.util.List |
Action settings to use in the place of the rule actions that are configured inside the rule group. |
scopeDownStatement |
software.amazon.awscdk.IResolvable OR software.amazon.awscdk.services.wafv2.CfnWebACL.StatementProperty |
An optional nested statement that narrows the scope of the web requests that are evaluated by the managed rule group. |
version |
java.lang.String |
The version of the managed rule group to use. |
nameRequired
public java.lang.String getName();
- Type: java.lang.String
The name of the managed rule group.
You use this, along with the vendor name, to identify the rule group.
excludedRulesOptional
public java.lang.Object getExcludedRules();
- Type: software.amazon.awscdk.IResolvable OR java.util.List
Rules in the referenced rule group whose actions are set to Count .
Instead of this option, use
RuleActionOverrides. It accepts any valid action setting, includingCount.
managedRuleGroupConfigsOptional
public java.lang.Object getManagedRuleGroupConfigs();
- Type: software.amazon.awscdk.IResolvable OR java.util.List
Additional information that's used by a managed rule group.
Many managed rule groups don't require this. The rule groups used for intelligent threat mitigation require additional configuration:
- Use the
AWSManagedRulesACFPRuleSetconfiguration object to configure the account creation fraud prevention managed rule group. The configuration includes the registration and sign-up pages of your application and the locations in the account creation request payload of data, such as the user email and phone number fields. - Use the
AWSManagedRulesATPRuleSetconfiguration object to configure the account takeover prevention managed rule group. The configuration includes the sign-in page of your application and the locations in the login request payload of data such as the username and password. - Use the
AWSManagedRulesBotControlRuleSetconfiguration object to configure the protection level that you want the Bot Control rule group to use.
ruleActionOverridesOptional
public java.lang.Object getRuleActionOverrides();
- Type: software.amazon.awscdk.IResolvable OR java.util.List
Action settings to use in the place of the rule actions that are configured inside the rule group.
You specify one override for each rule whose action you want to change.
You can use overrides for testing, for example you can override all of rule actions to Count and then monitor the resulting count metrics to understand how the rule group would handle your web traffic. You can also permanently override some or all actions, to modify how the rule group manages your web traffic.
scopeDownStatementOptional
public java.lang.Object getScopeDownStatement();
- Type: software.amazon.awscdk.IResolvable OR software.amazon.awscdk.services.wafv2.CfnWebACL.StatementProperty
An optional nested statement that narrows the scope of the web requests that are evaluated by the managed rule group.
Requests are only evaluated by the rule group if they match the scope-down statement. You can use any nestable Statement in the scope-down statement, and you can nest statements at any level, the same as you can for a rule statement.
versionOptional
public java.lang.String getVersion();
- Type: java.lang.String
The version of the managed rule group to use.
If you specify this, the version setting is fixed until you change it. If you don't specify this, AWS WAF uses the vendor's default version, and then keeps the version at the vendor's default when the vendor updates the managed rule group settings.
ProjectCollections
Collections of projects managed by type-safe-api.
Initializer
import software.aws.pdk.type_safe_api.ProjectCollections;
ProjectCollections.builder()
.documentation(java.util.List<Project>)
.handlers(java.util.List<Project>)
.infrastructure(java.util.List<Project>)
.libraries(java.util.List<Project>)
.model(java.util.List<Project>)
.projects(java.util.List<Project>)
.runtimes(java.util.List<Project>)
.build();
Properties
| Name | Type | Description |
|---|---|---|
documentation |
java.util.List |
Array of all documentation projects. |
handlers |
java.util.List |
Array of all handler projects. |
infrastructure |
java.util.List |
Array of all infrastructure projects. |
libraries |
java.util.List |
Array of all library projects. |
model |
java.util.List |
Array of all model projects. |
projects |
java.util.List |
Array of all projects managed by type-safe-api. |
runtimes |
java.util.List |
Array of all runtime projects. |
documentationRequired
public java.util.List<Project> getDocumentation();
- Type: java.util.List
Array of all documentation projects.
handlersRequired
public java.util.List<Project> getHandlers();
- Type: java.util.List
Array of all handler projects.
infrastructureRequired
public java.util.List<Project> getInfrastructure();
- Type: java.util.List
Array of all infrastructure projects.
librariesRequired
public java.util.List<Project> getLibraries();
- Type: java.util.List
Array of all library projects.
modelRequired
public java.util.List<Project> getModel();
- Type: java.util.List
Array of all model projects.
projectsRequired
public java.util.List<Project> getProjects();
- Type: java.util.List
Array of all projects managed by type-safe-api.
runtimesRequired
public java.util.List<Project> getRuntimes();
- Type: java.util.List
Array of all runtime projects.
PythonProjectOptions
PythonProjectOptions.
Initializer
import software.aws.pdk.type_safe_api.PythonProjectOptions;
PythonProjectOptions.builder()
// .authorEmail(java.lang.String)
// .authorName(java.lang.String)
// .autoApproveOptions(AutoApproveOptions)
// .autoMerge(java.lang.Boolean)
// .autoMergeOptions(AutoMergeOptions)
// .classifiers(java.util.List<java.lang.String>)
// .clobber(java.lang.Boolean)
// .commitGenerated(java.lang.Boolean)
// .deps(java.util.List<java.lang.String>)
// .description(java.lang.String)
// .devContainer(java.lang.Boolean)
// .devDeps(java.util.List<java.lang.String>)
// .github(java.lang.Boolean)
// .githubOptions(GitHubOptions)
// .gitIgnoreOptions(IgnoreFileOptions)
// .gitOptions(GitOptions)
// .gitpod(java.lang.Boolean)
// .homepage(java.lang.String)
// .license(java.lang.String)
// .logging(LoggerOptions)
// .mergify(java.lang.Boolean)
// .mergifyOptions(MergifyOptions)
// .moduleName(java.lang.String)
// .name(java.lang.String)
// .outdir(java.lang.String)
// .packageName(java.lang.String)
// .parent(Project)
// .poetryOptions(PoetryPyprojectOptionsWithoutDeps)
// .projectType(ProjectType)
// .projenCommand(java.lang.String)
// .projenCredentials(GithubCredentials)
// .projenrcJson(java.lang.Boolean)
// .projenrcJsonOptions(ProjenrcJsonOptions)
// .projenrcPythonOptions(ProjenrcOptions)
// .projenTokenSecret(java.lang.String)
// .pytest(java.lang.Boolean)
// .pytestOptions(PytestOptions)
// .pythonExec(java.lang.String)
// .readme(SampleReadmeProps)
// .renovatebot(java.lang.Boolean)
// .renovatebotOptions(RenovatebotOptions)
// .sample(java.lang.Boolean)
// .setupConfig(java.util.Map<java.lang.String, java.lang.Object>)
// .setuptools(java.lang.Boolean)
// .stale(java.lang.Boolean)
// .staleOptions(StaleOptions)
// .version(java.lang.String)
// .vscode(java.lang.Boolean)
.build();
Properties
| Name | Type | Description |
|---|---|---|
authorEmail |
java.lang.String |
Author's e-mail. |
authorName |
java.lang.String |
Author's name. |
autoApproveOptions |
io.github.cdklabs.projen.github.AutoApproveOptions |
Enable and configure the 'auto approve' workflow. |
autoMerge |
java.lang.Boolean |
Enable automatic merging on GitHub. |
autoMergeOptions |
io.github.cdklabs.projen.github.AutoMergeOptions |
Configure options for automatic merging on GitHub. |
classifiers |
java.util.List |
A list of PyPI trove classifiers that describe the project. |
clobber |
java.lang.Boolean |
Add a clobber task which resets the repo to origin. |
commitGenerated |
java.lang.Boolean |
Whether to commit the managed files by default. |
deps |
java.util.List |
List of runtime dependencies for this project. Dependencies use the format: <module>@<semver>. |
description |
java.lang.String |
A short description of the package. |
devContainer |
java.lang.Boolean |
Add a VSCode development environment (used for GitHub Codespaces). |
devDeps |
java.util.List |
List of dev dependencies for this project. Dependencies use the format: <module>@<semver>. |
github |
java.lang.Boolean |
Enable GitHub integration. |
githubOptions |
io.github.cdklabs.projen.github.GitHubOptions |
Options for GitHub integration. |
gitIgnoreOptions |
io.github.cdklabs.projen.IgnoreFileOptions |
Configuration options for .gitignore file. |
gitOptions |
io.github.cdklabs.projen.GitOptions |
Configuration options for git. |
gitpod |
java.lang.Boolean |
Add a Gitpod development environment. |
homepage |
java.lang.String |
A URL to the website of the project. |
license |
java.lang.String |
License of this package as an SPDX identifier. |
logging |
io.github.cdklabs.projen.LoggerOptions |
Configure logging options such as verbosity. |
mergify |
java.lang.Boolean |
Whether mergify should be enabled on this repository or not. |
mergifyOptions |
io.github.cdklabs.projen.github.MergifyOptions |
Options for mergify. |
moduleName |
java.lang.String |
Name of the python package as used in imports and filenames. |
name |
java.lang.String |
This is the name of your project. |
outdir |
java.lang.String |
The root directory of the project. Relative to this directory, all files are synthesized. |
packageName |
java.lang.String |
Package name. |
parent |
io.github.cdklabs.projen.Project |
The parent project, if this project is part of a bigger project. |
poetryOptions |
io.github.cdklabs.projen.python.PoetryPyprojectOptionsWithoutDeps |
Additional options to set for poetry if using poetry. |
projectType |
io.github.cdklabs.projen.ProjectType |
Which type of project this is (library/app). |
projenCommand |
java.lang.String |
The shell command to use in order to run the projen CLI. |
projenCredentials |
io.github.cdklabs.projen.github.GithubCredentials |
Choose a method of providing GitHub API access for projen workflows. |
projenrcJson |
java.lang.Boolean |
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation. |
projenrcJsonOptions |
io.github.cdklabs.projen.ProjenrcJsonOptions |
Options for .projenrc.json. |
projenrcPythonOptions |
io.github.cdklabs.projen.python.ProjenrcOptions |
Options related to projenrc in python. |
projenTokenSecret |
java.lang.String |
The name of a secret which includes a GitHub Personal Access Token to be used by projen workflows. |
pytest |
java.lang.Boolean |
Include pytest tests. |
pytestOptions |
io.github.cdklabs.projen.python.PytestOptions |
pytest options. |
pythonExec |
java.lang.String |
Path to the python executable to use. |
readme |
io.github.cdklabs.projen.SampleReadmeProps |
The README setup. |
renovatebot |
java.lang.Boolean |
Use renovatebot to handle dependency upgrades. |
renovatebotOptions |
io.github.cdklabs.projen.RenovatebotOptions |
Options for renovatebot. |
sample |
java.lang.Boolean |
Include sample code and test if the relevant directories don't exist. |
setupConfig |
java.util.Map |
Additional fields to pass in the setup() function if using setuptools. |
setuptools |
java.lang.Boolean |
Use setuptools with a setup.py script for packaging and publishing. |
stale |
java.lang.Boolean |
Auto-close of stale issues and pull request. |
staleOptions |
io.github.cdklabs.projen.github.StaleOptions |
Auto-close stale issues and pull requests. |
version |
java.lang.String |
Version of the package. |
vscode |
java.lang.Boolean |
Enable VSCode integration. |
authorEmailOptional
public java.lang.String getAuthorEmail();
- Type: java.lang.String
- Default: $GIT_USER_EMAIL
Author's e-mail.
authorNameOptional
public java.lang.String getAuthorName();
- Type: java.lang.String
- Default: $GIT_USER_NAME
Author's name.
autoApproveOptionsOptional
public AutoApproveOptions getAutoApproveOptions();
- Type: io.github.cdklabs.projen.github.AutoApproveOptions
- Default: auto approve is disabled
Enable and configure the 'auto approve' workflow.
autoMergeOptional
public java.lang.Boolean getAutoMerge();
- Type: java.lang.Boolean
- Default: true
Enable automatic merging on GitHub.
Has no effect if github.mergify
is set to false.
autoMergeOptionsOptional
public AutoMergeOptions getAutoMergeOptions();
- Type: io.github.cdklabs.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.
classifiersOptional
public java.util.List<java.lang.String> getClassifiers();
- Type: java.util.List
A list of PyPI trove classifiers that describe the project.
clobberOptional
public java.lang.Boolean getClobber();
- Type: java.lang.Boolean
- Default: true, but false for subprojects
Add a clobber task which resets the repo to origin.
commitGeneratedOptional
public java.lang.Boolean getCommitGenerated();
- Type: java.lang.Boolean
- Default: true
Whether to commit the managed files by default.
depsOptional
public java.util.List<java.lang.String> getDeps();
- Type: java.util.List
- Default: []
List of runtime dependencies for this project. Dependencies use the format: <module>@<semver>.
Additional dependencies can be added via project.addDependency().
descriptionOptional
public java.lang.String getDescription();
- Type: java.lang.String
A short description of the package.
devContainerOptional
public java.lang.Boolean getDevContainer();
- Type: java.lang.Boolean
- Default: false
Add a VSCode development environment (used for GitHub Codespaces).
devDepsOptional
public java.util.List<java.lang.String> getDevDeps();
- Type: java.util.List
- Default: []
List of dev dependencies for this project. Dependencies use the format: <module>@<semver>.
Additional dependencies can be added via project.addDevDependency().
githubOptional
public java.lang.Boolean getGithub();
- Type: java.lang.Boolean
- Default: true
Enable GitHub integration.
Enabled by default for root projects. Disabled for non-root projects.
githubOptionsOptional
public GitHubOptions getGithubOptions();
- Type: io.github.cdklabs.projen.github.GitHubOptions
- Default: see GitHubOptions
Options for GitHub integration.
gitIgnoreOptionsOptional
public IgnoreFileOptions getGitIgnoreOptions();
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptionsOptional
public GitOptions getGitOptions();
- Type: io.github.cdklabs.projen.GitOptions
Configuration options for git.
gitpodOptional
public java.lang.Boolean getGitpod();
- Type: java.lang.Boolean
- Default: false
Add a Gitpod development environment.
homepageOptional
public java.lang.String getHomepage();
- Type: java.lang.String
A URL to the website of the project.
licenseOptional
public java.lang.String getLicense();
- Type: java.lang.String
License of this package as an SPDX identifier.
loggingOptional
public LoggerOptions getLogging();
- Type: io.github.cdklabs.projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
~~mergify~~Optional
- Deprecated: use
githubOptions.mergifyinstead
public java.lang.Boolean getMergify();
- Type: java.lang.Boolean
- Default: true
Whether mergify should be enabled on this repository or not.
~~mergifyOptions~~Optional
- Deprecated: use
githubOptions.mergifyOptionsinstead
public MergifyOptions getMergifyOptions();
- Type: io.github.cdklabs.projen.github.MergifyOptions
- Default: default options
Options for mergify.
moduleNameOptional
public java.lang.String getModuleName();
- Type: java.lang.String
- Default: $PYTHON_MODULE_NAME
Name of the python package as used in imports and filenames.
Must only consist of alphanumeric characters and underscores.
nameOptional
public java.lang.String getName();
- Type: java.lang.String
- Default: $BASEDIR
This is the name of your project.
outdirOptional
public java.lang.String getOutdir();
- Type: java.lang.String
- Default: "."
The root directory of the project. Relative to this directory, all files are synthesized.
If this project has a parent, this directory is relative to the parent directory and it cannot be the same as the parent or any of it's other subprojects.
packageNameOptional
public java.lang.String getPackageName();
- Type: java.lang.String
Package name.
parentOptional
public Project getParent();
- Type: io.github.cdklabs.projen.Project
The parent project, if this project is part of a bigger project.
poetryOptionsOptional
public PoetryPyprojectOptionsWithoutDeps getPoetryOptions();
- Type: io.github.cdklabs.projen.python.PoetryPyprojectOptionsWithoutDeps
Additional options to set for poetry if using poetry.
~~projectType~~Optional
- Deprecated: no longer supported at the base project level
public ProjectType getProjectType();
- Type: io.github.cdklabs.projen.ProjectType
- Default: ProjectType.UNKNOWN
Which type of project this is (library/app).
projenCommandOptional
public java.lang.String getProjenCommand();
- Type: java.lang.String
- Default: "npx projen"
The shell command to use in order to run the projen CLI.
Can be used to customize in special environments.
projenCredentialsOptional
public GithubCredentials getProjenCredentials();
- Type: io.github.cdklabs.projen.github.GithubCredentials
- Default: use a personal access token named PROJEN_GITHUB_TOKEN
Choose a method of providing GitHub API access for projen workflows.
projenrcJsonOptional
public java.lang.Boolean getProjenrcJson();
- Type: java.lang.Boolean
- Default: false
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation.
projenrcJsonOptionsOptional
public ProjenrcJsonOptions getProjenrcJsonOptions();
- Type: io.github.cdklabs.projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
projenrcPythonOptionsOptional
public ProjenrcOptions getProjenrcPythonOptions();
- Type: io.github.cdklabs.projen.python.ProjenrcOptions
- Default: default options
Options related to projenrc in python.
~~projenTokenSecret~~Optional
- Deprecated: use
projenCredentials
public java.lang.String getProjenTokenSecret();
- Type: java.lang.String
- Default: "PROJEN_GITHUB_TOKEN"
The name of a secret which includes a GitHub Personal Access Token to be used by projen workflows.
This token needs to have the repo, workflows
and packages scope.
pytestOptional
public java.lang.Boolean getPytest();
- Type: java.lang.Boolean
- Default: true
Include pytest tests.
pytestOptionsOptional
public PytestOptions getPytestOptions();
- Type: io.github.cdklabs.projen.python.PytestOptions
- Default: defaults
pytest options.
pythonExecOptional
public java.lang.String getPythonExec();
- Type: java.lang.String
- Default: "python"
Path to the python executable to use.
readmeOptional
public SampleReadmeProps getReadme();
- Type: io.github.cdklabs.projen.SampleReadmeProps
- Default: { filename: 'README.md', contents: '# replace this' }
The README setup.
renovatebotOptional
public java.lang.Boolean getRenovatebot();
- Type: java.lang.Boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptionsOptional
public RenovatebotOptions getRenovatebotOptions();
- Type: io.github.cdklabs.projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
sampleOptional
public java.lang.Boolean getSample();
- Type: java.lang.Boolean
- Default: true
Include sample code and test if the relevant directories don't exist.
setupConfigOptional
public java.util.Map<java.lang.String, java.lang.Object> getSetupConfig();
- Type: java.util.Map
Additional fields to pass in the setup() function if using setuptools.
setuptoolsOptional
public java.lang.Boolean getSetuptools();
- Type: java.lang.Boolean
- Default: true, unless poetry is true, then false
Use setuptools with a setup.py script for packaging and publishing.
staleOptional
public java.lang.Boolean getStale();
- Type: java.lang.Boolean
- Default: false
Auto-close of stale issues and pull request.
See staleOptions for options.
staleOptionsOptional
public StaleOptions getStaleOptions();
- Type: io.github.cdklabs.projen.github.StaleOptions
- Default: see defaults in
StaleOptions
Auto-close stale issues and pull requests.
To disable set stale to false.
versionOptional
public java.lang.String getVersion();
- Type: java.lang.String
- Default: "0.1.0"
Version of the package.
vscodeOptional
public java.lang.Boolean getVscode();
- Type: java.lang.Boolean
- Default: true
Enable VSCode integration.
Enabled by default for root projects. Disabled for non-root projects.
RuntimeConfiguration
Configuration for generated runtime projects.
Initializer
import software.aws.pdk.type_safe_api.RuntimeConfiguration;
RuntimeConfiguration.builder()
.languages(java.util.List<Language>)
// .options(GeneratedRuntimeCodeOptions)
.build();
Properties
| Name | Type | Description |
|---|---|---|
languages |
java.util.List<Language> |
The languages that runtime projects will be generated in. |
options |
GeneratedRuntimeCodeOptions |
Options for the generated runtimes. |
languagesRequired
public java.util.List<Language> getLanguages();
- Type: java.util.List<Language>
The languages that runtime projects will be generated in.
These projects can be used to provide type safety for both client and server projects.
optionsOptional
public GeneratedRuntimeCodeOptions getOptions();
Options for the generated runtimes.
Note that only options provided for the specified languages will apply.
S3IntegrationProps
Options for S3Integration.
Initializer
import software.aws.pdk.type_safe_api.S3IntegrationProps;
S3IntegrationProps.builder()
.bucket(IBucket)
// .headerRequestParameters(java.util.List<java.lang.String>)
// .integrationResponseSet(IntegrationResponseSet)
// .method(java.lang.String)
// .path(java.lang.String)
// .queryStringRequestParameters(java.util.List<java.lang.String>)
.build();
Properties
| Name | Type | Description |
|---|---|---|
bucket |
software.amazon.awscdk.services.s3.IBucket |
The S3 bucket to be invoked on integration. |
headerRequestParameters |
java.util.List |
Specifies additional header request parameters to be passed to the integration request. |
integrationResponseSet |
IntegrationResponseSet |
Override the integration response set for the S3 integration. |
method |
java.lang.String |
The HTTP method to use when invoking the S3 bucket. |
path |
java.lang.String |
The path override to use when invoking the S3 bucket. |
queryStringRequestParameters |
java.util.List |
Specifies additional query string request parameters to be passed to the integration request. |
bucketRequired
public IBucket getBucket();
- Type: software.amazon.awscdk.services.s3.IBucket
The S3 bucket to be invoked on integration.
headerRequestParametersOptional
public java.util.List<java.lang.String> getHeaderRequestParameters();
- Type: java.util.List
- Default: no additional header request parameters
Specifies additional header request parameters to be passed to the integration request.
integrationResponseSetOptional
public IntegrationResponseSet getIntegrationResponseSet();
- Type: IntegrationResponseSet
- Default: a combination of IntegrationResponseSets.defaultPassthrough() and IntegrationResponseSets.s3JsonErrorMessage()
Override the integration response set for the S3 integration.
methodOptional
public java.lang.String getMethod();
- Type: java.lang.String
- Default: integration method is used
The HTTP method to use when invoking the S3 bucket.
pathOptional
public java.lang.String getPath();
- Type: java.lang.String
- Default: integration path is used
The path override to use when invoking the S3 bucket.
queryStringRequestParametersOptional
public java.util.List<java.lang.String> getQueryStringRequestParameters();
- Type: java.util.List
- Default: no additional query string request parameters
Specifies additional query string request parameters to be passed to the integration request.
SerializedCorsOptions
Cross-origin resource sharing options.
Initializer
import software.aws.pdk.type_safe_api.SerializedCorsOptions;
SerializedCorsOptions.builder()
.allowHeaders(java.util.List<java.lang.String>)
.allowMethods(java.util.List<java.lang.String>)
.allowOrigins(java.util.List<java.lang.String>)
.statusCode(java.lang.Number)
.build();
Properties
| Name | Type | Description |
|---|---|---|
allowHeaders |
java.util.List |
Headers to allow. |
allowMethods |
java.util.List |
HTTP methods to allow. |
allowOrigins |
java.util.List |
Origins to allow. |
statusCode |
java.lang.Number |
HTTP status code to be returned by preflight requests. |
allowHeadersRequired
public java.util.List<java.lang.String> getAllowHeaders();
- Type: java.util.List
Headers to allow.
allowMethodsRequired
public java.util.List<java.lang.String> getAllowMethods();
- Type: java.util.List
HTTP methods to allow.
allowOriginsRequired
public java.util.List<java.lang.String> getAllowOrigins();
- Type: java.util.List
Origins to allow.
statusCodeRequired
public java.lang.Number getStatusCode();
- Type: java.lang.Number
HTTP status code to be returned by preflight requests.
SmithyAsyncModelProjectOptions
Options for the Smithy WebSocket API model project.
Initializer
import software.aws.pdk.type_safe_api.SmithyAsyncModelProjectOptions;
SmithyAsyncModelProjectOptions.builder()
.name(java.lang.String)
// .commitGenerated(java.lang.Boolean)
// .gitIgnoreOptions(IgnoreFileOptions)
// .gitOptions(GitOptions)
// .logging(LoggerOptions)
// .outdir(java.lang.String)
// .parent(Project)
// .projenCommand(java.lang.String)
// .projenrcJson(java.lang.Boolean)
// .projenrcJsonOptions(ProjenrcJsonOptions)
// .renovatebot(java.lang.Boolean)
// .renovatebotOptions(RenovatebotOptions)
.smithyOptions(SmithyModelOptions)
// .handlerLanguages(java.util.List<Language>)
.parsedSpecFile(java.lang.String)
.asyncApiSpecFile(java.lang.String)
.build();
Properties
| Name | Type | Description |
|---|---|---|
name |
java.lang.String |
This is the name of your project. |
commitGenerated |
java.lang.Boolean |
Whether to commit the managed files by default. |
gitIgnoreOptions |
io.github.cdklabs.projen.IgnoreFileOptions |
Configuration options for .gitignore file. |
gitOptions |
io.github.cdklabs.projen.GitOptions |
Configuration options for git. |
logging |
io.github.cdklabs.projen.LoggerOptions |
Configure logging options such as verbosity. |
outdir |
java.lang.String |
The root directory of the project. |
parent |
io.github.cdklabs.projen.Project |
The parent project, if this project is part of a bigger project. |
projenCommand |
java.lang.String |
The shell command to use in order to run the projen CLI. |
projenrcJson |
java.lang.Boolean |
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation. |
projenrcJsonOptions |
io.github.cdklabs.projen.ProjenrcJsonOptions |
Options for .projenrc.json. |
renovatebot |
java.lang.Boolean |
Use renovatebot to handle dependency upgrades. |
renovatebotOptions |
io.github.cdklabs.projen.RenovatebotOptions |
Options for renovatebot. |
smithyOptions |
SmithyModelOptions |
Smithy engine options. |
handlerLanguages |
java.util.List<Language> |
The languages users have specified for handler projects (if any). |
parsedSpecFile |
java.lang.String |
Path of the parsed/bundled OpenAPI specification (relative to the project root). |
asyncApiSpecFile |
java.lang.String |
Path to the generated AsyncAPI specification (relative to the project root). |
nameRequired
public java.lang.String getName();
- Type: java.lang.String
- Default: $BASEDIR
This is the name of your project.
commitGeneratedOptional
public java.lang.Boolean getCommitGenerated();
- Type: java.lang.Boolean
- Default: true
Whether to commit the managed files by default.
gitIgnoreOptionsOptional
public IgnoreFileOptions getGitIgnoreOptions();
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptionsOptional
public GitOptions getGitOptions();
- Type: io.github.cdklabs.projen.GitOptions
Configuration options for git.
loggingOptional
public LoggerOptions getLogging();
- Type: io.github.cdklabs.projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
outdirOptional
public java.lang.String getOutdir();
- Type: java.lang.String
- Default: "."
The root directory of the project.
Relative to this directory, all files are synthesized.
If this project has a parent, this directory is relative to the parent directory and it cannot be the same as the parent or any of it's other subprojects.
parentOptional
public Project getParent();
- Type: io.github.cdklabs.projen.Project
The parent project, if this project is part of a bigger project.
projenCommandOptional
public java.lang.String getProjenCommand();
- Type: java.lang.String
- Default: "npx projen"
The shell command to use in order to run the projen CLI.
Can be used to customize in special environments.
projenrcJsonOptional
public java.lang.Boolean getProjenrcJson();
- Type: java.lang.Boolean
- Default: false
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation.
projenrcJsonOptionsOptional
public ProjenrcJsonOptions getProjenrcJsonOptions();
- Type: io.github.cdklabs.projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
renovatebotOptional
public java.lang.Boolean getRenovatebot();
- Type: java.lang.Boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptionsOptional
public RenovatebotOptions getRenovatebotOptions();
- Type: io.github.cdklabs.projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
smithyOptionsRequired
public SmithyModelOptions getSmithyOptions();
- Type: SmithyModelOptions
Smithy engine options.
handlerLanguagesOptional
public java.util.List<Language> getHandlerLanguages();
- Type: java.util.List<Language>
The languages users have specified for handler projects (if any).
parsedSpecFileRequired
public java.lang.String getParsedSpecFile();
- Type: java.lang.String
Path of the parsed/bundled OpenAPI specification (relative to the project root).
asyncApiSpecFileRequired
public java.lang.String getAsyncApiSpecFile();
- Type: java.lang.String
Path to the generated AsyncAPI specification (relative to the project root).
SmithyBaseProjectOptions
Options for a Smithy project.
Initializer
import software.aws.pdk.type_safe_api.SmithyBaseProjectOptions;
SmithyBaseProjectOptions.builder()
.name(java.lang.String)
// .commitGenerated(java.lang.Boolean)
// .gitIgnoreOptions(IgnoreFileOptions)
// .gitOptions(GitOptions)
// .logging(LoggerOptions)
// .outdir(java.lang.String)
// .parent(Project)
// .projenCommand(java.lang.String)
// .projenrcJson(java.lang.Boolean)
// .projenrcJsonOptions(ProjenrcJsonOptions)
// .renovatebot(java.lang.Boolean)
// .renovatebotOptions(RenovatebotOptions)
.build();
Properties
| Name | Type | Description |
|---|---|---|
name |
java.lang.String |
This is the name of your project. |
commitGenerated |
java.lang.Boolean |
Whether to commit the managed files by default. |
gitIgnoreOptions |
io.github.cdklabs.projen.IgnoreFileOptions |
Configuration options for .gitignore file. |
gitOptions |
io.github.cdklabs.projen.GitOptions |
Configuration options for git. |
logging |
io.github.cdklabs.projen.LoggerOptions |
Configure logging options such as verbosity. |
outdir |
java.lang.String |
The root directory of the project. |
parent |
io.github.cdklabs.projen.Project |
The parent project, if this project is part of a bigger project. |
projenCommand |
java.lang.String |
The shell command to use in order to run the projen CLI. |
projenrcJson |
java.lang.Boolean |
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation. |
projenrcJsonOptions |
io.github.cdklabs.projen.ProjenrcJsonOptions |
Options for .projenrc.json. |
renovatebot |
java.lang.Boolean |
Use renovatebot to handle dependency upgrades. |
renovatebotOptions |
io.github.cdklabs.projen.RenovatebotOptions |
Options for renovatebot. |
nameRequired
public java.lang.String getName();
- Type: java.lang.String
- Default: $BASEDIR
This is the name of your project.
commitGeneratedOptional
public java.lang.Boolean getCommitGenerated();
- Type: java.lang.Boolean
- Default: true
Whether to commit the managed files by default.
gitIgnoreOptionsOptional
public IgnoreFileOptions getGitIgnoreOptions();
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptionsOptional
public GitOptions getGitOptions();
- Type: io.github.cdklabs.projen.GitOptions
Configuration options for git.
loggingOptional
public LoggerOptions getLogging();
- Type: io.github.cdklabs.projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
outdirOptional
public java.lang.String getOutdir();
- Type: java.lang.String
- Default: "."
The root directory of the project.
Relative to this directory, all files are synthesized.
If this project has a parent, this directory is relative to the parent directory and it cannot be the same as the parent or any of it's other subprojects.
parentOptional
public Project getParent();
- Type: io.github.cdklabs.projen.Project
The parent project, if this project is part of a bigger project.
projenCommandOptional
public java.lang.String getProjenCommand();
- Type: java.lang.String
- Default: "npx projen"
The shell command to use in order to run the projen CLI.
Can be used to customize in special environments.
projenrcJsonOptional
public java.lang.Boolean getProjenrcJson();
- Type: java.lang.Boolean
- Default: false
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation.
projenrcJsonOptionsOptional
public ProjenrcJsonOptions getProjenrcJsonOptions();
- Type: io.github.cdklabs.projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
renovatebotOptional
public java.lang.Boolean getRenovatebot();
- Type: java.lang.Boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptionsOptional
public RenovatebotOptions getRenovatebotOptions();
- Type: io.github.cdklabs.projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
SmithyBuildOptions
Options for the smithy build files.
Initializer
import software.aws.pdk.type_safe_api.SmithyBuildOptions;
SmithyBuildOptions.builder()
// .imports(java.util.List<java.lang.String>)
// .plugins(java.util.Map<java.lang.String, java.util.Map<java.lang.String, java.lang.Object>>)
// .additionalSources(java.util.List<java.lang.String>)
// .ignoreMissingPlugins(java.lang.Boolean)
// .maven(SmithyMavenConfiguration)
// .projections(java.util.Map<java.lang.String, SmithyProjection>)
.build();
Properties
| Name | Type | Description |
|---|---|---|
imports |
java.util.List |
List of imports. |
plugins |
java.util.Map |
Plugins keyed by plugin id. |
additionalSources |
java.util.List |
Paths to any additional model files or directories to be used as sources for the smithy build. |
ignoreMissingPlugins |
java.lang.Boolean |
If a plugin can't be found, Smithy will by default fail the build. |
maven |
SmithyMavenConfiguration |
Maven configuration for the Smithy build project, used to specify dependencies and repositories in the build.gradle and smithy-build.json files. |
projections |
java.util.Map |
Map of projections name to projection configurations https://awslabs.github.io/smithy/2.0/guides/building-models/build-config.html#projections. |
importsOptional
public java.util.List<java.lang.String> getImports();
- Type: java.util.List
List of imports.
pluginsOptional
public java.util.Map<java.lang.String, java.util.Map<java.lang.String, java.lang.Object>> getPlugins();
- Type: java.util.Map
>
Plugins keyed by plugin id.
additionalSourcesOptional
public java.util.List<java.lang.String> getAdditionalSources();
- Type: java.util.List
Paths to any additional model files or directories to be used as sources for the smithy build.
The src/main/smithy directory is always included. Paths must be relative to the model project directory. Absolute paths will be resolved as relative paths.
ignoreMissingPluginsOptional
public java.lang.Boolean getIgnoreMissingPlugins();
- Type: java.lang.Boolean
- Default: no ignoreMissingPlugins set in the smithy-build.json file
If a plugin can't be found, Smithy will by default fail the build.
This setting can be set to true to allow the build to progress even if a plugin can't be found on the classpath.
mavenOptional
public SmithyMavenConfiguration getMaven();
- Type: SmithyMavenConfiguration
- Default: the default configuration required for Smithy to OpenAPI conversion
Maven configuration for the Smithy build project, used to specify dependencies and repositories in the build.gradle and smithy-build.json files.
projectionsOptional
public java.util.Map<java.lang.String, SmithyProjection> getProjections();
- Type: java.util.Map
SmithyProjection\> - Default: no projections
Map of projections name to projection configurations https://awslabs.github.io/smithy/2.0/guides/building-models/build-config.html#projections.
SmithyCommon
Properties common to smithy plugins and the root smithy build.
Initializer
import software.aws.pdk.type_safe_api.SmithyCommon;
SmithyCommon.builder()
// .imports(java.util.List<java.lang.String>)
// .plugins(java.util.Map<java.lang.String, java.util.Map<java.lang.String, java.lang.Object>>)
.build();
Properties
| Name | Type | Description |
|---|---|---|
imports |
java.util.List |
List of imports. |
plugins |
java.util.Map |
Plugins keyed by plugin id. |
importsOptional
public java.util.List<java.lang.String> getImports();
- Type: java.util.List
List of imports.
pluginsOptional
public java.util.Map<java.lang.String, java.util.Map<java.lang.String, java.lang.Object>> getPlugins();
- Type: java.util.Map
>
Plugins keyed by plugin id.
SmithyMavenConfiguration
Configuration for smithy maven dependencies.
Initializer
import software.aws.pdk.type_safe_api.SmithyMavenConfiguration;
SmithyMavenConfiguration.builder()
// .dependencies(java.util.List<java.lang.String>)
// .repositoryUrls(java.util.List<java.lang.String>)
.build();
Properties
| Name | Type | Description |
|---|---|---|
dependencies |
java.util.List |
The dependencies used in the build.gradle and smithy-build.json files eg. software.amazon.smithy:smithy-validation-model:1.28.0 The following required dependencies are always added: - software.amazon.smithy:smithy-cli:1.28.0 - software.amazon.smithy:smithy-model:1.28.0 - software.amazon.smithy:smithy-openapi:1.28.0 - software.amazon.smithy:smithy-aws-traits:1.28.0 You can however override the version of these dependencies if required. |
repositoryUrls |
java.util.List |
The repository urls used in the build.gradle and smithy-build.json files. |
dependenciesOptional
public java.util.List<java.lang.String> getDependencies();
- Type: java.util.List
The dependencies used in the build.gradle and smithy-build.json files eg. software.amazon.smithy:smithy-validation-model:1.28.0 The following required dependencies are always added: - software.amazon.smithy:smithy-cli:1.28.0 - software.amazon.smithy:smithy-model:1.28.0 - software.amazon.smithy:smithy-openapi:1.28.0 - software.amazon.smithy:smithy-aws-traits:1.28.0 You can however override the version of these dependencies if required.
repositoryUrlsOptional
public java.util.List<java.lang.String> getRepositoryUrls();
- Type: java.util.List
- Default: maven central and maven local
The repository urls used in the build.gradle and smithy-build.json files.
SmithyModelOptions
Options for a Smithy model.
Initializer
import software.aws.pdk.type_safe_api.SmithyModelOptions;
SmithyModelOptions.builder()
// .ignoreGradleWrapper(java.lang.Boolean)
// .ignoreSmithyBuildOutput(java.lang.Boolean)
// .smithyBuildOptions(SmithyBuildOptions)
.serviceName(SmithyServiceName)
.build();
Properties
| Name | Type | Description |
|---|---|---|
ignoreGradleWrapper |
java.lang.Boolean |
Set to false if you would like to check in your gradle wrapper. |
ignoreSmithyBuildOutput |
java.lang.Boolean |
Set to false if you would like to check in your smithy build output or have more fine-grained control over what is checked in, eg if you add other projections to the smithy-build.json file. |
smithyBuildOptions |
SmithyBuildOptions |
Smithy build options. |
serviceName |
SmithyServiceName |
Smithy service name. |
ignoreGradleWrapperOptional
public java.lang.Boolean getIgnoreGradleWrapper();
- Type: java.lang.Boolean
- Default: true
Set to false if you would like to check in your gradle wrapper.
Do so if you would like to use a different version of gradle to the one provided by default
ignoreSmithyBuildOutputOptional
public java.lang.Boolean getIgnoreSmithyBuildOutput();
- Type: java.lang.Boolean
- Default: true
Set to false if you would like to check in your smithy build output or have more fine-grained control over what is checked in, eg if you add other projections to the smithy-build.json file.
smithyBuildOptionsOptional
public SmithyBuildOptions getSmithyBuildOptions();
- Type: SmithyBuildOptions
Smithy build options.
serviceNameRequired
public SmithyServiceName getServiceName();
- Type: SmithyServiceName
Smithy service name.
SmithyModelProjectOptions
Options for the Smithy REST API model.
Initializer
import software.aws.pdk.type_safe_api.SmithyModelProjectOptions;
SmithyModelProjectOptions.builder()
.name(java.lang.String)
// .commitGenerated(java.lang.Boolean)
// .gitIgnoreOptions(IgnoreFileOptions)
// .gitOptions(GitOptions)
// .logging(LoggerOptions)
// .outdir(java.lang.String)
// .parent(Project)
// .projenCommand(java.lang.String)
// .projenrcJson(java.lang.Boolean)
// .projenrcJsonOptions(ProjenrcJsonOptions)
// .renovatebot(java.lang.Boolean)
// .renovatebotOptions(RenovatebotOptions)
.smithyOptions(SmithyModelOptions)
// .handlerLanguages(java.util.List<Language>)
.parsedSpecFile(java.lang.String)
.build();
Properties
| Name | Type | Description |
|---|---|---|
name |
java.lang.String |
This is the name of your project. |
commitGenerated |
java.lang.Boolean |
Whether to commit the managed files by default. |
gitIgnoreOptions |
io.github.cdklabs.projen.IgnoreFileOptions |
Configuration options for .gitignore file. |
gitOptions |
io.github.cdklabs.projen.GitOptions |
Configuration options for git. |
logging |
io.github.cdklabs.projen.LoggerOptions |
Configure logging options such as verbosity. |
outdir |
java.lang.String |
The root directory of the project. |
parent |
io.github.cdklabs.projen.Project |
The parent project, if this project is part of a bigger project. |
projenCommand |
java.lang.String |
The shell command to use in order to run the projen CLI. |
projenrcJson |
java.lang.Boolean |
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation. |
projenrcJsonOptions |
io.github.cdklabs.projen.ProjenrcJsonOptions |
Options for .projenrc.json. |
renovatebot |
java.lang.Boolean |
Use renovatebot to handle dependency upgrades. |
renovatebotOptions |
io.github.cdklabs.projen.RenovatebotOptions |
Options for renovatebot. |
smithyOptions |
SmithyModelOptions |
Smithy engine options. |
handlerLanguages |
java.util.List<Language> |
The languages users have specified for handler projects (if any). |
parsedSpecFile |
java.lang.String |
Path of the parsed/bundled OpenAPI specification (relative to the project root). |
nameRequired
public java.lang.String getName();
- Type: java.lang.String
- Default: $BASEDIR
This is the name of your project.
commitGeneratedOptional
public java.lang.Boolean getCommitGenerated();
- Type: java.lang.Boolean
- Default: true
Whether to commit the managed files by default.
gitIgnoreOptionsOptional
public IgnoreFileOptions getGitIgnoreOptions();
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptionsOptional
public GitOptions getGitOptions();
- Type: io.github.cdklabs.projen.GitOptions
Configuration options for git.
loggingOptional
public LoggerOptions getLogging();
- Type: io.github.cdklabs.projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
outdirOptional
public java.lang.String getOutdir();
- Type: java.lang.String
- Default: "."
The root directory of the project.
Relative to this directory, all files are synthesized.
If this project has a parent, this directory is relative to the parent directory and it cannot be the same as the parent or any of it's other subprojects.
parentOptional
public Project getParent();
- Type: io.github.cdklabs.projen.Project
The parent project, if this project is part of a bigger project.
projenCommandOptional
public java.lang.String getProjenCommand();
- Type: java.lang.String
- Default: "npx projen"
The shell command to use in order to run the projen CLI.
Can be used to customize in special environments.
projenrcJsonOptional
public java.lang.Boolean getProjenrcJson();
- Type: java.lang.Boolean
- Default: false
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation.
projenrcJsonOptionsOptional
public ProjenrcJsonOptions getProjenrcJsonOptions();
- Type: io.github.cdklabs.projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
renovatebotOptional
public java.lang.Boolean getRenovatebot();
- Type: java.lang.Boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptionsOptional
public RenovatebotOptions getRenovatebotOptions();
- Type: io.github.cdklabs.projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
smithyOptionsRequired
public SmithyModelOptions getSmithyOptions();
- Type: SmithyModelOptions
Smithy engine options.
handlerLanguagesOptional
public java.util.List<Language> getHandlerLanguages();
- Type: java.util.List<Language>
The languages users have specified for handler projects (if any).
parsedSpecFileRequired
public java.lang.String getParsedSpecFile();
- Type: java.lang.String
Path of the parsed/bundled OpenAPI specification (relative to the project root).
SmithyProjectDefinitionOptions
Options for a smithy project definition.
Initializer
import software.aws.pdk.type_safe_api.SmithyProjectDefinitionOptions;
SmithyProjectDefinitionOptions.builder()
// .ignoreGradleWrapper(java.lang.Boolean)
// .ignoreSmithyBuildOutput(java.lang.Boolean)
// .smithyBuildOptions(SmithyBuildOptions)
.build();
Properties
| Name | Type | Description |
|---|---|---|
ignoreGradleWrapper |
java.lang.Boolean |
Set to false if you would like to check in your gradle wrapper. |
ignoreSmithyBuildOutput |
java.lang.Boolean |
Set to false if you would like to check in your smithy build output or have more fine-grained control over what is checked in, eg if you add other projections to the smithy-build.json file. |
smithyBuildOptions |
SmithyBuildOptions |
Smithy build options. |
ignoreGradleWrapperOptional
public java.lang.Boolean getIgnoreGradleWrapper();
- Type: java.lang.Boolean
- Default: true
Set to false if you would like to check in your gradle wrapper.
Do so if you would like to use a different version of gradle to the one provided by default
ignoreSmithyBuildOutputOptional
public java.lang.Boolean getIgnoreSmithyBuildOutput();
- Type: java.lang.Boolean
- Default: true
Set to false if you would like to check in your smithy build output or have more fine-grained control over what is checked in, eg if you add other projections to the smithy-build.json file.
smithyBuildOptionsOptional
public SmithyBuildOptions getSmithyBuildOptions();
- Type: SmithyBuildOptions
Smithy build options.
SmithyProjection
A smithy build projection.
Initializer
import software.aws.pdk.type_safe_api.SmithyProjection;
SmithyProjection.builder()
// .imports(java.util.List<java.lang.String>)
// .plugins(java.util.Map<java.lang.String, java.util.Map<java.lang.String, java.lang.Object>>)
// .abstract(java.lang.Boolean)
// .transforms(java.util.List<SmithyTransform>)
.build();
Properties
| Name | Type | Description |
|---|---|---|
imports |
java.util.List |
List of imports. |
plugins |
java.util.Map |
Plugins keyed by plugin id. |
abstract |
java.lang.Boolean |
Whether or not the projection is abstract. |
transforms |
java.util.List<SmithyTransform> |
Transforms to apply to the projection. |
importsOptional
public java.util.List<java.lang.String> getImports();
- Type: java.util.List
List of imports.
pluginsOptional
public java.util.Map<java.lang.String, java.util.Map<java.lang.String, java.lang.Object>> getPlugins();
- Type: java.util.Map
>
Plugins keyed by plugin id.
abstractOptional
public java.lang.Boolean getAbstract();
- Type: java.lang.Boolean
Whether or not the projection is abstract.
transformsOptional
public java.util.List<SmithyTransform> getTransforms();
- Type: java.util.List<SmithyTransform>
Transforms to apply to the projection.
SmithyServiceName
Represents a fully qualified name of a Smithy service.
https://awslabs.github.io/smithy/2.0/spec/service-types.html
Initializer
import software.aws.pdk.type_safe_api.SmithyServiceName;
SmithyServiceName.builder()
.namespace(java.lang.String)
.serviceName(java.lang.String)
.build();
Properties
| Name | Type | Description |
|---|---|---|
namespace |
java.lang.String |
The service namespace. |
serviceName |
java.lang.String |
The service name. |
namespaceRequired
public java.lang.String getNamespace();
- Type: java.lang.String
The service namespace.
Nested namespaces are separated by '.', for example com.company
https://awslabs.github.io/smithy/2.0/spec/model.html#shape-id
serviceNameRequired
public java.lang.String getServiceName();
- Type: java.lang.String
The service name.
Should be PascalCase, for example HelloService
https://awslabs.github.io/smithy/2.0/spec/model.html#shape-id
SmithyServiceProjectDefinitionOptions
Options for a smithy service project definition.
Initializer
import software.aws.pdk.type_safe_api.SmithyServiceProjectDefinitionOptions;
SmithyServiceProjectDefinitionOptions.builder()
.smithyOptions(SmithyModelOptions)
// .handlerLanguages(java.util.List<Language>)
.build();
Properties
| Name | Type | Description |
|---|---|---|
smithyOptions |
SmithyModelOptions |
Smithy engine options. |
handlerLanguages |
java.util.List<Language> |
The languages users have specified for handler projects (if any). |
smithyOptionsRequired
public SmithyModelOptions getSmithyOptions();
- Type: SmithyModelOptions
Smithy engine options.
handlerLanguagesOptional
public java.util.List<Language> getHandlerLanguages();
- Type: java.util.List<Language>
The languages users have specified for handler projects (if any).
SmithyShapeLibraryProjectOptions
Options for the Smithy shape library.
Initializer
import software.aws.pdk.type_safe_api.SmithyShapeLibraryProjectOptions;
SmithyShapeLibraryProjectOptions.builder()
.name(java.lang.String)
// .commitGenerated(java.lang.Boolean)
// .gitIgnoreOptions(IgnoreFileOptions)
// .gitOptions(GitOptions)
// .logging(LoggerOptions)
// .outdir(java.lang.String)
// .parent(Project)
// .projenCommand(java.lang.String)
// .projenrcJson(java.lang.Boolean)
// .projenrcJsonOptions(ProjenrcJsonOptions)
// .renovatebot(java.lang.Boolean)
// .renovatebotOptions(RenovatebotOptions)
// .ignoreGradleWrapper(java.lang.Boolean)
// .ignoreSmithyBuildOutput(java.lang.Boolean)
// .smithyBuildOptions(SmithyBuildOptions)
.build();
Properties
| Name | Type | Description |
|---|---|---|
name |
java.lang.String |
This is the name of your project. |
commitGenerated |
java.lang.Boolean |
Whether to commit the managed files by default. |
gitIgnoreOptions |
io.github.cdklabs.projen.IgnoreFileOptions |
Configuration options for .gitignore file. |
gitOptions |
io.github.cdklabs.projen.GitOptions |
Configuration options for git. |
logging |
io.github.cdklabs.projen.LoggerOptions |
Configure logging options such as verbosity. |
outdir |
java.lang.String |
The root directory of the project. |
parent |
io.github.cdklabs.projen.Project |
The parent project, if this project is part of a bigger project. |
projenCommand |
java.lang.String |
The shell command to use in order to run the projen CLI. |
projenrcJson |
java.lang.Boolean |
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation. |
projenrcJsonOptions |
io.github.cdklabs.projen.ProjenrcJsonOptions |
Options for .projenrc.json. |
renovatebot |
java.lang.Boolean |
Use renovatebot to handle dependency upgrades. |
renovatebotOptions |
io.github.cdklabs.projen.RenovatebotOptions |
Options for renovatebot. |
ignoreGradleWrapper |
java.lang.Boolean |
Set to false if you would like to check in your gradle wrapper. |
ignoreSmithyBuildOutput |
java.lang.Boolean |
Set to false if you would like to check in your smithy build output or have more fine-grained control over what is checked in, eg if you add other projections to the smithy-build.json file. |
smithyBuildOptions |
SmithyBuildOptions |
Smithy build options. |
nameRequired
public java.lang.String getName();
- Type: java.lang.String
- Default: $BASEDIR
This is the name of your project.
commitGeneratedOptional
public java.lang.Boolean getCommitGenerated();
- Type: java.lang.Boolean
- Default: true
Whether to commit the managed files by default.
gitIgnoreOptionsOptional
public IgnoreFileOptions getGitIgnoreOptions();
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptionsOptional
public GitOptions getGitOptions();
- Type: io.github.cdklabs.projen.GitOptions
Configuration options for git.
loggingOptional
public LoggerOptions getLogging();
- Type: io.github.cdklabs.projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
outdirOptional
public java.lang.String getOutdir();
- Type: java.lang.String
- Default: "."
The root directory of the project.
Relative to this directory, all files are synthesized.
If this project has a parent, this directory is relative to the parent directory and it cannot be the same as the parent or any of it's other subprojects.
parentOptional
public Project getParent();
- Type: io.github.cdklabs.projen.Project
The parent project, if this project is part of a bigger project.
projenCommandOptional
public java.lang.String getProjenCommand();
- Type: java.lang.String
- Default: "npx projen"
The shell command to use in order to run the projen CLI.
Can be used to customize in special environments.
projenrcJsonOptional
public java.lang.Boolean getProjenrcJson();
- Type: java.lang.Boolean
- Default: false
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation.
projenrcJsonOptionsOptional
public ProjenrcJsonOptions getProjenrcJsonOptions();
- Type: io.github.cdklabs.projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
renovatebotOptional
public java.lang.Boolean getRenovatebot();
- Type: java.lang.Boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptionsOptional
public RenovatebotOptions getRenovatebotOptions();
- Type: io.github.cdklabs.projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
ignoreGradleWrapperOptional
public java.lang.Boolean getIgnoreGradleWrapper();
- Type: java.lang.Boolean
- Default: true
Set to false if you would like to check in your gradle wrapper.
Do so if you would like to use a different version of gradle to the one provided by default
ignoreSmithyBuildOutputOptional
public java.lang.Boolean getIgnoreSmithyBuildOutput();
- Type: java.lang.Boolean
- Default: true
Set to false if you would like to check in your smithy build output or have more fine-grained control over what is checked in, eg if you add other projections to the smithy-build.json file.
smithyBuildOptionsOptional
public SmithyBuildOptions getSmithyBuildOptions();
- Type: SmithyBuildOptions
Smithy build options.
SmithyTransform
A smithy build transform.
Initializer
import software.aws.pdk.type_safe_api.SmithyTransform;
SmithyTransform.builder()
.args(java.util.Map<java.lang.String, java.lang.Object>)
.name(java.lang.String)
.build();
Properties
| Name | Type | Description |
|---|---|---|
args |
java.util.Map |
Arguments for the transform. |
name |
java.lang.String |
Name of the transform. |
argsRequired
public java.util.Map<java.lang.String, java.lang.Object> getArgs();
- Type: java.util.Map
Arguments for the transform.
nameRequired
public java.lang.String getName();
- Type: java.lang.String
Name of the transform.
SnapStartFunctionProps
Options for the SnapStartFunction construct.
Initializer
import software.aws.pdk.type_safe_api.SnapStartFunctionProps;
SnapStartFunctionProps.builder()
// .maxEventAge(Duration)
// .onFailure(IDestination)
// .onSuccess(IDestination)
// .retryAttempts(java.lang.Number)
// .adotInstrumentation(AdotInstrumentationConfig)
// .allowAllIpv6Outbound(java.lang.Boolean)
// .allowAllOutbound(java.lang.Boolean)
// .allowPublicSubnet(java.lang.Boolean)
// .applicationLogLevel(java.lang.String)
// .applicationLogLevelV2(ApplicationLogLevel)
// .architecture(Architecture)
// .codeSigningConfig(ICodeSigningConfig)
// .currentVersionOptions(VersionOptions)
// .deadLetterQueue(IQueue)
// .deadLetterQueueEnabled(java.lang.Boolean)
// .deadLetterTopic(ITopic)
// .description(java.lang.String)
// .environment(java.util.Map<java.lang.String, java.lang.String>)
// .environmentEncryption(IKey)
// .ephemeralStorageSize(Size)
// .events(java.util.List<IEventSource>)
// .filesystem(FileSystem)
// .functionName(java.lang.String)
// .initialPolicy(java.util.List<PolicyStatement>)
// .insightsVersion(LambdaInsightsVersion)
// .ipv6AllowedForDualStack(java.lang.Boolean)
// .layers(java.util.List<ILayerVersion>)
// .logFormat(java.lang.String)
// .loggingFormat(LoggingFormat)
// .logGroup(ILogGroup)
// .logRetention(RetentionDays)
// .logRetentionRetryOptions(LogRetentionRetryOptions)
// .logRetentionRole(IRole)
// .memorySize(java.lang.Number)
// .paramsAndSecrets(ParamsAndSecretsLayerVersion)
// .profiling(java.lang.Boolean)
// .profilingGroup(IProfilingGroup)
// .recursiveLoop(RecursiveLoop)
// .reservedConcurrentExecutions(java.lang.Number)
// .role(IRole)
// .runtimeManagementMode(RuntimeManagementMode)
// .securityGroups(java.util.List<ISecurityGroup>)
// .snapStart(SnapStartConf)
// .systemLogLevel(java.lang.String)
// .systemLogLevelV2(SystemLogLevel)
// .timeout(Duration)
// .tracing(Tracing)
// .vpc(IVpc)
// .vpcSubnets(SubnetSelection)
.code(Code)
.handler(java.lang.String)
.runtime(Runtime)
// .disableSnapStart(java.lang.Boolean)
.build();
Properties
| Name | Type | Description |
|---|---|---|
maxEventAge |
software.amazon.awscdk.Duration |
The maximum age of a request that Lambda sends to a function for processing. |
onFailure |
software.amazon.awscdk.services.lambda.IDestination |
The destination for failed invocations. |
onSuccess |
software.amazon.awscdk.services.lambda.IDestination |
The destination for successful invocations. |
retryAttempts |
java.lang.Number |
The maximum number of times to retry when the function returns an error. |
adotInstrumentation |
software.amazon.awscdk.services.lambda.AdotInstrumentationConfig |
Specify the configuration of AWS Distro for OpenTelemetry (ADOT) instrumentation. |
allowAllIpv6Outbound |
java.lang.Boolean |
Whether to allow the Lambda to send all ipv6 network traffic. |
allowAllOutbound |
java.lang.Boolean |
Whether to allow the Lambda to send all network traffic (except ipv6). |
allowPublicSubnet |
java.lang.Boolean |
Lambda Functions in a public subnet can NOT access the internet. |
applicationLogLevel |
java.lang.String |
Sets the application log level for the function. |
applicationLogLevelV2 |
software.amazon.awscdk.services.lambda.ApplicationLogLevel |
Sets the application log level for the function. |
architecture |
software.amazon.awscdk.services.lambda.Architecture |
The system architectures compatible with this lambda function. |
codeSigningConfig |
software.amazon.awscdk.services.lambda.ICodeSigningConfig |
Code signing config associated with this function. |
currentVersionOptions |
software.amazon.awscdk.services.lambda.VersionOptions |
Options for the lambda.Version resource automatically created by the fn.currentVersion method. |
deadLetterQueue |
software.amazon.awscdk.services.sqs.IQueue |
The SQS queue to use if DLQ is enabled. |
deadLetterQueueEnabled |
java.lang.Boolean |
Enabled DLQ. |
deadLetterTopic |
software.amazon.awscdk.services.sns.ITopic |
The SNS topic to use as a DLQ. |
description |
java.lang.String |
A description of the function. |
environment |
java.util.Map |
Key-value pairs that Lambda caches and makes available for your Lambda functions. |
environmentEncryption |
software.amazon.awscdk.services.kms.IKey |
The AWS KMS key that's used to encrypt your function's environment variables. |
ephemeralStorageSize |
software.amazon.awscdk.Size |
The size of the function’s /tmp directory in MiB. |
events |
java.util.List |
Event sources for this function. |
filesystem |
software.amazon.awscdk.services.lambda.FileSystem |
The filesystem configuration for the lambda function. |
functionName |
java.lang.String |
A name for the function. |
initialPolicy |
java.util.List |
Initial policy statements to add to the created Lambda Role. |
insightsVersion |
software.amazon.awscdk.services.lambda.LambdaInsightsVersion |
Specify the version of CloudWatch Lambda insights to use for monitoring. |
ipv6AllowedForDualStack |
java.lang.Boolean |
Allows outbound IPv6 traffic on VPC functions that are connected to dual-stack subnets. |
layers |
java.util.List |
A list of layers to add to the function's execution environment. |
logFormat |
java.lang.String |
Sets the logFormat for the function. |
loggingFormat |
software.amazon.awscdk.services.lambda.LoggingFormat |
Sets the loggingFormat for the function. |
logGroup |
software.amazon.awscdk.services.logs.ILogGroup |
The log group the function sends logs to. |
logRetention |
software.amazon.awscdk.services.logs.RetentionDays |
The number of days log events are kept in CloudWatch Logs. |
logRetentionRetryOptions |
software.amazon.awscdk.services.lambda.LogRetentionRetryOptions |
When log retention is specified, a custom resource attempts to create the CloudWatch log group. |
logRetentionRole |
software.amazon.awscdk.services.iam.IRole |
The IAM role for the Lambda function associated with the custom resource that sets the retention policy. |
memorySize |
java.lang.Number |
The amount of memory, in MB, that is allocated to your Lambda function. |
paramsAndSecrets |
software.amazon.awscdk.services.lambda.ParamsAndSecretsLayerVersion |
Specify the configuration of Parameters and Secrets Extension. |
profiling |
java.lang.Boolean |
Enable profiling. |
profilingGroup |
software.amazon.awscdk.services.codeguruprofiler.IProfilingGroup |
Profiling Group. |
recursiveLoop |
software.amazon.awscdk.services.lambda.RecursiveLoop |
Sets the Recursive Loop Protection for Lambda Function. |
reservedConcurrentExecutions |
java.lang.Number |
The maximum of concurrent executions you want to reserve for the function. |
role |
software.amazon.awscdk.services.iam.IRole |
Lambda execution role. |
runtimeManagementMode |
software.amazon.awscdk.services.lambda.RuntimeManagementMode |
Sets the runtime management configuration for a function's version. |
securityGroups |
java.util.List |
The list of security groups to associate with the Lambda's network interfaces. |
snapStart |
software.amazon.awscdk.services.lambda.SnapStartConf |
Enable SnapStart for Lambda Function. |
systemLogLevel |
java.lang.String |
Sets the system log level for the function. |
systemLogLevelV2 |
software.amazon.awscdk.services.lambda.SystemLogLevel |
Sets the system log level for the function. |
timeout |
software.amazon.awscdk.Duration |
The function execution time (in seconds) after which Lambda terminates the function. |
tracing |
software.amazon.awscdk.services.lambda.Tracing |
Enable AWS X-Ray Tracing for Lambda Function. |
vpc |
software.amazon.awscdk.services.ec2.IVpc |
VPC network to place Lambda network interfaces. |
vpcSubnets |
software.amazon.awscdk.services.ec2.SubnetSelection |
Where to place the network interfaces within the VPC. |
code |
software.amazon.awscdk.services.lambda.Code |
The source code of your Lambda function. |
handler |
java.lang.String |
The name of the method within your code that Lambda calls to execute your function. |
runtime |
software.amazon.awscdk.services.lambda.Runtime |
The runtime environment for the Lambda function that you are uploading. |
disableSnapStart |
java.lang.Boolean |
When true, disable snap start. |
maxEventAgeOptional
public Duration getMaxEventAge();
- Type: software.amazon.awscdk.Duration
- Default: Duration.hours(6)
The maximum age of a request that Lambda sends to a function for processing.
Minimum: 60 seconds Maximum: 6 hours
onFailureOptional
public IDestination getOnFailure();
- Type: software.amazon.awscdk.services.lambda.IDestination
- Default: no destination
The destination for failed invocations.
onSuccessOptional
public IDestination getOnSuccess();
- Type: software.amazon.awscdk.services.lambda.IDestination
- Default: no destination
The destination for successful invocations.
retryAttemptsOptional
public java.lang.Number getRetryAttempts();
- Type: java.lang.Number
- Default: 2
The maximum number of times to retry when the function returns an error.
Minimum: 0 Maximum: 2
adotInstrumentationOptional
public AdotInstrumentationConfig getAdotInstrumentation();
- Type: software.amazon.awscdk.services.lambda.AdotInstrumentationConfig
- Default: No ADOT instrumentation
Specify the configuration of AWS Distro for OpenTelemetry (ADOT) instrumentation.
allowAllIpv6OutboundOptional
public java.lang.Boolean getAllowAllIpv6Outbound();
- Type: java.lang.Boolean
- Default: false
Whether to allow the Lambda to send all ipv6 network traffic.
If set to true, there will only be a single egress rule which allows all outbound ipv6 traffic. If set to false, you must individually add traffic rules to allow the Lambda to connect to network targets using ipv6.
Do not specify this property if the securityGroups or securityGroup property is set.
Instead, configure allowAllIpv6Outbound directly on the security group.
allowAllOutboundOptional
public java.lang.Boolean getAllowAllOutbound();
- Type: java.lang.Boolean
- Default: true
Whether to allow the Lambda to send all network traffic (except ipv6).
If set to false, you must individually add traffic rules to allow the Lambda to connect to network targets.
Do not specify this property if the securityGroups or securityGroup property is set.
Instead, configure allowAllOutbound directly on the security group.
allowPublicSubnetOptional
public java.lang.Boolean getAllowPublicSubnet();
- Type: java.lang.Boolean
- Default: false
Lambda Functions in a public subnet can NOT access the internet.
Use this property to acknowledge this limitation and still place the function in a public subnet.
~~applicationLogLevel~~Optional
- Deprecated: Use
applicationLogLevelV2as a property instead.
public java.lang.String getApplicationLogLevel();
- Type: java.lang.String
- Default: "INFO"
Sets the application log level for the function.
applicationLogLevelV2Optional
public ApplicationLogLevel getApplicationLogLevelV2();
- Type: software.amazon.awscdk.services.lambda.ApplicationLogLevel
- Default: ApplicationLogLevel.INFO
Sets the application log level for the function.
architectureOptional
public Architecture getArchitecture();
- Type: software.amazon.awscdk.services.lambda.Architecture
- Default: Architecture.X86_64
The system architectures compatible with this lambda function.
codeSigningConfigOptional
public ICodeSigningConfig getCodeSigningConfig();
- Type: software.amazon.awscdk.services.lambda.ICodeSigningConfig
- Default: Not Sign the Code
Code signing config associated with this function.
currentVersionOptionsOptional
public VersionOptions getCurrentVersionOptions();
- Type: software.amazon.awscdk.services.lambda.VersionOptions
- Default: default options as described in
VersionOptions
Options for the lambda.Version resource automatically created by the fn.currentVersion method.
deadLetterQueueOptional
public IQueue getDeadLetterQueue();
- Type: software.amazon.awscdk.services.sqs.IQueue
- Default: SQS queue with 14 day retention period if
deadLetterQueueEnabledistrue
The SQS queue to use if DLQ is enabled.
If SNS topic is desired, specify deadLetterTopic property instead.
deadLetterQueueEnabledOptional
public java.lang.Boolean getDeadLetterQueueEnabled();
- Type: java.lang.Boolean
- Default: false unless
deadLetterQueueis set, which implies DLQ is enabled.
Enabled DLQ.
If deadLetterQueue is undefined,
an SQS queue with default options will be defined for your Function.
deadLetterTopicOptional
public ITopic getDeadLetterTopic();
- Type: software.amazon.awscdk.services.sns.ITopic
- Default: no SNS topic
The SNS topic to use as a DLQ.
Note that if deadLetterQueueEnabled is set to true, an SQS queue will be created
rather than an SNS topic. Using an SNS topic as a DLQ requires this property to be set explicitly.
descriptionOptional
public java.lang.String getDescription();
- Type: java.lang.String
- Default: No description.
A description of the function.
environmentOptional
public java.util.Map<java.lang.String, java.lang.String> getEnvironment();
- Type: java.util.Map
- Default: No environment variables.
Key-value pairs that Lambda caches and makes available for your Lambda functions.
Use environment variables to apply configuration changes, such as test and production environment configurations, without changing your Lambda function source code.
environmentEncryptionOptional
public IKey getEnvironmentEncryption();
- Type: software.amazon.awscdk.services.kms.IKey
- Default: AWS Lambda creates and uses an AWS managed customer master key (CMK).
The AWS KMS key that's used to encrypt your function's environment variables.
ephemeralStorageSizeOptional
public Size getEphemeralStorageSize();
- Type: software.amazon.awscdk.Size
- Default: 512 MiB
The size of the function’s /tmp directory in MiB.
eventsOptional
public java.util.List<IEventSource> getEvents();
- Type: java.util.List
- Default: No event sources.
Event sources for this function.
You can also add event sources using addEventSource.
filesystemOptional
public FileSystem getFilesystem();
- Type: software.amazon.awscdk.services.lambda.FileSystem
- Default: will not mount any filesystem
The filesystem configuration for the lambda function.
functionNameOptional
public java.lang.String getFunctionName();
- Type: java.lang.String
- Default: AWS CloudFormation generates a unique physical ID and uses that ID for the function's name. For more information, see Name Type.
A name for the function.
initialPolicyOptional
public java.util.List<PolicyStatement> getInitialPolicy();
- Type: java.util.List
- Default: No policy statements are added to the created Lambda role.
Initial policy statements to add to the created Lambda Role.
You can call addToRolePolicy to the created lambda to add statements post creation.
insightsVersionOptional
public LambdaInsightsVersion getInsightsVersion();
- Type: software.amazon.awscdk.services.lambda.LambdaInsightsVersion
- Default: No Lambda Insights
Specify the version of CloudWatch Lambda insights to use for monitoring.
ipv6AllowedForDualStackOptional
public java.lang.Boolean getIpv6AllowedForDualStack();
- Type: java.lang.Boolean
- Default: false
Allows outbound IPv6 traffic on VPC functions that are connected to dual-stack subnets.
Only used if 'vpc' is supplied.
layersOptional
public java.util.List<ILayerVersion> getLayers();
- Type: java.util.List
- Default: No layers.
A list of layers to add to the function's execution environment.
You can configure your Lambda function to pull in additional code during initialization in the form of layers. Layers are packages of libraries or other dependencies that can be used by multiple functions.
~~logFormat~~Optional
- Deprecated: Use
loggingFormatas a property instead.
public java.lang.String getLogFormat();
- Type: java.lang.String
- Default: "Text"
Sets the logFormat for the function.
loggingFormatOptional
public LoggingFormat getLoggingFormat();
- Type: software.amazon.awscdk.services.lambda.LoggingFormat
- Default: LoggingFormat.TEXT
Sets the loggingFormat for the function.
logGroupOptional
public ILogGroup getLogGroup();
- Type: software.amazon.awscdk.services.logs.ILogGroup
- Default:
/aws/lambda/${this.functionName}- default log group created by Lambda
The log group the function sends logs to.
By default, Lambda functions send logs to an automatically created default log group named /aws/lambda/\<function name>. However you cannot change the properties of this auto-created log group using the AWS CDK, e.g. you cannot set a different log retention.
Use the logGroup property to create a fully customizable LogGroup ahead of time, and instruct the Lambda function to send logs to it.
Providing a user-controlled log group was rolled out to commercial regions on 2023-11-16. If you are deploying to another type of region, please check regional availability first.
logRetentionOptional
public RetentionDays getLogRetention();
- Type: software.amazon.awscdk.services.logs.RetentionDays
- Default: logs.RetentionDays.INFINITE
The number of days log events are kept in CloudWatch Logs.
When updating
this property, unsetting it doesn't remove the log retention policy. To
remove the retention policy, set the value to INFINITE.
This is a legacy API and we strongly recommend you move away from it if you can.
Instead create a fully customizable log group with logs.LogGroup and use the logGroup property
to instruct the Lambda function to send logs to it.
Migrating from logRetention to logGroup will cause the name of the log group to change.
Users and code and referencing the name verbatim will have to adjust.
In AWS CDK code, you can access the log group name directly from the LogGroup construct:
import * as logs from 'aws-cdk-lib/aws-logs';
declare const myLogGroup: logs.LogGroup;
myLogGroup.logGroupName;
logRetentionRetryOptionsOptional
public LogRetentionRetryOptions getLogRetentionRetryOptions();
- Type: software.amazon.awscdk.services.lambda.LogRetentionRetryOptions
- Default: Default AWS SDK retry options.
When log retention is specified, a custom resource attempts to create the CloudWatch log group.
These options control the retry policy when interacting with CloudWatch APIs.
This is a legacy API and we strongly recommend you migrate to logGroup if you can.
logGroup allows you to create a fully customizable log group and instruct the Lambda function to send logs to it.
logRetentionRoleOptional
public IRole getLogRetentionRole();
- Type: software.amazon.awscdk.services.iam.IRole
- Default: A new role is created.
The IAM role for the Lambda function associated with the custom resource that sets the retention policy.
This is a legacy API and we strongly recommend you migrate to logGroup if you can.
logGroup allows you to create a fully customizable log group and instruct the Lambda function to send logs to it.
memorySizeOptional
public java.lang.Number getMemorySize();
- Type: java.lang.Number
- Default: 128
The amount of memory, in MB, that is allocated to your Lambda function.
Lambda uses this value to proportionally allocate the amount of CPU power. For more information, see Resource Model in the AWS Lambda Developer Guide.
paramsAndSecretsOptional
public ParamsAndSecretsLayerVersion getParamsAndSecrets();
- Type: software.amazon.awscdk.services.lambda.ParamsAndSecretsLayerVersion
- Default: No Parameters and Secrets Extension
Specify the configuration of Parameters and Secrets Extension.
https://docs.aws.amazon.com/systems-manager/latest/userguide/ps-integration-lambda-extensions.html
profilingOptional
public java.lang.Boolean getProfiling();
- Type: java.lang.Boolean
- Default: No profiling.
Enable profiling.
https://docs.aws.amazon.com/codeguru/latest/profiler-ug/setting-up-lambda.html
profilingGroupOptional
public IProfilingGroup getProfilingGroup();
- Type: software.amazon.awscdk.services.codeguruprofiler.IProfilingGroup
- Default: A new profiling group will be created if
profilingis set.
Profiling Group.
https://docs.aws.amazon.com/codeguru/latest/profiler-ug/setting-up-lambda.html
recursiveLoopOptional
public RecursiveLoop getRecursiveLoop();
- Type: software.amazon.awscdk.services.lambda.RecursiveLoop
- Default: RecursiveLoop.Terminate
Sets the Recursive Loop Protection for Lambda Function.
It lets Lambda detect and terminate unintended recusrive loops.
reservedConcurrentExecutionsOptional
public java.lang.Number getReservedConcurrentExecutions();
- Type: java.lang.Number
- Default: No specific limit - account limit.
The maximum of concurrent executions you want to reserve for the function.
https://docs.aws.amazon.com/lambda/latest/dg/concurrent-executions.html
roleOptional
public IRole getRole();
- Type: software.amazon.awscdk.services.iam.IRole
- Default: A unique role will be generated for this lambda function. Both supplied and generated roles can always be changed by calling
addToRolePolicy.
Lambda execution role.
This is the role that will be assumed by the function upon execution. It controls the permissions that the function will have. The Role must be assumable by the 'lambda.amazonaws.com' service principal.
The default Role automatically has permissions granted for Lambda execution. If you provide a Role, you must add the relevant AWS managed policies yourself.
The relevant managed policies are "service-role/AWSLambdaBasicExecutionRole" and "service-role/AWSLambdaVPCAccessExecutionRole".
runtimeManagementModeOptional
public RuntimeManagementMode getRuntimeManagementMode();
- Type: software.amazon.awscdk.services.lambda.RuntimeManagementMode
- Default: Auto
Sets the runtime management configuration for a function's version.
securityGroupsOptional
public java.util.List<ISecurityGroup> getSecurityGroups();
- Type: java.util.List
- Default: If the function is placed within a VPC and a security group is not specified, either by this or securityGroup prop, a dedicated security group will be created for this function.
The list of security groups to associate with the Lambda's network interfaces.
Only used if 'vpc' is supplied.
snapStartOptional
public SnapStartConf getSnapStart();
- Type: software.amazon.awscdk.services.lambda.SnapStartConf
- Default: No snapstart
Enable SnapStart for Lambda Function.
SnapStart is currently supported only for Java 11, 17 runtime
~~systemLogLevel~~Optional
- Deprecated: Use
systemLogLevelV2as a property instead.
public java.lang.String getSystemLogLevel();
- Type: java.lang.String
- Default: "INFO"
Sets the system log level for the function.
systemLogLevelV2Optional
public SystemLogLevel getSystemLogLevelV2();
- Type: software.amazon.awscdk.services.lambda.SystemLogLevel
- Default: SystemLogLevel.INFO
Sets the system log level for the function.
timeoutOptional
public Duration getTimeout();
- Type: software.amazon.awscdk.Duration
- Default: Duration.seconds(3)
The function execution time (in seconds) after which Lambda terminates the function.
Because the execution time affects cost, set this value based on the function's expected execution time.
tracingOptional
public Tracing getTracing();
- Type: software.amazon.awscdk.services.lambda.Tracing
- Default: Tracing.Disabled
Enable AWS X-Ray Tracing for Lambda Function.
vpcOptional
public IVpc getVpc();
- Type: software.amazon.awscdk.services.ec2.IVpc
- Default: Function is not placed within a VPC.
VPC network to place Lambda network interfaces.
Specify this if the Lambda function needs to access resources in a VPC.
This is required when vpcSubnets is specified.
vpcSubnetsOptional
public SubnetSelection getVpcSubnets();
- Type: software.amazon.awscdk.services.ec2.SubnetSelection
- Default: the Vpc default strategy if not specified
Where to place the network interfaces within the VPC.
This requires vpc to be specified in order for interfaces to actually be
placed in the subnets. If vpc is not specify, this will raise an error.
Note: Internet access for Lambda Functions requires a NAT Gateway, so picking
public subnets is not allowed (unless allowPublicSubnet is set to true).
codeRequired
public Code getCode();
- Type: software.amazon.awscdk.services.lambda.Code
The source code of your Lambda function.
You can point to a file in an Amazon Simple Storage Service (Amazon S3) bucket or specify your source code as inline text.
handlerRequired
public java.lang.String getHandler();
- Type: java.lang.String
The name of the method within your code that Lambda calls to execute your function.
The format includes the file name. It can also include namespaces and other qualifiers, depending on the runtime. For more information, see https://docs.aws.amazon.com/lambda/latest/dg/foundation-progmodel.html.
Use Handler.FROM_IMAGE when defining a function from a Docker image.
NOTE: If you specify your source code as inline text by specifying the ZipFile property within the Code property, specify index.function_name as the handler.
runtimeRequired
public Runtime getRuntime();
- Type: software.amazon.awscdk.services.lambda.Runtime
The runtime environment for the Lambda function that you are uploading.
For valid values, see the Runtime property in the AWS Lambda Developer Guide.
Use Runtime.FROM_IMAGE when defining a function from a Docker image.
disableSnapStartOptional
public java.lang.Boolean getDisableSnapStart();
- Type: java.lang.Boolean
- Default: false
When true, disable snap start.
TypeSafeApiAsyncModelBuildOptions
Options for converting OpenAPI to AsyncAPI.
Initializer
import software.aws.pdk.type_safe_api.TypeSafeApiAsyncModelBuildOptions;
TypeSafeApiAsyncModelBuildOptions.builder()
.asyncApiSpecFile(java.lang.String)
.parsedSpecFile(java.lang.String)
.build();
Properties
| Name | Type | Description |
|---|---|---|
asyncApiSpecFile |
java.lang.String |
Path to the generated AsyncAPI specification (relative to the project root). |
parsedSpecFile |
java.lang.String |
Path of the parsed/bundled OpenAPI specification (relative to the project root). |
asyncApiSpecFileRequired
public java.lang.String getAsyncApiSpecFile();
- Type: java.lang.String
Path to the generated AsyncAPI specification (relative to the project root).
parsedSpecFileRequired
public java.lang.String getParsedSpecFile();
- Type: java.lang.String
Path of the parsed/bundled OpenAPI specification (relative to the project root).
TypeSafeApiAsyncModelBuildOutputOptions
Output of the OpenAPI to AsyncAPI task.
Initializer
import software.aws.pdk.type_safe_api.TypeSafeApiAsyncModelBuildOutputOptions;
TypeSafeApiAsyncModelBuildOutputOptions.builder()
.asyncApiSpecFile(java.lang.String)
.build();
Properties
| Name | Type | Description |
|---|---|---|
asyncApiSpecFile |
java.lang.String |
Path to the generated AsyncAPI specification (relative to the project root). |
asyncApiSpecFileRequired
public java.lang.String getAsyncApiSpecFile();
- Type: java.lang.String
Path to the generated AsyncAPI specification (relative to the project root).
TypeSafeApiIntegration
Defines an integration for an individual API operation.
Initializer
import software.aws.pdk.type_safe_api.TypeSafeApiIntegration;
TypeSafeApiIntegration.builder()
.integration(Integration)
// .authorizer(Authorizer)
// .options(TypeSafeApiIntegrationOptions)
.build();
Properties
| Name | Type | Description |
|---|---|---|
integration |
Integration |
The integration to service the api operation. |
authorizer |
Authorizer |
The authorizer to use for this api operation (overrides the default). |
options |
TypeSafeApiIntegrationOptions |
Options for the integration. |
integrationRequired
public Integration getIntegration();
- Type: Integration
The integration to service the api operation.
authorizerOptional
public Authorizer getAuthorizer();
- Type: Authorizer
The authorizer to use for this api operation (overrides the default).
optionsOptional
public TypeSafeApiIntegrationOptions getOptions();
Options for the integration.
TypeSafeApiIntegrationOptions
Options for an integration.
Initializer
import software.aws.pdk.type_safe_api.TypeSafeApiIntegrationOptions;
TypeSafeApiIntegrationOptions.builder()
// .apiKeyRequired(java.lang.Boolean)
.build();
Properties
| Name | Type | Description |
|---|---|---|
apiKeyRequired |
java.lang.Boolean |
Require an API key to invoke this operation. |
apiKeyRequiredOptional
public java.lang.Boolean getApiKeyRequired();
- Type: java.lang.Boolean
- Default: false
Require an API key to invoke this operation.
Overrides the default setting if present. This is only applicable when the API key source is HEADER.
TypeSafeApiModelBuildOptions
Options for configuring the OpenAPI parse/bundle task.
Initializer
import software.aws.pdk.type_safe_api.TypeSafeApiModelBuildOptions;
TypeSafeApiModelBuildOptions.builder()
.parsedSpecFile(java.lang.String)
.openApiSpecificationPath(java.lang.String)
// .smithyJsonModelPath(java.lang.String)
.build();
Properties
| Name | Type | Description |
|---|---|---|
parsedSpecFile |
java.lang.String |
Path of the parsed/bundled OpenAPI specification (relative to the project root). |
openApiSpecificationPath |
java.lang.String |
Path to the OpenAPI specification. |
smithyJsonModelPath |
java.lang.String |
Optional path to the Smithy JSON model (for Smithy projects only). |
parsedSpecFileRequired
public java.lang.String getParsedSpecFile();
- Type: java.lang.String
Path of the parsed/bundled OpenAPI specification (relative to the project root).
openApiSpecificationPathRequired
public java.lang.String getOpenApiSpecificationPath();
- Type: java.lang.String
Path to the OpenAPI specification.
smithyJsonModelPathOptional
public java.lang.String getSmithyJsonModelPath();
- Type: java.lang.String
Optional path to the Smithy JSON model (for Smithy projects only).
TypeSafeApiModelBuildOutputOptions
Output for the OpenAPI parse/bundle task.
Initializer
import software.aws.pdk.type_safe_api.TypeSafeApiModelBuildOutputOptions;
TypeSafeApiModelBuildOutputOptions.builder()
.parsedSpecFile(java.lang.String)
.build();
Properties
| Name | Type | Description |
|---|---|---|
parsedSpecFile |
java.lang.String |
Path of the parsed/bundled OpenAPI specification (relative to the project root). |
parsedSpecFileRequired
public java.lang.String getParsedSpecFile();
- Type: java.lang.String
Path of the parsed/bundled OpenAPI specification (relative to the project root).
TypeSafeApiModelProjectOptions
Initializer
import software.aws.pdk.type_safe_api.TypeSafeApiModelProjectOptions;
TypeSafeApiModelProjectOptions.builder()
.modelLanguage(ModelLanguage)
.modelOptions(ModelOptions)
// .handlerLanguages(java.util.List<Language>)
.build();
Properties
| Name | Type | Description |
|---|---|---|
modelLanguage |
ModelLanguage |
Language the model is defined in. |
modelOptions |
ModelOptions |
Options for the model. |
handlerLanguages |
java.util.List<Language> |
The languages users have specified for handler projects (if any). |
modelLanguageRequired
public ModelLanguage getModelLanguage();
- Type: ModelLanguage
Language the model is defined in.
modelOptionsRequired
public ModelOptions getModelOptions();
- Type: ModelOptions
Options for the model.
handlerLanguagesOptional
public java.util.List<Language> getHandlerLanguages();
- Type: java.util.List<Language>
The languages users have specified for handler projects (if any).
TypeSafeApiOptions
Options required alongside an Open API specification to create API Gateway resources.
Initializer
import software.aws.pdk.type_safe_api.TypeSafeApiOptions;
TypeSafeApiOptions.builder()
.integrations(java.util.Map<java.lang.String, TypeSafeApiIntegration>)
.operationLookup(java.util.Map<java.lang.String, OperationDetails>)
// .apiKeyOptions(ApiKeyOptions)
// .corsOptions(CorsOptions)
// .defaultAuthorizer(Authorizer)
.build();
Properties
| Name | Type | Description |
|---|---|---|
integrations |
java.util.Map |
A mapping of API operation to its integration. |
operationLookup |
java.util.Map |
Details about each operation. |
apiKeyOptions |
ApiKeyOptions |
Options for API keys. |
corsOptions |
software.amazon.awscdk.services.apigateway.CorsOptions |
Cross Origin Resource Sharing options for the API. |
defaultAuthorizer |
Authorizer |
The default authorizer to use for your api. |
integrationsRequired
public java.util.Map<java.lang.String, TypeSafeApiIntegration> getIntegrations();
- Type: java.util.Map
TypeSafeApiIntegration\>
A mapping of API operation to its integration.
operationLookupRequired
public java.util.Map<java.lang.String, OperationDetails> getOperationLookup();
- Type: java.util.Map
OperationDetails\>
Details about each operation.
apiKeyOptionsOptional
public ApiKeyOptions getApiKeyOptions();
- Type: ApiKeyOptions
Options for API keys.
corsOptionsOptional
public CorsOptions getCorsOptions();
- Type: software.amazon.awscdk.services.apigateway.CorsOptions
Cross Origin Resource Sharing options for the API.
defaultAuthorizerOptional
public Authorizer getDefaultAuthorizer();
- Type: Authorizer
The default authorizer to use for your api.
When omitted, no default authorizer is used. Authorizers specified at the integration level will override this for that operation.
TypeSafeApiProjectOptions
Options for the TypeSafeApiProject.
Initializer
import software.aws.pdk.type_safe_api.TypeSafeApiProjectOptions;
TypeSafeApiProjectOptions.builder()
.name(java.lang.String)
// .commitGenerated(java.lang.Boolean)
// .gitIgnoreOptions(IgnoreFileOptions)
// .gitOptions(GitOptions)
// .logging(LoggerOptions)
// .outdir(java.lang.String)
// .parent(Project)
// .projenCommand(java.lang.String)
// .projenrcJson(java.lang.Boolean)
// .projenrcJsonOptions(ProjenrcJsonOptions)
// .renovatebot(java.lang.Boolean)
// .renovatebotOptions(RenovatebotOptions)
.infrastructure(InfrastructureConfiguration)
.model(ModelConfiguration)
// .commitGeneratedCode(java.lang.Boolean)
// .documentation(DocumentationConfiguration)
// .handlers(HandlersConfiguration)
// .library(LibraryConfiguration)
// .runtime(RuntimeConfiguration)
.build();
Properties
| Name | Type | Description |
|---|---|---|
name |
java.lang.String |
This is the name of your project. |
commitGenerated |
java.lang.Boolean |
Whether to commit the managed files by default. |
gitIgnoreOptions |
io.github.cdklabs.projen.IgnoreFileOptions |
Configuration options for .gitignore file. |
gitOptions |
io.github.cdklabs.projen.GitOptions |
Configuration options for git. |
logging |
io.github.cdklabs.projen.LoggerOptions |
Configure logging options such as verbosity. |
outdir |
java.lang.String |
The root directory of the project. |
parent |
io.github.cdklabs.projen.Project |
The parent project, if this project is part of a bigger project. |
projenCommand |
java.lang.String |
The shell command to use in order to run the projen CLI. |
projenrcJson |
java.lang.Boolean |
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation. |
projenrcJsonOptions |
io.github.cdklabs.projen.ProjenrcJsonOptions |
Options for .projenrc.json. |
renovatebot |
java.lang.Boolean |
Use renovatebot to handle dependency upgrades. |
renovatebotOptions |
io.github.cdklabs.projen.RenovatebotOptions |
Options for renovatebot. |
infrastructure |
InfrastructureConfiguration |
Configuration for generated infrastructure. |
model |
ModelConfiguration |
Configuration for the API model. |
commitGeneratedCode |
java.lang.Boolean |
Whether to commit the code generated by the OpenAPI Generator. |
documentation |
DocumentationConfiguration |
Configuration for generated documentation. |
handlers |
HandlersConfiguration |
Configuration for lambda handlers for implementing the API. |
library |
LibraryConfiguration |
Configuration for generated libraries. |
runtime |
RuntimeConfiguration |
Configuration for generated runtime projects (containing types, clients and server code). |
nameRequired
public java.lang.String getName();
- Type: java.lang.String
- Default: $BASEDIR
This is the name of your project.
commitGeneratedOptional
public java.lang.Boolean getCommitGenerated();
- Type: java.lang.Boolean
- Default: true
Whether to commit the managed files by default.
gitIgnoreOptionsOptional
public IgnoreFileOptions getGitIgnoreOptions();
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptionsOptional
public GitOptions getGitOptions();
- Type: io.github.cdklabs.projen.GitOptions
Configuration options for git.
loggingOptional
public LoggerOptions getLogging();
- Type: io.github.cdklabs.projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
outdirOptional
public java.lang.String getOutdir();
- Type: java.lang.String
- Default: "."
The root directory of the project.
Relative to this directory, all files are synthesized.
If this project has a parent, this directory is relative to the parent directory and it cannot be the same as the parent or any of it's other subprojects.
parentOptional
public Project getParent();
- Type: io.github.cdklabs.projen.Project
The parent project, if this project is part of a bigger project.
projenCommandOptional
public java.lang.String getProjenCommand();
- Type: java.lang.String
- Default: "npx projen"
The shell command to use in order to run the projen CLI.
Can be used to customize in special environments.
projenrcJsonOptional
public java.lang.Boolean getProjenrcJson();
- Type: java.lang.Boolean
- Default: false
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation.
projenrcJsonOptionsOptional
public ProjenrcJsonOptions getProjenrcJsonOptions();
- Type: io.github.cdklabs.projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
renovatebotOptional
public java.lang.Boolean getRenovatebot();
- Type: java.lang.Boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptionsOptional
public RenovatebotOptions getRenovatebotOptions();
- Type: io.github.cdklabs.projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
infrastructureRequired
public InfrastructureConfiguration getInfrastructure();
Configuration for generated infrastructure.
modelRequired
public ModelConfiguration getModel();
- Type: ModelConfiguration
Configuration for the API model.
commitGeneratedCodeOptional
public java.lang.Boolean getCommitGeneratedCode();
- Type: java.lang.Boolean
- Default: false
Whether to commit the code generated by the OpenAPI Generator.
documentationOptional
public DocumentationConfiguration getDocumentation();
Configuration for generated documentation.
handlersOptional
public HandlersConfiguration getHandlers();
- Type: HandlersConfiguration
Configuration for lambda handlers for implementing the API.
libraryOptional
public LibraryConfiguration getLibrary();
- Type: LibraryConfiguration
Configuration for generated libraries.
Libraries are projects which are generated from your model, but are not fully-fledged runtimes, for example react hooks or clients in languages that aren't supported as runtimes.
runtimeOptional
public RuntimeConfiguration getRuntime();
- Type: RuntimeConfiguration
Configuration for generated runtime projects (containing types, clients and server code).
TypeSafeApiWebAclOptions
Configuration for the Web ACL associated with the API.
Initializer
import software.aws.pdk.type_safe_api.TypeSafeApiWebAclOptions;
TypeSafeApiWebAclOptions.builder()
// .cidrAllowList(CidrAllowList)
// .disable(java.lang.Boolean)
// .managedRules(java.util.List<ManagedRule>)
.build();
Properties
| Name | Type | Description |
|---|---|---|
cidrAllowList |
CidrAllowList |
List of cidr ranges to allow. |
disable |
java.lang.Boolean |
If set to true, no WebACL will be associated with the API. |
managedRules |
java.util.List<ManagedRule> |
List of managed rules to apply to the web acl. |
cidrAllowListOptional
public CidrAllowList getCidrAllowList();
- Type: CidrAllowList
- Default: undefined
List of cidr ranges to allow.
disableOptional
public java.lang.Boolean getDisable();
- Type: java.lang.Boolean
- Default: false
If set to true, no WebACL will be associated with the API.
You can also use this option if you would like to create your own WebACL and associate it yourself.
managedRulesOptional
public java.util.List<ManagedRule> getManagedRules();
- Type: java.util.List<ManagedRule>
- Default: [{ vendor: "AWS", name: "AWSManagedRulesCommonRuleSet" }]
List of managed rules to apply to the web acl.
TypeSafeRestApiProps
Configuration for the TypeSafeRestApi construct.
Initializer
import software.aws.pdk.type_safe_api.TypeSafeRestApiProps;
TypeSafeRestApiProps.builder()
// .cloudWatchRole(java.lang.Boolean)
// .cloudWatchRoleRemovalPolicy(RemovalPolicy)
// .deploy(java.lang.Boolean)
// .deployOptions(StageOptions)
// .description(java.lang.String)
// .disableExecuteApiEndpoint(java.lang.Boolean)
// .domainName(DomainNameOptions)
// .endpointExportName(java.lang.String)
// .endpointTypes(java.util.List<EndpointType>)
// .failOnWarnings(java.lang.Boolean)
// .parameters(java.util.Map<java.lang.String, java.lang.String>)
// .policy(PolicyDocument)
// .restApiName(java.lang.String)
// .retainDeployments(java.lang.Boolean)
.integrations(java.util.Map<java.lang.String, TypeSafeApiIntegration>)
.operationLookup(java.util.Map<java.lang.String, OperationDetails>)
// .apiKeyOptions(ApiKeyOptions)
// .corsOptions(CorsOptions)
// .defaultAuthorizer(Authorizer)
.specPath(java.lang.String)
// .gatewayResponses(java.util.List<GatewayResponseOptions>)
// .minCompressionSize(Size)
// .outputSpecBucket(IBucket)
// .webAclOptions(TypeSafeApiWebAclOptions)
.build();
Properties
| Name | Type | Description |
|---|---|---|
cloudWatchRole |
java.lang.Boolean |
Automatically configure an AWS CloudWatch role for API Gateway. |
cloudWatchRoleRemovalPolicy |
software.amazon.awscdk.RemovalPolicy |
The removal policy applied to the AWS CloudWatch role when this resource is removed from the application. |
deploy |
java.lang.Boolean |
Indicates if a Deployment should be automatically created for this API, and recreated when the API model (resources, methods) changes. |
deployOptions |
software.amazon.awscdk.services.apigateway.StageOptions |
Options for the API Gateway stage that will always point to the latest deployment when deploy is enabled. |
description |
java.lang.String |
A description of the RestApi construct. |
disableExecuteApiEndpoint |
java.lang.Boolean |
Specifies whether clients can invoke the API using the default execute-api endpoint. |
domainName |
software.amazon.awscdk.services.apigateway.DomainNameOptions |
Configure a custom domain name and map it to this API. |
endpointExportName |
java.lang.String |
Export name for the CfnOutput containing the API endpoint. |
endpointTypes |
java.util.List |
A list of the endpoint types of the API. |
failOnWarnings |
java.lang.Boolean |
Indicates whether to roll back the resource if a warning occurs while API Gateway is creating the RestApi resource. |
parameters |
java.util.Map |
Custom header parameters for the request. |
policy |
software.amazon.awscdk.services.iam.PolicyDocument |
A policy document that contains the permissions for this RestApi. |
restApiName |
java.lang.String |
A name for the API Gateway RestApi resource. |
retainDeployments |
java.lang.Boolean |
Retains old deployment resources when the API changes. |
integrations |
java.util.Map |
A mapping of API operation to its integration. |
operationLookup |
java.util.Map |
Details about each operation. |
apiKeyOptions |
ApiKeyOptions |
Options for API keys. |
corsOptions |
software.amazon.awscdk.services.apigateway.CorsOptions |
Cross Origin Resource Sharing options for the API. |
defaultAuthorizer |
Authorizer |
The default authorizer to use for your api. |
specPath |
java.lang.String |
Path to the JSON open api spec. |
gatewayResponses |
java.util.List |
Optional gateway responses for the API. |
minCompressionSize |
software.amazon.awscdk.Size |
A Size(in bytes, kibibytes, mebibytes etc) that is used to enable compression (with non-negative between 0 and 10485760 (10M) bytes, inclusive) or disable compression (when undefined) on an API. |
outputSpecBucket |
software.amazon.awscdk.services.s3.IBucket |
By default, the spec is prepared and outputted into the CDK assets bucket. |
webAclOptions |
TypeSafeApiWebAclOptions |
Options for the AWS WAF v2 WebACL associated with the api. |
cloudWatchRoleOptional
public java.lang.Boolean getCloudWatchRole();
- Type: java.lang.Boolean
- Default: false if
@aws-cdk/aws-apigateway:disableCloudWatchRoleis enabled, true otherwise
Automatically configure an AWS CloudWatch role for API Gateway.
cloudWatchRoleRemovalPolicyOptional
public RemovalPolicy getCloudWatchRoleRemovalPolicy();
- Type: software.amazon.awscdk.RemovalPolicy
- Default: RemovalPolicy.RETAIN
The removal policy applied to the AWS CloudWatch role when this resource is removed from the application.
Requires cloudWatchRole to be enabled.
deployOptional
public java.lang.Boolean getDeploy();
- Type: java.lang.Boolean
- Default: true
Indicates if a Deployment should be automatically created for this API, and recreated when the API model (resources, methods) changes.
Since API Gateway deployments are immutable, When this option is enabled (by default), an AWS::ApiGateway::Deployment resource will automatically created with a logical ID that hashes the API model (methods, resources and options). This means that when the model changes, the logical ID of this CloudFormation resource will change, and a new deployment will be created.
If this is set, latestDeployment will refer to the Deployment object
and deploymentStage will refer to a Stage that points to this
deployment. To customize the stage options, use the deployOptions
property.
A CloudFormation Output will also be defined with the root URL endpoint of this REST API.
deployOptionsOptional
public StageOptions getDeployOptions();
- Type: software.amazon.awscdk.services.apigateway.StageOptions
- Default: Based on defaults of
StageOptions.
Options for the API Gateway stage that will always point to the latest deployment when deploy is enabled.
If deploy is disabled,
this value cannot be set.
descriptionOptional
public java.lang.String getDescription();
- Type: java.lang.String
- Default: 'Automatically created by the RestApi construct'
A description of the RestApi construct.
disableExecuteApiEndpointOptional
public java.lang.Boolean getDisableExecuteApiEndpoint();
- Type: java.lang.Boolean
- Default: false
Specifies whether clients can invoke the API using the default execute-api endpoint.
To require that clients use a custom domain name to invoke the API, disable the default endpoint.
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-restapi.html
domainNameOptional
public DomainNameOptions getDomainName();
- Type: software.amazon.awscdk.services.apigateway.DomainNameOptions
- Default: no domain name is defined, use
addDomainNameor directly define aDomainName.
Configure a custom domain name and map it to this API.
endpointExportNameOptional
public java.lang.String getEndpointExportName();
- Type: java.lang.String
- Default: when no export name is given, output will be created without export
Export name for the CfnOutput containing the API endpoint.
endpointTypesOptional
public java.util.List<EndpointType> getEndpointTypes();
- Type: java.util.List
- Default: EndpointType.EDGE
A list of the endpoint types of the API.
Use this property when creating an API.
failOnWarningsOptional
public java.lang.Boolean getFailOnWarnings();
- Type: java.lang.Boolean
- Default: false
Indicates whether to roll back the resource if a warning occurs while API Gateway is creating the RestApi resource.
parametersOptional
public java.util.Map<java.lang.String, java.lang.String> getParameters();
- Type: java.util.Map
- Default: No parameters.
Custom header parameters for the request.
https://docs.aws.amazon.com/cli/latest/reference/apigateway/import-rest-api.html
policyOptional
public PolicyDocument getPolicy();
- Type: software.amazon.awscdk.services.iam.PolicyDocument
- Default: No policy.
A policy document that contains the permissions for this RestApi.
restApiNameOptional
public java.lang.String getRestApiName();
- Type: java.lang.String
- Default: ID of the RestApi construct.
A name for the API Gateway RestApi resource.
retainDeploymentsOptional
public java.lang.Boolean getRetainDeployments();
- Type: java.lang.Boolean
- Default: false
Retains old deployment resources when the API changes.
This allows manually reverting stages to point to old deployments via the AWS Console.
integrationsRequired
public java.util.Map<java.lang.String, TypeSafeApiIntegration> getIntegrations();
- Type: java.util.Map
TypeSafeApiIntegration\>
A mapping of API operation to its integration.
operationLookupRequired
public java.util.Map<java.lang.String, OperationDetails> getOperationLookup();
- Type: java.util.Map
OperationDetails\>
Details about each operation.
apiKeyOptionsOptional
public ApiKeyOptions getApiKeyOptions();
- Type: ApiKeyOptions
Options for API keys.
corsOptionsOptional
public CorsOptions getCorsOptions();
- Type: software.amazon.awscdk.services.apigateway.CorsOptions
Cross Origin Resource Sharing options for the API.
defaultAuthorizerOptional
public Authorizer getDefaultAuthorizer();
- Type: Authorizer
The default authorizer to use for your api.
When omitted, no default authorizer is used. Authorizers specified at the integration level will override this for that operation.
specPathRequired
public java.lang.String getSpecPath();
- Type: java.lang.String
Path to the JSON open api spec.
gatewayResponsesOptional
public java.util.List<GatewayResponseOptions> getGatewayResponses();
- Type: java.util.List
Optional gateway responses for the API.
Note that Type Safe API automatically configures request validation for you, and defines a default BAD_REQUEST_BODY gateway response which returns the validation error message. You can use this property to override this gateway response if desired.
minCompressionSizeOptional
public Size getMinCompressionSize();
- Type: software.amazon.awscdk.Size
- Default: Compression is disabled.
A Size(in bytes, kibibytes, mebibytes etc) that is used to enable compression (with non-negative between 0 and 10485760 (10M) bytes, inclusive) or disable compression (when undefined) on an API.
When compression is enabled, compression or decompression is not applied on the payload if the payload size is smaller than this value. Setting it to zero allows compression for any payload size.
outputSpecBucketOptional
public IBucket getOutputSpecBucket();
- Type: software.amazon.awscdk.services.s3.IBucket
By default, the spec is prepared and outputted into the CDK assets bucket.
If this is undesired, use this option to specify the output bucket.
webAclOptionsOptional
public TypeSafeApiWebAclOptions getWebAclOptions();
- Type: TypeSafeApiWebAclOptions
Options for the AWS WAF v2 WebACL associated with the api.
By default, a Web ACL with the AWS default managed rule set will be associated with the API. These options may disable or override the defaults.
TypeSafeWebsocketApiIntegration
Represents an integration for a route.
Initializer
import software.aws.pdk.type_safe_api.TypeSafeWebsocketApiIntegration;
TypeSafeWebsocketApiIntegration.builder()
.integration(WebSocketRouteIntegration)
.build();
Properties
| Name | Type | Description |
|---|---|---|
integration |
software.amazon.awscdk.services.apigatewayv2.WebSocketRouteIntegration |
The integration to service the route. |
integrationRequired
public WebSocketRouteIntegration getIntegration();
- Type: software.amazon.awscdk.services.apigatewayv2.WebSocketRouteIntegration
The integration to service the route.
TypeSafeWebSocketApiModelConfiguration
Initializer
import software.aws.pdk.type_safe_api.TypeSafeWebSocketApiModelConfiguration;
TypeSafeWebSocketApiModelConfiguration.builder()
.language(ModelLanguage)
.options(ModelOptions)
.build();
Properties
| Name | Type | Description |
|---|---|---|
language |
ModelLanguage |
The language the API model is defined in. |
options |
ModelOptions |
Options for the API model. |
languageRequired
public ModelLanguage getLanguage();
- Type: ModelLanguage
The language the API model is defined in.
optionsRequired
public ModelOptions getOptions();
- Type: ModelOptions
Options for the API model.
TypeSafeWebSocketApiModelProjectOptions
Initializer
import software.aws.pdk.type_safe_api.TypeSafeWebSocketApiModelProjectOptions;
TypeSafeWebSocketApiModelProjectOptions.builder()
.modelLanguage(ModelLanguage)
.modelOptions(ModelOptions)
// .handlerLanguages(java.util.List<Language>)
.build();
Properties
| Name | Type | Description |
|---|---|---|
modelLanguage |
ModelLanguage |
Language the model is defined in. |
modelOptions |
ModelOptions |
Options for the model. |
handlerLanguages |
java.util.List<Language> |
The languages users have specified for handler projects (if any). |
modelLanguageRequired
public ModelLanguage getModelLanguage();
- Type: ModelLanguage
Language the model is defined in.
modelOptionsRequired
public ModelOptions getModelOptions();
- Type: ModelOptions
Options for the model.
handlerLanguagesOptional
public java.util.List<Language> getHandlerLanguages();
- Type: java.util.List<Language>
The languages users have specified for handler projects (if any).
TypeSafeWebSocketApiProjectOptions
Options for the TypeSafeWebSocketApiProject.
Initializer
import software.aws.pdk.type_safe_api.TypeSafeWebSocketApiProjectOptions;
TypeSafeWebSocketApiProjectOptions.builder()
.name(java.lang.String)
// .commitGenerated(java.lang.Boolean)
// .gitIgnoreOptions(IgnoreFileOptions)
// .gitOptions(GitOptions)
// .logging(LoggerOptions)
// .outdir(java.lang.String)
// .parent(Project)
// .projenCommand(java.lang.String)
// .projenrcJson(java.lang.Boolean)
// .projenrcJsonOptions(ProjenrcJsonOptions)
// .renovatebot(java.lang.Boolean)
// .renovatebotOptions(RenovatebotOptions)
.infrastructure(WebSocketInfrastructureConfiguration)
.model(TypeSafeWebSocketApiModelConfiguration)
// .documentation(WebSocketDocumentationConfiguration)
// .handlers(WebSocketHandlersConfiguration)
// .library(WebSocketLibraryConfiguration)
// .runtime(WebSocketRuntimeConfiguration)
.build();
Properties
| Name | Type | Description |
|---|---|---|
name |
java.lang.String |
This is the name of your project. |
commitGenerated |
java.lang.Boolean |
Whether to commit the managed files by default. |
gitIgnoreOptions |
io.github.cdklabs.projen.IgnoreFileOptions |
Configuration options for .gitignore file. |
gitOptions |
io.github.cdklabs.projen.GitOptions |
Configuration options for git. |
logging |
io.github.cdklabs.projen.LoggerOptions |
Configure logging options such as verbosity. |
outdir |
java.lang.String |
The root directory of the project. |
parent |
io.github.cdklabs.projen.Project |
The parent project, if this project is part of a bigger project. |
projenCommand |
java.lang.String |
The shell command to use in order to run the projen CLI. |
projenrcJson |
java.lang.Boolean |
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation. |
projenrcJsonOptions |
io.github.cdklabs.projen.ProjenrcJsonOptions |
Options for .projenrc.json. |
renovatebot |
java.lang.Boolean |
Use renovatebot to handle dependency upgrades. |
renovatebotOptions |
io.github.cdklabs.projen.RenovatebotOptions |
Options for renovatebot. |
infrastructure |
WebSocketInfrastructureConfiguration |
Configuration for generated infrastructure. |
model |
TypeSafeWebSocketApiModelConfiguration |
Configuration for the API model. |
documentation |
WebSocketDocumentationConfiguration |
Configuration for generated documentation. |
handlers |
WebSocketHandlersConfiguration |
Configuration for lambda handlers for implementing the API. |
library |
WebSocketLibraryConfiguration |
Configuration for generated libraries. |
runtime |
WebSocketRuntimeConfiguration |
Configuration for generated runtime projects (containing types, clients and server code). |
nameRequired
public java.lang.String getName();
- Type: java.lang.String
- Default: $BASEDIR
This is the name of your project.
commitGeneratedOptional
public java.lang.Boolean getCommitGenerated();
- Type: java.lang.Boolean
- Default: true
Whether to commit the managed files by default.
gitIgnoreOptionsOptional
public IgnoreFileOptions getGitIgnoreOptions();
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptionsOptional
public GitOptions getGitOptions();
- Type: io.github.cdklabs.projen.GitOptions
Configuration options for git.
loggingOptional
public LoggerOptions getLogging();
- Type: io.github.cdklabs.projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
outdirOptional
public java.lang.String getOutdir();
- Type: java.lang.String
- Default: "."
The root directory of the project.
Relative to this directory, all files are synthesized.
If this project has a parent, this directory is relative to the parent directory and it cannot be the same as the parent or any of it's other subprojects.
parentOptional
public Project getParent();
- Type: io.github.cdklabs.projen.Project
The parent project, if this project is part of a bigger project.
projenCommandOptional
public java.lang.String getProjenCommand();
- Type: java.lang.String
- Default: "npx projen"
The shell command to use in order to run the projen CLI.
Can be used to customize in special environments.
projenrcJsonOptional
public java.lang.Boolean getProjenrcJson();
- Type: java.lang.Boolean
- Default: false
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation.
projenrcJsonOptionsOptional
public ProjenrcJsonOptions getProjenrcJsonOptions();
- Type: io.github.cdklabs.projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
renovatebotOptional
public java.lang.Boolean getRenovatebot();
- Type: java.lang.Boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptionsOptional
public RenovatebotOptions getRenovatebotOptions();
- Type: io.github.cdklabs.projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
infrastructureRequired
public WebSocketInfrastructureConfiguration getInfrastructure();
Configuration for generated infrastructure.
modelRequired
public TypeSafeWebSocketApiModelConfiguration getModel();
Configuration for the API model.
documentationOptional
public WebSocketDocumentationConfiguration getDocumentation();
Configuration for generated documentation.
handlersOptional
public WebSocketHandlersConfiguration getHandlers();
Configuration for lambda handlers for implementing the API.
libraryOptional
public WebSocketLibraryConfiguration getLibrary();
Configuration for generated libraries.
These include clients for interacting with your websocket API
runtimeOptional
public WebSocketRuntimeConfiguration getRuntime();
Configuration for generated runtime projects (containing types, clients and server code).
TypeSafeWebsocketApiProps
Properties for a Type Safe WebSocket API.
Initializer
import software.aws.pdk.type_safe_api.TypeSafeWebsocketApiProps;
TypeSafeWebsocketApiProps.builder()
// .apiKeySelectionExpression(WebSocketApiKeySelectionExpression)
// .apiName(java.lang.String)
// .description(java.lang.String)
.integrations(java.util.Map<java.lang.String, TypeSafeWebsocketApiIntegration>)
.operationLookup(java.util.Map<java.lang.String, WebsocketOperationDetails>)
.specPath(java.lang.String)
// .authorizer(IWebSocketRouteAuthorizer)
// .connect(TypeSafeWebsocketApiIntegration)
// .disableAccessLogging(java.lang.Boolean)
// .disableGrantManagementAccessToLambdas(java.lang.Boolean)
// .disableMockIntegrationResponses(java.lang.Boolean)
// .disconnect(TypeSafeWebsocketApiIntegration)
// .stageProps(WebSocketStageProps)
.build();
Properties
| Name | Type | Description |
|---|---|---|
apiKeySelectionExpression |
software.amazon.awscdk.services.apigatewayv2.WebSocketApiKeySelectionExpression |
An API key selection expression. |
apiName |
java.lang.String |
Name for the WebSocket API resource. |
description |
java.lang.String |
The description of the API. |
integrations |
java.util.Map |
WebSocket routes and their corresponding integrations. |
operationLookup |
java.util.Map |
Details about each operation. |
specPath |
java.lang.String |
Path to the websocket api specification json file. |
authorizer |
software.amazon.awscdk.services.apigatewayv2.IWebSocketRouteAuthorizer |
Authorizer to use for the API (applied to the $connect route). |
connect |
TypeSafeWebsocketApiIntegration |
Integration for the $connect route (invoked when a new client connects). |
disableAccessLogging |
java.lang.Boolean |
Disable access logging. |
disableGrantManagementAccessToLambdas |
java.lang.Boolean |
By default, all lambda integrations are granted management API access for the websocket API to send messages, disconnect clients, etc. |
disableMockIntegrationResponses |
java.lang.Boolean |
By default, all mock integrations will automatically be configured with integration responses such that the integration is considered successful. |
disconnect |
TypeSafeWebsocketApiIntegration |
Integration for the $disconnect route (invoked when a client disconnects). |
stageProps |
WebSocketStageProps |
Options for the default stage. |
apiKeySelectionExpressionOptional
public WebSocketApiKeySelectionExpression getApiKeySelectionExpression();
- Type: software.amazon.awscdk.services.apigatewayv2.WebSocketApiKeySelectionExpression
- Default: Key is not required to access these APIs
An API key selection expression.
Providing this option will require an API Key be provided to access the API.
apiNameOptional
public java.lang.String getApiName();
- Type: java.lang.String
- Default: id of the WebSocketApi construct.
Name for the WebSocket API resource.
descriptionOptional
public java.lang.String getDescription();
- Type: java.lang.String
- Default: none
The description of the API.
integrationsRequired
public java.util.Map<java.lang.String, TypeSafeWebsocketApiIntegration> getIntegrations();
- Type: java.util.Map
TypeSafeWebsocketApiIntegration\>
WebSocket routes and their corresponding integrations.
operationLookupRequired
public java.util.Map<java.lang.String, WebsocketOperationDetails> getOperationLookup();
- Type: java.util.Map
WebsocketOperationDetails\>
Details about each operation.
specPathRequired
public java.lang.String getSpecPath();
- Type: java.lang.String
Path to the websocket api specification json file.
authorizerOptional
public IWebSocketRouteAuthorizer getAuthorizer();
- Type: software.amazon.awscdk.services.apigatewayv2.IWebSocketRouteAuthorizer
- Default: NONE
Authorizer to use for the API (applied to the $connect route).
connectOptional
public TypeSafeWebsocketApiIntegration getConnect();
- Type: TypeSafeWebsocketApiIntegration
- Default: mocked
Integration for the $connect route (invoked when a new client connects).
disableAccessLoggingOptional
public java.lang.Boolean getDisableAccessLogging();
- Type: java.lang.Boolean
- Default: false
Disable access logging.
disableGrantManagementAccessToLambdasOptional
public java.lang.Boolean getDisableGrantManagementAccessToLambdas();
- Type: java.lang.Boolean
- Default: false
By default, all lambda integrations are granted management API access for the websocket API to send messages, disconnect clients, etc.
Set to true if you would like to manage these permissions manually.
disableMockIntegrationResponsesOptional
public java.lang.Boolean getDisableMockIntegrationResponses();
- Type: java.lang.Boolean
- Default: false
By default, all mock integrations will automatically be configured with integration responses such that the integration is considered successful.
Set to true to disable this (mock integrations will respond with errors)
disconnectOptional
public TypeSafeWebsocketApiIntegration getDisconnect();
- Type: TypeSafeWebsocketApiIntegration
- Default: mocked
Integration for the $disconnect route (invoked when a client disconnects).
stagePropsOptional
public WebSocketStageProps getStageProps();
- Type: WebSocketStageProps
Options for the default stage.
TypeScriptProjectOptions
TypeScriptProjectOptions.
Initializer
import software.aws.pdk.type_safe_api.TypeScriptProjectOptions;
TypeScriptProjectOptions.builder()
// .allowLibraryDependencies(java.lang.Boolean)
// .artifactsDirectory(java.lang.String)
// .authorEmail(java.lang.String)
// .authorName(java.lang.String)
// .authorOrganization(java.lang.Boolean)
// .authorUrl(java.lang.String)
// .autoApproveOptions(AutoApproveOptions)
// .autoApproveUpgrades(java.lang.Boolean)
// .autoDetectBin(java.lang.Boolean)
// .autoMerge(java.lang.Boolean)
// .autoMergeOptions(AutoMergeOptions)
// .bin(java.util.Map<java.lang.String, java.lang.String>)
// .bugsEmail(java.lang.String)
// .bugsUrl(java.lang.String)
// .buildWorkflow(java.lang.Boolean)
// .buildWorkflowOptions(BuildWorkflowOptions)
// .buildWorkflowTriggers(Triggers)
// .bundledDeps(java.util.List<java.lang.String>)
// .bundlerOptions(BundlerOptions)
// .checkLicenses(LicenseCheckerOptions)
// .clobber(java.lang.Boolean)
// .codeArtifactOptions(CodeArtifactOptions)
// .codeCov(java.lang.Boolean)
// .codeCovTokenSecret(java.lang.String)
// .commitGenerated(java.lang.Boolean)
// .copyrightOwner(java.lang.String)
// .copyrightPeriod(java.lang.String)
// .defaultReleaseBranch(java.lang.String)
// .dependabot(java.lang.Boolean)
// .dependabotOptions(DependabotOptions)
// .deps(java.util.List<java.lang.String>)
// .depsUpgrade(java.lang.Boolean)
// .depsUpgradeOptions(UpgradeDependenciesOptions)
// .description(java.lang.String)
// .devContainer(java.lang.Boolean)
// .devDeps(java.util.List<java.lang.String>)
// .disableTsconfig(java.lang.Boolean)
// .disableTsconfigDev(java.lang.Boolean)
// .docgen(java.lang.Boolean)
// .docsDirectory(java.lang.String)
// .entrypoint(java.lang.String)
// .entrypointTypes(java.lang.String)
// .eslint(java.lang.Boolean)
// .eslintOptions(EslintOptions)
// .github(java.lang.Boolean)
// .githubOptions(GitHubOptions)
// .gitignore(java.util.List<java.lang.String>)
// .gitIgnoreOptions(IgnoreFileOptions)
// .gitOptions(GitOptions)
// .gitpod(java.lang.Boolean)
// .homepage(java.lang.String)
// .jest(java.lang.Boolean)
// .jestOptions(JestOptions)
// .jsiiReleaseVersion(java.lang.String)
// .keywords(java.util.List<java.lang.String>)
// .libdir(java.lang.String)
// .license(java.lang.String)
// .licensed(java.lang.Boolean)
// .logging(LoggerOptions)
// .majorVersion(java.lang.Number)
// .maxNodeVersion(java.lang.String)
// .mergify(java.lang.Boolean)
// .mergifyOptions(MergifyOptions)
// .minMajorVersion(java.lang.Number)
// .minNodeVersion(java.lang.String)
// .mutableBuild(java.lang.Boolean)
// .name(java.lang.String)
// .npmAccess(NpmAccess)
// .npmDistTag(java.lang.String)
// .npmignore(java.util.List<java.lang.String>)
// .npmignoreEnabled(java.lang.Boolean)
// .npmIgnoreOptions(IgnoreFileOptions)
// .npmProvenance(java.lang.Boolean)
// .npmRegistry(java.lang.String)
// .npmRegistryUrl(java.lang.String)
// .npmTokenSecret(java.lang.String)
// .outdir(java.lang.String)
// .package(java.lang.Boolean)
// .packageManager(NodePackageManager)
// .packageName(java.lang.String)
// .parent(Project)
// .peerDependencyOptions(PeerDependencyOptions)
// .peerDeps(java.util.List<java.lang.String>)
// .pnpmVersion(java.lang.String)
// .postBuildSteps(java.util.List<JobStep>)
// .prerelease(java.lang.String)
// .prettier(java.lang.Boolean)
// .prettierOptions(PrettierOptions)
// .projectType(ProjectType)
// .projenCommand(java.lang.String)
// .projenCredentials(GithubCredentials)
// .projenDevDependency(java.lang.Boolean)
// .projenrcJs(java.lang.Boolean)
// .projenrcJson(java.lang.Boolean)
// .projenrcJsonOptions(ProjenrcJsonOptions)
// .projenrcJsOptions(ProjenrcOptions)
// .projenrcTs(java.lang.Boolean)
// .projenrcTsOptions(ProjenrcOptions)
// .projenTokenSecret(java.lang.String)
// .projenVersion(java.lang.String)
// .publishDryRun(java.lang.Boolean)
// .publishTasks(java.lang.Boolean)
// .pullRequestTemplate(java.lang.Boolean)
// .pullRequestTemplateContents(java.util.List<java.lang.String>)
// .readme(SampleReadmeProps)
// .releasableCommits(ReleasableCommits)
// .release(java.lang.Boolean)
// .releaseBranches(java.util.Map<java.lang.String, BranchOptions>)
// .releaseEveryCommit(java.lang.Boolean)
// .releaseFailureIssue(java.lang.Boolean)
// .releaseFailureIssueLabel(java.lang.String)
// .releaseSchedule(java.lang.String)
// .releaseTagPrefix(java.lang.String)
// .releaseToNpm(java.lang.Boolean)
// .releaseTrigger(ReleaseTrigger)
// .releaseWorkflow(java.lang.Boolean)
// .releaseWorkflowName(java.lang.String)
// .releaseWorkflowSetupSteps(java.util.List<JobStep>)
// .renovatebot(java.lang.Boolean)
// .renovatebotOptions(RenovatebotOptions)
// .repository(java.lang.String)
// .repositoryDirectory(java.lang.String)
// .sampleCode(java.lang.Boolean)
// .scopedPackagesOptions(java.util.List<ScopedPackagesOptions>)
// .scripts(java.util.Map<java.lang.String, java.lang.String>)
// .srcdir(java.lang.String)
// .stability(java.lang.String)
// .stale(java.lang.Boolean)
// .staleOptions(StaleOptions)
// .testdir(java.lang.String)
// .tsconfig(TypescriptConfigOptions)
// .tsconfigDev(TypescriptConfigOptions)
// .tsconfigDevFile(java.lang.String)
// .tsJestOptions(TsJestOptions)
// .typescriptVersion(java.lang.String)
// .versionrcOptions(java.util.Map<java.lang.String, java.lang.Object>)
// .vscode(java.lang.Boolean)
// .workflowBootstrapSteps(java.util.List<JobStep>)
// .workflowContainerImage(java.lang.String)
// .workflowGitIdentity(GitIdentity)
// .workflowNodeVersion(java.lang.String)
// .workflowPackageCache(java.lang.Boolean)
// .workflowRunsOn(java.util.List<java.lang.String>)
// .workflowRunsOnGroup(GroupRunnerOptions)
// .yarnBerryOptions(YarnBerryOptions)
.build();
Properties
| Name | Type | Description |
|---|---|---|
allowLibraryDependencies |
java.lang.Boolean |
Allow the project to include peerDependencies and bundledDependencies. |
artifactsDirectory |
java.lang.String |
A directory which will contain build artifacts. |
authorEmail |
java.lang.String |
Author's e-mail. |
authorName |
java.lang.String |
Author's name. |
authorOrganization |
java.lang.Boolean |
Is the author an organization. |
authorUrl |
java.lang.String |
Author's URL / Website. |
autoApproveOptions |
io.github.cdklabs.projen.github.AutoApproveOptions |
Enable and configure the 'auto approve' workflow. |
autoApproveUpgrades |
java.lang.Boolean |
Automatically approve deps upgrade PRs, allowing them to be merged by mergify (if configued). |
autoDetectBin |
java.lang.Boolean |
Automatically add all executables under the bin directory to your package.json file under the bin section. |
autoMerge |
java.lang.Boolean |
Enable automatic merging on GitHub. |
autoMergeOptions |
io.github.cdklabs.projen.github.AutoMergeOptions |
Configure options for automatic merging on GitHub. |
bin |
java.util.Map |
Binary programs vended with your module. |
bugsEmail |
java.lang.String |
The email address to which issues should be reported. |
bugsUrl |
java.lang.String |
The url to your project's issue tracker. |
buildWorkflow |
java.lang.Boolean |
Define a GitHub workflow for building PRs. |
buildWorkflowOptions |
io.github.cdklabs.projen.javascript.BuildWorkflowOptions |
Options for PR build workflow. |
buildWorkflowTriggers |
io.github.cdklabs.projen.github.workflows.Triggers |
Build workflow triggers. |
bundledDeps |
java.util.List |
List of dependencies to bundle into this module. |
bundlerOptions |
io.github.cdklabs.projen.javascript.BundlerOptions |
Options for Bundler. |
checkLicenses |
io.github.cdklabs.projen.javascript.LicenseCheckerOptions |
Configure which licenses should be deemed acceptable for use by dependencies. |
clobber |
java.lang.Boolean |
Add a clobber task which resets the repo to origin. |
codeArtifactOptions |
io.github.cdklabs.projen.javascript.CodeArtifactOptions |
Options for npm packages using AWS CodeArtifact. |
codeCov |
java.lang.Boolean |
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. |
codeCovTokenSecret |
java.lang.String |
Define the secret name for a specified https://codecov.io/ token A secret is required to send coverage for private repositories. |
commitGenerated |
java.lang.Boolean |
Whether to commit the managed files by default. |
copyrightOwner |
java.lang.String |
License copyright owner. |
copyrightPeriod |
java.lang.String |
The copyright years to put in the LICENSE file. |
defaultReleaseBranch |
java.lang.String |
The name of the main release branch. |
dependabot |
java.lang.Boolean |
Use dependabot to handle dependency upgrades. |
dependabotOptions |
io.github.cdklabs.projen.github.DependabotOptions |
Options for dependabot. |
deps |
java.util.List |
Runtime dependencies of this module. |
depsUpgrade |
java.lang.Boolean |
Use tasks and github workflows to handle dependency upgrades. |
depsUpgradeOptions |
io.github.cdklabs.projen.javascript.UpgradeDependenciesOptions |
Options for UpgradeDependencies. |
description |
java.lang.String |
The description is just a string that helps people understand the purpose of the package. |
devContainer |
java.lang.Boolean |
Add a VSCode development environment (used for GitHub Codespaces). |
devDeps |
java.util.List |
Build dependencies for this module. |
disableTsconfig |
java.lang.Boolean |
Do not generate a tsconfig.json file (used by jsii projects since tsconfig.json is generated by the jsii compiler). |
disableTsconfigDev |
java.lang.Boolean |
Do not generate a tsconfig.dev.json file. |
docgen |
java.lang.Boolean |
Docgen by Typedoc. |
docsDirectory |
java.lang.String |
Docs directory. |
entrypoint |
java.lang.String |
Module entrypoint (main in package.json). Set to an empty string to not include main in your package.json. |
entrypointTypes |
java.lang.String |
The .d.ts file that includes the type declarations for this module. |
eslint |
java.lang.Boolean |
Setup eslint. |
eslintOptions |
io.github.cdklabs.projen.javascript.EslintOptions |
Eslint options. |
github |
java.lang.Boolean |
Enable GitHub integration. |
githubOptions |
io.github.cdklabs.projen.github.GitHubOptions |
Options for GitHub integration. |
gitignore |
java.util.List |
Additional entries to .gitignore. |
gitIgnoreOptions |
io.github.cdklabs.projen.IgnoreFileOptions |
Configuration options for .gitignore file. |
gitOptions |
io.github.cdklabs.projen.GitOptions |
Configuration options for git. |
gitpod |
java.lang.Boolean |
Add a Gitpod development environment. |
homepage |
java.lang.String |
Package's Homepage / Website. |
jest |
java.lang.Boolean |
Setup jest unit tests. |
jestOptions |
io.github.cdklabs.projen.javascript.JestOptions |
Jest options. |
jsiiReleaseVersion |
java.lang.String |
Version requirement of publib which is used to publish modules to npm. |
keywords |
java.util.List |
Keywords to include in package.json. |
libdir |
java.lang.String |
Typescript artifacts output directory. |
license |
java.lang.String |
License's SPDX identifier. |
licensed |
java.lang.Boolean |
Indicates if a license should be added. |
logging |
io.github.cdklabs.projen.LoggerOptions |
Configure logging options such as verbosity. |
majorVersion |
java.lang.Number |
Major version to release from the default branch. |
maxNodeVersion |
java.lang.String |
Minimum node.js version to require via engines (inclusive). |
mergify |
java.lang.Boolean |
Whether mergify should be enabled on this repository or not. |
mergifyOptions |
io.github.cdklabs.projen.github.MergifyOptions |
Options for mergify. |
minMajorVersion |
java.lang.Number |
Minimal Major version to release. |
minNodeVersion |
java.lang.String |
Minimum Node.js version to require via package.json engines (inclusive). |
mutableBuild |
java.lang.Boolean |
Automatically update files modified during builds to pull-request branches. |
name |
java.lang.String |
This is the name of your project. |
npmAccess |
io.github.cdklabs.projen.javascript.NpmAccess |
Access level of the npm package. |
npmDistTag |
java.lang.String |
The npmDistTag to use when publishing from the default branch. |
npmignore |
java.util.List |
Additional entries to .npmignore. |
npmignoreEnabled |
java.lang.Boolean |
Defines an .npmignore file. Normally this is only needed for libraries that are packaged as tarballs. |
npmIgnoreOptions |
io.github.cdklabs.projen.IgnoreFileOptions |
Configuration options for .npmignore file. |
npmProvenance |
java.lang.Boolean |
Should provenance statements be generated when the package is published. |
npmRegistry |
java.lang.String |
The host name of the npm registry to publish to. |
npmRegistryUrl |
java.lang.String |
The base URL of the npm package registry. |
npmTokenSecret |
java.lang.String |
GitHub secret which contains the NPM token to use when publishing packages. |
outdir |
java.lang.String |
The root directory of the project. Relative to this directory, all files are synthesized. |
package |
java.lang.Boolean |
Defines a package task that will produce an npm tarball under the artifacts directory (e.g. dist). |
packageManager |
io.github.cdklabs.projen.javascript.NodePackageManager |
The Node Package Manager used to execute scripts. |
packageName |
java.lang.String |
The "name" in package.json. |
parent |
io.github.cdklabs.projen.Project |
The parent project, if this project is part of a bigger project. |
peerDependencyOptions |
io.github.cdklabs.projen.javascript.PeerDependencyOptions |
Options for peerDeps. |
peerDeps |
java.util.List |
Peer dependencies for this module. |
pnpmVersion |
java.lang.String |
The version of PNPM to use if using PNPM as a package manager. |
postBuildSteps |
java.util.List |
Steps to execute after build as part of the release workflow. |
prerelease |
java.lang.String |
Bump versions from the default branch as pre-releases (e.g. "beta", "alpha", "pre"). |
prettier |
java.lang.Boolean |
Setup prettier. |
prettierOptions |
io.github.cdklabs.projen.javascript.PrettierOptions |
Prettier options. |
projectType |
io.github.cdklabs.projen.ProjectType |
Which type of project this is (library/app). |
projenCommand |
java.lang.String |
The shell command to use in order to run the projen CLI. |
projenCredentials |
io.github.cdklabs.projen.github.GithubCredentials |
Choose a method of providing GitHub API access for projen workflows. |
projenDevDependency |
java.lang.Boolean |
Indicates of "projen" should be installed as a devDependency. |
projenrcJs |
java.lang.Boolean |
Generate (once) .projenrc.js (in JavaScript). Set to false in order to disable .projenrc.js generation. |
projenrcJson |
java.lang.Boolean |
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation. |
projenrcJsonOptions |
io.github.cdklabs.projen.ProjenrcJsonOptions |
Options for .projenrc.json. |
projenrcJsOptions |
io.github.cdklabs.projen.javascript.ProjenrcOptions |
Options for .projenrc.js. |
projenrcTs |
java.lang.Boolean |
Use TypeScript for your projenrc file (.projenrc.ts). |
projenrcTsOptions |
io.github.cdklabs.projen.typescript.ProjenrcOptions |
Options for .projenrc.ts. |
projenTokenSecret |
java.lang.String |
The name of a secret which includes a GitHub Personal Access Token to be used by projen workflows. |
projenVersion |
java.lang.String |
Version of projen to install. |
publishDryRun |
java.lang.Boolean |
Instead of actually publishing to package managers, just print the publishing command. |
publishTasks |
java.lang.Boolean |
Define publishing tasks that can be executed manually as well as workflows. |
pullRequestTemplate |
java.lang.Boolean |
Include a GitHub pull request template. |
pullRequestTemplateContents |
java.util.List |
The contents of the pull request template. |
readme |
io.github.cdklabs.projen.SampleReadmeProps |
The README setup. |
releasableCommits |
io.github.cdklabs.projen.ReleasableCommits |
Find commits that should be considered releasable Used to decide if a release is required. |
release |
java.lang.Boolean |
Add release management to this project. |
releaseBranches |
java.util.Map |
Defines additional release branches. |
releaseEveryCommit |
java.lang.Boolean |
Automatically release new versions every commit to one of branches in releaseBranches. |
releaseFailureIssue |
java.lang.Boolean |
Create a github issue on every failed publishing task. |
releaseFailureIssueLabel |
java.lang.String |
The label to apply to issues indicating publish failures. |
releaseSchedule |
java.lang.String |
CRON schedule to trigger new releases. |
releaseTagPrefix |
java.lang.String |
Automatically add the given prefix to release tags. |
releaseToNpm |
java.lang.Boolean |
Automatically release to npm when new versions are introduced. |
releaseTrigger |
io.github.cdklabs.projen.release.ReleaseTrigger |
The release trigger to use. |
releaseWorkflow |
java.lang.Boolean |
DEPRECATED: renamed to release. |
releaseWorkflowName |
java.lang.String |
The name of the default release workflow. |
releaseWorkflowSetupSteps |
java.util.List |
A set of workflow steps to execute in order to setup the workflow container. |
renovatebot |
java.lang.Boolean |
Use renovatebot to handle dependency upgrades. |
renovatebotOptions |
io.github.cdklabs.projen.RenovatebotOptions |
Options for renovatebot. |
repository |
java.lang.String |
The repository is the location where the actual code for your package lives. |
repositoryDirectory |
java.lang.String |
If the package.json for your package is not in the root directory (for example if it is part of a monorepo), you can specify the directory in which it lives. |
sampleCode |
java.lang.Boolean |
Generate one-time sample in src/ and test/ if there are no files there. |
scopedPackagesOptions |
java.util.List |
Options for privately hosted scoped packages. |
scripts |
java.util.Map |
npm scripts to include. |
srcdir |
java.lang.String |
Typescript sources directory. |
stability |
java.lang.String |
Package's Stability. |
stale |
java.lang.Boolean |
Auto-close of stale issues and pull request. |
staleOptions |
io.github.cdklabs.projen.github.StaleOptions |
Auto-close stale issues and pull requests. |
testdir |
java.lang.String |
Jest tests directory. |
tsconfig |
io.github.cdklabs.projen.javascript.TypescriptConfigOptions |
Custom TSConfig. |
tsconfigDev |
io.github.cdklabs.projen.javascript.TypescriptConfigOptions |
Custom tsconfig options for the development tsconfig.json file (used for testing). |
tsconfigDevFile |
java.lang.String |
The name of the development tsconfig.json file. |
tsJestOptions |
io.github.cdklabs.projen.typescript.TsJestOptions |
Options for ts-jest. |
typescriptVersion |
java.lang.String |
TypeScript version to use. |
versionrcOptions |
java.util.Map |
Custom configuration used when creating changelog with standard-version package. |
vscode |
java.lang.Boolean |
Enable VSCode integration. |
workflowBootstrapSteps |
java.util.List |
Workflow steps to use in order to bootstrap this repo. |
workflowContainerImage |
java.lang.String |
Container image to use for GitHub workflows. |
workflowGitIdentity |
io.github.cdklabs.projen.github.GitIdentity |
The git identity to use in workflows. |
workflowNodeVersion |
java.lang.String |
The node version to use in GitHub workflows. |
workflowPackageCache |
java.lang.Boolean |
Enable Node.js package cache in GitHub workflows. |
workflowRunsOn |
java.util.List |
Github Runner selection labels. |
workflowRunsOnGroup |
io.github.cdklabs.projen.GroupRunnerOptions |
Github Runner Group selection options. |
yarnBerryOptions |
io.github.cdklabs.projen.javascript.YarnBerryOptions |
Options for Yarn Berry. |
allowLibraryDependenciesOptional
public java.lang.Boolean getAllowLibraryDependencies();
- Type: java.lang.Boolean
- Default: true
Allow the project to include peerDependencies and bundledDependencies.
This is normally only allowed for libraries. For apps, there's no meaning for specifying these.
artifactsDirectoryOptional
public java.lang.String getArtifactsDirectory();
- Type: java.lang.String
- Default: "dist"
A directory which will contain build artifacts.
authorEmailOptional
public java.lang.String getAuthorEmail();
- Type: java.lang.String
Author's e-mail.
authorNameOptional
public java.lang.String getAuthorName();
- Type: java.lang.String
Author's name.
authorOrganizationOptional
public java.lang.Boolean getAuthorOrganization();
- Type: java.lang.Boolean
Is the author an organization.
authorUrlOptional
public java.lang.String getAuthorUrl();
- Type: java.lang.String
Author's URL / Website.
autoApproveOptionsOptional
public AutoApproveOptions getAutoApproveOptions();
- Type: io.github.cdklabs.projen.github.AutoApproveOptions
- Default: auto approve is disabled
Enable and configure the 'auto approve' workflow.
autoApproveUpgradesOptional
public java.lang.Boolean getAutoApproveUpgrades();
- Type: java.lang.Boolean
- Default: true
Automatically approve deps upgrade PRs, allowing them to be merged by mergify (if configued).
Throw if set to true but autoApproveOptions are not defined.
autoDetectBinOptional
public java.lang.Boolean getAutoDetectBin();
- Type: java.lang.Boolean
- Default: true
Automatically add all executables under the bin directory to your package.json file under the bin section.
autoMergeOptional
public java.lang.Boolean getAutoMerge();
- Type: java.lang.Boolean
- Default: true
Enable automatic merging on GitHub.
Has no effect if github.mergify
is set to false.
autoMergeOptionsOptional
public AutoMergeOptions getAutoMergeOptions();
- Type: io.github.cdklabs.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.
binOptional
public java.util.Map<java.lang.String, java.lang.String> getBin();
- Type: java.util.Map
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.
bugsEmailOptional
public java.lang.String getBugsEmail();
- Type: java.lang.String
The email address to which issues should be reported.
bugsUrlOptional
public java.lang.String getBugsUrl();
- Type: java.lang.String
The url to your project's issue tracker.
buildWorkflowOptional
public java.lang.Boolean getBuildWorkflow();
- Type: java.lang.Boolean
- Default: true if not a subproject
Define a GitHub workflow for building PRs.
buildWorkflowOptionsOptional
public BuildWorkflowOptions getBuildWorkflowOptions();
- Type: io.github.cdklabs.projen.javascript.BuildWorkflowOptions
Options for PR build workflow.
~~buildWorkflowTriggers~~Optional
- Deprecated: - Use
buildWorkflowOptions.workflowTriggers
public Triggers getBuildWorkflowTriggers();
- Type: io.github.cdklabs.projen.github.workflows.Triggers
- Default: "{ pullRequest: {}, workflowDispatch: {} }"
Build workflow triggers.
bundledDepsOptional
public java.util.List<java.lang.String> getBundledDeps();
- Type: java.util.List
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.
bundlerOptionsOptional
public BundlerOptions getBundlerOptions();
- Type: io.github.cdklabs.projen.javascript.BundlerOptions
Options for Bundler.
checkLicensesOptional
public LicenseCheckerOptions getCheckLicenses();
- Type: io.github.cdklabs.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.
clobberOptional
public java.lang.Boolean getClobber();
- Type: java.lang.Boolean
- Default: true, but false for subprojects
Add a clobber task which resets the repo to origin.
codeArtifactOptionsOptional
public CodeArtifactOptions getCodeArtifactOptions();
- Type: io.github.cdklabs.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
codeCovOptional
public java.lang.Boolean getCodeCov();
- Type: java.lang.Boolean
- 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.
codeCovTokenSecretOptional
public java.lang.String getCodeCovTokenSecret();
- Type: java.lang.String
- Default: if this option is not specified, only public repositories are supported
Define the secret name for a specified https://codecov.io/ token A secret is required to send coverage for private repositories.
commitGeneratedOptional
public java.lang.Boolean getCommitGenerated();
- Type: java.lang.Boolean
- Default: true
Whether to commit the managed files by default.
copyrightOwnerOptional
public java.lang.String getCopyrightOwner();
- Type: java.lang.String
- Default: defaults to the value of authorName or "" if
authorNameis undefined.
License copyright owner.
copyrightPeriodOptional
public java.lang.String getCopyrightPeriod();
- Type: java.lang.String
- Default: current year
The copyright years to put in the LICENSE file.
defaultReleaseBranchOptional
public java.lang.String getDefaultReleaseBranch();
- Type: java.lang.String
- Default: "main"
The name of the main release branch.
dependabotOptional
public java.lang.Boolean getDependabot();
- Type: java.lang.Boolean
- Default: false
Use dependabot to handle dependency upgrades.
Cannot be used in conjunction with depsUpgrade.
dependabotOptionsOptional
public DependabotOptions getDependabotOptions();
- Type: io.github.cdklabs.projen.github.DependabotOptions
- Default: default options
Options for dependabot.
depsOptional
public java.util.List<java.lang.String> getDeps();
- Type: java.util.List
- 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.
depsUpgradeOptional
public java.lang.Boolean getDepsUpgrade();
- Type: java.lang.Boolean
- Default: true
Use tasks and github workflows to handle dependency upgrades.
Cannot be used in conjunction with dependabot.
depsUpgradeOptionsOptional
public UpgradeDependenciesOptions getDepsUpgradeOptions();
- Type: io.github.cdklabs.projen.javascript.UpgradeDependenciesOptions
- Default: default options
Options for UpgradeDependencies.
descriptionOptional
public java.lang.String getDescription();
- Type: java.lang.String
The description is just a string that helps people understand the purpose of the package.
It can be used when searching for packages in a package manager as well. See https://classic.yarnpkg.com/en/docs/package-json/#toc-description
devContainerOptional
public java.lang.Boolean getDevContainer();
- Type: java.lang.Boolean
- Default: false
Add a VSCode development environment (used for GitHub Codespaces).
devDepsOptional
public java.util.List<java.lang.String> getDevDeps();
- Type: java.util.List
- 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.
disableTsconfigOptional
public java.lang.Boolean getDisableTsconfig();
- Type: java.lang.Boolean
- Default: false
Do not generate a tsconfig.json file (used by jsii projects since tsconfig.json is generated by the jsii compiler).
disableTsconfigDevOptional
public java.lang.Boolean getDisableTsconfigDev();
- Type: java.lang.Boolean
- Default: false
Do not generate a tsconfig.dev.json file.
docgenOptional
public java.lang.Boolean getDocgen();
- Type: java.lang.Boolean
- Default: false
Docgen by Typedoc.
docsDirectoryOptional
public java.lang.String getDocsDirectory();
- Type: java.lang.String
- Default: "docs"
Docs directory.
entrypointOptional
public java.lang.String getEntrypoint();
- Type: java.lang.String
- Default: "lib/index.js"
Module entrypoint (main in package.json). Set to an empty string to not include main in your package.json.
entrypointTypesOptional
public java.lang.String getEntrypointTypes();
- Type: java.lang.String
- Default: .d.ts file derived from the project's entrypoint (usually lib/index.d.ts)
The .d.ts file that includes the type declarations for this module.
eslintOptional
public java.lang.Boolean getEslint();
- Type: java.lang.Boolean
- Default: true
Setup eslint.
eslintOptionsOptional
public EslintOptions getEslintOptions();
- Type: io.github.cdklabs.projen.javascript.EslintOptions
- Default: opinionated default options
Eslint options.
githubOptional
public java.lang.Boolean getGithub();
- Type: java.lang.Boolean
- Default: true
Enable GitHub integration.
Enabled by default for root projects. Disabled for non-root projects.
githubOptionsOptional
public GitHubOptions getGithubOptions();
- Type: io.github.cdklabs.projen.github.GitHubOptions
- Default: see GitHubOptions
Options for GitHub integration.
gitignoreOptional
public java.util.List<java.lang.String> getGitignore();
- Type: java.util.List
Additional entries to .gitignore.
gitIgnoreOptionsOptional
public IgnoreFileOptions getGitIgnoreOptions();
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptionsOptional
public GitOptions getGitOptions();
- Type: io.github.cdklabs.projen.GitOptions
Configuration options for git.
gitpodOptional
public java.lang.Boolean getGitpod();
- Type: java.lang.Boolean
- Default: false
Add a Gitpod development environment.
homepageOptional
public java.lang.String getHomepage();
- Type: java.lang.String
Package's Homepage / Website.
jestOptional
public java.lang.Boolean getJest();
- Type: java.lang.Boolean
- Default: true
Setup jest unit tests.
jestOptionsOptional
public JestOptions getJestOptions();
- Type: io.github.cdklabs.projen.javascript.JestOptions
- Default: default options
Jest options.
jsiiReleaseVersionOptional
public java.lang.String getJsiiReleaseVersion();
- Type: java.lang.String
- Default: "latest"
Version requirement of publib which is used to publish modules to npm.
keywordsOptional
public java.util.List<java.lang.String> getKeywords();
- Type: java.util.List
Keywords to include in package.json.
libdirOptional
public java.lang.String getLibdir();
- Type: java.lang.String
- Default: "lib"
Typescript artifacts output directory.
licenseOptional
public java.lang.String getLicense();
- Type: java.lang.String
- Default: "Apache-2.0"
License's SPDX identifier.
See https://github.com/projen/projen/tree/main/license-text for a list of supported licenses.
Use the licensed option if you want to no license to be specified.
licensedOptional
public java.lang.Boolean getLicensed();
- Type: java.lang.Boolean
- Default: true
Indicates if a license should be added.
loggingOptional
public LoggerOptions getLogging();
- Type: io.github.cdklabs.projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
majorVersionOptional
public java.lang.Number getMajorVersion();
- Type: java.lang.Number
- Default: Major version is not enforced.
Major version to release from the default branch.
If this is specified, we bump the latest version of this major version line. If not specified, we bump the global latest version.
maxNodeVersionOptional
public java.lang.String getMaxNodeVersion();
- Type: java.lang.String
- Default: no max
Minimum node.js version to require via engines (inclusive).
~~mergify~~Optional
- Deprecated: use
githubOptions.mergifyinstead
public java.lang.Boolean getMergify();
- Type: java.lang.Boolean
- Default: true
Whether mergify should be enabled on this repository or not.
~~mergifyOptions~~Optional
- Deprecated: use
githubOptions.mergifyOptionsinstead
public MergifyOptions getMergifyOptions();
- Type: io.github.cdklabs.projen.github.MergifyOptions
- Default: default options
Options for mergify.
minMajorVersionOptional
public java.lang.Number getMinMajorVersion();
- Type: java.lang.Number
- Default: No minimum version is being enforced
Minimal Major version to release.
This can be useful to set to 1, as breaking changes before the 1.x major release are not incrementing the major version number.
Can not be set together with majorVersion.
minNodeVersionOptional
public java.lang.String getMinNodeVersion();
- Type: java.lang.String
- Default: no "engines" specified
Minimum Node.js version to require via package.json engines (inclusive).
~~mutableBuild~~Optional
- Deprecated: - Use
buildWorkflowOptions.mutableBuild
public java.lang.Boolean getMutableBuild();
- Type: java.lang.Boolean
- Default: true
Automatically update files modified during builds to pull-request branches.
This means that any files synthesized by projen or e.g. test snapshots will always be up-to-date before a PR is merged.
Implies that PR builds do not have anti-tamper checks.
nameOptional
public java.lang.String getName();
- Type: java.lang.String
- Default: $BASEDIR
This is the name of your project.
npmAccessOptional
public NpmAccess getNpmAccess();
- Type: io.github.cdklabs.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.
npmDistTagOptional
public java.lang.String getNpmDistTag();
- Type: java.lang.String
- Default: "latest"
The npmDistTag to use when publishing from the default branch.
To set the npm dist-tag for release branches, set the npmDistTag property
for each branch.
~~npmignore~~Optional
- Deprecated: - use
project.addPackageIgnore
public java.util.List<java.lang.String> getNpmignore();
- Type: java.util.List
Additional entries to .npmignore.
npmignoreEnabledOptional
public java.lang.Boolean getNpmignoreEnabled();
- Type: java.lang.Boolean
- Default: true
Defines an .npmignore file. Normally this is only needed for libraries that are packaged as tarballs.
npmIgnoreOptionsOptional
public IgnoreFileOptions getNpmIgnoreOptions();
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .npmignore file.
npmProvenanceOptional
public java.lang.Boolean getNpmProvenance();
- Type: java.lang.Boolean
- 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.
~~npmRegistry~~Optional
- Deprecated: use
npmRegistryUrlinstead
public java.lang.String getNpmRegistry();
- Type: java.lang.String
The host name of the npm registry to publish to.
Cannot be set together with npmRegistryUrl.
npmRegistryUrlOptional
public java.lang.String getNpmRegistryUrl();
- Type: java.lang.String
- Default: "https://registry.npmjs.org"
The base URL of the npm package registry.
Must be a URL (e.g. start with "https://" or "http://")
npmTokenSecretOptional
public java.lang.String getNpmTokenSecret();
- Type: java.lang.String
- Default: "NPM_TOKEN"
GitHub secret which contains the NPM token to use when publishing packages.
outdirOptional
public java.lang.String getOutdir();
- Type: java.lang.String
- Default: "."
The root directory of the project. Relative to this directory, all files are synthesized.
If this project has a parent, this directory is relative to the parent directory and it cannot be the same as the parent or any of it's other subprojects.
packageOptional
public java.lang.Boolean getPackage();
- Type: java.lang.Boolean
- Default: true
Defines a package task that will produce an npm tarball under the artifacts directory (e.g. dist).
packageManagerOptional
public NodePackageManager getPackageManager();
- Type: io.github.cdklabs.projen.javascript.NodePackageManager
- Default: NodePackageManager.YARN_CLASSIC
The Node Package Manager used to execute scripts.
packageNameOptional
public java.lang.String getPackageName();
- Type: java.lang.String
- Default: defaults to project name
The "name" in package.json.
parentOptional
public Project getParent();
- Type: io.github.cdklabs.projen.Project
The parent project, if this project is part of a bigger project.
peerDependencyOptionsOptional
public PeerDependencyOptions getPeerDependencyOptions();
- Type: io.github.cdklabs.projen.javascript.PeerDependencyOptions
Options for peerDeps.
peerDepsOptional
public java.util.List<java.lang.String> getPeerDeps();
- Type: java.util.List
- 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.
pnpmVersionOptional
public java.lang.String getPnpmVersion();
- Type: java.lang.String
- Default: "7"
The version of PNPM to use if using PNPM as a package manager.
postBuildStepsOptional
public java.util.List<JobStep> getPostBuildSteps();
- Type: java.util.List
- Default: []
Steps to execute after build as part of the release workflow.
prereleaseOptional
public java.lang.String getPrerelease();
- Type: java.lang.String
- Default: normal semantic versions
Bump versions from the default branch as pre-releases (e.g. "beta", "alpha", "pre").
prettierOptional
public java.lang.Boolean getPrettier();
- Type: java.lang.Boolean
- Default: false
Setup prettier.
prettierOptionsOptional
public PrettierOptions getPrettierOptions();
- Type: io.github.cdklabs.projen.javascript.PrettierOptions
- Default: default options
Prettier options.
~~projectType~~Optional
- Deprecated: no longer supported at the base project level
public ProjectType getProjectType();
- Type: io.github.cdklabs.projen.ProjectType
- Default: ProjectType.UNKNOWN
Which type of project this is (library/app).
projenCommandOptional
public java.lang.String getProjenCommand();
- Type: java.lang.String
- Default: "npx projen"
The shell command to use in order to run the projen CLI.
Can be used to customize in special environments.
projenCredentialsOptional
public GithubCredentials getProjenCredentials();
- Type: io.github.cdklabs.projen.github.GithubCredentials
- Default: use a personal access token named PROJEN_GITHUB_TOKEN
Choose a method of providing GitHub API access for projen workflows.
projenDevDependencyOptional
public java.lang.Boolean getProjenDevDependency();
- Type: java.lang.Boolean
- Default: true if not a subproject
Indicates of "projen" should be installed as a devDependency.
projenrcJsOptional
public java.lang.Boolean getProjenrcJs();
- Type: java.lang.Boolean
- Default: true if projenrcJson is false
Generate (once) .projenrc.js (in JavaScript). Set to false in order to disable .projenrc.js generation.
projenrcJsonOptional
public java.lang.Boolean getProjenrcJson();
- Type: java.lang.Boolean
- Default: false
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation.
projenrcJsonOptionsOptional
public ProjenrcJsonOptions getProjenrcJsonOptions();
- Type: io.github.cdklabs.projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
projenrcJsOptionsOptional
public ProjenrcOptions getProjenrcJsOptions();
- Type: io.github.cdklabs.projen.javascript.ProjenrcOptions
- Default: default options
Options for .projenrc.js.
projenrcTsOptional
public java.lang.Boolean getProjenrcTs();
- Type: java.lang.Boolean
- Default: false
Use TypeScript for your projenrc file (.projenrc.ts).
projenrcTsOptionsOptional
public ProjenrcOptions getProjenrcTsOptions();
- Type: io.github.cdklabs.projen.typescript.ProjenrcOptions
Options for .projenrc.ts.
~~projenTokenSecret~~Optional
- Deprecated: use
projenCredentials
public java.lang.String getProjenTokenSecret();
- Type: java.lang.String
- Default: "PROJEN_GITHUB_TOKEN"
The name of a secret which includes a GitHub Personal Access Token to be used by projen workflows.
This token needs to have the repo, workflows
and packages scope.
projenVersionOptional
public java.lang.String getProjenVersion();
- Type: java.lang.String
- Default: Defaults to the latest version.
Version of projen to install.
publishDryRunOptional
public java.lang.Boolean getPublishDryRun();
- Type: java.lang.Boolean
- Default: false
Instead of actually publishing to package managers, just print the publishing command.
publishTasksOptional
public java.lang.Boolean getPublishTasks();
- Type: java.lang.Boolean
- Default: false
Define publishing tasks that can be executed manually as well as workflows.
Normally, publishing only happens within automated workflows. Enable this in order to create a publishing task for each publishing activity.
pullRequestTemplateOptional
public java.lang.Boolean getPullRequestTemplate();
- Type: java.lang.Boolean
- Default: true
Include a GitHub pull request template.
pullRequestTemplateContentsOptional
public java.util.List<java.lang.String> getPullRequestTemplateContents();
- Type: java.util.List
- Default: default content
The contents of the pull request template.
readmeOptional
public SampleReadmeProps getReadme();
- Type: io.github.cdklabs.projen.SampleReadmeProps
- Default: { filename: 'README.md', contents: '# replace this' }
The README setup.
releasableCommitsOptional
public ReleasableCommits getReleasableCommits();
- Type: io.github.cdklabs.projen.ReleasableCommits
- Default: ReleasableCommits.everyCommit()
Find commits that should be considered releasable Used to decide if a release is required.
releaseOptional
public java.lang.Boolean getRelease();
- Type: java.lang.Boolean
- Default: true (false for subprojects)
Add release management to this project.
releaseBranchesOptional
public java.util.Map<java.lang.String, BranchOptions> getReleaseBranches();
- Type: java.util.Map
- Default: no additional branches are used for release. you can use
addBranch()to add additional branches.
Defines additional release branches.
A workflow will be created for each
release branch which will publish releases from commits in this branch.
Each release branch must be assigned a major version number which is used
to enforce that versions published from that branch always use that major
version. If multiple branches are used, the majorVersion field must also
be provided for the default branch.
~~releaseEveryCommit~~Optional
- Deprecated: Use
releaseTrigger: ReleaseTrigger.continuous()instead
public java.lang.Boolean getReleaseEveryCommit();
- Type: java.lang.Boolean
- Default: true
Automatically release new versions every commit to one of branches in releaseBranches.
releaseFailureIssueOptional
public java.lang.Boolean getReleaseFailureIssue();
- Type: java.lang.Boolean
- Default: false
Create a github issue on every failed publishing task.
releaseFailureIssueLabelOptional
public java.lang.String getReleaseFailureIssueLabel();
- Type: java.lang.String
- Default: "failed-release"
The label to apply to issues indicating publish failures.
Only applies if releaseFailureIssue is true.
~~releaseSchedule~~Optional
- Deprecated: Use
releaseTrigger: ReleaseTrigger.scheduled()instead
public java.lang.String getReleaseSchedule();
- Type: java.lang.String
- Default: no scheduled releases
CRON schedule to trigger new releases.
releaseTagPrefixOptional
public java.lang.String getReleaseTagPrefix();
- Type: java.lang.String
- Default: "v"
Automatically add the given prefix to release tags.
Useful if you are releasing on multiple branches with overlapping version numbers. Note: this prefix is used to detect the latest tagged version when bumping, so if you change this on a project with an existing version history, you may need to manually tag your latest release with the new prefix.
releaseToNpmOptional
public java.lang.Boolean getReleaseToNpm();
- Type: java.lang.Boolean
- Default: false
Automatically release to npm when new versions are introduced.
releaseTriggerOptional
public ReleaseTrigger getReleaseTrigger();
- Type: io.github.cdklabs.projen.release.ReleaseTrigger
- Default: Continuous releases (
ReleaseTrigger.continuous())
The release trigger to use.
~~releaseWorkflow~~Optional
- Deprecated: see
release.
public java.lang.Boolean getReleaseWorkflow();
- Type: java.lang.Boolean
- Default: true if not a subproject
DEPRECATED: renamed to release.
releaseWorkflowNameOptional
public java.lang.String getReleaseWorkflowName();
- Type: java.lang.String
- Default: "release"
The name of the default release workflow.
releaseWorkflowSetupStepsOptional
public java.util.List<JobStep> getReleaseWorkflowSetupSteps();
- Type: java.util.List
A set of workflow steps to execute in order to setup the workflow container.
renovatebotOptional
public java.lang.Boolean getRenovatebot();
- Type: java.lang.Boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptionsOptional
public RenovatebotOptions getRenovatebotOptions();
- Type: io.github.cdklabs.projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
repositoryOptional
public java.lang.String getRepository();
- Type: java.lang.String
The repository is the location where the actual code for your package lives.
See https://classic.yarnpkg.com/en/docs/package-json/#toc-repository
repositoryDirectoryOptional
public java.lang.String getRepositoryDirectory();
- Type: java.lang.String
If the package.json for your package is not in the root directory (for example if it is part of a monorepo), you can specify the directory in which it lives.
sampleCodeOptional
public java.lang.Boolean getSampleCode();
- Type: java.lang.Boolean
- Default: true
Generate one-time sample in src/ and test/ if there are no files there.
scopedPackagesOptionsOptional
public java.util.List<ScopedPackagesOptions> getScopedPackagesOptions();
- Type: java.util.List
- Default: fetch all scoped packages from the public npm registry
Options for privately hosted scoped packages.
~~scripts~~Optional
- Deprecated: use
project.addTask()orpackage.setScript()
public java.util.Map<java.lang.String, java.lang.String> getScripts();
- Type: java.util.Map
- 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.
srcdirOptional
public java.lang.String getSrcdir();
- Type: java.lang.String
- Default: "src"
Typescript sources directory.
stabilityOptional
public java.lang.String getStability();
- Type: java.lang.String
Package's Stability.
staleOptional
public java.lang.Boolean getStale();
- Type: java.lang.Boolean
- Default: false
Auto-close of stale issues and pull request.
See staleOptions for options.
staleOptionsOptional
public StaleOptions getStaleOptions();
- Type: io.github.cdklabs.projen.github.StaleOptions
- Default: see defaults in
StaleOptions
Auto-close stale issues and pull requests.
To disable set stale to false.
testdirOptional
public java.lang.String getTestdir();
- Type: java.lang.String
- Default: "test"
Jest tests directory.
Tests files should be named xxx.test.ts.
If this directory is under srcdir (e.g. src/test, src/__tests__),
then tests are going to be compiled into lib/ and executed as javascript.
If the test directory is outside of src, then we configure jest to
compile the code in-memory.
tsconfigOptional
public TypescriptConfigOptions getTsconfig();
- Type: io.github.cdklabs.projen.javascript.TypescriptConfigOptions
- Default: default options
Custom TSConfig.
tsconfigDevOptional
public TypescriptConfigOptions getTsconfigDev();
- Type: io.github.cdklabs.projen.javascript.TypescriptConfigOptions
- Default: use the production tsconfig options
Custom tsconfig options for the development tsconfig.json file (used for testing).
tsconfigDevFileOptional
public java.lang.String getTsconfigDevFile();
- Type: java.lang.String
- Default: "tsconfig.dev.json"
The name of the development tsconfig.json file.
tsJestOptionsOptional
public TsJestOptions getTsJestOptions();
- Type: io.github.cdklabs.projen.typescript.TsJestOptions
Options for ts-jest.
typescriptVersionOptional
public java.lang.String getTypescriptVersion();
- Type: java.lang.String
- Default: "latest"
TypeScript version to use.
NOTE: Typescript is not semantically versioned and should remain on the
same minor, so we recommend using a ~ dependency (e.g. ~1.2.3).
versionrcOptionsOptional
public java.util.Map<java.lang.String, java.lang.Object> getVersionrcOptions();
- Type: java.util.Map
- 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.
vscodeOptional
public java.lang.Boolean getVscode();
- Type: java.lang.Boolean
- Default: true
Enable VSCode integration.
Enabled by default for root projects. Disabled for non-root projects.
workflowBootstrapStepsOptional
public java.util.List<JobStep> getWorkflowBootstrapSteps();
- Type: java.util.List
- Default: "yarn install --frozen-lockfile && yarn projen"
Workflow steps to use in order to bootstrap this repo.
workflowContainerImageOptional
public java.lang.String getWorkflowContainerImage();
- Type: java.lang.String
- Default: default image
Container image to use for GitHub workflows.
workflowGitIdentityOptional
public GitIdentity getWorkflowGitIdentity();
- Type: io.github.cdklabs.projen.github.GitIdentity
- Default: GitHub Actions
The git identity to use in workflows.
workflowNodeVersionOptional
public java.lang.String getWorkflowNodeVersion();
- Type: java.lang.String
- Default: same as
minNodeVersion
The node version to use in GitHub workflows.
workflowPackageCacheOptional
public java.lang.Boolean getWorkflowPackageCache();
- Type: java.lang.Boolean
- Default: false
Enable Node.js package cache in GitHub workflows.
workflowRunsOnOptional
public java.util.List<java.lang.String> getWorkflowRunsOn();
- Type: java.util.List
- Default: ["ubuntu-latest"]
Github Runner selection labels.
workflowRunsOnGroupOptional
public GroupRunnerOptions getWorkflowRunsOnGroup();
- Type: io.github.cdklabs.projen.GroupRunnerOptions
Github Runner Group selection options.
yarnBerryOptionsOptional
public YarnBerryOptions getYarnBerryOptions();
- Type: io.github.cdklabs.projen.javascript.YarnBerryOptions
- Default: Yarn Berry v4 with all default options
Options for Yarn Berry.
TypeSpecAsyncDefinitionOptions
Options for the TypeSpec async model definition.
Initializer
import software.aws.pdk.type_safe_api.TypeSpecAsyncDefinitionOptions;
TypeSpecAsyncDefinitionOptions.builder()
.typeSpecOptions(TypeSpecModelOptions)
// .handlerLanguages(java.util.List<Language>)
.build();
Properties
| Name | Type | Description |
|---|---|---|
typeSpecOptions |
TypeSpecModelOptions |
TypeSpec model options. |
handlerLanguages |
java.util.List<Language> |
The languages users have specified for handler projects (if any). |
typeSpecOptionsRequired
public TypeSpecModelOptions getTypeSpecOptions();
- Type: TypeSpecModelOptions
TypeSpec model options.
handlerLanguagesOptional
public java.util.List<Language> getHandlerLanguages();
- Type: java.util.List<Language>
The languages users have specified for handler projects (if any).
TypeSpecAsyncModelProjectOptions
Options for the TypeSpec WebSocket API model project.
Initializer
import software.aws.pdk.type_safe_api.TypeSpecAsyncModelProjectOptions;
TypeSpecAsyncModelProjectOptions.builder()
.name(java.lang.String)
// .commitGenerated(java.lang.Boolean)
// .gitIgnoreOptions(IgnoreFileOptions)
// .gitOptions(GitOptions)
// .logging(LoggerOptions)
// .outdir(java.lang.String)
// .parent(Project)
// .projenCommand(java.lang.String)
// .projenrcJson(java.lang.Boolean)
// .projenrcJsonOptions(ProjenrcJsonOptions)
// .renovatebot(java.lang.Boolean)
// .renovatebotOptions(RenovatebotOptions)
// .autoApproveOptions(AutoApproveOptions)
// .autoMerge(java.lang.Boolean)
// .autoMergeOptions(AutoMergeOptions)
// .clobber(java.lang.Boolean)
// .devContainer(java.lang.Boolean)
// .github(java.lang.Boolean)
// .githubOptions(GitHubOptions)
// .gitpod(java.lang.Boolean)
// .mergify(java.lang.Boolean)
// .mergifyOptions(MergifyOptions)
// .projectType(ProjectType)
// .projenCredentials(GithubCredentials)
// .projenTokenSecret(java.lang.String)
// .readme(SampleReadmeProps)
// .stale(java.lang.Boolean)
// .staleOptions(StaleOptions)
// .vscode(java.lang.Boolean)
// .allowLibraryDependencies(java.lang.Boolean)
// .authorEmail(java.lang.String)
// .authorName(java.lang.String)
// .authorOrganization(java.lang.Boolean)
// .authorUrl(java.lang.String)
// .autoDetectBin(java.lang.Boolean)
// .bin(java.util.Map<java.lang.String, java.lang.String>)
// .bugsEmail(java.lang.String)
// .bugsUrl(java.lang.String)
// .bundledDeps(java.util.List<java.lang.String>)
// .codeArtifactOptions(CodeArtifactOptions)
// .deps(java.util.List<java.lang.String>)
// .description(java.lang.String)
// .devDeps(java.util.List<java.lang.String>)
// .entrypoint(java.lang.String)
// .homepage(java.lang.String)
// .keywords(java.util.List<java.lang.String>)
// .license(java.lang.String)
// .licensed(java.lang.Boolean)
// .maxNodeVersion(java.lang.String)
// .minNodeVersion(java.lang.String)
// .npmAccess(NpmAccess)
// .npmProvenance(java.lang.Boolean)
// .npmRegistry(java.lang.String)
// .npmRegistryUrl(java.lang.String)
// .npmTokenSecret(java.lang.String)
// .packageManager(NodePackageManager)
// .packageName(java.lang.String)
// .peerDependencyOptions(PeerDependencyOptions)
// .peerDeps(java.util.List<java.lang.String>)
// .pnpmVersion(java.lang.String)
// .repository(java.lang.String)
// .repositoryDirectory(java.lang.String)
// .scopedPackagesOptions(java.util.List<ScopedPackagesOptions>)
// .scripts(java.util.Map<java.lang.String, java.lang.String>)
// .stability(java.lang.String)
// .yarnBerryOptions(YarnBerryOptions)
// .jsiiReleaseVersion(java.lang.String)
// .majorVersion(java.lang.Number)
// .minMajorVersion(java.lang.Number)
// .npmDistTag(java.lang.String)
// .postBuildSteps(java.util.List<JobStep>)
// .prerelease(java.lang.String)
// .publishDryRun(java.lang.Boolean)
// .publishTasks(java.lang.Boolean)
// .releasableCommits(ReleasableCommits)
// .releaseBranches(java.util.Map<java.lang.String, BranchOptions>)
// .releaseEveryCommit(java.lang.Boolean)
// .releaseFailureIssue(java.lang.Boolean)
// .releaseFailureIssueLabel(java.lang.String)
// .releaseSchedule(java.lang.String)
// .releaseTagPrefix(java.lang.String)
// .releaseTrigger(ReleaseTrigger)
// .releaseWorkflowName(java.lang.String)
// .releaseWorkflowSetupSteps(java.util.List<JobStep>)
// .versionrcOptions(java.util.Map<java.lang.String, java.lang.Object>)
// .workflowContainerImage(java.lang.String)
// .workflowRunsOn(java.util.List<java.lang.String>)
// .workflowRunsOnGroup(GroupRunnerOptions)
.defaultReleaseBranch(java.lang.String)
// .artifactsDirectory(java.lang.String)
// .autoApproveUpgrades(java.lang.Boolean)
// .buildWorkflow(java.lang.Boolean)
// .buildWorkflowOptions(BuildWorkflowOptions)
// .buildWorkflowTriggers(Triggers)
// .bundlerOptions(BundlerOptions)
// .checkLicenses(LicenseCheckerOptions)
// .codeCov(java.lang.Boolean)
// .codeCovTokenSecret(java.lang.String)
// .copyrightOwner(java.lang.String)
// .copyrightPeriod(java.lang.String)
// .dependabot(java.lang.Boolean)
// .dependabotOptions(DependabotOptions)
// .depsUpgrade(java.lang.Boolean)
// .depsUpgradeOptions(UpgradeDependenciesOptions)
// .gitignore(java.util.List<java.lang.String>)
// .jest(java.lang.Boolean)
// .jestOptions(JestOptions)
// .mutableBuild(java.lang.Boolean)
// .npmignore(java.util.List<java.lang.String>)
// .npmignoreEnabled(java.lang.Boolean)
// .npmIgnoreOptions(IgnoreFileOptions)
// .package(java.lang.Boolean)
// .prettier(java.lang.Boolean)
// .prettierOptions(PrettierOptions)
// .projenDevDependency(java.lang.Boolean)
// .projenrcJs(java.lang.Boolean)
// .projenrcJsOptions(ProjenrcOptions)
// .projenVersion(java.lang.String)
// .pullRequestTemplate(java.lang.Boolean)
// .pullRequestTemplateContents(java.util.List<java.lang.String>)
// .release(java.lang.Boolean)
// .releaseToNpm(java.lang.Boolean)
// .releaseWorkflow(java.lang.Boolean)
// .workflowBootstrapSteps(java.util.List<JobStep>)
// .workflowGitIdentity(GitIdentity)
// .workflowNodeVersion(java.lang.String)
// .workflowPackageCache(java.lang.Boolean)
.typeSpecOptions(TypeSpecModelOptions)
// .handlerLanguages(java.util.List<Language>)
.asyncApiSpecFile(java.lang.String)
.parsedSpecFile(java.lang.String)
.build();
Properties
| Name | Type | Description |
|---|---|---|
name |
java.lang.String |
This is the name of your project. |
commitGenerated |
java.lang.Boolean |
Whether to commit the managed files by default. |
gitIgnoreOptions |
io.github.cdklabs.projen.IgnoreFileOptions |
Configuration options for .gitignore file. |
gitOptions |
io.github.cdklabs.projen.GitOptions |
Configuration options for git. |
logging |
io.github.cdklabs.projen.LoggerOptions |
Configure logging options such as verbosity. |
outdir |
java.lang.String |
The root directory of the project. |
parent |
io.github.cdklabs.projen.Project |
The parent project, if this project is part of a bigger project. |
projenCommand |
java.lang.String |
The shell command to use in order to run the projen CLI. |
projenrcJson |
java.lang.Boolean |
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation. |
projenrcJsonOptions |
io.github.cdklabs.projen.ProjenrcJsonOptions |
Options for .projenrc.json. |
renovatebot |
java.lang.Boolean |
Use renovatebot to handle dependency upgrades. |
renovatebotOptions |
io.github.cdklabs.projen.RenovatebotOptions |
Options for renovatebot. |
autoApproveOptions |
io.github.cdklabs.projen.github.AutoApproveOptions |
Enable and configure the 'auto approve' workflow. |
autoMerge |
java.lang.Boolean |
Enable automatic merging on GitHub. |
autoMergeOptions |
io.github.cdklabs.projen.github.AutoMergeOptions |
Configure options for automatic merging on GitHub. |
clobber |
java.lang.Boolean |
Add a clobber task which resets the repo to origin. |
devContainer |
java.lang.Boolean |
Add a VSCode development environment (used for GitHub Codespaces). |
github |
java.lang.Boolean |
Enable GitHub integration. |
githubOptions |
io.github.cdklabs.projen.github.GitHubOptions |
Options for GitHub integration. |
gitpod |
java.lang.Boolean |
Add a Gitpod development environment. |
mergify |
java.lang.Boolean |
Whether mergify should be enabled on this repository or not. |
mergifyOptions |
io.github.cdklabs.projen.github.MergifyOptions |
Options for mergify. |
projectType |
io.github.cdklabs.projen.ProjectType |
Which type of project this is (library/app). |
projenCredentials |
io.github.cdklabs.projen.github.GithubCredentials |
Choose a method of providing GitHub API access for projen workflows. |
projenTokenSecret |
java.lang.String |
The name of a secret which includes a GitHub Personal Access Token to be used by projen workflows. |
readme |
io.github.cdklabs.projen.SampleReadmeProps |
The README setup. |
stale |
java.lang.Boolean |
Auto-close of stale issues and pull request. |
staleOptions |
io.github.cdklabs.projen.github.StaleOptions |
Auto-close stale issues and pull requests. |
vscode |
java.lang.Boolean |
Enable VSCode integration. |
allowLibraryDependencies |
java.lang.Boolean |
Allow the project to include peerDependencies and bundledDependencies. |
authorEmail |
java.lang.String |
Author's e-mail. |
authorName |
java.lang.String |
Author's name. |
authorOrganization |
java.lang.Boolean |
Is the author an organization. |
authorUrl |
java.lang.String |
Author's URL / Website. |
autoDetectBin |
java.lang.Boolean |
Automatically add all executables under the bin directory to your package.json file under the bin section. |
bin |
java.util.Map |
Binary programs vended with your module. |
bugsEmail |
java.lang.String |
The email address to which issues should be reported. |
bugsUrl |
java.lang.String |
The url to your project's issue tracker. |
bundledDeps |
java.util.List |
List of dependencies to bundle into this module. |
codeArtifactOptions |
io.github.cdklabs.projen.javascript.CodeArtifactOptions |
Options for npm packages using AWS CodeArtifact. |
deps |
java.util.List |
Runtime dependencies of this module. |
description |
java.lang.String |
The description is just a string that helps people understand the purpose of the package. |
devDeps |
java.util.List |
Build dependencies for this module. |
entrypoint |
java.lang.String |
Module entrypoint (main in package.json). |
homepage |
java.lang.String |
Package's Homepage / Website. |
keywords |
java.util.List |
Keywords to include in package.json. |
license |
java.lang.String |
License's SPDX identifier. |
licensed |
java.lang.Boolean |
Indicates if a license should be added. |
maxNodeVersion |
java.lang.String |
Minimum node.js version to require via engines (inclusive). |
minNodeVersion |
java.lang.String |
Minimum Node.js version to require via package.json engines (inclusive). |
npmAccess |
io.github.cdklabs.projen.javascript.NpmAccess |
Access level of the npm package. |
npmProvenance |
java.lang.Boolean |
Should provenance statements be generated when the package is published. |
npmRegistry |
java.lang.String |
The host name of the npm registry to publish to. |
npmRegistryUrl |
java.lang.String |
The base URL of the npm package registry. |
npmTokenSecret |
java.lang.String |
GitHub secret which contains the NPM token to use when publishing packages. |
packageManager |
io.github.cdklabs.projen.javascript.NodePackageManager |
The Node Package Manager used to execute scripts. |
packageName |
java.lang.String |
The "name" in package.json. |
peerDependencyOptions |
io.github.cdklabs.projen.javascript.PeerDependencyOptions |
Options for peerDeps. |
peerDeps |
java.util.List |
Peer dependencies for this module. |
pnpmVersion |
java.lang.String |
The version of PNPM to use if using PNPM as a package manager. |
repository |
java.lang.String |
The repository is the location where the actual code for your package lives. |
repositoryDirectory |
java.lang.String |
If the package.json for your package is not in the root directory (for example if it is part of a monorepo), you can specify the directory in which it lives. |
scopedPackagesOptions |
java.util.List |
Options for privately hosted scoped packages. |
scripts |
java.util.Map |
npm scripts to include. |
stability |
java.lang.String |
Package's Stability. |
yarnBerryOptions |
io.github.cdklabs.projen.javascript.YarnBerryOptions |
Options for Yarn Berry. |
jsiiReleaseVersion |
java.lang.String |
Version requirement of publib which is used to publish modules to npm. |
majorVersion |
java.lang.Number |
Major version to release from the default branch. |
minMajorVersion |
java.lang.Number |
Minimal Major version to release. |
npmDistTag |
java.lang.String |
The npmDistTag to use when publishing from the default branch. |
postBuildSteps |
java.util.List |
Steps to execute after build as part of the release workflow. |
prerelease |
java.lang.String |
Bump versions from the default branch as pre-releases (e.g. "beta", "alpha", "pre"). |
publishDryRun |
java.lang.Boolean |
Instead of actually publishing to package managers, just print the publishing command. |
publishTasks |
java.lang.Boolean |
Define publishing tasks that can be executed manually as well as workflows. |
releasableCommits |
io.github.cdklabs.projen.ReleasableCommits |
Find commits that should be considered releasable Used to decide if a release is required. |
releaseBranches |
java.util.Map |
Defines additional release branches. |
releaseEveryCommit |
java.lang.Boolean |
Automatically release new versions every commit to one of branches in releaseBranches. |
releaseFailureIssue |
java.lang.Boolean |
Create a github issue on every failed publishing task. |
releaseFailureIssueLabel |
java.lang.String |
The label to apply to issues indicating publish failures. |
releaseSchedule |
java.lang.String |
CRON schedule to trigger new releases. |
releaseTagPrefix |
java.lang.String |
Automatically add the given prefix to release tags. Useful if you are releasing on multiple branches with overlapping version numbers. |
releaseTrigger |
io.github.cdklabs.projen.release.ReleaseTrigger |
The release trigger to use. |
releaseWorkflowName |
java.lang.String |
The name of the default release workflow. |
releaseWorkflowSetupSteps |
java.util.List |
A set of workflow steps to execute in order to setup the workflow container. |
versionrcOptions |
java.util.Map |
Custom configuration used when creating changelog with standard-version package. |
workflowContainerImage |
java.lang.String |
Container image to use for GitHub workflows. |
workflowRunsOn |
java.util.List |
Github Runner selection labels. |
workflowRunsOnGroup |
io.github.cdklabs.projen.GroupRunnerOptions |
Github Runner Group selection options. |
defaultReleaseBranch |
java.lang.String |
The name of the main release branch. |
artifactsDirectory |
java.lang.String |
A directory which will contain build artifacts. |
autoApproveUpgrades |
java.lang.Boolean |
Automatically approve deps upgrade PRs, allowing them to be merged by mergify (if configued). |
buildWorkflow |
java.lang.Boolean |
Define a GitHub workflow for building PRs. |
buildWorkflowOptions |
io.github.cdklabs.projen.javascript.BuildWorkflowOptions |
Options for PR build workflow. |
buildWorkflowTriggers |
io.github.cdklabs.projen.github.workflows.Triggers |
Build workflow triggers. |
bundlerOptions |
io.github.cdklabs.projen.javascript.BundlerOptions |
Options for Bundler. |
checkLicenses |
io.github.cdklabs.projen.javascript.LicenseCheckerOptions |
Configure which licenses should be deemed acceptable for use by dependencies. |
codeCov |
java.lang.Boolean |
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. |
codeCovTokenSecret |
java.lang.String |
Define the secret name for a specified https://codecov.io/ token A secret is required to send coverage for private repositories. |
copyrightOwner |
java.lang.String |
License copyright owner. |
copyrightPeriod |
java.lang.String |
The copyright years to put in the LICENSE file. |
dependabot |
java.lang.Boolean |
Use dependabot to handle dependency upgrades. |
dependabotOptions |
io.github.cdklabs.projen.github.DependabotOptions |
Options for dependabot. |
depsUpgrade |
java.lang.Boolean |
Use tasks and github workflows to handle dependency upgrades. |
depsUpgradeOptions |
io.github.cdklabs.projen.javascript.UpgradeDependenciesOptions |
Options for UpgradeDependencies. |
gitignore |
java.util.List |
Additional entries to .gitignore. |
jest |
java.lang.Boolean |
Setup jest unit tests. |
jestOptions |
io.github.cdklabs.projen.javascript.JestOptions |
Jest options. |
mutableBuild |
java.lang.Boolean |
Automatically update files modified during builds to pull-request branches. |
npmignore |
java.util.List |
Additional entries to .npmignore. |
npmignoreEnabled |
java.lang.Boolean |
Defines an .npmignore file. Normally this is only needed for libraries that are packaged as tarballs. |
npmIgnoreOptions |
io.github.cdklabs.projen.IgnoreFileOptions |
Configuration options for .npmignore file. |
package |
java.lang.Boolean |
Defines a package task that will produce an npm tarball under the artifacts directory (e.g. dist). |
prettier |
java.lang.Boolean |
Setup prettier. |
prettierOptions |
io.github.cdklabs.projen.javascript.PrettierOptions |
Prettier options. |
projenDevDependency |
java.lang.Boolean |
Indicates of "projen" should be installed as a devDependency. |
projenrcJs |
java.lang.Boolean |
Generate (once) .projenrc.js (in JavaScript). Set to false in order to disable .projenrc.js generation. |
projenrcJsOptions |
io.github.cdklabs.projen.javascript.ProjenrcOptions |
Options for .projenrc.js. |
projenVersion |
java.lang.String |
Version of projen to install. |
pullRequestTemplate |
java.lang.Boolean |
Include a GitHub pull request template. |
pullRequestTemplateContents |
java.util.List |
The contents of the pull request template. |
release |
java.lang.Boolean |
Add release management to this project. |
releaseToNpm |
java.lang.Boolean |
Automatically release to npm when new versions are introduced. |
releaseWorkflow |
java.lang.Boolean |
DEPRECATED: renamed to release. |
workflowBootstrapSteps |
java.util.List |
Workflow steps to use in order to bootstrap this repo. |
workflowGitIdentity |
io.github.cdklabs.projen.github.GitIdentity |
The git identity to use in workflows. |
workflowNodeVersion |
java.lang.String |
The node version to use in GitHub workflows. |
workflowPackageCache |
java.lang.Boolean |
Enable Node.js package cache in GitHub workflows. |
typeSpecOptions |
TypeSpecModelOptions |
TypeSpec model options. |
handlerLanguages |
java.util.List<Language> |
The languages users have specified for handler projects (if any). |
asyncApiSpecFile |
java.lang.String |
Path to the generated AsyncAPI specification (relative to the project root). |
parsedSpecFile |
java.lang.String |
Path of the parsed/bundled OpenAPI specification (relative to the project root). |
nameRequired
public java.lang.String getName();
- Type: java.lang.String
- Default: $BASEDIR
This is the name of your project.
commitGeneratedOptional
public java.lang.Boolean getCommitGenerated();
- Type: java.lang.Boolean
- Default: true
Whether to commit the managed files by default.
gitIgnoreOptionsOptional
public IgnoreFileOptions getGitIgnoreOptions();
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptionsOptional
public GitOptions getGitOptions();
- Type: io.github.cdklabs.projen.GitOptions
Configuration options for git.
loggingOptional
public LoggerOptions getLogging();
- Type: io.github.cdklabs.projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
outdirOptional
public java.lang.String getOutdir();
- Type: java.lang.String
- Default: "."
The root directory of the project.
Relative to this directory, all files are synthesized.
If this project has a parent, this directory is relative to the parent directory and it cannot be the same as the parent or any of it's other subprojects.
parentOptional
public Project getParent();
- Type: io.github.cdklabs.projen.Project
The parent project, if this project is part of a bigger project.
projenCommandOptional
public java.lang.String getProjenCommand();
- Type: java.lang.String
- Default: "npx projen"
The shell command to use in order to run the projen CLI.
Can be used to customize in special environments.
projenrcJsonOptional
public java.lang.Boolean getProjenrcJson();
- Type: java.lang.Boolean
- Default: false
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation.
projenrcJsonOptionsOptional
public ProjenrcJsonOptions getProjenrcJsonOptions();
- Type: io.github.cdklabs.projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
renovatebotOptional
public java.lang.Boolean getRenovatebot();
- Type: java.lang.Boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptionsOptional
public RenovatebotOptions getRenovatebotOptions();
- Type: io.github.cdklabs.projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
autoApproveOptionsOptional
public AutoApproveOptions getAutoApproveOptions();
- Type: io.github.cdklabs.projen.github.AutoApproveOptions
- Default: auto approve is disabled
Enable and configure the 'auto approve' workflow.
autoMergeOptional
public java.lang.Boolean getAutoMerge();
- Type: java.lang.Boolean
- Default: true
Enable automatic merging on GitHub.
Has no effect if github.mergify
is set to false.
autoMergeOptionsOptional
public AutoMergeOptions getAutoMergeOptions();
- Type: io.github.cdklabs.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.
clobberOptional
public java.lang.Boolean getClobber();
- Type: java.lang.Boolean
- Default: true, but false for subprojects
Add a clobber task which resets the repo to origin.
devContainerOptional
public java.lang.Boolean getDevContainer();
- Type: java.lang.Boolean
- Default: false
Add a VSCode development environment (used for GitHub Codespaces).
githubOptional
public java.lang.Boolean getGithub();
- Type: java.lang.Boolean
- Default: true
Enable GitHub integration.
Enabled by default for root projects. Disabled for non-root projects.
githubOptionsOptional
public GitHubOptions getGithubOptions();
- Type: io.github.cdklabs.projen.github.GitHubOptions
- Default: see GitHubOptions
Options for GitHub integration.
gitpodOptional
public java.lang.Boolean getGitpod();
- Type: java.lang.Boolean
- Default: false
Add a Gitpod development environment.
~~mergify~~Optional
- Deprecated: use
githubOptions.mergifyinstead
public java.lang.Boolean getMergify();
- Type: java.lang.Boolean
- Default: true
Whether mergify should be enabled on this repository or not.
~~mergifyOptions~~Optional
- Deprecated: use
githubOptions.mergifyOptionsinstead
public MergifyOptions getMergifyOptions();
- Type: io.github.cdklabs.projen.github.MergifyOptions
- Default: default options
Options for mergify.
~~projectType~~Optional
- Deprecated: no longer supported at the base project level
public ProjectType getProjectType();
- Type: io.github.cdklabs.projen.ProjectType
- Default: ProjectType.UNKNOWN
Which type of project this is (library/app).
projenCredentialsOptional
public GithubCredentials getProjenCredentials();
- Type: io.github.cdklabs.projen.github.GithubCredentials
- Default: use a personal access token named PROJEN_GITHUB_TOKEN
Choose a method of providing GitHub API access for projen workflows.
~~projenTokenSecret~~Optional
- Deprecated: use
projenCredentials
public java.lang.String getProjenTokenSecret();
- Type: java.lang.String
- Default: "PROJEN_GITHUB_TOKEN"
The name of a secret which includes a GitHub Personal Access Token to be used by projen workflows.
This token needs to have the repo, workflows
and packages scope.
readmeOptional
public SampleReadmeProps getReadme();
- Type: io.github.cdklabs.projen.SampleReadmeProps
- Default: { filename: 'README.md', contents: '# replace this' }
The README setup.
Example
"{ filename: 'readme.md', contents: '# title' }"
staleOptional
public java.lang.Boolean getStale();
- Type: java.lang.Boolean
- Default: false
Auto-close of stale issues and pull request.
See staleOptions for options.
staleOptionsOptional
public StaleOptions getStaleOptions();
- Type: io.github.cdklabs.projen.github.StaleOptions
- Default: see defaults in
StaleOptions
Auto-close stale issues and pull requests.
To disable set stale to false.
vscodeOptional
public java.lang.Boolean getVscode();
- Type: java.lang.Boolean
- Default: true
Enable VSCode integration.
Enabled by default for root projects. Disabled for non-root projects.
allowLibraryDependenciesOptional
public java.lang.Boolean getAllowLibraryDependencies();
- Type: java.lang.Boolean
- Default: true
Allow the project to include peerDependencies and bundledDependencies.
This is normally only allowed for libraries. For apps, there's no meaning for specifying these.
authorEmailOptional
public java.lang.String getAuthorEmail();
- Type: java.lang.String
Author's e-mail.
authorNameOptional
public java.lang.String getAuthorName();
- Type: java.lang.String
Author's name.
authorOrganizationOptional
public java.lang.Boolean getAuthorOrganization();
- Type: java.lang.Boolean
Is the author an organization.
authorUrlOptional
public java.lang.String getAuthorUrl();
- Type: java.lang.String
Author's URL / Website.
autoDetectBinOptional
public java.lang.Boolean getAutoDetectBin();
- Type: java.lang.Boolean
- Default: true
Automatically add all executables under the bin directory to your package.json file under the bin section.
binOptional
public java.util.Map<java.lang.String, java.lang.String> getBin();
- Type: java.util.Map
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.
bugsEmailOptional
public java.lang.String getBugsEmail();
- Type: java.lang.String
The email address to which issues should be reported.
bugsUrlOptional
public java.lang.String getBugsUrl();
- Type: java.lang.String
The url to your project's issue tracker.
bundledDepsOptional
public java.util.List<java.lang.String> getBundledDeps();
- Type: java.util.List
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.
codeArtifactOptionsOptional
public CodeArtifactOptions getCodeArtifactOptions();
- Type: io.github.cdklabs.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
depsOptional
public java.util.List<java.lang.String> getDeps();
- Type: java.util.List
- Default: []
Runtime dependencies of this module.
The recommendation is to only specify the module name here (e.g.
express). This will behave similar to yarn add or npm install in the
sense that it will add the module as a dependency to your package.json
file with the latest version (^). You can specify semver requirements in
the same syntax passed to npm i or yarn add (e.g. express@^2) and
this will be what you package.json will eventually include.
Example
[ 'express', 'lodash', 'foo@^2' ]
descriptionOptional
public java.lang.String getDescription();
- Type: java.lang.String
The description is just a string that helps people understand the purpose of the package.
It can be used when searching for packages in a package manager as well. See https://classic.yarnpkg.com/en/docs/package-json/#toc-description
devDepsOptional
public java.util.List<java.lang.String> getDevDeps();
- Type: java.util.List
- Default: []
Build dependencies for this module.
These dependencies will only be available in your build environment but will not be fetched when this module is consumed.
The recommendation is to only specify the module name here (e.g.
express). This will behave similar to yarn add or npm install in the
sense that it will add the module as a dependency to your package.json
file with the latest version (^). You can specify semver requirements in
the same syntax passed to npm i or yarn add (e.g. express@^2) and
this will be what you package.json will eventually include.
Example
[ 'typescript', '@types/express' ]
entrypointOptional
public java.lang.String getEntrypoint();
- Type: java.lang.String
- Default: "lib/index.js"
Module entrypoint (main in package.json).
Set to an empty string to not include main in your package.json
homepageOptional
public java.lang.String getHomepage();
- Type: java.lang.String
Package's Homepage / Website.
keywordsOptional
public java.util.List<java.lang.String> getKeywords();
- Type: java.util.List
Keywords to include in package.json.
licenseOptional
public java.lang.String getLicense();
- Type: java.lang.String
- Default: "Apache-2.0"
License's SPDX identifier.
See https://github.com/projen/projen/tree/main/license-text for a list of supported licenses.
Use the licensed option if you want to no license to be specified.
licensedOptional
public java.lang.Boolean getLicensed();
- Type: java.lang.Boolean
- Default: true
Indicates if a license should be added.
maxNodeVersionOptional
public java.lang.String getMaxNodeVersion();
- Type: java.lang.String
- Default: no max
Minimum node.js version to require via engines (inclusive).
minNodeVersionOptional
public java.lang.String getMinNodeVersion();
- Type: java.lang.String
- Default: no "engines" specified
Minimum Node.js version to require via package.json engines (inclusive).
npmAccessOptional
public NpmAccess getNpmAccess();
- Type: io.github.cdklabs.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.
npmProvenanceOptional
public java.lang.Boolean getNpmProvenance();
- Type: java.lang.Boolean
- 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.
~~npmRegistry~~Optional
- Deprecated: use
npmRegistryUrlinstead
public java.lang.String getNpmRegistry();
- Type: java.lang.String
The host name of the npm registry to publish to.
Cannot be set together with npmRegistryUrl.
npmRegistryUrlOptional
public java.lang.String getNpmRegistryUrl();
- Type: java.lang.String
- Default: "https://registry.npmjs.org"
The base URL of the npm package registry.
Must be a URL (e.g. start with "https://" or "http://")
npmTokenSecretOptional
public java.lang.String getNpmTokenSecret();
- Type: java.lang.String
- Default: "NPM_TOKEN"
GitHub secret which contains the NPM token to use when publishing packages.
packageManagerOptional
public NodePackageManager getPackageManager();
- Type: io.github.cdklabs.projen.javascript.NodePackageManager
- Default: NodePackageManager.YARN_CLASSIC
The Node Package Manager used to execute scripts.
packageNameOptional
public java.lang.String getPackageName();
- Type: java.lang.String
- Default: defaults to project name
The "name" in package.json.
peerDependencyOptionsOptional
public PeerDependencyOptions getPeerDependencyOptions();
- Type: io.github.cdklabs.projen.javascript.PeerDependencyOptions
Options for peerDeps.
peerDepsOptional
public java.util.List<java.lang.String> getPeerDeps();
- Type: java.util.List
- 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.
pnpmVersionOptional
public java.lang.String getPnpmVersion();
- Type: java.lang.String
- Default: "7"
The version of PNPM to use if using PNPM as a package manager.
repositoryOptional
public java.lang.String getRepository();
- Type: java.lang.String
The repository is the location where the actual code for your package lives.
See https://classic.yarnpkg.com/en/docs/package-json/#toc-repository
repositoryDirectoryOptional
public java.lang.String getRepositoryDirectory();
- Type: java.lang.String
If the package.json for your package is not in the root directory (for example if it is part of a monorepo), you can specify the directory in which it lives.
scopedPackagesOptionsOptional
public java.util.List<ScopedPackagesOptions> getScopedPackagesOptions();
- Type: java.util.List
- Default: fetch all scoped packages from the public npm registry
Options for privately hosted scoped packages.
~~scripts~~Optional
- Deprecated: use
project.addTask()orpackage.setScript()
public java.util.Map<java.lang.String, java.lang.String> getScripts();
- Type: java.util.Map
- 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.
stabilityOptional
public java.lang.String getStability();
- Type: java.lang.String
Package's Stability.
yarnBerryOptionsOptional
public YarnBerryOptions getYarnBerryOptions();
- Type: io.github.cdklabs.projen.javascript.YarnBerryOptions
- Default: Yarn Berry v4 with all default options
Options for Yarn Berry.
jsiiReleaseVersionOptional
public java.lang.String getJsiiReleaseVersion();
- Type: java.lang.String
- Default: "latest"
Version requirement of publib which is used to publish modules to npm.
majorVersionOptional
public java.lang.Number getMajorVersion();
- Type: java.lang.Number
- Default: Major version is not enforced.
Major version to release from the default branch.
If this is specified, we bump the latest version of this major version line. If not specified, we bump the global latest version.
minMajorVersionOptional
public java.lang.Number getMinMajorVersion();
- Type: java.lang.Number
- Default: No minimum version is being enforced
Minimal Major version to release.
This can be useful to set to 1, as breaking changes before the 1.x major release are not incrementing the major version number.
Can not be set together with majorVersion.
npmDistTagOptional
public java.lang.String getNpmDistTag();
- Type: java.lang.String
- Default: "latest"
The npmDistTag to use when publishing from the default branch.
To set the npm dist-tag for release branches, set the npmDistTag property
for each branch.
postBuildStepsOptional
public java.util.List<JobStep> getPostBuildSteps();
- Type: java.util.List
- Default: []
Steps to execute after build as part of the release workflow.
prereleaseOptional
public java.lang.String getPrerelease();
- Type: java.lang.String
- Default: normal semantic versions
Bump versions from the default branch as pre-releases (e.g. "beta", "alpha", "pre").
publishDryRunOptional
public java.lang.Boolean getPublishDryRun();
- Type: java.lang.Boolean
- Default: false
Instead of actually publishing to package managers, just print the publishing command.
publishTasksOptional
public java.lang.Boolean getPublishTasks();
- Type: java.lang.Boolean
- Default: false
Define publishing tasks that can be executed manually as well as workflows.
Normally, publishing only happens within automated workflows. Enable this in order to create a publishing task for each publishing activity.
releasableCommitsOptional
public ReleasableCommits getReleasableCommits();
- Type: io.github.cdklabs.projen.ReleasableCommits
- Default: ReleasableCommits.everyCommit()
Find commits that should be considered releasable Used to decide if a release is required.
releaseBranchesOptional
public java.util.Map<java.lang.String, BranchOptions> getReleaseBranches();
- Type: java.util.Map
- Default: no additional branches are used for release. you can use
addBranch()to add additional branches.
Defines additional release branches.
A workflow will be created for each
release branch which will publish releases from commits in this branch.
Each release branch must be assigned a major version number which is used
to enforce that versions published from that branch always use that major
version. If multiple branches are used, the majorVersion field must also
be provided for the default branch.
~~releaseEveryCommit~~Optional
- Deprecated: Use
releaseTrigger: ReleaseTrigger.continuous()instead
public java.lang.Boolean getReleaseEveryCommit();
- Type: java.lang.Boolean
- Default: true
Automatically release new versions every commit to one of branches in releaseBranches.
releaseFailureIssueOptional
public java.lang.Boolean getReleaseFailureIssue();
- Type: java.lang.Boolean
- Default: false
Create a github issue on every failed publishing task.
releaseFailureIssueLabelOptional
public java.lang.String getReleaseFailureIssueLabel();
- Type: java.lang.String
- Default: "failed-release"
The label to apply to issues indicating publish failures.
Only applies if releaseFailureIssue is true.
~~releaseSchedule~~Optional
- Deprecated: Use
releaseTrigger: ReleaseTrigger.scheduled()instead
public java.lang.String getReleaseSchedule();
- Type: java.lang.String
- Default: no scheduled releases
CRON schedule to trigger new releases.
releaseTagPrefixOptional
public java.lang.String getReleaseTagPrefix();
- Type: java.lang.String
- Default: "v"
Automatically add the given prefix to release tags. Useful if you are releasing on multiple branches with overlapping version numbers.
Note: this prefix is used to detect the latest tagged version when bumping, so if you change this on a project with an existing version history, you may need to manually tag your latest release with the new prefix.
releaseTriggerOptional
public ReleaseTrigger getReleaseTrigger();
- Type: io.github.cdklabs.projen.release.ReleaseTrigger
- Default: Continuous releases (
ReleaseTrigger.continuous())
The release trigger to use.
releaseWorkflowNameOptional
public java.lang.String getReleaseWorkflowName();
- Type: java.lang.String
- Default: "release"
The name of the default release workflow.
releaseWorkflowSetupStepsOptional
public java.util.List<JobStep> getReleaseWorkflowSetupSteps();
- Type: java.util.List
A set of workflow steps to execute in order to setup the workflow container.
versionrcOptionsOptional
public java.util.Map<java.lang.String, java.lang.Object> getVersionrcOptions();
- Type: java.util.Map
- 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.
workflowContainerImageOptional
public java.lang.String getWorkflowContainerImage();
- Type: java.lang.String
- Default: default image
Container image to use for GitHub workflows.
workflowRunsOnOptional
public java.util.List<java.lang.String> getWorkflowRunsOn();
- Type: java.util.List
- Default: ["ubuntu-latest"]
Github Runner selection labels.
workflowRunsOnGroupOptional
public GroupRunnerOptions getWorkflowRunsOnGroup();
- Type: io.github.cdklabs.projen.GroupRunnerOptions
Github Runner Group selection options.
defaultReleaseBranchRequired
public java.lang.String getDefaultReleaseBranch();
- Type: java.lang.String
- Default: "main"
The name of the main release branch.
artifactsDirectoryOptional
public java.lang.String getArtifactsDirectory();
- Type: java.lang.String
- Default: "dist"
A directory which will contain build artifacts.
autoApproveUpgradesOptional
public java.lang.Boolean getAutoApproveUpgrades();
- Type: java.lang.Boolean
- Default: true
Automatically approve deps upgrade PRs, allowing them to be merged by mergify (if configued).
Throw if set to true but autoApproveOptions are not defined.
buildWorkflowOptional
public java.lang.Boolean getBuildWorkflow();
- Type: java.lang.Boolean
- Default: true if not a subproject
Define a GitHub workflow for building PRs.
buildWorkflowOptionsOptional
public BuildWorkflowOptions getBuildWorkflowOptions();
- Type: io.github.cdklabs.projen.javascript.BuildWorkflowOptions
Options for PR build workflow.
~~buildWorkflowTriggers~~Optional
- Deprecated: - Use
buildWorkflowOptions.workflowTriggers
public Triggers getBuildWorkflowTriggers();
- Type: io.github.cdklabs.projen.github.workflows.Triggers
- Default: "{ pullRequest: {}, workflowDispatch: {} }"
Build workflow triggers.
bundlerOptionsOptional
public BundlerOptions getBundlerOptions();
- Type: io.github.cdklabs.projen.javascript.BundlerOptions
Options for Bundler.
checkLicensesOptional
public LicenseCheckerOptions getCheckLicenses();
- Type: io.github.cdklabs.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.
codeCovOptional
public java.lang.Boolean getCodeCov();
- Type: java.lang.Boolean
- 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.
codeCovTokenSecretOptional
public java.lang.String getCodeCovTokenSecret();
- Type: java.lang.String
- Default: if this option is not specified, only public repositories are supported
Define the secret name for a specified https://codecov.io/ token A secret is required to send coverage for private repositories.
copyrightOwnerOptional
public java.lang.String getCopyrightOwner();
- Type: java.lang.String
- Default: defaults to the value of authorName or "" if
authorNameis undefined.
License copyright owner.
copyrightPeriodOptional
public java.lang.String getCopyrightPeriod();
- Type: java.lang.String
- Default: current year
The copyright years to put in the LICENSE file.
dependabotOptional
public java.lang.Boolean getDependabot();
- Type: java.lang.Boolean
- Default: false
Use dependabot to handle dependency upgrades.
Cannot be used in conjunction with depsUpgrade.
dependabotOptionsOptional
public DependabotOptions getDependabotOptions();
- Type: io.github.cdklabs.projen.github.DependabotOptions
- Default: default options
Options for dependabot.
depsUpgradeOptional
public java.lang.Boolean getDepsUpgrade();
- Type: java.lang.Boolean
- Default: true
Use tasks and github workflows to handle dependency upgrades.
Cannot be used in conjunction with dependabot.
depsUpgradeOptionsOptional
public UpgradeDependenciesOptions getDepsUpgradeOptions();
- Type: io.github.cdklabs.projen.javascript.UpgradeDependenciesOptions
- Default: default options
Options for UpgradeDependencies.
gitignoreOptional
public java.util.List<java.lang.String> getGitignore();
- Type: java.util.List
Additional entries to .gitignore.
jestOptional
public java.lang.Boolean getJest();
- Type: java.lang.Boolean
- Default: true
Setup jest unit tests.
jestOptionsOptional
public JestOptions getJestOptions();
- Type: io.github.cdklabs.projen.javascript.JestOptions
- Default: default options
Jest options.
~~mutableBuild~~Optional
- Deprecated: - Use
buildWorkflowOptions.mutableBuild
public java.lang.Boolean getMutableBuild();
- Type: java.lang.Boolean
- Default: true
Automatically update files modified during builds to pull-request branches.
This means that any files synthesized by projen or e.g. test snapshots will always be up-to-date before a PR is merged.
Implies that PR builds do not have anti-tamper checks.
~~npmignore~~Optional
- Deprecated: - use
project.addPackageIgnore
public java.util.List<java.lang.String> getNpmignore();
- Type: java.util.List
Additional entries to .npmignore.
npmignoreEnabledOptional
public java.lang.Boolean getNpmignoreEnabled();
- Type: java.lang.Boolean
- Default: true
Defines an .npmignore file. Normally this is only needed for libraries that are packaged as tarballs.
npmIgnoreOptionsOptional
public IgnoreFileOptions getNpmIgnoreOptions();
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .npmignore file.
packageOptional
public java.lang.Boolean getPackage();
- Type: java.lang.Boolean
- Default: true
Defines a package task that will produce an npm tarball under the artifacts directory (e.g. dist).
prettierOptional
public java.lang.Boolean getPrettier();
- Type: java.lang.Boolean
- Default: false
Setup prettier.
prettierOptionsOptional
public PrettierOptions getPrettierOptions();
- Type: io.github.cdklabs.projen.javascript.PrettierOptions
- Default: default options
Prettier options.
projenDevDependencyOptional
public java.lang.Boolean getProjenDevDependency();
- Type: java.lang.Boolean
- Default: true if not a subproject
Indicates of "projen" should be installed as a devDependency.
projenrcJsOptional
public java.lang.Boolean getProjenrcJs();
- Type: java.lang.Boolean
- Default: true if projenrcJson is false
Generate (once) .projenrc.js (in JavaScript). Set to false in order to disable .projenrc.js generation.
projenrcJsOptionsOptional
public ProjenrcOptions getProjenrcJsOptions();
- Type: io.github.cdklabs.projen.javascript.ProjenrcOptions
- Default: default options
Options for .projenrc.js.
projenVersionOptional
public java.lang.String getProjenVersion();
- Type: java.lang.String
- Default: Defaults to the latest version.
Version of projen to install.
pullRequestTemplateOptional
public java.lang.Boolean getPullRequestTemplate();
- Type: java.lang.Boolean
- Default: true
Include a GitHub pull request template.
pullRequestTemplateContentsOptional
public java.util.List<java.lang.String> getPullRequestTemplateContents();
- Type: java.util.List
- Default: default content
The contents of the pull request template.
releaseOptional
public java.lang.Boolean getRelease();
- Type: java.lang.Boolean
- Default: true (false for subprojects)
Add release management to this project.
releaseToNpmOptional
public java.lang.Boolean getReleaseToNpm();
- Type: java.lang.Boolean
- Default: false
Automatically release to npm when new versions are introduced.
~~releaseWorkflow~~Optional
- Deprecated: see
release.
public java.lang.Boolean getReleaseWorkflow();
- Type: java.lang.Boolean
- Default: true if not a subproject
DEPRECATED: renamed to release.
workflowBootstrapStepsOptional
public java.util.List<JobStep> getWorkflowBootstrapSteps();
- Type: java.util.List
- Default: "yarn install --frozen-lockfile && yarn projen"
Workflow steps to use in order to bootstrap this repo.
workflowGitIdentityOptional
public GitIdentity getWorkflowGitIdentity();
- Type: io.github.cdklabs.projen.github.GitIdentity
- Default: GitHub Actions
The git identity to use in workflows.
workflowNodeVersionOptional
public java.lang.String getWorkflowNodeVersion();
- Type: java.lang.String
- Default: same as
minNodeVersion
The node version to use in GitHub workflows.
workflowPackageCacheOptional
public java.lang.Boolean getWorkflowPackageCache();
- Type: java.lang.Boolean
- Default: false
Enable Node.js package cache in GitHub workflows.
typeSpecOptionsRequired
public TypeSpecModelOptions getTypeSpecOptions();
- Type: TypeSpecModelOptions
TypeSpec model options.
handlerLanguagesOptional
public java.util.List<Language> getHandlerLanguages();
- Type: java.util.List<Language>
The languages users have specified for handler projects (if any).
asyncApiSpecFileRequired
public java.lang.String getAsyncApiSpecFile();
- Type: java.lang.String
Path to the generated AsyncAPI specification (relative to the project root).
parsedSpecFileRequired
public java.lang.String getParsedSpecFile();
- Type: java.lang.String
Path of the parsed/bundled OpenAPI specification (relative to the project root).
TypeSpecDefinitionOptions
Options for the TypeSpec model definition.
Initializer
import software.aws.pdk.type_safe_api.TypeSpecDefinitionOptions;
TypeSpecDefinitionOptions.builder()
.typeSpecOptions(TypeSpecModelOptions)
// .handlerLanguages(java.util.List<Language>)
.build();
Properties
| Name | Type | Description |
|---|---|---|
typeSpecOptions |
TypeSpecModelOptions |
TypeSpec model options. |
handlerLanguages |
java.util.List<Language> |
The languages users have specified for handler projects (if any). |
typeSpecOptionsRequired
public TypeSpecModelOptions getTypeSpecOptions();
- Type: TypeSpecModelOptions
TypeSpec model options.
handlerLanguagesOptional
public java.util.List<Language> getHandlerLanguages();
- Type: java.util.List<Language>
The languages users have specified for handler projects (if any).
TypeSpecModelOptions
Options for the TypeSpec model.
Initializer
import software.aws.pdk.type_safe_api.TypeSpecModelOptions;
TypeSpecModelOptions.builder()
.namespace(java.lang.String)
.build();
Properties
| Name | Type | Description |
|---|---|---|
namespace |
java.lang.String |
The namespace for your API. |
namespaceRequired
public java.lang.String getNamespace();
- Type: java.lang.String
The namespace for your API.
https://typespec.io/docs/language-basics/namespaces/ eg. MyApi
TypeSpecModelProjectOptions
Options for the TypeSpec model project.
Initializer
import software.aws.pdk.type_safe_api.TypeSpecModelProjectOptions;
TypeSpecModelProjectOptions.builder()
.name(java.lang.String)
// .commitGenerated(java.lang.Boolean)
// .gitIgnoreOptions(IgnoreFileOptions)
// .gitOptions(GitOptions)
// .logging(LoggerOptions)
// .outdir(java.lang.String)
// .parent(Project)
// .projenCommand(java.lang.String)
// .projenrcJson(java.lang.Boolean)
// .projenrcJsonOptions(ProjenrcJsonOptions)
// .renovatebot(java.lang.Boolean)
// .renovatebotOptions(RenovatebotOptions)
// .autoApproveOptions(AutoApproveOptions)
// .autoMerge(java.lang.Boolean)
// .autoMergeOptions(AutoMergeOptions)
// .clobber(java.lang.Boolean)
// .devContainer(java.lang.Boolean)
// .github(java.lang.Boolean)
// .githubOptions(GitHubOptions)
// .gitpod(java.lang.Boolean)
// .mergify(java.lang.Boolean)
// .mergifyOptions(MergifyOptions)
// .projectType(ProjectType)
// .projenCredentials(GithubCredentials)
// .projenTokenSecret(java.lang.String)
// .readme(SampleReadmeProps)
// .stale(java.lang.Boolean)
// .staleOptions(StaleOptions)
// .vscode(java.lang.Boolean)
// .allowLibraryDependencies(java.lang.Boolean)
// .authorEmail(java.lang.String)
// .authorName(java.lang.String)
// .authorOrganization(java.lang.Boolean)
// .authorUrl(java.lang.String)
// .autoDetectBin(java.lang.Boolean)
// .bin(java.util.Map<java.lang.String, java.lang.String>)
// .bugsEmail(java.lang.String)
// .bugsUrl(java.lang.String)
// .bundledDeps(java.util.List<java.lang.String>)
// .codeArtifactOptions(CodeArtifactOptions)
// .deps(java.util.List<java.lang.String>)
// .description(java.lang.String)
// .devDeps(java.util.List<java.lang.String>)
// .entrypoint(java.lang.String)
// .homepage(java.lang.String)
// .keywords(java.util.List<java.lang.String>)
// .license(java.lang.String)
// .licensed(java.lang.Boolean)
// .maxNodeVersion(java.lang.String)
// .minNodeVersion(java.lang.String)
// .npmAccess(NpmAccess)
// .npmProvenance(java.lang.Boolean)
// .npmRegistry(java.lang.String)
// .npmRegistryUrl(java.lang.String)
// .npmTokenSecret(java.lang.String)
// .packageManager(NodePackageManager)
// .packageName(java.lang.String)
// .peerDependencyOptions(PeerDependencyOptions)
// .peerDeps(java.util.List<java.lang.String>)
// .pnpmVersion(java.lang.String)
// .repository(java.lang.String)
// .repositoryDirectory(java.lang.String)
// .scopedPackagesOptions(java.util.List<ScopedPackagesOptions>)
// .scripts(java.util.Map<java.lang.String, java.lang.String>)
// .stability(java.lang.String)
// .yarnBerryOptions(YarnBerryOptions)
// .jsiiReleaseVersion(java.lang.String)
// .majorVersion(java.lang.Number)
// .minMajorVersion(java.lang.Number)
// .npmDistTag(java.lang.String)
// .postBuildSteps(java.util.List<JobStep>)
// .prerelease(java.lang.String)
// .publishDryRun(java.lang.Boolean)
// .publishTasks(java.lang.Boolean)
// .releasableCommits(ReleasableCommits)
// .releaseBranches(java.util.Map<java.lang.String, BranchOptions>)
// .releaseEveryCommit(java.lang.Boolean)
// .releaseFailureIssue(java.lang.Boolean)
// .releaseFailureIssueLabel(java.lang.String)
// .releaseSchedule(java.lang.String)
// .releaseTagPrefix(java.lang.String)
// .releaseTrigger(ReleaseTrigger)
// .releaseWorkflowName(java.lang.String)
// .releaseWorkflowSetupSteps(java.util.List<JobStep>)
// .versionrcOptions(java.util.Map<java.lang.String, java.lang.Object>)
// .workflowContainerImage(java.lang.String)
// .workflowRunsOn(java.util.List<java.lang.String>)
// .workflowRunsOnGroup(GroupRunnerOptions)
.defaultReleaseBranch(java.lang.String)
// .artifactsDirectory(java.lang.String)
// .autoApproveUpgrades(java.lang.Boolean)
// .buildWorkflow(java.lang.Boolean)
// .buildWorkflowOptions(BuildWorkflowOptions)
// .buildWorkflowTriggers(Triggers)
// .bundlerOptions(BundlerOptions)
// .checkLicenses(LicenseCheckerOptions)
// .codeCov(java.lang.Boolean)
// .codeCovTokenSecret(java.lang.String)
// .copyrightOwner(java.lang.String)
// .copyrightPeriod(java.lang.String)
// .dependabot(java.lang.Boolean)
// .dependabotOptions(DependabotOptions)
// .depsUpgrade(java.lang.Boolean)
// .depsUpgradeOptions(UpgradeDependenciesOptions)
// .gitignore(java.util.List<java.lang.String>)
// .jest(java.lang.Boolean)
// .jestOptions(JestOptions)
// .mutableBuild(java.lang.Boolean)
// .npmignore(java.util.List<java.lang.String>)
// .npmignoreEnabled(java.lang.Boolean)
// .npmIgnoreOptions(IgnoreFileOptions)
// .package(java.lang.Boolean)
// .prettier(java.lang.Boolean)
// .prettierOptions(PrettierOptions)
// .projenDevDependency(java.lang.Boolean)
// .projenrcJs(java.lang.Boolean)
// .projenrcJsOptions(ProjenrcOptions)
// .projenVersion(java.lang.String)
// .pullRequestTemplate(java.lang.Boolean)
// .pullRequestTemplateContents(java.util.List<java.lang.String>)
// .release(java.lang.Boolean)
// .releaseToNpm(java.lang.Boolean)
// .releaseWorkflow(java.lang.Boolean)
// .workflowBootstrapSteps(java.util.List<JobStep>)
// .workflowGitIdentity(GitIdentity)
// .workflowNodeVersion(java.lang.String)
// .workflowPackageCache(java.lang.Boolean)
.typeSpecOptions(TypeSpecModelOptions)
// .handlerLanguages(java.util.List<Language>)
.parsedSpecFile(java.lang.String)
.build();
Properties
| Name | Type | Description |
|---|---|---|
name |
java.lang.String |
This is the name of your project. |
commitGenerated |
java.lang.Boolean |
Whether to commit the managed files by default. |
gitIgnoreOptions |
io.github.cdklabs.projen.IgnoreFileOptions |
Configuration options for .gitignore file. |
gitOptions |
io.github.cdklabs.projen.GitOptions |
Configuration options for git. |
logging |
io.github.cdklabs.projen.LoggerOptions |
Configure logging options such as verbosity. |
outdir |
java.lang.String |
The root directory of the project. |
parent |
io.github.cdklabs.projen.Project |
The parent project, if this project is part of a bigger project. |
projenCommand |
java.lang.String |
The shell command to use in order to run the projen CLI. |
projenrcJson |
java.lang.Boolean |
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation. |
projenrcJsonOptions |
io.github.cdklabs.projen.ProjenrcJsonOptions |
Options for .projenrc.json. |
renovatebot |
java.lang.Boolean |
Use renovatebot to handle dependency upgrades. |
renovatebotOptions |
io.github.cdklabs.projen.RenovatebotOptions |
Options for renovatebot. |
autoApproveOptions |
io.github.cdklabs.projen.github.AutoApproveOptions |
Enable and configure the 'auto approve' workflow. |
autoMerge |
java.lang.Boolean |
Enable automatic merging on GitHub. |
autoMergeOptions |
io.github.cdklabs.projen.github.AutoMergeOptions |
Configure options for automatic merging on GitHub. |
clobber |
java.lang.Boolean |
Add a clobber task which resets the repo to origin. |
devContainer |
java.lang.Boolean |
Add a VSCode development environment (used for GitHub Codespaces). |
github |
java.lang.Boolean |
Enable GitHub integration. |
githubOptions |
io.github.cdklabs.projen.github.GitHubOptions |
Options for GitHub integration. |
gitpod |
java.lang.Boolean |
Add a Gitpod development environment. |
mergify |
java.lang.Boolean |
Whether mergify should be enabled on this repository or not. |
mergifyOptions |
io.github.cdklabs.projen.github.MergifyOptions |
Options for mergify. |
projectType |
io.github.cdklabs.projen.ProjectType |
Which type of project this is (library/app). |
projenCredentials |
io.github.cdklabs.projen.github.GithubCredentials |
Choose a method of providing GitHub API access for projen workflows. |
projenTokenSecret |
java.lang.String |
The name of a secret which includes a GitHub Personal Access Token to be used by projen workflows. |
readme |
io.github.cdklabs.projen.SampleReadmeProps |
The README setup. |
stale |
java.lang.Boolean |
Auto-close of stale issues and pull request. |
staleOptions |
io.github.cdklabs.projen.github.StaleOptions |
Auto-close stale issues and pull requests. |
vscode |
java.lang.Boolean |
Enable VSCode integration. |
allowLibraryDependencies |
java.lang.Boolean |
Allow the project to include peerDependencies and bundledDependencies. |
authorEmail |
java.lang.String |
Author's e-mail. |
authorName |
java.lang.String |
Author's name. |
authorOrganization |
java.lang.Boolean |
Is the author an organization. |
authorUrl |
java.lang.String |
Author's URL / Website. |
autoDetectBin |
java.lang.Boolean |
Automatically add all executables under the bin directory to your package.json file under the bin section. |
bin |
java.util.Map |
Binary programs vended with your module. |
bugsEmail |
java.lang.String |
The email address to which issues should be reported. |
bugsUrl |
java.lang.String |
The url to your project's issue tracker. |
bundledDeps |
java.util.List |
List of dependencies to bundle into this module. |
codeArtifactOptions |
io.github.cdklabs.projen.javascript.CodeArtifactOptions |
Options for npm packages using AWS CodeArtifact. |
deps |
java.util.List |
Runtime dependencies of this module. |
description |
java.lang.String |
The description is just a string that helps people understand the purpose of the package. |
devDeps |
java.util.List |
Build dependencies for this module. |
entrypoint |
java.lang.String |
Module entrypoint (main in package.json). |
homepage |
java.lang.String |
Package's Homepage / Website. |
keywords |
java.util.List |
Keywords to include in package.json. |
license |
java.lang.String |
License's SPDX identifier. |
licensed |
java.lang.Boolean |
Indicates if a license should be added. |
maxNodeVersion |
java.lang.String |
Minimum node.js version to require via engines (inclusive). |
minNodeVersion |
java.lang.String |
Minimum Node.js version to require via package.json engines (inclusive). |
npmAccess |
io.github.cdklabs.projen.javascript.NpmAccess |
Access level of the npm package. |
npmProvenance |
java.lang.Boolean |
Should provenance statements be generated when the package is published. |
npmRegistry |
java.lang.String |
The host name of the npm registry to publish to. |
npmRegistryUrl |
java.lang.String |
The base URL of the npm package registry. |
npmTokenSecret |
java.lang.String |
GitHub secret which contains the NPM token to use when publishing packages. |
packageManager |
io.github.cdklabs.projen.javascript.NodePackageManager |
The Node Package Manager used to execute scripts. |
packageName |
java.lang.String |
The "name" in package.json. |
peerDependencyOptions |
io.github.cdklabs.projen.javascript.PeerDependencyOptions |
Options for peerDeps. |
peerDeps |
java.util.List |
Peer dependencies for this module. |
pnpmVersion |
java.lang.String |
The version of PNPM to use if using PNPM as a package manager. |
repository |
java.lang.String |
The repository is the location where the actual code for your package lives. |
repositoryDirectory |
java.lang.String |
If the package.json for your package is not in the root directory (for example if it is part of a monorepo), you can specify the directory in which it lives. |
scopedPackagesOptions |
java.util.List |
Options for privately hosted scoped packages. |
scripts |
java.util.Map |
npm scripts to include. |
stability |
java.lang.String |
Package's Stability. |
yarnBerryOptions |
io.github.cdklabs.projen.javascript.YarnBerryOptions |
Options for Yarn Berry. |
jsiiReleaseVersion |
java.lang.String |
Version requirement of publib which is used to publish modules to npm. |
majorVersion |
java.lang.Number |
Major version to release from the default branch. |
minMajorVersion |
java.lang.Number |
Minimal Major version to release. |
npmDistTag |
java.lang.String |
The npmDistTag to use when publishing from the default branch. |
postBuildSteps |
java.util.List |
Steps to execute after build as part of the release workflow. |
prerelease |
java.lang.String |
Bump versions from the default branch as pre-releases (e.g. "beta", "alpha", "pre"). |
publishDryRun |
java.lang.Boolean |
Instead of actually publishing to package managers, just print the publishing command. |
publishTasks |
java.lang.Boolean |
Define publishing tasks that can be executed manually as well as workflows. |
releasableCommits |
io.github.cdklabs.projen.ReleasableCommits |
Find commits that should be considered releasable Used to decide if a release is required. |
releaseBranches |
java.util.Map |
Defines additional release branches. |
releaseEveryCommit |
java.lang.Boolean |
Automatically release new versions every commit to one of branches in releaseBranches. |
releaseFailureIssue |
java.lang.Boolean |
Create a github issue on every failed publishing task. |
releaseFailureIssueLabel |
java.lang.String |
The label to apply to issues indicating publish failures. |
releaseSchedule |
java.lang.String |
CRON schedule to trigger new releases. |
releaseTagPrefix |
java.lang.String |
Automatically add the given prefix to release tags. Useful if you are releasing on multiple branches with overlapping version numbers. |
releaseTrigger |
io.github.cdklabs.projen.release.ReleaseTrigger |
The release trigger to use. |
releaseWorkflowName |
java.lang.String |
The name of the default release workflow. |
releaseWorkflowSetupSteps |
java.util.List |
A set of workflow steps to execute in order to setup the workflow container. |
versionrcOptions |
java.util.Map |
Custom configuration used when creating changelog with standard-version package. |
workflowContainerImage |
java.lang.String |
Container image to use for GitHub workflows. |
workflowRunsOn |
java.util.List |
Github Runner selection labels. |
workflowRunsOnGroup |
io.github.cdklabs.projen.GroupRunnerOptions |
Github Runner Group selection options. |
defaultReleaseBranch |
java.lang.String |
The name of the main release branch. |
artifactsDirectory |
java.lang.String |
A directory which will contain build artifacts. |
autoApproveUpgrades |
java.lang.Boolean |
Automatically approve deps upgrade PRs, allowing them to be merged by mergify (if configued). |
buildWorkflow |
java.lang.Boolean |
Define a GitHub workflow for building PRs. |
buildWorkflowOptions |
io.github.cdklabs.projen.javascript.BuildWorkflowOptions |
Options for PR build workflow. |
buildWorkflowTriggers |
io.github.cdklabs.projen.github.workflows.Triggers |
Build workflow triggers. |
bundlerOptions |
io.github.cdklabs.projen.javascript.BundlerOptions |
Options for Bundler. |
checkLicenses |
io.github.cdklabs.projen.javascript.LicenseCheckerOptions |
Configure which licenses should be deemed acceptable for use by dependencies. |
codeCov |
java.lang.Boolean |
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. |
codeCovTokenSecret |
java.lang.String |
Define the secret name for a specified https://codecov.io/ token A secret is required to send coverage for private repositories. |
copyrightOwner |
java.lang.String |
License copyright owner. |
copyrightPeriod |
java.lang.String |
The copyright years to put in the LICENSE file. |
dependabot |
java.lang.Boolean |
Use dependabot to handle dependency upgrades. |
dependabotOptions |
io.github.cdklabs.projen.github.DependabotOptions |
Options for dependabot. |
depsUpgrade |
java.lang.Boolean |
Use tasks and github workflows to handle dependency upgrades. |
depsUpgradeOptions |
io.github.cdklabs.projen.javascript.UpgradeDependenciesOptions |
Options for UpgradeDependencies. |
gitignore |
java.util.List |
Additional entries to .gitignore. |
jest |
java.lang.Boolean |
Setup jest unit tests. |
jestOptions |
io.github.cdklabs.projen.javascript.JestOptions |
Jest options. |
mutableBuild |
java.lang.Boolean |
Automatically update files modified during builds to pull-request branches. |
npmignore |
java.util.List |
Additional entries to .npmignore. |
npmignoreEnabled |
java.lang.Boolean |
Defines an .npmignore file. Normally this is only needed for libraries that are packaged as tarballs. |
npmIgnoreOptions |
io.github.cdklabs.projen.IgnoreFileOptions |
Configuration options for .npmignore file. |
package |
java.lang.Boolean |
Defines a package task that will produce an npm tarball under the artifacts directory (e.g. dist). |
prettier |
java.lang.Boolean |
Setup prettier. |
prettierOptions |
io.github.cdklabs.projen.javascript.PrettierOptions |
Prettier options. |
projenDevDependency |
java.lang.Boolean |
Indicates of "projen" should be installed as a devDependency. |
projenrcJs |
java.lang.Boolean |
Generate (once) .projenrc.js (in JavaScript). Set to false in order to disable .projenrc.js generation. |
projenrcJsOptions |
io.github.cdklabs.projen.javascript.ProjenrcOptions |
Options for .projenrc.js. |
projenVersion |
java.lang.String |
Version of projen to install. |
pullRequestTemplate |
java.lang.Boolean |
Include a GitHub pull request template. |
pullRequestTemplateContents |
java.util.List |
The contents of the pull request template. |
release |
java.lang.Boolean |
Add release management to this project. |
releaseToNpm |
java.lang.Boolean |
Automatically release to npm when new versions are introduced. |
releaseWorkflow |
java.lang.Boolean |
DEPRECATED: renamed to release. |
workflowBootstrapSteps |
java.util.List |
Workflow steps to use in order to bootstrap this repo. |
workflowGitIdentity |
io.github.cdklabs.projen.github.GitIdentity |
The git identity to use in workflows. |
workflowNodeVersion |
java.lang.String |
The node version to use in GitHub workflows. |
workflowPackageCache |
java.lang.Boolean |
Enable Node.js package cache in GitHub workflows. |
typeSpecOptions |
TypeSpecModelOptions |
TypeSpec model options. |
handlerLanguages |
java.util.List<Language> |
The languages users have specified for handler projects (if any). |
parsedSpecFile |
java.lang.String |
Path of the parsed/bundled OpenAPI specification (relative to the project root). |
nameRequired
public java.lang.String getName();
- Type: java.lang.String
- Default: $BASEDIR
This is the name of your project.
commitGeneratedOptional
public java.lang.Boolean getCommitGenerated();
- Type: java.lang.Boolean
- Default: true
Whether to commit the managed files by default.
gitIgnoreOptionsOptional
public IgnoreFileOptions getGitIgnoreOptions();
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptionsOptional
public GitOptions getGitOptions();
- Type: io.github.cdklabs.projen.GitOptions
Configuration options for git.
loggingOptional
public LoggerOptions getLogging();
- Type: io.github.cdklabs.projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
outdirOptional
public java.lang.String getOutdir();
- Type: java.lang.String
- Default: "."
The root directory of the project.
Relative to this directory, all files are synthesized.
If this project has a parent, this directory is relative to the parent directory and it cannot be the same as the parent or any of it's other subprojects.
parentOptional
public Project getParent();
- Type: io.github.cdklabs.projen.Project
The parent project, if this project is part of a bigger project.
projenCommandOptional
public java.lang.String getProjenCommand();
- Type: java.lang.String
- Default: "npx projen"
The shell command to use in order to run the projen CLI.
Can be used to customize in special environments.
projenrcJsonOptional
public java.lang.Boolean getProjenrcJson();
- Type: java.lang.Boolean
- Default: false
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation.
projenrcJsonOptionsOptional
public ProjenrcJsonOptions getProjenrcJsonOptions();
- Type: io.github.cdklabs.projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
renovatebotOptional
public java.lang.Boolean getRenovatebot();
- Type: java.lang.Boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptionsOptional
public RenovatebotOptions getRenovatebotOptions();
- Type: io.github.cdklabs.projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
autoApproveOptionsOptional
public AutoApproveOptions getAutoApproveOptions();
- Type: io.github.cdklabs.projen.github.AutoApproveOptions
- Default: auto approve is disabled
Enable and configure the 'auto approve' workflow.
autoMergeOptional
public java.lang.Boolean getAutoMerge();
- Type: java.lang.Boolean
- Default: true
Enable automatic merging on GitHub.
Has no effect if github.mergify
is set to false.
autoMergeOptionsOptional
public AutoMergeOptions getAutoMergeOptions();
- Type: io.github.cdklabs.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.
clobberOptional
public java.lang.Boolean getClobber();
- Type: java.lang.Boolean
- Default: true, but false for subprojects
Add a clobber task which resets the repo to origin.
devContainerOptional
public java.lang.Boolean getDevContainer();
- Type: java.lang.Boolean
- Default: false
Add a VSCode development environment (used for GitHub Codespaces).
githubOptional
public java.lang.Boolean getGithub();
- Type: java.lang.Boolean
- Default: true
Enable GitHub integration.
Enabled by default for root projects. Disabled for non-root projects.
githubOptionsOptional
public GitHubOptions getGithubOptions();
- Type: io.github.cdklabs.projen.github.GitHubOptions
- Default: see GitHubOptions
Options for GitHub integration.
gitpodOptional
public java.lang.Boolean getGitpod();
- Type: java.lang.Boolean
- Default: false
Add a Gitpod development environment.
~~mergify~~Optional
- Deprecated: use
githubOptions.mergifyinstead
public java.lang.Boolean getMergify();
- Type: java.lang.Boolean
- Default: true
Whether mergify should be enabled on this repository or not.
~~mergifyOptions~~Optional
- Deprecated: use
githubOptions.mergifyOptionsinstead
public MergifyOptions getMergifyOptions();
- Type: io.github.cdklabs.projen.github.MergifyOptions
- Default: default options
Options for mergify.
~~projectType~~Optional
- Deprecated: no longer supported at the base project level
public ProjectType getProjectType();
- Type: io.github.cdklabs.projen.ProjectType
- Default: ProjectType.UNKNOWN
Which type of project this is (library/app).
projenCredentialsOptional
public GithubCredentials getProjenCredentials();
- Type: io.github.cdklabs.projen.github.GithubCredentials
- Default: use a personal access token named PROJEN_GITHUB_TOKEN
Choose a method of providing GitHub API access for projen workflows.
~~projenTokenSecret~~Optional
- Deprecated: use
projenCredentials
public java.lang.String getProjenTokenSecret();
- Type: java.lang.String
- Default: "PROJEN_GITHUB_TOKEN"
The name of a secret which includes a GitHub Personal Access Token to be used by projen workflows.
This token needs to have the repo, workflows
and packages scope.
readmeOptional
public SampleReadmeProps getReadme();
- Type: io.github.cdklabs.projen.SampleReadmeProps
- Default: { filename: 'README.md', contents: '# replace this' }
The README setup.
Example
"{ filename: 'readme.md', contents: '# title' }"
staleOptional
public java.lang.Boolean getStale();
- Type: java.lang.Boolean
- Default: false
Auto-close of stale issues and pull request.
See staleOptions for options.
staleOptionsOptional
public StaleOptions getStaleOptions();
- Type: io.github.cdklabs.projen.github.StaleOptions
- Default: see defaults in
StaleOptions
Auto-close stale issues and pull requests.
To disable set stale to false.
vscodeOptional
public java.lang.Boolean getVscode();
- Type: java.lang.Boolean
- Default: true
Enable VSCode integration.
Enabled by default for root projects. Disabled for non-root projects.
allowLibraryDependenciesOptional
public java.lang.Boolean getAllowLibraryDependencies();
- Type: java.lang.Boolean
- Default: true
Allow the project to include peerDependencies and bundledDependencies.
This is normally only allowed for libraries. For apps, there's no meaning for specifying these.
authorEmailOptional
public java.lang.String getAuthorEmail();
- Type: java.lang.String
Author's e-mail.
authorNameOptional
public java.lang.String getAuthorName();
- Type: java.lang.String
Author's name.
authorOrganizationOptional
public java.lang.Boolean getAuthorOrganization();
- Type: java.lang.Boolean
Is the author an organization.
authorUrlOptional
public java.lang.String getAuthorUrl();
- Type: java.lang.String
Author's URL / Website.
autoDetectBinOptional
public java.lang.Boolean getAutoDetectBin();
- Type: java.lang.Boolean
- Default: true
Automatically add all executables under the bin directory to your package.json file under the bin section.
binOptional
public java.util.Map<java.lang.String, java.lang.String> getBin();
- Type: java.util.Map
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.
bugsEmailOptional
public java.lang.String getBugsEmail();
- Type: java.lang.String
The email address to which issues should be reported.
bugsUrlOptional
public java.lang.String getBugsUrl();
- Type: java.lang.String
The url to your project's issue tracker.
bundledDepsOptional
public java.util.List<java.lang.String> getBundledDeps();
- Type: java.util.List
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.
codeArtifactOptionsOptional
public CodeArtifactOptions getCodeArtifactOptions();
- Type: io.github.cdklabs.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
depsOptional
public java.util.List<java.lang.String> getDeps();
- Type: java.util.List
- Default: []
Runtime dependencies of this module.
The recommendation is to only specify the module name here (e.g.
express). This will behave similar to yarn add or npm install in the
sense that it will add the module as a dependency to your package.json
file with the latest version (^). You can specify semver requirements in
the same syntax passed to npm i or yarn add (e.g. express@^2) and
this will be what you package.json will eventually include.
Example
[ 'express', 'lodash', 'foo@^2' ]
descriptionOptional
public java.lang.String getDescription();
- Type: java.lang.String
The description is just a string that helps people understand the purpose of the package.
It can be used when searching for packages in a package manager as well. See https://classic.yarnpkg.com/en/docs/package-json/#toc-description
devDepsOptional
public java.util.List<java.lang.String> getDevDeps();
- Type: java.util.List
- Default: []
Build dependencies for this module.
These dependencies will only be available in your build environment but will not be fetched when this module is consumed.
The recommendation is to only specify the module name here (e.g.
express). This will behave similar to yarn add or npm install in the
sense that it will add the module as a dependency to your package.json
file with the latest version (^). You can specify semver requirements in
the same syntax passed to npm i or yarn add (e.g. express@^2) and
this will be what you package.json will eventually include.
Example
[ 'typescript', '@types/express' ]
entrypointOptional
public java.lang.String getEntrypoint();
- Type: java.lang.String
- Default: "lib/index.js"
Module entrypoint (main in package.json).
Set to an empty string to not include main in your package.json
homepageOptional
public java.lang.String getHomepage();
- Type: java.lang.String
Package's Homepage / Website.
keywordsOptional
public java.util.List<java.lang.String> getKeywords();
- Type: java.util.List
Keywords to include in package.json.
licenseOptional
public java.lang.String getLicense();
- Type: java.lang.String
- Default: "Apache-2.0"
License's SPDX identifier.
See https://github.com/projen/projen/tree/main/license-text for a list of supported licenses.
Use the licensed option if you want to no license to be specified.
licensedOptional
public java.lang.Boolean getLicensed();
- Type: java.lang.Boolean
- Default: true
Indicates if a license should be added.
maxNodeVersionOptional
public java.lang.String getMaxNodeVersion();
- Type: java.lang.String
- Default: no max
Minimum node.js version to require via engines (inclusive).
minNodeVersionOptional
public java.lang.String getMinNodeVersion();
- Type: java.lang.String
- Default: no "engines" specified
Minimum Node.js version to require via package.json engines (inclusive).
npmAccessOptional
public NpmAccess getNpmAccess();
- Type: io.github.cdklabs.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.
npmProvenanceOptional
public java.lang.Boolean getNpmProvenance();
- Type: java.lang.Boolean
- 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.
~~npmRegistry~~Optional
- Deprecated: use
npmRegistryUrlinstead
public java.lang.String getNpmRegistry();
- Type: java.lang.String
The host name of the npm registry to publish to.
Cannot be set together with npmRegistryUrl.
npmRegistryUrlOptional
public java.lang.String getNpmRegistryUrl();
- Type: java.lang.String
- Default: "https://registry.npmjs.org"
The base URL of the npm package registry.
Must be a URL (e.g. start with "https://" or "http://")
npmTokenSecretOptional
public java.lang.String getNpmTokenSecret();
- Type: java.lang.String
- Default: "NPM_TOKEN"
GitHub secret which contains the NPM token to use when publishing packages.
packageManagerOptional
public NodePackageManager getPackageManager();
- Type: io.github.cdklabs.projen.javascript.NodePackageManager
- Default: NodePackageManager.YARN_CLASSIC
The Node Package Manager used to execute scripts.
packageNameOptional
public java.lang.String getPackageName();
- Type: java.lang.String
- Default: defaults to project name
The "name" in package.json.
peerDependencyOptionsOptional
public PeerDependencyOptions getPeerDependencyOptions();
- Type: io.github.cdklabs.projen.javascript.PeerDependencyOptions
Options for peerDeps.
peerDepsOptional
public java.util.List<java.lang.String> getPeerDeps();
- Type: java.util.List
- 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.
pnpmVersionOptional
public java.lang.String getPnpmVersion();
- Type: java.lang.String
- Default: "7"
The version of PNPM to use if using PNPM as a package manager.
repositoryOptional
public java.lang.String getRepository();
- Type: java.lang.String
The repository is the location where the actual code for your package lives.
See https://classic.yarnpkg.com/en/docs/package-json/#toc-repository
repositoryDirectoryOptional
public java.lang.String getRepositoryDirectory();
- Type: java.lang.String
If the package.json for your package is not in the root directory (for example if it is part of a monorepo), you can specify the directory in which it lives.
scopedPackagesOptionsOptional
public java.util.List<ScopedPackagesOptions> getScopedPackagesOptions();
- Type: java.util.List
- Default: fetch all scoped packages from the public npm registry
Options for privately hosted scoped packages.
~~scripts~~Optional
- Deprecated: use
project.addTask()orpackage.setScript()
public java.util.Map<java.lang.String, java.lang.String> getScripts();
- Type: java.util.Map
- 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.
stabilityOptional
public java.lang.String getStability();
- Type: java.lang.String
Package's Stability.
yarnBerryOptionsOptional
public YarnBerryOptions getYarnBerryOptions();
- Type: io.github.cdklabs.projen.javascript.YarnBerryOptions
- Default: Yarn Berry v4 with all default options
Options for Yarn Berry.
jsiiReleaseVersionOptional
public java.lang.String getJsiiReleaseVersion();
- Type: java.lang.String
- Default: "latest"
Version requirement of publib which is used to publish modules to npm.
majorVersionOptional
public java.lang.Number getMajorVersion();
- Type: java.lang.Number
- Default: Major version is not enforced.
Major version to release from the default branch.
If this is specified, we bump the latest version of this major version line. If not specified, we bump the global latest version.
minMajorVersionOptional
public java.lang.Number getMinMajorVersion();
- Type: java.lang.Number
- Default: No minimum version is being enforced
Minimal Major version to release.
This can be useful to set to 1, as breaking changes before the 1.x major release are not incrementing the major version number.
Can not be set together with majorVersion.
npmDistTagOptional
public java.lang.String getNpmDistTag();
- Type: java.lang.String
- Default: "latest"
The npmDistTag to use when publishing from the default branch.
To set the npm dist-tag for release branches, set the npmDistTag property
for each branch.
postBuildStepsOptional
public java.util.List<JobStep> getPostBuildSteps();
- Type: java.util.List
- Default: []
Steps to execute after build as part of the release workflow.
prereleaseOptional
public java.lang.String getPrerelease();
- Type: java.lang.String
- Default: normal semantic versions
Bump versions from the default branch as pre-releases (e.g. "beta", "alpha", "pre").
publishDryRunOptional
public java.lang.Boolean getPublishDryRun();
- Type: java.lang.Boolean
- Default: false
Instead of actually publishing to package managers, just print the publishing command.
publishTasksOptional
public java.lang.Boolean getPublishTasks();
- Type: java.lang.Boolean
- Default: false
Define publishing tasks that can be executed manually as well as workflows.
Normally, publishing only happens within automated workflows. Enable this in order to create a publishing task for each publishing activity.
releasableCommitsOptional
public ReleasableCommits getReleasableCommits();
- Type: io.github.cdklabs.projen.ReleasableCommits
- Default: ReleasableCommits.everyCommit()
Find commits that should be considered releasable Used to decide if a release is required.
releaseBranchesOptional
public java.util.Map<java.lang.String, BranchOptions> getReleaseBranches();
- Type: java.util.Map
- Default: no additional branches are used for release. you can use
addBranch()to add additional branches.
Defines additional release branches.
A workflow will be created for each
release branch which will publish releases from commits in this branch.
Each release branch must be assigned a major version number which is used
to enforce that versions published from that branch always use that major
version. If multiple branches are used, the majorVersion field must also
be provided for the default branch.
~~releaseEveryCommit~~Optional
- Deprecated: Use
releaseTrigger: ReleaseTrigger.continuous()instead
public java.lang.Boolean getReleaseEveryCommit();
- Type: java.lang.Boolean
- Default: true
Automatically release new versions every commit to one of branches in releaseBranches.
releaseFailureIssueOptional
public java.lang.Boolean getReleaseFailureIssue();
- Type: java.lang.Boolean
- Default: false
Create a github issue on every failed publishing task.
releaseFailureIssueLabelOptional
public java.lang.String getReleaseFailureIssueLabel();
- Type: java.lang.String
- Default: "failed-release"
The label to apply to issues indicating publish failures.
Only applies if releaseFailureIssue is true.
~~releaseSchedule~~Optional
- Deprecated: Use
releaseTrigger: ReleaseTrigger.scheduled()instead
public java.lang.String getReleaseSchedule();
- Type: java.lang.String
- Default: no scheduled releases
CRON schedule to trigger new releases.
releaseTagPrefixOptional
public java.lang.String getReleaseTagPrefix();
- Type: java.lang.String
- Default: "v"
Automatically add the given prefix to release tags. Useful if you are releasing on multiple branches with overlapping version numbers.
Note: this prefix is used to detect the latest tagged version when bumping, so if you change this on a project with an existing version history, you may need to manually tag your latest release with the new prefix.
releaseTriggerOptional
public ReleaseTrigger getReleaseTrigger();
- Type: io.github.cdklabs.projen.release.ReleaseTrigger
- Default: Continuous releases (
ReleaseTrigger.continuous())
The release trigger to use.
releaseWorkflowNameOptional
public java.lang.String getReleaseWorkflowName();
- Type: java.lang.String
- Default: "release"
The name of the default release workflow.
releaseWorkflowSetupStepsOptional
public java.util.List<JobStep> getReleaseWorkflowSetupSteps();
- Type: java.util.List
A set of workflow steps to execute in order to setup the workflow container.
versionrcOptionsOptional
public java.util.Map<java.lang.String, java.lang.Object> getVersionrcOptions();
- Type: java.util.Map
- 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.
workflowContainerImageOptional
public java.lang.String getWorkflowContainerImage();
- Type: java.lang.String
- Default: default image
Container image to use for GitHub workflows.
workflowRunsOnOptional
public java.util.List<java.lang.String> getWorkflowRunsOn();
- Type: java.util.List
- Default: ["ubuntu-latest"]
Github Runner selection labels.
workflowRunsOnGroupOptional
public GroupRunnerOptions getWorkflowRunsOnGroup();
- Type: io.github.cdklabs.projen.GroupRunnerOptions
Github Runner Group selection options.
defaultReleaseBranchRequired
public java.lang.String getDefaultReleaseBranch();
- Type: java.lang.String
- Default: "main"
The name of the main release branch.
artifactsDirectoryOptional
public java.lang.String getArtifactsDirectory();
- Type: java.lang.String
- Default: "dist"
A directory which will contain build artifacts.
autoApproveUpgradesOptional
public java.lang.Boolean getAutoApproveUpgrades();
- Type: java.lang.Boolean
- Default: true
Automatically approve deps upgrade PRs, allowing them to be merged by mergify (if configued).
Throw if set to true but autoApproveOptions are not defined.
buildWorkflowOptional
public java.lang.Boolean getBuildWorkflow();
- Type: java.lang.Boolean
- Default: true if not a subproject
Define a GitHub workflow for building PRs.
buildWorkflowOptionsOptional
public BuildWorkflowOptions getBuildWorkflowOptions();
- Type: io.github.cdklabs.projen.javascript.BuildWorkflowOptions
Options for PR build workflow.
~~buildWorkflowTriggers~~Optional
- Deprecated: - Use
buildWorkflowOptions.workflowTriggers
public Triggers getBuildWorkflowTriggers();
- Type: io.github.cdklabs.projen.github.workflows.Triggers
- Default: "{ pullRequest: {}, workflowDispatch: {} }"
Build workflow triggers.
bundlerOptionsOptional
public BundlerOptions getBundlerOptions();
- Type: io.github.cdklabs.projen.javascript.BundlerOptions
Options for Bundler.
checkLicensesOptional
public LicenseCheckerOptions getCheckLicenses();
- Type: io.github.cdklabs.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.
codeCovOptional
public java.lang.Boolean getCodeCov();
- Type: java.lang.Boolean
- 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.
codeCovTokenSecretOptional
public java.lang.String getCodeCovTokenSecret();
- Type: java.lang.String
- Default: if this option is not specified, only public repositories are supported
Define the secret name for a specified https://codecov.io/ token A secret is required to send coverage for private repositories.
copyrightOwnerOptional
public java.lang.String getCopyrightOwner();
- Type: java.lang.String
- Default: defaults to the value of authorName or "" if
authorNameis undefined.
License copyright owner.
copyrightPeriodOptional
public java.lang.String getCopyrightPeriod();
- Type: java.lang.String
- Default: current year
The copyright years to put in the LICENSE file.
dependabotOptional
public java.lang.Boolean getDependabot();
- Type: java.lang.Boolean
- Default: false
Use dependabot to handle dependency upgrades.
Cannot be used in conjunction with depsUpgrade.
dependabotOptionsOptional
public DependabotOptions getDependabotOptions();
- Type: io.github.cdklabs.projen.github.DependabotOptions
- Default: default options
Options for dependabot.
depsUpgradeOptional
public java.lang.Boolean getDepsUpgrade();
- Type: java.lang.Boolean
- Default: true
Use tasks and github workflows to handle dependency upgrades.
Cannot be used in conjunction with dependabot.
depsUpgradeOptionsOptional
public UpgradeDependenciesOptions getDepsUpgradeOptions();
- Type: io.github.cdklabs.projen.javascript.UpgradeDependenciesOptions
- Default: default options
Options for UpgradeDependencies.
gitignoreOptional
public java.util.List<java.lang.String> getGitignore();
- Type: java.util.List
Additional entries to .gitignore.
jestOptional
public java.lang.Boolean getJest();
- Type: java.lang.Boolean
- Default: true
Setup jest unit tests.
jestOptionsOptional
public JestOptions getJestOptions();
- Type: io.github.cdklabs.projen.javascript.JestOptions
- Default: default options
Jest options.
~~mutableBuild~~Optional
- Deprecated: - Use
buildWorkflowOptions.mutableBuild
public java.lang.Boolean getMutableBuild();
- Type: java.lang.Boolean
- Default: true
Automatically update files modified during builds to pull-request branches.
This means that any files synthesized by projen or e.g. test snapshots will always be up-to-date before a PR is merged.
Implies that PR builds do not have anti-tamper checks.
~~npmignore~~Optional
- Deprecated: - use
project.addPackageIgnore
public java.util.List<java.lang.String> getNpmignore();
- Type: java.util.List
Additional entries to .npmignore.
npmignoreEnabledOptional
public java.lang.Boolean getNpmignoreEnabled();
- Type: java.lang.Boolean
- Default: true
Defines an .npmignore file. Normally this is only needed for libraries that are packaged as tarballs.
npmIgnoreOptionsOptional
public IgnoreFileOptions getNpmIgnoreOptions();
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .npmignore file.
packageOptional
public java.lang.Boolean getPackage();
- Type: java.lang.Boolean
- Default: true
Defines a package task that will produce an npm tarball under the artifacts directory (e.g. dist).
prettierOptional
public java.lang.Boolean getPrettier();
- Type: java.lang.Boolean
- Default: false
Setup prettier.
prettierOptionsOptional
public PrettierOptions getPrettierOptions();
- Type: io.github.cdklabs.projen.javascript.PrettierOptions
- Default: default options
Prettier options.
projenDevDependencyOptional
public java.lang.Boolean getProjenDevDependency();
- Type: java.lang.Boolean
- Default: true if not a subproject
Indicates of "projen" should be installed as a devDependency.
projenrcJsOptional
public java.lang.Boolean getProjenrcJs();
- Type: java.lang.Boolean
- Default: true if projenrcJson is false
Generate (once) .projenrc.js (in JavaScript). Set to false in order to disable .projenrc.js generation.
projenrcJsOptionsOptional
public ProjenrcOptions getProjenrcJsOptions();
- Type: io.github.cdklabs.projen.javascript.ProjenrcOptions
- Default: default options
Options for .projenrc.js.
projenVersionOptional
public java.lang.String getProjenVersion();
- Type: java.lang.String
- Default: Defaults to the latest version.
Version of projen to install.
pullRequestTemplateOptional
public java.lang.Boolean getPullRequestTemplate();
- Type: java.lang.Boolean
- Default: true
Include a GitHub pull request template.
pullRequestTemplateContentsOptional
public java.util.List<java.lang.String> getPullRequestTemplateContents();
- Type: java.util.List
- Default: default content
The contents of the pull request template.
releaseOptional
public java.lang.Boolean getRelease();
- Type: java.lang.Boolean
- Default: true (false for subprojects)
Add release management to this project.
releaseToNpmOptional
public java.lang.Boolean getReleaseToNpm();
- Type: java.lang.Boolean
- Default: false
Automatically release to npm when new versions are introduced.
~~releaseWorkflow~~Optional
- Deprecated: see
release.
public java.lang.Boolean getReleaseWorkflow();
- Type: java.lang.Boolean
- Default: true if not a subproject
DEPRECATED: renamed to release.
workflowBootstrapStepsOptional
public java.util.List<JobStep> getWorkflowBootstrapSteps();
- Type: java.util.List
- Default: "yarn install --frozen-lockfile && yarn projen"
Workflow steps to use in order to bootstrap this repo.
workflowGitIdentityOptional
public GitIdentity getWorkflowGitIdentity();
- Type: io.github.cdklabs.projen.github.GitIdentity
- Default: GitHub Actions
The git identity to use in workflows.
workflowNodeVersionOptional
public java.lang.String getWorkflowNodeVersion();
- Type: java.lang.String
- Default: same as
minNodeVersion
The node version to use in GitHub workflows.
workflowPackageCacheOptional
public java.lang.Boolean getWorkflowPackageCache();
- Type: java.lang.Boolean
- Default: false
Enable Node.js package cache in GitHub workflows.
typeSpecOptionsRequired
public TypeSpecModelOptions getTypeSpecOptions();
- Type: TypeSpecModelOptions
TypeSpec model options.
handlerLanguagesOptional
public java.util.List<Language> getHandlerLanguages();
- Type: java.util.List<Language>
The languages users have specified for handler projects (if any).
parsedSpecFileRequired
public java.lang.String getParsedSpecFile();
- Type: java.lang.String
Path of the parsed/bundled OpenAPI specification (relative to the project root).
TypeSpecProjectDefinitionOptions
Options for a TypeSpec model project.
Initializer
import software.aws.pdk.type_safe_api.TypeSpecProjectDefinitionOptions;
TypeSpecProjectDefinitionOptions.builder()
.typeSpecOptions(TypeSpecModelOptions)
// .handlerLanguages(java.util.List<Language>)
.build();
Properties
| Name | Type | Description |
|---|---|---|
typeSpecOptions |
TypeSpecModelOptions |
TypeSpec model options. |
handlerLanguages |
java.util.List<Language> |
The languages users have specified for handler projects (if any). |
typeSpecOptionsRequired
public TypeSpecModelOptions getTypeSpecOptions();
- Type: TypeSpecModelOptions
TypeSpec model options.
handlerLanguagesOptional
public java.util.List<Language> getHandlerLanguages();
- Type: java.util.List<Language>
The languages users have specified for handler projects (if any).
WebSocketApiProps
WebSocketApiProps.
Initializer
import software.aws.pdk.type_safe_api.WebSocketApiProps;
WebSocketApiProps.builder()
// .apiKeySelectionExpression(WebSocketApiKeySelectionExpression)
// .apiName(java.lang.String)
// .description(java.lang.String)
.build();
Properties
| Name | Type | Description |
|---|---|---|
apiKeySelectionExpression |
software.amazon.awscdk.services.apigatewayv2.WebSocketApiKeySelectionExpression |
An API key selection expression. |
apiName |
java.lang.String |
Name for the WebSocket API resource. |
description |
java.lang.String |
The description of the API. |
apiKeySelectionExpressionOptional
public WebSocketApiKeySelectionExpression getApiKeySelectionExpression();
- Type: software.amazon.awscdk.services.apigatewayv2.WebSocketApiKeySelectionExpression
- Default: Key is not required to access these APIs
An API key selection expression.
Providing this option will require an API Key be provided to access the API.
apiNameOptional
public java.lang.String getApiName();
- Type: java.lang.String
- Default: id of the WebSocketApi construct.
Name for the WebSocket API resource.
descriptionOptional
public java.lang.String getDescription();
- Type: java.lang.String
- Default: none
The description of the API.
WebSocketDocumentationConfiguration
Configuration for generated documentation.
Initializer
import software.aws.pdk.type_safe_api.WebSocketDocumentationConfiguration;
WebSocketDocumentationConfiguration.builder()
.formats(java.util.List<WebSocketDocumentationFormat>)
// .options(GeneratedWebSocketDocumentationOptions)
.build();
Properties
| Name | Type | Description |
|---|---|---|
formats |
java.util.List<WebSocketDocumentationFormat> |
Formats for generated documentation. |
options |
GeneratedWebSocketDocumentationOptions |
Options for the generated documentation projects. |
formatsRequired
public java.util.List<WebSocketDocumentationFormat> getFormats();
- Type: java.util.List<WebSocketDocumentationFormat>
Formats for generated documentation.
optionsOptional
public GeneratedWebSocketDocumentationOptions getOptions();
Options for the generated documentation projects.
Note that only those provided for the specified formats will apply
WebSocketHandlersConfiguration
Configuration for generated lambda handlers.
Initializer
import software.aws.pdk.type_safe_api.WebSocketHandlersConfiguration;
WebSocketHandlersConfiguration.builder()
.languages(java.util.List<Language>)
// .options(GeneratedHandlersCodeOptions)
.build();
Properties
| Name | Type | Description |
|---|---|---|
languages |
java.util.List<Language> |
The languages lambda handlers are written in. |
options |
GeneratedHandlersCodeOptions |
Options for the infrastructure package. |
languagesRequired
public java.util.List<Language> getLanguages();
- Type: java.util.List<Language>
The languages lambda handlers are written in.
Specify multiple languages if you wish to implement different operations as AWS Lambda functions in different languages.
optionsOptional
public GeneratedHandlersCodeOptions getOptions();
Options for the infrastructure package.
Note that only those provided for the specified language will apply.
WebSocketInfrastructureConfiguration
Configuration for generated infrastructure.
Initializer
import software.aws.pdk.type_safe_api.WebSocketInfrastructureConfiguration;
WebSocketInfrastructureConfiguration.builder()
.language(Language)
// .options(GeneratedInfrastructureCodeOptions)
.build();
Properties
| Name | Type | Description |
|---|---|---|
language |
Language |
The language to generate the type-safe CDK infrastructure in. |
options |
GeneratedInfrastructureCodeOptions |
Options for the infrastructure package. |
languageRequired
public Language getLanguage();
- Type: Language
The language to generate the type-safe CDK infrastructure in.
optionsOptional
public GeneratedInfrastructureCodeOptions getOptions();
Options for the infrastructure package.
Note that only those provided for the specified language will apply.
WebSocketLibraryConfiguration
Configuration for generated libraries.
Initializer
import software.aws.pdk.type_safe_api.WebSocketLibraryConfiguration;
WebSocketLibraryConfiguration.builder()
.libraries(java.util.List<WebSocketLibrary>)
// .options(GeneratedWebSocketLibraryOptions)
.build();
Properties
| Name | Type | Description |
|---|---|---|
libraries |
java.util.List<WebSocketLibrary> |
The libraries to generate. |
options |
GeneratedWebSocketLibraryOptions |
Options for the generated library package. |
librariesRequired
public java.util.List<WebSocketLibrary> getLibraries();
- Type: java.util.List<WebSocketLibrary>
The libraries to generate.
optionsOptional
public GeneratedWebSocketLibraryOptions getOptions();
Options for the generated library package.
Note that only options for the specified libraries will apply
WebSocketModelProject
WebSocket model project references.
Initializer
import software.aws.pdk.type_safe_api.WebSocketModelProject;
WebSocketModelProject.builder()
.apiName(java.lang.String)
.outdir(java.lang.String)
.parsedSpecFile(java.lang.String)
.asyncApiSpecFile(java.lang.String)
// .openapi(OpenApiAsyncModelProject)
// .smithy(SmithyAsyncModelProject)
// .typeSpec(TypeSpecAsyncModelProject)
.build();
Properties
| Name | Type | Description |
|---|---|---|
apiName |
java.lang.String |
Name of the API. |
outdir |
java.lang.String |
Directory of the model project. |
parsedSpecFile |
java.lang.String |
Name of the bundled OpenAPI specification file. |
asyncApiSpecFile |
java.lang.String |
File name of the generated async api specification. |
openapi |
OpenApiAsyncModelProject |
Reference to the OpenAPI model project. |
smithy |
SmithyAsyncModelProject |
Reference to the Smithy model project. |
typeSpec |
TypeSpecAsyncModelProject |
Reference to the TypeSpec model project. |
apiNameRequired
public java.lang.String getApiName();
- Type: java.lang.String
Name of the API.
outdirRequired
public java.lang.String getOutdir();
- Type: java.lang.String
Directory of the model project.
parsedSpecFileRequired
public java.lang.String getParsedSpecFile();
- Type: java.lang.String
Name of the bundled OpenAPI specification file.
asyncApiSpecFileRequired
public java.lang.String getAsyncApiSpecFile();
- Type: java.lang.String
File name of the generated async api specification.
openapiOptional
public OpenApiAsyncModelProject getOpenapi();
- Type: OpenApiAsyncModelProject
Reference to the OpenAPI model project.
Will be defined if the model language is OpenAPI
smithyOptional
public SmithyAsyncModelProject getSmithy();
- Type: SmithyAsyncModelProject
Reference to the Smithy model project.
Will be defined if the model language is Smithy
typeSpecOptional
public TypeSpecAsyncModelProject getTypeSpec();
Reference to the TypeSpec model project.
Will be defined if the model language is TypeSpec
WebsocketOperationDetails
Initializer
import software.aws.pdk.type_safe_api.WebsocketOperationDetails;
WebsocketOperationDetails.builder()
.path(java.lang.String)
.build();
Properties
| Name | Type | Description |
|---|---|---|
path |
java.lang.String |
Path in the OpenAPI spec for the operation. |
pathRequired
public java.lang.String getPath();
- Type: java.lang.String
Path in the OpenAPI spec for the operation.
WebSocketRuntimeConfiguration
Configuration for generated runtime projects.
Initializer
import software.aws.pdk.type_safe_api.WebSocketRuntimeConfiguration;
WebSocketRuntimeConfiguration.builder()
.languages(java.util.List<Language>)
// .options(GeneratedRuntimeCodeOptions)
.build();
Properties
| Name | Type | Description |
|---|---|---|
languages |
java.util.List<Language> |
The languages that runtime projects will be generated in. |
options |
GeneratedRuntimeCodeOptions |
Options for the generated runtimes. |
languagesRequired
public java.util.List<Language> getLanguages();
- Type: java.util.List<Language>
The languages that runtime projects will be generated in.
These projects can be used to provide type safety for both client and server projects.
optionsOptional
public GeneratedRuntimeCodeOptions getOptions();
Options for the generated runtimes.
Note that only options provided for the specified languages will apply.
WebSocketStageProps
WebSocketStageProps.
Initializer
import software.aws.pdk.type_safe_api.WebSocketStageProps;
WebSocketStageProps.builder()
// .autoDeploy(java.lang.Boolean)
// .description(java.lang.String)
// .domainMapping(DomainMappingOptions)
// .stageName(java.lang.String)
// .throttle(ThrottleSettings)
.build();
Properties
| Name | Type | Description |
|---|---|---|
autoDeploy |
java.lang.Boolean |
Whether updates to an API automatically trigger a new deployment. |
description |
java.lang.String |
The description for the API stage. |
domainMapping |
software.amazon.awscdk.services.apigatewayv2.DomainMappingOptions |
The options for custom domain and api mapping. |
stageName |
java.lang.String |
The name of the stage. |
throttle |
software.amazon.awscdk.services.apigatewayv2.ThrottleSettings |
Throttle settings for the routes of this stage. |
autoDeployOptional
public java.lang.Boolean getAutoDeploy();
- Type: java.lang.Boolean
- Default: false
Whether updates to an API automatically trigger a new deployment.
descriptionOptional
public java.lang.String getDescription();
- Type: java.lang.String
- Default: no description
The description for the API stage.
domainMappingOptional
public DomainMappingOptions getDomainMapping();
- Type: software.amazon.awscdk.services.apigatewayv2.DomainMappingOptions
- Default: no custom domain and api mapping configuration
The options for custom domain and api mapping.
stageNameOptional
public java.lang.String getStageName();
- Type: java.lang.String
The name of the stage.
throttleOptional
public ThrottleSettings getThrottle();
- Type: software.amazon.awscdk.services.apigatewayv2.ThrottleSettings
- Default: no throttling configuration
Throttle settings for the routes of this stage.
Classes
Authorizer
An authorizer for authorizing API requests.
Initializers
import software.aws.pdk.type_safe_api.Authorizer;
Authorizer.Builder.create()
.authorizationType(AuthorizationType)
.authorizerId(java.lang.String)
// .authorizationScopes(java.util.List<java.lang.String>)
.build();
| Name | Type | Description |
|---|---|---|
authorizationType |
software.amazon.awscdk.services.apigateway.AuthorizationType |
The type of the authorizer. |
authorizerId |
java.lang.String |
The unique identifier for the authorizer. |
authorizationScopes |
java.util.List |
Scopes for the authorizer, if any. |
authorizationTypeRequired
- Type: software.amazon.awscdk.services.apigateway.AuthorizationType
The type of the authorizer.
authorizerIdRequired
- Type: java.lang.String
The unique identifier for the authorizer.
authorizationScopesOptional
- Type: java.util.List
Scopes for the authorizer, if any.
Properties
| Name | Type | Description |
|---|---|---|
authorizationType |
software.amazon.awscdk.services.apigateway.AuthorizationType |
The type of the authorizer. |
authorizerId |
java.lang.String |
The unique identifier for the authorizer. |
authorizationScopes |
java.util.List |
Scopes for the authorizer, if any. |
authorizationTypeRequired
public AuthorizationType getAuthorizationType();
- Type: software.amazon.awscdk.services.apigateway.AuthorizationType
The type of the authorizer.
authorizerIdRequired
public java.lang.String getAuthorizerId();
- Type: java.lang.String
The unique identifier for the authorizer.
authorizationScopesOptional
public java.util.List<java.lang.String> getAuthorizationScopes();
- Type: java.util.List
Scopes for the authorizer, if any.
Authorizers
Class used to construct authorizers for use in the OpenApiGatewayLambdaApi construct.
Initializers
import software.aws.pdk.type_safe_api.Authorizers;
new Authorizers();
| Name | Type | Description |
|---|---|---|
Static Functions
| Name | Description |
|---|---|
cognito |
A Cognito User Pools authorizer. |
custom |
A custom authorizer. |
iam |
An IAM authorizer which uses AWS signature version 4 to authorize requests. |
none |
No authorizer. |
cognito
import software.aws.pdk.type_safe_api.Authorizers;
Authorizers.cognito(CognitoAuthorizerProps props)
A Cognito User Pools authorizer.
propsRequired
- Type: CognitoAuthorizerProps
custom
import software.aws.pdk.type_safe_api.Authorizers;
Authorizers.custom(CustomAuthorizerProps props)
A custom authorizer.
propsRequired
- Type: CustomAuthorizerProps
iam
import software.aws.pdk.type_safe_api.Authorizers;
Authorizers.iam()
An IAM authorizer which uses AWS signature version 4 to authorize requests.
none
import software.aws.pdk.type_safe_api.Authorizers;
Authorizers.none()
No authorizer.
CatchAllErrorIntegrationResponseSet
An integration response set that catches all errors and returns a 500.
Initializers
import software.aws.pdk.type_safe_api.CatchAllErrorIntegrationResponseSet;
new CatchAllErrorIntegrationResponseSet();
| Name | Type | Description |
|---|---|---|
Methods
| Name | Description |
|---|---|
render |
Render the integration responses into the Integration. |
render
public java.util.Map<java.lang.String, ApiGatewayIntegrationResponse> render(IntegrationRenderProps props)
Render the integration responses into the Integration.
propsRequired
- Type: IntegrationRenderProps
CognitoAuthorizer
An authorizer that uses Cognito identity or access tokens.
Initializers
import software.aws.pdk.type_safe_api.CognitoAuthorizer;
CognitoAuthorizer.Builder.create()
.authorizerId(java.lang.String)
.userPools(java.util.List<IUserPool>)
// .authorizationScopes(java.util.List<java.lang.String>)
.build();
| Name | Type | Description |
|---|---|---|
authorizerId |
java.lang.String |
Unique identifier for this authorizer. |
userPools |
java.util.List |
The Cognito user pools associated with this authorizer. |
authorizationScopes |
java.util.List |
A list of authorization scopes configured on the method. |
authorizerIdRequired
- Type: java.lang.String
Unique identifier for this authorizer.
userPoolsRequired
- Type: java.util.List
The Cognito user pools associated with this authorizer.
authorizationScopesOptional
- Type: java.util.List
- Default: []
A list of authorization scopes configured on the method.
When used as the default authorizer, these scopes will be applied to all methods without an authorizer at the integration level.
Methods
| Name | Description |
|---|---|
withScopes |
Returns this authorizer with scopes applied, intended for usage in individual operations where scopes may differ on a per-operation basis. |
withScopes
public CognitoAuthorizer withScopes(java.lang.String authorizationScopes)
Returns this authorizer with scopes applied, intended for usage in individual operations where scopes may differ on a per-operation basis.
authorizationScopesRequired
- Type: java.lang.String
the scopes to apply.
Properties
| Name | Type | Description |
|---|---|---|
authorizationType |
software.amazon.awscdk.services.apigateway.AuthorizationType |
The type of the authorizer. |
authorizerId |
java.lang.String |
The unique identifier for the authorizer. |
authorizationScopes |
java.util.List |
Scopes for the authorizer, if any. |
userPools |
java.util.List |
The Cognito user pools associated with this authorizer. |
authorizationTypeRequired
public AuthorizationType getAuthorizationType();
- Type: software.amazon.awscdk.services.apigateway.AuthorizationType
The type of the authorizer.
authorizerIdRequired
public java.lang.String getAuthorizerId();
- Type: java.lang.String
The unique identifier for the authorizer.
authorizationScopesOptional
public java.util.List<java.lang.String> getAuthorizationScopes();
- Type: java.util.List
Scopes for the authorizer, if any.
userPoolsRequired
public java.util.List<IUserPool> getUserPools();
- Type: java.util.List
The Cognito user pools associated with this authorizer.
CompositeIntegrationResponseSet
An integration response set which combines the provided integration response sets.
Response sets are combined in order, so later responses will override previous ones for overlapping response status patterns.
Initializers
import software.aws.pdk.type_safe_api.CompositeIntegrationResponseSet;
new CompositeIntegrationResponseSet(IntegrationResponseSet responseSets);
| Name | Type | Description |
|---|---|---|
responseSets |
IntegrationResponseSet |
No description. |
responseSetsRequired
- Type: IntegrationResponseSet
Methods
| Name | Description |
|---|---|
render |
Render the integration responses into the Integration. |
render
public java.util.Map<java.lang.String, ApiGatewayIntegrationResponse> render(IntegrationRenderProps props)
Render the integration responses into the Integration.
propsRequired
- Type: IntegrationRenderProps
CustomAuthorizer
An authorizer that uses a lambda function to authorize requests.
Initializers
import software.aws.pdk.type_safe_api.CustomAuthorizer;
CustomAuthorizer.Builder.create()
.authorizerId(java.lang.String)
.function(IFunction)
// .authorizerResultTtlInSeconds(java.lang.Number)
// .identitySource(java.lang.String)
// .type(CustomAuthorizerType)
.build();
| Name | Type | Description |
|---|---|---|
authorizerId |
java.lang.String |
Unique identifier for this authorizer. |
function |
software.amazon.awscdk.services.lambda.IFunction |
The lambda function used to authorize requests. |
authorizerResultTtlInSeconds |
java.lang.Number |
The number of seconds during which the authorizer result is cached. |
identitySource |
java.lang.String |
The source of the identity in an incoming request. |
type |
CustomAuthorizerType |
The type of custom authorizer. |
authorizerIdRequired
- Type: java.lang.String
Unique identifier for this authorizer.
functionRequired
- Type: software.amazon.awscdk.services.lambda.IFunction
The lambda function used to authorize requests.
authorizerResultTtlInSecondsOptional
- Type: java.lang.Number
- Default: 300
The number of seconds during which the authorizer result is cached.
identitySourceOptional
- Type: java.lang.String
- Default: "method.request.header.Authorization"
The source of the identity in an incoming request.
typeOptional
- Type: CustomAuthorizerType
- Default: CustomAuthorizerType.TOKEN
The type of custom authorizer.
Properties
| Name | Type | Description |
|---|---|---|
authorizationType |
software.amazon.awscdk.services.apigateway.AuthorizationType |
The type of the authorizer. |
authorizerId |
java.lang.String |
The unique identifier for the authorizer. |
authorizationScopes |
java.util.List |
Scopes for the authorizer, if any. |
authorizerResultTtlInSeconds |
java.lang.Number |
The number of seconds during which the authorizer result is cached. |
function |
software.amazon.awscdk.services.lambda.IFunction |
The lambda function used to authorize requests. |
identitySource |
java.lang.String |
The source of the identity in an incoming request. |
type |
CustomAuthorizerType |
The type of custom authorizer. |
authorizationTypeRequired
public AuthorizationType getAuthorizationType();
- Type: software.amazon.awscdk.services.apigateway.AuthorizationType
The type of the authorizer.
authorizerIdRequired
public java.lang.String getAuthorizerId();
- Type: java.lang.String
The unique identifier for the authorizer.
authorizationScopesOptional
public java.util.List<java.lang.String> getAuthorizationScopes();
- Type: java.util.List
Scopes for the authorizer, if any.
authorizerResultTtlInSecondsRequired
public java.lang.Number getAuthorizerResultTtlInSeconds();
- Type: java.lang.Number
The number of seconds during which the authorizer result is cached.
functionRequired
public IFunction getFunction();
- Type: software.amazon.awscdk.services.lambda.IFunction
The lambda function used to authorize requests.
identitySourceRequired
public java.lang.String getIdentitySource();
- Type: java.lang.String
The source of the identity in an incoming request.
typeRequired
public CustomAuthorizerType getType();
- Type: CustomAuthorizerType
The type of custom authorizer.
CustomIntegrationResponseSet
A custom integration response set where you can specify the responses as you wish.
Initializers
import software.aws.pdk.type_safe_api.CustomIntegrationResponseSet;
CustomIntegrationResponseSet.Builder.create()
// .responses(java.util.Map<java.lang.String, ApiGatewayIntegrationResponse>)
.build();
| Name | Type | Description |
|---|---|---|
responses |
java.util.Map |
The responses to add to the integration response. |
responsesOptional
- Type: java.util.Map
ApiGatewayIntegrationResponse\>
The responses to add to the integration response.
Methods
| Name | Description |
|---|---|
render |
Render the integration responses into the Integration. |
render
public java.util.Map<java.lang.String, ApiGatewayIntegrationResponse> render(IntegrationRenderProps props)
Render the integration responses into the Integration.
propsRequired
- Type: IntegrationRenderProps
DefaultPassthroughIntegrationResponseSet
An integration response set which adds a passthrough for the default response.
Initializers
import software.aws.pdk.type_safe_api.DefaultPassthroughIntegrationResponseSet;
DefaultPassthroughIntegrationResponseSet.Builder.create()
// .statusCode(java.lang.Number)
.build();
| Name | Type | Description |
|---|---|---|
statusCode |
java.lang.Number |
Override the status code returned by the default integration response. |
statusCodeOptional
- Type: java.lang.Number
- Default: 200
Override the status code returned by the default integration response.
Methods
| Name | Description |
|---|---|
render |
Render the integration responses into the Integration. |
render
public java.util.Map<java.lang.String, ApiGatewayIntegrationResponse> render(IntegrationRenderProps props)
Render the integration responses into the Integration.
propsRequired
- Type: IntegrationRenderProps
IamAuthorizer
An IAM authorizer.
Initializers
import software.aws.pdk.type_safe_api.IamAuthorizer;
new IamAuthorizer();
| Name | Type | Description |
|---|---|---|
Properties
| Name | Type | Description |
|---|---|---|
authorizationType |
software.amazon.awscdk.services.apigateway.AuthorizationType |
The type of the authorizer. |
authorizerId |
java.lang.String |
The unique identifier for the authorizer. |
authorizationScopes |
java.util.List |
Scopes for the authorizer, if any. |
authorizationTypeRequired
public AuthorizationType getAuthorizationType();
- Type: software.amazon.awscdk.services.apigateway.AuthorizationType
The type of the authorizer.
authorizerIdRequired
public java.lang.String getAuthorizerId();
- Type: java.lang.String
The unique identifier for the authorizer.
authorizationScopesOptional
public java.util.List<java.lang.String> getAuthorizationScopes();
- Type: java.util.List
Scopes for the authorizer, if any.
Integration
An integration for an API operation.
You can extend this to implement your own integration if you like.
Initializers
import software.aws.pdk.type_safe_api.Integration;
new Integration();
| Name | Type | Description |
|---|---|---|
Methods
| Name | Description |
|---|---|
grant |
Grant permissions for the API to invoke the integration. |
render |
Render the integration into an API Gateway OpenAPI extension. |
grant
public void grant(IntegrationGrantProps _props)
Grant permissions for the API to invoke the integration.
_propsRequired
- Type: IntegrationGrantProps
render
public ApiGatewayIntegration render(IntegrationRenderProps props)
Render the integration into an API Gateway OpenAPI extension.
propsRequired
- Type: IntegrationRenderProps
IntegrationResponseSet
A set of integration responses.
You can extend this to implement your own integration response set
Initializers
import software.aws.pdk.type_safe_api.IntegrationResponseSet;
new IntegrationResponseSet();
| Name | Type | Description |
|---|---|---|
Methods
| Name | Description |
|---|---|
render |
Render the integration responses into the Integration. |
render
public java.util.Map<java.lang.String, ApiGatewayIntegrationResponse> render(IntegrationRenderProps props)
Render the integration responses into the Integration.
propsRequired
- Type: IntegrationRenderProps
the integration render props (same used in the Integration).
IntegrationResponseSets
Initializers
import software.aws.pdk.type_safe_api.IntegrationResponseSets;
new IntegrationResponseSets();
| Name | Type | Description |
|---|---|---|
Static Functions
| Name | Description |
|---|---|
catchAll |
An integration response set that catches all 4XX and 5XX errors and returns a 500. |
composite |
Combine the provided integration response sets. |
custom |
A custom integration response set where you can specify the responses as you wish. |
defaultPassthrough |
An integration response set which adds a passthrough for the default response. |
s3JsonErrorMessage |
An integration response set that returns the error message from S3 in a "message" property of a JSON object for 400, 403, 404 and 500 errors. |
catchAll
import software.aws.pdk.type_safe_api.IntegrationResponseSets;
IntegrationResponseSets.catchAll()
An integration response set that catches all 4XX and 5XX errors and returns a 500.
composite
import software.aws.pdk.type_safe_api.IntegrationResponseSets;
IntegrationResponseSets.composite(IntegrationResponseSet responseSets)
Combine the provided integration response sets.
Response sets are combined in order, so later responses will override previous ones for overlapping response status patterns.
responseSetsRequired
- Type: IntegrationResponseSet
custom
import software.aws.pdk.type_safe_api.IntegrationResponseSets;
IntegrationResponseSets.custom(CustomIntegrationResponseSetProps props)
A custom integration response set where you can specify the responses as you wish.
propsRequired
defaultPassthrough
import software.aws.pdk.type_safe_api.IntegrationResponseSets;
IntegrationResponseSets.defaultPassthrough(),IntegrationResponseSets.defaultPassthrough(DefaultPassthroughIntegrationResponseSetProps props)
An integration response set which adds a passthrough for the default response.
propsOptional
s3JsonErrorMessage
import software.aws.pdk.type_safe_api.IntegrationResponseSets;
IntegrationResponseSets.s3JsonErrorMessage()
An integration response set that returns the error message from S3 in a "message" property of a JSON object for 400, 403, 404 and 500 errors.
Integrations
A collection of integrations to connect API operations with a backend to service requests.
Initializers
import software.aws.pdk.type_safe_api.Integrations;
new Integrations();
| Name | Type | Description |
|---|---|---|
Static Functions
| Name | Description |
|---|---|
lambda |
An integration that invokes a lambda function to service the request. |
mock |
An integration that returns a hardcoded response. |
s3 |
An integration that can read/write to an S3 bucket. |
lambda
import software.aws.pdk.type_safe_api.Integrations;
Integrations.lambda(IFunction lambdaFunction)
An integration that invokes a lambda function to service the request.
lambdaFunctionRequired
- Type: software.amazon.awscdk.services.lambda.IFunction
the function to invoke.
mock
import software.aws.pdk.type_safe_api.Integrations;
Integrations.mock(MockIntegrationResponse response)
An integration that returns a hardcoded response.
responseRequired
- Type: MockIntegrationResponse
the response to return.
s3
import software.aws.pdk.type_safe_api.Integrations;
Integrations.s3(S3IntegrationProps props)
An integration that can read/write to an S3 bucket.
propsRequired
- Type: S3IntegrationProps
the integration props.
LambdaIntegration
A lambda integration.
Initializers
import software.aws.pdk.type_safe_api.LambdaIntegration;
new LambdaIntegration(IFunction lambdaFunction);
| Name | Type | Description |
|---|---|---|
lambdaFunction |
software.amazon.awscdk.services.lambda.IFunction |
No description. |
lambdaFunctionRequired
- Type: software.amazon.awscdk.services.lambda.IFunction
Methods
| Name | Description |
|---|---|
grant |
Grant API Gateway permissions to invoke the lambda. |
render |
Render the lambda integration as a snippet of OpenAPI. |
grant
public void grant(IntegrationGrantProps __0)
Grant API Gateway permissions to invoke the lambda.
__0Required
- Type: IntegrationGrantProps
render
public ApiGatewayIntegration render(IntegrationRenderProps _props)
Render the lambda integration as a snippet of OpenAPI.
_propsRequired
- Type: IntegrationRenderProps
MockIntegration
A mock integration to return a hardcoded response.
https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-mock-integration.html
Initializers
import software.aws.pdk.type_safe_api.MockIntegration;
MockIntegration.Builder.create()
.statusCode(java.lang.Number)
// .body(java.lang.String)
.build();
| Name | Type | Description |
|---|---|---|
statusCode |
java.lang.Number |
HTTP response status code. |
body |
java.lang.String |
Response body. |
statusCodeRequired
- Type: java.lang.Number
HTTP response status code.
bodyOptional
- Type: java.lang.String
Response body.
Methods
| Name | Description |
|---|---|
grant |
Grant permissions for the API to invoke the integration. |
render |
Render the integration into an API Gateway OpenAPI extension. |
grant
public void grant(IntegrationGrantProps _props)
Grant permissions for the API to invoke the integration.
_propsRequired
- Type: IntegrationGrantProps
render
public ApiGatewayIntegration render(IntegrationRenderProps props)
Render the integration into an API Gateway OpenAPI extension.
propsRequired
- Type: IntegrationRenderProps
NoneAuthorizer
No authorizer.
Initializers
import software.aws.pdk.type_safe_api.NoneAuthorizer;
new NoneAuthorizer();
| Name | Type | Description |
|---|---|---|
Properties
| Name | Type | Description |
|---|---|---|
authorizationType |
software.amazon.awscdk.services.apigateway.AuthorizationType |
The type of the authorizer. |
authorizerId |
java.lang.String |
The unique identifier for the authorizer. |
authorizationScopes |
java.util.List |
Scopes for the authorizer, if any. |
authorizationTypeRequired
public AuthorizationType getAuthorizationType();
- Type: software.amazon.awscdk.services.apigateway.AuthorizationType
The type of the authorizer.
authorizerIdRequired
public java.lang.String getAuthorizerId();
- Type: java.lang.String
The unique identifier for the authorizer.
authorizationScopesOptional
public java.util.List<java.lang.String> getAuthorizationScopes();
- Type: java.util.List
Scopes for the authorizer, if any.
S3Integration
An S3 integration.
Initializers
import software.aws.pdk.type_safe_api.S3Integration;
S3Integration.Builder.create()
.bucket(IBucket)
// .headerRequestParameters(java.util.List<java.lang.String>)
// .integrationResponseSet(IntegrationResponseSet)
// .method(java.lang.String)
// .path(java.lang.String)
// .queryStringRequestParameters(java.util.List<java.lang.String>)
.build();
| Name | Type | Description |
|---|---|---|
bucket |
software.amazon.awscdk.services.s3.IBucket |
The S3 bucket to be invoked on integration. |
headerRequestParameters |
java.util.List |
Specifies additional header request parameters to be passed to the integration request. |
integrationResponseSet |
IntegrationResponseSet |
Override the integration response set for the S3 integration. |
method |
java.lang.String |
The HTTP method to use when invoking the S3 bucket. |
path |
java.lang.String |
The path override to use when invoking the S3 bucket. |
queryStringRequestParameters |
java.util.List |
Specifies additional query string request parameters to be passed to the integration request. |
bucketRequired
- Type: software.amazon.awscdk.services.s3.IBucket
The S3 bucket to be invoked on integration.
headerRequestParametersOptional
- Type: java.util.List
- Default: no additional header request parameters
Specifies additional header request parameters to be passed to the integration request.
integrationResponseSetOptional
- Type: IntegrationResponseSet
- Default: a combination of IntegrationResponseSets.defaultPassthrough() and IntegrationResponseSets.s3JsonErrorMessage()
Override the integration response set for the S3 integration.
methodOptional
- Type: java.lang.String
- Default: integration method is used
The HTTP method to use when invoking the S3 bucket.
pathOptional
- Type: java.lang.String
- Default: integration path is used
The path override to use when invoking the S3 bucket.
queryStringRequestParametersOptional
- Type: java.util.List
- Default: no additional query string request parameters
Specifies additional query string request parameters to be passed to the integration request.
Methods
| Name | Description |
|---|---|
grant |
Grant API Gateway permissions to invoke the S3 bucket. |
render |
Render the S3 integration as a snippet of OpenAPI. |
grant
public void grant(IntegrationGrantProps __0)
Grant API Gateway permissions to invoke the S3 bucket.
__0Required
- Type: IntegrationGrantProps
render
public ApiGatewayIntegration render(IntegrationRenderProps props)
Render the S3 integration as a snippet of OpenAPI.
propsRequired
- Type: IntegrationRenderProps
S3JsonErrorMessageIntegrationResponseSet
An integration response set for S3 errors, that returns a JSON payload with the S3 error message.
Initializers
import software.aws.pdk.type_safe_api.S3JsonErrorMessageIntegrationResponseSet;
new S3JsonErrorMessageIntegrationResponseSet();
| Name | Type | Description |
|---|---|---|
Methods
| Name | Description |
|---|---|
render |
Render the integration responses into the Integration. |
render
public java.util.Map<java.lang.String, ApiGatewayIntegrationResponse> render(IntegrationRenderProps props)
Render the integration responses into the Integration.
propsRequired
- Type: IntegrationRenderProps
Enums
Architecture
Represents an instruction set architecture.
Members
| Name | Description |
|---|---|
X86_64 |
64-bit x86 architecture. |
ARM_64 |
64-bit ARM architecture. |
X86_64
64-bit x86 architecture.
ARM_64
64-bit ARM architecture.
CustomAuthorizerType
The type of custom authorizer.
Members
| Name | Description |
|---|---|
TOKEN |
A custom authorizer that uses a Lambda function. |
REQUEST |
An authorizer that uses a Lambda function using incoming request parameters. |
TOKEN
A custom authorizer that uses a Lambda function.
REQUEST
An authorizer that uses a Lambda function using incoming request parameters.
DocumentationFormat
Formats for documentation generation.
Members
| Name | Description |
|---|---|
HTML_REDOC |
HTML Documentation generated by redoc. |
MARKDOWN |
Markdown documentation. |
PLANTUML |
PlantUML schema diagrams. |
HTML_REDOC
HTML Documentation generated by redoc.
MARKDOWN
Markdown documentation.
PLANTUML
PlantUML schema diagrams.
JavaVersion
Versions of java.
Members
| Name | Description |
|---|---|
JAVA_8 |
No description. |
JAVA_11 |
No description. |
JAVA_17 |
No description. |
JAVA_21 |
No description. |
JAVA_8
JAVA_11
JAVA_17
JAVA_21
Language
Supported languages for runtimes and infrastructure.
Members
| Name | Description |
|---|---|
TYPESCRIPT |
No description. |
PYTHON |
No description. |
JAVA |
No description. |
TYPESCRIPT
PYTHON
JAVA
Library
Supported libraries for code generation.
Members
| Name | Description |
|---|---|
TYPESCRIPT_REACT_QUERY_HOOKS |
No description. |
TYPESCRIPT_REACT_QUERY_HOOKS
ModelLanguage
The model definition language.
Members
| Name | Description |
|---|---|
SMITHY |
Smithy. |
OPENAPI |
OpenAPI. |
TYPESPEC |
TypeSpec. |
SMITHY
Smithy.
OPENAPI
OpenAPI.
TYPESPEC
TypeSpec.
NodeVersion
Versions of node.
Members
| Name | Description |
|---|---|
NODE_18 |
No description. |
NODE_20 |
No description. |
NODE_22 |
No description. |
NODE_18
NODE_20
NODE_22
PythonVersion
Versions of python.
Members
| Name | Description |
|---|---|
PYTHON_3_11 |
No description. |
PYTHON_3_12 |
No description. |
PYTHON_3_13 |
No description. |
PYTHON_3_11
PYTHON_3_12
PYTHON_3_13
WebSocketDocumentationFormat
Formats for WebSocket documentation generation.
Members
| Name | Description |
|---|---|
HTML |
HTML Documentation generated by AsyncAPI's HTML Template. |
MARKDOWN |
Markdown Documentation generated by AsyncAPI's Markdown Template. |
HTML
HTML Documentation generated by AsyncAPI's HTML Template.
MARKDOWN
Markdown Documentation generated by AsyncAPI's Markdown Template.
WebSocketLibrary
Members
| Name | Description |
|---|---|
TYPESCRIPT_WEBSOCKET_CLIENT |
No description. |
TYPESCRIPT_WEBSOCKET_HOOKS |
No description. |