From b0201c250f2f06986294978acd7750660de4a4dc Mon Sep 17 00:00:00 2001 From: Moritz Utcke Date: Mon, 11 Nov 2024 12:15:01 +1100 Subject: [PATCH] mdx Seiten wieder in pages gepackt und Dependencies upgedated. --- astro.config.mjs | 43 ++++++------ package.json | 68 +++++++++---------- src/env.d.ts | 1 + src/lib/XML/getEmpfehlungen.ts | 2 +- src/lib/pdf/pdfVerbrauchsausweisWohnen.ts | 13 ++-- {mdx => src/pages}/agb.mdx | 0 .../pages}/energieausweis-aussteller.mdx | 0 {mdx => src/pages}/enev-zusammenfassung.mdx | 0 {mdx => src/pages}/kundenbewertungen.mdx | 0 {mdx => src/pages}/welcher-energieausweis.mdx | 0 tsconfig.json | 4 +- 11 files changed, 65 insertions(+), 66 deletions(-) rename {mdx => src/pages}/agb.mdx (100%) rename {mdx => src/pages}/energieausweis-aussteller.mdx (100%) rename {mdx => src/pages}/enev-zusammenfassung.mdx (100%) rename {mdx => src/pages}/kundenbewertungen.mdx (100%) rename {mdx => src/pages}/welcher-energieausweis.mdx (100%) diff --git a/astro.config.mjs b/astro.config.mjs index 5263c603..8dd067e0 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -1,41 +1,36 @@ import { defineConfig } from "astro/config"; import svelte from "@astrojs/svelte"; // import astroI18next from "astro-i18next"; - import tailwind from "@astrojs/tailwind"; - -// https://astro.build/config import node from "@astrojs/node"; - -// https://astro.build/config import mdx from "@astrojs/mdx"; import { fileURLToPath } from "url"; -// https://astro.build/config +// https://astro.build/config export default defineConfig({ integrations: [svelte(), tailwind(), mdx()], outDir: "./dist", output: "server", - vite: { - optimizeDeps: { - exclude: ["@ibcornelsen/api", "@ibcornelsen/database"] - }, - resolve: { - alias: { - "#": fileURLToPath(new URL("./src", import.meta.url)) - } - }, - build: { - commonjsOptions: { - transformMixedEsModules: true - } - } - }, + vite: { + optimizeDeps: { + exclude: ["@ibcornelsen/api", "@ibcornelsen/database"] + }, + resolve: { + alias: { + "#": fileURLToPath(new URL("./src", import.meta.url)) + } + }, + build: { + commonjsOptions: { + transformMixedEsModules: false + } + } + }, adapter: node({ mode: "middleware" }), - server: { - port: 3000 - } + server: { + port: 3000 + } }); \ No newline at end of file diff --git a/package.json b/package.json index e16fe4e7..0289b913 100644 --- a/package.json +++ b/package.json @@ -17,60 +17,60 @@ }, "private": true, "dependencies": { - "@astrojs/mdx": "^2.1.1", - "@astrojs/node": "^5.1.4", + "@astrojs/mdx": "^3.1.9", + "@astrojs/node": "^8.3.4", "@astrojs/svelte": "^2.2.0", "@astrojs/tailwind": "^3.1.3", "@ibcornelsen/api": "link:@ibcornelsen/api", "@ibcornelsen/database": "link:@ibcornelsen/database", "@ibcornelsen/ui": "^0.0.2", "@mollie/api-client": "^3.7.0", - "@pdfme/common": "^5.1.6", - "@pdfme/generator": "^5.1.6", - "@pdfme/ui": "^5.1.6", - "@trpc/client": "^10.45.0", - "@trpc/server": "^10.45.0", - "astro": "^2.5.1", + "@pdfme/common": "^5.1.7", + "@pdfme/generator": "^5.1.7", + "@pdfme/ui": "^5.1.7", + "@trpc/client": "^10.45.2", + "@trpc/server": "^10.45.2", + "astro": "^4.16.10", "astro-i18next": "1.0.0-beta.21", "body-scroll-lock": "^4.0.0-beta.0", "buffer": "^6.0.3", - "bun": "^1.0.2", + "bun": "^1.1.34", "csvtojson": "^2.0.10", - "express": "^4.18.2", - "flag-icons": "^6.9.2", - "fontkit": "^2.0.2", - "i18next": "^23.4.1", - "i18next-fs-backend": "^2.1.5", - "i18next-http-backend": "^2.2.1", + "express": "^4.21.1", + "flag-icons": "^6.15.0", + "fontkit": "^2.0.4", + "i18next": "^23.16.5", + "i18next-fs-backend": "^2.3.2", + "i18next-http-backend": "^2.6.2", "js-cookie": "^3.0.5", "js-interpolate": "^1.0.1", - "katex": "^0.16.7", - "moment": "^2.29.4", - "moment-timezone": "^0.5.45", + "katex": "^0.16.11", + "moment": "^2.30.1", + "moment-timezone": "^0.5.46", "radix-svelte-icons": "^1.0.0", - "sass": "^1.62.1", - "svelte": "^3.59.1", + "sass": "^1.80.6", + "svelte": "^3.59.2", "svelte-dialogs": "^1.2.2", - "svelte-preprocess": "^5.0.3", - "svelte-ripple-action": "^1.0.5", - "tailwindcss": "^3.3.2", + "svelte-preprocess": "^5.1.4", + "svelte-ripple-action": "^1.0.6", + "tailwindcss": "^3.4.14", "trpc-openapi": "^1.2.0", - "uuid": "^9.0.0", - "zod": "^3.22.4" + "uuid": "^9.0.1", + "zod": "^3.23.8" }, "devDependencies": { - "@faker-js/faker": "^8.3.1", - "@tailwindcss/typography": "^0.5.10", + "@faker-js/faker": "^8.4.1", + "@tailwindcss/typography": "^0.5.15", "@types/body-scroll-lock": "^3.1.2", - "@types/fontkit": "^2.0.6", + "@types/fontkit": "^2.0.7", "@types/js-cookie": "^3.0.6", - "@types/uuid": "^9.0.1", - "@typescript-eslint/eslint-plugin": "^5.59.6", - "@typescript-eslint/parser": "^5.59.6", - "bun-types": "^1.0.22", - "cypress": "^13.6.2", + "@types/uuid": "^9.0.8", + "@typescript-eslint/eslint-plugin": "^5.62.0", + "@typescript-eslint/parser": "^5.62.0", + "bun-types": "^1.1.34", + "cypress": "^13.15.2", "cypress-file-upload": "^5.0.8", - "daisyui": "^4.6.0", + "daisyui": "^4.12.14", "eslint": "~8.15.0", "eslint-config-prettier": "8.1.0", "prettier": "^2.8.8", diff --git a/src/env.d.ts b/src/env.d.ts index 29be4a13..1e58cf75 100644 --- a/src/env.d.ts +++ b/src/env.d.ts @@ -1,3 +1,4 @@ +/// /// /// diff --git a/src/lib/XML/getEmpfehlungen.ts b/src/lib/XML/getEmpfehlungen.ts index 1e7812f8..bdc31705 100644 --- a/src/lib/XML/getEmpfehlungen.ts +++ b/src/lib/XML/getEmpfehlungen.ts @@ -1,4 +1,4 @@ -import { VerbrauchsausweisWohnenClient } from "#components/Ausweis/types"; +import { VerbrauchsausweisWohnenClient } from "#components/Ausweis/types.js"; import { Enums } from "@ibcornelsen/database/client"; import moment from "moment"; diff --git a/src/lib/pdf/pdfVerbrauchsausweisWohnen.ts b/src/lib/pdf/pdfVerbrauchsausweisWohnen.ts index 3996cbe5..f9b53a88 100644 --- a/src/lib/pdf/pdfVerbrauchsausweisWohnen.ts +++ b/src/lib/pdf/pdfVerbrauchsausweisWohnen.ts @@ -1,14 +1,17 @@ -import { VerbrauchsausweisWohnenClient } from "#components/Ausweis/types"; +import { VerbrauchsausweisWohnenClient } from "#components/Ausweis/types.js"; import { generate } from "@pdfme/generator"; import VerbrauchsausweisWohnen2016Template from "../../lib/pdf/templates/GEG24_Verbrauchsausweis.json"; -import { convertAusweisData } from "#lib/AusweisData"; -import { variable } from "#lib/pdf/plugins/variables"; +import { convertAusweisData } from "#lib/AusweisData.js"; + +/* -------------------------------- Pdf Tools ------------------------------- */ +import { variable } from "#lib/pdf/plugins/variables/index.js"; import { text, image } from "@pdfme/schemas"; import { Schema, Template } from "@pdfme/common"; + import { Moment } from "moment"; -import { endEnergieVerbrauchVerbrauchsausweis_2016 } from "#lib/Berechnungen/VerbrauchsausweisWohnen/VerbrauchsausweisWohnen_2016"; +import { endEnergieVerbrauchVerbrauchsausweis_2016 } from "#lib/Berechnungen/VerbrauchsausweisWohnen/VerbrauchsausweisWohnen_2016.js"; import moment from "moment"; -import { getEmpfehlungen } from "#lib/XML/getEmpfehlungen"; +import { getEmpfehlungen } from "#lib/XML/getEmpfehlungen.js"; export async function pdfVerbrauchsausweisWohnen(ausweis: VerbrauchsausweisWohnenClient) { const template = VerbrauchsausweisWohnen2016Template as Template; diff --git a/mdx/agb.mdx b/src/pages/agb.mdx similarity index 100% rename from mdx/agb.mdx rename to src/pages/agb.mdx diff --git a/mdx/energieausweis-aussteller.mdx b/src/pages/energieausweis-aussteller.mdx similarity index 100% rename from mdx/energieausweis-aussteller.mdx rename to src/pages/energieausweis-aussteller.mdx diff --git a/mdx/enev-zusammenfassung.mdx b/src/pages/enev-zusammenfassung.mdx similarity index 100% rename from mdx/enev-zusammenfassung.mdx rename to src/pages/enev-zusammenfassung.mdx diff --git a/mdx/kundenbewertungen.mdx b/src/pages/kundenbewertungen.mdx similarity index 100% rename from mdx/kundenbewertungen.mdx rename to src/pages/kundenbewertungen.mdx diff --git a/mdx/welcher-energieausweis.mdx b/src/pages/welcher-energieausweis.mdx similarity index 100% rename from mdx/welcher-energieausweis.mdx rename to src/pages/welcher-energieausweis.mdx diff --git a/tsconfig.json b/tsconfig.json index abf900d1..b089c7e8 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,9 +2,9 @@ "compilerOptions": { // Enable top-level await, and other modern ESM features "target": "ESNext", - "module": "ESNext", + "module": "NodeNext", // Enable node-style module resolution, for things like npm package imports - "moduleResolution": "node", + "moduleResolution": "NodeNext", // Enable JSON imports "resolveJsonModule": true, // Enable stricter transpilation for better output