chore: pnpm up
This commit is contained in:
24
package.json
24
package.json
@ -11,32 +11,32 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@astrojs/check": "^0.9.4",
|
||||
"@astrojs/mdx": "^4.3.0",
|
||||
"@astrojs/mdx": "^4.3.1",
|
||||
"@astrojs/svelte": "^7.1.0",
|
||||
"@astrojs/tailwind": "^6.0.2",
|
||||
"astro": "^5.9.1",
|
||||
"astro": "^5.12.0",
|
||||
"astro-i18n-aut": "^0.7.3",
|
||||
"exifreader": "^4.30.1",
|
||||
"svelte": "^5.28.6",
|
||||
"exifreader": "^4.31.1",
|
||||
"svelte": "^5.36.10",
|
||||
"svelte-gestures": "^5.1.4",
|
||||
"tailwindcss": "^4.1.6",
|
||||
"tailwindcss": "^4.1.11",
|
||||
"thumbhash": "^0.1.1",
|
||||
"typescript": "^5.8.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@astrojs/sitemap": "^3.4.1",
|
||||
"@iconify-json/tabler": "^1.2.17",
|
||||
"@iconify-json/tabler": "^1.2.19",
|
||||
"@types/markdown-it": "^14.1.2",
|
||||
"@unocss/preset-icons": "^66.1.1",
|
||||
"@unocss/reset": "^66.1.1",
|
||||
"@unocss/preset-icons": "^66.3.3",
|
||||
"@unocss/reset": "^66.3.3",
|
||||
"astro-font": "^1.1.0",
|
||||
"markdown-it": "^14.1.0",
|
||||
"ogl": "^1.0.11",
|
||||
"prettier": "^3.5.3",
|
||||
"prettier": "^3.6.2",
|
||||
"prettier-plugin-astro": "^0.14.1",
|
||||
"sharp": "^0.34.1",
|
||||
"unocss": "^66.1.1",
|
||||
"sharp": "^0.34.3",
|
||||
"unocss": "^66.3.3",
|
||||
"unplugin-icons": "^22.1.0",
|
||||
"vite-plugin-glsl": "^1.4.1"
|
||||
"vite-plugin-glsl": "^1.5.1"
|
||||
}
|
||||
}
|
||||
|
1773
pnpm-lock.yaml
generated
1773
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -53,10 +53,15 @@ const allowedExif = [
|
||||
];
|
||||
|
||||
export async function getExifData(image: ImageMetadata) {
|
||||
if (image.format === "svg") return undefined; // SVGs don't have EXIF data")
|
||||
const sharp = await getSharp();
|
||||
if (!sharp) return;
|
||||
const imagePath = (image as ImageMetadata & { fsPath: string }).fsPath;
|
||||
try {
|
||||
const tags = await ExifReader.load((image as ImageMetadata & { fsPath: string }).fsPath, { async: true });
|
||||
|
||||
const buffer = await sharp(imagePath).toBuffer();
|
||||
|
||||
const tags = await ExifReader.load(buffer, { async: true });
|
||||
|
||||
const out: Record<string, any> = {};
|
||||
let hasExif = false;
|
||||
@ -70,7 +75,7 @@ export async function getExifData(image: ImageMetadata) {
|
||||
return hasExif ? out : undefined;
|
||||
} catch (error) {
|
||||
|
||||
console.log("Error reading EXIF data", error);
|
||||
console.log(`Error reading EXIF data from ${imagePath}`, error);
|
||||
return undefined
|
||||
}
|
||||
|
||||
|
10
src/helpers/memorium.ts
Normal file
10
src/helpers/memorium.ts
Normal file
@ -0,0 +1,10 @@
|
||||
export async function listResource(id: string): Promise<any[]> {
|
||||
try {
|
||||
const response = await fetch(
|
||||
`http://localhost:8080/resources?name=${id}`,
|
||||
);
|
||||
return await response.json();
|
||||
} catch (error) {
|
||||
return []
|
||||
}
|
||||
}
|
@ -1,11 +1,9 @@
|
||||
---
|
||||
import Layout from "@layouts/Layout.astro";
|
||||
import * as memorium from "@helpers/memorium";
|
||||
|
||||
export async function getStaticPaths() {
|
||||
const response = await fetch(
|
||||
"http://localhost:8080/resources?name=Media/movies/*",
|
||||
);
|
||||
const movieReviews = await response.json();
|
||||
const movieReviews = await memorium.listResource("Media/movies/*");
|
||||
|
||||
const paths = movieReviews.map((review: any) => {
|
||||
return {
|
||||
@ -16,16 +14,21 @@ export async function getStaticPaths() {
|
||||
},
|
||||
};
|
||||
});
|
||||
|
||||
return paths;
|
||||
}
|
||||
|
||||
const response = await fetch(
|
||||
const reviews = await memorium.listResource(
|
||||
//@ts-ignore
|
||||
`http://localhost:8080/resources?name=Media/movies/${Astro.params.movieName}.md`,
|
||||
`Media/movies/${Astro.params.movieName}.md`,
|
||||
);
|
||||
const reviewes = await response.json();
|
||||
const review = reviewes[0];
|
||||
|
||||
if (reviews.length === 0) {
|
||||
return new Response(null, {
|
||||
status: 404,
|
||||
statusText: "Not found",
|
||||
});
|
||||
}
|
||||
const review = reviews[0];
|
||||
---
|
||||
|
||||
<Layout title="Max Richter">
|
||||
|
@ -1,11 +1,9 @@
|
||||
---
|
||||
import Layout from "@layouts/Layout.astro";
|
||||
import HeroCard from "@components/HeroCard.astro";
|
||||
import * as memorium from "@helpers/memorium";
|
||||
|
||||
const response = await fetch(
|
||||
"http://localhost:8080/resources?name=Media/movies/*",
|
||||
);
|
||||
const movieReviews = await response.json();
|
||||
const movieReviews = await memorium.listResource("Media/movies/*");
|
||||
---
|
||||
|
||||
<Layout title="Max Richter">
|
||||
|
@ -2,16 +2,15 @@
|
||||
import Layout from "@layouts/Layout.astro";
|
||||
import { useTranslatedPath } from "@i18n/utils";
|
||||
import markdownToText from "@helpers/markdownToText";
|
||||
import * as memorium from "@helpers/memorium";
|
||||
|
||||
const path = useTranslatedPath(Astro.url);
|
||||
|
||||
const collection = "resources/recipes";
|
||||
|
||||
export async function getStaticPaths() {
|
||||
const response = await fetch(
|
||||
"http://localhost:8080/resources?name=Recipes/*",
|
||||
);
|
||||
const recipes = await response.json();
|
||||
|
||||
const recipes = await memorium.listResource("Recipes/*");
|
||||
|
||||
const paths = recipes.map((recipe: any) => {
|
||||
return {
|
||||
@ -26,11 +25,17 @@ export async function getStaticPaths() {
|
||||
return paths;
|
||||
}
|
||||
|
||||
const response = await fetch(
|
||||
|
||||
const recipes = await memorium.listResource(
|
||||
//@ts-ignore
|
||||
`http://localhost:8080/resources?name=Recipes/${Astro.params.recipeName}.md`,
|
||||
`Recipes/${Astro.params.recipeName}.md`,
|
||||
);
|
||||
const recipes = await response.json();
|
||||
if (recipes.length === 0) {
|
||||
return new Response(null, {
|
||||
status: 404,
|
||||
statusText: "Not found",
|
||||
});
|
||||
}
|
||||
const recipe = recipes[0];
|
||||
---
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
---
|
||||
import Layout from "@layouts/Layout.astro";
|
||||
import HeroCard from "@components/HeroCard.astro";
|
||||
import * as memorium from "@helpers/memorium";
|
||||
|
||||
const response = await fetch("http://localhost:8080/resources?name=Recipes/*");
|
||||
const recipes = await response.json();
|
||||
const recipes = await memorium.listResource("Recipes/*");
|
||||
---
|
||||
|
||||
<Layout title="Max Richter">
|
||||
|
@ -1,18 +1,16 @@
|
||||
---
|
||||
import Layout from "@layouts/Layout.astro";
|
||||
import { useTranslatedPath } from "@i18n/utils";
|
||||
import * as memorium from "@helpers/memorium";
|
||||
|
||||
const collection = "resources/series";
|
||||
|
||||
const path = useTranslatedPath(Astro.url);
|
||||
|
||||
export async function getStaticPaths() {
|
||||
const response = await fetch(
|
||||
"http://localhost:8080/resources?name=Media/series/*",
|
||||
);
|
||||
const seriesReviews = await response.json();
|
||||
const seriesReviews = await memorium.listResource("Media/series/*");
|
||||
|
||||
const paths = seriesReviews.map((review:any) => {
|
||||
const paths = seriesReviews.map((review: any) => {
|
||||
return {
|
||||
params: {
|
||||
seriesName: review.identifier
|
||||
@ -25,12 +23,18 @@ export async function getStaticPaths() {
|
||||
return paths;
|
||||
}
|
||||
|
||||
const response = await fetch(
|
||||
|
||||
const reviews = await memorium.listResource(
|
||||
//@ts-ignore
|
||||
`http://localhost:8080/resources?name=Media/series/${Astro.params.seriesName}.md`,
|
||||
`Media/series/${Astro.params.seriesName}.md`,
|
||||
);
|
||||
const reviewes = response.ok ? await response.json() : [];
|
||||
const review = reviewes[0];
|
||||
if (reviews.length === 0) {
|
||||
return new Response(null, {
|
||||
status: 404,
|
||||
statusText: "Not found",
|
||||
});
|
||||
}
|
||||
const review = reviews[0];
|
||||
---
|
||||
|
||||
<Layout title="Max Richter">
|
||||
|
@ -1,11 +1,9 @@
|
||||
---
|
||||
import Layout from "@layouts/Layout.astro";
|
||||
import HeroCard from "@components/HeroCard.astro";
|
||||
import * as memorium from "@helpers/memorium";
|
||||
|
||||
const response = await fetch(
|
||||
"http://localhost:8080/resources?name=Media/series/*",
|
||||
);
|
||||
const seriesReviewes = await response.json();
|
||||
const seriesReviewes = await memorium.listResource("Media/series/*");
|
||||
---
|
||||
|
||||
<Layout title="Max Richter">
|
||||
|
Reference in New Issue
Block a user