"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getSpcsToken = getSpcsToken;
const fs_1 = __importDefault(require("fs"));
const logger_1 = __importDefault(require("../logger"));
function getSpcsToken() {
    if (!process.env['SNOWFLAKE_RUNNING_INSIDE_SPCS']) {
        return null;
    }
    try {
        return fs_1.default.readFileSync('/snowflake/session/spcs_token', 'utf-8').trim();
    }
    catch (err) {
        (0, logger_1.default)().warn(`Failed to read SPCS token: ${err}`);
        return null;
    }
}
//# sourceMappingURL=spcs_token.js.map