Closed www-chique closed 2 years ago
This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployments, click below or on the icon next to each commit.
π Inspect: https://vercel.com/euberdeveloper/mongoback/BajgfijUq6RR5EFhNMwsMVzqKWJe
β
Preview: https://mongoback-git-fork-www-chique-mongodump-euberdeveloper.vercel.app
π Inspect: https://vercel.com/euberdeveloper/mongoback-dev/BEnUNL8opxzeAhXYzAx9tBn5Gu1D
β
Preview: https://mongoback-dev-git-fork-www-chique-mongodump-euberdeveloper.vercel.app
I think I will be able to take a lot in depth on Thursday/Friday, but it seems good. The only thing is, do mongoDump and mongoexport have the same configuration/options? If they have not even the options should be differentiated and at that point maybe also creating a new method mongoDump() could be considered an option
From the official docs of mongoexport and mongodump, indeed there are a few options which differ between them. Only in my specific case, I was content with the common options between both (many of them are common).
You are right, it's better off having a different function and options altogether to support everything. Take your time and do what you do the best.
I just did something to help showcase that it works :)
Yeah, it's also good code!
When I have time to check everything I'll merge the fix and add the mongoDump code in a new branch.
If you want I give you access as contributor
I close it because I merged it in another branch #19
Added the ability to define a "method" configuration option, which is by default "mongoexport", but you can specify "mongodump" to use mongodump method instead. I followed the same pattern of your code more or less, but please excuse if I have missed anything.
I have made the necessary changes on the CLI method as well.
However, what I didn't have enough time to do was adding tests. Even though I ran tests to make sure everything works as usual and nothing breaks because of this change. Also, I didn't run the "docs:tree" because it was generating a lot of other extra things in the tree like documentations and licenses which I don't have much knowledge about. I'll leave this to you.
Let me know if there's something which I can help with.
To use the new ability, simply add a
method: "mongodump"
to the main configuration when callingmongoExport
.I really love the tool, and all the powerful configurations it supports. Having the ability of "mongodump" would be cherry on the cake.