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
@ -246,6 +246,7 @@ class TransferEngine<
|
|||||||
const isValidTransfer = await this.integrityCheck();
|
const isValidTransfer = await this.integrityCheck();
|
||||||
|
|
||||||
if (!isValidTransfer) {
|
if (!isValidTransfer) {
|
||||||
|
// TODO: provide the log from the integrity check
|
||||||
throw new Error(
|
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.`
|
`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
|
// 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
|
// => we might also need to read the schema.jsonl files & implements a custom stream-check
|
||||||
const backupStream = this.#getBackupStream();
|
const backupStream = this.#getBackupStream();
|
||||||
return {};
|
return this.#parseJSONFile<IMetadata>(backupStream, METADATA_FILE_PATH);
|
||||||
// return this.#parseJSONFile<IMetadata>(backupStream, METADATA_FILE_PATH);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async getSchemas() {
|
async getSchemas() {
|
||||||
// const schemas = await collect(this.streamSchemas() as Readable);
|
const schemas = await collect(this.streamSchemas() as Readable);
|
||||||
|
|
||||||
// return keyBy('uid', schemas);
|
return keyBy('uid', schemas);
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
streamEntities(): NodeJS.ReadableStream {
|
streamEntities(): NodeJS.ReadableStream {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user