@dudousxd/nestjs-codegen 0.10.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.
package/dist/cli/main.js CHANGED
@@ -798,7 +798,11 @@ function buildRequestModel(c) {
798
798
  urlExpr,
799
799
  optsExpr,
800
800
  responseType: `${TA}['response']`,
801
- queryKeyExpr: `[${flat}, input] as const`
801
+ // When no input is supplied the key omits the trailing element entirely
802
+ // (`[name]` rather than `[name, undefined]`) so the bare `.queryKey()` is a
803
+ // clean prefix that partial-matches every parametrized variant — making it
804
+ // directly usable for `invalidateQueries`.
805
+ queryKeyExpr: `(input === undefined ? [${flat}] as const : [${flat}, input] as const)`
802
806
  };
803
807
  }
804
808
  function renderFetcherRequest(req) {
@@ -4492,7 +4496,7 @@ async function watch(config, onChange) {
4492
4496
  }
4493
4497
 
4494
4498
  // src/index.ts
4495
- var VERSION = "0.10.0";
4499
+ var VERSION = "0.11.0";
4496
4500
 
4497
4501
  // src/cli/codegen.ts
4498
4502
  async function runCodegen(opts = {}) {