Merge branch 'features/deits' into deits/export-archive

This commit is contained in:
Christian Capeans 2022-11-30 13:01:27 +01:00
commit b69d73aa34

View File

@ -53,7 +53,12 @@ module.exports = async (opts) => {
*/
const sourceOptions = {
async getStrapi() {
return strapi(await strapi.compile()).load();
const appContext = await strapi.compile();
const app = strapi(appContext);
app.log.level = 'error';
return app.load();
},
};
const source = createLocalStrapiSourceProvider(sourceOptions);
@ -96,16 +101,7 @@ module.exports = async (opts) => {
let resultData = [];
logger.log(`Starting export...`);
engine.progress.stream.on('start', ({ stage }) => {
logger.log(`Starting transfer of ${stage}...`);
});
// engine.progress.stream..on('progress', ({ stage, data }) => {
// logger.log('progress');
// });
engine.progress.stream.on('complete', ({ stage, data }) => {
logger.log(`...${stage} complete`);
engine.progress.stream.on('complete', ({ data }) => {
resultData = data;
});
@ -113,7 +109,7 @@ module.exports = async (opts) => {
// Build pretty table
const table = new Table({
head: ['Type', 'Count', 'Size'],
head: ['Type', 'Count', 'Size'].map((text) => chalk.bold.blue(text)),
});
let totalBytes = 0;