forge
Projects kept on Forge, for the editor's pickers, and adding one to a game as a dependency. balaur add and balaur fetch are the same code. BALAUR_FORGE…
On this page
Projects kept on Forge, for the editor's pickers, and adding one to a game as a dependency. balaur add and balaur fetch are the same code. BALAUR_FORGE names the Forge and BALAUR_FORGE_TOKEN reads private projects.
6 functions, 0 constants. Scripts reach it as forge::.
Functions
Argument kinds are the script values a call passes: node is a node handle, any a table or value of any kind, fn a callback.
| function | acts on | what it does |
|---|---|---|
add(string, string) -> bool |
— | Add owner/name to the game's [dependencies] and fetch it into deps/<alias>/, on a thread. listen hears { kind: "fetched", alias } or failed with job: "add". |
copy(string, string) -> bool |
— | Copy owner/name at its default branch into a new folder under parent, with its dependencies fetched, on a thread: the project manager's Open a copy. listen hears { kind: "copied", path } or failed with job: "copy". |
fetch(string, bool) -> bool |
— | Fill the game's deps/ from project.lock, or with update move each dependency to its newest commit, on a thread. listen hears { kind: "fetched", alias: "" } or failed with job: "fetch". |
listen(Node, any) |
— | Call a method on node with every report: on_forge_event unless opts.on_event names another. |
search(string, string) -> bool |
— | List public projects on a thread, either filter empty for none. listen hears { kind: "listed", rows }, each { project, description, tags, license } with project as owner/name, or { kind: "failed", job: "search", message }. False while a recording plays. |
url() -> string |
— | The Forge this machine asks, without a trailing slash. |