File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { consola } from "consola" ;
22import { createDebugger , createHooks } from "hookable" ;
33import { runtimeDir } from "nitropack/runtime/meta" ;
4+ import { version as nitroVersion } from "nitropack/meta" ;
45import type {
56 LoadConfigOptions ,
67 Nitro ,
@@ -25,6 +26,10 @@ export async function createNitro(
2526
2627 // Create nitro context
2728 const nitro : Nitro = {
29+ meta : {
30+ version : nitroVersion ,
31+ majorVersion : 2 ,
32+ } ,
2833 options,
2934 hooks : createHooks ( ) ,
3035 vfs : { } ,
Original file line number Diff line number Diff line change @@ -10,7 +10,13 @@ import type { NitroHooks } from "./hooks";
1010import type { PrerenderRoute } from "./prerender" ;
1111import type { TSConfig } from "pkg-types" ;
1212
13+ export interface NitroMeta {
14+ version : string ;
15+ majorVersion : number ;
16+ }
17+
1318export interface Nitro {
19+ meta : NitroMeta ;
1420 options : NitroOptions ;
1521 scannedHandlers : NitroEventHandler [ ] ;
1622 vfs : Record < string , string > ;
You can’t perform that action at this time.
0 commit comments