App
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new App(
options?:object):App
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
|
|
{ |
‐ |
|
|
|
Header comment for every generated file. Four shapes are accepted:
|
|
|
|
Path to the pin lockfile, relative to |
|
|
|
Pre-loaded project options. When omitted, |
|
|
|
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:Document,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(): [
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”[string, string][]
documents()
Section titled “documents()”documents():
Document[]
The registered Documents (Workflows and Actions), in registration order.
The public accessor for pin and other read-only consumers; the
{ item, relPath } storage stays internal to App.
Returns
Section titled “Returns”Document[]
synth()
Section titled “synth()”synth():
string[]
Synthesize all registered items to YAML files.
Returns the absolute paths of every file written. Synchronous: render and every transform
are synchronous, and file writes use the sync node:fs API.
Returns
Section titled “Returns”string[]