@arvoretech/hub 0.7.4 → 0.7.6
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.
|
@@ -121,7 +121,7 @@ async function checkAndAutoRegenerate(hubDir) {
|
|
|
121
121
|
return;
|
|
122
122
|
}
|
|
123
123
|
console.log(chalk.yellow("\n Detected outdated configs, auto-regenerating..."));
|
|
124
|
-
const { generators: generators2 } = await import("./generate-
|
|
124
|
+
const { generators: generators2 } = await import("./generate-U6OR7AIX.js");
|
|
125
125
|
const generator = generators2[result.editor];
|
|
126
126
|
if (!generator) {
|
|
127
127
|
console.log(chalk.red(` Unknown editor '${result.editor}' in cache. Run 'hub generate' manually.`));
|
|
@@ -453,9 +453,15 @@ function getUpstreamNames(mcps) {
|
|
|
453
453
|
}
|
|
454
454
|
return names;
|
|
455
455
|
}
|
|
456
|
+
function resolveAutoApprove(mcp) {
|
|
457
|
+
if (mcp.autoApprove === true) return ["*"];
|
|
458
|
+
if (Array.isArray(mcp.autoApprove) && mcp.autoApprove.length > 0) return mcp.autoApprove;
|
|
459
|
+
return void 0;
|
|
460
|
+
}
|
|
456
461
|
function buildCursorMcpEntry(mcp) {
|
|
462
|
+
const autoApprove = resolveAutoApprove(mcp);
|
|
457
463
|
if (mcp.url) {
|
|
458
|
-
return { url: mcp.url, ...mcp.env && { env: mcp.env } };
|
|
464
|
+
return { url: mcp.url, ...mcp.env && { env: mcp.env }, ...autoApprove && { autoApprove } };
|
|
459
465
|
}
|
|
460
466
|
if (mcp.image) {
|
|
461
467
|
const args = ["run", "-i", "--rm"];
|
|
@@ -465,12 +471,13 @@ function buildCursorMcpEntry(mcp) {
|
|
|
465
471
|
}
|
|
466
472
|
}
|
|
467
473
|
args.push(mcp.image);
|
|
468
|
-
return { command: "docker", args };
|
|
474
|
+
return { command: "docker", args, ...autoApprove && { autoApprove } };
|
|
469
475
|
}
|
|
470
476
|
return {
|
|
471
477
|
command: "npx",
|
|
472
478
|
args: ["-y", mcp.package],
|
|
473
|
-
...mcp.env && { env: mcp.env }
|
|
479
|
+
...mcp.env && { env: mcp.env },
|
|
480
|
+
...autoApprove && { autoApprove }
|
|
474
481
|
};
|
|
475
482
|
}
|
|
476
483
|
function buildClaudeCodeMcpEntry(mcp) {
|
|
@@ -502,8 +509,9 @@ function stripEnvPrefix(env) {
|
|
|
502
509
|
}
|
|
503
510
|
function buildKiroMcpEntry(mcp, mode = "editor") {
|
|
504
511
|
const env = mcp.env ? mode === "editor" ? stripEnvPrefix(mcp.env) : mcp.env : void 0;
|
|
512
|
+
const autoApprove = resolveAutoApprove(mcp);
|
|
505
513
|
if (mcp.url) {
|
|
506
|
-
return { url: mcp.url, ...env && { env } };
|
|
514
|
+
return { url: mcp.url, ...env && { env }, ...autoApprove && { autoApprove } };
|
|
507
515
|
}
|
|
508
516
|
if (mcp.image) {
|
|
509
517
|
const args = ["run", "-i", "--rm"];
|
|
@@ -513,12 +521,13 @@ function buildKiroMcpEntry(mcp, mode = "editor") {
|
|
|
513
521
|
}
|
|
514
522
|
}
|
|
515
523
|
args.push(mcp.image);
|
|
516
|
-
return { command: "docker", args };
|
|
524
|
+
return { command: "docker", args, ...autoApprove && { autoApprove } };
|
|
517
525
|
}
|
|
518
526
|
return {
|
|
519
527
|
command: "npx",
|
|
520
528
|
args: ["-y", mcp.package],
|
|
521
|
-
...env && { env }
|
|
529
|
+
...env && { env },
|
|
530
|
+
...autoApprove && { autoApprove }
|
|
522
531
|
};
|
|
523
532
|
}
|
|
524
533
|
function buildKiroAgentContent(rawContent) {
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
checkAndAutoRegenerate,
|
|
4
4
|
generateCommand,
|
|
5
5
|
loadHubConfig
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-2PZA5OEV.js";
|
|
7
7
|
|
|
8
8
|
// src/index.ts
|
|
9
9
|
import { Command as Command19 } from "commander";
|
|
@@ -2762,10 +2762,10 @@ import { fileURLToPath } from "url";
|
|
|
2762
2762
|
import chalk16 from "chalk";
|
|
2763
2763
|
var PACKAGE_NAME = "@arvoretech/hub";
|
|
2764
2764
|
function getCurrentVersion() {
|
|
2765
|
-
const
|
|
2766
|
-
const pkgPath = join16(
|
|
2767
|
-
const
|
|
2768
|
-
return
|
|
2765
|
+
const __dirname2 = dirname(fileURLToPath(import.meta.url));
|
|
2766
|
+
const pkgPath = join16(__dirname2, "..", "package.json");
|
|
2767
|
+
const pkg2 = JSON.parse(readFileSync(pkgPath, "utf-8"));
|
|
2768
|
+
return pkg2.version;
|
|
2769
2769
|
}
|
|
2770
2770
|
async function getLatestVersion() {
|
|
2771
2771
|
const res = await fetch(`https://registry.npmjs.org/${PACKAGE_NAME}/latest`);
|
|
@@ -3169,10 +3169,16 @@ Run ${chalk18.bold("hub generate")} to update editor configs.
|
|
|
3169
3169
|
});
|
|
3170
3170
|
|
|
3171
3171
|
// src/index.ts
|
|
3172
|
+
import { readFileSync as readFileSync2 } from "fs";
|
|
3173
|
+
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
3174
|
+
import { dirname as dirname2, join as join18 } from "path";
|
|
3175
|
+
var __filename = fileURLToPath2(import.meta.url);
|
|
3176
|
+
var __dirname = dirname2(__filename);
|
|
3177
|
+
var pkg = JSON.parse(readFileSync2(join18(__dirname, "..", "package.json"), "utf-8"));
|
|
3172
3178
|
var program = new Command19();
|
|
3173
3179
|
program.name("hub").description(
|
|
3174
3180
|
"Give your AI coding assistant the full picture. Multi-repo context, agent orchestration, and end-to-end workflows."
|
|
3175
|
-
).version(
|
|
3181
|
+
).version(pkg.version).enablePositionalOptions();
|
|
3176
3182
|
program.addCommand(initCommand);
|
|
3177
3183
|
program.addCommand(addRepoCommand);
|
|
3178
3184
|
program.addCommand(setupCommand);
|