Skip to content

Commit

Permalink
fix: updated dev-cli
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Apr 10, 2018
1 parent 3b4f0a0 commit 0fd606b
Show file tree
Hide file tree
Showing 3 changed files with 206 additions and 207 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"dependencies": {
"@heroku-cli/color": "^1.1.3",
"@oclif/command": "^1.4.13",
"@oclif/config": "^1.4.12",
"@oclif/config": "^1.4.14",
"@oclif/errors": "^1.0.4",
"@types/semver": "^5.5.0",
"cli-ux": "^3.3.28",
Expand All @@ -21,7 +21,7 @@
"tar-fs": "^1.16.0"
},
"devDependencies": {
"@oclif/dev-cli": "^1.9.19",
"@oclif/dev-cli": "^1.10.0",
"@oclif/plugin-help": "^1.2.3",
"@oclif/test": "^1.0.4",
"@oclif/tslint": "^1.1.0",
Expand Down
8 changes: 4 additions & 4 deletions src/commands/update.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import color from '@heroku-cli/color'
import Command, {flags} from '@oclif/command'
import {ITargetManifest} from '@oclif/dev-cli'
import {IManifest} from '@oclif/dev-cli'
import cli from 'cli-ux'
import * as spawn from 'cross-spawn'
import * as fs from 'fs-extra'
Expand Down Expand Up @@ -44,11 +44,11 @@ export default class UpdateCommand extends Command {
cli.action.stop()
}

private async fetchManifest(): Promise<ITargetManifest> {
private async fetchManifest(): Promise<IManifest> {
if (!this.s3Host) throw new Error('S3 host not defined')
const http: typeof HTTP = require('http-call').HTTP
try {
const key = _.template(this.config.pjson.oclif.update.s3.templates.platformManifest)({...this.config, channel: this.channel})
const key = _.template(this.config.pjson.oclif.update.s3.templates.target.versioned)({...this.config, channel: this.channel})
const url = new URL(this.s3Host)
url.pathname = path.join(url.pathname, key)
let {body} = await http.get(url.toString())
Expand All @@ -59,7 +59,7 @@ export default class UpdateCommand extends Command {
}
}

private async update(manifest: ITargetManifest) {
private async update(manifest: IManifest) {
const {version, channel} = manifest
cli.action.start(`${this.config.name}: Updating CLI from ${color.green(this.config.version)} to ${color.green(version)}${channel === 'stable' ? '' : ' (' + color.yellow(channel) + ')'}`)
const http: typeof HTTP = require('http-call').HTTP
Expand Down
Loading

0 comments on commit 0fd606b

Please sign in to comment.