Comparing version
@@ -13,2 +13,4 @@ #!/usr/bin/env node | ||
const commandSpf = require('../lib/commands/spf'); | ||
const fs = require('fs'); | ||
const pathlib = require('path'); | ||
@@ -289,2 +291,37 @@ const argv = yargs(hideBin(process.argv)) | ||
) | ||
.command( | ||
['license'], | ||
'Show license information', | ||
() => false, | ||
() => { | ||
fs.readFile(pathlib.join(__dirname, '..', 'LICENSE.txt'), (err, license) => { | ||
if (err) { | ||
console.error('Failed to load license information'); | ||
console.error(err); | ||
return process.exit(1); | ||
} | ||
console.error('Mailauth License'); | ||
console.error('================'); | ||
console.error(license.toString().trim()); | ||
console.error(''); | ||
fs.readFile(pathlib.join(__dirname, '..', 'licenses.txt'), (err, data) => { | ||
if (err) { | ||
console.error('Failed to load license information'); | ||
console.error(err); | ||
return process.exit(1); | ||
} | ||
console.error('Included Modules'); | ||
console.error('================'); | ||
console.error(data.toString().trim()); | ||
process.exit(); | ||
}); | ||
}); | ||
} | ||
) | ||
.option('verbose', { | ||
@@ -291,0 +328,0 @@ alias: 'v', |
31
cli.md
@@ -5,3 +5,2 @@ # CLI USAGE | ||
- [Requirements](#requirements) | ||
- [Installation](#installation) | ||
@@ -14,18 +13,14 @@ - [Help](#help) | ||
- [spf](#spf) - to validate SPF for an IP address and an email address | ||
- [license](#license) - display licenses for `mailauth` and included modules | ||
- [DNS cache file](#dns-cache-file) | ||
## Requirements | ||
- **Node.js v14+** – using an older version of Node is not supported | ||
## Installation | ||
Install `mailauth` globally to get the command line interface | ||
Download `mailauth` for your platform: | ||
``` | ||
npm install -g mailauth | ||
``` | ||
- [MacOS](https://github.com/postalsys/mailauth/releases/latest/download/mailauth.pkg) | ||
- [Linux](https://github.com/postalsys/mailauth/releases/latest/download/mailauth.gz) | ||
- [Windows](https://github.com/postalsys/mailauth/releases/latest/download/mailauth.exe) | ||
- Or install from the NPM registry: `npm install -g mailauth` | ||
> Depending on you system you might need to use _sudo_ for this step. | ||
## Help | ||
@@ -41,8 +36,2 @@ | ||
In some systems you can also use manpages (manpage availability depends on how node and npm were installed to the system). | ||
``` | ||
$ man mailauth | ||
``` | ||
## Available commands | ||
@@ -217,2 +206,10 @@ | ||
### license | ||
Display licenses for `mailauth` and included modules. | ||
``` | ||
$ mailauth licenses | ||
``` | ||
## DNS cache file | ||
@@ -219,0 +216,0 @@ |
@@ -1,2 +0,2 @@ | ||
Copyright (c) 2020-2021 Andris Reinman | ||
Copyright (c) 2020-2021 Postal Systems OÜ | ||
@@ -3,0 +3,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy |
@@ -31,5 +31,8 @@ # mailauth(1) | ||
**license**\ | ||
Display licenses for mailauth and included modules | ||
## Website | ||
[](https://github.com/andris9/mailauth) | ||
[](https://github.com/postalsys/mailauth) | ||
@@ -127,7 +130,7 @@ ## EXAMPLES | ||
Please report any bugs to https://github.com/andris9/mailauth/issues. | ||
Please report any bugs to https://github.com/postalsys/mailauth/issues. | ||
## LICENSE | ||
Copyright (c) 2020, Andris Reinman (MIT). | ||
Copyright (c) 2020-2021, Postal Systems (MIT). | ||
@@ -134,0 +137,0 @@ ## SEE ALSO |
{ | ||
"name": "mailauth", | ||
"version": "2.2.2", | ||
"version": "2.2.3", | ||
"description": "Email authentication library for Node.js", | ||
@@ -9,7 +9,9 @@ "main": "lib/mailauth.js", | ||
"prepublish": "npm run man || true", | ||
"man": "cd man && marked-man --version `node -e \"console.log('v'+require('../package.json').version)\"` --manual 'Mailauth Help' --section 1 man.md > mailauth.1" | ||
"man": "cd man && marked-man --version `node -e \"console.log('v'+require('../package.json').version)\"` --manual 'Mailauth Help' --section 1 man.md > mailauth.1", | ||
"build-dist": "npm run man && npm run licenses && pkg package.json", | ||
"licenses": "license-report --only=prod --output=table --config license-report-config.json > licenses.txt" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/andris9/mailauth.git" | ||
"url": "git+https://github.com/postalsys/mailauth.git" | ||
}, | ||
@@ -26,18 +28,20 @@ "keywords": [ | ||
], | ||
"author": "Andris Reinman", | ||
"author": "Postal Systems OÜ", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/andris9/mailauth/issues" | ||
"url": "https://github.com/postalsys/mailauth/issues" | ||
}, | ||
"homepage": "https://github.com/andris9/mailauth", | ||
"homepage": "https://github.com/postalsys/mailauth", | ||
"devDependencies": { | ||
"chai": "4.3.4", | ||
"eslint": "7.32.0", | ||
"eslint": "8.0.0", | ||
"eslint-config-nodemailer": "1.2.0", | ||
"eslint-config-prettier": "8.3.0", | ||
"js-yaml": "4.1.0", | ||
"license-report": "4.5.0", | ||
"marked": "0.7.0", | ||
"marked-man": "0.7.0", | ||
"mbox-reader": "1.1.5", | ||
"mocha": "9.1.0" | ||
"mocha": "9.1.2", | ||
"pkg": "5.3.3" | ||
}, | ||
@@ -50,6 +54,6 @@ "dependencies": { | ||
"node-forge": "0.10.0", | ||
"nodemailer": "6.6.3", | ||
"nodemailer": "6.7.0", | ||
"psl": "1.8.0", | ||
"punycode": "2.1.1", | ||
"yargs": "17.1.1" | ||
"yargs": "17.2.1" | ||
}, | ||
@@ -64,3 +68,16 @@ "engines": { | ||
"man": "man" | ||
}, | ||
"pkg": { | ||
"scripts": [ | ||
"workers/**/*.js" | ||
], | ||
"assets": [ | ||
"man/**/*", | ||
"licenses.txt" | ||
], | ||
"_targets": [ | ||
"node16-macos-x64" | ||
], | ||
"outputPath": "dist" | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
 | ||
 | ||
@@ -445,4 +445,4 @@ [Command line utility](cli.md) and a Node.js library for email authentication. | ||
© 2020 Andris Reinman | ||
© 2020-2021 Postal Systems OÜ | ||
Licensed under MIT license |
Sorry, the diff of this file is not supported yet
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
233492
1.63%42
7.69%4476
0.77%11
22.22%2
100%80
-20%5
25%+ Added
+ Added
- Removed
- Removed
Updated
Updated