@backstage/plugin-catalog-backend 1.5.0-next.2 → 1.5.1-next.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 +59 -0
- package/alpha/package.json +1 -1
- package/dist/index.cjs.js +11 -22
- package/dist/index.cjs.js.map +1 -1
- package/package.json +19 -19
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,64 @@
|
|
|
1
1
|
# @backstage/plugin-catalog-backend
|
|
2
2
|
|
|
3
|
+
## 1.5.1-next.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- a7607b5413: Replace usage of deprecataed `UrlReader.read` with `UrlReader.readUrl`.
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @backstage/backend-common@0.16.0-next.0
|
|
10
|
+
- @backstage/integration@1.4.0-next.0
|
|
11
|
+
- @backstage/catalog-model@1.1.3-next.0
|
|
12
|
+
- @backstage/plugin-permission-common@0.7.1-next.0
|
|
13
|
+
- @backstage/types@1.0.1-next.0
|
|
14
|
+
- @backstage/backend-plugin-api@0.1.4-next.0
|
|
15
|
+
- @backstage/plugin-catalog-node@1.2.1-next.0
|
|
16
|
+
- @backstage/plugin-permission-node@0.7.1-next.0
|
|
17
|
+
- @backstage/catalog-client@1.1.2-next.0
|
|
18
|
+
- @backstage/config@1.0.4-next.0
|
|
19
|
+
- @backstage/errors@1.1.3-next.0
|
|
20
|
+
- @backstage/plugin-catalog-common@1.0.8-next.0
|
|
21
|
+
- @backstage/plugin-scaffolder-common@1.2.2-next.0
|
|
22
|
+
- @backstage/plugin-search-common@1.1.1-next.0
|
|
23
|
+
|
|
24
|
+
## 1.5.0
|
|
25
|
+
|
|
26
|
+
### Minor Changes
|
|
27
|
+
|
|
28
|
+
- b2e6cb6acf: Added a new method `addLocationAnalyzers` to the `CatalogBuilder`. With this you can add location analyzers to your catalog. These analyzers will be used by the /analyze-location endpoint to decide if the provided URL contains any catalog-info.yaml files already or not.
|
|
29
|
+
|
|
30
|
+
Moved the following types from this package to `@backstage/plugin-catalog-backend`.
|
|
31
|
+
|
|
32
|
+
- AnalyzeLocationResponse
|
|
33
|
+
- AnalyzeLocationRequest
|
|
34
|
+
- AnalyzeLocationExistingEntity
|
|
35
|
+
- AnalyzeLocationGenerateEntity
|
|
36
|
+
- AnalyzeLocationEntityField
|
|
37
|
+
|
|
38
|
+
- eb25f7e12d: The exported permission rules and the API of `createCatalogConditionalDecision` have changed to reflect the breaking changes made to the `PermissionRule` type. Note that all involved types are exported from `@backstage/plugin-catalog-backend/alpha`
|
|
39
|
+
|
|
40
|
+
### Patch Changes
|
|
41
|
+
|
|
42
|
+
- 8cb6e10105: Fixed a bug where entities provided without a location key would always replace existing entities, rather than updating them.
|
|
43
|
+
- 2d3a5f09ab: Use `response.json` rather than `response.send` where appropriate, as outlined in `SECURITY.md`
|
|
44
|
+
- 63296ebcd4: Allow Placeholder value to be any value, not only string.
|
|
45
|
+
- 74022e0163: Make sure to stitch entities correctly after deletion, to ensure that their relations are updated.
|
|
46
|
+
- Updated dependencies
|
|
47
|
+
- @backstage/plugin-catalog-node@1.2.0
|
|
48
|
+
- @backstage/catalog-model@1.1.2
|
|
49
|
+
- @backstage/backend-common@0.15.2
|
|
50
|
+
- @backstage/plugin-catalog-common@1.0.7
|
|
51
|
+
- @backstage/plugin-permission-node@0.7.0
|
|
52
|
+
- @backstage/backend-plugin-api@0.1.3
|
|
53
|
+
- @backstage/plugin-permission-common@0.7.0
|
|
54
|
+
- @backstage/catalog-client@1.1.1
|
|
55
|
+
- @backstage/plugin-search-common@1.1.0
|
|
56
|
+
- @backstage/plugin-scaffolder-common@1.2.1
|
|
57
|
+
- @backstage/config@1.0.3
|
|
58
|
+
- @backstage/errors@1.1.2
|
|
59
|
+
- @backstage/integration@1.3.2
|
|
60
|
+
- @backstage/types@1.0.0
|
|
61
|
+
|
|
3
62
|
## 1.5.0-next.2
|
|
4
63
|
|
|
5
64
|
### Minor Changes
|
package/alpha/package.json
CHANGED
package/dist/index.cjs.js
CHANGED
|
@@ -102,13 +102,9 @@ const scmCodeOwnersPaths = {
|
|
|
102
102
|
async function readCodeOwners(reader, sourceUrl, codeownersPaths) {
|
|
103
103
|
const readOwnerLocation = async (path) => {
|
|
104
104
|
const url = `${sourceUrl}${path}`;
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
return buffer.toString();
|
|
109
|
-
}
|
|
110
|
-
const data = await reader.read(url);
|
|
111
|
-
return data.toString();
|
|
105
|
+
const data = await reader.readUrl(url);
|
|
106
|
+
const buffer = await data.buffer();
|
|
107
|
+
return buffer.toString();
|
|
112
108
|
};
|
|
113
109
|
const candidates = codeownersPaths.map(readOwnerLocation);
|
|
114
110
|
return Promise.any(candidates).catch((aggregateError) => {
|
|
@@ -612,12 +608,9 @@ class PlaceholderProcessor {
|
|
|
612
608
|
return [data, false];
|
|
613
609
|
}
|
|
614
610
|
const read = async (url) => {
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
return buffer;
|
|
619
|
-
}
|
|
620
|
-
return this.options.reader.read(url);
|
|
611
|
+
const response = await this.options.reader.readUrl(url);
|
|
612
|
+
const buffer = await response.buffer();
|
|
613
|
+
return buffer;
|
|
621
614
|
};
|
|
622
615
|
const resolveUrl = (url, base) => this.options.integrations.resolveUrl({
|
|
623
616
|
url,
|
|
@@ -779,15 +772,11 @@ class UrlReaderProcessor {
|
|
|
779
772
|
}));
|
|
780
773
|
return { response: await Promise.all(output), etag: response.etag };
|
|
781
774
|
}
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
};
|
|
788
|
-
}
|
|
789
|
-
const data = await this.options.reader.read(location);
|
|
790
|
-
return { response: [{ url: location, data }] };
|
|
775
|
+
const data = await this.options.reader.readUrl(location, { etag });
|
|
776
|
+
return {
|
|
777
|
+
response: [{ url: location, data: await data.buffer() }],
|
|
778
|
+
etag: data.etag
|
|
779
|
+
};
|
|
791
780
|
}
|
|
792
781
|
}
|
|
793
782
|
|