From 66862f83c0314c651b87a27e1f0ed1894a224b6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=A9clairevoyant?= <848000+eclairevoyant@users.noreply.github.com> Date: Thu, 23 Jan 2025 00:59:45 -0500 Subject: [PATCH] modules/common: add manifest v1 CUE file for validation --- manifest/v1.cue | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 manifest/v1.cue diff --git a/manifest/v1.cue b/manifest/v1.cue new file mode 100644 index 0000000..51d582b --- /dev/null +++ b/manifest/v1.cue @@ -0,0 +1,31 @@ +#path_string: string & =~ "^/" +#file_string: #path_string & =~ "[^/]$" +#octal_string: string & =~ "^[0-7]{3,4}$" + +#HjemFile: { + type!: string + source?: #path_string + target!: #path_string + clobber?: bool + permissions?: #octal_string + uid?: int & >=0 + gid?: int & >=0 + deactivate?: bool +} & ({ + type: "copy" + target!: #file_string + source!: #file_string + ... +} | { + type: "symlink" + source!: _ + ... +} | { + type: "delete" | "directory" | "modify" + ... +}) + +{ + version: 1 + files: [...#HjemFile] +}