@next-core/brick-utils 2.52.6 → 2.52.7
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 +7 -3
- package/dist/index.bundle.js.map +1 -1
- package/dist/index.esm.js +7 -3
- package/dist/index.esm.js.map +1 -1
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -20115,12 +20115,12 @@ var jsonFieldsInBrick = ["properties", "events", "lifeCycle", "params", "if", "t
|
|
|
20115
20115
|
var yamlFieldsInBrick = ["permissionsPreCheck", "transformFrom"];
|
|
20116
20116
|
|
|
20117
20117
|
// Fields started with `_` will be removed by default.
|
|
20118
|
-
var fieldsToRemoveInRoute = ["appId", "children", "creator", "ctime", "id", "graphInfo", "modifier", "mountPoint", "mtime", "org", "parent", "sort", "name", "providersBak", "providers_bak", "previewSettings", "screenshot", "lock", "deleteAuthorizers", "readAuthorizers", "updateAuthorizers"];
|
|
20118
|
+
var fieldsToRemoveInRoute = ["appId", "children", "creator", "ctime", "id", "graphInfo", "modifier", "mountPoint", "mtime", "org", "parent", "sort", "name", "providersBak", "providers_bak", "previewSettings", "screenshot", "lock", "urlQueryParams", "deleteAuthorizers", "readAuthorizers", "updateAuthorizers"];
|
|
20119
20119
|
var fieldsToRemoveInBrick = fieldsToRemoveInRoute.concat("type");
|
|
20120
20120
|
|
|
20121
20121
|
// Those fields can be disposed if value is null.
|
|
20122
20122
|
var disposableNullFields = ["alias", "documentId", "context", "exports", "ref", "analyticsData"];
|
|
20123
|
-
var disposableFalseOrNullFields = ["hybrid", "bg", "portal", "public", "exact"];
|
|
20123
|
+
var disposableFalseOrNullFields = ["hybrid", "bg", "portal", "public", "exact", "incrementalSubRoutes"];
|
|
20124
20124
|
function normalizeBuilderNode(node) {
|
|
20125
20125
|
if (isBrickNode(node)) {
|
|
20126
20126
|
return normalize(node, fieldsToRemoveInBrick, jsonFieldsInBrick, yamlFieldsInBrick, "brick");
|
|
@@ -20131,6 +20131,7 @@ function normalizeBuilderNode(node) {
|
|
|
20131
20131
|
return null;
|
|
20132
20132
|
}
|
|
20133
20133
|
function normalize(node, fieldsToRemove, jsonFields, yamlFields, type) {
|
|
20134
|
+
var temp;
|
|
20134
20135
|
return Object.fromEntries(Object.entries(node)
|
|
20135
20136
|
// Remove unused fields from CMDB.
|
|
20136
20137
|
// Consider fields started with `_` as unused.
|
|
@@ -20141,7 +20142,10 @@ function normalize(node, fieldsToRemove, jsonFields, yamlFields, type) {
|
|
|
20141
20142
|
// Parse specific fields.
|
|
20142
20143
|
.map(_ref2 => {
|
|
20143
20144
|
var [key, value] = _ref2;
|
|
20144
|
-
return [key === "instanceId" ? "iid" : key, type === "route" && key === "segues" ? getCleanSegues(value) : jsonFields.includes(key) ?
|
|
20145
|
+
return [key === "instanceId" ? "iid" : key, type === "route" && key === "segues" ? getCleanSegues(value) : jsonFields.includes(key) ? (temp = safeJsonParse(value),
|
|
20146
|
+
// There is a bug to cause json fields in route to be stored as `""` when it's empty.
|
|
20147
|
+
// These `""` can be safely ignored.
|
|
20148
|
+
temp === "" && type === "route" ? undefined : temp) : yamlFields.includes(key) ? safeYamlParse(value) : cloneDeep(value)];
|
|
20145
20149
|
}));
|
|
20146
20150
|
}
|
|
20147
20151
|
|