@botconnector/bccli 0.4.0-beta.5 → 0.4.0-beta.51

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 (58) hide show
  1. package/README.md +97 -2
  2. package/dist/acp-NWP4FFTG.js +182 -0
  3. package/dist/args-2R45YZ42.js +13 -0
  4. package/dist/{chunk-U7DLMVPZ.js → chunk-2QYHSESB.js} +2 -1
  5. package/dist/{chunk-UESQNU4A.js → chunk-4WVIPZFV.js} +14 -9
  6. package/dist/chunk-7F3IWBPQ.js +191 -0
  7. package/dist/chunk-DP7EBW53.js +341 -0
  8. package/dist/{chunk-SJH3YLW4.js → chunk-F6ACN47V.js} +60 -6
  9. package/dist/chunk-FTFVW7XD.js +235 -0
  10. package/dist/{chunk-ELML4KVQ.js → chunk-GAFJEQTJ.js} +32 -2
  11. package/dist/{chunk-NGLKANMD.js → chunk-H73FO5YK.js} +24 -2
  12. package/dist/chunk-KD2LMIS4.js +145 -0
  13. package/dist/chunk-KIZC5XV4.js +2141 -0
  14. package/dist/chunk-N7KP6RNP.js +76 -0
  15. package/dist/chunk-NDEJUL44.js +361 -0
  16. package/dist/chunk-PSO7R5AD.js +10 -0
  17. package/dist/chunk-QXOV4DUZ.js +56 -0
  18. package/dist/chunk-QZKLZELZ.js +64 -0
  19. package/dist/chunk-R4BJBTWC.js +940 -0
  20. package/dist/chunk-SNKVS26H.js +63 -0
  21. package/dist/chunk-TQWCM5RO.js +231 -0
  22. package/dist/chunk-VU5HNQHX.js +8 -0
  23. package/dist/chunk-XLC6T4SX.js +500 -0
  24. package/dist/chunk-YIYX3FFS.js +733 -0
  25. package/dist/cli.js +157 -1281
  26. package/dist/completion-OV3MW2N4.js +125 -0
  27. package/dist/{config-NPSYFAFD.js → config-AZZFOXKV.js} +5 -2
  28. package/dist/config-H5A7XHHK.js +30 -0
  29. package/dist/ghBotCli-7WDYF4L7.js +677 -0
  30. package/dist/integrationCli-ZMTSILYF.js +685 -0
  31. package/dist/login-W4Y6WHLV.js +16 -0
  32. package/dist/{mcpCli-Q2H63ISP.js → mcpCli-5QISTOFK.js} +42 -9
  33. package/dist/modelsCli-FZMBD4OE.js +36 -0
  34. package/dist/npmRunner-LU43GM3W.js +46 -0
  35. package/dist/oauthLogin-VESMXG4M.js +210 -0
  36. package/dist/pluginsCli-GEHR7FQR.js +284 -0
  37. package/dist/prCli-JXA7DJW4.js +72 -0
  38. package/dist/providerCli-EUZGKP5F.js +15 -0
  39. package/dist/sdk.js +5486 -0
  40. package/dist/serve-6KX4MXHC.js +178 -0
  41. package/dist/serve-YSUJD57D.js +515 -0
  42. package/dist/session-F6MG3UCU.js +12 -0
  43. package/dist/setup-LLWREJQH.js +24 -0
  44. package/dist/statsCli-H4HEY5ID.js +353 -0
  45. package/dist/transferCli-2XUKBG2L.js +71 -0
  46. package/dist/ui-6HJVYI46.js +2370 -0
  47. package/dist/update-O4WCLKOO.js +109 -0
  48. package/package.json +24 -3
  49. package/dist/args-FCLPQ7TO.js +0 -11
  50. package/dist/chunk-5O4HD7IU.js +0 -253
  51. package/dist/chunk-C5AFWX7H.js +0 -328
  52. package/dist/chunk-GW36UMHZ.js +0 -52
  53. package/dist/chunk-RZUJYAQV.js +0 -112
  54. package/dist/chunk-UN7QXPCB.js +0 -82
  55. package/dist/login-F4G5QXOU.js +0 -9
  56. package/dist/providerCli-MXV6PD6F.js +0 -11
  57. package/dist/session-7UB77CEG.js +0 -9
  58. package/dist/ui-RYTSKEIA.js +0 -1344
@@ -0,0 +1,72 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ t
4
+ } from "./chunk-XLC6T4SX.js";
5
+
6
+ // src/prCli.ts
7
+ import { spawn } from "child_process";
8
+ function defaultGh(argv) {
9
+ return new Promise((resolve) => {
10
+ const child = spawn("gh", argv, { shell: false, stdio: ["ignore", "pipe", "pipe"] });
11
+ let stdout = "";
12
+ let stderr = "";
13
+ child.stdout?.on("data", (d) => {
14
+ stdout += d;
15
+ });
16
+ child.stderr?.on("data", (d) => {
17
+ stderr += d;
18
+ });
19
+ child.on("error", (e) => resolve({ code: 127, stdout, stderr: String(e) }));
20
+ child.on("close", (code) => resolve({ code: code ?? 1, stdout, stderr }));
21
+ });
22
+ }
23
+ async function defaultRunTask(opts) {
24
+ const entry = process.argv[1];
25
+ if (!entry) return 1;
26
+ return new Promise((resolve) => {
27
+ const child = spawn(process.execPath, [entry, ...opts.prompt ? ["-p", opts.prompt] : [], "--allow-all"], {
28
+ shell: false,
29
+ stdio: "inherit",
30
+ cwd: opts.cwd
31
+ });
32
+ child.on("error", () => resolve(1));
33
+ child.on("close", (code) => resolve(code ?? 1));
34
+ });
35
+ }
36
+ async function runPrCommand(args, deps) {
37
+ const rest = [...args.subArgs];
38
+ let repo;
39
+ const words = [];
40
+ for (let i = 0; i < rest.length; i++) {
41
+ if (rest[i] === "--repo") {
42
+ repo = rest[++i];
43
+ continue;
44
+ }
45
+ words.push(rest[i]);
46
+ }
47
+ const number = words.shift();
48
+ if (!number || !/^\d+$/.test(number)) {
49
+ deps.err?.(t("usage: bccli pr <number> [--repo owner/name] [task]"));
50
+ return 1;
51
+ }
52
+ const task = words.length ? words.join(" ") : void 0;
53
+ const gh = deps.gh ?? defaultGh;
54
+ const checkoutArgv = ["pr", "checkout", number, ...repo ? ["--repo", repo] : []];
55
+ let res;
56
+ try {
57
+ res = await gh(checkoutArgv);
58
+ } catch (e) {
59
+ deps.err?.(t("gh is not available ({error}); install GitHub CLI first", { error: String(e) }));
60
+ return 1;
61
+ }
62
+ if (res.code !== 0) {
63
+ deps.err?.(t("gh pr checkout {n} failed (exit {code})", { n: number, code: String(res.code) }));
64
+ return 1;
65
+ }
66
+ deps.out(t("checked out PR #{n}", { n: number }));
67
+ const runTask = deps.runTask ?? defaultRunTask;
68
+ return runTask({ prompt: task, allowAll: true, cwd: args.cwd });
69
+ }
70
+ export {
71
+ runPrCommand
72
+ };
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ addProviderKey,
4
+ runProviderCommand
5
+ } from "./chunk-N7KP6RNP.js";
6
+ import "./chunk-QXOV4DUZ.js";
7
+ import "./chunk-2QYHSESB.js";
8
+ import "./chunk-R4BJBTWC.js";
9
+ import "./chunk-SNKVS26H.js";
10
+ import "./chunk-NDEJUL44.js";
11
+ import "./chunk-XLC6T4SX.js";
12
+ export {
13
+ addProviderKey,
14
+ runProviderCommand
15
+ };