Skip to content

Commit

Permalink
fix: updated engine
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Feb 1, 2018
1 parent f99a4bc commit f69f124
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 79 deletions.
11 changes: 5 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,15 @@
"lodash": "^4.17.4"
},
"devDependencies": {
"@anycli/command": "^0.2.11",
"@anycli/config": "^0.2.2",
"@anycli/engine": "^0.1.30",
"@anycli/config": "^0.2.3",
"@anycli/engine": "^0.1.35",
"@anycli/tslint": "^0.2.0",
"@anycli/version": "^0.1.15",
"@anycli/version": "^0.1.18",
"@commitlint/cli": "^6.0.5",
"@commitlint/config-conventional": "^6.0.4",
"@types/chai": "^4.1.2",
"@types/lodash": "^4.14.98",
"@types/mocha": "^2.2.47",
"@types/lodash": "^4.14.99",
"@types/mocha": "^2.2.48",
"@types/nock": "^9.1.2",
"@types/node": "^9.4.0",
"@types/node-notifier": "^0.0.28",
Expand Down
2 changes: 1 addition & 1 deletion src/command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ export default (args: string[] | string | undefined) => ({
if (!ctx.config) ctx.config = await loadConfig().run({} as any)
args = _.castArray(args)
ctx.expectation = ctx.expectation || `runs ${args.join(' ')}`
await run(args, ctx.config)
await run(args, ctx)
}
})
9 changes: 7 additions & 2 deletions test/fixtures/multi/src/commands/foo/bar.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
const {Command, flags} = require('@anycli/command')
const {Command, flags, parse} = require('@anycli/command')
const {cli} = require('cli-ux')

class CLI extends Command {
constructor(args, opts) {
super(args, opts)
this.options = parse(args, CLI)
}

async run() {
const name = this.flags.name || 'world'
const name = this.options.flags.name || 'world'
cli.log(`hello ${name}!`)
}
}
Expand Down
5 changes: 0 additions & 5 deletions test/fixtures/multi/src/index.js

This file was deleted.

92 changes: 27 additions & 65 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,18 @@
# yarn lockfile v1


"@anycli/command@^0.2.11":
version "0.2.11"
resolved "https://registry.yarnpkg.com/@anycli/command/-/command-0.2.11.tgz#b66f77ab8c001bb038295d489e85c9530eb87a97"
"@anycli/command@^0.2.18":
version "0.2.18"
resolved "https://registry.yarnpkg.com/@anycli/command/-/command-0.2.18.tgz#85e8de82f8f4091104cf8182781745d5492714e7"
dependencies:
"@anycli/parser" "^0.1.1"
"@anycli/parser" "^1.0.0"
debug "^3.1.0"
lodash "^4.17.4"
tslib "^1.9.0"

"@anycli/command@^0.2.9":
version "0.2.9"
resolved "https://registry.yarnpkg.com/@anycli/command/-/command-0.2.9.tgz#658ea8c623e047bc924582d5a885434aed22ed41"
dependencies:
"@anycli/parser" "^0.1.1"
debug "^3.1.0"
lodash "^4.17.4"
tslib "^1.9.0"

"@anycli/config@^0.2.0":
version "0.2.1"
resolved "https://registry.yarnpkg.com/@anycli/config/-/config-0.2.1.tgz#d32fe5036cd194c34ca32ee6bc5e1a4b0ca3c86f"
dependencies:
cli-ux "^3.3.8"
debug "^3.1.0"
fs-extra "^5.0.0"
load-json-file "^4.0.0"
lodash "^4.17.4"
read-pkg "^3.0.0"

"@anycli/config@^0.2.2":
version "0.2.2"
resolved "https://registry.yarnpkg.com/@anycli/config/-/config-0.2.2.tgz#272e8bd8a442b7e582d3844699edfd2ac3e6abb0"
"@anycli/config@^0.2.3":
version "0.2.3"
resolved "https://registry.yarnpkg.com/@anycli/config/-/config-0.2.3.tgz#2fc399d2d609c0efdf3108d240f0b557abad51dc"
dependencies:
cli-ux "^3.3.10"
debug "^3.1.0"
Expand All @@ -42,10 +22,12 @@
lodash "^4.17.4"
read-pkg "^3.0.0"

"@anycli/engine@^0.1.30":
version "0.1.30"
resolved "https://registry.yarnpkg.com/@anycli/engine/-/engine-0.1.30.tgz#8d340ed27d928f975805c935fcd392e07404cef5"
"@anycli/engine@^0.1.35":
version "0.1.35"
resolved "https://registry.yarnpkg.com/@anycli/engine/-/engine-0.1.35.tgz#40185e6e9ef56e2864a2f381d5786d76ff1f5de0"
dependencies:
"@anycli/command" "^0.2.18"
"@anycli/config" "^0.2.3"
"@anycli/manifest-file" "^0.2.0"
cli-ux "^3.3.10"
debug "^3.1.0"
Expand All @@ -63,9 +45,9 @@
lodash "^4.17.4"
rwlockfile "^2.0.21"

"@anycli/parser@^0.1.1":
version "0.1.3"
resolved "https://registry.yarnpkg.com/@anycli/parser/-/parser-0.1.3.tgz#6ad888815f65afcf66b6f462efc13a56743dd9d1"
"@anycli/parser@^1.0.0":
version "1.0.0"
resolved "https://registry.yarnpkg.com/@anycli/parser/-/parser-1.0.0.tgz#0ae14d75c3f66904c962ad75361d8d628509348a"
dependencies:
"@anycli/screen" "^0.0.3"
chalk "^2.3.0"
Expand All @@ -82,13 +64,13 @@
tslint "^5.9.1"
tslint-xo "^0.6.0"

"@anycli/version@^0.1.15":
version "0.1.15"
resolved "https://registry.yarnpkg.com/@anycli/version/-/version-0.1.15.tgz#81751d98c9f431833ca5b29e2b08aabc17edf44b"
"@anycli/version@^0.1.18":
version "0.1.18"
resolved "https://registry.yarnpkg.com/@anycli/version/-/version-0.1.18.tgz#a377ec46e1b625fd8d2b2aa27d3a7577ce595107"
dependencies:
"@anycli/command" "^0.2.9"
"@anycli/config" "^0.2.0"
cli-ux "^3.3.9"
"@anycli/command" "^0.2.18"
"@anycli/config" "^0.2.3"
cli-ux "^3.3.10"

"@commitlint/cli@^6.0.5":
version "6.0.5"
Expand Down Expand Up @@ -206,13 +188,13 @@
version "4.1.2"
resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.1.2.tgz#f1af664769cfb50af805431c407425ed619daa21"

"@types/lodash@^4.14.98":
version "4.14.98"
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.98.tgz#aaf012ae443e657e7885e605a4c1b340db160609"
"@types/lodash@^4.14.99":
version "4.14.99"
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.99.tgz#e6e10c0a4cc16c7409b3181f1e66880d2fb7d4dc"

"@types/mocha@^2.2.47":
version "2.2.47"
resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-2.2.47.tgz#30bbd880834d4af0f609025f282a69b8d4458f06"
"@types/mocha@^2.2.48":
version "2.2.48"
resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-2.2.48.tgz#3523b126a0b049482e1c3c11877460f76622ffab"

"@types/nock@^9.1.2":
version "9.1.2"
Expand Down Expand Up @@ -521,26 +503,6 @@ cli-ux@^3.3.10:
strip-ansi "^4.0.0"
supports-color "^5.1.0"

cli-ux@^3.3.8, cli-ux@^3.3.9:
version "3.3.9"
resolved "https://registry.yarnpkg.com/cli-ux/-/cli-ux-3.3.9.tgz#b3d09bb9057d2ef75cfd492d58359dd923c0a16b"
dependencies:
"@anycli/screen" "^0.0.3"
"@heroku/linewrap" "^1.0.0"
ansi-styles "^3.2.0"
cardinal "^1.0.0"
chalk "^2.3.0"
clean-stack "^1.3.0"
extract-stack "^1.0.0"
fs-extra "^5.0.0"
indent-string "^3.2.0"
lodash "^4.17.4"
node-notifier "^5.2.1"
password-prompt "^1.0.4"
semver "^5.5.0"
strip-ansi "^4.0.0"
supports-color "^5.1.0"

cli-width@^2.0.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639"
Expand Down

0 comments on commit f69f124

Please sign in to comment.