From 2f7e698e4d312704041c764a4a4ed01caf3dae40 Mon Sep 17 00:00:00 2001 From: Mariusz Nowak Date: Tue, 19 Oct 2021 18:26:07 +0200 Subject: [PATCH] refactor: Improve var naming --- scripts/serverless.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/serverless.js b/scripts/serverless.js index 2f1b865ca..7d52890a4 100755 --- a/scripts/serverless.js +++ b/scripts/serverless.js @@ -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); @@ -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);