What’s the options I have to be able to share the package I wrote inside my package library with others?
I couldn’t find a way to export them, when I export a collection that depends on them It includes the id of the packages in the exported JSON file and that’s it.
Is there’s no way currently to do this? and if not is such a feature planned in the future?
And assuming I gave others a copy of the packages code and it’s name for them to manually add them, the exported collections reference packages by id and not name, does this means they will have to reassign the packages manually for every collection?
As far as I’m aware, there is currently no way of sharing package libraries.
Because the package libraries are linked to your team name as part of the package name.
for example
const helper = pm.require('@teamname/helper');
So it will not be easily transferred to other users, I’m sure there will be more development in this area to allow people to share package libraries but it’s not there yet.
If you want to share functions add them to the collection in the Pre-request for test scripts area. These can be shared a lot easier.
I think the Package library is a great feature, but it’s still a relatively new feature and it needs time to mature to include the ability to share, and versioning of the package would be great too.
Package libraries are shared by default with the whole team to ease collaboration. Everyone in your team can access and use package libraries in their APIs.
Since package libraries are stored at a team level, they aren’t exported along with the collection.
One of the best ways you can collaborate on APIs [irrespective of packages] is to use a team workspace, and invite members to your team.
I understand that using teams is the best solution, problem is when I am sharing outside the team, like on github, I can’t invite every single person to my team, I just want to share the files on the repo so anyone and download and import it.
A public repo for an open source project, and yes, the collection should be public available to anyone on the internet.
I mean, technically, I can post the packages code along with their names and write down the steps to add them manually to the workspace, but it whould have been alot nicer to have it exported like the rest of the collections and environments.
@ahmedahmedeg, Given your scenario, I’d recommend adding the shared code to the collection as that will be shared automatically as it will be self-contained in the file.
Aah got it! This is good feedback.
We are looking to explore the possibility of bringing Package library in the context of Public workspaces, and the Public API Network. We’ll keep posted on this
For me, It would be useful for the package library to be controlled, because If I share a collection to someone who just need to run the collection (Normally a Guest).
I don’t need them to have view/edit access to the package library. Just being able to run the collection is enough.
If I’m sharing this with people within our team and they are editor / admin then obviously they will need to full CRUD access to the library.