From a97275494f56a786e1fecc6bb9dfb6cea920a964 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Tue, 10 Sep 2024 21:35:01 +0100 Subject: [PATCH 1/4] fix: ensure legacy runtime config types are populated --- src/core/index.ts | 21 ++++++++++++++++++--- src/types/config.ts | 18 ++---------------- 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/src/core/index.ts b/src/core/index.ts index 57c4a871bc..d673a72436 100644 --- a/src/core/index.ts +++ b/src/core/index.ts @@ -1,4 +1,5 @@ -import type { NitroConfig } from "nitropack/types"; +import type { NitroConfig, NitroRouteConfig } from "nitropack/types"; +import type { NitroOpenAPIConfig } from "../types/openapi" // Core export { createNitro } from "./nitro"; @@ -50,10 +51,24 @@ export { } from "./scan"; /** @deprecated Use `NitroRuntimeConfig` from `nitropack/types` */ -export interface NitroRuntimeConfig {} +export interface NitroRuntimeConfig { + app: NitroRuntimeConfigApp; + nitro: { + envPrefix?: string; + envExpansion?: boolean; + routeRules?: { + [path: string]: NitroRouteConfig; + }; + openAPI?: NitroOpenAPIConfig; + }; + [key: string]: any; +} /** @deprecated Use `NitroRuntimeConfigApp` from `nitropack/types` */ -export interface NitroRuntimeConfigApp {} +export interface NitroRuntimeConfigApp { + baseURL: string; + [key: string]: any; +} /** @deprecated Directly import { ... } from "nitropack/types"; */ export type { diff --git a/src/types/config.ts b/src/types/config.ts index ea1fc509dc..7117d4fbb5 100644 --- a/src/types/config.ts +++ b/src/types/config.ts @@ -337,20 +337,6 @@ export type DatabaseConnectionConfigs = Record< // Runtime config -export interface NitroRuntimeConfigApp extends NitroTypesRuntimeConfigApp { - baseURL: string; - [key: string]: any; -} +export interface NitroRuntimeConfigApp extends NitroTypesRuntimeConfigApp {} -export interface NitroRuntimeConfig extends NitroTypeskRuntimeConfig { - app: NitroRuntimeConfigApp; - nitro: { - envPrefix?: string; - envExpansion?: boolean; - routeRules?: { - [path: string]: NitroRouteConfig; - }; - openAPI?: NitroOpenAPIConfig; - }; - [key: string]: any; -} +export interface NitroRuntimeConfig extends NitroTypeskRuntimeConfig {} From 83261c27e0763250d5132d882179185f75d5a931 Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Tue, 10 Sep 2024 20:38:51 +0000 Subject: [PATCH 2/4] chore: apply automated updates --- src/core/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/index.ts b/src/core/index.ts index d673a72436..90046a3485 100644 --- a/src/core/index.ts +++ b/src/core/index.ts @@ -1,5 +1,5 @@ import type { NitroConfig, NitroRouteConfig } from "nitropack/types"; -import type { NitroOpenAPIConfig } from "../types/openapi" +import type { NitroOpenAPIConfig } from "../types/openapi"; // Core export { createNitro } from "./nitro"; From d2dcb613958531927cb11fbbf5b6c3012ae1f7ff Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Tue, 10 Sep 2024 21:47:53 +0100 Subject: [PATCH 3/4] fix: export `NitroOpenAPIConfig` from `nitropack/types` --- src/core/index.ts | 3 +-- src/types/config.ts | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/index.ts b/src/core/index.ts index 90046a3485..3ffc476a25 100644 --- a/src/core/index.ts +++ b/src/core/index.ts @@ -1,5 +1,4 @@ -import type { NitroConfig, NitroRouteConfig } from "nitropack/types"; -import type { NitroOpenAPIConfig } from "../types/openapi"; +import type { NitroConfig, NitroOpenAPIConfig, NitroRouteConfig } from "nitropack/types"; // Core export { createNitro } from "./nitro"; diff --git a/src/types/config.ts b/src/types/config.ts index 7117d4fbb5..b4daf82c3c 100644 --- a/src/types/config.ts +++ b/src/types/config.ts @@ -33,6 +33,7 @@ import type { NitroHooks } from "./hooks"; import type { NitroModuleInput } from "./module"; import type { NitroFrameworkInfo } from "./nitro"; import type { NitroOpenAPIConfig } from "./openapi"; +export type { NitroOpenAPIConfig } from "./openapi"; import type { NitroPreset } from "./preset"; import type { EsbuildOptions, NodeExternalsOptions } from "./rollup"; import type { RollupConfig } from "./rollup"; From b1fc3548343e7b6597940c621f3cfe3e8065000a Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Tue, 10 Sep 2024 20:48:41 +0000 Subject: [PATCH 4/4] chore: apply automated updates --- src/core/index.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/core/index.ts b/src/core/index.ts index 3ffc476a25..238aa37397 100644 --- a/src/core/index.ts +++ b/src/core/index.ts @@ -1,4 +1,8 @@ -import type { NitroConfig, NitroOpenAPIConfig, NitroRouteConfig } from "nitropack/types"; +import type { + NitroConfig, + NitroOpenAPIConfig, + NitroRouteConfig, +} from "nitropack/types"; // Core export { createNitro } from "./nitro";