Skip to content
This repository has been archived by the owner on Oct 25, 2023. It is now read-only.

Commit

Permalink
updated deps
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeff Dickey committed May 19, 2016
1 parent 4265314 commit 4603276
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
14 changes: 8 additions & 6 deletions commands/status.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
'use strict'

let cli = require('heroku-cli-util')
let moment = require('moment')
let co = require('co')
let _ = require('lodash')
const cli = require('heroku-cli-util')
const co = require('co')

function capitalize (str) {
return str.substr(0, 1).toUpperCase() + str.substr(1)
Expand All @@ -20,6 +18,10 @@ function printStatus (status) {
}

function * run (context) {
const moment = require('moment')
const maxBy = require('lodash.maxby')
const padEnd = require('lodash.padend')

let host = process.env.HEROKU_STATUS_HOST || 'https://status.heroku.com'
let response = (yield cli.got(host + '/api/v3/current-status', {
path: '/api/v3/current-status',
Expand All @@ -39,9 +41,9 @@ function * run (context) {
cli.log()
cli.styledHeader(`${incident.title} ${cli.color.yellow(moment(incident.created_at).format('LT'))} ${cli.color.cyan(incident.full_url)}`)

let padding = _.maxBy(incident.updates, 'update_type.length').update_type.length + 1
let padding = maxBy(incident.updates, 'update_type.length').update_type.length + 1
incident.updates.forEach((u) => {
cli.log(`${cli.color.yellow(_.padEnd(u.update_type, padding))} ${moment(u.updated_at).format('LT')} (${moment(u.updated_at).fromNow()})`)
cli.log(`${cli.color.yellow(padEnd(u.update_type, padding))} ${moment(u.updated_at).format('LT')} (${moment(u.updated_at).fromNow()})`)
cli.log(`${u.contents}
`)
})
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@
},
"dependencies": {
"co": "4.6.0",
"heroku-cli-util": "5.10.10",
"lodash": "4.11.1",
"heroku-cli-util": "6.0.0",
"lodash.maxby": "4.4.0",
"lodash.padend": "4.5.0",
"moment": "2.13.0"
},
"devDependencies": {
"codeclimate-test-reporter": "0.3.1",
"coveralls": "2.11.9",
"mocha": "2.4.5",
"nock": "8.0.0",
"nyc": "6.4.0",
"snazzy": "3.0.1",
"standard": "6.0.8",
"nyc": "6.4.4",
"standard": "7.1.0",
"unexpected": "10.13.2"
},
"homepage": "https://github.com/heroku/heroku-status",
Expand All @@ -37,6 +37,6 @@
"coverage": "nyc report --reporter=text-lcov | codeclimate-test-reporter && nyc report --reporter=text-lcov | coveralls",
"postversion": "npm publish && git push && git push --tags",
"preversion": "npm test",
"test": "nyc mocha && standard | snazzy"
"test": "nyc mocha && standard"
}
}

0 comments on commit 4603276

Please sign in to comment.