@kubb/cli 5.11.4 → 5.11.6
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/{Telemetry-Be1nltUh.cjs → Telemetry-Be3hIy6_.cjs} +2 -42
- package/dist/Telemetry-Be3hIy6_.cjs.map +1 -0
- package/dist/{Telemetry-CwaVQsvD.js → Telemetry-CfJAUDnh.js} +3 -31
- package/dist/Telemetry-CfJAUDnh.js.map +1 -0
- package/dist/{background-CQPyCSn0.js → background-BBpH2jmk.js} +7 -5
- package/dist/background-BBpH2jmk.js.map +1 -0
- package/dist/{background-mKdZ5HRx.cjs → background-BW-e9FCX.cjs} +5 -4
- package/dist/background-BW-e9FCX.cjs.map +1 -0
- package/dist/{background-aTbwrgui.js → background-DS2zOde-.js} +1 -1
- package/dist/config-Bh00Hwpw.js +132 -0
- package/dist/config-Bh00Hwpw.js.map +1 -0
- package/dist/config-D63Gum4F.cjs +169 -0
- package/dist/config-D63Gum4F.cjs.map +1 -0
- package/dist/config-iVdOcpro.js +1 -0
- package/dist/credentials-CZK6zPLv.js.map +1 -1
- package/dist/credentials-DDaKqtJn.cjs.map +1 -1
- package/dist/errors-Cl69p_vI.cjs +43 -0
- package/dist/errors-Cl69p_vI.cjs.map +1 -0
- package/dist/errors-DmC83ALX.js +32 -0
- package/dist/errors-DmC83ALX.js.map +1 -0
- package/dist/index.cjs +872 -307
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +863 -298
- package/dist/index.js.map +1 -1
- package/dist/registry-BlKLO4ft.cjs +272 -0
- package/dist/registry-BlKLO4ft.cjs.map +1 -0
- package/dist/registry-CgQYxUju.js +200 -0
- package/dist/registry-CgQYxUju.js.map +1 -0
- package/dist/reporters-Dl8lrJZG.js +817 -0
- package/dist/reporters-Dl8lrJZG.js.map +1 -0
- package/dist/reporters-TkCgd4dS.cjs +829 -0
- package/dist/reporters-TkCgd4dS.cjs.map +1 -0
- package/dist/{run-YHth5Afz.js → run-BJn0RSW2.js} +170 -76
- package/dist/run-BJn0RSW2.js.map +1 -0
- package/dist/{run-BWRmQxtE.cjs → run-BszyZwY3.cjs} +176 -82
- package/dist/run-BszyZwY3.cjs.map +1 -0
- package/dist/{run-Bczs5vbI.cjs → run-BtVKUjdK.cjs} +4 -3
- package/dist/{run-Bczs5vbI.cjs.map → run-BtVKUjdK.cjs.map} +1 -1
- package/dist/run-CFf0yxyY.cjs +94 -0
- package/dist/run-CFf0yxyY.cjs.map +1 -0
- package/dist/run-D_dD7xHp.js +93 -0
- package/dist/run-D_dD7xHp.js.map +1 -0
- package/dist/run-DsJJCzQD.js +1 -0
- package/dist/{run-B6VxJ_VM.js → run-KuzAqsjg.js} +3 -2
- package/dist/{run-B6VxJ_VM.js.map → run-KuzAqsjg.js.map} +1 -1
- package/dist/run-TrjCNL8e.cjs +227 -0
- package/dist/run-TrjCNL8e.cjs.map +1 -0
- package/dist/run-wkN1irUo.js +224 -0
- package/dist/run-wkN1irUo.js.map +1 -0
- package/dist/{snapshot-Cilp10vE.js → snapshot-CdGwHH15.js} +49 -62
- package/dist/snapshot-CdGwHH15.js.map +1 -0
- package/dist/{snapshot-D_rXnnMH.cjs → snapshot-u4L8mh4Y.cjs} +51 -64
- package/dist/snapshot-u4L8mh4Y.cjs.map +1 -0
- package/dist/status-DHPeR3bq.js +77 -0
- package/dist/status-DHPeR3bq.js.map +1 -0
- package/dist/status-dpSvxxtN.cjs +78 -0
- package/dist/status-dpSvxxtN.cjs.map +1 -0
- package/dist/studioWorker.js +2 -2
- package/dist/summary-6-rotl2L.cjs +46 -0
- package/dist/summary-6-rotl2L.cjs.map +1 -0
- package/dist/summary-DkSLti6f.js +41 -0
- package/dist/summary-DkSLti6f.js.map +1 -0
- package/dist/text-CMP4M19Z.js +239 -0
- package/dist/text-CMP4M19Z.js.map +1 -0
- package/dist/text-CknhKMvM.cjs +341 -0
- package/dist/text-CknhKMvM.cjs.map +1 -0
- package/dist/utils-CnjEJIdZ.js +612 -0
- package/dist/utils-CnjEJIdZ.js.map +1 -0
- package/dist/utils-DpKrXR2t.cjs +727 -0
- package/dist/utils-DpKrXR2t.cjs.map +1 -0
- package/package.json +7 -7
- package/dist/Telemetry-Be1nltUh.cjs.map +0 -1
- package/dist/Telemetry-CwaVQsvD.js.map +0 -1
- package/dist/background-CQPyCSn0.js.map +0 -1
- package/dist/background-mKdZ5HRx.cjs.map +0 -1
- package/dist/config-B56ZuVhi.js +0 -95
- package/dist/config-B56ZuVhi.js.map +0 -1
- package/dist/config-Cs4N79Fm.cjs +0 -113
- package/dist/config-Cs4N79Fm.cjs.map +0 -1
- package/dist/output-HgzJqkSF.cjs +0 -1076
- package/dist/output-HgzJqkSF.cjs.map +0 -1
- package/dist/output-PhkPtNP7.js +0 -937
- package/dist/output-PhkPtNP7.js.map +0 -1
- package/dist/registry-DYUhC7rH.js +0 -115
- package/dist/registry-DYUhC7rH.js.map +0 -1
- package/dist/registry-tk-v78fd.cjs +0 -157
- package/dist/registry-tk-v78fd.cjs.map +0 -1
- package/dist/run-AfjIBtiL.js +0 -39
- package/dist/run-AfjIBtiL.js.map +0 -1
- package/dist/run-BWRmQxtE.cjs.map +0 -1
- package/dist/run-B_Gr9TJ4.cjs +0 -345
- package/dist/run-B_Gr9TJ4.cjs.map +0 -1
- package/dist/run-CwrI0wRy.js +0 -1
- package/dist/run-DDoJGjWT.cjs +0 -40
- package/dist/run-DDoJGjWT.cjs.map +0 -1
- package/dist/run-SYKj8-Q5.js +0 -343
- package/dist/run-SYKj8-Q5.js.map +0 -1
- package/dist/run-YHth5Afz.js.map +0 -1
- package/dist/snapshot-Cilp10vE.js.map +0 -1
- package/dist/snapshot-D_rXnnMH.cjs.map +0 -1
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
import "./rolldown-runtime-CRm0XQPb.js";
|
|
2
|
+
import { s as isCIEnvironment } from "./Telemetry-CfJAUDnh.js";
|
|
3
|
+
import { styleText } from "node:util";
|
|
4
|
+
import { getAgentProfile } from "gunshi/agent";
|
|
5
|
+
import * as clack from "@clack/prompts";
|
|
6
|
+
//#region src/utils/env.ts
|
|
7
|
+
/**
|
|
8
|
+
* Returns `true` when the process has an interactive TTY with a valid terminal
|
|
9
|
+
* width and is not running in CI.
|
|
10
|
+
*
|
|
11
|
+
* Some IDE-embedded terminals report `isTTY = true` but set `columns` to `0`,
|
|
12
|
+
* which breaks clack's box-drawing helpers (they call `String.prototype.repeat`
|
|
13
|
+
* with a negative count and throw a `RangeError`). A positive column count is
|
|
14
|
+
* required before the TTY counts as usable.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```ts
|
|
18
|
+
* if (canUseTTY()) {
|
|
19
|
+
* renderProgressBar()
|
|
20
|
+
* }
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
function canUseTTY() {
|
|
24
|
+
return process.stdout.isTTY && (process.stdout.columns ?? 0) > 0 && !isCIEnvironment();
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Returns `true` when output can carry spinners and clack's gutter: an interactive TTY that no AI
|
|
28
|
+
* coding agent is reading. Cursor-movement escapes are hard for an agent to parse even over a
|
|
29
|
+
* pseudo-TTY, so it gets the plain writer.
|
|
30
|
+
*/
|
|
31
|
+
function isRichOutput() {
|
|
32
|
+
return canUseTTY() && !getAgentProfile().isAgent;
|
|
33
|
+
}
|
|
34
|
+
//#endregion
|
|
35
|
+
//#region src/loggers/clackWriter.ts
|
|
36
|
+
/**
|
|
37
|
+
* Draws with clack for local development: a gutter bar per group, animated steps, and a progress
|
|
38
|
+
* bar for the writes.
|
|
39
|
+
*/
|
|
40
|
+
const clackWriter = {
|
|
41
|
+
audience: "human",
|
|
42
|
+
group: (title) => clack.intro(title),
|
|
43
|
+
groupEnd: (text) => clack.outro(text),
|
|
44
|
+
step: (text) => clack.log.step(text, { spacing: 0 }),
|
|
45
|
+
info: (text) => clack.log.info(text),
|
|
46
|
+
success: (text) => clack.log.success(text),
|
|
47
|
+
warn: (text) => clack.log.warn(text),
|
|
48
|
+
error: (text) => clack.log.error(text),
|
|
49
|
+
block: (lines) => clack.log.message(lines, { spacing: 0 }),
|
|
50
|
+
raw: (lines) => console.log(styleText("dim", lines.join("\n"))),
|
|
51
|
+
diagnostic: (lines) => clack.log.message(lines, {
|
|
52
|
+
symbol: "",
|
|
53
|
+
secondarySymbol: ""
|
|
54
|
+
}),
|
|
55
|
+
update: (lines, title) => clack.box(lines.join("\n"), title, {
|
|
56
|
+
width: "auto",
|
|
57
|
+
formatBorder: (border) => styleText("yellow", border),
|
|
58
|
+
rounded: true,
|
|
59
|
+
withGuide: false,
|
|
60
|
+
contentAlign: "center",
|
|
61
|
+
titleAlign: "center"
|
|
62
|
+
}),
|
|
63
|
+
spinner: () => clack.spinner(),
|
|
64
|
+
progress(max) {
|
|
65
|
+
const bar = clack.progress({
|
|
66
|
+
style: "block",
|
|
67
|
+
max,
|
|
68
|
+
size: 30
|
|
69
|
+
});
|
|
70
|
+
return {
|
|
71
|
+
start: (text) => bar.start(text),
|
|
72
|
+
advance: (text) => bar.advance(1, text),
|
|
73
|
+
stop: (text) => bar.stop(text)
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
//#endregion
|
|
78
|
+
//#region src/loggers/plainWriter.ts
|
|
79
|
+
/**
|
|
80
|
+
* Prefixes that stand in for the symbols clack draws, so plain output reads the same way.
|
|
81
|
+
*/
|
|
82
|
+
const SYMBOLS = {
|
|
83
|
+
info: "ℹ",
|
|
84
|
+
warn: "⚠",
|
|
85
|
+
error: "✗",
|
|
86
|
+
step: "◇"
|
|
87
|
+
};
|
|
88
|
+
/**
|
|
89
|
+
* Draws with one `write` call per line, e.g. `console.error` so stdout carries only JSON. Nothing
|
|
90
|
+
* animates, so a step prints at start and end.
|
|
91
|
+
*/
|
|
92
|
+
function createPlainWriter(write) {
|
|
93
|
+
return {
|
|
94
|
+
audience: "agent",
|
|
95
|
+
group: write,
|
|
96
|
+
groupEnd: write,
|
|
97
|
+
step: (text) => write(`${SYMBOLS.step} ${text}`),
|
|
98
|
+
info: write,
|
|
99
|
+
success: write,
|
|
100
|
+
warn: write,
|
|
101
|
+
error: (text) => write(`${SYMBOLS.error} ${text}`),
|
|
102
|
+
block: (lines) => write(lines.join("\n")),
|
|
103
|
+
raw: (lines) => write(lines.join("\n")),
|
|
104
|
+
diagnostic: (lines) => write(lines.join("\n")),
|
|
105
|
+
update: (lines, title) => write([title, ...lines].join("\n")),
|
|
106
|
+
spinner: () => ({
|
|
107
|
+
start: write,
|
|
108
|
+
message: write,
|
|
109
|
+
clear: () => {},
|
|
110
|
+
stop: (text) => text && write(text),
|
|
111
|
+
error: (text) => write(`${SYMBOLS.error} ${text}`)
|
|
112
|
+
}),
|
|
113
|
+
progress: () => ({
|
|
114
|
+
start: write,
|
|
115
|
+
advance: write,
|
|
116
|
+
stop: (text) => text && write(text)
|
|
117
|
+
})
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Draws on the console, for non-TTY environments and for an AI coding agent reading the output.
|
|
122
|
+
* Reports the same run in the same order as `clackWriter`, without the animation.
|
|
123
|
+
*/
|
|
124
|
+
const plainWriter = createPlainWriter((line) => console.log(line));
|
|
125
|
+
//#endregion
|
|
126
|
+
//#region src/ui/log.ts
|
|
127
|
+
/** The writer the loggers draw with on this terminal, so a command's own lines look like its run. */
|
|
128
|
+
function writer() {
|
|
129
|
+
return isRichOutput() ? clackWriter : plainWriter;
|
|
130
|
+
}
|
|
131
|
+
function write(level, message) {
|
|
132
|
+
if (isRichOutput()) {
|
|
133
|
+
clack.log[level](message);
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
console.log(`${SYMBOLS[level]} ${message}`);
|
|
137
|
+
}
|
|
138
|
+
/** Prints lines as one block, without a symbol in front of them. Not the writer's block, which drops clack's spacing around it. */
|
|
139
|
+
function logBlock(lines) {
|
|
140
|
+
if (isRichOutput()) {
|
|
141
|
+
clack.log.message(lines);
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
console.log([lines].flat().join("\n"));
|
|
145
|
+
}
|
|
146
|
+
function logInfo(message) {
|
|
147
|
+
write("info", message);
|
|
148
|
+
}
|
|
149
|
+
function logWarn(message) {
|
|
150
|
+
write("warn", message);
|
|
151
|
+
}
|
|
152
|
+
function logError(message) {
|
|
153
|
+
write("error", message);
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Reports a step the command is taking, rather than something it found.
|
|
157
|
+
*/
|
|
158
|
+
function logStep(message) {
|
|
159
|
+
write("step", message);
|
|
160
|
+
}
|
|
161
|
+
//#endregion
|
|
162
|
+
//#region src/ui/intro.ts
|
|
163
|
+
const SPONSOR_TIPS = [
|
|
164
|
+
"Your sponsorship keeps Kubb codegen, plugins, and docs maintained",
|
|
165
|
+
"Sponsor faster generators and better Kubb Studio workflows",
|
|
166
|
+
"Help keep Kubb free for TypeScript teams building APIs",
|
|
167
|
+
"Support React Query, Zod, Faker, and MSW integrations",
|
|
168
|
+
"Back open-source tools that turn OpenAPI into TypeScript",
|
|
169
|
+
"Sponsor fixes, releases, and new plugins for your API workflow",
|
|
170
|
+
"Help Kubb stay independent and focused on developer tools"
|
|
171
|
+
];
|
|
172
|
+
const SPONSOR_LINKS = [
|
|
173
|
+
"https://github.com/sponsors/stijnvanhulle",
|
|
174
|
+
"https://opencollective.com/kubb",
|
|
175
|
+
"https://kubb.dev/sponsors"
|
|
176
|
+
];
|
|
177
|
+
function nextTip() {
|
|
178
|
+
return `${SPONSOR_TIPS[Math.floor(Math.random() * SPONSOR_TIPS.length)]}: ${SPONSOR_LINKS[Math.floor(Math.random() * SPONSOR_LINKS.length)]}`;
|
|
179
|
+
}
|
|
180
|
+
function formatTip(tip) {
|
|
181
|
+
return styleText("magenta", " Tip ") + styleText("yellow", tip);
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Prints one random tip outside every group. Rich terminals get the styled variant;
|
|
185
|
+
* plain/CI output gets a stable text-only line so the tip is still visible as final output.
|
|
186
|
+
*/
|
|
187
|
+
function logTip() {
|
|
188
|
+
const tip = nextTip();
|
|
189
|
+
if (!isRichOutput()) {
|
|
190
|
+
console.log(`Tip: ${tip}`);
|
|
191
|
+
return;
|
|
192
|
+
}
|
|
193
|
+
console.log(`${styleText("magenta", "✦")}${formatTip(tip)}`);
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Opens a command's output. A command the banner already names passes no title.
|
|
197
|
+
*/
|
|
198
|
+
function logIntro({ title, warning, block = true }) {
|
|
199
|
+
if (block && isRichOutput()) {
|
|
200
|
+
if (title) clack.intro(title);
|
|
201
|
+
if (warning) clack.log.warn(warning);
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
if (title) console.log(title);
|
|
205
|
+
if (warning) console.warn(warning);
|
|
206
|
+
if (title || warning) console.log();
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* Closes the block {@link logIntro} opened. The closing gutter is not a written line, so plain
|
|
210
|
+
* output prints the text on its own.
|
|
211
|
+
*/
|
|
212
|
+
function logOutro(text) {
|
|
213
|
+
writer().groupEnd(text);
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* Prints one empty line between two groups, without clack's gutter bar, since the bar belongs to a
|
|
217
|
+
* group and a spacer sits outside every one.
|
|
218
|
+
*/
|
|
219
|
+
function logSpacer() {
|
|
220
|
+
console.log("");
|
|
221
|
+
}
|
|
222
|
+
/** Whether a run stops to ask something: no `--yes`, no `--dry-run`, and a person at a terminal. */
|
|
223
|
+
function isInteractiveRun({ yes, dryRun }) {
|
|
224
|
+
return !yes && !dryRun && process.stdin.isTTY === true;
|
|
225
|
+
}
|
|
226
|
+
//#endregion
|
|
227
|
+
//#region src/ui/text.ts
|
|
228
|
+
/** Counts a noun, so a message never reads `1 files`. */
|
|
229
|
+
function pluralize(count, noun) {
|
|
230
|
+
return `${count} ${count === 1 ? noun : `${noun}s`}`;
|
|
231
|
+
}
|
|
232
|
+
/** The flag that grants a permission, such as `--allow-read-ast`. */
|
|
233
|
+
function toPermissionFlag(key) {
|
|
234
|
+
return `--${key.replace(/[A-Z]/g, (char) => `-${char.toLowerCase()}`)}`;
|
|
235
|
+
}
|
|
236
|
+
//#endregion
|
|
237
|
+
export { isRichOutput as _, logOutro as a, logBlock as c, logStep as d, logWarn as f, canUseTTY as g, plainWriter as h, logIntro as i, logError as l, createPlainWriter as m, toPermissionFlag as n, logSpacer as o, writer as p, isInteractiveRun as r, logTip as s, pluralize as t, logInfo as u };
|
|
238
|
+
|
|
239
|
+
//# sourceMappingURL=text-CMP4M19Z.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text-CMP4M19Z.js","names":[],"sources":["../src/utils/env.ts","../src/loggers/clackWriter.ts","../src/loggers/plainWriter.ts","../src/ui/log.ts","../src/ui/intro.ts","../src/ui/text.ts"],"sourcesContent":["import { isCIEnvironment } from '@internals/utils'\nimport { getAgentProfile } from 'gunshi/agent'\n\n/**\n * Returns `true` when the process has an interactive TTY with a valid terminal\n * width and is not running in CI.\n *\n * Some IDE-embedded terminals report `isTTY = true` but set `columns` to `0`,\n * which breaks clack's box-drawing helpers (they call `String.prototype.repeat`\n * with a negative count and throw a `RangeError`). A positive column count is\n * required before the TTY counts as usable.\n *\n * @example\n * ```ts\n * if (canUseTTY()) {\n * renderProgressBar()\n * }\n * ```\n */\nexport function canUseTTY(): boolean {\n return process.stdout.isTTY && (process.stdout.columns ?? 0) > 0 && !isCIEnvironment()\n}\n\n/**\n * Returns `true` when output can carry spinners and clack's gutter: an interactive TTY that no AI\n * coding agent is reading. Cursor-movement escapes are hard for an agent to parse even over a\n * pseudo-TTY, so it gets the plain writer.\n */\nexport function isRichOutput(): boolean {\n return canUseTTY() && !getAgentProfile().isAgent\n}\n","import { styleText } from 'node:util'\nimport * as clack from '@clack/prompts'\nimport type { LoggerWriter } from './types.ts'\n\n/**\n * Draws with clack for local development: a gutter bar per group, animated steps, and a progress\n * bar for the writes.\n */\nexport const clackWriter: LoggerWriter = {\n audience: 'human',\n group: (title) => clack.intro(title),\n groupEnd: (text) => clack.outro(text),\n step: (text) => clack.log.step(text, { spacing: 0 }),\n info: (text) => clack.log.info(text),\n success: (text) => clack.log.success(text),\n warn: (text) => clack.log.warn(text),\n error: (text) => clack.log.error(text),\n block: (lines) => clack.log.message(lines, { spacing: 0 }),\n // A subprocess's output is not Kubb's tree, so it goes out past clack and its gutter bar. The\n // step above it is already stopped by the time this runs.\n raw: (lines) => console.log(styleText('dim', lines.join('\\n'))),\n // The diagnostic carries its own code and indented rows, so clear clack's gutter and bar and let\n // the block stand on its own.\n diagnostic: (lines) => clack.log.message(lines, { symbol: '', secondarySymbol: '' }),\n update: (lines, title) =>\n clack.box(lines.join('\\n'), title, {\n width: 'auto',\n formatBorder: (border: string) => styleText('yellow', border),\n rounded: true,\n withGuide: false,\n contentAlign: 'center',\n titleAlign: 'center',\n }),\n spinner: () => clack.spinner(),\n progress(max) {\n const bar = clack.progress({ style: 'block', max, size: 30 })\n\n return {\n start: (text) => bar.start(text),\n advance: (text) => bar.advance(1, text),\n stop: (text) => bar.stop(text),\n }\n },\n}\n","import type { LoggerWriter } from './types.ts'\n\n/**\n * Prefixes that stand in for the symbols clack draws, so plain output reads the same way.\n */\nexport const SYMBOLS = { info: 'ℹ', warn: '⚠', error: '✗', step: '◇' } as const\n\n/**\n * Draws with one `write` call per line, e.g. `console.error` so stdout carries only JSON. Nothing\n * animates, so a step prints at start and end.\n */\nexport function createPlainWriter(write: (line: string) => void): LoggerWriter {\n return {\n audience: 'agent',\n group: write,\n groupEnd: write,\n step: (text) => write(`${SYMBOLS.step} ${text}`),\n info: write,\n success: write,\n warn: write,\n error: (text) => write(`${SYMBOLS.error} ${text}`),\n block: (lines) => write(lines.join('\\n')),\n raw: (lines) => write(lines.join('\\n')),\n diagnostic: (lines) => write(lines.join('\\n')),\n update: (lines, title) => write([title, ...lines].join('\\n')),\n spinner: () => ({\n start: write,\n message: write,\n clear: () => {},\n stop: (text) => text && write(text),\n error: (text) => write(`${SYMBOLS.error} ${text}`),\n }),\n progress: () => ({\n start: write,\n advance: write,\n stop: (text) => text && write(text),\n }),\n }\n}\n\n/**\n * Draws on the console, for non-TTY environments and for an AI coding agent reading the output.\n * Reports the same run in the same order as `clackWriter`, without the animation.\n */\nexport const plainWriter = createPlainWriter((line) => console.log(line))\n","import * as prompts from '@clack/prompts'\nimport { isRichOutput } from '../utils/env.ts'\nimport { clackWriter } from '../loggers/clackWriter.ts'\nimport { plainWriter, SYMBOLS } from '../loggers/plainWriter.ts'\nimport type { LoggerWriter } from '../loggers/types.ts'\n\n/** The writer the loggers draw with on this terminal, so a command's own lines look like its run. */\nexport function writer(): LoggerWriter {\n return isRichOutput() ? clackWriter : plainWriter\n}\n\ntype Level = keyof typeof SYMBOLS\n\n// Not through the writers: in plain output a command's own info and warning carry their symbol, and clack's step keeps its spacing.\nfunction write(level: Level, message: string): void {\n if (isRichOutput()) {\n prompts.log[level](message)\n\n return\n }\n\n console.log(`${SYMBOLS[level]} ${message}`)\n}\n\n/** Prints lines as one block, without a symbol in front of them. Not the writer's block, which drops clack's spacing around it. */\nexport function logBlock(lines: string | Array<string>): void {\n if (isRichOutput()) {\n prompts.log.message(lines)\n\n return\n }\n\n console.log([lines].flat().join('\\n'))\n}\n\nexport function logInfo(message: string): void {\n write('info', message)\n}\n\nexport function logWarn(message: string): void {\n write('warn', message)\n}\n\nexport function logError(message: string): void {\n write('error', message)\n}\n\n/**\n * Reports a step the command is taking, rather than something it found.\n */\nexport function logStep(message: string): void {\n write('step', message)\n}\n","import { styleText } from 'node:util'\nimport * as prompts from '@clack/prompts'\nimport { isRichOutput } from '../utils/env.ts'\nimport { writer } from './log.ts'\n\nconst SPONSOR_TIPS = [\n 'Your sponsorship keeps Kubb codegen, plugins, and docs maintained',\n 'Sponsor faster generators and better Kubb Studio workflows',\n 'Help keep Kubb free for TypeScript teams building APIs',\n 'Support React Query, Zod, Faker, and MSW integrations',\n 'Back open-source tools that turn OpenAPI into TypeScript',\n 'Sponsor fixes, releases, and new plugins for your API workflow',\n 'Help Kubb stay independent and focused on developer tools',\n] as const\n\nconst SPONSOR_LINKS = ['https://github.com/sponsors/stijnvanhulle', 'https://opencollective.com/kubb', 'https://kubb.dev/sponsors'] as const\n\nfunction nextTip(): string {\n const tip = SPONSOR_TIPS[Math.floor(Math.random() * SPONSOR_TIPS.length)]!\n const link = SPONSOR_LINKS[Math.floor(Math.random() * SPONSOR_LINKS.length)]!\n return `${tip}: ${link}`\n}\n\nfunction formatTip(tip: string): string {\n return styleText('magenta', ' Tip ') + styleText('yellow', tip)\n}\n\n/**\n * Prints one random tip outside every group. Rich terminals get the styled variant;\n * plain/CI output gets a stable text-only line so the tip is still visible as final output.\n */\nexport function logTip(): void {\n const tip = nextTip()\n if (!isRichOutput()) {\n console.log(`Tip: ${tip}`)\n return\n }\n\n console.log(`${styleText('magenta', '✦')}${formatTip(tip)}`)\n}\n\ntype IntroOptions = {\n title?: string\n /**\n * Printed under the title, for a command that has a caveat to lead with.\n */\n warning?: string\n /**\n * Whether to open a block a later {@link logOutro} closes. Pass `false` for a command that\n * prints and exits, since nothing would ever close the block.\n *\n * @default true\n */\n block?: boolean\n}\n\n/**\n * Opens a command's output. A command the banner already names passes no title.\n */\nexport function logIntro({ title, warning, block = true }: IntroOptions): void {\n if (block && isRichOutput()) {\n if (title) prompts.intro(title)\n\n if (warning) {\n prompts.log.warn(warning)\n }\n\n return\n }\n\n if (title) {\n console.log(title)\n }\n\n if (warning) {\n console.warn(warning)\n }\n\n if (title || warning) {\n console.log()\n }\n}\n\n/**\n * Closes the block {@link logIntro} opened. The closing gutter is not a written line, so plain\n * output prints the text on its own.\n */\nexport function logOutro(text: string): void {\n writer().groupEnd(text)\n}\n\n/**\n * Prints one empty line between two groups, without clack's gutter bar, since the bar belongs to a\n * group and a spacer sits outside every one.\n */\nexport function logSpacer(): void {\n console.log('')\n}\n\n/** Whether a run stops to ask something: no `--yes`, no `--dry-run`, and a person at a terminal. */\nexport function isInteractiveRun({ yes, dryRun }: { yes?: unknown; dryRun?: unknown }): boolean {\n return !yes && !dryRun && process.stdin.isTTY === true\n}\n","/** Counts a noun, so a message never reads `1 files`. */\nexport function pluralize(count: number, noun: string): string {\n return `${count} ${count === 1 ? noun : `${noun}s`}`\n}\n\n/** The flag that grants a permission, such as `--allow-read-ast`. */\nexport function toPermissionFlag(key: string): string {\n return `--${key.replace(/[A-Z]/g, (char) => `-${char.toLowerCase()}`)}`\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAmBA,SAAgB,YAAqB;CACnC,OAAO,QAAQ,OAAO,UAAU,QAAQ,OAAO,WAAW,KAAK,KAAK,CAAC,gBAAgB;AACvF;;;;;;AAOA,SAAgB,eAAwB;CACtC,OAAO,UAAU,KAAK,CAAC,gBAAgB,CAAC,CAAC;AAC3C;;;;;;;ACtBA,MAAa,cAA4B;CACvC,UAAU;CACV,QAAQ,UAAU,MAAM,MAAM,KAAK;CACnC,WAAW,SAAS,MAAM,MAAM,IAAI;CACpC,OAAO,SAAS,MAAM,IAAI,KAAK,MAAM,EAAE,SAAS,EAAE,CAAC;CACnD,OAAO,SAAS,MAAM,IAAI,KAAK,IAAI;CACnC,UAAU,SAAS,MAAM,IAAI,QAAQ,IAAI;CACzC,OAAO,SAAS,MAAM,IAAI,KAAK,IAAI;CACnC,QAAQ,SAAS,MAAM,IAAI,MAAM,IAAI;CACrC,QAAQ,UAAU,MAAM,IAAI,QAAQ,OAAO,EAAE,SAAS,EAAE,CAAC;CAGzD,MAAM,UAAU,QAAQ,IAAI,UAAU,OAAO,MAAM,KAAK,IAAI,CAAC,CAAC;CAG9D,aAAa,UAAU,MAAM,IAAI,QAAQ,OAAO;EAAE,QAAQ;EAAI,iBAAiB;CAAG,CAAC;CACnF,SAAS,OAAO,UACd,MAAM,IAAI,MAAM,KAAK,IAAI,GAAG,OAAO;EACjC,OAAO;EACP,eAAe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AAG;EAC3B,IAAI,OAAO,MAAQ,MAAM,KAAK;EAE9B,IAAI,SACF,MAAQ,IAAI,KAAK,OAAO;EAG1B;CACF;CAEA,IAAI,OACF,QAAQ,IAAI,KAAK;CAGnB,IAAI,SACF,QAAQ,KAAK,OAAO;CAGtB,IAAI,SAAS,SACX,QAAQ,IAAI;AAEhB;;;;;AAMA,SAAgB,SAAS,MAAoB;CAC3C,OAAO,CAAC,CAAC,SAAS,IAAI;AACxB;;;;;AAMA,SAAgB,YAAkB;CAChC,QAAQ,IAAI,EAAE;AAChB;;AAGA,SAAgB,iBAAiB,EAAE,KAAK,UAAwD;CAC9F,OAAO,CAAC,OAAO,CAAC,UAAU,QAAQ,MAAM,UAAU;AACpD;;;;ACrGA,SAAgB,UAAU,OAAe,MAAsB;CAC7D,OAAO,GAAG,MAAM,GAAG,UAAU,IAAI,OAAO,GAAG,KAAK;AAClD;;AAGA,SAAgB,iBAAiB,KAAqB;CACpD,OAAO,KAAK,IAAI,QAAQ,WAAW,SAAS,IAAI,KAAK,YAAY,GAAG;AACtE"}
|
|
@@ -0,0 +1,341 @@
|
|
|
1
|
+
const require_rolldown_runtime = require("./rolldown-runtime-CPE0t6oh.cjs");
|
|
2
|
+
const require_Telemetry = require("./Telemetry-Be3hIy6_.cjs");
|
|
3
|
+
let node_util = require("node:util");
|
|
4
|
+
let gunshi_agent = require("gunshi/agent");
|
|
5
|
+
let _clack_prompts = require("@clack/prompts");
|
|
6
|
+
_clack_prompts = require_rolldown_runtime.__toESM(_clack_prompts, 1);
|
|
7
|
+
//#region src/utils/env.ts
|
|
8
|
+
/**
|
|
9
|
+
* Returns `true` when the process has an interactive TTY with a valid terminal
|
|
10
|
+
* width and is not running in CI.
|
|
11
|
+
*
|
|
12
|
+
* Some IDE-embedded terminals report `isTTY = true` but set `columns` to `0`,
|
|
13
|
+
* which breaks clack's box-drawing helpers (they call `String.prototype.repeat`
|
|
14
|
+
* with a negative count and throw a `RangeError`). A positive column count is
|
|
15
|
+
* required before the TTY counts as usable.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```ts
|
|
19
|
+
* if (canUseTTY()) {
|
|
20
|
+
* renderProgressBar()
|
|
21
|
+
* }
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
function canUseTTY() {
|
|
25
|
+
return process.stdout.isTTY && (process.stdout.columns ?? 0) > 0 && !require_Telemetry.isCIEnvironment();
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Returns `true` when output can carry spinners and clack's gutter: an interactive TTY that no AI
|
|
29
|
+
* coding agent is reading. Cursor-movement escapes are hard for an agent to parse even over a
|
|
30
|
+
* pseudo-TTY, so it gets the plain writer.
|
|
31
|
+
*/
|
|
32
|
+
function isRichOutput() {
|
|
33
|
+
return canUseTTY() && !(0, gunshi_agent.getAgentProfile)().isAgent;
|
|
34
|
+
}
|
|
35
|
+
//#endregion
|
|
36
|
+
//#region src/loggers/clackWriter.ts
|
|
37
|
+
/**
|
|
38
|
+
* Draws with clack for local development: a gutter bar per group, animated steps, and a progress
|
|
39
|
+
* bar for the writes.
|
|
40
|
+
*/
|
|
41
|
+
const clackWriter = {
|
|
42
|
+
audience: "human",
|
|
43
|
+
group: (title) => _clack_prompts.intro(title),
|
|
44
|
+
groupEnd: (text) => _clack_prompts.outro(text),
|
|
45
|
+
step: (text) => _clack_prompts.log.step(text, { spacing: 0 }),
|
|
46
|
+
info: (text) => _clack_prompts.log.info(text),
|
|
47
|
+
success: (text) => _clack_prompts.log.success(text),
|
|
48
|
+
warn: (text) => _clack_prompts.log.warn(text),
|
|
49
|
+
error: (text) => _clack_prompts.log.error(text),
|
|
50
|
+
block: (lines) => _clack_prompts.log.message(lines, { spacing: 0 }),
|
|
51
|
+
raw: (lines) => console.log((0, node_util.styleText)("dim", lines.join("\n"))),
|
|
52
|
+
diagnostic: (lines) => _clack_prompts.log.message(lines, {
|
|
53
|
+
symbol: "",
|
|
54
|
+
secondarySymbol: ""
|
|
55
|
+
}),
|
|
56
|
+
update: (lines, title) => _clack_prompts.box(lines.join("\n"), title, {
|
|
57
|
+
width: "auto",
|
|
58
|
+
formatBorder: (border) => (0, node_util.styleText)("yellow", border),
|
|
59
|
+
rounded: true,
|
|
60
|
+
withGuide: false,
|
|
61
|
+
contentAlign: "center",
|
|
62
|
+
titleAlign: "center"
|
|
63
|
+
}),
|
|
64
|
+
spinner: () => _clack_prompts.spinner(),
|
|
65
|
+
progress(max) {
|
|
66
|
+
const bar = _clack_prompts.progress({
|
|
67
|
+
style: "block",
|
|
68
|
+
max,
|
|
69
|
+
size: 30
|
|
70
|
+
});
|
|
71
|
+
return {
|
|
72
|
+
start: (text) => bar.start(text),
|
|
73
|
+
advance: (text) => bar.advance(1, text),
|
|
74
|
+
stop: (text) => bar.stop(text)
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
//#endregion
|
|
79
|
+
//#region src/loggers/plainWriter.ts
|
|
80
|
+
/**
|
|
81
|
+
* Prefixes that stand in for the symbols clack draws, so plain output reads the same way.
|
|
82
|
+
*/
|
|
83
|
+
const SYMBOLS = {
|
|
84
|
+
info: "ℹ",
|
|
85
|
+
warn: "⚠",
|
|
86
|
+
error: "✗",
|
|
87
|
+
step: "◇"
|
|
88
|
+
};
|
|
89
|
+
/**
|
|
90
|
+
* Draws with one `write` call per line, e.g. `console.error` so stdout carries only JSON. Nothing
|
|
91
|
+
* animates, so a step prints at start and end.
|
|
92
|
+
*/
|
|
93
|
+
function createPlainWriter(write) {
|
|
94
|
+
return {
|
|
95
|
+
audience: "agent",
|
|
96
|
+
group: write,
|
|
97
|
+
groupEnd: write,
|
|
98
|
+
step: (text) => write(`${SYMBOLS.step} ${text}`),
|
|
99
|
+
info: write,
|
|
100
|
+
success: write,
|
|
101
|
+
warn: write,
|
|
102
|
+
error: (text) => write(`${SYMBOLS.error} ${text}`),
|
|
103
|
+
block: (lines) => write(lines.join("\n")),
|
|
104
|
+
raw: (lines) => write(lines.join("\n")),
|
|
105
|
+
diagnostic: (lines) => write(lines.join("\n")),
|
|
106
|
+
update: (lines, title) => write([title, ...lines].join("\n")),
|
|
107
|
+
spinner: () => ({
|
|
108
|
+
start: write,
|
|
109
|
+
message: write,
|
|
110
|
+
clear: () => {},
|
|
111
|
+
stop: (text) => text && write(text),
|
|
112
|
+
error: (text) => write(`${SYMBOLS.error} ${text}`)
|
|
113
|
+
}),
|
|
114
|
+
progress: () => ({
|
|
115
|
+
start: write,
|
|
116
|
+
advance: write,
|
|
117
|
+
stop: (text) => text && write(text)
|
|
118
|
+
})
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Draws on the console, for non-TTY environments and for an AI coding agent reading the output.
|
|
123
|
+
* Reports the same run in the same order as `clackWriter`, without the animation.
|
|
124
|
+
*/
|
|
125
|
+
const plainWriter = createPlainWriter((line) => console.log(line));
|
|
126
|
+
//#endregion
|
|
127
|
+
//#region src/ui/log.ts
|
|
128
|
+
/** The writer the loggers draw with on this terminal, so a command's own lines look like its run. */
|
|
129
|
+
function writer() {
|
|
130
|
+
return isRichOutput() ? clackWriter : plainWriter;
|
|
131
|
+
}
|
|
132
|
+
function write(level, message) {
|
|
133
|
+
if (isRichOutput()) {
|
|
134
|
+
_clack_prompts.log[level](message);
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
console.log(`${SYMBOLS[level]} ${message}`);
|
|
138
|
+
}
|
|
139
|
+
/** Prints lines as one block, without a symbol in front of them. Not the writer's block, which drops clack's spacing around it. */
|
|
140
|
+
function logBlock(lines) {
|
|
141
|
+
if (isRichOutput()) {
|
|
142
|
+
_clack_prompts.log.message(lines);
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
console.log([lines].flat().join("\n"));
|
|
146
|
+
}
|
|
147
|
+
function logInfo(message) {
|
|
148
|
+
write("info", message);
|
|
149
|
+
}
|
|
150
|
+
function logWarn(message) {
|
|
151
|
+
write("warn", message);
|
|
152
|
+
}
|
|
153
|
+
function logError(message) {
|
|
154
|
+
write("error", message);
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Reports a step the command is taking, rather than something it found.
|
|
158
|
+
*/
|
|
159
|
+
function logStep(message) {
|
|
160
|
+
write("step", message);
|
|
161
|
+
}
|
|
162
|
+
//#endregion
|
|
163
|
+
//#region src/ui/intro.ts
|
|
164
|
+
const SPONSOR_TIPS = [
|
|
165
|
+
"Your sponsorship keeps Kubb codegen, plugins, and docs maintained",
|
|
166
|
+
"Sponsor faster generators and better Kubb Studio workflows",
|
|
167
|
+
"Help keep Kubb free for TypeScript teams building APIs",
|
|
168
|
+
"Support React Query, Zod, Faker, and MSW integrations",
|
|
169
|
+
"Back open-source tools that turn OpenAPI into TypeScript",
|
|
170
|
+
"Sponsor fixes, releases, and new plugins for your API workflow",
|
|
171
|
+
"Help Kubb stay independent and focused on developer tools"
|
|
172
|
+
];
|
|
173
|
+
const SPONSOR_LINKS = [
|
|
174
|
+
"https://github.com/sponsors/stijnvanhulle",
|
|
175
|
+
"https://opencollective.com/kubb",
|
|
176
|
+
"https://kubb.dev/sponsors"
|
|
177
|
+
];
|
|
178
|
+
function nextTip() {
|
|
179
|
+
return `${SPONSOR_TIPS[Math.floor(Math.random() * SPONSOR_TIPS.length)]}: ${SPONSOR_LINKS[Math.floor(Math.random() * SPONSOR_LINKS.length)]}`;
|
|
180
|
+
}
|
|
181
|
+
function formatTip(tip) {
|
|
182
|
+
return (0, node_util.styleText)("magenta", " Tip ") + (0, node_util.styleText)("yellow", tip);
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Prints one random tip outside every group. Rich terminals get the styled variant;
|
|
186
|
+
* plain/CI output gets a stable text-only line so the tip is still visible as final output.
|
|
187
|
+
*/
|
|
188
|
+
function logTip() {
|
|
189
|
+
const tip = nextTip();
|
|
190
|
+
if (!isRichOutput()) {
|
|
191
|
+
console.log(`Tip: ${tip}`);
|
|
192
|
+
return;
|
|
193
|
+
}
|
|
194
|
+
console.log(`${(0, node_util.styleText)("magenta", "✦")}${formatTip(tip)}`);
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Opens a command's output. A command the banner already names passes no title.
|
|
198
|
+
*/
|
|
199
|
+
function logIntro({ title, warning, block = true }) {
|
|
200
|
+
if (block && isRichOutput()) {
|
|
201
|
+
if (title) _clack_prompts.intro(title);
|
|
202
|
+
if (warning) _clack_prompts.log.warn(warning);
|
|
203
|
+
return;
|
|
204
|
+
}
|
|
205
|
+
if (title) console.log(title);
|
|
206
|
+
if (warning) console.warn(warning);
|
|
207
|
+
if (title || warning) console.log();
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Closes the block {@link logIntro} opened. The closing gutter is not a written line, so plain
|
|
211
|
+
* output prints the text on its own.
|
|
212
|
+
*/
|
|
213
|
+
function logOutro(text) {
|
|
214
|
+
writer().groupEnd(text);
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* Prints one empty line between two groups, without clack's gutter bar, since the bar belongs to a
|
|
218
|
+
* group and a spacer sits outside every one.
|
|
219
|
+
*/
|
|
220
|
+
function logSpacer() {
|
|
221
|
+
console.log("");
|
|
222
|
+
}
|
|
223
|
+
/** Whether a run stops to ask something: no `--yes`, no `--dry-run`, and a person at a terminal. */
|
|
224
|
+
function isInteractiveRun({ yes, dryRun }) {
|
|
225
|
+
return !yes && !dryRun && process.stdin.isTTY === true;
|
|
226
|
+
}
|
|
227
|
+
//#endregion
|
|
228
|
+
//#region src/ui/text.ts
|
|
229
|
+
/** Counts a noun, so a message never reads `1 files`. */
|
|
230
|
+
function pluralize(count, noun) {
|
|
231
|
+
return `${count} ${count === 1 ? noun : `${noun}s`}`;
|
|
232
|
+
}
|
|
233
|
+
/** The flag that grants a permission, such as `--allow-read-ast`. */
|
|
234
|
+
function toPermissionFlag(key) {
|
|
235
|
+
return `--${key.replace(/[A-Z]/g, (char) => `-${char.toLowerCase()}`)}`;
|
|
236
|
+
}
|
|
237
|
+
//#endregion
|
|
238
|
+
Object.defineProperty(exports, "canUseTTY", {
|
|
239
|
+
enumerable: true,
|
|
240
|
+
get: function() {
|
|
241
|
+
return canUseTTY;
|
|
242
|
+
}
|
|
243
|
+
});
|
|
244
|
+
Object.defineProperty(exports, "createPlainWriter", {
|
|
245
|
+
enumerable: true,
|
|
246
|
+
get: function() {
|
|
247
|
+
return createPlainWriter;
|
|
248
|
+
}
|
|
249
|
+
});
|
|
250
|
+
Object.defineProperty(exports, "isInteractiveRun", {
|
|
251
|
+
enumerable: true,
|
|
252
|
+
get: function() {
|
|
253
|
+
return isInteractiveRun;
|
|
254
|
+
}
|
|
255
|
+
});
|
|
256
|
+
Object.defineProperty(exports, "isRichOutput", {
|
|
257
|
+
enumerable: true,
|
|
258
|
+
get: function() {
|
|
259
|
+
return isRichOutput;
|
|
260
|
+
}
|
|
261
|
+
});
|
|
262
|
+
Object.defineProperty(exports, "logBlock", {
|
|
263
|
+
enumerable: true,
|
|
264
|
+
get: function() {
|
|
265
|
+
return logBlock;
|
|
266
|
+
}
|
|
267
|
+
});
|
|
268
|
+
Object.defineProperty(exports, "logError", {
|
|
269
|
+
enumerable: true,
|
|
270
|
+
get: function() {
|
|
271
|
+
return logError;
|
|
272
|
+
}
|
|
273
|
+
});
|
|
274
|
+
Object.defineProperty(exports, "logInfo", {
|
|
275
|
+
enumerable: true,
|
|
276
|
+
get: function() {
|
|
277
|
+
return logInfo;
|
|
278
|
+
}
|
|
279
|
+
});
|
|
280
|
+
Object.defineProperty(exports, "logIntro", {
|
|
281
|
+
enumerable: true,
|
|
282
|
+
get: function() {
|
|
283
|
+
return logIntro;
|
|
284
|
+
}
|
|
285
|
+
});
|
|
286
|
+
Object.defineProperty(exports, "logOutro", {
|
|
287
|
+
enumerable: true,
|
|
288
|
+
get: function() {
|
|
289
|
+
return logOutro;
|
|
290
|
+
}
|
|
291
|
+
});
|
|
292
|
+
Object.defineProperty(exports, "logSpacer", {
|
|
293
|
+
enumerable: true,
|
|
294
|
+
get: function() {
|
|
295
|
+
return logSpacer;
|
|
296
|
+
}
|
|
297
|
+
});
|
|
298
|
+
Object.defineProperty(exports, "logStep", {
|
|
299
|
+
enumerable: true,
|
|
300
|
+
get: function() {
|
|
301
|
+
return logStep;
|
|
302
|
+
}
|
|
303
|
+
});
|
|
304
|
+
Object.defineProperty(exports, "logTip", {
|
|
305
|
+
enumerable: true,
|
|
306
|
+
get: function() {
|
|
307
|
+
return logTip;
|
|
308
|
+
}
|
|
309
|
+
});
|
|
310
|
+
Object.defineProperty(exports, "logWarn", {
|
|
311
|
+
enumerable: true,
|
|
312
|
+
get: function() {
|
|
313
|
+
return logWarn;
|
|
314
|
+
}
|
|
315
|
+
});
|
|
316
|
+
Object.defineProperty(exports, "plainWriter", {
|
|
317
|
+
enumerable: true,
|
|
318
|
+
get: function() {
|
|
319
|
+
return plainWriter;
|
|
320
|
+
}
|
|
321
|
+
});
|
|
322
|
+
Object.defineProperty(exports, "pluralize", {
|
|
323
|
+
enumerable: true,
|
|
324
|
+
get: function() {
|
|
325
|
+
return pluralize;
|
|
326
|
+
}
|
|
327
|
+
});
|
|
328
|
+
Object.defineProperty(exports, "toPermissionFlag", {
|
|
329
|
+
enumerable: true,
|
|
330
|
+
get: function() {
|
|
331
|
+
return toPermissionFlag;
|
|
332
|
+
}
|
|
333
|
+
});
|
|
334
|
+
Object.defineProperty(exports, "writer", {
|
|
335
|
+
enumerable: true,
|
|
336
|
+
get: function() {
|
|
337
|
+
return writer;
|
|
338
|
+
}
|
|
339
|
+
});
|
|
340
|
+
|
|
341
|
+
//# sourceMappingURL=text-CknhKMvM.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text-CknhKMvM.cjs","names":["isCIEnvironment","getAgentProfile","clack","styleText","styleText"],"sources":["../src/utils/env.ts","../src/loggers/clackWriter.ts","../src/loggers/plainWriter.ts","../src/ui/log.ts","../src/ui/intro.ts","../src/ui/text.ts"],"sourcesContent":["import { isCIEnvironment } from '@internals/utils'\nimport { getAgentProfile } from 'gunshi/agent'\n\n/**\n * Returns `true` when the process has an interactive TTY with a valid terminal\n * width and is not running in CI.\n *\n * Some IDE-embedded terminals report `isTTY = true` but set `columns` to `0`,\n * which breaks clack's box-drawing helpers (they call `String.prototype.repeat`\n * with a negative count and throw a `RangeError`). A positive column count is\n * required before the TTY counts as usable.\n *\n * @example\n * ```ts\n * if (canUseTTY()) {\n * renderProgressBar()\n * }\n * ```\n */\nexport function canUseTTY(): boolean {\n return process.stdout.isTTY && (process.stdout.columns ?? 0) > 0 && !isCIEnvironment()\n}\n\n/**\n * Returns `true` when output can carry spinners and clack's gutter: an interactive TTY that no AI\n * coding agent is reading. Cursor-movement escapes are hard for an agent to parse even over a\n * pseudo-TTY, so it gets the plain writer.\n */\nexport function isRichOutput(): boolean {\n return canUseTTY() && !getAgentProfile().isAgent\n}\n","import { styleText } from 'node:util'\nimport * as clack from '@clack/prompts'\nimport type { LoggerWriter } from './types.ts'\n\n/**\n * Draws with clack for local development: a gutter bar per group, animated steps, and a progress\n * bar for the writes.\n */\nexport const clackWriter: LoggerWriter = {\n audience: 'human',\n group: (title) => clack.intro(title),\n groupEnd: (text) => clack.outro(text),\n step: (text) => clack.log.step(text, { spacing: 0 }),\n info: (text) => clack.log.info(text),\n success: (text) => clack.log.success(text),\n warn: (text) => clack.log.warn(text),\n error: (text) => clack.log.error(text),\n block: (lines) => clack.log.message(lines, { spacing: 0 }),\n // A subprocess's output is not Kubb's tree, so it goes out past clack and its gutter bar. The\n // step above it is already stopped by the time this runs.\n raw: (lines) => console.log(styleText('dim', lines.join('\\n'))),\n // The diagnostic carries its own code and indented rows, so clear clack's gutter and bar and let\n // the block stand on its own.\n diagnostic: (lines) => clack.log.message(lines, { symbol: '', secondarySymbol: '' }),\n update: (lines, title) =>\n clack.box(lines.join('\\n'), title, {\n width: 'auto',\n formatBorder: (border: string) => styleText('yellow', border),\n rounded: true,\n withGuide: false,\n contentAlign: 'center',\n titleAlign: 'center',\n }),\n spinner: () => clack.spinner(),\n progress(max) {\n const bar = clack.progress({ style: 'block', max, size: 30 })\n\n return {\n start: (text) => bar.start(text),\n advance: (text) => bar.advance(1, text),\n stop: (text) => bar.stop(text),\n }\n },\n}\n","import type { LoggerWriter } from './types.ts'\n\n/**\n * Prefixes that stand in for the symbols clack draws, so plain output reads the same way.\n */\nexport const SYMBOLS = { info: 'ℹ', warn: '⚠', error: '✗', step: '◇' } as const\n\n/**\n * Draws with one `write` call per line, e.g. `console.error` so stdout carries only JSON. Nothing\n * animates, so a step prints at start and end.\n */\nexport function createPlainWriter(write: (line: string) => void): LoggerWriter {\n return {\n audience: 'agent',\n group: write,\n groupEnd: write,\n step: (text) => write(`${SYMBOLS.step} ${text}`),\n info: write,\n success: write,\n warn: write,\n error: (text) => write(`${SYMBOLS.error} ${text}`),\n block: (lines) => write(lines.join('\\n')),\n raw: (lines) => write(lines.join('\\n')),\n diagnostic: (lines) => write(lines.join('\\n')),\n update: (lines, title) => write([title, ...lines].join('\\n')),\n spinner: () => ({\n start: write,\n message: write,\n clear: () => {},\n stop: (text) => text && write(text),\n error: (text) => write(`${SYMBOLS.error} ${text}`),\n }),\n progress: () => ({\n start: write,\n advance: write,\n stop: (text) => text && write(text),\n }),\n }\n}\n\n/**\n * Draws on the console, for non-TTY environments and for an AI coding agent reading the output.\n * Reports the same run in the same order as `clackWriter`, without the animation.\n */\nexport const plainWriter = createPlainWriter((line) => console.log(line))\n","import * as prompts from '@clack/prompts'\nimport { isRichOutput } from '../utils/env.ts'\nimport { clackWriter } from '../loggers/clackWriter.ts'\nimport { plainWriter, SYMBOLS } from '../loggers/plainWriter.ts'\nimport type { LoggerWriter } from '../loggers/types.ts'\n\n/** The writer the loggers draw with on this terminal, so a command's own lines look like its run. */\nexport function writer(): LoggerWriter {\n return isRichOutput() ? clackWriter : plainWriter\n}\n\ntype Level = keyof typeof SYMBOLS\n\n// Not through the writers: in plain output a command's own info and warning carry their symbol, and clack's step keeps its spacing.\nfunction write(level: Level, message: string): void {\n if (isRichOutput()) {\n prompts.log[level](message)\n\n return\n }\n\n console.log(`${SYMBOLS[level]} ${message}`)\n}\n\n/** Prints lines as one block, without a symbol in front of them. Not the writer's block, which drops clack's spacing around it. */\nexport function logBlock(lines: string | Array<string>): void {\n if (isRichOutput()) {\n prompts.log.message(lines)\n\n return\n }\n\n console.log([lines].flat().join('\\n'))\n}\n\nexport function logInfo(message: string): void {\n write('info', message)\n}\n\nexport function logWarn(message: string): void {\n write('warn', message)\n}\n\nexport function logError(message: string): void {\n write('error', message)\n}\n\n/**\n * Reports a step the command is taking, rather than something it found.\n */\nexport function logStep(message: string): void {\n write('step', message)\n}\n","import { styleText } from 'node:util'\nimport * as prompts from '@clack/prompts'\nimport { isRichOutput } from '../utils/env.ts'\nimport { writer } from './log.ts'\n\nconst SPONSOR_TIPS = [\n 'Your sponsorship keeps Kubb codegen, plugins, and docs maintained',\n 'Sponsor faster generators and better Kubb Studio workflows',\n 'Help keep Kubb free for TypeScript teams building APIs',\n 'Support React Query, Zod, Faker, and MSW integrations',\n 'Back open-source tools that turn OpenAPI into TypeScript',\n 'Sponsor fixes, releases, and new plugins for your API workflow',\n 'Help Kubb stay independent and focused on developer tools',\n] as const\n\nconst SPONSOR_LINKS = ['https://github.com/sponsors/stijnvanhulle', 'https://opencollective.com/kubb', 'https://kubb.dev/sponsors'] as const\n\nfunction nextTip(): string {\n const tip = SPONSOR_TIPS[Math.floor(Math.random() * SPONSOR_TIPS.length)]!\n const link = SPONSOR_LINKS[Math.floor(Math.random() * SPONSOR_LINKS.length)]!\n return `${tip}: ${link}`\n}\n\nfunction formatTip(tip: string): string {\n return styleText('magenta', ' Tip ') + styleText('yellow', tip)\n}\n\n/**\n * Prints one random tip outside every group. Rich terminals get the styled variant;\n * plain/CI output gets a stable text-only line so the tip is still visible as final output.\n */\nexport function logTip(): void {\n const tip = nextTip()\n if (!isRichOutput()) {\n console.log(`Tip: ${tip}`)\n return\n }\n\n console.log(`${styleText('magenta', '✦')}${formatTip(tip)}`)\n}\n\ntype IntroOptions = {\n title?: string\n /**\n * Printed under the title, for a command that has a caveat to lead with.\n */\n warning?: string\n /**\n * Whether to open a block a later {@link logOutro} closes. Pass `false` for a command that\n * prints and exits, since nothing would ever close the block.\n *\n * @default true\n */\n block?: boolean\n}\n\n/**\n * Opens a command's output. A command the banner already names passes no title.\n */\nexport function logIntro({ title, warning, block = true }: IntroOptions): void {\n if (block && isRichOutput()) {\n if (title) prompts.intro(title)\n\n if (warning) {\n prompts.log.warn(warning)\n }\n\n return\n }\n\n if (title) {\n console.log(title)\n }\n\n if (warning) {\n console.warn(warning)\n }\n\n if (title || warning) {\n console.log()\n }\n}\n\n/**\n * Closes the block {@link logIntro} opened. The closing gutter is not a written line, so plain\n * output prints the text on its own.\n */\nexport function logOutro(text: string): void {\n writer().groupEnd(text)\n}\n\n/**\n * Prints one empty line between two groups, without clack's gutter bar, since the bar belongs to a\n * group and a spacer sits outside every one.\n */\nexport function logSpacer(): void {\n console.log('')\n}\n\n/** Whether a run stops to ask something: no `--yes`, no `--dry-run`, and a person at a terminal. */\nexport function isInteractiveRun({ yes, dryRun }: { yes?: unknown; dryRun?: unknown }): boolean {\n return !yes && !dryRun && process.stdin.isTTY === true\n}\n","/** Counts a noun, so a message never reads `1 files`. */\nexport function pluralize(count: number, noun: string): string {\n return `${count} ${count === 1 ? noun : `${noun}s`}`\n}\n\n/** The flag that grants a permission, such as `--allow-read-ast`. */\nexport function toPermissionFlag(key: string): string {\n return `--${key.replace(/[A-Z]/g, (char) => `-${char.toLowerCase()}`)}`\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAmBA,SAAgB,YAAqB;CACnC,OAAO,QAAQ,OAAO,UAAU,QAAQ,OAAO,WAAW,KAAK,KAAK,CAACA,kBAAAA,gBAAgB;AACvF;;;;;;AAOA,SAAgB,eAAwB;CACtC,OAAO,UAAU,KAAK,EAAA,GAACC,aAAAA,gBAAAA,CAAgB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