void 0.8.1 → 0.8.2

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.
package/dist/cli/cli.mjs CHANGED
@@ -1516,7 +1516,7 @@ else if (command === "deploy") {
1516
1516
  R.error(err instanceof Error ? err.message : String(err));
1517
1517
  process.exit(1);
1518
1518
  }
1519
- import("../deploy-DbmbcKID.mjs").then((n) => n.t).then(({ runDeploy }) => {
1519
+ import("../deploy-Cr8F6801.mjs").then((n) => n.t).then(({ runDeploy }) => {
1520
1520
  runDeploy(root, {
1521
1521
  projectSlug: deployArgs.projectSlug,
1522
1522
  dir: deployArgs.dir,
@@ -1646,7 +1646,7 @@ else if (command === "-v" || command === "--version") {
1646
1646
  return;
1647
1647
  }
1648
1648
  case "deploy": {
1649
- const { runDeploy } = await import("../deploy-DbmbcKID.mjs").then((n) => n.t);
1649
+ const { runDeploy } = await import("../deploy-Cr8F6801.mjs").then((n) => n.t);
1650
1650
  await runDeploy(root);
1651
1651
  return;
1652
1652
  }
@@ -3107,7 +3107,7 @@ async function runFullDeploy(root, config, client, fwPreset, skipBuild, gitMetad
3107
3107
  hasPages,
3108
3108
  hasDocumentRoutes: hasDocumentRoutes$1,
3109
3109
  hasMiddleware,
3110
- hasWebSockets,
3110
+ hasWebSockets: hasDocumentRoutes(webSockets),
3111
3111
  authEnabled,
3112
3112
  liveEnabled: liveConfig !== void 0
3113
3113
  });
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { r as __toESM } from "./chunk-DJd-R1mw.mjs";
2
2
  import { a as join, n as dirname, s as relative } from "./pathe.M-eThtNZ-BrPhGF_K.mjs";
3
3
  import { u as require_picocolors } from "./output-DeiS4oEX.mjs";
4
- import { C as isSandboxEnabled, E as resolveAssetRoutingPolicy, S as SANDBOX_MIGRATION_TAG, T as hasDocumentRoutes, _ as normalizeWranglerCompatibilityFlags, a as prerenderPagesNode, b as resolveLiveBindingConfig, c as filterLoadedEnv, d as LIVE_MIGRATION_TAG, f as ensureWranglerCompat, g as nextDurableObjectMigrationTag, h as hasDurableObjectSqliteMigration, i as prerenderPages, l as resolveRemoteMode, m as ensureWranglerNodejsAlsFlag, n as resolveDistDir, o as DEFAULT_PROXY_URL, p as ensureWranglerCompatibilityDate, r as resolveWorkerDirName, s as STAGING_PROXY_URL, u as stripInternalEnvKeys, v as readExistingLiveBindingConfig, w as resolveSandboxConfig, x as syncWranglerBindings, y as readWranglerCompat } from "./deploy-DbmbcKID.mjs";
4
+ import { C as isSandboxEnabled, E as resolveAssetRoutingPolicy, S as SANDBOX_MIGRATION_TAG, T as hasDocumentRoutes, _ as normalizeWranglerCompatibilityFlags, a as prerenderPagesNode, b as resolveLiveBindingConfig, c as filterLoadedEnv, d as LIVE_MIGRATION_TAG, f as ensureWranglerCompat, g as nextDurableObjectMigrationTag, h as hasDurableObjectSqliteMigration, i as prerenderPages, l as resolveRemoteMode, m as ensureWranglerNodejsAlsFlag, n as resolveDistDir, o as DEFAULT_PROXY_URL, p as ensureWranglerCompatibilityDate, r as resolveWorkerDirName, s as STAGING_PROXY_URL, u as stripInternalEnvKeys, v as readExistingLiveBindingConfig, w as resolveSandboxConfig, x as syncWranglerBindings, y as readWranglerCompat } from "./deploy-Cr8F6801.mjs";
5
5
  import { i as resolveProjectPaths, n as readProjectPaths, t as assertNoRootSourceConventionConflicts } from "./project-paths-CCMrHYQm.mjs";
6
6
  import { n as loadVoidAuthConfig, t as findVoidAuthConfig } from "./config-hhMYPVRT.mjs";
7
7
  import { c as getToken, u as isStagingMode } from "./client-C-nH6yz3.mjs";
@@ -3983,9 +3983,16 @@ function compileHeaderMiddleware(lines, rules) {
3983
3983
  lines.push(" for (const rule of __headerRules) {");
3984
3984
  lines.push(" if (__matchPattern(rule.pattern, pathname)) matched.push(...rule.headers);");
3985
3985
  lines.push(" }");
3986
+ lines.push(" if (matched.length === 0) return;");
3987
+ lines.push(" const headers = new Headers(c.res.headers);");
3986
3988
  lines.push(" for (const [name, value] of matched) {");
3987
- lines.push(" c.res.headers.set(name, value);");
3989
+ lines.push(" headers.set(name, value);");
3988
3990
  lines.push(" }");
3991
+ lines.push(" c.res = new Response(c.res.body, {");
3992
+ lines.push(" headers,");
3993
+ lines.push(" status: c.res.status,");
3994
+ lines.push(" statusText: c.res.statusText,");
3995
+ lines.push(" });");
3989
3996
  lines.push("});");
3990
3997
  lines.push("");
3991
3998
  }
@@ -4256,7 +4263,7 @@ function routingPlugin(root, options) {
4256
4263
  hasPages: scan.pages.pages.length > 0,
4257
4264
  hasDocumentRoutes: hasDocumentRoutes(scan.routes),
4258
4265
  hasMiddleware: scan.middleware.length > 0,
4259
- hasWebSockets: (scan.websockets?.length ?? 0) > 0,
4266
+ hasWebSockets: hasDocumentRoutes(scan.websockets ?? []),
4260
4267
  authEnabled: compileOptions.auth !== null,
4261
4268
  liveEnabled: options.live !== void 0
4262
4269
  });
@@ -5301,7 +5308,7 @@ function voidPlugin(options) {
5301
5308
  hasPages,
5302
5309
  hasDocumentRoutes: hasDocumentRoutes$1,
5303
5310
  hasMiddleware,
5304
- hasWebSockets: websocketRoutes.length > 0,
5311
+ hasWebSockets: hasDocumentRoutes(websocketRoutes),
5305
5312
  authEnabled,
5306
5313
  liveEnabled: liveConfig !== void 0
5307
5314
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "void",
3
- "version": "0.8.1",
3
+ "version": "0.8.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/voidzero-dev/void.git",
@@ -333,7 +333,7 @@
333
333
  "valibot": ">=1.0.0-beta.7",
334
334
  "vite": "^8.0.0",
335
335
  "zod": "^3.25.0 || ^4.0.0",
336
- "@void/md": "0.8.1"
336
+ "@void/md": "0.8.2"
337
337
  },
338
338
  "peerDependenciesMeta": {
339
339
  "@void/md": {