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

@firebolt-js/openrpc

Package Overview
Dependencies
Maintainers
17
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.2.0-beta.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
281
increased by36.41%
Maintainers
17
Weekly downloads
 
Created
Source

title: Firebolt OpenRPC Tools

Firebolt OpenRPC Tools

Tools to enable consistent Firebolt SDK and document generation.

To Use

  • First, npm install.
  • Next, invoke the cli directly with src/cli.js. See below for arguments.

Alternatively, you may install globally using npm install -g @firebolt-js/openrpc, which will install the cli and add it to your $PATH so it may be invoked with the firebolt-openrpc command.

Firebolt OpenRPC Tools require Node 16.

CLI Arguments

--task: Tell the tool what you want it to do. Options are:

  • sdk: Generate the SDK
  • docs: Generate the docs
  • openrpc: Generate the openrpc
  • validate Validate the openrpc

--source: The relative or absolute path to the folder or file that the task will use.

--template: The relative or absolute path to the folder or file containing template resources for the task.

--output: The relative or absolute path to the folder or file that will hold the task's generated output.

--as-path: Used by the document generator. This is a toggle for generating content as files vs folders. More info below in Document Generation.

--static-modules: String. Used by the SDK generator. "Static modules" are modules without an OpenRPC json document. More on this below.

SDK Generation

Indicated by --task sdk. Generate the Firebolt SDKs from an OpenRPC spec. Currently, only the JavaScript SDK is supported.

Note on --static-modules

Static modules are modules without a corresponding OpenRPC json document. It will be included statically from the location supplied by the --template option. Listing your module in the --static-modules property ensures that it is properly exported by the SDK and wires up mock responses as well.

Document Generation

Indicated by --task docs. Generate markdown docs from the OpenRPC spec.

Note on --as-path

When deploying docs to web servers, --as-path is generally used. For deploying to GitHub pages/wikis, do not use --as-path.

This toggle will generate content as files vs folders. For exmaple, this:

/docs/Topic.md

vs

/docs/Topic/index.md

It affects the output of:

  • file names
  • relative links
  • relative images

OpenRPC Generation

Indicated by --task openrpc. Assembles a corpus of individual OpenRPC documents into a single OpenRPC document.

OpenRPC Validation

Indicated by --task validate. Reads and validates a corpus of individual OpenRPC documents and validates the result of assembling them together into a single OpenRPC document.

CLI Shorthands

Don't feel like typing? Use -t instead of --task. This table shows the mapping:

shorthandcommand
-t--task
-s--source
-tm--template
-o--output
-ap--as-path
-sm--static-modules

Keywords

FAQs

Package last updated on 18 Jan 2022

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