@backstage/plugin-catalog-backend 1.5.0 → 1.5.1-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,5 +1,46 @@
1
1
  # @backstage/plugin-catalog-backend
2
2
 
3
+ ## 1.5.1-next.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+ - @backstage/backend-common@0.16.0-next.1
9
+ - @backstage/backend-plugin-api@0.1.4-next.1
10
+ - @backstage/plugin-catalog-node@1.2.1-next.1
11
+ - @backstage/plugin-permission-node@0.7.1-next.1
12
+ - @backstage/catalog-client@1.1.2-next.0
13
+ - @backstage/catalog-model@1.1.3-next.0
14
+ - @backstage/config@1.0.4-next.0
15
+ - @backstage/errors@1.1.3-next.0
16
+ - @backstage/integration@1.4.0-next.0
17
+ - @backstage/types@1.0.1-next.0
18
+ - @backstage/plugin-catalog-common@1.0.8-next.0
19
+ - @backstage/plugin-permission-common@0.7.1-next.0
20
+ - @backstage/plugin-scaffolder-common@1.2.2-next.0
21
+ - @backstage/plugin-search-common@1.1.1-next.0
22
+
23
+ ## 1.5.1-next.0
24
+
25
+ ### Patch Changes
26
+
27
+ - a7607b5413: Replace usage of deprecataed `UrlReader.read` with `UrlReader.readUrl`.
28
+ - Updated dependencies
29
+ - @backstage/backend-common@0.16.0-next.0
30
+ - @backstage/integration@1.4.0-next.0
31
+ - @backstage/catalog-model@1.1.3-next.0
32
+ - @backstage/plugin-permission-common@0.7.1-next.0
33
+ - @backstage/types@1.0.1-next.0
34
+ - @backstage/backend-plugin-api@0.1.4-next.0
35
+ - @backstage/plugin-catalog-node@1.2.1-next.0
36
+ - @backstage/plugin-permission-node@0.7.1-next.0
37
+ - @backstage/catalog-client@1.1.2-next.0
38
+ - @backstage/config@1.0.4-next.0
39
+ - @backstage/errors@1.1.3-next.0
40
+ - @backstage/plugin-catalog-common@1.0.8-next.0
41
+ - @backstage/plugin-scaffolder-common@1.2.2-next.0
42
+ - @backstage/plugin-search-common@1.1.1-next.0
43
+
3
44
  ## 1.5.0
4
45
 
5
46
  ### Minor Changes
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-catalog-backend",
3
- "version": "1.5.0",
3
+ "version": "1.5.1-next.1",
4
4
  "main": "../dist/index.cjs.js",
5
5
  "types": "../dist/index.alpha.d.ts"
6
6
  }
package/config.d.ts CHANGED
@@ -25,7 +25,7 @@ export interface Config {
25
25
  * An undefined list of matchers means match all, an empty list of
26
26
  * matchers means match none.
27
27
  *
28
- * This is commonly used to put in what amounts to a whitelist of kinds
28
+ * This is commonly used to put in what amounts to an allowlist of kinds
29
29
  * that regular users of Backstage are permitted to register locations
30
30
  * for. This can be used to stop them from registering yaml files
31
31
  * describing for example a Group entity called "admin" that they make
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
- if (reader.readUrl) {
106
- const data2 = await reader.readUrl(url);
107
- const buffer = await data2.buffer();
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
- if (this.options.reader.readUrl) {
616
- const response = await this.options.reader.readUrl(url);
617
- const buffer = await response.buffer();
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
- if (this.options.reader.readUrl) {
783
- const data2 = await this.options.reader.readUrl(location, { etag });
784
- return {
785
- response: [{ url: location, data: await data2.buffer() }],
786
- etag: data2.etag
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