X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;ds=sidebyside;f=flow-typed%2Fnpm%2Fwinston_v3.x.x.js;fp=flow-typed%2Fnpm%2Fwinston_v3.x.x.js;h=0000000000000000000000000000000000000000;hb=6af9012e5b9ef2ed6f4fe8a9696b40ac0e8da4d0;hp=a92d2cb05e16dbebe7c0a33cd6a34e3335d737ea;hpb=8c4da34193ab5407e3989a76360f1d909c21dc76;p=e-mobility-charging-stations-simulator.git diff --git a/flow-typed/npm/winston_v3.x.x.js b/flow-typed/npm/winston_v3.x.x.js deleted file mode 100644 index a92d2cb0..00000000 --- a/flow-typed/npm/winston_v3.x.x.js +++ /dev/null @@ -1,156 +0,0 @@ -// flow-typed signature: 71d87edbd93b4e1027b7e590a8e97a21 -// flow-typed version: 097f6f2b81/winston_v3.x.x/flow_>=v0.104.x - -declare type $winstonLevels = { [string]: number, ... }; - -declare type $winstonNpmLogLevels = { - error: number, - warn: number, - info: number, - verbose: number, - debug: number, - silly: number, - ... -}; - -declare type $winstonInfo = { - [optionName: string]: mixed, - level: $Keys, - message: string, - ... -}; - -declare type $winstonFormat = Object; - -declare type $winstonFileTransportConfig = { - filename: string, - level?: $Keys, - ... -}; - -declare class $winstonTransport { - level?: string; - silent?: boolean; -} - -declare class $winstonFileTransport extends $winstonTransport { - constructor($winstonFileTransportConfig): $winstonFileTransport; -} - -declare type $winstonConsoleTransportConfig = { level?: $Keys, ... }; - -declare class $winstonConsoleTransport extends $winstonTransport { - constructor( - config?: $winstonConsoleTransportConfig - ): $winstonConsoleTransport; -} - -declare type $winstonLoggerConfig = { - exitOnError?: boolean, - format?: $winstonFormat, - level?: $Keys, - levels?: T, - transports?: Array<$winstonTransport>, - ... -}; - -declare type $winstonLogger = { - [$Keys]: (message: string, meta?: Object) => $winstonLogger, - add: $winstonTransport => $winstonLogger, - remove: $winstonTransport => $winstonLogger, - clear: () => $winstonLogger, - close: () => $winstonLogger, - configure: ($winstonLoggerConfig) => void, - log: (message: $winstonInfo) => $winstonLogger, - startTimer: () => $winstonProfiler, - profile: (name: string, info?: $Shape<$winstonInfo>) => void, - ... -}; - -declare type $winstonConfigSubModule = { npm: () => $winstonNpmLogLevels, ... }; - -declare type $winstonFormatJsonOptions = { - replacer?: (key: string, value: mixed) => mixed, - space?: number, - stable?: boolean, - ... -}; - -declare type $winstonFormatPrettyPrintOptions = {| - depth?: number, - colorize?: boolean, -|}; - -declare type $winstonFormatErrorsOptions = {| - stack?: boolean, -|}; - -declare type $winstonFormatSubModule = { - ((info: $winstonInfo) => $winstonInfo): () => $winstonFormat, - combine: (...args: Array<$winstonFormat>) => $winstonFormat, - json: (options?: $winstonFormatJsonOptions) => $winstonFormat, - label: (config?: Object) => $winstonFormat, - metadata: () => $winstonFormat, - prettyPrint: (options?: $winstonFormatPrettyPrintOptions) => $winstonFormat, - simple: () => $winstonFormat, - splat: () => $winstonFormat, - timestamp: (?{ - alias?: string, - format?: string | () => string, - ... - }) => $winstonFormat, - colorize: () => $winstonFormat, - logstash: () => $winstonFormat, - printf: ((args: $winstonInfo) => string) => $winstonFormat, - errors: (options?: $winstonFormatErrorsOptions) => $winstonFormat, - ... -}; - -declare type $winstonDefaultLogger = $winstonLogger<$winstonNpmLogLevels>; - -declare class $winstonContainer { - constructor(config?: $winstonLoggerConfig): $winstonContainer; - add(loggerId: string, config?: $winstonLoggerConfig): $winstonLogger; - get(loggerId: string): $winstonLogger; - has(loggerId: string): boolean; - close(loggerId?: string): void; -} - -declare interface $winstonProfiler { - logger: $winstonLogger; - start: Date; - done(info?: $Shape<$winstonInfo>): void; -}; - -declare module "winston" { - declare export type Levels = $winstonLevels; - declare export type NpmLogLevels = $winstonNpmLogLevels; - declare export type Info = $winstonInfo; - declare export type Format = $winstonFormat; - declare export type FileTransportConfig = $winstonFileTransportConfig; - declare export type Transport = $winstonTransport; - declare export type FileTransport = $winstonFileTransport; - declare export type ConsoleTransportConfig = $winstonConsoleTransportConfig; - declare export type ConsoleTransport = $winstonConsoleTransport; - declare export type LoggerConfig = $winstonLoggerConfig; - declare export type Logger = $winstonLogger; - declare export type ConfigSubModule = $winstonConfigSubModule; - declare export type FormatSubModule = $winstonFormatSubModule; - declare export type DefaultLogger = $winstonDefaultLogger; - declare export type Container = $winstonContainer; - declare export type Profiler = $winstonProfiler; - - declare module.exports: { - ...$Exact<$winstonDefaultLogger>, - format: $winstonFormatSubModule, - transports: { - Console: typeof $winstonConsoleTransport, - File: typeof $winstonFileTransport, - ... - }, - createLogger: ($winstonLoggerConfig) => $winstonLogger, - Container: typeof $winstonContainer, - loggers: $winstonContainer<*>, - ... - }; -}