@dev-build-deploy/dep5-it
Version:
Debian Copyright (dep5) management library
82 lines (81 loc) • 2.58 kB
TypeScript
/**
* Debian Copyright Header
* @interface IHeader
* @member format URI of the format specification
* @member upstreamName The name upstream uses for the software
* @member upstreamContact The preferred address(es) to reach the upstream project
* @member source An explanation from where the upstream source came from. Typically this would be a URL, but it might be a free-form explanation
* @member disclaimer Disclaimer message
* @member comment Additional comments
* @member license Software License
* @member copyright List of copyright statements
*/
interface IHeader {
/** URI of the format specification */
format: string;
/** The name upstream uses for the software */
upstreamName?: string;
/** The preferred address(es) to reach the upstream project */
upstreamContact?: string[];
/** An explanation from where the upstream source came from. Typically this would be a URL, but it might be a free-form explanation */
source?: string;
/** Disclaimer message */
disclaimer?: string;
/** Additional comments */
comment?: string;
/** Software License */
license?: string;
/** Copyright statements */
copyright?: string;
}
/**
* Debian File stanza
* @interface IFile
* @member files List of files (can contain wildcards)
* @member license Software License
* @member comment Additional comments
* @member copyright Copyright statements
*/
interface IFile {
/** List of files (can contain wildcards) */
files: string[];
/** Software License */
license: string;
/** Additional comments */
comment?: string;
/** Copyright statements */
copyright: string;
}
/** Debian Copyright
* @interface IDebianCopyright
* @member header Debian Copyright Header
* @member files List of file-stanzas
*/
interface IDebianCopyright {
/** Debian Copyright Header */
header: IHeader;
/** List of file-stanzas */
files: IFile[];
}
/**
* Debian Copyright
* @class DebianCopyright
*/
export declare class DebianCopyright implements IDebianCopyright {
header: IHeader;
files: IFile[];
constructor(header?: IHeader, files?: IFile[]);
/**
* Parse a debian/copyright file (.dep5)
* @param file Path to the file
* @returns Debian Copyright object
*/
static fromFile(file: string): DebianCopyright;
/**
* Returns the File stanza which matches the given file
* @param file File to match
* @returns File stanza which matches the given file
*/
getFileStanza(file: string): IFile | undefined;
}
export {};