Merge pull request #14797 from strapi/deits/refactor-export-schemas

[DEITS] refactor export schemas
This commit is contained in:
Bassel Kanso 2022-11-07 11:42:29 +02:00 committed by GitHub
commit 6596d2e624
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -132,7 +132,7 @@ class TransferEngine implements ITransferEngine {
async transferSchemas(): Promise<void> { async transferSchemas(): Promise<void> {
const inStream = await this.sourceProvider.streamSchemas?.(); const inStream = await this.sourceProvider.streamSchemas?.();
const outStream = await this.destinationProvider.getSchemasStream?.(); const outStream = await this.destinationProvider.getSchemasStream?.();
console.log(inStream);
if (!inStream || !outStream) { if (!inStream || !outStream) {
throw new Error('Unable to transfer schemas, one of the streams is missing'); throw new Error('Unable to transfer schemas, one of the streams is missing');
} }

View File

@ -20,7 +20,7 @@ export interface ISourceProvider extends IProvider {
streamMedia?(): NodeJS.ReadableStream | Promise<NodeJS.ReadableStream>; streamMedia?(): NodeJS.ReadableStream | Promise<NodeJS.ReadableStream>;
streamConfiguration?(): NodeJS.ReadableStream | Promise<NodeJS.ReadableStream>; streamConfiguration?(): NodeJS.ReadableStream | Promise<NodeJS.ReadableStream>;
getSchemas?(): any; getSchemas?(): any;
streamSchemas?(): NodeJS.ReadableStream; streamSchemas?(): NodeJS.ReadableStream | Promise<NodeJS.ReadableStream>;
} }
export interface IDestinationProvider extends IProvider { export interface IDestinationProvider extends IProvider {