@simonyea/holysheep-cli 2.1.67 → 2.1.68

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.
@@ -4135,7 +4135,7 @@ var require_package = __commonJS({
4135
4135
  "package.json"(exports2, module2) {
4136
4136
  module2.exports = {
4137
4137
  name: "@simonyea/holysheep-cli",
4138
- version: "2.1.67",
4138
+ version: "2.1.68",
4139
4139
  description: "Claude Code/Cursor/Cline API relay for China \u2014 \xA51=$1, WeChat/Alipay payment, no credit card, no VPN. One command setup for all AI coding tools.",
4140
4140
  scripts: {
4141
4141
  build: "node scripts/build.mjs",
package/dist/index.js CHANGED
@@ -12,7 +12,7 @@ var require_package = __commonJS({
12
12
  "package.json"(exports2, module2) {
13
13
  module2.exports = {
14
14
  name: "@simonyea/holysheep-cli",
15
- version: "2.1.67",
15
+ version: "2.1.68",
16
16
  description: "Claude Code/Cursor/Cline API relay for China \u2014 \xA51=$1, WeChat/Alipay payment, no credit card, no VPN. One command setup for all AI coding tools.",
17
17
  scripts: {
18
18
  build: "node scripts/build.mjs",
@@ -7107,7 +7107,7 @@ var require_claude_proxy = __commonJS({
7107
7107
  var path = require("path");
7108
7108
  var os = require("os");
7109
7109
  var http2 = require("http");
7110
- var { spawn, execSync } = require("child_process");
7110
+ var { spawn, execSync, execFileSync } = require("child_process");
7111
7111
  var chalk2 = require("chalk");
7112
7112
  var {
7113
7113
  startProcessProxy,
@@ -7136,6 +7136,7 @@ var require_claude_proxy = __commonJS({
7136
7136
  ];
7137
7137
  var platformOverride = null;
7138
7138
  var winUserEnvWriterOverride = null;
7139
+ var execFileSyncOverride = null;
7139
7140
  function effectivePlatform() {
7140
7141
  return platformOverride || process.env.HS_CLAUDE_PROXY_TEST_PLATFORM || process.platform;
7141
7142
  }
@@ -7260,6 +7261,25 @@ ${logTail}` : message);
7260
7261
  return `'${String(value).replace(/'/g, "''")}'`;
7261
7262
  }
7262
7263
  __name(quotePowerShellString, "quotePowerShellString");
7264
+ function tailText(value, max = 1200) {
7265
+ const text = String(value || "").trim();
7266
+ return text.length > max ? text.slice(-max) : text;
7267
+ }
7268
+ __name(tailText, "tailText");
7269
+ function runPowerShellUserEnvScript(script) {
7270
+ const runner = execFileSyncOverride || execFileSync;
7271
+ try {
7272
+ runner("powershell.exe", ["-NoProfile", "-ExecutionPolicy", "Bypass", "-Command", script], {
7273
+ encoding: "utf8",
7274
+ windowsHide: true
7275
+ });
7276
+ } catch (err) {
7277
+ const stderr = tailText((err == null ? void 0 : err.stderr) || (err == null ? void 0 : err.stdout) || (err == null ? void 0 : err.message) || err);
7278
+ const code = err && (err.status ?? err.code ?? err.signal ?? "unknown");
7279
+ throw new Error(`Windows \u7528\u6237\u7EA7\u73AF\u5883\u53D8\u91CF\u5199\u5165\u5931\u8D25 (powershell exit=${code}): ${stderr || "no stderr"}`);
7280
+ }
7281
+ }
7282
+ __name(runPowerShellUserEnvScript, "runPowerShellUserEnvScript");
7263
7283
  function defaultWinUserEnvWriter(action, key, value) {
7264
7284
  if (process.env.HS_CLAUDE_PROXY_TEST_WIN_ENV_FILE) {
7265
7285
  const file = process.env.HS_CLAUDE_PROXY_TEST_WIN_ENV_FILE;
@@ -7277,7 +7297,7 @@ ${logTail}` : message);
7277
7297
  if (effectivePlatform() !== "win32") return;
7278
7298
  if (!/^[A-Z0-9_]+$/i.test(String(key))) throw new Error(`Invalid env var name: ${key}`);
7279
7299
  const ps = action === "delete" ? `[Environment]::SetEnvironmentVariable(${quotePowerShellString(key)}, $null, 'User')` : `[Environment]::SetEnvironmentVariable(${quotePowerShellString(key)}, ${quotePowerShellString(value || "")}, 'User')`;
7280
- execSync(`powershell.exe -NoProfile -ExecutionPolicy Bypass -Command ${quotePowerShellString(ps)}`, { stdio: "ignore", windowsHide: true });
7300
+ runPowerShellUserEnvScript(ps);
7281
7301
  }
7282
7302
  __name(defaultWinUserEnvWriter, "defaultWinUserEnvWriter");
7283
7303
  function getWinUserEnvWriter() {
@@ -7530,6 +7550,9 @@ ${logTail}` : message);
7530
7550
  },
7531
7551
  setWinUserEnvWriterForTest(writer) {
7532
7552
  winUserEnvWriterOverride = writer || null;
7553
+ },
7554
+ setExecFileSyncForTest(runner) {
7555
+ execFileSyncOverride = runner || null;
7533
7556
  }
7534
7557
  };
7535
7558
  module2.exports = claudeProxy;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simonyea/holysheep-cli",
3
- "version": "2.1.67",
3
+ "version": "2.1.68",
4
4
  "description": "Claude Code/Cursor/Cline API relay for China — ¥1=$1, WeChat/Alipay payment, no credit card, no VPN. One command setup for all AI coding tools.",
5
5
  "scripts": {
6
6
  "build": "node scripts/build.mjs",