@yixinkj/cli 1.0.6 → 1.0.7

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/index.js +14 -0
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -234,8 +234,21 @@ function chmodExecutables(target) {
234
234
  }
235
235
  }
236
236
 
237
+ function clearMacQuarantine() {
238
+ if (process.platform !== 'darwin' || !fs.existsSync(BIN_DIR)) {
239
+ return;
240
+ }
241
+ const result = spawnSync('xattr', ['-dr', 'com.apple.quarantine', BIN_DIR], {
242
+ encoding: 'utf8'
243
+ });
244
+ if (result.error && result.error.code !== 'ENOENT') {
245
+ console.error(`[yixin] macOS 安全隔离标记清理失败:${result.error.message}`);
246
+ }
247
+ }
248
+
237
249
  async function ensureInstalled(target) {
238
250
  if (isInstalled(target)) {
251
+ clearMacQuarantine();
239
252
  chmodExecutables(target);
240
253
  return;
241
254
  }
@@ -249,6 +262,7 @@ async function ensureInstalled(target) {
249
262
  console.error(`[yixin] 正在下载 ${url}`);
250
263
  await downloadFile(url, archivePath);
251
264
  extractArchive(archivePath, target);
265
+ clearMacQuarantine();
252
266
  chmodExecutables(target);
253
267
 
254
268
  for (const name of target.binaries) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yixinkj/cli",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "description": "Yixin local MCP server and CLI launcher for MCP clients.",
5
5
  "type": "module",
6
6
  "bin": {