deploy: configure NC01 HWLAB monitor exposure

This commit is contained in:
root
2026-07-08 05:34:11 +02:00
parent 5dfb78f000
commit a328aa909e
41 changed files with 2522 additions and 110 deletions
+3 -2
View File
@@ -716,16 +716,17 @@ export function readTextFile(path: string): string {
return readFileSync(path, "utf8");
}
export function readEnvSourceFile(params: { root: string; sourceRef: string; missingMessage?: (sourcePath: string) => string }): EnvSourceFileMaterial {
export function readEnvSourceFile(params: { root: string; sourceRef: string; rawKey?: string; missingMessage?: (sourcePath: string) => string }): EnvSourceFileMaterial {
const sourcePath = join(params.root, params.sourceRef);
if (!existsSync(sourcePath)) {
throw new Error(params.missingMessage?.(sourcePath) ?? `required secret source ${redactRepoPath(sourcePath)} is missing`);
}
const text = readFileSync(sourcePath, "utf8");
return {
sourceRef: params.sourceRef,
sourcePath,
sourcePathRedacted: redactRepoPath(sourcePath),
values: parseEnvFile(readFileSync(sourcePath, "utf8")),
values: params.rawKey === undefined ? parseEnvFile(text) : { [params.rawKey]: text.trim() },
valuesPrinted: false,
};
}