connectbase-client 0.10.11 → 0.10.12
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.
- package/dist/cli.js +28 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -892,7 +892,34 @@ async function setupMcp(secretKey) {
|
|
|
892
892
|
}
|
|
893
893
|
const mcpConfigPath = path.join(root, ".mcp.json");
|
|
894
894
|
if (!secretKey) {
|
|
895
|
-
|
|
895
|
+
log(`
|
|
896
|
+
${colors.dim}\uC778\uC99D \uBC29\uC2DD\uC744 \uC120\uD0DD\uD558\uC138\uC694:${colors.reset}`);
|
|
897
|
+
log(` ${colors.cyan}1${colors.reset}) Secret Key \uC9C1\uC811 \uC785\uB825 (cb_sk_...)`);
|
|
898
|
+
log(` ${colors.cyan}2${colors.reset}) \uBE0C\uB77C\uC6B0\uC800 \uB85C\uADF8\uC778\uC73C\uB85C \uC790\uB3D9 \uBC1C\uAE09
|
|
899
|
+
`);
|
|
900
|
+
const authChoice = await prompt(`${colors.blue}?${colors.reset} \uC120\uD0DD (1/2): `);
|
|
901
|
+
if (authChoice === "2") {
|
|
902
|
+
try {
|
|
903
|
+
secretKey = await browserAuthFlow();
|
|
904
|
+
const skRcPath = path.join(process.cwd(), ".connectbaserc");
|
|
905
|
+
let rcData = {};
|
|
906
|
+
if (fs.existsSync(skRcPath)) {
|
|
907
|
+
try {
|
|
908
|
+
rcData = JSON.parse(fs.readFileSync(skRcPath, "utf-8"));
|
|
909
|
+
} catch {
|
|
910
|
+
}
|
|
911
|
+
}
|
|
912
|
+
rcData.secretKey = secretKey;
|
|
913
|
+
fs.writeFileSync(skRcPath, JSON.stringify(rcData, null, 2) + "\n");
|
|
914
|
+
addToGitignore(".connectbaserc", root);
|
|
915
|
+
success("Secret Key \uBC1C\uAE09 \uBC0F \uC800\uC7A5 \uC644\uB8CC");
|
|
916
|
+
} catch (err) {
|
|
917
|
+
error(`\uC778\uC99D \uC2E4\uD328: ${err instanceof Error ? err.message : err}`);
|
|
918
|
+
process.exit(1);
|
|
919
|
+
}
|
|
920
|
+
} else {
|
|
921
|
+
secretKey = await promptSecret(`${colors.blue}?${colors.reset} Secret Key: `);
|
|
922
|
+
}
|
|
896
923
|
}
|
|
897
924
|
const mcpEntry = {
|
|
898
925
|
type: "http",
|