Skip to content

Commit c36a663

Browse files
feat: re-export KirbyApiResponse from Kirby types package
1 parent 1c68d03 commit c36a663

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/module.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ export default defineNuxtModule<ModuleOptions>({
151151
},
152152
async setup(options, nuxt) {
153153
const moduleName = 'nuxt-kql'
154+
const exportedKirbyTypes = ['KirbyApiResponse', 'KirbyBlock', 'KirbyDefaultBlockType', 'KirbyDefaultBlocks', 'KirbyLayout', 'KirbyLayoutColumn', 'KirbyQuery', 'KirbyQueryChain', 'KirbyQueryModel', 'KirbyQueryRequest', 'KirbyQueryResponse, KirbyQuerySchema']
154155

155156
// Make sure Kirby URL and KQL endpoint are set
156157
if (!options.url)
@@ -249,7 +250,7 @@ export default defineNuxtModule<ModuleOptions>({
249250
getContents() {
250251
return `
251252
// Generated by ${moduleName}
252-
export type { KirbyBlock, KirbyDefaultBlockType, KirbyDefaultBlocks, KirbyLayout, KirbyLayoutColumn, KirbyQuery, KirbyQueryChain, KirbyQueryModel, KirbyQueryRequest, KirbyQueryResponse, KirbyQuerySchema } from 'kirby-types'
253+
export type { ${exportedKirbyTypes.join(', ')} } from 'kirby-types'
253254
254255
${[...prefetchedQueries.entries()].map(([key, response]) => `
255256
export const ${key} = ${JSON.stringify(response?.result || null, undefined, 2)}

0 commit comments

Comments
 (0)