mirror of
https://github.com/serverless/serverless.git
synced 2025-12-08 19:46:03 +00:00
* chore: initial removal of dashboard plugin as dependency and deprecated logic * chore: continue refactor * chore: move dashboard into framework and reduce logic
29 lines
881 B
JavaScript
29 lines
881 B
JavaScript
'use strict';
|
|
|
|
const path = require('path');
|
|
const { version } = require('../../package');
|
|
const isStandaloneExecutable = require('../utils/is-standalone-executable');
|
|
const localServerlessPath = require('./local-serverless-path');
|
|
const { writeText } = require('@serverless/utils/log');
|
|
|
|
const serverlessPath = path.resolve(__dirname, '../..');
|
|
|
|
module.exports = async () => {
|
|
const installationModePostfix = (() => {
|
|
if (isStandaloneExecutable) return ' (standalone)';
|
|
if (serverlessPath === localServerlessPath) return ' (local)';
|
|
return '';
|
|
})();
|
|
|
|
const globalInstallationPostfix = (() => {
|
|
if (EvalError.$serverlessInitInstallationVersion) {
|
|
return ` ${EvalError.$serverlessInitInstallationVersion} (global)`;
|
|
}
|
|
return '';
|
|
})();
|
|
|
|
writeText(
|
|
`Framework Core: ${version}${installationModePostfix}${globalInstallationPostfix}`
|
|
);
|
|
};
|