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:
/dependencies/AUTHOR/REPO?format=FORMAT&tag=TAG- both
formatandtagare optional - if
formatis not specified,jsonis used - if
tagis not specified, the latest tag found on GitHub is used - e.g.
/dependencies/czechboy0/Jay?format=png&tag=0.19.0 - available formats:
json- JSON of the dependency graphpng- png image of the rendered dependency graphdot- 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)d3depsjsdependencies in JavaScript format for a d3 graph 1 (experimental, will change)d3treejsondependencies in JSON format for a d3 tree 3 (experimental, will change)
- both
http://swift-dependency-fetcher.endocrimes.com/dependencies/vapor/vapor?format=png&tag=0.16.2 returns the following rendered dependency tree
You can add an image of your dependency tree by just adding the following line
, where you fill in your AUTHOR and REPO.
This is a live rendered dependency tree for this repository, swiftpm-dependency-fetcher:
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.
- 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
$GITHUB_TOKENenvironment variable
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.
MIT
Honza Dvorsky - https://honzadvorsky.com, @czechboy0



