@dev-build-deploy/reuse-it
Version:
(ReUSE) Copyright and License management library
54 lines (53 loc) • 1.6 kB
TypeScript
declare const fileTypes: string[];
type IFileType = (typeof fileTypes)[number];
/**
* SPDX File
* @member SPDXID The SPDX ID of the file
* @member annotations Annotations
* @member checksum Checksums
* @member comment Comments
* @member contributors Contributors
* @member fileName The file name
* @member fileTypes The file types
* @member licenseComments License comments
* @member licenseConcluded License concluded
* @member licenseInfoInFiles License information in files
* @member noticeText Notices
* @member attributionTexts Attribution texts
*/
export declare class SpdxFile {
SPDXID: string;
annotations?: {
annotationDate: string;
annotationType: string;
annotator: string;
comment?: string;
}[];
checksums: {
algorithm: string;
checksumValue: string;
}[];
comment?: string;
copyrightText?: string;
fileContributors: string[];
fileName: string;
fileTypes: IFileType[];
licenseComments?: string;
licenseConcluded: string;
licenseInfoInFiles: string[];
noticeText?: string;
attributionTexts: string[];
constructor(fileName: string);
/**
* Create a SPDX file from the provided file path, and update it with information from (in order of precedence):
*
* 1. The Debian Configuration file
* 2. The .license file
* 3. File tags provided in comment blocks in the file
*
* @param file The file path to create the SPDX file from
* @returns The SPDX file
*/
static fromFile(file: string): Promise<SpdxFile>;
}
export {};