void 0.7.13 → 0.8.0
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/{agents-DqkFfc2c.mjs → agents-Dkgafwfr.mjs} +1 -1
- package/dist/{auth-cmd-bS88H4Lb.mjs → auth-cmd-B1-7r6ng.mjs} +3 -3
- package/dist/{better-auth-shared-D2JaoCs4.mjs → better-auth-shared-CbAF6sOM.mjs} +1 -1
- package/dist/{better-auth-shared-HXlHRw02.d.mts → better-auth-shared-Fzyk5yS1.d.mts} +2 -7
- package/dist/{cache-DUDCNty6.mjs → cache-CGYC-2LW.mjs} +5 -5
- package/dist/{cancel-deploy-DOuSbPwX.mjs → cancel-deploy-B4j31z7d.mjs} +4 -4
- package/dist/canonical-json-CEyQaVDa.mjs +13 -0
- package/dist/cli/cli.mjs +44 -31
- package/dist/{client-C_DYiXeu.mjs → client-C-nH6yz3.mjs} +5 -5
- package/dist/{collect-HqAuilH6.mjs → collect-9rO3JFNM.mjs} +1 -1
- package/dist/{config-DyUSwbeX.mjs → config--wXmVOoe.mjs} +10 -8
- package/dist/{config-CeRQg3Lz.mjs → config-BVEC0lti.mjs} +11 -2
- package/dist/{config-CvHtTM0q.mjs → config-hhMYPVRT.mjs} +3 -12
- package/dist/{create-project-hvFe6rbI.mjs → create-project-BGnQMy5N.mjs} +44 -18
- package/dist/{db-YEYSTfGw.mjs → db-CT5Xg6ds.mjs} +42 -37
- package/dist/{delete-XyM_VD9o.mjs → delete-eMGTHHB9.mjs} +5 -5
- package/dist/{deploy-CPAEgVQm.mjs → deploy-7EA_lKq9.mjs} +169 -99
- package/dist/{discover-CKGQpis8.mjs → discover-C8N1I4tK.mjs} +9 -6
- package/dist/{domain-Dvj7u8tr.mjs → domain-UfLrp2vc.mjs} +64 -22
- package/dist/{drizzle-Cx7cVwrE.mjs → drizzle-DmaANP4-.mjs} +1 -1
- package/dist/{env-Bjl0rzuf.mjs → env-Cvdbbm_N.mjs} +7 -7
- package/dist/{env-helpers-Dw95CU8e.d.mts → env-helpers-Bt9yYg5I.d.mts} +1 -1
- package/dist/{env-types-BSQghXbx.mjs → env-types-D6qI1ThV.mjs} +8 -19
- package/dist/{env-validation-Buy5pe3u.mjs → env-validation-DBJsxZLz.mjs} +4 -4
- package/dist/{gen-DU8NIdrH.mjs → gen-Cn2hZ8RR.mjs} +37 -31
- package/dist/{handler-DJTuxB10.d.mts → handler-BPhL8AmU.d.mts} +3 -3
- package/dist/{headers-CuVHn6Kl.mjs → headers-wAPJigtE.mjs} +3 -3
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +273 -104
- package/dist/{init-Br5DTaG7.mjs → init-DL6syXuF.mjs} +43 -31
- package/dist/{link-DdXqlUiJ.mjs → link-C5x1E-XZ.mjs} +5 -5
- package/dist/{list-9Bxa5Odn.mjs → list-ezL7hqDV.mjs} +5 -5
- package/dist/{login-C_MfDjhu.mjs → login-CkLr-AaI.mjs} +3 -3
- package/dist/{logs-DjqCpEER.mjs → logs-MnGILmLz.mjs} +4 -4
- package/dist/{mcp-vA0880_K.mjs → mcp-B84MmVAW.mjs} +3 -3
- package/dist/{node-gxRQXIRT.mjs → node-fpywdcbN.mjs} +6 -6
- package/dist/{output-D3g5otMC.mjs → output-DeiS4oEX.mjs} +1 -1
- package/dist/pages/client.d.mts +1 -1
- package/dist/pages/head-client.d.mts +1 -1
- package/dist/pages/head.d.mts +1 -1
- package/dist/pages/index.d.mts +28 -3
- package/dist/pages/index.mjs +6 -5
- package/dist/pages/islands-plugin.d.mts +1 -1
- package/dist/pages/islands-plugin.mjs +7 -5
- package/dist/pages/protocol.d.mts +2 -2
- package/dist/pages/protocol.mjs +1 -1
- package/dist/{pathe.M-eThtNZ-D-kmWkCS.mjs → pathe.M-eThtNZ-BrPhGF_K.mjs} +1 -1
- package/dist/plan-aD3wRDqF.mjs +271 -0
- package/dist/{plugin-inference-BexV6LL3.mjs → plugin-inference-Ba1uGdIy.mjs} +26 -20
- package/dist/{prepare-BEkH89oX.mjs → prepare-BrAISonG.mjs} +29 -19
- package/dist/{preset-CYQh93UF.mjs → preset-BRsCi8ZB.mjs} +10 -8
- package/dist/{project-DhB4A8_g.mjs → project-CH9pdo16.mjs} +1 -1
- package/dist/{project-cmd-CeXO06hG.mjs → project-cmd-JQUzv3qF.mjs} +10 -10
- package/dist/project-paths-CCMrHYQm.mjs +100 -0
- package/dist/{project-slug-KRvHQEQI.mjs → project-slug-De4UjtD9.mjs} +0 -1
- package/dist/{project-tsconfig-Bfy55qvs.mjs → project-tsconfig-HAGjfY6w.mjs} +10 -5
- package/dist/{protocol-D7r_deVZ.d.mts → protocol-mcSsdMij.d.mts} +3 -3
- package/dist/providers--_pvxpNN.d.mts +7 -0
- package/dist/{resolve-project-DdjLQ2tB.mjs → resolve-project-CNpUbUHd.mjs} +1 -1
- package/dist/{rollback-C8OSMxmq.mjs → rollback-CoAAvC18.mjs} +4 -4
- package/dist/{route-types-qVL-v-CB.mjs → route-types-jxRfWuCb.mjs} +1 -1
- package/dist/{runner-C0d3lJo1.mjs → runner-BkGBfr4e.mjs} +4 -2
- package/dist/{runner-pg-Bd_172vF.mjs → runner-pg-BXP0JpHW.mjs} +1 -1
- package/dist/runtime/ai.mjs +2 -2
- package/dist/runtime/auth.d.mts +1 -1
- package/dist/runtime/better-auth-pg.d.mts +1 -1
- package/dist/runtime/better-auth-pg.mjs +2 -2
- package/dist/runtime/better-auth.d.mts +1 -1
- package/dist/runtime/better-auth.mjs +2 -2
- package/dist/runtime/client.d.mts +2 -2
- package/dist/runtime/client.mjs +1 -1
- package/dist/runtime/env-helpers.d.mts +1 -1
- package/dist/runtime/env-public-client.d.mts +1 -1
- package/dist/runtime/env-public.d.mts +2 -2
- package/dist/runtime/env-public.mjs +1 -1
- package/dist/runtime/env.mjs +1 -1
- package/dist/runtime/fetch-stream.d.mts +1 -1
- package/dist/runtime/fetch-stream.mjs +1 -1
- package/dist/runtime/fetch.d.mts +1 -1
- package/dist/runtime/fetch.mjs +1 -1
- package/dist/runtime/handler.d.mts +1 -1
- package/dist/runtime/handler.mjs +1 -1
- package/dist/runtime/isr.mjs +1 -1
- package/dist/runtime/live.d.mts +2 -2
- package/dist/runtime/live.mjs +1 -1
- package/dist/runtime/migration-handler.d.mts +33 -1
- package/dist/runtime/migration-handler.mjs +332 -24
- package/dist/runtime/remote/index.mjs +1 -1
- package/dist/runtime/sandbox.d.mts +73 -3
- package/dist/runtime/sandbox.mjs +239 -3
- package/dist/runtime/validator.d.mts +1 -1
- package/dist/runtime/ws-server.d.mts +2 -2
- package/dist/runtime/ws.d.mts +3 -3
- package/dist/{scan-CKpylFj9.mjs → scan-2YmJkYAf.mjs} +4 -3
- package/dist/{scan-CkK1Hzpa.mjs → scan-DzzHqtiT.mjs} +82 -43
- package/dist/{secret-NDvlqAN2.mjs → secret-mz8t_CML.mjs} +5 -5
- package/dist/{skills-SAG0WyVn.mjs → skills-B_ynF4lA.mjs} +3 -3
- package/dist/{subcommand-prompt-q9T06dpg.mjs → subcommand-prompt-CPuV7tPW.mjs} +2 -2
- package/dist/sveltekit.mjs +1 -1
- package/dist/{validate-DW3ViKTA.mjs → validate-CNWm-PsL.mjs} +49 -9
- package/dist/{yarn-pnp-6LD6_3Ej.mjs → yarn-pnp-QgEYVC3V.mjs} +1 -1
- package/package.json +3 -2
- package/schema.json +5 -0
- package/skills/void/docs/guide/ai.md +1 -1
- package/skills/void/docs/guide/app-types.md +1 -1
- package/skills/void/docs/guide/database/postgresql.md +1 -1
- package/skills/void/docs/guide/edge/headers.md +1 -1
- package/skills/void/docs/guide/edge/static-assets.md +34 -0
- package/skills/void/docs/guide/sandboxes.md +3 -2
- package/skills/void/docs/guide/ssr.md +25 -2
- package/skills/void/docs/integrations/cloudflare.md +5 -3
- package/skills/void/docs/integrations/frameworks/overview.md +1 -1
- package/skills/void/docs/integrations/nodejs-bun-deno.md +10 -9
- package/skills/void/docs/reference/api.md +204 -13
- package/skills/void/docs/reference/cli.md +52 -6
- package/skills/void/docs/reference/config.md +27 -4
- package/skills/void/docs/reference/resource-inference.md +1 -1
- /package/dist/{auth-DmuALf16.d.mts → auth-SfRBhXan.d.mts} +0 -0
- /package/dist/{auth-migrations-BwLPwRgH.mjs → auth-migrations-BqJoGqGQ.mjs} +0 -0
- /package/dist/{cf-access-BW8K93Fm.mjs → cf-access-DKDsgwOU.mjs} +0 -0
- /package/dist/{defer-2ARBu8Et.mjs → defer-DkoEwda-.mjs} +0 -0
- /package/dist/{dist-q8b2Mjgb.mjs → dist-DR9sIMbM.mjs} +0 -0
- /package/dist/{dist-D2L3_KTK.mjs → dist-abzUneor.mjs} +0 -0
- /package/dist/{dotenv-HQNhRalS.mjs → dotenv-Bkoqyq9r.mjs} +0 -0
- /package/dist/{env-raw-DtfQ9E31.mjs → env-raw-zk5JQKZe.mjs} +0 -0
- /package/dist/{fetch-error-DZ868Xq4.d.mts → fetch-error-BbixZ9vW.d.mts} +0 -0
- /package/dist/{fetch-error-CEr0ACTl.mjs → fetch-error-rXermVU3.mjs} +0 -0
- /package/dist/{head-C7QW7UY1.d.mts → head-CZs8dMxG.d.mts} +0 -0
- /package/dist/{log-7ChR5Fbc.mjs → log-CWWZV4V1.mjs} +0 -0
- /package/dist/{magic-string.es-DS_lmuBe.mjs → magic-string.es-C1Fb0uxq.mjs} +0 -0
- /package/dist/{providers-BlFNPYen.mjs → providers-uC0PJg1c.mjs} +0 -0
- /package/dist/{standard-schema-D2qvCEYV.d.mts → standard-schema-WhHcCaqJ.d.mts} +0 -0
- /package/dist/{types-DG_Ynnyd.d.mts → types-C8wsi1hv.d.mts} +0 -0
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import { a as join,
|
|
2
|
-
import { n as cliTitle } from "./output-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { r as
|
|
9
|
-
import {
|
|
10
|
-
import { t as
|
|
11
|
-
import {
|
|
12
|
-
import { n as
|
|
13
|
-
import { n as
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
1
|
+
import { a as join, c as resolve, i as isAbsolute, n as dirname, s as relative, t as basename } from "./pathe.M-eThtNZ-BrPhGF_K.mjs";
|
|
2
|
+
import { n as cliTitle } from "./output-DeiS4oEX.mjs";
|
|
3
|
+
import { n as readProjectPaths } from "./project-paths-CCMrHYQm.mjs";
|
|
4
|
+
import { c as getToken, n as PlatformClient, u as isStagingMode } from "./client-C-nH6yz3.mjs";
|
|
5
|
+
import { _ as me, c as R, g as ge, i as Ee, l as Re, u as Se, v as ue, x as q, y as ye } from "./dist-abzUneor.mjs";
|
|
6
|
+
import { a as writeProjectConfig, r as readProjectConfig } from "./project-CH9pdo16.mjs";
|
|
7
|
+
import { c as getDatabaseDialect, f as readConfig } from "./config-BVEC0lti.mjs";
|
|
8
|
+
import { r as detectFramework } from "./plugin-inference-Ba1uGdIy.mjs";
|
|
9
|
+
import { r as parseDotenvFile, t as expandDotenv } from "./dotenv-Bkoqyq9r.mjs";
|
|
10
|
+
import { n as ensureProjectTsconfig, t as createProjectTsconfig } from "./project-tsconfig-HAGjfY6w.mjs";
|
|
11
|
+
import { t as MagicString } from "./magic-string.es-C1Fb0uxq.mjs";
|
|
12
|
+
import { n as writeDrizzleConfig } from "./config--wXmVOoe.mjs";
|
|
13
|
+
import { n as getAgentById, r as getPackageDir, t as detectAgents } from "./agents-Dkgafwfr.mjs";
|
|
14
|
+
import { n as promptAndCreateProject, r as promptProjectSelection } from "./create-project-BGnQMy5N.mjs";
|
|
15
|
+
import { t as promptForLoginToken } from "./login-CkLr-AaI.mjs";
|
|
16
|
+
import { r as formatProjectCommand } from "./preset-BRsCi8ZB.mjs";
|
|
17
|
+
import { n as findInstalledYarnPnpRuntime, r as hasLocalLockfile, t as buildDrizzleKitSpawnEnv } from "./yarn-pnp-QgEYVC3V.mjs";
|
|
17
18
|
import { createRequire } from "node:module";
|
|
18
19
|
import { existsSync, mkdirSync, readFileSync, readdirSync, rmdirSync, unlinkSync, writeFileSync } from "node:fs";
|
|
19
20
|
import { fileURLToPath } from "node:url";
|
|
@@ -665,6 +666,7 @@ const EMPTY_PROJECT_ALLOWED_ENTRIES = new Set([
|
|
|
665
666
|
const PNPM_ALLOWED_BUILDS = [
|
|
666
667
|
"better-sqlite3",
|
|
667
668
|
"esbuild",
|
|
669
|
+
"sharp",
|
|
668
670
|
"workerd"
|
|
669
671
|
];
|
|
670
672
|
const drizzleKitBin = join(fileURLToPath(import.meta.resolve("drizzle-kit")), "..", "bin.cjs");
|
|
@@ -684,6 +686,7 @@ const VITE_CONFIG_FILES = [
|
|
|
684
686
|
"vite.config.cjs"
|
|
685
687
|
];
|
|
686
688
|
const VOID_CONFIG_FILE = "void.json";
|
|
689
|
+
const VOID_SCHEMA_PATH = "./node_modules/void/schema.json";
|
|
687
690
|
function asRecord(value) {
|
|
688
691
|
if (!value || typeof value !== "object" || Array.isArray(value)) return null;
|
|
689
692
|
return value;
|
|
@@ -1309,9 +1312,9 @@ function detectProjectState(root) {
|
|
|
1309
1312
|
hasTypescript,
|
|
1310
1313
|
hasTsconfig: existsSync(join(root, "tsconfig.json")),
|
|
1311
1314
|
hasGithubWorkflows: existsSync(join(root, ".github", "workflows")),
|
|
1312
|
-
hasRoutes: existsSync(
|
|
1313
|
-
hasMigrations: existsSync(
|
|
1314
|
-
hasPages: existsSync(
|
|
1315
|
+
hasRoutes: existsSync(readProjectPaths(root).routesDir),
|
|
1316
|
+
hasMigrations: existsSync(readProjectPaths(root).migrationsDir) || existsSync(join(root, "migrations")),
|
|
1317
|
+
hasPages: existsSync(readProjectPaths(root).pagesDir),
|
|
1315
1318
|
packageManager,
|
|
1316
1319
|
typescriptWanted: hasTypescript
|
|
1317
1320
|
};
|
|
@@ -1320,7 +1323,8 @@ function findViteConfig(root) {
|
|
|
1320
1323
|
return VITE_CONFIG_FILES.find((file) => existsSync(join(root, file)));
|
|
1321
1324
|
}
|
|
1322
1325
|
function hasDrizzleSchema(root) {
|
|
1323
|
-
|
|
1326
|
+
const paths = readProjectPaths(root);
|
|
1327
|
+
return existsSync(paths.schemaFile) || existsSync(paths.schemaDir);
|
|
1324
1328
|
}
|
|
1325
1329
|
function detectPagesFramework(root) {
|
|
1326
1330
|
try {
|
|
@@ -1533,8 +1537,15 @@ function setupWranglerConfig(root, framework) {
|
|
|
1533
1537
|
else R.success("Updated wrangler.jsonc with compatibility_date and nodejs_als");
|
|
1534
1538
|
} else R.success("wrangler.jsonc looks good");
|
|
1535
1539
|
}
|
|
1540
|
+
function withDefaultVoidSchema(config) {
|
|
1541
|
+
if (typeof config.$schema === "string" && config.$schema.length > 0) return config;
|
|
1542
|
+
return {
|
|
1543
|
+
$schema: VOID_SCHEMA_PATH,
|
|
1544
|
+
...config
|
|
1545
|
+
};
|
|
1546
|
+
}
|
|
1536
1547
|
function writeVoidConfig(root, config) {
|
|
1537
|
-
writeFileSync(join(root, VOID_CONFIG_FILE), JSON.stringify(config, null, 2) + "\n");
|
|
1548
|
+
writeFileSync(join(root, VOID_CONFIG_FILE), JSON.stringify(withDefaultVoidSchema(config), null, 2) + "\n");
|
|
1538
1549
|
}
|
|
1539
1550
|
function ensureVoidWorkerCompatibilityDate(root) {
|
|
1540
1551
|
const config = readConfig(root);
|
|
@@ -1584,7 +1595,7 @@ function applyDatabaseDialect(root, dialect) {
|
|
|
1584
1595
|
}
|
|
1585
1596
|
function detectDatabaseSetup(root) {
|
|
1586
1597
|
if (getDatabaseDialect(readConfig(root)) === "postgresql") return "postgresql";
|
|
1587
|
-
if (hasDrizzleSchema(root) || existsSync(
|
|
1598
|
+
if (hasDrizzleSchema(root) || existsSync(readProjectPaths(root).migrationsDir) || existsSync(join(root, "migrations"))) return "sqlite";
|
|
1588
1599
|
return "none";
|
|
1589
1600
|
}
|
|
1590
1601
|
function applyDatabaseSetup(root, choice) {
|
|
@@ -1864,7 +1875,7 @@ function installProjectDependencies(root, packageManager) {
|
|
|
1864
1875
|
function generateStarterMigration(root, starterMode) {
|
|
1865
1876
|
const dialect = starterMode === "postgresql" ? "postgresql" : "sqlite";
|
|
1866
1877
|
const configPath = writeDrizzleConfig(root, dialect === "postgresql" ? "postgresql://dummy" : ":memory:", dialect);
|
|
1867
|
-
const migrationsDir =
|
|
1878
|
+
const migrationsDir = readProjectPaths(root).migrationsDir;
|
|
1868
1879
|
const metaDir = join(migrationsDir, "meta");
|
|
1869
1880
|
const journalPath = join(metaDir, "_journal.json");
|
|
1870
1881
|
const migrationsDirExistedBefore = existsSync(migrationsDir);
|
|
@@ -2375,9 +2386,10 @@ function setupExistingProject(root, framework) {
|
|
|
2375
2386
|
*/
|
|
2376
2387
|
function scaffoldDemo(root) {
|
|
2377
2388
|
const devCommand = getDevCommand(root);
|
|
2389
|
+
const paths = readProjectPaths(root);
|
|
2378
2390
|
const packageJsonMutated = ensureVoidDependency(root);
|
|
2379
|
-
mkdirSync(
|
|
2380
|
-
writeFileSync(
|
|
2391
|
+
mkdirSync(paths.dbDir, { recursive: true });
|
|
2392
|
+
writeFileSync(paths.schemaFile, `import { sql } from "void/db";
|
|
2381
2393
|
import { integer, sqliteTable, text } from "void/schema-d1";
|
|
2382
2394
|
|
|
2383
2395
|
export const posts = sqliteTable("posts", {
|
|
@@ -2388,8 +2400,8 @@ export const posts = sqliteTable("posts", {
|
|
|
2388
2400
|
});
|
|
2389
2401
|
`);
|
|
2390
2402
|
R.success("Created db/schema.ts");
|
|
2391
|
-
mkdirSync(join(
|
|
2392
|
-
writeFileSync(join(
|
|
2403
|
+
mkdirSync(join(paths.routesDir, "api"), { recursive: true });
|
|
2404
|
+
writeFileSync(join(paths.routesDir, "api", "posts.ts"), `import { defineHandler } from "void";
|
|
2393
2405
|
import { db } from "void/db";
|
|
2394
2406
|
import { posts } from "@schema";
|
|
2395
2407
|
|
|
@@ -2399,9 +2411,9 @@ export const GET = defineHandler(async () => {
|
|
|
2399
2411
|
});
|
|
2400
2412
|
`);
|
|
2401
2413
|
R.success("Created routes/api/posts.ts");
|
|
2402
|
-
ensureProjectTsconfig(root, void 0, true, true);
|
|
2403
|
-
mkdirSync(
|
|
2404
|
-
writeFileSync(join(
|
|
2414
|
+
ensureProjectTsconfig(root, void 0, true, true, { paths });
|
|
2415
|
+
mkdirSync(paths.ssrDir, { recursive: true });
|
|
2416
|
+
writeFileSync(join(paths.ssrDir, "demo.ts"), `import { fetch } from "void/client";
|
|
2405
2417
|
|
|
2406
2418
|
// Fully typed: response type is inferred from the GET handler's return type,
|
|
2407
2419
|
// which is derived from the migration schema. No manual types needed.
|
|
@@ -2679,7 +2691,7 @@ async function runInitCommand(root, initArgs) {
|
|
|
2679
2691
|
const agentSetup = await resolveAgentSetup(root);
|
|
2680
2692
|
injectAgentBlock(root, agentSetup.instructionFilePath);
|
|
2681
2693
|
if (agentSetup.agents.length > 0) {
|
|
2682
|
-
const { linkSkillsForSpecificAgents } = await import("./skills-
|
|
2694
|
+
const { linkSkillsForSpecificAgents } = await import("./skills-B_ynF4lA.mjs");
|
|
2683
2695
|
linkSkillsForSpecificAgents(root, agentSetup.agents);
|
|
2684
2696
|
} else R.info("Skills linking skipped for generic agent setup");
|
|
2685
2697
|
setupMcpConfig(root, agentSetup.agents);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { n as cliTitle, s as import_picocolors } from "./output-
|
|
2
|
-
import { c as getToken, n as PlatformClient, s as getSiteDomain } from "./client-
|
|
3
|
-
import { _ as me, c as R, g as ge, y as ye } from "./dist-
|
|
4
|
-
import { a as writeProjectConfig, r as readProjectConfig } from "./project-
|
|
5
|
-
import { n as
|
|
1
|
+
import { n as cliTitle, s as import_picocolors } from "./output-DeiS4oEX.mjs";
|
|
2
|
+
import { c as getToken, n as PlatformClient, s as getSiteDomain } from "./client-C-nH6yz3.mjs";
|
|
3
|
+
import { _ as me, c as R, g as ge, y as ye } from "./dist-abzUneor.mjs";
|
|
4
|
+
import { a as writeProjectConfig, r as readProjectConfig } from "./project-CH9pdo16.mjs";
|
|
5
|
+
import { n as promptAndCreateProject, r as promptProjectSelection } from "./create-project-BGnQMy5N.mjs";
|
|
6
6
|
//#region src/cli/link.ts
|
|
7
7
|
async function runLink(root, slug) {
|
|
8
8
|
console.log();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as ensureUtc, i as dim, l as tablePrefix, n as cliTitle, s as import_picocolors } from "./output-
|
|
2
|
-
import { c as getToken, n as PlatformClient } from "./client-
|
|
3
|
-
import { c as R, g as ge, y as ye } from "./dist-
|
|
4
|
-
import { r as readProjectConfig } from "./project-
|
|
5
|
-
import { r as resolveProjectBySlug } from "./resolve-project-
|
|
1
|
+
import { a as ensureUtc, i as dim, l as tablePrefix, n as cliTitle, s as import_picocolors } from "./output-DeiS4oEX.mjs";
|
|
2
|
+
import { c as getToken, n as PlatformClient } from "./client-C-nH6yz3.mjs";
|
|
3
|
+
import { c as R, g as ge, y as ye } from "./dist-abzUneor.mjs";
|
|
4
|
+
import { r as readProjectConfig } from "./project-CH9pdo16.mjs";
|
|
5
|
+
import { r as resolveProjectBySlug } from "./resolve-project-CNpUbUHd.mjs";
|
|
6
6
|
//#region src/cli/list.ts
|
|
7
7
|
async function runListCommand(root, slug) {
|
|
8
8
|
console.log();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as cliTitle, r as createSpinner, s as import_picocolors } from "./output-
|
|
2
|
-
import { a as isExpiredTokenError, c as getToken, d as removeToken, f as runLogin, l as getTokenSource, n as PlatformClient, p as saveToken, u as isStagingMode } from "./client-
|
|
3
|
-
import { _ as me, c as R, g as ge, i as Ee, x as q, y as ye } from "./dist-
|
|
1
|
+
import { n as cliTitle, r as createSpinner, s as import_picocolors } from "./output-DeiS4oEX.mjs";
|
|
2
|
+
import { a as isExpiredTokenError, c as getToken, d as removeToken, f as runLogin, l as getTokenSource, n as PlatformClient, p as saveToken, u as isStagingMode } from "./client-C-nH6yz3.mjs";
|
|
3
|
+
import { _ as me, c as R, g as ge, i as Ee, x as q, y as ye } from "./dist-abzUneor.mjs";
|
|
4
4
|
//#region src/cli/login.ts
|
|
5
5
|
async function promptForLoginToken(root = process.cwd()) {
|
|
6
6
|
const provider = await Ee({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { i as dim, n as cliTitle, s as import_picocolors } from "./output-
|
|
2
|
-
import { c as getToken, n as PlatformClient } from "./client-
|
|
3
|
-
import { c as R, g as ge, y as ye } from "./dist-
|
|
4
|
-
import { r as readProjectConfig } from "./project-
|
|
1
|
+
import { i as dim, n as cliTitle, s as import_picocolors } from "./output-DeiS4oEX.mjs";
|
|
2
|
+
import { c as getToken, n as PlatformClient } from "./client-C-nH6yz3.mjs";
|
|
3
|
+
import { c as R, g as ge, y as ye } from "./dist-abzUneor.mjs";
|
|
4
|
+
import { r as readProjectConfig } from "./project-CH9pdo16.mjs";
|
|
5
5
|
//#region src/cli/logs.ts
|
|
6
6
|
async function runLogsCommand(root, filter, range, deployment, level) {
|
|
7
7
|
console.log();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as join, n as dirname } from "./pathe.M-eThtNZ-
|
|
2
|
-
import { c as getToken, n as PlatformClient } from "./client-
|
|
3
|
-
import { a as writeProjectConfig } from "./project-
|
|
1
|
+
import { a as join, n as dirname } from "./pathe.M-eThtNZ-BrPhGF_K.mjs";
|
|
2
|
+
import { c as getToken, n as PlatformClient } from "./client-C-nH6yz3.mjs";
|
|
3
|
+
import { a as writeProjectConfig } from "./project-CH9pdo16.mjs";
|
|
4
4
|
import { existsSync, readFileSync, readdirSync } from "node:fs";
|
|
5
5
|
import { fileURLToPath } from "node:url";
|
|
6
6
|
import { createInterface } from "node:readline";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { a as join } from "./pathe.M-eThtNZ-
|
|
2
|
-
import { n as loadVoidAuthConfig, t as findVoidAuthConfig } from "./config-
|
|
3
|
-
import { f as readConfig } from "./config-
|
|
4
|
-
import { r as resolveVoidAuthMigrationSchema } from "./drizzle-
|
|
5
|
-
import { n as applySqliteAuthMigrations, t as applyPgAuthMigrations } from "./auth-migrations-
|
|
6
|
-
import { getMiniflareDatabasePath } from "./runner-
|
|
1
|
+
import { a as join } from "./pathe.M-eThtNZ-BrPhGF_K.mjs";
|
|
2
|
+
import { n as loadVoidAuthConfig, t as findVoidAuthConfig } from "./config-hhMYPVRT.mjs";
|
|
3
|
+
import { f as readConfig } from "./config-BVEC0lti.mjs";
|
|
4
|
+
import { r as resolveVoidAuthMigrationSchema } from "./drizzle-DmaANP4-.mjs";
|
|
5
|
+
import { n as applySqliteAuthMigrations, t as applyPgAuthMigrations } from "./auth-migrations-BqJoGqGQ.mjs";
|
|
6
|
+
import { getMiniflareDatabasePath } from "./runner-BkGBfr4e.mjs";
|
|
7
7
|
import { loadEnv } from "vite";
|
|
8
8
|
//#region src/auth/node.ts
|
|
9
9
|
async function runLocalVoidAuthMigrations(root, dialect, persistRoot = join(root, ".void"), databaseId = "local", configPath = findVoidAuthConfig(root)) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as __toESM, t as __commonJSMin } from "./chunk-DJd-R1mw.mjs";
|
|
2
|
-
import { c as R, f as at, h as ft } from "./dist-
|
|
2
|
+
import { c as R, f as at, h as ft } from "./dist-abzUneor.mjs";
|
|
3
3
|
//#region ../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js
|
|
4
4
|
var require_picocolors = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5
5
|
let p = process || {}, argv = p.argv || [], env = p.env || {};
|
package/dist/pages/client.d.mts
CHANGED
package/dist/pages/head.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as renderHtmlAttrs, i as renderHeadToString, n as HeadDescriptor, o as resolveHead, r as renderBodyAttrs, t as HeadConfig } from "../head-
|
|
1
|
+
import { a as renderHtmlAttrs, i as renderHeadToString, n as HeadDescriptor, o as resolveHead, r as renderBodyAttrs, t as HeadConfig } from "../head-CZs8dMxG.mjs";
|
|
2
2
|
export { HeadConfig, HeadDescriptor, renderBodyAttrs, renderHeadToString, renderHtmlAttrs, resolveHead };
|
package/dist/pages/index.d.mts
CHANGED
|
@@ -1,7 +1,30 @@
|
|
|
1
|
-
import { a as renderHtmlAttrs, i as renderHeadToString, n as HeadDescriptor, o as resolveHead, r as renderBodyAttrs, t as HeadConfig } from "../head-
|
|
2
|
-
import { a as PageScanResult, i as PageDefinition, n as LayoutDefinition, r as NamedLayoutDefinition } from "../types-
|
|
1
|
+
import { a as renderHtmlAttrs, i as renderHeadToString, n as HeadDescriptor, o as resolveHead, r as renderBodyAttrs, t as HeadConfig } from "../head-CZs8dMxG.mjs";
|
|
2
|
+
import { a as PageScanResult, i as PageDefinition, n as LayoutDefinition, r as NamedLayoutDefinition } from "../types-C8wsi1hv.mjs";
|
|
3
3
|
import { serializePageData } from "./serialize.mjs";
|
|
4
|
+
import { RewriteDestination } from "void/routes";
|
|
4
5
|
|
|
6
|
+
//#region src/project-paths.d.ts
|
|
7
|
+
type ProjectPaths = {
|
|
8
|
+
root: string;
|
|
9
|
+
sourceDir: string;
|
|
10
|
+
sourceRoot: string;
|
|
11
|
+
routesDir: string;
|
|
12
|
+
middlewareDir: string;
|
|
13
|
+
cronsDir: string;
|
|
14
|
+
queuesDir: string;
|
|
15
|
+
pagesDir: string;
|
|
16
|
+
dbDir: string;
|
|
17
|
+
migrationsDir: string;
|
|
18
|
+
schemaFile: string;
|
|
19
|
+
schemaDir: string;
|
|
20
|
+
srcDir: string;
|
|
21
|
+
ssrDir: string;
|
|
22
|
+
sourceRelative: (path: string) => string;
|
|
23
|
+
authConfigCandidates: ReadonlyArray<string>;
|
|
24
|
+
envFileCandidates: ReadonlyArray<string>;
|
|
25
|
+
};
|
|
26
|
+
declare function resolvePagesDir(root?: string): string;
|
|
27
|
+
//#endregion
|
|
5
28
|
//#region src/pages/layout-resolution.d.ts
|
|
6
29
|
/** Resolve the layout chain for a component (innermost last) */
|
|
7
30
|
declare function resolveLayoutChain(componentId: string, layouts: Array<LayoutDefinition>): Array<LayoutDefinition>;
|
|
@@ -16,6 +39,8 @@ declare function resolveEffectiveLayoutChain(page: {
|
|
|
16
39
|
//#region src/pages/scan.d.ts
|
|
17
40
|
declare function scanPages(root: string, options?: {
|
|
18
41
|
output?: "server" | "static";
|
|
42
|
+
paths?: ProjectPaths;
|
|
43
|
+
pagesDir?: string;
|
|
19
44
|
}): Promise<PageScanResult>;
|
|
20
45
|
//#endregion
|
|
21
46
|
//#region src/pages/manifest.d.ts
|
|
@@ -35,4 +60,4 @@ type ResolveStaticPageDataBuildOptionsInput = {
|
|
|
35
60
|
};
|
|
36
61
|
declare function resolveStaticPageDataBuildOptions(root: string, options?: ResolveStaticPageDataBuildOptionsInput): StaticPageDataBuildOptions;
|
|
37
62
|
//#endregion
|
|
38
|
-
export { type HeadConfig, type HeadDescriptor, type LayoutDefinition, type NamedLayoutDefinition, type PageDefinition, type PageScanResult, type StaticPageDataBuildOptions, generateComponentManifest, renderBodyAttrs, renderHeadToString, renderHtmlAttrs, resolveEffectiveLayoutChain, resolveHead, resolveLayoutChain, resolveNamedLayout, resolveStaticPageDataBuildOptions, scanPages, serializePageData };
|
|
63
|
+
export { type HeadConfig, type HeadDescriptor, type LayoutDefinition, type NamedLayoutDefinition, type PageDefinition, type PageScanResult, type StaticPageDataBuildOptions, generateComponentManifest, renderBodyAttrs, renderHeadToString, renderHtmlAttrs, resolveEffectiveLayoutChain, resolveHead, resolveLayoutChain, resolveNamedLayout, resolvePagesDir, resolveStaticPageDataBuildOptions, scanPages, serializePageData };
|
package/dist/pages/index.mjs
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { a as join } from "../pathe.M-eThtNZ-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { i as
|
|
1
|
+
import { a as join } from "../pathe.M-eThtNZ-BrPhGF_K.mjs";
|
|
2
|
+
import { r as resolvePagesDir } from "../project-paths-CCMrHYQm.mjs";
|
|
3
|
+
import { f as readConfig } from "../config-BVEC0lti.mjs";
|
|
4
|
+
import { a as resolveNamedLayout, i as resolveLayoutIds, n as resolveEffectiveLayoutChain, r as resolveLayoutChain, t as scanPages } from "../scan-2YmJkYAf.mjs";
|
|
5
|
+
import { i as parseRedirectsFile } from "../headers-wAPJigtE.mjs";
|
|
5
6
|
import { renderBodyAttrs, renderHeadToString, renderHtmlAttrs, resolveHead } from "./head.mjs";
|
|
6
7
|
import { serializePageData } from "./serialize.mjs";
|
|
7
8
|
//#region src/pages/manifest.ts
|
|
@@ -73,4 +74,4 @@ function resolveStaticPageDataBuildOptions(root, options = {}) {
|
|
|
73
74
|
};
|
|
74
75
|
}
|
|
75
76
|
//#endregion
|
|
76
|
-
export { generateComponentManifest, renderBodyAttrs, renderHeadToString, renderHtmlAttrs, resolveEffectiveLayoutChain, resolveHead, resolveLayoutChain, resolveNamedLayout, resolveStaticPageDataBuildOptions, scanPages, serializePageData };
|
|
77
|
+
export { generateComponentManifest, renderBodyAttrs, renderHeadToString, renderHtmlAttrs, resolveEffectiveLayoutChain, resolveHead, resolveLayoutChain, resolveNamedLayout, resolvePagesDir, resolveStaticPageDataBuildOptions, scanPages, serializePageData };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as resolveEffectiveLayoutChain, t as scanPages } from "../scan-
|
|
1
|
+
import { c as resolve, n as dirname } from "../pathe.M-eThtNZ-BrPhGF_K.mjs";
|
|
2
|
+
import { n as resolveEffectiveLayoutChain, t as scanPages } from "../scan-2YmJkYAf.mjs";
|
|
3
3
|
import { existsSync, readFileSync, readdirSync } from "node:fs";
|
|
4
4
|
import { normalizePath } from "vite";
|
|
5
5
|
//#region src/pages/islands-plugin.ts
|
|
@@ -106,12 +106,14 @@ function computePagesNeedingClientJS(pageScan, pagesDir, resolvedConfig) {
|
|
|
106
106
|
function watchPagesForRescan(server, pagesDir, root, onRescan) {
|
|
107
107
|
let pending = null;
|
|
108
108
|
let debounceTimer = null;
|
|
109
|
+
const normalizedPagesDir = normalizePath(pagesDir);
|
|
109
110
|
const scheduleRescan = (path) => {
|
|
110
|
-
|
|
111
|
+
const normalizedPath = normalizePath(path);
|
|
112
|
+
if (normalizedPath !== normalizedPagesDir && !normalizedPath.startsWith(normalizedPagesDir + "/")) return;
|
|
111
113
|
if (debounceTimer) clearTimeout(debounceTimer);
|
|
112
114
|
debounceTimer = setTimeout(() => {
|
|
113
115
|
debounceTimer = null;
|
|
114
|
-
pending = scanPages(root).then((pageScan) => {
|
|
116
|
+
pending = scanPages(root, { pagesDir }).then((pageScan) => {
|
|
115
117
|
onRescan(pageScan);
|
|
116
118
|
for (const env of Object.values(server.environments)) {
|
|
117
119
|
const mod = env.moduleGraph.getModuleById("\0" + ISLANDS_RENDERER_ID);
|
|
@@ -124,7 +126,7 @@ function watchPagesForRescan(server, pagesDir, root, onRescan) {
|
|
|
124
126
|
server.watcher.on("add", scheduleRescan);
|
|
125
127
|
server.watcher.on("unlink", scheduleRescan);
|
|
126
128
|
server.watcher.on("change", (path) => {
|
|
127
|
-
if (path.endsWith(".md")) scheduleRescan(path);
|
|
129
|
+
if (normalizePath(path).endsWith(".md")) scheduleRescan(path);
|
|
128
130
|
});
|
|
129
131
|
return { flush: () => pending ?? Promise.resolve() };
|
|
130
132
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { S as ValidationError } from "../handler-
|
|
2
|
-
import { a as handlePageMutation, i as handlePageGet, n as PageRenderResult, o as safeJsonStringify, r as flattenValidationErrors, t as PageObject } from "../protocol-
|
|
1
|
+
import { S as ValidationError } from "../handler-BPhL8AmU.mjs";
|
|
2
|
+
import { a as handlePageMutation, i as handlePageGet, n as PageRenderResult, o as safeJsonStringify, r as flattenValidationErrors, t as PageObject } from "../protocol-mcSsdMij.mjs";
|
|
3
3
|
export { PageObject, PageRenderResult, ValidationError, flattenValidationErrors, handlePageGet, handlePageMutation, safeJsonStringify };
|
package/dist/pages/protocol.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isConvertedResponse } from "../runtime/response.mjs";
|
|
2
|
-
import { i as ValidationError, r as separateDeferred, t as DEFERRED } from "../defer-
|
|
2
|
+
import { i as ValidationError, r as separateDeferred, t as DEFERRED } from "../defer-DkoEwda-.mjs";
|
|
3
3
|
import { resolveHead } from "./head.mjs";
|
|
4
4
|
//#region src/pages/protocol.ts
|
|
5
5
|
const POWERED_BY = { "X-Powered-By": "Void" };
|
|
@@ -147,4 +147,4 @@ const basename = function(p, extension) {
|
|
|
147
147
|
return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;
|
|
148
148
|
};
|
|
149
149
|
//#endregion
|
|
150
|
-
export { join as a, isAbsolute as i, dirname as n,
|
|
150
|
+
export { join as a, resolve as c, isAbsolute as i, dirname as n, normalize as o, extname as r, relative as s, basename as t };
|