@dudousxd/nestjs-durable 0.30.1 → 0.30.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +14 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.d.cts
CHANGED
|
@@ -730,6 +730,9 @@ declare class ProxyRunGateway implements RunGateway {
|
|
|
730
730
|
retryWithInput(runId: string, input: unknown): Promise<{
|
|
731
731
|
runId: string;
|
|
732
732
|
} | null>;
|
|
733
|
+
redispatchPending(runId: string): Promise<(RunResult & {
|
|
734
|
+
redispatched: number;
|
|
735
|
+
}) | null>;
|
|
733
736
|
subscribe(runId: string, onEvent: (event: EngineEvent) => void): () => void;
|
|
734
737
|
}
|
|
735
738
|
|
|
@@ -819,6 +822,9 @@ declare class StoreRunGateway implements RunGateway {
|
|
|
819
822
|
retryWithInput(runId: string, input: unknown): Promise<{
|
|
820
823
|
runId: string;
|
|
821
824
|
} | null>;
|
|
825
|
+
redispatchPending(runId: string): Promise<(RunResult & {
|
|
826
|
+
redispatched: number;
|
|
827
|
+
}) | null>;
|
|
822
828
|
subscribe(runId: string, onEvent: (event: EngineEvent) => void): () => void;
|
|
823
829
|
}
|
|
824
830
|
|
package/dist/index.d.ts
CHANGED
|
@@ -730,6 +730,9 @@ declare class ProxyRunGateway implements RunGateway {
|
|
|
730
730
|
retryWithInput(runId: string, input: unknown): Promise<{
|
|
731
731
|
runId: string;
|
|
732
732
|
} | null>;
|
|
733
|
+
redispatchPending(runId: string): Promise<(RunResult & {
|
|
734
|
+
redispatched: number;
|
|
735
|
+
}) | null>;
|
|
733
736
|
subscribe(runId: string, onEvent: (event: EngineEvent) => void): () => void;
|
|
734
737
|
}
|
|
735
738
|
|
|
@@ -819,6 +822,9 @@ declare class StoreRunGateway implements RunGateway {
|
|
|
819
822
|
retryWithInput(runId: string, input: unknown): Promise<{
|
|
820
823
|
runId: string;
|
|
821
824
|
} | null>;
|
|
825
|
+
redispatchPending(runId: string): Promise<(RunResult & {
|
|
826
|
+
redispatched: number;
|
|
827
|
+
}) | null>;
|
|
822
828
|
subscribe(runId: string, onEvent: (event: EngineEvent) => void): () => void;
|
|
823
829
|
}
|
|
824
830
|
|
package/dist/index.js
CHANGED
|
@@ -451,6 +451,9 @@ function unavailableRunGateway() {
|
|
|
451
451
|
retryWithInput(_runId, _input) {
|
|
452
452
|
return tenantGatewayUnavailable("retryWithInput");
|
|
453
453
|
},
|
|
454
|
+
redispatchPending(_runId) {
|
|
455
|
+
return tenantGatewayUnavailable("redispatchPending");
|
|
456
|
+
},
|
|
454
457
|
subscribe(_runId, _onEvent) {
|
|
455
458
|
throw new Error("RunGateway.subscribe() is not available \u2014 pass `transport` to use RunGateway.");
|
|
456
459
|
}
|
|
@@ -879,6 +882,12 @@ var ProxyRunGateway = class {
|
|
|
879
882
|
input
|
|
880
883
|
});
|
|
881
884
|
}
|
|
885
|
+
redispatchPending(runId) {
|
|
886
|
+
return this.request({
|
|
887
|
+
kind: "redispatch",
|
|
888
|
+
runId
|
|
889
|
+
});
|
|
890
|
+
}
|
|
882
891
|
subscribe(runId, onEvent) {
|
|
883
892
|
const unsubscribe = this.transport.onTenantEvent?.(this.tenant, (evt) => {
|
|
884
893
|
if (evt.event.runId === runId) onEvent(evt.event);
|
|
@@ -1110,6 +1119,8 @@ var RunRequestResponder = class {
|
|
|
1110
1119
|
return this.gateway.continue(body.runId);
|
|
1111
1120
|
case "retryWithInput":
|
|
1112
1121
|
return this.gateway.retryWithInput(body.runId, body.input);
|
|
1122
|
+
case "redispatch":
|
|
1123
|
+
return this.gateway.redispatchPending(body.runId);
|
|
1113
1124
|
}
|
|
1114
1125
|
}
|
|
1115
1126
|
};
|
|
@@ -1191,6 +1202,9 @@ var StoreRunGateway = class {
|
|
|
1191
1202
|
retryWithInput(runId, input) {
|
|
1192
1203
|
return this.engine.retryWithInput(runId, input);
|
|
1193
1204
|
}
|
|
1205
|
+
redispatchPending(runId) {
|
|
1206
|
+
return this.engine.redispatchPending(runId);
|
|
1207
|
+
}
|
|
1194
1208
|
subscribe(runId, onEvent) {
|
|
1195
1209
|
return this.engine.subscribe((event) => {
|
|
1196
1210
|
if (event.runId === runId) onEvent(event);
|