pub_cache_server library

Functions

fixupUrl(String url) String
Fixes a URL to point to this host and port instead of the real Pub.
getAdvisories(Request request) → Response
Returns the security advisories, which are all blank.
getRouter() → Router
Returns a REST API that is compliant with the Pub Server spec.
getTarball(Request request, String package, String version) Future<Response>
Returns the given package at the given version as a compressed tarball (.tar.gz file)
getVersions(Request request, String package) → Response
Gets info about all the versions of a given package.
okJson(Json json) → Response
Returns the given JSON as an HTTP 200 OK response.

Typedefs

Json = Map<String, dynamic>
Represents a standard JSON object