Skip to content

Commit

Permalink
change no-launch-browser to suppress-browser-launch in bit login (tea…
Browse files Browse the repository at this point in the history
  • Loading branch information
amitgilad3 authored and GiladShoham committed Jun 17, 2018
1 parent 935c9ff commit 682740b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- fix - operation aborted error when aborting username/pass authentication
- fix handle tsx files when detectiveOption is empty
- backward compatibility for components with environments with latest version
- change no-launch-browser to suppress-browser-launch in bit login flag

## [13.0.0-dev.11] - 2018-06-13

Expand Down
4 changes: 2 additions & 2 deletions src/api/consumer/lib/login.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import loginToBitSrc from '../../../consumer/login/login';

export default (async function loginAction(
port: string,
noLaunchBrowser?: boolean,
suppressBrowserLaunch?: boolean,
npmrcPath: string,
skipRegistryConfig: boolean
): Promise<{ isAlreadyLoggedIn?: boolean, username?: string }> {
return loginToBitSrc(port, noLaunchBrowser, npmrcPath, skipRegistryConfig);
return loginToBitSrc(port, suppressBrowserLaunch, npmrcPath, skipRegistryConfig);
});
8 changes: 4 additions & 4 deletions src/cli/commands/public-cmds/login-cmd.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default class Login extends Command {
alias = '';
opts = [
['p', 'port <port>', 'port number to open for localhost server (default 8085)'],
['', 'no-launch-browser', 'do not open a browser for authentication'],
['', 'suppress-browser-launch', 'do not open a browser for authentication'],
['', 'npmrc-path <path>', 'path to npmrc file to configure bitsrc registry'],
['', 'skip-registry-config [boolean]', 'dont configure bitsrc registry']
];
Expand All @@ -18,12 +18,12 @@ export default class Login extends Command {
[nothing]: [string[]],
{
port,
noLaunchBrowser = false,
suppressBrowserLaunch = false,
npmrcPath,
skipRegistryConfig = false
}: { port: string, noLaunchBrowser?: boolean, npmrcPath: string, skipRegistryConfig: boolean }
}: { port: string, suppressBrowserLaunch?: boolean, npmrcPath: string, skipRegistryConfig: boolean }
): Promise<any> {
return login(port, noLaunchBrowser, npmrcPath, skipRegistryConfig).then(
return login(port, suppressBrowserLaunch, npmrcPath, skipRegistryConfig).then(
({ isAlreadyLoggedIn, username, npmrcPath, writeToNpmrcError }) => ({
isAlreadyLoggedIn,
username,
Expand Down
4 changes: 2 additions & 2 deletions src/consumer/login/login.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const REDIRECT = 302;

export default function loginToBitSrc(
port: string,
noLaunchBrowser?: boolean,
suppressBrowserLaunch?: boolean,
npmrcPath: string,
skipRegistryConfig: boolean
): Promise<{
Expand Down Expand Up @@ -101,7 +101,7 @@ export default function loginToBitSrc(
process.platform
}`
);
if (!noLaunchBrowser) {
if (!suppressBrowserLaunch) {
console.log(chalk.yellow(`Your browser has been opened to visit:\n${encoded}`)); // eslint-disable-line no-console
opn(encoded);
} else {
Expand Down

0 comments on commit 682740b

Please sign in to comment.