
Security News
Scaling Socket from Zero to 10,000+ Organizations
Socket CEO Feross Aboukhadijeh shares lessons from scaling a developer security startup to 10,000+ organizations in this founder interview.
@covalent/data
Advanced tools
A golang based mock data server CLI, for use with Teradata Covalent Quickstart
covalent-data is a mock API server with the following features:
To run from source or to create your own executables, you must first install Go.
go getgo run server.go/schema directory and the /datum directory must be in the root of this repo.The covalent-data CLI is available to download as a package in the npm repository.
npm install @covalent/data -gcovalent-dataTo run from docker:
cd into it.docker build -t covalent-data .docker run -p 8080:8080 --name covalent-data covalent-datadocker stop covalent-datacovalent-data is included in the covalent-quickstart repo.
npm installnpm run start-api (npm run stop-api to stop the API server)ng serve and go to http://localhost:4200covalent-data allows you to create custom CRUD endpoints.
On startup, it will automatically create these endpoints from yaml files in the /schemas directory and seed them with mock data based on example files in the datum directory.
There are two steps to customizing CRUD objects:
/schemas directory.systems.yaml will create GET, POST, PUT, PATCH, and DELETE at http://localhost:8080/systems)initial_entries. This tells the API server how many initial entries to seed your table with.randomize. This tells the API server whether you want the seed data randomized, or ordered. Ordered data can be useful if you need to have the same usernames across multiple objects, for example._systemname_)- these will be discussed in the next step.systems.yaml:
initial_entries: 8
randmoize: false
name: _systemname_
status: _activity_
sessions: _session_
workloads: _workload_
will generate eight random JSON objects that look like this:
{
"name": "tdsystem",
"status": "active",
"sessions": "12",
"workloads": "55"
/datum directory.systemname.txt.tdsystem).systemname.txt:
tdsystem
awssystem
aster
localsystem
Once your mock objects are created, run the mock server. You can then send RESTful commands to it! Try the following:
GET http://localhost:8080/ping (this will return a pong)GET http://localhost:8080/systems (this will return the fake systems defined by the schemas and datum)POST http://localhost:8080/systems - send a body with this one to create a new entryGET http://localhost:8080/systems/{system_name}PUT http://localhost:8080/systems/{system_name} - send a body with this one to update the systemDELETE http://localhost:8080/systems/{system_name} - delete the systemCovalent-data will create realistic chart data that you can use right away in your charts.
Send a POST http://localhost:8080/charts with a body that's formatted as such:
{
"name": "my new chart",
"key": "MyChartKey",
"num_data_points": 60,
"interval_seconds": 90,
"y_axes": [
{
"name": "cpu",
"function_type": "black_friday"
},
{
"name": "hits",
"function_type": "sawtooth"
}
]
}
This will create 60 points, spaced 90 seconds apart, with two y-axes- cpu and hits.
IMPORTANT NOTE: if you omit num_data_points (or set to 0) then the chart data will disappear as you consume it. Otherwise,
you will always get 60 time ordered data points in a queue.
The following function_types for Y axes are available:
black_fridaysawtoothsineslow_riseslow_declinesquaretriangleThe value you set for key is how you will access your mock chart data. This is an optional value, and if you dont set this, the API will assign a unique key for your mock chart data.
Send a GET http://localhost:8080/charts/MyChartKey and you will get a JSON array back that looks similar to this:
[
{
"cpu": 3.4086436391430617,
"hits": 0,
"timestamp": 1474998463
},
{
"cpu": 3.436764648923683,
"hits": 1,
"timestamp": 1474998523
},
{
"cpu": 4.839440493047819,
"hits": 2,
"timestamp": 1474998583
},
{
"cpu": 3.871987273635802,
"hits": 3,
"timestamp": 1474998643
},
{
"cpu": 3.3517529842176668,
"hits": 4,
"timestamp": 1474998703
},
{
"cpu": 4.161895630999336,
"hits": 5,
"timestamp": 1474998763
}
]
FAQs
A golang based mock data server CLI, for use with Teradata Covalent Quickstart
We found that @covalent/data demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?

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.

Security News
Socket CEO Feross Aboukhadijeh shares lessons from scaling a developer security startup to 10,000+ organizations in this founder interview.

Research
Socket Threat Research maps a rare inside look at OtterCookie’s npm-Vercel-GitHub chain, adding 197 malicious packages and evidence of North Korean operators.

Research
Socket researchers identified a malicious Chrome extension that manipulates Raydium swaps to inject an undisclosed SOL transfer, quietly routing fees to an attacker wallet.