npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@azure-utils/turborepo-cache

v0.0.6

Published

Utils to deploy TurboRepo Remote Cache on Azure Functions.

Readme

Azure Functions TurboRepo Remote Cache Router

An easy way to deploy TurboRepo remote cache using Azure Functions. The package registers all endpoints required for TurboRepo to sync with remote cache as per the spec.

Refer TurboRepo Cache Spec

Only works with V4 functions written in TypeScript/JavaScript.

NPM JSR

Install

NPM

npm i -D @azure-utils/turborepo-cache
yarn add -D @azure-utils/turborepo-cache
bun add -D @azure-utils/turborepo-cache

JSR

npx jsr add -D @azure-utils/turborepo-cache
deno add -D @azure-utils/turborepo-cache

Build and deploy app

The package exports a registerCacheRouter function which registers all endpoint required to work with TurboRepo remote cache.

1. Register the router

Invoke the registration function is a file that is covered by Azure Functions. Normally this is the index.ts file. The function takes an optional options argument which can be used override default settings.

// src/index.ts
import { registerCacheRouter } from "@azure-utils/turborepo-cache";

registerCacheRouter();

-- or --

// src/index.ts
import { registerCacheRouter } from "@azure-utils/turborepo-cache";

registerCacheRouter({
  // Token used for authentication. Defaults to `env['TURBO_TOKEN']`.
  turboToken: "",
  // Azure Storage Connection String. Defaults to `env['AzureWebJobsStorage']`.
  connectionString: "",
  // Azure Storage Blob Container name. Defaults to `env['CONTAINER_NAME']` or `turborepocache`.
  containerName: "",
  // Enable/disable health check route
  healthCheck: true,
});

2. Update host.json

Azure functions use host.json in app root to configure the settings for whole functions-app.

Add/update the following setting to make sure there is no (empty) prefix before routes. If left unset, then Azure Functions may add /api prefix to routes which is incompatible with Turborepo cache spec.

{
  "extensions": {
    "http": {
      "routePrefix": ""
    }
  }
}

3. Build app

If you are using TypeScript, you can use any bundler to build the functions-app. The official template used tsc.

If you wish to use Vite and add verification step (for peace of mind), checkout Azure Functions Vite plugin.

The vite plugin should output something similar following to confirm the endpoints are discoverable

| Type | Name | Options | | ----------- | --------------------- | -------------------------------- | | [http-GET] | health-check | {"route":"/"} | | [http-GET] | check-service-status | {"route":"/v8/artifacts/status"} | | [http-GET] | download-artifact | {"route":"/v8/artifacts/{hash}"} | | [http-GET] | openapi-spec | {"route":"/v8/openapi"} | | [http-PUT] | upload-artifact | {"route":"/v8/artifacts/{hash}"} | | [http-POST] | query-artifacts-info | {"route":"/v8/artifacts"} | | [http-POST] | record-usage-events | {"route":"/v8/artifacts/events"} | | [http-HEAD] | check-artifact-exists | {"route":"/v8/artifacts/{hash}"} |

4. Deploy app

In order to deploy the app by CLI, CI or Azure plugin, you a need an Azure Functions resource in your Azure subscription.

If you are creating a new resource, select the option to create an associated Storage account, that will be used to store cache artifacts.

If your app is not connected to Storage account or you wish to override storage account, use ENV or OPTIONS to do so.

License

MIT © 2025 Siddhant Gupta (@GuptaSiddhant)