JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q47847F
  • License GPL-2.0

Client module for communicating with the Faster Than Light BugCatcher backend API.

Package Exports

  • node-bugcatcher

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (node-bugcatcher) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Faster Than Light BugCatcher Client API Library

npm version WIP Badge

Installation & Common Usage

1 - Install package

npm install node-bugcatcher

2 - Configure module to work with desired environment

import BugCatcher from 'node-bugcatcher'
const api = BugCatcher(
  'https://api.bugcatcher.fasterthanlight.dev', // api uri
  '<stl_sid>' // authentication token (optional, can be set after init)
)

3 - Consume API endpoints through the initiated NPM package

const projectList = api.getProject()
// -> ["solidity_project"]

const projectName = projectList[0] || 'new project'
// -> 'solidity_project'

const { stlId } = await api.putCode({
  name: 'solidity_project/contracts/token.sol',
  code: 'data:application/octet-stream;base64,U1RMIFJvY2tzIQ==',
  project: projectName
})
// -> stlId = 'psHXGXnOMfwV4wngfBMURXOExWigv7eGNzlzLsiK'

const runTests = await api.postTestProject({ projectName })
const { stlid: testId } = runTests.data
// -> testId = 'Gx0NtFOGBlHVEOmiUvyUs3KNwhkXKDe8ERAYQly3'