diff --git a/src/amo.ts b/src/amo.ts index bab56f2..569636b 100644 --- a/src/amo.ts +++ b/src/amo.ts @@ -6,21 +6,27 @@ type Compatibility = Record | Array; type License = | "all-rights-reserved" | "MPL-2.0" - | "GPL-2.0-or-later" - | "GPL-3.0-or-later" - | "LGPL-2.1-or-later" - | "LGPL-3.0-or-later" + | "Apache-2.0" + | "GPL-2.0-only" + | "GPL-3.0-only" + | "LGPL-2.1-only" + | "LGPL-3.0-only" + | "AGPL-3.0-only" | "MIT" - | "BSD-2-Clause"; + | "BSD-2-Clause" + | "Unlicense"; export const LICENSE_NAMES = [ "all-rights-reserved", "MPL-2.0", - "GPL-2.0-or-later", - "GPL-3.0-or-later", - "LGPL-2.1-or-later", - "LGPL-3.0-or-later", + "Apache-2.0", + "GPL-2.0-only", + "GPL-3.0-only", + "LGPL-2.1-only", + "LGPL-3.0-only", + "AGPL-3.0-only", "MIT", "BSD-2-Clause", + "Unlicense", ]; export const isLicense = (license: string): license is License => { return LICENSE_NAMES.includes(license); diff --git a/src/index.ts b/src/index.ts index 9b53d19..0228820 100644 --- a/src/index.ts +++ b/src/index.ts @@ -28,7 +28,7 @@ async function run(): Promise { } if (typeof license !== "undefined" && !isLicense(license)) { throw new Error( - `Invalid license "${license}". Must be one of: ${Object.keys( + `Invalid license "${license}". Must be one of: ${Object.values( LICENSE_NAMES, ).join(", ")}`, );