New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

firefight

Package Overview
Dependencies
Maintainers
0
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

firefight

Some utility functions to help with debugging Firebase issues in NodeJS

  • 1.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
17
decreased by-5.56%
Maintainers
0
Weekly downloads
 
Created
Source

firefight

Project Status: Active – The project has reached a stable, usable state and is being actively developed.

This is a library of functions useful for debugging Firebase real-time database problems. The API below is copied from the source, which is authoritative.

class Simulator {

  /**
   * Create a new simulator for debugging permission denied errors.
   * @param {Database} database The Firebase Admin SDK database object for which you want to debug
   *     failures.
   * @param {string} legacySecret A legacy database secret from your Firebase console, to
   *     authenticate access via the Firebase 2.x API.
   */
  constructor(database, legacySecret)

  /**
   * Guess whether the given error is a Firebase permission denied error, or something else.
   * @param {Error} error The error to inspect.
   * @return True iff the error is a permission denied error.
   */
  isPermissionDenied(error)

  /**
   * Establish the identity under which to simulate calls, and return an object that you can use to
   * issue simulated calls.
   * @param {Object} claims The claims to be minted into a simulation token, including the uid and
   *     any extra claims you need to include to match the real custom token.
   * @return {Object} An interface for simulating calls that could fail with a permission denied
   *     error.  Each of the methods below returns an explanatory string, and does not actually read
   *     or write the database.  The methods will only throw exceptions if the arguments are invalid
   *     and never due to a read or write failure.
   *       async on(ref)
   *       async once(ref)
   *       async set(ref, value)
   *       async update(ref, value)
   *       async remove(ref)
   *       async push(ref, value)
   *       async transaction(ref, value)
   *     The transaction method requires you to pass the actual value that your transaction update
   *     function generated, not the function itself.
   */
  auth(claims)
}

FAQs

Package last updated on 14 Jan 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc