@backstage/plugin-catalog-backend 1.25.3-next.0 → 1.26.0-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 +51 -0
- package/alpha/package.json +1 -1
- package/dist/alpha.cjs.js +1 -1
- package/dist/cjs/{CatalogBuilder-C7ANIkk3.cjs.js → CatalogBuilder-DeLH-BIi.cjs.js} +17 -2
- package/dist/cjs/CatalogBuilder-DeLH-BIi.cjs.js.map +1 -0
- package/dist/index.cjs.js +1 -1
- package/package.json +15 -15
- package/dist/cjs/CatalogBuilder-C7ANIkk3.cjs.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,56 @@
|
|
|
1
1
|
# @backstage/plugin-catalog-backend
|
|
2
2
|
|
|
3
|
+
## 1.26.0-next.2
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 78475c3: Allow offset mode paging in entity list provider
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- c2b63ab: Updated dependency `supertest` to `^7.0.0`.
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
- @backstage/backend-common@0.25.0-next.2
|
|
14
|
+
- @backstage/backend-plugin-api@1.0.0-next.2
|
|
15
|
+
- @backstage/catalog-client@1.7.0-next.1
|
|
16
|
+
- @backstage/integration@1.15.0-next.0
|
|
17
|
+
- @backstage/backend-openapi-utils@0.1.18-next.2
|
|
18
|
+
- @backstage/plugin-permission-node@0.8.3-next.2
|
|
19
|
+
- @backstage/catalog-model@1.6.0
|
|
20
|
+
- @backstage/config@1.2.0
|
|
21
|
+
- @backstage/errors@1.2.4
|
|
22
|
+
- @backstage/types@1.1.1
|
|
23
|
+
- @backstage/plugin-catalog-common@1.0.26
|
|
24
|
+
- @backstage/plugin-catalog-node@1.12.7-next.2
|
|
25
|
+
- @backstage/plugin-events-node@0.4.0-next.2
|
|
26
|
+
- @backstage/plugin-permission-common@0.8.1
|
|
27
|
+
- @backstage/plugin-search-backend-module-catalog@0.2.2-next.2
|
|
28
|
+
|
|
29
|
+
## 1.25.3-next.1
|
|
30
|
+
|
|
31
|
+
### Patch Changes
|
|
32
|
+
|
|
33
|
+
- 1882cfe: Moved `getEntities` ordering to utilize database instead of having it inside catalog client
|
|
34
|
+
|
|
35
|
+
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.
|
|
36
|
+
|
|
37
|
+
- Updated dependencies
|
|
38
|
+
- @backstage/backend-common@0.25.0-next.1
|
|
39
|
+
- @backstage/catalog-client@1.6.7-next.0
|
|
40
|
+
- @backstage/backend-openapi-utils@0.1.18-next.1
|
|
41
|
+
- @backstage/backend-plugin-api@0.9.0-next.1
|
|
42
|
+
- @backstage/catalog-model@1.6.0
|
|
43
|
+
- @backstage/config@1.2.0
|
|
44
|
+
- @backstage/errors@1.2.4
|
|
45
|
+
- @backstage/integration@1.14.0
|
|
46
|
+
- @backstage/types@1.1.1
|
|
47
|
+
- @backstage/plugin-catalog-common@1.0.26
|
|
48
|
+
- @backstage/plugin-catalog-node@1.12.7-next.1
|
|
49
|
+
- @backstage/plugin-events-node@0.4.0-next.1
|
|
50
|
+
- @backstage/plugin-permission-common@0.8.1
|
|
51
|
+
- @backstage/plugin-permission-node@0.8.3-next.1
|
|
52
|
+
- @backstage/plugin-search-backend-module-catalog@0.2.2-next.1
|
|
53
|
+
|
|
3
54
|
## 1.25.3-next.0
|
|
4
55
|
|
|
5
56
|
### Patch Changes
|
package/alpha/package.json
CHANGED
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-
|
|
7
|
+
var CatalogBuilder = require('./cjs/CatalogBuilder-DeLH-BIi.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');
|
|
@@ -2407,7 +2407,15 @@ class DefaultEntitiesCatalog {
|
|
|
2407
2407
|
]);
|
|
2408
2408
|
}
|
|
2409
2409
|
});
|
|
2410
|
-
|
|
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);
|
|
@@ -2571,6 +2579,9 @@ class DefaultEntitiesCatalog {
|
|
|
2571
2579
|
}
|
|
2572
2580
|
]);
|
|
2573
2581
|
}
|
|
2582
|
+
if (isQueryEntitiesInitialRequest(request) && request.offset !== void 0) {
|
|
2583
|
+
dbQuery.offset(request.offset);
|
|
2584
|
+
}
|
|
2574
2585
|
dbQuery.limit(isFetchingBackwards ? limit : limit + 1);
|
|
2575
2586
|
countQuery.count("final_entities.entity_id", { as: "count" });
|
|
2576
2587
|
const [rows, [{ count }]] = await Promise.all([
|
|
@@ -4978,6 +4989,9 @@ const spec = {
|
|
|
4978
4989
|
{
|
|
4979
4990
|
$ref: "#/components/parameters/limit"
|
|
4980
4991
|
},
|
|
4992
|
+
{
|
|
4993
|
+
$ref: "#/components/parameters/offset"
|
|
4994
|
+
},
|
|
4981
4995
|
{
|
|
4982
4996
|
$ref: "#/components/parameters/orderField"
|
|
4983
4997
|
},
|
|
@@ -5508,6 +5522,7 @@ async function createRouter(options) {
|
|
|
5508
5522
|
}).get("/entities/by-query", async (req, res) => {
|
|
5509
5523
|
const { items, pageInfo, totalItems } = await entitiesCatalog.queryEntities({
|
|
5510
5524
|
limit: req.query.limit,
|
|
5525
|
+
offset: req.query.offset,
|
|
5511
5526
|
...parseQueryEntitiesParams(req.query),
|
|
5512
5527
|
credentials: await httpAuth.credentials(req)
|
|
5513
5528
|
});
|
|
@@ -7288,4 +7303,4 @@ exports.createCatalogPermissionRule = createCatalogPermissionRule;
|
|
|
7288
7303
|
exports.createRandomProcessingInterval = createRandomProcessingInterval;
|
|
7289
7304
|
exports.parseEntityYaml = parseEntityYaml;
|
|
7290
7305
|
exports.permissionRules = permissionRules;
|
|
7291
|
-
//# sourceMappingURL=CatalogBuilder-
|
|
7306
|
+
//# sourceMappingURL=CatalogBuilder-DeLH-BIi.cjs.js.map
|