Skip to content

Commit c17b4bc

Browse files
committed
wip
Signed-off-by: Jan Kowalleck <[email protected]>
1 parent 1dcad1a commit c17b4bc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/utils/licenseUtility.node.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export interface PathUtils<P extends string> {
3838
join: (...paths: P[]) => P
3939
}
4040

41-
export interface FetchedAttachmentResult<P extends string> {
41+
export interface FileAttachmentResult<P extends string> {
4242
filePath: P
4343
file: P
4444
text: Attachment
@@ -48,7 +48,7 @@ const LICENSE_FILENAME_PATTERN = /^(?:UN)?LICEN[CS]E|.\.LICEN[CS]E$|^NOTICE$/i
4848

4949
export type ErrorReporter = (e:Error) => any
5050

51-
export class LicenseEvidenceFetcher<P extends string = string> {
51+
export class LicenseEvidenceGatherer<P extends string = string> {
5252
readonly #fs: FsUtils<P>
5353
readonly #path: PathUtils<P>
5454

@@ -67,7 +67,7 @@ export class LicenseEvidenceFetcher<P extends string = string> {
6767
/* eslint-enable @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-require-imports */
6868
}
6969

70-
* fetchAsAttachment (prefixPath: P, onError: ErrorReporter = noop): Generator<FetchedAttachmentResult<P>> {
70+
* getFileAttachments (prefixPath: P, onError: ErrorReporter = noop): Generator<FileAttachmentResult<P>> {
7171
const files = this.#fs.readdirSync(prefixPath) // may throw
7272
for (const file of files) {
7373
if (!LICENSE_FILENAME_PATTERN.test(file)) {

0 commit comments

Comments
 (0)