Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'use strict';
const chalk = require('chalk');
const { inspect } = require('util');
const { isError } = require('lodash');
const slsVersion = require('./../../package').version;
const isStandaloneExecutable = require('../utils/isStandaloneExecutable');
const sfeVersion = require('@serverless/enterprise-plugin/package.json').version;
const { sdkVersion } = require('@serverless/enterprise-plugin');
// raven implementation examples https://www.npmjs.com/browse/depended/raven
const errorReporter = require('../utils/sentry').raven;
const consoleLog = message => {
console.log(message); // eslint-disable-line no-console
};
const resolveExceptionMeta = exception => {
if (isError(exception)) {
return {
name: exception.name,
title: exception.name.replace(/([A-Z])/g, ' $1'),
stack: exception.stack,
message: exception.message,
};