Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add getMiniflareR2Bucket helper method - R2 Helper method

See original GitHub issue

By adding the helper method getMiniflareR2Bucket one can get a bucket just by:

const bucket = await getMiniflareR2Bucket('BUCKET');

without having to create a new Miniflare instance

global.getMiniflareR2Bucket = async (bucket) => {
  const plugin = (await mf.getPlugins()).R2Plugin;
  const storage = mf.getPluginStorage("R2Plugin");
  return plugin.getBucket(storage, bucket);

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

spigazcommented, Jul 26, 2022

You are kidding right? You did an awesome work!

Do you have any idea of how much you helped me out?

Besides, this is a minor thing!

mrbbotcommented, Aug 11, 2022

No worries! Yep, that’s what I was thinking of. 🙂

Read more comments on GitHub >

github_iconTop Results From Across the Web

Define helper methods in a module - RSpec Core - Relish
You can define helper methods in a module and include it in your example groups using the config.include configuration option. config.extend can be...
Read more >
Rails: Where to define a helper method that will be available ...
I would like to define a helper method, my_method , that will be available inside BuyersController methods (like index , create , e.t.c.)....
Read more >
How do I correctly add a helper method to my Apex Class?
1. I've added the helper method to one of my own classes. · I've tried to paste it between the ' Messaging. ·...
Read more >
How to Use Rails Helpers (Complete Guide) - RubyGuides
A helper is a method that is (mostly) used in your Rails views to share reusable code. ... Here's where you can add...
Read more >
Rails 5 adds helpers method in controllers for ease - BigBinary
Rails 5 series | We can now use helpers method to call helper methods in controller.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found