New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@senx/warp10

Package Overview
Dependencies
Maintainers
3
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@senx/warp10 - npm Package Compare versions

Comparing version 1.1.4 to 2.0.0

changelog.js

44

package.json
{
"name": "@senx/warp10",
"version": "1.1.4",
"version": "2.0.0",
"private": false,

@@ -30,6 +30,36 @@ "keywords": [

"build": "tsc",
"typedoc": "typedoc --options typedoc.json --plugin typedoc-plugin-markdown --hideGenerator src/*/*",
"test": "mocha --require ts-node/register --ui bdd ./tests/unitTest1.ts",
"eslint": "eslint -c .eslintrc.js --format html -o ./out/lint/eslint.html src/**/*.ts"
"doc": "typedoc --options typedoc.json --plugin typedoc-plugin-markdown --hideGenerator src/*/*",
"lint": "eslint -c .eslintrc.js --format html -o ./out/lint/eslint.html src/**/*.ts",
"cl": "node changelog.js > CHANGELOG.md",
"clean": "rm -fr ./out && rm -fr ./dist",
"prepublishOnly": "yarn clean && yarn build",
"test": "nyc mocha"
},
"mocha": {
"ui": "mocha-typescript",
"slow": "2000",
"spec": "tests/**/*.tests.ts",
"require": [
"source-map-support/register",
"ts-node/register"
],
"sort": false
},
"nyc": {
"extension": [
".ts",
".tsx"
],
"exclude": [
"**/*.d.ts"
],
"include": [
"src/**/*"
],
"reporter": [
"html"
],
"all": true,
"report-dir": "./out/coverage"
},
"homepage": "https://www.warp10.io",

@@ -42,3 +72,3 @@ "author": "SenX <contact@senx.io>",

"@types/mocha": "^10.0.3",
"@types/node": "^20.8.7",
"@types/node": "^20.8.8",
"@typescript-eslint/eslint-plugin": "^6.8.0",

@@ -50,2 +80,6 @@ "@typescript-eslint/parser": "^6.8.0",

"mocha": "^10.2.0",
"mocha-typescript": "^1.1.17",
"nyc": "^15.1.0",
"semver-sort": "^1.0.0",
"source-map-support": "^0.5.21",
"ts-node": "^10.9.1",

@@ -52,0 +86,0 @@ "typedoc": "^0.25.2",

20

README.md

@@ -12,2 +12,3 @@ [![npm version](https://badge.fury.io/js/%40senx%2Fwarp10.svg)](https://badge.fury.io/js/%40senx%2Fwarp10)

npm i @senx/warp10
yarn add @senx/warp10

@@ -22,3 +23,3 @@ ## Dates and formats

- fulltext
- json (default)
- json
- tsv

@@ -28,2 +29,3 @@ - fulltsv

- raw
- formatted (a json format, default)

@@ -34,3 +36,5 @@ ## Usage sample

import {Warp10} from "@senx/warp10";
import * as moment from 'moment';
import dayjs from "dayjs";
import utc from "dayjs/plugin/utc";
dayjs.extend(utc);

@@ -40,4 +44,6 @@ const writeToken = 'xxxxxx';

const readToken = 'xxxx';
const w10 = new Warp10('https://sandbox.senx.io');
const w10 = new Warp10().endpoint('https://sandbox.senx.io');
// or const w10 = new Warp10({endpoint: 'https://sandbox.senx.io'});
const test = async () => {

@@ -49,7 +55,7 @@

// fetch raw data between 2 dates
console.log(await w10.fetch(readToken, '~io.warp10.*', {}, '2019-11-11T12:34:43.388409Z', '2019-11-21T12:34:43.388409Z', 'json'));
console.log(await w10.fetch(readToken, '~io.warp10.*', {}, '2019-11-11T12:34:43.388409Z', dayjs().toISOString()));
// insert data points
console.log(await w10.update(writeToken, [
{timestamp: moment.utc().valueOf() * 1000, className: 'io.warp10.test', labels: {key: 'value'}, value: 54},
{timestamp: dayjs().utc().valueOf() * 1000, className: 'io.warp10.test', labels: {key: 'value'}, value: 54},
'1380475081000000// io.warp10.test{key=value} T',

@@ -67,6 +73,6 @@ '1566893344654882/48.81:-4.147/124 io.warp10.test{key=value} [8.2 151 152 1568189745655509/40.6:-74/14 ]',

// Fetch data with a time span
console.log(await w10.fetch(readToken, '~.*', {}, '2019-11-21T12:34:43.388409Z', 86400000000 * 5));
console.log(await w10.fetch(readToken, '~.*', {}, dayjs().toISOString(), 86400000000 * 5));
// delete data between 2 dates
console.log(await w10.delete(deleteToken, '~io.warp10.test*', {key: 'value'}, '2019-11-11T12:34:43.388409Z', '2019-11-21T12:34:43.388409Z'));
console.log(await w10.delete(deleteToken, '~io.warp10.test*', {key: 'value'}, '2019-11-11T12:34:43.388409Z', dayjs().toISOString()));

@@ -73,0 +79,0 @@ // delete all

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