Clean up dependencies
All checks were successful
Build and Push / build (push) Successful in 18s

This commit is contained in:
2026-02-16 15:12:59 -05:00
parent d181f77fb2
commit 2f15523a55
14941 changed files with 0 additions and 2078483 deletions

View File

@@ -1,7 +0,0 @@
import type { UserConfig as ViteUserConfig } from 'vite';
import type { AstroInlineConfig, AstroUserConfig } from '../@types/astro.js';
export declare function defineConfig(config: AstroUserConfig): AstroUserConfig;
export declare function getViteConfig(userViteConfig: ViteUserConfig, inlineAstroConfig?: AstroInlineConfig): ({ mode, command }: {
mode: string;
command: "serve" | "build";
}) => Promise<Record<string, any>>;

View File

@@ -1,45 +0,0 @@
function defineConfig(config) {
return config;
}
function getViteConfig(userViteConfig, inlineAstroConfig = {}) {
return async ({ mode, command }) => {
const cmd = command === "serve" ? "dev" : command;
const [
fs,
{ mergeConfig },
{ createNodeLogger },
{ resolveConfig, createSettings },
{ createVite },
{ runHookConfigSetup, runHookConfigDone },
{ astroContentListenPlugin }
] = await Promise.all([
import("node:fs"),
import("vite"),
import("../core/config/logging.js"),
import("../core/config/index.js"),
import("../core/create-vite.js"),
import("../integrations/hooks.js"),
import("./vite-plugin-content-listen.js")
]);
const logger = createNodeLogger(inlineAstroConfig);
const { astroConfig: config } = await resolveConfig(inlineAstroConfig, cmd);
let settings = await createSettings(config, userViteConfig.root);
settings = await runHookConfigSetup({ settings, command: cmd, logger });
const viteConfig = await createVite(
{
mode,
plugins: [
// Initialize the content listener
astroContentListenPlugin({ settings, logger, fs })
]
},
{ settings, logger, mode, sync: false }
);
await runHookConfigDone({ settings, logger });
return mergeConfig(viteConfig, userViteConfig);
};
}
export {
defineConfig,
getViteConfig
};

View File

@@ -1,17 +0,0 @@
import type fsMod from 'node:fs';
import type { Plugin } from 'vite';
import type { AstroSettings } from '../@types/astro.js';
import type { Logger } from '../core/logger/core.js';
/**
* Listen for Astro content directory changes and generate types.
*
* This is a separate plugin for `getViteConfig` as the `attachContentServerListeners` API
* needs to be called at different times in `astro dev` and `getViteConfig`. For `astro dev`,
* it needs to be called after the Astro server is started (packages/astro/src/core/dev/dev.ts).
* For `getViteConfig`, it needs to be called after the Vite server is started.
*/
export declare function astroContentListenPlugin({ settings, logger, fs, }: {
settings: AstroSettings;
logger: Logger;
fs: typeof fsMod;
}): Plugin;

View File

@@ -1,26 +0,0 @@
import { attachContentServerListeners } from "../content/server-listeners.js";
function astroContentListenPlugin({
settings,
logger,
fs
}) {
let server;
return {
name: "astro:content-listen",
apply: "serve",
configureServer(_server) {
server = _server;
},
async buildStart() {
await attachContentServerListeners({
fs,
settings,
logger,
viteServer: server
});
}
};
}
export {
astroContentListenPlugin
};