full site update
This commit is contained in:
50
node_modules/astro/dist/content/runtime.d.ts
generated
vendored
50
node_modules/astro/dist/content/runtime.d.ts
generated
vendored
@@ -1,27 +1,38 @@
|
||||
import type { MarkdownHeading } from '@astrojs/markdown-remark';
|
||||
import { z } from 'zod';
|
||||
import { type AstroComponentFactory } from '../runtime/server/index.js';
|
||||
import type { LiveDataCollectionResult, LiveDataEntryResult } from '../types/public/content.js';
|
||||
import { type LIVE_CONTENT_TYPE } from './consts.js';
|
||||
import { type DataEntry } from './data-store.js';
|
||||
import { LiveCollectionCacheHintError, LiveCollectionError, LiveCollectionValidationError, LiveEntryNotFoundError } from './loaders/errors.js';
|
||||
import type { LiveLoader } from './loaders/types.js';
|
||||
import type { ContentLookupMap } from './utils.js';
|
||||
export { LiveCollectionError, LiveCollectionCacheHintError, LiveEntryNotFoundError, LiveCollectionValidationError, };
|
||||
type LazyImport = () => Promise<any>;
|
||||
type GlobResult = Record<string, LazyImport>;
|
||||
type CollectionToEntryMap = Record<string, GlobResult>;
|
||||
type GetEntryImport = (collection: string, lookupId: string) => Promise<LazyImport>;
|
||||
export declare function defineCollection(config: any): any;
|
||||
type LiveCollectionConfigMap = Record<string, {
|
||||
loader: LiveLoader;
|
||||
type: typeof LIVE_CONTENT_TYPE;
|
||||
schema?: z.ZodType;
|
||||
}>;
|
||||
export declare function createCollectionToGlobResultMap({ globResult, contentDir, }: {
|
||||
globResult: GlobResult;
|
||||
contentDir: string;
|
||||
}): CollectionToEntryMap;
|
||||
export declare function createGetCollection({ contentCollectionToEntryMap, dataCollectionToEntryMap, getRenderEntryImport, cacheEntriesByCollection, }: {
|
||||
export declare function createGetCollection({ contentCollectionToEntryMap, dataCollectionToEntryMap, getRenderEntryImport, cacheEntriesByCollection, liveCollections, }: {
|
||||
contentCollectionToEntryMap: CollectionToEntryMap;
|
||||
dataCollectionToEntryMap: CollectionToEntryMap;
|
||||
getRenderEntryImport: GetEntryImport;
|
||||
cacheEntriesByCollection: Map<string, any[]>;
|
||||
}): (collection: string, filter?: (entry: any) => unknown) => Promise<any[]>;
|
||||
export declare function createGetEntryBySlug({ getEntryImport, getRenderEntryImport, collectionNames, }: {
|
||||
liveCollections: LiveCollectionConfigMap;
|
||||
}): (collection: string, filter?: ((entry: any) => unknown) | Record<string, unknown>) => Promise<any[]>;
|
||||
export declare function createGetEntryBySlug({ getEntryImport, getRenderEntryImport, collectionNames, getEntry, }: {
|
||||
getEntryImport: GetEntryImport;
|
||||
getRenderEntryImport: GetEntryImport;
|
||||
collectionNames: Set<string>;
|
||||
getEntry: ReturnType<typeof createGetEntry>;
|
||||
}): (collection: string, slug: string) => Promise<{
|
||||
id: any;
|
||||
slug: any;
|
||||
@@ -30,10 +41,11 @@ export declare function createGetEntryBySlug({ getEntryImport, getRenderEntryImp
|
||||
data: any;
|
||||
render(): Promise<RenderResult>;
|
||||
} | undefined>;
|
||||
export declare function createGetDataEntryById({ getEntryImport, collectionNames, }: {
|
||||
export declare function createGetDataEntryById({ getEntryImport, collectionNames, getEntry, }: {
|
||||
getEntryImport: GetEntryImport;
|
||||
collectionNames: Set<string>;
|
||||
}): (collection: string, id: string) => Promise<{
|
||||
getEntry: ReturnType<typeof createGetEntry>;
|
||||
}): (collection: string, id: string) => Promise<ContentEntryResult | {
|
||||
id: any;
|
||||
collection: any;
|
||||
data: any;
|
||||
@@ -58,11 +70,12 @@ type EntryLookupObject = {
|
||||
collection: string;
|
||||
slug: string;
|
||||
};
|
||||
export declare function createGetEntry({ getEntryImport, getRenderEntryImport, collectionNames, }: {
|
||||
export declare function createGetEntry({ getEntryImport, getRenderEntryImport, collectionNames, liveCollections, }: {
|
||||
getEntryImport: GetEntryImport;
|
||||
getRenderEntryImport: GetEntryImport;
|
||||
collectionNames: Set<string>;
|
||||
}): (collectionOrLookupObject: string | EntryLookupObject, _lookupId?: string) => Promise<ContentEntryResult | DataEntryResult | undefined>;
|
||||
liveCollections: LiveCollectionConfigMap;
|
||||
}): (collectionOrLookupObject: string | EntryLookupObject, lookup?: string | Record<string, unknown>) => Promise<ContentEntryResult | DataEntryResult | undefined>;
|
||||
export declare function createGetEntries(getEntry: ReturnType<typeof createGetEntry>): (entries: {
|
||||
collection: string;
|
||||
id: string;
|
||||
@@ -70,6 +83,12 @@ export declare function createGetEntries(getEntry: ReturnType<typeof createGetEn
|
||||
collection: string;
|
||||
slug: string;
|
||||
}[]) => Promise<(ContentEntryResult | DataEntryResult | undefined)[]>;
|
||||
export declare function createGetLiveCollection({ liveCollections, }: {
|
||||
liveCollections: LiveCollectionConfigMap;
|
||||
}): (collection: string, filter?: Record<string, unknown>) => Promise<LiveDataCollectionResult>;
|
||||
export declare function createGetLiveEntry({ liveCollections, }: {
|
||||
liveCollections: LiveCollectionConfigMap;
|
||||
}): (collection: string, lookup: string | Record<string, unknown>) => Promise<LiveDataEntryResult>;
|
||||
type RenderResult = {
|
||||
Content: AstroComponentFactory;
|
||||
headings: MarkdownHeading[];
|
||||
@@ -79,7 +98,11 @@ export declare function renderEntry(entry: DataEntry | {
|
||||
render: () => Promise<{
|
||||
Content: AstroComponentFactory;
|
||||
}>;
|
||||
}): Promise<{
|
||||
} | (DataEntry & {
|
||||
render: () => Promise<{
|
||||
Content: AstroComponentFactory;
|
||||
}>;
|
||||
})): Promise<{
|
||||
Content: AstroComponentFactory;
|
||||
}>;
|
||||
export declare function createReference({ lookupMap }: {
|
||||
@@ -97,11 +120,11 @@ export declare function createReference({ lookupMap }: {
|
||||
slug: z.ZodString;
|
||||
collection: z.ZodString;
|
||||
}, "strip", z.ZodTypeAny, {
|
||||
collection: string;
|
||||
slug: string;
|
||||
collection: string;
|
||||
}, {
|
||||
collection: string;
|
||||
slug: string;
|
||||
collection: string;
|
||||
}>]>, {
|
||||
id: string;
|
||||
collection: string;
|
||||
@@ -112,7 +135,8 @@ export declare function createReference({ lookupMap }: {
|
||||
id: string;
|
||||
collection: string;
|
||||
} | {
|
||||
collection: string;
|
||||
slug: string;
|
||||
collection: string;
|
||||
}>;
|
||||
export {};
|
||||
export declare function defineCollection(config: any): import("./config.js").CollectionConfig<import("./config.js").BaseSchema>;
|
||||
export declare function defineLiveCollection(): void;
|
||||
|
Reference in New Issue
Block a user