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

@firebolt-js/openrpc

Package Overview
Dependencies
Maintainers
14
Versions
116
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@firebolt-js/openrpc

The Firebolt SDK Code & Doc Generator

  • 1.0.1-beta.4
  • Source
  • npm
  • Socket score

Version published
Maintainers
14
Created
Source

title: Home

Firebolt JS SDK

For building Firebolt compliant apps.

Usage

Using the Firebolt SDK requires access to a private npm package.

To install the package, run:

npm install @firebolt-js/sdk

You may need to log in to npm first:

> npm login
npm notice Log in on https://registry.npmjs.org/
Username: _

Simply follow the prompts to log in and then you should be able to install the package using the install command above.

To use the package, import one of it's modules, e.g.:

import { Lifecycle } from '@firebolt-js/sdk'

Contributing

The SDK is auto-generated using OpenRPC schemas for Firebolt methods and events.

The Firebolt OpenRPC schemas, as well as the code used to generate the JavaScript Firebolt SDK, are stored in the github repository. Contact jeremy.lacivita@comcast.com for access.

For manageability, each module has it's own OpenRPC schema file, and they are merged into single schema when building.

Top-level repository contents include:

PathDescription
buildTarget for various sdk & doc builds
build/docs/markdownTarget for markdown documentation of the SDK
distTarget for production distributions, to be hosted on npm, etc
srcContains all schemas and code & doc generate src, including scripts and templates
src/modulesContains top-level OpenRPC schemas for each module
src/schemasContains reusable JSON-Schemas
src/templateContains templates for docs & various sdk builds

All of the JSON files in modules are merged together using src/template.json as the container. When merging, every module's methods have the module's title (from info.title) inserted before the method name and joined with a .. The components, e.g. schemas, etc., from each module are also merged. Here is a detailed diagram of how the merge script works. Merge Script Control Flow Diagram

To see the merged OpenRPC output, run:

npm run build:openrpc

and look at the output in dist/firebolt-open-rpc.json.

Reusable Firebolt schemas are stored in src/schemas and injected into the generated schema.

Reusable non-Firebolt schemas are stored in src/external and injected into the generated schema when referenced.

Absolute $ref links are left as is.

To generate the SDK, run:

npm run build:sdk

and look at the generated JS in build/sdk/javascript.

To test the SDK, run:

npm run dist:sdk

This builds the production version of the SDK and runs all tests.

To re-run the tests (w/out building the SDK) you can, run:

npm run test

Note that this is mainly useful for test-writing when the SDK is not changing.

To generate the docs, run:

npm run build:docs

Keywords

FAQs

Package last updated on 26 Aug 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