Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: bump deps #7

Merged
merged 1 commit into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified bun.lockb
Binary file not shown.
40 changes: 20 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,45 +17,45 @@
},
"dependencies": {
"@astrojs/check": "0.9.4",
"@astrojs/mdx": "4.0.1",
"@astrojs/netlify": "6.0.0",
"@astrojs/partytown": "^2.1.2",
"@astrojs/starlight": "^0.29.2",
"@astrojs/react": "4.0.0",
"@astrojs/mdx": "4.0.3",
"@astrojs/netlify": "6.0.1",
"@astrojs/partytown": "^2.1.3",
"@astrojs/starlight": "^0.30.4",
"@astrojs/react": "4.1.2",
"@astrojs/sitemap": "^3.2.1",
"@astrojs/tailwind": "5.1.3",
"@astrojs/tailwind": "5.1.4",
"@mdx-js/mdx": "^3.1.0",
"@radix-ui/colors": "^3.0.0",
"@radix-ui/react-icons": "^1.3.2",
"@radix-ui/themes": "^3.1.6",
"@tailwindcss/typography": "^0.5.15",
"@types/bun": "^1.1.14",
"@types/canvas-confetti": "^1.6.4",
"@types/lodash": "^4.17.13",
"@tailwindcss/typography": "^0.5.16",
"@types/bun": "^1.1.15",
"@types/canvas-confetti": "^1.9.0",
"@types/lodash": "^4.17.14",
"@types/prompts": "^2.4.9",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@types/react": "^19.0.3",
"@types/react-dom": "^19.0.2",
"@vercel/og": "^0.6.4",
"astro": "5.0.1",
"astro": "5.1.3",
"canvas-confetti": "^1.9.3",
"clsx": "^2.1.1",
"github-slugger": "^2.0.0",
"lodash": "^4.17.21",
"lucide-react": "^0.454.0",
"lucide-react": "^0.469.0",
"prettier": "^3.4.2",
"prettier-plugin-astro": "^0.14.1",
"prettier-plugin-tailwindcss": "^0.6.9",
"prompts": "^2.4.2",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"rehype-slug": "^6.0.0",
"remark-gfm": "^4.0.0",
"tailwindcss": "^3.4.16",
"tailwindcss": "^3.4.17",
"typescript": "^5.7.2",
"zod": "^3.23.8"
"zod": "^3.24.1"
},
"devDependencies": {
"@types/node": "^22.10.1",
"knip": "^5.39.1"
"@types/node": "^22.10.5",
"knip": "^5.41.1"
}
}
6 changes: 3 additions & 3 deletions src/components/client/DiceRoller/DiceRoller.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export function DiceRoller(props: { theme?: ThemeType; button?: boolean }) {
return (
<Theme {...props.theme} hasBackground={false} asChild>
{renderButton ? (
<>
<div>
<Dialog.Root
open={open}
onOpenChange={(isOpen) => {
Expand Down Expand Up @@ -182,9 +182,9 @@ export function DiceRoller(props: { theme?: ThemeType; button?: boolean }) {
{renderDialogContent()}
</Dialog.Content>
</Dialog.Root>
</>
</div>
) : (
<>{renderDialogContent()}</>
<div>{renderDialogContent()}</div>
)}
</Theme>
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Container, Flex, Text } from "@radix-ui/themes";
import { CircleOff } from "lucide-react";
import type { JSX } from "react";
import { MDXH1 } from "../MDX/MDX";

export function NothingToShowHere(props: {
Expand Down
26 changes: 26 additions & 0 deletions src/domains/dl/DLAstro.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ export const DLAstro = {
}) {
const creator = await getEntry("creators", props.id);

if (!creator) {
throw new Error("DLAstro.getCreator: Creator not found");
}

let games: Array<CollectionEntry<"games">> = [];
let resources: Array<CollectionEntry<"resources">> = [];
if (props.includeGames) {
Expand Down Expand Up @@ -46,6 +50,10 @@ export const DLAstro = {
}) {
const game = await getEntry("games", props.id);

if (!game) {
throw new Error("DLAstro.getGame: Game not found");
}

if (props.includeCreator) {
const creator = await getEntry("creators", game.data.creator.id);
return { game, creator };
Expand All @@ -60,6 +68,10 @@ export const DLAstro = {
games.map(async (game) => {
const creator = await getEntry("creators", game.data.creator.id);

if (!creator) {
throw new Error("DLAstro.getAllGamesWithCreator: Creator not found");
}

const assets = props.includeAssets
? await getCollection("assets", (item) => {
return item.data.game.id === game.id;
Expand All @@ -82,6 +94,10 @@ export const DLAstro = {
}) {
const asset = await getEntry("assets", props.id);

if (!asset) {
throw new Error("DLAstro.getAssetWithGameAndCreator: Asset not found");
}

const game = await getEntry(asset.data.game);
const creator = await getEntry(game.data.creator);
return {
Expand Down Expand Up @@ -110,6 +126,10 @@ export const DLAstro = {
return element.id.startsWith(idWithoutLocale);
});

if (!resource) {
throw new Error("DLAstro.getResource: Resource not found");
}

const locales = translations
.map((element) => {
const language = element.id
Expand Down Expand Up @@ -153,6 +173,12 @@ export const DLAstro = {
resources.map(async (resource) => {
const creator = await getEntry("creators", resource.data.creator.id);

if (!creator) {
throw new Error(
"DLAstro.getAllResourcesWithCreator: Creator not found",
);
}

return {
resource,
creator,
Expand Down
8 changes: 6 additions & 2 deletions src/layouts/Layout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import LogoSrc from "../components/server/Header/logo.png";
import { Colors } from "../domains/colors/colors";
import { getTheme, type ThemeType } from "../domains/utils/getTheme";
import "./index.css";
import { DLAstro } from "../domains/dl/DLAstro";

type Props = {
title: Array<string> | undefined;
Expand All @@ -48,7 +49,10 @@ const description =
const headingFont = props.headingFont;
const bodyFont = props.bodyFont;

const songsAndSagas = await getEntry("games", "fari-rpgs/songs-and-sagas");
// const songsAndSagas = await getEntry("games", "fari-rpgs/songs-and-sagas");
const songsAndSagas = await DLAstro.getGame({
id: "fari-rpgs/songs-and-sagas",
});

const fontsAsString = [headingFont, bodyFont]
.filter((font) => font !== undefined)
Expand Down Expand Up @@ -166,7 +170,7 @@ const ogImageUrl = props.withOgImage
<Header client:load theme={themeProps} />
{
props.withDefaultBanner && (
<Banner src={songsAndSagas.data.image!} alt={"Background"} />
<Banner src={songsAndSagas.game.data.image!} alt={"Background"} />
)
}
</Container>
Expand Down
Loading