New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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-290bb68.91 to 0.13.1-378d393.108

28

dist/actions.d.ts

@@ -1,4 +0,26 @@

export declare const APPEND = "append the string {} to the logfile in {}";
export declare const APPEND_NAMED = "append the string {} to the logfile named by {}";
export declare const APPEND_ARRAY = "append the array of strings {} to the logfile named by {}";
export declare enum Action {
/**
* `Then I append the string 'log' to the logfile in 'logPath'`<br><br>
* Append the string *log* to the logfile in the *logPath* under the *LOGGER_DIR* directory
* @param {string} log - The name of the variable that contains the log string
* or the log string itself
* @param {string} logPath - Path to the log file
*/
APPEND = "append the string {} to the logfile in {}",
/**
* `Then I append the string 'log' to the logfile named by 'logName'`<br><br>
* Append the string *log* to the logfile in the variable *logName* under the *LOGGER_DIR* directory
* @param {string} log - The name of the variable that contains the log string
* or the log string itself
* @param {string} logName - Name of the variable the contains the path to log file
*/
APPEND_NAMED = "append the string {} to the logfile named by {}",
/**
* `Then I append the array of strings 'logArray' to the logfile named by 'logName'`<br><br>
* Append the array of strings *logArray* to the logfile in the variable *logName* under the *LOGGER_DIR* directory
* @param {string} logArray - The name of the variable that contains the array of log strings
* @param {string} logName - Name of the variable the contains the path to log file
*/
APPEND_ARRAY = "append the array of strings {} to the logfile named by {}"
}
//# sourceMappingURL=actions.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.APPEND_ARRAY = exports.APPEND_NAMED = exports.APPEND = void 0;
exports.APPEND = "append the string {} to the logfile in {}";
exports.APPEND_NAMED = "append the string {} to the logfile named by {}";
exports.APPEND_ARRAY = "append the array of strings {} to the logfile named by {}";
exports.Action = void 0;
var Action;
(function (Action) {
/**
* `Then I append the string 'log' to the logfile in 'logPath'`<br><br>
* Append the string *log* to the logfile in the *logPath* under the *LOGGER_DIR* directory
* @param {string} log - The name of the variable that contains the log string
* or the log string itself
* @param {string} logPath - Path to the log file
*/
Action["APPEND"] = "append the string {} to the logfile in {}";
/**
* `Then I append the string 'log' to the logfile named by 'logName'`<br><br>
* Append the string *log* to the logfile in the variable *logName* under the *LOGGER_DIR* directory
* @param {string} log - The name of the variable that contains the log string
* or the log string itself
* @param {string} logName - Name of the variable the contains the path to log file
*/
Action["APPEND_NAMED"] = "append the string {} to the logfile named by {}";
/**
* `Then I append the array of strings 'logArray' to the logfile named by 'logName'`<br><br>
* Append the array of strings *logArray* to the logfile in the variable *logName* under the *LOGGER_DIR* directory
* @param {string} logArray - The name of the variable that contains the array of log strings
* @param {string} logName - Name of the variable the contains the path to log file
*/
Action["APPEND_ARRAY"] = "append the array of strings {} to the logfile named by {}";
})(Action = exports.Action || (exports.Action = {}));

14

dist/index.js

@@ -20,4 +20,4 @@ "use strict";

const utils_1 = require("@restroom-mw/utils");
const actions_1 = require("./actions");
require("dotenv").config();
const actions_1 = require("./actions");
exports.LOGGER_DIR = process.env.LOGGER_DIR;

@@ -43,4 +43,4 @@ const validatePath = (0, utils_1.validateSubdir)(exports.LOGGER_DIR);

};
if (zencode.match(actions_1.APPEND)) {
const params = zencode.chunkedParamsOf(actions_1.APPEND, 2);
if (zencode.match(actions_1.Action.APPEND)) {
const params = zencode.chunkedParamsOf(actions_1.Action.APPEND, 2);
for (const [sentence, where] of params) {

@@ -50,4 +50,4 @@ addLog([result[sentence] || input[sentence] || sentence], where);

}
if (zencode.match(actions_1.APPEND_NAMED)) {
const params = zencode.chunkedParamsOf(actions_1.APPEND_NAMED, 2);
if (zencode.match(actions_1.Action.APPEND_NAMED)) {
const params = zencode.chunkedParamsOf(actions_1.Action.APPEND_NAMED, 2);
for (const [sentence, pathName] of params) {

@@ -61,4 +61,4 @@ const logPath = result[pathName] || input[pathName];

}
if (zencode.match(actions_1.APPEND_ARRAY)) {
const params = zencode.chunkedParamsOf(actions_1.APPEND_ARRAY, 2);
if (zencode.match(actions_1.Action.APPEND_ARRAY)) {
const params = zencode.chunkedParamsOf(actions_1.Action.APPEND_ARRAY, 2);
for (const [arrayName, where] of params) {

@@ -65,0 +65,0 @@ const sentences = input[arrayName] || result[arrayName];

{
"name": "@restroom-mw/logger",
"version": "0.13.1-290bb68.91+290bb68",
"version": "0.13.1-378d393.108+378d393",
"description": "Utilities middleware to work with files for Restroom",

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

"clean": "rimraf dist && rimraf tsconfig.tsbuildinfo",
"doc": "documentation readme src/** -g -f md -s 'API' --readme-file ../../docs/packages/redis.md --shallow",
"doc": "documentation readme src/** -g -f md -s 'API' --readme-file ../../docs/packages/logger.md --shallow",
"links": "yarn link",

@@ -37,3 +37,3 @@ "unlinks": "yarn unlink",

},
"gitHead": "290bb685cd2a91763a432af799b5fe7346ef9bf0"
"gitHead": "378d393da3e5c43132e94031835e017f837b6869"
}

@@ -1,3 +0,25 @@

export const APPEND = "append the string {} to the logfile in {}";
export const APPEND_NAMED = "append the string {} to the logfile named by {}";
export const APPEND_ARRAY = "append the array of strings {} to the logfile named by {}";
export enum Action {
/**
* `Then I append the string 'log' to the logfile in 'logPath'`<br><br>
* Append the string *log* to the logfile in the *logPath* under the *LOGGER_DIR* directory
* @param {string} log - The name of the variable that contains the log string
* or the log string itself
* @param {string} logPath - Path to the log file
*/
APPEND = "append the string {} to the logfile in {}",
/**
* `Then I append the string 'log' to the logfile named by 'logName'`<br><br>
* Append the string *log* to the logfile in the variable *logName* under the *LOGGER_DIR* directory
* @param {string} log - The name of the variable that contains the log string
* or the log string itself
* @param {string} logName - Name of the variable the contains the path to log file
*/
APPEND_NAMED = "append the string {} to the logfile named by {}",
/**
* `Then I append the array of strings 'logArray' to the logfile named by 'logName'`<br><br>
* Append the array of strings *logArray* to the logfile in the variable *logName* under the *LOGGER_DIR* directory
* @param {string} logArray - The name of the variable that contains the array of log strings
* @param {string} logName - Name of the variable the contains the path to log file
*/
APPEND_ARRAY = "append the array of strings {} to the logfile named by {}"
}

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

import {validateSubdir} from "@restroom-mw/utils";
import { Action } from "./actions"
require("dotenv").config();
import {APPEND, APPEND_NAMED, APPEND_ARRAY} from "./actions";
export const LOGGER_DIR = process.env.LOGGER_DIR;

@@ -39,4 +40,4 @@

if (zencode.match(APPEND)) {
const params = zencode.chunkedParamsOf(APPEND, 2);
if (zencode.match(Action.APPEND)) {
const params = zencode.chunkedParamsOf(Action.APPEND, 2);
for(const [ sentence, where ] of params) {

@@ -46,4 +47,4 @@ addLog([ result[sentence] || input[sentence] || sentence ], where);

}
if (zencode.match(APPEND_NAMED)) {
const params = zencode.chunkedParamsOf(APPEND_NAMED, 2);
if (zencode.match(Action.APPEND_NAMED)) {
const params = zencode.chunkedParamsOf(Action.APPEND_NAMED, 2);
for(const [ sentence, pathName ] of params) {

@@ -58,4 +59,4 @@ const logPath = result[pathName] || input[pathName];

}
if (zencode.match(APPEND_ARRAY)) {
const params = zencode.chunkedParamsOf(APPEND_ARRAY, 2);
if (zencode.match(Action.APPEND_ARRAY)) {
const params = zencode.chunkedParamsOf(Action.APPEND_ARRAY, 2);
for(const [arrayName, where] of params) {

@@ -62,0 +63,0 @@ const sentences = input[arrayName] || result[arrayName];

Sorry, the diff of this file is not supported yet

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