postgresai 0.14.0-dev.39 → 0.14.0-dev.40

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.
@@ -17,68 +17,10 @@ import { startMcpServer } from "../lib/mcp-server";
17
17
  import { fetchIssues, fetchIssueComments, createIssueComment, fetchIssue } from "../lib/issues";
18
18
  import { resolveBaseUrls } from "../lib/util";
19
19
  import { applyInitPlan, buildInitPlan, connectWithSslFallback, DEFAULT_MONITORING_USER, redactPasswordsInSql, resolveAdminConnection, resolveMonitoringPassword, verifyInitSetup } from "../lib/init";
20
- import { REPORT_GENERATORS, CHECK_INFO, generateAllReports } from "../lib/checkup";
21
- import { createCheckupReport, uploadCheckupReportJson, RpcError, formatRpcErrorForDisplay } from "../lib/checkup-api";
22
20
 
23
21
  const execPromise = promisify(exec);
24
22
  const execFilePromise = promisify(execFile);
25
23
 
26
- function expandHomePath(p: string): string {
27
- const s = (p || "").trim();
28
- if (!s) return s;
29
- if (s === "~") return os.homedir();
30
- if (s.startsWith("~/") || s.startsWith("~\\")) {
31
- return path.join(os.homedir(), s.slice(2));
32
- }
33
- return s;
34
- }
35
-
36
- function createTtySpinner(
37
- enabled: boolean,
38
- initialText: string
39
- ): { update: (text: string) => void; stop: (finalText?: string) => void } {
40
- if (!enabled) {
41
- return {
42
- update: () => {},
43
- stop: () => {},
44
- };
45
- }
46
-
47
- const frames = ["|", "/", "-", "\\"];
48
- const startTs = Date.now();
49
- let text = initialText;
50
- let frameIdx = 0;
51
- let stopped = false;
52
-
53
- const render = (): void => {
54
- if (stopped) return;
55
- const elapsedSec = ((Date.now() - startTs) / 1000).toFixed(1);
56
- const frame = frames[frameIdx % frames.length]!;
57
- frameIdx += 1;
58
- process.stdout.write(`\r\x1b[2K${frame} ${text} (${elapsedSec}s)`);
59
- };
60
-
61
- const timer = setInterval(render, 120);
62
- render(); // immediate feedback
63
-
64
- return {
65
- update: (t: string) => {
66
- text = t;
67
- render();
68
- },
69
- stop: (finalText?: string) => {
70
- if (stopped) return;
71
- stopped = true;
72
- clearInterval(timer);
73
- process.stdout.write("\r\x1b[2K");
74
- if (finalText && finalText.trim()) {
75
- process.stdout.write(finalText);
76
- }
77
- process.stdout.write("\n");
78
- },
79
- };
80
- }
81
-
82
24
  /**
83
25
  * CLI configuration options
84
26
  */
@@ -260,20 +202,6 @@ program
260
202
  "UI base URL for browser routes (overrides PGAI_UI_BASE_URL)"
261
203
  );
262
204
 
263
- program
264
- .command("set-default-project <project>")
265
- .description("store default project for checkup uploads")
266
- .action(async (project: string) => {
267
- const value = (project || "").trim();
268
- if (!value) {
269
- console.error("Error: project is required");
270
- process.exitCode = 1;
271
- return;
272
- }
273
- config.writeConfig({ defaultProject: value });
274
- console.log(`Default project saved: ${value}`);
275
- });
276
-
277
205
  program
278
206
  .command("prepare-db [conn]")
279
207
  .description("Prepare database for monitoring: create monitoring user, required view(s), and grant permissions (idempotent)")
@@ -601,221 +529,6 @@ program
601
529
  }
602
530
  });
603
531
 
604
- program
605
- .command("checkup [conn]")
606
- .description("generate health check reports directly from PostgreSQL (express mode)")
607
- .option("--check-id <id>", `specific check to run: ${Object.keys(CHECK_INFO).join(", ")}, or ALL`, "ALL")
608
- .option("--node-name <name>", "node name for reports", "node-01")
609
- .option("--output <path>", "output directory for JSON files")
610
- .option("--upload", "create a remote checkup report and upload JSON results (requires API key)", false)
611
- .option("--project <project>", "project name or ID for remote upload (used with --upload; defaults to config defaultProject)")
612
- .addHelpText(
613
- "after",
614
- [
615
- "",
616
- "Available checks:",
617
- ...Object.entries(CHECK_INFO).map(([id, title]) => ` ${id}: ${title}`),
618
- "",
619
- "Examples:",
620
- " postgresai checkup postgresql://user:pass@host:5432/db",
621
- " postgresai checkup postgresql://user:pass@host:5432/db --check-id A003",
622
- " postgresai checkup postgresql://user:pass@host:5432/db --output ./reports",
623
- " postgresai checkup postgresql://user:pass@host:5432/db --upload --project my_project",
624
- " postgresai set-default-project my_project",
625
- " postgresai checkup postgresql://user:pass@host:5432/db --upload",
626
- ].join("\n")
627
- )
628
- .action(async (conn: string | undefined, opts: {
629
- checkId: string;
630
- nodeName: string;
631
- output?: string;
632
- upload?: boolean;
633
- project?: string;
634
- }, cmd: Command) => {
635
- if (!conn) {
636
- // No args — show help like other commands do (instead of a bare error).
637
- cmd.outputHelp();
638
- process.exitCode = 1;
639
- return;
640
- }
641
-
642
- // Preflight: validate/create output directory BEFORE connecting / running checks.
643
- // This avoids waiting on network/DB work only to fail at the very end.
644
- let outputPath: string | undefined;
645
- if (opts.output) {
646
- const outputDir = expandHomePath(opts.output);
647
- outputPath = path.isAbsolute(outputDir) ? outputDir : path.resolve(process.cwd(), outputDir);
648
- if (!fs.existsSync(outputPath)) {
649
- try {
650
- fs.mkdirSync(outputPath, { recursive: true });
651
- } catch (e) {
652
- const errAny = e as any;
653
- const code = typeof errAny?.code === "string" ? errAny.code : "";
654
- const msg = errAny instanceof Error ? errAny.message : String(errAny);
655
- if (code === "EACCES" || code === "EPERM" || code === "ENOENT") {
656
- console.error(`Error: Failed to create output directory: ${outputPath}`);
657
- console.error(`Reason: ${msg}`);
658
- console.error("Tip: choose a writable path, e.g. --output ./reports or --output ~/reports");
659
- process.exitCode = 1;
660
- return;
661
- }
662
- throw e;
663
- }
664
- }
665
- }
666
-
667
- // Preflight: validate upload flags/credentials BEFORE connecting / running checks.
668
- // This allows "fast-fail" for missing API key / project name.
669
- let uploadCfg:
670
- | { apiKey: string; apiBaseUrl: string; project: string; epoch: number }
671
- | undefined;
672
- if (opts.upload) {
673
- const rootOpts = program.opts() as CliOptions;
674
- const { apiKey } = getConfig(rootOpts);
675
- if (!apiKey) {
676
- console.error("Error: API key is required for --upload");
677
- console.error("Tip: run 'postgresai auth' or pass --api-key / set PGAI_API_KEY");
678
- process.exitCode = 1;
679
- return;
680
- }
681
-
682
- const cfg = config.readConfig();
683
- const { apiBaseUrl } = resolveBaseUrls(rootOpts, cfg);
684
- const project = ((opts.project || cfg.defaultProject) || "").trim();
685
- if (!project) {
686
- console.error("Error: --project is required (or set a default via 'postgresai set-default-project <project>')");
687
- process.exitCode = 1;
688
- return;
689
- }
690
- const epoch = Math.floor(Date.now() / 1000);
691
- uploadCfg = {
692
- apiKey,
693
- apiBaseUrl,
694
- project,
695
- epoch,
696
- };
697
- }
698
-
699
- // Use the same SSL behavior as prepare-db:
700
- // - Default: sslmode=prefer (try SSL first, fallback to non-SSL)
701
- // - Respect PGSSLMODE env and ?sslmode=... in connection URI
702
- const adminConn = resolveAdminConnection({
703
- conn,
704
- envPassword: process.env.PGPASSWORD,
705
- });
706
- let client: Client | undefined;
707
- const spinnerEnabled = !!process.stdout.isTTY && !!opts.upload;
708
- const spinner = createTtySpinner(spinnerEnabled, "Connecting to Postgres");
709
-
710
- try {
711
- spinner.update("Connecting to Postgres");
712
- const connResult = await connectWithSslFallback(Client, adminConn);
713
- client = connResult.client as Client;
714
-
715
- let reports: Record<string, any>;
716
- let uploadSummary:
717
- | { project: string; reportId: number; uploaded: Array<{ checkId: string; filename: string; chunkId: number }> }
718
- | undefined;
719
-
720
- if (opts.checkId === "ALL") {
721
- reports = await generateAllReports(client, opts.nodeName, (p) => {
722
- spinner.update(`Running ${p.checkId}: ${p.checkTitle} (${p.index}/${p.total})`);
723
- });
724
- } else {
725
- const checkId = opts.checkId.toUpperCase();
726
- const generator = REPORT_GENERATORS[checkId];
727
- if (!generator) {
728
- spinner.stop();
729
- console.error(`Unknown check ID: ${opts.checkId}`);
730
- console.error(`Available: ${Object.keys(CHECK_INFO).join(", ")}, ALL`);
731
- process.exitCode = 1;
732
- return;
733
- }
734
- spinner.update(`Running ${checkId}: ${CHECK_INFO[checkId] || checkId}`);
735
- reports = { [checkId]: await generator(client, opts.nodeName) };
736
- }
737
-
738
- // Optional: upload to PostgresAI API.
739
- if (uploadCfg) {
740
- spinner.update("Creating remote checkup report");
741
- const created = await createCheckupReport({
742
- apiKey: uploadCfg.apiKey,
743
- apiBaseUrl: uploadCfg.apiBaseUrl,
744
- project: uploadCfg.project,
745
- epoch: uploadCfg.epoch,
746
- });
747
-
748
- const reportId = created.reportId;
749
- // Keep upload progress out of stdout since JSON is output to stdout.
750
- const logUpload = (msg: string): void => {
751
- console.error(msg);
752
- };
753
- logUpload(`Created remote checkup report: ${reportId}`);
754
-
755
- const uploaded: Array<{ checkId: string; filename: string; chunkId: number }> = [];
756
- for (const [checkId, report] of Object.entries(reports)) {
757
- spinner.update(`Uploading ${checkId}.json`);
758
- const jsonText = JSON.stringify(report, null, 2);
759
- const r = await uploadCheckupReportJson({
760
- apiKey: uploadCfg.apiKey,
761
- apiBaseUrl: uploadCfg.apiBaseUrl,
762
- reportId,
763
- filename: `${checkId}.json`,
764
- checkId,
765
- jsonText,
766
- });
767
- uploaded.push({ checkId, filename: `${checkId}.json`, chunkId: r.reportChunkId });
768
- }
769
- logUpload("Upload completed");
770
- uploadSummary = { project: uploadCfg.project, reportId, uploaded };
771
- }
772
-
773
- spinner.stop();
774
- // Output results
775
- if (opts.output) {
776
- // Write to files
777
- // outputPath is preflight-validated above
778
- const outDir = outputPath || path.resolve(process.cwd(), expandHomePath(opts.output));
779
- for (const [checkId, report] of Object.entries(reports)) {
780
- const filePath = path.join(outDir, `${checkId}.json`);
781
- fs.writeFileSync(filePath, JSON.stringify(report, null, 2), "utf8");
782
- console.log(`✓ ${checkId}: ${filePath}`);
783
- }
784
- } else if (uploadSummary) {
785
- // With --upload: show upload result to stderr, JSON to stdout.
786
- console.error("\nCheckup report uploaded");
787
- console.error("======================\n");
788
- console.error(`Project: ${uploadSummary.project}`);
789
- console.error(`Report ID: ${uploadSummary.reportId}`);
790
- console.error("View in Console: console.postgres.ai → Support → checkup reports");
791
- console.error("");
792
- console.error("Files:");
793
- for (const item of uploadSummary.uploaded) {
794
- console.error(`- ${item.checkId}: ${item.filename}`);
795
- }
796
- console.log(JSON.stringify(reports, null, 2));
797
- } else {
798
- // Default: output JSON to stdout
799
- console.log(JSON.stringify(reports, null, 2));
800
- }
801
- } catch (error) {
802
- spinner.stop();
803
- if (error instanceof RpcError) {
804
- for (const line of formatRpcErrorForDisplay(error)) {
805
- console.error(line);
806
- }
807
- } else {
808
- const message = error instanceof Error ? error.message : String(error);
809
- console.error(`Error: ${message}`);
810
- }
811
- process.exitCode = 1;
812
- } finally {
813
- if (client) {
814
- await client.end();
815
- }
816
- }
817
- });
818
-
819
532
  /**
820
533
  * Stub function for not implemented commands
821
534
  */
@@ -51,61 +51,8 @@ const mcp_server_1 = require("../lib/mcp-server");
51
51
  const issues_1 = require("../lib/issues");
52
52
  const util_2 = require("../lib/util");
53
53
  const init_1 = require("../lib/init");
54
- const checkup_1 = require("../lib/checkup");
55
- const checkup_api_1 = require("../lib/checkup-api");
56
54
  const execPromise = (0, util_1.promisify)(child_process_1.exec);
57
55
  const execFilePromise = (0, util_1.promisify)(child_process_1.execFile);
58
- function expandHomePath(p) {
59
- const s = (p || "").trim();
60
- if (!s)
61
- return s;
62
- if (s === "~")
63
- return os.homedir();
64
- if (s.startsWith("~/") || s.startsWith("~\\")) {
65
- return path.join(os.homedir(), s.slice(2));
66
- }
67
- return s;
68
- }
69
- function createTtySpinner(enabled, initialText) {
70
- if (!enabled) {
71
- return {
72
- update: () => { },
73
- stop: () => { },
74
- };
75
- }
76
- const frames = ["|", "/", "-", "\\"];
77
- const startTs = Date.now();
78
- let text = initialText;
79
- let frameIdx = 0;
80
- let stopped = false;
81
- const render = () => {
82
- if (stopped)
83
- return;
84
- const elapsedSec = ((Date.now() - startTs) / 1000).toFixed(1);
85
- const frame = frames[frameIdx % frames.length];
86
- frameIdx += 1;
87
- process.stdout.write(`\r\x1b[2K${frame} ${text} (${elapsedSec}s)`);
88
- };
89
- const timer = setInterval(render, 120);
90
- render(); // immediate feedback
91
- return {
92
- update: (t) => {
93
- text = t;
94
- render();
95
- },
96
- stop: (finalText) => {
97
- if (stopped)
98
- return;
99
- stopped = true;
100
- clearInterval(timer);
101
- process.stdout.write("\r\x1b[2K");
102
- if (finalText && finalText.trim()) {
103
- process.stdout.write(finalText);
104
- }
105
- process.stdout.write("\n");
106
- },
107
- };
108
- }
109
56
  function getDefaultMonitoringProjectDir() {
110
57
  const override = process.env.PGAI_PROJECT_DIR;
111
58
  if (override && override.trim())
@@ -227,19 +174,6 @@ program
227
174
  .option("--api-key <key>", "API key (overrides PGAI_API_KEY)")
228
175
  .option("--api-base-url <url>", "API base URL for backend RPC (overrides PGAI_API_BASE_URL)")
229
176
  .option("--ui-base-url <url>", "UI base URL for browser routes (overrides PGAI_UI_BASE_URL)");
230
- program
231
- .command("set-default-project <project>")
232
- .description("store default project for checkup uploads")
233
- .action(async (project) => {
234
- const value = (project || "").trim();
235
- if (!value) {
236
- console.error("Error: project is required");
237
- process.exitCode = 1;
238
- return;
239
- }
240
- config.writeConfig({ defaultProject: value });
241
- console.log(`Default project saved: ${value}`);
242
- });
243
177
  program
244
178
  .command("prepare-db [conn]")
245
179
  .description("Prepare database for monitoring: create monitoring user, required view(s), and grant permissions (idempotent)")
@@ -541,203 +475,6 @@ program
541
475
  }
542
476
  }
543
477
  });
544
- program
545
- .command("checkup [conn]")
546
- .description("generate health check reports directly from PostgreSQL (express mode)")
547
- .option("--check-id <id>", `specific check to run: ${Object.keys(checkup_1.CHECK_INFO).join(", ")}, or ALL`, "ALL")
548
- .option("--node-name <name>", "node name for reports", "node-01")
549
- .option("--output <path>", "output directory for JSON files")
550
- .option("--upload", "create a remote checkup report and upload JSON results (requires API key)", false)
551
- .option("--project <project>", "project name or ID for remote upload (used with --upload; defaults to config defaultProject)")
552
- .addHelpText("after", [
553
- "",
554
- "Available checks:",
555
- ...Object.entries(checkup_1.CHECK_INFO).map(([id, title]) => ` ${id}: ${title}`),
556
- "",
557
- "Examples:",
558
- " postgresai checkup postgresql://user:pass@host:5432/db",
559
- " postgresai checkup postgresql://user:pass@host:5432/db --check-id A003",
560
- " postgresai checkup postgresql://user:pass@host:5432/db --output ./reports",
561
- " postgresai checkup postgresql://user:pass@host:5432/db --upload --project my_project",
562
- " postgresai set-default-project my_project",
563
- " postgresai checkup postgresql://user:pass@host:5432/db --upload",
564
- ].join("\n"))
565
- .action(async (conn, opts, cmd) => {
566
- if (!conn) {
567
- // No args — show help like other commands do (instead of a bare error).
568
- cmd.outputHelp();
569
- process.exitCode = 1;
570
- return;
571
- }
572
- // Preflight: validate/create output directory BEFORE connecting / running checks.
573
- // This avoids waiting on network/DB work only to fail at the very end.
574
- let outputPath;
575
- if (opts.output) {
576
- const outputDir = expandHomePath(opts.output);
577
- outputPath = path.isAbsolute(outputDir) ? outputDir : path.resolve(process.cwd(), outputDir);
578
- if (!fs.existsSync(outputPath)) {
579
- try {
580
- fs.mkdirSync(outputPath, { recursive: true });
581
- }
582
- catch (e) {
583
- const errAny = e;
584
- const code = typeof errAny?.code === "string" ? errAny.code : "";
585
- const msg = errAny instanceof Error ? errAny.message : String(errAny);
586
- if (code === "EACCES" || code === "EPERM" || code === "ENOENT") {
587
- console.error(`Error: Failed to create output directory: ${outputPath}`);
588
- console.error(`Reason: ${msg}`);
589
- console.error("Tip: choose a writable path, e.g. --output ./reports or --output ~/reports");
590
- process.exitCode = 1;
591
- return;
592
- }
593
- throw e;
594
- }
595
- }
596
- }
597
- // Preflight: validate upload flags/credentials BEFORE connecting / running checks.
598
- // This allows "fast-fail" for missing API key / project name.
599
- let uploadCfg;
600
- if (opts.upload) {
601
- const rootOpts = program.opts();
602
- const { apiKey } = getConfig(rootOpts);
603
- if (!apiKey) {
604
- console.error("Error: API key is required for --upload");
605
- console.error("Tip: run 'postgresai auth' or pass --api-key / set PGAI_API_KEY");
606
- process.exitCode = 1;
607
- return;
608
- }
609
- const cfg = config.readConfig();
610
- const { apiBaseUrl } = (0, util_2.resolveBaseUrls)(rootOpts, cfg);
611
- const project = ((opts.project || cfg.defaultProject) || "").trim();
612
- if (!project) {
613
- console.error("Error: --project is required (or set a default via 'postgresai set-default-project <project>')");
614
- process.exitCode = 1;
615
- return;
616
- }
617
- const epoch = Math.floor(Date.now() / 1000);
618
- uploadCfg = {
619
- apiKey,
620
- apiBaseUrl,
621
- project,
622
- epoch,
623
- };
624
- }
625
- // Use the same SSL behavior as prepare-db:
626
- // - Default: sslmode=prefer (try SSL first, fallback to non-SSL)
627
- // - Respect PGSSLMODE env and ?sslmode=... in connection URI
628
- const adminConn = (0, init_1.resolveAdminConnection)({
629
- conn,
630
- envPassword: process.env.PGPASSWORD,
631
- });
632
- let client;
633
- const spinnerEnabled = !!process.stdout.isTTY && !!opts.upload;
634
- const spinner = createTtySpinner(spinnerEnabled, "Connecting to Postgres");
635
- try {
636
- spinner.update("Connecting to Postgres");
637
- const connResult = await (0, init_1.connectWithSslFallback)(pg_1.Client, adminConn);
638
- client = connResult.client;
639
- let reports;
640
- let uploadSummary;
641
- if (opts.checkId === "ALL") {
642
- reports = await (0, checkup_1.generateAllReports)(client, opts.nodeName, (p) => {
643
- spinner.update(`Running ${p.checkId}: ${p.checkTitle} (${p.index}/${p.total})`);
644
- });
645
- }
646
- else {
647
- const checkId = opts.checkId.toUpperCase();
648
- const generator = checkup_1.REPORT_GENERATORS[checkId];
649
- if (!generator) {
650
- spinner.stop();
651
- console.error(`Unknown check ID: ${opts.checkId}`);
652
- console.error(`Available: ${Object.keys(checkup_1.CHECK_INFO).join(", ")}, ALL`);
653
- process.exitCode = 1;
654
- return;
655
- }
656
- spinner.update(`Running ${checkId}: ${checkup_1.CHECK_INFO[checkId] || checkId}`);
657
- reports = { [checkId]: await generator(client, opts.nodeName) };
658
- }
659
- // Optional: upload to PostgresAI API.
660
- if (uploadCfg) {
661
- spinner.update("Creating remote checkup report");
662
- const created = await (0, checkup_api_1.createCheckupReport)({
663
- apiKey: uploadCfg.apiKey,
664
- apiBaseUrl: uploadCfg.apiBaseUrl,
665
- project: uploadCfg.project,
666
- epoch: uploadCfg.epoch,
667
- });
668
- const reportId = created.reportId;
669
- // Keep upload progress out of stdout since JSON is output to stdout.
670
- const logUpload = (msg) => {
671
- console.error(msg);
672
- };
673
- logUpload(`Created remote checkup report: ${reportId}`);
674
- const uploaded = [];
675
- for (const [checkId, report] of Object.entries(reports)) {
676
- spinner.update(`Uploading ${checkId}.json`);
677
- const jsonText = JSON.stringify(report, null, 2);
678
- const r = await (0, checkup_api_1.uploadCheckupReportJson)({
679
- apiKey: uploadCfg.apiKey,
680
- apiBaseUrl: uploadCfg.apiBaseUrl,
681
- reportId,
682
- filename: `${checkId}.json`,
683
- checkId,
684
- jsonText,
685
- });
686
- uploaded.push({ checkId, filename: `${checkId}.json`, chunkId: r.reportChunkId });
687
- }
688
- logUpload("Upload completed");
689
- uploadSummary = { project: uploadCfg.project, reportId, uploaded };
690
- }
691
- spinner.stop();
692
- // Output results
693
- if (opts.output) {
694
- // Write to files
695
- // outputPath is preflight-validated above
696
- const outDir = outputPath || path.resolve(process.cwd(), expandHomePath(opts.output));
697
- for (const [checkId, report] of Object.entries(reports)) {
698
- const filePath = path.join(outDir, `${checkId}.json`);
699
- fs.writeFileSync(filePath, JSON.stringify(report, null, 2), "utf8");
700
- console.log(`✓ ${checkId}: ${filePath}`);
701
- }
702
- }
703
- else if (uploadSummary) {
704
- // With --upload: show upload result to stderr, JSON to stdout.
705
- console.error("\nCheckup report uploaded");
706
- console.error("======================\n");
707
- console.error(`Project: ${uploadSummary.project}`);
708
- console.error(`Report ID: ${uploadSummary.reportId}`);
709
- console.error("View in Console: console.postgres.ai → Support → checkup reports");
710
- console.error("");
711
- console.error("Files:");
712
- for (const item of uploadSummary.uploaded) {
713
- console.error(`- ${item.checkId}: ${item.filename}`);
714
- }
715
- console.log(JSON.stringify(reports, null, 2));
716
- }
717
- else {
718
- // Default: output JSON to stdout
719
- console.log(JSON.stringify(reports, null, 2));
720
- }
721
- }
722
- catch (error) {
723
- spinner.stop();
724
- if (error instanceof checkup_api_1.RpcError) {
725
- for (const line of (0, checkup_api_1.formatRpcErrorForDisplay)(error)) {
726
- console.error(line);
727
- }
728
- }
729
- else {
730
- const message = error instanceof Error ? error.message : String(error);
731
- console.error(`Error: ${message}`);
732
- }
733
- process.exitCode = 1;
734
- }
735
- finally {
736
- if (client) {
737
- await client.end();
738
- }
739
- }
740
- });
741
478
  /**
742
479
  * Stub function for not implemented commands
743
480
  */