mirror of
https://github.com/litruv/picoGraph.git
synced 2026-07-24 02:36:04 +10:00
36 lines
994 B
JavaScript
36 lines
994 B
JavaScript
import { createNodeModule } from "../../nodeTypes.js";
|
|
|
|
/**
|
|
* Applies host configuration flags via devkit_config().
|
|
*/
|
|
export const devkitConfigNode = createNodeModule(
|
|
{
|
|
id: "devkit_config",
|
|
title: "Devkit Config",
|
|
category: "Devkit",
|
|
description: "Send a configuration string to devkit_config().",
|
|
searchTags: ["devkit", "config", "host"],
|
|
inputs: [
|
|
{ id: "exec_in", name: "Exec", direction: "input", kind: "exec" },
|
|
{
|
|
id: "config",
|
|
name: "Config",
|
|
direction: "input",
|
|
kind: "string",
|
|
defaultValue: "",
|
|
},
|
|
],
|
|
outputs: [
|
|
{ id: "exec_out", name: "Exec", direction: "output", kind: "exec" },
|
|
],
|
|
properties: [],
|
|
},
|
|
{
|
|
emitExec: ({ indent, indentLevel, resolveValueInput, emitNextExec }) => {
|
|
const config = resolveValueInput("config", '""');
|
|
const line = `${indent(indentLevel)}devkit_config(${config})`;
|
|
return [line, ...emitNextExec("exec_out")];
|
|
},
|
|
}
|
|
);
|