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

@openfn/logger

Package Overview
Dependencies
Maintainers
4
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@openfn/logger - npm Package Compare versions

Comparing version 0.0.7 to 0.0.8

3

dist/index.d.ts

@@ -27,2 +27,3 @@ declare type LogLevel = 'debug' | 'info' | 'default' | 'none';

success(...args: any[]): void;
print(...args: any[]): void;
confirm(message: string, force?: boolean): Promise<boolean>;

@@ -34,3 +35,3 @@ timer(name: string): string | undefined;

declare type LogMessage = [LogFns | 'confirm', ...any[]];
declare type LogMessage = [LogFns | 'confirm' | 'print', ...any[]];
declare type MockLogger = Logger & {

@@ -37,0 +38,0 @@ _last: LogMessage;

@@ -125,2 +125,7 @@ // src/logger.ts

};
const print = (...args) => {
if (opts.level !== NONE) {
emitter.info(...args);
}
};
const confirm = async (message, force = false) => {

@@ -151,2 +156,3 @@ if (force) {

timer,
print,
force: () => {

@@ -183,2 +189,7 @@ },

const mock = m;
mock.print = (...out) => {
if (opts.level !== "none") {
history.push(["print", ...out]);
}
};
Object.defineProperty(mock, "_last", {

@@ -199,2 +210,5 @@ get: () => history[history.length - 1] || []

}
if (log[0] === "print") {
return { level: "print", message: log[1], messageRaw: [log[1]] };
}
if (name && !opts.hideNamespace && !opts.hideIcons) {

@@ -201,0 +215,0 @@ [level, namespace, icon, ...messageParts] = log;

{
"name": "@openfn/logger",
"version": "0.0.7",
"version": "0.0.8",
"description": "Cross-package logging utility",

@@ -5,0 +5,0 @@ "module": "dist/index.js",

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