@pnpm/logger
Advanced tools
Comparing version 5.2.0 to 900.0.0
@@ -0,3 +1,5 @@ | ||
export { type LogLevel } from './LogLevel'; | ||
export { type LogBase, type LogBaseDebug, type LogBaseError, type LogBaseInfo, type LogBaseWarn, } from './LogBase'; | ||
export { type Logger, logger, globalInfo, globalWarn, } from './logger'; | ||
export { type LogBaseDebug, type LogBaseError, type LogBaseInfo, type LogBaseWarn, type LogBase, type LogLevel, createStreamParser, streamParser, } from './streamParser'; | ||
export { type Reporter, type StreamParser, createStreamParser, streamParser, } from './streamParser'; | ||
export { writeToConsole } from './writeToConsole'; |
@@ -6,3 +6,5 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.globalInfo = exports.globalWarn = exports.logger = void 0; | ||
exports.logger = void 0; | ||
exports.globalWarn = globalWarn; | ||
exports.globalInfo = globalInfo; | ||
const bole_1 = __importDefault(require("bole")); | ||
@@ -15,7 +17,5 @@ bole_1.default.setFastTime(); | ||
} | ||
exports.globalWarn = globalWarn; | ||
function globalInfo(message) { | ||
globalLogger.info(message); | ||
} | ||
exports.globalInfo = globalInfo; | ||
//# sourceMappingURL=logger.js.map |
@@ -1,30 +0,8 @@ | ||
export type LogLevel = 'error' | 'warn' | 'info' | 'debug'; | ||
export interface LogBaseTemplate { | ||
level?: LogLevel; | ||
prefix?: string; | ||
message?: string; | ||
import { type LogBase } from './LogBase'; | ||
export type Reporter<LogObj extends LogBase> = (logObj: LogObj) => void; | ||
export interface StreamParser<LogObj extends LogBase> { | ||
on: (event: 'data', reporter: Reporter<LogObj>) => void; | ||
removeListener: (event: 'data', reporter: Reporter<LogObj>) => void; | ||
} | ||
export interface LogBaseDebug extends LogBaseTemplate { | ||
level: 'debug'; | ||
} | ||
export interface LogBaseError extends LogBaseTemplate { | ||
level: 'error'; | ||
} | ||
export interface LogBaseInfo extends LogBaseTemplate { | ||
level: 'info'; | ||
prefix: string; | ||
message: string; | ||
} | ||
export interface LogBaseWarn extends LogBaseTemplate { | ||
level: 'warn'; | ||
prefix: string; | ||
message: string; | ||
} | ||
export type LogBase = LogBaseDebug | LogBaseError | LogBaseInfo | LogBaseWarn; | ||
export type Reporter = (logObj: LogBase) => void; | ||
export interface StreamParser { | ||
on: (event: 'data', reporter: Reporter) => void; | ||
removeListener: (event: 'data', reporter: Reporter) => void; | ||
} | ||
export declare const streamParser: StreamParser; | ||
export declare function createStreamParser(): StreamParser; | ||
export declare const streamParser: StreamParser<LogBase>; | ||
export declare function createStreamParser<LogObj extends LogBase>(): StreamParser<LogObj>; |
@@ -6,3 +6,4 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.createStreamParser = exports.streamParser = void 0; | ||
exports.streamParser = void 0; | ||
exports.createStreamParser = createStreamParser; | ||
const bole_1 = __importDefault(require("bole")); | ||
@@ -20,3 +21,2 @@ const ndjson_1 = __importDefault(require("ndjson")); | ||
} | ||
exports.createStreamParser = createStreamParser; | ||
//# sourceMappingURL=streamParser.js.map |
@@ -6,3 +6,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.writeToConsole = void 0; | ||
exports.writeToConsole = writeToConsole; | ||
const bole_1 = __importDefault(require("bole")); | ||
@@ -16,3 +16,2 @@ function writeToConsole() { | ||
} | ||
exports.writeToConsole = writeToConsole; | ||
//# sourceMappingURL=writeToConsole.js.map |
{ | ||
"name": "@pnpm/logger", | ||
"version": "5.2.0", | ||
"version": "900.0.0", | ||
"description": "Logger for pnpm", | ||
@@ -31,3 +31,3 @@ "main": "lib/index.js", | ||
"devDependencies": { | ||
"@pnpm/logger": "5.2.0" | ||
"@pnpm/logger": "900.0.0" | ||
}, | ||
@@ -37,2 +37,5 @@ "exports": { | ||
}, | ||
"jest": { | ||
"preset": "@pnpm/jest-config" | ||
}, | ||
"scripts": { | ||
@@ -39,0 +42,0 @@ "lint": "eslint \"src/**/*.ts\" \"test/**/*.ts\"", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9900
21
136
1