@atolis-hq/corum 0.1.7 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -17,4 +17,13 @@ export async function installPackFiles(baseUrl, destDir, fetchFn = fetch) {
|
|
|
17
17
|
throw new Error(`Failed to fetch template ${templateName}: ${res.status} ${res.statusText}`);
|
|
18
18
|
await writeFile(path.join(destDir, 'templates', `${templateName}.yaml`), await res.text());
|
|
19
19
|
}
|
|
20
|
+
for (const filePath of meta.files ?? []) {
|
|
21
|
+
const fileUrl = `${baseUrl}/${filePath}`;
|
|
22
|
+
const res = await fetchFn(fileUrl);
|
|
23
|
+
if (!res.ok)
|
|
24
|
+
throw new Error(`Failed to fetch file ${filePath}: ${res.status} ${res.statusText}`);
|
|
25
|
+
const dest = path.join(destDir, filePath);
|
|
26
|
+
await mkdir(path.dirname(dest), { recursive: true });
|
|
27
|
+
await writeFile(dest, await res.text());
|
|
28
|
+
}
|
|
20
29
|
}
|