Addresses the round-2 Copilot review (both suppressed comments). - createPinnedAgent now takes the whole validated address list instead of a single IP, so Node's address-family fallback still works: a dual-stack host whose first address is unreachable (IPv6 on an IPv4-only network) connects via a later one. The set net.connect may choose from is exactly the prevalidated set, so the TOCTOU guarantee is unchanged. Empty input throws ProxyTargetError rather than pinning undefined. - Tests: dual-stack pass-through, the empty-list guard, and an end-to-end request where the first pinned address is a black hole (2001:db8::1) and the connection must complete via the second. - server/tsconfig.json excludes src/**/__tests__/** so the suite is no longer emitted into build/ and published with the package (verified: build/__tests__ is gone). tsconfig.test.json keeps the suite type-checked, and `npm test` runs it before vitest. Signed-off-by: cliffhall <cliff@futurescale.com>
12 lines
383 B
JSON
12 lines
383 B
JSON
// The build config excludes __tests__ so the suite never lands in the
|
|
// published `build/` output. This config exists only so the tests are still
|
|
// type-checked; it emits nothing and is run by `npm test`.
|
|
{
|
|
"extends": "./tsconfig.json",
|
|
"compilerOptions": {
|
|
"noEmit": true,
|
|
"types": ["node"]
|
|
},
|
|
"include": ["src/**/*"],
|
|
"exclude": ["node_modules", "packages"]
|
|
}
|