@sprkl/vscode-agent-mock
TypeScript icon, indicating that this package has built-in type declarations

0.0.26 • Public • Published

Install

npm install --save @sprkl/vscode-agent-mock # mock
npm install --save-dev @sprkl/vscode-model # types

Usage

/*
There are 2 packages relevant here:
- vscode-agent-mock: which mocks the sprkl agent on vscode
- vscode-model: the data model (interfaces) of the vscode 
*/
import {AgentClient} from '@sprkl/vscode-agent-mock'
import {Dashboard, Histogram} from '@sprkl/vscode-model'

/* 
The agent client exposes 2 APIs: 
- getHistogram(): get histogram data
- getDashboard(): get dashboard data
*/
const agentClient = new AgentClient();

const histogram: Histogram = await agentClient.getHistogram({
  startTime: new Date(),
  endTime: new Date(),
  numOfColumns: 10,
})

const dashboard: Dashboard = await agentClient.getDashboard({
  startTime: new Date(),
  endTime: new Date(),
})

/@sprkl/vscode-agent-mock/

    Package Sidebar

    Install

    npm i @sprkl/vscode-agent-mock

    Weekly Downloads

    2

    Version

    0.0.26

    License

    none

    Unpacked Size

    41.6 kB

    Total Files

    10

    Last publish

    Collaborators

    • marom-sprkl
    • eliranm-sprkl
    • razc
    • sprkl-dev