feat(xen-api/cli): add diff() helper
This commit is contained in:
parent
5a32f904bc
commit
4a1e87b534
@ -39,6 +39,7 @@
|
||||
"exec-promise": "^0.7.0",
|
||||
"http-request-plus": "^0.5.0",
|
||||
"iterable-backoff": "^0.0.0",
|
||||
"jest-diff": "^23.5.0",
|
||||
"json-rpc-protocol": "^0.12.0",
|
||||
"kindof": "^2.0.0",
|
||||
"lodash": "^4.17.4",
|
||||
|
@ -4,6 +4,7 @@ import 'babel-polyfill'
|
||||
|
||||
import blocked from 'blocked'
|
||||
import createDebug from 'debug'
|
||||
import diff from 'jest-diff'
|
||||
import eventToPromise from 'event-to-promise'
|
||||
import execPromise from 'exec-promise'
|
||||
import minimist from 'minimist'
|
||||
@ -81,6 +82,7 @@ const main = async args => {
|
||||
})
|
||||
repl.context.xapi = xapi
|
||||
|
||||
repl.context.diff = (a, b) => console.log('%s', diff(a, b))
|
||||
repl.context.find = predicate => find(xapi.objects.all, predicate)
|
||||
repl.context.findAll = predicate => filter(xapi.objects.all, predicate)
|
||||
|
||||
|
16
yarn.lock
16
yarn.lock
@ -6515,6 +6515,15 @@ jest-diff@^23.2.0:
|
||||
jest-get-type "^22.1.0"
|
||||
pretty-format "^23.2.0"
|
||||
|
||||
jest-diff@^23.5.0:
|
||||
version "23.5.0"
|
||||
resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-23.5.0.tgz#250651a433dd0050290a07642946cc9baaf06fba"
|
||||
dependencies:
|
||||
chalk "^2.0.1"
|
||||
diff "^3.2.0"
|
||||
jest-get-type "^22.1.0"
|
||||
pretty-format "^23.5.0"
|
||||
|
||||
jest-docblock@^23.2.0:
|
||||
version "23.2.0"
|
||||
resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-23.2.0.tgz#f085e1f18548d99fdd69b20207e6fd55d91383a7"
|
||||
@ -8980,6 +8989,13 @@ pretty-format@^23.0.0, pretty-format@^23.2.0:
|
||||
ansi-regex "^3.0.0"
|
||||
ansi-styles "^3.2.0"
|
||||
|
||||
pretty-format@^23.5.0:
|
||||
version "23.5.0"
|
||||
resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-23.5.0.tgz#0f9601ad9da70fe690a269cd3efca732c210687c"
|
||||
dependencies:
|
||||
ansi-regex "^3.0.0"
|
||||
ansi-styles "^3.2.0"
|
||||
|
||||
pretty-hrtime@^1.0.0:
|
||||
version "1.0.3"
|
||||
resolved "https://registry.yarnpkg.com/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz#b7e3ea42435a4c9b2759d99e0f201eb195802ee1"
|
||||
|
Loading…
Reference in New Issue
Block a user