Skip to content

Commit

Permalink
formatted with deno
Browse files Browse the repository at this point in the history
  • Loading branch information
Avaray committed Nov 30, 2024
1 parent 5ea17fc commit 3dcece0
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import { rm } from "node:fs/promises";

import {
executeCommand,
getIds,
getBranchName,
getEnvironmentVariable,
getIds,
pvsUrl,
runtime,
saveFile,
pvsUrl,
} from "./utils";

import { uis } from "./data/uis";
Expand Down Expand Up @@ -97,6 +97,8 @@ async function deleteVastaiTemplate(id: number) {

// Iterate over all UIs
for (const ui of uis) {
console.log(`Processing UI: ${ui.name}`);

// Currently it's just a shebang
const header: string = [
"#!/bin/bash",
Expand Down Expand Up @@ -252,11 +254,13 @@ for (const ui of uis) {
`${ui.name}UI - ${checkpoint.name} ${checkpoint.version.toUpperCase()} - ${checkpoint.base.toUpperCase()}`,
pvsUrl(ui, branch, checkpoint.id!),
ui.image,
ui.flags!
ui.flags!,
);

if (template.id) {
console.log(`Template for ${ui.name}UI with ${checkpoint.name} created with id ${template.id}`);
console.log(
`Template for ${ui.name}UI with ${checkpoint.name} created with id ${template.id}`,
);
// templates[checkpoint.id!].vastai[ui.id] = template.id;
if (!templates[checkpoint.id!]) {
templates[checkpoint.id!] = { vastai: {} };
Expand All @@ -269,7 +273,6 @@ for (const ui of uis) {
}
}


await saveFile("data/templates.json", JSON.stringify(templates, null, 2));

console.log("Done");

0 comments on commit 3dcece0

Please sign in to comment.