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 🙏

© 2026 – Pkg Stats / Ryan Hefner

gcp-emulator

v0.6.0

Published

Emulate Google Cloud Platform services

Readme

GCP Emulator

Test Release Dependabot Status

Roughly emulate Google Cloud Platform services for development.

Emulators

  • [x] Cloud Functions cloud-functions
  • [x] Cloud Storage cloud-storage
  • [x] Cloud Tasks cloud-tasks

Getting Started

Install the package.

yarn add -D gcp-emulator

Use as a CLI.

gcp-emulator emulate --emulators cloud-functions --cloud-functions-filepath ./function.js

Use as a Library.

import { EmulatorCloudFunctions } from "gcp-emulators";

const emulatorCloudFunctions = new EmulatorCloudFunctions({
  filepath: "./function.js",
  server: {
    port: 9010,
    hostname: "localhost",
    ssl: ...,
  },
});

Logging

The logger supports the following types of logs *, info, warn, error.

You can configure which types of logs are output by setting the LOGGER environment variable or setting the UtilityLogger.level property.

Proxy

You can configure a proxy server for all http based emulators to use.

You can also configure the proxy to use ngrok.

CLI Usage

Options

| Argument | Description | Value | |----------|-------------|-------| | --config | javascript or json config | .gcprc.js |

emulate command

gcp-emulator emulate [options]

Options

| Argument | Description | Value | |----------|-------------|-------| | --emulators | emulators to use | cloud-functions,cloud-storage,cloud-tasks | | --proxy | proxy emulators | true | | --proxy-port | proxy server port | 9000 | | --proxy-ngrok | proxy with ngrok | true | | --proxy-ngrok-authtoken | proxy ngrok authtoken | xxx | | --proxy-ngrok-subdomain | proxy ngrok subdomain | gcp-emulator | | --ssl-key-filepath | global server ssl key path | ./key.pem | | --ssl-cert-filepath | global server ssl cert path | ./cert.pem | | --cloud-functions-port | cloud-functions emulator server port | 9010 | | --cloud-functions-filepath | cloud-functions emulator source path | ./function.js | | --cloud-functions-ssl-key-filepath | cloud-functions emulator server ssl key path | ./key.pem | | --cloud-functions-ssl-cert-filepath | cloud-functions emulator server ssl cert path | ./cert.pem | | --cloud-storage-port | cloud-storage emulator server port | 9020 | | --cloud-storage-filepath | cloud-storage emulator source path | ./public | | --cloud-storage-ssl-key-filepath | cloud-storage emulator server ssl key path | ./key.pem | | --cloud-storage-ssl-cert-filepath | cloud-storage emulator server ssl cert path | ./cert.pem |

CLI Config

The file provided to the --config argument should return the following Javascript object structure when required in Node.

{
  [commandName]: {
    [camelCaseArgument]: value;
  }
}

Caveats & Limitations

The Cloud Functions emulator clears the require.cache before executing the function, this improves the development experience but may cause issues of it's own in certain situations.

The Cloud Storage emulator is more-or-less a simple static server.

The Cloud Tasks emulator uses sinon to stub the @google-cloud/tasks package so it is required for the emulator to operate.

Depending on your usage a built-in 404 page will be sent to requests that cannot be resolved to an emulator, or where an emulator cannot resolve the request, this does not align with any particular Google Cloud Platform service but seems more useful than not having it.