void 0.10.10 → 0.10.11
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/AGENT_PROMPT.md +4 -0
- package/README.md +1 -1
- package/dist/{agents-Bmr5tFFb.mjs → agents-CtgBYqld.mjs} +1 -1
- package/dist/{auth-cmd-Cw1edJdZ.mjs → auth-cmd-BqsdZJp5.mjs} +3 -3
- package/dist/{better-auth-shared-BvnM9px6.d.mts → better-auth-shared-DealXecJ.d.mts} +1 -1
- package/dist/{build-cmd-C6kNDJBv.mjs → build-cmd-Bujrv5q-.mjs} +3 -3
- package/dist/{cache-DIUSnIjJ.mjs → cache-C11V8Fxq.mjs} +3 -3
- package/dist/{cancel-deploy-BosnzEHC.mjs → cancel-deploy-fwFYF04b.mjs} +2 -2
- package/dist/cli/cli.mjs +124 -41
- package/dist/cli/env-schema-probe.d.mts +96 -0
- package/dist/cli/env-schema-probe.mjs +272 -0
- package/dist/{client-C9FG6Vzc.mjs → client-Gb71-XkG.mjs} +12 -2
- package/dist/{config-BdUctCZD.mjs → config-CutEMNGJ.mjs} +3 -3
- package/dist/{config-BcAeIPe3.mjs → config-E03l1C_h.mjs} +2 -2
- package/dist/{create-project-CjYX23M_.mjs → create-project-DsYvl3TB.mjs} +3 -3
- package/dist/{db-BvKV34IK.mjs → db-PZBsLSGb.mjs} +27 -27
- package/dist/{delete-CThKLXfi.mjs → delete-mh6p-zkQ.mjs} +3 -3
- package/dist/deploy-DT8wsPZd.mjs +6990 -0
- package/dist/{discover-BuVVSAum.mjs → discover-CJHyvYfR.mjs} +2 -2
- package/dist/dist-DaKKDf8D.mjs +41 -0
- package/dist/{domain-DMrBabBQ.mjs → domain-DiaNQbrl.mjs} +2 -2
- package/dist/entry-D7yy4xVH.mjs +100 -0
- package/dist/{env-BfG7O71F.mjs → env-AAHU02L6.mjs} +5 -5
- package/dist/env-mask-Dd47NbR6.mjs +90 -0
- package/dist/env-public-BfiLcMBk.d.mts +140 -0
- package/dist/{env-types-D51bnR-c.mjs → env-types-QBj-ndax.mjs} +2 -2
- package/dist/env-validation-BdDlGhbN.mjs +1069 -0
- package/dist/{gen-Bee261SV.mjs → gen-oup1xBN0.mjs} +8 -8
- package/dist/{github-cmd-DfeFEasr.mjs → github-cmd-BdNaOVNa.mjs} +3 -3
- package/dist/{handler-imD0UVDT.d.mts → handler-Cjh8uM3Y.d.mts} +1 -1
- package/dist/{headers-CTAjX-UO.mjs → headers-BQknpzkn.mjs} +2 -2
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +41 -33
- package/dist/{init-xfwW7cLp.mjs → init-Dl2PKuQn.mjs} +13 -14
- package/dist/{link-Co136MEs.mjs → link-CdGHSIy-.mjs} +4 -4
- package/dist/{list-BKDjA3M5.mjs → list-CPwFDZ_c.mjs} +3 -3
- package/dist/{login-CrOTnR_6.mjs → login-BT3H8PN3.mjs} +2 -2
- package/dist/{logs-DlAg25ww.mjs → logs-Bt313ax7.mjs} +3 -2
- package/dist/{mcp-BNjMGMB0.mjs → mcp-DoM3_nhd.mjs} +7 -2
- package/dist/{node-CnE-SZCk.mjs → node-BDx8pmhq.mjs} +5 -5
- package/dist/{package-json-B0NuUWGd.mjs → package-json-Cx1osYo6.mjs} +1 -1
- package/dist/pages/client.d.mts +1 -1
- package/dist/pages/index.d.mts +1 -23
- package/dist/pages/index.mjs +5 -5
- package/dist/pages/islands-plugin.mjs +2 -2
- package/dist/pages/protocol.d.mts +2 -2
- package/dist/{plugin-inference-CJxi_fWI.mjs → plugin-inference-DMeavIJ6.mjs} +4 -98
- package/dist/{prepare-BRyC4TCC.mjs → prepare-DOBTY0o4.mjs} +10 -10
- package/dist/preset-BGrvB4Bl.mjs +539 -0
- package/dist/{project-cmd-B2bcKefD.mjs → project-cmd-D_w-4w5B.mjs} +13 -9
- package/dist/{project-paths-tpdR1mJR.mjs → project-paths-BQd7OmIo.mjs} +1 -1
- package/dist/project-paths-GpziKeQQ.d.mts +25 -0
- package/dist/{project-tsconfig-D9uSVVpA.mjs → project-tsconfig-B-QtXjLQ.mjs} +2 -2
- package/dist/{protocol-6hTJ04T1.d.mts → protocol-Bnb0LFp3.d.mts} +1 -1
- package/dist/provision-BLrCEBbI.mjs +2557 -0
- package/dist/requests-B8sZxaFM.mjs +50 -0
- package/dist/{resolve-project-D2HI3TrG.mjs → resolve-project-BBMtLLV9.mjs} +1 -1
- package/dist/{rollback-9dfmB-YZ.mjs → rollback-CkvTFXx5.mjs} +2 -2
- package/dist/{route-types-CfKfhbIg.mjs → route-types-COI2DsZv.mjs} +2 -2
- package/dist/{runner-h272wcPj.mjs → runner-kapo9aPs.mjs} +3 -3
- package/dist/{runner-pg-waxJOnBb.mjs → runner-pg-CHM76xuC.mjs} +1 -1
- package/dist/runtime/better-auth-pg.d.mts +1 -1
- package/dist/runtime/better-auth.d.mts +1 -1
- package/dist/runtime/env-public.d.mts +1 -139
- package/dist/runtime/env-public.mjs +2 -90
- package/dist/runtime/handler.d.mts +1 -1
- package/dist/runtime/live.d.mts +1 -1
- package/dist/runtime/validator.d.mts +1 -1
- package/dist/runtime/ws-server.d.mts +1 -1
- package/dist/runtime/ws.d.mts +2 -2
- package/dist/{scan-Dp_Gyzs3.mjs → scan-DEwlM_Xy.mjs} +2 -2
- package/dist/{scan-i7Yz54fv.mjs → scan-DYXkrasO.mjs} +4 -4
- package/dist/{secret-DeMnMcV0.mjs → secret-Dt32J6RI.mjs} +3 -3
- package/dist/{skills-DsdNDtX3.mjs → skills-CLjN0uUO.mjs} +2 -2
- package/dist/{subcommand-prompt-DtES-oP6.mjs → subcommand-prompt-BzV8iQZo.mjs} +1 -1
- package/dist/sveltekit.mjs +1 -1
- package/dist/{validate-DT7nFMlf.mjs → validate-Cw_RLeTj.mjs} +1 -1
- package/dist/{yarn-pnp-CW8LB6g_.mjs → yarn-pnp-DJn3SAHF.mjs} +1 -1
- package/getting-started-prompt.txt +3 -1
- package/package.json +5 -3
- package/skills/void/SKILL.md +34 -33
- package/skills/void/docs/guide/auth.md +8 -0
- package/skills/void/docs/guide/deployment.md +1 -1
- package/skills/void/docs/guide/env-vars.md +14 -6
- package/skills/void/docs/guide/queues.md +4 -0
- package/skills/void/docs/integrations/cloudflare.md +64 -5
- package/skills/void/docs/node_modules/void/AGENT_PROMPT.md +4 -0
- package/skills/void/docs/node_modules/void/README.md +1 -1
- package/skills/void/docs/node_modules/void/node_modules/@types/proper-lockfile/README.md +51 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/pathslash/README.md +64 -0
- package/skills/void/docs/node_modules/void/node_modules/pathslash/README.md +64 -0
- package/skills/void/docs/node_modules/void/node_modules/proper-lockfile/CHANGELOG.md +108 -0
- package/skills/void/docs/node_modules/void/node_modules/proper-lockfile/README.md +183 -0
- package/skills/void/docs/node_modules/void/skills/void/SKILL.md +34 -33
- package/skills/void/docs/node_modules/void/test/e2e/README.md +85 -0
- package/skills/void/docs/reference/cli.md +74 -14
- package/dist/deploy-B02JyKP9.mjs +0 -3748
- package/dist/dotenv-D_UbC_vc.mjs +0 -173
- package/dist/env-validation-CeC2FL66.mjs +0 -163
- package/dist/pathe.M-eThtNZ-CQzLbt4c.mjs +0 -150
- package/dist/preset-CVvwCeIy.mjs +0 -208
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/pathe/README.md +0 -73
- package/skills/void/docs/node_modules/void/node_modules/pathe/README.md +0 -73
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { a as join, n as dirname, s as relative } from "./
|
|
2
|
-
import { D as outro, T as log, a as cliTitle, j as isCancel, k as select, w as intro, x as cancel } from "./agents-
|
|
3
|
-
import { n as readProjectPaths } from "./project-paths-
|
|
4
|
-
import { n as ensureProjectTsconfig } from "./project-tsconfig-
|
|
5
|
-
import { c as getDatabaseDialect, f as readConfig } from "./config-
|
|
6
|
-
import { n as writeDrizzleConfig } from "./config-
|
|
7
|
-
import { c as collectMigrations, n as listDrizzleArtifacts, t as assertJournalCoherence, u as readJournal } from "./validate-
|
|
8
|
-
import { t as buildDrizzleKitSpawnEnv } from "./yarn-pnp-
|
|
1
|
+
import { a as join, n as dirname, s as relative } from "./dist-DaKKDf8D.mjs";
|
|
2
|
+
import { D as outro, T as log, a as cliTitle, j as isCancel, k as select, w as intro, x as cancel } from "./agents-CtgBYqld.mjs";
|
|
3
|
+
import { n as readProjectPaths } from "./project-paths-BQd7OmIo.mjs";
|
|
4
|
+
import { n as ensureProjectTsconfig } from "./project-tsconfig-B-QtXjLQ.mjs";
|
|
5
|
+
import { c as getDatabaseDialect, f as readConfig } from "./config-E03l1C_h.mjs";
|
|
6
|
+
import { n as writeDrizzleConfig } from "./config-CutEMNGJ.mjs";
|
|
7
|
+
import { c as collectMigrations, n as listDrizzleArtifacts, t as assertJournalCoherence, u as readJournal } from "./validate-Cw_RLeTj.mjs";
|
|
8
|
+
import { t as buildDrizzleKitSpawnEnv } from "./yarn-pnp-DJn3SAHF.mjs";
|
|
9
9
|
import { existsSync, mkdirSync, readFileSync, readdirSync, unlinkSync, writeFileSync } from "node:fs";
|
|
10
10
|
import { fileURLToPath } from "node:url";
|
|
11
11
|
import { spawnSync } from "node:child_process";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as text, S as confirm, T as log, j as isCancel, k as select, u as import_picocolors, x as cancel } from "./agents-
|
|
2
|
-
import { b as readProjectConfig, c as createCodeChallenge, f as getToken, h as openBrowser, l as createCodeVerifier, n as PlatformClient, o as parsePlatformErrorBody, s as awaitBrowserCallback, t as PlatformApiError } from "./client-
|
|
3
|
-
import { r as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-
|
|
1
|
+
import { A as text, S as confirm, T as log, j as isCancel, k as select, u as import_picocolors, x as cancel } from "./agents-CtgBYqld.mjs";
|
|
2
|
+
import { b as readProjectConfig, c as createCodeChallenge, f as getToken, h as openBrowser, l as createCodeVerifier, n as PlatformClient, o as parsePlatformErrorBody, s as awaitBrowserCallback, t as PlatformApiError } from "./client-Gb71-XkG.mjs";
|
|
3
|
+
import { r as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-BBMtLLV9.mjs";
|
|
4
4
|
import { t as collectGitDeployMetadata } from "./git-metadata-CBKaL0v5.mjs";
|
|
5
5
|
import { randomBytes } from "node:crypto";
|
|
6
6
|
//#region src/cli/github-cmd.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { t as StandardSchemaV1 } from "./standard-schema-DJ0HW7QP.mjs";
|
|
1
2
|
import { n as HeadDescriptor } from "./head-nmvOgFjd.mjs";
|
|
2
3
|
import { r as AuthUser, t as AuthSession } from "./auth-qgMlYp7Z.mjs";
|
|
3
|
-
import { t as StandardSchemaV1 } from "./standard-schema-DJ0HW7QP.mjs";
|
|
4
4
|
import { Context, Env, MiddlewareHandler } from "hono";
|
|
5
5
|
import { RewriteDestination } from "void/routes";
|
|
6
6
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as join } from "./
|
|
2
|
-
import { a as convertRedirectsConfig, d as parseHostPrefixedSource, i as convertHeadersConfig, o as convertRewritesConfig, r as convertFallbacksConfig, s as countSplats, t as VALID_REDIRECT_STATUSES, u as isProtocolRelative } from "./config-
|
|
1
|
+
import { a as join } from "./dist-DaKKDf8D.mjs";
|
|
2
|
+
import { a as convertRedirectsConfig, d as parseHostPrefixedSource, i as convertHeadersConfig, o as convertRewritesConfig, r as convertFallbacksConfig, s as countSplats, t as VALID_REDIRECT_STATUSES, u as isProtocolRelative } from "./config-E03l1C_h.mjs";
|
|
3
3
|
import { i as voidWarn } from "./log-ChfPKsVd.mjs";
|
|
4
4
|
import { existsSync, readFileSync } from "node:fs";
|
|
5
5
|
//#region src/cli/headers.ts
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as HeadDescriptor } from "./head-nmvOgFjd.mjs";
|
|
2
2
|
import { r as AuthUser } from "./auth-qgMlYp7Z.mjs";
|
|
3
|
-
import { C as defer, E as ValidatorSlots, S as InferProps, T as HandlerInput, _ as defineQueue, a as CloudEnv, b as Deferred, c as QueueRetryOptions, d as TypedQueueHandler, f as VoidAssetRewriteError, g as defineMiddleware, h as defineHead, i as CloudContextVariables, l as RenderAssetTags, m as defineHandler, o as QueueBatch, p as basicAuth, r as CloudContext, s as QueueMessage, t as BasicAuthOptions, u as TypedHandler, v as defineRender, x as DeferredState, y as defineScheduled } from "./handler-
|
|
3
|
+
import { C as defer, E as ValidatorSlots, S as InferProps, T as HandlerInput, _ as defineQueue, a as CloudEnv, b as Deferred, c as QueueRetryOptions, d as TypedQueueHandler, f as VoidAssetRewriteError, g as defineMiddleware, h as defineHead, i as CloudContextVariables, l as RenderAssetTags, m as defineHandler, o as QueueBatch, p as basicAuth, r as CloudContext, s as QueueMessage, t as BasicAuthOptions, u as TypedHandler, v as defineRender, x as DeferredState, y as defineScheduled } from "./handler-Cjh8uM3Y.mjs";
|
|
4
4
|
import { QueueMap } from "./runtime/queues.mjs";
|
|
5
5
|
import { PluginConfig } from "@cloudflare/vite-plugin";
|
|
6
6
|
import { Plugin } from "vite";
|
package/dist/index.mjs
CHANGED
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
import { r as __toESM } from "./rolldown-runtime-DJK8HYOj.mjs";
|
|
2
|
-
import { a as join, n as dirname, s as relative } from "./
|
|
3
|
-
import { M as require_picocolors } from "./agents-
|
|
4
|
-
import { C as
|
|
5
|
-
import { i as resolveProjectPaths, n as readProjectPaths, t as assertNoRootSourceConventionConflicts } from "./project-paths-
|
|
6
|
-
import { a as scanQueuesSync, c as loadVoidAuthConfig, i as scanWebSocketRoutesSync, n as scanRoutePatternsSync, o as scanJobsSync, r as scanRoutes, s as findVoidAuthConfig, t as scanMiddlewareSync } from "./scan-
|
|
7
|
-
import { b as readProjectConfig, f as getToken, m as isStagingMode } from "./client-
|
|
8
|
-
import { n as ensureProjectTsconfig, r as writeFileIfChanged } from "./project-tsconfig-
|
|
9
|
-
import { c as getDatabaseDialect, f as readConfig, l as isNodeTarget, p as resolveBindingNames } from "./config-
|
|
10
|
-
import { a as
|
|
2
|
+
import { a as join, n as dirname, s as relative } from "./dist-DaKKDf8D.mjs";
|
|
3
|
+
import { M as require_picocolors } from "./agents-CtgBYqld.mjs";
|
|
4
|
+
import { A as resolveAssetRoutingPolicy, C as syncWranglerBindings, D as resolveSandboxConfig, E as isSandboxEnabled, O as hasApiRoutes, S as resolveLiveBindingConfig, T as SANDBOX_MIGRATION_TAG, _ as nextDurableObjectMigrationTag, a as prerenderPagesNode, c as filterLoadedEnv, d as LIVE_MIGRATION_TAG, g as hasDurableObjectSqliteMigration, h as ensureWranglerNodejsAlsFlag, i as prerenderPages, k as hasDocumentRoutes, l as resolveRemoteMode, m as ensureWranglerCompatibilityDate, n as resolveDistDir, o as collectRevalidate, p as ensureWranglerCompat, r as resolveWorkerDirName, s as hasRevalidate, u as stripInternalEnvKeys, v as normalizeWranglerCompatibilityFlags, x as readWranglerCompat, y as readExistingLiveBindingConfig } from "./deploy-DT8wsPZd.mjs";
|
|
5
|
+
import { i as resolveProjectPaths, n as readProjectPaths, t as assertNoRootSourceConventionConflicts } from "./project-paths-BQd7OmIo.mjs";
|
|
6
|
+
import { a as scanQueuesSync, c as loadVoidAuthConfig, i as scanWebSocketRoutesSync, n as scanRoutePatternsSync, o as scanJobsSync, r as scanRoutes, s as findVoidAuthConfig, t as scanMiddlewareSync } from "./scan-DYXkrasO.mjs";
|
|
7
|
+
import { b as readProjectConfig, f as getToken, m as isStagingMode } from "./client-Gb71-XkG.mjs";
|
|
8
|
+
import { n as ensureProjectTsconfig, r as writeFileIfChanged } from "./project-tsconfig-B-QtXjLQ.mjs";
|
|
9
|
+
import { c as getDatabaseDialect, f as readConfig, l as isNodeTarget, p as resolveBindingNames } from "./config-E03l1C_h.mjs";
|
|
10
|
+
import { a as inferBindingsFromSource, i as inferProjectBindings, n as FRAMEWORK_SCAN_DIRS, o as walk, r as detectFramework, t as DEFAULT_SCAN_DIRS } from "./plugin-inference-DMeavIJ6.mjs";
|
|
11
|
+
import { a as validateSsrEntries, c as isIdentifier, l as isLiteral, n as SSR_SERVER_ENTRY_RELATIVE_PATHS, o as validateSsrEntry, t as SSR_CLIENT_ENTRY_RELATIVE_PATHS, u as isMemberExpression } from "./entry-D7yy4xVH.mjs";
|
|
11
12
|
import { i as voidWarn, n as voidError, r as voidLog, t as setShowTimestamp } from "./log-ChfPKsVd.mjs";
|
|
12
|
-
import {
|
|
13
|
-
import { i as generateVoidAuthDrizzleSchema, n as generateQueueTypes, o as DRIZZLE_OPERATORS, r as generateVoidAuthDatabaseModule, s as generateDbDts, t as generateRouteTypes } from "./route-types-
|
|
14
|
-
import { t as discoverSchema } from "./discover-
|
|
13
|
+
import { l as parseDotenvFile } from "./preset-BGrvB4Bl.mjs";
|
|
14
|
+
import { i as generateVoidAuthDrizzleSchema, n as generateQueueTypes, o as DRIZZLE_OPERATORS, r as generateVoidAuthDatabaseModule, s as generateDbDts, t as generateRouteTypes } from "./route-types-COI2DsZv.mjs";
|
|
15
|
+
import { t as discoverSchema } from "./discover-CJHyvYfR.mjs";
|
|
15
16
|
import { t as MagicString } from "./magic-string.es-ZQjdJFFn.mjs";
|
|
16
|
-
import { n as findEnvFileForPaths, r as generateEnvTypes, t as findEnvFile } from "./env-types-
|
|
17
|
-
import {
|
|
18
|
-
import { i as resolveLayoutIds } from "./scan-
|
|
17
|
+
import { n as findEnvFileForPaths, r as generateEnvTypes, t as findEnvFile } from "./env-types-QBj-ndax.mjs";
|
|
18
|
+
import { h as loadUserEnvFile } from "./env-validation-BdDlGhbN.mjs";
|
|
19
|
+
import { i as resolveLayoutIds } from "./scan-DEwlM_Xy.mjs";
|
|
19
20
|
import { n as STAGING_PROXY_URL, t as DEFAULT_PROXY_URL } from "./proxy-D-3_D-Gl.mjs";
|
|
20
|
-
import { n as lintDuplicateSources, r as mergeRoutingRules, t as lintDestinationSplats } from "./headers-
|
|
21
|
+
import { n as lintDuplicateSources, r as mergeRoutingRules, t as lintDestinationSplats } from "./headers-BQknpzkn.mjs";
|
|
21
22
|
import { n as INTERNAL_BINDING_PREFIXES, t as INTERNAL_BINDING_EXACT_NAMES } from "./env-raw-Cx8ElDdj.mjs";
|
|
22
23
|
import { n as defer } from "./defer-YsYDUoii.mjs";
|
|
23
24
|
import { VoidAssetRewriteError, basicAuth, defineHandler, defineHead, defineMiddleware, defineQueue, defineRender, defineScheduled } from "./runtime/handler.mjs";
|
|
@@ -654,7 +655,7 @@ export function createDb(d1) {
|
|
|
654
655
|
const migrationsDir = paths.migrationsDir;
|
|
655
656
|
if (!(existsSync(migrationsDir) && readdirSync(migrationsDir).some((f) => f.endsWith(".sql")))) {
|
|
656
657
|
if (dialect === "sqlite") {
|
|
657
|
-
const { getApplicationTables, getMiniflareDatabasePath } = await import("./runner-
|
|
658
|
+
const { getApplicationTables, getMiniflareDatabasePath } = await import("./runner-kapo9aPs.mjs");
|
|
658
659
|
if ((await getApplicationTables(getMiniflareDatabasePath(options.localD1PersistRoot ?? join(root, ".void"), options.localD1DatabaseId ?? "local")).catch(() => [])).length > 0) return;
|
|
659
660
|
}
|
|
660
661
|
voidWarn(`Schema found but no migrations in ${paths.sourceRelative("db/migrations")}/.\n \`void db push\` syncs the schema to your local DB without creating migration files.
|
|
@@ -1654,9 +1655,9 @@ function migrationPlugin(root, dialect, databaseId = "local", persistRoot = join
|
|
|
1654
1655
|
else warn();
|
|
1655
1656
|
return;
|
|
1656
1657
|
}
|
|
1657
|
-
const { runPgMigrations, getPgAppliedMigrations } = await import("./runner-pg-
|
|
1658
|
-
const { collectMigrations } = await import("./validate-
|
|
1659
|
-
const { validateMigrations } = await import("./validate-
|
|
1658
|
+
const { runPgMigrations, getPgAppliedMigrations } = await import("./runner-pg-CHM76xuC.mjs");
|
|
1659
|
+
const { collectMigrations } = await import("./validate-Cw_RLeTj.mjs").then((n) => n.l);
|
|
1660
|
+
const { validateMigrations } = await import("./validate-Cw_RLeTj.mjs").then((n) => n.i);
|
|
1660
1661
|
const allMigrations = collectMigrations(migrationsDir);
|
|
1661
1662
|
const pgApplied = await getPgAppliedMigrations(url);
|
|
1662
1663
|
const pgAppliedSet = new Set(pgApplied);
|
|
@@ -1669,9 +1670,9 @@ function migrationPlugin(root, dialect, databaseId = "local", persistRoot = join
|
|
|
1669
1670
|
const applied = await runPgMigrations(migrationsDir, url);
|
|
1670
1671
|
if (applied.length > 0) voidLog(`Applied ${applied.length} migration(s): ${applied.join(", ")}`);
|
|
1671
1672
|
} else if (hasSqlMigrations) {
|
|
1672
|
-
const { runMigrations, getMiniflareDatabasePath, getAppliedMigrations } = await import("./runner-
|
|
1673
|
-
const { collectMigrations } = await import("./validate-
|
|
1674
|
-
const { validateMigrations } = await import("./validate-
|
|
1673
|
+
const { runMigrations, getMiniflareDatabasePath, getAppliedMigrations } = await import("./runner-kapo9aPs.mjs");
|
|
1674
|
+
const { collectMigrations } = await import("./validate-Cw_RLeTj.mjs").then((n) => n.l);
|
|
1675
|
+
const { validateMigrations } = await import("./validate-Cw_RLeTj.mjs").then((n) => n.i);
|
|
1675
1676
|
const dbPath = getMiniflareDatabasePath(persistRoot, databaseId);
|
|
1676
1677
|
const allMigrations = collectMigrations(migrationsDir);
|
|
1677
1678
|
const appliedRows = await getAppliedMigrations(dbPath);
|
|
@@ -1686,7 +1687,7 @@ function migrationPlugin(root, dialect, databaseId = "local", persistRoot = join
|
|
|
1686
1687
|
if (applied.length > 0) voidLog(`Applied ${applied.length} migration(s): ${applied.join(", ")}`);
|
|
1687
1688
|
}
|
|
1688
1689
|
if (auth?.enabled) {
|
|
1689
|
-
const { runLocalVoidAuthMigrations } = await import("./node-
|
|
1690
|
+
const { runLocalVoidAuthMigrations } = await import("./node-BDx8pmhq.mjs");
|
|
1690
1691
|
await runLocalVoidAuthMigrations(root, dialect, persistRoot, databaseId, auth.configPath);
|
|
1691
1692
|
voidLog("Applied Better Auth migrations");
|
|
1692
1693
|
}
|
|
@@ -4497,8 +4498,8 @@ function routingPlugin(root, options) {
|
|
|
4497
4498
|
if (!options.target) {
|
|
4498
4499
|
const migrationsDir = paths.migrationsDir;
|
|
4499
4500
|
if (existsSync(migrationsDir) || compileOptions.auth) {
|
|
4500
|
-
const { collectMigrations } = await import("./validate-
|
|
4501
|
-
const { buildMigrationPlanBundle } = await import("./validate-
|
|
4501
|
+
const { collectMigrations } = await import("./validate-Cw_RLeTj.mjs").then((n) => n.l);
|
|
4502
|
+
const { buildMigrationPlanBundle } = await import("./validate-Cw_RLeTj.mjs").then((n) => n.s);
|
|
4502
4503
|
const migrations = existsSync(migrationsDir) ? collectMigrations(migrationsDir) : [];
|
|
4503
4504
|
const dialect = getDatabaseDialect(readConfig(root));
|
|
4504
4505
|
compileOptions.migrationHandlerPath = resolveFile(dialect === "postgresql" ? "#self/runtime/migration-handler-pg" : "#self/runtime/migration-handler");
|
|
@@ -4948,10 +4949,10 @@ const STAGING_API_URL = "https://api.staging.void.cloud";
|
|
|
4948
4949
|
* block the server. On completion, writes project.json and restarts the server.
|
|
4949
4950
|
*/
|
|
4950
4951
|
async function runAiSetupPrompt(root, token, staging, server) {
|
|
4951
|
-
const { select, text, isCancel, log } = await import("./agents-
|
|
4952
|
-
const { PlatformClient } = await import("./client-
|
|
4953
|
-
const { writeProjectConfig } = await import("./client-
|
|
4954
|
-
const { inferDefaultSlug } = await import("./resolve-project-
|
|
4952
|
+
const { select, text, isCancel, log } = await import("./agents-CtgBYqld.mjs").then((n) => n.C);
|
|
4953
|
+
const { PlatformClient } = await import("./client-Gb71-XkG.mjs").then((n) => n.r);
|
|
4954
|
+
const { writeProjectConfig } = await import("./client-Gb71-XkG.mjs").then((n) => n.y);
|
|
4955
|
+
const { inferDefaultSlug } = await import("./resolve-project-BBMtLLV9.mjs").then((n) => n.i);
|
|
4955
4956
|
const client = new PlatformClient(token, staging ? STAGING_API_URL : DEFAULT_API_URL);
|
|
4956
4957
|
let projects;
|
|
4957
4958
|
try {
|
|
@@ -4977,8 +4978,8 @@ async function runAiSetupPrompt(root, token, staging, server) {
|
|
|
4977
4978
|
let projectId;
|
|
4978
4979
|
let slug;
|
|
4979
4980
|
if (result === "__create__") {
|
|
4980
|
-
const { validateProjectSlug } = await import("./create-project-
|
|
4981
|
-
const { createProjectWithSlugRetry } = await import("./create-project-
|
|
4981
|
+
const { validateProjectSlug } = await import("./create-project-DsYvl3TB.mjs").then((n) => n.a);
|
|
4982
|
+
const { createProjectWithSlugRetry } = await import("./create-project-DsYvl3TB.mjs").then((n) => n.t);
|
|
4982
4983
|
let created;
|
|
4983
4984
|
try {
|
|
4984
4985
|
created = await createProjectWithSlugRetry(client, inferDefaultSlug(root), async (defaultSlug) => {
|
|
@@ -5327,12 +5328,19 @@ function voidPlugin(options) {
|
|
|
5327
5328
|
for (const [key, value] of Object.entries(defaults)) if (vars[key] === void 0) vars[key] = value;
|
|
5328
5329
|
workerConfig.vars = vars;
|
|
5329
5330
|
}
|
|
5331
|
+
let voidDeployBuildConfig;
|
|
5330
5332
|
const envPlugin = {
|
|
5331
5333
|
name: "void:env",
|
|
5334
|
+
api: { getVoidDeployBuildConfig: () => voidDeployBuildConfig },
|
|
5332
5335
|
config(userConfig, { mode, command }) {
|
|
5333
5336
|
viteCommand = command;
|
|
5334
5337
|
const ignored = ["**/.void/**"];
|
|
5335
|
-
const
|
|
5338
|
+
const rawEnvDir = typeof userConfig.envDir === "string" && userConfig.envDir.length > 0 ? userConfig.envDir : void 0;
|
|
5339
|
+
voidDeployBuildConfig = {
|
|
5340
|
+
mode,
|
|
5341
|
+
envDir: rawEnvDir
|
|
5342
|
+
};
|
|
5343
|
+
const { sanitized: env, stripped } = stripInternalEnvKeys(filterLoadedEnv(loadEnv(mode, rawEnvDir ? join(root, rawEnvDir) : root, "")));
|
|
5336
5344
|
if (stripped.length > 0) voidWarn(`Ignoring internal env keys from .env files: ${stripped.join(", ")}. These are reserved for Void runtime use.`);
|
|
5337
5345
|
workerConfig.vars = {
|
|
5338
5346
|
...workerConfig.vars,
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import { a as join, c as resolve, i as isAbsolute, n as dirname, s as relative, t as basename } from "./
|
|
2
|
-
import { A as text, D as outro, E as note, S as confirm, T as log, a as cliTitle, j as isCancel, k as select, n as getAgentById, r as getPackageDir, t as detectAgents, w as intro, x as cancel } from "./agents-
|
|
3
|
-
import { n as readProjectPaths } from "./project-paths-
|
|
4
|
-
import { S as writeProjectConfig, b as readProjectConfig, f as getToken, m as isStagingMode, n as PlatformClient } from "./client-
|
|
5
|
-
import { n as ensureProjectTsconfig, t as createProjectTsconfig } from "./project-tsconfig-
|
|
6
|
-
import { c as getDatabaseDialect, f as readConfig } from "./config-
|
|
7
|
-
import { r as detectFramework } from "./plugin-inference-
|
|
8
|
-
import {
|
|
1
|
+
import { a as join, c as resolve, i as isAbsolute, n as dirname, s as relative, t as basename } from "./dist-DaKKDf8D.mjs";
|
|
2
|
+
import { A as text, D as outro, E as note, S as confirm, T as log, a as cliTitle, j as isCancel, k as select, n as getAgentById, r as getPackageDir, t as detectAgents, w as intro, x as cancel } from "./agents-CtgBYqld.mjs";
|
|
3
|
+
import { n as readProjectPaths } from "./project-paths-BQd7OmIo.mjs";
|
|
4
|
+
import { S as writeProjectConfig, b as readProjectConfig, f as getToken, m as isStagingMode, n as PlatformClient } from "./client-Gb71-XkG.mjs";
|
|
5
|
+
import { n as ensureProjectTsconfig, t as createProjectTsconfig } from "./project-tsconfig-B-QtXjLQ.mjs";
|
|
6
|
+
import { c as getDatabaseDialect, f as readConfig } from "./config-E03l1C_h.mjs";
|
|
7
|
+
import { r as detectFramework } from "./plugin-inference-DMeavIJ6.mjs";
|
|
8
|
+
import { l as parseDotenvFile, r as formatProjectCommand, s as expandDotenv } from "./preset-BGrvB4Bl.mjs";
|
|
9
9
|
import { t as MagicString } from "./magic-string.es-ZQjdJFFn.mjs";
|
|
10
|
-
import { n as writeDrizzleConfig } from "./config-
|
|
11
|
-
import { n as promptAndCreateProject, r as promptProjectSelection } from "./create-project-
|
|
12
|
-
import { t as promptForLoginToken } from "./login-
|
|
13
|
-
import { r as
|
|
14
|
-
import { n as findInstalledYarnPnpRuntime, r as hasLocalLockfile, t as buildDrizzleKitSpawnEnv } from "./yarn-pnp-CW8LB6g_.mjs";
|
|
10
|
+
import { n as writeDrizzleConfig } from "./config-CutEMNGJ.mjs";
|
|
11
|
+
import { n as promptAndCreateProject, r as promptProjectSelection } from "./create-project-DsYvl3TB.mjs";
|
|
12
|
+
import { t as promptForLoginToken } from "./login-BT3H8PN3.mjs";
|
|
13
|
+
import { n as findInstalledYarnPnpRuntime, r as hasLocalLockfile, t as buildDrizzleKitSpawnEnv } from "./yarn-pnp-DJn3SAHF.mjs";
|
|
15
14
|
import { createRequire } from "node:module";
|
|
16
15
|
import { existsSync, mkdirSync, readFileSync, readdirSync, rmdirSync, unlinkSync, writeFileSync } from "node:fs";
|
|
17
16
|
import { fileURLToPath } from "node:url";
|
|
@@ -2796,7 +2795,7 @@ async function runInitCommand(root, initArgs) {
|
|
|
2796
2795
|
const agentSetup = await resolveAgentSetup(root);
|
|
2797
2796
|
injectAgentBlock(root, agentSetup.instructionFilePath);
|
|
2798
2797
|
if (agentSetup.agents.length > 0) {
|
|
2799
|
-
const { linkSkillsForSpecificAgents } = await import("./skills-
|
|
2798
|
+
const { linkSkillsForSpecificAgents } = await import("./skills-CLjN0uUO.mjs");
|
|
2800
2799
|
linkSkillsForSpecificAgents(root, agentSetup.agents);
|
|
2801
2800
|
} else log.info("Skills linking skipped for generic agent setup");
|
|
2802
2801
|
setupMcpConfig(root, agentSetup.agents);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { D as outro, T as log, a as cliTitle, u as import_picocolors, w as intro, x as cancel } from "./agents-
|
|
2
|
-
import { S as writeProjectConfig, b as readProjectConfig, d as getSiteDomain, f as getToken, n as PlatformClient } from "./client-
|
|
3
|
-
import { n as promptAndCreateProject, r as promptProjectSelection } from "./create-project-
|
|
4
|
-
import { r as resolveProjectBySlug } from "./resolve-project-
|
|
1
|
+
import { D as outro, T as log, a as cliTitle, u as import_picocolors, w as intro, x as cancel } from "./agents-CtgBYqld.mjs";
|
|
2
|
+
import { S as writeProjectConfig, b as readProjectConfig, d as getSiteDomain, f as getToken, n as PlatformClient } from "./client-Gb71-XkG.mjs";
|
|
3
|
+
import { n as promptAndCreateProject, r as promptProjectSelection } from "./create-project-DsYvl3TB.mjs";
|
|
4
|
+
import { r as resolveProjectBySlug } from "./resolve-project-BBMtLLV9.mjs";
|
|
5
5
|
//#region src/cli/link.ts
|
|
6
6
|
async function runLink(root, slug) {
|
|
7
7
|
console.log();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { D as outro, T as log, a as cliTitle, c as ensureUtc, f as tablePrefix, s as dim, u as import_picocolors, w as intro } from "./agents-
|
|
2
|
-
import { b as readProjectConfig, f as getToken, n as PlatformClient } from "./client-
|
|
3
|
-
import { r as resolveProjectBySlug } from "./resolve-project-
|
|
1
|
+
import { D as outro, T as log, a as cliTitle, c as ensureUtc, f as tablePrefix, s as dim, u as import_picocolors, w as intro } from "./agents-CtgBYqld.mjs";
|
|
2
|
+
import { b as readProjectConfig, f as getToken, n as PlatformClient } from "./client-Gb71-XkG.mjs";
|
|
3
|
+
import { r as resolveProjectBySlug } from "./resolve-project-BBMtLLV9.mjs";
|
|
4
4
|
//#region src/cli/list.ts
|
|
5
5
|
async function runListCommand(root, slug) {
|
|
6
6
|
console.log();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { D as outro, T as log, a as cliTitle, j as isCancel, k as select, o as createSpinner, u as import_picocolors, w as intro, x as cancel } from "./agents-
|
|
2
|
-
import { _ as runLogin, a as isExpiredTokenError, f as getToken, g as removeToken, m as isStagingMode, n as PlatformClient, p as getTokenSource, v as saveToken } from "./client-
|
|
1
|
+
import { D as outro, T as log, a as cliTitle, j as isCancel, k as select, o as createSpinner, u as import_picocolors, w as intro, x as cancel } from "./agents-CtgBYqld.mjs";
|
|
2
|
+
import { _ as runLogin, a as isExpiredTokenError, f as getToken, g as removeToken, m as isStagingMode, n as PlatformClient, p as getTokenSource, v as saveToken } from "./client-Gb71-XkG.mjs";
|
|
3
3
|
//#region src/cli/login.ts
|
|
4
4
|
async function promptForLoginToken(root = process.cwd()) {
|
|
5
5
|
const provider = await select({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { D as outro, T as log, a as cliTitle, s as dim, u as import_picocolors, w as intro } from "./agents-
|
|
2
|
-
import { b as readProjectConfig, f as getToken, n as PlatformClient } from "./client-
|
|
1
|
+
import { D as outro, T as log, a as cliTitle, s as dim, u as import_picocolors, w as intro } from "./agents-CtgBYqld.mjs";
|
|
2
|
+
import { b as readProjectConfig, f as getToken, n as PlatformClient } from "./client-Gb71-XkG.mjs";
|
|
3
3
|
//#region src/cli/logs.ts
|
|
4
4
|
async function runLogsCommand(root, filter, range, deployment, level) {
|
|
5
5
|
console.log();
|
|
@@ -73,6 +73,7 @@ function filterLogEntries(entries, level, filter) {
|
|
|
73
73
|
if (level === "error") {
|
|
74
74
|
if (entry.outcome !== "ok") return true;
|
|
75
75
|
if (entry.exceptions.length > 0) return true;
|
|
76
|
+
if (parseInt(entry.status, 10) >= 500) return true;
|
|
76
77
|
for (const l of entry.logs) if (l.level === "error") return true;
|
|
77
78
|
return false;
|
|
78
79
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as join, n as dirname } from "./
|
|
2
|
-
import { S as writeProjectConfig, f as getToken, n as PlatformClient } from "./client-
|
|
1
|
+
import { a as join, n as dirname } from "./dist-DaKKDf8D.mjs";
|
|
2
|
+
import { S as writeProjectConfig, f as getToken, n as PlatformClient } from "./client-Gb71-XkG.mjs";
|
|
3
3
|
import { existsSync, readFileSync, readdirSync } from "node:fs";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
5
|
import { createInterface } from "node:readline";
|
|
@@ -179,6 +179,11 @@ Available methods on the "void_" object:
|
|
|
179
179
|
void_.getLogs(projectId, since, limit?, deploymentId?) → { timestamp, outcome, logs, exceptions, url, method, status }[]
|
|
180
180
|
since: duration string (e.g. "1h"), limit: number (default 200)
|
|
181
181
|
|
|
182
|
+
Requests:
|
|
183
|
+
void_.getRequests(projectId, since, limit?, status?) → { timestamp, type, method, status, bytes, durationMs }[]
|
|
184
|
+
since: duration string (e.g. "1h"), limit: number (default 200), status: class like "5xx" or exact code like "500"
|
|
185
|
+
Edge request metering — includes edge-generated 5xx and static/SPA requests that never invoke a worker.
|
|
186
|
+
|
|
182
187
|
Secrets:
|
|
183
188
|
void_.listSecrets(projectId) → { name }[]
|
|
184
189
|
void_.setSecret(projectId, name, value) → { ok, name }
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { a as join } from "./
|
|
2
|
-
import { c as loadVoidAuthConfig, s as findVoidAuthConfig } from "./scan-
|
|
3
|
-
import { f as readConfig } from "./config-
|
|
4
|
-
import { a as resolveVoidAuthMigrationSchema } from "./route-types-
|
|
1
|
+
import { a as join } from "./dist-DaKKDf8D.mjs";
|
|
2
|
+
import { c as loadVoidAuthConfig, s as findVoidAuthConfig } from "./scan-DYXkrasO.mjs";
|
|
3
|
+
import { f as readConfig } from "./config-E03l1C_h.mjs";
|
|
4
|
+
import { a as resolveVoidAuthMigrationSchema } from "./route-types-COI2DsZv.mjs";
|
|
5
5
|
import { n as applySqliteAuthMigrations, t as applyPgAuthMigrations } from "./auth-migrations-BTZ-ATvQ.mjs";
|
|
6
|
-
import { getMiniflareDatabasePath } from "./runner-
|
|
6
|
+
import { getMiniflareDatabasePath } from "./runner-kapo9aPs.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,4 +1,4 @@
|
|
|
1
|
-
import { a as join, n as dirname } from "./
|
|
1
|
+
import { a as join, n as dirname } from "./dist-DaKKDf8D.mjs";
|
|
2
2
|
import { existsSync, readFileSync } from "node:fs";
|
|
3
3
|
//#region src/shared/package-json.ts
|
|
4
4
|
const DEFAULT_DEPENDENCY_FIELDS = ["dependencies", "devDependencies"];
|
package/dist/pages/client.d.mts
CHANGED
package/dist/pages/index.d.mts
CHANGED
|
@@ -1,30 +1,8 @@
|
|
|
1
1
|
import { a as renderHtmlAttrs, i as renderHeadToString, n as HeadDescriptor, o as resolveHead, r as renderBodyAttrs, t as HeadConfig } from "../head-nmvOgFjd.mjs";
|
|
2
|
+
import { n as resolvePagesDir, t as ProjectPaths } from "../project-paths-GpziKeQQ.mjs";
|
|
2
3
|
import { i as PageDefinition, n as LayoutDefinition, o as PageScanResult, r as NamedLayoutDefinition } from "../types-lLjNE9Qp.mjs";
|
|
3
4
|
import { serializePageData } from "./serialize.mjs";
|
|
4
|
-
import { RewriteDestination } from "void/routes";
|
|
5
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
|
|
28
6
|
//#region src/pages/layout-resolution.d.ts
|
|
29
7
|
/** Resolve the layout chain for a component (innermost last) */
|
|
30
8
|
declare function resolveLayoutChain(componentId: string, layouts: Array<LayoutDefinition>, componentPath?: string): Array<LayoutDefinition>;
|
package/dist/pages/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as join } from "../
|
|
2
|
-
import { r as resolvePagesDir } from "../project-paths-
|
|
3
|
-
import { f as readConfig } from "../config-
|
|
4
|
-
import { a as resolveNamedLayout, i as resolveLayoutIds, n as resolveEffectiveLayoutChain, r as resolveLayoutChain, t as scanPages } from "../scan-
|
|
5
|
-
import { i as parseRedirectsFile } from "../headers-
|
|
1
|
+
import { a as join } from "../dist-DaKKDf8D.mjs";
|
|
2
|
+
import { r as resolvePagesDir } from "../project-paths-BQd7OmIo.mjs";
|
|
3
|
+
import { f as readConfig } from "../config-E03l1C_h.mjs";
|
|
4
|
+
import { a as resolveNamedLayout, i as resolveLayoutIds, n as resolveEffectiveLayoutChain, r as resolveLayoutChain, t as scanPages } from "../scan-DEwlM_Xy.mjs";
|
|
5
|
+
import { i as parseRedirectsFile } from "../headers-BQknpzkn.mjs";
|
|
6
6
|
import { renderBodyAttrs, renderHeadToString, renderHtmlAttrs, resolveHead } from "./head.mjs";
|
|
7
7
|
import { serializePageData } from "./serialize.mjs";
|
|
8
8
|
//#region src/pages/manifest.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as resolve, n as dirname } from "../
|
|
2
|
-
import { n as resolveEffectiveLayoutChain, t as scanPages } from "../scan-
|
|
1
|
+
import { c as resolve, n as dirname } from "../dist-DaKKDf8D.mjs";
|
|
2
|
+
import { n as resolveEffectiveLayoutChain, t as scanPages } from "../scan-DEwlM_Xy.mjs";
|
|
3
3
|
import { existsSync, readFileSync, readdirSync } from "node:fs";
|
|
4
4
|
import { normalizePath } from "vite";
|
|
5
5
|
//#region src/pages/islands-plugin.ts
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { w 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 { w as ValidationError } from "../handler-Cjh8uM3Y.mjs";
|
|
2
|
+
import { a as handlePageMutation, i as handlePageGet, n as PageRenderResult, o as safeJsonStringify, r as flattenValidationErrors, t as PageObject } from "../protocol-Bnb0LFp3.mjs";
|
|
3
3
|
export { PageObject, PageRenderResult, ValidationError, flattenValidationErrors, handlePageGet, handlePageMutation, safeJsonStringify };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { a as join
|
|
2
|
-
import { n as readProjectPaths } from "./project-paths-
|
|
1
|
+
import { a as join } from "./dist-DaKKDf8D.mjs";
|
|
2
|
+
import { n as readProjectPaths } from "./project-paths-BQd7OmIo.mjs";
|
|
3
3
|
import { n as globSync } from "./dist-BuiRJkTd.mjs";
|
|
4
|
+
import { c as isIdentifier, r as getSsrServerEntryPath, u as isMemberExpression } from "./entry-D7yy4xVH.mjs";
|
|
4
5
|
import { existsSync, readFileSync } from "node:fs";
|
|
5
6
|
import { parseSync } from "vite";
|
|
6
7
|
import { parse } from "es-module-lexer/js";
|
|
@@ -187,23 +188,6 @@ function walk(ast, { enter, leave }) {
|
|
|
187
188
|
return new SyncWalker(enter, leave).visit(ast, null);
|
|
188
189
|
}
|
|
189
190
|
//#endregion
|
|
190
|
-
//#region src/shared/ast.ts
|
|
191
|
-
function isIdentifier(node) {
|
|
192
|
-
return node?.type === "Identifier" && typeof node.name === "string";
|
|
193
|
-
}
|
|
194
|
-
function isLiteral(node) {
|
|
195
|
-
return node?.type === "Literal";
|
|
196
|
-
}
|
|
197
|
-
function isMemberExpression(node) {
|
|
198
|
-
return node?.type === "MemberExpression";
|
|
199
|
-
}
|
|
200
|
-
function isCallExpression(node) {
|
|
201
|
-
return node?.type === "CallExpression";
|
|
202
|
-
}
|
|
203
|
-
function isObjectExpression(node) {
|
|
204
|
-
return node?.type === "ObjectExpression";
|
|
205
|
-
}
|
|
206
|
-
//#endregion
|
|
207
191
|
//#region src/inference/walk.ts
|
|
208
192
|
const ENV_BINDING_RE = /\benv\s*\.\s*(DB|KV|STORAGE|QUEUE_\w+|AI|SANDBOX)\b/;
|
|
209
193
|
/**
|
|
@@ -354,84 +338,6 @@ function mergeBindings(bindings) {
|
|
|
354
338
|
};
|
|
355
339
|
}
|
|
356
340
|
//#endregion
|
|
357
|
-
//#region src/ssr/entry.ts
|
|
358
|
-
const SSR_SERVER_ENTRY_RELATIVE_PATHS = ["src/main.ssr.ts", "src/main.ssr.tsx"];
|
|
359
|
-
const SSR_CLIENT_ENTRY_RELATIVE_PATHS = ["src/main.client.ts", "src/main.client.tsx"];
|
|
360
|
-
function resolveSingleEntry(root, entries, label, paths = readProjectPaths(root)) {
|
|
361
|
-
const matches = entries.map((entryName) => ({
|
|
362
|
-
relativePath: relative(root, join(paths.ssrDir, entryName)),
|
|
363
|
-
absolutePath: join(paths.ssrDir, entryName)
|
|
364
|
-
})).filter((entry) => existsSync(entry.absolutePath));
|
|
365
|
-
if (matches.length === 0) return null;
|
|
366
|
-
if (matches.length > 1) {
|
|
367
|
-
const names = matches.map((entry) => entry.relativePath).join(", ");
|
|
368
|
-
throw new Error(`ssr: Multiple ${label} entry files found: ${names}. Keep only one.`);
|
|
369
|
-
}
|
|
370
|
-
return matches[0];
|
|
371
|
-
}
|
|
372
|
-
const SSR_SERVER_ENTRY_NAMES = ["main.ssr.ts", "main.ssr.tsx"];
|
|
373
|
-
const SSR_CLIENT_ENTRY_NAMES = ["main.client.ts", "main.client.tsx"];
|
|
374
|
-
function getSsrServerEntryPath(root, paths = readProjectPaths(root)) {
|
|
375
|
-
return resolveSingleEntry(root, SSR_SERVER_ENTRY_NAMES, "SSR", paths)?.absolutePath ?? null;
|
|
376
|
-
}
|
|
377
|
-
function hasSsrEntry(root, paths = readProjectPaths(root)) {
|
|
378
|
-
return getSsrServerEntryPath(root, paths) !== null;
|
|
379
|
-
}
|
|
380
|
-
function validateServerRenderExport(entry) {
|
|
381
|
-
const { absolutePath, relativePath } = entry;
|
|
382
|
-
const source = readFileSync(absolutePath, "utf-8");
|
|
383
|
-
if (/\bexport\s+(?:async\s+)?function\s+render\b/.test(source) || /\bexport\s+const\s+render\b/.test(source) || /\bexport\s+default\s+(?:defineRender\b|(?:async\s+)?function\b)/.test(source)) return;
|
|
384
|
-
let parsed;
|
|
385
|
-
try {
|
|
386
|
-
parsed = parseSync(relativePath, source);
|
|
387
|
-
} catch (err) {
|
|
388
|
-
throw new Error(`ssr: Invalid entry '${relativePath}'. Could not parse source: '${err instanceof Error ? err.message : String(err)}'.`);
|
|
389
|
-
}
|
|
390
|
-
if (!(parsed.program.body ?? []).some((node) => {
|
|
391
|
-
if (node.type === "ExportDefaultDeclaration") {
|
|
392
|
-
const declaration = node.declaration;
|
|
393
|
-
if (declaration?.type === "FunctionDeclaration" || declaration?.type === "FunctionExpression" || declaration?.type === "ArrowFunctionExpression") return true;
|
|
394
|
-
if (declaration?.type === "CallExpression") {
|
|
395
|
-
const call = declaration;
|
|
396
|
-
return isIdentifier(call.callee) && call.callee.name === "defineRender";
|
|
397
|
-
}
|
|
398
|
-
return false;
|
|
399
|
-
}
|
|
400
|
-
if (node.type !== "ExportNamedDeclaration") return false;
|
|
401
|
-
if (node.exportKind === "type") return false;
|
|
402
|
-
const declaration = node.declaration;
|
|
403
|
-
if (declaration?.type === "FunctionDeclaration") {
|
|
404
|
-
const fn = declaration;
|
|
405
|
-
return isIdentifier(fn.id) && fn.id.name === "render";
|
|
406
|
-
}
|
|
407
|
-
if (declaration?.type === "VariableDeclaration") return (declaration.declarations ?? []).some((decl) => isIdentifier(decl.id) && decl.id.name === "render");
|
|
408
|
-
return (node.specifiers ?? []).some((specifier) => {
|
|
409
|
-
if (specifier.exportKind === "type") return false;
|
|
410
|
-
const exported = specifier.exported;
|
|
411
|
-
return isIdentifier(exported) && exported.name === "render";
|
|
412
|
-
});
|
|
413
|
-
})) throw new Error(`ssr: Invalid entry '${relativePath}'. Export \`render(c, assetTags)\` or \`export default defineRender(...)\`.`);
|
|
414
|
-
}
|
|
415
|
-
/**
|
|
416
|
-
* Validate SSR mode entry conventions.
|
|
417
|
-
* Returns null when SSR mode is not used.
|
|
418
|
-
*/
|
|
419
|
-
function validateSsrEntries(root, paths = readProjectPaths(root)) {
|
|
420
|
-
const server = resolveSingleEntry(root, SSR_SERVER_ENTRY_NAMES, "SSR", paths);
|
|
421
|
-
const client = resolveSingleEntry(root, SSR_CLIENT_ENTRY_NAMES, "SSR client", paths);
|
|
422
|
-
if (!server && !client) return null;
|
|
423
|
-
if (server && !client) throw new Error(`ssr: Missing client entry. Add one of: ${SSR_CLIENT_ENTRY_RELATIVE_PATHS.join(", ")}.`);
|
|
424
|
-
if (!server && client) throw new Error(`ssr: Missing server entry. Add one of: ${SSR_SERVER_ENTRY_RELATIVE_PATHS.join(", ")}.`);
|
|
425
|
-
validateServerRenderExport(server);
|
|
426
|
-
return {
|
|
427
|
-
server,
|
|
428
|
-
client
|
|
429
|
-
};
|
|
430
|
-
}
|
|
431
|
-
function validateSsrEntry(root, paths = readProjectPaths(root)) {
|
|
432
|
-
return validateSsrEntries(root, paths)?.server.absolutePath ?? null;
|
|
433
|
-
}
|
|
434
|
-
//#endregion
|
|
435
341
|
//#region src/plugin-inference.ts
|
|
436
342
|
const SOURCE_GLOB = "**/*.{ts,tsx,mts,js,jsx,mjs,astro}";
|
|
437
343
|
/** Directories to scan for binding inference in framework mode. */
|
|
@@ -586,4 +492,4 @@ function inferProjectBindings(root, options, scanDirs) {
|
|
|
586
492
|
return mergeBindings(allBindings);
|
|
587
493
|
}
|
|
588
494
|
//#endregion
|
|
589
|
-
export {
|
|
495
|
+
export { inferBindingsFromSource as a, inferProjectBindings as i, FRAMEWORK_SCAN_DIRS as n, walk as o, detectFramework as r, DEFAULT_SCAN_DIRS as t };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { a as join } from "./
|
|
2
|
-
import { D as outro, E as note, T as log, a as cliTitle, w as intro } from "./agents-
|
|
3
|
-
import { i as resolveProjectPaths } from "./project-paths-
|
|
4
|
-
import { c as loadVoidAuthConfig, r as scanRoutes, s as findVoidAuthConfig } from "./scan-
|
|
5
|
-
import { n as ensureProjectTsconfig, r as writeFileIfChanged } from "./project-tsconfig-
|
|
6
|
-
import { c as getDatabaseDialect, f as readConfig } from "./config-
|
|
7
|
-
import { i as inferProjectBindings, n as FRAMEWORK_SCAN_DIRS, r as detectFramework } from "./plugin-inference-
|
|
8
|
-
import { i as generateVoidAuthDrizzleSchema, n as generateQueueTypes, r as generateVoidAuthDatabaseModule, s as generateDbDts, t as generateRouteTypes } from "./route-types-
|
|
9
|
-
import { t as discoverSchema } from "./discover-
|
|
10
|
-
import { r as generateEnvTypes, t as findEnvFile } from "./env-types-
|
|
1
|
+
import { a as join } from "./dist-DaKKDf8D.mjs";
|
|
2
|
+
import { D as outro, E as note, T as log, a as cliTitle, w as intro } from "./agents-CtgBYqld.mjs";
|
|
3
|
+
import { i as resolveProjectPaths } from "./project-paths-BQd7OmIo.mjs";
|
|
4
|
+
import { c as loadVoidAuthConfig, r as scanRoutes, s as findVoidAuthConfig } from "./scan-DYXkrasO.mjs";
|
|
5
|
+
import { n as ensureProjectTsconfig, r as writeFileIfChanged } from "./project-tsconfig-B-QtXjLQ.mjs";
|
|
6
|
+
import { c as getDatabaseDialect, f as readConfig } from "./config-E03l1C_h.mjs";
|
|
7
|
+
import { i as inferProjectBindings, n as FRAMEWORK_SCAN_DIRS, r as detectFramework } from "./plugin-inference-DMeavIJ6.mjs";
|
|
8
|
+
import { i as generateVoidAuthDrizzleSchema, n as generateQueueTypes, r as generateVoidAuthDatabaseModule, s as generateDbDts, t as generateRouteTypes } from "./route-types-COI2DsZv.mjs";
|
|
9
|
+
import { t as discoverSchema } from "./discover-CJHyvYfR.mjs";
|
|
10
|
+
import { r as generateEnvTypes, t as findEnvFile } from "./env-types-QBj-ndax.mjs";
|
|
11
11
|
import { existsSync, mkdirSync, rmSync } from "node:fs";
|
|
12
12
|
import { fileURLToPath } from "node:url";
|
|
13
13
|
import { loadEnv } from "vite";
|