Skip to content

Commit

Permalink
chore: build
Browse files Browse the repository at this point in the history
  • Loading branch information
Keyrxng committed Jun 13, 2024
1 parent 1fbefed commit f79a2f7
Show file tree
Hide file tree
Showing 7 changed files with 226 additions and 275 deletions.
66 changes: 17 additions & 49 deletions dist/logs.d.ts
Original file line number Diff line number Diff line change
@@ -1,53 +1,21 @@
import { SupabaseClient } from "@supabase/supabase-js";
import { Context } from "probot";
import { LogLevel, PrettyLogs } from "./pretty-logs.js";
import { P as PrettyLogs, M as Metadata, L as LogReturn, a as LogLevel } from './pretty-logs-TeMdXxew.js';

declare class LogReturn {
logMessage: LogMessage;
metadata?: any;
constructor(logMessage: LogMessage, metadata?: any);
}
type FunctionPropertyNames<T> = {
[K in keyof T]: T[K] extends (...args: any[]) => any ? K : never;
}[keyof T];
type PublicMethods<T> = Exclude<FunctionPropertyNames<T>, "constructor" | keyof object>;
type LogMessage = {
raw: string;
diff: string;
level: LogLevel;
type: PublicMethods<Logs>;
};
declare class Logs {
private _supabase;
private _context;
private _maxLevel;
private _queue;
private _concurrency;
private _retryDelay;
private _throttleCount;
private _retryLimit;
static console: PrettyLogs;
private _log;
private _addDiagnosticInformation;
ok(log: string, metadata?: any, postComment?: boolean): LogReturn | null;
info(log: string, metadata?: any, postComment?: boolean): LogReturn | null;
error(log: string, metadata?: any, postComment?: boolean): LogReturn | null;
debug(log: string, metadata?: any, postComment?: boolean): LogReturn | null;
fatal(log: string, metadata?: any, postComment?: boolean): LogReturn | null;
verbose(log: string, metadata?: any, postComment?: boolean): LogReturn | null;
constructor(supabase: SupabaseClient, retryLimit: number, logLevel: LogLevel, context: Context | null);
private _sendLogsToSupabase;
private _processLogs;
private _retryLog;
private _processLogQueue;
private _throttle;
private _addToQueue;
private _save;
static _commentMetaData(metadata: any, level: LogLevel): string;
private _diffColorCommentMessage;
private _postComment;
private _getNumericLevel;
static convertErrorsIntoObjects(obj: any): any;
private _maxLevel;
static console: PrettyLogs;
private _log;
private _addDiagnosticInformation;
ok(log: string, metadata?: Metadata, postComment?: boolean): LogReturn | null;
info(log: string, metadata?: Metadata, postComment?: boolean): LogReturn | null;
error(log: string, metadata?: Metadata, postComment?: boolean): LogReturn | null;
debug(log: string, metadata?: Metadata, postComment?: boolean): LogReturn | null;
fatal(log: string, metadata?: Metadata, postComment?: boolean): LogReturn | null;
verbose(log: string, metadata?: Metadata, postComment?: boolean): LogReturn | null;
constructor(logLevel: LogLevel);
static _commentMetaData(metadata: Metadata, level: LogLevel): string;
private _diffColorCommentMessage;
private _getNumericLevel;
static convertErrorsIntoObjects(obj: unknown): Metadata | unknown;
}

export { type LogMessage, LogReturn, Logs };
export { Logs };
Loading

0 comments on commit f79a2f7

Please sign in to comment.