MCPcopy Create free account
hub / github.com/anus-dev/ANUS / validateDnsResolutionOrder

Function validateDnsResolutionOrder

packages/cli/src/anus.tsx:52–67  ·  view source on GitHub ↗
(
  order: string | undefined,
)

Source from the content-addressed store, hash-verified

50import { SettingsContext } from './ui/contexts/SettingsContext.js';
51
52export function validateDnsResolutionOrder(
53 order: string | undefined,
54): DnsResolutionOrder {
55 const defaultValue: DnsResolutionOrder = 'ipv4first';
56 if (order === undefined) {
57 return defaultValue;
58 }
59 if (order === 'ipv4first' || order === 'verbatim') {
60 return order;
61 }
62 // We don't want to throw here, just warn and use the default.
63 console.warn(
64 `Invalid value for dnsResolutionOrder in settings: "${order}". Using default "${defaultValue}".`,
65 );
66 return defaultValue;
67}
68
69function getNodeMemoryArgs(config: Config): string[] {
70 const totalMemoryMB = os.totalmem() / (1024 * 1024);

Callers 2

anus.test.tsxFile · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected