From 18d696976a45143f1995019ea00eb538c399d62e Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Fri, 16 Feb 2024 18:07:40 -0400 Subject: yaml: general quickLoadAllFromYAML update --- src/data/yaml.js | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'src/data') diff --git a/src/data/yaml.js b/src/data/yaml.js index 0f73bdfb..f84f0378 100644 --- a/src/data/yaml.js +++ b/src/data/yaml.js @@ -8,14 +8,18 @@ import {inspect as nodeInspect} from 'node:util'; import yaml from 'js-yaml'; import {colors, ENABLE_COLOR, logInfo, logWarn} from '#cli'; -import {reportDuplicateDirectories, filterReferenceErrors} - from '#data-checks'; import {sortByName} from '#sort'; import {atOffset, empty, filterProperties, typeAppearance, withEntries} from '#sugar'; import Thing from '#thing'; import thingConstructors from '#things'; +import { + filterReferenceErrors, + reportContentTextErrors, + reportDuplicateDirectories, +} from '#data-checks'; + import { annotateErrorWithFile, decorateErrorWithIndex, @@ -1033,7 +1037,7 @@ export async function quickLoadAllFromYAML(dataPath, { linkWikiDataArrays(wikiData); try { - reportDuplicateDirectories(wikiData, {getAllFindSpecs}).close(); + reportDuplicateDirectories(wikiData, {getAllFindSpecs}); logInfo`No duplicate directories found. (complete data)`; } catch (error) { showAggregate(error); @@ -1048,6 +1052,14 @@ export async function quickLoadAllFromYAML(dataPath, { logWarn`Reference errors found. (partial data)`; } + try { + reportContentTextErrors(wikiData, {bindFind}); + logInfo`No content text errors found.`; + } catch (error) { + showAggregate(error); + logWarn`Content text errors found.`; + } + sortWikiDataArrays(wikiData); return wikiData; -- cgit 1.3.0-6-gf8a5