@dudousxd/nestjs-durable-core 0.28.1 → 0.28.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.d.cts CHANGED
@@ -1984,6 +1984,16 @@ declare function attributeOperand(filter: AttributeFilter): string | number;
1984
1984
  /**
1985
1985
  * Dependency-injection tokens. Adapters bind their implementations to these so `core` and
1986
1986
  * `@dudousxd/nestjs-durable` depend only on the interfaces in `./interfaces`.
1987
+ *
1988
+ * These use `Symbol.for(key)` (the global symbol registry), NOT `Symbol(key)`, so the token is the
1989
+ * SAME instance no matter how many times `core` is evaluated in a process. A consumer can hold more
1990
+ * than one physical copy of `core` at runtime — pnpm peer-dependency multiplexing installs a
1991
+ * separate virtual copy per distinct peer set, and the dual ESM/CJS build can be loaded once as
1992
+ * `import` (`index.js`) and once as `require` (`index.cjs`). A plain `Symbol()` would mint a
1993
+ * DISTINCT token per copy, so `DurableModule` (provider) and `DashboardService` / a store adapter
1994
+ * (injector) could resolve different symbols → Nest can't satisfy the dependency
1995
+ * (`STATE_STORE is not available in the DurableApiModule context`). A registered symbol collapses
1996
+ * them to one. Mirrors the `CONTEXT_ACCESSOR` token in `@dudousxd/nestjs-durable`'s `tokens.ts`.
1987
1997
  */
1988
1998
  declare const STATE_STORE: unique symbol;
1989
1999
  declare const TRANSPORT: unique symbol;
package/dist/index.d.ts CHANGED
@@ -1984,6 +1984,16 @@ declare function attributeOperand(filter: AttributeFilter): string | number;
1984
1984
  /**
1985
1985
  * Dependency-injection tokens. Adapters bind their implementations to these so `core` and
1986
1986
  * `@dudousxd/nestjs-durable` depend only on the interfaces in `./interfaces`.
1987
+ *
1988
+ * These use `Symbol.for(key)` (the global symbol registry), NOT `Symbol(key)`, so the token is the
1989
+ * SAME instance no matter how many times `core` is evaluated in a process. A consumer can hold more
1990
+ * than one physical copy of `core` at runtime — pnpm peer-dependency multiplexing installs a
1991
+ * separate virtual copy per distinct peer set, and the dual ESM/CJS build can be loaded once as
1992
+ * `import` (`index.js`) and once as `require` (`index.cjs`). A plain `Symbol()` would mint a
1993
+ * DISTINCT token per copy, so `DurableModule` (provider) and `DashboardService` / a store adapter
1994
+ * (injector) could resolve different symbols → Nest can't satisfy the dependency
1995
+ * (`STATE_STORE is not available in the DurableApiModule context`). A registered symbol collapses
1996
+ * them to one. Mirrors the `CONTEXT_ACCESSOR` token in `@dudousxd/nestjs-durable`'s `tokens.ts`.
1987
1997
  */
1988
1998
  declare const STATE_STORE: unique symbol;
1989
1999
  declare const TRANSPORT: unique symbol;
package/dist/index.js CHANGED
@@ -3565,9 +3565,9 @@ function attributeOperand(filter) {
3565
3565
  __name(attributeOperand, "attributeOperand");
3566
3566
 
3567
3567
  // src/tokens.ts
3568
- var STATE_STORE = Symbol("nestjs-durable:STATE_STORE");
3569
- var TRANSPORT = Symbol("nestjs-durable:TRANSPORT");
3570
- var DURABLE_OPTIONS = Symbol("nestjs-durable:DURABLE_OPTIONS");
3568
+ var STATE_STORE = Symbol.for("nestjs-durable:STATE_STORE");
3569
+ var TRANSPORT = Symbol.for("nestjs-durable:TRANSPORT");
3570
+ var DURABLE_OPTIONS = Symbol.for("nestjs-durable:DURABLE_OPTIONS");
3571
3571
 
3572
3572
  // src/testing/in-memory-state-store.ts
3573
3573
  var InMemoryStateStore = class {