Skip to content

feat: centralized license evidence gatrhering #1162

@jkowalleck

Description

@jkowalleck

Gathering license evidence is a common feature of downstream users.
As a library, this should be centralized in here, so that maintenance efforts are minimized.

currently known implementations downstream:

related downstream issues


Requirements

license for evidence

  • have no acknowledgement -- they are observed
  • have a name that expresses their origin -- file: ${filePath}
  • have the full license texts as attachment
    • are base64 encoded, when auto-detected, just to be save
    • have an appropriate content type of text/...

files to take into account

  • /^LICEN[CS]E/i -- general file pattern
  • /.LICEN[CS]E$/i -- common file pattern for multi-license projects
  • /^NOTICE$/ -- file with this exact name is relevant in terms of Apache-2.0 license

text content type

like so

const MAP_TEXT_EXTENSION_MIMETYPE: Readonly<Record<string, MimeType>> = {
  '': 'text/plain', // our scope is text!
  '.csv': 'text/csv',
  '.htm': 'text/html',
  '.html': 'text/html',
  '.licence': 'text/plain',
  '.license': 'text/plain',
  '.md': 'text/markdown',
  '.rst': 'text/prs.fallenstein.rst',
  '.txt': 'text/plain',
  '.xml': 'text/xml' // not `application/xml` -- our scope is text!
} as const

additional license-file related file extensions

  • .apache
  • .apache2 <<- missing in most implementations
  • .bsd
  • .mit
  • .gpl

...

to be continued

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions