Skip to content

Commit 856d136

Browse files
authored
fix: config payload indentation (#407)
1 parent 9422258 commit 856d136

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

packages/cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@bucketco/cli",
3-
"version": "0.5.1",
3+
"version": "0.5.2",
44
"packageManager": "yarn@4.1.1",
55
"description": "CLI for Bucket service",
66
"main": "./dist/index.js",

packages/cli/utils/gen.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,16 @@ export const KeyFormatPatterns: Record<KeyFormat, KeyFormatPattern> = {
6868
},
6969
};
7070

71-
export function indentLines(str: string, indent = 2, lineBreak = "\n"): string {
71+
export function indentLines(
72+
str: string,
73+
indent = 2,
74+
lineBreak = "\n",
75+
trim = false,
76+
): string {
7277
const indentStr = " ".repeat(indent);
7378
return str
7479
.split(lineBreak)
75-
.map((line) => `${indentStr}${line.trim()}`)
80+
.map((line) => `${indentStr}${trim ? line.trim() : line}`)
7681
.join(lineBreak);
7782
}
7883

0 commit comments

Comments
 (0)