particle-os-cli/template/templates/modules/copy/copy.tsp
xyny f89fa3f159
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 .
2024-07-27 10:31:52 -04:00

21 lines
No EOL
637 B
Text

import "@typespec/json-schema";
using TypeSpec.JsonSchema;
@jsonSchema("/modules/copy.json")
model CopyModule {
/** The copy module is a short-hand method of adding a COPY instruction into the Containerfile.
* https://blue-build.org/reference/modules/copy/
*/
type: "containerfile";
/** Equivalent to the --from property in a COPY statement, use to specify an image to copy from.
* By default, the COPY source is the build environment's file tree.
*/
from?: string;
/** Path to source file or directory. */
src: string;
/** Path to destination file or directory. */
dest: string;
}