@dudousxd/nestjs-durable 0.52.6 → 0.53.0
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 +34 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -1
- package/dist/index.d.ts +11 -1
- package/dist/index.js +34 -0
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
package/dist/index.cjs
CHANGED
|
@@ -1267,6 +1267,7 @@ var UNSUPPORTED_RUN_REQUEST = "unsupported-request";
|
|
|
1267
1267
|
var KNOWN_KINDS = /* @__PURE__ */ new Set([
|
|
1268
1268
|
"getRunDetail",
|
|
1269
1269
|
"getFanMembers",
|
|
1270
|
+
"getRun",
|
|
1270
1271
|
"listRuns",
|
|
1271
1272
|
"runFacets",
|
|
1272
1273
|
"runValueFacets",
|
|
@@ -1439,6 +1440,15 @@ var RunRequestResponder = class {
|
|
|
1439
1440
|
}
|
|
1440
1441
|
};
|
|
1441
1442
|
}
|
|
1443
|
+
if (body.kind === "getRun") {
|
|
1444
|
+
return {
|
|
1445
|
+
requestId: msg.requestId,
|
|
1446
|
+
result: {
|
|
1447
|
+
ok: true,
|
|
1448
|
+
data: run ?? null
|
|
1449
|
+
}
|
|
1450
|
+
};
|
|
1451
|
+
}
|
|
1442
1452
|
if (body.kind === "getFanMembers") {
|
|
1443
1453
|
const data = run ? await this.gateway.getFanMembers?.(body.runId, body.group, body.query) ?? null : null;
|
|
1444
1454
|
return {
|
|
@@ -1646,6 +1656,29 @@ var ProxyRunGateway = class {
|
|
|
1646
1656
|
});
|
|
1647
1657
|
return detail ? (0, import_nestjs_durable_core11.pageFan)(detail.timeline, group, query) : null;
|
|
1648
1658
|
}
|
|
1659
|
+
/**
|
|
1660
|
+
* The run alone, without its timeline. Read from the full detail when the control plane is too old
|
|
1661
|
+
* to know the verb: it then answers with no data, or with an unsupported-request error.
|
|
1662
|
+
*/
|
|
1663
|
+
async getRun(runId) {
|
|
1664
|
+
if (!this.knownUnsupported("getRun")) {
|
|
1665
|
+
try {
|
|
1666
|
+
const run = await this.request({
|
|
1667
|
+
kind: "getRun",
|
|
1668
|
+
runId
|
|
1669
|
+
});
|
|
1670
|
+
if (run !== void 0) return run;
|
|
1671
|
+
} catch (err) {
|
|
1672
|
+
if (!isUnsupported(err)) throw err;
|
|
1673
|
+
}
|
|
1674
|
+
this.unsupportedUntil.set("getRun", Date.now() + this.capabilityTtlMs);
|
|
1675
|
+
}
|
|
1676
|
+
const detail = await this.request({
|
|
1677
|
+
kind: "getRunDetail",
|
|
1678
|
+
runId
|
|
1679
|
+
});
|
|
1680
|
+
return detail?.run ?? null;
|
|
1681
|
+
}
|
|
1649
1682
|
knownUnsupported(kind) {
|
|
1650
1683
|
const until = this.unsupportedUntil.get(kind);
|
|
1651
1684
|
if (until === void 0) return false;
|
|
@@ -3015,6 +3048,7 @@ var DurableModule = class _DurableModule {
|
|
|
3015
3048
|
leaseMs: options.leaseMs,
|
|
3016
3049
|
admission: options.admission,
|
|
3017
3050
|
maxRecoveryAttempts: options.maxRecoveryAttempts,
|
|
3051
|
+
unregisteredWorkflowGraceMs: options.unregisteredWorkflowGraceMs,
|
|
3018
3052
|
remoteAdvanceSilenceMs: options.remoteAdvanceSilenceMs,
|
|
3019
3053
|
remoteRedispatchMs: options.remoteRedispatchMs,
|
|
3020
3054
|
remoteRedispatchMax: options.remoteRedispatchMax,
|