routesync 1.0.32 → 1.0.33

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/react.js CHANGED
@@ -34,17 +34,19 @@ module.exports = __toCommonJS(src_exports);
34
34
  var import_react_query = require("@tanstack/react-query");
35
35
  function useApiQuery(endpoint, options, queryOptions) {
36
36
  const queryKey = endpoint.$queryKey(options);
37
+ const callEndpoint = endpoint;
37
38
  return (0, import_react_query.useQuery)({
38
39
  queryKey,
39
- queryFn: () => endpoint(options),
40
+ queryFn: () => callEndpoint(options),
40
41
  ...queryOptions
41
42
  });
42
43
  }
43
44
  function useApiSuspenseQuery(endpoint, options, queryOptions) {
44
45
  const queryKey = endpoint.$queryKey(options);
46
+ const callEndpoint = endpoint;
45
47
  return (0, import_react_query.useSuspenseQuery)({
46
48
  queryKey,
47
- queryFn: () => endpoint(options),
49
+ queryFn: () => callEndpoint(options),
48
50
  ...queryOptions
49
51
  });
50
52
  }
package/dist/react.mjs CHANGED
@@ -2,17 +2,19 @@
2
2
  import { useQuery, useSuspenseQuery, useInfiniteQuery } from "@tanstack/react-query";
3
3
  function useApiQuery(endpoint, options, queryOptions) {
4
4
  const queryKey = endpoint.$queryKey(options);
5
+ const callEndpoint = endpoint;
5
6
  return useQuery({
6
7
  queryKey,
7
- queryFn: () => endpoint(options),
8
+ queryFn: () => callEndpoint(options),
8
9
  ...queryOptions
9
10
  });
10
11
  }
11
12
  function useApiSuspenseQuery(endpoint, options, queryOptions) {
12
13
  const queryKey = endpoint.$queryKey(options);
14
+ const callEndpoint = endpoint;
13
15
  return useSuspenseQuery({
14
16
  queryKey,
15
- queryFn: () => endpoint(options),
17
+ queryFn: () => callEndpoint(options),
16
18
  ...queryOptions
17
19
  });
18
20
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "routesync",
3
- "version": "1.0.32",
3
+ "version": "1.0.33",
4
4
  "description": "Laravel routes to typed frontend SDKs.",
5
5
  "main": "./dist/sdk.js",
6
6
  "module": "./dist/sdk.mjs",