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/env.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.setEnvVarsForEmulators = void 0;
const constants_1 = require("./constants");
const types_1 = require("./types");
const functionsEmulatorShared_1 = require("./functionsEmulatorShared");
function setEnvVarsForEmulators(env, emulators) {
    for (const emu of emulators) {
        const host = (0, functionsEmulatorShared_1.formatHost)(emu);
        switch (emu.name) {
            case types_1.Emulators.FIRESTORE:
                env[constants_1.Constants.FIRESTORE_EMULATOR_HOST] = host;
                env[constants_1.Constants.FIRESTORE_EMULATOR_ENV_ALT] = host;
                break;
            case types_1.Emulators.DATABASE:
                env[constants_1.Constants.FIREBASE_DATABASE_EMULATOR_HOST] = host;
                break;
            case types_1.Emulators.STORAGE:
                env[constants_1.Constants.FIREBASE_STORAGE_EMULATOR_HOST] = host;
                env[constants_1.Constants.CLOUD_STORAGE_EMULATOR_HOST] = `http://${host}`;
                break;
            case types_1.Emulators.AUTH:
                env[constants_1.Constants.FIREBASE_AUTH_EMULATOR_HOST] = host;
                break;
            case types_1.Emulators.HUB:
                env[constants_1.Constants.FIREBASE_EMULATOR_HUB] = host;
                break;
            case types_1.Emulators.PUBSUB:
                env[constants_1.Constants.PUBSUB_EMULATOR_HOST] = host;
                break;
            case types_1.Emulators.EVENTARC:
                env[constants_1.Constants.CLOUD_EVENTARC_EMULATOR_HOST] = `http://${host}`;
                break;
            case types_1.Emulators.TASKS:
                env[constants_1.Constants.CLOUD_TASKS_EMULATOR_HOST] = host;
                break;
        }
    }
}
exports.setEnvVarsForEmulators = setEnvVarsForEmulators;