"use strict";
/* Socket Lib - Built with rolldown */
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const require_runtime = require('../_virtual/_rolldown/runtime.js');
let node_process = require("node:process");
node_process = require_runtime.__toESM(node_process);

//#region src/releases/github-auth.ts
/**
* @file GitHub API authentication header helpers.
*/
/**
* Get GitHub authentication headers if token is available. Checks GH_TOKEN or
* GITHUB_TOKEN environment variables.
*
* @example
*   ;```typescript
*   const headers = getAuthHeaders()
*   // { Accept: 'application/vnd.github+json', Authorization: 'Bearer ...' }
*   ```
*
* @returns Headers object with Authorization header if token exists.
*/
function getAuthHeaders() {
	const token = node_process.default.env["GH_TOKEN"] || node_process.default.env["GITHUB_TOKEN"];
	const headers = {
		Accept: "application/vnd.github+json",
		"X-GitHub-Api-Version": "2022-11-28"
	};
	if (token) headers["Authorization"] = `Bearer ${token}`;
	return headers;
}

//#endregion
exports.getAuthHeaders = getAuthHeaders;