@backstage/plugin-catalog-backend 1.20.0 → 1.21.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 CHANGED
@@ -1,5 +1,54 @@
1
1
  # @backstage/plugin-catalog-backend
2
2
 
3
+ ## 1.21.1-next.0
4
+
5
+ ### Patch Changes
6
+
7
+ - cfdc5e7: Fixes an issue where `/analyze-location` would incorrectly throw a 500 error on an invalid url.
8
+ - Updated dependencies
9
+ - @backstage/backend-common@0.21.7-next.0
10
+ - @backstage/integration@1.10.0-next.0
11
+ - @backstage/backend-openapi-utils@0.1.10-next.0
12
+ - @backstage/backend-plugin-api@0.6.17-next.0
13
+ - @backstage/backend-tasks@0.5.22-next.0
14
+ - @backstage/catalog-client@1.6.3
15
+ - @backstage/catalog-model@1.4.5
16
+ - @backstage/config@1.2.0
17
+ - @backstage/errors@1.2.4
18
+ - @backstage/types@1.1.1
19
+ - @backstage/plugin-catalog-common@1.0.22
20
+ - @backstage/plugin-catalog-node@1.11.1-next.0
21
+ - @backstage/plugin-events-node@0.3.3-next.0
22
+ - @backstage/plugin-permission-common@0.7.13
23
+ - @backstage/plugin-permission-node@0.7.28-next.0
24
+ - @backstage/plugin-search-backend-module-catalog@0.1.22-next.0
25
+
26
+ ## 1.21.0
27
+
28
+ ### Minor Changes
29
+
30
+ - f3e2e86: Added the ability to inject custom permissions from modules, on `CatalogBuilder` and `CatalogPermissionExtensionPoint`
31
+
32
+ ### Patch Changes
33
+
34
+ - Updated dependencies
35
+ - @backstage/plugin-catalog-node@1.11.0
36
+ - @backstage/catalog-client@1.6.3
37
+ - @backstage/backend-common@0.21.6
38
+ - @backstage/plugin-search-backend-module-catalog@0.1.21
39
+ - @backstage/backend-plugin-api@0.6.16
40
+ - @backstage/plugin-permission-node@0.7.27
41
+ - @backstage/backend-tasks@0.5.21
42
+ - @backstage/plugin-events-node@0.3.2
43
+ - @backstage/backend-openapi-utils@0.1.9
44
+ - @backstage/catalog-model@1.4.5
45
+ - @backstage/config@1.2.0
46
+ - @backstage/errors@1.2.4
47
+ - @backstage/integration@1.9.1
48
+ - @backstage/types@1.1.1
49
+ - @backstage/plugin-catalog-common@1.0.22
50
+ - @backstage/plugin-permission-common@0.7.13
51
+
3
52
  ## 1.20.0
4
53
 
5
54
  ### Minor Changes
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-catalog-backend",
3
- "version": "1.20.0",
3
+ "version": "1.21.1-next.0",
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-B30bgu7A.cjs.js');
7
+ var CatalogBuilder = require('./cjs/CatalogBuilder-CXmEUcDJ.cjs.js');
8
8
  var backendPluginApi = require('@backstage/backend-plugin-api');
9
9
  var alpha$1 = require('@backstage/plugin-catalog-node/alpha');
10
10
  var backendCommon = require('@backstage/backend-common');
@@ -5423,7 +5423,7 @@ const spec = {
5423
5423
  "400": {
5424
5424
  description: "Validation errors.",
5425
5425
  content: {
5426
- "application/json; charset=utf-8": {
5426
+ "application/json": {
5427
5427
  schema: {
5428
5428
  type: "object",
5429
5429
  properties: {
@@ -5690,8 +5690,19 @@ async function createRouter(options) {
5690
5690
  location: locationInput,
5691
5691
  catalogFilename: zod.z.string().optional()
5692
5692
  });
5693
- const output = await locationAnalyzer.analyzeLocation(schema.parse(body));
5694
- res.status(200).json(output);
5693
+ const parsedBody = schema.parse(body);
5694
+ try {
5695
+ const output = await locationAnalyzer.analyzeLocation(parsedBody);
5696
+ res.status(200).json(output);
5697
+ } catch (err) {
5698
+ if (
5699
+ // Catch errors from parse-url library.
5700
+ err.name === "Error" && "subject_url" in err
5701
+ ) {
5702
+ throw new errors.InputError("The given location.target is not a URL");
5703
+ }
5704
+ throw err;
5705
+ }
5695
5706
  });
5696
5707
  }
5697
5708
  if (orchestrator) {
@@ -7372,4 +7383,4 @@ exports.createCatalogPermissionRule = createCatalogPermissionRule;
7372
7383
  exports.createRandomProcessingInterval = createRandomProcessingInterval;
7373
7384
  exports.parseEntityYaml = parseEntityYaml;
7374
7385
  exports.permissionRules = permissionRules;
7375
- //# sourceMappingURL=CatalogBuilder-B30bgu7A.cjs.js.map
7386
+ //# sourceMappingURL=CatalogBuilder-CXmEUcDJ.cjs.js.map