mirror of
https://github.com/strapi/strapi.git
synced 2025-11-10 15:19:00 +00:00
Merge branch 'features/deits' into deits/export-archive
This commit is contained in:
commit
b69d73aa34
@ -53,7 +53,12 @@ module.exports = async (opts) => {
|
|||||||
*/
|
*/
|
||||||
const sourceOptions = {
|
const sourceOptions = {
|
||||||
async getStrapi() {
|
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);
|
const source = createLocalStrapiSourceProvider(sourceOptions);
|
||||||
@ -96,16 +101,7 @@ module.exports = async (opts) => {
|
|||||||
let resultData = [];
|
let resultData = [];
|
||||||
logger.log(`Starting export...`);
|
logger.log(`Starting export...`);
|
||||||
|
|
||||||
engine.progress.stream.on('start', ({ stage }) => {
|
engine.progress.stream.on('complete', ({ data }) => {
|
||||||
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`);
|
|
||||||
resultData = data;
|
resultData = data;
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -113,7 +109,7 @@ module.exports = async (opts) => {
|
|||||||
|
|
||||||
// Build pretty table
|
// Build pretty table
|
||||||
const table = new Table({
|
const table = new Table({
|
||||||
head: ['Type', 'Count', 'Size'],
|
head: ['Type', 'Count', 'Size'].map((text) => chalk.bold.blue(text)),
|
||||||
});
|
});
|
||||||
|
|
||||||
let totalBytes = 0;
|
let totalBytes = 0;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user