« get me outta code hell

yaml: general quickLoadAllFromYAML update - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/data
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2024-02-16 18:07:40 -0400
committer(quasar) nebula <qznebula@protonmail.com>2024-02-17 17:09:19 -0400
commit18d696976a45143f1995019ea00eb538c399d62e (patch)
treeb01c89fb97b47f90555fe35ff05f861cc3190826 /src/data
parent08b7810729678e2c41c02fff569c322f15e76e07 (diff)
yaml: general quickLoadAllFromYAML update
Diffstat (limited to 'src/data')
-rw-r--r--src/data/yaml.js18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/data/yaml.js b/src/data/yaml.js
index 0f73bdf..f84f037 100644
--- a/src/data/yaml.js
+++ b/src/data/yaml.js
@@ -8,8 +8,6 @@ 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';
@@ -17,6 +15,12 @@ import Thing from '#thing';
 import thingConstructors from '#things';
 
 import {
+  filterReferenceErrors,
+  reportContentTextErrors,
+  reportDuplicateDirectories,
+} from '#data-checks';
+
+import {
   annotateErrorWithFile,
   decorateErrorWithIndex,
   decorateErrorWithAnnotation,
@@ -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;