meteor-collection-hooks
meteor-collection-hooks copied to clipboard
Meteor Collection Hooks
If you call `Meteor.userAsync` inside a publication you get a `Meteor.userId can only be invoked in method calls or publications.` **To Reproduce** Steps to reproduce the behavior: 1. Clone [my...
**Describe the bug** Async hooks dont wait for the hook to return to perform the Collection op, for example. **To Reproduce** ```javascript Tickets.before.insert(async function ticketsBeforeInsert(userId, doc) { doc.idNumber = await...
Hi, I added this package from this repo, and I'm getting this when running Meteor at M1 Air Asahi Fedora arm64 with Meteor linux-arm branch merged: ``` } Track: METEOR;...
Hi all, I've been using this package for some time, Thanks for this very good work. There are situations where I need to call a hook (let say the after.insert...
In preparation for the porting of the package to version 3.0, I would like to share how we should behave. To understand the context, I have prepared a simple table...
**Is your feature request related to a problem? Please describe.** In a before.insert hook we are validating some data, and if not valid we want to show the user an...
It looks like you can pass in options with `CollectionHooks.defaults.after.all` for example but is it possible to run a function at the beginning of a certain set of hooks /...
with the package install it returns DDP._CurrentPublicationInvocation.get() undefined https://github.com/meteor/meteor/issues/13258#issuecomment-2314923925 https://github.com/Meteor-Community-Packages/meteor-collection-hooks/blob/migrate/3.0/server.js#L30 ```js Meteor.publish('TestBindEnvironment', async function () { if (!this.userId) { return null; } const test = Meteor.bindEnvironment(async () => { console.log('bindEnvironment...
in 1.3.2, in os/upsert.js, at line 82, ``` ... const wrappedCallback = function (err, ret) { if (err || (ret && ret.insertedId)) { // Send any errors to afterInsert afterInsert(ret.insertedId,...