Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: Remove Console Login * fix: Update login tests to remove console login options * feat: Remove Console login options * feat: Remove console onboarding * fix: Remove console tests * chore: Remove remaining console flags * fix: Remove console deploy unit test * fix: Interactive Setup tests * fix: Update generate-payload tests
- Loading branch information
Showing
22 changed files
with
6 additions
and
2,287 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,6 @@ | ||
'use strict'; | ||
|
||
const resolveIsDashboardEnabled = require('../lib/configuration/is-dashboard-enabled'); | ||
|
||
module.exports = async (context) => { | ||
const { configuration, options } = context; | ||
const identityName = await (async () => { | ||
if (options.console) return 'console'; | ||
if (options.dashboard) return 'dashboard'; | ||
|
||
const isDashboardEnabled = resolveIsDashboardEnabled({ configuration, options }); | ||
|
||
if (isDashboardEnabled) return 'dashboard'; | ||
|
||
const promptWithHistory = require('@serverless/utils/inquirer/prompt-with-history'); | ||
const { StepHistory } = require('@serverless/utils/telemetry'); | ||
context.history = new StepHistory(); | ||
return await promptWithHistory({ | ||
message: 'Which would you like to log into?', | ||
type: 'list', | ||
name: 'identityName', | ||
choices: [ | ||
{ name: 'Serverless Framework Dashboard', value: 'dashboard' }, | ||
{ name: 'Serverless Console', value: 'console' }, | ||
], | ||
stepHistory: context.history, | ||
recordRawAnswerInHistory: true, | ||
}); | ||
})(); | ||
|
||
switch (identityName) { | ||
case 'console': | ||
await require('../lib/commands/login/console')({ clientOriginCommand: 'login' }); | ||
break; | ||
case 'dashboard': | ||
await require('../lib/commands/login/dashboard')(); | ||
break; | ||
default: | ||
throw new Error(`Unexpected identityName: ${identityName}`); | ||
} | ||
|
||
await require('../lib/commands/login/dashboard')(); | ||
return context; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.