Skip to content

A Cloudflare Worker that proxies toastpack requests to the npm registry

Notifications You must be signed in to change notification settings

toastpack/npmProxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

toastpack npm proxy

A Cloudflare Worker that proxies toastpack requests to the npm registry, simplifying the client side fetching of packages.

API Documentation

If a route returns a 500 or a 404, the response will be a JSON object with a key error with an error message.

GET /

Returns a text response of "Hello toastpack npm proxy!"

GET /:package

Returns a JSON response with the following fields:

{
  "name": "@toastpack/cli", // the name of the package
  "description": "description", // the description of the package
  "license": "MIT", // the license of the package
  "tags": { "latest": "1.0.0", "beta": "1.0.1-beta" }, // the tags of the package
  "versions": ["0.0.1", "0.1.0", "1.0.0", "1.0.1-beta"] // the versions of the package
}

GET /:package/:version

Returns a JSON response with the following fields:

{
  "name": "@toastpack/cli", // the name of the package
  "description": "description", // the description of the package
  "license": "MIT", // the license of the package
  "version": "1.0.0", // the version of the package
  "tgz": "https://npmProxy.toastpack.dev/@toastpack%2Fcli/1.0.0/tgz", // the tarball of the package
}

GET /:package/:version/tgz

Returns a tarball of the package.

About

A Cloudflare Worker that proxies toastpack requests to the npm registry

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published