diff --git a/.dvmrc b/.dvmrc index 021b2b8..6f7c8cd 100644 --- a/.dvmrc +++ b/.dvmrc @@ -1 +1 @@ -1.41.3 +1.42.4 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d90355b..87af47a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,7 +9,7 @@ jobs: - uses: actions/checkout@v4 - uses: denoland/setup-deno@v1 with: - deno-version: v1.41.3 + deno-version: v1.42.4 - run: | make test make build diff --git a/Dockerfile b/Dockerfile index 7860c92..6ffedb5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM denoland/deno:ubuntu-1.41.3 +FROM denoland/deno:ubuntu-1.42.4 EXPOSE 8000 diff --git a/crons/cleanup.ts b/crons/cleanup.ts index d13ab11..5f4e746 100644 --- a/crons/cleanup.ts +++ b/crons/cleanup.ts @@ -6,6 +6,8 @@ export async function cleanupSessions() { const yesterday = new Date(new Date().setUTCDate(new Date().getUTCDate() - 1)); try { + console.info('Will cleanup user sessions'); + const result = await db.query<{ count: number }>( sql`WITH "deleted" AS ( DELETE FROM "bewcloud_user_sessions" WHERE "expires_at" <= $1 RETURNING * @@ -16,8 +18,8 @@ export async function cleanupSessions() { ], ); - console.log('Deleted', result[0].count, 'user sessions'); + console.info('Deleted', result[0].count, 'user sessions'); } catch (error) { - console.log(error); + console.error(error); } } diff --git a/crons/index.ts b/crons/index.ts index d414da8..979d273 100644 --- a/crons/index.ts +++ b/crons/index.ts @@ -1,4 +1,4 @@ -import { Cron } from 'https://deno.land/x/croner@7.0.1/dist/croner.js'; +import { Cron } from 'https://deno.land/x/croner@8.0.1/dist/croner.js'; import { cleanupSessions } from './cleanup.ts'; import { fetchNewArticles } from './news.ts'; diff --git a/crons/news.ts b/crons/news.ts index 3be18b4..9828b06 100644 --- a/crons/news.ts +++ b/crons/news.ts @@ -16,10 +16,12 @@ export async function fetchNewArticles(forceFetch = false) { ], ); + console.info('Will crawl', feedsToCrawl.length, 'news feeds'); + await concurrentPromises(feedsToCrawl.map((newsFeed) => () => crawlNewsFeed(newsFeed)), 3); - console.log('Crawled', feedsToCrawl.length, 'news feeds'); + console.info('Crawled', feedsToCrawl.length, 'news feeds'); } catch (error) { - console.log(error); + console.error(error); } } diff --git a/import_map.json b/import_map.json index 4a85df7..5f6ef90 100644 --- a/import_map.json +++ b/import_map.json @@ -11,10 +11,10 @@ "preact/": "https://esm.sh/preact@10.19.6/", "@preact/signals": "https://esm.sh/*@preact/signals@1.2.2", "@preact/signals-core": "https://esm.sh/*@preact/signals-core@1.5.1", - "tailwindcss": "npm:tailwindcss@3.4.1", - "tailwindcss/": "npm:/tailwindcss@3.4.1/", - "tailwindcss/plugin": "npm:/tailwindcss@3.4.1/plugin.js", - "std/": "https://deno.land/std@0.220.1/", - "$std/": "https://deno.land/std@0.220.1/" + "tailwindcss": "npm:tailwindcss@3.4.3", + "tailwindcss/": "npm:/tailwindcss@3.4.3/", + "tailwindcss/plugin": "npm:/tailwindcss@3.4.3/plugin.js", + "std/": "https://deno.land/std@0.223.0/", + "$std/": "https://deno.land/std@0.223.0/" } } diff --git a/routes/dashboard.tsx b/routes/dashboard.tsx index d10d82d..fb6f862 100644 --- a/routes/dashboard.tsx +++ b/routes/dashboard.tsx @@ -25,7 +25,7 @@ export const handler: Handlers = { }, }; -export default function Dashboard({ data }: PageProps) { +export default function DashboardPage({ data }: PageProps) { const initialNotes = data?.userDashboard?.data?.notes || 'Jot down some notes here.'; return ( diff --git a/routes/settings.tsx b/routes/settings.tsx index 18a5a03..c37984a 100644 --- a/routes/settings.tsx +++ b/routes/settings.tsx @@ -1,6 +1,6 @@ import { Handlers, PageProps } from 'fresh/server.ts'; -import { Dashboard, FreshContextState } from '/lib/types.ts'; +import { FreshContextState } from '/lib/types.ts'; import { PASSWORD_SALT } from '/lib/auth.ts'; import { createVerificationCode, @@ -180,7 +180,7 @@ export const handler: Handlers = { }, }; -export default function Dashboard({ data }: PageProps) { +export default function SettingsPage({ data }: PageProps) { return (