App
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new App(
options?:object):App
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
|
|
{ |
‐ |
|
|
|
Custom header comment template for generated files. May contain |
|
|
|
Path to the pin lockfile, relative to |
|
|
|
Repository root directory. All registered output paths and the lockfile are resolved relative
to this. Defaults to |
|
|
readonly |
Additional model transforms to apply during synthesis. The pin transform is auto-registered when a lockfile is present; these are appended after it. |
Returns
Section titled “Returns”App
Properties
Section titled “Properties”| Property | Modifier | Type |
|---|---|---|
|
|
readonly |
|
|
|
|
|
|
|
|
|
|
|
|
Methods
Section titled “Methods”add(
item:SynthItem,path:string):void
Register an item at an explicit path relative to root.
Use this escape hatch when you need to write to a path that doesn’t fit the standard
conventions. For the common cases, prefer addWorkflow() / addAction().
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
|
|
|
Returns
Section titled “Returns”void
addAction()
Section titled “addAction()”addAction(
action:ActionModel,dir?:string):void
Register an action, writing {dir}/action.yml (defaults to repo root).
Parameters
Section titled “Parameters”| Parameter | Type | Default value |
|---|---|---|
|
|
|
|
|
|
|
|
Returns
Section titled “Returns”void
addWorkflow()
Section titled “addWorkflow()”addWorkflow(
workflow:WorkflowModel,filename:string):void
Register a workflow at .github/workflows/{filename}.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
|
|
|
Returns
Section titled “Returns”void
check()
Section titled “check()”check():
Promise<[string,string][]>
Check whether the on-disk YAML matches what synth() would write.
Returns one [path, diff] tuple for each file that’s stale or missing. An empty list means
everything is in sync.
Returns
Section titled “Returns”Promise<[string, string][]>
synth()
Section titled “synth()”synth():
Promise<string[]>
Synthesize all registered items to YAML files.
Returns the absolute paths of every file written. Asynchronous so we have room to add async transforms in the future without breaking the API.
Returns
Section titled “Returns”Promise<string[]>