mirror of
https://github.com/withastro/astro.git
synced 2024-12-16 21:46:22 -05:00
fix: astro db tests
This commit is contained in:
parent
c4d4378c50
commit
b60b5fded0
3 changed files with 21 additions and 15 deletions
|
@ -53,7 +53,7 @@
|
|||
"./client/*": "./dist/runtime/client/*",
|
||||
"./components": "./components/index.ts",
|
||||
"./components/*": "./components/*",
|
||||
"./integration": "./integrations/index.js",
|
||||
"./integration": "./dist/integrations/index.js",
|
||||
"./toolbar": "./dist/toolbar/index.js",
|
||||
"./assets": "./dist/assets/index.js",
|
||||
"./assets/utils": "./dist/assets/utils/index.js",
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
import type { AstroIntegration } from "astro"
|
||||
import {} from "astro"
|
||||
import { defineIntegration } from "astro/integration"
|
||||
import type { AstroDbHooks } from "@astrojs/db/types"
|
||||
|
||||
declare module "astro" {
|
||||
interface AstroIntegrationHooks extends AstroDbHooks {}
|
||||
}
|
||||
|
||||
export default function testIntegration(): AstroIntegration {
|
||||
return {
|
||||
name: 'db-test-integration',
|
||||
hooks: {
|
||||
export default defineIntegration({
|
||||
name: "db-test-integration",
|
||||
setup() {
|
||||
return {
|
||||
hooks: {
|
||||
'astro:db:setup': ({ extendDb }) => {
|
||||
extendDb({
|
||||
configEntrypoint: './integration/config.ts',
|
||||
|
@ -16,5 +18,6 @@ export default function testIntegration(): AstroIntegration {
|
|||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
import type { AstroIntegration } from "astro"
|
||||
import {} from "astro"
|
||||
import { defineIntegration } from "astro/integration"
|
||||
import type { AstroDbHooks } from "@astrojs/db/types"
|
||||
|
||||
declare module "astro" {
|
||||
interface AstroIntegrationHooks extends AstroDbHooks {}
|
||||
}
|
||||
|
||||
export default function testIntegration(): AstroIntegration {
|
||||
return {
|
||||
name: 'db-test-integration',
|
||||
hooks: {
|
||||
export default defineIntegration({
|
||||
name: "db-test-integration",
|
||||
setup() {
|
||||
return {
|
||||
hooks: {
|
||||
'astro:db:setup': ({ extendDb }) => {
|
||||
extendDb({
|
||||
configEntrypoint: './integration/config.ts',
|
||||
|
@ -16,5 +18,6 @@ export default function testIntegration(): AstroIntegration {
|
|||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue