StaticcalcOptionalexclude: string[]StaticcamelConverts a camelCase string to snake_case.
The camelCase string to convert.
The converted snake_case string. If the input string is empty, the same empty string is returned.
StaticcreateCreates multiple folders specified by the given paths.
The list of directory paths to be created.
Returns true if all folders were successfully created, otherwise false if some already exist.
StaticcreateEnsures that the specified folder exists by creating it if it does not.
The filesystem path of the folder to verify or create.
true if the folder was created during this call; false if the folder already existed.
StaticdownloadDownloads a file from the specified URL and writes it to the given path.
The URL from which to download the file.
The destination file path without extension. The file extension is derived from the response MIME type.
OptionalextMap: Map<string, string> = MineTypeMap
A map that associates MIME types with file extensions. Used to determine the file extension to append.
OptionalfExt: string
override extension
A promise that resolves to an object containing the file name, size in bytes, and MIME type, or null if the download fails.
StaticentityReturns the relation metadata for a given entity.
The entity instance for which to retrieve relation metadata.
Optionalschema: string
Optional database schema name to associate with the relation.
An object containing:
key: the fixed key name 'e_id'.relation: the table name derived from the entity.schema: the optional schema name if provided.StaticentityReturns the column properties for a relation to the specified entity.
The entity to which the column will reference.
Optionalschema: string
Optional schema name for the foreign key.
An object containing the column data type and foreign key definition.
StaticexecExecutes the specified command with optional arguments and options.
The command to execute.
Optionalargs: string[]
Optional list of arguments to pass to the command.
Optionaloptions: ExecutableOptions
Optional execution options.
A promise that resolves with the execution result.
StaticgetRetrieves the class and table names for the supplied entity.
The entity instance from which to extract metadata.
An object containing the class name and the corresponding table name derived from the entity metadata.
StaticgetReturns the current timestamp as a formatted string.
A string in the format "YYYY-MM-DD HH:mm:ss" representing the current date and time.
StaticnumFormats a number as a two‑digit string. If the provided number is less than 10, a leading zero is added.
The number to format.
The formatted number as a string, padded with a leading zero if necessary.
StaticpromiseExecutes a promise with a maximum wait time. If the promise does not resolve or reject before the specified timeout, the returned promise is rejected with an Error.
The promise to execute.
Optionalms: number = 45000
The maximum number of milliseconds to wait before timing out.
A promise that resolves or rejects with the original promise's outcome, or rejects with a timeout error if the specified time elapses.
StaticremoveRemoves the folder at the given path if it exists.
The file system path of the folder to delete.
Returns true after attempting the removal. The method performs the deletion only when the folder is present; otherwise it simply returns true.
StaticsleepPauses execution for the specified duration.
The number of milliseconds to wait before resolving the promise.
A promise that resolves after the specified delay.
StaticworkerCreates a worker factory that processes an array of items using a pool of workers.
A promise that resolves when all workers have finished processing, with the value returned by workerFactoryWithProducer.
StaticworkerCreates a set of concurrent workers that fetch items from a producer, process them with a consumer, and collects the results.
The type of data produced by the producer function.
The type of data produced by the consumer function.
The number of worker instances to run concurrently.
An async function that yields a WDat<T> object or null to indicate no more items.
An async function that receives a WDat<T> item and returns a processed WDat<F> object.
A promise that resolves to an array containing the F values extracted from the processed WDat<F> objects.
StaticworkerProcesses a stream of data asynchronously using a producer and a consumer.
The type of the input data produced by the producer.
The type of the output data produced by the consumer.
A function that asynchronously returns a WDat<T> instance or null when no
more items are available to process.
A function that consumes a WDat<T> object and asynchronously returns a
WDat<F> instance containing the processed data.
A map that will receive the results from the consumer. The key is the
i property of the WDat object and the value is the processed data.
Resolves when the producer has returned null and all produced items have
been consumed and stored in the provided map.
Utility class providing helper functions for timing, worker pools, file system operations, string manipulation, entity metadata handling, environment setup, command execution, and file downloading.