
* Upgrade to ESLint v8 * Upgrade TypeScript, api-types, react-intl * Remove unnecessary dependencies * Update to React 17.0.2 * npm audit fixes, remove storybook * Lock some packages * Remove nan patch * Remove some deprecated dependencies * Fix lint/type/tests * Merge'd * Fix bad use of spawn * Fix notarize * Fix afterpack, switch to tsc es2020 * Fix api types * Use @mattermost/eslint-plugin
41 lines
1014 B
TypeScript
41 lines
1014 B
TypeScript
// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
import type {ElectronLog} from 'electron-log';
|
|
|
|
import config from 'common/config';
|
|
|
|
import type {DiagnosticStepResponse} from 'types/diagnostics';
|
|
|
|
import DiagnosticsStep from '../DiagnosticStep';
|
|
|
|
const stepName = 'Step-9';
|
|
const stepDescriptiveName = 'Config';
|
|
|
|
const run = async (logger: ElectronLog): Promise<DiagnosticStepResponse> => {
|
|
try {
|
|
const payload = config.data;
|
|
|
|
return {
|
|
message: `${stepName} finished successfully`,
|
|
succeeded: true,
|
|
payload,
|
|
};
|
|
} catch (error) {
|
|
logger.warn(`Diagnostics ${stepName} Failure`, {error});
|
|
return {
|
|
message: `${stepName} failed`,
|
|
succeeded: false,
|
|
payload: error,
|
|
};
|
|
}
|
|
};
|
|
|
|
const Step9 = new DiagnosticsStep({
|
|
name: `diagnostic-${stepName}: ${stepDescriptiveName}`,
|
|
retries: 0,
|
|
run,
|
|
});
|
|
|
|
export default Step9;
|