From e3080d763c89e99362a33917821afcda14a76bc3 Mon Sep 17 00:00:00 2001 From: Adam Matthiesen Date: Mon, 4 Mar 2024 12:31:09 -0800 Subject: [PATCH] removed unused function... i dont need to create a dts for this virtual module within the user scope --- packages/astro-ghostcms/src/astro-ghostcms.ts | 10 +--------- .../{virtual.d.ts => virtual-config.d.ts} | 0 playgrounds/astro-playground/src/env.d.ts | 2 +- 3 files changed, 2 insertions(+), 10 deletions(-) rename packages/astro-ghostcms/{virtual.d.ts => virtual-config.d.ts} (100%) diff --git a/packages/astro-ghostcms/src/astro-ghostcms.ts b/packages/astro-ghostcms/src/astro-ghostcms.ts index c908340d..ec5d8ef3 100644 --- a/packages/astro-ghostcms/src/astro-ghostcms.ts +++ b/packages/astro-ghostcms/src/astro-ghostcms.ts @@ -1,5 +1,6 @@ import path from "node:path"; import { fileURLToPath } from "node:url"; +import { readFileSync } from "node:fs"; import fse from "fs-extra"; import { createResolver, defineIntegration } from "astro-integration-kit"; import { corePlugins } from "astro-integration-kit/plugins"; @@ -37,7 +38,6 @@ export default defineIntegration({ hasIntegration, addIntegration, addVirtualImports, - addDts, injectRoute, logger, }) => { @@ -220,14 +220,6 @@ export default defineIntegration({ )}`, }); - // Add types for user configuration - addDts({ - name: "@matthiesenxyz/astro-ghostcms/config", - content: `declare module "virtual:@matthiesenxyz/astro-ghostcms/config" { - const Config: import("../schemas/userconfig").GhostUserConfig; - export default Config; - }`, - }); }, "astro:config:done": ({ logger }) => { // Configure Loggers diff --git a/packages/astro-ghostcms/virtual.d.ts b/packages/astro-ghostcms/virtual-config.d.ts similarity index 100% rename from packages/astro-ghostcms/virtual.d.ts rename to packages/astro-ghostcms/virtual-config.d.ts diff --git a/playgrounds/astro-playground/src/env.d.ts b/playgrounds/astro-playground/src/env.d.ts index e49580d9..87fde0f4 100644 --- a/playgrounds/astro-playground/src/env.d.ts +++ b/playgrounds/astro-playground/src/env.d.ts @@ -1,3 +1,3 @@ /// /// -/// +/// \ No newline at end of file