@dudousxd/nestjs-durable 0.37.0 → 0.38.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.d.cts CHANGED
@@ -1060,13 +1060,16 @@ declare class TenantEventRepublisher {
1060
1060
  */
1061
1061
  declare const CONTEXT_ACCESSOR: unique symbol;
1062
1062
  /**
1063
- * Injection token for the bound `RunGateway` — the read/control surface a consumer (a controller,
1064
- * or the `RunRequestResponder`) uses instead of reaching for `WorkflowEngine`/`StateStore`
1065
- * directly. `DurableModule` binds it to `StoreRunGateway` on worker/drive (operator) instances.
1066
- * `Symbol.for` so re-resolving this module (e.g. across a dynamic-module boundary) still hits the
1067
- * same registration.
1063
+ * @deprecated Inject the `RunGateway` abstract class directly (it is its own DI token now):
1064
+ * `constructor(private readonly gateway: RunGateway)`, provider `{ provide: RunGateway, useClass }`.
1065
+ * This symbol is kept as a back-compat alias — it points at the `RunGateway` class, so existing
1066
+ * `@Inject(RUN_GATEWAY)` sites resolve the very same token — and will be removed in a future major.
1067
+ *
1068
+ * `RunGateway` is owned by `@dudousxd/nestjs-durable-core` (a required peer dep of both this package
1069
+ * and the dashboard), so the abstract class is a single shared token across packages without the
1070
+ * previous `Symbol.for` value-sharing hack.
1068
1071
  */
1069
- declare const RUN_GATEWAY: unique symbol;
1072
+ declare const RUN_GATEWAY: typeof RunGateway;
1070
1073
 
1071
1074
  /** Public entry point for starting and resuming workflow runs. */
1072
1075
  declare class WorkflowService {
package/dist/index.d.ts CHANGED
@@ -1060,13 +1060,16 @@ declare class TenantEventRepublisher {
1060
1060
  */
1061
1061
  declare const CONTEXT_ACCESSOR: unique symbol;
1062
1062
  /**
1063
- * Injection token for the bound `RunGateway` — the read/control surface a consumer (a controller,
1064
- * or the `RunRequestResponder`) uses instead of reaching for `WorkflowEngine`/`StateStore`
1065
- * directly. `DurableModule` binds it to `StoreRunGateway` on worker/drive (operator) instances.
1066
- * `Symbol.for` so re-resolving this module (e.g. across a dynamic-module boundary) still hits the
1067
- * same registration.
1063
+ * @deprecated Inject the `RunGateway` abstract class directly (it is its own DI token now):
1064
+ * `constructor(private readonly gateway: RunGateway)`, provider `{ provide: RunGateway, useClass }`.
1065
+ * This symbol is kept as a back-compat alias — it points at the `RunGateway` class, so existing
1066
+ * `@Inject(RUN_GATEWAY)` sites resolve the very same token — and will be removed in a future major.
1067
+ *
1068
+ * `RunGateway` is owned by `@dudousxd/nestjs-durable-core` (a required peer dep of both this package
1069
+ * and the dashboard), so the abstract class is a single shared token across packages without the
1070
+ * previous `Symbol.for` value-sharing hack.
1068
1071
  */
1069
- declare const RUN_GATEWAY: unique symbol;
1072
+ declare const RUN_GATEWAY: typeof RunGateway;
1070
1073
 
1071
1074
  /** Public entry point for starting and resuming workflow runs. */
1072
1075
  declare class WorkflowService {
package/dist/index.js CHANGED
@@ -484,7 +484,7 @@ function unavailableRunGateway() {
484
484
  __name(unavailableRunGateway, "unavailableRunGateway");
485
485
 
486
486
  // src/durable.module.ts
487
- import { DURABLE_OPTIONS, DURABLE_OPTIONS_CANONICAL as DURABLE_OPTIONS_CANONICAL7, STATE_STORE, STATE_STORE_CANONICAL as STATE_STORE_CANONICAL4, TRANSPORT, TRANSPORT_CANONICAL as TRANSPORT_CANONICAL3, WorkflowEngine as WorkflowEngine6 } from "@dudousxd/nestjs-durable-core";
487
+ import { DURABLE_OPTIONS, DURABLE_OPTIONS_CANONICAL as DURABLE_OPTIONS_CANONICAL7, RunGateway as RunGateway2, STATE_STORE, STATE_STORE_CANONICAL as STATE_STORE_CANONICAL4, TRANSPORT, TRANSPORT_CANONICAL as TRANSPORT_CANONICAL3, WorkflowEngine as WorkflowEngine6 } from "@dudousxd/nestjs-durable-core";
488
488
  import { Inject as Inject8, Injectable as Injectable12, Module } from "@nestjs/common";
489
489
  import { DiscoveryModule, ModuleRef } from "@nestjs/core";
490
490
 
@@ -1418,8 +1418,9 @@ TimerPoller = _ts_decorate9([
1418
1418
  ], TimerPoller);
1419
1419
 
1420
1420
  // src/tokens.ts
1421
+ import { RunGateway } from "@dudousxd/nestjs-durable-core";
1421
1422
  var CONTEXT_ACCESSOR = Symbol.for("@dudousxd/nestjs-context:accessor");
1422
- var RUN_GATEWAY = Symbol.for("nestjs-durable:run-gateway");
1423
+ var RUN_GATEWAY = RunGateway;
1423
1424
 
1424
1425
  // src/workflow.registrar.ts
1425
1426
  import { DURABLE_OPTIONS_CANONICAL as DURABLE_OPTIONS_CANONICAL6, RemoteWorkflowExecutor, STATE_STORE_CANONICAL as STATE_STORE_CANONICAL3, WorkflowEngine as WorkflowEngine4, bindWorkflowClass, parseDuration as parseDuration2, sanitizeQueueToken, tenantGroup, workflowName as workflowName2 } from "@dudousxd/nestjs-durable-core";
@@ -1886,14 +1887,13 @@ var RunGatewayBootstrap = class RunGatewayBootstrap2 {
1886
1887
  RunGatewayBootstrap = _ts_decorate12([
1887
1888
  Injectable12(),
1888
1889
  _ts_param8(1, Inject8(TRANSPORT_CANONICAL3)),
1889
- _ts_param8(2, Inject8(RUN_GATEWAY)),
1890
1890
  _ts_param8(3, Inject8(STATE_STORE_CANONICAL4)),
1891
1891
  _ts_param8(4, Inject8(DURABLE_OPTIONS_CANONICAL7)),
1892
1892
  _ts_metadata12("design:type", Function),
1893
1893
  _ts_metadata12("design:paramtypes", [
1894
1894
  typeof WorkflowEngine6 === "undefined" ? Object : WorkflowEngine6,
1895
1895
  Object,
1896
- typeof RunGateway === "undefined" ? Object : RunGateway,
1896
+ typeof RunGateway2 === "undefined" ? Object : RunGateway2,
1897
1897
  Object,
1898
1898
  typeof DurableModuleOptions === "undefined" ? Object : DurableModuleOptions
1899
1899
  ])
@@ -2038,7 +2038,7 @@ var DurableModule = class _DurableModule {
2038
2038
  // or (for a thin worker, no `store`) a `ProxyRunGateway` over `transport` when given, else a
2039
2039
  // gateway whose every method rejects with a clear tenant error.
2040
2040
  {
2041
- provide: RUN_GATEWAY,
2041
+ provide: RunGateway2,
2042
2042
  useFactory: /* @__PURE__ */ __name((options, store, engine) => {
2043
2043
  if (options.store !== void 0) {
2044
2044
  if (!store) {
@@ -2071,7 +2071,7 @@ var DurableModule = class _DurableModule {
2071
2071
  TRANSPORT,
2072
2072
  TRANSPORT_CANONICAL3,
2073
2073
  DURABLE_OPTIONS_CANONICAL7,
2074
- RUN_GATEWAY
2074
+ RunGateway2
2075
2075
  ]
2076
2076
  };
2077
2077
  }