@servant/servant
Version:
Servant builder for node modules.
27 lines (26 loc) • 1.21 kB
TypeScript
import { PackageJson, ServantJson } from "@servant/servant-data";
export interface NpmResult {
error: Error | null;
data: NpmData | null;
status: NpmStatus;
command: string;
time: string;
}
export declare enum NpmStatus {
OK = "ok",
Error = "error"
}
export interface NpmData {
audited: number;
added: number;
removed: number;
vulnerabilities: number;
package: string | null;
published: string | null;
}
export declare function install(packageJson: PackageJson.PackageJsonInfo, registryInfo?: ServantJson.RegistryInfo | null): Promise<NpmResult>;
export declare function update(packageJson: PackageJson.PackageJsonInfo, registryInfo?: ServantJson.RegistryInfo | null): Promise<NpmResult>;
export declare function pack(packageJson: PackageJson.PackageJsonInfo): Promise<NpmResult>;
export declare function publish(packageJson: PackageJson.PackageJsonInfo, tag?: string, access?: "public" | "restricted", registryInfo?: ServantJson.RegistryInfo | null): Promise<NpmResult>;
export declare function createNpmResult(command: string): NpmResult;
export declare function extract(files: Array<string>): [Array<string>, Array<string>];