@prisma-next/cli 0.12.0-dev.6 → 0.12.0-dev.60
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/README.md +2 -2
- package/dist/cli.mjs +180 -163
- package/dist/cli.mjs.map +1 -1
- package/dist/{client-KgJorIvG.mjs → client-DQvxtihf.mjs} +194 -105
- package/dist/client-DQvxtihf.mjs.map +1 -0
- package/dist/{command-helpers-Bbw1GbwL.mjs → command-helpers-CxHSiwEg.mjs} +318 -25
- package/dist/command-helpers-CxHSiwEg.mjs.map +1 -0
- package/dist/commands/contract-emit.d.mts.map +1 -1
- package/dist/commands/contract-emit.mjs +1 -1
- package/dist/commands/contract-infer.d.mts.map +1 -1
- package/dist/commands/contract-infer.mjs +1 -1
- package/dist/commands/db-init.d.mts.map +1 -1
- package/dist/commands/db-init.mjs +4 -5
- package/dist/commands/db-init.mjs.map +1 -1
- package/dist/commands/db-schema.d.mts.map +1 -1
- package/dist/commands/db-schema.mjs +3 -3
- package/dist/commands/db-schema.mjs.map +1 -1
- package/dist/commands/db-sign.d.mts.map +1 -1
- package/dist/commands/db-sign.mjs +6 -6
- package/dist/commands/db-sign.mjs.map +1 -1
- package/dist/commands/db-update.d.mts.map +1 -1
- package/dist/commands/db-update.mjs +10 -7
- package/dist/commands/db-update.mjs.map +1 -1
- package/dist/commands/db-verify.d.mts.map +1 -1
- package/dist/commands/db-verify.mjs +1 -1
- package/dist/commands/migrate.d.mts +37 -3
- package/dist/commands/migrate.d.mts.map +1 -1
- package/dist/commands/migrate.mjs +291 -12
- package/dist/commands/migrate.mjs.map +1 -1
- package/dist/commands/migration-check.d.mts +55 -13
- package/dist/commands/migration-check.d.mts.map +1 -1
- package/dist/commands/migration-check.mjs +3 -2
- package/dist/commands/migration-graph.d.mts +17 -8
- package/dist/commands/migration-graph.d.mts.map +1 -1
- package/dist/commands/migration-graph.mjs +185 -2
- package/dist/commands/migration-graph.mjs.map +1 -0
- package/dist/commands/migration-list.d.mts +26 -27
- package/dist/commands/migration-list.d.mts.map +1 -1
- package/dist/commands/migration-list.mjs +2 -190
- package/dist/commands/migration-log.d.mts +9 -19
- package/dist/commands/migration-log.d.mts.map +1 -1
- package/dist/commands/migration-log.mjs +1 -137
- package/dist/commands/migration-new.d.mts.map +1 -1
- package/dist/commands/migration-new.mjs +4 -4
- package/dist/commands/migration-new.mjs.map +1 -1
- package/dist/commands/migration-plan.d.mts +1 -1
- package/dist/commands/migration-plan.d.mts.map +1 -1
- package/dist/commands/migration-plan.mjs +1 -1
- package/dist/commands/migration-show.d.mts +17 -21
- package/dist/commands/migration-show.d.mts.map +1 -1
- package/dist/commands/migration-show.mjs +24 -36
- package/dist/commands/migration-show.mjs.map +1 -1
- package/dist/commands/migration-status.d.mts +42 -144
- package/dist/commands/migration-status.d.mts.map +1 -1
- package/dist/commands/migration-status.mjs +3 -759
- package/dist/commands/ref.d.mts +1 -1
- package/dist/commands/ref.d.mts.map +1 -1
- package/dist/commands/ref.mjs +4 -4
- package/dist/commands/ref.mjs.map +1 -1
- package/dist/commands/telemetry/index.d.mts +7 -0
- package/dist/commands/telemetry/index.d.mts.map +1 -0
- package/dist/commands/telemetry/index.mjs +2 -0
- package/dist/{config-loader-B6sJjXTv.mjs → config-loader-p9JMrekQ.mjs} +1 -1
- package/dist/{config-loader-B6sJjXTv.mjs.map → config-loader-p9JMrekQ.mjs.map} +1 -1
- package/dist/config-loader.mjs +1 -1
- package/dist/{contract-at-errors-BxP-TOMl.mjs → contract-at-errors-gBvfOS8r.mjs} +2 -2
- package/dist/{contract-at-errors-BxP-TOMl.mjs.map → contract-at-errors-gBvfOS8r.mjs.map} +1 -1
- package/dist/{contract-emit-DxcGl4Uq.mjs → contract-emit-By59Nmmn.mjs} +5 -5
- package/dist/{contract-emit-DxcGl4Uq.mjs.map → contract-emit-By59Nmmn.mjs.map} +1 -1
- package/dist/{contract-emit-D-4jrNve.mjs → contract-emit-OpMbysHj.mjs} +7 -7
- package/dist/{contract-emit-D-4jrNve.mjs.map → contract-emit-OpMbysHj.mjs.map} +1 -1
- package/dist/{contract-enrichment-a0V5Y_mL.mjs → contract-enrichment-gn9sWbPw.mjs} +1 -1
- package/dist/{contract-enrichment-a0V5Y_mL.mjs.map → contract-enrichment-gn9sWbPw.mjs.map} +1 -1
- package/dist/{contract-infer-D8uEbJuu.mjs → contract-infer-BkyyYGDf.mjs} +3 -3
- package/dist/{contract-infer-D8uEbJuu.mjs.map → contract-infer-BkyyYGDf.mjs.map} +1 -1
- package/dist/{contract-space-aggregate-loader-DvZwdkrr.mjs → contract-space-aggregate-loader-Bup14UkI.mjs} +63 -5
- package/dist/{contract-space-aggregate-loader-DvZwdkrr.mjs.map → contract-space-aggregate-loader-Bup14UkI.mjs.map} +1 -1
- package/dist/{db-verify-v_vUKXTU.mjs → db-verify-DbmfgeYc.mjs} +6 -6
- package/dist/{db-verify-v_vUKXTU.mjs.map → db-verify-DbmfgeYc.mjs.map} +1 -1
- package/dist/exports/control-api.d.mts +2 -2
- package/dist/exports/control-api.d.mts.map +1 -1
- package/dist/exports/control-api.mjs +3 -3
- package/dist/exports/index.mjs +1 -1
- package/dist/exports/index.mjs.map +1 -1
- package/dist/exports/init-output.d.mts +1 -3
- package/dist/exports/init-output.d.mts.map +1 -1
- package/dist/exports/init-output.mjs +1 -1
- package/dist/{framework-components-fYXjz_in.mjs → framework-components-CmBpbvzV.mjs} +2 -2
- package/dist/{framework-components-fYXjz_in.mjs.map → framework-components-CmBpbvzV.mjs.map} +1 -1
- package/dist/{global-flags-DEHjV8_s.d.mts → global-flags-BpoOYtNZ.d.mts} +1 -1
- package/dist/{global-flags-DEHjV8_s.d.mts.map → global-flags-BpoOYtNZ.d.mts.map} +1 -1
- package/dist/{init-Cv9UzWL5.mjs → init-tidQpK21.mjs} +5 -58
- package/dist/init-tidQpK21.mjs.map +1 -0
- package/dist/{inspect-live-schema-C6ohV_oQ.mjs → inspect-live-schema-CUvD_9uF.mjs} +5 -5
- package/dist/{inspect-live-schema-C6ohV_oQ.mjs.map → inspect-live-schema-CUvD_9uF.mjs.map} +1 -1
- package/dist/migration-check-BjNlXTGF.mjs +572 -0
- package/dist/migration-check-BjNlXTGF.mjs.map +1 -0
- package/dist/migration-cli.mjs +1 -1
- package/dist/migration-cli.mjs.map +1 -1
- package/dist/{migration-command-scaffold-CjvwO6at.mjs → migration-command-scaffold-DWlpBp98.mjs} +5 -5
- package/dist/{migration-command-scaffold-CjvwO6at.mjs.map → migration-command-scaffold-DWlpBp98.mjs.map} +1 -1
- package/dist/migration-graph-space-render-Cpg0ql8v.mjs +2370 -0
- package/dist/migration-graph-space-render-Cpg0ql8v.mjs.map +1 -0
- package/dist/migration-list-zP59uUBC.mjs +230 -0
- package/dist/migration-list-zP59uUBC.mjs.map +1 -0
- package/dist/migration-log-DoytJNuF.mjs +222 -0
- package/dist/migration-log-DoytJNuF.mjs.map +1 -0
- package/dist/migration-path-target-DjbhWi_5.mjs +38 -0
- package/dist/migration-path-target-DjbhWi_5.mjs.map +1 -0
- package/dist/{migration-plan-9DJ7q7_z.mjs → migration-plan-CgCXpjYD.mjs} +6 -7
- package/dist/{migration-plan-9DJ7q7_z.mjs.map → migration-plan-CgCXpjYD.mjs.map} +1 -1
- package/dist/migration-status-ByptVtRZ.mjs +446 -0
- package/dist/migration-status-ByptVtRZ.mjs.map +1 -0
- package/dist/{output-B60Gw5fu.mjs → output-mEQ74_nd.mjs} +1 -1
- package/dist/{output-B60Gw5fu.mjs.map → output-mEQ74_nd.mjs.map} +1 -1
- package/dist/{progress-adapter-C644QK8l.mjs → progress-adapter-CjAeTxY_.mjs} +1 -1
- package/dist/{progress-adapter-C644QK8l.mjs.map → progress-adapter-CjAeTxY_.mjs.map} +1 -1
- package/dist/{ref-advancement-DUZqsue6.mjs → ref-advancement-BkXlikCA.mjs} +1 -1
- package/dist/{ref-advancement-DUZqsue6.mjs.map → ref-advancement-BkXlikCA.mjs.map} +1 -1
- package/dist/schemas-CeGMYFYX.d.mts +191 -0
- package/dist/schemas-CeGMYFYX.d.mts.map +1 -0
- package/dist/schemas-KhXMzNA_.mjs +112 -0
- package/dist/schemas-KhXMzNA_.mjs.map +1 -0
- package/dist/telemetry-DVv3V0gj.mjs +122 -0
- package/dist/telemetry-DVv3V0gj.mjs.map +1 -0
- package/dist/{terminal-ui-5Y6mrg93.d.mts → terminal-ui-DGRNFWna.d.mts} +1 -1
- package/dist/terminal-ui-DGRNFWna.d.mts.map +1 -0
- package/dist/{types-Dt_SfqFm.d.mts → types-BepB6ydp.d.mts} +44 -31
- package/dist/types-BepB6ydp.d.mts.map +1 -0
- package/dist/{verify-DCA9Sldu.mjs → verify-CJpG9m7-.mjs} +2 -2
- package/dist/{verify-DCA9Sldu.mjs.map → verify-CJpG9m7-.mjs.map} +1 -1
- package/package.json +25 -22
- package/src/cli.ts +5 -0
- package/src/commands/db-update.ts +7 -1
- package/src/commands/init/index.ts +6 -35
- package/src/commands/init/init.ts +1 -14
- package/src/commands/init/inputs.ts +0 -75
- package/src/commands/json/schemas.ts +195 -0
- package/src/commands/migrate.ts +518 -8
- package/src/commands/migration-check.ts +469 -134
- package/src/commands/migration-graph.ts +164 -91
- package/src/commands/migration-list.ts +72 -39
- package/src/commands/migration-log.ts +52 -102
- package/src/commands/migration-show.ts +31 -66
- package/src/commands/migration-status-overlay.ts +61 -0
- package/src/commands/migration-status.ts +457 -1067
- package/src/commands/telemetry/index.ts +107 -0
- package/src/commands/telemetry/status.ts +67 -0
- package/src/control-api/client.ts +20 -9
- package/src/control-api/operations/contract-emit.ts +2 -2
- package/src/control-api/operations/db-init.ts +3 -3
- package/src/control-api/operations/{db-apply.ts → db-run.ts} +51 -13
- package/src/control-api/operations/db-update.ts +4 -4
- package/src/control-api/operations/db-verify.ts +15 -5
- package/src/control-api/operations/{migration-apply.ts → migrate.ts} +181 -80
- package/src/control-api/operations/{apply.ts → run-migration.ts} +33 -27
- package/src/control-api/types.ts +46 -29
- package/src/utils/cli-errors.ts +70 -2
- package/src/utils/formatters/errors.ts +11 -0
- package/src/utils/formatters/migration-graph-lane-colors.ts +194 -0
- package/src/utils/formatters/migration-graph-layout.ts +227 -38
- package/src/utils/formatters/migration-graph-rows.ts +128 -15
- package/src/utils/formatters/migration-graph-space-render.ts +148 -0
- package/src/utils/formatters/migration-graph-tree-render.ts +959 -81
- package/src/utils/formatters/migration-list-data-column.ts +4 -91
- package/src/utils/formatters/migration-list-graph-topology.ts +72 -94
- package/src/utils/formatters/migration-list-render.ts +135 -71
- package/src/utils/formatters/migration-list-styler.ts +46 -5
- package/src/utils/formatters/migration-list-types.ts +5 -21
- package/src/utils/formatters/migration-log-table.ts +205 -0
- package/src/utils/formatters/migrations.ts +33 -11
- package/src/utils/global-flags.ts +35 -0
- package/src/utils/integrity-violation-to-check-failure.ts +28 -19
- package/src/utils/legend.ts +38 -0
- package/src/utils/migration-path-target.ts +60 -0
- package/src/utils/telemetry.ts +68 -32
- package/dist/client-KgJorIvG.mjs.map +0 -1
- package/dist/command-helpers-Bbw1GbwL.mjs.map +0 -1
- package/dist/commands/migration-list.mjs.map +0 -1
- package/dist/commands/migration-log.mjs.map +0 -1
- package/dist/commands/migration-status.mjs.map +0 -1
- package/dist/extension-pack-inputs-IDvjRCi3.mjs +0 -62
- package/dist/extension-pack-inputs-IDvjRCi3.mjs.map +0 -1
- package/dist/graph-render-rFAqZujX.mjs +0 -1081
- package/dist/graph-render-rFAqZujX.mjs.map +0 -1
- package/dist/init-Cv9UzWL5.mjs.map +0 -1
- package/dist/migration-check-BiBJoYYW.mjs +0 -341
- package/dist/migration-check-BiBJoYYW.mjs.map +0 -1
- package/dist/migration-graph-D7DVUElV.mjs +0 -1232
- package/dist/migration-graph-D7DVUElV.mjs.map +0 -1
- package/dist/migration-list-styler-BRwF4-gy.mjs +0 -399
- package/dist/migration-list-styler-BRwF4-gy.mjs.map +0 -1
- package/dist/migration-types-D2FW63pr.d.mts +0 -15
- package/dist/migration-types-D2FW63pr.d.mts.map +0 -1
- package/dist/migrations-Cv2jxNNK.mjs +0 -228
- package/dist/migrations-Cv2jxNNK.mjs.map +0 -1
- package/dist/terminal-ui-5Y6mrg93.d.mts.map +0 -1
- package/dist/types-Dt_SfqFm.d.mts.map +0 -1
- package/src/utils/formatters/graph-migration-mapper.ts +0 -235
- package/src/utils/formatters/graph-render.ts +0 -1323
- package/src/utils/formatters/graph-types.ts +0 -120
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import type { MigrationGraph } from '@prisma-next/migration-tools/graph';
|
|
2
|
+
import type { GlyphMode } from '../glyph-mode';
|
|
3
|
+
import { buildMigrationGraphLayout } from './migration-graph-layout';
|
|
4
|
+
import { buildMigrationGraphRows } from './migration-graph-rows';
|
|
5
|
+
import {
|
|
6
|
+
computeMaxDirNameLengthForLayout,
|
|
7
|
+
computeMaxEdgeTreePrefixWidthForLayout,
|
|
8
|
+
type MigrationEdgeAnnotation,
|
|
9
|
+
renderMigrationGraphTree,
|
|
10
|
+
} from './migration-graph-tree-render';
|
|
11
|
+
import {
|
|
12
|
+
buildEdgeAnnotationsByHashFromListEntries,
|
|
13
|
+
buildRefsByHashFromListEntries,
|
|
14
|
+
type MigrationListStyler,
|
|
15
|
+
} from './migration-list-render';
|
|
16
|
+
import type { MigrationListEntry } from './migration-list-types';
|
|
17
|
+
|
|
18
|
+
export { buildEdgeAnnotationsByHashFromListEntries } from './migration-list-render';
|
|
19
|
+
|
|
20
|
+
export function mergeMigrationEdgeAnnotations(
|
|
21
|
+
listOverlay: ReadonlyMap<string, MigrationEdgeAnnotation>,
|
|
22
|
+
statusOverlay: ReadonlyMap<string, MigrationEdgeAnnotation>,
|
|
23
|
+
): ReadonlyMap<string, MigrationEdgeAnnotation> {
|
|
24
|
+
const merged = new Map<string, MigrationEdgeAnnotation>();
|
|
25
|
+
for (const [migrationHash, listAnnotation] of listOverlay) {
|
|
26
|
+
const statusAnnotation = statusOverlay.get(migrationHash);
|
|
27
|
+
merged.set(migrationHash, {
|
|
28
|
+
...listAnnotation,
|
|
29
|
+
...(statusAnnotation?.status !== undefined ? { status: statusAnnotation.status } : {}),
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
return merged;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface RenderMigrationGraphSpaceTreeInput {
|
|
36
|
+
readonly graph: MigrationGraph;
|
|
37
|
+
readonly migrations: readonly MigrationListEntry[];
|
|
38
|
+
readonly liveContractHash: string;
|
|
39
|
+
readonly glyphMode: GlyphMode;
|
|
40
|
+
readonly colorize: boolean;
|
|
41
|
+
readonly refsByHash?: ReadonlyMap<string, readonly string[]>;
|
|
42
|
+
readonly statusOverlayByHash?: ReadonlyMap<string, MigrationEdgeAnnotation>;
|
|
43
|
+
readonly dbHash?: string;
|
|
44
|
+
readonly styler?: MigrationListStyler;
|
|
45
|
+
readonly globalMaxEdgeTreePrefixWidth?: number;
|
|
46
|
+
readonly globalMaxDirNameWidth?: number;
|
|
47
|
+
/**
|
|
48
|
+
* Whether this render is for the app space. When false, `contractHash` is
|
|
49
|
+
* not forwarded to `buildMigrationGraphRows` (suppressing the floating
|
|
50
|
+
* working-contract node) and `isAppSpace: false` is passed to
|
|
51
|
+
* `renderMigrationGraphTree` (suppressing the `@contract` marker).
|
|
52
|
+
* Defaults to `true` so single-space callers are unaffected.
|
|
53
|
+
*/
|
|
54
|
+
readonly isAppSpace?: boolean;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export interface ComputeGlobalMaxEdgeTreePrefixWidthInput {
|
|
58
|
+
readonly graph: MigrationGraph;
|
|
59
|
+
readonly liveContractHash: string;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function computeGlobalMaxEdgeTreePrefixWidth(
|
|
63
|
+
inputs: readonly ComputeGlobalMaxEdgeTreePrefixWidthInput[],
|
|
64
|
+
): number {
|
|
65
|
+
let globalMax = 0;
|
|
66
|
+
for (const input of inputs) {
|
|
67
|
+
const rowModel = buildMigrationGraphRows(input.graph, {
|
|
68
|
+
contractHash: input.liveContractHash,
|
|
69
|
+
});
|
|
70
|
+
const layout = buildMigrationGraphLayout(rowModel);
|
|
71
|
+
globalMax = Math.max(globalMax, computeMaxEdgeTreePrefixWidthForLayout(layout));
|
|
72
|
+
}
|
|
73
|
+
return globalMax;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function computeGlobalMaxDirNameWidth(
|
|
77
|
+
inputs: readonly ComputeGlobalMaxEdgeTreePrefixWidthInput[],
|
|
78
|
+
): number {
|
|
79
|
+
let globalMax = 0;
|
|
80
|
+
for (const input of inputs) {
|
|
81
|
+
const rowModel = buildMigrationGraphRows(input.graph, {
|
|
82
|
+
contractHash: input.liveContractHash,
|
|
83
|
+
});
|
|
84
|
+
const layout = buildMigrationGraphLayout(rowModel);
|
|
85
|
+
globalMax = Math.max(globalMax, computeMaxDirNameLengthForLayout(layout));
|
|
86
|
+
}
|
|
87
|
+
return globalMax;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
function renderMigrationGraphSpaceTreeInternal(input: RenderMigrationGraphSpaceTreeInput): string {
|
|
91
|
+
const appSpace = input.isAppSpace !== false;
|
|
92
|
+
const rowModel = buildMigrationGraphRows(input.graph, {
|
|
93
|
+
...(appSpace ? { contractHash: input.liveContractHash } : {}),
|
|
94
|
+
});
|
|
95
|
+
const layout = buildMigrationGraphLayout(rowModel);
|
|
96
|
+
const listOverlay = buildEdgeAnnotationsByHashFromListEntries(input.migrations);
|
|
97
|
+
const edgeAnnotationsByHash =
|
|
98
|
+
input.statusOverlayByHash === undefined
|
|
99
|
+
? listOverlay
|
|
100
|
+
: mergeMigrationEdgeAnnotations(listOverlay, input.statusOverlayByHash);
|
|
101
|
+
return renderMigrationGraphTree(layout, {
|
|
102
|
+
refsByHash: input.refsByHash ?? buildRefsByHashFromListEntries(input.migrations),
|
|
103
|
+
contractHash: input.liveContractHash,
|
|
104
|
+
isAppSpace: appSpace,
|
|
105
|
+
edgeAnnotationsByHash,
|
|
106
|
+
colorize: input.colorize,
|
|
107
|
+
glyphMode: input.glyphMode,
|
|
108
|
+
...(input.dbHash !== undefined ? { dbHash: input.dbHash } : {}),
|
|
109
|
+
...(input.styler !== undefined ? { styler: input.styler } : {}),
|
|
110
|
+
...(input.globalMaxEdgeTreePrefixWidth !== undefined
|
|
111
|
+
? { globalMaxEdgeTreePrefixWidth: input.globalMaxEdgeTreePrefixWidth }
|
|
112
|
+
: {}),
|
|
113
|
+
...(input.globalMaxDirNameWidth !== undefined
|
|
114
|
+
? { globalMaxDirNameWidth: input.globalMaxDirNameWidth }
|
|
115
|
+
: {}),
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export function renderMigrationGraphSpaceTree(input: RenderMigrationGraphSpaceTreeInput): string {
|
|
120
|
+
return renderMigrationGraphSpaceTreeInternal(input);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export function renderMigrationGraphSpaceTrees(
|
|
124
|
+
inputs: readonly RenderMigrationGraphSpaceTreeInput[],
|
|
125
|
+
): readonly string[] {
|
|
126
|
+
const globalMaxTreePrefix =
|
|
127
|
+
inputs.length > 1 ? computeGlobalMaxEdgeTreePrefixWidth(inputs) : undefined;
|
|
128
|
+
const globalMaxDirName = inputs.length > 1 ? computeGlobalMaxDirNameWidth(inputs) : undefined;
|
|
129
|
+
return inputs.map((input) =>
|
|
130
|
+
renderMigrationGraphSpaceTreeInternal({
|
|
131
|
+
...input,
|
|
132
|
+
...(globalMaxTreePrefix !== undefined
|
|
133
|
+
? { globalMaxEdgeTreePrefixWidth: globalMaxTreePrefix }
|
|
134
|
+
: {}),
|
|
135
|
+
...(globalMaxDirName !== undefined ? { globalMaxDirNameWidth: globalMaxDirName } : {}),
|
|
136
|
+
}),
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
export function indentMigrationGraphTreeBlock(treeOutput: string, indent: string): string {
|
|
141
|
+
if (treeOutput.length === 0) {
|
|
142
|
+
return treeOutput;
|
|
143
|
+
}
|
|
144
|
+
return treeOutput
|
|
145
|
+
.split('\n')
|
|
146
|
+
.map((line) => (line.length === 0 ? line : `${indent}${line}`))
|
|
147
|
+
.join('\n');
|
|
148
|
+
}
|