0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-04-07 23:41:43 -05:00

[ci] format

This commit is contained in:
Matthew Phillips 2024-05-17 12:06:35 +00:00 committed by astrobot-houston
parent f5c8fee76c
commit b41cec6234
2 changed files with 8 additions and 7 deletions
packages/astro/src/core/build

View file

@ -1,6 +1,7 @@
import { createHash } from 'node:crypto';
import fsMod from 'node:fs';
import { fileURLToPath } from 'node:url';
import glob from 'fast-glob';
import pLimit from 'p-limit';
import { type Plugin as VitePlugin, normalizePath } from 'vite';
import type { AstroConfig } from '../../../@types/astro.js';
@ -27,7 +28,6 @@ import { copyFiles } from '../static-build.js';
import type { StaticBuildOptions } from '../types.js';
import { encodeName } from '../util.js';
import { extendManualChunks } from './util.js';
import glob from 'fast-glob';
const CONTENT_CACHE_DIR = './' + CONTENT_PATH;
const CONTENT_MANIFEST_FILE = './manifest.json';
@ -461,12 +461,12 @@ export async function copyContentToCache(opts: StaticBuildOptions) {
// we can clean them out of the dist folder
let files: string[] = [];
await Promise.all([
glob(`**/*.{mjs,json}`,{
cwd: fileURLToPath(cacheTmp)
}).then(f => files.push(...f.map(file => CONTENT_PATH + file))),
glob(`**/*.{mjs,json}`,{
glob(`**/*.{mjs,json}`, {
cwd: fileURLToPath(cacheTmp),
}).then((f) => files.push(...f.map((file) => CONTENT_PATH + file))),
glob(`**/*.{mjs,json}`, {
cwd: fileURLToPath(new URL('./' + CHUNKS_PATH, config.outDir)),
}).then(f => files.push(...f.map(file => CHUNKS_PATH + file))),
}).then((f) => files.push(...f.map((file) => CHUNKS_PATH + file))),
]);
// Remove the tmp folder that's no longer needed.

View file

@ -438,7 +438,8 @@ async function cleanServerOutput(
) {
const out = getOutDirWithinCwd(opts.settings.config.outDir);
// The SSR output chunks for Astro are all .mjs files
const files = ssrOutputChunkNames.filter((f) => f.endsWith('.mjs'))
const files = ssrOutputChunkNames
.filter((f) => f.endsWith('.mjs'))
.concat(contentFileNames ?? []);
if (internals.manifestFileName) {
files.push(internals.manifestFileName);