Dashboard › cli › Distillation
dfe6be90-174b-4b1d-8719-0bed3a3bf567["lore_tm_v1_jwoYu0oE5_4CiZUrX4G2zggcwkCcY_v07PKcDFhMAWc","lore_tm_v1_B4b912YXeezTqho1Aw3lNRR_oOWCf1vEQx773pbFT8M","lore_tm_v1_NQrZVjC8hBEqawk5JrST1ukRew9xKbQ98wWg2LnNgko","lore_tm_v1_1g-5gKt5nlp58VnYQVNk5QHfogfilaLcE3s08cxpJTc","lore_tm_v1_6yh4F747p7aUrdBhm7eLc5abnz_QuL5NamFH2ZQop5Y","lore_tm_v1_DDk2hsExeZGevuv_UZtb0yxnkwhmZHl0UpgXKLiq9zM","lore_tm_v1_qgfLtpjbEDXWFgMee-fdZjb6627VwRZiFTq4NSD_biM","lore_tm_v1_olnMh73EbjXb-G7VQkTHQe8NG2oYFLY-RVRbrA47Gh0"]
packages/cli/node_modules contains exactly 48 entries, including binpatch/, fflate/, semver/, typescript/, vitest/, tsx/, @sentry/, and node-sqlite3-wasm/.packages/cli/node_modules/binpatch contains dist/, LICENSE, package.json, and README.md; its dist/ directory contains index.d.ts, index.js, and index.js.map.packages/cli/node_modules/binpatch/dist/index.js found exactly 22 matches related to loading binaries/chains, cache handling, SHA-256 validation, source adapters, and patch application.binpatch defines CACHE_MAX_AGE_MS = 7 * 24 * 60 * 60 * 1e3, giving cached patch-chain metadata a 7-day maximum age.binpatch cache internals include chainFileName(fromVersion, toVersion), loadAllChainMetas(cacheDir), loadCachedChain(cacheDir, currentVersion, targetVersion), and makeCache(cacheDir).loadCachedChain(cacheDir, currentVersion, targetVersion) initializes expectedSha256 to "", obtains it from metadata where meta.toVersion === targetVersion && meta.expectedSha256, returns null if no expected hash exists or required cached data is unavailable, and otherwise returns { patches, totalSize, expectedSha256 }.resolveAndApply(opts) can resolve a chain from cache and reports that via telemetry?.onResolved?.({ source: "cache", chain: cached }); its patching workflow emits a verification phase with progress({ type: "phase", phase: "verify" }).binpatch compares the calculated sha256 with chain.expectedSha256 and raises SHA-256 mismatch after patching: got ${sha256}, expected ${chain.expectedSha256} when they differ.getStableTargetSha256(targetRelease, binaryName); absence of that digest returns { failure: "malformed_chain" }, while success returns { patchUrls, expectedSha256, steps }.binpatch exposes both ghcrSource(config) and githubReleaseSource(config) source adapters.binpatch network logic defines BLOB_TIMEOUT = 3e4; retryable network-message detection includes "timeout", "econnreset", "econnrefused", "network", and "fetch failed".packages/cli/node_modules/binpatch/dist/index.js exports BinpatchError, MAX_NIGHTLY_CHAIN_DEPTH, MAX_OUTPUT_SIZE, MAX_STABLE_CHAIN_DEPTH, OciClient, PATCH_TAG_PREFIX, SIZE_THRESHOLD_RATIO, addDiffChunk, applyPatch, applyPatchChainInMemory, applyPatchToMemory, chainFileName, extractSha256, extractStableChain, filterAndSortChainTags, getPatchFromVersion, getPatchTargetSha256, getStableTargetSha256, ghcrSource, githubReleaseSource, makeCache, offtin, parsePatchHeader, patchFileName, resolveAndApply, safeProgress, and validateChainStep.