mirror of
https://github.com/strapi/strapi.git
synced 2025-08-08 00:37:38 +00:00
add skip stage
This commit is contained in:
parent
7cf54d0693
commit
43f57778f6
@ -125,7 +125,7 @@ class TransferEngine<
|
|||||||
this.progress.stream.emit(type, payload);
|
this.progress.stream.emit(type, payload);
|
||||||
}
|
}
|
||||||
|
|
||||||
#emitStageUpdate(type: 'start' | 'finish' | 'progress', transferStage: TransferStage) {
|
#emitStageUpdate(type: 'start' | 'finish' | 'progress' | 'skip', transferStage: TransferStage) {
|
||||||
this.progress.stream.emit(`stage::${type}`, {
|
this.progress.stream.emit(`stage::${type}`, {
|
||||||
data: this.progress.data,
|
data: this.progress.data,
|
||||||
stage: transferStage,
|
stage: transferStage,
|
||||||
@ -312,11 +312,13 @@ class TransferEngine<
|
|||||||
|
|
||||||
const inStream = await this.sourceProvider.streamSchemas?.();
|
const inStream = await this.sourceProvider.streamSchemas?.();
|
||||||
if (!inStream) {
|
if (!inStream) {
|
||||||
|
this.#emitStageUpdate('skip', stageName);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const outStream = await this.destinationProvider.getSchemasStream?.();
|
const outStream = await this.destinationProvider.getSchemasStream?.();
|
||||||
if (!outStream) {
|
if (!outStream) {
|
||||||
|
this.#emitStageUpdate('skip', stageName);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -346,11 +348,13 @@ class TransferEngine<
|
|||||||
|
|
||||||
const inStream = await this.sourceProvider.streamEntities?.();
|
const inStream = await this.sourceProvider.streamEntities?.();
|
||||||
if (!inStream) {
|
if (!inStream) {
|
||||||
|
this.#emitStageUpdate('skip', stageName);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const outStream = await this.destinationProvider.getEntitiesStream?.();
|
const outStream = await this.destinationProvider.getEntitiesStream?.();
|
||||||
if (!outStream) {
|
if (!outStream) {
|
||||||
|
this.#emitStageUpdate('skip', stageName);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -385,11 +389,13 @@ class TransferEngine<
|
|||||||
|
|
||||||
const inStream = await this.sourceProvider.streamLinks?.();
|
const inStream = await this.sourceProvider.streamLinks?.();
|
||||||
if (!inStream) {
|
if (!inStream) {
|
||||||
|
this.#emitStageUpdate('skip', stageName);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const outStream = await this.destinationProvider.getLinksStream?.();
|
const outStream = await this.destinationProvider.getLinksStream?.();
|
||||||
if (!outStream) {
|
if (!outStream) {
|
||||||
|
this.#emitStageUpdate('skip', stageName);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -417,11 +423,13 @@ class TransferEngine<
|
|||||||
const stageName: TransferStage = 'assets';
|
const stageName: TransferStage = 'assets';
|
||||||
const inStream = await this.sourceProvider.streamAssets?.();
|
const inStream = await this.sourceProvider.streamAssets?.();
|
||||||
if (!inStream) {
|
if (!inStream) {
|
||||||
|
this.#emitStageUpdate('skip', stageName);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const outStream = await this.destinationProvider.getAssetsStream?.();
|
const outStream = await this.destinationProvider.getAssetsStream?.();
|
||||||
if (!outStream) {
|
if (!outStream) {
|
||||||
|
this.#emitStageUpdate('skip', stageName);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -457,11 +465,13 @@ class TransferEngine<
|
|||||||
|
|
||||||
const inStream = await this.sourceProvider.streamConfiguration?.();
|
const inStream = await this.sourceProvider.streamConfiguration?.();
|
||||||
if (!inStream) {
|
if (!inStream) {
|
||||||
|
this.#emitStageUpdate('skip', stageName);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const outStream = await this.destinationProvider.getConfigurationStream?.();
|
const outStream = await this.destinationProvider.getConfigurationStream?.();
|
||||||
if (!outStream) {
|
if (!outStream) {
|
||||||
|
this.#emitStageUpdate('skip', stageName);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user