@ventlio/tanstack-query 0.2.28 → 0.2.29

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.mjs CHANGED
@@ -97,8 +97,7 @@ const buildFormData = (body) => {
97
97
  bodyKeys.forEach((key) => {
98
98
  formData.append(key, body[key]);
99
99
  });
100
- body = formData;
101
- return body;
100
+ return formData;
102
101
  };
103
102
 
104
103
  var HttpMethod;
@@ -140,7 +139,7 @@ async function makeRequest({ body, method = HttpMethod.GET, path, isFormData, he
140
139
  // configure body
141
140
  body = isFormData ? buildFormData(body) : body;
142
141
  // configure request header
143
- console.log({ isFormData });
142
+ console.log({ isFormData, body });
144
143
  if (!isFormData) {
145
144
  headers['Content-Type'] = ContentType.APPLICATION_JSON;
146
145
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- export declare const buildFormData: (body: Record<string, any>) => Record<string, any>;
1
+ export declare const buildFormData: (body: Record<string, any>) => FormData;
@@ -6,8 +6,7 @@ const buildFormData = (body) => {
6
6
  bodyKeys.forEach((key) => {
7
7
  formData.append(key, body[key]);
8
8
  });
9
- body = formData;
10
- return body;
9
+ return formData;
11
10
  };
12
11
 
13
12
  exports.buildFormData = buildFormData;
@@ -1 +1 @@
1
- {"version":3,"file":"buildFormData.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"buildFormData.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;"}
@@ -9,7 +9,7 @@ async function makeRequest({ body, method = request_enum.HttpMethod.GET, path, i
9
9
  // configure body
10
10
  body = isFormData ? buildFormData.buildFormData(body) : body;
11
11
  // configure request header
12
- console.log({ isFormData });
12
+ console.log({ isFormData, body });
13
13
  if (!isFormData) {
14
14
  headers['Content-Type'] = request_enum.ContentType.APPLICATION_JSON;
15
15
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ventlio/tanstack-query",
3
- "version": "0.2.28",
3
+ "version": "0.2.29",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "contributors": [
@@ -7,7 +7,5 @@ export const buildFormData = (body: Record<string, any>) => {
7
7
  formData.append(key, body[key]);
8
8
  });
9
9
 
10
- body = formData;
11
-
12
- return body;
10
+ return formData;
13
11
  };
@@ -19,7 +19,7 @@ export async function makeRequest<TResponse>({
19
19
 
20
20
  // configure request header
21
21
 
22
- console.log({ isFormData });
22
+ console.log({ isFormData, body });
23
23
 
24
24
  if (!isFormData) {
25
25
  headers['Content-Type'] = ContentType.APPLICATION_JSON;