You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I was having issues with the typebox adapter because the environment (cloudflare pages) doesn't allow type compiling. Trying to validate would result in a code generation error. To work around this, I wanted to use createAdapter and implement validate without compiling, however, it isn't exported. I ended up having to patch sveltekit-superforms/adapters/index.js.
It would be nice to have a version of the typebox adapter without compiling, maybe a typeboxNoCompile. I do realize it might be niche, so exposing createAdapter with some documentation about writing adapters would be a more general solution.
The text was updated successfully, but these errors were encountered:
Hello, thank you for the PR, the reason I'm hesitant is that as soon as something is exported, I have to support it and prevent breaking changes, and the createAdapter interface isn't set in stone. I was thinking about doing it in v3, so I'll add it to that milestone for the time being.
Is your feature request related to a problem? Please describe.
I was having issues with the
typebox
adapter because the environment (cloudflare pages) doesn't allow type compiling. Trying to validate would result in a code generation error. To work around this, I wanted to usecreateAdapter
and implementvalidate
without compiling, however, it isn't exported. I ended up having to patchsveltekit-superforms/adapters/index.js
.sveltekit-superforms/src/lib/adapters/typebox.ts
Line 25 in eabcb20
Describe the solution you'd like
Export
createAdapter
and other useful types to make it easier to implement custom adapters.https://github.com/ciscoheat/sveltekit-superforms/blob/main/src/lib/adapters/index.ts
It would be nice to have a version of the
typebox
adapter without compiling, maybe atypeboxNoCompile
. I do realize it might be niche, so exposingcreateAdapter
with some documentation about writing adapters would be a more general solution.The text was updated successfully, but these errors were encountered: