[ci] yarn format
This commit is contained in:
parent
c8a257adc4
commit
72096858e8
4 changed files with 45 additions and 30 deletions
|
@ -180,7 +180,7 @@ export type GetHydrateCallback = () => Promise<(element: Element, innerHTML: str
|
||||||
export type GetStaticPathsItem = { params: Params; props?: Props };
|
export type GetStaticPathsItem = { params: Params; props?: Props };
|
||||||
export type GetStaticPathsResult = GetStaticPathsItem[];
|
export type GetStaticPathsResult = GetStaticPathsItem[];
|
||||||
export type GetStaticPathsResultKeyed = GetStaticPathsResult & {
|
export type GetStaticPathsResultKeyed = GetStaticPathsResult & {
|
||||||
keyed: Map<string, GetStaticPathsItem>
|
keyed: Map<string, GetStaticPathsItem>;
|
||||||
};
|
};
|
||||||
|
|
||||||
export interface HydrateOptions {
|
export interface HydrateOptions {
|
||||||
|
|
|
@ -310,7 +310,7 @@ async function generatePath(pathname: string, opts: StaticBuildOptions, gopts: G
|
||||||
mod,
|
mod,
|
||||||
// Do not validate as validation already occurred for static routes
|
// Do not validate as validation already occurred for static routes
|
||||||
// and validation is relatively expensive.
|
// and validation is relatively expensive.
|
||||||
validate: false
|
validate: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
debug(logging, 'generate', `Generating: ${pathname}`);
|
debug(logging, 'generate', `Generating: ${pathname}`);
|
||||||
|
|
|
@ -1,6 +1,19 @@
|
||||||
import type { BuildResult } from 'esbuild';
|
import type { BuildResult } from 'esbuild';
|
||||||
import type vite from '../vite';
|
import type vite from '../vite';
|
||||||
import type { AstroConfig, ComponentInstance, GetStaticPathsResult, GetStaticPathsResultKeyed, Params, Props, Renderer, RouteCache, RouteData, RuntimeMode, SSRElement, SSRError } from '../../@types/astro';
|
import type {
|
||||||
|
AstroConfig,
|
||||||
|
ComponentInstance,
|
||||||
|
GetStaticPathsResult,
|
||||||
|
GetStaticPathsResultKeyed,
|
||||||
|
Params,
|
||||||
|
Props,
|
||||||
|
Renderer,
|
||||||
|
RouteCache,
|
||||||
|
RouteData,
|
||||||
|
RuntimeMode,
|
||||||
|
SSRElement,
|
||||||
|
SSRError,
|
||||||
|
} from '../../@types/astro';
|
||||||
import type { LogOptions } from '../logger';
|
import type { LogOptions } from '../logger';
|
||||||
|
|
||||||
import eol from 'eol';
|
import eol from 'eol';
|
||||||
|
@ -132,7 +145,7 @@ export async function getParamsAndProps({
|
||||||
logging,
|
logging,
|
||||||
pathname,
|
pathname,
|
||||||
mod,
|
mod,
|
||||||
validate = true
|
validate = true,
|
||||||
}: {
|
}: {
|
||||||
route: RouteData | undefined;
|
route: RouteData | undefined;
|
||||||
routeCache: RouteCache;
|
routeCache: RouteCache;
|
||||||
|
|
|
@ -10,7 +10,9 @@ export async function callGetStaticPaths(mod: ComponentInstance, route: RouteDat
|
||||||
const staticPaths: GetStaticPathsResult = await (
|
const staticPaths: GetStaticPathsResult = await (
|
||||||
await mod.getStaticPaths!({
|
await mod.getStaticPaths!({
|
||||||
paginate: generatePaginateFunction(route),
|
paginate: generatePaginateFunction(route),
|
||||||
rss: rssFn || (() => {
|
rss:
|
||||||
|
rssFn ||
|
||||||
|
(() => {
|
||||||
/* noop */
|
/* noop */
|
||||||
}),
|
}),
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Reference in a new issue