@backstage/plugin-search-backend-node
Advanced tools
Comparing version 0.2.1 to 0.2.2
# @backstage/plugin-search-backend-node | ||
## 0.2.2 | ||
### Patch Changes | ||
- 9c8ea7e24: Handle errors in collators and decorators and log them. | ||
- 7e7cec86a: Fixed bug preventing searches with filter values containing `:` from returning results. | ||
## 0.2.1 | ||
@@ -4,0 +11,0 @@ |
@@ -48,6 +48,17 @@ 'use strict'; | ||
this.logger.debug(`Collating documents for ${type} via ${this.collators[type].collate.constructor.name}`); | ||
let documents = await this.collators[type].collate.execute(); | ||
let documents; | ||
try { | ||
documents = await this.collators[type].collate.execute(); | ||
} catch (e) { | ||
this.logger.error(`Collating documents for ${type} via ${this.collators[type].collate.constructor.name} failed: ${e}`); | ||
return; | ||
} | ||
for (let i = 0; i < decorators.length; i++) { | ||
this.logger.debug(`Decorating ${type} documents via ${decorators[i].constructor.name}`); | ||
documents = await decorators[i].execute(documents); | ||
try { | ||
documents = await decorators[i].execute(documents); | ||
} catch (e) { | ||
this.logger.error(`Decorating ${type} documents via ${decorators[i].constructor.name} failed: ${e}`); | ||
return; | ||
} | ||
} | ||
@@ -110,2 +121,5 @@ if (!documents || documents.length === 0) { | ||
if (["string", "number", "boolean"].includes(typeof value)) { | ||
if (typeof value === "string") { | ||
return ` +${field}:${value.replace(":", "\\:")}`; | ||
} | ||
return ` +${field}:${value}`; | ||
@@ -112,0 +126,0 @@ } |
{ | ||
"name": "@backstage/plugin-search-backend-node", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"main": "dist/index.cjs.js", | ||
@@ -29,3 +29,3 @@ "types": "dist/index.d.ts", | ||
"@backstage/backend-common": "^0.8.3", | ||
"@backstage/cli": "^0.7.1" | ||
"@backstage/cli": "^0.7.2" | ||
}, | ||
@@ -35,3 +35,3 @@ "files": [ | ||
], | ||
"gitHead": "daf29617d8c7cc7440e5d576265d7aaa98bd870f" | ||
"gitHead": "5c2550a6d4485e86d5ad9ecec82fb5fab74c6ca7" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
44255
320