GOOD SHELL MAS BOY
Server: Apache/2.4.52 (Ubuntu)
System: Linux vmi1836763.contaboserver.net 5.15.0-130-generic #140-Ubuntu SMP Wed Dec 18 17:59:53 UTC 2024 x86_64
User: www-data (33)
PHP: 8.4.10
Disabled: NONE
Upload Files
File: //usr/local/lib/node_modules/firebase-tools/lib/emulator/hostingEmulator.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.HostingEmulator = void 0;
const serveHosting = require("../serve/hosting");
const types_1 = require("../emulator/types");
const constants_1 = require("./constants");
class HostingEmulator {
    constructor(args) {
        this.args = args;
    }
    async start() {
        this.args.options.host = this.args.host;
        this.args.options.port = this.args.port;
        const { ports } = await serveHosting.start(this.args.options);
        this.args.port = ports[0];
        if (ports.length > 1) {
            this.reservedPorts = ports.slice(1);
        }
    }
    connect() {
        return Promise.resolve();
    }
    stop() {
        return serveHosting.stop();
    }
    getInfo() {
        const host = this.args.host || constants_1.Constants.getDefaultHost();
        const port = this.args.port || constants_1.Constants.getDefaultPort(types_1.Emulators.HOSTING);
        return {
            name: this.getName(),
            host,
            port,
            reservedPorts: this.reservedPorts,
        };
    }
    getName() {
        return types_1.Emulators.HOSTING;
    }
}
exports.HostingEmulator = HostingEmulator;