@next-core/brick-kit 2.163.0 → 2.164.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/dist/index.esm.js CHANGED
@@ -5485,8 +5485,7 @@ function clearPollTimeout() {
5485
5485
  */
5486
5486
  var BootstrapStandaloneApi_runtimeStandalone = /*#__PURE__*/function () {
5487
5487
  var _ref = _asyncToGenerator$3(function* (options) {
5488
- return (/**! @contract easyops.api.api_gateway.bootstrap_standalone.RuntimeStandalone@1.0.1 */
5489
- (yield http.get("api/v1/runtime_standalone", options)).data
5488
+ return (/**! @contract easyops.api.api_gateway.bootstrap_standalone.RuntimeStandalone@1.0.1 */(yield http.get("api/v1/runtime_standalone", options)).data
5490
5489
  );
5491
5490
  });
5492
5491
  return function BootstrapStandaloneApi_runtimeStandalone(_x) {
@@ -5500,8 +5499,7 @@ var BootstrapStandaloneApi_runtimeStandalone = /*#__PURE__*/function () {
5500
5499
  */
5501
5500
  var BootstrapV2Api_bootstrapV2 = /*#__PURE__*/function () {
5502
5501
  var _ref = _asyncToGenerator$3(function* (params, options) {
5503
- return (/**! @contract easyops.api.api_gateway.bootstrap_v2.BootstrapV2@1.0.0 */
5504
- (yield http.get("api/auth/v2/bootstrap", _objectSpread(_objectSpread({}, options), {}, {
5502
+ return (/**! @contract easyops.api.api_gateway.bootstrap_v2.BootstrapV2@1.1.0 */(yield http.get("api/auth/v2/bootstrap", _objectSpread(_objectSpread({}, options), {}, {
5505
5503
  params
5506
5504
  }))).data
5507
5505
  );
@@ -5517,8 +5515,7 @@ var BootstrapV2Api_bootstrapV2 = /*#__PURE__*/function () {
5517
5515
  */
5518
5516
  var BootstrapV2Api_getAppStoryboardV2 = /*#__PURE__*/function () {
5519
5517
  var _ref = _asyncToGenerator$3(function* (appId, params, options) {
5520
- return (/**! @contract easyops.api.api_gateway.bootstrap_v2.GetAppStoryboardV2@1.0.0 */
5521
- (yield http.get("api/auth/v2/bootstrap/".concat(appId), _objectSpread(_objectSpread({}, options), {}, {
5518
+ return (/**! @contract easyops.api.api_gateway.bootstrap_v2.GetAppStoryboardV2@1.0.0 */(yield http.get("api/auth/v2/bootstrap/".concat(appId), _objectSpread(_objectSpread({}, options), {}, {
5522
5519
  params
5523
5520
  }))).data
5524
5521
  );
@@ -5528,14 +5525,29 @@ var BootstrapV2Api_getAppStoryboardV2 = /*#__PURE__*/function () {
5528
5525
  };
5529
5526
  }();
5530
5527
 
5528
+ /**
5529
+ * @description 获取bricks信息
5530
+ * @endpoint GET /api/v1/api_gateway/bricks
5531
+ */
5532
+ var BootstrapV2Api_getBricksInfo = /*#__PURE__*/function () {
5533
+ var _ref = _asyncToGenerator$3(function* (params, options) {
5534
+ return (/**! @contract easyops.api.api_gateway.bootstrap_v2.GetBricksInfo@1.0.0 */(yield http.get("api/v1/api_gateway/bricks", _objectSpread(_objectSpread({}, options), {}, {
5535
+ params
5536
+ }))).data
5537
+ );
5538
+ });
5539
+ return function BootstrapV2Api_getBricksInfo(_x, _x2) {
5540
+ return _ref.apply(this, arguments);
5541
+ };
5542
+ }();
5543
+
5531
5544
  /**
5532
5545
  * @description 通过defaultOrg查找单个契约信息
5533
5546
  * @endpoint POST /api/contract/single_search
5534
5547
  */
5535
5548
  var ContractApi_searchSingleContract = /*#__PURE__*/function () {
5536
5549
  var _ref = _asyncToGenerator$3(function* (data, options) {
5537
- return (/**! @contract easyops.api.api_gateway.contract.SearchSingleContract@1.0.0 */
5538
- (yield http.post("api/contract/single_search", data, options)).data
5550
+ return (/**! @contract easyops.api.api_gateway.contract.SearchSingleContract@1.0.0 */(yield http.post("api/contract/single_search", data, options)).data
5539
5551
  );
5540
5552
  });
5541
5553
  return function ContractApi_searchSingleContract(_x, _x2) {
@@ -6735,7 +6747,7 @@ function _standaloneBootstrap() {
6735
6747
  // eslint-disable-next-line no-console
6736
6748
  console.warn("request runtime api from api-gateway failed: ", error, ", something might went wrong running standalone micro app");
6737
6749
  return;
6738
- })];
6750
+ }), window.DEVELOPER_PREVIEW ? BootstrapV2Api_getBricksInfo({}) : null];
6739
6751
  if (!window.NO_AUTH_GUARD) {
6740
6752
  var matches;
6741
6753
  var appId = window.APP_ID || (window.APP_ROOT && (matches = window.APP_ROOT.match(/^(?:(?:\/next)?\/)?sa-static\/([^/]+)\/versions\//)) ? matches[1] : null);
@@ -6744,7 +6756,7 @@ function _standaloneBootstrap() {
6744
6756
  safeGetRuntimeMicroAppStandalone(appId);
6745
6757
  }
6746
6758
  }
6747
- var [bootstrapResult, confString, runtimeData] = yield Promise.all(requests);
6759
+ var [bootstrapResult, confString, runtimeData, previewPackageData] = yield Promise.all(requests);
6748
6760
  var conf;
6749
6761
  try {
6750
6762
  conf = confString ? yaml.safeLoad(confString, {
@@ -6799,6 +6811,12 @@ function _standaloneBootstrap() {
6799
6811
  }
6800
6812
  }
6801
6813
  }
6814
+ if (previewPackageData) {
6815
+ Object.assign(bootstrapResult, {
6816
+ brickPackages: previewPackageData.bricksInfo,
6817
+ templatePackages: previewPackageData.templatesInfo
6818
+ });
6819
+ }
6802
6820
  return _objectSpread(_objectSpread({}, bootstrapResult), {}, {
6803
6821
  settings
6804
6822
  });