@flui-cloud/spec
v0.5.0
Published
Open specification, JSON Schema and TypeScript types for the flui.yaml application manifest.
Maintainers
Readme
@flui-cloud/spec
Reference TypeScript implementation of the
Flui flui.yaml manifest specification.
Pure, dependency-light validator usable in Node, browsers (with a YAML polyfill), CI pipelines and CLI tools. Does not depend on NestJS or any runtime framework.
Install
pnpm add @flui-cloud/specUsage
import { parseYaml, validate } from '@flui-cloud/spec';
const manifest = parseYaml(rawYaml); // throws on bad YAML
const result = validate(manifest); // never throws
if (!result.valid) {
for (const err of result.errors) {
console.error(`${err.path} ${err.message}`);
}
process.exit(1);
}
console.log(`OK — kind=${result.manifest.kind} apiVersion=${result.manifest.apiVersion}`);CLI
npx @flui-cloud/spec validate ./flui.yamlWhat's validated
- Syntactic — JSON Schema (Draft-07, validated with AJV).
- Semantic — pure post-checks: dependency cycles in
kind: CatalogAppspec.components, consistency ofmetadata.clientFor/metadata.clientDefaultFor/spec.linkedBuildingBlocks.
Anything that depends on runtime context (does the cluster exist? are the credentials valid? is the DNS zone configured?) is not part of the spec — it lives in the orchestrator that applies the manifest.
