Skip to content

Commit

Permalink
feat: Remove Console Login (#12153)
Browse files Browse the repository at this point in the history
* 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
Mmarzex committed Sep 15, 2023
1 parent 6ee277d commit 590bb7e
Show file tree
Hide file tree
Showing 22 changed files with 6 additions and 2,287 deletions.
39 changes: 1 addition & 38 deletions commands/login.js
@@ -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;
};
12 changes: 0 additions & 12 deletions lib/cli/commands-schema/no-service.js
Expand Up @@ -26,14 +26,6 @@ commands.set('', {
'template-url': {
usage: 'Template url for the service.',
},
'console': {
usage: 'Enable Serverless Console integration. See: http://slss.io/console',
type: 'boolean',
},
'dev': {
usage: 'Launch dev mode activity feed. See: http://slss.io/console',
type: 'boolean',
},
'function': {
usage: 'Name of the function you would like the dev mode activity feed to observe.',
type: 'string',
Expand Down Expand Up @@ -169,10 +161,6 @@ commands.set('login', {
serviceDependencyMode: 'optional',
lifecycleEvents: ['login'],
options: {
console: {
usage: 'Login into Serverless Console. See: http://slss.io/console',
type: 'boolean',
},
dashboard: {
usage: 'Login into Serverless Dashboard',
type: 'boolean',
Expand Down
295 changes: 0 additions & 295 deletions lib/cli/interactive-setup/console-dev-mode-feed.js

This file was deleted.

0 comments on commit 590bb7e

Please sign in to comment.