npm package diff

Package: @forge/tunnel

Versions: 5.5.0-next.13 - 5.5.0-next.14

File: package/out/command/interactors/multi-compiler-watcher.js

Index: package/out/command/interactors/multi-compiler-watcher.js
===================================================================
--- package/out/command/interactors/multi-compiler-watcher.js
+++ package/out/command/interactors/multi-compiler-watcher.js
@@ -2,37 +2,25 @@
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.MultiCompilerWatcher = void 0;
 const cli_shared_1 = require("@forge/cli-shared");
 class MultiCompilerWatcher {
-    servers;
-    constructor(servers) {
-        this.servers = servers;
+    faasServer;
+    uiServers;
+    constructor(faasServer, uiServers) {
+        this.faasServer = faasServer;
+        this.uiServers = uiServers;
     }
+    allServers() {
+        return [this.faasServer, ...this.uiServers];
+    }
     async compileAndWatch({ onChange: { onBuildWillStart, onBuildFinished } }, tunnelOptions = cli_shared_1.defaultNoDebugTunnelOptions) {
-        const results = await Promise.all(this.servers.map((server) => server.compileAndWatch({
+        const [faasResult] = await Promise.all(this.allServers().map((server) => server.compileAndWatch({
             onBuildWillStart,
             onBuildFinished
         }, tunnelOptions)));
-        const multiResult = {
-            output: {}
-        };
-        for (const result of results) {
-            multiResult.output = {
-                ...multiResult.output,
-                ...result.output
-            };
-            multiResult.sourceMap = {
-                ...multiResult.sourceMap,
-                ...result.sourceMap
-            };
-            multiResult.metadata = {
-                ...multiResult.metadata,
-                ...result.metadata
-            };
-        }
-        return multiResult;
+        return faasResult;
     }
     async stop() {
-        await Promise.all(this.servers.map((server) => server.stop()));
+        await Promise.all(this.allServers().map((server) => server.stop()));
     }
 }
 exports.MultiCompilerWatcher = MultiCompilerWatcher;