@next-core/brick-kit 2.118.7 → 2.119.0
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/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,19 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [2.119.0](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.118.7...@next-core/brick-kit@2.119.0) (2022-05-11)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **mock:** add note ([74c0031](https://github.com/easyops-cn/next-core/commit/74c0031c81ded97014384213d99fedce8ed55d54))
|
|
12
|
+
* **mock:** update mock rule ([c8fe9fc](https://github.com/easyops-cn/next-core/commit/c8fe9fccb46117330e1ff2ef42a18bef8dfff864))
|
|
13
|
+
* **mock:** update mock rule ([5898ecf](https://github.com/easyops-cn/next-core/commit/5898ecfd604ca418feeb954a6091e3b940a1e867))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
6
19
|
## [2.118.7](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.118.6...@next-core/brick-kit@2.118.7) (2022-05-10)
|
|
7
20
|
|
|
8
21
|
**Note:** Version bump only for package @next-core/brick-kit
|
package/dist/index.bundle.js
CHANGED
|
@@ -5791,11 +5791,14 @@
|
|
|
5791
5791
|
var _useMocks$mockList;
|
|
5792
5792
|
|
|
5793
5793
|
if (useMocks) mocks = _objectSpread__default["default"](_objectSpread__default["default"]({}, useMocks), {}, {
|
|
5794
|
-
mockList: (_useMocks$mockList = useMocks.mockList) === null || _useMocks$mockList === void 0 ? void 0 : _useMocks$mockList.map(item =>
|
|
5795
|
-
|
|
5796
|
-
|
|
5797
|
-
|
|
5798
|
-
|
|
5794
|
+
mockList: (_useMocks$mockList = useMocks.mockList) === null || _useMocks$mockList === void 0 ? void 0 : _useMocks$mockList.map(item => {
|
|
5795
|
+
var isFlowAPi = isCustomApiProvider(item.provider);
|
|
5796
|
+
return _objectSpread__default["default"](_objectSpread__default["default"]({}, item), {}, {
|
|
5797
|
+
uri: "".concat(isFlowAPi ? item.uri.replace(/(.+?)\/(.+)/, (_match, p1, p2) => {
|
|
5798
|
+
return "/".concat(p1, "(@\\d+\\.\\d+\\.\\d+)?/").concat(p2, "$");
|
|
5799
|
+
}) : "/".concat(item.uri.split(".").slice(2).join("."), "$")).replace(/:\w+/g, "([^/]+)")
|
|
5800
|
+
});
|
|
5801
|
+
})
|
|
5799
5802
|
});
|
|
5800
5803
|
}
|
|
5801
5804
|
function getMockList() {
|
|
@@ -5815,6 +5818,7 @@
|
|
|
5815
5818
|
if (item) {
|
|
5816
5819
|
return {
|
|
5817
5820
|
url: requestUrl.replace(/(api\/gateway\/.+?)(@\d+\.\d+\.\d+)?\/(.+)/, (_match, p1, _p2, p3) => {
|
|
5821
|
+
// 忽略版本
|
|
5818
5822
|
return "".concat(p1, "/").concat(p3);
|
|
5819
5823
|
}).replace(/(api\/gateway)/, "api/gateway/mock_server.proxy.".concat(mocks.mockId)),
|
|
5820
5824
|
mockId: mocks.mockId
|