@nocobase/sdk 0.7.0-alpha.82 → 0.7.1-alpha.5
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/es/APIClient.d.ts +1 -1
- package/es/APIClient.js +2 -2
- package/lib/APIClient.d.ts +1 -1
- package/lib/APIClient.js +2 -2
- package/package.json +2 -2
- package/src/APIClient.ts +2 -2
package/es/APIClient.d.ts
CHANGED
|
@@ -64,7 +64,7 @@ export declare class APIClient {
|
|
|
64
64
|
storage: Storage;
|
|
65
65
|
constructor(instance?: AxiosInstance | (AxiosRequestConfig & ExtendedOptions));
|
|
66
66
|
private initStorage;
|
|
67
|
-
|
|
67
|
+
interceptors(): void;
|
|
68
68
|
request<T = any, R = AxiosResponse<T>, D = any>(config: AxiosRequestConfig<D> | ResourceActionOptions): Promise<R>;
|
|
69
69
|
resource(name: string, of?: any): IResource;
|
|
70
70
|
}
|
package/es/APIClient.js
CHANGED
|
@@ -185,7 +185,7 @@ export class APIClient {
|
|
|
185
185
|
this.auth = new Auth(this);
|
|
186
186
|
}
|
|
187
187
|
|
|
188
|
-
this.
|
|
188
|
+
this.interceptors();
|
|
189
189
|
}
|
|
190
190
|
|
|
191
191
|
initStorage(storage) {
|
|
@@ -198,7 +198,7 @@ export class APIClient {
|
|
|
198
198
|
}
|
|
199
199
|
}
|
|
200
200
|
|
|
201
|
-
|
|
201
|
+
interceptors() {
|
|
202
202
|
this.axios.interceptors.request.use(config => {
|
|
203
203
|
config.paramsSerializer = params => {
|
|
204
204
|
return qs.stringify(params, {
|
package/lib/APIClient.d.ts
CHANGED
|
@@ -64,7 +64,7 @@ export declare class APIClient {
|
|
|
64
64
|
storage: Storage;
|
|
65
65
|
constructor(instance?: AxiosInstance | (AxiosRequestConfig & ExtendedOptions));
|
|
66
66
|
private initStorage;
|
|
67
|
-
|
|
67
|
+
interceptors(): void;
|
|
68
68
|
request<T = any, R = AxiosResponse<T>, D = any>(config: AxiosRequestConfig<D> | ResourceActionOptions): Promise<R>;
|
|
69
69
|
resource(name: string, of?: any): IResource;
|
|
70
70
|
}
|
package/lib/APIClient.js
CHANGED
|
@@ -205,7 +205,7 @@ class APIClient {
|
|
|
205
205
|
this.auth = new Auth(this);
|
|
206
206
|
}
|
|
207
207
|
|
|
208
|
-
this.
|
|
208
|
+
this.interceptors();
|
|
209
209
|
}
|
|
210
210
|
|
|
211
211
|
initStorage(storage) {
|
|
@@ -218,7 +218,7 @@ class APIClient {
|
|
|
218
218
|
}
|
|
219
219
|
}
|
|
220
220
|
|
|
221
|
-
|
|
221
|
+
interceptors() {
|
|
222
222
|
this.axios.interceptors.request.use(config => {
|
|
223
223
|
config.paramsSerializer = params => {
|
|
224
224
|
return _qs.default.stringify(params, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/sdk",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.1-alpha.5",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"licenses": [
|
|
6
6
|
{
|
|
@@ -18,5 +18,5 @@
|
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"axios-mock-adapter": "^1.20.0"
|
|
20
20
|
},
|
|
21
|
-
"gitHead": "
|
|
21
|
+
"gitHead": "c9159c6cf4b7deb80e87122d4b7967a510b8ae7c"
|
|
22
22
|
}
|
package/src/APIClient.ts
CHANGED
|
@@ -181,7 +181,7 @@ export class APIClient {
|
|
|
181
181
|
if (!this.auth) {
|
|
182
182
|
this.auth = new Auth(this);
|
|
183
183
|
}
|
|
184
|
-
this.
|
|
184
|
+
this.interceptors();
|
|
185
185
|
}
|
|
186
186
|
|
|
187
187
|
private initStorage(storage?: any) {
|
|
@@ -194,7 +194,7 @@ export class APIClient {
|
|
|
194
194
|
}
|
|
195
195
|
}
|
|
196
196
|
|
|
197
|
-
|
|
197
|
+
interceptors() {
|
|
198
198
|
this.axios.interceptors.request.use((config) => {
|
|
199
199
|
config.paramsSerializer = (params) => {
|
|
200
200
|
return qs.stringify(params, {
|