@backstage/plugin-catalog-backend 1.25.2 → 1.25.3-next.1

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 CHANGED
@@ -1,23 +1,52 @@
1
1
  # @backstage/plugin-catalog-backend
2
2
 
3
- ## 1.25.2
3
+ ## 1.25.3-next.1
4
4
 
5
5
  ### Patch Changes
6
6
 
7
+ - 1882cfe: Moved `getEntities` ordering to utilize database instead of having it inside catalog client
8
+
9
+ Please note that the latest version of `@backstage/catalog-client` will not order the entities in the same way as before. This is because the ordering is now done in the database query instead of in the client. If you rely on the ordering of the entities, you may need to update your backend plugin or code to handle this change.
10
+
7
11
  - Updated dependencies
8
- - @backstage/backend-common@0.24.1
9
- - @backstage/plugin-events-node@0.3.10
10
- - @backstage/plugin-permission-node@0.8.2
11
- - @backstage/plugin-search-backend-module-catalog@0.2.1
12
- - @backstage/backend-plugin-api@0.8.1
13
- - @backstage/plugin-catalog-node@1.12.6
14
- - @backstage/backend-openapi-utils@0.1.17
12
+ - @backstage/backend-common@0.25.0-next.1
13
+ - @backstage/catalog-client@1.6.7-next.0
14
+ - @backstage/backend-openapi-utils@0.1.18-next.1
15
+ - @backstage/backend-plugin-api@0.9.0-next.1
16
+ - @backstage/catalog-model@1.6.0
17
+ - @backstage/config@1.2.0
18
+ - @backstage/errors@1.2.4
19
+ - @backstage/integration@1.14.0
20
+ - @backstage/types@1.1.1
21
+ - @backstage/plugin-catalog-common@1.0.26
22
+ - @backstage/plugin-catalog-node@1.12.7-next.1
23
+ - @backstage/plugin-events-node@0.4.0-next.1
24
+ - @backstage/plugin-permission-common@0.8.1
25
+ - @backstage/plugin-permission-node@0.8.3-next.1
26
+ - @backstage/plugin-search-backend-module-catalog@0.2.2-next.1
15
27
 
16
- ## 1.25.1
28
+ ## 1.25.3-next.0
17
29
 
18
30
  ### Patch Changes
19
31
 
20
- - 2fb4670: Fixed an issue with the by-query call, where ordering by a field that does not exist on all entities led to not all results being returned
32
+ - d425fc4: Modules, plugins, and services are now `BackendFeature`, not a function that returns a feature.
33
+ - 53cce86: Fixed an issue with the by-query call, where ordering by a field that does not exist on all entities led to not all results being returned
34
+ - Updated dependencies
35
+ - @backstage/backend-plugin-api@0.9.0-next.0
36
+ - @backstage/plugin-search-backend-module-catalog@0.2.2-next.0
37
+ - @backstage/plugin-permission-node@0.8.3-next.0
38
+ - @backstage/backend-common@0.25.0-next.0
39
+ - @backstage/plugin-events-node@0.4.0-next.0
40
+ - @backstage/backend-openapi-utils@0.1.18-next.0
41
+ - @backstage/plugin-catalog-node@1.12.7-next.0
42
+ - @backstage/catalog-client@1.6.6
43
+ - @backstage/catalog-model@1.6.0
44
+ - @backstage/config@1.2.0
45
+ - @backstage/errors@1.2.4
46
+ - @backstage/integration@1.14.0
47
+ - @backstage/types@1.1.1
48
+ - @backstage/plugin-catalog-common@1.0.26
49
+ - @backstage/plugin-permission-common@0.8.1
21
50
 
22
51
  ## 1.25.0
23
52
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-catalog-backend__alpha",
3
- "version": "1.25.2",
3
+ "version": "1.25.3-next.1",
4
4
  "main": "../dist/alpha.cjs.js",
5
5
  "types": "../dist/alpha.d.ts"
6
6
  }
package/dist/alpha.cjs.js CHANGED
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var alpha = require('@backstage/plugin-catalog-common/alpha');
6
6
  var pluginPermissionNode = require('@backstage/plugin-permission-node');
7
- var CatalogBuilder = require('./cjs/CatalogBuilder-C7ANIkk3.cjs.js');
7
+ var CatalogBuilder = require('./cjs/CatalogBuilder-BQ7aDMTH.cjs.js');
8
8
  var backendPluginApi = require('@backstage/backend-plugin-api');
9
9
  var pluginEventsNode = require('@backstage/plugin-events-node');
10
10
  var alpha$1 = require('@backstage/plugin-catalog-node/alpha');
package/dist/alpha.d.ts CHANGED
@@ -121,6 +121,6 @@ declare const permissionRules: {
121
121
  * Catalog plugin
122
122
  * @alpha
123
123
  */
124
- declare const catalogPlugin: _backstage_backend_plugin_api.BackendFeatureCompat;
124
+ declare const catalogPlugin: _backstage_backend_plugin_api.BackendFeature;
125
125
 
126
126
  export { type CatalogPermissionRule, catalogConditions, createCatalogConditionalDecision, createCatalogPermissionRule, catalogPlugin as default, permissionRules };
@@ -2407,7 +2407,15 @@ class DefaultEntitiesCatalog {
2407
2407
  ]);
2408
2408
  }
2409
2409
  });
2410
- entitiesQuery = entitiesQuery.orderBy("final_entities.entity_id", "asc");
2410
+ if (!request?.order) {
2411
+ entitiesQuery = entitiesQuery.leftOuterJoin(
2412
+ "refresh_state",
2413
+ "refresh_state.entity_id",
2414
+ "final_entities.entity_id"
2415
+ ).orderBy("refresh_state.entity_ref", "asc");
2416
+ } else {
2417
+ entitiesQuery.orderBy("final_entities.entity_id", "asc");
2418
+ }
2411
2419
  const { limit, offset } = parsePagination(request?.pagination);
2412
2420
  if (limit !== void 0) {
2413
2421
  entitiesQuery = entitiesQuery.limit(limit + 1);
@@ -7288,4 +7296,4 @@ exports.createCatalogPermissionRule = createCatalogPermissionRule;
7288
7296
  exports.createRandomProcessingInterval = createRandomProcessingInterval;
7289
7297
  exports.parseEntityYaml = parseEntityYaml;
7290
7298
  exports.permissionRules = permissionRules;
7291
- //# sourceMappingURL=CatalogBuilder-C7ANIkk3.cjs.js.map
7299
+ //# sourceMappingURL=CatalogBuilder-BQ7aDMTH.cjs.js.map