From 01407fd5624911da44af72639993bc89aefb8b80 Mon Sep 17 00:00:00 2001 From: Shinsina Date: Tue, 14 May 2024 14:16:27 -0500 Subject: [PATCH 1/5] Properly filter track results to the specified configuration --- .../user/[id]/subsessions/by-track/[trackSlug].astro | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/pages/user/[id]/subsessions/by-track/[trackSlug].astro b/src/pages/user/[id]/subsessions/by-track/[trackSlug].astro index 3fecdf5..45dbb82 100644 --- a/src/pages/user/[id]/subsessions/by-track/[trackSlug].astro +++ b/src/pages/user/[id]/subsessions/by-track/[trackSlug].astro @@ -60,7 +60,7 @@ const tracksFromDb: Array<{ track: unknown | Track }> = await db const tracks = tracksFromDb as Array<{ track: Track }>; const generatedTrackMap = generateTrackMap({ tracks }); const { trackName, configName } = generatedTrackMap.get(trackSlug) || {}; -const subsessions = await db +const allSubsessionsForTrack = await db .select() .from(Subsession) .innerJoin( @@ -75,6 +75,14 @@ const subsessions = await db ) ) .orderBy(desc(Subsession.subsession_id)); +const subsessions = allSubsessionsForTrack.filter( + ({ + Subsession: { + // @ts-expect-error + track: { track_name, config_name }, + }, + }) => track_name === trackName && config_name === configName +); --- From 46a59632ef1c0555e63275f54a35d95dfaee3bb9 Mon Sep 17 00:00:00 2001 From: Shinsina Date: Tue, 14 May 2024 14:16:45 -0500 Subject: [PATCH 2/5] Upgrade astro and @astrojs/db to latest versions --- package-lock.json | 446 ++++++++++++++++++++++++++++++++++++++++++---- package.json | 4 +- 2 files changed, 416 insertions(+), 34 deletions(-) diff --git a/package-lock.json b/package-lock.json index c6aa8bf..cd242aa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,13 +10,13 @@ "dependencies": { "@alpinejs/collapse": "^3.13.10", "@astrojs/alpinejs": "^0.4.0", - "@astrojs/db": "^0.11.0", + "@astrojs/db": "^0.11.1", "@astrojs/sitemap": "^3.1.4", "@astrojs/tailwind": "^5.1.0", "@types/alpinejs": "^3.13.10", "@types/alpinejs__collapse": "^3.13.4", "alpinejs": "^3.13.10", - "astro": "4.7.1", + "astro": "^4.8.3", "tailwindcss": "^3.4.3" } }, @@ -58,20 +58,20 @@ } }, "node_modules/@astrojs/compiler": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/@astrojs/compiler/-/compiler-2.7.1.tgz", - "integrity": "sha512-/POejAYuj8WEw7ZI0J8JBvevjfp9jQ9Wmu/Bg52RiNwGXkMV7JnYpsenVfHvvf1G7R5sXHGKlTcxlQWhoUTiGQ==" + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/@astrojs/compiler/-/compiler-2.8.0.tgz", + "integrity": "sha512-yrpD1WRGqsJwANaDIdtHo+YVjvIOFAjC83lu5qENIgrafwZcJgSXDuwVMXOgok4tFzpeKLsFQ6c3FoUdloLWBQ==" }, "node_modules/@astrojs/db": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@astrojs/db/-/db-0.11.0.tgz", - "integrity": "sha512-UK+XFmmLr3Fz4UJTy69QE5thxn8SK2y9eYZc28PRHwRggT91SIOzcQBMV+H2XthCnPphi9ifz0KF0yZcwCklhA==", + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/@astrojs/db/-/db-0.11.1.tgz", + "integrity": "sha512-3hFcSib3u7kBZyYlSzaJVCWBJBz8CKmh1RWndYFiAIi37aT69PGneSSyZ/8w3yy3ARiUOt4oJLvl9sRwwH7Tzg==", "dependencies": { "@libsql/client": "^0.6.0", "async-listen": "^3.0.1", "ci-info": "^4.0.0", "deep-diff": "^1.0.2", - "drizzle-orm": "^0.30.9", + "drizzle-orm": "^0.30.10", "github-slugger": "^2.0.0", "kleur": "^4.1.5", "nanoid": "^5.0.7", @@ -80,7 +80,7 @@ "prompts": "^2.4.2", "strip-ansi": "^7.1.0", "yargs-parser": "^21.1.1", - "zod": "^3.23.5" + "zod": "^3.23.8" } }, "node_modules/@astrojs/db/node_modules/nanoid": { @@ -1691,9 +1691,9 @@ ] }, "node_modules/@shikijs/core": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-1.4.0.tgz", - "integrity": "sha512-CxpKLntAi64h3j+TwWqVIQObPTED0FyXLHTTh3MKXtqiQNn2JGcMQQ362LftDbc9kYbDtrksNMNoVmVXzKFYUQ==" + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-1.5.2.tgz", + "integrity": "sha512-wSAOgaz48GmhILFElMCeQypSZmj6Ru6DttOOtl3KNkdJ17ApQuGNCfzpk4cClasVrnIu45++2DBwG4LNMQAfaA==" }, "node_modules/@types/alpinejs": { "version": "3.13.10", @@ -1962,11 +1962,11 @@ } }, "node_modules/astro": { - "version": "4.7.1", - "resolved": "https://registry.npmjs.org/astro/-/astro-4.7.1.tgz", - "integrity": "sha512-3o+VmnIPBiCm0QVyyTC/F8humNXny5YpI+MKvBTksviRtKxhnztEA3+GAR2XWLUSOx1+/GVjz7mExq3hJGOeqQ==", + "version": "4.8.3", + "resolved": "https://registry.npmjs.org/astro/-/astro-4.8.3.tgz", + "integrity": "sha512-pgIKopkmAUXY3EJHdG7zQpudtBzYAsd94A1R7jmLpH2LFZvzHEkAdHnunmSVmgikJCNqtEo3bUCHgLnCPQaN1g==", "dependencies": { - "@astrojs/compiler": "^2.7.1", + "@astrojs/compiler": "^2.8.0", "@astrojs/internal-helpers": "0.4.0", "@astrojs/markdown-remark": "5.1.0", "@astrojs/telemetry": "3.1.0", @@ -1995,7 +1995,7 @@ "dlv": "^1.1.3", "dset": "^3.1.3", "es-module-lexer": "^1.5.2", - "esbuild": "^0.20.2", + "esbuild": "^0.21.2", "estree-walker": "^3.0.3", "execa": "^8.0.1", "fast-glob": "^3.3.2", @@ -2016,18 +2016,18 @@ "prompts": "^2.4.2", "rehype": "^13.0.1", "resolve": "^1.22.8", - "semver": "^7.6.0", - "shiki": "^1.3.0", + "semver": "^7.6.2", + "shiki": "^1.5.1", "string-width": "^7.1.0", "strip-ansi": "^7.1.0", "tsconfck": "^3.0.3", "unist-util-visit": "^5.0.0", "vfile": "^6.0.1", - "vite": "^5.2.10", + "vite": "^5.2.11", "vitefu": "^0.2.5", "which-pm": "^2.1.1", "yargs-parser": "^21.1.1", - "zod": "^3.23.5", + "zod": "^3.23.8", "zod-to-json-schema": "^3.23.0" }, "bin": { @@ -2042,6 +2042,388 @@ "sharp": "^0.33.3" } }, + "node_modules/astro/node_modules/@esbuild/aix-ppc64": { + "version": "0.21.2", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.2.tgz", + "integrity": "sha512-/c7hocx0pm14bHQlqUVKmxwdT/e5/KkyoY1W8F9lk/8CkE037STDDz8PXUP/LE6faj2HqchvDs9GcShxFhI78Q==", + "cpu": [ + "ppc64" + ], + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/astro/node_modules/@esbuild/android-arm": { + "version": "0.21.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.2.tgz", + "integrity": "sha512-G1ve3b4FeyJeyCjB4MX1CiWyTaIJwT9wAYE+8+IRA53YoN/reC/Bf2GDRXAzDTnh69Fpl+1uIKg76DiB3U6vwQ==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/astro/node_modules/@esbuild/android-arm64": { + "version": "0.21.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.2.tgz", + "integrity": "sha512-SGZKngoTWVUriO5bDjI4WDGsNx2VKZoXcds+ita/kVYB+8IkSCKDRDaK+5yu0b5S0eq6B3S7fpiEvpsa2ammlQ==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/astro/node_modules/@esbuild/android-x64": { + "version": "0.21.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.2.tgz", + "integrity": "sha512-1wzzNoj2QtNkAYwIcWJ66UTRA80+RTQ/kuPMtEuP0X6dp5Ar23Dn566q3aV61h4EYrrgGlOgl/HdcqN/2S/2vg==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/astro/node_modules/@esbuild/darwin-arm64": { + "version": "0.21.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.2.tgz", + "integrity": "sha512-ZyMkPWc5eTROcLOA10lEqdDSTc6ds6nuh3DeHgKip/XJrYjZDfnkCVSty8svWdy+SC1f77ULtVeIqymTzaB6/Q==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/astro/node_modules/@esbuild/darwin-x64": { + "version": "0.21.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.2.tgz", + "integrity": "sha512-K4ZdVq1zP9v51h/cKVna7im7G0zGTKKB6bP2yJiSmHjjOykbd8DdhrSi8V978sF69rkwrn8zCyL2t6I3ei6j9A==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/astro/node_modules/@esbuild/freebsd-arm64": { + "version": "0.21.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.2.tgz", + "integrity": "sha512-4kbOGdpA61CXqadD+Gb/Pw3YXamQGiz9mal/h93rFVSjr5cgMnmJd/gbfPRm+3BMifvnaOfS1gNWaIDxkE2A3A==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/astro/node_modules/@esbuild/freebsd-x64": { + "version": "0.21.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.2.tgz", + "integrity": "sha512-ShS+R09nuHzDBfPeMUliKZX27Wrmr8UFp93aFf/S8p+++x5BZ+D344CLKXxmY6qzgTL3mILSImPCNJOzD6+RRg==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/astro/node_modules/@esbuild/linux-arm": { + "version": "0.21.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.2.tgz", + "integrity": "sha512-nnGXjOAv+7cM3LYRx4tJsYdgy8dGDGkAzF06oIDGppWbUkUKN9SmgQA8H0KukpU0Pjrj9XmgbWqMVSX/U7eeTA==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/astro/node_modules/@esbuild/linux-arm64": { + "version": "0.21.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.2.tgz", + "integrity": "sha512-Hdu8BL+AmO+eCDvvT6kz/fPQhvuHL8YK4ExKZfANWsNe1kFGOHw7VJvS/FKSLFqheXmB3rTF3xFQIgUWPYsGnA==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/astro/node_modules/@esbuild/linux-ia32": { + "version": "0.21.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.2.tgz", + "integrity": "sha512-m73BOCW2V9lcj7RtEMi+gBfHC6n3+VHpwQXP5offtQMPLDkpVolYn1YGXxOZ9hp4h3UPRKuezL7WkBsw+3EB3Q==", + "cpu": [ + "ia32" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/astro/node_modules/@esbuild/linux-loong64": { + "version": "0.21.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.2.tgz", + "integrity": "sha512-84eYHwwWHq3myIY/6ikALMcnwkf6Qo7NIq++xH0x+cJuUNpdwh8mlpUtRY+JiGUc60yu7ElWBbVHGWTABTclGw==", + "cpu": [ + "loong64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/astro/node_modules/@esbuild/linux-mips64el": { + "version": "0.21.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.2.tgz", + "integrity": "sha512-9siSZngT0/ZKG+AH+/agwKF29LdCxw4ODi/PiE0F52B2rtLozlDP92umf8G2GPoVV611LN4pZ+nSTckebOscUA==", + "cpu": [ + "mips64el" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/astro/node_modules/@esbuild/linux-ppc64": { + "version": "0.21.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.2.tgz", + "integrity": "sha512-y0T4aV2CA+ic04ULya1A/8M2RDpDSK2ckgTj6jzHKFJvCq0jQg8afQQIn4EM0G8u2neyOiNHgSF9YKPfuqKOVw==", + "cpu": [ + "ppc64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/astro/node_modules/@esbuild/linux-riscv64": { + "version": "0.21.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.2.tgz", + "integrity": "sha512-x5ssCdXmZC86L2Li1qQPF/VaC4VP20u/Zm8jlAu9IiVOVi79YsSz6cpPDYZl1rfKSHYCJW9XBfFCo66S5gVPSA==", + "cpu": [ + "riscv64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/astro/node_modules/@esbuild/linux-s390x": { + "version": "0.21.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.2.tgz", + "integrity": "sha512-NP7fTpGSFWdXyvp8iAFU04uFh9ARoplFVM/m+8lTRpaYG+2ytHPZWyscSsMM6cvObSIK2KoPHXiZD4l99WaxbQ==", + "cpu": [ + "s390x" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/astro/node_modules/@esbuild/linux-x64": { + "version": "0.21.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.2.tgz", + "integrity": "sha512-giZ/uOxWDKda44ZuyfKbykeXznfuVNkTgXOUOPJIjbayJV6FRpQ4zxUy9JMBPLaK9IJcdWtaoeQrYBMh3Rr4vQ==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/astro/node_modules/@esbuild/netbsd-x64": { + "version": "0.21.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.2.tgz", + "integrity": "sha512-IeFMfGFSQfIj1d4XU+6lkbFzMR+mFELUUVYrZ+jvWzG4NGvs6o53ReEHLHpYkjRbdEjJy2W3lTekTxrFHW7YJg==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/astro/node_modules/@esbuild/openbsd-x64": { + "version": "0.21.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.2.tgz", + "integrity": "sha512-48QhWD6WxcebNNaE4FCwgvQVUnAycuTd+BdvA/oZu+/MmbpU8pY2dMEYlYzj5uNHWIG5jvdDmFXu0naQeOWUoA==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/astro/node_modules/@esbuild/sunos-x64": { + "version": "0.21.2", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.2.tgz", + "integrity": "sha512-90r3nTBLgdIgD4FCVV9+cR6Hq2Dzs319icVsln+NTmTVwffWcCqXGml8rAoocHuJ85kZK36DCteii96ba/PX8g==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/astro/node_modules/@esbuild/win32-arm64": { + "version": "0.21.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.2.tgz", + "integrity": "sha512-sNndlsBT8OeE/MZDSGpRDJlWuhjuUz/dn80nH0EP4ZzDUYvMDVa7G87DVpweBrn4xdJYyXS/y4CQNrf7R2ODXg==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/astro/node_modules/@esbuild/win32-ia32": { + "version": "0.21.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.2.tgz", + "integrity": "sha512-Ti2QChGNFzWhUNNVuU4w21YkYTErsNh3h+CzvlEhzgRbwsJ7TrWQqRzW3bllLKKvTppuF3DJ3XP1GEg11AfrEQ==", + "cpu": [ + "ia32" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/astro/node_modules/@esbuild/win32-x64": { + "version": "0.21.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.2.tgz", + "integrity": "sha512-VEfTCZicoZnZ6sGkjFPGRFFJuL2fZn2bLhsekZl1CJslflp2cJS/VoKs1jMk+3pDfsGW6CfQVUckP707HwbXeQ==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/astro/node_modules/esbuild": { + "version": "0.21.2", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.2.tgz", + "integrity": "sha512-LmHPAa5h4tSxz+g/D8IHY6wCjtIiFx8I7/Q0Aq+NmvtoYvyMnJU0KQJcqB6QH30X9x/W4CemgUtPgQDZFca5SA==", + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.21.2", + "@esbuild/android-arm": "0.21.2", + "@esbuild/android-arm64": "0.21.2", + "@esbuild/android-x64": "0.21.2", + "@esbuild/darwin-arm64": "0.21.2", + "@esbuild/darwin-x64": "0.21.2", + "@esbuild/freebsd-arm64": "0.21.2", + "@esbuild/freebsd-x64": "0.21.2", + "@esbuild/linux-arm": "0.21.2", + "@esbuild/linux-arm64": "0.21.2", + "@esbuild/linux-ia32": "0.21.2", + "@esbuild/linux-loong64": "0.21.2", + "@esbuild/linux-mips64el": "0.21.2", + "@esbuild/linux-ppc64": "0.21.2", + "@esbuild/linux-riscv64": "0.21.2", + "@esbuild/linux-s390x": "0.21.2", + "@esbuild/linux-x64": "0.21.2", + "@esbuild/netbsd-x64": "0.21.2", + "@esbuild/openbsd-x64": "0.21.2", + "@esbuild/sunos-x64": "0.21.2", + "@esbuild/win32-arm64": "0.21.2", + "@esbuild/win32-ia32": "0.21.2", + "@esbuild/win32-x64": "0.21.2" + } + }, "node_modules/async-listen": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/async-listen/-/async-listen-3.0.1.tgz", @@ -5952,9 +6334,9 @@ } }, "node_modules/semver": { - "version": "7.6.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.1.tgz", - "integrity": "sha512-f/vbBsu+fOiYt+lmwZV0rVwJScl46HppnOA1ZvIuBWKOTlllpyJ3bfVax76/OrhCH38dyxoDIA8K7uB963IYgA==", + "version": "7.6.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", + "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", "bin": { "semver": "bin/semver.js" }, @@ -6031,11 +6413,11 @@ } }, "node_modules/shiki": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/shiki/-/shiki-1.4.0.tgz", - "integrity": "sha512-5WIn0OL8PWm7JhnTwRWXniy6eEDY234mRrERVlFa646V2ErQqwIFd2UML7e0Pq9eqSKLoMa3Ke+xbsF+DAuy+Q==", + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-1.5.2.tgz", + "integrity": "sha512-fpPbuSaatinmdGijE7VYUD3hxLozR3ZZ+iAx8Iy2X6REmJGyF5hQl94SgmiUNTospq346nXUVZx0035dyGvIVw==", "dependencies": { - "@shikijs/core": "1.4.0" + "@shikijs/core": "1.5.2" } }, "node_modules/signal-exit": { @@ -6894,9 +7276,9 @@ } }, "node_modules/zod": { - "version": "3.23.6", - "resolved": "https://registry.npmjs.org/zod/-/zod-3.23.6.tgz", - "integrity": "sha512-RTHJlZhsRbuA8Hmp/iNL7jnfc4nZishjsanDAfEY1QpDQZCahUp3xDzl+zfweE9BklxMUcgBgS1b7Lvie/ZVwA==", + "version": "3.23.8", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.23.8.tgz", + "integrity": "sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==", "funding": { "url": "https://github.com/sponsors/colinhacks" } diff --git a/package.json b/package.json index 1ebeecc..467545b 100644 --- a/package.json +++ b/package.json @@ -12,13 +12,13 @@ "dependencies": { "@alpinejs/collapse": "^3.13.10", "@astrojs/alpinejs": "^0.4.0", - "@astrojs/db": "^0.11.0", + "@astrojs/db": "^0.11.1", "@astrojs/sitemap": "^3.1.4", "@astrojs/tailwind": "^5.1.0", "@types/alpinejs": "^3.13.10", "@types/alpinejs__collapse": "^3.13.4", "alpinejs": "^3.13.10", - "astro": "^4.7.1", + "astro": "^4.8.3", "tailwindcss": "^3.4.3" } } From c7c5e714e9567cf9e1c2550237a70f32cab28dce Mon Sep 17 00:00:00 2001 From: Shinsina Date: Tue, 14 May 2024 15:04:58 -0500 Subject: [PATCH 3/5] Provide a usable navigation on all pages where a user ID is present --- src/lib/layouts/default.astro | 68 ++++++++++++++++++- src/lib/layouts/standings.astro | 2 +- src/lib/layouts/subsessions.astro | 4 +- src/pages/user/[id]/index.astro | 61 +---------------- .../[id]/scheduling/by-week/[timestamp].astro | 2 +- .../user/[id]/scheduling/by-week/index.astro | 2 +- src/pages/user/[id]/scheduling/index.astro | 2 +- .../car-class/[carClassId]/index.astro | 2 +- .../[carClassId]/season-summary.astro | 2 +- .../[id]/standings/by-car-class/index.astro | 2 +- .../user/[id]/standings/by-year/index.astro | 2 +- .../[id]/subsessions/by-car-class/index.astro | 3 +- .../[id]/subsessions/by-track/index.astro | 2 +- .../user/[id]/subsessions/by-year/index.astro | 2 +- 14 files changed, 82 insertions(+), 74 deletions(-) diff --git a/src/lib/layouts/default.astro b/src/lib/layouts/default.astro index 849f568..634e814 100644 --- a/src/lib/layouts/default.astro +++ b/src/lib/layouts/default.astro @@ -1,5 +1,5 @@ --- -const { title, description } = Astro.props; +const { id, title, description } = Astro.props; const seoTitle = title ? `Stat 'n' Track: ${title}` : "Stat 'n' Track"; const seoDescription = description || "An iRacing planner and statistics analyzer"; @@ -37,6 +37,72 @@ const seoDescription = > + { id ? ( + ) : <> } diff --git a/src/lib/layouts/standings.astro b/src/lib/layouts/standings.astro index 2907496..f561d0d 100644 --- a/src/lib/layouts/standings.astro +++ b/src/lib/layouts/standings.astro @@ -79,7 +79,7 @@ const generateLinkForKey = ({ }; --- - +
+
- - + diff --git a/src/pages/user/[id]/scheduling/by-week/[timestamp].astro b/src/pages/user/[id]/scheduling/by-week/[timestamp].astro index c1b6d3e..ada02b6 100644 --- a/src/pages/user/[id]/scheduling/by-week/[timestamp].astro +++ b/src/pages/user/[id]/scheduling/by-week/[timestamp].astro @@ -126,7 +126,7 @@ const title = `Scheduling By Week - ${id} and week starting ${new Date(Number(ti const description = title; --- - +

Week Starts

diff --git a/src/pages/user/[id]/scheduling/by-week/index.astro b/src/pages/user/[id]/scheduling/by-week/index.astro index a94bf3f..c436416 100644 --- a/src/pages/user/[id]/scheduling/by-week/index.astro +++ b/src/pages/user/[id]/scheduling/by-week/index.astro @@ -14,7 +14,7 @@ const title = `Scheduling By Week - ${id}`; const description = `Scheduling by week page for user ID: ${id}`; --- - + diff --git a/src/pages/user/[id]/scheduling/index.astro b/src/pages/user/[id]/scheduling/index.astro index 2cbe283..287c4d3 100644 --- a/src/pages/user/[id]/scheduling/index.astro +++ b/src/pages/user/[id]/scheduling/index.astro @@ -107,7 +107,7 @@ const title = `Scheduling - ${id}`; const description = `Scheduling page for user ID: ${id}`; --- - +
{ Object.keys(results[0]) diff --git a/src/pages/user/[id]/season/[seasonId]/car-class/[carClassId]/index.astro b/src/pages/user/[id]/season/[seasonId]/car-class/[carClassId]/index.astro index 7f8f8fd..11b53fe 100644 --- a/src/pages/user/[id]/season/[seasonId]/car-class/[carClassId]/index.astro +++ b/src/pages/user/[id]/season/[seasonId]/car-class/[carClassId]/index.astro @@ -116,7 +116,7 @@ const title = `Season information for season ID ${seasonId} - car class ID - ${c const description = title; --- - + +

{title}

diff --git a/src/pages/user/[id]/standings/by-car-class/index.astro b/src/pages/user/[id]/standings/by-car-class/index.astro index f7e5763..8994002 100644 --- a/src/pages/user/[id]/standings/by-car-class/index.astro +++ b/src/pages/user/[id]/standings/by-car-class/index.astro @@ -25,7 +25,7 @@ --- - + diff --git a/src/pages/user/[id]/standings/by-year/index.astro b/src/pages/user/[id]/standings/by-year/index.astro index b2fd653..079d5fe 100644 --- a/src/pages/user/[id]/standings/by-year/index.astro +++ b/src/pages/user/[id]/standings/by-year/index.astro @@ -23,7 +23,7 @@ import { --- - +
{years.map((year) => ())}
diff --git a/src/pages/user/[id]/subsessions/by-car-class/index.astro b/src/pages/user/[id]/subsessions/by-car-class/index.astro index 5336e6a..b26c4c1 100644 --- a/src/pages/user/[id]/subsessions/by-car-class/index.astro +++ b/src/pages/user/[id]/subsessions/by-car-class/index.astro @@ -22,10 +22,11 @@ }); const title = `Subsessions By Car Class - ${id}`; const description = `Subessions by car class page for user ID: ${id}`; + console.log(carClassNames.size); --- - +
{Array.from(carClassNames).sort().map((carClassName) => ())}
diff --git a/src/pages/user/[id]/subsessions/by-track/index.astro b/src/pages/user/[id]/subsessions/by-track/index.astro index 7d575d3..5da5bef 100644 --- a/src/pages/user/[id]/subsessions/by-track/index.astro +++ b/src/pages/user/[id]/subsessions/by-track/index.astro @@ -19,7 +19,7 @@ const title = `Subsessions By Track - ${id}`; const description = `Subsessions by track page for user ID: ${id}`; --- - +
{Array.from(trackMap).sort().map(([key, track]) => ())}
diff --git a/src/pages/user/[id]/subsessions/by-year/index.astro b/src/pages/user/[id]/subsessions/by-year/index.astro index 10a1e24..ba51875 100644 --- a/src/pages/user/[id]/subsessions/by-year/index.astro +++ b/src/pages/user/[id]/subsessions/by-year/index.astro @@ -23,7 +23,7 @@ import { --- - +
{years.map((year) => ())}
From a3349b64b203b9935811ed94944e91670d008bdd Mon Sep 17 00:00:00 2001 From: Shinsina Date: Tue, 14 May 2024 15:08:43 -0500 Subject: [PATCH 4/5] Remove stray console.log --- src/pages/user/[id]/subsessions/by-car-class/index.astro | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pages/user/[id]/subsessions/by-car-class/index.astro b/src/pages/user/[id]/subsessions/by-car-class/index.astro index b26c4c1..70f20fc 100644 --- a/src/pages/user/[id]/subsessions/by-car-class/index.astro +++ b/src/pages/user/[id]/subsessions/by-car-class/index.astro @@ -22,7 +22,6 @@ }); const title = `Subsessions By Car Class - ${id}`; const description = `Subessions by car class page for user ID: ${id}`; - console.log(carClassNames.size); --- From eeb4afd68c969c3c57a2c0697e3881ad8ce54d85 Mon Sep 17 00:00:00 2001 From: Shinsina Date: Tue, 14 May 2024 15:15:19 -0500 Subject: [PATCH 5/5] Correct Season Summary borders --- .../[id]/season/[seasonId]/car-class/[carClassId]/index.astro | 2 +- .../[seasonId]/car-class/[carClassId]/season-summary.astro | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/user/[id]/season/[seasonId]/car-class/[carClassId]/index.astro b/src/pages/user/[id]/season/[seasonId]/car-class/[carClassId]/index.astro index 11b53fe..752d4f5 100644 --- a/src/pages/user/[id]/season/[seasonId]/car-class/[carClassId]/index.astro +++ b/src/pages/user/[id]/season/[seasonId]/car-class/[carClassId]/index.astro @@ -121,7 +121,7 @@ const description = title; class="underline" href=`/Stat-N-Track/user/${id}/season/${seasonId}/car-class/${carClassId}/season-summary` > -
+

View Season Summary

diff --git a/src/pages/user/[id]/season/[seasonId]/car-class/[carClassId]/season-summary.astro b/src/pages/user/[id]/season/[seasonId]/car-class/[carClassId]/season-summary.astro index e9decae..b4d0b33 100644 --- a/src/pages/user/[id]/season/[seasonId]/car-class/[carClassId]/season-summary.astro +++ b/src/pages/user/[id]/season/[seasonId]/car-class/[carClassId]/season-summary.astro @@ -223,7 +223,7 @@ const overviewItems = [ --- -
+

{title}

Overview