@ai-setting/roy-agent-cli 1.7.6 → 1.7.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.
@@ -9461,7 +9461,7 @@ class CliQuietModeService {
9461
9461
  // package.json
9462
9462
  var package_default = {
9463
9463
  name: "@ai-setting/roy-agent-cli",
9464
- version: "1.7.6",
9464
+ version: "1.7.7",
9465
9465
  type: "module",
9466
9466
  description: "CLI for roy-agent - Non-interactive command execution",
9467
9467
  main: "./dist/index.js",
@@ -25478,7 +25478,7 @@ var LspCommand = {
25478
25478
 
25479
25479
  // src/commands/install/index.ts
25480
25480
  import { spawnSync } from "node:child_process";
25481
- import { existsSync as existsSync4, readFileSync as readFileSync3, writeFileSync, mkdirSync, cpSync } from "node:fs";
25481
+ import { existsSync as existsSync4, readFileSync as readFileSync3, writeFileSync, mkdirSync } from "node:fs";
25482
25482
  import { join as join5, resolve } from "node:path";
25483
25483
  import { homedir as homedir4 } from "node:os";
25484
25484
  function getConfigDir(scope) {
@@ -25539,11 +25539,11 @@ function readPackageInfo(packageName) {
25539
25539
  join5(process.cwd(), "node_modules", bareName, "package.json"),
25540
25540
  resolve(process.cwd(), "..", "node_modules", bareName, "package.json"),
25541
25541
  join5(process.cwd(), ".roy", "plugins", bareName, "package.json"),
25542
- join5(homedir4(), ".roy-agent", "node_modules", bareName, "package.json"),
25543
25542
  ...(() => {
25544
25543
  const globalRoot = getNpmGlobalRoot();
25545
25544
  return globalRoot ? [join5(globalRoot, bareName, "package.json")] : [];
25546
- })()
25545
+ })(),
25546
+ join5(homedir4(), ".roy-agent", "node_modules", bareName, "package.json")
25547
25547
  ];
25548
25548
  for (const pkgPath of searchPaths) {
25549
25549
  try {
@@ -25673,19 +25673,6 @@ var InstallPackageCommand = {
25673
25673
  console.log(`
25674
25674
  \uD83D\uDCE6 Installing plugin: ${packageName} (global)
25675
25675
  `);
25676
- let resolvedGlobalName;
25677
- if (packageName.startsWith("/") || packageName.startsWith(".")) {
25678
- const info2 = readPackageInfo(packageName);
25679
- if (!info2) {
25680
- console.error(`
25681
- ❌ Could not read package info from '${packageName}'.
25682
- `);
25683
- process.exit(1);
25684
- }
25685
- resolvedGlobalName = info2.name;
25686
- } else {
25687
- resolvedGlobalName = stripVersionSpec(packageName);
25688
- }
25689
25676
  const result = spawnSync("npm", ["install", "-g", packageName], {
25690
25677
  stdio: "inherit",
25691
25678
  shell: false
@@ -25696,18 +25683,6 @@ var InstallPackageCommand = {
25696
25683
  `);
25697
25684
  process.exit(1);
25698
25685
  }
25699
- const globalNm = join5(homedir4(), ".roy-agent", "node_modules", resolvedGlobalName);
25700
- if (!existsSync4(globalNm)) {
25701
- mkdirSync(join5(homedir4(), ".roy-agent", "node_modules"), { recursive: true });
25702
- const rootResult = spawnSync("npm", ["root", "-g"], { stdio: "pipe", shell: false });
25703
- const globalRoot = rootResult.stdout?.toString().trim();
25704
- if (globalRoot) {
25705
- const globalInstalled = join5(globalRoot, resolvedGlobalName);
25706
- if (existsSync4(globalInstalled)) {
25707
- cpSync(globalInstalled, globalNm, { recursive: true });
25708
- }
25709
- }
25710
- }
25711
25686
  }
25712
25687
  const info = readPackageInfo(packageName);
25713
25688
  if (!info) {
package/dist/index.js CHANGED
@@ -9460,7 +9460,7 @@ class CliQuietModeService {
9460
9460
  // package.json
9461
9461
  var package_default = {
9462
9462
  name: "@ai-setting/roy-agent-cli",
9463
- version: "1.7.6",
9463
+ version: "1.7.7",
9464
9464
  type: "module",
9465
9465
  description: "CLI for roy-agent - Non-interactive command execution",
9466
9466
  main: "./dist/index.js",
@@ -25477,7 +25477,7 @@ var LspCommand = {
25477
25477
 
25478
25478
  // src/commands/install/index.ts
25479
25479
  import { spawnSync } from "node:child_process";
25480
- import { existsSync as existsSync4, readFileSync as readFileSync3, writeFileSync, mkdirSync, cpSync } from "node:fs";
25480
+ import { existsSync as existsSync4, readFileSync as readFileSync3, writeFileSync, mkdirSync } from "node:fs";
25481
25481
  import { join as join5, resolve } from "node:path";
25482
25482
  import { homedir as homedir4 } from "node:os";
25483
25483
  function getConfigDir(scope) {
@@ -25538,11 +25538,11 @@ function readPackageInfo(packageName) {
25538
25538
  join5(process.cwd(), "node_modules", bareName, "package.json"),
25539
25539
  resolve(process.cwd(), "..", "node_modules", bareName, "package.json"),
25540
25540
  join5(process.cwd(), ".roy", "plugins", bareName, "package.json"),
25541
- join5(homedir4(), ".roy-agent", "node_modules", bareName, "package.json"),
25542
25541
  ...(() => {
25543
25542
  const globalRoot = getNpmGlobalRoot();
25544
25543
  return globalRoot ? [join5(globalRoot, bareName, "package.json")] : [];
25545
- })()
25544
+ })(),
25545
+ join5(homedir4(), ".roy-agent", "node_modules", bareName, "package.json")
25546
25546
  ];
25547
25547
  for (const pkgPath of searchPaths) {
25548
25548
  try {
@@ -25672,19 +25672,6 @@ var InstallPackageCommand = {
25672
25672
  console.log(`
25673
25673
  \uD83D\uDCE6 Installing plugin: ${packageName} (global)
25674
25674
  `);
25675
- let resolvedGlobalName;
25676
- if (packageName.startsWith("/") || packageName.startsWith(".")) {
25677
- const info2 = readPackageInfo(packageName);
25678
- if (!info2) {
25679
- console.error(`
25680
- ❌ Could not read package info from '${packageName}'.
25681
- `);
25682
- process.exit(1);
25683
- }
25684
- resolvedGlobalName = info2.name;
25685
- } else {
25686
- resolvedGlobalName = stripVersionSpec(packageName);
25687
- }
25688
25675
  const result = spawnSync("npm", ["install", "-g", packageName], {
25689
25676
  stdio: "inherit",
25690
25677
  shell: false
@@ -25695,18 +25682,6 @@ var InstallPackageCommand = {
25695
25682
  `);
25696
25683
  process.exit(1);
25697
25684
  }
25698
- const globalNm = join5(homedir4(), ".roy-agent", "node_modules", resolvedGlobalName);
25699
- if (!existsSync4(globalNm)) {
25700
- mkdirSync(join5(homedir4(), ".roy-agent", "node_modules"), { recursive: true });
25701
- const rootResult = spawnSync("npm", ["root", "-g"], { stdio: "pipe", shell: false });
25702
- const globalRoot = rootResult.stdout?.toString().trim();
25703
- if (globalRoot) {
25704
- const globalInstalled = join5(globalRoot, resolvedGlobalName);
25705
- if (existsSync4(globalInstalled)) {
25706
- cpSync(globalInstalled, globalNm, { recursive: true });
25707
- }
25708
- }
25709
- }
25710
25685
  }
25711
25686
  const info = readPackageInfo(packageName);
25712
25687
  if (!info) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-setting/roy-agent-cli",
3
- "version": "1.7.6",
3
+ "version": "1.7.7",
4
4
  "type": "module",
5
5
  "description": "CLI for roy-agent - Non-interactive command execution",
6
6
  "main": "./dist/index.js",