@dudousxd/nestjs-durable 0.35.0 → 0.37.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 +7 -28
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +20 -12
- package/dist/index.d.ts +20 -12
- package/dist/index.js +7 -28
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.cjs
CHANGED
|
@@ -96,7 +96,8 @@ function Workflow(options) {
|
|
|
96
96
|
searchAttributes: options.searchAttributes,
|
|
97
97
|
onEvent: options.onEvent,
|
|
98
98
|
debounce: options.debounce,
|
|
99
|
-
batch: options.batch
|
|
99
|
+
batch: options.batch,
|
|
100
|
+
requires: options.requires
|
|
100
101
|
};
|
|
101
102
|
Reflect.defineMetadata(WORKFLOW_METADATA, meta, target);
|
|
102
103
|
Object.defineProperty(target, import_nestjs_durable_core.WORKFLOW_NAME_KEY, {
|
|
@@ -118,7 +119,8 @@ function stepConfigFrom(options) {
|
|
|
118
119
|
backoffMs: options.backoffMs,
|
|
119
120
|
backoffMaxMs: options.backoffMaxMs,
|
|
120
121
|
jitter: options.jitter,
|
|
121
|
-
timeoutMs: options.timeoutMs
|
|
122
|
+
timeoutMs: options.timeoutMs,
|
|
123
|
+
requires: options.requires
|
|
122
124
|
};
|
|
123
125
|
const hasAnyField = Object.values(config).some((value) => value !== void 0);
|
|
124
126
|
return hasAnyField ? config : void 0;
|
|
@@ -1621,6 +1623,7 @@ var WorkflowRegistrar = class {
|
|
|
1621
1623
|
tags: meta.tags,
|
|
1622
1624
|
singleton: meta.singleton,
|
|
1623
1625
|
executionTimeout: meta.executionTimeout,
|
|
1626
|
+
requires: meta.requires,
|
|
1624
1627
|
validateInput,
|
|
1625
1628
|
searchAttributesSchema: meta.searchAttributes,
|
|
1626
1629
|
onEvent: getOnEvents(meta, workflowCtor),
|
|
@@ -1896,10 +1899,10 @@ function resolveTopology(options) {
|
|
|
1896
1899
|
if (topology === void 0) return options;
|
|
1897
1900
|
if (topology.role === "control-plane") {
|
|
1898
1901
|
if (topology.tenant === void 0 || options.namespace !== void 0) return options;
|
|
1899
|
-
return
|
|
1902
|
+
return {
|
|
1900
1903
|
...options,
|
|
1901
1904
|
namespace: topology.tenant
|
|
1902
|
-
}
|
|
1905
|
+
};
|
|
1903
1906
|
}
|
|
1904
1907
|
if (options.partition !== void 0) return options;
|
|
1905
1908
|
return {
|
|
@@ -1908,30 +1911,6 @@ function resolveTopology(options) {
|
|
|
1908
1911
|
};
|
|
1909
1912
|
}
|
|
1910
1913
|
__name(resolveTopology, "resolveTopology");
|
|
1911
|
-
function resolveTenantWorkersBridge(options) {
|
|
1912
|
-
const topology = options.topology;
|
|
1913
|
-
if (topology?.role !== "control-plane" || topology.tenantWorkers !== "bridge") return options;
|
|
1914
|
-
if (options.transports !== void 0) return options;
|
|
1915
|
-
const primary = options.transport;
|
|
1916
|
-
if (primary === void 0) return options;
|
|
1917
|
-
if (primary.withNamespace === void 0) {
|
|
1918
|
-
throw new Error("topology: { tenantWorkers: 'bridge' } needs a transport implementing `withNamespace` (e.g. BullMQTransport) \u2014 the bridge derives a bare-prefix sibling from the configured transport to reach operator-convention tenant workers.");
|
|
1919
|
-
}
|
|
1920
|
-
return {
|
|
1921
|
-
...options,
|
|
1922
|
-
transports: [
|
|
1923
|
-
{
|
|
1924
|
-
id: "default",
|
|
1925
|
-
transport: primary
|
|
1926
|
-
},
|
|
1927
|
-
{
|
|
1928
|
-
id: "tenant-workers",
|
|
1929
|
-
transport: primary.withNamespace("default")
|
|
1930
|
-
}
|
|
1931
|
-
]
|
|
1932
|
-
};
|
|
1933
|
-
}
|
|
1934
|
-
__name(resolveTenantWorkersBridge, "resolveTenantWorkersBridge");
|
|
1935
1914
|
var RunGatewayBootstrap = class RunGatewayBootstrap2 {
|
|
1936
1915
|
static {
|
|
1937
1916
|
__name(this, "RunGatewayBootstrap");
|