@backstage/plugin-catalog-backend 0.17.1 → 0.17.2

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,19 @@
1
1
  # @backstage/plugin-catalog-backend
2
2
 
3
+ ## 0.17.2
4
+
5
+ ### Patch Changes
6
+
7
+ - b9ce1ce2c1: Allow custom LocationAnalyzer in NextCatalogBuilder
8
+ - 10615525f3: Switch to use the json and observable types from `@backstage/types`
9
+ - Updated dependencies
10
+ - @backstage/config@0.1.11
11
+ - @backstage/errors@0.1.4
12
+ - @backstage/integration@0.6.9
13
+ - @backstage/backend-common@0.9.8
14
+ - @backstage/catalog-model@0.9.6
15
+ - @backstage/search-common@0.2.1
16
+
3
17
  ## 0.17.1
4
18
 
5
19
  ### Patch Changes
package/dist/index.cjs.js CHANGED
@@ -4630,7 +4630,7 @@ class Stitcher {
4630
4630
  try {
4631
4631
  await this.stitchOne(entityRef);
4632
4632
  } catch (error) {
4633
- this.logger.error(`Failed to stitch ${entityRef}, ${error}`);
4633
+ this.logger.error(`Failed to stitch ${entityRef}, ${errors.stringifyError(error)}`);
4634
4634
  }
4635
4635
  }
4636
4636
  }
@@ -4767,6 +4767,7 @@ class NextCatalogBuilder {
4767
4767
  minSeconds: 100,
4768
4768
  maxSeconds: 150
4769
4769
  });
4770
+ this.locationAnalyzer = void 0;
4770
4771
  this.env = env;
4771
4772
  this.entityPolicies = [];
4772
4773
  this.entityPoliciesReplace = false;
@@ -4792,6 +4793,10 @@ class NextCatalogBuilder {
4792
4793
  this.refreshInterval = refreshInterval;
4793
4794
  return this;
4794
4795
  }
4796
+ setLocationAnalyzer(locationAnalyzer) {
4797
+ this.locationAnalyzer = locationAnalyzer;
4798
+ return this;
4799
+ }
4795
4800
  replaceEntityPolicies(policies) {
4796
4801
  this.entityPolicies = [...policies];
4797
4802
  this.entityPoliciesReplace = true;
@@ -4823,6 +4828,7 @@ class NextCatalogBuilder {
4823
4828
  return this;
4824
4829
  }
4825
4830
  async build() {
4831
+ var _a;
4826
4832
  const {config, database, logger} = this.env;
4827
4833
  const policy = this.buildEntityPolicy();
4828
4834
  const processors = this.buildProcessors();
@@ -4852,7 +4858,7 @@ class NextCatalogBuilder {
4852
4858
  const entityProviders = lodash__default['default'].uniqBy([...this.entityProviders, locationStore, configLocationProvider], (provider) => provider.getProviderName());
4853
4859
  const processingEngine = new DefaultCatalogProcessingEngine(logger, entityProviders, processingDatabase, orchestrator, stitcher, () => crypto.createHash("sha1"));
4854
4860
  const locationsCatalog = new DatabaseLocationsCatalog(db);
4855
- const locationAnalyzer = new RepoLocationAnalyzer(logger, integrations);
4861
+ const locationAnalyzer = (_a = this.locationAnalyzer) != null ? _a : new RepoLocationAnalyzer(logger, integrations);
4856
4862
  const locationService = new DefaultLocationService(locationStore, orchestrator);
4857
4863
  const refreshService = new DefaultRefreshService({
4858
4864
  database: processingDatabase