* [Reporting] Move code out of Legacy * Elasticsearch is not a plugin dep * add data as plugin dependo * diff cleanup 1 * log the browser download * Update paths in outside code for new Reporting home * fix download test * add numeral typing for x-pack/test * Fix jest tests for np migration * Shorten import paths * remove this file, add typings to the node module * remove local typing that has been provided by node module * Add optional security plugin dep * revert conflicting apm typings removal * fix i18n * fix snakecase whitelist Co-authored-by: Joel Griffith <joel.griffith@elastic.co> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
25 lines
962 B
TypeScript
25 lines
962 B
TypeScript
/*
|
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
* or more contributor license agreements. Licensed under the Elastic License;
|
|
* you may not use this file except in compliance with the Elastic License.
|
|
*/
|
|
|
|
import { ensureAllBrowsersDownloaded } from '../plugins/reporting/server/browsers';
|
|
import { LevelLogger } from '../plugins/reporting/server/lib';
|
|
|
|
export const prepareTask = async () => {
|
|
// eslint-disable-next-line no-console
|
|
const consoleLogger = (tag: string) => (message: unknown) => console.log(tag, message);
|
|
const innerLogger = {
|
|
get: () => innerLogger,
|
|
debug: consoleLogger('debug'),
|
|
info: consoleLogger('info'),
|
|
warn: consoleLogger('warn'),
|
|
trace: consoleLogger('trace'),
|
|
error: consoleLogger('error'),
|
|
fatal: consoleLogger('fatal'),
|
|
log: consoleLogger('log'),
|
|
};
|
|
const levelLogger = new LevelLogger(innerLogger);
|
|
await ensureAllBrowsersDownloaded(levelLogger);
|
|
};
|