@varlet/axle 0.3.1 → 0.3.2
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/index.js +2 -2
- package/package.json +1 -1
package/es/index.js
CHANGED
|
@@ -341,15 +341,15 @@ function responseStatusInterceptor(options) {
|
|
|
341
341
|
|
|
342
342
|
// src/interceptors/requestMd5Interceptor.ts
|
|
343
343
|
import qs2 from "qs";
|
|
344
|
+
import md5 from "crypto-js/md5";
|
|
344
345
|
import { minimatch as minimatch3 } from "minimatch";
|
|
345
346
|
import { set, get } from "lodash-es";
|
|
346
|
-
import { MD5 } from "crypto-js";
|
|
347
347
|
import { isString } from "@varlet/shared";
|
|
348
348
|
function withCtxMd5(ctx, mapping) {
|
|
349
349
|
mapping.path.forEach((path) => {
|
|
350
350
|
const targetValue = get(ctx, path);
|
|
351
351
|
if (targetValue != null) {
|
|
352
|
-
set(ctx, path,
|
|
352
|
+
set(ctx, path, md5(String(targetValue)).toString());
|
|
353
353
|
}
|
|
354
354
|
});
|
|
355
355
|
}
|