Something went wrong. Try again.
A collection of +180 reusable WebAssembly modules for building composable CI/CD pipelines with FluentCI fluentci.io/modules
Something went wrong. Try again.
12345678910111213141516171819202122import { Just, Nothing } from "../Data.Maybe/index.js";
// The compiler/WIT boundary checks field types. Encode the flat record without// deeply recursive Argonaut row dictionaries (large Buildx contracts exceed the// guest engine's initialization stack otherwise).export const encodeInput = (args) => { const object = {}; for (const [key, wrapped] of Object.entries(args)) { if (wrapped === Nothing.value) continue; const value = wrapped instanceof Just ? wrapped.value0 : wrapped; if ( typeof value === "string" || typeof value === "boolean" || (typeof value === "number" && Number.isFinite(value)) || (Array.isArray(value) && value.every((item) => typeof item === "string")) ) object[key] = value; else throw Error("Unsupported typed argument " + key); } return object;};