Skip to content
This repository has been archived by the owner on Feb 16, 2020. It is now read-only.

Mainframe-Archive/js-tools

Repository files navigation

JS tools

Shared JS libraries for various Mainframe projects.

Packages

Platform symbols

🌐 browser ⚛️ electron ⚙️ node

Name Version Platform Description
RPC clients
@mainframe/rpc-base npm version 🌐 ⚛️ ⚙️ Base class for RPC clients
@mainframe/rpc-browser npm version 🌐 ⚛️ RPC client factory for browser
@mainframe/rpc-electron npm version ⚛️ RPC client factory for Electron
@mainframe/rpc-http-browser npm version 🌐 ⚛️ RPC client for browser over HTTP
@mainframe/rpc-http-node npm version ⚙️ RPC client for node over HTTP
@mainframe/rpc-ipc npm version ⚙️ RPC client for node using IPC
@mainframe/rpc-node npm version ⚙️ RPC client factory for node
@mainframe/rpc-request npm version 🌐 ⚛️ ⚙️ Request-based (stateless) RPC client
@mainframe/rpc-stream npm version 🌐 ⚛️ ⚙️ Stream-based (stateful) RPC client
@mainframe/rpc-ws-browser npm version 🌐 ⚛️ RPC client for browser using WebSockets
@mainframe/rpc-ws-node npm version ⚙️ RPC client for node using WebSockets
Transports
@mainframe/transport-electron npm version ⚛️ Electron transport
@mainframe/transport-http-browser npm version 🌐 ⚛️ HTTP transport for browser
@mainframe/transport-http-node npm version ⚙️ HTTP transport for node
@mainframe/transport-ipc npm version ⚙️ IPC transport (node only)
@mainframe/transport-web3 npm version 🌐 Web3 transport (browser only)
@mainframe/transport-ws-browser npm version 🌐 WebSocket transport for browser
@mainframe/transport-ws-node npm version ⚙️ WebSocket transport for node
Security
@mainframe/secure-file npm version ⚛️ ⚙️ Cryptographic utilities for files
Utilities
@mainframe/rpc-error npm version 🌐 ⚛️ ⚙️ RPC error class and utilities
@mainframe/rpc-handler npm version ⚙️ RPC requests handler factory and utilities
@mainframe/utils-crypto npm version 🌐 ⚛️ ⚙️ Cryptographic primitives
@mainframe/utils-time npm version 🌐 ⚛️ ⚙️ Time-related utilities.

Development

This repository uses Lerna and Yarn workspaces to manage multiple packages and their dependencies.
Code is written in TypeScript and compiled to CommonJS and ESM when targetting Node.js and browser environments, or CommonJS only when targetting Node.js only.

Setup

After pulling the repository,

  1. Run yarn install to install the dependencies
  2. Run yarn start to compile the packages and run the tests

In the package you want to work on, you can run the local commands such as yarn build and yarn test getting applied for this package.

Repository scripts

These scripts affect the entire project rather than individual packages:

  • build: runs the build script of each package
  • lint: runs ESLint in all packages
  • lint:fix: fixes possible ESLint rules
  • test:types: runs the test:types script of each package
  • test:unit: runs Jest in the entire project
  • test: runs lint, test:types and test:unit
  • start: runs build and test

Adding a new package

  1. Create a new folder in packages with a similar setup to the others (notably make sure to provide build and test:types scripts in the new package's package.json)
  2. yarn add the dependencies you need in the new package

License

MIT
See LICENSE file.

About

Shared JS libraries for various Mainframe projects

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published