HEX
Server: nginx/1.18.0
System: Linux test-ipsremont 5.4.0-214-generic #234-Ubuntu SMP Fri Mar 14 23:50:27 UTC 2025 x86_64
User: ips (1000)
PHP: 8.0.30
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/design.system/node_modules/@rushstack/node-core-library/lib/RealNodeModulePath.d.ts
/// <reference types="node" />
/// <reference types="node" />
import * as nodeFs from 'fs';
import * as nodePath from 'path';
/**
 * Arguments used to create a function that resolves symlinked node_modules in a path
 * @public
 */
export interface IRealNodeModulePathResolverOptions {
    fs?: Partial<Pick<typeof nodeFs, 'lstatSync' | 'readlinkSync'>>;
    path?: Partial<Pick<typeof nodePath, 'isAbsolute' | 'join' | 'resolve' | 'sep'>>;
}
/**
 * This class encapsulates a caching resolver for symlinks in node_modules directories.
 * It assumes that the only symlinks that exist in input paths are those that correspond to
 * npm packages.
 *
 * @remarks
 * In a repository with a symlinked node_modules installation, some symbolic links need to be mapped for
 * node module resolution to produce correct results. However, calling `fs.realpathSync.native` on every path,
 * as is commonly done by most resolvers, involves an enormous number of file system operations (for reference,
 * each invocation of `fs.realpathSync.native` involves a series of `fs.readlinkSync` calls, up to one for each
 * path segment in the input).
 *
 * @public
 */
export declare class RealNodeModulePathResolver {
    /**
     * Similar in function to `fs.realpathSync.native`, but assumes the only symlinks present are npm packages.
     *
     * @param input - A path to a file or directory, where the path separator is `${require('node:path').sep}`
     * @returns The real path to the input, resolving the node_modules symlinks in the path
     * @public
     */
    readonly realNodeModulePath: (input: string) => string;
    private readonly _cache;
    private readonly _fs;
    private readonly _path;
    constructor(options?: IRealNodeModulePathResolverOptions);
    /**
     * Clears the cache of resolved symlinks.
     * @public
     */
    clearCache(): void;
    /**
     * Tries to read a symbolic link at the specified path.
     * If the input is not a symbolic link, returns undefined.
     * @param link - The link to try to read
     * @returns The target of the symbolic link, or undefined if the input is not a symbolic link
     */
    private _tryReadLink;
}
//# sourceMappingURL=RealNodeModulePath.d.ts.map