evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
Configure dependency-wide search defaults for ports and socket paths, then allocate free resources using those defaults without per-call overrides.
reservePorts(1) returns [4100] and a second call returns [4101], both without passing per-call overrides. @testreservePorts(3) yields the three unique ports in ascending order; requesting a fourth port afterwards rejects due to exhaustion of the configured window. @test/tmp/app.sock and pre-creating that path to simulate a collision, reserveSocket() resolves to the next free path using the same prefix. @testexport async function configureSearch(options);
/**
* @param {{ basePort?: number, highestPort?: number, basePath?: string }} options
* Applies global search defaults for ports and sockets. Rejects on invalid bounds.
*/
export async function reservePorts(count);
/**
* @param {number} count - Number of ports to obtain using the configured defaults.
* @returns {Promise<number[]>} - Unique available ports in ascending order.
*/
export async function reserveSocket();
/**
* @returns {Promise<string>} - Available socket path derived from the configured base path.
*/Locates free TCP ports and socket paths using configurable global defaults.