[ci] format

This commit is contained in:
bholmesdev 2023-05-17 15:38:46 +00:00 committed by fredkbot
parent c6d7ebefdd
commit 4264b7c564
10 changed files with 45 additions and 46 deletions

View file

@ -1,6 +1,7 @@
import type { MarkdownHeading } from '@astrojs/markdown-remark';
import { string as zodString, ZodIssueCode } from 'zod';
import { AstroError, AstroErrorData } from '../core/errors/index.js';
import { prependForwardSlash } from '../core/path.js';
import { ZodIssueCode, string as zodString, type z } from 'zod';
import {
createComponent,
createHeadAndContent,
@ -12,7 +13,6 @@ import {
type AstroComponentFactory,
} from '../runtime/server/index.js';
import type { ContentLookupMap } from './utils.js';
import type { MarkdownHeading } from '@astrojs/markdown-remark';
type LazyImport = () => Promise<any>;
type GlobResult = Record<string, LazyImport>;

View file

@ -2,10 +2,10 @@
import {
createCollectionToGlobResultMap,
createGetCollection,
createGetEntryBySlug,
createGetEntry,
createGetEntries,
createGetDataEntryById,
createGetEntries,
createGetEntry,
createGetEntryBySlug,
createReference,
} from 'astro/content/runtime';

View file

@ -5,25 +5,25 @@ import * as path from 'node:path';
import { fileURLToPath, pathToFileURL } from 'node:url';
import { normalizePath, type ViteDevServer } from 'vite';
import type { AstroSettings, ContentEntryType } from '../@types/astro.js';
import { AstroErrorData } from '../core/errors/errors-data.js';
import { AstroError } from '../core/errors/errors.js';
import { info, warn, type LogOptions } from '../core/logger/core.js';
import { isRelativePath } from '../core/path.js';
import { CONTENT_TYPES_FILE, VIRTUAL_MODULE_ID } from './consts.js';
import {
getContentEntryConfigByExtMap,
getContentEntryIdAndSlug,
getContentPaths,
getDataEntryExts,
getDataEntryId,
getEntryCollectionName,
getEntrySlug,
getEntryType,
reloadContentConfigObserver,
type ContentConfig,
type ContentObservable,
type ContentPaths,
getContentEntryConfigByExtMap,
getContentPaths,
getEntryType,
getContentEntryIdAndSlug,
getEntrySlug,
getEntryCollectionName,
getDataEntryExts,
getDataEntryId,
reloadContentConfigObserver,
} from './utils.js';
import { AstroError } from '../core/errors/errors.js';
import { AstroErrorData } from '../core/errors/errors-data.js';
type ChokidarEvent = 'add' | 'addDir' | 'change' | 'unlink' | 'unlinkDir';
type RawContentEvent = { name: ChokidarEvent; entry: string };

View file

@ -4,7 +4,7 @@ import fsMod from 'node:fs';
import path from 'node:path';
import { fileURLToPath, pathToFileURL } from 'node:url';
import type { PluginContext } from 'rollup';
import { normalizePath, type ErrorPayload as ViteErrorPayload, type ViteDevServer } from 'vite';
import { normalizePath, type ViteDevServer } from 'vite';
import { z } from 'zod';
import type {
AstroConfig,
@ -14,10 +14,10 @@ import type {
} from '../@types/astro.js';
import { VALID_INPUT_FORMATS } from '../assets/consts.js';
import { AstroError, AstroErrorData } from '../core/errors/index.js';
import { CONTENT_TYPES_FILE, CONTENT_FLAGS } from './consts.js';
import { formatYAMLException, isYAMLException } from '../core/errors/utils.js';
import { CONTENT_FLAGS, CONTENT_TYPES_FILE } from './consts.js';
import { errorMap } from './error-map.js';
import { createImage } from './runtime-assets.js';
import { formatYAMLException, isYAMLException } from '../core/errors/utils.js';
/**
* Amap from a collection + slug to the local file path.

View file

@ -16,21 +16,21 @@ import { AstroError } from '../core/errors/errors.js';
import { escapeViteEnvReferences, getFileInfo } from '../vite-plugin-utils/index.js';
import { CONTENT_FLAG, DATA_FLAG } from './consts.js';
import {
type ContentConfig,
type ContentPaths,
getContentEntryConfigByExtMap,
getContentEntryExts,
getContentPaths,
getEntryData,
parseEntrySlug,
getContentEntryIdAndSlug,
getContentPaths,
getDataEntryExts,
getDataEntryId,
getEntryCollectionName,
getEntryData,
getEntryType,
globalContentConfigObserver,
getContentEntryConfigByExtMap,
getEntryCollectionName,
getDataEntryExts,
hasContentFlag,
getDataEntryId,
parseEntrySlug,
reloadContentConfigObserver,
type ContentConfig,
type ContentPaths,
} from './utils.js';
function getContentRendererByViteId(

View file

@ -4,21 +4,21 @@ import { extname } from 'node:path';
import { fileURLToPath, pathToFileURL } from 'node:url';
import type { Plugin } from 'vite';
import type { AstroSettings } from '../@types/astro.js';
import { rootRelativePath } from '../core/util.js';
import { AstroError, AstroErrorData } from '../core/errors/index.js';
import { rootRelativePath } from '../core/util.js';
import { VIRTUAL_MODULE_ID } from './consts.js';
import {
getContentEntryConfigByExtMap,
getDataEntryExts,
getContentPaths,
getExtGlob,
getEntryCollectionName,
getContentEntryIdAndSlug,
getEntrySlug,
getContentPaths,
getDataEntryExts,
getDataEntryId,
getEntryCollectionName,
getEntrySlug,
getEntryType,
type ContentPaths,
getExtGlob,
type ContentLookupMap,
type ContentPaths,
} from './utils.js';
interface AstroContentVirtualModPluginParams {

View file

@ -1,18 +1,18 @@
import type { AstroConfig, AstroSettings, AstroUserConfig } from '../../@types/astro';
import { SUPPORTED_MARKDOWN_FILE_EXTENSIONS } from './../constants.js';
import yaml from 'js-yaml';
import path from 'node:path';
import { fileURLToPath, pathToFileURL } from 'url';
import type { AstroConfig, AstroSettings, AstroUserConfig } from '../../@types/astro';
import { getContentPaths } from '../../content/index.js';
import jsxRenderer from '../../jsx/renderer.js';
import { isHybridOutput } from '../../prerender/utils.js';
import { markdownContentEntryType } from '../../vite-plugin-markdown/content-entry-type.js';
import { getDefaultClientDirectives } from '../client-directive/index.js';
import { AstroError, AstroErrorData } from '../errors/index.js';
import { formatYAMLException, isYAMLException } from '../errors/utils.js';
import { SUPPORTED_MARKDOWN_FILE_EXTENSIONS } from './../constants.js';
import { createDefaultDevConfig } from './config.js';
import { AstroTimer } from './timer.js';
import { loadTSConfig } from './tsconfig.js';
import yaml from 'js-yaml';
import { formatYAMLException, isYAMLException } from '../errors/utils.js';
import { AstroError, AstroErrorData } from '../errors/index.js';
import { getContentPaths } from '../../content/index.js';
export function createBaseSettings(config: AstroConfig): AstroSettings {
const { contentDir } = getContentPaths(config);

View file

@ -5,8 +5,8 @@ export {
AstroError,
CompilerError,
CSSError,
MarkdownError,
isAstroError,
MarkdownError,
} from './errors.js';
export { codeFrame } from './printer.js';
export { createSafeError, positionAt } from './utils.js';

View file

@ -1,8 +1,8 @@
import type { DiagnosticCode } from '@astrojs/compiler/shared/diagnostics.js';
import type { SSRError } from '../../@types/astro.js';
import { AstroErrorData, type AstroErrorCodes, type ErrorData } from './errors-data.js';
import type { YAMLException } from 'js-yaml';
import type { ErrorPayload as ViteErrorPayload } from 'vite';
import type { SSRError } from '../../@types/astro.js';
import { AstroErrorData, type AstroErrorCodes, type ErrorData } from './errors-data.js';
/**
* Get the line and character based on the offset

View file

@ -10,10 +10,9 @@ import { runHookConfigSetup } from '../../integrations/index.js';
import { setUpEnvTs } from '../../vite-plugin-inject-env-ts/index.js';
import { getTimeStat } from '../build/util.js';
import { createVite } from '../create-vite.js';
import { AstroError, AstroErrorData, createSafeError } from '../errors/index.js';
import { AstroError, AstroErrorData, createSafeError, isAstroError } from '../errors/index.js';
import { info, type LogOptions } from '../logger/core.js';
import { printHelp } from '../messages.js';
import { isAstroError } from '../errors/index.js';
export type ProcessExit = 0 | 1;