mirror of
https://github.com/lucide-icons/lucide.git
synced 2025-12-17 00:07:40 +01:00
chore(scripts): Refactor scripts to typescript (#3316)
* Adjust typescript types * adjust types * fix types in all helper files * Fix types * Migrate js files to ts files * Refactor to TS files * Rename extentions * Adjust imports * Fix builds * Update lockfile * Fix last typescript migration * Fix entry path @lucide/outline-svg * Fix types * add checkout step * format files * Format files
This commit is contained in:
19
scripts/githubApi.mts
Normal file
19
scripts/githubApi.mts
Normal file
@@ -0,0 +1,19 @@
|
||||
const githubApi = async (endpoint: string) => {
|
||||
const headers = new Headers();
|
||||
const username = 'ericfennis';
|
||||
const password = process.env.GITHUB_API_KEY;
|
||||
|
||||
headers.set(
|
||||
'Authorization',
|
||||
`Basic ${Buffer.from(`${username}:${password}`).toString('base64')}`,
|
||||
);
|
||||
|
||||
const res = await fetch(endpoint, {
|
||||
method: 'GET',
|
||||
headers,
|
||||
});
|
||||
|
||||
return res.json();
|
||||
};
|
||||
|
||||
export default githubApi;
|
||||
Reference in New Issue
Block a user