diff --git a/packages/astro/content-reference/content.d.ts b/packages/astro/content-generated.d.ts similarity index 100% rename from packages/astro/content-reference/content.d.ts rename to packages/astro/content-generated.d.ts diff --git a/packages/astro/content-reference/content.mjs b/packages/astro/content-generated.mjs similarity index 95% rename from packages/astro/content-reference/content.mjs rename to packages/astro/content-generated.mjs index 470608634..a255377bf 100644 --- a/packages/astro/content-reference/content.mjs +++ b/packages/astro/content-generated.mjs @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { getErrorMsg, parseEntryData } from 'astro/content-internals'; +import { getErrorMsg, parseEntryData } from 'astro/content/internals'; const defaultSchemaFileResolved = { schema: { parse: (mod) => mod } }; /** Used to stub out `schemaMap` entries that don't have a `~schema.ts` file */ diff --git a/packages/astro/package.json b/packages/astro/package.json index 2b7f9b1cb..98db67244 100644 --- a/packages/astro/package.json +++ b/packages/astro/package.json @@ -42,7 +42,7 @@ "types": "./config.d.ts", "default": "./config.mjs" }, - "./content-internals": "./dist/content-internals/index.js", + "./content/internals": "./dist/content/internals.js", "./app": "./dist/core/app/index.js", "./app/node": "./dist/core/app/node.js", "./client/*": "./dist/runtime/client/*", diff --git a/packages/astro/src/content-internals/index.ts b/packages/astro/src/content/internals.ts similarity index 100% rename from packages/astro/src/content-internals/index.ts rename to packages/astro/src/content/internals.ts diff --git a/packages/astro/src/vite-plugin-content/index.ts b/packages/astro/src/content/vite-plugin.ts similarity index 98% rename from packages/astro/src/vite-plugin-content/index.ts rename to packages/astro/src/content/vite-plugin.ts index 8475cb04f..99e774341 100644 --- a/packages/astro/src/vite-plugin-content/index.ts +++ b/packages/astro/src/content/vite-plugin.ts @@ -14,7 +14,7 @@ type Dirs = { generatedInputDir: URL; }; -const CONTENT_BASE = 'content'; +const CONTENT_BASE = 'content-generated'; const CONTENT_FILE = CONTENT_BASE + '.mjs'; const CONTENT_TYPES_FILE = CONTENT_BASE + '.d.ts'; @@ -29,7 +29,7 @@ export function astroContentPlugin({ const dirs: Dirs = { cacheDir: new URL('./.astro/', root), contentDir: new URL('./content/', srcDir), - generatedInputDir: new URL('../../content-reference/', import.meta.url), + generatedInputDir: new URL('../../', import.meta.url), }; let contentDirExists = false; diff --git a/packages/astro/src/core/create-vite.ts b/packages/astro/src/core/create-vite.ts index 9ff148c32..134f10fc7 100644 --- a/packages/astro/src/core/create-vite.ts +++ b/packages/astro/src/core/create-vite.ts @@ -20,7 +20,7 @@ import astroScriptsPlugin from '../vite-plugin-scripts/index.js'; import astroScriptsPageSSRPlugin from '../vite-plugin-scripts/page-ssr.js'; import { createCustomViteLogger } from './errors/dev/index.js'; import { resolveDependency } from './util.js'; -import { astroContentPlugin } from '../vite-plugin-content/index.js'; +import { astroContentPlugin } from '../content/vite-plugin.js'; interface CreateViteOptions { settings: AstroSettings;