Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fbschema

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fbschema

A simple library to generate TypeScript definition files as well as Firestore rules based on a JSON Schema definition.

  • 0.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
decreased by-40%
Maintainers
1
Weekly downloads
 
Created
Source

fbschema

npm npm bundle size Deploy CI Lint and Test GitHub stars GitHub forks

A simple library to generate TypeScript definition files as well as Firestore rules based on a JSON Schema definition.

WARNING

This is a WIP library and currently only generates TypeScript interfaces, as well as may be buggy. Use at your own risk and feel free to contribute!

Table of Contents

Downloading

You can install fbschema via npm:

npm install fbschema

Documentation

This library expects a JSON Schema for each Firestore collection in the root of your porject in a folder called fbschema. From there it will generate TypeScript definition files into the a types/fbschema folder as well as (one day soon) creating a new firestore.rules file.

You can do this from the command line:

# If you're in the root of your project
npx fbschema

# Or you can pass in a path to your project's root
npx fbschema ~/workspace/my-cool-firebase-project

You can also use this library in your code:

import fbschema from 'fbschema';

// If you're running this code from your project's root
fbschema();


// You can also provide a path to your project's root
fbschema('../');

Contributing

All code should pass tests, as well as be well documented. Please also see the Commit Message Guidelines for how commit messages should be structured.

Keywords

FAQs

Package last updated on 25 Feb 2021

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