cobolget
Version:
COBOL Package Manager
63 lines (62 loc) • 2.04 kB
TypeScript
/// <reference types="node" />
export declare const API_AGENT = "cobolget";
export declare const MODULES_DIR = "modules";
export declare const MANIFEST_NAME = "modules.json";
export declare const LOCK_NAME = "modules-lock.json";
export declare const COPYBOOK_NAME = "modules.cpy";
export declare const LIBRARY_NAME = "modules.cbl";
export declare const MANIFEST_SCHEMA: string;
export declare const MANIFEST_INIT: {
$schema: string;
name: string;
description: string;
modules: any[];
dialect: string;
licenses: string[];
authors: string[];
dependencies: {};
"dependencies-debug": {};
scripts: {};
};
export interface IndexOptions {
token?: string;
organization?: string;
}
export interface DependencyOptions {
debug: boolean;
}
export interface ApiDependency {
isDebug: boolean;
package: string;
satisfies: string;
}
export interface ApiVersion {
tag: string;
name: string;
modules: Array<string>;
dialect: string;
dependencies: Array<ApiDependency>;
}
export interface ApiPackage {
name: string;
description: string;
url: string;
versions: Array<ApiVersion>;
}
export interface ApiError {
message: string;
}
export interface ApiRedirect {
url: string;
}
export declare function graph(name: string, packages?: Object): Promise<any>;
export declare function indexPackage(nameOrUrl: string, token?: string, name?: string): Promise<ApiPackage>;
export declare function getPackage(name: string): Promise<ApiPackage>;
export declare function getPackages(keyword: string): Promise<ApiPackage[]>;
export declare function validateManifest(manifest: string): Promise<string>;
export declare function downloadZip(name: string, version: string, token?: string): Promise<Buffer>;
declare type ViewTableRow = string[];
declare type ViewTable = ViewTableRow[];
export declare function wordTrim(text: string, width?: number, indicator?: string): string;
export declare function tableView(table: ViewTable, spacing?: number): string[];
export {};