bitbucketdc-cli 1.0.8 → 1.0.9-g681e4c3.1

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 +9 -1
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -65,8 +65,12 @@ function stripResponse(obj) {
65
65
  }
66
66
 
67
67
  // src/utils/output.ts
68
+ var prettyPrint = false;
69
+ function setPretty(value) {
70
+ prettyPrint = value;
71
+ }
68
72
  function output(data) {
69
- process.stdout.write(`${JSON.stringify(stripResponse(data), null, 2)}
73
+ process.stdout.write(`${JSON.stringify(stripResponse(data), null, prettyPrint ? 2 : void 0)}
70
74
  `);
71
75
  }
72
76
  function handleError(err) {
@@ -985,6 +989,10 @@ ${styleText("bold", "Examples:")}
985
989
  ${DIM}$${RESET} bitbucketdc pr get --project PROJ --repo my-repo --pr 42
986
990
  `
987
991
  );
992
+ program.option("--pretty", "Pretty-print JSON output");
993
+ program.hook("preAction", (thisCommand) => {
994
+ if (thisCommand.optsWithGlobals().pretty) setPretty(true);
995
+ });
988
996
  registerUserCommands(program);
989
997
  registerProjectCommands(program);
990
998
  registerRepoCommands(program);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bitbucketdc-cli",
3
- "version": "1.0.8",
3
+ "version": "1.0.9-g681e4c3.1",
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.11"
15
+ "bitbucket-data-center-client": "1.4.11-g681e4c3.1"
16
16
  },
17
17
  "devDependencies": {
18
18
  "@types/node": "24.10.4",
@@ -22,8 +22,8 @@
22
22
  "tsx": "^4.19.2",
23
23
  "typescript": "^5.7.2",
24
24
  "vitest": "^4.0.16",
25
- "config-typescript": "0.0.0",
26
- "config-eslint": "0.0.0"
25
+ "config-eslint": "0.0.0",
26
+ "config-typescript": "0.0.0"
27
27
  },
28
28
  "engines": {
29
29
  "node": ">=22.0.0"