2022-08-26 15:47:29 +00:00
|
|
|
import { defineUntypedSchema } from 'untyped'
|
|
|
|
|
|
|
|
export default defineUntypedSchema({
|
2022-02-10 17:29:59 +00:00
|
|
|
/**
|
2022-08-11 21:25:35 +00:00
|
|
|
* Configuration for Nitro.
|
2022-05-06 13:31:52 +00:00
|
|
|
* @see https://nitro.unjs.io/config/
|
2022-04-07 12:57:57 +00:00
|
|
|
* @type {typeof import('nitropack')['NitroConfig']}
|
2022-08-11 21:25:35 +00:00
|
|
|
*/
|
2022-10-17 11:22:30 +00:00
|
|
|
nitro: {
|
2022-10-17 14:10:46 +00:00
|
|
|
routeRules: {
|
2024-01-29 16:53:25 +00:00
|
|
|
$resolve: async (val: Record<string, any> | undefined, get) => ({
|
|
|
|
...await get('routeRules') as Record<string, any>,
|
2023-11-09 17:01:13 +00:00
|
|
|
...val
|
2022-10-17 11:22:30 +00:00
|
|
|
})
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Global route options applied to matching server routes.
|
|
|
|
* @experimental This is an experimental feature and API may change in the future.
|
2023-03-05 10:10:56 +00:00
|
|
|
* @see https://nitro.unjs.io/config/#routerules
|
2022-10-17 14:10:46 +00:00
|
|
|
* @type {typeof import('nitropack')['NitroConfig']['routeRules']}
|
2022-10-17 11:22:30 +00:00
|
|
|
*/
|
|
|
|
routeRules: {},
|
2022-05-06 13:31:52 +00:00
|
|
|
|
|
|
|
/**
|
2022-08-11 21:25:35 +00:00
|
|
|
* Nitro server handlers.
|
2022-05-06 13:31:52 +00:00
|
|
|
*
|
2022-09-05 07:33:07 +00:00
|
|
|
* Each handler accepts the following options:
|
|
|
|
* - handler: The path to the file defining the handler.
|
|
|
|
* - route: The route under which the handler is available. This follows the conventions of https://github.com/unjs/radix3.
|
|
|
|
* - method: The HTTP method of requests that should be handled.
|
|
|
|
* - middleware: Specifies whether it is a middleware handler.
|
|
|
|
* - lazy: Specifies whether to use lazy loading to import the handler.
|
2022-12-19 11:50:01 +00:00
|
|
|
* @see https://nuxt.com/docs/guide/directory-structure/server
|
2022-09-05 07:33:07 +00:00
|
|
|
* @note Files from `server/api`, `server/middleware` and `server/routes` will be automatically registered by Nuxt.
|
|
|
|
* @example
|
|
|
|
* ```js
|
|
|
|
* serverHandlers: [
|
|
|
|
* { route: '/path/foo/**:name', handler: '~/server/foohandler.ts' }
|
|
|
|
* ]
|
|
|
|
* ```
|
2022-05-06 13:31:52 +00:00
|
|
|
* @type {typeof import('nitropack')['NitroEventHandler'][]}
|
|
|
|
*/
|
|
|
|
serverHandlers: [],
|
|
|
|
|
|
|
|
/**
|
2022-08-11 21:25:35 +00:00
|
|
|
* Nitro development-only server handlers.
|
2023-03-09 15:25:47 +00:00
|
|
|
* @see https://nitro.unjs.io/guide/routing
|
2022-05-06 13:31:52 +00:00
|
|
|
* @type {typeof import('nitropack')['NitroDevEventHandler'][]}
|
|
|
|
*/
|
2022-08-11 21:25:35 +00:00
|
|
|
devServerHandlers: []
|
2022-08-26 15:47:29 +00:00
|
|
|
})
|