aboutsummaryrefslogtreecommitdiffstats
path: root/node_modules/concurrently/dist/src/logger.d.ts
diff options
context:
space:
mode:
authorPinapelz <yukais@pinapelz.com>2025-06-28 17:26:46 -0700
committerPinapelz <yukais@pinapelz.com>2025-06-28 17:43:56 -0700
commite4fa1e69e7ebfb627c7198fd1a9881e9327ec4d4 (patch)
tree06284a538a6008eca75051399e47db4e5d50301c /node_modules/concurrently/dist/src/logger.d.ts
initial commit: scaffolding
Diffstat (limited to 'node_modules/concurrently/dist/src/logger.d.ts')
-rw-r--r--node_modules/concurrently/dist/src/logger.d.ts72
1 files changed, 72 insertions, 0 deletions
diff --git a/node_modules/concurrently/dist/src/logger.d.ts b/node_modules/concurrently/dist/src/logger.d.ts
new file mode 100644
index 0000000..69b0d13
--- /dev/null
+++ b/node_modules/concurrently/dist/src/logger.d.ts
@@ -0,0 +1,72 @@
+import * as Rx from 'rxjs';
+import { Command, CommandIdentifier } from './command';
+export declare class Logger {
+ private readonly hide;
+ private readonly raw;
+ private readonly prefixFormat?;
+ private readonly prefixLength;
+ private readonly timestampFormat;
+ /**
+ * Last character emitted.
+ * If `undefined`, then nothing has been logged yet.
+ */
+ private lastChar?;
+ /**
+ * Observable that emits when there's been output logged.
+ * If `command` is is `undefined`, then the log is for a global event.
+ */
+ readonly output: Rx.Subject<{
+ command: Command | undefined;
+ text: string;
+ }>;
+ constructor({ hide, prefixFormat, prefixLength, raw, timestampFormat, }: {
+ /**
+ * Which command(s) should have their output hidden.
+ */
+ hide?: CommandIdentifier | CommandIdentifier[];
+ /**
+ * Whether output should be formatted to include prefixes and whether "event" logs will be
+ * logged.
+ */
+ raw?: boolean;
+ /**
+ * The prefix format to use when logging a command's output.
+ * Defaults to the command's index.
+ */
+ prefixFormat?: string;
+ /**
+ * How many characters should a prefix have at most, used when the prefix format is `command`.
+ */
+ prefixLength?: number;
+ /**
+ * Date format used when logging date/time.
+ * @see https://date-fns.org/v2.0.1/docs/format
+ */
+ timestampFormat?: string;
+ });
+ private shortenText;
+ private getPrefixesFor;
+ getPrefix(command: Command): string;
+ colorText(command: Command, text: string): string;
+ /**
+ * Logs an event for a command (e.g. start, stop).
+ *
+ * If raw mode is on, then nothing is logged.
+ */
+ logCommandEvent(text: string, command: Command): void;
+ logCommandText(text: string, command: Command): void;
+ /**
+ * Logs a global event (e.g. sending signals to processes).
+ *
+ * If raw mode is on, then nothing is logged.
+ */
+ logGlobalEvent(text: string): void;
+ /**
+ * Logs a table from an input object array, like `console.table`.
+ *
+ * Each row is a single input item, and they are presented in the input order.
+ */
+ logTable(tableContents: Record<string, unknown>[]): void;
+ log(prefix: string, text: string, command?: Command): void;
+ emit(command: Command | undefined, text: string): void;
+}
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage