@ventlio/tanstack-query 0.2.51 → 0.2.53

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
@@ -121,9 +121,7 @@ const buildFormData = (body) => {
121
121
  formData.append(key, item);
122
122
  }
123
123
  else if (item instanceof Object) {
124
- formData.append(key, new Blob([JSON.stringify(item)], {
125
- type: 'application/json',
126
- }));
124
+ formData.append(key, JSON.stringify(item));
127
125
  }
128
126
  else {
129
127
  formData.append(key, item);
@@ -131,9 +129,12 @@ const buildFormData = (body) => {
131
129
  }
132
130
  };
133
131
  const handleObjectValue = (key, value) => {
134
- formData.append(key, new Blob([JSON.stringify(value)], {
135
- type: 'application/json',
136
- }));
132
+ if (value instanceof File) {
133
+ formData.append(key, value);
134
+ }
135
+ else {
136
+ formData.append(key, JSON.stringify(value));
137
+ }
137
138
  };
138
139
  const handlePrimitiveValue = (key, value) => {
139
140
  formData.append(key, value);
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -8,9 +8,7 @@ const buildFormData = (body) => {
8
8
  formData.append(key, item);
9
9
  }
10
10
  else if (item instanceof Object) {
11
- formData.append(key, new Blob([JSON.stringify(item)], {
12
- type: 'application/json',
13
- }));
11
+ formData.append(key, JSON.stringify(item));
14
12
  }
15
13
  else {
16
14
  formData.append(key, item);
@@ -18,9 +16,12 @@ const buildFormData = (body) => {
18
16
  }
19
17
  };
20
18
  const handleObjectValue = (key, value) => {
21
- formData.append(key, new Blob([JSON.stringify(value)], {
22
- type: 'application/json',
23
- }));
19
+ if (value instanceof File) {
20
+ formData.append(key, value);
21
+ }
22
+ else {
23
+ formData.append(key, JSON.stringify(value));
24
+ }
24
25
  };
25
26
  const handlePrimitiveValue = (key, value) => {
26
27
  formData.append(key, value);
@@ -1 +1 @@
1
- {"version":3,"file":"buildFormData.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"buildFormData.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ventlio/tanstack-query",
3
- "version": "0.2.51",
3
+ "version": "0.2.53",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "contributors": [
@@ -6,12 +6,7 @@ export const buildFormData = (body: Record<string, any>) => {
6
6
  if (item instanceof File) {
7
7
  formData.append(key, item);
8
8
  } else if (item instanceof Object) {
9
- formData.append(
10
- key,
11
- new Blob([JSON.stringify(item)], {
12
- type: 'application/json',
13
- })
14
- );
9
+ formData.append(key, JSON.stringify(item));
15
10
  } else {
16
11
  formData.append(key, item);
17
12
  }
@@ -19,12 +14,11 @@ export const buildFormData = (body: Record<string, any>) => {
19
14
  };
20
15
 
21
16
  const handleObjectValue = (key: string, value: any) => {
22
- formData.append(
23
- key,
24
- new Blob([JSON.stringify(value)], {
25
- type: 'application/json',
26
- })
27
- );
17
+ if (value instanceof File) {
18
+ formData.append(key, value);
19
+ } else {
20
+ formData.append(key, JSON.stringify(value));
21
+ }
28
22
  };
29
23
 
30
24
  const handlePrimitiveValue = (key: string, value: any) => {