Skip to content

Commit

Permalink
fix: use @anycli/errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Feb 6, 2018
1 parent 5027dc9 commit 82530fd
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 19 deletions.
1 change: 1 addition & 0 deletions bin/run
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env node

require('..').run()
.catch(require('@anycli/errors/handle'))
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@
},
"bugs": "https://github.com/anycli/cli/issues",
"dependencies": {
"@anycli/command": "^1.2.7",
"@anycli/config": "^1.2.3",
"@anycli/command": "^1.2.9",
"@anycli/config": "^1.3.9",
"@anycli/errors": "^0.2.0",
"@anycli/plugin-help": "^0.6.3",
"@anycli/plugin-not-found": "^0.1.16",
"debug": "^3.1.0",
Expand All @@ -30,8 +31,8 @@
},
"devDependencies": {
"@anycli/dev-cli": "^0.1.6",
"@anycli/tslint": "^0.2.5",
"@types/lodash": "^4.14.100",
"@anycli/tslint": "^0.2.6",
"@types/lodash": "^4.14.101",
"@types/read-pkg": "^3.0.0",
"@types/shelljs": "^0.7.8",
"@types/yeoman-generator": "^2.0.1",
Expand Down
5 changes: 1 addition & 4 deletions templates/bin/run
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
#!/usr/bin/env node

require('@anycli/command').run()
.catch(err => {
console.error(err.stack)
process.exitCode = 1
})
.catch(require('@anycli/errors/handle'))
1 change: 1 addition & 0 deletions templates/single/bin/run.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env node

require('..').run()
.catch(require('@anycli/errors/handle'))
1 change: 1 addition & 0 deletions templates/single/bin/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ const dev = fs.existsSync(path.join(__dirname, '../tsconfig.json'))
if (dev) require('ts-node/register')

require(`../${dev ? 'src' : 'lib'}`).run()
.catch(require('@anycli/errors/handle'))
44 changes: 33 additions & 11 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,20 @@
dependencies:
"@anycli/parser" "^3.2.4"

"@anycli/command@^1.2.7":
version "1.2.7"
resolved "https://registry.yarnpkg.com/@anycli/command/-/command-1.2.7.tgz#52d4991183b2690591ccd06892d131105e0b79a4"
"@anycli/command@^1.2.9":
version "1.2.9"
resolved "https://registry.yarnpkg.com/@anycli/command/-/command-1.2.9.tgz#6db08fbb3537c8cc2f616415fcd6360043750f38"
dependencies:
"@anycli/parser" "^3.2.4"
"@anycli/parser" "^3.2.5"

"@anycli/config@^1.1.8", "@anycli/config@^1.2.3":
"@anycli/config@^1.1.8":
version "1.2.3"
resolved "https://registry.yarnpkg.com/@anycli/config/-/config-1.2.3.tgz#6bedf5111146c5563f74fde4fc89d74da7920c5a"

"@anycli/config@^1.3.9":
version "1.3.9"
resolved "https://registry.yarnpkg.com/@anycli/config/-/config-1.3.9.tgz#794b9f7dd6b2c8b23cfc448f8450206171a05655"

"@anycli/dev-cli@^0.1.6":
version "0.1.6"
resolved "https://registry.yarnpkg.com/@anycli/dev-cli/-/dev-cli-0.1.6.tgz#bb27980fe2cfb26f889768006c26735350fdfe28"
Expand All @@ -26,10 +30,24 @@
"@anycli/config" "^1.1.8"
"@anycli/plugin-help" "^0.6.2"

"@anycli/errors@^0.2.0":
version "0.2.0"
resolved "https://registry.yarnpkg.com/@anycli/errors/-/errors-0.2.0.tgz#ee421115dcdb499d76de9d4853718c06e1c5d5f0"
dependencies:
clean-stack "^1.3.0"
fs-extra "^5.0.0"
indent-string "^3.2.0"
strip-ansi "^4.0.0"
wrap-ansi "^3.0.1"

"@anycli/parser@^3.2.4":
version "3.2.4"
resolved "https://registry.yarnpkg.com/@anycli/parser/-/parser-3.2.4.tgz#30297ac2fa225b37efaab5c0062bf189988b3ce8"

"@anycli/parser@^3.2.5":
version "3.2.5"
resolved "https://registry.yarnpkg.com/@anycli/parser/-/parser-3.2.5.tgz#d0e7ddb14945cb84377fa69095009ca6005e6b6d"

"@anycli/plugin-help@^0.6.2", "@anycli/plugin-help@^0.6.3":
version "0.6.3"
resolved "https://registry.yarnpkg.com/@anycli/plugin-help/-/plugin-help-0.6.3.tgz#e365947b69ce232cbd49fcda934dd53852d2503f"
Expand All @@ -50,9 +68,9 @@
"@heroku-cli/color" "^1.1.3"
string-similarity "^1.2.0"

"@anycli/tslint@^0.2.5":
version "0.2.5"
resolved "https://registry.yarnpkg.com/@anycli/tslint/-/tslint-0.2.5.tgz#63feeb981b11f36326e0cb745c62f51d55c2ed67"
"@anycli/tslint@^0.2.6":
version "0.2.6"
resolved "https://registry.yarnpkg.com/@anycli/tslint/-/tslint-0.2.6.tgz#4251f4cb3744dc577309b4351d2c2e8b65072de2"
dependencies:
tslint "^5.9.1"
tslint-xo "^0.6.0"
Expand Down Expand Up @@ -85,9 +103,9 @@
"@types/rx" "*"
"@types/through" "*"

"@types/lodash@^4.14.100":
version "4.14.100"
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.100.tgz#f353dd9d3a9785638b6cb8023e6639097bd31969"
"@types/lodash@^4.14.101":
version "4.14.101"
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.101.tgz#512f6c9e1749890f4d024e98cb995a63f562d458"

"@types/minimatch@*":
version "3.0.3"
Expand Down Expand Up @@ -453,6 +471,10 @@ clean-regexp@^1.0.0:
dependencies:
escape-string-regexp "^1.0.5"

clean-stack@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-1.3.0.tgz#9e821501ae979986c46b1d66d2d432db2fd4ae31"

cli-boxes@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-1.0.0.tgz#4fa917c3e59c94a004cd61f8ee509da651687143"
Expand Down

0 comments on commit 82530fd

Please sign in to comment.