bamboohr-cli 1.0.10 → 1.0.11
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
|
@@ -123,8 +123,12 @@ function stripResponse(obj) {
|
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
// src/utils/output.ts
|
|
126
|
+
var prettyPrint = false;
|
|
127
|
+
function setPretty(value) {
|
|
128
|
+
prettyPrint = value;
|
|
129
|
+
}
|
|
126
130
|
function output(data) {
|
|
127
|
-
process.stdout.write(`${JSON.stringify(stripResponse(data), null, 2)}
|
|
131
|
+
process.stdout.write(`${JSON.stringify(stripResponse(data), null, prettyPrint ? 2 : void 0)}
|
|
128
132
|
`);
|
|
129
133
|
}
|
|
130
134
|
function handleError(err) {
|
|
@@ -630,6 +634,10 @@ ${styleText("bold", "Examples:")}
|
|
|
630
634
|
${DIM}$${RESET} bamboohr meta fields
|
|
631
635
|
`
|
|
632
636
|
);
|
|
637
|
+
program.option("--pretty", "Pretty-print JSON output");
|
|
638
|
+
program.hook("preAction", (thisCommand) => {
|
|
639
|
+
if (thisCommand.optsWithGlobals().pretty) setPretty(true);
|
|
640
|
+
});
|
|
633
641
|
registerEmployeeCommands(program);
|
|
634
642
|
registerTimeoffCommands(program);
|
|
635
643
|
registerFileCommands(program);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bamboohr-cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.11",
|
|
4
4
|
"publish": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"typescript": "^5.7.2",
|
|
24
24
|
"vitest": "^4.0.16",
|
|
25
25
|
"cli-utils": "1.0.0",
|
|
26
|
-
"config-
|
|
27
|
-
"config-
|
|
26
|
+
"config-typescript": "0.0.0",
|
|
27
|
+
"config-eslint": "0.0.0"
|
|
28
28
|
},
|
|
29
29
|
"engines": {
|
|
30
30
|
"node": ">=22.0.0"
|