0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-23 21:53:55 -05:00

[ci] format

This commit is contained in:
bholmesdev 2023-02-03 20:53:53 +00:00 committed by fredkbot
parent bf8d7366ac
commit f7f4721231
4 changed files with 10 additions and 11 deletions

View file

@ -1,3 +1,4 @@
export { attachContentServerListeners } from './server-listeners.js';
export { createContentTypesGenerator } from './types-generator.js';
export { contentObservable, getContentPaths, getDotAstroTypeReference } from './utils.js';
export {
@ -5,5 +6,4 @@ export {
astroContentProdBundlePlugin,
} from './vite-plugin-content-assets.js';
export { astroContentImportPlugin } from './vite-plugin-content-imports.js';
export { attachContentServerListeners } from './server-listeners.js';
export { astroContentVirtualModPlugin } from './vite-plugin-content-virtual-mod.js';

View file

@ -1,12 +1,12 @@
import { cyan } from 'kleur/colors';
import { pathToFileURL } from 'node:url';
import type fsMod from 'node:fs';
import { pathToFileURL } from 'node:url';
import type { ViteDevServer } from 'vite';
import type { AstroSettings } from '../@types/astro.js';
import { info, LogOptions } from '../core/logger/core.js';
import { appendForwardSlash } from '../core/path.js';
import { createContentTypesGenerator } from './types-generator.js';
import { globalContentConfigObserver, getContentPaths } from './utils.js';
import { getContentPaths, globalContentConfigObserver } from './utils.js';
interface ContentServerListenerParams {
fs: typeof fsMod;

View file

@ -3,12 +3,11 @@ import matter from 'gray-matter';
import type fsMod from 'node:fs';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import { createServer, ErrorPayload as ViteErrorPayload, normalizePath, ViteDevServer } from 'vite';
import { ErrorPayload as ViteErrorPayload, normalizePath, ViteDevServer } from 'vite';
import { z } from 'zod';
import { AstroConfig, AstroSettings } from '../@types/astro.js';
import { AstroError, AstroErrorData } from '../core/errors/index.js';
import { CONTENT_TYPES_FILE } from './consts.js';
import { astroContentVirtualModPlugin } from './vite-plugin-content-virtual-mod.js';
export const collectionConfigParser = z.object({
schema: z.any().optional(),

View file

@ -1,22 +1,22 @@
import * as devalue from 'devalue';
import type fsMod from 'node:fs';
import { pathToFileURL } from 'url';
import type { Plugin } from 'vite';
import type fsMod from 'node:fs';
import { AstroSettings } from '../@types/astro.js';
import { AstroErrorData } from '../core/errors/errors-data.js';
import { AstroError } from '../core/errors/errors.js';
import { escapeViteEnvReferences, getFileInfo } from '../vite-plugin-utils/index.js';
import { contentFileExts, CONTENT_FLAG } from './consts.js';
import { getEntryType } from './types-generator.js';
import {
ContentConfig,
globalContentConfigObserver,
getContentPaths,
getEntryData,
getEntryInfo,
getEntrySlug,
globalContentConfigObserver,
parseFrontmatter,
} from './utils.js';
import { escapeViteEnvReferences, getFileInfo } from '../vite-plugin-utils/index.js';
import { getEntryType } from './types-generator.js';
import { AstroError } from '../core/errors/errors.js';
import { AstroErrorData } from '../core/errors/errors-data.js';
function isContentFlagImport(viteId: string) {
const { pathname, searchParams } = new URL(viteId, 'file://');