0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-30 22:03:56 -05:00

feat: defineData()

This commit is contained in:
bholmesdev 2024-02-05 17:48:28 -05:00
parent 37848a6bd2
commit 76721dd193
2 changed files with 5 additions and 1 deletions

View file

@ -173,6 +173,10 @@ export type DBDataContext = {
mode: 'dev' | 'build';
};
export function defineData(fn: (ctx: DBDataContext) => MaybePromise<void>) {
return fn;
}
export const dbConfigSchema = z.object({
studio: z.boolean().optional(),
collections: collectionsSchema.optional(),

View file

@ -1,4 +1,4 @@
export { defineCollection, defineWritableCollection, field } from './core/types.js';
export { defineCollection, defineWritableCollection, defineData, field } from './core/types.js';
export type { ResolvedCollectionConfig, DBDataContext } from './core/types.js';
export { cli } from './core/cli/index.js';
export { integration as default } from './core/integration/index.js';