mirror of
https://github.com/strapi/strapi.git
synced 2025-12-08 13:29:57 +00:00
Merge pull request #14797 from strapi/deits/refactor-export-schemas
[DEITS] refactor export schemas
This commit is contained in:
commit
6596d2e624
@ -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');
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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 {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user