"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getProcessEnvFromBackend = exports.exposeBackendCallbacks = void 0;
/*---------------------------------------------------------------------------------------------
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
const CallbackUtils_1 = require("@itwin/certa/lib/utils/CallbackUtils");
const getEnvCallbackName = "getEnv";
function exposeBackendCallbacks() {
    (0, CallbackUtils_1.registerBackendCallback)(getEnvCallbackName, () => {
        return JSON.stringify(process.env);
    });
}
exports.exposeBackendCallbacks = exposeBackendCallbacks;
async function getProcessEnvFromBackend() {
    return JSON.parse(await (0, CallbackUtils_1.executeBackendCallback)(getEnvCallbackName));
}
exports.getProcessEnvFromBackend = getProcessEnvFromBackend;
//# sourceMappingURL=SideChannels.js.map