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

@restroom-mw/logger

Package Overview
Dependencies
Maintainers
3
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@restroom-mw/logger - npm Package Compare versions

Comparing version 0.13.1-c16e462.76 to 0.13.1-e20f69a.78

6

dist/index.js

@@ -18,2 +18,3 @@ "use strict";

const fs_1 = __importDefault(require("fs"));
const path_1 = __importDefault(require("path"));
const utils_1 = require("@restroom-mw/utils");

@@ -34,4 +35,5 @@ require("dotenv").config();

const addLog = (sentences, where) => {
validatePath(where);
const ws = fs_1.default.createWriteStream(where, { flags: "a" });
const absolutePath = path_1.default.resolve(path_1.default.join(exports.LOGGER_DIR, where));
validatePath(absolutePath);
const ws = fs_1.default.createWriteStream(absolutePath, { flags: "a" });
ws.on('error', (error) => {

@@ -38,0 +40,0 @@ throw new Error(`[LOGGER] An error occurred while writing to ${where}\n${error}`);

{
"name": "@restroom-mw/logger",
"version": "0.13.1-c16e462.76+c16e462",
"version": "0.13.1-e20f69a.78+e20f69a",
"description": "Utilities middleware to work with files for Restroom",

@@ -36,3 +36,3 @@ "author": "Alberto Lerda <alberto@dyne.org>",

},
"gitHead": "c16e46294477a54f79b9f551c4f3de4c56919a43"
"gitHead": "e20f69a2b6a2742ea3a3f060c0b1ef4163ba3e38"
}

@@ -28,4 +28,5 @@ import {Restroom} from "@restroom-mw/core";

const addLog = (sentences: string[], where: string) => {
validatePath(where);
const ws = fs.createWriteStream(where, {flags: "a"});
const absolutePath = path.resolve(path.join(LOGGER_DIR, where));
validatePath(absolutePath);
const ws = fs.createWriteStream(absolutePath, {flags: "a"});
ws.on('error', (error) => {

@@ -32,0 +33,0 @@ throw new Error(

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