« get me outta code hell

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:
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) {