fix: add typespec schemas for cli modules, remove modules.json (not needed anymore) (#209)

The website build process now uses the GitHub API to generate a global
`modules.json`. If you decide to move the directory containing all the
modules, please tell me, or make a PR changing [this
line](9eb198c4e5/astro.config.mjs (L102)).
If you don't, I'll find out anyways, because the website builds will
break.

Also, whenever updating the modules, make sure the schema is updated too
to match the current state of the module. If you need help with writing
[TypeSpec](https://typespec.io/), consult me, but you probably wont,
since it's just a type system kind of like TypeScript's or Rust's .
This commit is contained in:
xyny 2024-07-27 14:31:52 +00:00 committed by GitHub
parent e36bb74231
commit f89fa3f159
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 39 additions and 8 deletions

View file

@ -0,0 +1,16 @@
import "@typespec/json-schema";
using TypeSpec.JsonSchema;
@jsonSchema("/modules/containerfile.json")
model ContainerfileModule {
/** The containerfile module is a tool for adding custom Containerfile instructions for custom image builds.
* https://blue-build.org/reference/modules/containerfile/
*/
type: "containerfile";
/** Lines to directly insert into the generated Containerfile. */
snippets?: Array<string>;
/** Names of directories in ./containerfiles/ containing each a Containerfile to insert into the generated Containerfile. */
containerfiles?: Array<string>;
}

View file

@ -1,6 +1,5 @@
name: containerfile
shortdesc: The containerfile module enables the addition of custom Containerfile instructions into the build process.
readme: https://raw.githubusercontent.com/blue-build/cli/main/template/templates/modules/containerfile/README.md
example: |
type: containerfile
snippets: