/** * CJS require hook: the cluster's dev webpack config externalizes every real * node_modules package (`commonjs `), so at pod runtime `pg`, * `ioredis`, `bullmq` and `@nestjs/core` arrive through `Module._load`. We * intercept the EXACT package names and mutate their exports IN PLACE * (prototype/static patches, never proxies) — ESM `import` of the same CJS * package yields the same exports object, so both module systems observe the * patched behavior. */ /** * A tap returns `true` once it actually patched its target, `false` when the * exports it needs aren't there YET. The distinction matters because of * CIRCULAR requires: `@nestjs/core` requires itself while loading, so the * hook fires mid-load with a PARTIALLY populated exports object * (`NestFactory` still undefined). Marking that attempt as done would * permanently skip the tap — instead a `false` keeps the request eligible * and the next (post-load, fully populated) require installs it. */ export type ModuleTap = (exportsObject: unknown) => boolean | void; export declare function installRequireHook(taps: Record): void;