Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Jan 16 02:58
    greenkeeper[bot] commented #465
  • Jan 16 02:58

    greenkeeper[bot] on husky-4.0.10

    chore(package): update husky to… chore(package): update lockfile… (compare)

  • Jan 15 23:41
    greenkeeper[bot] commented #465
  • Jan 15 23:41

    greenkeeper[bot] on husky-4.0.9

    chore(package): update husky to… chore(package): update lockfile… (compare)

  • Jan 10 08:46
    greenkeeper[bot] commented #465
  • Jan 10 08:46

    greenkeeper[bot] on husky-4.0.6

    chore(package): update husky to… chore(package): update lockfile… (compare)

  • Jan 09 22:57
    larrybolt commented #316
  • Jan 09 20:18
    sdomagala commented #462
  • Jan 09 20:12
    lmammino commented #462
  • Jan 09 20:11

    lmammino on 1.0.0-beta.2

    (compare)

  • Jan 09 20:08
    willfarrell commented #462
  • Jan 09 20:08
    willfarrell commented #462
  • Jan 09 20:07

    lmammino on 1.0.0-beta

    Add in RDS Auth Token option to… (compare)

  • Jan 09 20:07
    lmammino closed #462
  • Jan 09 20:06
    lmammino commented #316
  • Jan 09 19:59
    lmammino synchronize #462
  • Jan 09 19:54
    lmammino synchronize #462
  • Jan 09 19:52
    lmammino commented #462
  • Jan 09 17:06
    agilliland commented #273
  • Jan 09 14:30
    willfarrell commented #273
Luciano Mammino
@lmammino
regarding middy internals or use cases?
Doruk Kutlu
@d0ruk
to gauge best practices
use cases
Luciano Mammino
@lmammino
@DavidWells created an example repo, it might be useful: https://github.com/DavidWells/middy-example
Doruk Kutlu
@d0ruk
cheers
Luciano Mammino
@lmammino
You are welcome, @d0ruk, let us know if there's anything that is not clear or that we can improve in your opinion :)
Doruk Kutlu
@d0ruk
will do
Jose Santacruz
@joseSantacruz
Hi all, quick serverless question is there a way to preview the generated cloud formation files without building all the artifacts??
Chanlito
@chanlito
I found middyjs today, and I have to say, thank you, to @lmammino & all the contributors.
Luciano Mammino
@lmammino
@chanlito, thanks to your for trying middy :)
@joseSantacruz did you figure it out a way? I know that serverless framework has a command to build a package but not publish it, that way you should be able to see the cloudformation files
Thomas Edwards
@thomasedwards
I just found Middy today :heart_eyes:
Just casually re-writing my entire project now
dkatavic
@dkatavic
hello @thomasedwards . I hope you are gonna find it useful :smile:
Luciano Mammino
@lmammino
@thomasedwards looking forward to receiving your feedbacks :P
Today we just passed 200 stars!!! :)
Thomas Edwards
@thomasedwards
amazing!
has anybody ever had a Cannot destructure propertyhttpContentNegotiationof 'undefined' or 'null' error?
import middy from 'middy'

const {
  httpContentNegotiation,
  httpErrorHandler
} = middy.middlewares

const lovelyStuff = event => {
  // do stuff
}

const handler = middy(lovelyStuff)
  .use(httpContentNegotiation({ availableMediaTypes: ['application/json'] }))
  .use(jsonBodyParser())
  .use(httpErrorHandler())

export { handler }
I think it's because I'm using imports
Thomas Edwards
@thomasedwards
yup changed it to
const {
  httpContentNegotiation,
  httpErrorHandler,
  jsonBodyParser,
  validator
} = require('middy/middlewares')
Thomas Edwards
@thomasedwards
so when I import anything from middy/middlewares, I get the entire AWS library because of the S3 middleware?
this bumps up my file size from less than 1MB to 3.5MB
Thomas Edwards
@thomasedwards
done some digging and opened an issue: middyjs/middy#154
Luciano Mammino
@lmammino
Hello @thomasedwards , thanks a million for your contribution and sorry for the long wait, i was away for a conference :)
looking into your issue right now
Thomas Edwards
@thomasedwards
thank you! =)
have closed it, will investigate further
Thomas Edwards
@thomasedwards
also – any thoughts about giving more information from the validator? middyjs/middy#155
I have now realised that actually just editing the validator to pass the errors through as a string
rather than using 'Event object failed validation' would be possibly safer
Luciano Mammino
@lmammino
@thomasedwards thank you for pointing that out. I am currently slowly going over all the open issues an PR in my free time. I will try to address everything later this evening
Thomas Edwards
@thomasedwards
no worries! let me know if there's anything I can do to help
have replied to your comments, thanks @lmammino ! middyjs/middy#155
Thomas Edwards
@thomasedwards
Super loving 0.12 :thumbsup: Sooo much easier to debug now with the beautiful extreme logging – thanks team! :heart:
Thomas Edwards
@thomasedwards
Okay, I think I have a really tricky problem...
In one of my middlewares I have a promise that needs to return before it can continue
however, if I add async/await to the function, I get a whole load of errors and pain
Thomas Edwards
@thomasedwards
okay I found a way
I’m returning a promise to a variable set in the middleware
I don't do any async/await in the middleware
but then I await it when I use it later on
Andrea Falzetti
@rexromae_twitter
@vladgolubev hey mate, I'm trying to understand why the change that I've done to the docs, it's still not showing in the website. Did I miss any step?
Dan Van Brunt
@iDVB
HELP! Love Middy so far. Having an issue with writing jest tests with my custom middleware written with async/await. My middleware has a proper try/catch around the await. I've looked at the ssm middleware that is part of the core for ideas. My middleware works fine when I remove that single async call to S3. But with it I keep getting UnhandledPromiseRejectionWarning
Is there some special way to implement a middleware that uses async/await
Dan Van Brunt
@iDVB
@lmammino Would love if you have a moment to chime in on this. middyjs/middy#270 Seems like a current limitation when trying to test custom middleware.
Filipe Kiss
@filipekiss
Hey people, quick question: Does any one have an example of what type arguments Middy expects? The argument names aren't quite descriptive and I have no idea what I should pass to Middy<T, R, C> except for C because it extends Context
will Farrell
@willfarrell
I'm going to be in London for 2 weeks over christmas if anyone wants to get a pint and talk shop.
Sam Koucha
@ElectroMW
0/
will Farrell
@willfarrell
There is a bunch of typescript issues in the backlog, anyone willing to triage and maybe submit PR's for them. I don't use typescript, so can't help here.