@seedprotocol/licensing 0.0.0-stage → 0.8.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/README.md +60 -2
  3. package/dist/canonicalJson.d.ts +11 -0
  4. package/dist/canonicalJson.d.ts.map +1 -0
  5. package/dist/catalog/cc/chooser.d.ts +4 -0
  6. package/dist/catalog/cc/chooser.d.ts.map +1 -0
  7. package/dist/catalog/cc/index.d.ts +3 -0
  8. package/dist/catalog/cc/index.d.ts.map +1 -0
  9. package/dist/catalog/cc/modules.d.ts +4 -0
  10. package/dist/catalog/cc/modules.d.ts.map +1 -0
  11. package/dist/catalog/cc/urls.d.ts +21 -0
  12. package/dist/catalog/cc/urls.d.ts.map +1 -0
  13. package/dist/catalog/cc.js +251 -0
  14. package/dist/catalog/cc.js.map +1 -0
  15. package/dist/catalog/chooser.d.ts +27 -0
  16. package/dist/catalog/chooser.d.ts.map +1 -0
  17. package/dist/catalog/createLicenseCatalog.d.ts +7 -0
  18. package/dist/catalog/createLicenseCatalog.d.ts.map +1 -0
  19. package/dist/catalog/types.d.ts +42 -0
  20. package/dist/catalog/types.d.ts.map +1 -0
  21. package/dist/deed/en.d.ts +10 -0
  22. package/dist/deed/en.d.ts.map +1 -0
  23. package/dist/deed/renderDeed.d.ts +33 -0
  24. package/dist/deed/renderDeed.d.ts.map +1 -0
  25. package/dist/deed/rules.d.ts +19 -0
  26. package/dist/deed/rules.d.ts.map +1 -0
  27. package/dist/deed/summarySentence.d.ts +9 -0
  28. package/dist/deed/summarySentence.d.ts.map +1 -0
  29. package/dist/errors.d.ts +22 -0
  30. package/dist/errors.d.ts.map +1 -0
  31. package/dist/fromUrl.d.ts +7 -0
  32. package/dist/fromUrl.d.ts.map +1 -0
  33. package/dist/hash.d.ts +8 -0
  34. package/dist/hash.d.ts.map +1 -0
  35. package/dist/index.d.ts +19 -0
  36. package/dist/index.d.ts.map +1 -0
  37. package/dist/index.js +204 -0
  38. package/dist/index.js.map +1 -0
  39. package/dist/spdx/list.generated.d.ts +5 -0
  40. package/dist/spdx/list.generated.d.ts.map +1 -0
  41. package/dist/spdx/parse.d.ts +33 -0
  42. package/dist/spdx/parse.d.ts.map +1 -0
  43. package/dist/terms.d.ts +102 -0
  44. package/dist/terms.d.ts.map +1 -0
  45. package/dist/urls-DDyEMdyz.js +337 -0
  46. package/dist/urls-DDyEMdyz.js.map +1 -0
  47. package/dist/validate.d.ts +20 -0
  48. package/dist/validate.d.ts.map +1 -0
  49. package/package.json +72 -4
  50. package/terms.schema.json +174 -0
@@ -0,0 +1,337 @@
1
+ import { sha256 as e } from "@noble/hashes/sha2";
2
+ import { bytesToHex as t, utf8ToBytes as n } from "@noble/hashes/utils";
3
+ //#region src/errors.ts
4
+ var r = class extends Error {
5
+ errors;
6
+ constructor(e) {
7
+ super(`Invalid license terms: ${e.map((e) => `${e.path || "(root)"} ${e.message}`).join("; ")}`), this.name = "InvalidLicenseTermsError", this.errors = e;
8
+ }
9
+ }, i = class extends Error {
10
+ locale;
11
+ constructor(e) {
12
+ super(`No deed template for locale "${e}"; only "en" is available`), this.name = "UnsupportedLocaleError", this.locale = e;
13
+ }
14
+ }, a = class extends Error {
15
+ path;
16
+ constructor(e, t) {
17
+ super(`Can't write canonical JSON at ${e || "(root)"}: ${t}`), this.name = "CanonicalJsonError", this.path = e;
18
+ }
19
+ };
20
+ //#endregion
21
+ //#region src/canonicalJson.ts
22
+ function o(e) {
23
+ return s(e, "");
24
+ }
25
+ function s(e, t) {
26
+ if (e === null) return "null";
27
+ switch (typeof e) {
28
+ case "string": return JSON.stringify(e);
29
+ case "boolean": return e ? "true" : "false";
30
+ case "number":
31
+ if (!Number.isSafeInteger(e)) throw new a(t, `${e} is not a safe integer`);
32
+ return Object.is(e, -0) ? "0" : String(e);
33
+ case "object": break;
34
+ default: throw new a(t, `${typeof e} is not JSON`);
35
+ }
36
+ if (Array.isArray(e)) {
37
+ let n = [];
38
+ for (let r = 0; r < e.length; r++) {
39
+ if (!(r in e)) throw new a(`${t}[${r}]`, "hole in a sparse array");
40
+ if (e[r] === void 0) throw new a(`${t}[${r}]`, "undefined in an array");
41
+ n.push(s(e[r], `${t}[${r}]`));
42
+ }
43
+ return `[${n.join(",")}]`;
44
+ }
45
+ let n = Object.getPrototypeOf(e);
46
+ if (n !== Object.prototype && n !== null) throw new a(t, "not a plain object");
47
+ let r = e;
48
+ return `{${Object.keys(r).filter((e) => r[e] !== void 0).sort().map((e) => `${JSON.stringify(e)}:${s(r[e], t ? `${t}.${e}` : e)}`).join(",")}}`;
49
+ }
50
+ //#endregion
51
+ //#region src/spdx/list.generated.ts
52
+ var c = "3.29.0", l = /* @__PURE__ */ "0BSD,3D-Slicer-1.0,AAL,ADSL,AFL-1.1,AFL-1.2,AFL-2.0,AFL-2.1,AFL-3.0,AGPL-1.0,AGPL-1.0-only,AGPL-1.0-or-later,AGPL-3.0,AGPL-3.0-only,AGPL-3.0-or-later,ALGLIB-Documentation,AMD-newlib,AMDPLPA,AML,AML-glslang,AMPAS,ANTLR-PD,ANTLR-PD-fallback,APAFML,APL-1.0,APSL-1.0,APSL-1.1,APSL-1.2,APSL-2.0,ASWF-Digital-Assets-1.0,ASWF-Digital-Assets-1.1,Abstyles,AdaCore-doc,Adobe-2006,Adobe-Display-PostScript,Adobe-Glyph,Adobe-Utopia,Advanced-Cryptics-Dictionary,Afmparse,Aladdin,Apache-1.0,Apache-1.1,Apache-2.0,App-s2p,Arphic-1999,Artistic-1.0,Artistic-1.0-Perl,Artistic-1.0-cl8,Artistic-2.0,Artistic-dist,Aspell-RU,BOLA-1.1,BSD-1-Clause,BSD-2-Clause,BSD-2-Clause-Darwin,BSD-2-Clause-FreeBSD,BSD-2-Clause-NetBSD,BSD-2-Clause-Patent,BSD-2-Clause-Views,BSD-2-Clause-first-lines,BSD-2-Clause-pkgconf-disclaimer,BSD-2-Clause-pos-unchanged,BSD-3-Clause,BSD-3-Clause-Attribution,BSD-3-Clause-Clear,BSD-3-Clause-HP,BSD-3-Clause-LBNL,BSD-3-Clause-Modification,BSD-3-Clause-No-Military-License,BSD-3-Clause-No-Nuclear-License,BSD-3-Clause-No-Nuclear-License-2014,BSD-3-Clause-No-Nuclear-Warranty,BSD-3-Clause-Open-MPI,BSD-3-Clause-OpenWebUI,BSD-3-Clause-Sun,BSD-3-Clause-Tso,BSD-3-Clause-acpica,BSD-3-Clause-flex,BSD-4-Clause,BSD-4-Clause-Shortened,BSD-4-Clause-UC,BSD-4.3RENO,BSD-4.3TAHOE,BSD-Advertising-Acknowledgement,BSD-Attribution-HPND-disclaimer,BSD-Inferno-Nettverk,BSD-Mark-Modifications,BSD-Protection,BSD-Source-Code,BSD-Source-Code-no-disclaimer,BSD-Source-alt-GPL,BSD-Source-beginning-file,BSD-Systemics,BSD-Systemics-W3Works,BSD-ask-to-endorse,BSL-1.0,BUSL-1.1,Baekmuk,Bahyph,Barr,Beerware,BitTorrent-1.0,BitTorrent-1.1,Bitstream-Charter,Bitstream-Vera,BlueOak-1.0.0,Boehm-GC,Boehm-GC-without-fee,Borceux,Brian-Gladman-2-Clause,Brian-Gladman-3-Clause,Brian-Gladman-3-Clause-no-conversion,Buddy,Bugroff,C-UDA-1.0,CAL-1.0,CAL-1.0-Combined-Work-Exception,CAPEC-tou,CATOSL-1.1,CC-BY-1.0,CC-BY-2.0,CC-BY-2.5,CC-BY-2.5-AU,CC-BY-3.0,CC-BY-3.0-AT,CC-BY-3.0-AU,CC-BY-3.0-DE,CC-BY-3.0-IGO,CC-BY-3.0-NL,CC-BY-3.0-US,CC-BY-4.0,CC-BY-NC-1.0,CC-BY-NC-2.0,CC-BY-NC-2.5,CC-BY-NC-3.0,CC-BY-NC-3.0-DE,CC-BY-NC-3.0-IGO,CC-BY-NC-4.0,CC-BY-NC-ND-1.0,CC-BY-NC-ND-2.0,CC-BY-NC-ND-2.5,CC-BY-NC-ND-3.0,CC-BY-NC-ND-3.0-DE,CC-BY-NC-ND-3.0-IGO,CC-BY-NC-ND-4.0,CC-BY-NC-SA-1.0,CC-BY-NC-SA-2.0,CC-BY-NC-SA-2.0-DE,CC-BY-NC-SA-2.0-FR,CC-BY-NC-SA-2.0-UK,CC-BY-NC-SA-2.5,CC-BY-NC-SA-3.0,CC-BY-NC-SA-3.0-DE,CC-BY-NC-SA-3.0-IGO,CC-BY-NC-SA-4.0,CC-BY-ND-1.0,CC-BY-ND-2.0,CC-BY-ND-2.5,CC-BY-ND-3.0,CC-BY-ND-3.0-DE,CC-BY-ND-4.0,CC-BY-SA-1.0,CC-BY-SA-2.0,CC-BY-SA-2.0-UK,CC-BY-SA-2.1-JP,CC-BY-SA-2.5,CC-BY-SA-3.0,CC-BY-SA-3.0-AT,CC-BY-SA-3.0-DE,CC-BY-SA-3.0-IGO,CC-BY-SA-4.0,CC-PDDC,CC-PDM-1.0,CC-SA-1.0,CC0-1.0,CDDL-1.0,CDDL-1.1,CDL-1.0,CDLA-Permissive-1.0,CDLA-Permissive-2.0,CDLA-Sharing-1.0,CECILL-1.0,CECILL-1.1,CECILL-2.0,CECILL-2.1,CECILL-B,CECILL-C,CERN-OHL-1.1,CERN-OHL-1.2,CERN-OHL-P-2.0,CERN-OHL-S-2.0,CERN-OHL-W-2.0,CFITSIO,CMU-Mach,CMU-Mach-nodoc,CNRI-Jython,CNRI-Python,CNRI-Python-GPL-Compatible,COIL-1.0,CPAL-1.0,CPL-1.0,CPOL-1.02,CUA-OPL-1.0,Caldera,Caldera-no-preamble,Catharon,ClArtistic,Clips,Community-Spec-1.0,Condor-1.1,Cornell-Lossless-JPEG,Cronyx,Crossword,CryptoSwift,CrystalStacker,Cube,D-FSL-1.0,DEC-3-Clause,DL-DE-BY-2.0,DL-DE-ZERO-2.0,DOC,DRL-1.0,DRL-1.1,DSDP,DocBook-DTD,DocBook-Schema,DocBook-Stylesheet,DocBook-XML,Dotseqn,ECL-1.0,ECL-2.0,EFL-1.0,EFL-2.0,EPICS,EPL-1.0,EPL-2.0,ESA-PL-permissive-2.4,ESA-PL-strong-copyleft-2.4,ESA-PL-weak-copyleft-2.4,EUDatagrid,EUPL-1.0,EUPL-1.1,EUPL-1.2,Elastic-2.0,Entessa,ErlPL-1.1,Eurosym,FBM,FDK-AAC,FDK-MPEG-H,FSFAP,FSFAP-no-warranty-disclaimer,FSFUL,FSFULLR,FSFULLRSD,FSFULLRWD,FSL-1.1-ALv2,FSL-1.1-MIT,FTL,Fair,Ferguson-Twofish,Frameworx-1.0,FreeBSD-DOC,FreeImage,Furuseth,GCR-docs,GD,GFDL-1.1,GFDL-1.1-invariants-only,GFDL-1.1-invariants-or-later,GFDL-1.1-no-invariants-only,GFDL-1.1-no-invariants-or-later,GFDL-1.1-only,GFDL-1.1-or-later,GFDL-1.2,GFDL-1.2-invariants-only,GFDL-1.2-invariants-or-later,GFDL-1.2-no-invariants-only,GFDL-1.2-no-invariants-or-later,GFDL-1.2-only,GFDL-1.2-or-later,GFDL-1.3,GFDL-1.3-invariants-only,GFDL-1.3-invariants-or-later,GFDL-1.3-no-invariants-only,GFDL-1.3-no-invariants-or-later,GFDL-1.3-only,GFDL-1.3-or-later,GL2PS,GLWTPL,GPL-1.0,GPL-1.0+,GPL-1.0-only,GPL-1.0-or-later,GPL-2.0,GPL-2.0+,GPL-2.0-only,GPL-2.0-or-later,GPL-2.0-with-GCC-exception,GPL-2.0-with-autoconf-exception,GPL-2.0-with-bison-exception,GPL-2.0-with-classpath-exception,GPL-2.0-with-font-exception,GPL-3.0,GPL-3.0+,GPL-3.0-only,GPL-3.0-or-later,GPL-3.0-with-GCC-exception,GPL-3.0-with-autoconf-exception,Game-Programming-Gems,Giftware,Glide,Glulxe,Graphics-Gems,Gutmann,HDF5,HIDAPI,HP-1986,HP-1989,HPND,HPND-DEC,HPND-Fenneberg-Livingston,HPND-INRIA-IMAG,HPND-Intel,HPND-Kevlin-Henney,HPND-MIT-disclaimer,HPND-Markus-Kuhn,HPND-Netrek,HPND-Pbmplus,HPND-SMC,HPND-UC,HPND-UC-export-US,HPND-doc,HPND-doc-sell,HPND-export-US,HPND-export-US-acknowledgement,HPND-export-US-modify,HPND-export2-US,HPND-merchantability-variant,HPND-sell-MIT-disclaimer-xserver,HPND-sell-regexpr,HPND-sell-variant,HPND-sell-variant-MIT-disclaimer,HPND-sell-variant-MIT-disclaimer-rev,HPND-sell-variant-critical-systems,HTMLTIDY,HaskellReport,Hippocratic-2.1,Hippocratic-3.0-core,IBM-pibs,ICU,IEC-Code-Components-EULA,IJG,IJG-short,IPA,IPL-1.0,ISC,ISC-Veillard,ISO-permission,ImageMagick,Imlib2,Info-ZIP,Informatica,Inner-Net-2.0,InnoSetup,Intel,Intel-ACPI,Interbase-1.0,JPL-image,JPNIC,JSON,Jam,JasPer-2.0,Kastrup,Kazlib,Knuth-CTAN,LAL-1.2,LAL-1.3,LGPL-2.0,LGPL-2.0+,LGPL-2.0-only,LGPL-2.0-or-later,LGPL-2.1,LGPL-2.1+,LGPL-2.1-only,LGPL-2.1-or-later,LGPL-3.0,LGPL-3.0+,LGPL-3.0-only,LGPL-3.0-or-later,LGPLLR,LOOP,LPD-document,LPL-1.0,LPL-1.02,LPPL-1.0,LPPL-1.1,LPPL-1.2,LPPL-1.3a,LPPL-1.3c,LZMA-SDK-9.11-to-9.20,LZMA-SDK-9.22,Latex2e,Latex2e-translated-notice,Leptonica,LiLiQ-P-1.1,LiLiQ-R-1.1,LiLiQ-Rplus-1.1,Libpng,Linux-OpenIB,Linux-man-pages-1-para,Linux-man-pages-copyleft,Linux-man-pages-copyleft-2-para,Linux-man-pages-copyleft-var,Lucida-Bitmap-Fonts,MIPS,MIT,MIT-0,MIT-CMU,MIT-Click,MIT-Festival,MIT-Khronos-old,MIT-Modern-Variant,MIT-STK,MIT-Wu,MIT-advertising,MIT-enna,MIT-feh,MIT-open-group,MIT-testregex,MITNFA,MMIXware,MMPL-1.0.1,MPEG-SSG,MPL-1.0,MPL-1.1,MPL-2.0,MPL-2.0-no-copyleft-exception,MS-LPL,MS-PL,MS-RL,MTLL,MVT-1.1,Mackerras-3-Clause,Mackerras-3-Clause-acknowledgment,MakeIndex,Martin-Birgmeier,McPhee-slideshow,Minpack,MirOS,Motosoto,MulanPSL-1.0,MulanPSL-2.0,Multics,Mup,NAIST-2003,NASA-1.3,NBPL-1.0,NCBI-PD,NCGL-UK-2.0,NCL,NCSA,NGPL,NICTA-1.0,NIST-PD,NIST-PD-TNT,NIST-PD-fallback,NIST-Software,NLOD-1.0,NLOD-2.0,NLPL,NOSL,NPL-1.0,NPL-1.1,NPOSL-3.0,NRL,NTIA-PD,NTP,NTP-0,Naumen,Net-SNMP,NetCDF,Newsletr,Nokia,Noweb,Nunit,O-UDA-1.0,OAR,OCCT-PL,OCLC-2.0,ODC-By-1.0,ODbL-1.0,OFFIS,OFL-1.0,OFL-1.0-RFN,OFL-1.0-no-RFN,OFL-1.1,OFL-1.1-RFN,OFL-1.1-no-RFN,OGC-1.0,OGDL-Taiwan-1.0,OGL-Canada-2.0,OGL-UK-1.0,OGL-UK-2.0,OGL-UK-3.0,OGTSL,OLDAP-1.1,OLDAP-1.2,OLDAP-1.3,OLDAP-1.4,OLDAP-2.0,OLDAP-2.0.1,OLDAP-2.1,OLDAP-2.2,OLDAP-2.2.1,OLDAP-2.2.2,OLDAP-2.3,OLDAP-2.4,OLDAP-2.5,OLDAP-2.6,OLDAP-2.7,OLDAP-2.8,OLFL-1.3,OML,OPL-1.0,OPL-UK-3.0,OPUBL-1.0,OSC-1.0,OSET-PL-2.1,OSL-1.0,OSL-1.1,OSL-2.0,OSL-2.1,OSL-3.0,OSSP,OpenMDW-1.0,OpenPBS-2.3,OpenSSL,OpenSSL-standalone,OpenVision,PADL,PDDL-1.0,PHP-3.0,PHP-3.01,PPL,PSF-2.0,ParaType-Free-Font-1.3,Parity-6.0.0,Parity-7.0.0,Pixar,Plexus,PolyForm-Noncommercial-1.0.0,PolyForm-Small-Business-1.0.0,PostgreSQL,Python-2.0,Python-2.0.1,QPL-1.0,QPL-1.0-INRIA-2004,Qhull,RHeCos-1.1,RPL-1.1,RPL-1.5,RPSL-1.0,RSA-MD,RSCPL,Rdisc,Ruby,Ruby-pty,SAX-PD,SAX-PD-2.0,SCEA,SGI-B-1.0,SGI-B-1.1,SGI-B-2.0,SGI-OpenGL,SGMLUG-PM,SGP4,SHL-0.5,SHL-0.51,SISSL,SISSL-1.2,SL,SMAIL-GPL,SMLNJ,SMPPL,SNIA,SOFA,SPL-1.0,SSH-OpenSSH,SSH-short,SSLeay-standalone,SSPL-1.0,SUL-1.0,SWL,Saxpath,SchemeReport,Sendmail,Sendmail-8.23,Sendmail-Open-Source-1.1,SimPL-2.0,Sleepycat,Soundex,Spencer-86,Spencer-94,Spencer-99,StandardML-NJ,SugarCRM-1.1.3,Sun-PPP,Sun-PPP-2000,SunPro,Symlinks,TAPR-OHL-1.0,TCL,TCP-wrappers,TGPPL-1.0,TMate,TORQUE-1.1,TOSL,TPDL,TPL-1.0,TTWL,TTYP0,TU-Berlin-1.0,TU-Berlin-2.0,TekHVC,TermReadKey,ThirdEye,TrustedQSL,UCAR,UCL-1.0,UMich-Merit,UPL-1.0,URT-RLE,Ubuntu-font-1.0,UnRAR,Unicode-3.0,Unicode-DFS-2015,Unicode-DFS-2016,Unicode-TOU,UnixCrypt,Unlicense,Unlicense-libtelnet,Unlicense-libwhirlpool,VOSTROM,VSL-1.0,Vim,Vixie-Cron,W3C,W3C-19980720,W3C-20150513,WTFNMFPL,WTFPL,Watcom-1.0,Widget-Workshop,WordNet,Wsuipa,X11,X11-distribute-modifications-variant,X11-no-permit-persons,X11-swapped,XFree86-1.1,XSkat,Xdebug-1.03,Xerox,Xfig,Xnet,YPL-1.0,YPL-1.1,ZPL-1.1,ZPL-2.0,ZPL-2.1,Zed,Zeeff,Zend-2.0,Zimbra-1.3,Zimbra-1.4,Zlib,any-OSI,any-OSI-perl-modules,atc-game,bcrypt-Solar-Designer,blessing,bzip2-1.0.5,bzip2-1.0.6,check-cvs,checkmk,copyleft-next-0.3.0,copyleft-next-0.3.1,curl,cve-tou,diffmark,dtoa,dvipdfm,eCos-2.0,eGenix,etalab-2.0,fwlw,gSOAP-1.3b,generic-xts,gnuplot,gtkbook,hdparm,hyphen-bulgarian,iMatix,jove,libpng-1.6.35,libpng-2.0,libselinux-1.0,libtiff,libutil-David-Nugent,lsof,magaz,mailprio,man2html,metamail,mpi-permissive,mpich2,mplus,ngrep,pkgconf,pnmstitch,psfrag,psutils,python-ldap,radvd,snprintf,softSurfer,ssh-keyscan,swrule,threeparttable,ulem,w3m,wwl,wxWindows,xinetd,xkeyboard-config-Zinoviev,xlock,xpp,xzoom,zlib-acknowledgement".split(","), u = /* @__PURE__ */ "AGPL-1.0,AGPL-3.0,BSD-2-Clause-FreeBSD,BSD-2-Clause-NetBSD,GFDL-1.1,GFDL-1.2,GFDL-1.3,GPL-1.0,GPL-1.0+,GPL-2.0,GPL-2.0+,GPL-2.0-with-GCC-exception,GPL-2.0-with-autoconf-exception,GPL-2.0-with-bison-exception,GPL-2.0-with-classpath-exception,GPL-2.0-with-font-exception,GPL-3.0,GPL-3.0+,GPL-3.0-with-GCC-exception,GPL-3.0-with-autoconf-exception,LGPL-2.0,LGPL-2.0+,LGPL-2.1,LGPL-2.1+,LGPL-3.0,LGPL-3.0+,Net-SNMP,Nunit,StandardML-NJ,bzip2-1.0.5,eCos-2.0,wxWindows".split(","), d = /* @__PURE__ */ "389-exception,Asterisk-exception,Asterisk-linking-protocols-exception,Autoconf-exception-2.0,Autoconf-exception-3.0,Autoconf-exception-generic,Autoconf-exception-generic-3.0,Autoconf-exception-macro,Bison-exception-1.24,Bison-exception-2.2,Bootloader-exception,CGAL-linking-exception,CLISP-exception-2.0,Classpath-exception-2.0,Classpath-exception-2.0-short,DigiRule-FOSS-exception,Digia-Qt-LGPL-exception-1.1,FLTK-exception,Fawkes-Runtime-exception,Font-exception-2.0,GCC-exception-2.0,GCC-exception-2.0-note,GCC-exception-3.1,GNAT-exception,GNOME-examples-exception,GNU-compiler-exception,GPL-3.0-389-ds-base-exception,GPL-3.0-interface-exception,GPL-3.0-linking-exception,GPL-3.0-linking-source-exception,GPL-CC-1.0,GStreamer-exception-2005,GStreamer-exception-2008,Gmsh-exception,Google-Patent-WebM,Independent-modules-exception,KiCad-libraries-exception,LGPL-3.0-linking-exception,LLGPL,LLVM-exception,LZMA-exception,Libtool-exception,Linux-syscall-note,Nokia-Qt-exception-1.1,OCCT-exception-1.0,OCaml-LGPL-linking-exception,OpenJDK-assembly-exception-1.0,PCRE2-exception,PS-or-PDF-font-exception-20170817,QPL-1.0-INRIA-2004-exception,Qt-GPL-exception-1.0,Qt-LGPL-exception-1.1,Qwt-exception-1.0,RRDtool-FLOSS-exception-2.0,SANE-exception,SHL-2.0,SHL-2.1,SWI-exception,Simple-Library-Usage-exception,Spelling-Provider-LGPL-exception,Swift-exception,Texinfo-exception,UBDL-exception,Universal-FOSS-exception-1.0,WxWindows-exception-3.1,cryptsetup-OpenSSL-exception,eCos-exception-2.0,erlang-otp-linking-exception,fmt-exception,freertos-exception-2.0,gnu-javamail-exception,harbour-exception,i2p-gpl-java-exception,kvirc-openssl-exception,libpri-OpenH323-exception,mif-exception,mxml-exception,openvpn-openssl-exception,polyparse-exception,romic-exception,rsync-linking-exception,sqlitestudio-OpenSSL-exception,stunnel-exception,u-boot-exception-2.0,vsftpd-openssl-exception,x11vnc-openssl-exception".split(","), f = (e) => new Map(e.map((e) => [e.toLowerCase(), e])), p = f(l), m = f(d), h = new Set(u), g = /^[A-Za-z0-9.-]+$/, _ = /* @__PURE__ */ new Set([
53
+ "AND",
54
+ "OR",
55
+ "WITH"
56
+ ]), v = 64;
57
+ function y(e) {
58
+ return p.get(e.toLowerCase());
59
+ }
60
+ var b = class extends Error {};
61
+ function x(e) {
62
+ let t = e.match(/\(|\)|[^\s()]+/g) ?? [], n = 0, r = 0, i = [], a = [], o = () => t[n], s = () => t[n++];
63
+ function c(e) {
64
+ throw new b(e);
65
+ }
66
+ function l() {
67
+ let e = u();
68
+ for (; o() === "OR";) s(), e = {
69
+ type: "or",
70
+ left: e,
71
+ right: u()
72
+ };
73
+ return e;
74
+ }
75
+ function u() {
76
+ let e = d();
77
+ for (; o() === "AND";) s(), e = {
78
+ type: "and",
79
+ left: e,
80
+ right: d()
81
+ };
82
+ return e;
83
+ }
84
+ function d() {
85
+ let e = f();
86
+ if (o() !== "WITH") return e;
87
+ s();
88
+ let t = s();
89
+ t === void 0 && c("expected an exception id after WITH");
90
+ let n = m.get(t.toLowerCase());
91
+ return n || c(`unknown exception id "${t}"`), e.type !== "license" && c("WITH applies to a listed license id only"), {
92
+ ...e,
93
+ exception: n
94
+ };
95
+ }
96
+ function f() {
97
+ let e = s();
98
+ if (e === void 0 && c("expected a license id"), e === "(") {
99
+ ++r > v && c(`parentheses nested too deeply (more than ${v})`);
100
+ let e = l();
101
+ return s() !== ")" && c("missing closing parenthesis"), r--, e;
102
+ }
103
+ return e === ")" && c("unexpected closing parenthesis"), _.has(e) && c(`unexpected ${e}`), _.has(e.toUpperCase()) && c(`operators must be uppercase: "${e}"`), x(e);
104
+ }
105
+ function p(e) {
106
+ i.includes(e) || i.push(e);
107
+ }
108
+ function x(e) {
109
+ let t = /^(?:(DocumentRef-[^:]+):)?(LicenseRef-(.*))$/.exec(e);
110
+ if (t) {
111
+ let [, n, r, i] = t;
112
+ return (!i || !g.test(i)) && c(`bad LicenseRef "${e}"`), n && !g.test(n.slice(12)) && c(`bad DocumentRef "${e}"`), p(r), n ? {
113
+ type: "ref",
114
+ id: r,
115
+ documentRef: n
116
+ } : {
117
+ type: "ref",
118
+ id: r
119
+ };
120
+ }
121
+ let n = e.endsWith("+"), r = y(n ? e.slice(0, -1) : e);
122
+ return r || c(`unknown license id "${e}"`), p(r), h.has(r) && !a.includes(r) && a.push(r), {
123
+ type: "license",
124
+ id: r,
125
+ plus: n
126
+ };
127
+ }
128
+ try {
129
+ t.length === 0 && c("empty expression");
130
+ let e = l();
131
+ if (n < t.length) {
132
+ let e = t[n];
133
+ c(_.has(e.toUpperCase()) && !_.has(e) ? `operators must be uppercase: "${e}"` : `unexpected "${e}"`);
134
+ }
135
+ return {
136
+ ok: !0,
137
+ ast: e,
138
+ ids: i,
139
+ deprecated: a
140
+ };
141
+ } catch (e) {
142
+ if (e instanceof b) return {
143
+ ok: !1,
144
+ error: e.message
145
+ };
146
+ throw e;
147
+ }
148
+ }
149
+ //#endregion
150
+ //#region src/terms.ts
151
+ var S = "https://seedprotocol.io/odrl/seed-license/1", C = [
152
+ "use",
153
+ "reproduce",
154
+ "distribute",
155
+ "derive",
156
+ "commercialize",
157
+ "seed:aiTrain",
158
+ "seed:aiInput",
159
+ "seed:aiIndex",
160
+ "seed:search"
161
+ ], w = [
162
+ "commercial",
163
+ "noncommercial",
164
+ "education",
165
+ "government",
166
+ "personal"
167
+ ], T = /^[0-9a-f]{64}$/, E = /^[A-Z]{2}$/, D = {
168
+ purpose: ["eq", "neq"],
169
+ spatial: ["eq", "neq"],
170
+ dateTime: ["gte", "lt"],
171
+ elapsedTime: ["lte"],
172
+ count: ["lte"],
173
+ userClass: ["eq", "neq"]
174
+ };
175
+ function O(e) {
176
+ let t = [], n = (e, n) => t.push({
177
+ path: e,
178
+ message: n
179
+ }), r = (e) => typeof e == "object" && !!e && !Array.isArray(e), i = (e, t) => e[t] !== void 0;
180
+ function a(e, t, a, o = []) {
181
+ if (!r(e)) return n(t, "must be an object"), !1;
182
+ for (let r of Object.keys(e)) !a.includes(r) && !o.includes(r) && e[r] !== void 0 && n(k(t, r), "unknown key");
183
+ for (let r of a) i(e, r) || n(k(t, r), "is required");
184
+ return !0;
185
+ }
186
+ function o(e, t) {
187
+ return typeof e == "string" || (n(t, "must be a string"), !1);
188
+ }
189
+ function s(e, t, r = 0) {
190
+ return typeof e == "number" && Number.isSafeInteger(e) && e >= r ? !0 : (n(t, `must be an integer of at least ${r}`), !1);
191
+ }
192
+ function c(e, t, r) {
193
+ r.includes(e) || n(t, `must be one of ${r.map((e) => JSON.stringify(e)).join(", ")}`);
194
+ }
195
+ function l(e, t) {
196
+ typeof e != "boolean" && n(t, "must be a boolean");
197
+ }
198
+ function u(e, t) {
199
+ if (!o(e, t)) return;
200
+ let r = x(e);
201
+ r.ok || n(t, `not an SPDX expression: ${r.error}`);
202
+ }
203
+ function d(e, t, r) {
204
+ if (!Array.isArray(e)) return n(t, "must be an array");
205
+ for (let i = 0; i < e.length; i++) i in e ? r(e[i], `${t}[${i}]`) : n(`${t}[${i}]`, "is a hole in a sparse array");
206
+ }
207
+ function f(e, t) {
208
+ if (!a(e, t, [
209
+ "name",
210
+ "operator",
211
+ "value"
212
+ ])) return;
213
+ let r = e.name;
214
+ if (typeof r != "string" || !Object.hasOwn(D, r)) return n(k(t, "name"), `must be one of ${Object.keys(D).join(", ")}`);
215
+ c(e.operator, k(t, "operator"), D[r]);
216
+ let i = k(t, "value");
217
+ r === "purpose" ? o(e.value, i) : r === "spatial" ? o(e.value, i) && !E.test(e.value) && n(i, "must be an ISO 3166-1 alpha-2 code") : r === "userClass" ? c(e.value, i, w) : s(e.value, i);
218
+ }
219
+ function p(e, t) {
220
+ a(e, t, ["action"], ["target", "constraints"]) && (c(e.action, k(t, "action"), C), i(e, "target") && c(e.target, k(t, "target"), ["work", "adaptation"]), i(e, "constraints") && d(e.constraints, k(t, "constraints"), f));
221
+ }
222
+ function m(e, t) {
223
+ if (!r(e)) return n(t, "must be an object");
224
+ let o = {
225
+ attribute: [],
226
+ shareAlike: ["license"],
227
+ includeNotice: [],
228
+ discloseSource: ["network"],
229
+ stateChanges: []
230
+ };
231
+ if (typeof e.duty != "string" || !Object.hasOwn(o, e.duty)) return n(k(t, "duty"), `must be one of ${Object.keys(o).join(", ")}`);
232
+ a(e, t, ["duty"], o[e.duty]), e.duty === "shareAlike" && i(e, "license") && u(e.license, k(t, "license")), e.duty === "discloseSource" && i(e, "network") && l(e.network, k(t, "network"));
233
+ }
234
+ if (!a(e, "", [
235
+ "profile",
236
+ "spdx",
237
+ "legal",
238
+ "permissions",
239
+ "prohibitions",
240
+ "duties",
241
+ "grant"
242
+ ], [
243
+ "transition",
244
+ "postTerm",
245
+ "governingLaw"
246
+ ])) return {
247
+ ok: !1,
248
+ errors: t
249
+ };
250
+ e.profile !== "https://seedprotocol.io/odrl/seed-license/1" && n("profile", `must be ${S}`), i(e, "spdx") && u(e.spdx, "spdx"), i(e, "legal") && a(e.legal, "legal", [
251
+ "sha256",
252
+ "lang",
253
+ "canonicalUrl"
254
+ ]) && (o(e.legal.sha256, "legal.sha256") && !T.test(e.legal.sha256) && n("legal.sha256", "must be 64 lowercase hex characters without 0x"), o(e.legal.lang, "legal.lang"), o(e.legal.canonicalUrl, "legal.canonicalUrl"));
255
+ for (let t of ["permissions", "prohibitions"]) i(e, t) && d(e[t], t, p);
256
+ if (i(e, "duties") && d(e.duties, "duties", m), i(e, "transition") && a(e.transition, "transition", ["changeAt", "changeLicense"])) {
257
+ let { changeAt: t, changeLicense: r } = e.transition;
258
+ if (a(t, "transition.changeAt", [], ["afterSeconds", "at"])) {
259
+ let e = i(t, "afterSeconds"), r = i(t, "at");
260
+ e === r && n("transition.changeAt", "must have exactly one of afterSeconds and at"), e && s(t.afterSeconds, "transition.changeAt.afterSeconds", 1), r && s(t.at, "transition.changeAt.at");
261
+ }
262
+ u(r, "transition.changeLicense");
263
+ }
264
+ if (i(e, "postTerm") && a(e.postTerm, "postTerm", ["derivatives", "trainedModels"]) && (c(e.postTerm.derivatives, "postTerm.derivatives", [
265
+ "retain",
266
+ "cease-distribution",
267
+ "remove"
268
+ ]), c(e.postTerm.trainedModels, "postTerm.trainedModels", ["may-continue", "no-new-training"])), i(e, "grant") && a(e.grant, "grant", [
269
+ "transferable",
270
+ "sublicensable",
271
+ "exclusive",
272
+ "revocableFor",
273
+ "warranty",
274
+ "duration"
275
+ ])) {
276
+ let t = e.grant;
277
+ l(t.transferable, "grant.transferable"), l(t.sublicensable, "grant.sublicensable"), t.exclusive !== !1 && n("grant.exclusive", "must be false"), c(t.revocableFor, "grant.revocableFor", ["breach-only", "never"]), c(t.warranty, "grant.warranty", ["as-is", "ownership"]), t.duration !== "copyright-term" && s(t.duration, "grant.duration", 1);
278
+ }
279
+ if (i(e, "governingLaw") && o(e.governingLaw, "governingLaw"), t.length === 0) {
280
+ let t = e, r = (e) => `${e.action}/${e.target ?? "work"}`, i = new Set(t.permissions.map(r));
281
+ t.prohibitions.forEach((e, t) => {
282
+ i.has(r(e)) && n(`prohibitions[${t}]`, `${r(e)} is also permitted`);
283
+ }), t.duties.forEach((e, r) => {
284
+ e.duty === "shareAlike" && !t.permissions.some((e) => e.action === "derive") && n(`duties[${r}]`, "shareAlike needs a derive permission");
285
+ });
286
+ }
287
+ return t.length === 0 ? {
288
+ ok: !0,
289
+ terms: e
290
+ } : {
291
+ ok: !1,
292
+ errors: t
293
+ };
294
+ }
295
+ function k(e, t) {
296
+ return e ? `${e}.${t}` : t;
297
+ }
298
+ //#endregion
299
+ //#region src/hash.ts
300
+ function A(i) {
301
+ let a = O(i);
302
+ if (!a.ok) throw new r(a.errors);
303
+ return `0x${t(e(n(o(i))))}`;
304
+ }
305
+ //#endregion
306
+ //#region src/catalog/cc/urls.ts
307
+ var j = [
308
+ "by",
309
+ "by-sa",
310
+ "by-nc",
311
+ "by-nc-sa",
312
+ "by-nd",
313
+ "by-nc-nd"
314
+ ], M = (e) => `CC-${e.toUpperCase()}-4.0`, N = (e) => {
315
+ let t = `https://creativecommons.org/licenses/${e}/4.0/`;
316
+ return {
317
+ iri: t,
318
+ canonicalUrl: `${t}legalcode.en`,
319
+ stewardDeedUrl: `${t}deed.en`
320
+ };
321
+ }, P = {
322
+ iri: "https://creativecommons.org/publicdomain/zero/1.0/",
323
+ canonicalUrl: "https://creativecommons.org/publicdomain/zero/1.0/legalcode.en",
324
+ stewardDeedUrl: "https://creativecommons.org/publicdomain/zero/1.0/deed.en"
325
+ }, F = "LicenseRef-seed-all-rights-reserved-1", I = { canonicalUrl: "https://github.com/JournoLabs/seed-protocol-sdk/blob/main/packages/licensing/legal/LicenseRef-seed-all-rights-reserved-1.txt" };
326
+ function L() {
327
+ let e = /* @__PURE__ */ new Map();
328
+ for (let t of j) {
329
+ let n = N(t);
330
+ e.set(n.iri, M(t)), e.set(n.canonicalUrl, M(t));
331
+ }
332
+ return e.set(P.iri, "CC0-1.0"), e.set(P.canonicalUrl, "CC0-1.0"), e.set(I.canonicalUrl, F), e;
333
+ }
334
+ //#endregion
335
+ export { M as a, O as c, x as d, c as f, i as g, r as h, L as i, S as l, a as m, F as n, N as o, o as p, I as r, A as s, P as t, y as u };
336
+
337
+ //# sourceMappingURL=urls-DDyEMdyz.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"urls-DDyEMdyz.js","names":["InvalidLicenseTermsError","errors","UnsupportedLocaleError","locale","CanonicalJsonError","path","reason","canonicalJson","write","value","items","i","proto","record","key","SPDX_LIST_VERSION","LICENSE_IDS","DEPRECATED_IDS","EXCEPTION_IDS","byLowerCase","ids","id","licenses","exceptions","deprecatedIds","IDSTRING","OPERATORS","MAX_DEPTH","isKnownSpdxId","SpdxSyntaxError","parseSpdx","tokens","expression","position","depth","deprecated","peek","next","fail","message","parseOr","left","parseAnd","parseWith","atom","parseAtom","token","exception","inner","parseId","remember","ref","documentRef","idstring","plus","ast","error","TERMS_PROFILE","ACTIONS","USER_CLASSES","SHA256_HEX","COUNTRY","CONSTRAINT_OPERATORS","validateTerms","err","isObj","v","present","o","object","required","optional","join","string","integer","min","oneOf","allowed","a","boolean","spdx","parsed","array","each","constraint","name","rule","duty","terms","changeAt","after","at","changeLicense","g","r","permitted","d","termsHash","result","bytesToHex","sha256","utf8ToBytes","CC_CODES","ccSpdx","code","ccUrls","base","CC0_URLS","RESERVED_SPDX","RESERVED_URLS","catalogUrlTable","table","urls"],"sources":["../src/errors.ts","../src/canonicalJson.ts","../src/spdx/list.generated.ts","../src/spdx/parse.ts","../src/terms.ts","../src/validate.ts","../src/hash.ts","../src/catalog/cc/urls.ts"],"sourcesContent":["/** Terms that fail {@link validateTerms}; `errors` lists each defect with its path. */\nexport class InvalidLicenseTermsError extends Error {\n readonly errors: { path: string; message: string }[]\n constructor(errors: { path: string; message: string }[]) {\n super(`Invalid license terms: ${errors.map((e) => `${e.path || '(root)'} ${e.message}`).join('; ')}`)\n this.name = 'InvalidLicenseTermsError'\n this.errors = errors\n }\n}\n\n/** Deeds and summary sentences exist in English only. */\nexport class UnsupportedLocaleError extends Error {\n readonly locale: string\n constructor(locale: string) {\n super(`No deed template for locale \"${locale}\"; only \"en\" is available`)\n this.name = 'UnsupportedLocaleError'\n this.locale = locale\n }\n}\n\n/** A value that RFC 8785 canonical JSON, as this package restricts it, can't represent. */\nexport class CanonicalJsonError extends Error {\n readonly path: string\n constructor(path: string, reason: string) {\n super(`Can't write canonical JSON at ${path || '(root)'}: ${reason}`)\n this.name = 'CanonicalJsonError'\n this.path = path\n }\n}\n","import { CanonicalJsonError } from './errors'\n\nexport { CanonicalJsonError }\n\n/**\n * RFC 8785 canonical JSON for the values license terms use: plain objects, arrays, strings, safe\n * integers, booleans and null. Keys sort by UTF-16 code units, which is what `Array.prototype.sort`\n * does; ECMAScript's string serialization is the one RFC 8785 specifies. Non-integer numbers are\n * refused rather than formatted, so the RFC's number rules never come into play. An object\n * property whose value is `undefined` is left out, as `JSON.stringify` does.\n */\nexport function canonicalJson(value: unknown): string {\n return write(value, '')\n}\n\nfunction write(value: unknown, path: string): string {\n if (value === null) return 'null'\n switch (typeof value) {\n case 'string':\n return JSON.stringify(value)\n case 'boolean':\n return value ? 'true' : 'false'\n case 'number':\n if (!Number.isSafeInteger(value)) throw new CanonicalJsonError(path, `${value} is not a safe integer`)\n return Object.is(value, -0) ? '0' : String(value)\n case 'object':\n break\n default:\n throw new CanonicalJsonError(path, `${typeof value} is not JSON`)\n }\n if (Array.isArray(value)) {\n const items: string[] = []\n for (let i = 0; i < value.length; i++) {\n if (!(i in value)) throw new CanonicalJsonError(`${path}[${i}]`, 'hole in a sparse array')\n if (value[i] === undefined) throw new CanonicalJsonError(`${path}[${i}]`, 'undefined in an array')\n items.push(write(value[i], `${path}[${i}]`))\n }\n return `[${items.join(',')}]`\n }\n const proto = Object.getPrototypeOf(value)\n if (proto !== Object.prototype && proto !== null) throw new CanonicalJsonError(path, 'not a plain object')\n const record = value as Record<string, unknown>\n const keys = Object.keys(record)\n .filter((key) => record[key] !== undefined)\n .sort()\n return `{${keys.map((key) => `${JSON.stringify(key)}:${write(record[key], path ? `${path}.${key}` : key)}`).join(',')}}`\n}\n","// Generated by scripts/pin-legal-texts.ts from spdx/license-list-data v3.29.0. Don't edit.\n\nexport const SPDX_LIST_VERSION = \"3.29.0\"\n\nexport const LICENSE_IDS: readonly string[] = [\n \"0BSD\",\n \"3D-Slicer-1.0\",\n \"AAL\",\n \"ADSL\",\n \"AFL-1.1\",\n \"AFL-1.2\",\n \"AFL-2.0\",\n \"AFL-2.1\",\n \"AFL-3.0\",\n \"AGPL-1.0\",\n \"AGPL-1.0-only\",\n \"AGPL-1.0-or-later\",\n \"AGPL-3.0\",\n \"AGPL-3.0-only\",\n \"AGPL-3.0-or-later\",\n \"ALGLIB-Documentation\",\n \"AMD-newlib\",\n \"AMDPLPA\",\n \"AML\",\n \"AML-glslang\",\n \"AMPAS\",\n \"ANTLR-PD\",\n \"ANTLR-PD-fallback\",\n \"APAFML\",\n \"APL-1.0\",\n \"APSL-1.0\",\n \"APSL-1.1\",\n \"APSL-1.2\",\n \"APSL-2.0\",\n \"ASWF-Digital-Assets-1.0\",\n \"ASWF-Digital-Assets-1.1\",\n \"Abstyles\",\n \"AdaCore-doc\",\n \"Adobe-2006\",\n \"Adobe-Display-PostScript\",\n \"Adobe-Glyph\",\n \"Adobe-Utopia\",\n \"Advanced-Cryptics-Dictionary\",\n \"Afmparse\",\n \"Aladdin\",\n \"Apache-1.0\",\n \"Apache-1.1\",\n \"Apache-2.0\",\n \"App-s2p\",\n \"Arphic-1999\",\n \"Artistic-1.0\",\n \"Artistic-1.0-Perl\",\n \"Artistic-1.0-cl8\",\n \"Artistic-2.0\",\n \"Artistic-dist\",\n \"Aspell-RU\",\n \"BOLA-1.1\",\n \"BSD-1-Clause\",\n \"BSD-2-Clause\",\n \"BSD-2-Clause-Darwin\",\n \"BSD-2-Clause-FreeBSD\",\n \"BSD-2-Clause-NetBSD\",\n \"BSD-2-Clause-Patent\",\n \"BSD-2-Clause-Views\",\n \"BSD-2-Clause-first-lines\",\n \"BSD-2-Clause-pkgconf-disclaimer\",\n \"BSD-2-Clause-pos-unchanged\",\n \"BSD-3-Clause\",\n \"BSD-3-Clause-Attribution\",\n \"BSD-3-Clause-Clear\",\n \"BSD-3-Clause-HP\",\n \"BSD-3-Clause-LBNL\",\n \"BSD-3-Clause-Modification\",\n \"BSD-3-Clause-No-Military-License\",\n \"BSD-3-Clause-No-Nuclear-License\",\n \"BSD-3-Clause-No-Nuclear-License-2014\",\n \"BSD-3-Clause-No-Nuclear-Warranty\",\n \"BSD-3-Clause-Open-MPI\",\n \"BSD-3-Clause-OpenWebUI\",\n \"BSD-3-Clause-Sun\",\n \"BSD-3-Clause-Tso\",\n \"BSD-3-Clause-acpica\",\n \"BSD-3-Clause-flex\",\n \"BSD-4-Clause\",\n \"BSD-4-Clause-Shortened\",\n \"BSD-4-Clause-UC\",\n \"BSD-4.3RENO\",\n \"BSD-4.3TAHOE\",\n \"BSD-Advertising-Acknowledgement\",\n \"BSD-Attribution-HPND-disclaimer\",\n \"BSD-Inferno-Nettverk\",\n \"BSD-Mark-Modifications\",\n \"BSD-Protection\",\n \"BSD-Source-Code\",\n \"BSD-Source-Code-no-disclaimer\",\n \"BSD-Source-alt-GPL\",\n \"BSD-Source-beginning-file\",\n \"BSD-Systemics\",\n \"BSD-Systemics-W3Works\",\n \"BSD-ask-to-endorse\",\n \"BSL-1.0\",\n \"BUSL-1.1\",\n \"Baekmuk\",\n \"Bahyph\",\n \"Barr\",\n \"Beerware\",\n \"BitTorrent-1.0\",\n \"BitTorrent-1.1\",\n \"Bitstream-Charter\",\n \"Bitstream-Vera\",\n \"BlueOak-1.0.0\",\n \"Boehm-GC\",\n \"Boehm-GC-without-fee\",\n \"Borceux\",\n \"Brian-Gladman-2-Clause\",\n \"Brian-Gladman-3-Clause\",\n \"Brian-Gladman-3-Clause-no-conversion\",\n \"Buddy\",\n \"Bugroff\",\n \"C-UDA-1.0\",\n \"CAL-1.0\",\n \"CAL-1.0-Combined-Work-Exception\",\n \"CAPEC-tou\",\n \"CATOSL-1.1\",\n \"CC-BY-1.0\",\n \"CC-BY-2.0\",\n \"CC-BY-2.5\",\n \"CC-BY-2.5-AU\",\n \"CC-BY-3.0\",\n \"CC-BY-3.0-AT\",\n \"CC-BY-3.0-AU\",\n \"CC-BY-3.0-DE\",\n \"CC-BY-3.0-IGO\",\n \"CC-BY-3.0-NL\",\n \"CC-BY-3.0-US\",\n \"CC-BY-4.0\",\n \"CC-BY-NC-1.0\",\n \"CC-BY-NC-2.0\",\n \"CC-BY-NC-2.5\",\n \"CC-BY-NC-3.0\",\n \"CC-BY-NC-3.0-DE\",\n \"CC-BY-NC-3.0-IGO\",\n \"CC-BY-NC-4.0\",\n \"CC-BY-NC-ND-1.0\",\n \"CC-BY-NC-ND-2.0\",\n \"CC-BY-NC-ND-2.5\",\n \"CC-BY-NC-ND-3.0\",\n \"CC-BY-NC-ND-3.0-DE\",\n \"CC-BY-NC-ND-3.0-IGO\",\n \"CC-BY-NC-ND-4.0\",\n \"CC-BY-NC-SA-1.0\",\n \"CC-BY-NC-SA-2.0\",\n \"CC-BY-NC-SA-2.0-DE\",\n \"CC-BY-NC-SA-2.0-FR\",\n \"CC-BY-NC-SA-2.0-UK\",\n \"CC-BY-NC-SA-2.5\",\n \"CC-BY-NC-SA-3.0\",\n \"CC-BY-NC-SA-3.0-DE\",\n \"CC-BY-NC-SA-3.0-IGO\",\n \"CC-BY-NC-SA-4.0\",\n \"CC-BY-ND-1.0\",\n \"CC-BY-ND-2.0\",\n \"CC-BY-ND-2.5\",\n \"CC-BY-ND-3.0\",\n \"CC-BY-ND-3.0-DE\",\n \"CC-BY-ND-4.0\",\n \"CC-BY-SA-1.0\",\n \"CC-BY-SA-2.0\",\n \"CC-BY-SA-2.0-UK\",\n \"CC-BY-SA-2.1-JP\",\n \"CC-BY-SA-2.5\",\n \"CC-BY-SA-3.0\",\n \"CC-BY-SA-3.0-AT\",\n \"CC-BY-SA-3.0-DE\",\n \"CC-BY-SA-3.0-IGO\",\n \"CC-BY-SA-4.0\",\n \"CC-PDDC\",\n \"CC-PDM-1.0\",\n \"CC-SA-1.0\",\n \"CC0-1.0\",\n \"CDDL-1.0\",\n \"CDDL-1.1\",\n \"CDL-1.0\",\n \"CDLA-Permissive-1.0\",\n \"CDLA-Permissive-2.0\",\n \"CDLA-Sharing-1.0\",\n \"CECILL-1.0\",\n \"CECILL-1.1\",\n \"CECILL-2.0\",\n \"CECILL-2.1\",\n \"CECILL-B\",\n \"CECILL-C\",\n \"CERN-OHL-1.1\",\n \"CERN-OHL-1.2\",\n \"CERN-OHL-P-2.0\",\n \"CERN-OHL-S-2.0\",\n \"CERN-OHL-W-2.0\",\n \"CFITSIO\",\n \"CMU-Mach\",\n \"CMU-Mach-nodoc\",\n \"CNRI-Jython\",\n \"CNRI-Python\",\n \"CNRI-Python-GPL-Compatible\",\n \"COIL-1.0\",\n \"CPAL-1.0\",\n \"CPL-1.0\",\n \"CPOL-1.02\",\n \"CUA-OPL-1.0\",\n \"Caldera\",\n \"Caldera-no-preamble\",\n \"Catharon\",\n \"ClArtistic\",\n \"Clips\",\n \"Community-Spec-1.0\",\n \"Condor-1.1\",\n \"Cornell-Lossless-JPEG\",\n \"Cronyx\",\n \"Crossword\",\n \"CryptoSwift\",\n \"CrystalStacker\",\n \"Cube\",\n \"D-FSL-1.0\",\n \"DEC-3-Clause\",\n \"DL-DE-BY-2.0\",\n \"DL-DE-ZERO-2.0\",\n \"DOC\",\n \"DRL-1.0\",\n \"DRL-1.1\",\n \"DSDP\",\n \"DocBook-DTD\",\n \"DocBook-Schema\",\n \"DocBook-Stylesheet\",\n \"DocBook-XML\",\n \"Dotseqn\",\n \"ECL-1.0\",\n \"ECL-2.0\",\n \"EFL-1.0\",\n \"EFL-2.0\",\n \"EPICS\",\n \"EPL-1.0\",\n \"EPL-2.0\",\n \"ESA-PL-permissive-2.4\",\n \"ESA-PL-strong-copyleft-2.4\",\n \"ESA-PL-weak-copyleft-2.4\",\n \"EUDatagrid\",\n \"EUPL-1.0\",\n \"EUPL-1.1\",\n \"EUPL-1.2\",\n \"Elastic-2.0\",\n \"Entessa\",\n \"ErlPL-1.1\",\n \"Eurosym\",\n \"FBM\",\n \"FDK-AAC\",\n \"FDK-MPEG-H\",\n \"FSFAP\",\n \"FSFAP-no-warranty-disclaimer\",\n \"FSFUL\",\n \"FSFULLR\",\n \"FSFULLRSD\",\n \"FSFULLRWD\",\n \"FSL-1.1-ALv2\",\n \"FSL-1.1-MIT\",\n \"FTL\",\n \"Fair\",\n \"Ferguson-Twofish\",\n \"Frameworx-1.0\",\n \"FreeBSD-DOC\",\n \"FreeImage\",\n \"Furuseth\",\n \"GCR-docs\",\n \"GD\",\n \"GFDL-1.1\",\n \"GFDL-1.1-invariants-only\",\n \"GFDL-1.1-invariants-or-later\",\n \"GFDL-1.1-no-invariants-only\",\n \"GFDL-1.1-no-invariants-or-later\",\n \"GFDL-1.1-only\",\n \"GFDL-1.1-or-later\",\n \"GFDL-1.2\",\n \"GFDL-1.2-invariants-only\",\n \"GFDL-1.2-invariants-or-later\",\n \"GFDL-1.2-no-invariants-only\",\n \"GFDL-1.2-no-invariants-or-later\",\n \"GFDL-1.2-only\",\n \"GFDL-1.2-or-later\",\n \"GFDL-1.3\",\n \"GFDL-1.3-invariants-only\",\n \"GFDL-1.3-invariants-or-later\",\n \"GFDL-1.3-no-invariants-only\",\n \"GFDL-1.3-no-invariants-or-later\",\n \"GFDL-1.3-only\",\n \"GFDL-1.3-or-later\",\n \"GL2PS\",\n \"GLWTPL\",\n \"GPL-1.0\",\n \"GPL-1.0+\",\n \"GPL-1.0-only\",\n \"GPL-1.0-or-later\",\n \"GPL-2.0\",\n \"GPL-2.0+\",\n \"GPL-2.0-only\",\n \"GPL-2.0-or-later\",\n \"GPL-2.0-with-GCC-exception\",\n \"GPL-2.0-with-autoconf-exception\",\n \"GPL-2.0-with-bison-exception\",\n \"GPL-2.0-with-classpath-exception\",\n \"GPL-2.0-with-font-exception\",\n \"GPL-3.0\",\n \"GPL-3.0+\",\n \"GPL-3.0-only\",\n \"GPL-3.0-or-later\",\n \"GPL-3.0-with-GCC-exception\",\n \"GPL-3.0-with-autoconf-exception\",\n \"Game-Programming-Gems\",\n \"Giftware\",\n \"Glide\",\n \"Glulxe\",\n \"Graphics-Gems\",\n \"Gutmann\",\n \"HDF5\",\n \"HIDAPI\",\n \"HP-1986\",\n \"HP-1989\",\n \"HPND\",\n \"HPND-DEC\",\n \"HPND-Fenneberg-Livingston\",\n \"HPND-INRIA-IMAG\",\n \"HPND-Intel\",\n \"HPND-Kevlin-Henney\",\n \"HPND-MIT-disclaimer\",\n \"HPND-Markus-Kuhn\",\n \"HPND-Netrek\",\n \"HPND-Pbmplus\",\n \"HPND-SMC\",\n \"HPND-UC\",\n \"HPND-UC-export-US\",\n \"HPND-doc\",\n \"HPND-doc-sell\",\n \"HPND-export-US\",\n \"HPND-export-US-acknowledgement\",\n \"HPND-export-US-modify\",\n \"HPND-export2-US\",\n \"HPND-merchantability-variant\",\n \"HPND-sell-MIT-disclaimer-xserver\",\n \"HPND-sell-regexpr\",\n \"HPND-sell-variant\",\n \"HPND-sell-variant-MIT-disclaimer\",\n \"HPND-sell-variant-MIT-disclaimer-rev\",\n \"HPND-sell-variant-critical-systems\",\n \"HTMLTIDY\",\n \"HaskellReport\",\n \"Hippocratic-2.1\",\n \"Hippocratic-3.0-core\",\n \"IBM-pibs\",\n \"ICU\",\n \"IEC-Code-Components-EULA\",\n \"IJG\",\n \"IJG-short\",\n \"IPA\",\n \"IPL-1.0\",\n \"ISC\",\n \"ISC-Veillard\",\n \"ISO-permission\",\n \"ImageMagick\",\n \"Imlib2\",\n \"Info-ZIP\",\n \"Informatica\",\n \"Inner-Net-2.0\",\n \"InnoSetup\",\n \"Intel\",\n \"Intel-ACPI\",\n \"Interbase-1.0\",\n \"JPL-image\",\n \"JPNIC\",\n \"JSON\",\n \"Jam\",\n \"JasPer-2.0\",\n \"Kastrup\",\n \"Kazlib\",\n \"Knuth-CTAN\",\n \"LAL-1.2\",\n \"LAL-1.3\",\n \"LGPL-2.0\",\n \"LGPL-2.0+\",\n \"LGPL-2.0-only\",\n \"LGPL-2.0-or-later\",\n \"LGPL-2.1\",\n \"LGPL-2.1+\",\n \"LGPL-2.1-only\",\n \"LGPL-2.1-or-later\",\n \"LGPL-3.0\",\n \"LGPL-3.0+\",\n \"LGPL-3.0-only\",\n \"LGPL-3.0-or-later\",\n \"LGPLLR\",\n \"LOOP\",\n \"LPD-document\",\n \"LPL-1.0\",\n \"LPL-1.02\",\n \"LPPL-1.0\",\n \"LPPL-1.1\",\n \"LPPL-1.2\",\n \"LPPL-1.3a\",\n \"LPPL-1.3c\",\n \"LZMA-SDK-9.11-to-9.20\",\n \"LZMA-SDK-9.22\",\n \"Latex2e\",\n \"Latex2e-translated-notice\",\n \"Leptonica\",\n \"LiLiQ-P-1.1\",\n \"LiLiQ-R-1.1\",\n \"LiLiQ-Rplus-1.1\",\n \"Libpng\",\n \"Linux-OpenIB\",\n \"Linux-man-pages-1-para\",\n \"Linux-man-pages-copyleft\",\n \"Linux-man-pages-copyleft-2-para\",\n \"Linux-man-pages-copyleft-var\",\n \"Lucida-Bitmap-Fonts\",\n \"MIPS\",\n \"MIT\",\n \"MIT-0\",\n \"MIT-CMU\",\n \"MIT-Click\",\n \"MIT-Festival\",\n \"MIT-Khronos-old\",\n \"MIT-Modern-Variant\",\n \"MIT-STK\",\n \"MIT-Wu\",\n \"MIT-advertising\",\n \"MIT-enna\",\n \"MIT-feh\",\n \"MIT-open-group\",\n \"MIT-testregex\",\n \"MITNFA\",\n \"MMIXware\",\n \"MMPL-1.0.1\",\n \"MPEG-SSG\",\n \"MPL-1.0\",\n \"MPL-1.1\",\n \"MPL-2.0\",\n \"MPL-2.0-no-copyleft-exception\",\n \"MS-LPL\",\n \"MS-PL\",\n \"MS-RL\",\n \"MTLL\",\n \"MVT-1.1\",\n \"Mackerras-3-Clause\",\n \"Mackerras-3-Clause-acknowledgment\",\n \"MakeIndex\",\n \"Martin-Birgmeier\",\n \"McPhee-slideshow\",\n \"Minpack\",\n \"MirOS\",\n \"Motosoto\",\n \"MulanPSL-1.0\",\n \"MulanPSL-2.0\",\n \"Multics\",\n \"Mup\",\n \"NAIST-2003\",\n \"NASA-1.3\",\n \"NBPL-1.0\",\n \"NCBI-PD\",\n \"NCGL-UK-2.0\",\n \"NCL\",\n \"NCSA\",\n \"NGPL\",\n \"NICTA-1.0\",\n \"NIST-PD\",\n \"NIST-PD-TNT\",\n \"NIST-PD-fallback\",\n \"NIST-Software\",\n \"NLOD-1.0\",\n \"NLOD-2.0\",\n \"NLPL\",\n \"NOSL\",\n \"NPL-1.0\",\n \"NPL-1.1\",\n \"NPOSL-3.0\",\n \"NRL\",\n \"NTIA-PD\",\n \"NTP\",\n \"NTP-0\",\n \"Naumen\",\n \"Net-SNMP\",\n \"NetCDF\",\n \"Newsletr\",\n \"Nokia\",\n \"Noweb\",\n \"Nunit\",\n \"O-UDA-1.0\",\n \"OAR\",\n \"OCCT-PL\",\n \"OCLC-2.0\",\n \"ODC-By-1.0\",\n \"ODbL-1.0\",\n \"OFFIS\",\n \"OFL-1.0\",\n \"OFL-1.0-RFN\",\n \"OFL-1.0-no-RFN\",\n \"OFL-1.1\",\n \"OFL-1.1-RFN\",\n \"OFL-1.1-no-RFN\",\n \"OGC-1.0\",\n \"OGDL-Taiwan-1.0\",\n \"OGL-Canada-2.0\",\n \"OGL-UK-1.0\",\n \"OGL-UK-2.0\",\n \"OGL-UK-3.0\",\n \"OGTSL\",\n \"OLDAP-1.1\",\n \"OLDAP-1.2\",\n \"OLDAP-1.3\",\n \"OLDAP-1.4\",\n \"OLDAP-2.0\",\n \"OLDAP-2.0.1\",\n \"OLDAP-2.1\",\n \"OLDAP-2.2\",\n \"OLDAP-2.2.1\",\n \"OLDAP-2.2.2\",\n \"OLDAP-2.3\",\n \"OLDAP-2.4\",\n \"OLDAP-2.5\",\n \"OLDAP-2.6\",\n \"OLDAP-2.7\",\n \"OLDAP-2.8\",\n \"OLFL-1.3\",\n \"OML\",\n \"OPL-1.0\",\n \"OPL-UK-3.0\",\n \"OPUBL-1.0\",\n \"OSC-1.0\",\n \"OSET-PL-2.1\",\n \"OSL-1.0\",\n \"OSL-1.1\",\n \"OSL-2.0\",\n \"OSL-2.1\",\n \"OSL-3.0\",\n \"OSSP\",\n \"OpenMDW-1.0\",\n \"OpenPBS-2.3\",\n \"OpenSSL\",\n \"OpenSSL-standalone\",\n \"OpenVision\",\n \"PADL\",\n \"PDDL-1.0\",\n \"PHP-3.0\",\n \"PHP-3.01\",\n \"PPL\",\n \"PSF-2.0\",\n \"ParaType-Free-Font-1.3\",\n \"Parity-6.0.0\",\n \"Parity-7.0.0\",\n \"Pixar\",\n \"Plexus\",\n \"PolyForm-Noncommercial-1.0.0\",\n \"PolyForm-Small-Business-1.0.0\",\n \"PostgreSQL\",\n \"Python-2.0\",\n \"Python-2.0.1\",\n \"QPL-1.0\",\n \"QPL-1.0-INRIA-2004\",\n \"Qhull\",\n \"RHeCos-1.1\",\n \"RPL-1.1\",\n \"RPL-1.5\",\n \"RPSL-1.0\",\n \"RSA-MD\",\n \"RSCPL\",\n \"Rdisc\",\n \"Ruby\",\n \"Ruby-pty\",\n \"SAX-PD\",\n \"SAX-PD-2.0\",\n \"SCEA\",\n \"SGI-B-1.0\",\n \"SGI-B-1.1\",\n \"SGI-B-2.0\",\n \"SGI-OpenGL\",\n \"SGMLUG-PM\",\n \"SGP4\",\n \"SHL-0.5\",\n \"SHL-0.51\",\n \"SISSL\",\n \"SISSL-1.2\",\n \"SL\",\n \"SMAIL-GPL\",\n \"SMLNJ\",\n \"SMPPL\",\n \"SNIA\",\n \"SOFA\",\n \"SPL-1.0\",\n \"SSH-OpenSSH\",\n \"SSH-short\",\n \"SSLeay-standalone\",\n \"SSPL-1.0\",\n \"SUL-1.0\",\n \"SWL\",\n \"Saxpath\",\n \"SchemeReport\",\n \"Sendmail\",\n \"Sendmail-8.23\",\n \"Sendmail-Open-Source-1.1\",\n \"SimPL-2.0\",\n \"Sleepycat\",\n \"Soundex\",\n \"Spencer-86\",\n \"Spencer-94\",\n \"Spencer-99\",\n \"StandardML-NJ\",\n \"SugarCRM-1.1.3\",\n \"Sun-PPP\",\n \"Sun-PPP-2000\",\n \"SunPro\",\n \"Symlinks\",\n \"TAPR-OHL-1.0\",\n \"TCL\",\n \"TCP-wrappers\",\n \"TGPPL-1.0\",\n \"TMate\",\n \"TORQUE-1.1\",\n \"TOSL\",\n \"TPDL\",\n \"TPL-1.0\",\n \"TTWL\",\n \"TTYP0\",\n \"TU-Berlin-1.0\",\n \"TU-Berlin-2.0\",\n \"TekHVC\",\n \"TermReadKey\",\n \"ThirdEye\",\n \"TrustedQSL\",\n \"UCAR\",\n \"UCL-1.0\",\n \"UMich-Merit\",\n \"UPL-1.0\",\n \"URT-RLE\",\n \"Ubuntu-font-1.0\",\n \"UnRAR\",\n \"Unicode-3.0\",\n \"Unicode-DFS-2015\",\n \"Unicode-DFS-2016\",\n \"Unicode-TOU\",\n \"UnixCrypt\",\n \"Unlicense\",\n \"Unlicense-libtelnet\",\n \"Unlicense-libwhirlpool\",\n \"VOSTROM\",\n \"VSL-1.0\",\n \"Vim\",\n \"Vixie-Cron\",\n \"W3C\",\n \"W3C-19980720\",\n \"W3C-20150513\",\n \"WTFNMFPL\",\n \"WTFPL\",\n \"Watcom-1.0\",\n \"Widget-Workshop\",\n \"WordNet\",\n \"Wsuipa\",\n \"X11\",\n \"X11-distribute-modifications-variant\",\n \"X11-no-permit-persons\",\n \"X11-swapped\",\n \"XFree86-1.1\",\n \"XSkat\",\n \"Xdebug-1.03\",\n \"Xerox\",\n \"Xfig\",\n \"Xnet\",\n \"YPL-1.0\",\n \"YPL-1.1\",\n \"ZPL-1.1\",\n \"ZPL-2.0\",\n \"ZPL-2.1\",\n \"Zed\",\n \"Zeeff\",\n \"Zend-2.0\",\n \"Zimbra-1.3\",\n \"Zimbra-1.4\",\n \"Zlib\",\n \"any-OSI\",\n \"any-OSI-perl-modules\",\n \"atc-game\",\n \"bcrypt-Solar-Designer\",\n \"blessing\",\n \"bzip2-1.0.5\",\n \"bzip2-1.0.6\",\n \"check-cvs\",\n \"checkmk\",\n \"copyleft-next-0.3.0\",\n \"copyleft-next-0.3.1\",\n \"curl\",\n \"cve-tou\",\n \"diffmark\",\n \"dtoa\",\n \"dvipdfm\",\n \"eCos-2.0\",\n \"eGenix\",\n \"etalab-2.0\",\n \"fwlw\",\n \"gSOAP-1.3b\",\n \"generic-xts\",\n \"gnuplot\",\n \"gtkbook\",\n \"hdparm\",\n \"hyphen-bulgarian\",\n \"iMatix\",\n \"jove\",\n \"libpng-1.6.35\",\n \"libpng-2.0\",\n \"libselinux-1.0\",\n \"libtiff\",\n \"libutil-David-Nugent\",\n \"lsof\",\n \"magaz\",\n \"mailprio\",\n \"man2html\",\n \"metamail\",\n \"mpi-permissive\",\n \"mpich2\",\n \"mplus\",\n \"ngrep\",\n \"pkgconf\",\n \"pnmstitch\",\n \"psfrag\",\n \"psutils\",\n \"python-ldap\",\n \"radvd\",\n \"snprintf\",\n \"softSurfer\",\n \"ssh-keyscan\",\n \"swrule\",\n \"threeparttable\",\n \"ulem\",\n \"w3m\",\n \"wwl\",\n \"wxWindows\",\n \"xinetd\",\n \"xkeyboard-config-Zinoviev\",\n \"xlock\",\n \"xpp\",\n \"xzoom\",\n \"zlib-acknowledgement\",\n]\n\nexport const DEPRECATED_IDS: readonly string[] = [\n \"AGPL-1.0\",\n \"AGPL-3.0\",\n \"BSD-2-Clause-FreeBSD\",\n \"BSD-2-Clause-NetBSD\",\n \"GFDL-1.1\",\n \"GFDL-1.2\",\n \"GFDL-1.3\",\n \"GPL-1.0\",\n \"GPL-1.0+\",\n \"GPL-2.0\",\n \"GPL-2.0+\",\n \"GPL-2.0-with-GCC-exception\",\n \"GPL-2.0-with-autoconf-exception\",\n \"GPL-2.0-with-bison-exception\",\n \"GPL-2.0-with-classpath-exception\",\n \"GPL-2.0-with-font-exception\",\n \"GPL-3.0\",\n \"GPL-3.0+\",\n \"GPL-3.0-with-GCC-exception\",\n \"GPL-3.0-with-autoconf-exception\",\n \"LGPL-2.0\",\n \"LGPL-2.0+\",\n \"LGPL-2.1\",\n \"LGPL-2.1+\",\n \"LGPL-3.0\",\n \"LGPL-3.0+\",\n \"Net-SNMP\",\n \"Nunit\",\n \"StandardML-NJ\",\n \"bzip2-1.0.5\",\n \"eCos-2.0\",\n \"wxWindows\",\n]\n\nexport const EXCEPTION_IDS: readonly string[] = [\n \"389-exception\",\n \"Asterisk-exception\",\n \"Asterisk-linking-protocols-exception\",\n \"Autoconf-exception-2.0\",\n \"Autoconf-exception-3.0\",\n \"Autoconf-exception-generic\",\n \"Autoconf-exception-generic-3.0\",\n \"Autoconf-exception-macro\",\n \"Bison-exception-1.24\",\n \"Bison-exception-2.2\",\n \"Bootloader-exception\",\n \"CGAL-linking-exception\",\n \"CLISP-exception-2.0\",\n \"Classpath-exception-2.0\",\n \"Classpath-exception-2.0-short\",\n \"DigiRule-FOSS-exception\",\n \"Digia-Qt-LGPL-exception-1.1\",\n \"FLTK-exception\",\n \"Fawkes-Runtime-exception\",\n \"Font-exception-2.0\",\n \"GCC-exception-2.0\",\n \"GCC-exception-2.0-note\",\n \"GCC-exception-3.1\",\n \"GNAT-exception\",\n \"GNOME-examples-exception\",\n \"GNU-compiler-exception\",\n \"GPL-3.0-389-ds-base-exception\",\n \"GPL-3.0-interface-exception\",\n \"GPL-3.0-linking-exception\",\n \"GPL-3.0-linking-source-exception\",\n \"GPL-CC-1.0\",\n \"GStreamer-exception-2005\",\n \"GStreamer-exception-2008\",\n \"Gmsh-exception\",\n \"Google-Patent-WebM\",\n \"Independent-modules-exception\",\n \"KiCad-libraries-exception\",\n \"LGPL-3.0-linking-exception\",\n \"LLGPL\",\n \"LLVM-exception\",\n \"LZMA-exception\",\n \"Libtool-exception\",\n \"Linux-syscall-note\",\n \"Nokia-Qt-exception-1.1\",\n \"OCCT-exception-1.0\",\n \"OCaml-LGPL-linking-exception\",\n \"OpenJDK-assembly-exception-1.0\",\n \"PCRE2-exception\",\n \"PS-or-PDF-font-exception-20170817\",\n \"QPL-1.0-INRIA-2004-exception\",\n \"Qt-GPL-exception-1.0\",\n \"Qt-LGPL-exception-1.1\",\n \"Qwt-exception-1.0\",\n \"RRDtool-FLOSS-exception-2.0\",\n \"SANE-exception\",\n \"SHL-2.0\",\n \"SHL-2.1\",\n \"SWI-exception\",\n \"Simple-Library-Usage-exception\",\n \"Spelling-Provider-LGPL-exception\",\n \"Swift-exception\",\n \"Texinfo-exception\",\n \"UBDL-exception\",\n \"Universal-FOSS-exception-1.0\",\n \"WxWindows-exception-3.1\",\n \"cryptsetup-OpenSSL-exception\",\n \"eCos-exception-2.0\",\n \"erlang-otp-linking-exception\",\n \"fmt-exception\",\n \"freertos-exception-2.0\",\n \"gnu-javamail-exception\",\n \"harbour-exception\",\n \"i2p-gpl-java-exception\",\n \"kvirc-openssl-exception\",\n \"libpri-OpenH323-exception\",\n \"mif-exception\",\n \"mxml-exception\",\n \"openvpn-openssl-exception\",\n \"polyparse-exception\",\n \"romic-exception\",\n \"rsync-linking-exception\",\n \"sqlitestudio-OpenSSL-exception\",\n \"stunnel-exception\",\n \"u-boot-exception-2.0\",\n \"vsftpd-openssl-exception\",\n \"x11vnc-openssl-exception\",\n]\n","import { DEPRECATED_IDS, EXCEPTION_IDS, LICENSE_IDS } from './list.generated'\n\nexport type SpdxNode =\n | { type: 'license'; id: string; plus: boolean; exception?: string }\n | { type: 'ref'; id: string; documentRef?: string }\n | { type: 'and' | 'or'; left: SpdxNode; right: SpdxNode }\n\nexport type SpdxParseResult =\n | { ok: true; ast: SpdxNode; ids: string[]; deprecated: string[] }\n | { ok: false; error: string }\n\nconst byLowerCase = (ids: readonly string[]) => new Map(ids.map((id) => [id.toLowerCase(), id]))\nconst licenses = byLowerCase(LICENSE_IDS)\nconst exceptions = byLowerCase(EXCEPTION_IDS)\nconst deprecatedIds = new Set(DEPRECATED_IDS)\n\nconst IDSTRING = /^[A-Za-z0-9.-]+$/\nconst OPERATORS = new Set(['AND', 'OR', 'WITH'])\n/** Deeper parentheses are refused rather than recursed into, so hostile input can't overflow the stack. */\nconst MAX_DEPTH = 64\n\n/** The id as the SPDX list spells it, matched case-insensitively, or undefined. Licenses only, not exceptions. */\nexport function isKnownSpdxId(id: string): string | undefined {\n return licenses.get(id.toLowerCase())\n}\n\nclass SpdxSyntaxError extends Error {}\n\n/**\n * Parses an SPDX license expression (SPDX 3.0 annex): `AND`, `OR`, `WITH`, parentheses, the `+`\n * suffix, `LicenseRef-` and `DocumentRef-…:LicenseRef-`. `WITH` binds tighter than `AND`, which\n * binds tighter than `OR`. Operators must be uppercase. Ids match case-insensitively and come back\n * as the list spells them.\n */\nexport function parseSpdx(expression: string): SpdxParseResult {\n const tokens = expression.match(/\\(|\\)|[^\\s()]+/g) ?? []\n let position = 0\n let depth = 0\n const ids: string[] = []\n const deprecated: string[] = []\n\n const peek = () => tokens[position]\n const next = () => tokens[position++]\n\n function fail(message: string): never {\n throw new SpdxSyntaxError(message)\n }\n\n function parseOr(): SpdxNode {\n let left = parseAnd()\n while (peek() === 'OR') {\n next()\n left = { type: 'or', left, right: parseAnd() }\n }\n return left\n }\n\n function parseAnd(): SpdxNode {\n let left = parseWith()\n while (peek() === 'AND') {\n next()\n left = { type: 'and', left, right: parseWith() }\n }\n return left\n }\n\n function parseWith(): SpdxNode {\n const atom = parseAtom()\n if (peek() !== 'WITH') return atom\n next()\n const token = next()\n if (token === undefined) fail('expected an exception id after WITH')\n const exception = exceptions.get(token.toLowerCase())\n if (!exception) fail(`unknown exception id \"${token}\"`)\n if (atom.type !== 'license') fail('WITH applies to a listed license id only')\n return { ...atom, exception }\n }\n\n function parseAtom(): Exclude<SpdxNode, { type: 'and' | 'or' }> | SpdxNode {\n const token = next()\n if (token === undefined) fail('expected a license id')\n if (token === '(') {\n if (++depth > MAX_DEPTH) fail(`parentheses nested too deeply (more than ${MAX_DEPTH})`)\n const inner = parseOr()\n if (next() !== ')') fail('missing closing parenthesis')\n depth--\n return inner\n }\n if (token === ')') fail('unexpected closing parenthesis')\n if (OPERATORS.has(token)) fail(`unexpected ${token}`)\n if (OPERATORS.has(token.toUpperCase())) fail(`operators must be uppercase: \"${token}\"`)\n return parseId(token)\n }\n\n function remember(id: string) {\n if (!ids.includes(id)) ids.push(id)\n }\n\n function parseId(token: string): SpdxNode {\n const ref = /^(?:(DocumentRef-[^:]+):)?(LicenseRef-(.*))$/.exec(token)\n if (ref) {\n const [, documentRef, id, idstring] = ref\n if (!idstring || !IDSTRING.test(idstring)) fail(`bad LicenseRef \"${token}\"`)\n if (documentRef && !IDSTRING.test(documentRef.slice('DocumentRef-'.length))) fail(`bad DocumentRef \"${token}\"`)\n remember(id!)\n return documentRef ? { type: 'ref', id: id!, documentRef } : { type: 'ref', id: id! }\n }\n const plus = token.endsWith('+')\n const bare = plus ? token.slice(0, -1) : token\n const id = isKnownSpdxId(bare)\n if (!id) fail(`unknown license id \"${token}\"`)\n remember(id)\n if (deprecatedIds.has(id) && !deprecated.includes(id)) deprecated.push(id)\n return { type: 'license', id, plus }\n }\n\n try {\n if (tokens.length === 0) fail('empty expression')\n const ast = parseOr()\n if (position < tokens.length) {\n const token = tokens[position]!\n fail(OPERATORS.has(token.toUpperCase()) && !OPERATORS.has(token) ? `operators must be uppercase: \"${token}\"` : `unexpected \"${token}\"`)\n }\n return { ok: true, ast, ids, deprecated }\n } catch (error) {\n if (error instanceof SpdxSyntaxError) return { ok: false, error: error.message }\n throw error\n }\n}\n","/** Identifies the closed ODRL 2.2 profile whose semantics these terms follow (ADR 0034). */\nexport const TERMS_PROFILE = 'https://seedprotocol.io/odrl/seed-license/1'\n\nexport const ACTIONS = [\n 'use',\n 'reproduce',\n 'distribute',\n 'derive',\n 'commercialize',\n 'seed:aiTrain',\n 'seed:aiInput',\n 'seed:aiIndex',\n 'seed:search',\n] as const\nexport type Action = (typeof ACTIONS)[number]\n\nexport const USER_CLASSES = ['commercial', 'noncommercial', 'education', 'government', 'personal'] as const\n\nexport type Constraint =\n | { name: 'purpose'; operator: 'eq' | 'neq'; value: string }\n /** ISO 3166-1 alpha-2. */\n | { name: 'spatial'; operator: 'eq' | 'neq'; value: string }\n /** Unix seconds. */\n | { name: 'dateTime'; operator: 'gte' | 'lt'; value: number }\n /** Seconds. */\n | { name: 'elapsedTime'; operator: 'lte'; value: number }\n | { name: 'count'; operator: 'lte'; value: number }\n | { name: 'userClass'; operator: 'eq' | 'neq'; value: (typeof USER_CLASSES)[number] }\n\nexport interface Rule {\n action: Action\n /** What the rule applies to. Default 'work'. CC ND prohibits distributing adaptations, not making them. */\n target?: 'work' | 'adaptation'\n constraints?: Constraint[]\n}\n\nexport type Duty =\n | { duty: 'attribute' }\n /** SPDX expression adaptations must use; default: the same license. */\n | { duty: 'shareAlike'; license?: string }\n /** Keep the license text and copyright notice. */\n | { duty: 'includeNotice' }\n /** GPL; `network: true` for AGPL. */\n | { duty: 'discloseSource'; network?: boolean }\n | { duty: 'stateChanges' }\n\n/**\n * License terms: the reusable legal semantics of a license, without the economics of any offer.\n * `termsHash` is the SHA-256 of their RFC 8785 canonical JSON.\n */\nexport interface SeedLicenseTerms {\n profile: typeof TERMS_PROFILE\n /** SPDX license expression. */\n spdx: string\n /** `sha256`: 64 lowercase hex characters, no `0x`, of the legal text's bytes. Where the text is stored is not part of the terms. */\n legal: { sha256: string; lang: string; canonicalUrl: string }\n permissions: Rule[]\n prohibitions: Rule[]\n duties: Duty[]\n /** BUSL/FSL-style change of license: exactly one of `afterSeconds` and `at` (unix seconds). */\n transition?: { changeAt: { afterSeconds?: number; at?: number }; changeLicense: string }\n postTerm?: { derivatives: 'retain' | 'cease-distribution' | 'remove'; trainedModels: 'may-continue' | 'no-new-training' }\n grant: {\n transferable: boolean\n sublicensable: boolean\n exclusive: false\n revocableFor: 'breach-only' | 'never'\n warranty: 'as-is' | 'ownership'\n /** 'copyright-term' for CC and most open licenses; seconds otherwise. */\n duration: 'copyright-term' | number\n }\n governingLaw?: string\n}\n","import { parseSpdx } from './spdx/parse'\nimport { ACTIONS, TERMS_PROFILE, USER_CLASSES, type SeedLicenseTerms } from './terms'\n\nexport type TermsValidationError = { path: string; message: string }\nexport type TermsValidationResult = { ok: true; terms: SeedLicenseTerms } | { ok: false; errors: TermsValidationError[] }\n\ntype Obj = Record<string, unknown>\n\nconst SHA256_HEX = /^[0-9a-f]{64}$/\nconst COUNTRY = /^[A-Z]{2}$/\n\nconst CONSTRAINT_OPERATORS: Record<string, readonly string[]> = {\n purpose: ['eq', 'neq'],\n spatial: ['eq', 'neq'],\n dateTime: ['gte', 'lt'],\n elapsedTime: ['lte'],\n count: ['lte'],\n userClass: ['eq', 'neq'],\n}\n\n/**\n * Checks that a value is valid {@link SeedLicenseTerms}: the shape (no unknown keys, integers only),\n * parseable SPDX expressions, and no contradictions: the same action and target both permitted and\n * prohibited, share-alike without a derive permission, a transition with neither or both times.\n * An optional key whose value is `undefined` counts as absent. Never throws.\n */\nexport function validateTerms(terms: unknown): TermsValidationResult {\n const errors: TermsValidationError[] = []\n const err = (path: string, message: string) => errors.push({ path, message })\n\n const isObj = (v: unknown): v is Obj => typeof v === 'object' && v !== null && !Array.isArray(v)\n const present = (o: Obj, key: string) => o[key] !== undefined\n\n function object(value: unknown, path: string, required: string[], optional: string[] = []): value is Obj {\n if (!isObj(value)) {\n err(path, 'must be an object')\n return false\n }\n for (const key of Object.keys(value)) {\n if (!required.includes(key) && !optional.includes(key) && value[key] !== undefined) err(join(path, key), 'unknown key')\n }\n for (const key of required) if (!present(value, key)) err(join(path, key), 'is required')\n return true\n }\n function string(value: unknown, path: string): value is string {\n if (typeof value === 'string') return true\n err(path, 'must be a string')\n return false\n }\n function integer(value: unknown, path: string, min = 0): value is number {\n if (typeof value === 'number' && Number.isSafeInteger(value) && value >= min) return true\n err(path, `must be an integer of at least ${min}`)\n return false\n }\n function oneOf(value: unknown, path: string, allowed: readonly unknown[]) {\n if (!allowed.includes(value)) err(path, `must be one of ${allowed.map((a) => JSON.stringify(a)).join(', ')}`)\n }\n function boolean(value: unknown, path: string) {\n if (typeof value !== 'boolean') err(path, 'must be a boolean')\n }\n function spdx(value: unknown, path: string) {\n if (!string(value, path)) return\n const parsed = parseSpdx(value)\n if (!parsed.ok) err(path, `not an SPDX expression: ${parsed.error}`)\n }\n function array(value: unknown, path: string, each: (item: unknown, path: string) => void) {\n if (!Array.isArray(value)) return err(path, 'must be an array')\n for (let i = 0; i < value.length; i++) {\n if (!(i in value)) err(`${path}[${i}]`, 'is a hole in a sparse array')\n else each(value[i], `${path}[${i}]`)\n }\n }\n\n function constraint(value: unknown, path: string) {\n if (!object(value, path, ['name', 'operator', 'value'])) return\n const name = value.name\n if (typeof name !== 'string' || !Object.hasOwn(CONSTRAINT_OPERATORS, name)) {\n return err(join(path, 'name'), `must be one of ${Object.keys(CONSTRAINT_OPERATORS).join(', ')}`)\n }\n oneOf(value.operator, join(path, 'operator'), CONSTRAINT_OPERATORS[name]!)\n const v = join(path, 'value')\n if (name === 'purpose') string(value.value, v)\n else if (name === 'spatial') {\n if (string(value.value, v) && !COUNTRY.test(value.value)) err(v, 'must be an ISO 3166-1 alpha-2 code')\n } else if (name === 'userClass') oneOf(value.value, v, USER_CLASSES)\n else integer(value.value, v)\n }\n\n function rule(value: unknown, path: string) {\n if (!object(value, path, ['action'], ['target', 'constraints'])) return\n oneOf(value.action, join(path, 'action'), ACTIONS)\n if (present(value, 'target')) oneOf(value.target, join(path, 'target'), ['work', 'adaptation'])\n if (present(value, 'constraints')) array(value.constraints, join(path, 'constraints'), constraint)\n }\n\n function duty(value: unknown, path: string) {\n if (!isObj(value)) return err(path, 'must be an object')\n const optional: Record<string, string[]> = {\n attribute: [],\n shareAlike: ['license'],\n includeNotice: [],\n discloseSource: ['network'],\n stateChanges: [],\n }\n if (typeof value.duty !== 'string' || !Object.hasOwn(optional, value.duty)) {\n return err(join(path, 'duty'), `must be one of ${Object.keys(optional).join(', ')}`)\n }\n object(value, path, ['duty'], optional[value.duty])\n if (value.duty === 'shareAlike' && present(value, 'license')) spdx(value.license, join(path, 'license'))\n if (value.duty === 'discloseSource' && present(value, 'network')) boolean(value.network, join(path, 'network'))\n }\n\n const top = ['profile', 'spdx', 'legal', 'permissions', 'prohibitions', 'duties', 'grant']\n if (!object(terms, '', top, ['transition', 'postTerm', 'governingLaw'])) return { ok: false, errors }\n\n if (terms.profile !== TERMS_PROFILE) err('profile', `must be ${TERMS_PROFILE}`)\n if (present(terms, 'spdx')) spdx(terms.spdx, 'spdx')\n\n if (present(terms, 'legal') && object(terms.legal, 'legal', ['sha256', 'lang', 'canonicalUrl'])) {\n if (string(terms.legal.sha256, 'legal.sha256') && !SHA256_HEX.test(terms.legal.sha256)) {\n err('legal.sha256', 'must be 64 lowercase hex characters without 0x')\n }\n string(terms.legal.lang, 'legal.lang')\n string(terms.legal.canonicalUrl, 'legal.canonicalUrl')\n }\n\n for (const key of ['permissions', 'prohibitions'] as const) if (present(terms, key)) array(terms[key], key, rule)\n if (present(terms, 'duties')) array(terms.duties, 'duties', duty)\n\n if (present(terms, 'transition') && object(terms.transition, 'transition', ['changeAt', 'changeLicense'])) {\n const { changeAt, changeLicense } = terms.transition\n if (object(changeAt, 'transition.changeAt', [], ['afterSeconds', 'at'])) {\n const after = present(changeAt, 'afterSeconds')\n const at = present(changeAt, 'at')\n if (after === at) err('transition.changeAt', 'must have exactly one of afterSeconds and at')\n if (after) integer(changeAt.afterSeconds, 'transition.changeAt.afterSeconds', 1)\n if (at) integer(changeAt.at, 'transition.changeAt.at')\n }\n spdx(changeLicense, 'transition.changeLicense')\n }\n\n if (present(terms, 'postTerm') && object(terms.postTerm, 'postTerm', ['derivatives', 'trainedModels'])) {\n oneOf(terms.postTerm.derivatives, 'postTerm.derivatives', ['retain', 'cease-distribution', 'remove'])\n oneOf(terms.postTerm.trainedModels, 'postTerm.trainedModels', ['may-continue', 'no-new-training'])\n }\n\n const grantKeys = ['transferable', 'sublicensable', 'exclusive', 'revocableFor', 'warranty', 'duration']\n if (present(terms, 'grant') && object(terms.grant, 'grant', grantKeys)) {\n const g = terms.grant\n boolean(g.transferable, 'grant.transferable')\n boolean(g.sublicensable, 'grant.sublicensable')\n if (g.exclusive !== false) err('grant.exclusive', 'must be false')\n oneOf(g.revocableFor, 'grant.revocableFor', ['breach-only', 'never'])\n oneOf(g.warranty, 'grant.warranty', ['as-is', 'ownership'])\n if (g.duration !== 'copyright-term') integer(g.duration, 'grant.duration', 1)\n }\n\n if (present(terms, 'governingLaw')) string(terms.governingLaw, 'governingLaw')\n\n // Contradictions, checked only when the shapes are sound.\n if (errors.length === 0) {\n const t = terms as unknown as SeedLicenseTerms\n const key = (r: { action: string; target?: string }) => `${r.action}/${r.target ?? 'work'}`\n const permitted = new Set(t.permissions.map(key))\n t.prohibitions.forEach((r, i) => {\n if (permitted.has(key(r))) err(`prohibitions[${i}]`, `${key(r)} is also permitted`)\n })\n t.duties.forEach((d, i) => {\n if (d.duty === 'shareAlike' && !t.permissions.some((r) => r.action === 'derive')) {\n err(`duties[${i}]`, 'shareAlike needs a derive permission')\n }\n })\n }\n\n return errors.length === 0 ? { ok: true, terms: terms as unknown as SeedLicenseTerms } : { ok: false, errors }\n}\n\nfunction join(path: string, key: string) {\n return path ? `${path}.${key}` : key\n}\n","import { sha256 } from '@noble/hashes/sha2'\nimport { bytesToHex, utf8ToBytes } from '@noble/hashes/utils'\nimport { canonicalJson } from './canonicalJson'\nimport { InvalidLicenseTermsError } from './errors'\nimport type { SeedLicenseTerms } from './terms'\nimport { validateTerms } from './validate'\n\n/**\n * The identity of a set of license terms: `0x` and the lowercase hex SHA-256 of their RFC 8785\n * canonical JSON. Throws {@link InvalidLicenseTermsError} on terms that fail `validateTerms`, so an\n * invalid object never gets a hash.\n */\nexport function termsHash(terms: SeedLicenseTerms): `0x${string}` {\n const result = validateTerms(terms)\n if (!result.ok) throw new InvalidLicenseTermsError(result.errors)\n return `0x${bytesToHex(sha256(utf8ToBytes(canonicalJson(terms))))}`\n}\n","/** URLs of the Creative Commons modules, shared by the modules and by `fromUrl` in core. */\nexport const CC_CODES = ['by', 'by-sa', 'by-nc', 'by-nc-sa', 'by-nd', 'by-nc-nd'] as const\nexport type CcCode = (typeof CC_CODES)[number]\n\nexport const ccSpdx = (code: CcCode) => `CC-${code.toUpperCase()}-4.0`\n\nexport const ccUrls = (code: CcCode) => {\n const base = `https://creativecommons.org/licenses/${code}/4.0/`\n return { iri: base, canonicalUrl: `${base}legalcode.en`, stewardDeedUrl: `${base}deed.en` }\n}\n\nexport const CC0_URLS = {\n iri: 'https://creativecommons.org/publicdomain/zero/1.0/',\n canonicalUrl: 'https://creativecommons.org/publicdomain/zero/1.0/legalcode.en',\n stewardDeedUrl: 'https://creativecommons.org/publicdomain/zero/1.0/deed.en',\n}\n\nexport const RESERVED_SPDX = 'LicenseRef-seed-all-rights-reserved-1'\nexport const RESERVED_URLS = {\n canonicalUrl:\n 'https://github.com/JournoLabs/seed-protocol-sdk/blob/main/packages/licensing/legal/LicenseRef-seed-all-rights-reserved-1.txt',\n}\n\n/** Every module URL (IRI and legal text) to the module's SPDX id. */\nexport function catalogUrlTable(): Map<string, string> {\n const table = new Map<string, string>()\n for (const code of CC_CODES) {\n const urls = ccUrls(code)\n table.set(urls.iri, ccSpdx(code))\n table.set(urls.canonicalUrl, ccSpdx(code))\n }\n table.set(CC0_URLS.iri, 'CC0-1.0')\n table.set(CC0_URLS.canonicalUrl, 'CC0-1.0')\n table.set(RESERVED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,cAAc;CACd,gBAAgB;AAClB,GAEaC,IAAgB,yCAChBC,IAAgB,EAC3B,cACE,+HACJ;AAGA,SAAgBC,IAAuC;CACrD,IAAMC,oBAAQ,IAAI,IAAoB;CACtC,KAAK,IAAMP,KAAQF,GAAU;EAC3B,IAAMU,IAAOP,EAAOD,CAAI;EAExB,AADAO,EAAM,IAAIC,EAAK,KAAKT,EAAOC,CAAI,CAAC,GAChCO,EAAM,IAAIC,EAAK,cAAcT,EAAOC,CAAI,CAAC;CAC3C;CAIA,OAHAO,EAAM,IAAIJ,EAAS,KAAK,SAAS,GACjCI,EAAM,IAAIJ,EAAS,cAAc,SAAS,GAC1CI,EAAM,IAAIF,EAAc,cAAcD,CAAa,GAC5CG;AACT"}
@@ -0,0 +1,20 @@
1
+ import { type SeedLicenseTerms } from './terms.js';
2
+ export type TermsValidationError = {
3
+ path: string;
4
+ message: string;
5
+ };
6
+ export type TermsValidationResult = {
7
+ ok: true;
8
+ terms: SeedLicenseTerms;
9
+ } | {
10
+ ok: false;
11
+ errors: TermsValidationError[];
12
+ };
13
+ /**
14
+ * Checks that a value is valid {@link SeedLicenseTerms}: the shape (no unknown keys, integers only),
15
+ * parseable SPDX expressions, and no contradictions: the same action and target both permitted and
16
+ * prohibited, share-alike without a derive permission, a transition with neither or both times.
17
+ * An optional key whose value is `undefined` counts as absent. Never throws.
18
+ */
19
+ export declare function validateTerms(terms: unknown): TermsValidationResult;
20
+ //# sourceMappingURL=validate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../src/validate.ts"],"names":[],"mappings":"AACA,OAAO,EAAwC,KAAK,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAErF,MAAM,MAAM,oBAAoB,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAA;AACpE,MAAM,MAAM,qBAAqB,GAAG;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,gBAAgB,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,oBAAoB,EAAE,CAAA;CAAE,CAAA;AAgBzH;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,qBAAqB,CAqJnE"}
package/package.json CHANGED
@@ -1,6 +1,74 @@
1
1
  {
2
2
  "name": "@seedprotocol/licensing",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.8.3",
4
+ "description": "License terms, catalog and deeds for Seed Protocol",
5
+ "keywords": [
6
+ "seed-protocol",
7
+ "license",
8
+ "spdx",
9
+ "creative-commons",
10
+ "odrl"
11
+ ],
12
+ "type": "module",
13
+ "engines": {
14
+ "node": ">=20.12.0"
15
+ },
16
+ "main": "./dist/index.js",
17
+ "types": "./dist/index.d.ts",
18
+ "exports": {
19
+ ".": {
20
+ "import": {
21
+ "types": "./dist/index.d.ts",
22
+ "default": "./dist/index.js"
23
+ },
24
+ "require": {
25
+ "types": "./dist/index.d.ts",
26
+ "default": "./dist/index.js"
27
+ }
28
+ },
29
+ "./catalog/cc": {
30
+ "import": {
31
+ "types": "./dist/catalog/cc/index.d.ts",
32
+ "default": "./dist/catalog/cc.js"
33
+ },
34
+ "require": {
35
+ "types": "./dist/catalog/cc/index.d.ts",
36
+ "default": "./dist/catalog/cc.js"
37
+ }
38
+ },
39
+ "./terms.schema.json": "./terms.schema.json",
40
+ "./package.json": "./package.json"
41
+ },
42
+ "files": [
43
+ "dist",
44
+ "terms.schema.json",
45
+ "CHANGELOG.md"
46
+ ],
47
+ "scripts": {
48
+ "build": "rimraf dist && tsc -p tsconfig.build.json && vite build && node ../../scripts/fix-dts-specifiers.js",
49
+ "test": "vitest run --reporter=default",
50
+ "prepublishOnly": "bun run build && node ../../scripts/sync-versions.js && node ../../scripts/check-publish-manifest.js"
51
+ },
52
+ "dependencies": {
53
+ "@noble/hashes": "^1.8.0"
54
+ },
55
+ "devDependencies": {
56
+ "@types/node": "^24.10.1",
57
+ "ajv": "^8.17.1",
58
+ "rimraf": "^6.0.1",
59
+ "typescript": "~5.9.3",
60
+ "vite": "^8.0.0",
61
+ "vitest": "^4.1.11"
62
+ },
63
+ "author": "Keith Axline <keith@journodao.xyz>",
64
+ "license": "MIT",
65
+ "repository": {
66
+ "type": "git",
67
+ "url": "git+https://github.com/JournoLabs/seed-protocol-sdk.git",
68
+ "directory": "packages/licensing"
69
+ },
70
+ "homepage": "https://github.com/JournoLabs/seed-protocol-sdk/tree/main/packages/licensing#readme",
71
+ "bugs": {
72
+ "url": "https://github.com/JournoLabs/seed-protocol-sdk/issues"
73
+ }
74
+ }