void 0.8.6 → 0.8.7

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-D-sNgH78.mjs").then((n) => n.t).then(({ runDeploy }) => {
1519
+ import("../deploy-Dnzq3Mn2.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-D-sNgH78.mjs").then((n) => n.t);
1649
+ const { runDeploy } = await import("../deploy-Dnzq3Mn2.mjs").then((n) => n.t);
1650
1650
  await runDeploy(root);
1651
1651
  return;
1652
1652
  }
@@ -2190,6 +2190,7 @@ function generateHandlersSource(root, features) {
2190
2190
  var deploy_exports = /* @__PURE__ */ __exportAll({
2191
2191
  applyDeployEvent: () => applyDeployEvent,
2192
2192
  ensurePreviouslyDeployedLiveBindingConfig: () => ensurePreviouslyDeployedLiveBindingConfig,
2193
+ generateDeployWrapperIfNeeded: () => generateDeployWrapperIfNeeded,
2193
2194
  hasDeploySchemaDrift: () => hasDeploySchemaDrift,
2194
2195
  promptDeployProjectConfig: () => promptDeployProjectConfig,
2195
2196
  resolveDeployLiveBindingConfig: () => resolveDeployLiveBindingConfig,
@@ -2205,6 +2206,11 @@ var deploy_exports = /* @__PURE__ */ __exportAll({
2205
2206
  const drizzleKitBin = join(fileURLToPath(import.meta.resolve("drizzle-kit")), "..", "bin.cjs");
2206
2207
  const deployDriftCheckDir = join(".void", "deploy-drift-check");
2207
2208
  var DeployEventError = class extends Error {};
2209
+ async function generateDeployWrapperIfNeeded(root, workerDir, workerMain, features) {
2210
+ if (!needsWrapper(features)) return false;
2211
+ await generateWrapper(workerDir, workerMain, root, features);
2212
+ return true;
2213
+ }
2208
2214
  const EMPTY_BINDINGS = {
2209
2215
  needsD1: false,
2210
2216
  needsKV: false,
@@ -2837,7 +2843,7 @@ async function runFrameworkDeploy(root, config, client, detected, fwPreset, void
2837
2843
  }
2838
2844
  if (needsWrapper(wrapperFeatures)) {
2839
2845
  R.step("Generating wrapper...");
2840
- await generateWrapper(actualWorkerDir, actualWorkerMain, root, wrapperFeatures);
2846
+ await generateDeployWrapperIfNeeded(root, actualWorkerDir, actualWorkerMain, wrapperFeatures);
2841
2847
  R.info("Wrapper generated");
2842
2848
  }
2843
2849
  const wranglerCompat = resolveDeployWranglerCompat(root, voidConfig, workerDir, { dialect });
@@ -3038,7 +3044,9 @@ async function runFullDeploy(root, config, client, fwPreset, skipBuild, gitMetad
3038
3044
  }
3039
3045
  }
3040
3046
  const workerDirName = resolveWorkerDirName(distDir, fwPreset, frameworkBuildCmd);
3041
- const schedules = scanJobsSync(root, paths.cronsDir).flatMap((job) => job.crons.map((cron) => ({
3047
+ const rawJobs = scanJobsSync(root, paths.cronsDir);
3048
+ const rawQueues = scanQueuesSync(root, paths.queuesDir);
3049
+ const schedules = rawJobs.flatMap((job) => job.crons.map((cron) => ({
3042
3050
  name: job.name,
3043
3051
  cron
3044
3052
  })));
@@ -3054,7 +3062,7 @@ async function runFullDeploy(root, config, client, fwPreset, skipBuild, gitMetad
3054
3062
  sandboxClassName: sandboxConfig?.className,
3055
3063
  cliLog
3056
3064
  });
3057
- const queues = scanQueuesSync(root, paths.queuesDir).map((q) => ({
3065
+ const queues = rawQueues.map((q) => ({
3058
3066
  name: q.name,
3059
3067
  bindingName: q.bindingName,
3060
3068
  ...q.maxBatchSize != null && { maxBatchSize: q.maxBatchSize },
@@ -3181,7 +3189,22 @@ async function runFullDeploy(root, config, client, fwPreset, skipBuild, gitMetad
3181
3189
  dialect,
3182
3190
  webSockets
3183
3191
  });
3184
- const workerFiles = collectWorkerFiles(join(distDir, workerDirName));
3192
+ const workerDir = join(distDir, workerDirName);
3193
+ if (isFrameworkMode) {
3194
+ const wrapperFeatures = {
3195
+ auth: null,
3196
+ crons: rawJobs,
3197
+ queues: rawQueues,
3198
+ hasMigrations: validatedMigrations != null && validatedMigrations.length > 0,
3199
+ migrationDialect: dialect
3200
+ };
3201
+ if (needsWrapper(wrapperFeatures)) {
3202
+ R.step("Generating wrapper...");
3203
+ await generateDeployWrapperIfNeeded(root, workerDir, fwPreset?.workerMain ?? "index.js", wrapperFeatures);
3204
+ R.info("Wrapper generated");
3205
+ }
3206
+ }
3207
+ const workerFiles = collectWorkerFiles(workerDir);
3185
3208
  cliLog?.info("package_end", {
3186
3209
  mode: "full",
3187
3210
  durationMs: Date.now() - packageStartedAt
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, D as resolveAssetRoutingPolicy, E as hasDocumentRoutes, S as SANDBOX_MIGRATION_TAG, T as hasApiRoutes, _ 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-D-sNgH78.mjs";
4
+ import { C as isSandboxEnabled, D as resolveAssetRoutingPolicy, E as hasDocumentRoutes, S as SANDBOX_MIGRATION_TAG, T as hasApiRoutes, _ 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-Dnzq3Mn2.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-CCOKwNUz.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "void",
3
- "version": "0.8.6",
3
+ "version": "0.8.7",
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.6"
336
+ "@void/md": "0.8.7"
337
337
  },
338
338
  "peerDependenciesMeta": {
339
339
  "@void/md": {