Dashboard › cli › Distillation
4cf5443c-15c6-41ff-85ce-6c0ae2db9df0["lore_tm_v1_YZcFHvPhFp2acGU0Dg1uqSIQksui45CeB4T90J-FfYc","lore_tm_v1_2bgKt-iPNfq_XaX8LsjSiN5jI18car5q9kQZZ8IYw1E","lore_tm_v1_qpfXHZtePyI4QwBbopqYqeORGGKS6lqhTkTxvPeWfZo","lore_tm_v1_e98dkDCLLzxlKaMUzLX42v6RdeJwy8h04oGDo0Siijs","lore_tm_v1_kxnoQ2HVEjp630KFEwzHwrFq7c3INvXDKoFqu0f-DEk"]
package.json for the latest scripts before running project commands; all commands run from the repository root.devDependencies, never dependencies, because everything is bundled at build time via esbuild; CI enforces this with pnpm run check:deps.pnpm add -D <package>, including the -D flag.pnpm install to install dependencies, pnpm run build:all to build all platforms, and pnpm run test:e2e to run end-to-end tests.src/lib/command.ts.buildRouteMap from ../../lib/route-map.js, never directly from @stricli/core; the wrapper automatically injects standard subcommand aliases according to available route keys, including delete β remove, rm.isPlainOutput() uses precedence SENTRY_PLAIN_OUTPUT > NO_COLOR > FORCE_COLOR (TTY only) > !isTTY.awaited and their return values must not be forgotten.async/await over promise chains, require appropriate try-catch error handling, and prohibit async functions as Promise executors.npx ultracite fix for formatting/fixes, npx ultracite check for issue checking, and npx ultracite doctor for setup diagnosis. npx ultracite fix should be run before committing.unknown over any; use as const for immutable/literal values; prefer TypeScript narrowing over assertions; extract magic numbers into named constants; use arrow functions for callbacks/short functions; prefer for...of over .forEach() and indexed loops; use ?., ??, template literals, and destructuring; default to const, use let only for reassignment, and never use var.console.log, debugger, and alert from production code; throw descriptive Error objects rather than strings or other values; do not catch merely to rethrow; prefer early returns for error cases.it() or test() blocks; async tests should use async/await rather than done callbacks; committed code must not contain .only or .skip; test suites should avoid excessive describe nesting.packages/cli/test/lib/upgrade.test.ts contains dedicated coverage for fetchLatestFromGitHub(), fetchLatestVersion(), versionExists(), getBinaryDownloadUrl(), fetchLatestNightlyVersion(), and downloadBinaryToTemp(), including stable/nightly routing, package-manager variants, network failures, abort behavior, nightly version existence, offline errors, and download-integrity verification.packages/cli/src/lib/version-check.ts awaits prefetchNightlyPatches(latestVersion, signal) or prefetchStablePatches(latestVersion, signal) and selects between awaited fetchLatestNightlyVersion(signal) and fetchLatestFromGitHub(signal).packages/cli/src/lib/upgrade.ts uses fetchManifest(token, \nightly-${version}`)for version-specific nightly manifests, locates artifacts withfindLayerByFilename(manifest, filename), and downloads them with downloadNightlyBlob(token, layer.digest)`.packages/cli/src/lib/upgrade.ts line 943 explicitly returns the awaited result of attemptDeltaUpgrade(...) using return await.