@idoa/graph-pipeline
v0.1.0
Published
A minimal CLI for running Graph subgraph build and test pipelines.
Downloads
18
Readme
Graph pipeline kit
Graph pipeline kit is a small Node.js CLI that runs a basic pipeline for The Graph subgraph projects. It checks whether the current directory looks like a subgraph project, runs graph build, optionally runs tests, reads a lightweight YAML config when present, and always prints a predictable JSON result that is easy to consume in local scripts or CI.
Requirements
- Node.js 20+
- npm
Install From npm
npm install -g @idoa/graph-pipelineOr run it directly:
npx @idoa/graph-pipeline runLocal Development
npm install
npm run build
npm exec -- graph-pipeline runUsage
Run in a subgraph project directory:
graph-pipeline runThe CLI looks for:
subgraph.yamlgraph-pipeline.yaml(optional)package.jsontest script (optional)- a local
graphCLI innode_modules/.binfor the build step
Behavior:
- If
subgraph.yamlis missing, output is still returned and the command does not crash. - If the build command fails, output still returns JSON.
- If no
testscript exists, tests are marked asskipped.
Security note:
- Run this tool only in subgraph projects you trust, because it executes local build and test commands.
Config
Create graph-pipeline.yaml to control which steps run:
pipeline:
build: true
test: trueIf the file does not exist or cannot be parsed, defaults are used.
Output
Example output:
{
"build": "ok",
"tests": "passed"
}When no subgraph project is detected:
{
"build": "fail",
"tests": "skipped"
}