@dudousxd/nestjs-durable 0.35.0 → 0.36.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 +2 -26
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +0 -12
- package/dist/index.d.ts +0 -12
- package/dist/index.js +2 -26
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.d.cts
CHANGED
|
@@ -623,18 +623,6 @@ interface DurableModuleOptions {
|
|
|
623
623
|
topology?: {
|
|
624
624
|
role: 'control-plane';
|
|
625
625
|
tenant?: string;
|
|
626
|
-
/**
|
|
627
|
-
* `'bridge'` — this operator's tenant workers follow the OPERATOR convention (bare
|
|
628
|
-
* transport prefix + `@<tenant>`-suffixed groups: the Python SDK, the TS `role: 'tenant'`
|
|
629
|
-
* worker). When `tenant` is set, the preset pairs the configured `transport` with a
|
|
630
|
-
* bare-prefix sibling (`transport.withNamespace('default')`) in a pool, so those workers
|
|
631
|
-
* are discoverable and dispatchable from this otherwise-namespaced keyspace. INERT when
|
|
632
|
-
* `tenant` is unset (a global operator is already on the bare prefix) — safe to leave on a
|
|
633
|
-
* static config that reads `tenant` from an env var. CAUTION: the bare sibling consumes
|
|
634
|
-
* the shared bare control queues — only sound when this stack owns its broker (a private
|
|
635
|
-
* Redis); on a shared broker, point the tenant workers at a scoped prefix instead.
|
|
636
|
-
*/
|
|
637
|
-
tenantWorkers?: 'bridge';
|
|
638
626
|
} | {
|
|
639
627
|
role: 'tenant';
|
|
640
628
|
tenant: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -623,18 +623,6 @@ interface DurableModuleOptions {
|
|
|
623
623
|
topology?: {
|
|
624
624
|
role: 'control-plane';
|
|
625
625
|
tenant?: string;
|
|
626
|
-
/**
|
|
627
|
-
* `'bridge'` — this operator's tenant workers follow the OPERATOR convention (bare
|
|
628
|
-
* transport prefix + `@<tenant>`-suffixed groups: the Python SDK, the TS `role: 'tenant'`
|
|
629
|
-
* worker). When `tenant` is set, the preset pairs the configured `transport` with a
|
|
630
|
-
* bare-prefix sibling (`transport.withNamespace('default')`) in a pool, so those workers
|
|
631
|
-
* are discoverable and dispatchable from this otherwise-namespaced keyspace. INERT when
|
|
632
|
-
* `tenant` is unset (a global operator is already on the bare prefix) — safe to leave on a
|
|
633
|
-
* static config that reads `tenant` from an env var. CAUTION: the bare sibling consumes
|
|
634
|
-
* the shared bare control queues — only sound when this stack owns its broker (a private
|
|
635
|
-
* Redis); on a shared broker, point the tenant workers at a scoped prefix instead.
|
|
636
|
-
*/
|
|
637
|
-
tenantWorkers?: 'bridge';
|
|
638
626
|
} | {
|
|
639
627
|
role: 'tenant';
|
|
640
628
|
tenant: string;
|
package/dist/index.js
CHANGED
|
@@ -1828,10 +1828,10 @@ function resolveTopology(options) {
|
|
|
1828
1828
|
if (topology === void 0) return options;
|
|
1829
1829
|
if (topology.role === "control-plane") {
|
|
1830
1830
|
if (topology.tenant === void 0 || options.namespace !== void 0) return options;
|
|
1831
|
-
return
|
|
1831
|
+
return {
|
|
1832
1832
|
...options,
|
|
1833
1833
|
namespace: topology.tenant
|
|
1834
|
-
}
|
|
1834
|
+
};
|
|
1835
1835
|
}
|
|
1836
1836
|
if (options.partition !== void 0) return options;
|
|
1837
1837
|
return {
|
|
@@ -1840,30 +1840,6 @@ function resolveTopology(options) {
|
|
|
1840
1840
|
};
|
|
1841
1841
|
}
|
|
1842
1842
|
__name(resolveTopology, "resolveTopology");
|
|
1843
|
-
function resolveTenantWorkersBridge(options) {
|
|
1844
|
-
const topology = options.topology;
|
|
1845
|
-
if (topology?.role !== "control-plane" || topology.tenantWorkers !== "bridge") return options;
|
|
1846
|
-
if (options.transports !== void 0) return options;
|
|
1847
|
-
const primary = options.transport;
|
|
1848
|
-
if (primary === void 0) return options;
|
|
1849
|
-
if (primary.withNamespace === void 0) {
|
|
1850
|
-
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.");
|
|
1851
|
-
}
|
|
1852
|
-
return {
|
|
1853
|
-
...options,
|
|
1854
|
-
transports: [
|
|
1855
|
-
{
|
|
1856
|
-
id: "default",
|
|
1857
|
-
transport: primary
|
|
1858
|
-
},
|
|
1859
|
-
{
|
|
1860
|
-
id: "tenant-workers",
|
|
1861
|
-
transport: primary.withNamespace("default")
|
|
1862
|
-
}
|
|
1863
|
-
]
|
|
1864
|
-
};
|
|
1865
|
-
}
|
|
1866
|
-
__name(resolveTenantWorkersBridge, "resolveTenantWorkersBridge");
|
|
1867
1843
|
var RunGatewayBootstrap = class RunGatewayBootstrap2 {
|
|
1868
1844
|
static {
|
|
1869
1845
|
__name(this, "RunGatewayBootstrap");
|