@rsc-kit/core 0.30.46 → 0.30.48

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/vite.d.ts CHANGED
@@ -146,7 +146,7 @@ export interface RscKitOptions {
146
146
  * caller that is not a browser - a webhook, a server - is never refused.
147
147
  */
148
148
  trustedOrigins?: string[];
149
- /** Where the server bundles and generated entries go. Defaults to `.rsc`. */
149
+ /** Where the server bundles and generated entries go. Defaults to `.rsc-kit`, beside the types; leave it there. */
150
150
  outDir?: string;
151
151
  /**
152
152
  * A file the dev server writes its own url into, and removes on shutdown.
package/dist/vite.js CHANGED
@@ -21,6 +21,7 @@ import { basename, dirname, isAbsolute, join, relative, resolve } from "node:pat
21
21
  import { fileURLToPath, pathToFileURL } from "node:url";
22
22
  import rsc, { getPluginApi } from "@vitejs/plugin-rsc";
23
23
  import { loadEnv, parseAst } from "vite";
24
+ import { formInputs } from "./hostInputs.js";
24
25
  import { stampDisplayNames } from "./stableNames.js";
25
26
  import { REPORT_FILE, buildReport } from "./buildReport.js";
26
27
  import { contractPath, edgeGuarded, edgeMarker, edgeShells, edgeStatic } from "./edgeShells.js";
@@ -3859,6 +3860,14 @@ export async function getStaticParams(component: string): Promise<Record<string,
3859
3860
  // not reach the Flight render.
3860
3861
  const HOST_GLOBAL = ${JSON.stringify(hostGlobal)}
3861
3862
 
3863
+ // For defineForm({ action }): which global calls the backend, and what each
3864
+ // function takes. On the global because a form is defined as its module loads,
3865
+ // and read when it first renders, by which time this entry has run.
3866
+ ;(globalThis as Record<symbol, unknown>)[Symbol.for('rsc-kit.host-forms')] = {
3867
+ global: HOST_GLOBAL,
3868
+ inputs: ${JSON.stringify(formInputs(hostTypes, hostDefs))},
3869
+ }
3870
+
3862
3871
  /**
3863
3872
  * The reserved name a host answers route middleware on.
3864
3873
  *