@ventlio/tanstack-query 0.2.83 → 0.2.85
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
|
@@ -295,11 +295,10 @@ var ContentType;
|
|
|
295
295
|
//
|
|
296
296
|
const errorTransformer = (data) => {
|
|
297
297
|
return {
|
|
298
|
-
message: data.message,
|
|
299
|
-
statusCode: data.statusCode,
|
|
300
298
|
timeStamp: new Date(),
|
|
301
299
|
status: false,
|
|
302
300
|
data: data.data,
|
|
301
|
+
...data,
|
|
303
302
|
};
|
|
304
303
|
};
|
|
305
304
|
//
|
|
@@ -313,7 +312,7 @@ const successTransformer = (data) => {
|
|
|
313
312
|
};
|
|
314
313
|
};
|
|
315
314
|
|
|
316
|
-
async function makeRequest({ body, method = HttpMethod.GET, path, isFormData, headers = {}, baseURL, timeout, appFileConfig, onUploadProgress, }) {
|
|
315
|
+
async function makeRequest({ body = {}, method = HttpMethod.GET, path, isFormData, headers = {}, baseURL, timeout, appFileConfig, onUploadProgress, }) {
|
|
317
316
|
// check if file is included in mobile app environment and extract all file input to avoid
|
|
318
317
|
// it being formatted to object using axios formData builder
|
|
319
318
|
const isApp = appFileConfig?.isApp;
|
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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -3,7 +3,7 @@ import { axiosInstance } from './axios-instance.js';
|
|
|
3
3
|
import { ContentType, HttpMethod } from './request.enum.js';
|
|
4
4
|
import { errorTransformer, successTransformer } from './transformer.js';
|
|
5
5
|
|
|
6
|
-
async function makeRequest({ body, method = HttpMethod.GET, path, isFormData, headers = {}, baseURL, timeout, appFileConfig, onUploadProgress, }) {
|
|
6
|
+
async function makeRequest({ body = {}, method = HttpMethod.GET, path, isFormData, headers = {}, baseURL, timeout, appFileConfig, onUploadProgress, }) {
|
|
7
7
|
// check if file is included in mobile app environment and extract all file input to avoid
|
|
8
8
|
// it being formatted to object using axios formData builder
|
|
9
9
|
const isApp = appFileConfig?.isApp;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transformer.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"transformer.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -3,11 +3,10 @@ import type { IRequestError, IRequestSuccess, IServerRequestError, IServerReques
|
|
|
3
3
|
//
|
|
4
4
|
export const errorTransformer = (data: IServerRequestError & { statusCode: number }): IRequestError => {
|
|
5
5
|
return {
|
|
6
|
-
message: data.message,
|
|
7
|
-
statusCode: data.statusCode,
|
|
8
6
|
timeStamp: new Date(),
|
|
9
7
|
status: false,
|
|
10
8
|
data: data.data,
|
|
9
|
+
...data,
|
|
11
10
|
};
|
|
12
11
|
};
|
|
13
12
|
|