@zylc369/bw-gh-release-fetch 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +219 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +24601 -0
- package/dist/constants.d.ts +8 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/github-release.d.ts +40 -0
- package/dist/github-release.d.ts.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +22705 -0
- package/dist/types.d.ts +77 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/utils.d.ts +26 -0
- package/dist/utils.d.ts.map +1 -0
- package/package.json +56 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const PACKAGE_NAME = "bw-gh-release-fetch";
|
|
2
|
+
export declare const PACKAGE_VERSION = "0.1.1";
|
|
3
|
+
export declare const USER_AGENT = "gh-release-download";
|
|
4
|
+
export declare const REPO_URL = "https://github.com/zylc369/gh-release-download";
|
|
5
|
+
export declare const BUGS_URL = "https://github.com/zylc369/gh-release-download/issues";
|
|
6
|
+
export declare const HOMEPAGE_URL = "https://github.com/zylc369/gh-release-download#readme";
|
|
7
|
+
export declare const DESCRIPTION = "Fetch files from code hosting platforms with glob pattern support";
|
|
8
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,wBAAwB,CAAC;AAClD,eAAO,MAAM,eAAe,UAAU,CAAC;AACvC,eAAO,MAAM,UAAU,wBAAwB,CAAC;AAChD,eAAO,MAAM,QAAQ,mDAAmD,CAAC;AACzE,eAAO,MAAM,QAAQ,0DAA0D,CAAC;AAChF,eAAO,MAAM,YAAY,0DAA0D,CAAC;AACpF,eAAO,MAAM,WAAW,sEAAsE,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GitHub Release Downloader
|
|
3
|
+
*/
|
|
4
|
+
import { GitHubReleaseDownloaderConfig, ReleaseInfo, ReleaseAsset, DownloadResult, MatchedAsset } from './types.js';
|
|
5
|
+
export declare class GitHubReleaseDownloader {
|
|
6
|
+
private octokit;
|
|
7
|
+
private config;
|
|
8
|
+
constructor(config?: GitHubReleaseDownloaderConfig);
|
|
9
|
+
/**
|
|
10
|
+
* Get release information for a specific version or latest
|
|
11
|
+
*/
|
|
12
|
+
getRelease(owner: string, repo: string, version?: string): Promise<ReleaseInfo>;
|
|
13
|
+
/**
|
|
14
|
+
* Match assets against glob patterns
|
|
15
|
+
*/
|
|
16
|
+
matchAssets(assets: ReleaseAsset[], patterns: string | string[]): MatchedAsset[];
|
|
17
|
+
/**
|
|
18
|
+
* Download a single asset
|
|
19
|
+
*/
|
|
20
|
+
downloadAsset(asset: ReleaseAsset, outputDir: string, token?: string): Promise<DownloadResult>;
|
|
21
|
+
/**
|
|
22
|
+
* Main download function
|
|
23
|
+
*/
|
|
24
|
+
download(repoUrl: string, patterns: string | string[], options: {
|
|
25
|
+
outputDir: string;
|
|
26
|
+
version?: string;
|
|
27
|
+
token?: string;
|
|
28
|
+
onProgress?: (message: string) => void;
|
|
29
|
+
}): Promise<DownloadResult[]>;
|
|
30
|
+
private mapReleaseInfo;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Convenience function for quick downloads
|
|
34
|
+
*/
|
|
35
|
+
export declare function downloadFromGitHub(repoUrl: string, patterns: string | string[], options: {
|
|
36
|
+
outputDir: string;
|
|
37
|
+
version?: string;
|
|
38
|
+
token?: string;
|
|
39
|
+
}): Promise<DownloadResult[]>;
|
|
40
|
+
//# sourceMappingURL=github-release.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"github-release.d.ts","sourceRoot":"","sources":["../src/github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