Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@syngrisi/core-api

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@syngrisi/core-api - npm Package Compare versions

Comparing version 2.1.24-alpha.0 to 2.1.25-alpha.0

32

dist/SyngrisiApi.js

@@ -161,3 +161,3 @@ "use strict";

catch (e) {
log.error(`❌ Error getting if baseline exist data, error: '${e.stack || e}'`);
log.error(`❌ Error getting if baseline exist, params: ${JSON.stringify(params)} data, error: '${e.stack || e}'`);
if (e.response)

@@ -168,2 +168,32 @@ (0, utils_1.printErrorResponseBody)(e);

}
async getBaselines(params) {
try {
const filter = JSON.stringify({ ...params, apikey: (0, hasha_1.default)(this.config.apiKey) });
const url = `${this.config.url}v1/client/baselines?filter=${filter}`;
const result = await got_cjs_1.default.get(url)
.json();
return result;
}
catch (e) {
log.error(`❌ Error getting baselines, params: ${JSON.stringify(params)} data, error: '${e.stack || e}'`);
if (e.response)
(0, utils_1.printErrorResponseBody)(e);
return (0, utils_1.errorObject)(e);
}
}
async getSnapshots(params) {
try {
const filter = JSON.stringify({ ...params, apikey: (0, hasha_1.default)(this.config.apiKey) });
const url = `${this.config.url}v1/client/snapshots?filter=${filter}`;
const result = await got_cjs_1.default.get(url)
.json();
return result;
}
catch (e) {
log.error(`❌ Error getting snapshots, params: ${JSON.stringify(params)} data, error: '${e.stack || e}'`);
if (e.response)
(0, utils_1.printErrorResponseBody)(e);
return (0, utils_1.errorObject)(e);
}
}
}

@@ -170,0 +200,0 @@ exports.SyngrisiApi = SyngrisiApi;

4

package.json
{
"name": "@syngrisi/core-api",
"version": "2.1.24-alpha.0",
"version": "2.1.25-alpha.0",
"description": "Syngrisi Core JS client",

@@ -51,3 +51,3 @@ "main": "dist/SyngrisiApi.js",

},
"gitHead": "57cc6c9db7b28c4b6a7e0847747abaae254b9103"
"gitHead": "8cce731290e41604b8066467971ddd7fe5ecc014"
}

@@ -5,4 +5,4 @@ # Syngrisi core js api client

`SYNGRISI_LOG_LEVEL` - logging level (`0 | 4 | 2 | 1 | 3 | 5 | "trace" | "debug" | "info" | "warn" | "error" `)
`SYNGRISI_LOG_LEVEL` - logging level (`"trace" | "debug" | "info" | "warn" | "error"`)
TODO: complete documentation

Sorry, the diff of this file is not supported yet

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