@nuxt/nitro-server-nightly 5.0.0-29792822.7236d53e → 5.0.0-29794567.4ffbc756

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.mjs +14 -13
  2. package/package.json +6 -6
package/dist/index.mjs CHANGED
@@ -25,7 +25,7 @@ import remapping from "@ampproject/remapping";
25
25
  import { addRoute, createRouter } from "rou3";
26
26
  import { compileRouterToString } from "rou3/compiler";
27
27
  //#region package.json
28
- var version = "5.0.0-29792822.7236d53e";
28
+ var version = "5.0.0-29794567.4ffbc756";
29
29
  //#endregion
30
30
  //#region src/utils.ts
31
31
  function toArray(value) {
@@ -827,6 +827,7 @@ async function bundle(nuxt) {
827
827
  }
828
828
  }
829
829
  const mockProxy = resolveModulePath("mocked-exports/proxy", { from: import.meta.url });
830
+ const typesDir = nuxt.options.typesDir || nuxt.options.buildDir;
830
831
  const globalCompilerOptions = { ...nuxt.options.typescript?.tsConfig?.compilerOptions };
831
832
  delete globalCompilerOptions.types;
832
833
  delete globalCompilerOptions.paths;
@@ -925,8 +926,8 @@ async function bundle(nuxt) {
925
926
  rolldownConfig: { tsconfig: false },
926
927
  typescript: {
927
928
  generateTsConfig: true,
928
- tsconfigPath: join(nuxt.options.buildDir, "tsconfig.server.json"),
929
- generatedTypesDir: join(nuxt.options.buildDir, "types/nitro"),
929
+ tsconfigPath: join(typesDir, "tsconfig.server.json"),
930
+ generatedTypesDir: join(typesDir, "types/nitro"),
930
931
  tsConfig: {
931
932
  compilerOptions: {
932
933
  lib: [
@@ -941,15 +942,15 @@ async function bundle(nuxt) {
941
942
  allowArbitraryExtensions: true
942
943
  },
943
944
  include: [
944
- join(nuxt.options.buildDir, "types/nitro-nuxt.d.ts"),
945
+ join(typesDir, "types/nitro-nuxt.d.ts"),
945
946
  ...modules.flatMap((m) => {
946
- const moduleDir = relativeWithDot(nuxt.options.buildDir, m);
947
+ const moduleDir = relativeWithDot(typesDir, m);
947
948
  return [join(moduleDir, "runtime/server"), join(moduleDir, "dist/runtime/server")];
948
949
  }),
949
- ...layerDirs.map((dirs) => relativeWithDot(nuxt.options.buildDir, join(dirs.server, "**/*"))),
950
- ...layerDirs.map((dirs) => relativeWithDot(nuxt.options.buildDir, join(dirs.shared, "**/*.d.ts")))
950
+ ...layerDirs.map((dirs) => relativeWithDot(typesDir, join(dirs.server, "**/*"))),
951
+ ...layerDirs.map((dirs) => relativeWithDot(typesDir, join(dirs.shared, "**/*.d.ts")))
951
952
  ],
952
- exclude: [...nuxt.options.modulesDir.map((m) => relativeWithDot(nuxt.options.buildDir, m)), relativeWithDot(nuxt.options.buildDir, resolve(nuxt.options.rootDir, "dist"))]
953
+ exclude: [...nuxt.options.modulesDir.map((m) => relativeWithDot(typesDir, m)), relativeWithDot(typesDir, resolve(nuxt.options.rootDir, "dist"))]
953
954
  }
954
955
  },
955
956
  publicAssets: [nuxt.options.dev ? {
@@ -1300,7 +1301,7 @@ async function bundle(nuxt) {
1300
1301
  ];
1301
1302
  const isV5OrHigher = nuxt.options.future.compatibilityVersion >= 5;
1302
1303
  const baseUrl = isV5OrHigher ? void 0 : nitroConfig.typescript.tsConfig.compilerOptions?.baseUrl;
1303
- const basePath = baseUrl ? resolve(nuxt.options.buildDir, baseUrl) : nuxt.options.buildDir;
1304
+ const basePath = baseUrl ? resolve(typesDir, baseUrl) : typesDir;
1304
1305
  const aliases = nitroConfig.alias;
1305
1306
  const importPaths = nuxt.options.modulesDir.map((d) => pathToFileURL(withTrailingSlash(d)));
1306
1307
  const tsConfig = nitroConfig.typescript.tsConfig;
@@ -1490,14 +1491,14 @@ async function bundle(nuxt) {
1490
1491
  });
1491
1492
  nitro.hooks.hook("types:extend", (types) => {
1492
1493
  types.tsConfig ||= {};
1493
- const rootDirGlob = relativeWithDot(nuxt.options.buildDir, join(nuxt.options.rootDir, "**/*"));
1494
+ const rootDirGlob = relativeWithDot(typesDir, join(nuxt.options.rootDir, "**/*"));
1494
1495
  types.tsConfig.include = types.tsConfig.include?.filter((i) => i !== rootDirGlob);
1495
1496
  });
1496
1497
  nuxt.hook("prepare:types", async (opts) => {
1497
- if (!nuxt.options.dev || nuxt.options.experimental.nitroViteEnvironment) await writeTypes(nitro);
1498
+ await writeTypes(nitro);
1498
1499
  opts.tsConfig.exclude ||= [];
1499
- opts.tsConfig.exclude.push(relative(nuxt.options.buildDir, resolve(nuxt.options.rootDir, nitro.options.output.dir)));
1500
- opts.tsConfig.exclude.push(relative(nuxt.options.buildDir, resolve(nuxt.options.rootDir, nuxt.options.serverDir)));
1500
+ opts.tsConfig.exclude.push(relative(typesDir, resolve(nuxt.options.rootDir, nitro.options.output.dir)));
1501
+ opts.tsConfig.exclude.push(relative(typesDir, resolve(nuxt.options.rootDir, nuxt.options.serverDir)));
1501
1502
  opts.references.push({ path: resolve(nuxt.options.rootDir, nitroConfig.typescript.generatedTypesDir, "nitro.d.ts") });
1502
1503
  opts.sharedTsConfig.compilerOptions ||= {};
1503
1504
  opts.sharedTsConfig.compilerOptions.paths ||= {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuxt/nitro-server-nightly",
3
- "version": "5.0.0-29792822.7236d53e",
3
+ "version": "5.0.0-29794567.4ffbc756",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/nuxt/nuxt.git",
@@ -32,7 +32,7 @@
32
32
  ],
33
33
  "dependencies": {
34
34
  "@ampproject/remapping": "^2.3.0",
35
- "@nuxt/kit": "npm:@nuxt/kit-nightly@5.0.0-29792822.7236d53e",
35
+ "@nuxt/kit": "npm:@nuxt/kit-nightly@5.0.0-29794567.4ffbc756",
36
36
  "@unhead/vue": "^3.4.0",
37
37
  "@vue/shared": "^3.5.41",
38
38
  "consola": "^3.4.2",
@@ -66,7 +66,7 @@
66
66
  "@babel/plugin-proposal-decorators": "^7.25.0 || ^8.0.0",
67
67
  "@babel/plugin-syntax-typescript": "^7.25.0 || ^8.0.0",
68
68
  "@rollup/plugin-babel": "^6.0.0 || ^7.0.0",
69
- "nuxt": "npm:nuxt-nightly@5.0.0-29792822.7236d53e"
69
+ "nuxt": "npm:nuxt-nightly@5.0.0-29794567.4ffbc756"
70
70
  },
71
71
  "peerDependenciesMeta": {
72
72
  "@babel/plugin-proposal-decorators": {
@@ -82,12 +82,12 @@
82
82
  "devDependencies": {
83
83
  "@babel/plugin-proposal-decorators": "8.0.2",
84
84
  "@babel/plugin-syntax-typescript": "8.0.3",
85
- "@nuxt/schema": "npm:@nuxt/schema-nightly@5.0.0-29792822.7236d53e",
85
+ "@nuxt/schema": "npm:@nuxt/schema-nightly@5.0.0-29794567.4ffbc756",
86
86
  "@rollup/plugin-babel": "7.1.0",
87
87
  "hookable": "^6.1.1",
88
- "nuxt": "npm:nuxt-nightly@5.0.0-29792822.7236d53e",
88
+ "nuxt": "npm:nuxt-nightly@5.0.0-29794567.4ffbc756",
89
89
  "tsdown": "0.22.14",
90
- "vitest": "4.1.10"
90
+ "vitest": "4.1.11"
91
91
  },
92
92
  "engines": {
93
93
  "node": "^22.19.0 || ^24.11.0 || >=26.0.0"