-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DX-218] Expose cli to be used programmatically #722
Conversation
src/index.js
Outdated
require(`./cli/facade/${cmd}.js`)(dependencies)(opts, cb); | ||
} | ||
|
||
module.exports.cli = cliCommand; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we move lines 3-14 to own file inside the cli folder?
src/index.js
Outdated
function cliCommand(cmd, options, cb) { | ||
const dependencies = { | ||
local: new Local(), | ||
logger: options.logger || { log() {} } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the logger needs more methods: https://github.com/opentable/oc/blob/master/src/cli/logger.js#L14-L17
src/index.js
Outdated
@@ -1,4 +1,8 @@ | |||
'use strict'; | |||
|
|||
const _ = require('lodash'); | |||
const Local = require('./cli/domain/local'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
forgot about those 2 ^ ? Everything else LGTM
@matteofigus |
Fixes #441 by exposing the dev interface and allowing acceptance testing in a cleaner way