mirror of
https://github.com/strapi/strapi.git
synced 2025-09-25 08:19:07 +00:00
use metadatas and schemas
This commit is contained in:
parent
c62758ebfc
commit
ef980513bf
@ -173,7 +173,7 @@ class TransferEngine<
|
||||
if (!isEmpty(diffs)) {
|
||||
throw new Error(
|
||||
`Import process failed because the project doesn't have a matching data structure
|
||||
${JSON.stringify(diffs, null, 2)}
|
||||
${JSON.stringify(diffs, null, 2)}
|
||||
`
|
||||
);
|
||||
}
|
||||
@ -246,6 +246,7 @@ class TransferEngine<
|
||||
const isValidTransfer = await this.integrityCheck();
|
||||
|
||||
if (!isValidTransfer) {
|
||||
// TODO: provide the log from the integrity check
|
||||
throw new Error(
|
||||
`Unable to transfer the data between ${this.sourceProvider.name} and ${this.destinationProvider.name}.\nPlease refer to the log above for more information.`
|
||||
);
|
||||
|
@ -82,15 +82,13 @@ class LocalFileSourceProvider implements ISourceProvider {
|
||||
// TODO: need to read the file & extract the metadata json file
|
||||
// => we might also need to read the schema.jsonl files & implements a custom stream-check
|
||||
const backupStream = this.#getBackupStream();
|
||||
return {};
|
||||
// return this.#parseJSONFile<IMetadata>(backupStream, METADATA_FILE_PATH);
|
||||
return this.#parseJSONFile<IMetadata>(backupStream, METADATA_FILE_PATH);
|
||||
}
|
||||
|
||||
async getSchemas() {
|
||||
// const schemas = await collect(this.streamSchemas() as Readable);
|
||||
const schemas = await collect(this.streamSchemas() as Readable);
|
||||
|
||||
// return keyBy('uid', schemas);
|
||||
return null;
|
||||
return keyBy('uid', schemas);
|
||||
}
|
||||
|
||||
streamEntities(): NodeJS.ReadableStream {
|
||||
|
Loading…
x
Reference in New Issue
Block a user