@next-core/brick-kit 2.88.0 → 2.88.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/CHANGELOG.md CHANGED
@@ -3,6 +3,18 @@
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.88.1](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.88.0...@next-core/brick-kit@2.88.1) (2021-11-25)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * app 字段合并 boostrap 接口详情的 app 信息 ([2dffa41](https://github.com/easyops-cn/next-core/commit/2dffa41e020e92994c6275a62977128b0a7a4bad))
12
+ * use boostreap v2 api ([e1fbf03](https://github.com/easyops-cn/next-core/commit/e1fbf0366e29b28f823915bda4707368910c013e))
13
+
14
+
15
+
16
+
17
+
6
18
  # [2.88.0](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.87.0...@next-core/brick-kit@2.88.0) (2021-11-23)
7
19
 
8
20
 
@@ -2418,11 +2418,15 @@
2418
2418
  /* istanbul ignore next */
2419
2419
 
2420
2420
  function _dev_only_getBrickPackages() {
2421
+ // eslint-disable-next-line no-console
2422
+ console.warn("`_dev_only_getBrickPackages()` is deprecated and will always return an empty array, please use `(await BootstrapV2Api_brickPackageInfo()).bricks` instead");
2421
2423
  return kernel.bootstrapData.brickPackages;
2422
2424
  }
2423
2425
  /* istanbul ignore next */
2424
2426
 
2425
2427
  function _dev_only_getTemplatePackages() {
2428
+ // eslint-disable-next-line no-console
2429
+ console.warn("`_dev_only_getTemplatePackages()` is deprecated and will always return an empty array, please use `(await BootstrapV2Api_brickPackageInfo()).templates` instead");
2426
2430
  return kernel.bootstrapData.templatePackages;
2427
2431
  }
2428
2432
  /* istanbul ignore next */
@@ -4747,6 +4751,26 @@
4747
4751
  timeoutIdList.clear();
4748
4752
  }
4749
4753
 
4754
+ /**
4755
+ * @description 获取系统初始化信息
4756
+ * @endpoint GET /api/auth/v2/bootstrap
4757
+ */
4758
+
4759
+
4760
+ var BootstrapV2Api_bootstrapV2 = /*#__PURE__*/function () {
4761
+ var _ref = _asyncToGenerator__default["default"](function* (params, options) {
4762
+ return (
4763
+ /**! @contract easyops.api.api_gateway.bootstrap_v2.BootstrapV2@1.0.0 */
4764
+ (yield brickHttp.http.get("api/auth/v2/bootstrap", _objectSpread__default["default"](_objectSpread__default["default"]({}, options), {}, {
4765
+ params
4766
+ }))).data
4767
+ );
4768
+ });
4769
+
4770
+ return function BootstrapV2Api_bootstrapV2(_x, _x2) {
4771
+ return _ref.apply(this, arguments);
4772
+ };
4773
+ }();
4750
4774
  /**
4751
4775
  * @description 通过defaultOrg查找单个契约信息
4752
4776
  * @endpoint POST /api/contract/single_search
@@ -4756,7 +4780,7 @@
4756
4780
  var ContractApi_searchSingleContract = /*#__PURE__*/function () {
4757
4781
  var _ref = _asyncToGenerator__default["default"](function* (data, options) {
4758
4782
  return (
4759
- /**! @contract easyops.api.api_gateway.contract.SearchSingleContract */
4783
+ /**! @contract easyops.api.api_gateway.contract.SearchSingleContract@1.0.0 */
4760
4784
  (yield brickHttp.http.post("api/contract/single_search", data, options)).data
4761
4785
  );
4762
4786
  });
@@ -5760,18 +5784,6 @@
5760
5784
  };
5761
5785
  }();
5762
5786
 
5763
- var bootstrap = /*#__PURE__*/function () {
5764
- var _ref3 = _asyncToGenerator$1(function* (params, options) {
5765
- return (yield brickHttp.http.get("api/auth/bootstrap", _objectSpread2(_objectSpread2({}, options), {}, {
5766
- params
5767
- }))).data;
5768
- });
5769
-
5770
- return function bootstrap(_x4, _x5) {
5771
- return _ref3.apply(this, arguments);
5772
- };
5773
- }();
5774
-
5775
5787
  var getAppStoryboard = /*#__PURE__*/function () {
5776
5788
  var _ref4 = _asyncToGenerator$1(function* (appId, params, options) {
5777
5789
  return (yield brickHttp.http.get("api/auth/bootstrap/".concat(appId), _objectSpread2(_objectSpread2({}, options), {}, {
@@ -6209,8 +6221,10 @@
6209
6221
  var _this3 = this;
6210
6222
 
6211
6223
  return _asyncToGenerator__default["default"](function* () {
6212
- var data = yield window.STANDALONE_MICRO_APPS ? standaloneBootstrap() : bootstrap(_objectSpread__default["default"]({
6213
- brief: true
6224
+ var data = yield window.STANDALONE_MICRO_APPS ? standaloneBootstrap() : BootstrapV2Api_bootstrapV2(_objectSpread__default["default"]({
6225
+ appFields: "defaultConfig,userConfig,locales,name,homepage,id,currentVersion,installStatus,internal,status",
6226
+ ignoreTemplateFields: "templates",
6227
+ ignoreBrickFields: "bricks,processors,providers,editors"
6214
6228
  }, params), {
6215
6229
  interceptorParams
6216
6230
  });
@@ -6261,11 +6275,13 @@
6261
6275
  } else {
6262
6276
  var {
6263
6277
  routes,
6264
- meta
6278
+ meta,
6279
+ app
6265
6280
  } = yield getAppStoryboard(storyboard.app.id);
6266
6281
  Object.assign(storyboard, {
6267
6282
  routes,
6268
6283
  meta,
6284
+ app: _objectSpread__default["default"](_objectSpread__default["default"]({}, storyboard.app), app),
6269
6285
  $$fulfilled: true
6270
6286
  });
6271
6287
  }