Something went wrong. Try again.
A collection of reusable WebAssembly modules for building composable CI/CD pipelines with FluentCI
Something went wrong. Try again.
123456789101112131415161718192021222324252627import { build } from "esbuild";import { mkdirSync } from "node:fs";import { spawnSync } from "node:child_process";function command(program, args) { const result = spawnSync(program, args, { stdio: "inherit" }); if (result.error) throw result.error; if (result.status !== 0) throw Error(`${program} failed with exit status ${result.status}`);}command("spago", ["build"]);mkdirSync("dist", { recursive: true });await build({ entryPoints: ["entry.mjs"], outfile: "dist/plugin.cjs", bundle: true, format: "cjs", platform: "neutral", target: "es2020",});command("extism-js", [ "dist/plugin.cjs", "-i", "imports.d.ts", "-o", "dist/plugin.wasm",]);