void 0.7.5 → 0.7.6
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 +8 -8
- package/dist/{db-RqxhOT2E.mjs → db-DvBg7Oc5.mjs} +1 -1
- package/dist/{deploy-CRIz77mw.mjs → deploy-B5rTuzXw.mjs} +39 -12
- package/dist/index.mjs +463 -34
- package/dist/{init-FMZ29UZW.mjs → init-BiXWyKEf.mjs} +2 -2
- package/dist/pages/client.d.mts +1 -1
- package/dist/pages/index.d.mts +1 -1
- package/dist/pages/islands-plugin.d.mts +2 -11
- package/dist/pages/islands-plugin.mjs +1 -63
- package/dist/pages/protocol.d.mts +1 -1
- package/dist/pages/protocol.mjs +96 -12
- package/dist/plugin-inference-CXUuq0aC.mjs +577 -0
- package/dist/{prepare-PqAbhLte.mjs → prepare-BrfiJBju.mjs} +2 -2
- package/dist/{preset-jKn1hQwP.mjs → preset-BhnZpb7t.mjs} +1 -1
- package/dist/{protocol-DxGzKEz2.d.mts → protocol-COz1NHxc.d.mts} +3 -0
- package/dist/{scan-QtRTdh94.mjs → scan-vv5u7rHu.mjs} +1 -1
- package/dist/{types-AdKzPp2C.d.mts → types-D6AuY5Bf.d.mts} +9 -1
- package/package.json +3 -3
- package/dist/plugin-inference-CCtRkt9O.mjs +0 -2476
package/dist/cli/cli.mjs
CHANGED
|
@@ -1503,7 +1503,7 @@ else if (command === "deploy") {
|
|
|
1503
1503
|
R.error(err instanceof Error ? err.message : String(err));
|
|
1504
1504
|
process.exit(1);
|
|
1505
1505
|
}
|
|
1506
|
-
import("../deploy-
|
|
1506
|
+
import("../deploy-B5rTuzXw.mjs").then((n) => n.t).then(({ runDeploy }) => {
|
|
1507
1507
|
runDeploy(root, {
|
|
1508
1508
|
projectSlug: deployArgs.projectSlug,
|
|
1509
1509
|
dir: deployArgs.dir,
|
|
@@ -1519,7 +1519,7 @@ else if (command === "deploy") {
|
|
|
1519
1519
|
else if (command === "project") runSubcommandGroup("project", projectSubcommands, parseProjectArgs, (root, parsed) => import("../project-cmd-DKiQYdSd.mjs").then(({ runProjectCommand }) => runProjectCommand(root, parsed)));
|
|
1520
1520
|
else if (command === "secret") runSubcommandGroup("secret", secretSubcommands, parseSecretArgs, (root, parsed) => import("../secret-BXHx515u.mjs").then(({ runSecretCommand }) => runSecretCommand(root, parsed)));
|
|
1521
1521
|
else if (command === "domain") runSubcommandGroup("domain", domainSubcommands, parseDomainArgs, (root, parsed) => import("../domain-CDQhvYNZ.mjs").then(({ runDomainCommand }) => runDomainCommand(root, parsed)));
|
|
1522
|
-
else if (command === "db") runSubcommandGroup("db", dbSubcommands, parseDbArgs, (root, parsed) => import("../db-
|
|
1522
|
+
else if (command === "db") runSubcommandGroup("db", dbSubcommands, parseDbArgs, (root, parsed) => import("../db-DvBg7Oc5.mjs").then(({ runDbCommand }) => runDbCommand(root, parsed)));
|
|
1523
1523
|
else if (command === "env") runSubcommandGroup("env", envSubcommands, parseEnvArgs, (root, parsed) => import("../env-CnrQY2b6.mjs").then(({ runEnvCommand }) => runEnvCommand(root, parsed)));
|
|
1524
1524
|
else if (command === "gen") runSubcommandGroup("gen", genSubcommands, parseGenArgs, (root, parsed) => import("../gen-C0EY2k27.mjs").then(({ runGenCommand }) => runGenCommand(root, parsed)));
|
|
1525
1525
|
else if (command === "prepare") {
|
|
@@ -1531,7 +1531,7 @@ else if (command === "prepare") {
|
|
|
1531
1531
|
R.error(err instanceof Error ? err.message : String(err));
|
|
1532
1532
|
process.exit(1);
|
|
1533
1533
|
}
|
|
1534
|
-
import("../prepare-
|
|
1534
|
+
import("../prepare-BrfiJBju.mjs").then(({ runPrepareCommand }) => {
|
|
1535
1535
|
runPrepareCommand(root, prepareArgs).catch((err) => {
|
|
1536
1536
|
R.error(err.message ?? err);
|
|
1537
1537
|
process.exit(1);
|
|
@@ -1539,7 +1539,7 @@ else if (command === "prepare") {
|
|
|
1539
1539
|
});
|
|
1540
1540
|
} else if (command === "init") {
|
|
1541
1541
|
const root = process.cwd();
|
|
1542
|
-
import("../init-
|
|
1542
|
+
import("../init-BiXWyKEf.mjs").then(({ runInitCommand, parseInitArgs }) => {
|
|
1543
1543
|
let initArgs;
|
|
1544
1544
|
try {
|
|
1545
1545
|
initArgs = parseInitArgs(args.slice(1));
|
|
@@ -1628,12 +1628,12 @@ else if (command === "-v" || command === "--version") {
|
|
|
1628
1628
|
const root = process.cwd();
|
|
1629
1629
|
switch (cmd) {
|
|
1630
1630
|
case "init": {
|
|
1631
|
-
const { runInitCommand, parseInitArgs } = await import("../init-
|
|
1631
|
+
const { runInitCommand, parseInitArgs } = await import("../init-BiXWyKEf.mjs");
|
|
1632
1632
|
await runInitCommand(root, parseInitArgs([]));
|
|
1633
1633
|
return;
|
|
1634
1634
|
}
|
|
1635
1635
|
case "deploy": {
|
|
1636
|
-
const { runDeploy } = await import("../deploy-
|
|
1636
|
+
const { runDeploy } = await import("../deploy-B5rTuzXw.mjs").then((n) => n.t);
|
|
1637
1637
|
await runDeploy(root);
|
|
1638
1638
|
return;
|
|
1639
1639
|
}
|
|
@@ -1646,11 +1646,11 @@ else if (command === "-v" || command === "--version") {
|
|
|
1646
1646
|
case "project": return runSubcommandGroup("project", projectSubcommands, parseProjectArgs, (r, p) => import("../project-cmd-DKiQYdSd.mjs").then(({ runProjectCommand }) => runProjectCommand(r, p)));
|
|
1647
1647
|
case "secret": return runSubcommandGroup("secret", secretSubcommands, parseSecretArgs, (r, p) => import("../secret-BXHx515u.mjs").then(({ runSecretCommand }) => runSecretCommand(r, p)));
|
|
1648
1648
|
case "domain": return runSubcommandGroup("domain", domainSubcommands, parseDomainArgs, (r, p) => import("../domain-CDQhvYNZ.mjs").then(({ runDomainCommand }) => runDomainCommand(r, p)));
|
|
1649
|
-
case "db": return runSubcommandGroup("db", dbSubcommands, parseDbArgs, (r, p) => import("../db-
|
|
1649
|
+
case "db": return runSubcommandGroup("db", dbSubcommands, parseDbArgs, (r, p) => import("../db-DvBg7Oc5.mjs").then(({ runDbCommand }) => runDbCommand(r, p)));
|
|
1650
1650
|
case "env": return runSubcommandGroup("env", envSubcommands, parseEnvArgs, (r, p) => import("../env-CnrQY2b6.mjs").then(({ runEnvCommand }) => runEnvCommand(r, p)));
|
|
1651
1651
|
case "gen": return runSubcommandGroup("gen", genSubcommands, parseGenArgs, (r, p) => import("../gen-C0EY2k27.mjs").then(({ runGenCommand }) => runGenCommand(r, p)));
|
|
1652
1652
|
case "prepare": {
|
|
1653
|
-
const { runPrepareCommand } = await import("../prepare-
|
|
1653
|
+
const { runPrepareCommand } = await import("../prepare-BrfiJBju.mjs");
|
|
1654
1654
|
await runPrepareCommand(root, parsePrepareArgs([]));
|
|
1655
1655
|
return;
|
|
1656
1656
|
}
|
|
@@ -4,7 +4,7 @@ import { c as R, g as ge, y as ye } from "./dist-Dayj3gCK.mjs";
|
|
|
4
4
|
import { r as readProjectConfig } from "./project-TqORyHn8.mjs";
|
|
5
5
|
import { c as getToken, n as PlatformClient } from "./client-DCqnMpDt.mjs";
|
|
6
6
|
import { c as getDatabaseDialect, f as readConfig } from "./config-BIa9HwVX.mjs";
|
|
7
|
-
import { r as detectFramework } from "./plugin-inference-
|
|
7
|
+
import { r as detectFramework } from "./plugin-inference-CXUuq0aC.mjs";
|
|
8
8
|
import { a as writeJournal, i as stripSqlExt, r as readJournal, t as collectMigrations } from "./collect-CjeZgz5D.mjs";
|
|
9
9
|
import { n as listDrizzleArtifacts, r as validateMigrations, t as assertJournalCoherence } from "./validate-CaMavMxu.mjs";
|
|
10
10
|
import { formatTimestamp } from "./gen-C0EY2k27.mjs";
|
|
@@ -6,8 +6,8 @@ import { c as R, g as ge, u as Se, v as ue, x as q, y as ye } from "./dist-Dayj3
|
|
|
6
6
|
import { a as writeProjectConfig, r as readProjectConfig } from "./project-TqORyHn8.mjs";
|
|
7
7
|
import { a as isExpiredTokenError, c as getToken, i as isCliOutdatedError, l as getTokenSource, n as PlatformClient, o as parsePlatformErrorBody, t as PlatformApiError, u as isStagingMode } from "./client-DCqnMpDt.mjs";
|
|
8
8
|
import { c as getDatabaseDialect, f as readConfig, l as isNodeTarget, p as resolveBindingNames } from "./config-BIa9HwVX.mjs";
|
|
9
|
-
import { i as scanJobsSync, n as scanWebSocketRoutesSync, r as scanQueuesSync, t as scanRoutes } from "./scan-
|
|
10
|
-
import { i as inferProjectBindings, l as validateSsrEntry, n as FRAMEWORK_SCAN_DIRS, r as detectFramework } from "./plugin-inference-
|
|
9
|
+
import { i as scanJobsSync, n as scanWebSocketRoutesSync, r as scanQueuesSync, t as scanRoutes } from "./scan-vv5u7rHu.mjs";
|
|
10
|
+
import { i as inferProjectBindings, l as validateSsrEntry, n as FRAMEWORK_SCAN_DIRS, r as detectFramework } from "./plugin-inference-CXUuq0aC.mjs";
|
|
11
11
|
import { i as voidWarn, r as voidLog } from "./log-DXdqnmhF.mjs";
|
|
12
12
|
import { t as discoverSchema } from "./discover-B7FkXBLB.mjs";
|
|
13
13
|
import { t as findEnvFile } from "./env-types-DknSA4SO.mjs";
|
|
@@ -20,7 +20,7 @@ import { n as promptProjectSelection, r as promptProjectSetupAction, t as prompt
|
|
|
20
20
|
import { r as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-DdjLQ2tB.mjs";
|
|
21
21
|
import { n as lintDuplicateSources, r as mergeRoutingRules, t as lintDestinationSplats } from "./headers-YVkHjOyq.mjs";
|
|
22
22
|
import { t as promptForLoginToken } from "./login-B5HHT32i.mjs";
|
|
23
|
-
import { i as resolveProjectCommand, n as detectPreset, r as formatProjectCommand, t as FRAMEWORK_PRESETS } from "./preset-
|
|
23
|
+
import { i as resolveProjectCommand, n as detectPreset, r as formatProjectCommand, t as FRAMEWORK_PRESETS } from "./preset-BhnZpb7t.mjs";
|
|
24
24
|
import { createRequire } from "node:module";
|
|
25
25
|
import { copyFileSync, cpSync, createWriteStream, existsSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, renameSync, rmSync, unlinkSync, writeFileSync } from "node:fs";
|
|
26
26
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
@@ -149,17 +149,33 @@ function resolveGeneratedName(base, used, kind) {
|
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
151
|
/**
|
|
152
|
-
* Read compatibility settings from `wrangler.jsonc`/`wrangler.json
|
|
153
|
-
* `void.json`, with priority:
|
|
152
|
+
* Read compatibility settings from `wrangler.jsonc`/`wrangler.json`,
|
|
153
|
+
* `void.json`, and build output, with priority:
|
|
154
|
+
* void.json > wrangler.jsonc > build output > latest known-good date.
|
|
154
155
|
*
|
|
155
|
-
*
|
|
156
|
-
*
|
|
156
|
+
* This function is read-only: when no explicit `compatibility_date` exists, it
|
|
157
|
+
* returns the latest known-good date without writing it anywhere. Use
|
|
158
|
+
* `ensureWranglerCompat()` when the caller is in a real dev/build/deploy
|
|
159
|
+
* lifecycle and wants to persist the default in `void.json`.
|
|
157
160
|
*
|
|
158
161
|
* @param buildOutputDir - Optional path to the build output directory (e.g.
|
|
159
162
|
* `dist/ssr`) which may contain a plugin-generated `wrangler.json` with the
|
|
160
163
|
* correct compat settings for the built worker.
|
|
161
164
|
*/
|
|
162
165
|
function readWranglerCompat(root, config, buildOutputDir) {
|
|
166
|
+
return resolveWranglerCompat(readWranglerCompatFields(root, config, buildOutputDir));
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Read compatibility settings and ensure the default date is pinned in
|
|
170
|
+
* `void.json` when no explicit date exists in void.json, wrangler config, or
|
|
171
|
+
* build output.
|
|
172
|
+
*/
|
|
173
|
+
function ensureWranglerCompat(root, config, buildOutputDir) {
|
|
174
|
+
const fields = readWranglerCompatFields(root, config, buildOutputDir);
|
|
175
|
+
const defaultDate = fields.voidDate ?? fields.wranglerDate ?? fields.buildDate ? void 0 : ensureVoidCompatibilityDate(root, fields.voidConfig);
|
|
176
|
+
return resolveWranglerCompat(fields, defaultDate ? { defaultDate } : void 0);
|
|
177
|
+
}
|
|
178
|
+
function readWranglerCompatFields(root, config, buildOutputDir) {
|
|
163
179
|
const voidConfig = config ?? readVoidConfigIfExists(root);
|
|
164
180
|
let raw;
|
|
165
181
|
for (const name of ["wrangler.jsonc", "wrangler.json"]) try {
|
|
@@ -190,8 +206,19 @@ function readWranglerCompat(root, config, buildOutputDir) {
|
|
|
190
206
|
const voidDate = voidConfig?.worker?.compatibility_date;
|
|
191
207
|
const voidFlags = voidConfig?.worker?.compatibility_flags;
|
|
192
208
|
if (voidDate !== void 0) validateCompatDate(voidDate, "void.json worker config");
|
|
193
|
-
|
|
194
|
-
|
|
209
|
+
return {
|
|
210
|
+
voidConfig,
|
|
211
|
+
voidDate,
|
|
212
|
+
voidFlags,
|
|
213
|
+
wranglerDate,
|
|
214
|
+
wranglerFlags,
|
|
215
|
+
buildDate,
|
|
216
|
+
buildFlags
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
function resolveWranglerCompat(fields, options) {
|
|
220
|
+
const result = { compatibilityDate: fields.voidDate ?? fields.wranglerDate ?? fields.buildDate ?? options?.defaultDate ?? "2026-02-24" };
|
|
221
|
+
const flags = fields.voidFlags ?? fields.wranglerFlags ?? fields.buildFlags;
|
|
195
222
|
if (flags && flags.length > 0) result.compatibilityFlags = flags;
|
|
196
223
|
return result;
|
|
197
224
|
}
|
|
@@ -633,7 +660,7 @@ async function createCloudflarePrerenderRunner(options) {
|
|
|
633
660
|
const wranglerPath = join(workerDir, "wrangler.json");
|
|
634
661
|
if (!existsSync(wranglerPath)) throw new Error(`prerender: wrangler.json not found in '${workerDir}'.`);
|
|
635
662
|
const wranglerConfig = JSON.parse(readFileSync(wranglerPath, "utf-8"));
|
|
636
|
-
const wranglerCompat =
|
|
663
|
+
const wranglerCompat = ensureWranglerCompat(root, readConfig(root), workerDir);
|
|
637
664
|
const workerMain = wranglerConfig.main ?? "index.js";
|
|
638
665
|
const env = filterLoadedEnv(loadEnv("production", root, ""));
|
|
639
666
|
const voidToken = getToken(root);
|
|
@@ -2155,7 +2182,7 @@ function getExitCode(error) {
|
|
|
2155
2182
|
}
|
|
2156
2183
|
function resolveDeployWranglerCompat(root, config, buildOutputDir, requirements) {
|
|
2157
2184
|
if (isNodeTarget(config.target)) return;
|
|
2158
|
-
const compat =
|
|
2185
|
+
const compat = ensureWranglerCompat(root, config, buildOutputDir);
|
|
2159
2186
|
const compatibilityFlags = normalizeWranglerCompatibilityFlags(compat.compatibilityFlags, { needsNodejsCompat: requirements?.authEnabled === true || requirements?.dialect === "postgresql" || requirements?.needsSandbox === true });
|
|
2160
2187
|
return compatibilityFlags === compat.compatibilityFlags ? compat : {
|
|
2161
2188
|
...compat,
|
|
@@ -3311,4 +3338,4 @@ function resolveWorkerDirName(distDir, fwPreset, buildCommand) {
|
|
|
3311
3338
|
throw new Error("deploy: Worker output not found. Expected dist/ssr/ or dist/rsc/.");
|
|
3312
3339
|
}
|
|
3313
3340
|
//#endregion
|
|
3314
|
-
export {
|
|
3341
|
+
export { isSandboxEnabled as C, SANDBOX_MIGRATION_TAG as S, normalizeWranglerCompatibilityFlags as _, prerenderPagesNode as a, resolveLiveBindingConfig as b, filterLoadedEnv as c, LIVE_MIGRATION_TAG as d, ensureWranglerCompat as f, nextDurableObjectMigrationTag as g, hasDurableObjectSqliteMigration as h, prerenderPages as i, resolveRemoteMode as l, ensureWranglerNodejsAlsFlag as m, resolveDistDir as n, DEFAULT_PROXY_URL as o, ensureWranglerCompatibilityDate as p, resolveWorkerDirName as r, STAGING_PROXY_URL as s, deploy_exports as t, stripInternalEnvKeys as u, readExistingLiveBindingConfig as v, resolveSandboxConfig as w, syncWranglerBindings as x, readWranglerCompat as y };
|