@kadi.build/file-sharing 1.1.1 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/FileSharingServer.js +7 -1
package/package.json
CHANGED
package/src/FileSharingServer.js
CHANGED
|
@@ -365,7 +365,13 @@ export class FileSharingServer extends EventEmitter {
|
|
|
365
365
|
}
|
|
366
366
|
|
|
367
367
|
const service = options.service || 'kadi'; // KĀDI is the default
|
|
368
|
-
|
|
368
|
+
|
|
369
|
+
// Allow caller to specify which port to tunnel via options.port.
|
|
370
|
+
// Default: when S3 is running, target the S3 port (where custom routes
|
|
371
|
+
// and middleware are installed via addCustomRoute/addMiddleware).
|
|
372
|
+
// Otherwise fall back to the HTTP file-server port.
|
|
373
|
+
const port = options.port
|
|
374
|
+
?? (this.s3Server?.isRunning ? this.s3Server.config.port : this.config.port);
|
|
369
375
|
|
|
370
376
|
// TunnelManager.createTunnel(port, options) — port is first arg (number),
|
|
371
377
|
// options.service tells it which provider to use.
|