Compiles Firebase Bolt schema definitions (from firebase-bolt) into TypeScript interfaces, Flow types, and other code artifacts. Current stable version is 1.2.9, last released in September 2017. This package is a TypeScript rewrite of firebase-bolt-transpiler, using the same AST types as the original firebase-bolt package. It is primarily a CLI tool that reads .bolt files and outputs TypeScript or Flow type definitions. Key differentiators: generates path helper functions (since v1.2.0), handles null explicitly, and provides stricter typing compared to the original transpiler. No active development since 2017.
npm install firebase-bolt-compilerNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Compiles a Bolt schema string to TypeScript interfaces using the programmatic API.
Consider migrating to Firebase's official Security Rules tools or use firebase-bolt directly.
Read the file contents separately before passing to compile().
Upgrade to v1.2.0+ and update generated type imports to include path functions.
Use shell redirection: firebase-bolt-compiler < input.bolt > output.ts
Use named import: import { compile } from 'firebase-bolt-compiler';Install firebase-bolt: npm install firebase-bolt
Install globally: npm install -g firebase-bolt-compiler, or use npx: npx firebase-bolt-compiler
Validate the .bolt file using firebase-bolt's validator or check the Bolt language specification.