MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / resolveDownloadBase

Function resolveDownloadBase

pkg/npm/install.js:100–106  ·  view source on GitHub ↗
(env = process.env)

Source from the content-addressed store, hash-verified

98// CBM_DOWNLOAD_URL replaces the release download base (for testing), with
99// install.sh's policy: HTTPS, or plain HTTP to an exact loopback authority.
100function resolveDownloadBase(env = process.env) {
101 const override = env.CBM_DOWNLOAD_URL;
102 if (!override) return { base: DEFAULT_DOWNLOAD_BASE, loopback: false };
103 if (override.startsWith('https://')) return { base: override, loopback: false };
104 if (LOOPBACK_HTTP_URL.test(override)) return { base: override, loopback: true };
105 throw new Error(`Refusing non-HTTPS download URL (CBM_DOWNLOAD_URL): ${override}`);
106}
107
108function validateExactTarMemberListing(listing, expectedNames) {
109 if (listing.includes('\0')) {

Callers 2

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected