[ci] format

This commit is contained in:
natemoo-re 2023-05-31 16:49:24 +00:00 committed by fredkbot
parent bc5d6ed39f
commit 4e653a4d29
3 changed files with 8 additions and 13 deletions

View file

@ -289,12 +289,11 @@ async function runPostBuildHooks(
const config = container.options.settings.config;
const buildConfig = container.options.settings.config.build;
for (const [fileName, mutation] of mutations) {
const root =
isServerLikeOutput(config)
? mutation.build === 'server'
? buildConfig.server
: buildConfig.client
: config.outDir;
const root = isServerLikeOutput(config)
? mutation.build === 'server'
? buildConfig.server
: buildConfig.client
: config.outDir;
const fileURL = new URL(fileName, root);
await fs.promises.mkdir(new URL('./', fileURL), { recursive: true });
await fs.promises.writeFile(fileURL, mutation.code, 'utf-8');

View file

@ -139,9 +139,7 @@ export function isEndpoint(file: URL, settings: AstroSettings): boolean {
}
export function isModeServerWithNoAdapter(settings: AstroSettings): boolean {
return (
isServerLikeOutput(settings.config) && !settings.adapter
);
return isServerLikeOutput(settings.config) && !settings.adapter;
}
export function relativeToSrcDir(config: AstroConfig, idOrUrl: URL | string) {

View file

@ -339,8 +339,7 @@ export async function runHookBuildGenerated({
buildConfig: BuildConfig;
logging: LogOptions;
}) {
const dir =
isServerLikeOutput(config) ? buildConfig.client : config.outDir;
const dir = isServerLikeOutput(config) ? buildConfig.client : config.outDir;
for (const integration of config.integrations) {
if (integration?.hooks?.['astro:build:generated']) {
@ -366,8 +365,7 @@ export async function runHookBuildDone({
routes: RouteData[];
logging: LogOptions;
}) {
const dir =
isServerLikeOutput(config) ? buildConfig.client : config.outDir;
const dir = isServerLikeOutput(config) ? buildConfig.client : config.outDir;
await fs.promises.mkdir(dir, { recursive: true });
for (const integration of config.integrations) {