0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-02-24 22:46:02 -05:00

feat: expose utils for integration seed files

This commit is contained in:
bholmesdev 2024-02-29 17:10:58 -05:00
parent 36a97e64d9
commit 5abb5bfc37
3 changed files with 13 additions and 1 deletions

View file

@ -12,6 +12,10 @@
"types": "./index.d.ts",
"import": "./dist/index.js"
},
"./utils": {
"types": "./dist/utils.d.ts",
"import": "./dist/utils.js"
},
"./runtime": {
"types": "./dist/runtime/index.d.ts",
"import": "./dist/runtime/index.js"
@ -31,6 +35,9 @@
".": [
"./index.d.ts"
],
"utils": [
"./dist/utils.d.ts"
],
"runtime": [
"./dist/runtime/index.d.ts"
],

1
packages/db/src/utils.ts Normal file
View file

@ -0,0 +1 @@
export { asDrizzleTable } from './runtime/index.js';

View file

@ -1,4 +1,8 @@
import { db, Author, Themes } from 'astro:db';
import { db, Author } from 'astro:db';
import { Themes as ThemesConfig } from './theme';
import { asDrizzleTable } from '@astrojs/db/utils';
const Themes = asDrizzleTable('Themes', ThemesConfig);
await db.batch([
db