@nalvietnam/avatar-cli 3.28.0 → 3.29.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/README.md +5 -0
- package/dist/core/index.cjs +1 -1
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.js +1 -1
- package/dist/core/index.js.map +1 -1
- package/dist/index.js +94 -93
- package/dist/index.js.map +1 -1
- package/dist/lib/git-remote-host.d.ts +14 -0
- package/package.json +1 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parse host từ HTTPS hoặc SSH git remote URL.
|
|
3
|
+
* Return null nếu URL không parse được (format lạ).
|
|
4
|
+
*
|
|
5
|
+
* Port (nếu có) GIỮ NGUYÊN trong host trả về — git credential helper match theo
|
|
6
|
+
* host[:port], strip port ở đây sẽ làm PAT lưu sai key. So sánh GitHub bỏ port
|
|
7
|
+
* là việc của isGithubHost().
|
|
8
|
+
*/
|
|
9
|
+
export declare function parseGitRemoteHost(url: string): string | null;
|
|
10
|
+
/**
|
|
11
|
+
* Kiểm tra host có phải GitHub không (chỉ github.com, case-insensitive).
|
|
12
|
+
* github.com / github.com:443 → true; gitlab.nal.vn, gitlab.com, bitbucket.org → false.
|
|
13
|
+
*/
|
|
14
|
+
export declare function isGithubHost(host: string | null): boolean;
|