Skip to content

Commit

Permalink
refactor: Improve var naming
Browse files Browse the repository at this point in the history
  • Loading branch information
medikoo committed Oct 19, 2021
1 parent af7fead commit fab132e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scripts/serverless.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ let hasTelemetryBeenReported = false;
// to properly handle e.g. `SIGINT` interrupt
const keepAliveTimer = setTimeout(() => {}, 60 * 60 * 1000);

const standaloneCommands = new Set(['doctor', 'plugin install', 'plugin uninstall']);
// Names of the commands which are configured independently in root `commands` folder
// and not in Serverless class internals
const notIntegratedCommands = new Set(['doctor', 'plugin install', 'plugin uninstall']);

process.once('uncaughtException', (error) => {
clearTimeout(keepAliveTimer);
Expand Down Expand Up @@ -509,7 +511,7 @@ const processSpanPromise = (async () => {

const configurationFilename = configuration && configurationPath.slice(serviceDir.length + 1);

const isStandaloneCommand = standaloneCommands.has(command);
const isStandaloneCommand = notIntegratedCommands.has(command);

if (isInteractiveSetup || isStandaloneCommand) {
if (configuration) require('../lib/cli/ensure-supported-command')(configuration);
Expand Down

0 comments on commit fab132e

Please sign in to comment.