Programmatic API for managing npm organization memberships and roles
74
A small helper that reports and cleans package manager caches for installed modules and the bundled command runner. It should lean on the dependency's built-in cache tooling rather than reimplementing cache semantics.
cacheRoot override. @testnpm, command-runner, or both) and reports bytes and entries removed. The command-runner cache may be cleared without touching the npm cache when requested. @test@generates
export type CacheTarget = "npm" | "npx" | "all";
export interface CachePaths {
npm: string;
npx: string;
}
export interface CacheDetails {
path: string;
sizeBytes: number;
entries: number;
verified: boolean;
}
export interface InspectOptions {
cacheRoot?: string;
includeNpx?: boolean;
}
export interface PurgeOptions {
cacheRoot?: string;
target?: CacheTarget;
dryRun?: boolean;
}
export function locateCaches(opts?: { cacheRoot?: string }): CachePaths;
export function inspectCaches(opts?: InspectOptions): Promise<{
npm: CacheDetails;
npx?: CacheDetails;
}>;
export function purgeCaches(opts?: PurgeOptions): Promise<{
target: CacheTarget;
removedBytes: number;
removedEntries: number;
dryRun: boolean;
}>;Provides commands for discovering, verifying, and cleaning cache directories used by the package manager and bundled command runner.
Install with Tessl CLI
npx tessl i tessl/npm-libnpmorgdocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10