v0.0.120
·
173 commits
to main
since this release
@junobuild/functions
Breaking Changes
- Review functions API to avoid duplication.
// Previous syntax
export const onSetDoc = defineHook({
collections: ['demo', 'console'],
onSetDoc: async (context: OnSetDocContext) => {
console.log('onSetDoc');
}
});
// New syntax
export const onSetDoc = defineHook<OnSetDocConfig>({
collections: ['demo', 'console'],
run: async (context) => {
console.log('onSetDoc');
}
});
Features
- Use
zod
for hooks and assertions definitions.