@next-core/brick-utils 2.51.1 → 2.51.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/dist/index.bundle.js
CHANGED
|
@@ -20031,11 +20031,12 @@
|
|
|
20031
20031
|
var yamlFieldsInBrick = ["permissionsPreCheck", "transformFrom"];
|
|
20032
20032
|
|
|
20033
20033
|
// Fields started with `_` will be removed by default.
|
|
20034
|
-
var fieldsToRemoveInRoute = ["appId", "children", "creator", "ctime", "id", "graphInfo", "modifier", "mountPoint", "mtime", "org", "parent", "sort", "name", "providersBak", "providers_bak", "previewSettings", "screenshot", "deleteAuthorizers", "readAuthorizers", "updateAuthorizers"];
|
|
20034
|
+
var fieldsToRemoveInRoute = ["appId", "children", "creator", "ctime", "id", "graphInfo", "modifier", "mountPoint", "mtime", "org", "parent", "sort", "name", "providersBak", "providers_bak", "previewSettings", "screenshot", "lock", "deleteAuthorizers", "readAuthorizers", "updateAuthorizers"];
|
|
20035
20035
|
var fieldsToRemoveInBrick = fieldsToRemoveInRoute.concat("type", "alias");
|
|
20036
20036
|
|
|
20037
20037
|
// Those fields can be disposed if value is null.
|
|
20038
|
-
var disposableNullFields = ["alias", "documentId", "
|
|
20038
|
+
var disposableNullFields = ["alias", "documentId", "context", "exports", "ref", "analyticsData"];
|
|
20039
|
+
var disposableFalseOrNullFields = ["hybrid", "bg", "portal", "public", "exact"];
|
|
20039
20040
|
function normalizeBuilderNode(node) {
|
|
20040
20041
|
if (isBrickNode(node)) {
|
|
20041
20042
|
return normalize(node, fieldsToRemoveInBrick, jsonFieldsInBrick, yamlFieldsInBrick, "brick");
|
|
@@ -20051,7 +20052,7 @@
|
|
|
20051
20052
|
// Consider fields started with `_` as unused.
|
|
20052
20053
|
.filter(_ref => {
|
|
20053
20054
|
var [key, value] = _ref;
|
|
20054
|
-
return !(key[0] === "_" || fieldsToRemove.includes(key) || value === null && disposableNullFields.includes(key));
|
|
20055
|
+
return !(key[0] === "_" || fieldsToRemove.includes(key) || (value === false || value === null) && disposableFalseOrNullFields.includes(key) || value === null && disposableNullFields.includes(key) || value === true && key === "injectDeep");
|
|
20055
20056
|
})
|
|
20056
20057
|
// Parse specific fields.
|
|
20057
20058
|
.map(_ref2 => {
|
|
@@ -20365,7 +20366,7 @@
|
|
|
20365
20366
|
}
|
|
20366
20367
|
function computeConstantCondition(ifContainer) {
|
|
20367
20368
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
20368
|
-
if (hasOwnProperty$1(ifContainer, "if")) {
|
|
20369
|
+
if (hasOwnProperty$1(ifContainer, "if") && ifContainer.if !== undefined) {
|
|
20369
20370
|
if (typeof ifContainer.if === "string" && isEvaluable(ifContainer.if)) {
|
|
20370
20371
|
try {
|
|
20371
20372
|
var {
|