connectbase-client 0.6.27 → 0.6.28
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 +26 -5
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -444,9 +444,27 @@ function addDeployScript(deployDir) {
|
|
|
444
444
|
warn("package.json \uC218\uC815\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4");
|
|
445
445
|
}
|
|
446
446
|
}
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
447
|
+
function getGitRoot() {
|
|
448
|
+
try {
|
|
449
|
+
const { execSync } = require("child_process");
|
|
450
|
+
return execSync("git rev-parse --show-toplevel", { encoding: "utf-8" }).trim();
|
|
451
|
+
} catch {
|
|
452
|
+
return null;
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
async function downloadDocs(apiKey, templates, monorepo) {
|
|
456
|
+
let baseDir = process.cwd();
|
|
457
|
+
if (monorepo) {
|
|
458
|
+
const gitRoot = getGitRoot();
|
|
459
|
+
if (gitRoot) {
|
|
460
|
+
baseDir = gitRoot;
|
|
461
|
+
info(`\uBAA8\uB178\uB808\uD3EC \uB8E8\uD2B8 \uAC10\uC9C0: ${gitRoot}`);
|
|
462
|
+
} else {
|
|
463
|
+
warn("git root\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uD604\uC7AC \uB514\uB809\uD1A0\uB9AC\uB97C \uC0AC\uC6A9\uD569\uB2C8\uB2E4.");
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
const docsDir = path.join(baseDir, ".claude", "docs");
|
|
467
|
+
const rootClaudeMd = path.join(baseDir, "CLAUDE.md");
|
|
450
468
|
if (!fs.existsSync(docsDir)) {
|
|
451
469
|
fs.mkdirSync(docsDir, { recursive: true });
|
|
452
470
|
}
|
|
@@ -887,7 +905,7 @@ ${colors.yellow}\uC0AC\uC6A9\uBC95:${colors.reset}
|
|
|
887
905
|
|
|
888
906
|
${colors.yellow}\uBA85\uB839\uC5B4:${colors.reset}
|
|
889
907
|
init \uD504\uB85C\uC81D\uD2B8 \uCD08\uAE30\uD654 (\uC124\uC815 \uD30C\uC77C \uC0DD\uC131)
|
|
890
|
-
docs SDK \uBB38\uC11C \uB2E4\uC6B4\uB85C\uB4DC/\uC5C5\uB370\uC774\uD2B8
|
|
908
|
+
docs SDK \uBB38\uC11C \uB2E4\uC6B4\uB85C\uB4DC/\uC5C5\uB370\uC774\uD2B8 (--monorepo: git root\uC5D0 \uC0DD\uC131)
|
|
891
909
|
deploy <directory> \uC6F9 \uC2A4\uD1A0\uB9AC\uC9C0\uC5D0 \uD30C\uC77C \uBC30\uD3EC
|
|
892
910
|
tunnel <port> \uB85C\uCEEC \uC11C\uBE44\uC2A4\uB97C \uC778\uD130\uB137\uC5D0 \uB178\uCD9C
|
|
893
911
|
|
|
@@ -897,6 +915,7 @@ ${colors.yellow}\uC635\uC158:${colors.reset}
|
|
|
897
915
|
-u, --base-url <url> \uC11C\uBC84 URL (\uAE30\uBCF8: ${DEFAULT_BASE_URL})
|
|
898
916
|
-t, --timeout <sec> \uD130\uB110 \uC694\uCCAD \uD0C0\uC784\uC544\uC6C3 (\uCD08, tunnel \uC804\uC6A9)
|
|
899
917
|
--max-body <MB> \uD130\uB110 \uCD5C\uB300 \uBC14\uB514 \uD06C\uAE30 (MB, tunnel \uC804\uC6A9)
|
|
918
|
+
--monorepo \uBAA8\uB178\uB808\uD3EC git root\uC5D0 \uBB38\uC11C \uC0DD\uC131 (docs \uC804\uC6A9)
|
|
900
919
|
-h, --help \uB3C4\uC6C0\uB9D0 \uD45C\uC2DC
|
|
901
920
|
-v, --version \uBC84\uC804 \uD45C\uC2DC
|
|
902
921
|
|
|
@@ -947,6 +966,8 @@ function parseArgs(args) {
|
|
|
947
966
|
result.options.timeout = args[++i];
|
|
948
967
|
} else if (arg === "--max-body") {
|
|
949
968
|
result.options.maxBody = args[++i];
|
|
969
|
+
} else if (arg === "--monorepo") {
|
|
970
|
+
result.options.monorepo = "true";
|
|
950
971
|
} else if (arg === "-h" || arg === "--help") {
|
|
951
972
|
result.options.help = "true";
|
|
952
973
|
} else if (arg === "-v" || arg === "--version") {
|
|
@@ -989,7 +1010,7 @@ async function main() {
|
|
|
989
1010
|
process.exit(1);
|
|
990
1011
|
}
|
|
991
1012
|
}
|
|
992
|
-
await downloadDocs(docsApiKey);
|
|
1013
|
+
await downloadDocs(docsApiKey, void 0, parsed.options.monorepo === "true");
|
|
993
1014
|
} else if (parsed.command === "deploy") {
|
|
994
1015
|
const directory = parsed.args[0] || fileConfig.deployDir || ".";
|
|
995
1016
|
if (!config.apiKey) {
|