skills-cn 1.5.0 → 1.5.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.
Files changed (2) hide show
  1. package/dist/cli.mjs +9 -5
  2. package/package.json +1 -1
package/dist/cli.mjs CHANGED
@@ -19,13 +19,13 @@ import { createHash } from "crypto";
19
19
  var import_picocolors = /* @__PURE__ */ __toESM(require_picocolors(), 1);
20
20
  const AGENTS_DIR$2 = ".agents";
21
21
  const SKILLS_SUBDIR = "skills";
22
- const GITHUB_PROXY_BASE = process.env.GITHUB_PROXY_URL || "https://kkgithub.com";
23
- const GITHUB_RAW_PROXY = process.env.GITHUB_RAW_PROXY_URL || "https://gh-proxy.org";
24
- const GITHUB_API_PROXY = process.env.GITHUB_API_PROXY_URL || "https://gh-proxy.org";
22
+ const GITHUB_PROXY_BASE = process.env.GITHUB_PROXY_URL || "https://v6.gh-proxy.org";
23
+ const GITHUB_RAW_PROXY = process.env.GITHUB_RAW_PROXY_URL || "https://v6.gh-proxy.org";
24
+ const GITHUB_API_PROXY = process.env.GITHUB_API_PROXY_URL || "https://v6.gh-proxy.org";
25
25
  function toProxyUrl(url) {
26
+ if (url.startsWith("https://github.com/")) return `${GITHUB_PROXY_BASE}/https://github.com/` + url.slice(19);
26
27
  if (url.startsWith("https://raw.githubusercontent.com/")) return `${GITHUB_RAW_PROXY}/https://raw.githubusercontent.com/` + url.slice(26);
27
28
  if (url.startsWith("https://api.github.com/")) return `${GITHUB_API_PROXY}/https://api.github.com/` + url.slice(20);
28
- if (url.startsWith("https://github.com/")) return url.replace("https://github.com/", `${GITHUB_PROXY_BASE}/`);
29
29
  return url;
30
30
  }
31
31
  function getOwnerRepo(parsed) {
@@ -40,6 +40,10 @@ function getOwnerRepo(parsed) {
40
40
  if (!parsed.url.startsWith("http://") && !parsed.url.startsWith("https://")) return null;
41
41
  try {
42
42
  let path = new URL(parsed.url).pathname.slice(1);
43
+ if (/^https:\//i.test(path)) {
44
+ const proxyMatch = path.match(/^\/?https:\/\/[^\/]+\/(.+?)(?:\.git)?$/);
45
+ if (proxyMatch) path = proxyMatch[1];
46
+ }
43
47
  path = path.replace(/\.git$/, "");
44
48
  if (path.includes("/")) return path;
45
49
  } catch {}
@@ -2173,7 +2177,7 @@ async function tryBlobInstall(ownerRepo, options = {}) {
2173
2177
  tree
2174
2178
  };
2175
2179
  }
2176
- var version$1 = "1.5.0";
2180
+ var version$1 = "1.5.1";
2177
2181
  const isCancelled$1 = (value) => typeof value === "symbol";
2178
2182
  async function isSourcePrivate(source) {
2179
2183
  const ownerRepo = parseOwnerRepo(source);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skills-cn",
3
- "version": "1.5.0",
3
+ "version": "1.5.1",
4
4
  "description": "The open agent skills ecosystem - 中国大陆 GitHub 加速版(使用 kkgithub.com 和 gh-proxy.org 代理)",
5
5
  "type": "module",
6
6
  "bin": {