Spaces:
Sleeping
Sleeping
Download backend/scripts/export-builtin-workflows.mjs from bardd/mike-backend: direct link, hf CLI and curl.
- Browser
- Download file 791 Bytes
-
https://huggingface.co/spaces/bardd/mike-backend/resolve/main/backend/scripts/export-builtin-workflows.mjs
- Command line
-
hf download hf://spaces/bardd/mike-backend/backend/scripts/export-builtin-workflows.mjs
-
curl -L -o export-builtin-workflows.mjs https://huggingface.co/spaces/bardd/mike-backend/resolve/main/backend/scripts/export-builtin-workflows.mjs
791 Bytes
| /** | |
| * Single workflow export script — reads backend canonical sources and writes | |
| * frontend/src/generated/builtin-workflows.json. | |
| */ | |
| import { spawnSync } from "node:child_process"; | |
| import { dirname, join } from "node:path"; | |
| import { fileURLToPath } from "node:url"; | |
| const __dirname = dirname(fileURLToPath(import.meta.url)); | |
| const BACKEND = join(__dirname, ".."); | |
| const runner = join(BACKEND, "scripts/lib/assemble-builtin-workflows-for-export.ts"); | |
| const result = spawnSync("npx", ["tsx", runner], { | |
| cwd: BACKEND, | |
| encoding: "utf8", | |
| stdio: ["ignore", "pipe", "pipe"], | |
| }); | |
| if (result.stdout) process.stdout.write(result.stdout); | |
| if (result.stderr) process.stderr.write(result.stderr); | |
| if (result.status !== 0) { | |
| process.exit(result.status ?? 1); | |
| } | |