« get me outta code hell

write, upd8: factor out universalUtilities - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/upd8.js
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2024-09-12 14:26:45 -0300
committer(quasar) nebula <qznebula@protonmail.com>2024-09-12 14:26:45 -0300
commit8974bd704466188d46e3985e7e94c0ca993524e4 (patch)
treee44a22cf2b20d0dc85e94481f53c39c018e3e5f6 /src/upd8.js
parentb485117d885f723fb81a8e573050747393c004cf (diff)
write, upd8: factor out universalUtilities
Diffstat (limited to 'src/upd8.js')
-rwxr-xr-xsrc/upd8.js30
1 files changed, 19 insertions, 11 deletions
diff --git a/src/upd8.js b/src/upd8.js
index 9e4ef4fb..609a758d 100755
--- a/src/upd8.js
+++ b/src/upd8.js
@@ -2382,29 +2382,37 @@ async function main() {
   logInfo`Passing control over to build mode: ${selectedBuildModeFlag}`;
   console.log('');
 
+  const universalUtilities = {
+    getSizeOfAdditionalFile,
+    getSizeOfImagePath,
+
+    defaultLanguage: finalDefaultLanguage,
+    developersComment,
+    languages,
+    missingImagePaths,
+    thumbsCache,
+    urlSpec,
+    urls,
+    wikiData,
+  };
+
   try {
     buildModeResult = await selectedBuildMode.go({
       cliOptions,
+      queueSize,
+
+      universalUtilities,
+      ...universalUtilities,
+
       dataPath,
       mediaPath,
       mediaCachePath,
       wikiCachePath,
-      queueSize,
       srcRootPath: __dirname,
 
-      defaultLanguage: finalDefaultLanguage,
-      languages,
-      missingImagePaths,
-      thumbsCache,
-      urls,
-      urlSpec,
       webRoutes: preparedWebRoutes,
-      wikiData,
 
       closeLanguageWatchers,
-      developersComment,
-      getSizeOfAdditionalFile,
-      getSizeOfImagePath,
       niceShowAggregate,
     });
   } catch (error) {