Socket
Book a DemoInstallSign in
Socket

firebase-bolt-compiler

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

firebase-bolt-compiler

Compiles Firebase Bolt files to TypeScript, Flow, & more

latest
Source
npmnpm
Version
1.2.9
Version published
Weekly downloads
57
612.5%
Maintainers
1
Weekly downloads
 
Created
Source

Firebase Bolt Compiler

CircleCI npm

Compiles Firebase Bolt files to TypeScript, Flow, and more.

This package is a rewrite of firebase-bolt-transpiler in TypeScript. It uses the same AST types from the original firebase-bolt package providing more safety and flexibility to generate different code artifacts.

Installation

yarn install firebase-bolt-compiler

Usage

firebase-bolt-compiler < rules.bolt

Example

Using the following rules.bolt file as an input:

path /users/{uid} is Users {
  read() { true }
  write() { isCurrentUser(uid) }
}

type Users extends User[] {}

type User {
  firstName: String;
  lastName: String;
}

Will generate the TypeScript code below:

type Users = { [key: string]: User };

export interface User {
    firstName: string;
    lastName: string;
}

Keywords

firebase

FAQs

Package last updated on 30 Sep 2017

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