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). |
project
Required
- Type: io.github.cdklabs.projen.Project
openApiOptions
Required
- Type: OpenApiModelOptions
Options for the openapi model.
handlerLanguages
Optional
- 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.
x
Required
- 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.
x
Required
- 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. |
node
Required
public Node getNode();
- Type: software.constructs.Node
The tree node.
project
Required
public Project getProject();
- Type: io.github.cdklabs.projen.Project
openApiSpecificationPath
Required
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). |
name
Required
- Type: java.lang.String
- Default: $BASEDIR
This is the name of your project.
commitGenerated
Optional
- Type: java.lang.Boolean
- Default: true
Whether to commit the managed files by default.
gitIgnoreOptions
Optional
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptions
Optional
- Type: io.github.cdklabs.projen.GitOptions
Configuration options for git.
logging
Optional
- Type: io.github.cdklabs.projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
outdir
Optional
- 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.
parent
Optional
- Type: io.github.cdklabs.projen.Project
The parent project, if this project is part of a bigger project.
projenCommand
Optional
- 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.
projenrcJson
Optional
- Type: java.lang.Boolean
- Default: false
Generate (once) .projenrc.json (in JSON). Set to false
in order to disable .projenrc.json generation.
projenrcJsonOptions
Optional
- Type: io.github.cdklabs.projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
renovatebot
Optional
- Type: java.lang.Boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptions
Optional
- Type: io.github.cdklabs.projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
openApiOptions
Required
- Type: OpenApiModelOptions
Options for the openapi model.
handlerLanguages
Optional
- Type: java.util.List<Language>
The languages users have specified for handler projects (if any).
parsedSpecFile
Required
- Type: java.lang.String
Path of the parsed/bundled OpenAPI specification (relative to the project root).
asyncApiSpecFile
Required
- 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.
globs
Required
- Type: java.lang.String
The glob patterns to match.
addGitIgnore
public void addGitIgnore(java.lang.String pattern)
Adds a .gitignore pattern.
pattern
Required
- 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
.
_pattern
Required
- 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.
name
Required
- Type: java.lang.String
The task name to add.
props
Optional
- Type: io.github.cdklabs.projen.TaskOptions
Task properties.
~~addTip
~~
public void addTip(java.lang.String message)
Prints a "tip" message during synthesis.
message
Required
- 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.
_glob
Required
- 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.
name
Required
- 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>
task
Required
- 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.
filePath
Required
- 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.
filePath
Required
- 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.
filePath
Required
- 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.
filePath
Required
- 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.
x
Required
- 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.
x
Required
- 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.
construct
Required
- 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. |
node
Required
public Node getNode();
- Type: software.constructs.Node
The tree node.
buildTask
Required
public Task getBuildTask();
- Type: io.github.cdklabs.projen.Task
commitGenerated
Required
public java.lang.Boolean getCommitGenerated();
- Type: java.lang.Boolean
Whether to commit the managed files by default.
compileTask
Required
public Task getCompileTask();
- Type: io.github.cdklabs.projen.Task
components
Required
public java.util.List<Component> getComponents();
- Type: java.util.List
Returns all the components within this project.
deps
Required
public Dependencies getDeps();
- Type: io.github.cdklabs.projen.Dependencies
Project dependencies.
ejected
Required
public java.lang.Boolean getEjected();
- Type: java.lang.Boolean
Whether or not the project is being ejected.
files
Required
public java.util.List<FileBase> getFiles();
- Type: java.util.List
All files in this project.
gitattributes
Required
public GitAttributesFile getGitattributes();
- Type: io.github.cdklabs.projen.GitAttributesFile
The .gitattributes file for this repository.
gitignore
Required
public IgnoreFile getGitignore();
- Type: io.github.cdklabs.projen.IgnoreFile
.gitignore.
logger
Required
public Logger getLogger();
- Type: io.github.cdklabs.projen.Logger
Logging utilities.
name
Required
public java.lang.String getName();
- Type: java.lang.String
Project name.
outdir
Required
public java.lang.String getOutdir();
- Type: java.lang.String
Absolute output directory of this project.
packageTask
Required
public Task getPackageTask();
- Type: io.github.cdklabs.projen.Task
postCompileTask
Required
public Task getPostCompileTask();
- Type: io.github.cdklabs.projen.Task
preCompileTask
Required
public Task getPreCompileTask();
- Type: io.github.cdklabs.projen.Task
projectBuild
Required
public ProjectBuild getProjectBuild();
- Type: io.github.cdklabs.projen.ProjectBuild
Manages the build process of the project.
projenCommand
Required
public java.lang.String getProjenCommand();
- Type: java.lang.String
The command to use in order to run the projen CLI.
root
Required
public Project getRoot();
- Type: io.github.cdklabs.projen.Project
The root project.
subprojects
Required
public java.util.List<Project> getSubprojects();
- Type: java.util.List
Returns all the subprojects within this project.
tasks
Required
public Tasks getTasks();
- Type: io.github.cdklabs.projen.Tasks
Project tasks.
testTask
Required
public Task getTestTask();
- Type: io.github.cdklabs.projen.Task
defaultTask
Optional
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.
initProject
Optional
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.
parent
Optional
public Project getParent();
- Type: io.github.cdklabs.projen.Project
A parent project.
If undefined, this is the root project.
apiName
Required
public java.lang.String getApiName();
- Type: java.lang.String
Name of the API.
definition
Required
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_TASK
Required
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). |
project
Required
- Type: io.github.cdklabs.projen.Project
openApiOptions
Required
- Type: OpenApiModelOptions
Options for the openapi model.
handlerLanguages
Optional
- 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.
x
Required
- 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.
x
Required
- 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. |
node
Required
public Node getNode();
- Type: software.constructs.Node
The tree node.
project
Required
public Project getProject();
- Type: io.github.cdklabs.projen.Project
openApiSpecificationPath
Required
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). |
name
Required
- Type: java.lang.String
- Default: $BASEDIR
This is the name of your project.
commitGenerated
Optional
- Type: java.lang.Boolean
- Default: true
Whether to commit the managed files by default.
gitIgnoreOptions
Optional
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptions
Optional
- Type: io.github.cdklabs.projen.GitOptions
Configuration options for git.
logging
Optional
- Type: io.github.cdklabs.projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
outdir
Optional
- 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.
parent
Optional
- Type: io.github.cdklabs.projen.Project
The parent project, if this project is part of a bigger project.
projenCommand
Optional
- 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.
projenrcJson
Optional
- Type: java.lang.Boolean
- Default: false
Generate (once) .projenrc.json (in JSON). Set to false
in order to disable .projenrc.json generation.
projenrcJsonOptions
Optional
- Type: io.github.cdklabs.projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
renovatebot
Optional
- Type: java.lang.Boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptions
Optional
- Type: io.github.cdklabs.projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
openApiOptions
Required
- Type: OpenApiModelOptions
Options for the openapi model.
handlerLanguages
Optional
- Type: java.util.List<Language>
The languages users have specified for handler projects (if any).
parsedSpecFile
Required
- 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.
globs
Required
- Type: java.lang.String
The glob patterns to match.
addGitIgnore
public void addGitIgnore(java.lang.String pattern)
Adds a .gitignore pattern.
pattern
Required
- 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
.
_pattern
Required
- 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.
name
Required
- Type: java.lang.String
The task name to add.
props
Optional
- Type: io.github.cdklabs.projen.TaskOptions
Task properties.
~~addTip
~~
public void addTip(java.lang.String message)
Prints a "tip" message during synthesis.
message
Required
- 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.
_glob
Required
- 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.
name
Required
- 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>
task
Required
- 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.
filePath
Required
- 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.
filePath
Required
- 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.
filePath
Required
- 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.
filePath
Required
- 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.
x
Required
- 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.
x
Required
- 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.
construct
Required
- 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. |
node
Required
public Node getNode();
- Type: software.constructs.Node
The tree node.
buildTask
Required
public Task getBuildTask();
- Type: io.github.cdklabs.projen.Task
commitGenerated
Required
public java.lang.Boolean getCommitGenerated();
- Type: java.lang.Boolean
Whether to commit the managed files by default.
compileTask
Required
public Task getCompileTask();
- Type: io.github.cdklabs.projen.Task
components
Required
public java.util.List<Component> getComponents();
- Type: java.util.List
Returns all the components within this project.
deps
Required
public Dependencies getDeps();
- Type: io.github.cdklabs.projen.Dependencies
Project dependencies.
ejected
Required
public java.lang.Boolean getEjected();
- Type: java.lang.Boolean
Whether or not the project is being ejected.
files
Required
public java.util.List<FileBase> getFiles();
- Type: java.util.List
All files in this project.
gitattributes
Required
public GitAttributesFile getGitattributes();
- Type: io.github.cdklabs.projen.GitAttributesFile
The .gitattributes file for this repository.
gitignore
Required
public IgnoreFile getGitignore();
- Type: io.github.cdklabs.projen.IgnoreFile
.gitignore.
logger
Required
public Logger getLogger();
- Type: io.github.cdklabs.projen.Logger
Logging utilities.
name
Required
public java.lang.String getName();
- Type: java.lang.String
Project name.
outdir
Required
public java.lang.String getOutdir();
- Type: java.lang.String
Absolute output directory of this project.
packageTask
Required
public Task getPackageTask();
- Type: io.github.cdklabs.projen.Task
postCompileTask
Required
public Task getPostCompileTask();
- Type: io.github.cdklabs.projen.Task
preCompileTask
Required
public Task getPreCompileTask();
- Type: io.github.cdklabs.projen.Task
projectBuild
Required
public ProjectBuild getProjectBuild();
- Type: io.github.cdklabs.projen.ProjectBuild
Manages the build process of the project.
projenCommand
Required
public java.lang.String getProjenCommand();
- Type: java.lang.String
The command to use in order to run the projen CLI.
root
Required
public Project getRoot();
- Type: io.github.cdklabs.projen.Project
The root project.
subprojects
Required
public java.util.List<Project> getSubprojects();
- Type: java.util.List
Returns all the subprojects within this project.
tasks
Required
public Tasks getTasks();
- Type: io.github.cdklabs.projen.Tasks
Project tasks.
testTask
Required
public Task getTestTask();
- Type: io.github.cdklabs.projen.Task
defaultTask
Optional
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.
initProject
Optional
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.
parent
Optional
public Project getParent();
- Type: io.github.cdklabs.projen.Project
A parent project.
If undefined, this is the root project.
apiName
Required
public java.lang.String getApiName();
- Type: java.lang.String
Name of the API.
definition
Required
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_TASK
Required
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). |
project
Required
- Type: io.github.cdklabs.projen.Project
openApiOptions
Required
- Type: OpenApiModelOptions
Options for the openapi model.
handlerLanguages
Optional
- 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.
x
Required
- 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.
x
Required
- 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. |
node
Required
public Node getNode();
- Type: software.constructs.Node
The tree node.
project
Required
public Project getProject();
- Type: io.github.cdklabs.projen.Project
openApiSpecificationPath
Required
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). |
name
Required
- Type: java.lang.String
- Default: $BASEDIR
This is the name of your project.
commitGenerated
Optional
- Type: java.lang.Boolean
- Default: true
Whether to commit the managed files by default.
gitIgnoreOptions
Optional
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptions
Optional
- Type: io.github.cdklabs.projen.GitOptions
Configuration options for git.
logging
Optional
- Type: io.github.cdklabs.projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
outdir
Optional
- 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.
parent
Optional
- Type: io.github.cdklabs.projen.Project
The parent project, if this project is part of a bigger project.
projenCommand
Optional
- 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.
projenrcJson
Optional
- Type: java.lang.Boolean
- Default: false
Generate (once) .projenrc.json (in JSON). Set to false
in order to disable .projenrc.json generation.
projenrcJsonOptions
Optional
- Type: io.github.cdklabs.projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
renovatebot
Optional
- Type: java.lang.Boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptions
Optional
- Type: io.github.cdklabs.projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
smithyOptions
Required
- Type: SmithyModelOptions
Smithy engine options.
handlerLanguages
Optional
- Type: java.util.List<Language>
The languages users have specified for handler projects (if any).
parsedSpecFile
Required
- Type: java.lang.String
Path of the parsed/bundled OpenAPI specification (relative to the project root).
asyncApiSpecFile
Required
- 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.
globs
Required
- Type: java.lang.String
The glob patterns to match.
addGitIgnore
public void addGitIgnore(java.lang.String pattern)
Adds a .gitignore pattern.
pattern
Required
- 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
.
_pattern
Required
- 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.
name
Required
- Type: java.lang.String
The task name to add.
props
Optional
- Type: io.github.cdklabs.projen.TaskOptions
Task properties.
~~addTip
~~
public void addTip(java.lang.String message)
Prints a "tip" message during synthesis.
message
Required
- 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.
_glob
Required
- 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.
name
Required
- 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>
task
Required
- 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.
filePath
Required
- 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.
filePath
Required
- 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.
filePath
Required
- 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.
filePath
Required
- 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.
deps
Required
- 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.
x
Required
- 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.
x
Required
- 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.
construct
Required
- 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. |
node
Required
public Node getNode();
- Type: software.constructs.Node
The tree node.
buildTask
Required
public Task getBuildTask();
- Type: io.github.cdklabs.projen.Task
commitGenerated
Required
public java.lang.Boolean getCommitGenerated();
- Type: java.lang.Boolean
Whether to commit the managed files by default.
compileTask
Required
public Task getCompileTask();
- Type: io.github.cdklabs.projen.Task
components
Required
public java.util.List<Component> getComponents();
- Type: java.util.List
Returns all the components within this project.
deps
Required
public Dependencies getDeps();
- Type: io.github.cdklabs.projen.Dependencies
Project dependencies.
ejected
Required
public java.lang.Boolean getEjected();
- Type: java.lang.Boolean
Whether or not the project is being ejected.
files
Required
public java.util.List<FileBase> getFiles();
- Type: java.util.List
All files in this project.
gitattributes
Required
public GitAttributesFile getGitattributes();
- Type: io.github.cdklabs.projen.GitAttributesFile
The .gitattributes file for this repository.
gitignore
Required
public IgnoreFile getGitignore();
- Type: io.github.cdklabs.projen.IgnoreFile
.gitignore.
logger
Required
public Logger getLogger();
- Type: io.github.cdklabs.projen.Logger
Logging utilities.
name
Required
public java.lang.String getName();
- Type: java.lang.String
Project name.
outdir
Required
public java.lang.String getOutdir();
- Type: java.lang.String
Absolute output directory of this project.
packageTask
Required
public Task getPackageTask();
- Type: io.github.cdklabs.projen.Task
postCompileTask
Required
public Task getPostCompileTask();
- Type: io.github.cdklabs.projen.Task
preCompileTask
Required
public Task getPreCompileTask();
- Type: io.github.cdklabs.projen.Task
projectBuild
Required
public ProjectBuild getProjectBuild();
- Type: io.github.cdklabs.projen.ProjectBuild
Manages the build process of the project.
projenCommand
Required
public java.lang.String getProjenCommand();
- Type: java.lang.String
The command to use in order to run the projen CLI.
root
Required
public Project getRoot();
- Type: io.github.cdklabs.projen.Project
The root project.
subprojects
Required
public java.util.List<Project> getSubprojects();
- Type: java.util.List
Returns all the subprojects within this project.
tasks
Required
public Tasks getTasks();
- Type: io.github.cdklabs.projen.Tasks
Project tasks.
testTask
Required
public Task getTestTask();
- Type: io.github.cdklabs.projen.Task
defaultTask
Optional
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.
initProject
Optional
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.
parent
Optional
public Project getParent();
- Type: io.github.cdklabs.projen.Project
A parent project.
If undefined, this is the root project.
apiName
Required
public java.lang.String getApiName();
- Type: java.lang.String
Name of the API.
definition
Required
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_TASK
Required
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. |
name
Required
- Type: java.lang.String
- Default: $BASEDIR
This is the name of your project.
commitGenerated
Optional
- Type: java.lang.Boolean
- Default: true
Whether to commit the managed files by default.
gitIgnoreOptions
Optional
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptions
Optional
- Type: io.github.cdklabs.projen.GitOptions
Configuration options for git.
logging
Optional
- Type: io.github.cdklabs.projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
outdir
Optional
- 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.
parent
Optional
- Type: io.github.cdklabs.projen.Project
The parent project, if this project is part of a bigger project.
projenCommand
Optional
- 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.
projenrcJson
Optional
- Type: java.lang.Boolean
- Default: false
Generate (once) .projenrc.json (in JSON). Set to false
in order to disable .projenrc.json generation.
projenrcJsonOptions
Optional
- Type: io.github.cdklabs.projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
renovatebot
Optional
- Type: java.lang.Boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptions
Optional
- 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.
globs
Required
- Type: java.lang.String
The glob patterns to match.
addGitIgnore
public void addGitIgnore(java.lang.String pattern)
Adds a .gitignore pattern.
pattern
Required
- 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
.
_pattern
Required
- 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.
name
Required
- Type: java.lang.String
The task name to add.
props
Optional
- Type: io.github.cdklabs.projen.TaskOptions
Task properties.
~~addTip
~~
public void addTip(java.lang.String message)
Prints a "tip" message during synthesis.
message
Required
- 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.
_glob
Required
- 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.
name
Required
- 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>
task
Required
- 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.
filePath
Required
- 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.
filePath
Required
- 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.
filePath
Required
- 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.
filePath
Required
- 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.
deps
Required
- 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.
x
Required
- 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.
x
Required
- 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.
construct
Required
- 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. |
node
Required
public Node getNode();
- Type: software.constructs.Node
The tree node.
buildTask
Required
public Task getBuildTask();
- Type: io.github.cdklabs.projen.Task
commitGenerated
Required
public java.lang.Boolean getCommitGenerated();
- Type: java.lang.Boolean
Whether to commit the managed files by default.
compileTask
Required
public Task getCompileTask();
- Type: io.github.cdklabs.projen.Task
components
Required
public java.util.List<Component> getComponents();
- Type: java.util.List
Returns all the components within this project.
deps
Required
public Dependencies getDeps();
- Type: io.github.cdklabs.projen.Dependencies
Project dependencies.
ejected
Required
public java.lang.Boolean getEjected();
- Type: java.lang.Boolean
Whether or not the project is being ejected.
files
Required
public java.util.List<FileBase> getFiles();
- Type: java.util.List
All files in this project.
gitattributes
Required
public GitAttributesFile getGitattributes();
- Type: io.github.cdklabs.projen.GitAttributesFile
The .gitattributes file for this repository.
gitignore
Required
public IgnoreFile getGitignore();
- Type: io.github.cdklabs.projen.IgnoreFile
.gitignore.
logger
Required
public Logger getLogger();
- Type: io.github.cdklabs.projen.Logger
Logging utilities.
name
Required
public java.lang.String getName();
- Type: java.lang.String
Project name.
outdir
Required
public java.lang.String getOutdir();
- Type: java.lang.String
Absolute output directory of this project.
packageTask
Required
public Task getPackageTask();
- Type: io.github.cdklabs.projen.Task
postCompileTask
Required
public Task getPostCompileTask();
- Type: io.github.cdklabs.projen.Task
preCompileTask
Required
public Task getPreCompileTask();
- Type: io.github.cdklabs.projen.Task
projectBuild
Required
public ProjectBuild getProjectBuild();
- Type: io.github.cdklabs.projen.ProjectBuild
Manages the build process of the project.
projenCommand
Required
public java.lang.String getProjenCommand();
- Type: java.lang.String
The command to use in order to run the projen CLI.
root
Required
public Project getRoot();
- Type: io.github.cdklabs.projen.Project
The root project.
subprojects
Required
public java.util.List<Project> getSubprojects();
- Type: java.util.List
Returns all the subprojects within this project.
tasks
Required
public Tasks getTasks();
- Type: io.github.cdklabs.projen.Tasks
Project tasks.
testTask
Required
public Task getTestTask();
- Type: io.github.cdklabs.projen.Task
defaultTask
Optional
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.
initProject
Optional
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.
parent
Optional
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_TASK
Required
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). |
name
Required
- Type: java.lang.String
- Default: $BASEDIR
This is the name of your project.
commitGenerated
Optional
- Type: java.lang.Boolean
- Default: true
Whether to commit the managed files by default.
gitIgnoreOptions
Optional
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptions
Optional
- Type: io.github.cdklabs.projen.GitOptions
Configuration options for git.
logging
Optional
- Type: io.github.cdklabs.projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
outdir
Optional
- 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.
parent
Optional
- Type: io.github.cdklabs.projen.Project
The parent project, if this project is part of a bigger project.
projenCommand
Optional
- 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.
projenrcJson
Optional
- Type: java.lang.Boolean
- Default: false
Generate (once) .projenrc.json (in JSON). Set to false
in order to disable .projenrc.json generation.
projenrcJsonOptions
Optional
- Type: io.github.cdklabs.projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
renovatebot
Optional
- Type: java.lang.Boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptions
Optional
- Type: io.github.cdklabs.projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
smithyOptions
Required
- Type: SmithyModelOptions
Smithy engine options.
handlerLanguages
Optional
- Type: java.util.List<Language>
The languages users have specified for handler projects (if any).
parsedSpecFile
Required
- 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.
globs
Required
- Type: java.lang.String
The glob patterns to match.
addGitIgnore
public void addGitIgnore(java.lang.String pattern)
Adds a .gitignore pattern.
pattern
Required
- 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
.
_pattern
Required
- 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.
name
Required
- Type: java.lang.String
The task name to add.
props
Optional
- Type: io.github.cdklabs.projen.TaskOptions
Task properties.
~~addTip
~~
public void addTip(java.lang.String message)
Prints a "tip" message during synthesis.
message
Required
- 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.
_glob
Required
- 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.
name
Required
- 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>
task
Required
- 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.
filePath
Required
- 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.
filePath
Required
- 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.
filePath
Required
- 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.
filePath
Required
- 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.
deps
Required
- 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.
x
Required
- 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.
x
Required
- 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.
construct
Required
- 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. |
node
Required
public Node getNode();
- Type: software.constructs.Node
The tree node.
buildTask
Required
public Task getBuildTask();
- Type: io.github.cdklabs.projen.Task
commitGenerated
Required
public java.lang.Boolean getCommitGenerated();
- Type: java.lang.Boolean
Whether to commit the managed files by default.
compileTask
Required
public Task getCompileTask();
- Type: io.github.cdklabs.projen.Task
components
Required
public java.util.List<Component> getComponents();
- Type: java.util.List
Returns all the components within this project.
deps
Required
public Dependencies getDeps();
- Type: io.github.cdklabs.projen.Dependencies
Project dependencies.
ejected
Required
public java.lang.Boolean getEjected();
- Type: java.lang.Boolean
Whether or not the project is being ejected.
files
Required
public java.util.List<FileBase> getFiles();
- Type: java.util.List
All files in this project.
gitattributes
Required
public GitAttributesFile getGitattributes();
- Type: io.github.cdklabs.projen.GitAttributesFile
The .gitattributes file for this repository.
gitignore
Required
public IgnoreFile getGitignore();
- Type: io.github.cdklabs.projen.IgnoreFile
.gitignore.
logger
Required
public Logger getLogger();
- Type: io.github.cdklabs.projen.Logger
Logging utilities.
name
Required
public java.lang.String getName();
- Type: java.lang.String
Project name.
outdir
Required
public java.lang.String getOutdir();
- Type: java.lang.String
Absolute output directory of this project.
packageTask
Required
public Task getPackageTask();
- Type: io.github.cdklabs.projen.Task
postCompileTask
Required
public Task getPostCompileTask();
- Type: io.github.cdklabs.projen.Task
preCompileTask
Required
public Task getPreCompileTask();
- Type: io.github.cdklabs.projen.Task
projectBuild
Required
public ProjectBuild getProjectBuild();
- Type: io.github.cdklabs.projen.ProjectBuild
Manages the build process of the project.
projenCommand
Required
public java.lang.String getProjenCommand();
- Type: java.lang.String
The command to use in order to run the projen CLI.
root
Required
public Project getRoot();
- Type: io.github.cdklabs.projen.Project
The root project.
subprojects
Required
public java.util.List<Project> getSubprojects();
- Type: java.util.List
Returns all the subprojects within this project.
tasks
Required
public Tasks getTasks();
- Type: io.github.cdklabs.projen.Tasks
Project tasks.
testTask
Required
public Task getTestTask();
- Type: io.github.cdklabs.projen.Task
defaultTask
Optional
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.
initProject
Optional
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.
parent
Optional
public Project getParent();
- Type: io.github.cdklabs.projen.Project
A parent project.
If undefined, this is the root project.
apiName
Required
public java.lang.String getApiName();
- Type: java.lang.String
Name of the API.
definition
Required
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_TASK
Required
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. |
project
Required
- Type: io.github.cdklabs.projen.Project
ignoreGradleWrapper
Optional
- 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
ignoreSmithyBuildOutput
Optional
- 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.
smithyBuildOptions
Optional
- 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.
deps
Required
- 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.
deps
Required
- 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.
sources
Required
- 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.
x
Required
- 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.
x
Required
- 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. |
node
Required
public Node getNode();
- Type: software.constructs.Node
The tree node.
project
Required
public Project getProject();
- Type: io.github.cdklabs.projen.Project
gradleProjectName
Required
public java.lang.String getGradleProjectName();
- Type: java.lang.String
Name of the gradle project.
modelDir
Required
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). |
project
Required
- Type: io.github.cdklabs.projen.Project
smithyOptions
Required
- Type: SmithyModelOptions
Smithy engine options.
handlerLanguages
Optional
- 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.
deps
Required
- 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.
deps
Required
- 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.
sources
Required
- 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.
x
Required
- 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.
x
Required
- 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. |
node
Required
public Node getNode();
- Type: software.constructs.Node
The tree node.
project
Required
public Project getProject();
- Type: io.github.cdklabs.projen.Project
gradleProjectName
Required
public java.lang.String getGradleProjectName();
- Type: java.lang.String
Name of the gradle project.
modelDir
Required
public java.lang.String getModelDir();
- Type: java.lang.String
Directory of model source code.
generatedModelDir
Required
public java.lang.String getGeneratedModelDir();
- Type: java.lang.String
Directory of generated model source code.
openApiSpecificationPath
Required
public java.lang.String getOpenApiSpecificationPath();
- Type: java.lang.String
Path to the generated OpenAPI specification, relative to the project outdir.
smithyJsonModelPath
Required
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. |
name
Required
- Type: java.lang.String
- Default: $BASEDIR
This is the name of your project.
commitGenerated
Optional
- Type: java.lang.Boolean
- Default: true
Whether to commit the managed files by default.
gitIgnoreOptions
Optional
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptions
Optional
- Type: io.github.cdklabs.projen.GitOptions
Configuration options for git.
logging
Optional
- Type: io.github.cdklabs.projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
outdir
Optional
- 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.
parent
Optional
- Type: io.github.cdklabs.projen.Project
The parent project, if this project is part of a bigger project.
projenCommand
Optional
- 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.
projenrcJson
Optional
- Type: java.lang.Boolean
- Default: false
Generate (once) .projenrc.json (in JSON). Set to false
in order to disable .projenrc.json generation.
projenrcJsonOptions
Optional
- Type: io.github.cdklabs.projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
renovatebot
Optional
- Type: java.lang.Boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptions
Optional
- Type: io.github.cdklabs.projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
ignoreGradleWrapper
Optional
- 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
ignoreSmithyBuildOutput
Optional
- 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.
smithyBuildOptions
Optional
- 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.
globs
Required
- Type: java.lang.String
The glob patterns to match.
addGitIgnore
public void addGitIgnore(java.lang.String pattern)
Adds a .gitignore pattern.
pattern
Required
- 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
.
_pattern
Required
- 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.
name
Required
- Type: java.lang.String
The task name to add.
props
Optional
- Type: io.github.cdklabs.projen.TaskOptions
Task properties.
~~addTip
~~
public void addTip(java.lang.String message)
Prints a "tip" message during synthesis.
message
Required
- 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.
_glob
Required
- 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.
name
Required
- 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>
task
Required
- 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.
filePath
Required
- 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.
filePath
Required
- 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.
filePath
Required
- 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.
filePath
Required
- 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.
deps
Required
- 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.
x
Required
- 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.
x
Required
- 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.
construct
Required
- 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. |
node
Required
public Node getNode();
- Type: software.constructs.Node
The tree node.
buildTask
Required
public Task getBuildTask();
- Type: io.github.cdklabs.projen.Task
commitGenerated
Required
public java.lang.Boolean getCommitGenerated();
- Type: java.lang.Boolean
Whether to commit the managed files by default.
compileTask
Required
public Task getCompileTask();
- Type: io.github.cdklabs.projen.Task
components
Required
public java.util.List<Component> getComponents();
- Type: java.util.List
Returns all the components within this project.
deps
Required
public Dependencies getDeps();
- Type: io.github.cdklabs.projen.Dependencies
Project dependencies.
ejected
Required
public java.lang.Boolean getEjected();
- Type: java.lang.Boolean
Whether or not the project is being ejected.
files
Required
public java.util.List<FileBase> getFiles();
- Type: java.util.List
All files in this project.
gitattributes
Required
public GitAttributesFile getGitattributes();
- Type: io.github.cdklabs.projen.GitAttributesFile
The .gitattributes file for this repository.
gitignore
Required
public IgnoreFile getGitignore();
- Type: io.github.cdklabs.projen.IgnoreFile
.gitignore.
logger
Required
public Logger getLogger();
- Type: io.github.cdklabs.projen.Logger
Logging utilities.
name
Required
public java.lang.String getName();
- Type: java.lang.String
Project name.
outdir
Required
public java.lang.String getOutdir();
- Type: java.lang.String
Absolute output directory of this project.
packageTask
Required
public Task getPackageTask();
- Type: io.github.cdklabs.projen.Task
postCompileTask
Required
public Task getPostCompileTask();
- Type: io.github.cdklabs.projen.Task
preCompileTask
Required
public Task getPreCompileTask();
- Type: io.github.cdklabs.projen.Task
projectBuild
Required
public ProjectBuild getProjectBuild();
- Type: io.github.cdklabs.projen.ProjectBuild
Manages the build process of the project.
projenCommand
Required
public java.lang.String getProjenCommand();
- Type: java.lang.String
The command to use in order to run the projen CLI.
root
Required
public Project getRoot();
- Type: io.github.cdklabs.projen.Project
The root project.
subprojects
Required
public java.util.List<Project> getSubprojects();
- Type: java.util.List
Returns all the subprojects within this project.
tasks
Required
public Tasks getTasks();
- Type: io.github.cdklabs.projen.Tasks
Project tasks.
testTask
Required
public Task getTestTask();
- Type: io.github.cdklabs.projen.Task
defaultTask
Optional
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.
initProject
Optional
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.
parent
Optional
public Project getParent();
- Type: io.github.cdklabs.projen.Project
A parent project.
If undefined, this is the root project.
definition
Required
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_TASK
Required
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. |
scope
Required
- Type: software.constructs.Construct
id
Required
- Type: java.lang.String
maxEventAge
Optional
- 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
onFailure
Optional
- Type: software.amazon.awscdk.services.lambda.IDestination
- Default: no destination
The destination for failed invocations.
onSuccess
Optional
- Type: software.amazon.awscdk.services.lambda.IDestination
- Default: no destination
The destination for successful invocations.
retryAttempts
Optional
- Type: java.lang.Number
- Default: 2
The maximum number of times to retry when the function returns an error.
Minimum: 0 Maximum: 2
adotInstrumentation
Optional
- Type: software.amazon.awscdk.services.lambda.AdotInstrumentationConfig
- Default: No ADOT instrumentation
Specify the configuration of AWS Distro for OpenTelemetry (ADOT) instrumentation.
allowAllIpv6Outbound
Optional
- 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.
allowAllOutbound
Optional
- 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.
allowPublicSubnet
Optional
- 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
applicationLogLevelV2
as a property instead. -
Type: java.lang.String
- Default: "INFO"
Sets the application log level for the function.
applicationLogLevelV2
Optional
- Type: software.amazon.awscdk.services.lambda.ApplicationLogLevel
- Default: ApplicationLogLevel.INFO
Sets the application log level for the function.
architecture
Optional
- Type: software.amazon.awscdk.services.lambda.Architecture
- Default: Architecture.X86_64
The system architectures compatible with this lambda function.
codeSigningConfig
Optional
- Type: software.amazon.awscdk.services.lambda.ICodeSigningConfig
- Default: Not Sign the Code
Code signing config associated with this function.
currentVersionOptions
Optional
- 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.
deadLetterQueue
Optional
- Type: software.amazon.awscdk.services.sqs.IQueue
- Default: SQS queue with 14 day retention period if
deadLetterQueueEnabled
istrue
The SQS queue to use if DLQ is enabled.
If SNS topic is desired, specify deadLetterTopic
property instead.
deadLetterQueueEnabled
Optional
- Type: java.lang.Boolean
- Default: false unless
deadLetterQueue
is set, which implies DLQ is enabled.
Enabled DLQ.
If deadLetterQueue
is undefined,
an SQS queue with default options will be defined for your Function.
deadLetterTopic
Optional
- 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.
description
Optional
- Type: java.lang.String
- Default: No description.
A description of the function.
environment
Optional
- 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.
environmentEncryption
Optional
- 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.
ephemeralStorageSize
Optional
- Type: software.amazon.awscdk.Size
- Default: 512 MiB
The size of the function’s /tmp directory in MiB.
events
Optional
- Type: java.util.List
- Default: No event sources.
Event sources for this function.
You can also add event sources using addEventSource
.
filesystem
Optional
- Type: software.amazon.awscdk.services.lambda.FileSystem
- Default: will not mount any filesystem
The filesystem configuration for the lambda function.
functionName
Optional
- 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.
initialPolicy
Optional
- 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.
insightsVersion
Optional
- Type: software.amazon.awscdk.services.lambda.LambdaInsightsVersion
- Default: No Lambda Insights
Specify the version of CloudWatch Lambda insights to use for monitoring.
ipv6AllowedForDualStack
Optional
- 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.
layers
Optional
- 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
loggingFormat
as a property instead. -
Type: java.lang.String
- Default: "Text"
Sets the logFormat for the function.
loggingFormat
Optional
- Type: software.amazon.awscdk.services.lambda.LoggingFormat
- Default: LoggingFormat.TEXT
Sets the loggingFormat for the function.
logGroup
Optional
- 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.
logRetention
Optional
- 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;
logRetentionRetryOptions
Optional
- 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.
logRetentionRole
Optional
- 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.
memorySize
Optional
- 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.
paramsAndSecrets
Optional
- 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
profiling
Optional
- Type: java.lang.Boolean
- Default: No profiling.
Enable profiling.
https://docs.aws.amazon.com/codeguru/latest/profiler-ug/setting-up-lambda.html
profilingGroup
Optional
- Type: software.amazon.awscdk.services.codeguruprofiler.IProfilingGroup
- Default: A new profiling group will be created if
profiling
is set.
Profiling Group.
https://docs.aws.amazon.com/codeguru/latest/profiler-ug/setting-up-lambda.html
recursiveLoop
Optional
- 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.
reservedConcurrentExecutions
Optional
- 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
role
Optional
- 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".
runtimeManagementMode
Optional
- Type: software.amazon.awscdk.services.lambda.RuntimeManagementMode
- Default: Auto
Sets the runtime management configuration for a function's version.
securityGroups
Optional
- 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.
snapStart
Optional
- 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
systemLogLevelV2
as a property instead. -
Type: java.lang.String
- Default: "INFO"
Sets the system log level for the function.
systemLogLevelV2
Optional
- Type: software.amazon.awscdk.services.lambda.SystemLogLevel
- Default: SystemLogLevel.INFO
Sets the system log level for the function.
timeout
Optional
- 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.
tracing
Optional
- Type: software.amazon.awscdk.services.lambda.Tracing
- Default: Tracing.Disabled
Enable AWS X-Ray Tracing for Lambda Function.
vpc
Optional
- 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.
vpcSubnets
Optional
- 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
).
code
Required
- 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.
handler
Required
- 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.
runtime
Required
- 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.
disableSnapStart
Optional
- 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
).
policy
Required
- 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));
source
Required
- 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.
id
Required
- Type: java.lang.String
options
Required
- Type: software.amazon.awscdk.services.lambda.EventSourceMappingOptions
addFunctionUrl
public FunctionUrl addFunctionUrl()
public FunctionUrl addFunctionUrl(FunctionUrlOptions options)
Adds a url to this lambda function.
options
Optional
- 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.
id
Required
- Type: java.lang.String
The id for the permission construct.
permission
Required
- 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.
statement
Required
- Type: software.amazon.awscdk.services.iam.PolicyStatement
configureAsyncInvoke
public void configureAsyncInvoke(EventInvokeConfigOptions options)
Configures options for asynchronous invocation.
options
Required
- 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.
scope
Required
- Type: software.constructs.Construct
action
Required
- Type: java.lang.String
grantInvoke
public Grant grantInvoke(IGrantable grantee)
Grant the given identity permissions to invoke this Lambda.
grantee
Required
- 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.
compositePrincipal
Required
- 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.
grantee
Required
- Type: software.amazon.awscdk.services.iam.IGrantable
grantInvokeUrl
public Grant grantInvokeUrl(IGrantable grantee)
Grant the given identity permissions to invoke this Lambda Function URL.
grantee
Required
- 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.
grantee
Required
- Type: software.amazon.awscdk.services.iam.IGrantable
version
Required
- 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.
metricName
Required
- Type: java.lang.String
props
Optional
- 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
props
Optional
- 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
props
Optional
- 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
props
Optional
- 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
props
Optional
- 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,
});
aliasName
Required
- Type: java.lang.String
The name of the alias.
options
Optional
- 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.
key
Required
- Type: java.lang.String
The environment variable key.
value
Required
- Type: java.lang.String
The environment variable's value.
options
Optional
- 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.
layers
Required
- 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.
x
Required
- 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.
x
Required
- 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.
construct
Required
- 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.
construct
Required
- 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.
propertyName
Required
- Type: java.lang.String
The property to classify.
locked
Required
- 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.
scope
Required
- Type: software.constructs.Construct
id
Required
- Type: java.lang.String
functionArn
Required
- 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.
scope
Required
- Type: software.constructs.Construct
The parent construct.
id
Required
- Type: java.lang.String
The name of the lambda construct.
attrs
Required
- 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.
scope
Required
- Type: software.constructs.Construct
id
Required
- Type: java.lang.String
functionName
Required
- 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.
metricName
Required
- Type: java.lang.String
props
Optional
- 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.
props
Optional
- 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.
props
Optional
- 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.
props
Optional
- 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.
props
Optional
- 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.
props
Optional
- 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.
props
Optional
- 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. |
node
Required
public Node getNode();
- Type: software.constructs.Node
The tree node.
env
Required
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.
stack
Required
public Stack getStack();
- Type: software.amazon.awscdk.Stack
The stack in which this resource is defined.
architecture
Required
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).
connections
Required
public Connections getConnections();
- Type: software.amazon.awscdk.services.ec2.Connections
Access the Connections object.
Will fail if not a VPC-enabled Lambda Function
functionArn
Required
public java.lang.String getFunctionArn();
- Type: java.lang.String
ARN of this function.
functionName
Required
public java.lang.String getFunctionName();
- Type: java.lang.String
Name of this function.
grantPrincipal
Required
public IPrincipal getGrantPrincipal();
- Type: software.amazon.awscdk.services.iam.IPrincipal
The principal this Lambda Function is running as.
isBoundToVpc
Required
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.
latestVersion
Required
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.
permissionsNode
Required
public Node getPermissionsNode();
- Type: software.constructs.Node
The construct node where permissions are attached.
resourceArnsForGrantInvoke
Required
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().
role
Optional
public IRole getRole();
- Type: software.amazon.awscdk.services.iam.IRole
Execution role associated with this function.
currentVersion
Required
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
.
logGroup
Required
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.
runtime
Required
public Runtime getRuntime();
- Type: software.amazon.awscdk.services.lambda.Runtime
The runtime configured for this lambda.
deadLetterQueue
Optional
public IQueue getDeadLetterQueue();
- Type: software.amazon.awscdk.services.sqs.IQueue
The DLQ (as queue) associated with this Lambda Function (this is an optional attribute).
deadLetterTopic
Optional
public ITopic getDeadLetterTopic();
- Type: software.amazon.awscdk.services.sns.ITopic
The DLQ (as topic) associated with this Lambda Function (this is an optional attribute).
timeout
Optional
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). |
project
Required
- Type: io.github.cdklabs.projen.Project
asyncApiSpecFile
Required
- Type: java.lang.String
Path to the generated AsyncAPI specification (relative to the project root).
parsedSpecFile
Required
- 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.
x
Required
- 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.
x
Required
- Type: java.lang.Object
Properties
Name | Type | Description |
---|---|---|
node |
software.constructs.Node |
The tree node. |
project |
io.github.cdklabs.projen.Project |
No description. |
node
Required
public Node getNode();
- Type: software.constructs.Node
The tree node.
project
Required
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). |
project
Required
- Type: io.github.cdklabs.projen.Project
parsedSpecFile
Required
- Type: java.lang.String
Path of the parsed/bundled OpenAPI specification (relative to the project root).
openApiSpecificationPath
Required
- Type: java.lang.String
Path to the OpenAPI specification.
smithyJsonModelPath
Optional
- 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.
x
Required
- 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.
x
Required
- Type: java.lang.Object
Properties
Name | Type | Description |
---|---|---|
node |
software.constructs.Node |
The tree node. |
project |
io.github.cdklabs.projen.Project |
No description. |
node
Required
public Node getNode();
- Type: software.constructs.Node
The tree node.
project
Required
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). |
name
Required
- Type: java.lang.String
- Default: $BASEDIR
This is the name of your project.
commitGenerated
Optional
- Type: java.lang.Boolean
- Default: true
Whether to commit the managed files by default.
gitIgnoreOptions
Optional
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptions
Optional
- Type: io.github.cdklabs.projen.GitOptions
Configuration options for git.
logging
Optional
- Type: io.github.cdklabs.projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
outdir
Optional
- 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.
parent
Optional
- Type: io.github.cdklabs.projen.Project
The parent project, if this project is part of a bigger project.
projenCommand
Optional
- 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.
projenrcJson
Optional
- Type: java.lang.Boolean
- Default: false
Generate (once) .projenrc.json (in JSON). Set to false
in order to disable .projenrc.json generation.
projenrcJsonOptions
Optional
- Type: io.github.cdklabs.projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
renovatebot
Optional
- Type: java.lang.Boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptions
Optional
- Type: io.github.cdklabs.projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
infrastructure
Required
Configuration for generated infrastructure.
model
Required
- Type: ModelConfiguration
Configuration for the API model.
commitGeneratedCode
Optional
- Type: java.lang.Boolean
- Default: false
Whether to commit the code generated by the OpenAPI Generator.
documentation
Optional
Configuration for generated documentation.
handlers
Optional
- Type: HandlersConfiguration
Configuration for lambda handlers for implementing the API.
library
Optional
- 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.
runtime
Optional
- 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.
globs
Required
- Type: java.lang.String
The glob patterns to match.
addGitIgnore
public void addGitIgnore(java.lang.String pattern)
Adds a .gitignore pattern.
pattern
Required
- 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
.
_pattern
Required
- 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.
name
Required
- Type: java.lang.String
The task name to add.
props
Optional
- Type: io.github.cdklabs.projen.TaskOptions
Task properties.
~~addTip
~~
public void addTip(java.lang.String message)
Prints a "tip" message during synthesis.
message
Required
- 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.
_glob
Required
- 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.
name
Required
- 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>
task
Required
- 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.
filePath
Required
- 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.
filePath
Required
- 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.
filePath
Required
- 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.
filePath
Required
- 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.
x
Required
- 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.
x
Required
- 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.
construct
Required
- 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. |
node
Required
public Node getNode();
- Type: software.constructs.Node
The tree node.
buildTask
Required
public Task getBuildTask();
- Type: io.github.cdklabs.projen.Task
commitGenerated
Required
public java.lang.Boolean getCommitGenerated();
- Type: java.lang.Boolean
Whether to commit the managed files by default.
compileTask
Required
public Task getCompileTask();
- Type: io.github.cdklabs.projen.Task
components
Required
public java.util.List<Component> getComponents();
- Type: java.util.List
Returns all the components within this project.
deps
Required
public Dependencies getDeps();
- Type: io.github.cdklabs.projen.Dependencies
Project dependencies.
ejected
Required
public java.lang.Boolean getEjected();
- Type: java.lang.Boolean
Whether or not the project is being ejected.
files
Required
public java.util.List<FileBase> getFiles();
- Type: java.util.List
All files in this project.
gitattributes
Required
public GitAttributesFile getGitattributes();
- Type: io.github.cdklabs.projen.GitAttributesFile
The .gitattributes file for this repository.
gitignore
Required
public IgnoreFile getGitignore();
- Type: io.github.cdklabs.projen.IgnoreFile
.gitignore.
logger
Required
public Logger getLogger();
- Type: io.github.cdklabs.projen.Logger
Logging utilities.
name
Required
public java.lang.String getName();
- Type: java.lang.String
Project name.
outdir
Required
public java.lang.String getOutdir();
- Type: java.lang.String
Absolute output directory of this project.
packageTask
Required
public Task getPackageTask();
- Type: io.github.cdklabs.projen.Task
postCompileTask
Required
public Task getPostCompileTask();
- Type: io.github.cdklabs.projen.Task
preCompileTask
Required
public Task getPreCompileTask();
- Type: io.github.cdklabs.projen.Task
projectBuild
Required
public ProjectBuild getProjectBuild();
- Type: io.github.cdklabs.projen.ProjectBuild
Manages the build process of the project.
projenCommand
Required
public java.lang.String getProjenCommand();
- Type: java.lang.String
The command to use in order to run the projen CLI.
root
Required
public Project getRoot();
- Type: io.github.cdklabs.projen.Project
The root project.
subprojects
Required
public java.util.List<Project> getSubprojects();
- Type: java.util.List
Returns all the subprojects within this project.
tasks
Required
public Tasks getTasks();
- Type: io.github.cdklabs.projen.Tasks
Project tasks.
testTask
Required
public Task getTestTask();
- Type: io.github.cdklabs.projen.Task
defaultTask
Optional
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.
initProject
Optional
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.
parent
Optional
public Project getParent();
- Type: io.github.cdklabs.projen.Project
A parent project.
If undefined, this is the root project.
all
Required
public ProjectCollections getAll();
- Type: ProjectCollections
Collections of all sub-projects managed by this project.
documentation
Required
public GeneratedDocumentationProjects getDocumentation();
Generated documentation projects.
Only the properties corresponding to specified documentation.formats
will be defined.
handlers
Required
public GeneratedCodeProjects getHandlers();
- Type: GeneratedCodeProjects
Lambda handlers projects.
Only the properties corresponding to handlers.languages
will be defined.
infrastructure
Required
public GeneratedCodeProjects getInfrastructure();
- Type: GeneratedCodeProjects
Generated infrastructure projects.
Only the property corresponding to infrastructure.language
will be defined.
library
Required
public GeneratedLibraryProjects getLibrary();
- Type: GeneratedLibraryProjects
Generated library projects.
Only the properties corresponding to specified library.libraries
will be defined.
model
Required
public ModelProject getModel();
- Type: ModelProject
Project for the api model.
runtime
Required
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_TASK
Required
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)
// .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. |
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. |
scope
Required
- Type: software.constructs.Construct
id
Required
- Type: java.lang.String
cloudWatchRole
Optional
- Type: java.lang.Boolean
- Default: false if
@aws-cdk/aws-apigateway:disableCloudWatchRole
is enabled, true otherwise
Automatically configure an AWS CloudWatch role for API Gateway.
cloudWatchRoleRemovalPolicy
Optional
- 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.
deploy
Optional
- 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.
deployOptions
Optional
- 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.
description
Optional
- Type: java.lang.String
- Default: 'Automatically created by the RestApi construct'
A description of the RestApi construct.
disableExecuteApiEndpoint
Optional
- 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
domainName
Optional
- Type: software.amazon.awscdk.services.apigateway.DomainNameOptions
- Default: no domain name is defined, use
addDomainName
or directly define aDomainName
.
Configure a custom domain name and map it to this API.
endpointExportName
Optional
- 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.
endpointTypes
Optional
- Type: java.util.List
- Default: EndpointType.EDGE
A list of the endpoint types of the API.
Use this property when creating an API.
failOnWarnings
Optional
- 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.
parameters
Optional
- 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
policy
Optional
- Type: software.amazon.awscdk.services.iam.PolicyDocument
- Default: No policy.
A policy document that contains the permissions for this RestApi.
restApiName
Optional
- Type: java.lang.String
- Default: ID of the RestApi construct.
A name for the API Gateway RestApi resource.
retainDeployments
Optional
- 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.
integrations
Required
- Type: java.util.Map
TypeSafeApiIntegration\>
A mapping of API operation to its integration.
operationLookup
Required
- Type: java.util.Map
OperationDetails\>
Details about each operation.
apiKeyOptions
Optional
- Type: ApiKeyOptions
Options for API keys.
corsOptions
Optional
- Type: software.amazon.awscdk.services.apigateway.CorsOptions
Cross Origin Resource Sharing options for the API.
defaultAuthorizer
Optional
- 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.
specPath
Required
- Type: java.lang.String
Path to the JSON open api spec.
minCompressionSize
Optional
- 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.
outputSpecBucket
Optional
- 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.
webAclOptions
Optional
- 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.
x
Required
- 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. |
node
Required
public Node getNode();
- Type: software.constructs.Node
The tree node.
api
Required
public SpecRestApi getApi();
- Type: software.amazon.awscdk.services.apigateway.SpecRestApi
Underlying API Gateway API construct.
extendedApiSpecification
Required
public java.lang.Object getExtendedApiSpecification();
- Type: java.lang.Object
The OpenAPI specification with applied API gateway extensions.
ipSet
Optional
public CfnIPSet getIpSet();
- Type: software.amazon.awscdk.services.wafv2.CfnIPSet
Reference to the IP set if created.
webAcl
Optional
public CfnWebACL getWebAcl();
- Type: software.amazon.awscdk.services.wafv2.CfnWebACL
Reference to the webacl, if created.
webAclAssociation
Optional
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. |
scope
Required
- Type: software.constructs.Construct
id
Required
- Type: java.lang.String
apiKeySelectionExpression
Optional
- 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.
apiName
Optional
- Type: java.lang.String
- Default: id of the WebSocketApi construct.
Name for the WebSocket API resource.
description
Optional
- Type: java.lang.String
- Default: none
The description of the API.
integrations
Required
- Type: java.util.Map
TypeSafeWebsocketApiIntegration\>
WebSocket routes and their corresponding integrations.
operationLookup
Required
- Type: java.util.Map
WebsocketOperationDetails\>
Details about each operation.
specPath
Required
- Type: java.lang.String
Path to the websocket api specification json file.
authorizer
Optional
- Type: software.amazon.awscdk.services.apigatewayv2.IWebSocketRouteAuthorizer
- Default: NONE
Authorizer to use for the API (applied to the $connect route).
connect
Optional
- Type: TypeSafeWebsocketApiIntegration
- Default: mocked
Integration for the $connect route (invoked when a new client connects).
disableAccessLogging
Optional
- Type: java.lang.Boolean
- Default: false
Disable access logging.
disableGrantManagementAccessToLambdas
Optional
- 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.
disableMockIntegrationResponses
Optional
- 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)
disconnect
Optional
- Type: TypeSafeWebsocketApiIntegration
- Default: mocked
Integration for the $disconnect route (invoked when a client disconnects).
stageProps
Optional
- 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.
x
Required
- 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. |
node
Required
public Node getNode();
- Type: software.constructs.Node
The tree node.
api
Required
public WebSocketApi getApi();
- Type: software.amazon.awscdk.services.apigatewayv2.WebSocketApi
Reference to the websocket API.
defaultStage
Required
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). |
name
Required
- Type: java.lang.String
- Default: $BASEDIR
This is the name of your project.
commitGenerated
Optional
- Type: java.lang.Boolean
- Default: true
Whether to commit the managed files by default.
gitIgnoreOptions
Optional
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptions
Optional
- Type: io.github.cdklabs.projen.GitOptions
Configuration options for git.
logging
Optional
- Type: io.github.cdklabs.projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
outdir
Optional
- 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.
parent
Optional
- Type: io.github.cdklabs.projen.Project
The parent project, if this project is part of a bigger project.
projenCommand
Optional
- 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.
projenrcJson
Optional
- Type: java.lang.Boolean
- Default: false
Generate (once) .projenrc.json (in JSON). Set to false
in order to disable .projenrc.json generation.
projenrcJsonOptions
Optional
- Type: io.github.cdklabs.projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
renovatebot
Optional
- Type: java.lang.Boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptions
Optional
- Type: io.github.cdklabs.projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
infrastructure
Required
Configuration for generated infrastructure.
model
Required
Configuration for the API model.
documentation
Optional
Configuration for generated documentation.
handlers
Optional
Configuration for lambda handlers for implementing the API.
library
Optional
Configuration for generated libraries.
These include clients for interacting with your websocket API
runtime
Optional
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.
globs
Required
- Type: java.lang.String
The glob patterns to match.
addGitIgnore
public void addGitIgnore(java.lang.String pattern)
Adds a .gitignore pattern.
pattern
Required
- 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
.
_pattern
Required
- 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.
name
Required
- Type: java.lang.String
The task name to add.
props
Optional
- Type: io.github.cdklabs.projen.TaskOptions
Task properties.
~~addTip
~~
public void addTip(java.lang.String message)
Prints a "tip" message during synthesis.
message
Required
- 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.
_glob
Required
- 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.
name
Required
- 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>
task
Required
- 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.
filePath
Required
- 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.
filePath
Required
- 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.
filePath
Required
- 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.
filePath
Required
- 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.
x
Required
- 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.
x
Required
- 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.
construct
Required
- 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. |
node
Required
public Node getNode();
- Type: software.constructs.Node
The tree node.
buildTask
Required
public Task getBuildTask();
- Type: io.github.cdklabs.projen.Task
commitGenerated
Required
public java.lang.Boolean getCommitGenerated();
- Type: java.lang.Boolean
Whether to commit the managed files by default.
compileTask
Required
public Task getCompileTask();
- Type: io.github.cdklabs.projen.Task
components
Required
public java.util.List<Component> getComponents();
- Type: java.util.List
Returns all the components within this project.
deps
Required
public Dependencies getDeps();
- Type: io.github.cdklabs.projen.Dependencies
Project dependencies.
ejected
Required
public java.lang.Boolean getEjected();
- Type: java.lang.Boolean
Whether or not the project is being ejected.
files
Required
public java.util.List<FileBase> getFiles();
- Type: java.util.List
All files in this project.
gitattributes
Required
public GitAttributesFile getGitattributes();
- Type: io.github.cdklabs.projen.GitAttributesFile
The .gitattributes file for this repository.
gitignore
Required
public IgnoreFile getGitignore();
- Type: io.github.cdklabs.projen.IgnoreFile
.gitignore.
logger
Required
public Logger getLogger();
- Type: io.github.cdklabs.projen.Logger
Logging utilities.
name
Required
public java.lang.String getName();
- Type: java.lang.String
Project name.
outdir
Required
public java.lang.String getOutdir();
- Type: java.lang.String
Absolute output directory of this project.
packageTask
Required
public Task getPackageTask();
- Type: io.github.cdklabs.projen.Task
postCompileTask
Required
public Task getPostCompileTask();
- Type: io.github.cdklabs.projen.Task
preCompileTask
Required
public Task getPreCompileTask();
- Type: io.github.cdklabs.projen.Task
projectBuild
Required
public ProjectBuild getProjectBuild();
- Type: io.github.cdklabs.projen.ProjectBuild
Manages the build process of the project.
projenCommand
Required
public java.lang.String getProjenCommand();
- Type: java.lang.String
The command to use in order to run the projen CLI.
root
Required
public Project getRoot();
- Type: io.github.cdklabs.projen.Project
The root project.
subprojects
Required
public java.util.List<Project> getSubprojects();
- Type: java.util.List
Returns all the subprojects within this project.
tasks
Required
public Tasks getTasks();
- Type: io.github.cdklabs.projen.Tasks
Project tasks.
testTask
Required
public Task getTestTask();
- Type: io.github.cdklabs.projen.Task
defaultTask
Optional
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.
initProject
Optional
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.
parent
Optional
public Project getParent();
- Type: io.github.cdklabs.projen.Project
A parent project.
If undefined, this is the root project.
all
Required
public ProjectCollections getAll();
- Type: ProjectCollections
Collections of all sub-projects managed by this project.
documentation
Required
public GeneratedWebSocketDocumentationProjects getDocumentation();
Generated documentation projects.
Only the properties corresponding to specified documentation.formats
will be defined.
handlers
Required
public GeneratedCodeProjects getHandlers();
- Type: GeneratedCodeProjects
Lambda handlers projects.
Only the properties corresponding to handlers.languages
will be defined.
infrastructure
Required
public GeneratedCodeProjects getInfrastructure();
- Type: GeneratedCodeProjects
Generated infrastructure projects.
Only the property corresponding to infrastructure.language
will be defined.
library
Required
public GeneratedWebSocketLibraryProjects getLibrary();
Generated library projects.
Only the properties corresponding to specified library.libraries
will be defined.
model
Required
public WebSocketModelProject getModel();
- Type: WebSocketModelProject
Project for the api model.
runtime
Required
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_TASK
Required
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). |
project
Required
- Type: io.github.cdklabs.projen.javascript.NodeProject
typeSpecOptions
Required
- Type: TypeSpecModelOptions
TypeSpec model options.
handlerLanguages
Optional
- 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.
x
Required
- 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.
x
Required
- 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. |
node
Required
public Node getNode();
- Type: software.constructs.Node
The tree node.
project
Required
public Project getProject();
- Type: io.github.cdklabs.projen.Project
openApiSpecificationPath
Required
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). |
name
Required
- Type: java.lang.String
- Default: $BASEDIR
This is the name of your project.
commitGenerated
Optional
- Type: java.lang.Boolean
- Default: true
Whether to commit the managed files by default.
gitIgnoreOptions
Optional
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptions
Optional
- Type: io.github.cdklabs.projen.GitOptions
Configuration options for git.
logging
Optional
- Type: io.github.cdklabs.projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
outdir
Optional
- 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.
parent
Optional
- Type: io.github.cdklabs.projen.Project
The parent project, if this project is part of a bigger project.
projenCommand
Optional
- 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.
projenrcJson
Optional
- Type: java.lang.Boolean
- Default: false
Generate (once) .projenrc.json (in JSON). Set to false
in order to disable .projenrc.json generation.
projenrcJsonOptions
Optional
- Type: io.github.cdklabs.projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
renovatebot
Optional
- Type: java.lang.Boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptions
Optional
- Type: io.github.cdklabs.projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
autoApproveOptions
Optional
- Type: io.github.cdklabs.projen.github.AutoApproveOptions
- Default: auto approve is disabled
Enable and configure the 'auto approve' workflow.
autoMerge
Optional
- Type: java.lang.Boolean
- Default: true
Enable automatic merging on GitHub.
Has no effect if github.mergify
is set to false.
autoMergeOptions
Optional
- 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.
clobber
Optional
- Type: java.lang.Boolean
- Default: true, but false for subprojects
Add a clobber
task which resets the repo to origin.
devContainer
Optional
- Type: java.lang.Boolean
- Default: false
Add a VSCode development environment (used for GitHub Codespaces).
github
Optional
- Type: java.lang.Boolean
- Default: true
Enable GitHub integration.
Enabled by default for root projects. Disabled for non-root projects.
githubOptions
Optional
- Type: io.github.cdklabs.projen.github.GitHubOptions
- Default: see GitHubOptions
Options for GitHub integration.
gitpod
Optional
- Type: java.lang.Boolean
- Default: false
Add a Gitpod development environment.
~~mergify
~~Optional
-
Deprecated: use
githubOptions.mergify
instead -
Type: java.lang.Boolean
- Default: true
Whether mergify should be enabled on this repository or not.
~~mergifyOptions
~~Optional
-
Deprecated: use
githubOptions.mergifyOptions
instead -
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).
projenCredentials
Optional
- 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.
readme
Optional
- Type: io.github.cdklabs.projen.SampleReadmeProps
- Default: { filename: 'README.md', contents: '# replace this' }
The README setup.
Example
"{ filename: 'readme.md', contents: '# title' }"
stale
Optional
- Type: java.lang.Boolean
- Default: false
Auto-close of stale issues and pull request.
See staleOptions
for options.
staleOptions
Optional
- 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
.
vscode
Optional
- Type: java.lang.Boolean
- Default: true
Enable VSCode integration.
Enabled by default for root projects. Disabled for non-root projects.
allowLibraryDependencies
Optional
- 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.
authorEmail
Optional
- Type: java.lang.String
Author's e-mail.
authorName
Optional
- Type: java.lang.String
Author's name.
authorOrganization
Optional
- Type: java.lang.Boolean
Is the author an organization.
authorUrl
Optional
- Type: java.lang.String
Author's URL / Website.
autoDetectBin
Optional
- Type: java.lang.Boolean
- Default: true
Automatically add all executables under the bin
directory to your package.json
file under the bin
section.
bin
Optional
- 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.
bugsEmail
Optional
- Type: java.lang.String
The email address to which issues should be reported.
bugsUrl
Optional
- Type: java.lang.String
The url to your project's issue tracker.
bundledDeps
Optional
- 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.
codeArtifactOptions
Optional
- 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
deps
Optional
- 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' ]
description
Optional
- 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
devDeps
Optional
- 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' ]
entrypoint
Optional
- 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
homepage
Optional
- Type: java.lang.String
Package's Homepage / Website.
keywords
Optional
- Type: java.util.List
Keywords to include in package.json
.
license
Optional
- 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.
licensed
Optional
- Type: java.lang.Boolean
- Default: true
Indicates if a license should be added.
maxNodeVersion
Optional
- Type: java.lang.String
- Default: no max
Minimum node.js version to require via engines
(inclusive).
minNodeVersion
Optional
- Type: java.lang.String
- Default: no "engines" specified
Minimum Node.js version to require via package.json engines
(inclusive).
npmAccess
Optional
- 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.
npmProvenance
Optional
- 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
npmRegistryUrl
instead -
Type: java.lang.String
The host name of the npm registry to publish to.
Cannot be set together with npmRegistryUrl
.
npmRegistryUrl
Optional
- 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://")
npmTokenSecret
Optional
- Type: java.lang.String
- Default: "NPM_TOKEN"
GitHub secret which contains the NPM token to use when publishing packages.
packageManager
Optional
- Type: io.github.cdklabs.projen.javascript.NodePackageManager
- Default: NodePackageManager.YARN_CLASSIC
The Node Package Manager used to execute scripts.
packageName
Optional
- Type: java.lang.String
- Default: defaults to project name
The "name" in package.json.
peerDependencyOptions
Optional
- Type: io.github.cdklabs.projen.javascript.PeerDependencyOptions
Options for peerDeps
.
peerDeps
Optional
- 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.
pnpmVersion
Optional
- Type: java.lang.String
- Default: "7"
The version of PNPM to use if using PNPM as a package manager.
repository
Optional
- 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
repositoryDirectory
Optional
- 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.
scopedPackagesOptions
Optional
- 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.
stability
Optional
- Type: java.lang.String
Package's Stability.
yarnBerryOptions
Optional
- Type: io.github.cdklabs.projen.javascript.YarnBerryOptions
- Default: Yarn Berry v4 with all default options
Options for Yarn Berry.
jsiiReleaseVersion
Optional
- Type: java.lang.String
- Default: "latest"
Version requirement of publib
which is used to publish modules to npm.
majorVersion
Optional
- 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.
minMajorVersion
Optional
- 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
.
npmDistTag
Optional
- 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.
postBuildSteps
Optional
- Type: java.util.List
- Default: []
Steps to execute after build as part of the release workflow.
prerelease
Optional
- Type: java.lang.String
- Default: normal semantic versions
Bump versions from the default branch as pre-releases (e.g. "beta", "alpha", "pre").
publishDryRun
Optional
- Type: java.lang.Boolean
- Default: false
Instead of actually publishing to package managers, just print the publishing command.
publishTasks
Optional
- 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.
releasableCommits
Optional
- Type: io.github.cdklabs.projen.ReleasableCommits
- Default: ReleasableCommits.everyCommit()
Find commits that should be considered releasable Used to decide if a release is required.
releaseBranches
Optional
- 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
.
releaseFailureIssue
Optional
- Type: java.lang.Boolean
- Default: false
Create a github issue on every failed publishing task.
releaseFailureIssueLabel
Optional
- 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.
releaseTagPrefix
Optional
- 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.
releaseTrigger
Optional
- Type: io.github.cdklabs.projen.release.ReleaseTrigger
- Default: Continuous releases (
ReleaseTrigger.continuous()
)
The release trigger to use.
releaseWorkflowName
Optional
- Type: java.lang.String
- Default: "release"
The name of the default release workflow.
releaseWorkflowSetupSteps
Optional
- Type: java.util.List
A set of workflow steps to execute in order to setup the workflow container.
versionrcOptions
Optional
- 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.
workflowContainerImage
Optional
- Type: java.lang.String
- Default: default image
Container image to use for GitHub workflows.
workflowRunsOn
Optional
- Type: java.util.List
- Default: ["ubuntu-latest"]
Github Runner selection labels.
workflowRunsOnGroup
Optional
- Type: io.github.cdklabs.projen.GroupRunnerOptions
Github Runner Group selection options.
defaultReleaseBranch
Required
- Type: java.lang.String
- Default: "main"
The name of the main release branch.
artifactsDirectory
Optional
- Type: java.lang.String
- Default: "dist"
A directory which will contain build artifacts.
autoApproveUpgrades
Optional
- 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.
buildWorkflow
Optional
- Type: java.lang.Boolean
- Default: true if not a subproject
Define a GitHub workflow for building PRs.
buildWorkflowOptions
Optional
- 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.
bundlerOptions
Optional
- Type: io.github.cdklabs.projen.javascript.BundlerOptions
Options for Bundler
.
checkLicenses
Optional
- 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.
codeCov
Optional
- 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
.
codeCovTokenSecret
Optional
- 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.
copyrightOwner
Optional
- Type: java.lang.String
- Default: defaults to the value of authorName or "" if
authorName
is undefined.
License copyright owner.
copyrightPeriod
Optional
- Type: java.lang.String
- Default: current year
The copyright years to put in the LICENSE file.
dependabot
Optional
- Type: java.lang.Boolean
- Default: false
Use dependabot to handle dependency upgrades.
Cannot be used in conjunction with depsUpgrade
.
dependabotOptions
Optional
- Type: io.github.cdklabs.projen.github.DependabotOptions
- Default: default options
Options for dependabot.
depsUpgrade
Optional
- Type: java.lang.Boolean
- Default: true
Use tasks and github workflows to handle dependency upgrades.
Cannot be used in conjunction with dependabot
.
depsUpgradeOptions
Optional
- Type: io.github.cdklabs.projen.javascript.UpgradeDependenciesOptions
- Default: default options
Options for UpgradeDependencies
.
gitignore
Optional
- Type: java.util.List
Additional entries to .gitignore.
jest
Optional
- Type: java.lang.Boolean
- Default: true
Setup jest unit tests.
jestOptions
Optional
- 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.
npmignoreEnabled
Optional
- Type: java.lang.Boolean
- Default: true
Defines an .npmignore file. Normally this is only needed for libraries that are packaged as tarballs.
npmIgnoreOptions
Optional
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .npmignore file.
package
Optional
- Type: java.lang.Boolean
- Default: true
Defines a package
task that will produce an npm tarball under the artifacts directory (e.g. dist
).
prettier
Optional
- Type: java.lang.Boolean
- Default: false
Setup prettier.
prettierOptions
Optional
- Type: io.github.cdklabs.projen.javascript.PrettierOptions
- Default: default options
Prettier options.
projenDevDependency
Optional
- Type: java.lang.Boolean
- Default: true if not a subproject
Indicates of "projen" should be installed as a devDependency.
projenrcJs
Optional
- 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.
projenrcJsOptions
Optional
- Type: io.github.cdklabs.projen.javascript.ProjenrcOptions
- Default: default options
Options for .projenrc.js.
projenVersion
Optional
- Type: java.lang.String
- Default: Defaults to the latest version.
Version of projen to install.
pullRequestTemplate
Optional
- Type: java.lang.Boolean
- Default: true
Include a GitHub pull request template.
pullRequestTemplateContents
Optional
- Type: java.util.List
- Default: default content
The contents of the pull request template.
release
Optional
- Type: java.lang.Boolean
- Default: true (false for subprojects)
Add release management to this project.
releaseToNpm
Optional
- 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
.
workflowBootstrapSteps
Optional
- Type: java.util.List
- Default: "yarn install --frozen-lockfile && yarn projen"
Workflow steps to use in order to bootstrap this repo.
workflowGitIdentity
Optional
- Type: io.github.cdklabs.projen.github.GitIdentity
- Default: GitHub Actions
The git identity to use in workflows.
workflowNodeVersion
Optional
- Type: java.lang.String
- Default: same as
minNodeVersion
The node version to use in GitHub workflows.
workflowPackageCache
Optional
- Type: java.lang.Boolean
- Default: false
Enable Node.js package cache in GitHub workflows.
typeSpecOptions
Required
- Type: TypeSpecModelOptions
TypeSpec model options.
handlerLanguages
Optional
- Type: java.util.List<Language>
The languages users have specified for handler projects (if any).
asyncApiSpecFile
Required
- Type: java.lang.String
Path to the generated AsyncAPI specification (relative to the project root).
parsedSpecFile
Required
- 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.
globs
Required
- Type: java.lang.String
The glob patterns to match.
addGitIgnore
public void addGitIgnore(java.lang.String pattern)
Adds a .gitignore pattern.
pattern
Required
- Type: java.lang.String
The glob pattern to ignore.
addPackageIgnore
public void addPackageIgnore(java.lang.String pattern)
Adds patterns to be ignored by npm.
pattern
Required
- 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.
name
Required
- Type: java.lang.String
The task name to add.
props
Optional
- Type: io.github.cdklabs.projen.TaskOptions
Task properties.
~~addTip
~~
public void addTip(java.lang.String message)
Prints a "tip" message during synthesis.
message
Required
- 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
glob
Required
- 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.
name
Required
- 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
.
task
Required
- 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.
filePath
Required
- 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.
filePath
Required
- 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.
filePath
Required
- 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.
filePath
Required
- 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)
bins
Required
- 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
.
deps
Required
- 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.
commands
Required
- Type: java.lang.String
addDeps
public void addDeps(java.lang.String deps)
Defines normal dependencies.
deps
Required
- 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.
deps
Required
- 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
.
fields
Required
- Type: java.util.Map
The fields to set.
addKeywords
public void addKeywords(java.lang.String keywords)
Adds keywords to package.json (deduplicated).
keywords
Required
- 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.
deps
Required
- 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.
scripts
Required
- Type: java.util.Map
The scripts to set.
~~addTestCommand
~~
public void addTestCommand(java.lang.String commands)
DEPRECATED.
commands
Required
- Type: java.lang.String
~~hasScript
~~
public java.lang.Boolean hasScript(java.lang.String name)
Indicates if a script by the name name is defined.
name
Required
- Type: java.lang.String
The name of the script.
removeScript
public void removeScript(java.lang.String name)
Removes the npm script (always successful).
name
Required
- 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.
options
Optional
- 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.
name
Required
- Type: java.lang.String
The script name.
command
Required
- 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.
x
Required
- 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.
x
Required
- 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.
construct
Required
- 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. |
node
Required
public Node getNode();
- Type: software.constructs.Node
The tree node.
buildTask
Required
public Task getBuildTask();
- Type: io.github.cdklabs.projen.Task
commitGenerated
Required
public java.lang.Boolean getCommitGenerated();
- Type: java.lang.Boolean
Whether to commit the managed files by default.
compileTask
Required
public Task getCompileTask();
- Type: io.github.cdklabs.projen.Task
components
Required
public java.util.List<Component> getComponents();
- Type: java.util.List
Returns all the components within this project.
deps
Required
public Dependencies getDeps();
- Type: io.github.cdklabs.projen.Dependencies
Project dependencies.
ejected
Required
public java.lang.Boolean getEjected();
- Type: java.lang.Boolean
Whether or not the project is being ejected.
files
Required
public java.util.List<FileBase> getFiles();
- Type: java.util.List
All files in this project.
gitattributes
Required
public GitAttributesFile getGitattributes();
- Type: io.github.cdklabs.projen.GitAttributesFile
The .gitattributes file for this repository.
gitignore
Required
public IgnoreFile getGitignore();
- Type: io.github.cdklabs.projen.IgnoreFile
.gitignore.
logger
Required
public Logger getLogger();
- Type: io.github.cdklabs.projen.Logger
Logging utilities.
name
Required
public java.lang.String getName();
- Type: java.lang.String
Project name.
outdir
Required
public java.lang.String getOutdir();
- Type: java.lang.String
Absolute output directory of this project.
packageTask
Required
public Task getPackageTask();
- Type: io.github.cdklabs.projen.Task
postCompileTask
Required
public Task getPostCompileTask();
- Type: io.github.cdklabs.projen.Task
preCompileTask
Required
public Task getPreCompileTask();
- Type: io.github.cdklabs.projen.Task
projectBuild
Required
public ProjectBuild getProjectBuild();
- Type: io.github.cdklabs.projen.ProjectBuild
Manages the build process of the project.
projenCommand
Required
public java.lang.String getProjenCommand();
- Type: java.lang.String
The command to use in order to run the projen CLI.
root
Required
public Project getRoot();
- Type: io.github.cdklabs.projen.Project
The root project.
subprojects
Required
public java.util.List<Project> getSubprojects();
- Type: java.util.List
Returns all the subprojects within this project.
tasks
Required
public Tasks getTasks();
- Type: io.github.cdklabs.projen.Tasks
Project tasks.
testTask
Required
public Task getTestTask();
- Type: io.github.cdklabs.projen.Task
defaultTask
Optional
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.
initProject
Optional
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.
parent
Optional
public Project getParent();
- Type: io.github.cdklabs.projen.Project
A parent project.
If undefined, this is the root project.
projectType
Required
public ProjectType getProjectType();
- Type: io.github.cdklabs.projen.ProjectType
autoApprove
Optional
public AutoApprove getAutoApprove();
- Type: io.github.cdklabs.projen.github.AutoApprove
Auto approve set up for this project.
devContainer
Optional
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
github
Optional
public GitHub getGithub();
- Type: io.github.cdklabs.projen.github.GitHub
Access all github components.
This will be undefined
for subprojects.
gitpod
Optional
public Gitpod getGitpod();
- Type: io.github.cdklabs.projen.Gitpod
Access for Gitpod.
This will be undefined
if gitpod boolean is false
vscode
Optional
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
artifactsDirectory
Required
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
.
artifactsJavascriptDirectory
Required
public java.lang.String getArtifactsJavascriptDirectory();
- Type: java.lang.String
The location of the npm tarball after build (${artifactsDirectory}/js
).
bundler
Required
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
npmrc
Required
public NpmConfig getNpmrc();
- Type: io.github.cdklabs.projen.javascript.NpmConfig
The .npmrc file.
package
Required
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.
runScriptCommand
Required
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).
autoMerge
Optional
public AutoMerge getAutoMerge();
- Type: io.github.cdklabs.projen.github.AutoMerge
Component that sets up mergify for merging approved pull requests.
buildWorkflow
Optional
public BuildWorkflow getBuildWorkflow();
- Type: io.github.cdklabs.projen.build.BuildWorkflow
The PR build GitHub workflow.
undefined
if buildWorkflow
is disabled.
buildWorkflowJobId
Optional
public java.lang.String getBuildWorkflowJobId();
- Type: java.lang.String
The job ID of the build workflow.
jest
Optional
public Jest getJest();
- Type: io.github.cdklabs.projen.javascript.Jest
The Jest configuration (if enabled).
maxNodeVersion
Optional
public java.lang.String getMaxNodeVersion();
- Type: java.lang.String
Maximum node version required by this package.
minNodeVersion
Optional
public java.lang.String getMinNodeVersion();
- Type: java.lang.String
Minimum node.js version required by this package.
npmignore
Optional
public IgnoreFile getNpmignore();
- Type: io.github.cdklabs.projen.IgnoreFile
The .npmignore file.
prettier
Optional
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.
release
Optional
public Release getRelease();
- Type: io.github.cdklabs.projen.release.Release
Release management.
upgradeWorkflow
Optional
public UpgradeDependencies getUpgradeWorkflow();
- Type: io.github.cdklabs.projen.javascript.UpgradeDependencies
The upgrade workflow.
apiName
Required
public java.lang.String getApiName();
- Type: java.lang.String
definition
Required
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_TASK
Required
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). |
project
Required
- Type: io.github.cdklabs.projen.javascript.NodeProject
typeSpecOptions
Required
- Type: TypeSpecModelOptions
TypeSpec model options.
handlerLanguages
Optional
- 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.
x
Required
- 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.
x
Required
- 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. |
node
Required
public Node getNode();
- Type: software.constructs.Node
The tree node.
project
Required
public Project getProject();
- Type: io.github.cdklabs.projen.Project
openApiSpecificationPath
Required
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). |
name
Required
- Type: java.lang.String
- Default: $BASEDIR
This is the name of your project.
commitGenerated
Optional
- Type: java.lang.Boolean
- Default: true
Whether to commit the managed files by default.
gitIgnoreOptions
Optional
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptions
Optional
- Type: io.github.cdklabs.projen.GitOptions
Configuration options for git.
logging
Optional
- Type: io.github.cdklabs.projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
outdir
Optional
- 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.
parent
Optional
- Type: io.github.cdklabs.projen.Project
The parent project, if this project is part of a bigger project.
projenCommand
Optional
- 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.
projenrcJson
Optional
- Type: java.lang.Boolean
- Default: false
Generate (once) .projenrc.json (in JSON). Set to false
in order to disable .projenrc.json generation.
projenrcJsonOptions
Optional
- Type: io.github.cdklabs.projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
renovatebot
Optional
- Type: java.lang.Boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptions
Optional
- Type: io.github.cdklabs.projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
autoApproveOptions
Optional
- Type: io.github.cdklabs.projen.github.AutoApproveOptions
- Default: auto approve is disabled
Enable and configure the 'auto approve' workflow.
autoMerge
Optional
- Type: java.lang.Boolean
- Default: true
Enable automatic merging on GitHub.
Has no effect if github.mergify
is set to false.
autoMergeOptions
Optional
- 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.
clobber
Optional
- Type: java.lang.Boolean
- Default: true, but false for subprojects
Add a clobber
task which resets the repo to origin.
devContainer
Optional
- Type: java.lang.Boolean
- Default: false
Add a VSCode development environment (used for GitHub Codespaces).
github
Optional
- Type: java.lang.Boolean
- Default: true
Enable GitHub integration.
Enabled by default for root projects. Disabled for non-root projects.
githubOptions
Optional
- Type: io.github.cdklabs.projen.github.GitHubOptions
- Default: see GitHubOptions
Options for GitHub integration.
gitpod
Optional
- Type: java.lang.Boolean
- Default: false
Add a Gitpod development environment.
~~mergify
~~Optional
-
Deprecated: use
githubOptions.mergify
instead -
Type: java.lang.Boolean
- Default: true
Whether mergify should be enabled on this repository or not.
~~mergifyOptions
~~Optional
-
Deprecated: use
githubOptions.mergifyOptions
instead -
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).
projenCredentials
Optional
- 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.
readme
Optional
- Type: io.github.cdklabs.projen.SampleReadmeProps
- Default: { filename: 'README.md', contents: '# replace this' }
The README setup.
Example
"{ filename: 'readme.md', contents: '# title' }"
stale
Optional
- Type: java.lang.Boolean
- Default: false
Auto-close of stale issues and pull request.
See staleOptions
for options.
staleOptions
Optional
- 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
.
vscode
Optional
- Type: java.lang.Boolean
- Default: true
Enable VSCode integration.
Enabled by default for root projects. Disabled for non-root projects.
allowLibraryDependencies
Optional
- 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.
authorEmail
Optional
- Type: java.lang.String
Author's e-mail.
authorName
Optional
- Type: java.lang.String
Author's name.
authorOrganization
Optional
- Type: java.lang.Boolean
Is the author an organization.
authorUrl
Optional
- Type: java.lang.String
Author's URL / Website.
autoDetectBin
Optional
- Type: java.lang.Boolean
- Default: true
Automatically add all executables under the bin
directory to your package.json
file under the bin
section.
bin
Optional
- 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.
bugsEmail
Optional
- Type: java.lang.String
The email address to which issues should be reported.
bugsUrl
Optional
- Type: java.lang.String
The url to your project's issue tracker.
bundledDeps
Optional
- 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.
codeArtifactOptions
Optional
- 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
deps
Optional
- 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' ]
description
Optional
- 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
devDeps
Optional
- 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' ]
entrypoint
Optional
- 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
homepage
Optional
- Type: java.lang.String
Package's Homepage / Website.
keywords
Optional
- Type: java.util.List
Keywords to include in package.json
.
license
Optional
- 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.
licensed
Optional
- Type: java.lang.Boolean
- Default: true
Indicates if a license should be added.
maxNodeVersion
Optional
- Type: java.lang.String
- Default: no max
Minimum node.js version to require via engines
(inclusive).
minNodeVersion
Optional
- Type: java.lang.String
- Default: no "engines" specified
Minimum Node.js version to require via package.json engines
(inclusive).
npmAccess
Optional
- 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.
npmProvenance
Optional
- 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
npmRegistryUrl
instead -
Type: java.lang.String
The host name of the npm registry to publish to.
Cannot be set together with npmRegistryUrl
.
npmRegistryUrl
Optional
- 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://")
npmTokenSecret
Optional
- Type: java.lang.String
- Default: "NPM_TOKEN"
GitHub secret which contains the NPM token to use when publishing packages.
packageManager
Optional
- Type: io.github.cdklabs.projen.javascript.NodePackageManager
- Default: NodePackageManager.YARN_CLASSIC
The Node Package Manager used to execute scripts.
packageName
Optional
- Type: java.lang.String
- Default: defaults to project name
The "name" in package.json.
peerDependencyOptions
Optional
- Type: io.github.cdklabs.projen.javascript.PeerDependencyOptions
Options for peerDeps
.
peerDeps
Optional
- 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.
pnpmVersion
Optional
- Type: java.lang.String
- Default: "7"
The version of PNPM to use if using PNPM as a package manager.
repository
Optional
- 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
repositoryDirectory
Optional
- 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.
scopedPackagesOptions
Optional
- 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.
stability
Optional
- Type: java.lang.String
Package's Stability.
yarnBerryOptions
Optional
- Type: io.github.cdklabs.projen.javascript.YarnBerryOptions
- Default: Yarn Berry v4 with all default options
Options for Yarn Berry.
jsiiReleaseVersion
Optional
- Type: java.lang.String
- Default: "latest"
Version requirement of publib
which is used to publish modules to npm.
majorVersion
Optional
- 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.
minMajorVersion
Optional
- 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
.
npmDistTag
Optional
- 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.
postBuildSteps
Optional
- Type: java.util.List
- Default: []
Steps to execute after build as part of the release workflow.
prerelease
Optional
- Type: java.lang.String
- Default: normal semantic versions
Bump versions from the default branch as pre-releases (e.g. "beta", "alpha", "pre").
publishDryRun
Optional
- Type: java.lang.Boolean
- Default: false
Instead of actually publishing to package managers, just print the publishing command.
publishTasks
Optional
- 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.
releasableCommits
Optional
- Type: io.github.cdklabs.projen.ReleasableCommits
- Default: ReleasableCommits.everyCommit()
Find commits that should be considered releasable Used to decide if a release is required.
releaseBranches
Optional
- 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
.
releaseFailureIssue
Optional
- Type: java.lang.Boolean
- Default: false
Create a github issue on every failed publishing task.
releaseFailureIssueLabel
Optional
- 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.
releaseTagPrefix
Optional
- 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.
releaseTrigger
Optional
- Type: io.github.cdklabs.projen.release.ReleaseTrigger
- Default: Continuous releases (
ReleaseTrigger.continuous()
)
The release trigger to use.
releaseWorkflowName
Optional
- Type: java.lang.String
- Default: "release"
The name of the default release workflow.
releaseWorkflowSetupSteps
Optional
- Type: java.util.List
A set of workflow steps to execute in order to setup the workflow container.
versionrcOptions
Optional
- 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.
workflowContainerImage
Optional
- Type: java.lang.String
- Default: default image
Container image to use for GitHub workflows.
workflowRunsOn
Optional
- Type: java.util.List
- Default: ["ubuntu-latest"]
Github Runner selection labels.
workflowRunsOnGroup
Optional
- Type: io.github.cdklabs.projen.GroupRunnerOptions
Github Runner Group selection options.
defaultReleaseBranch
Required
- Type: java.lang.String
- Default: "main"
The name of the main release branch.
artifactsDirectory
Optional
- Type: java.lang.String
- Default: "dist"
A directory which will contain build artifacts.
autoApproveUpgrades
Optional
- 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.
buildWorkflow
Optional
- Type: java.lang.Boolean
- Default: true if not a subproject
Define a GitHub workflow for building PRs.
buildWorkflowOptions
Optional
- 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.
bundlerOptions
Optional
- Type: io.github.cdklabs.projen.javascript.BundlerOptions
Options for Bundler
.
checkLicenses
Optional
- 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.
codeCov
Optional
- 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
.
codeCovTokenSecret
Optional
- 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.
copyrightOwner
Optional
- Type: java.lang.String
- Default: defaults to the value of authorName or "" if
authorName
is undefined.
License copyright owner.
copyrightPeriod
Optional
- Type: java.lang.String
- Default: current year
The copyright years to put in the LICENSE file.
dependabot
Optional
- Type: java.lang.Boolean
- Default: false
Use dependabot to handle dependency upgrades.
Cannot be used in conjunction with depsUpgrade
.
dependabotOptions
Optional
- Type: io.github.cdklabs.projen.github.DependabotOptions
- Default: default options
Options for dependabot.
depsUpgrade
Optional
- Type: java.lang.Boolean
- Default: true
Use tasks and github workflows to handle dependency upgrades.
Cannot be used in conjunction with dependabot
.
depsUpgradeOptions
Optional
- Type: io.github.cdklabs.projen.javascript.UpgradeDependenciesOptions
- Default: default options
Options for UpgradeDependencies
.
gitignore
Optional
- Type: java.util.List
Additional entries to .gitignore.
jest
Optional
- Type: java.lang.Boolean
- Default: true
Setup jest unit tests.
jestOptions
Optional
- 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.
npmignoreEnabled
Optional
- Type: java.lang.Boolean
- Default: true
Defines an .npmignore file. Normally this is only needed for libraries that are packaged as tarballs.
npmIgnoreOptions
Optional
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .npmignore file.
package
Optional
- Type: java.lang.Boolean
- Default: true
Defines a package
task that will produce an npm tarball under the artifacts directory (e.g. dist
).
prettier
Optional
- Type: java.lang.Boolean
- Default: false
Setup prettier.
prettierOptions
Optional
- Type: io.github.cdklabs.projen.javascript.PrettierOptions
- Default: default options
Prettier options.
projenDevDependency
Optional
- Type: java.lang.Boolean
- Default: true if not a subproject
Indicates of "projen" should be installed as a devDependency.
projenrcJs
Optional
- 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.
projenrcJsOptions
Optional
- Type: io.github.cdklabs.projen.javascript.ProjenrcOptions
- Default: default options
Options for .projenrc.js.
projenVersion
Optional
- Type: java.lang.String
- Default: Defaults to the latest version.
Version of projen to install.
pullRequestTemplate
Optional
- Type: java.lang.Boolean
- Default: true
Include a GitHub pull request template.
pullRequestTemplateContents
Optional
- Type: java.util.List
- Default: default content
The contents of the pull request template.
release
Optional
- Type: java.lang.Boolean
- Default: true (false for subprojects)
Add release management to this project.
releaseToNpm
Optional
- 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
.
workflowBootstrapSteps
Optional
- Type: java.util.List
- Default: "yarn install --frozen-lockfile && yarn projen"
Workflow steps to use in order to bootstrap this repo.
workflowGitIdentity
Optional
- Type: io.github.cdklabs.projen.github.GitIdentity
- Default: GitHub Actions
The git identity to use in workflows.
workflowNodeVersion
Optional
- Type: java.lang.String
- Default: same as
minNodeVersion
The node version to use in GitHub workflows.
workflowPackageCache
Optional
- Type: java.lang.Boolean
- Default: false
Enable Node.js package cache in GitHub workflows.
typeSpecOptions
Required
- Type: TypeSpecModelOptions
TypeSpec model options.
handlerLanguages
Optional
- Type: java.util.List<Language>
The languages users have specified for handler projects (if any).
parsedSpecFile
Required
- 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.
globs
Required
- Type: java.lang.String
The glob patterns to match.
addGitIgnore
public void addGitIgnore(java.lang.String pattern)
Adds a .gitignore pattern.
pattern
Required
- Type: java.lang.String
The glob pattern to ignore.
addPackageIgnore
public void addPackageIgnore(java.lang.String pattern)
Adds patterns to be ignored by npm.
pattern
Required
- 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.
name
Required
- Type: java.lang.String
The task name to add.
props
Optional
- Type: io.github.cdklabs.projen.TaskOptions
Task properties.
~~addTip
~~
public void addTip(java.lang.String message)
Prints a "tip" message during synthesis.
message
Required
- 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
glob
Required
- 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.
name
Required
- 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
.
task
Required
- 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.
filePath
Required
- 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.
filePath
Required
- 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.
filePath
Required
- 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.
filePath
Required
- 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)
bins
Required
- 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
.
deps
Required
- 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.
commands
Required
- Type: java.lang.String
addDeps
public void addDeps(java.lang.String deps)
Defines normal dependencies.
deps
Required
- 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.
deps
Required
- 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
.
fields
Required
- Type: java.util.Map
The fields to set.
addKeywords
public void addKeywords(java.lang.String keywords)
Adds keywords to package.json (deduplicated).
keywords
Required
- 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.
deps
Required
- 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.
scripts
Required
- Type: java.util.Map
The scripts to set.
~~addTestCommand
~~
public void addTestCommand(java.lang.String commands)
DEPRECATED.
commands
Required
- Type: java.lang.String
~~hasScript
~~
public java.lang.Boolean hasScript(java.lang.String name)
Indicates if a script by the name name is defined.
name
Required
- Type: java.lang.String
The name of the script.
removeScript
public void removeScript(java.lang.String name)
Removes the npm script (always successful).
name
Required
- 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.
options
Optional
- 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.
name
Required
- Type: java.lang.String
The script name.
command
Required
- 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.
x
Required
- 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.
x
Required
- 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.
construct
Required
- 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. |
node
Required
public Node getNode();
- Type: software.constructs.Node
The tree node.
buildTask
Required
public Task getBuildTask();
- Type: io.github.cdklabs.projen.Task
commitGenerated
Required
public java.lang.Boolean getCommitGenerated();
- Type: java.lang.Boolean
Whether to commit the managed files by default.
compileTask
Required
public Task getCompileTask();
- Type: io.github.cdklabs.projen.Task
components
Required
public java.util.List<Component> getComponents();
- Type: java.util.List
Returns all the components within this project.
deps
Required
public Dependencies getDeps();
- Type: io.github.cdklabs.projen.Dependencies
Project dependencies.
ejected
Required
public java.lang.Boolean getEjected();
- Type: java.lang.Boolean
Whether or not the project is being ejected.
files
Required
public java.util.List<FileBase> getFiles();
- Type: java.util.List
All files in this project.
gitattributes
Required
public GitAttributesFile getGitattributes();
- Type: io.github.cdklabs.projen.GitAttributesFile
The .gitattributes file for this repository.
gitignore
Required
public IgnoreFile getGitignore();
- Type: io.github.cdklabs.projen.IgnoreFile
.gitignore.
logger
Required
public Logger getLogger();
- Type: io.github.cdklabs.projen.Logger
Logging utilities.
name
Required
public java.lang.String getName();
- Type: java.lang.String
Project name.
outdir
Required
public java.lang.String getOutdir();
- Type: java.lang.String
Absolute output directory of this project.
packageTask
Required
public Task getPackageTask();
- Type: io.github.cdklabs.projen.Task
postCompileTask
Required
public Task getPostCompileTask();
- Type: io.github.cdklabs.projen.Task
preCompileTask
Required
public Task getPreCompileTask();
- Type: io.github.cdklabs.projen.Task
projectBuild
Required
public ProjectBuild getProjectBuild();
- Type: io.github.cdklabs.projen.ProjectBuild
Manages the build process of the project.
projenCommand
Required
public java.lang.String getProjenCommand();
- Type: java.lang.String
The command to use in order to run the projen CLI.
root
Required
public Project getRoot();
- Type: io.github.cdklabs.projen.Project
The root project.
subprojects
Required
public java.util.List<Project> getSubprojects();
- Type: java.util.List
Returns all the subprojects within this project.
tasks
Required
public Tasks getTasks();
- Type: io.github.cdklabs.projen.Tasks
Project tasks.
testTask
Required
public Task getTestTask();
- Type: io.github.cdklabs.projen.Task
defaultTask
Optional
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.
initProject
Optional
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.
parent
Optional
public Project getParent();
- Type: io.github.cdklabs.projen.Project
A parent project.
If undefined, this is the root project.
projectType
Required
public ProjectType getProjectType();
- Type: io.github.cdklabs.projen.ProjectType
autoApprove
Optional
public AutoApprove getAutoApprove();
- Type: io.github.cdklabs.projen.github.AutoApprove
Auto approve set up for this project.
devContainer
Optional
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
github
Optional
public GitHub getGithub();
- Type: io.github.cdklabs.projen.github.GitHub
Access all github components.
This will be undefined
for subprojects.
gitpod
Optional
public Gitpod getGitpod();
- Type: io.github.cdklabs.projen.Gitpod
Access for Gitpod.
This will be undefined
if gitpod boolean is false
vscode
Optional
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
artifactsDirectory
Required
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
.
artifactsJavascriptDirectory
Required
public java.lang.String getArtifactsJavascriptDirectory();
- Type: java.lang.String
The location of the npm tarball after build (${artifactsDirectory}/js
).
bundler
Required
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
npmrc
Required
public NpmConfig getNpmrc();
- Type: io.github.cdklabs.projen.javascript.NpmConfig
The .npmrc file.
package
Required
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.
runScriptCommand
Required
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).
autoMerge
Optional
public AutoMerge getAutoMerge();
- Type: io.github.cdklabs.projen.github.AutoMerge
Component that sets up mergify for merging approved pull requests.
buildWorkflow
Optional
public BuildWorkflow getBuildWorkflow();
- Type: io.github.cdklabs.projen.build.BuildWorkflow
The PR build GitHub workflow.
undefined
if buildWorkflow
is disabled.
buildWorkflowJobId
Optional
public java.lang.String getBuildWorkflowJobId();
- Type: java.lang.String
The job ID of the build workflow.
jest
Optional
public Jest getJest();
- Type: io.github.cdklabs.projen.javascript.Jest
The Jest configuration (if enabled).
maxNodeVersion
Optional
public java.lang.String getMaxNodeVersion();
- Type: java.lang.String
Maximum node version required by this package.
minNodeVersion
Optional
public java.lang.String getMinNodeVersion();
- Type: java.lang.String
Minimum node.js version required by this package.
npmignore
Optional
public IgnoreFile getNpmignore();
- Type: io.github.cdklabs.projen.IgnoreFile
The .npmignore file.
prettier
Optional
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.
release
Optional
public Release getRelease();
- Type: io.github.cdklabs.projen.release.Release
Release management.
upgradeWorkflow
Optional
public UpgradeDependencies getUpgradeWorkflow();
- Type: io.github.cdklabs.projen.javascript.UpgradeDependencies
The upgrade workflow.
apiName
Required
public java.lang.String getApiName();
- Type: java.lang.String
definition
Required
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_TASK
Required
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). |
project
Required
- Type: io.github.cdklabs.projen.javascript.NodeProject
typeSpecOptions
Required
- Type: TypeSpecModelOptions
TypeSpec model options.
handlerLanguages
Optional
- 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.
x
Required
- 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.
x
Required
- 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. |
node
Required
public Node getNode();
- Type: software.constructs.Node
The tree node.
project
Required
public Project getProject();
- Type: io.github.cdklabs.projen.Project
openApiSpecificationPath
Required
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. |
cacheKeyParameters
Optional
public java.util.List<java.lang.String> getCacheKeyParameters();
- Type: java.util.List
A list of request parameters whose values are to be cached.
cacheNamespace
Optional
public java.lang.String getCacheNamespace();
- Type: java.lang.String
An API-specific tag group of related cached parameters.
connectionId
Optional
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
connectionType
Optional
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.
contentHandling
Optional
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.
credentials
Optional
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.
httpMethod
Optional
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.
passthroughBehavior
Optional
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
requestParameters
Optional
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.
requestTemplates
Optional
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.
responses
Optional
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.
timeoutInMillis
Optional
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.
tlsConfig
Optional
public ApiGatewayIntegrationTlsConfig getTlsConfig();
Specifies the TLS configuration for an integration.
type
Optional
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
uri
Optional
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. |
responseParameters
Required
public java.util.Map<java.lang.String, java.lang.String> getResponseParameters();
- Type: java.util.Map
Specifies parameter mappings for the response.
responseTemplates
Required
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.
statusCode
Required
public java.lang.String getStatusCode();
- Type: java.lang.String
HTTP status code for the method response.
contentHandling
Optional
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. |
insecureSkipVerification
Optional
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. |
source
Required
public ApiKeySourceType getSource();
- Type: software.amazon.awscdk.services.apigateway.ApiKeySourceType
Source type for an API key.
requiredByDefault
Optional
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. |
authorizationType
Required
public AuthorizationType getAuthorizationType();
- Type: software.amazon.awscdk.services.apigateway.AuthorizationType
The type of the authorizer.
authorizerId
Required
public java.lang.String getAuthorizerId();
- Type: java.lang.String
The unique identifier for the authorizer.
authorizationScopes
Optional
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. |
cidrRanges
Required
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 .
cidrType
Required
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. |
specPath
Required
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. |
authorizerId
Required
public java.lang.String getAuthorizerId();
- Type: java.lang.String
Unique identifier for this authorizer.
userPools
Required
public java.util.List<IUserPool> getUserPools();
- Type: java.util.List
The Cognito user pools associated with this authorizer.
authorizationScopes
Optional
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. |
authorizerId
Required
public java.lang.String getAuthorizerId();
- Type: java.lang.String
Unique identifier for this authorizer.
function
Required
public IFunction getFunction();
- Type: software.amazon.awscdk.services.lambda.IFunction
The lambda function used to authorize requests.
authorizerResultTtlInSeconds
Optional
public java.lang.Number getAuthorizerResultTtlInSeconds();
- Type: java.lang.Number
- Default: 300
The number of seconds during which the authorizer result is cached.
identitySource
Optional
public java.lang.String getIdentitySource();
- Type: java.lang.String
- Default: "method.request.header.Authorization"
The source of the identity in an incoming request.
type
Optional
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. |
responses
Optional
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. |
statusCode
Optional
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. |
formats
Required
public java.util.List<DocumentationFormat> getFormats();
- Type: java.util.List<DocumentationFormat>
Formats for generated documentation.
options
Optional
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. |
commitGeneratedCode
Optional
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. |
commitGeneratedCode
Optional
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. |
java
Optional
public JavaProject getJava();
- Type: io.github.cdklabs.projen.java.JavaProject
Generated java project.
python
Optional
public PythonProject getPython();
- Type: io.github.cdklabs.projen.python.PythonProject
Generated python project.
typescript
Optional
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. |
htmlRedoc
Optional
public GeneratedHtmlRedocDocumentationOptions getHtmlRedoc();
Generated html redoc documentation project options.
markdown
Optional
public GeneratedMarkdownDocumentationOptions getMarkdown();
Generated markdown documentation project options.
plantuml
Optional
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. |
htmlRedoc
Optional
public Project getHtmlRedoc();
- Type: io.github.cdklabs.projen.Project
Generated html redoc documentation project.
markdown
Optional
public Project getMarkdown();
- Type: io.github.cdklabs.projen.Project
Generated markdown documentation project.
plantuml
Optional
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. |
java
Optional
public GeneratedJavaHandlersOptions getJava();
Options for the java handlers project.
These override the default inferred options.
python
Optional
public GeneratedPythonHandlersOptions getPython();
Options for the python handlers project.
These override the default inferred options.
typescript
Optional
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. |
commitGeneratedCode
Optional
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. |
commitGeneratedCode
Optional
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. |
java
Optional
public GeneratedJavaInfrastructureOptions getJava();
Options for the generated java infrastructure project.
These override the default inferred options.
python
Optional
public GeneratedPythonInfrastructureOptions getPython();
Options for the generated python infrastructure project.
These override the default inferred options.
typescript
Optional
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. |
artifactId
Optional
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.
autoApproveOptions
Optional
public AutoApproveOptions getAutoApproveOptions();
- Type: io.github.cdklabs.projen.github.AutoApproveOptions
- Default: auto approve is disabled
Enable and configure the 'auto approve' workflow.
autoMerge
Optional
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.
autoMergeOptions
Optional
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.
clobber
Optional
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.
commitGenerated
Optional
public java.lang.Boolean getCommitGenerated();
- Type: java.lang.Boolean
- Default: true
Whether to commit the managed files by default.
compileOptions
Optional
public MavenCompileOptions getCompileOptions();
- Type: io.github.cdklabs.projen.java.MavenCompileOptions
- Default: defaults
Compile options.
deps
Optional
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()
.
description
Optional
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.
devContainer
Optional
public java.lang.Boolean getDevContainer();
- Type: java.lang.Boolean
- Default: false
Add a VSCode development environment (used for GitHub Codespaces).
distdir
Optional
public java.lang.String getDistdir();
- Type: java.lang.String
- Default: "dist/java"
Final artifact output directory.
github
Optional
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.
githubOptions
Optional
public GitHubOptions getGithubOptions();
- Type: io.github.cdklabs.projen.github.GitHubOptions
- Default: see GitHubOptions
Options for GitHub integration.
gitIgnoreOptions
Optional
public IgnoreFileOptions getGitIgnoreOptions();
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptions
Optional
public GitOptions getGitOptions();
- Type: io.github.cdklabs.projen.GitOptions
Configuration options for git.
gitpod
Optional
public java.lang.Boolean getGitpod();
- Type: java.lang.Boolean
- Default: false
Add a Gitpod development environment.
groupId
Optional
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.
junit
Optional
public java.lang.Boolean getJunit();
- Type: java.lang.Boolean
- Default: true
Include junit tests.
junitOptions
Optional
public JunitOptions getJunitOptions();
- Type: io.github.cdklabs.projen.java.JunitOptions
- Default: defaults
junit options.
logging
Optional
public LoggerOptions getLogging();
- Type: io.github.cdklabs.projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
~~mergify
~~Optional
- Deprecated: use
githubOptions.mergify
instead
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.mergifyOptions
instead
public MergifyOptions getMergifyOptions();
- Type: io.github.cdklabs.projen.github.MergifyOptions
- Default: default options
Options for mergify.
name
Optional
public java.lang.String getName();
- Type: java.lang.String
- Default: $BASEDIR
This is the name of your project.
outdir
Optional
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.
packaging
Optional
public java.lang.String getPackaging();
- Type: java.lang.String
- Default: "jar"
Project packaging format.
packagingOptions
Optional
public MavenPackagingOptions getPackagingOptions();
- Type: io.github.cdklabs.projen.java.MavenPackagingOptions
- Default: defaults
Packaging options.
parent
Optional
public Project getParent();
- Type: io.github.cdklabs.projen.Project
The parent project, if this project is part of a bigger project.
parentPom
Optional
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).
projenCommand
Optional
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.
projenCredentials
Optional
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.
projenrcJava
Optional
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
.
projenrcJavaOptions
Optional
public ProjenrcOptions getProjenrcJavaOptions();
- Type: io.github.cdklabs.projen.java.ProjenrcOptions
- Default: default options
Options related to projenrc in java.
projenrcJson
Optional
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.
projenrcJsonOptions
Optional
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.
readme
Optional
public SampleReadmeProps getReadme();
- Type: io.github.cdklabs.projen.SampleReadmeProps
- Default: { filename: 'README.md', contents: '# replace this' }
The README setup.
renovatebot
Optional
public java.lang.Boolean getRenovatebot();
- Type: java.lang.Boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptions
Optional
public RenovatebotOptions getRenovatebotOptions();
- Type: io.github.cdklabs.projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
sample
Optional
public java.lang.Boolean getSample();
- Type: java.lang.Boolean
- Default: true
Include sample code and test if the relevant directories don't exist.
sampleJavaPackage
Optional
public java.lang.String getSampleJavaPackage();
- Type: java.lang.String
- Default: "org.acme"
The java package to use for the code sample.
stale
Optional
public java.lang.Boolean getStale();
- Type: java.lang.Boolean
- Default: false
Auto-close of stale issues and pull request.
See staleOptions
for options.
staleOptions
Optional
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
.
testDeps
Optional
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()
.
url
Optional
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.
version
Optional
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.
vscode
Optional
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.
commitGeneratedCode
Optional
public java.lang.Boolean getCommitGeneratedCode();
- Type: java.lang.Boolean
- Default: false
Whether to commit the code generated by the OpenAPI Generator.
runtimeVersion
Optional
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. |
artifactId
Optional
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.
autoApproveOptions
Optional
public AutoApproveOptions getAutoApproveOptions();
- Type: io.github.cdklabs.projen.github.AutoApproveOptions
- Default: auto approve is disabled
Enable and configure the 'auto approve' workflow.
autoMerge
Optional
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.
autoMergeOptions
Optional
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.
clobber
Optional
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.
commitGenerated
Optional
public java.lang.Boolean getCommitGenerated();
- Type: java.lang.Boolean
- Default: true
Whether to commit the managed files by default.
compileOptions
Optional
public MavenCompileOptions getCompileOptions();
- Type: io.github.cdklabs.projen.java.MavenCompileOptions
- Default: defaults
Compile options.
deps
Optional
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()
.
description
Optional
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.
devContainer
Optional
public java.lang.Boolean getDevContainer();
- Type: java.lang.Boolean
- Default: false
Add a VSCode development environment (used for GitHub Codespaces).
distdir
Optional
public java.lang.String getDistdir();
- Type: java.lang.String
- Default: "dist/java"
Final artifact output directory.
github
Optional
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.
githubOptions
Optional
public GitHubOptions getGithubOptions();
- Type: io.github.cdklabs.projen.github.GitHubOptions
- Default: see GitHubOptions
Options for GitHub integration.
gitIgnoreOptions
Optional
public IgnoreFileOptions getGitIgnoreOptions();
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptions
Optional
public GitOptions getGitOptions();
- Type: io.github.cdklabs.projen.GitOptions
Configuration options for git.
gitpod
Optional
public java.lang.Boolean getGitpod();
- Type: java.lang.Boolean
- Default: false
Add a Gitpod development environment.
groupId
Optional
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.
junit
Optional
public java.lang.Boolean getJunit();
- Type: java.lang.Boolean
- Default: true
Include junit tests.
junitOptions
Optional
public JunitOptions getJunitOptions();
- Type: io.github.cdklabs.projen.java.JunitOptions
- Default: defaults
junit options.
logging
Optional
public LoggerOptions getLogging();
- Type: io.github.cdklabs.projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
~~mergify
~~Optional
- Deprecated: use
githubOptions.mergify
instead
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.mergifyOptions
instead
public MergifyOptions getMergifyOptions();
- Type: io.github.cdklabs.projen.github.MergifyOptions
- Default: default options
Options for mergify.
name
Optional
public java.lang.String getName();
- Type: java.lang.String
- Default: $BASEDIR
This is the name of your project.
outdir
Optional
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.
packaging
Optional
public java.lang.String getPackaging();
- Type: java.lang.String
- Default: "jar"
Project packaging format.
packagingOptions
Optional
public MavenPackagingOptions getPackagingOptions();
- Type: io.github.cdklabs.projen.java.MavenPackagingOptions
- Default: defaults
Packaging options.
parent
Optional
public Project getParent();
- Type: io.github.cdklabs.projen.Project
The parent project, if this project is part of a bigger project.
parentPom
Optional
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).
projenCommand
Optional
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.
projenCredentials
Optional
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.
projenrcJava
Optional
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
.
projenrcJavaOptions
Optional
public ProjenrcOptions getProjenrcJavaOptions();
- Type: io.github.cdklabs.projen.java.ProjenrcOptions
- Default: default options
Options related to projenrc in java.
projenrcJson
Optional
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.
projenrcJsonOptions
Optional
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.
readme
Optional
public SampleReadmeProps getReadme();
- Type: io.github.cdklabs.projen.SampleReadmeProps
- Default: { filename: 'README.md', contents: '# replace this' }
The README setup.
renovatebot
Optional
public java.lang.Boolean getRenovatebot();
- Type: java.lang.Boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptions
Optional
public RenovatebotOptions getRenovatebotOptions();
- Type: io.github.cdklabs.projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
sample
Optional
public java.lang.Boolean getSample();
- Type: java.lang.Boolean
- Default: true
Include sample code and test if the relevant directories don't exist.
sampleJavaPackage
Optional
public java.lang.String getSampleJavaPackage();
- Type: java.lang.String
- Default: "org.acme"
The java package to use for the code sample.
stale
Optional
public java.lang.Boolean getStale();
- Type: java.lang.Boolean
- Default: false
Auto-close of stale issues and pull request.
See staleOptions
for options.
staleOptions
Optional
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
.
testDeps
Optional
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()
.
url
Optional
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.
version
Optional
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.
vscode
Optional
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.
commitGeneratedCode
Optional
public java.lang.Boolean getCommitGeneratedCode();
- Type: java.lang.Boolean
- Default: false
Whether to commit the code generated by the OpenAPI Generator.
mockDataOptions
Optional
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. |
artifactId
Optional
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.
autoApproveOptions
Optional
public AutoApproveOptions getAutoApproveOptions();
- Type: io.github.cdklabs.projen.github.AutoApproveOptions
- Default: auto approve is disabled
Enable and configure the 'auto approve' workflow.
autoMerge
Optional
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.
autoMergeOptions
Optional
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.
clobber
Optional
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.
commitGenerated
Optional
public java.lang.Boolean getCommitGenerated();
- Type: java.lang.Boolean
- Default: true
Whether to commit the managed files by default.
compileOptions
Optional
public MavenCompileOptions getCompileOptions();
- Type: io.github.cdklabs.projen.java.MavenCompileOptions
- Default: defaults
Compile options.
deps
Optional
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()
.
description
Optional
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.
devContainer
Optional
public java.lang.Boolean getDevContainer();
- Type: java.lang.Boolean
- Default: false
Add a VSCode development environment (used for GitHub Codespaces).
distdir
Optional
public java.lang.String getDistdir();
- Type: java.lang.String
- Default: "dist/java"
Final artifact output directory.
github
Optional
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.
githubOptions
Optional
public GitHubOptions getGithubOptions();
- Type: io.github.cdklabs.projen.github.GitHubOptions
- Default: see GitHubOptions
Options for GitHub integration.
gitIgnoreOptions
Optional
public IgnoreFileOptions getGitIgnoreOptions();
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptions
Optional
public GitOptions getGitOptions();
- Type: io.github.cdklabs.projen.GitOptions
Configuration options for git.
gitpod
Optional
public java.lang.Boolean getGitpod();
- Type: java.lang.Boolean
- Default: false
Add a Gitpod development environment.
groupId
Optional
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.
junit
Optional
public java.lang.Boolean getJunit();
- Type: java.lang.Boolean
- Default: true
Include junit tests.
junitOptions
Optional
public JunitOptions getJunitOptions();
- Type: io.github.cdklabs.projen.java.JunitOptions
- Default: defaults
junit options.
logging
Optional
public LoggerOptions getLogging();
- Type: io.github.cdklabs.projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
~~mergify
~~Optional
- Deprecated: use
githubOptions.mergify
instead
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.mergifyOptions
instead
public MergifyOptions getMergifyOptions();
- Type: io.github.cdklabs.projen.github.MergifyOptions
- Default: default options
Options for mergify.
name
Optional
public java.lang.String getName();
- Type: java.lang.String
- Default: $BASEDIR
This is the name of your project.
outdir
Optional
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.
packaging
Optional
public java.lang.String getPackaging();
- Type: java.lang.String
- Default: "jar"
Project packaging format.
packagingOptions
Optional
public MavenPackagingOptions getPackagingOptions();
- Type: io.github.cdklabs.projen.java.MavenPackagingOptions
- Default: defaults
Packaging options.
parent
Optional
public Project getParent();
- Type: io.github.cdklabs.projen.Project
The parent project, if this project is part of a bigger project.
parentPom
Optional
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).
projenCommand
Optional
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.
projenCredentials
Optional
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.
projenrcJava
Optional
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
.
projenrcJavaOptions
Optional
public ProjenrcOptions getProjenrcJavaOptions();
- Type: io.github.cdklabs.projen.java.ProjenrcOptions
- Default: default options
Options related to projenrc in java.
projenrcJson
Optional
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.
projenrcJsonOptions
Optional
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.
readme
Optional
public SampleReadmeProps getReadme();
- Type: io.github.cdklabs.projen.SampleReadmeProps
- Default: { filename: 'README.md', contents: '# replace this' }
The README setup.
renovatebot
Optional
public java.lang.Boolean getRenovatebot();
- Type: java.lang.Boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptions
Optional
public RenovatebotOptions getRenovatebotOptions();
- Type: io.github.cdklabs.projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
sample
Optional
public java.lang.Boolean getSample();
- Type: java.lang.Boolean
- Default: true
Include sample code and test if the relevant directories don't exist.
sampleJavaPackage
Optional
public java.lang.String getSampleJavaPackage();
- Type: java.lang.String
- Default: "org.acme"
The java package to use for the code sample.
stale
Optional
public java.lang.Boolean getStale();
- Type: java.lang.Boolean
- Default: false
Auto-close of stale issues and pull request.
See staleOptions
for options.
staleOptions
Optional
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
.
testDeps
Optional
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()
.
url
Optional
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.
version
Optional
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.
vscode
Optional
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.
commitGeneratedCode
Optional
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. |
typescriptReactQueryHooks
Optional
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. |
typescriptReactQueryHooks
Optional
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. |
commitGeneratedCode
Optional
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. |
commitGeneratedCode
Optional
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. |
commitGeneratedCode
Optional
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. |
authorEmail
Optional
public java.lang.String getAuthorEmail();
- Type: java.lang.String
- Default: $GIT_USER_EMAIL
Author's e-mail.
authorName
Optional
public java.lang.String getAuthorName();
- Type: java.lang.String
- Default: $GIT_USER_NAME
Author's name.
autoApproveOptions
Optional
public AutoApproveOptions getAutoApproveOptions();
- Type: io.github.cdklabs.projen.github.AutoApproveOptions
- Default: auto approve is disabled
Enable and configure the 'auto approve' workflow.
autoMerge
Optional
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.
autoMergeOptions
Optional
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.
classifiers
Optional
public java.util.List<java.lang.String> getClassifiers();
- Type: java.util.List
A list of PyPI trove classifiers that describe the project.
clobber
Optional
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.
commitGenerated
Optional
public java.lang.Boolean getCommitGenerated();
- Type: java.lang.Boolean
- Default: true
Whether to commit the managed files by default.
deps
Optional
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()
.
description
Optional
public java.lang.String getDescription();
- Type: java.lang.String
A short description of the package.
devContainer
Optional
public java.lang.Boolean getDevContainer();
- Type: java.lang.Boolean
- Default: false
Add a VSCode development environment (used for GitHub Codespaces).
devDeps
Optional
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()
.
github
Optional
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.
githubOptions
Optional
public GitHubOptions getGithubOptions();
- Type: io.github.cdklabs.projen.github.GitHubOptions
- Default: see GitHubOptions
Options for GitHub integration.
gitIgnoreOptions
Optional
public IgnoreFileOptions getGitIgnoreOptions();
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptions
Optional
public GitOptions getGitOptions();
- Type: io.github.cdklabs.projen.GitOptions
Configuration options for git.
gitpod
Optional
public java.lang.Boolean getGitpod();
- Type: java.lang.Boolean
- Default: false
Add a Gitpod development environment.
homepage
Optional
public java.lang.String getHomepage();
- Type: java.lang.String
A URL to the website of the project.
license
Optional
public java.lang.String getLicense();
- Type: java.lang.String
License of this package as an SPDX identifier.
logging
Optional
public LoggerOptions getLogging();
- Type: io.github.cdklabs.projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
~~mergify
~~Optional
- Deprecated: use
githubOptions.mergify
instead
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.mergifyOptions
instead
public MergifyOptions getMergifyOptions();
- Type: io.github.cdklabs.projen.github.MergifyOptions
- Default: default options
Options for mergify.
moduleName
Optional
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.
name
Optional
public java.lang.String getName();
- Type: java.lang.String
- Default: $BASEDIR
This is the name of your project.
outdir
Optional
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.
packageName
Optional
public java.lang.String getPackageName();
- Type: java.lang.String
Package name.
parent
Optional
public Project getParent();
- Type: io.github.cdklabs.projen.Project
The parent project, if this project is part of a bigger project.
poetryOptions
Optional
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).
projenCommand
Optional
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.
projenCredentials
Optional
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.
projenrcJson
Optional
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.
projenrcJsonOptions
Optional
public ProjenrcJsonOptions getProjenrcJsonOptions();
- Type: io.github.cdklabs.projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
projenrcPythonOptions
Optional
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.
pytest
Optional
public java.lang.Boolean getPytest();
- Type: java.lang.Boolean
- Default: true
Include pytest tests.
pytestOptions
Optional
public PytestOptions getPytestOptions();
- Type: io.github.cdklabs.projen.python.PytestOptions
- Default: defaults
pytest options.
pythonExec
Optional
public java.lang.String getPythonExec();
- Type: java.lang.String
- Default: "python"
Path to the python executable to use.
readme
Optional
public SampleReadmeProps getReadme();
- Type: io.github.cdklabs.projen.SampleReadmeProps
- Default: { filename: 'README.md', contents: '# replace this' }
The README setup.
renovatebot
Optional
public java.lang.Boolean getRenovatebot();
- Type: java.lang.Boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptions
Optional
public RenovatebotOptions getRenovatebotOptions();
- Type: io.github.cdklabs.projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
sample
Optional
public java.lang.Boolean getSample();
- Type: java.lang.Boolean
- Default: true
Include sample code and test if the relevant directories don't exist.
setupConfig
Optional
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.
setuptools
Optional
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.
stale
Optional
public java.lang.Boolean getStale();
- Type: java.lang.Boolean
- Default: false
Auto-close of stale issues and pull request.
See staleOptions
for options.
staleOptions
Optional
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
.
version
Optional
public java.lang.String getVersion();
- Type: java.lang.String
- Default: "0.1.0"
Version of the package.
vscode
Optional
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.
commitGeneratedCode
Optional
public java.lang.Boolean getCommitGeneratedCode();
- Type: java.lang.Boolean
- Default: false
Whether to commit the code generated by the OpenAPI Generator.
architecture
Optional
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
runtimeVersion
Optional
public PythonVersion getRuntimeVersion();
- Type: PythonVersion
- Default: PythonVersion.PYTHON_3_11
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. |
authorEmail
Optional
public java.lang.String getAuthorEmail();
- Type: java.lang.String
- Default: $GIT_USER_EMAIL
Author's e-mail.
authorName
Optional
public java.lang.String getAuthorName();
- Type: java.lang.String
- Default: $GIT_USER_NAME
Author's name.
autoApproveOptions
Optional
public AutoApproveOptions getAutoApproveOptions();
- Type: io.github.cdklabs.projen.github.AutoApproveOptions
- Default: auto approve is disabled
Enable and configure the 'auto approve' workflow.
autoMerge
Optional
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.
autoMergeOptions
Optional
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.
classifiers
Optional
public java.util.List<java.lang.String> getClassifiers();
- Type: java.util.List
A list of PyPI trove classifiers that describe the project.
clobber
Optional
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.
commitGenerated
Optional
public java.lang.Boolean getCommitGenerated();
- Type: java.lang.Boolean
- Default: true
Whether to commit the managed files by default.
deps
Optional
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()
.
description
Optional
public java.lang.String getDescription();
- Type: java.lang.String
A short description of the package.
devContainer
Optional
public java.lang.Boolean getDevContainer();
- Type: java.lang.Boolean
- Default: false
Add a VSCode development environment (used for GitHub Codespaces).
devDeps
Optional
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()
.
github
Optional
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.
githubOptions
Optional
public GitHubOptions getGithubOptions();
- Type: io.github.cdklabs.projen.github.GitHubOptions
- Default: see GitHubOptions
Options for GitHub integration.
gitIgnoreOptions
Optional
public IgnoreFileOptions getGitIgnoreOptions();
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptions
Optional
public GitOptions getGitOptions();
- Type: io.github.cdklabs.projen.GitOptions
Configuration options for git.
gitpod
Optional
public java.lang.Boolean getGitpod();
- Type: java.lang.Boolean
- Default: false
Add a Gitpod development environment.
homepage
Optional
public java.lang.String getHomepage();
- Type: java.lang.String
A URL to the website of the project.
license
Optional
public java.lang.String getLicense();
- Type: java.lang.String
License of this package as an SPDX identifier.
logging
Optional
public LoggerOptions getLogging();
- Type: io.github.cdklabs.projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
~~mergify
~~Optional
- Deprecated: use
githubOptions.mergify
instead
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.mergifyOptions
instead
public MergifyOptions getMergifyOptions();
- Type: io.github.cdklabs.projen.github.MergifyOptions
- Default: default options
Options for mergify.
moduleName
Optional
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.
name
Optional
public java.lang.String getName();
- Type: java.lang.String
- Default: $BASEDIR
This is the name of your project.
outdir
Optional
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.
packageName
Optional
public java.lang.String getPackageName();
- Type: java.lang.String
Package name.
parent
Optional
public Project getParent();
- Type: io.github.cdklabs.projen.Project
The parent project, if this project is part of a bigger project.
poetryOptions
Optional
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).
projenCommand
Optional
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.
projenCredentials
Optional
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.
projenrcJson
Optional
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.
projenrcJsonOptions
Optional
public ProjenrcJsonOptions getProjenrcJsonOptions();
- Type: io.github.cdklabs.projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
projenrcPythonOptions
Optional
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.
pytest
Optional
public java.lang.Boolean getPytest();
- Type: java.lang.Boolean
- Default: true
Include pytest tests.
pytestOptions
Optional
public PytestOptions getPytestOptions();
- Type: io.github.cdklabs.projen.python.PytestOptions
- Default: defaults
pytest options.
pythonExec
Optional
public java.lang.String getPythonExec();
- Type: java.lang.String
- Default: "python"
Path to the python executable to use.
readme
Optional
public SampleReadmeProps getReadme();
- Type: io.github.cdklabs.projen.SampleReadmeProps
- Default: { filename: 'README.md', contents: '# replace this' }
The README setup.
renovatebot
Optional
public java.lang.Boolean getRenovatebot();
- Type: java.lang.Boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptions
Optional
public RenovatebotOptions getRenovatebotOptions();
- Type: io.github.cdklabs.projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
sample
Optional
public java.lang.Boolean getSample();
- Type: java.lang.Boolean
- Default: true
Include sample code and test if the relevant directories don't exist.
setupConfig
Optional
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.
setuptools
Optional
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.
stale
Optional
public java.lang.Boolean getStale();
- Type: java.lang.Boolean
- Default: false
Auto-close of stale issues and pull request.
See staleOptions
for options.
staleOptions
Optional
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
.
version
Optional
public java.lang.String getVersion();
- Type: java.lang.String
- Default: "0.1.0"
Version of the package.
vscode
Optional
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.
commitGeneratedCode
Optional
public java.lang.Boolean getCommitGeneratedCode();
- Type: java.lang.Boolean
- Default: false
Whether to commit the code generated by the OpenAPI Generator.
mockDataOptions
Optional
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. |
authorEmail
Optional
public java.lang.String getAuthorEmail();
- Type: java.lang.String
- Default: $GIT_USER_EMAIL
Author's e-mail.
authorName
Optional
public java.lang.String getAuthorName();
- Type: java.lang.String
- Default: $GIT_USER_NAME
Author's name.
autoApproveOptions
Optional
public AutoApproveOptions getAutoApproveOptions();
- Type: io.github.cdklabs.projen.github.AutoApproveOptions
- Default: auto approve is disabled
Enable and configure the 'auto approve' workflow.
autoMerge
Optional
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.
autoMergeOptions
Optional
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.
classifiers
Optional
public java.util.List<java.lang.String> getClassifiers();
- Type: java.util.List
A list of PyPI trove classifiers that describe the project.
clobber
Optional
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.
commitGenerated
Optional
public java.lang.Boolean getCommitGenerated();
- Type: java.lang.Boolean
- Default: true
Whether to commit the managed files by default.
deps
Optional
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()
.
description
Optional
public java.lang.String getDescription();
- Type: java.lang.String
A short description of the package.
devContainer
Optional
public java.lang.Boolean getDevContainer();
- Type: java.lang.Boolean
- Default: false
Add a VSCode development environment (used for GitHub Codespaces).
devDeps
Optional
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()
.
github
Optional
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.
githubOptions
Optional
public GitHubOptions getGithubOptions();
- Type: io.github.cdklabs.projen.github.GitHubOptions
- Default: see GitHubOptions
Options for GitHub integration.
gitIgnoreOptions
Optional
public IgnoreFileOptions getGitIgnoreOptions();
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptions
Optional
public GitOptions getGitOptions();
- Type: io.github.cdklabs.projen.GitOptions
Configuration options for git.
gitpod
Optional
public java.lang.Boolean getGitpod();
- Type: java.lang.Boolean
- Default: false
Add a Gitpod development environment.
homepage
Optional
public java.lang.String getHomepage();
- Type: java.lang.String
A URL to the website of the project.
license
Optional
public java.lang.String getLicense();
- Type: java.lang.String
License of this package as an SPDX identifier.
logging
Optional
public LoggerOptions getLogging();
- Type: io.github.cdklabs.projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
~~mergify
~~Optional
- Deprecated: use
githubOptions.mergify
instead
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.mergifyOptions
instead
public MergifyOptions getMergifyOptions();
- Type: io.github.cdklabs.projen.github.MergifyOptions
- Default: default options
Options for mergify.
moduleName
Optional
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.
name
Optional
public java.lang.String getName();
- Type: java.lang.String
- Default: $BASEDIR
This is the name of your project.
outdir
Optional
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.
packageName
Optional
public java.lang.String getPackageName();
- Type: java.lang.String
Package name.
parent
Optional
public Project getParent();
- Type: io.github.cdklabs.projen.Project
The parent project, if this project is part of a bigger project.
poetryOptions
Optional
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).
projenCommand
Optional
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.
projenCredentials
Optional
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.
projenrcJson
Optional
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.
projenrcJsonOptions
Optional
public ProjenrcJsonOptions getProjenrcJsonOptions();
- Type: io.github.cdklabs.projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
projenrcPythonOptions
Optional
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.
pytest
Optional
public java.lang.Boolean getPytest();
- Type: java.lang.Boolean
- Default: true
Include pytest tests.
pytestOptions
Optional
public PytestOptions getPytestOptions();
- Type: io.github.cdklabs.projen.python.PytestOptions
- Default: defaults
pytest options.
pythonExec
Optional
public java.lang.String getPythonExec();
- Type: java.lang.String
- Default: "python"
Path to the python executable to use.
readme
Optional
public SampleReadmeProps getReadme();
- Type: io.github.cdklabs.projen.SampleReadmeProps
- Default: { filename: 'README.md', contents: '# replace this' }
The README setup.
renovatebot
Optional
public java.lang.Boolean getRenovatebot();
- Type: java.lang.Boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptions
Optional
public RenovatebotOptions getRenovatebotOptions();
- Type: io.github.cdklabs.projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
sample
Optional
public java.lang.Boolean getSample();
- Type: java.lang.Boolean
- Default: true
Include sample code and test if the relevant directories don't exist.
setupConfig
Optional
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.
setuptools
Optional
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.
stale
Optional
public java.lang.Boolean getStale();
- Type: java.lang.Boolean
- Default: false
Auto-close of stale issues and pull request.
See staleOptions
for options.
staleOptions
Optional
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
.
version
Optional
public java.lang.String getVersion();
- Type: java.lang.String
- Default: "0.1.0"
Version of the package.
vscode
Optional
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.
commitGeneratedCode
Optional
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. |
java
Optional
public GeneratedJavaRuntimeOptions getJava();
Options for a generated java project.
These override the default inferred options.
python
Optional
public GeneratedPythonRuntimeOptions getPython();
Options for a generated python project.
These override the default inferred options.
typescript
Optional
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. |
allowLibraryDependencies
Optional
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.
artifactsDirectory
Optional
public java.lang.String getArtifactsDirectory();
- Type: java.lang.String
- Default: "dist"
A directory which will contain build artifacts.
authorEmail
Optional
public java.lang.String getAuthorEmail();
- Type: java.lang.String
Author's e-mail.
authorName
Optional
public java.lang.String getAuthorName();
- Type: java.lang.String
Author's name.
authorOrganization
Optional
public java.lang.Boolean getAuthorOrganization();
- Type: java.lang.Boolean
Is the author an organization.
authorUrl
Optional
public java.lang.String getAuthorUrl();
- Type: java.lang.String
Author's URL / Website.
autoApproveOptions
Optional
public AutoApproveOptions getAutoApproveOptions();
- Type: io.github.cdklabs.projen.github.AutoApproveOptions
- Default: auto approve is disabled
Enable and configure the 'auto approve' workflow.
autoApproveUpgrades
Optional
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.
autoDetectBin
Optional
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.
autoMerge
Optional
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.
autoMergeOptions
Optional
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.
bin
Optional
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.
bugsEmail
Optional
public java.lang.String getBugsEmail();
- Type: java.lang.String
The email address to which issues should be reported.
bugsUrl
Optional
public java.lang.String getBugsUrl();
- Type: java.lang.String
The url to your project's issue tracker.
buildWorkflow
Optional
public java.lang.Boolean getBuildWorkflow();
- Type: java.lang.Boolean
- Default: true if not a subproject
Define a GitHub workflow for building PRs.
buildWorkflowOptions
Optional
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.
bundledDeps
Optional
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.
bundlerOptions
Optional
public BundlerOptions getBundlerOptions();
- Type: io.github.cdklabs.projen.javascript.BundlerOptions
Options for Bundler
.
checkLicenses
Optional
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.
clobber
Optional
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.
codeArtifactOptions
Optional
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
codeCov
Optional
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
.
codeCovTokenSecret
Optional
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.
commitGenerated
Optional
public java.lang.Boolean getCommitGenerated();
- Type: java.lang.Boolean
- Default: true
Whether to commit the managed files by default.
copyrightOwner
Optional
public java.lang.String getCopyrightOwner();
- Type: java.lang.String
- Default: defaults to the value of authorName or "" if
authorName
is undefined.
License copyright owner.
copyrightPeriod
Optional
public java.lang.String getCopyrightPeriod();
- Type: java.lang.String
- Default: current year
The copyright years to put in the LICENSE file.
defaultReleaseBranch
Optional
public java.lang.String getDefaultReleaseBranch();
- Type: java.lang.String
- Default: "main"
The name of the main release branch.
dependabot
Optional
public java.lang.Boolean getDependabot();
- Type: java.lang.Boolean
- Default: false
Use dependabot to handle dependency upgrades.
Cannot be used in conjunction with depsUpgrade
.
dependabotOptions
Optional
public DependabotOptions getDependabotOptions();
- Type: io.github.cdklabs.projen.github.DependabotOptions
- Default: default options
Options for dependabot.
deps
Optional
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.
depsUpgrade
Optional
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
.
depsUpgradeOptions
Optional
public UpgradeDependenciesOptions getDepsUpgradeOptions();
- Type: io.github.cdklabs.projen.javascript.UpgradeDependenciesOptions
- Default: default options
Options for UpgradeDependencies
.
description
Optional
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
devContainer
Optional
public java.lang.Boolean getDevContainer();
- Type: java.lang.Boolean
- Default: false
Add a VSCode development environment (used for GitHub Codespaces).
devDeps
Optional
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.
disableTsconfig
Optional
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).
disableTsconfigDev
Optional
public java.lang.Boolean getDisableTsconfigDev();
- Type: java.lang.Boolean
- Default: false
Do not generate a tsconfig.dev.json
file.
docgen
Optional
public java.lang.Boolean getDocgen();
- Type: java.lang.Boolean
- Default: false
Docgen by Typedoc.
docsDirectory
Optional
public java.lang.String getDocsDirectory();
- Type: java.lang.String
- Default: "docs"
Docs directory.
entrypoint
Optional
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.
entrypointTypes
Optional
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.
eslint
Optional
public java.lang.Boolean getEslint();
- Type: java.lang.Boolean
- Default: true
Setup eslint.
eslintOptions
Optional
public EslintOptions getEslintOptions();
- Type: io.github.cdklabs.projen.javascript.EslintOptions
- Default: opinionated default options
Eslint options.
github
Optional
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.
githubOptions
Optional
public GitHubOptions getGithubOptions();
- Type: io.github.cdklabs.projen.github.GitHubOptions
- Default: see GitHubOptions
Options for GitHub integration.
gitignore
Optional
public java.util.List<java.lang.String> getGitignore();
- Type: java.util.List
Additional entries to .gitignore.
gitIgnoreOptions
Optional
public IgnoreFileOptions getGitIgnoreOptions();
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptions
Optional
public GitOptions getGitOptions();
- Type: io.github.cdklabs.projen.GitOptions
Configuration options for git.
gitpod
Optional
public java.lang.Boolean getGitpod();
- Type: java.lang.Boolean
- Default: false
Add a Gitpod development environment.
homepage
Optional
public java.lang.String getHomepage();
- Type: java.lang.String
Package's Homepage / Website.
jest
Optional
public java.lang.Boolean getJest();
- Type: java.lang.Boolean
- Default: true
Setup jest unit tests.
jestOptions
Optional
public JestOptions getJestOptions();
- Type: io.github.cdklabs.projen.javascript.JestOptions
- Default: default options
Jest options.
jsiiReleaseVersion
Optional
public java.lang.String getJsiiReleaseVersion();
- Type: java.lang.String
- Default: "latest"
Version requirement of publib
which is used to publish modules to npm.
keywords
Optional
public java.util.List<java.lang.String> getKeywords();
- Type: java.util.List
Keywords to include in package.json
.
libdir
Optional
public java.lang.String getLibdir();
- Type: java.lang.String
- Default: "lib"
Typescript artifacts output directory.
license
Optional
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.
licensed
Optional
public java.lang.Boolean getLicensed();
- Type: java.lang.Boolean
- Default: true
Indicates if a license should be added.
logging
Optional
public LoggerOptions getLogging();
- Type: io.github.cdklabs.projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
majorVersion
Optional
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.
maxNodeVersion
Optional
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.mergify
instead
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.mergifyOptions
instead
public MergifyOptions getMergifyOptions();
- Type: io.github.cdklabs.projen.github.MergifyOptions
- Default: default options
Options for mergify.
minMajorVersion
Optional
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
.
minNodeVersion
Optional
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.
name
Optional
public java.lang.String getName();
- Type: java.lang.String
- Default: $BASEDIR
This is the name of your project.
npmAccess
Optional
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.
npmDistTag
Optional
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.
npmignoreEnabled
Optional
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.
npmIgnoreOptions
Optional
public IgnoreFileOptions getNpmIgnoreOptions();
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .npmignore file.
npmProvenance
Optional
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
npmRegistryUrl
instead
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
.
npmRegistryUrl
Optional
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://")
npmTokenSecret
Optional
public java.lang.String getNpmTokenSecret();
- Type: java.lang.String
- Default: "NPM_TOKEN"
GitHub secret which contains the NPM token to use when publishing packages.
outdir
Optional
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.
package
Optional
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
).
packageManager
Optional
public NodePackageManager getPackageManager();
- Type: io.github.cdklabs.projen.javascript.NodePackageManager
- Default: NodePackageManager.YARN_CLASSIC
The Node Package Manager used to execute scripts.
packageName
Optional
public java.lang.String getPackageName();
- Type: java.lang.String
- Default: defaults to project name
The "name" in package.json.
parent
Optional
public Project getParent();
- Type: io.github.cdklabs.projen.Project
The parent project, if this project is part of a bigger project.
peerDependencyOptions
Optional
public PeerDependencyOptions getPeerDependencyOptions();
- Type: io.github.cdklabs.projen.javascript.PeerDependencyOptions
Options for peerDeps
.
peerDeps
Optional
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.
pnpmVersion
Optional
public java.lang.String getPnpmVersion();
- Type: java.lang.String
- Default: "7"
The version of PNPM to use if using PNPM as a package manager.
postBuildSteps
Optional
public java.util.List<JobStep> getPostBuildSteps();
- Type: java.util.List
- Default: []
Steps to execute after build as part of the release workflow.
prerelease
Optional
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").
prettier
Optional
public java.lang.Boolean getPrettier();
- Type: java.lang.Boolean
- Default: false
Setup prettier.
prettierOptions
Optional
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).
projenCommand
Optional
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.
projenCredentials
Optional
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.
projenDevDependency
Optional
public java.lang.Boolean getProjenDevDependency();
- Type: java.lang.Boolean
- Default: true if not a subproject
Indicates of "projen" should be installed as a devDependency.
projenrcJs
Optional
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.
projenrcJson
Optional
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.
projenrcJsonOptions
Optional
public ProjenrcJsonOptions getProjenrcJsonOptions();
- Type: io.github.cdklabs.projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
projenrcJsOptions
Optional
public ProjenrcOptions getProjenrcJsOptions();
- Type: io.github.cdklabs.projen.javascript.ProjenrcOptions
- Default: default options
Options for .projenrc.js.
projenrcTs
Optional
public java.lang.Boolean getProjenrcTs();
- Type: java.lang.Boolean
- Default: false
Use TypeScript for your projenrc file (.projenrc.ts
).
projenrcTsOptions
Optional
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.
projenVersion
Optional
public java.lang.String getProjenVersion();
- Type: java.lang.String
- Default: Defaults to the latest version.
Version of projen to install.
publishDryRun
Optional
public java.lang.Boolean getPublishDryRun();
- Type: java.lang.Boolean
- Default: false
Instead of actually publishing to package managers, just print the publishing command.
publishTasks
Optional
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.
pullRequestTemplate
Optional
public java.lang.Boolean getPullRequestTemplate();
- Type: java.lang.Boolean
- Default: true
Include a GitHub pull request template.
pullRequestTemplateContents
Optional
public java.util.List<java.lang.String> getPullRequestTemplateContents();
- Type: java.util.List
- Default: default content
The contents of the pull request template.
readme
Optional
public SampleReadmeProps getReadme();
- Type: io.github.cdklabs.projen.SampleReadmeProps
- Default: { filename: 'README.md', contents: '# replace this' }
The README setup.
releasableCommits
Optional
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.
release
Optional
public java.lang.Boolean getRelease();
- Type: java.lang.Boolean
- Default: true (false for subprojects)
Add release management to this project.
releaseBranches
Optional
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
.
releaseFailureIssue
Optional
public java.lang.Boolean getReleaseFailureIssue();
- Type: java.lang.Boolean
- Default: false
Create a github issue on every failed publishing task.
releaseFailureIssueLabel
Optional
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.
releaseTagPrefix
Optional
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.
releaseToNpm
Optional
public java.lang.Boolean getReleaseToNpm();
- Type: java.lang.Boolean
- Default: false
Automatically release to npm when new versions are introduced.
releaseTrigger
Optional
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
.
releaseWorkflowName
Optional
public java.lang.String getReleaseWorkflowName();
- Type: java.lang.String
- Default: "release"
The name of the default release workflow.
releaseWorkflowSetupSteps
Optional
public java.util.List<JobStep> getReleaseWorkflowSetupSteps();
- Type: java.util.List
A set of workflow steps to execute in order to setup the workflow container.
renovatebot
Optional
public java.lang.Boolean getRenovatebot();
- Type: java.lang.Boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptions
Optional
public RenovatebotOptions getRenovatebotOptions();
- Type: io.github.cdklabs.projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
repository
Optional
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
repositoryDirectory
Optional
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.
sampleCode
Optional
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.
scopedPackagesOptions
Optional
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.
srcdir
Optional
public java.lang.String getSrcdir();
- Type: java.lang.String
- Default: "src"
Typescript sources directory.
stability
Optional
public java.lang.String getStability();
- Type: java.lang.String
Package's Stability.
stale
Optional
public java.lang.Boolean getStale();
- Type: java.lang.Boolean
- Default: false
Auto-close of stale issues and pull request.
See staleOptions
for options.
staleOptions
Optional
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
.
testdir
Optional
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.
tsconfig
Optional
public TypescriptConfigOptions getTsconfig();
- Type: io.github.cdklabs.projen.javascript.TypescriptConfigOptions
- Default: default options
Custom TSConfig.
tsconfigDev
Optional
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).
tsconfigDevFile
Optional
public java.lang.String getTsconfigDevFile();
- Type: java.lang.String
- Default: "tsconfig.dev.json"
The name of the development tsconfig.json file.
tsJestOptions
Optional
public TsJestOptions getTsJestOptions();
- Type: io.github.cdklabs.projen.typescript.TsJestOptions
Options for ts-jest.
typescriptVersion
Optional
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
).
versionrcOptions
Optional
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.
vscode
Optional
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.
workflowBootstrapSteps
Optional
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.
workflowContainerImage
Optional
public java.lang.String getWorkflowContainerImage();
- Type: java.lang.String
- Default: default image
Container image to use for GitHub workflows.
workflowGitIdentity
Optional
public GitIdentity getWorkflowGitIdentity();
- Type: io.github.cdklabs.projen.github.GitIdentity
- Default: GitHub Actions
The git identity to use in workflows.
workflowNodeVersion
Optional
public java.lang.String getWorkflowNodeVersion();
- Type: java.lang.String
- Default: same as
minNodeVersion
The node version to use in GitHub workflows.
workflowPackageCache
Optional
public java.lang.Boolean getWorkflowPackageCache();
- Type: java.lang.Boolean
- Default: false
Enable Node.js package cache in GitHub workflows.
workflowRunsOn
Optional
public java.util.List<java.lang.String> getWorkflowRunsOn();
- Type: java.util.List
- Default: ["ubuntu-latest"]
Github Runner selection labels.
workflowRunsOnGroup
Optional
public GroupRunnerOptions getWorkflowRunsOnGroup();
- Type: io.github.cdklabs.projen.GroupRunnerOptions
Github Runner Group selection options.
yarnBerryOptions
Optional
public YarnBerryOptions getYarnBerryOptions();
- Type: io.github.cdklabs.projen.javascript.YarnBerryOptions
- Default: Yarn Berry v4 with all default options
Options for Yarn Berry.
commitGeneratedCode
Optional
public java.lang.Boolean getCommitGeneratedCode();
- Type: java.lang.Boolean
- Default: false
Whether to commit the code generated by the OpenAPI Generator.
handlerEntryPoints
Optional
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.
runtimeVersion
Optional
public NodeVersion getRuntimeVersion();
- Type: NodeVersion
- Default: NodeVersion.NODE_18
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. |
allowLibraryDependencies
Optional
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.
artifactsDirectory
Optional
public java.lang.String getArtifactsDirectory();
- Type: java.lang.String
- Default: "dist"
A directory which will contain build artifacts.
authorEmail
Optional
public java.lang.String getAuthorEmail();
- Type: java.lang.String
Author's e-mail.
authorName
Optional
public java.lang.String getAuthorName();
- Type: java.lang.String
Author's name.
authorOrganization
Optional
public java.lang.Boolean getAuthorOrganization();
- Type: java.lang.Boolean
Is the author an organization.
authorUrl
Optional
public java.lang.String getAuthorUrl();
- Type: java.lang.String
Author's URL / Website.
autoApproveOptions
Optional
public AutoApproveOptions getAutoApproveOptions();
- Type: io.github.cdklabs.projen.github.AutoApproveOptions
- Default: auto approve is disabled
Enable and configure the 'auto approve' workflow.
autoApproveUpgrades
Optional
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.
autoDetectBin
Optional
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.
autoMerge
Optional
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.
autoMergeOptions
Optional
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.
bin
Optional
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.
bugsEmail
Optional
public java.lang.String getBugsEmail();
- Type: java.lang.String
The email address to which issues should be reported.
bugsUrl
Optional
public java.lang.String getBugsUrl();
- Type: java.lang.String
The url to your project's issue tracker.
buildWorkflow
Optional
public java.lang.Boolean getBuildWorkflow();
- Type: java.lang.Boolean
- Default: true if not a subproject
Define a GitHub workflow for building PRs.
buildWorkflowOptions
Optional
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.
bundledDeps
Optional
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.
bundlerOptions
Optional
public BundlerOptions getBundlerOptions();
- Type: io.github.cdklabs.projen.javascript.BundlerOptions
Options for Bundler
.
checkLicenses
Optional
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.
clobber
Optional
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.
codeArtifactOptions
Optional
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
codeCov
Optional
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
.
codeCovTokenSecret
Optional
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.
commitGenerated
Optional
public java.lang.Boolean getCommitGenerated();
- Type: java.lang.Boolean
- Default: true
Whether to commit the managed files by default.
copyrightOwner
Optional
public java.lang.String getCopyrightOwner();
- Type: java.lang.String
- Default: defaults to the value of authorName or "" if
authorName
is undefined.
License copyright owner.
copyrightPeriod
Optional
public java.lang.String getCopyrightPeriod();
- Type: java.lang.String
- Default: current year
The copyright years to put in the LICENSE file.
defaultReleaseBranch
Optional
public java.lang.String getDefaultReleaseBranch();
- Type: java.lang.String
- Default: "main"
The name of the main release branch.
dependabot
Optional
public java.lang.Boolean getDependabot();
- Type: java.lang.Boolean
- Default: false
Use dependabot to handle dependency upgrades.
Cannot be used in conjunction with depsUpgrade
.
dependabotOptions
Optional
public DependabotOptions getDependabotOptions();
- Type: io.github.cdklabs.projen.github.DependabotOptions
- Default: default options
Options for dependabot.
deps
Optional
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.
depsUpgrade
Optional
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
.
depsUpgradeOptions
Optional
public UpgradeDependenciesOptions getDepsUpgradeOptions();
- Type: io.github.cdklabs.projen.javascript.UpgradeDependenciesOptions
- Default: default options
Options for UpgradeDependencies
.
description
Optional
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
devContainer
Optional
public java.lang.Boolean getDevContainer();
- Type: java.lang.Boolean
- Default: false
Add a VSCode development environment (used for GitHub Codespaces).
devDeps
Optional
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.
disableTsconfig
Optional
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).
disableTsconfigDev
Optional
public java.lang.Boolean getDisableTsconfigDev();
- Type: java.lang.Boolean
- Default: false
Do not generate a tsconfig.dev.json
file.
docgen
Optional
public java.lang.Boolean getDocgen();
- Type: java.lang.Boolean
- Default: false
Docgen by Typedoc.
docsDirectory
Optional
public java.lang.String getDocsDirectory();
- Type: java.lang.String
- Default: "docs"
Docs directory.
entrypoint
Optional
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.
entrypointTypes
Optional
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.
eslint
Optional
public java.lang.Boolean getEslint();
- Type: java.lang.Boolean
- Default: true
Setup eslint.
eslintOptions
Optional
public EslintOptions getEslintOptions();
- Type: io.github.cdklabs.projen.javascript.EslintOptions
- Default: opinionated default options
Eslint options.
github
Optional
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.
githubOptions
Optional
public GitHubOptions getGithubOptions();
- Type: io.github.cdklabs.projen.github.GitHubOptions
- Default: see GitHubOptions
Options for GitHub integration.
gitignore
Optional
public java.util.List<java.lang.String> getGitignore();
- Type: java.util.List
Additional entries to .gitignore.
gitIgnoreOptions
Optional
public IgnoreFileOptions getGitIgnoreOptions();
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptions
Optional
public GitOptions getGitOptions();
- Type: io.github.cdklabs.projen.GitOptions
Configuration options for git.
gitpod
Optional
public java.lang.Boolean getGitpod();
- Type: java.lang.Boolean
- Default: false
Add a Gitpod development environment.
homepage
Optional
public java.lang.String getHomepage();
- Type: java.lang.String
Package's Homepage / Website.
jest
Optional
public java.lang.Boolean getJest();
- Type: java.lang.Boolean
- Default: true
Setup jest unit tests.
jestOptions
Optional
public JestOptions getJestOptions();
- Type: io.github.cdklabs.projen.javascript.JestOptions
- Default: default options
Jest options.
jsiiReleaseVersion
Optional
public java.lang.String getJsiiReleaseVersion();
- Type: java.lang.String
- Default: "latest"
Version requirement of publib
which is used to publish modules to npm.
keywords
Optional
public java.util.List<java.lang.String> getKeywords();
- Type: java.util.List
Keywords to include in package.json
.
libdir
Optional
public java.lang.String getLibdir();
- Type: java.lang.String
- Default: "lib"
Typescript artifacts output directory.
license
Optional
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.
licensed
Optional
public java.lang.Boolean getLicensed();
- Type: java.lang.Boolean
- Default: true
Indicates if a license should be added.
logging
Optional
public LoggerOptions getLogging();
- Type: io.github.cdklabs.projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
majorVersion
Optional
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.
maxNodeVersion
Optional
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.mergify
instead
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.mergifyOptions
instead
public MergifyOptions getMergifyOptions();
- Type: io.github.cdklabs.projen.github.MergifyOptions
- Default: default options
Options for mergify.
minMajorVersion
Optional
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
.
minNodeVersion
Optional
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.
name
Optional
public java.lang.String getName();
- Type: java.lang.String
- Default: $BASEDIR
This is the name of your project.
npmAccess
Optional
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.
npmDistTag
Optional
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.
npmignoreEnabled
Optional
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.
npmIgnoreOptions
Optional
public IgnoreFileOptions getNpmIgnoreOptions();
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .npmignore file.
npmProvenance
Optional
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
npmRegistryUrl
instead
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
.
npmRegistryUrl
Optional
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://")
npmTokenSecret
Optional
public java.lang.String getNpmTokenSecret();
- Type: java.lang.String
- Default: "NPM_TOKEN"
GitHub secret which contains the NPM token to use when publishing packages.
outdir
Optional
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.
package
Optional
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
).
packageManager
Optional
public NodePackageManager getPackageManager();
- Type: io.github.cdklabs.projen.javascript.NodePackageManager
- Default: NodePackageManager.YARN_CLASSIC
The Node Package Manager used to execute scripts.
packageName
Optional
public java.lang.String getPackageName();
- Type: java.lang.String
- Default: defaults to project name
The "name" in package.json.
parent
Optional
public Project getParent();
- Type: io.github.cdklabs.projen.Project
The parent project, if this project is part of a bigger project.
peerDependencyOptions
Optional
public PeerDependencyOptions getPeerDependencyOptions();
- Type: io.github.cdklabs.projen.javascript.PeerDependencyOptions
Options for peerDeps
.
peerDeps
Optional
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.
pnpmVersion
Optional
public java.lang.String getPnpmVersion();
- Type: java.lang.String
- Default: "7"
The version of PNPM to use if using PNPM as a package manager.
postBuildSteps
Optional
public java.util.List<JobStep> getPostBuildSteps();
- Type: java.util.List
- Default: []
Steps to execute after build as part of the release workflow.
prerelease
Optional
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").
prettier
Optional
public java.lang.Boolean getPrettier();
- Type: java.lang.Boolean
- Default: false
Setup prettier.
prettierOptions
Optional
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).
projenCommand
Optional
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.
projenCredentials
Optional
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.
projenDevDependency
Optional
public java.lang.Boolean getProjenDevDependency();
- Type: java.lang.Boolean
- Default: true if not a subproject
Indicates of "projen" should be installed as a devDependency.
projenrcJs
Optional
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.
projenrcJson
Optional
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.
projenrcJsonOptions
Optional
public ProjenrcJsonOptions getProjenrcJsonOptions();
- Type: io.github.cdklabs.projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
projenrcJsOptions
Optional
public ProjenrcOptions getProjenrcJsOptions();
- Type: io.github.cdklabs.projen.javascript.ProjenrcOptions
- Default: default options
Options for .projenrc.js.
projenrcTs
Optional
public java.lang.Boolean getProjenrcTs();
- Type: java.lang.Boolean
- Default: false
Use TypeScript for your projenrc file (.projenrc.ts
).
projenrcTsOptions
Optional
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.
projenVersion
Optional
public java.lang.String getProjenVersion();
- Type: java.lang.String
- Default: Defaults to the latest version.
Version of projen to install.
publishDryRun
Optional
public java.lang.Boolean getPublishDryRun();
- Type: java.lang.Boolean
- Default: false
Instead of actually publishing to package managers, just print the publishing command.
publishTasks
Optional
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.
pullRequestTemplate
Optional
public java.lang.Boolean getPullRequestTemplate();
- Type: java.lang.Boolean
- Default: true
Include a GitHub pull request template.
pullRequestTemplateContents
Optional
public java.util.List<java.lang.String> getPullRequestTemplateContents();
- Type: java.util.List
- Default: default content
The contents of the pull request template.
readme
Optional
public SampleReadmeProps getReadme();
- Type: io.github.cdklabs.projen.SampleReadmeProps
- Default: { filename: 'README.md', contents: '# replace this' }
The README setup.
releasableCommits
Optional
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.
release
Optional
public java.lang.Boolean getRelease();
- Type: java.lang.Boolean
- Default: true (false for subprojects)
Add release management to this project.
releaseBranches
Optional
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
.
releaseFailureIssue
Optional
public java.lang.Boolean getReleaseFailureIssue();
- Type: java.lang.Boolean
- Default: false
Create a github issue on every failed publishing task.
releaseFailureIssueLabel
Optional
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.
releaseTagPrefix
Optional
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.
releaseToNpm
Optional
public java.lang.Boolean getReleaseToNpm();
- Type: java.lang.Boolean
- Default: false
Automatically release to npm when new versions are introduced.
releaseTrigger
Optional
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
.
releaseWorkflowName
Optional
public java.lang.String getReleaseWorkflowName();
- Type: java.lang.String
- Default: "release"
The name of the default release workflow.
releaseWorkflowSetupSteps
Optional
public java.util.List<JobStep> getReleaseWorkflowSetupSteps();
- Type: java.util.List
A set of workflow steps to execute in order to setup the workflow container.
renovatebot
Optional
public java.lang.Boolean getRenovatebot();
- Type: java.lang.Boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptions
Optional
public RenovatebotOptions getRenovatebotOptions();
- Type: io.github.cdklabs.projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
repository
Optional
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
repositoryDirectory
Optional
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.
sampleCode
Optional
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.
scopedPackagesOptions
Optional
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.
srcdir
Optional
public java.lang.String getSrcdir();
- Type: java.lang.String
- Default: "src"
Typescript sources directory.
stability
Optional
public java.lang.String getStability();
- Type: java.lang.String
Package's Stability.
stale
Optional
public java.lang.Boolean getStale();
- Type: java.lang.Boolean
- Default: false
Auto-close of stale issues and pull request.
See staleOptions
for options.
staleOptions
Optional
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
.
testdir
Optional
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.
tsconfig
Optional
public TypescriptConfigOptions getTsconfig();
- Type: io.github.cdklabs.projen.javascript.TypescriptConfigOptions
- Default: default options
Custom TSConfig.
tsconfigDev
Optional
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).
tsconfigDevFile
Optional
public java.lang.String getTsconfigDevFile();
- Type: java.lang.String
- Default: "tsconfig.dev.json"
The name of the development tsconfig.json file.
tsJestOptions
Optional
public TsJestOptions getTsJestOptions();
- Type: io.github.cdklabs.projen.typescript.TsJestOptions
Options for ts-jest.
typescriptVersion
Optional
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
).
versionrcOptions
Optional
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.
vscode
Optional
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.
workflowBootstrapSteps
Optional
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.
workflowContainerImage
Optional
public java.lang.String getWorkflowContainerImage();
- Type: java.lang.String
- Default: default image
Container image to use for GitHub workflows.
workflowGitIdentity
Optional
public GitIdentity getWorkflowGitIdentity();
- Type: io.github.cdklabs.projen.github.GitIdentity
- Default: GitHub Actions
The git identity to use in workflows.
workflowNodeVersion
Optional
public java.lang.String getWorkflowNodeVersion();
- Type: java.lang.String
- Default: same as
minNodeVersion
The node version to use in GitHub workflows.
workflowPackageCache
Optional
public java.lang.Boolean getWorkflowPackageCache();
- Type: java.lang.Boolean
- Default: false
Enable Node.js package cache in GitHub workflows.
workflowRunsOn
Optional
public java.util.List<java.lang.String> getWorkflowRunsOn();
- Type: java.util.List
- Default: ["ubuntu-latest"]
Github Runner selection labels.
workflowRunsOnGroup
Optional
public GroupRunnerOptions getWorkflowRunsOnGroup();
- Type: io.github.cdklabs.projen.GroupRunnerOptions
Github Runner Group selection options.
yarnBerryOptions
Optional
public YarnBerryOptions getYarnBerryOptions();
- Type: io.github.cdklabs.projen.javascript.YarnBerryOptions
- Default: Yarn Berry v4 with all default options
Options for Yarn Berry.
commitGeneratedCode
Optional
public java.lang.Boolean getCommitGeneratedCode();
- Type: java.lang.Boolean
- Default: false
Whether to commit the code generated by the OpenAPI Generator.
mockDataOptions
Optional
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)
.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. |
allowLibraryDependencies
Optional
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.
artifactsDirectory
Optional
public java.lang.String getArtifactsDirectory();
- Type: java.lang.String
- Default: "dist"
A directory which will contain build artifacts.
authorEmail
Optional
public java.lang.String getAuthorEmail();
- Type: java.lang.String
Author's e-mail.
authorName
Optional
public java.lang.String getAuthorName();
- Type: java.lang.String
Author's name.
authorOrganization
Optional
public java.lang.Boolean getAuthorOrganization();
- Type: java.lang.Boolean
Is the author an organization.
authorUrl
Optional
public java.lang.String getAuthorUrl();
- Type: java.lang.String
Author's URL / Website.
autoApproveOptions
Optional
public AutoApproveOptions getAutoApproveOptions();
- Type: io.github.cdklabs.projen.github.AutoApproveOptions
- Default: auto approve is disabled
Enable and configure the 'auto approve' workflow.
autoApproveUpgrades
Optional
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.
autoDetectBin
Optional
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.
autoMerge
Optional
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.
autoMergeOptions
Optional
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.
bin
Optional
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.
bugsEmail
Optional
public java.lang.String getBugsEmail();
- Type: java.lang.String
The email address to which issues should be reported.
bugsUrl
Optional
public java.lang.String getBugsUrl();
- Type: java.lang.String
The url to your project's issue tracker.
buildWorkflow
Optional
public java.lang.Boolean getBuildWorkflow();
- Type: java.lang.Boolean
- Default: true if not a subproject
Define a GitHub workflow for building PRs.
buildWorkflowOptions
Optional
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.
bundledDeps
Optional
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.
bundlerOptions
Optional
public BundlerOptions getBundlerOptions();
- Type: io.github.cdklabs.projen.javascript.BundlerOptions
Options for Bundler
.
checkLicenses
Optional
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.
clobber
Optional
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.
codeArtifactOptions
Optional
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
codeCov
Optional
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
.
codeCovTokenSecret
Optional
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.
commitGenerated
Optional
public java.lang.Boolean getCommitGenerated();
- Type: java.lang.Boolean
- Default: true
Whether to commit the managed files by default.
copyrightOwner
Optional
public java.lang.String getCopyrightOwner();
- Type: java.lang.String
- Default: defaults to the value of authorName or "" if
authorName
is undefined.
License copyright owner.
copyrightPeriod
Optional
public java.lang.String getCopyrightPeriod();
- Type: java.lang.String
- Default: current year
The copyright years to put in the LICENSE file.
defaultReleaseBranch
Optional
public java.lang.String getDefaultReleaseBranch();
- Type: java.lang.String
- Default: "main"
The name of the main release branch.
dependabot
Optional
public java.lang.Boolean getDependabot();
- Type: java.lang.Boolean
- Default: false
Use dependabot to handle dependency upgrades.
Cannot be used in conjunction with depsUpgrade
.
dependabotOptions
Optional
public DependabotOptions getDependabotOptions();
- Type: io.github.cdklabs.projen.github.DependabotOptions
- Default: default options
Options for dependabot.
deps
Optional
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.
depsUpgrade
Optional
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
.
depsUpgradeOptions
Optional
public UpgradeDependenciesOptions getDepsUpgradeOptions();
- Type: io.github.cdklabs.projen.javascript.UpgradeDependenciesOptions
- Default: default options
Options for UpgradeDependencies
.
description
Optional
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
devContainer
Optional
public java.lang.Boolean getDevContainer();
- Type: java.lang.Boolean
- Default: false
Add a VSCode development environment (used for GitHub Codespaces).
devDeps
Optional
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.
disableTsconfig
Optional
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).
disableTsconfigDev
Optional
public java.lang.Boolean getDisableTsconfigDev();
- Type: java.lang.Boolean
- Default: false
Do not generate a tsconfig.dev.json
file.
docgen
Optional
public java.lang.Boolean getDocgen();
- Type: java.lang.Boolean
- Default: false
Docgen by Typedoc.
docsDirectory
Optional
public java.lang.String getDocsDirectory();
- Type: java.lang.String
- Default: "docs"
Docs directory.
entrypoint
Optional
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.
entrypointTypes
Optional
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.
eslint
Optional
public java.lang.Boolean getEslint();
- Type: java.lang.Boolean
- Default: true
Setup eslint.
eslintOptions
Optional
public EslintOptions getEslintOptions();
- Type: io.github.cdklabs.projen.javascript.EslintOptions
- Default: opinionated default options
Eslint options.
github
Optional
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.
githubOptions
Optional
public GitHubOptions getGithubOptions();
- Type: io.github.cdklabs.projen.github.GitHubOptions
- Default: see GitHubOptions
Options for GitHub integration.
gitignore
Optional
public java.util.List<java.lang.String> getGitignore();
- Type: java.util.List
Additional entries to .gitignore.
gitIgnoreOptions
Optional
public IgnoreFileOptions getGitIgnoreOptions();
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptions
Optional
public GitOptions getGitOptions();
- Type: io.github.cdklabs.projen.GitOptions
Configuration options for git.
gitpod
Optional
public java.lang.Boolean getGitpod();
- Type: java.lang.Boolean
- Default: false
Add a Gitpod development environment.
homepage
Optional
public java.lang.String getHomepage();
- Type: java.lang.String
Package's Homepage / Website.
jest
Optional
public java.lang.Boolean getJest();
- Type: java.lang.Boolean
- Default: true
Setup jest unit tests.
jestOptions
Optional
public JestOptions getJestOptions();
- Type: io.github.cdklabs.projen.javascript.JestOptions
- Default: default options
Jest options.
jsiiReleaseVersion
Optional
public java.lang.String getJsiiReleaseVersion();
- Type: java.lang.String
- Default: "latest"
Version requirement of publib
which is used to publish modules to npm.
keywords
Optional
public java.util.List<java.lang.String> getKeywords();
- Type: java.util.List
Keywords to include in package.json
.
libdir
Optional
public java.lang.String getLibdir();
- Type: java.lang.String
- Default: "lib"
Typescript artifacts output directory.
license
Optional
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.
licensed
Optional
public java.lang.Boolean getLicensed();
- Type: java.lang.Boolean
- Default: true
Indicates if a license should be added.
logging
Optional
public LoggerOptions getLogging();
- Type: io.github.cdklabs.projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
majorVersion
Optional
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.
maxNodeVersion
Optional
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.mergify
instead
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.mergifyOptions
instead
public MergifyOptions getMergifyOptions();
- Type: io.github.cdklabs.projen.github.MergifyOptions
- Default: default options
Options for mergify.
minMajorVersion
Optional
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
.
minNodeVersion
Optional
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.
name
Optional
public java.lang.String getName();
- Type: java.lang.String
- Default: $BASEDIR
This is the name of your project.
npmAccess
Optional
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.
npmDistTag
Optional
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.
npmignoreEnabled
Optional
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.
npmIgnoreOptions
Optional
public IgnoreFileOptions getNpmIgnoreOptions();
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .npmignore file.
npmProvenance
Optional
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
npmRegistryUrl
instead
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
.
npmRegistryUrl
Optional
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://")
npmTokenSecret
Optional
public java.lang.String getNpmTokenSecret();
- Type: java.lang.String
- Default: "NPM_TOKEN"
GitHub secret which contains the NPM token to use when publishing packages.
outdir
Optional
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.
package
Optional
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
).
packageManager
Optional
public NodePackageManager getPackageManager();
- Type: io.github.cdklabs.projen.javascript.NodePackageManager
- Default: NodePackageManager.YARN_CLASSIC
The Node Package Manager used to execute scripts.
packageName
Optional
public java.lang.String getPackageName();
- Type: java.lang.String
- Default: defaults to project name
The "name" in package.json.
parent
Optional
public Project getParent();
- Type: io.github.cdklabs.projen.Project
The parent project, if this project is part of a bigger project.
peerDependencyOptions
Optional
public PeerDependencyOptions getPeerDependencyOptions();
- Type: io.github.cdklabs.projen.javascript.PeerDependencyOptions
Options for peerDeps
.
peerDeps
Optional
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.
pnpmVersion
Optional
public java.lang.String getPnpmVersion();
- Type: java.lang.String
- Default: "7"
The version of PNPM to use if using PNPM as a package manager.
postBuildSteps
Optional
public java.util.List<JobStep> getPostBuildSteps();
- Type: java.util.List
- Default: []
Steps to execute after build as part of the release workflow.
prerelease
Optional
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").
prettier
Optional
public java.lang.Boolean getPrettier();
- Type: java.lang.Boolean
- Default: false
Setup prettier.
prettierOptions
Optional
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).
projenCommand
Optional
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.
projenCredentials
Optional
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.
projenDevDependency
Optional
public java.lang.Boolean getProjenDevDependency();
- Type: java.lang.Boolean
- Default: true if not a subproject
Indicates of "projen" should be installed as a devDependency.
projenrcJs
Optional
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.
projenrcJson
Optional
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.
projenrcJsonOptions
Optional
public ProjenrcJsonOptions getProjenrcJsonOptions();
- Type: io.github.cdklabs.projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
projenrcJsOptions
Optional
public ProjenrcOptions getProjenrcJsOptions();
- Type: io.github.cdklabs.projen.javascript.ProjenrcOptions
- Default: default options
Options for .projenrc.js.
projenrcTs
Optional
public java.lang.Boolean getProjenrcTs();
- Type: java.lang.Boolean
- Default: false
Use TypeScript for your projenrc file (.projenrc.ts
).
projenrcTsOptions
Optional
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.
projenVersion
Optional
public java.lang.String getProjenVersion();
- Type: java.lang.String
- Default: Defaults to the latest version.
Version of projen to install.
publishDryRun
Optional
public java.lang.Boolean getPublishDryRun();
- Type: java.lang.Boolean
- Default: false
Instead of actually publishing to package managers, just print the publishing command.
publishTasks
Optional
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.
pullRequestTemplate
Optional
public java.lang.Boolean getPullRequestTemplate();
- Type: java.lang.Boolean
- Default: true
Include a GitHub pull request template.
pullRequestTemplateContents
Optional
public java.util.List<java.lang.String> getPullRequestTemplateContents();
- Type: java.util.List
- Default: default content
The contents of the pull request template.
readme
Optional
public SampleReadmeProps getReadme();
- Type: io.github.cdklabs.projen.SampleReadmeProps
- Default: { filename: 'README.md', contents: '# replace this' }
The README setup.
releasableCommits
Optional
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.
release
Optional
public java.lang.Boolean getRelease();
- Type: java.lang.Boolean
- Default: true (false for subprojects)
Add release management to this project.
releaseBranches
Optional
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
.
releaseFailureIssue
Optional
public java.lang.Boolean getReleaseFailureIssue();
- Type: java.lang.Boolean
- Default: false
Create a github issue on every failed publishing task.
releaseFailureIssueLabel
Optional
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.
releaseTagPrefix
Optional
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.
releaseToNpm
Optional
public java.lang.Boolean getReleaseToNpm();
- Type: java.lang.Boolean
- Default: false
Automatically release to npm when new versions are introduced.
releaseTrigger
Optional
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
.
releaseWorkflowName
Optional
public java.lang.String getReleaseWorkflowName();
- Type: java.lang.String
- Default: "release"
The name of the default release workflow.
releaseWorkflowSetupSteps
Optional
public java.util.List<JobStep> getReleaseWorkflowSetupSteps();
- Type: java.util.List
A set of workflow steps to execute in order to setup the workflow container.
renovatebot
Optional
public java.lang.Boolean getRenovatebot();
- Type: java.lang.Boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptions
Optional
public RenovatebotOptions getRenovatebotOptions();
- Type: io.github.cdklabs.projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
repository
Optional
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
repositoryDirectory
Optional
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.
sampleCode
Optional
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.
scopedPackagesOptions
Optional
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.
srcdir
Optional
public java.lang.String getSrcdir();
- Type: java.lang.String
- Default: "src"
Typescript sources directory.
stability
Optional
public java.lang.String getStability();
- Type: java.lang.String
Package's Stability.
stale
Optional
public java.lang.Boolean getStale();
- Type: java.lang.Boolean
- Default: false
Auto-close of stale issues and pull request.
See staleOptions
for options.
staleOptions
Optional
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
.
testdir
Optional
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.
tsconfig
Optional
public TypescriptConfigOptions getTsconfig();
- Type: io.github.cdklabs.projen.javascript.TypescriptConfigOptions
- Default: default options
Custom TSConfig.
tsconfigDev
Optional
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).
tsconfigDevFile
Optional
public java.lang.String getTsconfigDevFile();
- Type: java.lang.String
- Default: "tsconfig.dev.json"
The name of the development tsconfig.json file.
tsJestOptions
Optional
public TsJestOptions getTsJestOptions();
- Type: io.github.cdklabs.projen.typescript.TsJestOptions
Options for ts-jest.
typescriptVersion
Optional
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
).
versionrcOptions
Optional
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.
vscode
Optional
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.
workflowBootstrapSteps
Optional
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.
workflowContainerImage
Optional
public java.lang.String getWorkflowContainerImage();
- Type: java.lang.String
- Default: default image
Container image to use for GitHub workflows.
workflowGitIdentity
Optional
public GitIdentity getWorkflowGitIdentity();
- Type: io.github.cdklabs.projen.github.GitIdentity
- Default: GitHub Actions
The git identity to use in workflows.
workflowNodeVersion
Optional
public java.lang.String getWorkflowNodeVersion();
- Type: java.lang.String
- Default: same as
minNodeVersion
The node version to use in GitHub workflows.
workflowPackageCache
Optional
public java.lang.Boolean getWorkflowPackageCache();
- Type: java.lang.Boolean
- Default: false
Enable Node.js package cache in GitHub workflows.
workflowRunsOn
Optional
public java.util.List<java.lang.String> getWorkflowRunsOn();
- Type: java.util.List
- Default: ["ubuntu-latest"]
Github Runner selection labels.
workflowRunsOnGroup
Optional
public GroupRunnerOptions getWorkflowRunsOnGroup();
- Type: io.github.cdklabs.projen.GroupRunnerOptions
Github Runner Group selection options.
yarnBerryOptions
Optional
public YarnBerryOptions getYarnBerryOptions();
- Type: io.github.cdklabs.projen.javascript.YarnBerryOptions
- Default: Yarn Berry v4 with all default options
Options for Yarn Berry.
commitGeneratedCode
Optional
public java.lang.Boolean getCommitGeneratedCode();
- Type: java.lang.Boolean
- Default: false
Whether to commit the code generated by the OpenAPI Generator.
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. |
allowLibraryDependencies
Optional
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.
artifactsDirectory
Optional
public java.lang.String getArtifactsDirectory();
- Type: java.lang.String
- Default: "dist"
A directory which will contain build artifacts.
authorEmail
Optional
public java.lang.String getAuthorEmail();
- Type: java.lang.String
Author's e-mail.
authorName
Optional
public java.lang.String getAuthorName();
- Type: java.lang.String
Author's name.
authorOrganization
Optional
public java.lang.Boolean getAuthorOrganization();
- Type: java.lang.Boolean
Is the author an organization.
authorUrl
Optional
public java.lang.String getAuthorUrl();
- Type: java.lang.String
Author's URL / Website.
autoApproveOptions
Optional
public AutoApproveOptions getAutoApproveOptions();
- Type: io.github.cdklabs.projen.github.AutoApproveOptions
- Default: auto approve is disabled
Enable and configure the 'auto approve' workflow.
autoApproveUpgrades
Optional
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.
autoDetectBin
Optional
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.
autoMerge
Optional
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.
autoMergeOptions
Optional
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.
bin
Optional
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.
bugsEmail
Optional
public java.lang.String getBugsEmail();
- Type: java.lang.String
The email address to which issues should be reported.
bugsUrl
Optional
public java.lang.String getBugsUrl();
- Type: java.lang.String
The url to your project's issue tracker.
buildWorkflow
Optional
public java.lang.Boolean getBuildWorkflow();
- Type: java.lang.Boolean
- Default: true if not a subproject
Define a GitHub workflow for building PRs.
buildWorkflowOptions
Optional
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.
bundledDeps
Optional
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.
bundlerOptions
Optional
public BundlerOptions getBundlerOptions();
- Type: io.github.cdklabs.projen.javascript.BundlerOptions
Options for Bundler
.
checkLicenses
Optional
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.
clobber
Optional
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.
codeArtifactOptions
Optional
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
codeCov
Optional
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
.
codeCovTokenSecret
Optional
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.
commitGenerated
Optional
public java.lang.Boolean getCommitGenerated();
- Type: java.lang.Boolean
- Default: true
Whether to commit the managed files by default.
copyrightOwner
Optional
public java.lang.String getCopyrightOwner();
- Type: java.lang.String
- Default: defaults to the value of authorName or "" if
authorName
is undefined.
License copyright owner.
copyrightPeriod
Optional
public java.lang.String getCopyrightPeriod();
- Type: java.lang.String
- Default: current year
The copyright years to put in the LICENSE file.
defaultReleaseBranch
Optional
public java.lang.String getDefaultReleaseBranch();
- Type: java.lang.String
- Default: "main"
The name of the main release branch.
dependabot
Optional
public java.lang.Boolean getDependabot();
- Type: java.lang.Boolean
- Default: false
Use dependabot to handle dependency upgrades.
Cannot be used in conjunction with depsUpgrade
.
dependabotOptions
Optional
public DependabotOptions getDependabotOptions();
- Type: io.github.cdklabs.projen.github.DependabotOptions
- Default: default options
Options for dependabot.
deps
Optional
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.
depsUpgrade
Optional
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
.
depsUpgradeOptions
Optional
public UpgradeDependenciesOptions getDepsUpgradeOptions();
- Type: io.github.cdklabs.projen.javascript.UpgradeDependenciesOptions
- Default: default options
Options for UpgradeDependencies
.
description
Optional
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
devContainer
Optional
public java.lang.Boolean getDevContainer();
- Type: java.lang.Boolean
- Default: false
Add a VSCode development environment (used for GitHub Codespaces).
devDeps
Optional
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.
disableTsconfig
Optional
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).
disableTsconfigDev
Optional
public java.lang.Boolean getDisableTsconfigDev();
- Type: java.lang.Boolean
- Default: false
Do not generate a tsconfig.dev.json
file.
docgen
Optional
public java.lang.Boolean getDocgen();
- Type: java.lang.Boolean
- Default: false
Docgen by Typedoc.
docsDirectory
Optional
public java.lang.String getDocsDirectory();
- Type: java.lang.String
- Default: "docs"
Docs directory.
entrypoint
Optional
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.
entrypointTypes
Optional
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.
eslint
Optional
public java.lang.Boolean getEslint();
- Type: java.lang.Boolean
- Default: true
Setup eslint.
eslintOptions
Optional
public EslintOptions getEslintOptions();
- Type: io.github.cdklabs.projen.javascript.EslintOptions
- Default: opinionated default options
Eslint options.
github
Optional
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.
githubOptions
Optional
public GitHubOptions getGithubOptions();
- Type: io.github.cdklabs.projen.github.GitHubOptions
- Default: see GitHubOptions
Options for GitHub integration.
gitignore
Optional
public java.util.List<java.lang.String> getGitignore();
- Type: java.util.List
Additional entries to .gitignore.
gitIgnoreOptions
Optional
public IgnoreFileOptions getGitIgnoreOptions();
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptions
Optional
public GitOptions getGitOptions();
- Type: io.github.cdklabs.projen.GitOptions
Configuration options for git.
gitpod
Optional
public java.lang.Boolean getGitpod();
- Type: java.lang.Boolean
- Default: false
Add a Gitpod development environment.
homepage
Optional
public java.lang.String getHomepage();
- Type: java.lang.String
Package's Homepage / Website.
jest
Optional
public java.lang.Boolean getJest();
- Type: java.lang.Boolean
- Default: true
Setup jest unit tests.
jestOptions
Optional
public JestOptions getJestOptions();
- Type: io.github.cdklabs.projen.javascript.JestOptions
- Default: default options
Jest options.
jsiiReleaseVersion
Optional
public java.lang.String getJsiiReleaseVersion();
- Type: java.lang.String
- Default: "latest"
Version requirement of publib
which is used to publish modules to npm.
keywords
Optional
public java.util.List<java.lang.String> getKeywords();
- Type: java.util.List
Keywords to include in package.json
.
libdir
Optional
public java.lang.String getLibdir();
- Type: java.lang.String
- Default: "lib"
Typescript artifacts output directory.
license
Optional
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.
licensed
Optional
public java.lang.Boolean getLicensed();
- Type: java.lang.Boolean
- Default: true
Indicates if a license should be added.
logging
Optional
public LoggerOptions getLogging();
- Type: io.github.cdklabs.projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
majorVersion
Optional
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.
maxNodeVersion
Optional
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.mergify
instead
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.mergifyOptions
instead
public MergifyOptions getMergifyOptions();
- Type: io.github.cdklabs.projen.github.MergifyOptions
- Default: default options
Options for mergify.
minMajorVersion
Optional
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
.
minNodeVersion
Optional
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.
name
Optional
public java.lang.String getName();
- Type: java.lang.String
- Default: $BASEDIR
This is the name of your project.
npmAccess
Optional
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.
npmDistTag
Optional
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.
npmignoreEnabled
Optional
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.
npmIgnoreOptions
Optional
public IgnoreFileOptions getNpmIgnoreOptions();
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .npmignore file.
npmProvenance
Optional
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
npmRegistryUrl
instead
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
.
npmRegistryUrl
Optional
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://")
npmTokenSecret
Optional
public java.lang.String getNpmTokenSecret();
- Type: java.lang.String
- Default: "NPM_TOKEN"
GitHub secret which contains the NPM token to use when publishing packages.
outdir
Optional
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.
package
Optional
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
).
packageManager
Optional
public NodePackageManager getPackageManager();
- Type: io.github.cdklabs.projen.javascript.NodePackageManager
- Default: NodePackageManager.YARN_CLASSIC
The Node Package Manager used to execute scripts.
packageName
Optional
public java.lang.String getPackageName();
- Type: java.lang.String
- Default: defaults to project name
The "name" in package.json.
parent
Optional
public Project getParent();
- Type: io.github.cdklabs.projen.Project
The parent project, if this project is part of a bigger project.
peerDependencyOptions
Optional
public PeerDependencyOptions getPeerDependencyOptions();
- Type: io.github.cdklabs.projen.javascript.PeerDependencyOptions
Options for peerDeps
.
peerDeps
Optional
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.
pnpmVersion
Optional
public java.lang.String getPnpmVersion();
- Type: java.lang.String
- Default: "7"
The version of PNPM to use if using PNPM as a package manager.
postBuildSteps
Optional
public java.util.List<JobStep> getPostBuildSteps();
- Type: java.util.List
- Default: []
Steps to execute after build as part of the release workflow.
prerelease
Optional
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").
prettier
Optional
public java.lang.Boolean getPrettier();
- Type: java.lang.Boolean
- Default: false
Setup prettier.
prettierOptions
Optional
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).
projenCommand
Optional
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.
projenCredentials
Optional
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.
projenDevDependency
Optional
public java.lang.Boolean getProjenDevDependency();
- Type: java.lang.Boolean
- Default: true if not a subproject
Indicates of "projen" should be installed as a devDependency.
projenrcJs
Optional
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.
projenrcJson
Optional
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.
projenrcJsonOptions
Optional
public ProjenrcJsonOptions getProjenrcJsonOptions();
- Type: io.github.cdklabs.projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
projenrcJsOptions
Optional
public ProjenrcOptions getProjenrcJsOptions();
- Type: io.github.cdklabs.projen.javascript.ProjenrcOptions
- Default: default options
Options for .projenrc.js.
projenrcTs
Optional
public java.lang.Boolean getProjenrcTs();
- Type: java.lang.Boolean
- Default: false
Use TypeScript for your projenrc file (.projenrc.ts
).
projenrcTsOptions
Optional
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.
projenVersion
Optional
public java.lang.String getProjenVersion();
- Type: java.lang.String
- Default: Defaults to the latest version.
Version of projen to install.
publishDryRun
Optional
public java.lang.Boolean getPublishDryRun();
- Type: java.lang.Boolean
- Default: false
Instead of actually publishing to package managers, just print the publishing command.
publishTasks
Optional
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.
pullRequestTemplate
Optional
public java.lang.Boolean getPullRequestTemplate();
- Type: java.lang.Boolean
- Default: true
Include a GitHub pull request template.
pullRequestTemplateContents
Optional
public java.util.List<java.lang.String> getPullRequestTemplateContents();
- Type: java.util.List
- Default: default content
The contents of the pull request template.
readme
Optional
public SampleReadmeProps getReadme();
- Type: io.github.cdklabs.projen.SampleReadmeProps
- Default: { filename: 'README.md', contents: '# replace this' }
The README setup.
releasableCommits
Optional
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.
release
Optional
public java.lang.Boolean getRelease();
- Type: java.lang.Boolean
- Default: true (false for subprojects)
Add release management to this project.
releaseBranches
Optional
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
.
releaseFailureIssue
Optional
public java.lang.Boolean getReleaseFailureIssue();
- Type: java.lang.Boolean
- Default: false
Create a github issue on every failed publishing task.
releaseFailureIssueLabel
Optional
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.
releaseTagPrefix
Optional
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.
releaseToNpm
Optional
public java.lang.Boolean getReleaseToNpm();
- Type: java.lang.Boolean
- Default: false
Automatically release to npm when new versions are introduced.
releaseTrigger
Optional
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
.
releaseWorkflowName
Optional
public java.lang.String getReleaseWorkflowName();
- Type: java.lang.String
- Default: "release"
The name of the default release workflow.
releaseWorkflowSetupSteps
Optional
public java.util.List<JobStep> getReleaseWorkflowSetupSteps();
- Type: java.util.List
A set of workflow steps to execute in order to setup the workflow container.
renovatebot
Optional
public java.lang.Boolean getRenovatebot();
- Type: java.lang.Boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptions
Optional
public RenovatebotOptions getRenovatebotOptions();
- Type: io.github.cdklabs.projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
repository
Optional
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
repositoryDirectory
Optional
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.
sampleCode
Optional
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.
scopedPackagesOptions
Optional
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.
srcdir
Optional
public java.lang.String getSrcdir();
- Type: java.lang.String
- Default: "src"
Typescript sources directory.
stability
Optional
public java.lang.String getStability();
- Type: java.lang.String
Package's Stability.
stale
Optional
public java.lang.Boolean getStale();
- Type: java.lang.Boolean
- Default: false
Auto-close of stale issues and pull request.
See staleOptions
for options.
staleOptions
Optional
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
.
testdir
Optional
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.
tsconfig
Optional
public TypescriptConfigOptions getTsconfig();
- Type: io.github.cdklabs.projen.javascript.TypescriptConfigOptions
- Default: default options
Custom TSConfig.
tsconfigDev
Optional
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).
tsconfigDevFile
Optional
public java.lang.String getTsconfigDevFile();
- Type: java.lang.String
- Default: "tsconfig.dev.json"
The name of the development tsconfig.json file.
tsJestOptions
Optional
public TsJestOptions getTsJestOptions();
- Type: io.github.cdklabs.projen.typescript.TsJestOptions
Options for ts-jest.
typescriptVersion
Optional
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
).
versionrcOptions
Optional
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.
vscode
Optional
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.
workflowBootstrapSteps
Optional
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.
workflowContainerImage
Optional
public java.lang.String getWorkflowContainerImage();
- Type: java.lang.String
- Default: default image
Container image to use for GitHub workflows.
workflowGitIdentity
Optional
public GitIdentity getWorkflowGitIdentity();
- Type: io.github.cdklabs.projen.github.GitIdentity
- Default: GitHub Actions
The git identity to use in workflows.
workflowNodeVersion
Optional
public java.lang.String getWorkflowNodeVersion();
- Type: java.lang.String
- Default: same as
minNodeVersion
The node version to use in GitHub workflows.
workflowPackageCache
Optional
public java.lang.Boolean getWorkflowPackageCache();
- Type: java.lang.Boolean
- Default: false
Enable Node.js package cache in GitHub workflows.
workflowRunsOn
Optional
public java.util.List<java.lang.String> getWorkflowRunsOn();
- Type: java.util.List
- Default: ["ubuntu-latest"]
Github Runner selection labels.
workflowRunsOnGroup
Optional
public GroupRunnerOptions getWorkflowRunsOnGroup();
- Type: io.github.cdklabs.projen.GroupRunnerOptions
Github Runner Group selection options.
yarnBerryOptions
Optional
public YarnBerryOptions getYarnBerryOptions();
- Type: io.github.cdklabs.projen.javascript.YarnBerryOptions
- Default: Yarn Berry v4 with all default options
Options for Yarn Berry.
commitGeneratedCode
Optional
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. |
allowLibraryDependencies
Optional
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.
artifactsDirectory
Optional
public java.lang.String getArtifactsDirectory();
- Type: java.lang.String
- Default: "dist"
A directory which will contain build artifacts.
authorEmail
Optional
public java.lang.String getAuthorEmail();
- Type: java.lang.String
Author's e-mail.
authorName
Optional
public java.lang.String getAuthorName();
- Type: java.lang.String
Author's name.
authorOrganization
Optional
public java.lang.Boolean getAuthorOrganization();
- Type: java.lang.Boolean
Is the author an organization.
authorUrl
Optional
public java.lang.String getAuthorUrl();
- Type: java.lang.String
Author's URL / Website.
autoApproveOptions
Optional
public AutoApproveOptions getAutoApproveOptions();
- Type: io.github.cdklabs.projen.github.AutoApproveOptions
- Default: auto approve is disabled
Enable and configure the 'auto approve' workflow.
autoApproveUpgrades
Optional
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.
autoDetectBin
Optional
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.
autoMerge
Optional
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.
autoMergeOptions
Optional
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.
bin
Optional
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.
bugsEmail
Optional
public java.lang.String getBugsEmail();
- Type: java.lang.String
The email address to which issues should be reported.
bugsUrl
Optional
public java.lang.String getBugsUrl();
- Type: java.lang.String
The url to your project's issue tracker.
buildWorkflow
Optional
public java.lang.Boolean getBuildWorkflow();
- Type: java.lang.Boolean
- Default: true if not a subproject
Define a GitHub workflow for building PRs.
buildWorkflowOptions
Optional
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.
bundledDeps
Optional
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.
bundlerOptions
Optional
public BundlerOptions getBundlerOptions();
- Type: io.github.cdklabs.projen.javascript.BundlerOptions
Options for Bundler
.
checkLicenses
Optional
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.
clobber
Optional
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.
codeArtifactOptions
Optional
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
codeCov
Optional
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
.
codeCovTokenSecret
Optional
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.
commitGenerated
Optional
public java.lang.Boolean getCommitGenerated();
- Type: java.lang.Boolean
- Default: true
Whether to commit the managed files by default.
copyrightOwner
Optional
public java.lang.String getCopyrightOwner();
- Type: java.lang.String
- Default: defaults to the value of authorName or "" if
authorName
is undefined.
License copyright owner.
copyrightPeriod
Optional
public java.lang.String getCopyrightPeriod();
- Type: java.lang.String
- Default: current year
The copyright years to put in the LICENSE file.
defaultReleaseBranch
Optional
public java.lang.String getDefaultReleaseBranch();
- Type: java.lang.String
- Default: "main"
The name of the main release branch.
dependabot
Optional
public java.lang.Boolean getDependabot();
- Type: java.lang.Boolean
- Default: false
Use dependabot to handle dependency upgrades.
Cannot be used in conjunction with depsUpgrade
.
dependabotOptions
Optional
public DependabotOptions getDependabotOptions();
- Type: io.github.cdklabs.projen.github.DependabotOptions
- Default: default options
Options for dependabot.
deps
Optional
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.
depsUpgrade
Optional
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
.
depsUpgradeOptions
Optional
public UpgradeDependenciesOptions getDepsUpgradeOptions();
- Type: io.github.cdklabs.projen.javascript.UpgradeDependenciesOptions
- Default: default options
Options for UpgradeDependencies
.
description
Optional
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
devContainer
Optional
public java.lang.Boolean getDevContainer();
- Type: java.lang.Boolean
- Default: false
Add a VSCode development environment (used for GitHub Codespaces).
devDeps
Optional
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.
disableTsconfig
Optional
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).
disableTsconfigDev
Optional
public java.lang.Boolean getDisableTsconfigDev();
- Type: java.lang.Boolean
- Default: false
Do not generate a tsconfig.dev.json
file.
docgen
Optional
public java.lang.Boolean getDocgen();
- Type: java.lang.Boolean
- Default: false
Docgen by Typedoc.
docsDirectory
Optional
public java.lang.String getDocsDirectory();
- Type: java.lang.String
- Default: "docs"
Docs directory.
entrypoint
Optional
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.
entrypointTypes
Optional
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.
eslint
Optional
public java.lang.Boolean getEslint();
- Type: java.lang.Boolean
- Default: true
Setup eslint.
eslintOptions
Optional
public EslintOptions getEslintOptions();
- Type: io.github.cdklabs.projen.javascript.EslintOptions
- Default: opinionated default options
Eslint options.
github
Optional
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.
githubOptions
Optional
public GitHubOptions getGithubOptions();
- Type: io.github.cdklabs.projen.github.GitHubOptions
- Default: see GitHubOptions
Options for GitHub integration.
gitignore
Optional
public java.util.List<java.lang.String> getGitignore();
- Type: java.util.List
Additional entries to .gitignore.
gitIgnoreOptions
Optional
public IgnoreFileOptions getGitIgnoreOptions();
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptions
Optional
public GitOptions getGitOptions();
- Type: io.github.cdklabs.projen.GitOptions
Configuration options for git.
gitpod
Optional
public java.lang.Boolean getGitpod();
- Type: java.lang.Boolean
- Default: false
Add a Gitpod development environment.
homepage
Optional
public java.lang.String getHomepage();
- Type: java.lang.String
Package's Homepage / Website.
jest
Optional
public java.lang.Boolean getJest();
- Type: java.lang.Boolean
- Default: true
Setup jest unit tests.
jestOptions
Optional
public JestOptions getJestOptions();
- Type: io.github.cdklabs.projen.javascript.JestOptions
- Default: default options
Jest options.
jsiiReleaseVersion
Optional
public java.lang.String getJsiiReleaseVersion();
- Type: java.lang.String
- Default: "latest"
Version requirement of publib
which is used to publish modules to npm.
keywords
Optional
public java.util.List<java.lang.String> getKeywords();
- Type: java.util.List
Keywords to include in package.json
.
libdir
Optional
public java.lang.String getLibdir();
- Type: java.lang.String
- Default: "lib"
Typescript artifacts output directory.
license
Optional
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.
licensed
Optional
public java.lang.Boolean getLicensed();
- Type: java.lang.Boolean
- Default: true
Indicates if a license should be added.
logging
Optional
public LoggerOptions getLogging();
- Type: io.github.cdklabs.projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
majorVersion
Optional
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.
maxNodeVersion
Optional
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.mergify
instead
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.mergifyOptions
instead
public MergifyOptions getMergifyOptions();
- Type: io.github.cdklabs.projen.github.MergifyOptions
- Default: default options
Options for mergify.
minMajorVersion
Optional
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
.
minNodeVersion
Optional
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.
name
Optional
public java.lang.String getName();
- Type: java.lang.String
- Default: $BASEDIR
This is the name of your project.
npmAccess
Optional
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.
npmDistTag
Optional
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.
npmignoreEnabled
Optional
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.
npmIgnoreOptions
Optional
public IgnoreFileOptions getNpmIgnoreOptions();
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .npmignore file.
npmProvenance
Optional
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
npmRegistryUrl
instead
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
.
npmRegistryUrl
Optional
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://")
npmTokenSecret
Optional
public java.lang.String getNpmTokenSecret();
- Type: java.lang.String
- Default: "NPM_TOKEN"
GitHub secret which contains the NPM token to use when publishing packages.
outdir
Optional
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.
package
Optional
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
).
packageManager
Optional
public NodePackageManager getPackageManager();
- Type: io.github.cdklabs.projen.javascript.NodePackageManager
- Default: NodePackageManager.YARN_CLASSIC
The Node Package Manager used to execute scripts.
packageName
Optional
public java.lang.String getPackageName();
- Type: java.lang.String
- Default: defaults to project name
The "name" in package.json.
parent
Optional
public Project getParent();
- Type: io.github.cdklabs.projen.Project
The parent project, if this project is part of a bigger project.
peerDependencyOptions
Optional
public PeerDependencyOptions getPeerDependencyOptions();
- Type: io.github.cdklabs.projen.javascript.PeerDependencyOptions
Options for peerDeps
.
peerDeps
Optional
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.
pnpmVersion
Optional
public java.lang.String getPnpmVersion();
- Type: java.lang.String
- Default: "7"
The version of PNPM to use if using PNPM as a package manager.
postBuildSteps
Optional
public java.util.List<JobStep> getPostBuildSteps();
- Type: java.util.List
- Default: []
Steps to execute after build as part of the release workflow.
prerelease
Optional
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").
prettier
Optional
public java.lang.Boolean getPrettier();
- Type: java.lang.Boolean
- Default: false
Setup prettier.
prettierOptions
Optional
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).
projenCommand
Optional
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.
projenCredentials
Optional
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.
projenDevDependency
Optional
public java.lang.Boolean getProjenDevDependency();
- Type: java.lang.Boolean
- Default: true if not a subproject
Indicates of "projen" should be installed as a devDependency.
projenrcJs
Optional
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.
projenrcJson
Optional
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.
projenrcJsonOptions
Optional
public ProjenrcJsonOptions getProjenrcJsonOptions();
- Type: io.github.cdklabs.projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
projenrcJsOptions
Optional
public ProjenrcOptions getProjenrcJsOptions();
- Type: io.github.cdklabs.projen.javascript.ProjenrcOptions
- Default: default options
Options for .projenrc.js.
projenrcTs
Optional
public java.lang.Boolean getProjenrcTs();
- Type: java.lang.Boolean
- Default: false
Use TypeScript for your projenrc file (.projenrc.ts
).
projenrcTsOptions
Optional
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.
projenVersion
Optional
public java.lang.String getProjenVersion();
- Type: java.lang.String
- Default: Defaults to the latest version.
Version of projen to install.
publishDryRun
Optional
public java.lang.Boolean getPublishDryRun();
- Type: java.lang.Boolean
- Default: false
Instead of actually publishing to package managers, just print the publishing command.
publishTasks
Optional
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.
pullRequestTemplate
Optional
public java.lang.Boolean getPullRequestTemplate();
- Type: java.lang.Boolean
- Default: true
Include a GitHub pull request template.
pullRequestTemplateContents
Optional
public java.util.List<java.lang.String> getPullRequestTemplateContents();
- Type: java.util.List
- Default: default content
The contents of the pull request template.
readme
Optional
public SampleReadmeProps getReadme();
- Type: io.github.cdklabs.projen.SampleReadmeProps
- Default: { filename: 'README.md', contents: '# replace this' }
The README setup.
releasableCommits
Optional
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.
release
Optional
public java.lang.Boolean getRelease();
- Type: java.lang.Boolean
- Default: true (false for subprojects)
Add release management to this project.
releaseBranches
Optional
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
.
releaseFailureIssue
Optional
public java.lang.Boolean getReleaseFailureIssue();
- Type: java.lang.Boolean
- Default: false
Create a github issue on every failed publishing task.
releaseFailureIssueLabel
Optional
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.
releaseTagPrefix
Optional
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.
releaseToNpm
Optional
public java.lang.Boolean getReleaseToNpm();
- Type: java.lang.Boolean
- Default: false
Automatically release to npm when new versions are introduced.
releaseTrigger
Optional
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
.
releaseWorkflowName
Optional
public java.lang.String getReleaseWorkflowName();
- Type: java.lang.String
- Default: "release"
The name of the default release workflow.
releaseWorkflowSetupSteps
Optional
public java.util.List<JobStep> getReleaseWorkflowSetupSteps();
- Type: java.util.List
A set of workflow steps to execute in order to setup the workflow container.
renovatebot
Optional
public java.lang.Boolean getRenovatebot();
- Type: java.lang.Boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptions
Optional
public RenovatebotOptions getRenovatebotOptions();
- Type: io.github.cdklabs.projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
repository
Optional
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
repositoryDirectory
Optional
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.
sampleCode
Optional
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.
scopedPackagesOptions
Optional
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.
srcdir
Optional
public java.lang.String getSrcdir();
- Type: java.lang.String
- Default: "src"
Typescript sources directory.
stability
Optional
public java.lang.String getStability();
- Type: java.lang.String
Package's Stability.
stale
Optional
public java.lang.Boolean getStale();
- Type: java.lang.Boolean
- Default: false
Auto-close of stale issues and pull request.
See staleOptions
for options.
staleOptions
Optional
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
.
testdir
Optional
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.
tsconfig
Optional
public TypescriptConfigOptions getTsconfig();
- Type: io.github.cdklabs.projen.javascript.TypescriptConfigOptions
- Default: default options
Custom TSConfig.
tsconfigDev
Optional
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).
tsconfigDevFile
Optional
public java.lang.String getTsconfigDevFile();
- Type: java.lang.String
- Default: "tsconfig.dev.json"
The name of the development tsconfig.json file.
tsJestOptions
Optional
public TsJestOptions getTsJestOptions();
- Type: io.github.cdklabs.projen.typescript.TsJestOptions
Options for ts-jest.
typescriptVersion
Optional
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
).
versionrcOptions
Optional
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.
vscode
Optional
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.
workflowBootstrapSteps
Optional
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.
workflowContainerImage
Optional
public java.lang.String getWorkflowContainerImage();
- Type: java.lang.String
- Default: default image
Container image to use for GitHub workflows.
workflowGitIdentity
Optional
public GitIdentity getWorkflowGitIdentity();
- Type: io.github.cdklabs.projen.github.GitIdentity
- Default: GitHub Actions
The git identity to use in workflows.
workflowNodeVersion
Optional
public java.lang.String getWorkflowNodeVersion();
- Type: java.lang.String
- Default: same as
minNodeVersion
The node version to use in GitHub workflows.
workflowPackageCache
Optional
public java.lang.Boolean getWorkflowPackageCache();
- Type: java.lang.Boolean
- Default: false
Enable Node.js package cache in GitHub workflows.
workflowRunsOn
Optional
public java.util.List<java.lang.String> getWorkflowRunsOn();
- Type: java.util.List
- Default: ["ubuntu-latest"]
Github Runner selection labels.
workflowRunsOnGroup
Optional
public GroupRunnerOptions getWorkflowRunsOnGroup();
- Type: io.github.cdklabs.projen.GroupRunnerOptions
Github Runner Group selection options.
yarnBerryOptions
Optional
public YarnBerryOptions getYarnBerryOptions();
- Type: io.github.cdklabs.projen.javascript.YarnBerryOptions
- Default: Yarn Berry v4 with all default options
Options for Yarn Berry.
commitGeneratedCode
Optional
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. |
allowLibraryDependencies
Optional
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.
artifactsDirectory
Optional
public java.lang.String getArtifactsDirectory();
- Type: java.lang.String
- Default: "dist"
A directory which will contain build artifacts.
authorEmail
Optional
public java.lang.String getAuthorEmail();
- Type: java.lang.String
Author's e-mail.
authorName
Optional
public java.lang.String getAuthorName();
- Type: java.lang.String
Author's name.
authorOrganization
Optional
public java.lang.Boolean getAuthorOrganization();
- Type: java.lang.Boolean
Is the author an organization.
authorUrl
Optional
public java.lang.String getAuthorUrl();
- Type: java.lang.String
Author's URL / Website.
autoApproveOptions
Optional
public AutoApproveOptions getAutoApproveOptions();
- Type: io.github.cdklabs.projen.github.AutoApproveOptions
- Default: auto approve is disabled
Enable and configure the 'auto approve' workflow.
autoApproveUpgrades
Optional
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.
autoDetectBin
Optional
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.
autoMerge
Optional
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.
autoMergeOptions
Optional
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.
bin
Optional
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.
bugsEmail
Optional
public java.lang.String getBugsEmail();
- Type: java.lang.String
The email address to which issues should be reported.
bugsUrl
Optional
public java.lang.String getBugsUrl();
- Type: java.lang.String
The url to your project's issue tracker.
buildWorkflow
Optional
public java.lang.Boolean getBuildWorkflow();
- Type: java.lang.Boolean
- Default: true if not a subproject
Define a GitHub workflow for building PRs.
buildWorkflowOptions
Optional
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.
bundledDeps
Optional
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.
bundlerOptions
Optional
public BundlerOptions getBundlerOptions();
- Type: io.github.cdklabs.projen.javascript.BundlerOptions
Options for Bundler
.
checkLicenses
Optional
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.
clobber
Optional
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.
codeArtifactOptions
Optional
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
codeCov
Optional
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
.
codeCovTokenSecret
Optional
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.
commitGenerated
Optional
public java.lang.Boolean getCommitGenerated();
- Type: java.lang.Boolean
- Default: true
Whether to commit the managed files by default.
copyrightOwner
Optional
public java.lang.String getCopyrightOwner();
- Type: java.lang.String
- Default: defaults to the value of authorName or "" if
authorName
is undefined.
License copyright owner.
copyrightPeriod
Optional
public java.lang.String getCopyrightPeriod();
- Type: java.lang.String
- Default: current year
The copyright years to put in the LICENSE file.
defaultReleaseBranch
Optional
public java.lang.String getDefaultReleaseBranch();
- Type: java.lang.String
- Default: "main"
The name of the main release branch.
dependabot
Optional
public java.lang.Boolean getDependabot();
- Type: java.lang.Boolean
- Default: false
Use dependabot to handle dependency upgrades.
Cannot be used in conjunction with depsUpgrade
.
dependabotOptions
Optional
public DependabotOptions getDependabotOptions();
- Type: io.github.cdklabs.projen.github.DependabotOptions
- Default: default options
Options for dependabot.
deps
Optional
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.
depsUpgrade
Optional
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
.
depsUpgradeOptions
Optional
public UpgradeDependenciesOptions getDepsUpgradeOptions();
- Type: io.github.cdklabs.projen.javascript.UpgradeDependenciesOptions
- Default: default options
Options for UpgradeDependencies
.
description
Optional
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
devContainer
Optional
public java.lang.Boolean getDevContainer();
- Type: java.lang.Boolean
- Default: false
Add a VSCode development environment (used for GitHub Codespaces).
devDeps
Optional
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.
disableTsconfig
Optional
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).
disableTsconfigDev
Optional
public java.lang.Boolean getDisableTsconfigDev();
- Type: java.lang.Boolean
- Default: false
Do not generate a tsconfig.dev.json
file.
docgen
Optional
public java.lang.Boolean getDocgen();
- Type: java.lang.Boolean
- Default: false
Docgen by Typedoc.
docsDirectory
Optional
public java.lang.String getDocsDirectory();
- Type: java.lang.String
- Default: "docs"
Docs directory.
entrypoint
Optional
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.
entrypointTypes
Optional
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.
eslint
Optional
public java.lang.Boolean getEslint();
- Type: java.lang.Boolean
- Default: true
Setup eslint.
eslintOptions
Optional
public EslintOptions getEslintOptions();
- Type: io.github.cdklabs.projen.javascript.EslintOptions
- Default: opinionated default options
Eslint options.
github
Optional
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.
githubOptions
Optional
public GitHubOptions getGithubOptions();
- Type: io.github.cdklabs.projen.github.GitHubOptions
- Default: see GitHubOptions
Options for GitHub integration.
gitignore
Optional
public java.util.List<java.lang.String> getGitignore();
- Type: java.util.List
Additional entries to .gitignore.
gitIgnoreOptions
Optional
public IgnoreFileOptions getGitIgnoreOptions();
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptions
Optional
public GitOptions getGitOptions();
- Type: io.github.cdklabs.projen.GitOptions
Configuration options for git.
gitpod
Optional
public java.lang.Boolean getGitpod();
- Type: java.lang.Boolean
- Default: false
Add a Gitpod development environment.
homepage
Optional
public java.lang.String getHomepage();
- Type: java.lang.String
Package's Homepage / Website.
jest
Optional
public java.lang.Boolean getJest();
- Type: java.lang.Boolean
- Default: true
Setup jest unit tests.
jestOptions
Optional
public JestOptions getJestOptions();
- Type: io.github.cdklabs.projen.javascript.JestOptions
- Default: default options
Jest options.
jsiiReleaseVersion
Optional
public java.lang.String getJsiiReleaseVersion();
- Type: java.lang.String
- Default: "latest"
Version requirement of publib
which is used to publish modules to npm.
keywords
Optional
public java.util.List<java.lang.String> getKeywords();
- Type: java.util.List
Keywords to include in package.json
.
libdir
Optional
public java.lang.String getLibdir();
- Type: java.lang.String
- Default: "lib"
Typescript artifacts output directory.
license
Optional
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.
licensed
Optional
public java.lang.Boolean getLicensed();
- Type: java.lang.Boolean
- Default: true
Indicates if a license should be added.
logging
Optional
public LoggerOptions getLogging();
- Type: io.github.cdklabs.projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
majorVersion
Optional
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.
maxNodeVersion
Optional
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.mergify
instead
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.mergifyOptions
instead
public MergifyOptions getMergifyOptions();
- Type: io.github.cdklabs.projen.github.MergifyOptions
- Default: default options
Options for mergify.
minMajorVersion
Optional
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
.
minNodeVersion
Optional
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.
name
Optional
public java.lang.String getName();
- Type: java.lang.String
- Default: $BASEDIR
This is the name of your project.
npmAccess
Optional
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.
npmDistTag
Optional
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.
npmignoreEnabled
Optional
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.
npmIgnoreOptions
Optional
public IgnoreFileOptions getNpmIgnoreOptions();
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .npmignore file.
npmProvenance
Optional
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
npmRegistryUrl
instead
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
.
npmRegistryUrl
Optional
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://")
npmTokenSecret
Optional
public java.lang.String getNpmTokenSecret();
- Type: java.lang.String
- Default: "NPM_TOKEN"
GitHub secret which contains the NPM token to use when publishing packages.
outdir
Optional
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.
package
Optional
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
).
packageManager
Optional
public NodePackageManager getPackageManager();
- Type: io.github.cdklabs.projen.javascript.NodePackageManager
- Default: NodePackageManager.YARN_CLASSIC
The Node Package Manager used to execute scripts.
packageName
Optional
public java.lang.String getPackageName();
- Type: java.lang.String
- Default: defaults to project name
The "name" in package.json.
parent
Optional
public Project getParent();
- Type: io.github.cdklabs.projen.Project
The parent project, if this project is part of a bigger project.
peerDependencyOptions
Optional
public PeerDependencyOptions getPeerDependencyOptions();
- Type: io.github.cdklabs.projen.javascript.PeerDependencyOptions
Options for peerDeps
.
peerDeps
Optional
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.
pnpmVersion
Optional
public java.lang.String getPnpmVersion();
- Type: java.lang.String
- Default: "7"
The version of PNPM to use if using PNPM as a package manager.
postBuildSteps
Optional
public java.util.List<JobStep> getPostBuildSteps();
- Type: java.util.List
- Default: []
Steps to execute after build as part of the release workflow.
prerelease
Optional
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").
prettier
Optional
public java.lang.Boolean getPrettier();
- Type: java.lang.Boolean
- Default: false
Setup prettier.
prettierOptions
Optional
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).
projenCommand
Optional
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.
projenCredentials
Optional
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.
projenDevDependency
Optional
public java.lang.Boolean getProjenDevDependency();
- Type: java.lang.Boolean
- Default: true if not a subproject
Indicates of "projen" should be installed as a devDependency.
projenrcJs
Optional
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.
projenrcJson
Optional
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.
projenrcJsonOptions
Optional
public ProjenrcJsonOptions getProjenrcJsonOptions();
- Type: io.github.cdklabs.projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
projenrcJsOptions
Optional
public ProjenrcOptions getProjenrcJsOptions();
- Type: io.github.cdklabs.projen.javascript.ProjenrcOptions
- Default: default options
Options for .projenrc.js.
projenrcTs
Optional
public java.lang.Boolean getProjenrcTs();
- Type: java.lang.Boolean
- Default: false
Use TypeScript for your projenrc file (.projenrc.ts
).
projenrcTsOptions
Optional
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.
projenVersion
Optional
public java.lang.String getProjenVersion();
- Type: java.lang.String
- Default: Defaults to the latest version.
Version of projen to install.
publishDryRun
Optional
public java.lang.Boolean getPublishDryRun();
- Type: java.lang.Boolean
- Default: false
Instead of actually publishing to package managers, just print the publishing command.
publishTasks
Optional
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.
pullRequestTemplate
Optional
public java.lang.Boolean getPullRequestTemplate();
- Type: java.lang.Boolean
- Default: true
Include a GitHub pull request template.
pullRequestTemplateContents
Optional
public java.util.List<java.lang.String> getPullRequestTemplateContents();
- Type: java.util.List
- Default: default content
The contents of the pull request template.
readme
Optional
public SampleReadmeProps getReadme();
- Type: io.github.cdklabs.projen.SampleReadmeProps
- Default: { filename: 'README.md', contents: '# replace this' }
The README setup.
releasableCommits
Optional
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.
release
Optional
public java.lang.Boolean getRelease();
- Type: java.lang.Boolean
- Default: true (false for subprojects)
Add release management to this project.
releaseBranches
Optional
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
.
releaseFailureIssue
Optional
public java.lang.Boolean getReleaseFailureIssue();
- Type: java.lang.Boolean
- Default: false
Create a github issue on every failed publishing task.
releaseFailureIssueLabel
Optional
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.
releaseTagPrefix
Optional
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.
releaseToNpm
Optional
public java.lang.Boolean getReleaseToNpm();
- Type: java.lang.Boolean
- Default: false
Automatically release to npm when new versions are introduced.
releaseTrigger
Optional
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
.
releaseWorkflowName
Optional
public java.lang.String getReleaseWorkflowName();
- Type: java.lang.String
- Default: "release"
The name of the default release workflow.
releaseWorkflowSetupSteps
Optional
public java.util.List<JobStep> getReleaseWorkflowSetupSteps();
- Type: java.util.List
A set of workflow steps to execute in order to setup the workflow container.
renovatebot
Optional
public java.lang.Boolean getRenovatebot();
- Type: java.lang.Boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptions
Optional
public RenovatebotOptions getRenovatebotOptions();
- Type: io.github.cdklabs.projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
repository
Optional
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
repositoryDirectory
Optional
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.
sampleCode
Optional
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.
scopedPackagesOptions
Optional
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.
srcdir
Optional
public java.lang.String getSrcdir();
- Type: java.lang.String
- Default: "src"
Typescript sources directory.
stability
Optional
public java.lang.String getStability();
- Type: java.lang.String
Package's Stability.
stale
Optional
public java.lang.Boolean getStale();
- Type: java.lang.Boolean
- Default: false
Auto-close of stale issues and pull request.
See staleOptions
for options.
staleOptions
Optional
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
.
testdir
Optional
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.
tsconfig
Optional
public TypescriptConfigOptions getTsconfig();
- Type: io.github.cdklabs.projen.javascript.TypescriptConfigOptions
- Default: default options
Custom TSConfig.
tsconfigDev
Optional
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).
tsconfigDevFile
Optional
public java.lang.String getTsconfigDevFile();
- Type: java.lang.String
- Default: "tsconfig.dev.json"
The name of the development tsconfig.json file.
tsJestOptions
Optional
public TsJestOptions getTsJestOptions();
- Type: io.github.cdklabs.projen.typescript.TsJestOptions
Options for ts-jest.
typescriptVersion
Optional
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
).
versionrcOptions
Optional
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.
vscode
Optional
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.
workflowBootstrapSteps
Optional
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.
workflowContainerImage
Optional
public java.lang.String getWorkflowContainerImage();
- Type: java.lang.String
- Default: default image
Container image to use for GitHub workflows.
workflowGitIdentity
Optional
public GitIdentity getWorkflowGitIdentity();
- Type: io.github.cdklabs.projen.github.GitIdentity
- Default: GitHub Actions
The git identity to use in workflows.
workflowNodeVersion
Optional
public java.lang.String getWorkflowNodeVersion();
- Type: java.lang.String
- Default: same as
minNodeVersion
The node version to use in GitHub workflows.
workflowPackageCache
Optional
public java.lang.Boolean getWorkflowPackageCache();
- Type: java.lang.Boolean
- Default: false
Enable Node.js package cache in GitHub workflows.
workflowRunsOn
Optional
public java.util.List<java.lang.String> getWorkflowRunsOn();
- Type: java.util.List
- Default: ["ubuntu-latest"]
Github Runner selection labels.
workflowRunsOnGroup
Optional
public GroupRunnerOptions getWorkflowRunsOnGroup();
- Type: io.github.cdklabs.projen.GroupRunnerOptions
Github Runner Group selection options.
yarnBerryOptions
Optional
public YarnBerryOptions getYarnBerryOptions();
- Type: io.github.cdklabs.projen.javascript.YarnBerryOptions
- Default: Yarn Berry v4 with all default options
Options for Yarn Berry.
commitGeneratedCode
Optional
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. |
html
Optional
public GeneratedAsyncApiHtmlDocumentationOptions getHtml();
Generated AsyncAPI html documentation project options.
markdown
Optional
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. |
html
Optional
public Project getHtml();
- Type: io.github.cdklabs.projen.Project
Generated AsyncAPI html documentation project.
markdown
Optional
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. |
typescriptWebSocketClient
Optional
public GeneratedTypeScriptWebSocketClientOptions getTypescriptWebSocketClient();
Options for the generated typescript websocket client library.
These override the default inferred options.
typescriptWebSocketHooks
Optional
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. |
typescriptWebSocketClient
Optional
public TypeScriptProject getTypescriptWebSocketClient();
- Type: io.github.cdklabs.projen.typescript.TypeScriptProject
Generated typescript websocket client project.
typescriptWebSocketHooks
Optional
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. |
languages
Required
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.
options
Optional
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. |
language
Required
public Language getLanguage();
- Type: Language
The language to generate the type-safe CDK infrastructure in.
options
Optional
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. |
method
Required
public java.lang.String getMethod();
- Type: java.lang.String
The http method of this operation.
path
Required
public java.lang.String getPath();
- Type: java.lang.String
The path of this operation in the api.
contentTypes
Optional
public java.util.List<java.lang.String> getContentTypes();
- Type: java.util.List
- Default: application/json
Content types accepted by this operation.
api
Required
public SpecRestApi getApi();
- Type: software.amazon.awscdk.services.apigateway.SpecRestApi
The api to grant permissions for.
operationId
Required
public java.lang.String getOperationId();
- Type: java.lang.String
The ID of the operation for which permissions are being granted.
operationLookup
Required
public java.util.Map<java.lang.String, OperationDetails> getOperationLookup();
- Type: java.util.Map
OperationDetails\>
Details about all operations in the API.
scope
Required
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. |
method
Required
public java.lang.String getMethod();
- Type: java.lang.String
The http method of this operation.
path
Required
public java.lang.String getPath();
- Type: java.lang.String
The path of this operation in the api.
contentTypes
Optional
public java.util.List<java.lang.String> getContentTypes();
- Type: java.util.List
- Default: application/json
Content types accepted by this operation.
operationId
Required
public java.lang.String getOperationId();
- Type: java.lang.String
The ID of the operation being rendered.
operationLookup
Required
public java.util.Map<java.lang.String, OperationDetails> getOperationLookup();
- Type: java.util.Map
OperationDetails\>
Details about all operations in the API.
scope
Required
public Construct getScope();
- Type: software.constructs.Construct
The scope in which the integration is being rendered.
corsOptions
Optional
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. |
artifactId
Optional
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.
autoApproveOptions
Optional
public AutoApproveOptions getAutoApproveOptions();
- Type: io.github.cdklabs.projen.github.AutoApproveOptions
- Default: auto approve is disabled
Enable and configure the 'auto approve' workflow.
autoMerge
Optional
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.
autoMergeOptions
Optional
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.
clobber
Optional
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.
commitGenerated
Optional
public java.lang.Boolean getCommitGenerated();
- Type: java.lang.Boolean
- Default: true
Whether to commit the managed files by default.
compileOptions
Optional
public MavenCompileOptions getCompileOptions();
- Type: io.github.cdklabs.projen.java.MavenCompileOptions
- Default: defaults
Compile options.
deps
Optional
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()
.
description
Optional
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.
devContainer
Optional
public java.lang.Boolean getDevContainer();
- Type: java.lang.Boolean
- Default: false
Add a VSCode development environment (used for GitHub Codespaces).
distdir
Optional
public java.lang.String getDistdir();
- Type: java.lang.String
- Default: "dist/java"
Final artifact output directory.
github
Optional
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.
githubOptions
Optional
public GitHubOptions getGithubOptions();
- Type: io.github.cdklabs.projen.github.GitHubOptions
- Default: see GitHubOptions
Options for GitHub integration.
gitIgnoreOptions
Optional
public IgnoreFileOptions getGitIgnoreOptions();
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptions
Optional
public GitOptions getGitOptions();
- Type: io.github.cdklabs.projen.GitOptions
Configuration options for git.
gitpod
Optional
public java.lang.Boolean getGitpod();
- Type: java.lang.Boolean
- Default: false
Add a Gitpod development environment.
groupId
Optional
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.
junit
Optional
public java.lang.Boolean getJunit();
- Type: java.lang.Boolean
- Default: true
Include junit tests.
junitOptions
Optional
public JunitOptions getJunitOptions();
- Type: io.github.cdklabs.projen.java.JunitOptions
- Default: defaults
junit options.
logging
Optional
public LoggerOptions getLogging();
- Type: io.github.cdklabs.projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
~~mergify
~~Optional
- Deprecated: use
githubOptions.mergify
instead
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.mergifyOptions
instead
public MergifyOptions getMergifyOptions();
- Type: io.github.cdklabs.projen.github.MergifyOptions
- Default: default options
Options for mergify.
name
Optional
public java.lang.String getName();
- Type: java.lang.String
- Default: $BASEDIR
This is the name of your project.
outdir
Optional
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.
packaging
Optional
public java.lang.String getPackaging();
- Type: java.lang.String
- Default: "jar"
Project packaging format.
packagingOptions
Optional
public MavenPackagingOptions getPackagingOptions();
- Type: io.github.cdklabs.projen.java.MavenPackagingOptions
- Default: defaults
Packaging options.
parent
Optional
public Project getParent();
- Type: io.github.cdklabs.projen.Project
The parent project, if this project is part of a bigger project.
parentPom
Optional
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).
projenCommand
Optional
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.
projenCredentials
Optional
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.
projenrcJava
Optional
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
.
projenrcJavaOptions
Optional
public ProjenrcOptions getProjenrcJavaOptions();
- Type: io.github.cdklabs.projen.java.ProjenrcOptions
- Default: default options
Options related to projenrc in java.
projenrcJson
Optional
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.
projenrcJsonOptions
Optional
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.
readme
Optional
public SampleReadmeProps getReadme();
- Type: io.github.cdklabs.projen.SampleReadmeProps
- Default: { filename: 'README.md', contents: '# replace this' }
The README setup.
renovatebot
Optional
public java.lang.Boolean getRenovatebot();
- Type: java.lang.Boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptions
Optional
public RenovatebotOptions getRenovatebotOptions();
- Type: io.github.cdklabs.projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
sample
Optional
public java.lang.Boolean getSample();
- Type: java.lang.Boolean
- Default: true
Include sample code and test if the relevant directories don't exist.
sampleJavaPackage
Optional
public java.lang.String getSampleJavaPackage();
- Type: java.lang.String
- Default: "org.acme"
The java package to use for the code sample.
stale
Optional
public java.lang.Boolean getStale();
- Type: java.lang.Boolean
- Default: false
Auto-close of stale issues and pull request.
See staleOptions
for options.
staleOptions
Optional
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
.
testDeps
Optional
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()
.
url
Optional
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.
version
Optional
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.
vscode
Optional
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. |
libraries
Required
public java.util.List<Library> getLibraries();
- Type: java.util.List<Library>
The library to generate.
options
Optional
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. |
name
Required
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.
excludedRules
Optional
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
.
managedRuleGroupConfigs
Optional
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
AWSManagedRulesACFPRuleSet
configuration 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
AWSManagedRulesATPRuleSet
configuration 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
AWSManagedRulesBotControlRuleSet
configuration object to configure the protection level that you want the Bot Control rule group to use.
ruleActionOverrides
Optional
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.
scopeDownStatement
Optional
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.
version
Optional
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
vendorName
property 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.
vendorName
Optional
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. |
method
Required
public java.lang.String getMethod();
- Type: java.lang.String
The http method of this operation.
path
Required
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. |
statusCode
Required
public java.lang.Number getStatusCode();
- Type: java.lang.Number
HTTP response status code.
body
Optional
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. |
disable
Optional
public java.lang.Boolean getDisable();
- Type: java.lang.Boolean
- Default: false
Set to true to disable generating mock data.
locale
Optional
public java.lang.String getLocale();
- Type: java.lang.String
- Default: en
Locale of generated data.
https://fakerjs.dev/guide/localization.html#available-locales
maxArrayLength
Optional
public java.lang.Number getMaxArrayLength();
- Type: java.lang.Number
- Default: 3
Maximum length of generated arrays.
seed
Optional
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. |
mockDataOptions
Optional
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. |
language
Required
public ModelLanguage getLanguage();
- Type: ModelLanguage
The language the API model is defined in.
options
Required
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. |
openapi
Optional
public OpenApiModelOptions getOpenapi();
- Type: OpenApiModelOptions
Options for the OpenAPI model - required when model language is OPENAPI.
smithy
Optional
public SmithyModelOptions getSmithy();
- Type: SmithyModelOptions
Options for the Smithy model - required when model language is SMITHY.
typeSpec
Optional
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. |
apiName
Required
public java.lang.String getApiName();
- Type: java.lang.String
Name of the API.
outdir
Required
public java.lang.String getOutdir();
- Type: java.lang.String
Directory of the model project.
parsedSpecFile
Required
public java.lang.String getParsedSpecFile();
- Type: java.lang.String
Name of the bundled OpenAPI specification file.
openapi
Optional
public OpenApiModelProject getOpenapi();
- Type: OpenApiModelProject
Reference to the OpenAPI model project.
Will be defined if the model language is OpenAPI
smithy
Optional
public SmithyModelProject getSmithy();
- Type: SmithyModelProject
Reference to the Smithy model project.
Will be defined if the model language is Smithy
typeSpec
Optional
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. |
apiName
Required
public java.lang.String getApiName();
- Type: java.lang.String
Name of the API.
outdir
Required
public java.lang.String getOutdir();
- Type: java.lang.String
Directory of the model project.
parsedSpecFile
Required
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). |
openApiOptions
Required
public OpenApiModelOptions getOpenApiOptions();
- Type: OpenApiModelOptions
Options for the openapi model.
handlerLanguages
Optional
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). |
name
Required
public java.lang.String getName();
- Type: java.lang.String
- Default: $BASEDIR
This is the name of your project.
commitGenerated
Optional
public java.lang.Boolean getCommitGenerated();
- Type: java.lang.Boolean
- Default: true
Whether to commit the managed files by default.
gitIgnoreOptions
Optional
public IgnoreFileOptions getGitIgnoreOptions();
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptions
Optional
public GitOptions getGitOptions();
- Type: io.github.cdklabs.projen.GitOptions
Configuration options for git.
logging
Optional
public LoggerOptions getLogging();
- Type: io.github.cdklabs.projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
outdir
Optional
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.
parent
Optional
public Project getParent();
- Type: io.github.cdklabs.projen.Project
The parent project, if this project is part of a bigger project.
projenCommand
Optional
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.
projenrcJson
Optional
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.
projenrcJsonOptions
Optional
public ProjenrcJsonOptions getProjenrcJsonOptions();
- Type: io.github.cdklabs.projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
renovatebot
Optional
public java.lang.Boolean getRenovatebot();
- Type: java.lang.Boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptions
Optional
public RenovatebotOptions getRenovatebotOptions();
- Type: io.github.cdklabs.projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
openApiOptions
Required
public OpenApiModelOptions getOpenApiOptions();
- Type: OpenApiModelOptions
Options for the openapi model.
handlerLanguages
Optional
public java.util.List<Language> getHandlerLanguages();
- Type: java.util.List<Language>
The languages users have specified for handler projects (if any).
parsedSpecFile
Required
public java.lang.String getParsedSpecFile();
- Type: java.lang.String
Path of the parsed/bundled OpenAPI specification (relative to the project root).
asyncApiSpecFile
Required
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). |
openApiOptions
Required
public OpenApiModelOptions getOpenApiOptions();
- Type: OpenApiModelOptions
Options for the openapi model.
handlerLanguages
Optional
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. |
title
Required
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). |
name
Required
public java.lang.String getName();
- Type: java.lang.String
- Default: $BASEDIR
This is the name of your project.
commitGenerated
Optional
public java.lang.Boolean getCommitGenerated();
- Type: java.lang.Boolean
- Default: true
Whether to commit the managed files by default.
gitIgnoreOptions
Optional
public IgnoreFileOptions getGitIgnoreOptions();
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptions
Optional
public GitOptions getGitOptions();
- Type: io.github.cdklabs.projen.GitOptions
Configuration options for git.
logging
Optional
public LoggerOptions getLogging();
- Type: io.github.cdklabs.projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
outdir
Optional
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.
parent
Optional
public Project getParent();
- Type: io.github.cdklabs.projen.Project
The parent project, if this project is part of a bigger project.
projenCommand
Optional
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.
projenrcJson
Optional
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.
projenrcJsonOptions
Optional
public ProjenrcJsonOptions getProjenrcJsonOptions();
- Type: io.github.cdklabs.projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
renovatebot
Optional
public java.lang.Boolean getRenovatebot();
- Type: java.lang.Boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptions
Optional
public RenovatebotOptions getRenovatebotOptions();
- Type: io.github.cdklabs.projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
openApiOptions
Required
public OpenApiModelOptions getOpenApiOptions();
- Type: OpenApiModelOptions
Options for the openapi model.
handlerLanguages
Optional
public java.util.List<Language> getHandlerLanguages();
- Type: java.util.List<Language>
The languages users have specified for handler projects (if any).
parsedSpecFile
Required
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). |
openApiOptions
Required
public OpenApiModelOptions getOpenApiOptions();
- Type: OpenApiModelOptions
Options for the openapi model.
handlerLanguages
Optional
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. |
method
Required
public java.lang.String getMethod();
- Type: java.lang.String
The http method of this operation.
path
Required
public java.lang.String getPath();
- Type: java.lang.String
The path of this operation in the api.
contentTypes
Optional
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. |
name
Required
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.
excludedRules
Optional
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
.
managedRuleGroupConfigs
Optional
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
AWSManagedRulesACFPRuleSet
configuration 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
AWSManagedRulesATPRuleSet
configuration 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
AWSManagedRulesBotControlRuleSet
configuration object to configure the protection level that you want the Bot Control rule group to use.
ruleActionOverrides
Optional
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.
scopeDownStatement
Optional
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.
version
Optional
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. |
documentation
Required
public java.util.List<Project> getDocumentation();
- Type: java.util.List
Array of all documentation projects.
handlers
Required
public java.util.List<Project> getHandlers();
- Type: java.util.List
Array of all handler projects.
infrastructure
Required
public java.util.List<Project> getInfrastructure();
- Type: java.util.List
Array of all infrastructure projects.
libraries
Required
public java.util.List<Project> getLibraries();
- Type: java.util.List
Array of all library projects.
model
Required
public java.util.List<Project> getModel();
- Type: java.util.List
Array of all model projects.
projects
Required
public java.util.List<Project> getProjects();
- Type: java.util.List
Array of all projects managed by type-safe-api.
runtimes
Required
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. |
authorEmail
Optional
public java.lang.String getAuthorEmail();
- Type: java.lang.String
- Default: $GIT_USER_EMAIL
Author's e-mail.
authorName
Optional
public java.lang.String getAuthorName();
- Type: java.lang.String
- Default: $GIT_USER_NAME
Author's name.
autoApproveOptions
Optional
public AutoApproveOptions getAutoApproveOptions();
- Type: io.github.cdklabs.projen.github.AutoApproveOptions
- Default: auto approve is disabled
Enable and configure the 'auto approve' workflow.
autoMerge
Optional
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.
autoMergeOptions
Optional
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.
classifiers
Optional
public java.util.List<java.lang.String> getClassifiers();
- Type: java.util.List
A list of PyPI trove classifiers that describe the project.
clobber
Optional
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.
commitGenerated
Optional
public java.lang.Boolean getCommitGenerated();
- Type: java.lang.Boolean
- Default: true
Whether to commit the managed files by default.
deps
Optional
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()
.
description
Optional
public java.lang.String getDescription();
- Type: java.lang.String
A short description of the package.
devContainer
Optional
public java.lang.Boolean getDevContainer();
- Type: java.lang.Boolean
- Default: false
Add a VSCode development environment (used for GitHub Codespaces).
devDeps
Optional
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()
.
github
Optional
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.
githubOptions
Optional
public GitHubOptions getGithubOptions();
- Type: io.github.cdklabs.projen.github.GitHubOptions
- Default: see GitHubOptions
Options for GitHub integration.
gitIgnoreOptions
Optional
public IgnoreFileOptions getGitIgnoreOptions();
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptions
Optional
public GitOptions getGitOptions();
- Type: io.github.cdklabs.projen.GitOptions
Configuration options for git.
gitpod
Optional
public java.lang.Boolean getGitpod();
- Type: java.lang.Boolean
- Default: false
Add a Gitpod development environment.
homepage
Optional
public java.lang.String getHomepage();
- Type: java.lang.String
A URL to the website of the project.
license
Optional
public java.lang.String getLicense();
- Type: java.lang.String
License of this package as an SPDX identifier.
logging
Optional
public LoggerOptions getLogging();
- Type: io.github.cdklabs.projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
~~mergify
~~Optional
- Deprecated: use
githubOptions.mergify
instead
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.mergifyOptions
instead
public MergifyOptions getMergifyOptions();
- Type: io.github.cdklabs.projen.github.MergifyOptions
- Default: default options
Options for mergify.
moduleName
Optional
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.
name
Optional
public java.lang.String getName();
- Type: java.lang.String
- Default: $BASEDIR
This is the name of your project.
outdir
Optional
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.
packageName
Optional
public java.lang.String getPackageName();
- Type: java.lang.String
Package name.
parent
Optional
public Project getParent();
- Type: io.github.cdklabs.projen.Project
The parent project, if this project is part of a bigger project.
poetryOptions
Optional
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).
projenCommand
Optional
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.
projenCredentials
Optional
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.
projenrcJson
Optional
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.
projenrcJsonOptions
Optional
public ProjenrcJsonOptions getProjenrcJsonOptions();
- Type: io.github.cdklabs.projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
projenrcPythonOptions
Optional
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.
pytest
Optional
public java.lang.Boolean getPytest();
- Type: java.lang.Boolean
- Default: true
Include pytest tests.
pytestOptions
Optional
public PytestOptions getPytestOptions();
- Type: io.github.cdklabs.projen.python.PytestOptions
- Default: defaults
pytest options.
pythonExec
Optional
public java.lang.String getPythonExec();
- Type: java.lang.String
- Default: "python"
Path to the python executable to use.
readme
Optional
public SampleReadmeProps getReadme();
- Type: io.github.cdklabs.projen.SampleReadmeProps
- Default: { filename: 'README.md', contents: '# replace this' }
The README setup.
renovatebot
Optional
public java.lang.Boolean getRenovatebot();
- Type: java.lang.Boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptions
Optional
public RenovatebotOptions getRenovatebotOptions();
- Type: io.github.cdklabs.projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
sample
Optional
public java.lang.Boolean getSample();
- Type: java.lang.Boolean
- Default: true
Include sample code and test if the relevant directories don't exist.
setupConfig
Optional
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.
setuptools
Optional
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.
stale
Optional
public java.lang.Boolean getStale();
- Type: java.lang.Boolean
- Default: false
Auto-close of stale issues and pull request.
See staleOptions
for options.
staleOptions
Optional
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
.
version
Optional
public java.lang.String getVersion();
- Type: java.lang.String
- Default: "0.1.0"
Version of the package.
vscode
Optional
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. |
languages
Required
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.
options
Optional
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)
// .integrationResponseSet(IntegrationResponseSet)
// .method(java.lang.String)
// .path(java.lang.String)
.build();
Properties
Name | Type | Description |
---|---|---|
bucket |
software.amazon.awscdk.services.s3.IBucket |
The S3 bucket to be invoked on integration. |
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. |
bucket
Required
public IBucket getBucket();
- Type: software.amazon.awscdk.services.s3.IBucket
The S3 bucket to be invoked on integration.
integrationResponseSet
Optional
public IntegrationResponseSet getIntegrationResponseSet();
- Type: IntegrationResponseSet
- Default: a combination of IntegrationResponseSets.defaultPassthrough() and IntegrationResponseSets.s3JsonErrorMessage()
Override the integration response set for the S3 integration.
method
Optional
public java.lang.String getMethod();
- Type: java.lang.String
- Default: integration method is used
The HTTP method to use when invoking the S3 bucket.
path
Optional
public java.lang.String getPath();
- Type: java.lang.String
- Default: integration path is used
The path override to use when invoking the S3 bucket.
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. |
allowHeaders
Required
public java.util.List<java.lang.String> getAllowHeaders();
- Type: java.util.List
Headers to allow.
allowMethods
Required
public java.util.List<java.lang.String> getAllowMethods();
- Type: java.util.List
HTTP methods to allow.
allowOrigins
Required
public java.util.List<java.lang.String> getAllowOrigins();
- Type: java.util.List
Origins to allow.
statusCode
Required
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). |
name
Required
public java.lang.String getName();
- Type: java.lang.String
- Default: $BASEDIR
This is the name of your project.
commitGenerated
Optional
public java.lang.Boolean getCommitGenerated();
- Type: java.lang.Boolean
- Default: true
Whether to commit the managed files by default.
gitIgnoreOptions
Optional
public IgnoreFileOptions getGitIgnoreOptions();
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptions
Optional
public GitOptions getGitOptions();
- Type: io.github.cdklabs.projen.GitOptions
Configuration options for git.
logging
Optional
public LoggerOptions getLogging();
- Type: io.github.cdklabs.projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
outdir
Optional
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.
parent
Optional
public Project getParent();
- Type: io.github.cdklabs.projen.Project
The parent project, if this project is part of a bigger project.
projenCommand
Optional
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.
projenrcJson
Optional
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.
projenrcJsonOptions
Optional
public ProjenrcJsonOptions getProjenrcJsonOptions();
- Type: io.github.cdklabs.projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
renovatebot
Optional
public java.lang.Boolean getRenovatebot();
- Type: java.lang.Boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptions
Optional
public RenovatebotOptions getRenovatebotOptions();
- Type: io.github.cdklabs.projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
smithyOptions
Required
public SmithyModelOptions getSmithyOptions();
- Type: SmithyModelOptions
Smithy engine options.
handlerLanguages
Optional
public java.util.List<Language> getHandlerLanguages();
- Type: java.util.List<Language>
The languages users have specified for handler projects (if any).
parsedSpecFile
Required
public java.lang.String getParsedSpecFile();
- Type: java.lang.String
Path of the parsed/bundled OpenAPI specification (relative to the project root).
asyncApiSpecFile
Required
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. |
name
Required
public java.lang.String getName();
- Type: java.lang.String
- Default: $BASEDIR
This is the name of your project.
commitGenerated
Optional
public java.lang.Boolean getCommitGenerated();
- Type: java.lang.Boolean
- Default: true
Whether to commit the managed files by default.
gitIgnoreOptions
Optional
public IgnoreFileOptions getGitIgnoreOptions();
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptions
Optional
public GitOptions getGitOptions();
- Type: io.github.cdklabs.projen.GitOptions
Configuration options for git.
logging
Optional
public LoggerOptions getLogging();
- Type: io.github.cdklabs.projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
outdir
Optional
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.
parent
Optional
public Project getParent();
- Type: io.github.cdklabs.projen.Project
The parent project, if this project is part of a bigger project.
projenCommand
Optional
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.
projenrcJson
Optional
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.
projenrcJsonOptions
Optional
public ProjenrcJsonOptions getProjenrcJsonOptions();
- Type: io.github.cdklabs.projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
renovatebot
Optional
public java.lang.Boolean getRenovatebot();
- Type: java.lang.Boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptions
Optional
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. |
imports
Optional
public java.util.List<java.lang.String> getImports();
- Type: java.util.List
List of imports.
plugins
Optional
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.
additionalSources
Optional
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.
ignoreMissingPlugins
Optional
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.
maven
Optional
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.
projections
Optional
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. |
imports
Optional
public java.util.List<java.lang.String> getImports();
- Type: java.util.List
List of imports.
plugins
Optional
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. |
dependencies
Optional
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.
repositoryUrls
Optional
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. |
ignoreGradleWrapper
Optional
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
ignoreSmithyBuildOutput
Optional
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.
smithyBuildOptions
Optional
public SmithyBuildOptions getSmithyBuildOptions();
- Type: SmithyBuildOptions
Smithy build options.
serviceName
Required
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). |
name
Required
public java.lang.String getName();
- Type: java.lang.String
- Default: $BASEDIR
This is the name of your project.
commitGenerated
Optional
public java.lang.Boolean getCommitGenerated();
- Type: java.lang.Boolean
- Default: true
Whether to commit the managed files by default.
gitIgnoreOptions
Optional
public IgnoreFileOptions getGitIgnoreOptions();
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptions
Optional
public GitOptions getGitOptions();
- Type: io.github.cdklabs.projen.GitOptions
Configuration options for git.
logging
Optional
public LoggerOptions getLogging();
- Type: io.github.cdklabs.projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
outdir
Optional
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.
parent
Optional
public Project getParent();
- Type: io.github.cdklabs.projen.Project
The parent project, if this project is part of a bigger project.
projenCommand
Optional
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.
projenrcJson
Optional
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.
projenrcJsonOptions
Optional
public ProjenrcJsonOptions getProjenrcJsonOptions();
- Type: io.github.cdklabs.projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
renovatebot
Optional
public java.lang.Boolean getRenovatebot();
- Type: java.lang.Boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptions
Optional
public RenovatebotOptions getRenovatebotOptions();
- Type: io.github.cdklabs.projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
smithyOptions
Required
public SmithyModelOptions getSmithyOptions();
- Type: SmithyModelOptions
Smithy engine options.
handlerLanguages
Optional
public java.util.List<Language> getHandlerLanguages();
- Type: java.util.List<Language>
The languages users have specified for handler projects (if any).
parsedSpecFile
Required
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. |
ignoreGradleWrapper
Optional
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
ignoreSmithyBuildOutput
Optional
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.
smithyBuildOptions
Optional
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. |
imports
Optional
public java.util.List<java.lang.String> getImports();
- Type: java.util.List
List of imports.
plugins
Optional
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.
abstract
Optional
public java.lang.Boolean getAbstract();
- Type: java.lang.Boolean
Whether or not the projection is abstract.
transforms
Optional
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. |
namespace
Required
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
serviceName
Required
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). |
smithyOptions
Required
public SmithyModelOptions getSmithyOptions();
- Type: SmithyModelOptions
Smithy engine options.
handlerLanguages
Optional
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. |
name
Required
public java.lang.String getName();
- Type: java.lang.String
- Default: $BASEDIR
This is the name of your project.
commitGenerated
Optional
public java.lang.Boolean getCommitGenerated();
- Type: java.lang.Boolean
- Default: true
Whether to commit the managed files by default.
gitIgnoreOptions
Optional
public IgnoreFileOptions getGitIgnoreOptions();
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptions
Optional
public GitOptions getGitOptions();
- Type: io.github.cdklabs.projen.GitOptions
Configuration options for git.
logging
Optional
public LoggerOptions getLogging();
- Type: io.github.cdklabs.projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
outdir
Optional
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.
parent
Optional
public Project getParent();
- Type: io.github.cdklabs.projen.Project
The parent project, if this project is part of a bigger project.
projenCommand
Optional
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.
projenrcJson
Optional
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.
projenrcJsonOptions
Optional
public ProjenrcJsonOptions getProjenrcJsonOptions();
- Type: io.github.cdklabs.projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
renovatebot
Optional
public java.lang.Boolean getRenovatebot();
- Type: java.lang.Boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptions
Optional
public RenovatebotOptions getRenovatebotOptions();
- Type: io.github.cdklabs.projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
ignoreGradleWrapper
Optional
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
ignoreSmithyBuildOutput
Optional
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.
smithyBuildOptions
Optional
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. |
args
Required
public java.util.Map<java.lang.String, java.lang.Object> getArgs();
- Type: java.util.Map
Arguments for the transform.
name
Required
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. |
maxEventAge
Optional
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
onFailure
Optional
public IDestination getOnFailure();
- Type: software.amazon.awscdk.services.lambda.IDestination
- Default: no destination
The destination for failed invocations.
onSuccess
Optional
public IDestination getOnSuccess();
- Type: software.amazon.awscdk.services.lambda.IDestination
- Default: no destination
The destination for successful invocations.
retryAttempts
Optional
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
adotInstrumentation
Optional
public AdotInstrumentationConfig getAdotInstrumentation();
- Type: software.amazon.awscdk.services.lambda.AdotInstrumentationConfig
- Default: No ADOT instrumentation
Specify the configuration of AWS Distro for OpenTelemetry (ADOT) instrumentation.
allowAllIpv6Outbound
Optional
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.
allowAllOutbound
Optional
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.
allowPublicSubnet
Optional
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
applicationLogLevelV2
as a property instead.
public java.lang.String getApplicationLogLevel();
- Type: java.lang.String
- Default: "INFO"
Sets the application log level for the function.
applicationLogLevelV2
Optional
public ApplicationLogLevel getApplicationLogLevelV2();
- Type: software.amazon.awscdk.services.lambda.ApplicationLogLevel
- Default: ApplicationLogLevel.INFO
Sets the application log level for the function.
architecture
Optional
public Architecture getArchitecture();
- Type: software.amazon.awscdk.services.lambda.Architecture
- Default: Architecture.X86_64
The system architectures compatible with this lambda function.
codeSigningConfig
Optional
public ICodeSigningConfig getCodeSigningConfig();
- Type: software.amazon.awscdk.services.lambda.ICodeSigningConfig
- Default: Not Sign the Code
Code signing config associated with this function.
currentVersionOptions
Optional
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.
deadLetterQueue
Optional
public IQueue getDeadLetterQueue();
- Type: software.amazon.awscdk.services.sqs.IQueue
- Default: SQS queue with 14 day retention period if
deadLetterQueueEnabled
istrue
The SQS queue to use if DLQ is enabled.
If SNS topic is desired, specify deadLetterTopic
property instead.
deadLetterQueueEnabled
Optional
public java.lang.Boolean getDeadLetterQueueEnabled();
- Type: java.lang.Boolean
- Default: false unless
deadLetterQueue
is set, which implies DLQ is enabled.
Enabled DLQ.
If deadLetterQueue
is undefined,
an SQS queue with default options will be defined for your Function.
deadLetterTopic
Optional
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.
description
Optional
public java.lang.String getDescription();
- Type: java.lang.String
- Default: No description.
A description of the function.
environment
Optional
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.
environmentEncryption
Optional
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.
ephemeralStorageSize
Optional
public Size getEphemeralStorageSize();
- Type: software.amazon.awscdk.Size
- Default: 512 MiB
The size of the function’s /tmp directory in MiB.
events
Optional
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
.
filesystem
Optional
public FileSystem getFilesystem();
- Type: software.amazon.awscdk.services.lambda.FileSystem
- Default: will not mount any filesystem
The filesystem configuration for the lambda function.
functionName
Optional
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.
initialPolicy
Optional
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.
insightsVersion
Optional
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.
ipv6AllowedForDualStack
Optional
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.
layers
Optional
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
loggingFormat
as a property instead.
public java.lang.String getLogFormat();
- Type: java.lang.String
- Default: "Text"
Sets the logFormat for the function.
loggingFormat
Optional
public LoggingFormat getLoggingFormat();
- Type: software.amazon.awscdk.services.lambda.LoggingFormat
- Default: LoggingFormat.TEXT
Sets the loggingFormat for the function.
logGroup
Optional
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.
logRetention
Optional
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;
logRetentionRetryOptions
Optional
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.
logRetentionRole
Optional
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.
memorySize
Optional
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.
paramsAndSecrets
Optional
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
profiling
Optional
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
profilingGroup
Optional
public IProfilingGroup getProfilingGroup();
- Type: software.amazon.awscdk.services.codeguruprofiler.IProfilingGroup
- Default: A new profiling group will be created if
profiling
is set.
Profiling Group.
https://docs.aws.amazon.com/codeguru/latest/profiler-ug/setting-up-lambda.html
recursiveLoop
Optional
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.
reservedConcurrentExecutions
Optional
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
role
Optional
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".
runtimeManagementMode
Optional
public RuntimeManagementMode getRuntimeManagementMode();
- Type: software.amazon.awscdk.services.lambda.RuntimeManagementMode
- Default: Auto
Sets the runtime management configuration for a function's version.
securityGroups
Optional
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.
snapStart
Optional
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
systemLogLevelV2
as a property instead.
public java.lang.String getSystemLogLevel();
- Type: java.lang.String
- Default: "INFO"
Sets the system log level for the function.
systemLogLevelV2
Optional
public SystemLogLevel getSystemLogLevelV2();
- Type: software.amazon.awscdk.services.lambda.SystemLogLevel
- Default: SystemLogLevel.INFO
Sets the system log level for the function.
timeout
Optional
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.
tracing
Optional
public Tracing getTracing();
- Type: software.amazon.awscdk.services.lambda.Tracing
- Default: Tracing.Disabled
Enable AWS X-Ray Tracing for Lambda Function.
vpc
Optional
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.
vpcSubnets
Optional
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
).
code
Required
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.
handler
Required
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.
runtime
Required
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.
disableSnapStart
Optional
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). |
asyncApiSpecFile
Required
public java.lang.String getAsyncApiSpecFile();
- Type: java.lang.String
Path to the generated AsyncAPI specification (relative to the project root).
parsedSpecFile
Required
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). |
asyncApiSpecFile
Required
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. |
integration
Required
public Integration getIntegration();
- Type: Integration
The integration to service the api operation.
authorizer
Optional
public Authorizer getAuthorizer();
- Type: Authorizer
The authorizer to use for this api operation (overrides the default).
options
Optional
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. |
apiKeyRequired
Optional
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). |
parsedSpecFile
Required
public java.lang.String getParsedSpecFile();
- Type: java.lang.String
Path of the parsed/bundled OpenAPI specification (relative to the project root).
openApiSpecificationPath
Required
public java.lang.String getOpenApiSpecificationPath();
- Type: java.lang.String
Path to the OpenAPI specification.
smithyJsonModelPath
Optional
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). |
parsedSpecFile
Required
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). |
modelLanguage
Required
public ModelLanguage getModelLanguage();
- Type: ModelLanguage
Language the model is defined in.
modelOptions
Required
public ModelOptions getModelOptions();
- Type: ModelOptions
Options for the model.
handlerLanguages
Optional
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. |
integrations
Required
public java.util.Map<java.lang.String, TypeSafeApiIntegration> getIntegrations();
- Type: java.util.Map
TypeSafeApiIntegration\>
A mapping of API operation to its integration.
operationLookup
Required
public java.util.Map<java.lang.String, OperationDetails> getOperationLookup();
- Type: java.util.Map
OperationDetails\>
Details about each operation.
apiKeyOptions
Optional
public ApiKeyOptions getApiKeyOptions();
- Type: ApiKeyOptions
Options for API keys.
corsOptions
Optional
public CorsOptions getCorsOptions();
- Type: software.amazon.awscdk.services.apigateway.CorsOptions
Cross Origin Resource Sharing options for the API.
defaultAuthorizer
Optional
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). |
name
Required
public java.lang.String getName();
- Type: java.lang.String
- Default: $BASEDIR
This is the name of your project.
commitGenerated
Optional
public java.lang.Boolean getCommitGenerated();
- Type: java.lang.Boolean
- Default: true
Whether to commit the managed files by default.
gitIgnoreOptions
Optional
public IgnoreFileOptions getGitIgnoreOptions();
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptions
Optional
public GitOptions getGitOptions();
- Type: io.github.cdklabs.projen.GitOptions
Configuration options for git.
logging
Optional
public LoggerOptions getLogging();
- Type: io.github.cdklabs.projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
outdir
Optional
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.
parent
Optional
public Project getParent();
- Type: io.github.cdklabs.projen.Project
The parent project, if this project is part of a bigger project.
projenCommand
Optional
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.
projenrcJson
Optional
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.
projenrcJsonOptions
Optional
public ProjenrcJsonOptions getProjenrcJsonOptions();
- Type: io.github.cdklabs.projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
renovatebot
Optional
public java.lang.Boolean getRenovatebot();
- Type: java.lang.Boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptions
Optional
public RenovatebotOptions getRenovatebotOptions();
- Type: io.github.cdklabs.projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
infrastructure
Required
public InfrastructureConfiguration getInfrastructure();
Configuration for generated infrastructure.
model
Required
public ModelConfiguration getModel();
- Type: ModelConfiguration
Configuration for the API model.
commitGeneratedCode
Optional
public java.lang.Boolean getCommitGeneratedCode();
- Type: java.lang.Boolean
- Default: false
Whether to commit the code generated by the OpenAPI Generator.
documentation
Optional
public DocumentationConfiguration getDocumentation();
Configuration for generated documentation.
handlers
Optional
public HandlersConfiguration getHandlers();
- Type: HandlersConfiguration
Configuration for lambda handlers for implementing the API.
library
Optional
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.
runtime
Optional
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. |
cidrAllowList
Optional
public CidrAllowList getCidrAllowList();
- Type: CidrAllowList
- Default: undefined
List of cidr ranges to allow.
disable
Optional
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.
managedRules
Optional
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)
// .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. |
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. |
cloudWatchRole
Optional
public java.lang.Boolean getCloudWatchRole();
- Type: java.lang.Boolean
- Default: false if
@aws-cdk/aws-apigateway:disableCloudWatchRole
is enabled, true otherwise
Automatically configure an AWS CloudWatch role for API Gateway.
cloudWatchRoleRemovalPolicy
Optional
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.
deploy
Optional
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.
deployOptions
Optional
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.
description
Optional
public java.lang.String getDescription();
- Type: java.lang.String
- Default: 'Automatically created by the RestApi construct'
A description of the RestApi construct.
disableExecuteApiEndpoint
Optional
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
domainName
Optional
public DomainNameOptions getDomainName();
- Type: software.amazon.awscdk.services.apigateway.DomainNameOptions
- Default: no domain name is defined, use
addDomainName
or directly define aDomainName
.
Configure a custom domain name and map it to this API.
endpointExportName
Optional
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.
endpointTypes
Optional
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.
failOnWarnings
Optional
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.
parameters
Optional
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
policy
Optional
public PolicyDocument getPolicy();
- Type: software.amazon.awscdk.services.iam.PolicyDocument
- Default: No policy.
A policy document that contains the permissions for this RestApi.
restApiName
Optional
public java.lang.String getRestApiName();
- Type: java.lang.String
- Default: ID of the RestApi construct.
A name for the API Gateway RestApi resource.
retainDeployments
Optional
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.
integrations
Required
public java.util.Map<java.lang.String, TypeSafeApiIntegration> getIntegrations();
- Type: java.util.Map
TypeSafeApiIntegration\>
A mapping of API operation to its integration.
operationLookup
Required
public java.util.Map<java.lang.String, OperationDetails> getOperationLookup();
- Type: java.util.Map
OperationDetails\>
Details about each operation.
apiKeyOptions
Optional
public ApiKeyOptions getApiKeyOptions();
- Type: ApiKeyOptions
Options for API keys.
corsOptions
Optional
public CorsOptions getCorsOptions();
- Type: software.amazon.awscdk.services.apigateway.CorsOptions
Cross Origin Resource Sharing options for the API.
defaultAuthorizer
Optional
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.
specPath
Required
public java.lang.String getSpecPath();
- Type: java.lang.String
Path to the JSON open api spec.
minCompressionSize
Optional
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.
outputSpecBucket
Optional
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.
webAclOptions
Optional
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. |
integration
Required
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. |
language
Required
public ModelLanguage getLanguage();
- Type: ModelLanguage
The language the API model is defined in.
options
Required
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). |
modelLanguage
Required
public ModelLanguage getModelLanguage();
- Type: ModelLanguage
Language the model is defined in.
modelOptions
Required
public ModelOptions getModelOptions();
- Type: ModelOptions
Options for the model.
handlerLanguages
Optional
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). |
name
Required
public java.lang.String getName();
- Type: java.lang.String
- Default: $BASEDIR
This is the name of your project.
commitGenerated
Optional
public java.lang.Boolean getCommitGenerated();
- Type: java.lang.Boolean
- Default: true
Whether to commit the managed files by default.
gitIgnoreOptions
Optional
public IgnoreFileOptions getGitIgnoreOptions();
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptions
Optional
public GitOptions getGitOptions();
- Type: io.github.cdklabs.projen.GitOptions
Configuration options for git.
logging
Optional
public LoggerOptions getLogging();
- Type: io.github.cdklabs.projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
outdir
Optional
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.
parent
Optional
public Project getParent();
- Type: io.github.cdklabs.projen.Project
The parent project, if this project is part of a bigger project.
projenCommand
Optional
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.
projenrcJson
Optional
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.
projenrcJsonOptions
Optional
public ProjenrcJsonOptions getProjenrcJsonOptions();
- Type: io.github.cdklabs.projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
renovatebot
Optional
public java.lang.Boolean getRenovatebot();
- Type: java.lang.Boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptions
Optional
public RenovatebotOptions getRenovatebotOptions();
- Type: io.github.cdklabs.projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
infrastructure
Required
public WebSocketInfrastructureConfiguration getInfrastructure();
Configuration for generated infrastructure.
model
Required
public TypeSafeWebSocketApiModelConfiguration getModel();
Configuration for the API model.
documentation
Optional
public WebSocketDocumentationConfiguration getDocumentation();
Configuration for generated documentation.
handlers
Optional
public WebSocketHandlersConfiguration getHandlers();
Configuration for lambda handlers for implementing the API.
library
Optional
public WebSocketLibraryConfiguration getLibrary();
Configuration for generated libraries.
These include clients for interacting with your websocket API
runtime
Optional
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. |
apiKeySelectionExpression
Optional
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.
apiName
Optional
public java.lang.String getApiName();
- Type: java.lang.String
- Default: id of the WebSocketApi construct.
Name for the WebSocket API resource.
description
Optional
public java.lang.String getDescription();
- Type: java.lang.String
- Default: none
The description of the API.
integrations
Required
public java.util.Map<java.lang.String, TypeSafeWebsocketApiIntegration> getIntegrations();
- Type: java.util.Map
TypeSafeWebsocketApiIntegration\>
WebSocket routes and their corresponding integrations.
operationLookup
Required
public java.util.Map<java.lang.String, WebsocketOperationDetails> getOperationLookup();
- Type: java.util.Map
WebsocketOperationDetails\>
Details about each operation.
specPath
Required
public java.lang.String getSpecPath();
- Type: java.lang.String
Path to the websocket api specification json file.
authorizer
Optional
public IWebSocketRouteAuthorizer getAuthorizer();
- Type: software.amazon.awscdk.services.apigatewayv2.IWebSocketRouteAuthorizer
- Default: NONE
Authorizer to use for the API (applied to the $connect route).
connect
Optional
public TypeSafeWebsocketApiIntegration getConnect();
- Type: TypeSafeWebsocketApiIntegration
- Default: mocked
Integration for the $connect route (invoked when a new client connects).
disableAccessLogging
Optional
public java.lang.Boolean getDisableAccessLogging();
- Type: java.lang.Boolean
- Default: false
Disable access logging.
disableGrantManagementAccessToLambdas
Optional
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.
disableMockIntegrationResponses
Optional
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)
disconnect
Optional
public TypeSafeWebsocketApiIntegration getDisconnect();
- Type: TypeSafeWebsocketApiIntegration
- Default: mocked
Integration for the $disconnect route (invoked when a client disconnects).
stageProps
Optional
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. |
allowLibraryDependencies
Optional
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.
artifactsDirectory
Optional
public java.lang.String getArtifactsDirectory();
- Type: java.lang.String
- Default: "dist"
A directory which will contain build artifacts.
authorEmail
Optional
public java.lang.String getAuthorEmail();
- Type: java.lang.String
Author's e-mail.
authorName
Optional
public java.lang.String getAuthorName();
- Type: java.lang.String
Author's name.
authorOrganization
Optional
public java.lang.Boolean getAuthorOrganization();
- Type: java.lang.Boolean
Is the author an organization.
authorUrl
Optional
public java.lang.String getAuthorUrl();
- Type: java.lang.String
Author's URL / Website.
autoApproveOptions
Optional
public AutoApproveOptions getAutoApproveOptions();
- Type: io.github.cdklabs.projen.github.AutoApproveOptions
- Default: auto approve is disabled
Enable and configure the 'auto approve' workflow.
autoApproveUpgrades
Optional
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.
autoDetectBin
Optional
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.
autoMerge
Optional
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.
autoMergeOptions
Optional
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.
bin
Optional
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.
bugsEmail
Optional
public java.lang.String getBugsEmail();
- Type: java.lang.String
The email address to which issues should be reported.
bugsUrl
Optional
public java.lang.String getBugsUrl();
- Type: java.lang.String
The url to your project's issue tracker.
buildWorkflow
Optional
public java.lang.Boolean getBuildWorkflow();
- Type: java.lang.Boolean
- Default: true if not a subproject
Define a GitHub workflow for building PRs.
buildWorkflowOptions
Optional
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.
bundledDeps
Optional
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.
bundlerOptions
Optional
public BundlerOptions getBundlerOptions();
- Type: io.github.cdklabs.projen.javascript.BundlerOptions
Options for Bundler
.
checkLicenses
Optional
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.
clobber
Optional
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.
codeArtifactOptions
Optional
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
codeCov
Optional
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
.
codeCovTokenSecret
Optional
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.
commitGenerated
Optional
public java.lang.Boolean getCommitGenerated();
- Type: java.lang.Boolean
- Default: true
Whether to commit the managed files by default.
copyrightOwner
Optional
public java.lang.String getCopyrightOwner();
- Type: java.lang.String
- Default: defaults to the value of authorName or "" if
authorName
is undefined.
License copyright owner.
copyrightPeriod
Optional
public java.lang.String getCopyrightPeriod();
- Type: java.lang.String
- Default: current year
The copyright years to put in the LICENSE file.
defaultReleaseBranch
Optional
public java.lang.String getDefaultReleaseBranch();
- Type: java.lang.String
- Default: "main"
The name of the main release branch.
dependabot
Optional
public java.lang.Boolean getDependabot();
- Type: java.lang.Boolean
- Default: false
Use dependabot to handle dependency upgrades.
Cannot be used in conjunction with depsUpgrade
.
dependabotOptions
Optional
public DependabotOptions getDependabotOptions();
- Type: io.github.cdklabs.projen.github.DependabotOptions
- Default: default options
Options for dependabot.
deps
Optional
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.
depsUpgrade
Optional
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
.
depsUpgradeOptions
Optional
public UpgradeDependenciesOptions getDepsUpgradeOptions();
- Type: io.github.cdklabs.projen.javascript.UpgradeDependenciesOptions
- Default: default options
Options for UpgradeDependencies
.
description
Optional
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
devContainer
Optional
public java.lang.Boolean getDevContainer();
- Type: java.lang.Boolean
- Default: false
Add a VSCode development environment (used for GitHub Codespaces).
devDeps
Optional
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.
disableTsconfig
Optional
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).
disableTsconfigDev
Optional
public java.lang.Boolean getDisableTsconfigDev();
- Type: java.lang.Boolean
- Default: false
Do not generate a tsconfig.dev.json
file.
docgen
Optional
public java.lang.Boolean getDocgen();
- Type: java.lang.Boolean
- Default: false
Docgen by Typedoc.
docsDirectory
Optional
public java.lang.String getDocsDirectory();
- Type: java.lang.String
- Default: "docs"
Docs directory.
entrypoint
Optional
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.
entrypointTypes
Optional
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.
eslint
Optional
public java.lang.Boolean getEslint();
- Type: java.lang.Boolean
- Default: true
Setup eslint.
eslintOptions
Optional
public EslintOptions getEslintOptions();
- Type: io.github.cdklabs.projen.javascript.EslintOptions
- Default: opinionated default options
Eslint options.
github
Optional
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.
githubOptions
Optional
public GitHubOptions getGithubOptions();
- Type: io.github.cdklabs.projen.github.GitHubOptions
- Default: see GitHubOptions
Options for GitHub integration.
gitignore
Optional
public java.util.List<java.lang.String> getGitignore();
- Type: java.util.List
Additional entries to .gitignore.
gitIgnoreOptions
Optional
public IgnoreFileOptions getGitIgnoreOptions();
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptions
Optional
public GitOptions getGitOptions();
- Type: io.github.cdklabs.projen.GitOptions
Configuration options for git.
gitpod
Optional
public java.lang.Boolean getGitpod();
- Type: java.lang.Boolean
- Default: false
Add a Gitpod development environment.
homepage
Optional
public java.lang.String getHomepage();
- Type: java.lang.String
Package's Homepage / Website.
jest
Optional
public java.lang.Boolean getJest();
- Type: java.lang.Boolean
- Default: true
Setup jest unit tests.
jestOptions
Optional
public JestOptions getJestOptions();
- Type: io.github.cdklabs.projen.javascript.JestOptions
- Default: default options
Jest options.
jsiiReleaseVersion
Optional
public java.lang.String getJsiiReleaseVersion();
- Type: java.lang.String
- Default: "latest"
Version requirement of publib
which is used to publish modules to npm.
keywords
Optional
public java.util.List<java.lang.String> getKeywords();
- Type: java.util.List
Keywords to include in package.json
.
libdir
Optional
public java.lang.String getLibdir();
- Type: java.lang.String
- Default: "lib"
Typescript artifacts output directory.
license
Optional
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.
licensed
Optional
public java.lang.Boolean getLicensed();
- Type: java.lang.Boolean
- Default: true
Indicates if a license should be added.
logging
Optional
public LoggerOptions getLogging();
- Type: io.github.cdklabs.projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
majorVersion
Optional
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.
maxNodeVersion
Optional
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.mergify
instead
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.mergifyOptions
instead
public MergifyOptions getMergifyOptions();
- Type: io.github.cdklabs.projen.github.MergifyOptions
- Default: default options
Options for mergify.
minMajorVersion
Optional
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
.
minNodeVersion
Optional
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.
name
Optional
public java.lang.String getName();
- Type: java.lang.String
- Default: $BASEDIR
This is the name of your project.
npmAccess
Optional
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.
npmDistTag
Optional
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.
npmignoreEnabled
Optional
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.
npmIgnoreOptions
Optional
public IgnoreFileOptions getNpmIgnoreOptions();
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .npmignore file.
npmProvenance
Optional
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
npmRegistryUrl
instead
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
.
npmRegistryUrl
Optional
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://")
npmTokenSecret
Optional
public java.lang.String getNpmTokenSecret();
- Type: java.lang.String
- Default: "NPM_TOKEN"
GitHub secret which contains the NPM token to use when publishing packages.
outdir
Optional
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.
package
Optional
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
).
packageManager
Optional
public NodePackageManager getPackageManager();
- Type: io.github.cdklabs.projen.javascript.NodePackageManager
- Default: NodePackageManager.YARN_CLASSIC
The Node Package Manager used to execute scripts.
packageName
Optional
public java.lang.String getPackageName();
- Type: java.lang.String
- Default: defaults to project name
The "name" in package.json.
parent
Optional
public Project getParent();
- Type: io.github.cdklabs.projen.Project
The parent project, if this project is part of a bigger project.
peerDependencyOptions
Optional
public PeerDependencyOptions getPeerDependencyOptions();
- Type: io.github.cdklabs.projen.javascript.PeerDependencyOptions
Options for peerDeps
.
peerDeps
Optional
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.
pnpmVersion
Optional
public java.lang.String getPnpmVersion();
- Type: java.lang.String
- Default: "7"
The version of PNPM to use if using PNPM as a package manager.
postBuildSteps
Optional
public java.util.List<JobStep> getPostBuildSteps();
- Type: java.util.List
- Default: []
Steps to execute after build as part of the release workflow.
prerelease
Optional
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").
prettier
Optional
public java.lang.Boolean getPrettier();
- Type: java.lang.Boolean
- Default: false
Setup prettier.
prettierOptions
Optional
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).
projenCommand
Optional
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.
projenCredentials
Optional
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.
projenDevDependency
Optional
public java.lang.Boolean getProjenDevDependency();
- Type: java.lang.Boolean
- Default: true if not a subproject
Indicates of "projen" should be installed as a devDependency.
projenrcJs
Optional
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.
projenrcJson
Optional
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.
projenrcJsonOptions
Optional
public ProjenrcJsonOptions getProjenrcJsonOptions();
- Type: io.github.cdklabs.projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
projenrcJsOptions
Optional
public ProjenrcOptions getProjenrcJsOptions();
- Type: io.github.cdklabs.projen.javascript.ProjenrcOptions
- Default: default options
Options for .projenrc.js.
projenrcTs
Optional
public java.lang.Boolean getProjenrcTs();
- Type: java.lang.Boolean
- Default: false
Use TypeScript for your projenrc file (.projenrc.ts
).
projenrcTsOptions
Optional
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.
projenVersion
Optional
public java.lang.String getProjenVersion();
- Type: java.lang.String
- Default: Defaults to the latest version.
Version of projen to install.
publishDryRun
Optional
public java.lang.Boolean getPublishDryRun();
- Type: java.lang.Boolean
- Default: false
Instead of actually publishing to package managers, just print the publishing command.
publishTasks
Optional
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.
pullRequestTemplate
Optional
public java.lang.Boolean getPullRequestTemplate();
- Type: java.lang.Boolean
- Default: true
Include a GitHub pull request template.
pullRequestTemplateContents
Optional
public java.util.List<java.lang.String> getPullRequestTemplateContents();
- Type: java.util.List
- Default: default content
The contents of the pull request template.
readme
Optional
public SampleReadmeProps getReadme();
- Type: io.github.cdklabs.projen.SampleReadmeProps
- Default: { filename: 'README.md', contents: '# replace this' }
The README setup.
releasableCommits
Optional
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.
release
Optional
public java.lang.Boolean getRelease();
- Type: java.lang.Boolean
- Default: true (false for subprojects)
Add release management to this project.
releaseBranches
Optional
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
.
releaseFailureIssue
Optional
public java.lang.Boolean getReleaseFailureIssue();
- Type: java.lang.Boolean
- Default: false
Create a github issue on every failed publishing task.
releaseFailureIssueLabel
Optional
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.
releaseTagPrefix
Optional
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.
releaseToNpm
Optional
public java.lang.Boolean getReleaseToNpm();
- Type: java.lang.Boolean
- Default: false
Automatically release to npm when new versions are introduced.
releaseTrigger
Optional
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
.
releaseWorkflowName
Optional
public java.lang.String getReleaseWorkflowName();
- Type: java.lang.String
- Default: "release"
The name of the default release workflow.
releaseWorkflowSetupSteps
Optional
public java.util.List<JobStep> getReleaseWorkflowSetupSteps();
- Type: java.util.List
A set of workflow steps to execute in order to setup the workflow container.
renovatebot
Optional
public java.lang.Boolean getRenovatebot();
- Type: java.lang.Boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptions
Optional
public RenovatebotOptions getRenovatebotOptions();
- Type: io.github.cdklabs.projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
repository
Optional
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
repositoryDirectory
Optional
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.
sampleCode
Optional
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.
scopedPackagesOptions
Optional
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.
srcdir
Optional
public java.lang.String getSrcdir();
- Type: java.lang.String
- Default: "src"
Typescript sources directory.
stability
Optional
public java.lang.String getStability();
- Type: java.lang.String
Package's Stability.
stale
Optional
public java.lang.Boolean getStale();
- Type: java.lang.Boolean
- Default: false
Auto-close of stale issues and pull request.
See staleOptions
for options.
staleOptions
Optional
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
.
testdir
Optional
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.
tsconfig
Optional
public TypescriptConfigOptions getTsconfig();
- Type: io.github.cdklabs.projen.javascript.TypescriptConfigOptions
- Default: default options
Custom TSConfig.
tsconfigDev
Optional
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).
tsconfigDevFile
Optional
public java.lang.String getTsconfigDevFile();
- Type: java.lang.String
- Default: "tsconfig.dev.json"
The name of the development tsconfig.json file.
tsJestOptions
Optional
public TsJestOptions getTsJestOptions();
- Type: io.github.cdklabs.projen.typescript.TsJestOptions
Options for ts-jest.
typescriptVersion
Optional
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
).
versionrcOptions
Optional
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.
vscode
Optional
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.
workflowBootstrapSteps
Optional
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.
workflowContainerImage
Optional
public java.lang.String getWorkflowContainerImage();
- Type: java.lang.String
- Default: default image
Container image to use for GitHub workflows.
workflowGitIdentity
Optional
public GitIdentity getWorkflowGitIdentity();
- Type: io.github.cdklabs.projen.github.GitIdentity
- Default: GitHub Actions
The git identity to use in workflows.
workflowNodeVersion
Optional
public java.lang.String getWorkflowNodeVersion();
- Type: java.lang.String
- Default: same as
minNodeVersion
The node version to use in GitHub workflows.
workflowPackageCache
Optional
public java.lang.Boolean getWorkflowPackageCache();
- Type: java.lang.Boolean
- Default: false
Enable Node.js package cache in GitHub workflows.
workflowRunsOn
Optional
public java.util.List<java.lang.String> getWorkflowRunsOn();
- Type: java.util.List
- Default: ["ubuntu-latest"]
Github Runner selection labels.
workflowRunsOnGroup
Optional
public GroupRunnerOptions getWorkflowRunsOnGroup();
- Type: io.github.cdklabs.projen.GroupRunnerOptions
Github Runner Group selection options.
yarnBerryOptions
Optional
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). |
typeSpecOptions
Required
public TypeSpecModelOptions getTypeSpecOptions();
- Type: TypeSpecModelOptions
TypeSpec model options.
handlerLanguages
Optional
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). |
name
Required
public java.lang.String getName();
- Type: java.lang.String
- Default: $BASEDIR
This is the name of your project.
commitGenerated
Optional
public java.lang.Boolean getCommitGenerated();
- Type: java.lang.Boolean
- Default: true
Whether to commit the managed files by default.
gitIgnoreOptions
Optional
public IgnoreFileOptions getGitIgnoreOptions();
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptions
Optional
public GitOptions getGitOptions();
- Type: io.github.cdklabs.projen.GitOptions
Configuration options for git.
logging
Optional
public LoggerOptions getLogging();
- Type: io.github.cdklabs.projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
outdir
Optional
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.
parent
Optional
public Project getParent();
- Type: io.github.cdklabs.projen.Project
The parent project, if this project is part of a bigger project.
projenCommand
Optional
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.
projenrcJson
Optional
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.
projenrcJsonOptions
Optional
public ProjenrcJsonOptions getProjenrcJsonOptions();
- Type: io.github.cdklabs.projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
renovatebot
Optional
public java.lang.Boolean getRenovatebot();
- Type: java.lang.Boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptions
Optional
public RenovatebotOptions getRenovatebotOptions();
- Type: io.github.cdklabs.projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
autoApproveOptions
Optional
public AutoApproveOptions getAutoApproveOptions();
- Type: io.github.cdklabs.projen.github.AutoApproveOptions
- Default: auto approve is disabled
Enable and configure the 'auto approve' workflow.
autoMerge
Optional
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.
autoMergeOptions
Optional
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.
clobber
Optional
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.
devContainer
Optional
public java.lang.Boolean getDevContainer();
- Type: java.lang.Boolean
- Default: false
Add a VSCode development environment (used for GitHub Codespaces).
github
Optional
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.
githubOptions
Optional
public GitHubOptions getGithubOptions();
- Type: io.github.cdklabs.projen.github.GitHubOptions
- Default: see GitHubOptions
Options for GitHub integration.
gitpod
Optional
public java.lang.Boolean getGitpod();
- Type: java.lang.Boolean
- Default: false
Add a Gitpod development environment.
~~mergify
~~Optional
- Deprecated: use
githubOptions.mergify
instead
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.mergifyOptions
instead
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).
projenCredentials
Optional
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.
readme
Optional
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' }"
stale
Optional
public java.lang.Boolean getStale();
- Type: java.lang.Boolean
- Default: false
Auto-close of stale issues and pull request.
See staleOptions
for options.
staleOptions
Optional
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
.
vscode
Optional
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.
allowLibraryDependencies
Optional
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.
authorEmail
Optional
public java.lang.String getAuthorEmail();
- Type: java.lang.String
Author's e-mail.
authorName
Optional
public java.lang.String getAuthorName();
- Type: java.lang.String
Author's name.
authorOrganization
Optional
public java.lang.Boolean getAuthorOrganization();
- Type: java.lang.Boolean
Is the author an organization.
authorUrl
Optional
public java.lang.String getAuthorUrl();
- Type: java.lang.String
Author's URL / Website.
autoDetectBin
Optional
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.
bin
Optional
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.
bugsEmail
Optional
public java.lang.String getBugsEmail();
- Type: java.lang.String
The email address to which issues should be reported.
bugsUrl
Optional
public java.lang.String getBugsUrl();
- Type: java.lang.String
The url to your project's issue tracker.
bundledDeps
Optional
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.
codeArtifactOptions
Optional
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
deps
Optional
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' ]
description
Optional
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
devDeps
Optional
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' ]
entrypoint
Optional
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
homepage
Optional
public java.lang.String getHomepage();
- Type: java.lang.String
Package's Homepage / Website.
keywords
Optional
public java.util.List<java.lang.String> getKeywords();
- Type: java.util.List
Keywords to include in package.json
.
license
Optional
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.
licensed
Optional
public java.lang.Boolean getLicensed();
- Type: java.lang.Boolean
- Default: true
Indicates if a license should be added.
maxNodeVersion
Optional
public java.lang.String getMaxNodeVersion();
- Type: java.lang.String
- Default: no max
Minimum node.js version to require via engines
(inclusive).
minNodeVersion
Optional
public java.lang.String getMinNodeVersion();
- Type: java.lang.String
- Default: no "engines" specified
Minimum Node.js version to require via package.json engines
(inclusive).
npmAccess
Optional
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.
npmProvenance
Optional
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
npmRegistryUrl
instead
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
.
npmRegistryUrl
Optional
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://")
npmTokenSecret
Optional
public java.lang.String getNpmTokenSecret();
- Type: java.lang.String
- Default: "NPM_TOKEN"
GitHub secret which contains the NPM token to use when publishing packages.
packageManager
Optional
public NodePackageManager getPackageManager();
- Type: io.github.cdklabs.projen.javascript.NodePackageManager
- Default: NodePackageManager.YARN_CLASSIC
The Node Package Manager used to execute scripts.
packageName
Optional
public java.lang.String getPackageName();
- Type: java.lang.String
- Default: defaults to project name
The "name" in package.json.
peerDependencyOptions
Optional
public PeerDependencyOptions getPeerDependencyOptions();
- Type: io.github.cdklabs.projen.javascript.PeerDependencyOptions
Options for peerDeps
.
peerDeps
Optional
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.
pnpmVersion
Optional
public java.lang.String getPnpmVersion();
- Type: java.lang.String
- Default: "7"
The version of PNPM to use if using PNPM as a package manager.
repository
Optional
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
repositoryDirectory
Optional
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.
scopedPackagesOptions
Optional
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.
stability
Optional
public java.lang.String getStability();
- Type: java.lang.String
Package's Stability.
yarnBerryOptions
Optional
public YarnBerryOptions getYarnBerryOptions();
- Type: io.github.cdklabs.projen.javascript.YarnBerryOptions
- Default: Yarn Berry v4 with all default options
Options for Yarn Berry.
jsiiReleaseVersion
Optional
public java.lang.String getJsiiReleaseVersion();
- Type: java.lang.String
- Default: "latest"
Version requirement of publib
which is used to publish modules to npm.
majorVersion
Optional
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.
minMajorVersion
Optional
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
.
npmDistTag
Optional
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.
postBuildSteps
Optional
public java.util.List<JobStep> getPostBuildSteps();
- Type: java.util.List
- Default: []
Steps to execute after build as part of the release workflow.
prerelease
Optional
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").
publishDryRun
Optional
public java.lang.Boolean getPublishDryRun();
- Type: java.lang.Boolean
- Default: false
Instead of actually publishing to package managers, just print the publishing command.
publishTasks
Optional
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.
releasableCommits
Optional
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.
releaseBranches
Optional
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
.
releaseFailureIssue
Optional
public java.lang.Boolean getReleaseFailureIssue();
- Type: java.lang.Boolean
- Default: false
Create a github issue on every failed publishing task.
releaseFailureIssueLabel
Optional
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.
releaseTagPrefix
Optional
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.
releaseTrigger
Optional
public ReleaseTrigger getReleaseTrigger();
- Type: io.github.cdklabs.projen.release.ReleaseTrigger
- Default: Continuous releases (
ReleaseTrigger.continuous()
)
The release trigger to use.
releaseWorkflowName
Optional
public java.lang.String getReleaseWorkflowName();
- Type: java.lang.String
- Default: "release"
The name of the default release workflow.
releaseWorkflowSetupSteps
Optional
public java.util.List<JobStep> getReleaseWorkflowSetupSteps();
- Type: java.util.List
A set of workflow steps to execute in order to setup the workflow container.
versionrcOptions
Optional
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.
workflowContainerImage
Optional
public java.lang.String getWorkflowContainerImage();
- Type: java.lang.String
- Default: default image
Container image to use for GitHub workflows.
workflowRunsOn
Optional
public java.util.List<java.lang.String> getWorkflowRunsOn();
- Type: java.util.List
- Default: ["ubuntu-latest"]
Github Runner selection labels.
workflowRunsOnGroup
Optional
public GroupRunnerOptions getWorkflowRunsOnGroup();
- Type: io.github.cdklabs.projen.GroupRunnerOptions
Github Runner Group selection options.
defaultReleaseBranch
Required
public java.lang.String getDefaultReleaseBranch();
- Type: java.lang.String
- Default: "main"
The name of the main release branch.
artifactsDirectory
Optional
public java.lang.String getArtifactsDirectory();
- Type: java.lang.String
- Default: "dist"
A directory which will contain build artifacts.
autoApproveUpgrades
Optional
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.
buildWorkflow
Optional
public java.lang.Boolean getBuildWorkflow();
- Type: java.lang.Boolean
- Default: true if not a subproject
Define a GitHub workflow for building PRs.
buildWorkflowOptions
Optional
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.
bundlerOptions
Optional
public BundlerOptions getBundlerOptions();
- Type: io.github.cdklabs.projen.javascript.BundlerOptions
Options for Bundler
.
checkLicenses
Optional
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.
codeCov
Optional
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
.
codeCovTokenSecret
Optional
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.
copyrightOwner
Optional
public java.lang.String getCopyrightOwner();
- Type: java.lang.String
- Default: defaults to the value of authorName or "" if
authorName
is undefined.
License copyright owner.
copyrightPeriod
Optional
public java.lang.String getCopyrightPeriod();
- Type: java.lang.String
- Default: current year
The copyright years to put in the LICENSE file.
dependabot
Optional
public java.lang.Boolean getDependabot();
- Type: java.lang.Boolean
- Default: false
Use dependabot to handle dependency upgrades.
Cannot be used in conjunction with depsUpgrade
.
dependabotOptions
Optional
public DependabotOptions getDependabotOptions();
- Type: io.github.cdklabs.projen.github.DependabotOptions
- Default: default options
Options for dependabot.
depsUpgrade
Optional
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
.
depsUpgradeOptions
Optional
public UpgradeDependenciesOptions getDepsUpgradeOptions();
- Type: io.github.cdklabs.projen.javascript.UpgradeDependenciesOptions
- Default: default options
Options for UpgradeDependencies
.
gitignore
Optional
public java.util.List<java.lang.String> getGitignore();
- Type: java.util.List
Additional entries to .gitignore.
jest
Optional
public java.lang.Boolean getJest();
- Type: java.lang.Boolean
- Default: true
Setup jest unit tests.
jestOptions
Optional
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.
npmignoreEnabled
Optional
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.
npmIgnoreOptions
Optional
public IgnoreFileOptions getNpmIgnoreOptions();
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .npmignore file.
package
Optional
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
).
prettier
Optional
public java.lang.Boolean getPrettier();
- Type: java.lang.Boolean
- Default: false
Setup prettier.
prettierOptions
Optional
public PrettierOptions getPrettierOptions();
- Type: io.github.cdklabs.projen.javascript.PrettierOptions
- Default: default options
Prettier options.
projenDevDependency
Optional
public java.lang.Boolean getProjenDevDependency();
- Type: java.lang.Boolean
- Default: true if not a subproject
Indicates of "projen" should be installed as a devDependency.
projenrcJs
Optional
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.
projenrcJsOptions
Optional
public ProjenrcOptions getProjenrcJsOptions();
- Type: io.github.cdklabs.projen.javascript.ProjenrcOptions
- Default: default options
Options for .projenrc.js.
projenVersion
Optional
public java.lang.String getProjenVersion();
- Type: java.lang.String
- Default: Defaults to the latest version.
Version of projen to install.
pullRequestTemplate
Optional
public java.lang.Boolean getPullRequestTemplate();
- Type: java.lang.Boolean
- Default: true
Include a GitHub pull request template.
pullRequestTemplateContents
Optional
public java.util.List<java.lang.String> getPullRequestTemplateContents();
- Type: java.util.List
- Default: default content
The contents of the pull request template.
release
Optional
public java.lang.Boolean getRelease();
- Type: java.lang.Boolean
- Default: true (false for subprojects)
Add release management to this project.
releaseToNpm
Optional
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
.
workflowBootstrapSteps
Optional
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.
workflowGitIdentity
Optional
public GitIdentity getWorkflowGitIdentity();
- Type: io.github.cdklabs.projen.github.GitIdentity
- Default: GitHub Actions
The git identity to use in workflows.
workflowNodeVersion
Optional
public java.lang.String getWorkflowNodeVersion();
- Type: java.lang.String
- Default: same as
minNodeVersion
The node version to use in GitHub workflows.
workflowPackageCache
Optional
public java.lang.Boolean getWorkflowPackageCache();
- Type: java.lang.Boolean
- Default: false
Enable Node.js package cache in GitHub workflows.
typeSpecOptions
Required
public TypeSpecModelOptions getTypeSpecOptions();
- Type: TypeSpecModelOptions
TypeSpec model options.
handlerLanguages
Optional
public java.util.List<Language> getHandlerLanguages();
- Type: java.util.List<Language>
The languages users have specified for handler projects (if any).
asyncApiSpecFile
Required
public java.lang.String getAsyncApiSpecFile();
- Type: java.lang.String
Path to the generated AsyncAPI specification (relative to the project root).
parsedSpecFile
Required
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). |
typeSpecOptions
Required
public TypeSpecModelOptions getTypeSpecOptions();
- Type: TypeSpecModelOptions
TypeSpec model options.
handlerLanguages
Optional
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. |
namespace
Required
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). |
name
Required
public java.lang.String getName();
- Type: java.lang.String
- Default: $BASEDIR
This is the name of your project.
commitGenerated
Optional
public java.lang.Boolean getCommitGenerated();
- Type: java.lang.Boolean
- Default: true
Whether to commit the managed files by default.
gitIgnoreOptions
Optional
public IgnoreFileOptions getGitIgnoreOptions();
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptions
Optional
public GitOptions getGitOptions();
- Type: io.github.cdklabs.projen.GitOptions
Configuration options for git.
logging
Optional
public LoggerOptions getLogging();
- Type: io.github.cdklabs.projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
outdir
Optional
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.
parent
Optional
public Project getParent();
- Type: io.github.cdklabs.projen.Project
The parent project, if this project is part of a bigger project.
projenCommand
Optional
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.
projenrcJson
Optional
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.
projenrcJsonOptions
Optional
public ProjenrcJsonOptions getProjenrcJsonOptions();
- Type: io.github.cdklabs.projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
renovatebot
Optional
public java.lang.Boolean getRenovatebot();
- Type: java.lang.Boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptions
Optional
public RenovatebotOptions getRenovatebotOptions();
- Type: io.github.cdklabs.projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
autoApproveOptions
Optional
public AutoApproveOptions getAutoApproveOptions();
- Type: io.github.cdklabs.projen.github.AutoApproveOptions
- Default: auto approve is disabled
Enable and configure the 'auto approve' workflow.
autoMerge
Optional
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.
autoMergeOptions
Optional
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.
clobber
Optional
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.
devContainer
Optional
public java.lang.Boolean getDevContainer();
- Type: java.lang.Boolean
- Default: false
Add a VSCode development environment (used for GitHub Codespaces).
github
Optional
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.
githubOptions
Optional
public GitHubOptions getGithubOptions();
- Type: io.github.cdklabs.projen.github.GitHubOptions
- Default: see GitHubOptions
Options for GitHub integration.
gitpod
Optional
public java.lang.Boolean getGitpod();
- Type: java.lang.Boolean
- Default: false
Add a Gitpod development environment.
~~mergify
~~Optional
- Deprecated: use
githubOptions.mergify
instead
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.mergifyOptions
instead
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).
projenCredentials
Optional
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.
readme
Optional
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' }"
stale
Optional
public java.lang.Boolean getStale();
- Type: java.lang.Boolean
- Default: false
Auto-close of stale issues and pull request.
See staleOptions
for options.
staleOptions
Optional
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
.
vscode
Optional
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.
allowLibraryDependencies
Optional
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.
authorEmail
Optional
public java.lang.String getAuthorEmail();
- Type: java.lang.String
Author's e-mail.
authorName
Optional
public java.lang.String getAuthorName();
- Type: java.lang.String
Author's name.
authorOrganization
Optional
public java.lang.Boolean getAuthorOrganization();
- Type: java.lang.Boolean
Is the author an organization.
authorUrl
Optional
public java.lang.String getAuthorUrl();
- Type: java.lang.String
Author's URL / Website.
autoDetectBin
Optional
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.
bin
Optional
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.
bugsEmail
Optional
public java.lang.String getBugsEmail();
- Type: java.lang.String
The email address to which issues should be reported.
bugsUrl
Optional
public java.lang.String getBugsUrl();
- Type: java.lang.String
The url to your project's issue tracker.
bundledDeps
Optional
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.
codeArtifactOptions
Optional
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
deps
Optional
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' ]
description
Optional
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
devDeps
Optional
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' ]
entrypoint
Optional
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
homepage
Optional
public java.lang.String getHomepage();
- Type: java.lang.String
Package's Homepage / Website.
keywords
Optional
public java.util.List<java.lang.String> getKeywords();
- Type: java.util.List
Keywords to include in package.json
.
license
Optional
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.
licensed
Optional
public java.lang.Boolean getLicensed();
- Type: java.lang.Boolean
- Default: true
Indicates if a license should be added.
maxNodeVersion
Optional
public java.lang.String getMaxNodeVersion();
- Type: java.lang.String
- Default: no max
Minimum node.js version to require via engines
(inclusive).
minNodeVersion
Optional
public java.lang.String getMinNodeVersion();
- Type: java.lang.String
- Default: no "engines" specified
Minimum Node.js version to require via package.json engines
(inclusive).
npmAccess
Optional
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.
npmProvenance
Optional
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
npmRegistryUrl
instead
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
.
npmRegistryUrl
Optional
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://")
npmTokenSecret
Optional
public java.lang.String getNpmTokenSecret();
- Type: java.lang.String
- Default: "NPM_TOKEN"
GitHub secret which contains the NPM token to use when publishing packages.
packageManager
Optional
public NodePackageManager getPackageManager();
- Type: io.github.cdklabs.projen.javascript.NodePackageManager
- Default: NodePackageManager.YARN_CLASSIC
The Node Package Manager used to execute scripts.
packageName
Optional
public java.lang.String getPackageName();
- Type: java.lang.String
- Default: defaults to project name
The "name" in package.json.
peerDependencyOptions
Optional
public PeerDependencyOptions getPeerDependencyOptions();
- Type: io.github.cdklabs.projen.javascript.PeerDependencyOptions
Options for peerDeps
.
peerDeps
Optional
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.
pnpmVersion
Optional
public java.lang.String getPnpmVersion();
- Type: java.lang.String
- Default: "7"
The version of PNPM to use if using PNPM as a package manager.
repository
Optional
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
repositoryDirectory
Optional
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.
scopedPackagesOptions
Optional
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.
stability
Optional
public java.lang.String getStability();
- Type: java.lang.String
Package's Stability.
yarnBerryOptions
Optional
public YarnBerryOptions getYarnBerryOptions();
- Type: io.github.cdklabs.projen.javascript.YarnBerryOptions
- Default: Yarn Berry v4 with all default options
Options for Yarn Berry.
jsiiReleaseVersion
Optional
public java.lang.String getJsiiReleaseVersion();
- Type: java.lang.String
- Default: "latest"
Version requirement of publib
which is used to publish modules to npm.
majorVersion
Optional
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.
minMajorVersion
Optional
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
.
npmDistTag
Optional
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.
postBuildSteps
Optional
public java.util.List<JobStep> getPostBuildSteps();
- Type: java.util.List
- Default: []
Steps to execute after build as part of the release workflow.
prerelease
Optional
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").
publishDryRun
Optional
public java.lang.Boolean getPublishDryRun();
- Type: java.lang.Boolean
- Default: false
Instead of actually publishing to package managers, just print the publishing command.
publishTasks
Optional
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.
releasableCommits
Optional
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.
releaseBranches
Optional
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
.
releaseFailureIssue
Optional
public java.lang.Boolean getReleaseFailureIssue();
- Type: java.lang.Boolean
- Default: false
Create a github issue on every failed publishing task.
releaseFailureIssueLabel
Optional
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.
releaseTagPrefix
Optional
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.
releaseTrigger
Optional
public ReleaseTrigger getReleaseTrigger();
- Type: io.github.cdklabs.projen.release.ReleaseTrigger
- Default: Continuous releases (
ReleaseTrigger.continuous()
)
The release trigger to use.
releaseWorkflowName
Optional
public java.lang.String getReleaseWorkflowName();
- Type: java.lang.String
- Default: "release"
The name of the default release workflow.
releaseWorkflowSetupSteps
Optional
public java.util.List<JobStep> getReleaseWorkflowSetupSteps();
- Type: java.util.List
A set of workflow steps to execute in order to setup the workflow container.
versionrcOptions
Optional
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.
workflowContainerImage
Optional
public java.lang.String getWorkflowContainerImage();
- Type: java.lang.String
- Default: default image
Container image to use for GitHub workflows.
workflowRunsOn
Optional
public java.util.List<java.lang.String> getWorkflowRunsOn();
- Type: java.util.List
- Default: ["ubuntu-latest"]
Github Runner selection labels.
workflowRunsOnGroup
Optional
public GroupRunnerOptions getWorkflowRunsOnGroup();
- Type: io.github.cdklabs.projen.GroupRunnerOptions
Github Runner Group selection options.
defaultReleaseBranch
Required
public java.lang.String getDefaultReleaseBranch();
- Type: java.lang.String
- Default: "main"
The name of the main release branch.
artifactsDirectory
Optional
public java.lang.String getArtifactsDirectory();
- Type: java.lang.String
- Default: "dist"
A directory which will contain build artifacts.
autoApproveUpgrades
Optional
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.
buildWorkflow
Optional
public java.lang.Boolean getBuildWorkflow();
- Type: java.lang.Boolean
- Default: true if not a subproject
Define a GitHub workflow for building PRs.
buildWorkflowOptions
Optional
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.
bundlerOptions
Optional
public BundlerOptions getBundlerOptions();
- Type: io.github.cdklabs.projen.javascript.BundlerOptions
Options for Bundler
.
checkLicenses
Optional
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.
codeCov
Optional
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
.
codeCovTokenSecret
Optional
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.
copyrightOwner
Optional
public java.lang.String getCopyrightOwner();
- Type: java.lang.String
- Default: defaults to the value of authorName or "" if
authorName
is undefined.
License copyright owner.
copyrightPeriod
Optional
public java.lang.String getCopyrightPeriod();
- Type: java.lang.String
- Default: current year
The copyright years to put in the LICENSE file.
dependabot
Optional
public java.lang.Boolean getDependabot();
- Type: java.lang.Boolean
- Default: false
Use dependabot to handle dependency upgrades.
Cannot be used in conjunction with depsUpgrade
.
dependabotOptions
Optional
public DependabotOptions getDependabotOptions();
- Type: io.github.cdklabs.projen.github.DependabotOptions
- Default: default options
Options for dependabot.
depsUpgrade
Optional
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
.
depsUpgradeOptions
Optional
public UpgradeDependenciesOptions getDepsUpgradeOptions();
- Type: io.github.cdklabs.projen.javascript.UpgradeDependenciesOptions
- Default: default options
Options for UpgradeDependencies
.
gitignore
Optional
public java.util.List<java.lang.String> getGitignore();
- Type: java.util.List
Additional entries to .gitignore.
jest
Optional
public java.lang.Boolean getJest();
- Type: java.lang.Boolean
- Default: true
Setup jest unit tests.
jestOptions
Optional
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.
npmignoreEnabled
Optional
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.
npmIgnoreOptions
Optional
public IgnoreFileOptions getNpmIgnoreOptions();
- Type: io.github.cdklabs.projen.IgnoreFileOptions
Configuration options for .npmignore file.
package
Optional
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
).
prettier
Optional
public java.lang.Boolean getPrettier();
- Type: java.lang.Boolean
- Default: false
Setup prettier.
prettierOptions
Optional
public PrettierOptions getPrettierOptions();
- Type: io.github.cdklabs.projen.javascript.PrettierOptions
- Default: default options
Prettier options.
projenDevDependency
Optional
public java.lang.Boolean getProjenDevDependency();
- Type: java.lang.Boolean
- Default: true if not a subproject
Indicates of "projen" should be installed as a devDependency.
projenrcJs
Optional
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.
projenrcJsOptions
Optional
public ProjenrcOptions getProjenrcJsOptions();
- Type: io.github.cdklabs.projen.javascript.ProjenrcOptions
- Default: default options
Options for .projenrc.js.
projenVersion
Optional
public java.lang.String getProjenVersion();
- Type: java.lang.String
- Default: Defaults to the latest version.
Version of projen to install.
pullRequestTemplate
Optional
public java.lang.Boolean getPullRequestTemplate();
- Type: java.lang.Boolean
- Default: true
Include a GitHub pull request template.
pullRequestTemplateContents
Optional
public java.util.List<java.lang.String> getPullRequestTemplateContents();
- Type: java.util.List
- Default: default content
The contents of the pull request template.
release
Optional
public java.lang.Boolean getRelease();
- Type: java.lang.Boolean
- Default: true (false for subprojects)
Add release management to this project.
releaseToNpm
Optional
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
.
workflowBootstrapSteps
Optional
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.
workflowGitIdentity
Optional
public GitIdentity getWorkflowGitIdentity();
- Type: io.github.cdklabs.projen.github.GitIdentity
- Default: GitHub Actions
The git identity to use in workflows.
workflowNodeVersion
Optional
public java.lang.String getWorkflowNodeVersion();
- Type: java.lang.String
- Default: same as
minNodeVersion
The node version to use in GitHub workflows.
workflowPackageCache
Optional
public java.lang.Boolean getWorkflowPackageCache();
- Type: java.lang.Boolean
- Default: false
Enable Node.js package cache in GitHub workflows.
typeSpecOptions
Required
public TypeSpecModelOptions getTypeSpecOptions();
- Type: TypeSpecModelOptions
TypeSpec model options.
handlerLanguages
Optional
public java.util.List<Language> getHandlerLanguages();
- Type: java.util.List<Language>
The languages users have specified for handler projects (if any).
parsedSpecFile
Required
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). |
typeSpecOptions
Required
public TypeSpecModelOptions getTypeSpecOptions();
- Type: TypeSpecModelOptions
TypeSpec model options.
handlerLanguages
Optional
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. |
apiKeySelectionExpression
Optional
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.
apiName
Optional
public java.lang.String getApiName();
- Type: java.lang.String
- Default: id of the WebSocketApi construct.
Name for the WebSocket API resource.
description
Optional
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. |
formats
Required
public java.util.List<WebSocketDocumentationFormat> getFormats();
- Type: java.util.List<WebSocketDocumentationFormat>
Formats for generated documentation.
options
Optional
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. |
languages
Required
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.
options
Optional
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. |
language
Required
public Language getLanguage();
- Type: Language
The language to generate the type-safe CDK infrastructure in.
options
Optional
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. |
libraries
Required
public java.util.List<WebSocketLibrary> getLibraries();
- Type: java.util.List<WebSocketLibrary>
The libraries to generate.
options
Optional
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. |
apiName
Required
public java.lang.String getApiName();
- Type: java.lang.String
Name of the API.
outdir
Required
public java.lang.String getOutdir();
- Type: java.lang.String
Directory of the model project.
parsedSpecFile
Required
public java.lang.String getParsedSpecFile();
- Type: java.lang.String
Name of the bundled OpenAPI specification file.
asyncApiSpecFile
Required
public java.lang.String getAsyncApiSpecFile();
- Type: java.lang.String
File name of the generated async api specification.
openapi
Optional
public OpenApiAsyncModelProject getOpenapi();
- Type: OpenApiAsyncModelProject
Reference to the OpenAPI model project.
Will be defined if the model language is OpenAPI
smithy
Optional
public SmithyAsyncModelProject getSmithy();
- Type: SmithyAsyncModelProject
Reference to the Smithy model project.
Will be defined if the model language is Smithy
typeSpec
Optional
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. |
path
Required
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. |
languages
Required
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.
options
Optional
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. |
autoDeploy
Optional
public java.lang.Boolean getAutoDeploy();
- Type: java.lang.Boolean
- Default: false
Whether updates to an API automatically trigger a new deployment.
description
Optional
public java.lang.String getDescription();
- Type: java.lang.String
- Default: no description
The description for the API stage.
domainMapping
Optional
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.
stageName
Optional
public java.lang.String getStageName();
- Type: java.lang.String
The name of the stage.
throttle
Optional
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. |
authorizationType
Required
- Type: software.amazon.awscdk.services.apigateway.AuthorizationType
The type of the authorizer.
authorizerId
Required
- Type: java.lang.String
The unique identifier for the authorizer.
authorizationScopes
Optional
- 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. |
authorizationType
Required
public AuthorizationType getAuthorizationType();
- Type: software.amazon.awscdk.services.apigateway.AuthorizationType
The type of the authorizer.
authorizerId
Required
public java.lang.String getAuthorizerId();
- Type: java.lang.String
The unique identifier for the authorizer.
authorizationScopes
Optional
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.
props
Required
- Type: CognitoAuthorizerProps
custom
import software.aws.pdk.type_safe_api.Authorizers;
Authorizers.custom(CustomAuthorizerProps props)
A custom authorizer.
props
Required
- 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.
props
Required
- 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. |
authorizerId
Required
- Type: java.lang.String
Unique identifier for this authorizer.
userPools
Required
- Type: java.util.List
The Cognito user pools associated with this authorizer.
authorizationScopes
Optional
- 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.
authorizationScopes
Required
- 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. |
authorizationType
Required
public AuthorizationType getAuthorizationType();
- Type: software.amazon.awscdk.services.apigateway.AuthorizationType
The type of the authorizer.
authorizerId
Required
public java.lang.String getAuthorizerId();
- Type: java.lang.String
The unique identifier for the authorizer.
authorizationScopes
Optional
public java.util.List<java.lang.String> getAuthorizationScopes();
- Type: java.util.List
Scopes for the authorizer, if any.
userPools
Required
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. |
responseSets
Required
- 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.
props
Required
- 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. |
authorizerId
Required
- Type: java.lang.String
Unique identifier for this authorizer.
function
Required
- Type: software.amazon.awscdk.services.lambda.IFunction
The lambda function used to authorize requests.
authorizerResultTtlInSeconds
Optional
- Type: java.lang.Number
- Default: 300
The number of seconds during which the authorizer result is cached.
identitySource
Optional
- Type: java.lang.String
- Default: "method.request.header.Authorization"
The source of the identity in an incoming request.
type
Optional
- 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. |
authorizationType
Required
public AuthorizationType getAuthorizationType();
- Type: software.amazon.awscdk.services.apigateway.AuthorizationType
The type of the authorizer.
authorizerId
Required
public java.lang.String getAuthorizerId();
- Type: java.lang.String
The unique identifier for the authorizer.
authorizationScopes
Optional
public java.util.List<java.lang.String> getAuthorizationScopes();
- Type: java.util.List
Scopes for the authorizer, if any.
authorizerResultTtlInSeconds
Required
public java.lang.Number getAuthorizerResultTtlInSeconds();
- Type: java.lang.Number
The number of seconds during which the authorizer result is cached.
function
Required
public IFunction getFunction();
- Type: software.amazon.awscdk.services.lambda.IFunction
The lambda function used to authorize requests.
identitySource
Required
public java.lang.String getIdentitySource();
- Type: java.lang.String
The source of the identity in an incoming request.
type
Required
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. |
responses
Optional
- 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.
props
Required
- 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. |
statusCode
Optional
- 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.
props
Required
- 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. |
authorizationType
Required
public AuthorizationType getAuthorizationType();
- Type: software.amazon.awscdk.services.apigateway.AuthorizationType
The type of the authorizer.
authorizerId
Required
public java.lang.String getAuthorizerId();
- Type: java.lang.String
The unique identifier for the authorizer.
authorizationScopes
Optional
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.
_props
Required
- Type: IntegrationGrantProps
render
public ApiGatewayIntegration render(IntegrationRenderProps props)
Render the integration into an API Gateway OpenAPI extension.
props
Required
- 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.
props
Required
- 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.
responseSets
Required
- 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.
props
Required
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.
props
Optional
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.
lambdaFunction
Required
- 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.
response
Required
- 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.
props
Required
- 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. |
lambdaFunction
Required
- 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.
__0
Required
- Type: IntegrationGrantProps
render
public ApiGatewayIntegration render(IntegrationRenderProps _props)
Render the lambda integration as a snippet of OpenAPI.
_props
Required
- 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. |
statusCode
Required
- Type: java.lang.Number
HTTP response status code.
body
Optional
- 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.
_props
Required
- Type: IntegrationGrantProps
render
public ApiGatewayIntegration render(IntegrationRenderProps props)
Render the integration into an API Gateway OpenAPI extension.
props
Required
- 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. |
authorizationType
Required
public AuthorizationType getAuthorizationType();
- Type: software.amazon.awscdk.services.apigateway.AuthorizationType
The type of the authorizer.
authorizerId
Required
public java.lang.String getAuthorizerId();
- Type: java.lang.String
The unique identifier for the authorizer.
authorizationScopes
Optional
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)
// .integrationResponseSet(IntegrationResponseSet)
// .method(java.lang.String)
// .path(java.lang.String)
.build();
Name | Type | Description |
---|---|---|
bucket |
software.amazon.awscdk.services.s3.IBucket |
The S3 bucket to be invoked on integration. |
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. |
bucket
Required
- Type: software.amazon.awscdk.services.s3.IBucket
The S3 bucket to be invoked on integration.
integrationResponseSet
Optional
- Type: IntegrationResponseSet
- Default: a combination of IntegrationResponseSets.defaultPassthrough() and IntegrationResponseSets.s3JsonErrorMessage()
Override the integration response set for the S3 integration.
method
Optional
- Type: java.lang.String
- Default: integration method is used
The HTTP method to use when invoking the S3 bucket.
path
Optional
- Type: java.lang.String
- Default: integration path is used
The path override to use when invoking the S3 bucket.
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.
__0
Required
- Type: IntegrationGrantProps
render
public ApiGatewayIntegration render(IntegrationRenderProps props)
Render the S3 integration as a snippet of OpenAPI.
props
Required
- 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.
props
Required
- 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_18
NODE_20
PythonVersion
Versions of python.
Members
Name | Description |
---|---|
PYTHON_3_11 |
No description. |
PYTHON_3_12 |
No description. |
PYTHON_3_11
PYTHON_3_12
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. |