"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.exposeBackendCallbacks = exposeBackendCallbacks;
exports.getProcessEnvFromBackend = getProcessEnvFromBackend;
/*---------------------------------------------------------------------------------------------
* 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);
    });
}
async function getProcessEnvFromBackend() {
    return JSON.parse(await (0, CallbackUtils_1.executeBackendCallback)(getEnvCallbackName));
}
//# sourceMappingURL=SideChannels.js.map