@next-core/brick-kit 2.86.1 → 2.89.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 +50 -0
- package/dist/index.bundle.js +44 -25
- package/dist/index.bundle.js.map +1 -1
- package/dist/index.esm.js +44 -25
- package/dist/index.esm.js.map +1 -1
- package/dist/types/core/Kernel.d.ts.map +1 -1
- package/dist/types/core/LocationContext.d.ts +1 -0
- package/dist/types/core/LocationContext.d.ts.map +1 -1
- package/dist/types/core/Router.d.ts.map +1 -1
- package/dist/types/core/Runtime.d.ts.map +1 -1
- package/package.json +4 -4
package/dist/index.esm.js
CHANGED
|
@@ -1402,8 +1402,6 @@ function StoryboardFunctionRegistryFactory() {
|
|
|
1402
1402
|
}
|
|
1403
1403
|
|
|
1404
1404
|
function getStoryboardFunction(name) {
|
|
1405
|
-
var _collector, _collector2, _collector3, _collector4;
|
|
1406
|
-
|
|
1407
1405
|
var fn = registeredFunctions.get(name);
|
|
1408
1406
|
|
|
1409
1407
|
if (!fn) {
|
|
@@ -1422,8 +1420,8 @@ function StoryboardFunctionRegistryFactory() {
|
|
|
1422
1420
|
|
|
1423
1421
|
var precooked = precookFunction(fn.source, {
|
|
1424
1422
|
typescript: fn.typescript,
|
|
1425
|
-
hooks: {
|
|
1426
|
-
beforeVisit:
|
|
1423
|
+
hooks: collector && {
|
|
1424
|
+
beforeVisit: collector.beforeVisit
|
|
1427
1425
|
}
|
|
1428
1426
|
});
|
|
1429
1427
|
fn.cooked = cook(precooked.function, fn.source, {
|
|
@@ -1434,10 +1432,10 @@ function StoryboardFunctionRegistryFactory() {
|
|
|
1434
1432
|
// Functions can call other functions.
|
|
1435
1433
|
FN: storyboardFunctions
|
|
1436
1434
|
}),
|
|
1437
|
-
hooks: {
|
|
1438
|
-
beforeEvaluate:
|
|
1439
|
-
beforeCall:
|
|
1440
|
-
beforeBranch:
|
|
1435
|
+
hooks: collector && {
|
|
1436
|
+
beforeEvaluate: collector.beforeEvaluate,
|
|
1437
|
+
beforeCall: collector.beforeCall,
|
|
1438
|
+
beforeBranch: collector.beforeBranch
|
|
1441
1439
|
}
|
|
1442
1440
|
});
|
|
1443
1441
|
fn.processed = true;
|
|
@@ -2401,11 +2399,15 @@ var fakeTplContext;
|
|
|
2401
2399
|
/* istanbul ignore next */
|
|
2402
2400
|
|
|
2403
2401
|
function _dev_only_getBrickPackages() {
|
|
2402
|
+
// eslint-disable-next-line no-console
|
|
2403
|
+
console.warn("`_dev_only_getBrickPackages()` is deprecated and will always return an empty array, please use `(await BootstrapV2Api_brickPackageInfo()).bricks` instead");
|
|
2404
2404
|
return kernel.bootstrapData.brickPackages;
|
|
2405
2405
|
}
|
|
2406
2406
|
/* istanbul ignore next */
|
|
2407
2407
|
|
|
2408
2408
|
function _dev_only_getTemplatePackages() {
|
|
2409
|
+
// eslint-disable-next-line no-console
|
|
2410
|
+
console.warn("`_dev_only_getTemplatePackages()` is deprecated and will always return an empty array, please use `(await BootstrapV2Api_brickPackageInfo()).templates` instead");
|
|
2409
2411
|
return kernel.bootstrapData.templatePackages;
|
|
2410
2412
|
}
|
|
2411
2413
|
/* istanbul ignore next */
|
|
@@ -4730,6 +4732,26 @@ function clearPollTimeout() {
|
|
|
4730
4732
|
timeoutIdList.clear();
|
|
4731
4733
|
}
|
|
4732
4734
|
|
|
4735
|
+
/**
|
|
4736
|
+
* @description 获取系统初始化信息
|
|
4737
|
+
* @endpoint GET /api/auth/v2/bootstrap
|
|
4738
|
+
*/
|
|
4739
|
+
|
|
4740
|
+
|
|
4741
|
+
var BootstrapV2Api_bootstrapV2 = /*#__PURE__*/function () {
|
|
4742
|
+
var _ref = _asyncToGenerator$4(function* (params, options) {
|
|
4743
|
+
return (
|
|
4744
|
+
/**! @contract easyops.api.api_gateway.bootstrap_v2.BootstrapV2@1.0.0 */
|
|
4745
|
+
(yield http.get("api/auth/v2/bootstrap", _objectSpread(_objectSpread({}, options), {}, {
|
|
4746
|
+
params
|
|
4747
|
+
}))).data
|
|
4748
|
+
);
|
|
4749
|
+
});
|
|
4750
|
+
|
|
4751
|
+
return function BootstrapV2Api_bootstrapV2(_x, _x2) {
|
|
4752
|
+
return _ref.apply(this, arguments);
|
|
4753
|
+
};
|
|
4754
|
+
}();
|
|
4733
4755
|
/**
|
|
4734
4756
|
* @description 通过defaultOrg查找单个契约信息
|
|
4735
4757
|
* @endpoint POST /api/contract/single_search
|
|
@@ -4739,7 +4761,7 @@ function clearPollTimeout() {
|
|
|
4739
4761
|
var ContractApi_searchSingleContract = /*#__PURE__*/function () {
|
|
4740
4762
|
var _ref = _asyncToGenerator$4(function* (data, options) {
|
|
4741
4763
|
return (
|
|
4742
|
-
/**! @contract easyops.api.api_gateway.contract.SearchSingleContract */
|
|
4764
|
+
/**! @contract easyops.api.api_gateway.contract.SearchSingleContract@1.0.0 */
|
|
4743
4765
|
(yield http.post("api/contract/single_search", data, options)).data
|
|
4744
4766
|
);
|
|
4745
4767
|
});
|
|
@@ -5743,18 +5765,6 @@ var checkLogin = /*#__PURE__*/function () {
|
|
|
5743
5765
|
};
|
|
5744
5766
|
}();
|
|
5745
5767
|
|
|
5746
|
-
var bootstrap = /*#__PURE__*/function () {
|
|
5747
|
-
var _ref3 = _asyncToGenerator$1(function* (params, options) {
|
|
5748
|
-
return (yield http.get("api/auth/bootstrap", _objectSpread2(_objectSpread2({}, options), {}, {
|
|
5749
|
-
params
|
|
5750
|
-
}))).data;
|
|
5751
|
-
});
|
|
5752
|
-
|
|
5753
|
-
return function bootstrap(_x4, _x5) {
|
|
5754
|
-
return _ref3.apply(this, arguments);
|
|
5755
|
-
};
|
|
5756
|
-
}();
|
|
5757
|
-
|
|
5758
5768
|
var getAppStoryboard = /*#__PURE__*/function () {
|
|
5759
5769
|
var _ref4 = _asyncToGenerator$1(function* (appId, params, options) {
|
|
5760
5770
|
return (yield http.get("api/auth/bootstrap/".concat(appId), _objectSpread2(_objectSpread2({}, options), {}, {
|
|
@@ -6192,8 +6202,10 @@ class Kernel {
|
|
|
6192
6202
|
var _this3 = this;
|
|
6193
6203
|
|
|
6194
6204
|
return _asyncToGenerator$4(function* () {
|
|
6195
|
-
var data = yield window.STANDALONE_MICRO_APPS ? standaloneBootstrap() :
|
|
6196
|
-
|
|
6205
|
+
var data = yield window.STANDALONE_MICRO_APPS ? standaloneBootstrap() : BootstrapV2Api_bootstrapV2(_objectSpread({
|
|
6206
|
+
appFields: "defaultConfig,userConfig,locales,name,homepage,id,currentVersion,installStatus,internal,status",
|
|
6207
|
+
ignoreTemplateFields: "templates",
|
|
6208
|
+
ignoreBrickFields: "bricks,processors,providers,editors"
|
|
6197
6209
|
}, params), {
|
|
6198
6210
|
interceptorParams
|
|
6199
6211
|
});
|
|
@@ -6244,11 +6256,13 @@ class Kernel {
|
|
|
6244
6256
|
} else {
|
|
6245
6257
|
var {
|
|
6246
6258
|
routes,
|
|
6247
|
-
meta
|
|
6259
|
+
meta,
|
|
6260
|
+
app
|
|
6248
6261
|
} = yield getAppStoryboard(storyboard.app.id);
|
|
6249
6262
|
Object.assign(storyboard, {
|
|
6250
6263
|
routes,
|
|
6251
6264
|
meta,
|
|
6265
|
+
app: _objectSpread(_objectSpread({}, storyboard.app), app),
|
|
6252
6266
|
$$fulfilled: true
|
|
6253
6267
|
});
|
|
6254
6268
|
}
|
|
@@ -8168,6 +8182,8 @@ class LocationContext {
|
|
|
8168
8182
|
} else {
|
|
8169
8183
|
mountRoutesResult.appBar.breadcrumb = [...mountRoutesResult.appBar.breadcrumb, ...breadcrumb.items];
|
|
8170
8184
|
}
|
|
8185
|
+
|
|
8186
|
+
if (hasOwnProperty(breadcrumb, "noCurrentApp")) mountRoutesResult.appBar.noCurrentApp = breadcrumb.noCurrentApp;
|
|
8171
8187
|
}
|
|
8172
8188
|
})();
|
|
8173
8189
|
}
|
|
@@ -9257,6 +9273,8 @@ class Router {
|
|
|
9257
9273
|
};
|
|
9258
9274
|
|
|
9259
9275
|
if (storyboard) {
|
|
9276
|
+
var _currentApp$breadcrum, _currentApp$breadcrum2;
|
|
9277
|
+
|
|
9260
9278
|
if (appChanged && currentApp.id && isLoggedIn()) {
|
|
9261
9279
|
var usedCustomApis = mapCustomApisToNameAndNamespace(scanCustomApisInStoryboard(storyboard));
|
|
9262
9280
|
|
|
@@ -9272,7 +9290,8 @@ class Router {
|
|
|
9272
9290
|
portal: [],
|
|
9273
9291
|
appBar: {
|
|
9274
9292
|
breadcrumb: [],
|
|
9275
|
-
documentId: null
|
|
9293
|
+
documentId: null,
|
|
9294
|
+
noCurrentApp: (_currentApp$breadcrum = (_currentApp$breadcrum2 = currentApp.breadcrumb) === null || _currentApp$breadcrum2 === void 0 ? void 0 : _currentApp$breadcrum2.noCurrentApp) !== null && _currentApp$breadcrum !== void 0 ? _currentApp$breadcrum : false
|
|
9276
9295
|
},
|
|
9277
9296
|
flags: {
|
|
9278
9297
|
redirect: undefined,
|