nuxt-custom-fetch 2.3.0 → 2.3.1
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/module.json +2 -2
- package/dist/runtime/ajax.js +8 -2
- package/dist/types.d.mts +1 -1
- package/package.json +12 -13
- package/dist/module.cjs +0 -5
- package/dist/module.d.ts +0 -7
- package/dist/types.d.ts +0 -1
package/dist/module.json
CHANGED
package/dist/runtime/ajax.js
CHANGED
|
@@ -69,9 +69,15 @@ export class CustomFetch {
|
|
|
69
69
|
Object.assign(config, this.baseConfig(config));
|
|
70
70
|
const generateOptionSegmentsWithConfig = generateOptionSegments(config);
|
|
71
71
|
if (this.showLogs && import.meta.client) {
|
|
72
|
-
|
|
72
|
+
let bodyLogs;
|
|
73
|
+
try {
|
|
74
|
+
bodyLogs = serialize(config.body);
|
|
75
|
+
} catch (error) {
|
|
76
|
+
console.warn("[Custom Fetch] couldn't serialize `Body:`", error);
|
|
77
|
+
}
|
|
78
|
+
console.warn("[Custom Fetch] `Request:`", url, " `Query:`", serialize(generateOptionSegmentsWithConfig), " `Body:`", bodyLogs);
|
|
73
79
|
}
|
|
74
|
-
const { onRequest, onRequestError, onResponse, onResponseError, offline, handler, useHandler, immutableKey, ...restAjaxConfig } = config;
|
|
80
|
+
const { onRequest, onRequestError, onResponse, onResponseError, offline, handler, useHandler, showLogs, immutableKey, ...restAjaxConfig } = config;
|
|
75
81
|
if (import.meta.client && navigator && !navigator.onLine) {
|
|
76
82
|
if (offline) {
|
|
77
83
|
offline();
|
package/dist/types.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { type ModuleOptions, default } from './module.
|
|
1
|
+
export { type ModuleOptions, default } from './module.mjs'
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxt-custom-fetch",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.3.
|
|
4
|
+
"version": "2.3.1",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -9,12 +9,11 @@
|
|
|
9
9
|
},
|
|
10
10
|
"exports": {
|
|
11
11
|
".": {
|
|
12
|
-
"import": "./dist/module.mjs"
|
|
13
|
-
"require": "./dist/module.cjs"
|
|
12
|
+
"import": "./dist/module.mjs"
|
|
14
13
|
}
|
|
15
14
|
},
|
|
16
|
-
"main": "./dist/module.
|
|
17
|
-
"types": "./dist/types.d.
|
|
15
|
+
"main": "./dist/module.mjs",
|
|
16
|
+
"types": "./dist/types.d.mts",
|
|
18
17
|
"files": [
|
|
19
18
|
"dist"
|
|
20
19
|
],
|
|
@@ -36,25 +35,25 @@
|
|
|
36
35
|
}
|
|
37
36
|
},
|
|
38
37
|
"dependencies": {
|
|
39
|
-
"@nuxt/kit": "^3.16.
|
|
38
|
+
"@nuxt/kit": "^3.16.2",
|
|
40
39
|
"ohash": "^2.0.11"
|
|
41
40
|
},
|
|
42
41
|
"devDependencies": {
|
|
43
|
-
"@antfu/eslint-config": "^4.
|
|
42
|
+
"@antfu/eslint-config": "^4.11.0",
|
|
44
43
|
"@commitlint/cli": "^19.8.0",
|
|
45
44
|
"@commitlint/config-conventional": "^19.8.0",
|
|
46
|
-
"@nuxt/module-builder": "^0.
|
|
47
|
-
"@nuxt/schema": "^3.16.
|
|
48
|
-
"@types/node": "^22.
|
|
45
|
+
"@nuxt/module-builder": "^1.0.0",
|
|
46
|
+
"@nuxt/schema": "^3.16.2",
|
|
47
|
+
"@types/node": "^22.14.0",
|
|
49
48
|
"changelogen": "^0.6.1",
|
|
50
49
|
"commitizen": "^4.3.1",
|
|
51
50
|
"cz-git": "^1.11.1",
|
|
52
|
-
"eslint": "^9.
|
|
51
|
+
"eslint": "^9.24.0",
|
|
53
52
|
"husky": "^9.1.7",
|
|
54
53
|
"lint-staged": "^15.5.0",
|
|
55
54
|
"nitro": "npm:nitropack",
|
|
56
|
-
"nuxt": "^3.16.
|
|
57
|
-
"typescript": "5.8.
|
|
55
|
+
"nuxt": "^3.16.2",
|
|
56
|
+
"typescript": "5.8.3"
|
|
58
57
|
},
|
|
59
58
|
"husky": {
|
|
60
59
|
"hooks": {
|
package/dist/module.cjs
DELETED
package/dist/module.d.ts
DELETED
package/dist/types.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { type ModuleOptions, default } from './module'
|