Skip to content

Commit

Permalink
refactor: Rename lib/utils/isStandaloneExecutable.js
Browse files Browse the repository at this point in the history
  • Loading branch information
medikoo committed Jan 27, 2022
1 parent cca54df commit aed6673
Show file tree
Hide file tree
Showing 10 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion bin/serverless.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ if (nodeVersion < minimumSupportedVersion) {
}

if (isMainModule) {
if (require('../lib/utils/isStandaloneExecutable')) {
if (require('../lib/utils/is-standalone-executable')) {
require('../lib/utils/standalone-patch');
if (process.argv[2] === 'binary-postinstall' && process.argv.length === 3) {
require('../scripts/postinstall');
Expand Down
2 changes: 1 addition & 1 deletion lib/cli/commands-schema/no-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ commands.set('slstats', {
});

(() => {
const isHidden = !require('../../utils/isStandaloneExecutable') || process.platform === 'win32';
const isHidden = !require('../../utils/is-standalone-executable') || process.platform === 'win32';
const noSupportNotice =
"It's applicable only in context of a standalone executable instance " +
'in non Windows environment.';
Expand Down
2 changes: 1 addition & 1 deletion lib/cli/handle-error.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const { platformClientVersion } = require('@serverless/dashboard-plugin');
const { getDashboardProvidersUrl } = require('@serverless/dashboard-plugin/lib/dashboard');
const { style, writeText } = require('@serverless/utils/log');
const slsVersion = require('./../../package').version;
const isStandaloneExecutable = require('../utils/isStandaloneExecutable');
const isStandaloneExecutable = require('../utils/is-standalone-executable');
const tokenizeException = require('../utils/tokenize-exception');
const isLocallyInstalled = require('./is-locally-installed');
const resolveErrorLocation = require('../utils/telemetry/resolve-error-location');
Expand Down
2 changes: 1 addition & 1 deletion lib/cli/render-version.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const { version } = require('../../package');
const spawn = require('child-process-ext/spawn');
const { version: dashboardPluginVersion } = require('@serverless/dashboard-plugin/package');
const { platformClientVersion } = require('@serverless/dashboard-plugin');
const isStandaloneExecutable = require('../utils/isStandaloneExecutable');
const isStandaloneExecutable = require('../utils/is-standalone-executable');
const localServerlessPath = require('./local-serverless-path');
const { writeText } = require('@serverless/utils/log');

Expand Down
2 changes: 1 addition & 1 deletion lib/plugins/aws/invoke-local/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const { v4: uuidv4 } = require('uuid');
const ServerlessError = require('../../../serverless-error');
const dirExists = require('../../../utils/fs/dirExists');
const fileExists = require('../../../utils/fs/fileExists');
const isStandalone = require('../../../utils/isStandaloneExecutable');
const isStandalone = require('../../../utils/is-standalone-executable');
const ensureArtifact = require('../../../utils/ensure-artifact');
const resolveCfImportValue = require('../utils/resolveCfImportValue');
const resolveCfRefValue = require('../utils/resolveCfRefValue');
Expand Down
2 changes: 1 addition & 1 deletion lib/serverless.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const Service = require('./classes/service');
const ConfigSchemaHandler = require('./classes/config-schema-handler');
const ServerlessError = require('./serverless-error');
const version = require('./../package.json').version;
const isStandaloneExecutable = require('./utils/isStandaloneExecutable');
const isStandaloneExecutable = require('./utils/is-standalone-executable');
const logDeprecation = require('./utils/logDeprecation');
const eventuallyUpdate = require('./utils/eventually-update');
const commmandsSchema = require('./cli/commands-schema');
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion lib/utils/telemetry/generatePayload.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const isPlainObject = require('type/plain-object/is');
const isObject = require('type/object/is');
const userConfig = require('@serverless/utils/config');
const getNotificationsMode = require('@serverless/utils/get-notifications-mode');
const isStandalone = require('../isStandaloneExecutable');
const isStandalone = require('../is-standalone-executable');
const { getConfigurationValidationResult } = require('../../classes/config-schema-handler');
const { triggeredDeprecations } = require('../logDeprecation');
const isNpmGlobal = require('../npmPackage/isGlobal');
Expand Down
2 changes: 1 addition & 1 deletion scripts/postinstall.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

const chalk = require('chalk');
const isStandaloneExecutable = require('../lib/utils/isStandaloneExecutable');
const isStandaloneExecutable = require('../lib/utils/is-standalone-executable');

const isWindows = process.platform === 'win32';

Expand Down
2 changes: 1 addition & 1 deletion test/unit/lib/cli/handle-error.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const sinon = require('sinon');

const observeOutput = require('@serverless/test/observe-output');
const handleError = require('../../../../lib/cli/handle-error');
const isStandaloneExecutable = require('../../../../lib/utils/isStandaloneExecutable');
const isStandaloneExecutable = require('../../../../lib/utils/is-standalone-executable');
const ServerlessError = require('../../../../lib/serverless-error');

chai.use(require('sinon-chai'));
Expand Down

0 comments on commit aed6673

Please sign in to comment.