@begit/core
Advanced tools
Comparing version 0.0.18 to 0.0.19
@@ -32,4 +32,8 @@ import { join, dirname } from 'path'; | ||
var fetchLatestCommit = async (owner, repo) => { | ||
const auth = process.env["BEGIT_GH_API_KEY"]; | ||
const res = await fetch( | ||
`https://api.github.com/repos/${owner}/${repo}/commits?per_page=1` | ||
`https://api.github.com/repos/${owner}/${repo}/commits?per_page=1`, | ||
auth ? { | ||
headers: { "Authorization": `Bearer ${auth}` } | ||
} : void 0 | ||
); | ||
@@ -104,3 +108,3 @@ const json = await res.json(); | ||
export { downloadAndExtract, downloadRepo, downloadToFile, extractFile }; | ||
//# sourceMappingURL=out.js.map | ||
//# sourceMappingURL=index.js.map | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@begit/core", | ||
"version": "0.0.18", | ||
"version": "0.0.19", | ||
"description": "Blazingly fast tool for cloning git repositories, with no reliance on local `git`, or `tar` installs", | ||
@@ -30,7 +30,7 @@ "author": "Thomas Beer", | ||
"devDependencies": { | ||
"@types/node": "^20.14.10", | ||
"@types/node": "^20.14.11", | ||
"@types/tar": "^6.1.13", | ||
"tsup": "^8.1.0", | ||
"tsup": "^8.1.2", | ||
"typescript": "^5.5.3", | ||
"vitest": "^2.0.2" | ||
"vitest": "^2.0.3" | ||
}, | ||
@@ -37,0 +37,0 @@ "dependencies": { |
@@ -18,3 +18,3 @@ export type Repository = { | ||
export declare const extractFile: (tarPath: string, dest: string, subdir?: string | null, overwrite?: boolean) => Promise<void>; | ||
export type Options = { | ||
export type DownloadAndExtractOptions = { | ||
cache: boolean; | ||
@@ -26,3 +26,3 @@ }; | ||
cwd?: string; | ||
opts?: Options; | ||
opts?: DownloadAndExtractOptions; | ||
}; | ||
@@ -29,0 +29,0 @@ /** |
Sorry, the diff of this file is not supported yet
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
17025
154
4