@backstage/plugin-catalog-backend 1.12.2 → 1.12.4

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,17 @@
1
1
  # @backstage/plugin-catalog-backend
2
2
 
3
+ ## 1.12.4
4
+
5
+ ### Patch Changes
6
+
7
+ - cec43bb2428a: Fixed validation of the `fullTextFilterFields` query parameter.
8
+
9
+ ## 1.12.3
10
+
11
+ ### Patch Changes
12
+
13
+ - b0dbcb3eed4e: Fix issue with `catalogFileName` not being a required property for `/analyze-location`
14
+
3
15
  ## 1.12.2
4
16
 
5
17
  ### Patch Changes
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-catalog-backend",
3
- "version": "1.12.2",
3
+ "version": "1.12.4",
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-e49a97e1.cjs.js');
7
+ var CatalogBuilder = require('./cjs/CatalogBuilder-f6d92180.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');
@@ -3374,15 +3374,6 @@ function basicEntityFilter(items) {
3374
3374
  return { anyOf: [{ allOf: Object.values(filtersByKey) }] };
3375
3375
  }
3376
3376
 
3377
- function parseStringParam(param, ctx) {
3378
- if (param === void 0) {
3379
- return void 0;
3380
- }
3381
- if (typeof param !== "string") {
3382
- throw new errors.InputError(`Invalid ${ctx}, not a string`);
3383
- }
3384
- return param;
3385
- }
3386
3377
  function parseStringsParam(param, ctx) {
3387
3378
  if (param === void 0) {
3388
3379
  return void 0;
@@ -3489,22 +3480,10 @@ function isOrder(order) {
3489
3480
  return ["asc", "desc"].includes(order);
3490
3481
  }
3491
3482
 
3492
- function parseFullTextFilterFields(params) {
3493
- const fullTextFilterFields = parseStringParam(
3494
- params.fullTextFilterFields,
3495
- "fullTextFilterFields"
3496
- );
3497
- if (!fullTextFilterFields) {
3498
- return void 0;
3499
- }
3500
- return fullTextFilterFields.split(",");
3501
- }
3502
-
3503
3483
  function parseQueryEntitiesParams(params) {
3504
3484
  const fields = parseEntityTransformParams(params);
3505
- const cursor = parseStringParam(params.cursor, "cursor");
3506
- if (cursor) {
3507
- const decodedCursor = decodeCursor(cursor);
3485
+ if (params.cursor) {
3486
+ const decodedCursor = decodeCursor(params.cursor);
3508
3487
  const response2 = {
3509
3488
  cursor: decodedCursor,
3510
3489
  fields
@@ -3512,19 +3491,14 @@ function parseQueryEntitiesParams(params) {
3512
3491
  return response2;
3513
3492
  }
3514
3493
  const filter = parseEntityFilterParams(params);
3515
- const fullTextFilterTerm = parseStringParam(
3516
- params.fullTextFilterTerm,
3517
- "fullTextFilterTerm"
3518
- );
3519
- const fullTextFilterFields = parseFullTextFilterFields(params);
3520
3494
  const orderFields = parseEntityOrderFieldParams(params);
3521
3495
  const response = {
3522
3496
  fields,
3523
3497
  filter,
3524
3498
  orderFields,
3525
3499
  fullTextFilter: {
3526
- term: fullTextFilterTerm || "",
3527
- fields: fullTextFilterFields
3500
+ term: params.fullTextFilterTerm || "",
3501
+ fields: params.fullTextFilterFields
3528
3502
  }
3529
3503
  };
3530
3504
  return response;
@@ -4808,7 +4782,7 @@ const spec = {
4808
4782
  $ref: "#/components/schemas/LocationInput"
4809
4783
  }
4810
4784
  },
4811
- required: ["catalogFileName", "location"]
4785
+ required: ["location"]
4812
4786
  }
4813
4787
  }
4814
4788
  }
@@ -6658,4 +6632,4 @@ exports.createCatalogPermissionRule = createCatalogPermissionRule;
6658
6632
  exports.createRandomProcessingInterval = createRandomProcessingInterval;
6659
6633
  exports.parseEntityYaml = parseEntityYaml;
6660
6634
  exports.permissionRules = permissionRules;
6661
- //# sourceMappingURL=CatalogBuilder-e49a97e1.cjs.js.map
6635
+ //# sourceMappingURL=CatalogBuilder-f6d92180.cjs.js.map