@ventlio/tanstack-query 0.2.51 → 0.2.52
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
|
@@ -131,9 +131,14 @@ const buildFormData = (body) => {
|
|
|
131
131
|
}
|
|
132
132
|
};
|
|
133
133
|
const handleObjectValue = (key, value) => {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
}
|
|
134
|
+
if (value instanceof File) {
|
|
135
|
+
formData.append(key, value);
|
|
136
|
+
}
|
|
137
|
+
else {
|
|
138
|
+
formData.append(key, new Blob([JSON.stringify(value)], {
|
|
139
|
+
type: 'application/json',
|
|
140
|
+
}));
|
|
141
|
+
}
|
|
137
142
|
};
|
|
138
143
|
const handlePrimitiveValue = (key, value) => {
|
|
139
144
|
formData.append(key, value);
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -18,9 +18,14 @@ const buildFormData = (body) => {
|
|
|
18
18
|
}
|
|
19
19
|
};
|
|
20
20
|
const handleObjectValue = (key, value) => {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
21
|
+
if (value instanceof File) {
|
|
22
|
+
formData.append(key, value);
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
formData.append(key, new Blob([JSON.stringify(value)], {
|
|
26
|
+
type: 'application/json',
|
|
27
|
+
}));
|
|
28
|
+
}
|
|
24
29
|
};
|
|
25
30
|
const handlePrimitiveValue = (key, value) => {
|
|
26
31
|
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
|
@@ -19,12 +19,16 @@ export const buildFormData = (body: Record<string, any>) => {
|
|
|
19
19
|
};
|
|
20
20
|
|
|
21
21
|
const handleObjectValue = (key: string, value: any) => {
|
|
22
|
-
|
|
23
|
-
key,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
22
|
+
if (value instanceof File) {
|
|
23
|
+
formData.append(key, value);
|
|
24
|
+
} else {
|
|
25
|
+
formData.append(
|
|
26
|
+
key,
|
|
27
|
+
new Blob([JSON.stringify(value)], {
|
|
28
|
+
type: 'application/json',
|
|
29
|
+
})
|
|
30
|
+
);
|
|
31
|
+
}
|
|
28
32
|
};
|
|
29
33
|
|
|
30
34
|
const handlePrimitiveValue = (key: string, value: any) => {
|