confluencedc-cli 1.0.7 → 1.0.8
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/index.js +9 -1
- package/package.json +3 -3
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) {
|
|
@@ -597,6 +601,10 @@ ${styleText("bold", "Examples:")}
|
|
|
597
601
|
${DIM}$${RESET} confluencedc attachment list 12345
|
|
598
602
|
`
|
|
599
603
|
);
|
|
604
|
+
program.option("--pretty", "Pretty-print JSON output");
|
|
605
|
+
program.hook("preAction", (thisCommand) => {
|
|
606
|
+
if (thisCommand.optsWithGlobals().pretty) setPretty(true);
|
|
607
|
+
});
|
|
600
608
|
registerSearchCommands(program);
|
|
601
609
|
registerPageCommands(program);
|
|
602
610
|
registerCommentCommands(program);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "confluencedc-cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.8",
|
|
4
4
|
"publish": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
"tsx": "^4.19.2",
|
|
23
23
|
"typescript": "^5.7.2",
|
|
24
24
|
"vitest": "^4.0.16",
|
|
25
|
-
"config-
|
|
26
|
-
"config-
|
|
25
|
+
"config-eslint": "0.0.0",
|
|
26
|
+
"config-typescript": "0.0.0"
|
|
27
27
|
},
|
|
28
28
|
"engines": {
|
|
29
29
|
"node": ">=22.0.0"
|