@enterprise_search/indexing
Advanced tools
Comparing version 0.0.3 to 0.0.4
@@ -105,7 +105,15 @@ "use strict"; | ||
parentChildLogAndMetrics: (0, index_parent_child_1.defaultIndexParentChildLogAndMetrics)(metrics, index_parent_child_1.consoleIndexParentChildLogAndMetrics), | ||
fetch: (url, options) => { | ||
fetch: async (url, options) => { | ||
const u = new URL(url); | ||
const domainKey = 'fetch.' + u.hostname; | ||
metrics[domainKey] = metrics[domainKey] ? metrics[domainKey] + 1 : 1; | ||
return fetch(url, options); | ||
try { | ||
const result = await fetch(url, options); | ||
if (result.status >= 400) | ||
console.error(`loading ${url} failed with ${result.status} ${result.statusText}`); | ||
return result; | ||
} | ||
catch (e) { | ||
console.error(e); | ||
} | ||
} | ||
@@ -112,0 +120,0 @@ }; |
@@ -28,2 +28,3 @@ import { IndexTreeNonFunctionals } from "./indexing.non.functionals"; | ||
export type ExecuteIndexOptions = { | ||
debug?: boolean; | ||
dryRunJustShowTrees?: boolean; | ||
@@ -30,0 +31,0 @@ dryRunDoEverythingButIndex?: boolean; |
{ | ||
"name": "@enterprise_search/indexing", | ||
"description": "general code to help with indexing", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"main": "dist/index", | ||
@@ -26,4 +26,4 @@ "types": "dist/index", | ||
"@itsmworkbench/utils": "0.3.6", | ||
"@enterprise_search/indexconfig": "0.0.3", | ||
"@enterprise_search/kleislis": "0.0.3", | ||
"@enterprise_search/indexconfig": "0.0.4", | ||
"@enterprise_search/kleislis": "0.0.4", | ||
"debug": "^4.3.4" | ||
@@ -30,0 +30,0 @@ }, |
78689
1642
+ Added@enterprise_search/indexconfig@0.0.4(transitive)
+ Added@enterprise_search/kleislis@0.0.4(transitive)
- Removed@enterprise_search/indexconfig@0.0.3(transitive)
- Removed@enterprise_search/kleislis@0.0.3(transitive)