@backstage/plugin-catalog-backend 1.8.0-next.1 → 1.8.0
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 +66 -0
- package/README.md +1 -1
- package/alpha/package.json +1 -1
- package/dist/index.cjs.js +16 -14
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +121 -35
- package/package.json +18 -18
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,71 @@
|
|
|
1
1
|
# @backstage/plugin-catalog-backend
|
|
2
2
|
|
|
3
|
+
## 1.8.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 7f4ea3d3602: Add /entities/by-query endpoint returning paginated entities.
|
|
8
|
+
|
|
9
|
+
The endpoint supports cursor base pagination and server side sorting of the entities
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- e675f902980: Add deprecations for symbols that were moved to `@backstage/plugin-catalog-node` a long time ago:
|
|
14
|
+
|
|
15
|
+
- `CatalogProcessor`
|
|
16
|
+
- `CatalogProcessorCache`
|
|
17
|
+
- `CatalogProcessorEmit`
|
|
18
|
+
- `CatalogProcessorEntityResult`
|
|
19
|
+
- `CatalogProcessorErrorResult`
|
|
20
|
+
- `CatalogProcessorLocationResult`
|
|
21
|
+
- `CatalogProcessorParser`
|
|
22
|
+
- `CatalogProcessorRefreshKeysResult`
|
|
23
|
+
- `CatalogProcessorRelationResult`
|
|
24
|
+
- `CatalogProcessorResult`
|
|
25
|
+
- `DeferredEntity`
|
|
26
|
+
- `EntityProvider`
|
|
27
|
+
- `EntityProviderConnection`
|
|
28
|
+
- `EntityProviderMutation`
|
|
29
|
+
- `EntityRelationSpec`
|
|
30
|
+
- `processingResult`
|
|
31
|
+
|
|
32
|
+
Also moved over and deprecated the following symbols:
|
|
33
|
+
|
|
34
|
+
- `locationSpecToLocationEntity`
|
|
35
|
+
- `locationSpecToMetadataName`
|
|
36
|
+
|
|
37
|
+
- ac8929f2f31: Fix export of `defaultCatalogCollatorEntityTransformer`.
|
|
38
|
+
- 928a12a9b3e: Internal refactor of `/alpha` exports.
|
|
39
|
+
- 52b0022dab7: Updated dependency `msw` to `^1.0.0`.
|
|
40
|
+
- f093ce83d58: Fix a bug where the batch fetch by ref endpoint did not work in conjunction with filtering (e.g. if authorization was enabled).
|
|
41
|
+
- Updated dependencies
|
|
42
|
+
- @backstage/catalog-client@1.4.0
|
|
43
|
+
- @backstage/plugin-permission-node@0.7.6
|
|
44
|
+
- @backstage/backend-common@0.18.3
|
|
45
|
+
- @backstage/errors@1.1.5
|
|
46
|
+
- @backstage/plugin-catalog-node@1.3.4
|
|
47
|
+
- @backstage/backend-plugin-api@0.5.0
|
|
48
|
+
- @backstage/catalog-model@1.2.1
|
|
49
|
+
- @backstage/plugin-catalog-common@1.0.12
|
|
50
|
+
- @backstage/integration@1.4.3
|
|
51
|
+
- @backstage/plugin-permission-common@0.7.4
|
|
52
|
+
- @backstage/config@1.0.7
|
|
53
|
+
- @backstage/types@1.0.2
|
|
54
|
+
- @backstage/plugin-scaffolder-common@1.2.6
|
|
55
|
+
- @backstage/plugin-search-common@1.2.2
|
|
56
|
+
|
|
57
|
+
## 1.8.0-next.2
|
|
58
|
+
|
|
59
|
+
### Patch Changes
|
|
60
|
+
|
|
61
|
+
- Updated dependencies
|
|
62
|
+
- @backstage/backend-common@0.18.3-next.2
|
|
63
|
+
- @backstage/backend-plugin-api@0.4.1-next.2
|
|
64
|
+
- @backstage/plugin-permission-node@0.7.6-next.2
|
|
65
|
+
- @backstage/plugin-catalog-node@1.3.4-next.2
|
|
66
|
+
- @backstage/config@1.0.7-next.0
|
|
67
|
+
- @backstage/integration@1.4.3-next.0
|
|
68
|
+
|
|
3
69
|
## 1.8.0-next.1
|
|
4
70
|
|
|
5
71
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Catalog Backend
|
|
2
2
|
|
|
3
3
|
This is the backend for the default Backstage [software
|
|
4
|
-
catalog](http://backstage.io/docs/features/software-catalog/
|
|
4
|
+
catalog](http://backstage.io/docs/features/software-catalog/).
|
|
5
5
|
This provides an API for consumers such as the frontend [catalog
|
|
6
6
|
plugin](https://github.com/backstage/backstage/tree/master/plugins/catalog).
|
|
7
7
|
|
package/alpha/package.json
CHANGED
package/dist/index.cjs.js
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var pluginCatalogNode = require('@backstage/plugin-catalog-node');
|
|
6
5
|
var integration = require('@backstage/integration');
|
|
7
6
|
var errors = require('@backstage/errors');
|
|
8
7
|
require('core-js/features/promise');
|
|
@@ -11,6 +10,7 @@ var fp = require('lodash/fp');
|
|
|
11
10
|
var catalogModel = require('@backstage/catalog-model');
|
|
12
11
|
var lodash = require('lodash');
|
|
13
12
|
var parseGitUrl = require('git-url-parse');
|
|
13
|
+
var pluginCatalogNode = require('@backstage/plugin-catalog-node');
|
|
14
14
|
var fs = require('fs-extra');
|
|
15
15
|
var g = require('glob');
|
|
16
16
|
var path = require('path');
|
|
@@ -1032,11 +1032,11 @@ function isObject(value) {
|
|
|
1032
1032
|
const validateEntity = catalogModel.entitySchemaValidator();
|
|
1033
1033
|
const validateEntityEnvelope = catalogModel.entityEnvelopeSchemaValidator();
|
|
1034
1034
|
|
|
1035
|
-
function locationSpecToMetadataName(location) {
|
|
1035
|
+
function locationSpecToMetadataName$1(location) {
|
|
1036
1036
|
const hash = crypto.createHash("sha1").update(`${location.type}:${location.target}`).digest("hex");
|
|
1037
1037
|
return `generated-${hash}`;
|
|
1038
1038
|
}
|
|
1039
|
-
function locationSpecToLocationEntity(opts) {
|
|
1039
|
+
function locationSpecToLocationEntity$1(opts) {
|
|
1040
1040
|
var _a, _b;
|
|
1041
1041
|
const location = opts.location;
|
|
1042
1042
|
const parentEntity = opts.parentEntity;
|
|
@@ -1073,7 +1073,7 @@ function locationSpecToLocationEntity(opts) {
|
|
|
1073
1073
|
apiVersion: "backstage.io/v1alpha1",
|
|
1074
1074
|
kind: "Location",
|
|
1075
1075
|
metadata: {
|
|
1076
|
-
name: locationSpecToMetadataName(location),
|
|
1076
|
+
name: locationSpecToMetadataName$1(location),
|
|
1077
1077
|
annotations: {
|
|
1078
1078
|
[catalogModel.ANNOTATION_LOCATION]: ownLocation,
|
|
1079
1079
|
[catalogModel.ANNOTATION_ORIGIN_LOCATION]: originLocation
|
|
@@ -1122,7 +1122,7 @@ class ConfigLocationEntityProvider {
|
|
|
1122
1122
|
return locationConfigs.map((location) => {
|
|
1123
1123
|
const type = location.getString("type");
|
|
1124
1124
|
const target = location.getString("target");
|
|
1125
|
-
const entity = locationSpecToLocationEntity({
|
|
1125
|
+
const entity = locationSpecToLocationEntity$1({
|
|
1126
1126
|
location: {
|
|
1127
1127
|
type,
|
|
1128
1128
|
target: type === "file" ? path__default["default"].resolve(target) : target
|
|
@@ -1160,7 +1160,7 @@ class DefaultLocationStore {
|
|
|
1160
1160
|
await tx("locations").insert(inner);
|
|
1161
1161
|
return inner;
|
|
1162
1162
|
});
|
|
1163
|
-
const entity = locationSpecToLocationEntity({ location });
|
|
1163
|
+
const entity = locationSpecToLocationEntity$1({ location });
|
|
1164
1164
|
await this.connection.applyMutation({
|
|
1165
1165
|
type: "delta",
|
|
1166
1166
|
added: [{ entity, locationKey: getEntityLocationRef(entity) }],
|
|
@@ -1190,7 +1190,7 @@ class DefaultLocationStore {
|
|
|
1190
1190
|
await tx("locations").where({ id }).del();
|
|
1191
1191
|
return location;
|
|
1192
1192
|
});
|
|
1193
|
-
const entity = locationSpecToLocationEntity({ location: deleted });
|
|
1193
|
+
const entity = locationSpecToLocationEntity$1({ location: deleted });
|
|
1194
1194
|
await this.connection.applyMutation({
|
|
1195
1195
|
type: "delta",
|
|
1196
1196
|
added: [],
|
|
@@ -1207,7 +1207,7 @@ class DefaultLocationStore {
|
|
|
1207
1207
|
this._connection = connection;
|
|
1208
1208
|
const locations = await this.locations();
|
|
1209
1209
|
const entities = locations.map((location) => {
|
|
1210
|
-
const entity = locationSpecToLocationEntity({ location });
|
|
1210
|
+
const entity = locationSpecToLocationEntity$1({ location });
|
|
1211
1211
|
return { entity, locationKey: getEntityLocationRef(entity) };
|
|
1212
1212
|
});
|
|
1213
1213
|
await this.connection.applyMutation({
|
|
@@ -2078,7 +2078,7 @@ class DefaultLocationService {
|
|
|
2078
2078
|
apiVersion: "backstage.io/v1alpha1",
|
|
2079
2079
|
kind: "Location",
|
|
2080
2080
|
metadata: {
|
|
2081
|
-
name: locationSpecToMetadataName({
|
|
2081
|
+
name: locationSpecToMetadataName$1({
|
|
2082
2082
|
type: spec.type,
|
|
2083
2083
|
target: spec.target
|
|
2084
2084
|
}),
|
|
@@ -2704,7 +2704,7 @@ class ProcessorOutputCollector {
|
|
|
2704
2704
|
}
|
|
2705
2705
|
this.deferredEntities.push({ entity, locationKey: location });
|
|
2706
2706
|
} else if (i.type === "location") {
|
|
2707
|
-
const entity = locationSpecToLocationEntity({
|
|
2707
|
+
const entity = locationSpecToLocationEntity$1({
|
|
2708
2708
|
location: i.location,
|
|
2709
2709
|
parentEntity: this.parentEntity
|
|
2710
2710
|
});
|
|
@@ -5205,10 +5205,10 @@ class CatalogBuilder {
|
|
|
5205
5205
|
}
|
|
5206
5206
|
}
|
|
5207
5207
|
|
|
5208
|
-
|
|
5209
|
-
|
|
5210
|
-
|
|
5211
|
-
|
|
5208
|
+
const locationSpecToMetadataName = pluginCatalogNode.locationSpecToMetadataName;
|
|
5209
|
+
const locationSpecToLocationEntity = pluginCatalogNode.locationSpecToLocationEntity;
|
|
5210
|
+
const processingResult = pluginCatalogNode.processingResult;
|
|
5211
|
+
|
|
5212
5212
|
exports.AnnotateLocationEntityProcessor = AnnotateLocationEntityProcessor;
|
|
5213
5213
|
exports.AnnotateScmSlugEntityProcessor = AnnotateScmSlugEntityProcessor;
|
|
5214
5214
|
exports.BuiltinKindsEntityProcessor = BuiltinKindsEntityProcessor;
|
|
@@ -5223,5 +5223,7 @@ exports.UrlReaderProcessor = UrlReaderProcessor;
|
|
|
5223
5223
|
exports.createRandomProcessingInterval = createRandomProcessingInterval;
|
|
5224
5224
|
exports.defaultCatalogCollatorEntityTransformer = defaultCatalogCollatorEntityTransformer;
|
|
5225
5225
|
exports.locationSpecToLocationEntity = locationSpecToLocationEntity;
|
|
5226
|
+
exports.locationSpecToMetadataName = locationSpecToMetadataName;
|
|
5226
5227
|
exports.parseEntityYaml = parseEntityYaml;
|
|
5228
|
+
exports.processingResult = processingResult;
|
|
5227
5229
|
//# sourceMappingURL=index.cjs.js.map
|