@vtj/utils 0.6.17 → 0.6.19
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/cdn/index.js +2 -2
- package/lib/index.js +1330 -1327
- package/package.json +3 -3
- package/types/Request.d.ts +8 -4
- package/types/version.d.ts +1 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vtj/utils",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.6.
|
|
4
|
+
"version": "0.6.19",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"scripts": {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"numeral": "~2.0.6"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@vtj/cli": "^0.6.
|
|
27
|
+
"@vtj/cli": "^0.6.19"
|
|
28
28
|
},
|
|
29
29
|
"files": [
|
|
30
30
|
"lib",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"main": "./lib/index.js",
|
|
35
35
|
"module": "./lib/index.js",
|
|
36
36
|
"types": "./types/index.d.ts",
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "4c3d4aa654b1085e53a4032b66578f3ae4be9fb5",
|
|
38
38
|
"publishConfig": {
|
|
39
39
|
"access": "public"
|
|
40
40
|
}
|
package/types/Request.d.ts
CHANGED
|
@@ -23,9 +23,13 @@ export interface IRequestSettings {
|
|
|
23
23
|
*/
|
|
24
24
|
type?: 'form' | 'json' | 'data';
|
|
25
25
|
/**
|
|
26
|
-
*
|
|
26
|
+
* 是否注入自定义的请求头
|
|
27
27
|
*/
|
|
28
|
-
|
|
28
|
+
injectHeaders?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* 自定义请求头
|
|
31
|
+
*/
|
|
32
|
+
headers?: RawAxiosRequestHeaders | ((id: string, config: AxiosRequestConfig, settings: IRequestSettings) => RawAxiosRequestHeaders);
|
|
29
33
|
/**
|
|
30
34
|
* 是否显示 loading
|
|
31
35
|
*/
|
|
@@ -63,7 +67,7 @@ export interface IRequestSettings {
|
|
|
63
67
|
*/
|
|
64
68
|
skipWarn?: IRequestSkipWarn;
|
|
65
69
|
/**
|
|
66
|
-
*
|
|
70
|
+
* 其他自定义扩展参数
|
|
67
71
|
*/
|
|
68
72
|
[index: string]: any;
|
|
69
73
|
}
|
|
@@ -116,4 +120,4 @@ export interface IApiMap {
|
|
|
116
120
|
[name: string]: string | IRequestConfig;
|
|
117
121
|
}
|
|
118
122
|
export declare function createApis(map: IApiMap): Record<string, (data?: unknown, opts?: IRequestConfig<any> | undefined) => Promise<unknown>>;
|
|
119
|
-
export { LOCAL_REQUEST_ID };
|
|
123
|
+
export { LOCAL_REQUEST_ID, type AxiosRequestConfig, type AxiosResponse, type RawAxiosRequestHeaders };
|
package/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "0.6.
|
|
1
|
+
export declare const version = "0.6.19";
|