mirror of
https://github.com/withastro/astro.git
synced 2024-12-30 22:03:56 -05:00
feat: defineData()
This commit is contained in:
parent
37848a6bd2
commit
76721dd193
2 changed files with 5 additions and 1 deletions
|
@ -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(),
|
||||
|
|
|
@ -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';
|
||||
|
|
Loading…
Reference in a new issue