@orval/query 6.20.0 → 6.21.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.
Files changed (2) hide show
  1. package/dist/index.js +6 -2
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -190,6 +190,7 @@ var require_color_name = __commonJS({
190
190
  // ../../node_modules/color-convert/conversions.js
191
191
  var require_conversions = __commonJS({
192
192
  "../../node_modules/color-convert/conversions.js"(exports, module2) {
193
+ "use strict";
193
194
  var cssKeywords = require_color_name();
194
195
  var reverseKeywords = {};
195
196
  for (const key of Object.keys(cssKeywords)) {
@@ -861,6 +862,7 @@ var require_conversions = __commonJS({
861
862
  // ../../node_modules/color-convert/route.js
862
863
  var require_route = __commonJS({
863
864
  "../../node_modules/color-convert/route.js"(exports, module2) {
865
+ "use strict";
864
866
  var conversions = require_conversions();
865
867
  function buildGraph() {
866
868
  const graph = {};
@@ -931,6 +933,7 @@ var require_route = __commonJS({
931
933
  // ../../node_modules/color-convert/index.js
932
934
  var require_color_convert = __commonJS({
933
935
  "../../node_modules/color-convert/index.js"(exports, module2) {
936
+ "use strict";
934
937
  var conversions = require_conversions();
935
938
  var route = require_route();
936
939
  var convert = {};
@@ -1954,8 +1957,9 @@ var generateQueryRequestFunction = ({
1954
1957
  hasSignal,
1955
1958
  isExactOptionalPropertyTypes
1956
1959
  });
1960
+ let bodyDefinition = body.definition.replace("[]", "\\[\\]");
1957
1961
  let propsImplementation = (mutator == null ? void 0 : mutator.bodyTypeName) && body.definition ? (0, import_core2.toObjectString)(props, "implementation").replace(
1958
- new RegExp(`(\\w*):\\s?${body.definition}`),
1962
+ new RegExp(`(\\w*):\\s?${bodyDefinition}`),
1959
1963
  `$1: ${mutator.bodyTypeName}<${body.definition}>`
1960
1964
  ) : (0, import_core2.toObjectString)(props, "implementation");
1961
1965
  const requestOptions = isRequestOptions ? (0, import_core2.generateMutatorRequestOptions)(
@@ -2227,7 +2231,7 @@ var generateQueryImplementation = ({
2227
2231
  const httpFunctionProps = queryParam ? props.map((param) => {
2228
2232
  if (param.type === import_core2.GetterPropType.NAMED_PATH_PARAMS && !isVue(outputClient))
2229
2233
  return param.destructured;
2230
- return param.name === "params" ? `{ ${queryParam}: pageParam, ...params }` : param.name;
2234
+ return param.name === "params" ? `{...params, ${queryParam}: pageParam || ${isVue(outputClient) ? `unref(params)?.['${queryParam}']` : `params?.['${queryParam}']`}}` : param.name;
2231
2235
  }).join(",") : queryProperties;
2232
2236
  const returnType = generateQueryReturnType({
2233
2237
  outputClient,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orval/query",
3
- "version": "6.20.0",
3
+ "version": "6.21.0",
4
4
  "license": "MIT",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -13,7 +13,7 @@
13
13
  "lint": "eslint src/**/*.ts"
14
14
  },
15
15
  "dependencies": {
16
- "@orval/core": "6.20.0",
16
+ "@orval/core": "6.21.0",
17
17
  "lodash.omitby": "^4.6.0"
18
18
  },
19
19
  "devDependencies": {