Socket
Socket
Sign inDemoInstall

@soinlabs/hawk

Package Overview
Dependencies
9
Maintainers
6
Versions
14
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.2.0 to 0.2.1

2

package.json
{
"name": "@soinlabs/hawk",
"version": "0.2.0",
"version": "0.2.1",
"main": "index.js",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -23,3 +23,3 @@ const FileWriter = require("./FileWriter.js");

this.path = null;
this.setReferenceCode(options.referenceCode)
this.setReferenceCode(options.referenceCode);
this.setPath(options.path);

@@ -39,4 +39,3 @@ this.slackToken =

this.datepattern
);
);
}

@@ -48,4 +47,4 @@ /**

setPath(path) {
const env = process.env.ENV_VARS || process.env.NODE_ENV;
if (env === "test" || env === "testing") {
if (this.isTestEnvironment()) {
console.warn("You are using Hawk in test environment mode");
this.path = os.tmpdir();

@@ -58,2 +57,12 @@ } else if (path !== null && path !== undefined) {

/**
* Cheks if app is running on test mode
* @param {String} env environment
*/
isTestEnvironment() {
const env =
process.env.HAWK_ENV_MODE || process.env.ENV_VARS || process.env.NODE_ENV;
return env === "test" || env === "testing" || env.match(/^(testing)(.)*/i);
}
/**
* Set slackToken value

@@ -124,5 +133,3 @@ * @param {String} slackToken

if (toElastic === false) log.type = "LOG";
this.fileWriter.write(
log,
);
this.fileWriter.write(log);
}

@@ -129,0 +136,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc