Project Init

This commit is contained in:
Muluhabt
2026-05-29 15:23:46 +03:00
commit 2fbc557aac
67387 changed files with 6063341 additions and 0 deletions

61
node_modules/@rspack/core/dist/logging/Logger.d.ts generated vendored Normal file
View File

@@ -0,0 +1,61 @@
/**
* The following code is modified based on
* https://github.com/webpack/webpack/blob/4b4ca3b/lib/logging/Logger.js
*
* MIT Licensed
* Author Tobias Koppers @sokra
* Copyright (c) JS Foundation and other contributors
* https://github.com/webpack/webpack/blob/main/LICENSE
*/
export declare const LogType: Readonly<{
error: "error";
warn: "warn";
info: "info";
log: "log";
debug: "debug";
trace: "trace";
group: "group";
groupCollapsed: "groupCollapsed";
groupEnd: "groupEnd";
profile: "profile";
profileEnd: "profileEnd";
time: "time";
clear: "clear";
status: "status";
cache: "cache";
}>;
export declare function getLogTypeBitFlag(type: LogTypeEnum): number;
export declare function getLogTypesBitFlag(types: LogTypeEnum[]): number;
export type LogTypeEnum = (typeof LogType)[keyof typeof LogType];
declare const LOG_SYMBOL: unique symbol;
declare const TIMERS_SYMBOL: unique symbol;
declare const TIMERS_AGGREGATES_SYMBOL: unique symbol;
export type LogFunction = (type: LogTypeEnum, args: any[]) => void;
export type GetChildLogger = (name: string | (() => string)) => Logger;
export declare class Logger {
getChildLogger: GetChildLogger;
[LOG_SYMBOL]: any;
[TIMERS_SYMBOL]: any;
[TIMERS_AGGREGATES_SYMBOL]: any;
constructor(log: LogFunction, getChildLogger: GetChildLogger);
error(...args: any[]): void;
warn(...args: any[]): void;
info(...args: any[]): void;
log(...args: any[]): void;
debug(...args: string[]): void;
assert(assertion: any, ...args: any[]): void;
trace(): void;
clear(): void;
status(...args: any[]): void;
group(...args: any[]): void;
groupCollapsed(...args: any[]): void;
groupEnd(...args: any[]): void;
profile(label: any): void;
profileEnd(label: any): void;
time(label: any): void;
timeLog(label: any): void;
timeEnd(label: any): void;
timeAggregate(label: any): void;
timeAggregateEnd(label: any): void;
}
export {};

View File

@@ -0,0 +1,35 @@
/**
* The following code is modified based on
* https://github.com/webpack/webpack/blob/4b4ca3b/lib/logging/createConsoleLogger.js
*
* MIT Licensed
* Author Tobias Koppers @sokra
* Copyright (c) JS Foundation and other contributors
* https://github.com/webpack/webpack/blob/main/LICENSE
*/
import type { FilterTypes } from "../config";
import { type LogTypeEnum } from "./Logger";
export type FilterFunction = (ident: string) => boolean;
export type LoggerConsole = {
clear: () => void;
trace: () => void;
info: (...args: any[]) => void;
log: (...args: any[]) => void;
warn: (...args: any[]) => void;
error: (...args: any[]) => void;
debug?: (...args: any[]) => void;
group?: (...args: any[]) => void;
groupCollapsed?: (...args: any[]) => void;
groupEnd?: (...args: any[]) => void;
status?: (...args: any[]) => void;
profile?: (...args: any[]) => void;
profileEnd?: (...args: any[]) => void;
logTime?: (...args: any[]) => void;
};
export type LoggerOptions = {
level: "none" | "error" | "warn" | "info" | "log" | "verbose" | boolean;
debug: FilterTypes | boolean;
console: LoggerConsole;
};
declare const createConsoleLogger: ({ level, debug, console }: LoggerOptions) => (name: string, type: LogTypeEnum, args: any[]) => void;
export { createConsoleLogger };

View File

@@ -0,0 +1,16 @@
/**
* The following code is modified based on
* https://github.com/webpack/webpack/blob/4b4ca3b/lib/logging/truncateArgs.js
*
* MIT Licensed
* Author Tobias Koppers @sokra
* Copyright (c) JS Foundation and other contributors
* https://github.com/webpack/webpack/blob/main/LICENSE
*/
/**
* @param args items to be truncated
* @param maxLength maximum length of args including spaces between
* @returns truncated args
*/
declare const truncateArgs: (args: any[], maxLength: number) => string[];
export { truncateArgs };