0.5.2, linting, basic formatting tests, shrinkwrap
This commit is contained in:
Родитель
551e565fd9
Коммит
4c3f6989c5
|
@ -0,0 +1,12 @@
|
|||
extends: eslint:recommended
|
||||
|
||||
env:
|
||||
node: true
|
||||
es6: true
|
||||
browser: true
|
||||
|
||||
rules:
|
||||
comma-dangle: off
|
||||
no-console: off
|
||||
no-unused-vars: [error, { vars: all, args: none }]
|
||||
|
|
@ -1,2 +1,4 @@
|
|||
node_modules
|
||||
|
||||
npm-shrinkwrap.json
|
||||
npm-shrinkwrap.json
|
||||
|
|
8
index.js
8
index.js
|
@ -7,10 +7,8 @@
|
|||
|
||||
var chalk = require("chalk");
|
||||
var program = require("commander");
|
||||
var request = require("request");
|
||||
var rp = require("request-promise");
|
||||
var delay = require("timeout-as-promise");
|
||||
var merge = require("merge");
|
||||
var sprintf=require("sprintf-js").sprintf;
|
||||
var util = require("util");
|
||||
|
||||
|
@ -307,7 +305,7 @@ function formatAnswer(reportData, url, scan, options) {
|
|||
|
||||
// rescore
|
||||
var newScore = 100;
|
||||
for (var k in scores) {
|
||||
for (k in scores) {
|
||||
newScore += scores[k].score_modifier;
|
||||
}
|
||||
|
||||
|
@ -362,7 +360,7 @@ class Observatory {
|
|||
logger.info("go client: ", f.link("https://github.com/mozilla/tls-observatory"))
|
||||
logger.info("comment: %s", f.link("https://github.com/mozilla/observatory-cli/issues/5"))
|
||||
return
|
||||
};
|
||||
}
|
||||
|
||||
// require site for everything else
|
||||
logger.error(f.error("no <site> given"));
|
||||
|
@ -372,8 +370,6 @@ class Observatory {
|
|||
|
||||
let O = new Observatory();
|
||||
|
||||
var program = require("commander");
|
||||
|
||||
program
|
||||
.version(require("./package.json").version)
|
||||
.description(util.format("cli for interacting with Mozilla HTTP Observatory \n\n %s", f.link(SITE_URL)))
|
||||
|
|
11
package.json
11
package.json
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "observatory-cli",
|
||||
"description": "Command line client for Mozilla HTTP observatory service",
|
||||
"version": "0.5.1",
|
||||
"version": "0.5.2",
|
||||
"author": "Gregg Lind <glind@mozilla.com>",
|
||||
"bin": {
|
||||
"observatory": "./index.js"
|
||||
|
@ -13,15 +13,15 @@
|
|||
"chalk": "^1.1.3",
|
||||
"clim": "^1.1.1",
|
||||
"commander": "^2.9.0",
|
||||
"merge": "^1.2.0",
|
||||
"request": "^2.74.0",
|
||||
"request-promise": "^4.1.1",
|
||||
"sprintf-js": "^1.0.3",
|
||||
"timeout-as-promise": "^1.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"chai": "^3.5.0",
|
||||
"mocha": "^3.0.2"
|
||||
"depcheck": "^0.6.4",
|
||||
"eslint": "^3.5.0",
|
||||
"fixpack": "^2.3.1"
|
||||
},
|
||||
"homepage": "https://github.com/mozilla/observatory-cli#readme",
|
||||
"keywords": [
|
||||
|
@ -36,6 +36,7 @@
|
|||
"url": "git+https://github.com/mozilla/observatory-cli.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
"prepublish": "npm shrinkwrap",
|
||||
"test": "eslint '**.js' && depcheck && fixpack && echo OK"
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче