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

@composite-fetcher/with-logging

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@composite-fetcher/with-logging - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

5

./dist/index.js

@@ -37,4 +37,5 @@ // src/withLogging.ts

logger;
constructor(logger) {
constructor(options = {}) {
super();
const { logger } = options;
this.logger = logger || new ConsoleLogger();

@@ -55,3 +56,2 @@ }

this.logger.info(`Outgoing request to: ${context.request.url}`, logContext);
context.next();
}

@@ -75,3 +75,2 @@ async onPostRequest(context) {

);
context.next();
}

@@ -78,0 +77,0 @@ };

7

dist/index.d.ts

@@ -13,6 +13,9 @@ import { BasePlugin, PluginHandlerContext, PluginLifecycleHook } from '@composite-fetcher/core';

}
interface withLoggingOptions {
logger?: Logger;
}
declare class withLoggingPlugin extends BasePlugin {
private logger;
constructor(logger?: Logger);
constructor(options?: withLoggingOptions);
onPreRequest(context: PluginHandlerContext<PluginLifecycleHook.PRE_REQUEST>): Promise<void>;

@@ -22,2 +25,2 @@ onPostRequest(context: PluginHandlerContext<PluginLifecycleHook.POST_REQUEST>): Promise<void>;

export { Logger, withLoggingPlugin as withLogging };
export { Logger, withLoggingPlugin as withLogging, withLoggingOptions };

@@ -37,4 +37,5 @@ // src/withLogging.ts

logger;
constructor(logger) {
constructor(options = {}) {
super();
const { logger } = options;
this.logger = logger || new ConsoleLogger();

@@ -55,3 +56,2 @@ }

this.logger.info(`Outgoing request to: ${context.request.url}`, logContext);
context.next();
}

@@ -75,3 +75,2 @@ async onPostRequest(context) {

);
context.next();
}

@@ -78,0 +77,0 @@ };

{
"name": "@composite-fetcher/with-logging",
"description": "A simple logging plugin for composite fetcher",
"version": "0.3.0",
"version": "0.3.1",
"author": "Teofanis Papadopulos",

@@ -29,6 +29,6 @@ "type": "module",

"dependencies": {
"@composite-fetcher/core": "^0.1.4"
"@composite-fetcher/core": "^0.1.5"
},
"peerDependencies": {
"@composite-fetcher/core": "^0.1.4"
"@composite-fetcher/core": "^0.1.5"
},

@@ -35,0 +35,0 @@ "scripts": {

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