nitropack-nightly 2.11.3-20250306-104559.c52d2eeb → 2.11.3-20250306-111821.d219707f

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.
@@ -2364,10 +2364,9 @@ class NodeDevWorker {
2364
2364
  await new Promise((resolve) => {
2365
2365
  const gracefulShutdownTimeoutSec = Number.parseInt(process.env.NITRO_SHUTDOWN_TIMEOUT || "", 10) || 5;
2366
2366
  const timeout = setTimeout(() => {
2367
- consola.warn(
2368
- `force closing dev worker after ${gracefulShutdownTimeoutSec} seconds...`
2369
- );
2370
- resolve();
2367
+ if (process.env.DEBUG) {
2368
+ consola.warn(`force closing dev worker...`);
2369
+ }
2371
2370
  }, gracefulShutdownTimeoutSec * 1e3);
2372
2371
  this.#worker?.on("message", (message) => {
2373
2372
  if (message.event === "exit") {
@@ -1,3 +1,3 @@
1
- const version = "2.11.3-20250306-104559.c52d2eeb";
1
+ const version = "2.11.3-20250306-111821.d219707f";
2
2
 
3
3
  export { version };
@@ -1,3 +1,3 @@
1
- const version = "2.11.3-20250306-104559.c52d2eeb";
1
+ const version = "2.11.3-20250306-111821.d219707f";
2
2
 
3
3
  export { version };
@@ -1,3 +1,3 @@
1
- const version = "2.11.3-20250306-104559.c52d2eeb";
1
+ const version = "2.11.3-20250306-111821.d219707f";
2
2
 
3
3
  export { version };
@@ -1,8 +1,8 @@
1
1
  import { existsSync } from "node:fs";
2
2
  import { readFile } from "node:fs/promises";
3
- import { relative, dirname } from "node:path";
3
+ import { relative, dirname, extname } from "node:path";
4
4
  import { writeFile } from "nitropack/kit";
5
- import { parseTOML } from "confbox";
5
+ import { parseTOML, parseJSONC } from "confbox";
6
6
  import { readGitConfig, readPackageJSON, findNearestFile } from "pkg-types";
7
7
  import { defu } from "defu";
8
8
  import { globby } from "globby";
@@ -159,15 +159,27 @@ export async function enableNodeCompat(nitro) {
159
159
  workerdHybridNodeCompatPlugin
160
160
  );
161
161
  }
162
+ const extensionParsers = {
163
+ ".json": JSON.parse,
164
+ ".jsonc": parseJSONC,
165
+ ".toml": parseTOML
166
+ };
162
167
  async function readWranglerConfig(nitro) {
163
- const configPath = await findNearestFile(["wrangler.json", "wrangler.toml"], {
164
- startingFrom: nitro.options.rootDir
165
- }).catch(() => void 0);
168
+ const configPath = await findNearestFile(
169
+ ["wrangler.json", "wrangler.jsonc", "wrangler.toml"],
170
+ {
171
+ startingFrom: nitro.options.rootDir
172
+ }
173
+ ).catch(() => void 0);
166
174
  if (!configPath) {
167
175
  return {};
168
176
  }
169
177
  const userConfigText = await readFile(configPath, "utf8");
170
- const config = configPath.endsWith(".toml") ? parseTOML(userConfigText) : JSON.parse(userConfigText);
178
+ const parser = extensionParsers[extname(configPath)];
179
+ if (!parser) {
180
+ throw new Error(`Unsupported config file format: ${configPath}`);
181
+ }
182
+ const config = parser(userConfigText);
171
183
  return { configPath, config };
172
184
  }
173
185
  export async function writeWranglerConfig(nitro, cfTarget) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nitropack-nightly",
3
- "version": "2.11.3-20250306-104559.c52d2eeb",
3
+ "version": "2.11.3-20250306-111821.d219707f",
4
4
  "description": "Build and Deploy Universal JavaScript Servers",
5
5
  "repository": "nitrojs/nitro",
6
6
  "license": "MIT",