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 0fd606b commit 06b455d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 15 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.14",
"@oclif/config": "^1.6.0",
"@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.10.0",
"@oclif/dev-cli": "^1.10.1",
"@oclif/plugin-help": "^1.2.3",
"@oclif/test": "^1.0.4",
"@oclif/tslint": "^1.1.0",
Expand Down
8 changes: 2 additions & 6 deletions src/commands/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import * as fs from 'fs-extra'
import HTTP from 'http-call'
import * as _ from 'lodash'
import * as path from 'path'
import {URL} from 'url'

import {extract} from '../tar'
import {ls, wait} from '../util'
Expand Down Expand Up @@ -45,13 +44,10 @@ export default class UpdateCommand extends Command {
}

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.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())
const url = this.config.s3Url(this.config.s3Key('manifest'))
let {body} = await http.get(url)
return body
} catch (err) {
if (err.statusCode === 403) throw new Error(`HTTP 403: Invalid channel ${this.channel}`)
Expand Down
14 changes: 7 additions & 7 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,18 @@
debug "^3.1.0"
semver "^5.5.0"

"@oclif/config@^1.4.0", "@oclif/config@^1.4.13", "@oclif/config@^1.4.14":
version "1.4.14"
resolved "https://registry.yarnpkg.com/@oclif/config/-/config-1.4.14.tgz#ef792b5f4b4d44540f3cebc577eca5a77d17f96a"
"@oclif/config@^1.4.0", "@oclif/config@^1.6.0":
version "1.6.0"
resolved "https://registry.yarnpkg.com/@oclif/config/-/config-1.6.0.tgz#0d9a034a3364d0ff24368e039599f89e4c00f775"
dependencies:
debug "^3.1.0"

"@oclif/dev-cli@^1.10.0":
version "1.10.0"
resolved "https://registry.yarnpkg.com/@oclif/dev-cli/-/dev-cli-1.10.0.tgz#2ca8b30caeaf6959a84fd791195b0e5c99a322bf"
"@oclif/dev-cli@^1.10.1":
version "1.10.1"
resolved "https://registry.yarnpkg.com/@oclif/dev-cli/-/dev-cli-1.10.1.tgz#58546150b50c68176729581b817eb29a70106e24"
dependencies:
"@oclif/command" "^1.4.13"
"@oclif/config" "^1.4.13"
"@oclif/config" "^1.6.0"
"@oclif/errors" "^1.0.4"
"@oclif/plugin-help" "^1.2.3"
"@oclif/plugin-warn-if-update-available" "^1.3.0"
Expand Down

0 comments on commit 06b455d

Please sign in to comment.