mirror of
https://github.com/stablyai/orca.git
synced 2026-11-03 18:47:40 +00:00
* feat(ssh): let a nodejs.org mirror serve the pinned Node on both machines * fix(ssh): share one deadline across every host download URL * fix(ssh): give each host download URL its share of the deadline and cap its size * refactor(ssh): one tool per host, labelled sources and a portable wget watchdog * fix(ssh): quote this computer's short download reason in the combined error * fix(ssh): fetch only validated mirror URLs on the host * fix(ssh): drop an empty query or fragment from the mirror URL * fix(ssh): keep a cancel or a local error as it is after the mirror fails
16 lines
639 B
TypeScript
16 lines
639 B
TypeScript
/** This computer's Node mirror: the Settings value, else the conventional environment variables. */
|
|
import { resolveNodeDistMirror } from '../../shared/node-dist-mirror'
|
|
|
|
let readMirrorSetting: (() => string | undefined) | null = null
|
|
|
|
/** Registered once the settings store exists; read on every download, so edits apply at once. */
|
|
export function setNodeDistMirrorSettingReader(read: (() => string | undefined) | null): void {
|
|
readMirrorSetting = read
|
|
}
|
|
|
|
export function configuredNodeDistMirror(
|
|
env: Record<string, string | undefined> = process.env
|
|
): string | null {
|
|
return resolveNodeDistMirror(readMirrorSetting?.(), env)
|
|
}
|