Dependencies of your SwiftPM packages as a service.
You can take a peek at a package's dependencies by going to http://swift-dependency-fetcher.endocrimes.com and submitting the GitHub name of the package, e.g.
vapor/vapor, to see the graph visualized.
If you want to pull the image of your dependencies directly (into your README, for instance), the following endpoint should be useful. You can also use different visualization methods, such as an interactive graph.
- Get dependencies of a GitHub SwiftPM package:
formatis not specified,
tagis not specified, the latest tag found on GitHub is used
- available formats:
json- JSON of the dependency graph
png- png image of the rendered dependency graph
dot- dot/gv format (open in any graphing app, e.g. OmniGraffle)
d3depsa page with an interactive dependency graph 1 (experimental, will change)
d3grapha page with an interactive dependency graph 2 (experimental, will change)
d3treea page with an interactive dependency tree 3 (experimental, will change)
d3treejsondependencies in JSON format for a d3 tree 3 (experimental, will change)
http://swift-dependency-fetcher.endocrimes.com/dependencies/vapor/vapor?format=png&tag=0.16.2 returns the following rendered dependency tree
Adding dependency graph in your README
You can add an image of your dependency tree by just adding the following line
!(http://swift-dependency-fetcher.endocrimes.com/dependencies/AUTHOR/REPO?format=png), where you fill in your
This is a live rendered dependency tree for this repository,
Please note that it might take a few seconds to render the image for the first time (then it's cached for 24 hours), so if your README fails to pull the image, refresh in a few seconds. I'm working on making things faster, but this is a way to keep things mostly correct.
Requirements for running locally
- a Redis server running on the port 6380 before booting the server (just
redis-server ./Redis/redis.conffrom the root folder to start the server with the desired config)
- a GitHub personal token in the
Interactive D3 graphs
You can also view your dependencies in 3 interactive formats. Just adjust the
format=... end of the URL to one of the following:
Please create an issue with a description of your problem or open a pull request with a fix.