Skip to content

Commit

Permalink
[ci] format
Browse files Browse the repository at this point in the history
  • Loading branch information
bholmesdev authored and astrobot-houston committed Feb 3, 2023
1 parent bf8d736 commit f7f4721
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion packages/astro/src/content/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
export { attachContentServerListeners } from './server-listeners.js';
export { createContentTypesGenerator } from './types-generator.js';
export { contentObservable, getContentPaths, getDotAstroTypeReference } from './utils.js';
export {
astroContentAssetPropagationPlugin,
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';
4 changes: 2 additions & 2 deletions packages/astro/src/content/server-listeners.ts
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
3 changes: 1 addition & 2 deletions packages/astro/src/content/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
12 changes: 6 additions & 6 deletions packages/astro/src/content/vite-plugin-content-imports.ts
Original file line number Diff line number Diff line change
@@ -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://');
Expand Down

0 comments on commit f7f4721

Please sign in to comment.