@rsc-kit/mcp 0.30.48 → 0.30.49

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/recipes.js CHANGED
@@ -2913,15 +2913,20 @@ passed. A refusal handle() decides goes under its field:
2913
2913
  import { fieldErrors } from '@rsc-kit/core/action'
2914
2914
  if (await subscribed(email)) fieldErrors({ email: 'Already on the list.' })
2915
2915
 
2916
- A BACKEND, WITH NO SCHEMA: defineForm({ name, action: 'Contact.send', theme }) -
2917
- no form, no handle, no zod. Fields and browser checks come from what the backend
2918
- says the function takes (rsc-host.json): a Laravel FormRequest's rules(), or a
2916
+ A BACKEND, WITH NO SCHEMA: defineForm({ name, action: contactSend, theme }),
2917
+ with contactSend imported from the generated server-actions module - the
2918
+ action itself, never its name as a string (a string throws). No form, no
2919
+ handle, no zod. bunx rsc-kit make:form contactSend writes forms/contact.ts.
2920
+ The action is a Laravel class in app/Rsc/Actions (Contact::send is
2921
+ contactSend; a class in app/Rsc is rpc only and has no action) or Go's
2922
+ reg.HandleAction("contactSend", "Contact.send", fn). Fields and browser checks
2923
+ come from what it takes (rsc-host.json): a Laravel FormRequest's rules(), or a
2919
2924
  Go struct, whose validate tags are read as hints and never run, so the Go
2920
- function must still check. The function takes one object; a file needs form and
2921
- handle. A 422 from Laravel (a FormRequest type-hinted on the method, whose
2922
- authorize() returns true) or Go (rsckit.InvalidField) lands under the same
2923
- fields, uncaught. To check in TypeScript first, keep a schema and
2924
- handle: (values) => rpc('Contact.send', values).
2925
+ function must still check. It takes one object; a file needs form and handle.
2926
+ A 422 from Laravel (a FormRequest type-hinted on the method, whose authorize()
2927
+ returns true) or Go (rsckit.InvalidField) lands under the same fields,
2928
+ uncaught. To check in TypeScript first, keep a schema and
2929
+ handle: (values) => contactSend(values).
2925
2930
 
2926
2931
  THE BOT TRAP: every form carries a hidden field named homepage. Filled in, the
2927
2932
  submission is answered as a success and dropped - handle() never runs. So a