mirror of
https://github.com/litruv/picoGraph.git
synced 2026-07-24 02:36:04 +10:00
32 lines
791 B
JavaScript
32 lines
791 B
JavaScript
import { createNodeModule } from "../../nodeTypes.js";
|
|
|
|
/**
|
|
* Queries system status values exposed through stat().
|
|
*/
|
|
export const statNode = createNodeModule(
|
|
{
|
|
id: "system_stat",
|
|
title: "System Status",
|
|
category: "System",
|
|
description: "Fetch a system status value using the stat(index) helper.",
|
|
searchTags: ["stat", "status", "system", "metrics"],
|
|
inputs: [
|
|
{
|
|
id: "index",
|
|
name: "Index",
|
|
direction: "input",
|
|
kind: "number",
|
|
defaultValue: 0,
|
|
},
|
|
],
|
|
outputs: [{ id: "value", name: "Value", direction: "output", kind: "any" }],
|
|
properties: [],
|
|
},
|
|
{
|
|
evaluateValue: ({ resolveValueInput }) => {
|
|
const index = resolveValueInput("index", "0");
|
|
return `stat(${index})`;
|
|
},
|
|
}
|
|
);
|