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

View file

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

View file

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

View file

@ -1,22 +1,22 @@
import * as devalue from 'devalue'; import * as devalue from 'devalue';
import type fsMod from 'node:fs';
import { pathToFileURL } from 'url'; import { pathToFileURL } from 'url';
import type { Plugin } from 'vite'; import type { Plugin } from 'vite';
import type fsMod from 'node:fs';
import { AstroSettings } from '../@types/astro.js'; 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 { contentFileExts, CONTENT_FLAG } from './consts.js';
import { getEntryType } from './types-generator.js';
import { import {
ContentConfig, ContentConfig,
globalContentConfigObserver,
getContentPaths, getContentPaths,
getEntryData, getEntryData,
getEntryInfo, getEntryInfo,
getEntrySlug, getEntrySlug,
globalContentConfigObserver,
parseFrontmatter, parseFrontmatter,
} from './utils.js'; } 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) { function isContentFlagImport(viteId: string) {
const { pathname, searchParams } = new URL(viteId, 'file://'); const { pathname, searchParams } = new URL(viteId, 'file://');