@dudousxd/nestjs-codegen 0.9.0 → 0.11.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.
@@ -1,5 +1,5 @@
1
1
  import { DynamicModule, OnApplicationBootstrap, OnModuleDestroy } from '@nestjs/common';
2
- import { U as UserConfig } from '../index-SJc0gya_.cjs';
2
+ import { U as UserConfig } from '../index-CxkGbILp.cjs';
3
3
  import 'ts-morph';
4
4
 
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  import { DynamicModule, OnApplicationBootstrap, OnModuleDestroy } from '@nestjs/common';
2
- import { U as UserConfig } from '../index-SJc0gya_.js';
2
+ import { U as UserConfig } from '../index-CxkGbILp.js';
3
3
  import 'ts-morph';
4
4
 
5
5
  /**
@@ -2909,7 +2909,11 @@ function buildRequestModel(c) {
2909
2909
  urlExpr,
2910
2910
  optsExpr,
2911
2911
  responseType: `${TA}['response']`,
2912
- queryKeyExpr: `[${flat}, input] as const`
2912
+ // When no input is supplied the key omits the trailing element entirely
2913
+ // (`[name]` rather than `[name, undefined]`) so the bare `.queryKey()` is a
2914
+ // clean prefix that partial-matches every parametrized variant — making it
2915
+ // directly usable for `invalidateQueries`.
2916
+ queryKeyExpr: `(input === undefined ? [${flat}] as const : [${flat}, input] as const)`
2913
2917
  };
2914
2918
  }
2915
2919
  function renderFetcherRequest(req) {