diff --git a/deno.json b/deno.json index a19d8eb..e7d5d66 100644 --- a/deno.json +++ b/deno.json @@ -3,7 +3,6 @@ "prod": "deno run --watch --allow-env --env --allow-net --allow-read --allow-write src/main.ts" }, "imports": { - "@astral/astral": "jsr:@astral/astral@^0.5.3", "@hono/hono": "jsr:@hono/hono@^4.8.12", "@std/assert": "jsr:@std/assert@1" }, diff --git a/src/functions.ts b/src/functions.ts index 0882cf2..728d879 100644 --- a/src/functions.ts +++ b/src/functions.ts @@ -39,17 +39,4 @@ export function formatNumber(n: number): string { if (n >= 1_000_000) return (n / 1_000_000).toFixed(1).replace(/\.0$/, '') + 'M'; if (n >= 1_000) return (n / 1_000).toFixed(1).replace(/\.0$/, '') + 'K'; return n.toString(); -} - -export async function takeScreenshot(url: string): Promise { - await using browser = await launch(); - - await using page = await browser.newPage(url); - - const screenshot = await page.screenshot(); - - browser.close() - - return screenshot.buffer - -} +} \ No newline at end of file diff --git a/src/gh/pkgs/script.ts b/src/gh/pkgs/script.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/gh/pkgs/templates/pkgs.svg b/src/gh/pkgs/templates/pkgs.svg new file mode 100644 index 0000000..8d16a39 --- /dev/null +++ b/src/gh/pkgs/templates/pkgs.svg @@ -0,0 +1,18 @@ + + + + Packages used in this project + + + + + NPM Packages + + + - jwtkn: v0.1.1 + + + - @headlessui/react: v2.2.6 + + + \ No newline at end of file diff --git a/src/gh/profile/profile.ts b/src/gh/profile/script.ts similarity index 100% rename from src/gh/profile/profile.ts rename to src/gh/profile/script.ts diff --git a/src/gh/repo/repo.ts b/src/gh/repo/script.ts similarity index 97% rename from src/gh/repo/repo.ts rename to src/gh/repo/script.ts index 3de606b..69151a5 100644 --- a/src/gh/repo/repo.ts +++ b/src/gh/repo/script.ts @@ -2,7 +2,7 @@ import { Hono } from '@hono/hono' import { escapeXml, getLangColor, topLang } from "../../functions.ts"; const api = 'https://api.github.com/repos/' -const key = Deno.env.get('GH_TOKEN') +//const key = Deno.env.get('GH_TOKEN') export default function getGhRepo(app: Hono) { app.get('/gh/repo/:owner/:repo', async (c) => { @@ -25,7 +25,7 @@ export default function getGhRepo(app: Hono) { const repo_req = await fetch(`${api}${owner}/${repo}`, { headers: { 'User-Agent': 'PinStack - @ItsMatheesha[Github]', - 'Authorization': `Bearer ${key}` + // 'Authorization': `Bearer ${key}` } }) //if the api request failed diff --git a/src/main.ts b/src/main.ts index 703aa9f..48302f8 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,6 +1,6 @@ import { Hono } from '@hono/hono' -import getGhRepo from "./gh/repo/repo.ts"; -import getGhprofile from "./gh/profile/profile.ts"; +import getGhRepo from "./gh/repo/script.ts"; +import getGhprofile from "./gh/profile/script.ts"; const app = new Hono()