Skip to content

Commit

Permalink
fix(deps): update dependency commander to v8 (#587)
Browse files Browse the repository at this point in the history
* fix(deps): update dependency commander to v8

* fix(cli): adapt to commander@8+ API

Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Mircea Nistor <[email protected]>
  • Loading branch information
3 people authored Nov 11, 2021
1 parent 9b0e00d commit 9fc5c50
Show file tree
Hide file tree
Showing 16 changed files with 20 additions and 24 deletions.
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"@veramo/selective-disclosure": "^3.0.0",
"@veramo/url-handler": "^3.0.0",
"blessed": "^0.1.81",
"commander": "^7.0.0",
"commander": "^8.0.0",
"console-table-printer": "^2.8.2",
"cors": "^2.8.5",
"cross-fetch": "^3.1.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/cli.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import program from 'commander'
import { program } from 'commander'
import inquirer from 'inquirer'

inquirer.registerPrompt('autocomplete', require('inquirer-autocomplete-prompt'))
Expand Down
10 changes: 7 additions & 3 deletions packages/cli/src/config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'cross-fetch/polyfill'
import program from 'commander'
import { program } from 'commander'
import { SecretBox } from '@veramo/kms-local'
import { getAgent, getConfig } from './setup'
const fs = require('fs')
Expand Down Expand Up @@ -77,9 +77,13 @@ config
)
} else {
if (typeof agent[options.method] !== 'function') {
console.error(`The agent was created using the config, but the 'agent.${options.method}()' method is not available. Make sure the plugin that implements that method is installed.`)
console.error(
`The agent was created using the config, but the 'agent.${options.method}()' method is not available. Make sure the plugin that implements that method is installed.`,
)
} else {
console.log(`Your Veramo configuration seems fine. An agent can be created and the 'agent.${options.method}()' method can be called on it.`)
console.log(
`Your Veramo configuration seems fine. An agent can be created and the 'agent.${options.method}()' method can be called on it.`,
)
}
}
})
2 changes: 1 addition & 1 deletion packages/cli/src/credential.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { W3CCredential } from '@veramo/core'
import { getAgent } from './setup'
import program from 'commander'
import { program } from 'commander'
import inquirer from 'inquirer'
import qrcode from 'qrcode-terminal'

Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
ApiParameterListMixin,
ApiReturnTypeMixin,
} from '@microsoft/api-extractor-model'
import program from 'commander'
import { program } from 'commander'
import { writeFileSync } from 'fs'
import { OpenAPIV3 } from 'openapi-types'
import { resolve } from 'path'
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/did.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { IDIDManagerCreateArgs } from '@veramo/core'
import { getAgent } from './setup'
import inquirer from 'inquirer'
import program from 'commander'
import { program } from 'commander'
import { printTable } from 'console-table-printer'

const did = program.command('did').description('Decentralized identifiers')
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/discover.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getAgent } from './setup'
import program from 'commander'
import { program } from 'commander'
import { printTable } from 'console-table-printer'

const discover = program.command('discover').description('Discovery')
Expand Down
4 changes: 1 addition & 3 deletions packages/cli/src/execute.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { input } from 'blessed'
import program from 'commander'
import { program } from 'commander'
import inquirer from 'inquirer'
import jsonpointer from 'jsonpointer'
import { getAgent } from './setup'
const fs = require('fs')
const OasResolver = require('oas-resolver')
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/explore/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getAgent } from '../setup'
import program from 'commander'
import { program } from 'commander'
import { renderMainScreen } from './main'

program
Expand Down
1 change: 0 additions & 1 deletion packages/cli/src/explore/presentations.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import blessed, { Widgets } from 'blessed'
import { VerifiablePresentation } from '@veramo/core'
import { UniqueVerifiablePresentation } from '@veramo/data-store'
import { shortDate, shortDid } from './utils'
import { ConfiguredAgent } from '../setup'
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/message.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getAgent } from './setup'
import program from 'commander'
import { program } from 'commander'
const fs = require('fs')

const message = program.command('message').description('Messages')
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/presentation.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { W3CCredential } from '@veramo/core'
import { getAgent } from './setup'
import program from 'commander'
import { program } from 'commander'
import inquirer from 'inquirer'
import qrcode from 'qrcode-terminal'

Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/sdr.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ICredentialRequestInput } from '@veramo/selective-disclosure'
import { getAgent } from './setup'
import program from 'commander'
import { program } from 'commander'
import inquirer from 'inquirer'
import qrcode from 'qrcode-terminal'
import { shortDate, shortDid } from './explore/utils'
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/server.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import express from 'express'
import program from 'commander'
import { program } from 'commander'
import { getConfig } from './setup'
import { createObjects } from './lib/objectCreator'

Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/version.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import program from 'commander'
import { program } from 'commander'

const { version } = require('../package.json')

Expand Down
5 changes: 0 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3885,11 +3885,6 @@ commander@^2.7.1:
resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33"
integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==

commander@^7.0.0:
version "7.2.0"
resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7"
integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==

commander@^8.0.0:
version "8.0.0"
resolved "https://registry.yarnpkg.com/commander/-/commander-8.0.0.tgz#1da2139548caef59bd23e66d18908dfb54b02258"
Expand Down

0 comments on commit 9fc5c50

Please sign in to comment.