All Projects → behance → license-to-fail

behance / license-to-fail

Licence: Apache-2.0 License
A license to fail your build (exits when a package in node_modules has a disallowed license)

Programming Languages

javascript
184084 projects - #8 most used programming language

Labels

Projects that are alternatives of or similar to license-to-fail

Pelock Software Protection And Licensing Sdk
Software copy protection against cracking & reverse engineering with anti-cracking & anti-debugging techniques. Software license key system with time trial options.
Stars: ✭ 109 (+55.71%)
Mutual labels:  licensing
electron-license
Tools for electron apps to work with licenses.
Stars: ✭ 18 (-74.29%)
Mutual labels:  licensing
simpleopendata
simple guidelines for publishing open data in useful formats
Stars: ✭ 87 (+24.29%)
Mutual labels:  licensing
Npm License Crawler
Analyzes license information for multiple node.js modules (package.json files) as part of your software project.
Stars: ✭ 168 (+140%)
Mutual labels:  licensing
Choosealicense.com
A site to provide non-judgmental guidance on choosing a license for your open source project
Stars: ✭ 2,648 (+3682.86%)
Mutual labels:  licensing
secureapp
Secure licensing solution for .NET
Stars: ✭ 13 (-81.43%)
Mutual labels:  licensing
Ethicalsource.dev
Home of the Organization for Ethical Source
Stars: ✭ 105 (+50%)
Mutual labels:  licensing
skywalking-eyes
A full-featured license tool to check and fix license headers and resolve dependencies' licenses.
Stars: ✭ 143 (+104.29%)
Mutual labels:  licensing
Standard.licensing
Easy-to-use licensing library for .NET Framework, Mono, .NET Core, and Xamarin products
Stars: ✭ 239 (+241.43%)
Mutual labels:  licensing
TrialMaker.Demo
A powerful yet straight-forward library suite that provides secure trial license generation and copy-protection features for .NET applications. It also supports premium license generation for expired free-trials.
Stars: ✭ 21 (-70%)
Mutual labels:  licensing
License List Data
Various data formats for the SPDX License List including RDFa, HTML, Text, and JSON
Stars: ✭ 182 (+160%)
Mutual labels:  licensing
Askalono
A tool & library to detect open source licenses from texts
Stars: ✭ 201 (+187.14%)
Mutual labels:  licensing
license-up
Create a license quickly
Stars: ✭ 95 (+35.71%)
Mutual labels:  licensing
Cargo About
📜 Cargo plugin to generate list of all licenses for a crate 🦀
Stars: ✭ 148 (+111.43%)
Mutual labels:  licensing
license-key-gen
Generate license keys for given company details
Stars: ✭ 48 (-31.43%)
Mutual labels:  licensing
Licensingviewcontroller
📃 UIViewController subclass with a simple API for displaying licensing information.
Stars: ✭ 107 (+52.86%)
Mutual labels:  licensing
sandia-public-license
This is not a license of honor. No highly esteemed copyright statement is written here.
Stars: ✭ 114 (+62.86%)
Mutual labels:  licensing
cryptolens-java
Client API to access the functionality of Cryptolens Web API
Stars: ✭ 24 (-65.71%)
Mutual labels:  licensing
veye-checker
This projects creates SHA values for locale binaries - Shazam for packages.
Stars: ✭ 22 (-68.57%)
Mutual labels:  licensing
license-compatibility
©️ Check compatibility between different SPDX licenses
Stars: ✭ 31 (-55.71%)
Mutual labels:  licensing

license-to-fail npm travis npm-downloads

Will error when any packages in node_modules don't satisfy your allowed licenses.

Uses license-checker.

Install

$ npm install license-to-fail --save-dev

Usage

# use "license-to-fail" key in package.json
$ ./node_modules/.bin/license-to-fail
# pass a path to external config file
$ ./node_modules/.bin/license-to-fail ./path-to-config.js

If there is no output, then there aren't any errors.

Init

# creates a config.js file with the config in ./example-config.js
$ ./node_modules/.bin/license-to-fail init

Config

allowedPackages: takes an array of objects. The only required field is name.

allowedLicenses: takes an array of strings and calls indexOf on the licenses.

warnOnUnknown: instead of erroring on packages with an UNKNOWN license, just warn. (false by default)

ignoreDevDependencies: do not check licenses for devDependencies. (false by default)

strictMode: do not use fuzzy checking when validating licenses (e.g. BSD !== BSD-3-Clause). (false by default)

// ./config.js
module.exports = {
  allowedPackages: [
    {
      "name": "allowed-package-name-here",
      "extraFieldsForDocumentation": "hello!", // optional
      "date": "date added", // optional
      "reason": "reason for allowing" // optional
    }
  ],
  allowedLicenses: [
    "MIT",
    "Apache",
    "ISC",
    "WTF"
  ],
  warnOnUnknown: true
};

In package.json

{
  "name": "package-name",
  "license-to-fail": {
    "allowedPackages": [
      {
        "name": "allowed-package-name-here",
      }
  ],
    "allowedLicenses": [
      "MIT"
    ]
  }
}

Example Usage/Output

Running the tool on itself

If the config was MIT, ISC only:

module.exports = {
  "allowedPackages": [],
  "disallowedPackages": [],
  "allowedLicenses": [
    "MIT",
    "ISC"
  ]
};

You would have this output:

It will try to print the package name, version, license, and repo.

It will also print whether it is a direct dependency of the current node_modules (looks at package.json) or not.

$ ./bin/license-to-fail ./config.js

Disallowed Licenses:
INDIRECT DEP - [email protected] Apache-2.0: https://github.com/kemitchell/spdx-correct.js
INDIRECT DEP - [email protected] Apache-2.0: https://github.com/kemitchell/validate-npm-package-license.js
INDIRECT DEP - [email protected] Apache2: https://github.com/AceMetrix/package-license
INDIRECT DEP - [email protected] BSD: https://github.com/AceMetrix/npm-license
INDIRECT DEP - [email protected] BSD-2-Clause: https://github.com/npm/normalize-package-data
INDIRECT DEP - [email protected] BSD-3-Clause: https://github.com/davglass/license-checker
INDIRECT DEP - [email protected] Unlicense: https://github.com/shinnn/spdx-license-ids
INDIRECT DEP - [email protected] WTFPL: https://github.com/rlidwka/jju

# Error with process.exit(1)

If we add more allowedLicenses:

$ npm run check-license # no failures
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].