@sizium/core
Version:
Get the actual size of any local or remote package
31 lines (28 loc) • 922 B
TypeScript
import { b as PackageSuper, S as SiziumResponse } from '../shared/core.D1SNe5o-.js';
import '@schemastore/package';
/**
* Represents the class to get the `true` package size from **local** enviroment.
*
* @example
* // Directory input
* const size = new SiziumLocal( './' )
* const data = await size.get()
* @example
* // package.json input
* const size = new SiziumLocal( './package.json' )
* const data = await size.get()
* @example
* // remote package.json input
* const size = new SiziumLocal( 'https://raw.githubusercontent.com/chalk/chalk/refs/heads/main/package.json' )
* const data = await size.get()
* @example
* // package.json string input
* const pkg = {name: 'chalk', ... }
* const size = new SiziumLocal(JSON.stringify(pkg) )
* const data = await size.get()
*/
declare class SiziumLocal extends PackageSuper {
#private;
get(): Promise<SiziumResponse>;
}
export { SiziumLocal };