bitbucketdc-cli 1.0.10 → 1.0.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.
Files changed (2) hide show
  1. package/dist/index.js +17 -8
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -73,6 +73,15 @@ function output(data) {
73
73
  process.stdout.write(`${JSON.stringify(stripResponse(data), null, prettyPrint ? 2 : void 0)}
74
74
  `);
75
75
  }
76
+ function outputPrResult(pr) {
77
+ const url = pr.links?.self?.[0]?.href;
78
+ process.stdout.write(`${JSON.stringify({ id: pr.id, ...url && { url } }, null, prettyPrint ? 2 : void 0)}
79
+ `);
80
+ }
81
+ function outputCommentResult(comment2) {
82
+ process.stdout.write(`${JSON.stringify({ id: comment2.id }, null, prettyPrint ? 2 : void 0)}
83
+ `);
84
+ }
76
85
  function handleError(err) {
77
86
  const message = err instanceof Error ? err.message : String(err);
78
87
  const axiosStatus = err?.response?.status;
@@ -401,7 +410,7 @@ Examples:
401
410
  text: opts.text,
402
411
  parentId: opts.parent ? parseInt(opts.parent) : void 0
403
412
  });
404
- output(result);
413
+ outputCommentResult(result);
405
414
  });
406
415
  }
407
416
 
@@ -442,7 +451,7 @@ Examples:
442
451
  reviewers,
443
452
  draft: opts.draft
444
453
  });
445
- output(result);
454
+ outputPrResult(result);
446
455
  }
447
456
  );
448
457
  }
@@ -456,7 +465,7 @@ function decline(parent) {
456
465
  repositorySlug: opts.repo,
457
466
  pullRequestId: opts.id
458
467
  });
459
- output(result);
468
+ outputPrResult(result);
460
469
  });
461
470
  }
462
471
 
@@ -552,7 +561,7 @@ function editComment(parent) {
552
561
  text: opts.text,
553
562
  version: comment2.version
554
563
  });
555
- output(result);
564
+ outputCommentResult(result);
556
565
  });
557
566
  }
558
567
 
@@ -570,7 +579,7 @@ function fileComment(parent) {
570
579
  text: opts.text,
571
580
  path: opts.path
572
581
  });
573
- output(result);
582
+ outputCommentResult(result);
574
583
  });
575
584
  }
576
585
 
@@ -646,7 +655,7 @@ Examples:
646
655
  lineType: opts.lineType,
647
656
  fileType: opts.fileType
648
657
  });
649
- output(result);
658
+ outputCommentResult(result);
650
659
  }
651
660
  );
652
661
  }
@@ -669,7 +678,7 @@ Examples:
669
678
  strategyId: opts.strategy,
670
679
  message: opts.message
671
680
  });
672
- output(result);
681
+ outputPrResult(result);
673
682
  });
674
683
  }
675
684
 
@@ -767,7 +776,7 @@ Examples:
767
776
  title: opts.title,
768
777
  description: opts.description
769
778
  });
770
- output(result);
779
+ outputPrResult(result);
771
780
  });
772
781
  }
773
782
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bitbucketdc-cli",
3
- "version": "1.0.10",
3
+ "version": "1.0.12",
4
4
  "publish": true,
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -12,7 +12,7 @@
12
12
  ],
13
13
  "dependencies": {
14
14
  "commander": "^13.1.0",
15
- "bitbucket-data-center-client": "1.4.12"
15
+ "bitbucket-data-center-client": "1.4.15"
16
16
  },
17
17
  "devDependencies": {
18
18
  "@types/node": "24.10.4",