adonisjs / transmit

A Server-Sent-Event module for AdonisJS
MIT License
71 stars 5 forks source link

There's no way to actually import redis as a transport as stated in the docs #10

Closed kilobyte2007 closed 7 months ago

kilobyte2007 commented 7 months ago

Package version

0.4.1

Describe the bug

The docs specify that I can import redis as a transport like this:

import { redis } from '@adonisjs/transmit/transports'

but there's no such export in the transmit package. Is this a documentation mistake?

Also in another example, redis is imported like this (which is also not working):

import { defineConfig, redis } from '@adonisjs/transmit'

Reproduction repo

No response

kilobyte2007 commented 7 months ago

Made it work by importing it like this, but it's probably a mistake in the build process:

import { redis } from '@rlanz/bus/drivers/redis'
RomainLanz commented 7 months ago

Hey @kilobyte2007! 👋🏻

Is TypeScript screaming at you when doing the import or the code really does not work?

kilobyte2007 commented 7 months ago

Hi @RomainLanz ,

It doesn't work and when I look at the source code there's indeed no such export. Seems to me like the transmits.ts file is not bundled.

You can see here that the transmits.ts file is not in the bundle - https://www.npmjs.com/package/@adonisjs/transmit

RomainLanz commented 7 months ago

Should be good with 0.4.2. 👍🏻

kilobyte2007 commented 7 months ago

That was quick! Works like a charm, thanks a lot!

RomainLanz commented 7 months ago

Cool! Let me know if you have any other issues or questions!

kilobyte2007 commented 7 months ago

I do have one but I will open a separate issue for that one.