Skip to content

Commit

Permalink
oclifify
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Apr 9, 2018
1 parent 759ce99 commit 24bcef0
Show file tree
Hide file tree
Showing 38 changed files with 799 additions and 3,775 deletions.
25 changes: 25 additions & 0 deletions .circleci/greenkeeper
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/env bash

set -ex

PATH=/usr/local/share/.config/yarn/global/node_modules/.bin:$PATH

if [[ "$CIRCLE_BRANCH" != greenkeeper/* ]]; then
yarn
# yarn check
exit 0
fi

if [[ ! -z "$GIT_EMAIL" ]] & [[ ! -z "$GIT_USERNAME" ]]; then
git config --global push.default simple
git config --global user.email "$GIT_EMAIL"
git config --global user.name "$GIT_USERNAME"
fi

if [[ ! -x "$(command -v greenkeeper-lockfile-update)" ]]; then
yarn global add greenkeeper-lockfile@1
fi

greenkeeper-lockfile-update
yarn
greenkeeper-lockfile-upload
6 changes: 2 additions & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@ root = true
[*]
indent_style = space
indent_size = 2
tab_width = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[resources/deb/install-ubuntu.sh]
indent_style = tab
[*.md]
trim_trailing_whitespace = false
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/lib
3 changes: 3 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "oclif"
}
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* text=auto
*.js text eol=lf
*.ts text eol=lf
12 changes: 10 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
*-debug.log
*-error.log
.oclif.manifest.json
/dist
/lib
/node_modules
/package-lock.json
/tmp
cli
coverage
lib
dist
tmp
lib
node_modules
package-lock.json
tmp
17 changes: 2 additions & 15 deletions bin/run
Original file line number Diff line number Diff line change
@@ -1,17 +1,4 @@
#!/usr/bin/env node

const path = require('path')
const root = path.join(__dirname, '..')
const pjson = require(path.join(root, 'package.json'))
const semver = require('semver')
const nodeVersion = process.versions.node
if (!semver.satisfies(nodeVersion, pjson.engines.node)) {
process.stderr.write(`WARNING\nWARNING Node version must be ${pjson.engines.node} to use the Heroku CLI\nWARNING\n`)
}

const {run} = require('@cli-engine/engine')
const config = {
reexecBin: __filename,
updateDisabled: 'Update CLI with `npm update -g heroku-cli`'
}
run(process.argv, config)
require('@oclif/command').run()
.catch(require('@oclif/errors/handle'))
132 changes: 80 additions & 52 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,40 @@
{
"name": "heroku-cli",
"description": "CLI to interact with Heroku",
"version": "6.16.8",
"version": "6.16.8-dev",
"author": "Jeff Dickey @jdxcode",
"bin": {
"heroku": "bin/run"
"heroku": "./bin/run"
},
"bugs": "https://github.com/heroku/cli/issues",
"cli-engine": {
"oclif": {
"commands": "./lib/commands",
"plugins": [
"@oclif/plugin-legacy",
"@heroku-cli/plugin-addons",
"@heroku-cli/plugin-apps",
"@heroku-cli/plugin-auth",
"@heroku-cli/plugin-certs",
"@heroku-cli/plugin-ci",
"@heroku-cli/plugin-container-registry",
"@heroku-cli/plugin-git",
"@heroku-cli/plugin-local",
"@heroku-cli/plugin-oauth",
"@heroku-cli/plugin-orgs",
"@heroku-cli/plugin-pg",
"@heroku-cli/plugin-pipelines",
"@heroku-cli/plugin-ps",
"@heroku-cli/plugin-run",
"@heroku-cli/plugin-spaces",
"@heroku-cli/plugin-status",
"@heroku-cli/plugin-webhooks",
"@oclif/plugin-help",
"@oclif/plugin-update",
"heroku-ps-exec",
"heroku-redis"
],
"bin": "heroku",
"userPluginsEnabled": true,
"dirname": "heroku",
"defaultCommand": "dashboard",
"npmRegistry": "https://cli-npm.heroku.com",
"topics": {
"2fa": {
Expand Down Expand Up @@ -40,35 +63,28 @@
"./lib/hooks/update/completions"
]
},
"s3": {
"host": "cli-assets.heroku.com"
},
"corePlugins": [
"@heroku-cli/plugin-addons",
"@heroku-cli/plugin-apps",
"@heroku-cli/plugin-auth",
"@heroku-cli/plugin-certs",
"@heroku-cli/plugin-ci",
"@heroku-cli/plugin-container-registry",
"@heroku-cli/plugin-git",
"@heroku-cli/plugin-local",
"@heroku-cli/plugin-oauth",
"@heroku-cli/plugin-orgs",
"@heroku-cli/plugin-pg",
"@heroku-cli/plugin-pipelines",
"@heroku-cli/plugin-ps",
"@heroku-cli/plugin-run",
"@heroku-cli/plugin-spaces",
"@heroku-cli/plugin-status",
"@heroku-cli/plugin-webhooks",
"heroku-ps-exec",
"heroku-redis"
]
"update": {
"node": {
"version": "8.11.1",
"targets": [
"darwin-x64"
]
},
"s3": {
"bucket": "heroku-cli-assets",
"host": "https://cli-assets.heroku.com",
"templates": {
"platformBaseDir": "<%- name %>-v<%- version %>-<%- platform %>-<%- arch %>",
"vanillaBaseDir": "<%- name %>",
"platformTarball": "<%- name %>/channels/<%- channel %>/heroku-cli-v<%- version %>-<%- platform %>-<%- arch %>",
"vanillaTarball": "<%- name %>/channels/<%- channel %>/heroku-cli-v<%- version %>",
"platformManifest": "<%- name %>/channels/<%- channel %>/<%- platform %>-<%- arch %>",
"vanillaManifest": "<%- name %>/channels/<%- channel %>/version"
}
}
}
},
"dependencies": {
"@cli-engine/command": "^12.1.1",
"@cli-engine/config": "^5.1.0",
"@cli-engine/engine": "6.2.10",
"@heroku-cli/color": "^1.1.3",
"@heroku-cli/command": "^8.0.4",
"@heroku-cli/plugin-addons": "^1.2.28",
Expand All @@ -88,15 +104,19 @@
"@heroku-cli/plugin-spaces": "^2.12.0",
"@heroku-cli/plugin-status": "^5.0.9",
"@heroku-cli/plugin-webhooks": "^1.1.2",
"@oclif/config": "^1.3.62",
"@oclif/command": "^1.4.10",
"@oclif/config": "^1.4.10",
"@oclif/plugin-help": "^1.2.3",
"@oclif/plugin-legacy": "^1.0.7",
"@oclif/plugin-update": "^1.1.3",
"cli-flags": "^2.0.7",
"cli-ux": "2.0.21",
"cli-ux": "3.3.27",
"debug": "3.1.0",
"execa": "^0.10.0",
"fs-extra": "5.0.0",
"heroku-ps-exec": "2.3.1",
"heroku-redis": "1.3.0",
"http-call": "4.0.8",
"http-call": "5.1.0",
"netrc-parser": "3.1.3",
"semver": "5.5.0",
"tar-fs": "^1.16.0",
Expand All @@ -105,34 +125,40 @@
"uuid": "^3.2.1"
},
"devDependencies": {
"@heroku-cli/tslint": "^1.1.4",
"@oclif/dev-cli": "^1.9.16",
"@oclif/test": "^1.0.4",
"@oclif/tslint": "^1.1.0",
"@types/ansi-styles": "^2.0.30",
"@types/chai": "^4.1.2",
"@types/debug": "^0.0.30",
"@types/execa": "^0.9.0",
"@types/fs-extra": "5.0.1",
"@types/jest": "22.2.2",
"@types/glob": "^5.0.35",
"@types/lodash": "^4.14.106",
"@types/mocha": "^5.0.0",
"@types/nock": "9.1.2",
"@types/node": "9.6.2",
"@types/node": "^9.6.2",
"@types/supports-color": "3.1.0",
"@types/write-json-file": "^2.2.1",
"aws-sdk": "^2.222.1",
"chai": "^4.1.2",
"del-cli": "1.1.0",
"husky": "0.14.3",
"jest": "22.4.3",
"lodash": "^4.17.5",
"mocha": "^5.0.5",
"nock": "9.2.3",
"ts-jest": "22.4.2",
"qqjs": "^0.3.6",
"read-pkg": "^3.0.0",
"ts-node": "5",
"tslint": "^5.9.1",
"typescript": "2.8.1",
"xo": "^0.20.3"
"typescript": "^2.8.1"
},
"engineStrict": true,
"engines": {
"node": ">=8.3.0"
},
"files": [
"/lib",
".oclif.manifest.json",
"/bin",
"/lib",
"/yarn.lock"
],
"homepage": "https://cli.heroku.com",
Expand All @@ -141,13 +167,15 @@
"heroku-cli-plugin"
],
"license": "ISC",
"main": "lib/index.js",
"repository": "heroku/cli",
"scripts": {
"lint": "yarn run shellcheck && tsc -p . && tslint -p . -t stylish",
"posttest": "yarn run lint",
"precommit": "yarn run lint",
"prepare": "rm -rf lib && tsc && del-cli -rf \"lib/**/*.test.+(d.ts|js)\" \"lib/**/__test__\"",
"shellcheck": "./scripts/shellcheck",
"test": "jest"
}
"build": "rm -rf lib && tsc",
"postpublish": "rm -f .oclif.manifest.json",
"posttest": "tsc -p test --noEmit && tslint -p test -t stylish",
"prepublishOnly": "yarn run build && oclif-dev manifest",
"test": "mocha --forbid-only \"test/**/*.test.ts\"",
"version": "oclif-dev readme && git add README.md"
},
"types": "lib/index.d.ts"
}
8 changes: 0 additions & 8 deletions src/__test__/config.ts

This file was deleted.

37 changes: 0 additions & 37 deletions src/__test__/count.ts

This file was deleted.

37 changes: 0 additions & 37 deletions src/__test__/file.ts

This file was deleted.

26 changes: 0 additions & 26 deletions src/__test__/init.ts

This file was deleted.

Loading

0 comments on commit 24bcef0

Please sign in to comment.