diff --git a/.gitignore b/.gitignore index 6d63e09..232c029 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ .env .env.test -sampledata/ \ No newline at end of file +sampledata/ +.DS_Store \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index a2ccf48..c801fc2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM denoland/deno:distroless-1.34.1@sha256:a01b4263047b65badb3ef0315d7dbd14ba89950c6e98332a5913a624abb4480c +FROM denoland/deno:distroless-1.38.2@sha256:90b88cbc9bb1484085c7fae9e3f8ff6275c7bb15b716cdd137076a38394ff2c9 ENV DENO_ENV=production WORKDIR /app diff --git a/main.ts b/main.ts index b6e7a71..8e792fd 100644 --- a/main.ts +++ b/main.ts @@ -6,10 +6,15 @@ const baseUrl = "https://api.fly.io"; export interface AppsList { id: string; + name: string; + deployed: boolean; status: string; organization: { slug: string; }; + currentRelease: { + createdAt: string; + }; } interface LogObject { @@ -116,7 +121,7 @@ async function getLogsFor( } catch (err) { // log error if (!err.message.startsWith("E11000 duplicate key error collection:")) { - console.log(`ERROR with APP-ID: ${appId}`) + console.log(`ERROR with APP-ID: ${appId}`); console.log(err); } } @@ -152,7 +157,7 @@ async function getLatestAppsList() { }, body: JSON.stringify({ query: `query { - apps(type: "container", first: 400, role: null) { + apps(first: 400, role: null) { nodes { id name @@ -200,7 +205,7 @@ async function getLatestAppsList() { { key: { message: "text" }, name: "message_text_index" }, ], }); - + // Create next_token key if doesn't exist in cache if (!nextTokenCache[app.id]) { nextTokenCache[app.id] = "";