@backstage/plugin-catalog-backend 1.1.2-next.1 → 1.1.2-next.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/CHANGELOG.md +18 -0
- package/alpha/package.json +1 -1
- package/dist/index.cjs.js +13 -2
- package/dist/index.cjs.js.map +1 -1
- package/package.json +16 -16
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @backstage/plugin-catalog-backend
|
|
2
2
|
|
|
3
|
+
## 1.1.2-next.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 16a40ac4c0: Fix wrong return type of the `isGroupEntity` function.
|
|
8
|
+
- 2909746147: Updated parseEntityTransformParams to handle keys with '.' in them. This will allow for querying of entities based off annotations such as 'backstage.io/orgin-location' or other entity field keys that have '.' in them.
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
- @backstage/backend-common@0.13.3-next.2
|
|
11
|
+
- @backstage/plugin-scaffolder-common@1.1.0-next.0
|
|
12
|
+
- @backstage/config@1.0.1-next.0
|
|
13
|
+
- @backstage/plugin-search-common@0.3.4-next.0
|
|
14
|
+
- @backstage/catalog-model@1.0.2-next.0
|
|
15
|
+
- @backstage/integration@1.2.0-next.1
|
|
16
|
+
- @backstage/plugin-permission-common@0.6.1-next.0
|
|
17
|
+
- @backstage/plugin-permission-node@0.6.1-next.1
|
|
18
|
+
- @backstage/catalog-client@1.0.2-next.0
|
|
19
|
+
- @backstage/plugin-catalog-common@1.0.2-next.0
|
|
20
|
+
|
|
3
21
|
## 1.1.2-next.1
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
package/alpha/package.json
CHANGED
package/dist/index.cjs.js
CHANGED
|
@@ -2815,6 +2815,17 @@ function parseEntityPaginationParams(params) {
|
|
|
2815
2815
|
};
|
|
2816
2816
|
}
|
|
2817
2817
|
|
|
2818
|
+
function getPathArrayAndValue(input, field) {
|
|
2819
|
+
return field.split(".").reduce(([pathArray, inputSubset], pathPart, index, fieldParts) => {
|
|
2820
|
+
if (lodash__default["default"].hasIn(inputSubset, pathPart)) {
|
|
2821
|
+
return [pathArray.concat(pathPart), inputSubset[pathPart]];
|
|
2822
|
+
} else if (fieldParts[index + 1] !== void 0) {
|
|
2823
|
+
fieldParts[index + 1] = `${pathPart}.${fieldParts[index + 1]}`;
|
|
2824
|
+
return [pathArray, inputSubset];
|
|
2825
|
+
}
|
|
2826
|
+
return [pathArray, void 0];
|
|
2827
|
+
}, [[], input]);
|
|
2828
|
+
}
|
|
2818
2829
|
function parseEntityTransformParams(params) {
|
|
2819
2830
|
const fieldsStrings = parseStringsParam(params.fields, "fields");
|
|
2820
2831
|
if (!fieldsStrings) {
|
|
@@ -2830,9 +2841,9 @@ function parseEntityTransformParams(params) {
|
|
|
2830
2841
|
return (input) => {
|
|
2831
2842
|
const output = {};
|
|
2832
2843
|
for (const field of fields) {
|
|
2833
|
-
const value =
|
|
2844
|
+
const [pathArray, value] = getPathArrayAndValue(input, field);
|
|
2834
2845
|
if (value !== void 0) {
|
|
2835
|
-
lodash__default["default"].set(output,
|
|
2846
|
+
lodash__default["default"].set(output, pathArray, value);
|
|
2836
2847
|
}
|
|
2837
2848
|
}
|
|
2838
2849
|
return output;
|