@kubb/cli 5.0.0-beta.100 → 5.0.0-beta.102
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/{generate-dIcWEfOA.cjs → generate-3eLpvt2R.cjs} +2 -2
- package/dist/{generate-dIcWEfOA.cjs.map → generate-3eLpvt2R.cjs.map} +1 -1
- package/dist/{generate-nPLBd69v.js → generate-CRpQnPiI.js} +2 -2
- package/dist/{generate-nPLBd69v.js.map → generate-CRpQnPiI.js.map} +1 -1
- package/dist/index.cjs +5 -5
- package/dist/index.js +5 -5
- package/dist/{init-6h3K2syO.cjs → init-DGydKfFl.cjs} +2 -2
- package/dist/{init-6h3K2syO.cjs.map → init-DGydKfFl.cjs.map} +1 -1
- package/dist/{init-CNV6OC7m.js → init-DKqZXNaK.js} +2 -2
- package/dist/{init-CNV6OC7m.js.map → init-DKqZXNaK.js.map} +1 -1
- package/dist/{mcp-CmxnIZku.cjs → mcp-C8Gg_kVF.cjs} +2 -2
- package/dist/{mcp-CmxnIZku.cjs.map → mcp-C8Gg_kVF.cjs.map} +1 -1
- package/dist/{mcp-BzPiZA36.js → mcp-DmxvTBCH.js} +2 -2
- package/dist/{mcp-BzPiZA36.js.map → mcp-DmxvTBCH.js.map} +1 -1
- package/dist/{package-CImfPtTH.cjs → package-DWXAqkLa.cjs} +2 -2
- package/dist/package-DWXAqkLa.cjs.map +1 -0
- package/dist/package-KbKWAHe5.js +6 -0
- package/dist/package-KbKWAHe5.js.map +1 -0
- package/dist/{run-D-gAS1Vq.js → run-CjYRuPD8.js} +107 -124
- package/dist/run-CjYRuPD8.js.map +1 -0
- package/dist/{run-HUVxfpGj.cjs → run-DvI9PD4A.cjs} +107 -124
- package/dist/run-DvI9PD4A.cjs.map +1 -0
- package/dist/{validate-DMfyLIta.cjs → validate-C7yFncsE.cjs} +2 -2
- package/dist/{validate-DMfyLIta.cjs.map → validate-C7yFncsE.cjs.map} +1 -1
- package/dist/{validate-BUw6PkPp.js → validate-CO3TY48V.js} +2 -2
- package/dist/{validate-BUw6PkPp.js.map → validate-CO3TY48V.js.map} +1 -1
- package/package.json +5 -5
- package/dist/package-By3tigpl.js +0 -6
- package/dist/package-By3tigpl.js.map +0 -1
- package/dist/package-CImfPtTH.cjs.map +0 -1
- package/dist/run-D-gAS1Vq.js.map +0 -1
- package/dist/run-HUVxfpGj.cjs.map +0 -1
|
@@ -79,7 +79,7 @@ const command = (0, gunshi.define)({
|
|
|
79
79
|
},
|
|
80
80
|
async run({ values }) {
|
|
81
81
|
const logLevel = resolveLogLevel(values);
|
|
82
|
-
const { run } = await Promise.resolve().then(() => require("./run-
|
|
82
|
+
const { run } = await Promise.resolve().then(() => require("./run-DvI9PD4A.cjs"));
|
|
83
83
|
await run({
|
|
84
84
|
input: values.input,
|
|
85
85
|
configPath: values.config,
|
|
@@ -92,4 +92,4 @@ const command = (0, gunshi.define)({
|
|
|
92
92
|
//#endregion
|
|
93
93
|
exports.command = command;
|
|
94
94
|
|
|
95
|
-
//# sourceMappingURL=generate-
|
|
95
|
+
//# sourceMappingURL=generate-3eLpvt2R.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-
|
|
1
|
+
{"version":3,"file":"generate-3eLpvt2R.cjs","names":[],"sources":["../src/commands/generate.ts"],"sourcesContent":["import { define } from 'gunshi'\nimport type { ReporterName } from '@kubb/core'\n\nconst REPORTER_NAMES: Array<ReporterName> = ['cli', 'json', 'file']\n\n/**\n * Splits and validates the comma-separated `--reporter` value against the known reporter names.\n */\nfunction parseReporters(value: string): Array<ReporterName> {\n const names = value\n .split(',')\n .map((name) => name.trim())\n .filter(Boolean)\n\n for (const name of names) {\n if (!REPORTER_NAMES.includes(name as ReporterName)) {\n throw new Error(`must be one of cli, json, file (got \"${name}\")`)\n }\n }\n\n return names as Array<ReporterName>\n}\n\n/**\n * Resolves the effective log level, letting the `--verbose` and `--silent` flags win over `--logLevel`.\n */\nfunction resolveLogLevel({ verbose, silent, logLevel }: { verbose: boolean; silent: boolean; logLevel: string }): string {\n if (verbose) return 'verbose'\n if (silent) return 'silent'\n return logLevel\n}\n\nexport const command = define({\n name: 'generate',\n description:\n 'Generate TypeScript types, API clients, React Query hooks, Zod schemas, and more from an OpenAPI specification. Reads kubb.config.ts by default. Pass an OpenAPI file path as the first argument to override the input without editing the config.',\n examples: ['kubb generate', 'kubb generate ./openapi.yaml', 'kubb generate --config kubb.config.ts', 'kubb generate --watch'].join('\\n'),\n args: {\n input: {\n type: 'positional',\n required: false,\n description: 'Path to the OpenAPI specification, overriding the config',\n },\n config: {\n type: 'string',\n description: 'Path to the Kubb config',\n short: 'c',\n },\n logLevel: {\n type: 'enum',\n choices: ['silent', 'info', 'verbose'] as const,\n description: 'Info, silent or verbose',\n short: 'l',\n default: 'info',\n },\n watch: {\n type: 'boolean',\n description: 'Watch mode based on the input file',\n short: 'w',\n default: false,\n },\n verbose: {\n type: 'boolean',\n description: 'Override logLevel to verbose',\n default: false,\n },\n silent: {\n type: 'boolean',\n description: 'Override logLevel to silent',\n short: 's',\n default: false,\n },\n reporter: {\n type: 'custom',\n description: 'Reporters that render the run, comma-separated. Overrides config.reporters',\n metavar: 'cli|json|file',\n parse: parseReporters,\n },\n },\n async run({ values }) {\n const logLevel = resolveLogLevel(values)\n const { run } = await import('../runners/generate/run.ts')\n\n await run({\n input: values.input,\n configPath: values.config,\n logLevel,\n watch: values.watch,\n reporters: values.reporter,\n })\n },\n})\n"],"mappings":";;;AAGA,MAAM,iBAAsC;CAAC;CAAO;CAAQ;AAAM;;;;AAKlE,SAAS,eAAe,OAAoC;CAC1D,MAAM,QAAQ,MACX,MAAM,GAAG,CAAC,CACV,KAAK,SAAS,KAAK,KAAK,CAAC,CAAC,CAC1B,OAAO,OAAO;CAEjB,KAAK,MAAM,QAAQ,OACjB,IAAI,CAAC,eAAe,SAAS,IAAoB,GAC/C,MAAM,IAAI,MAAM,wCAAwC,KAAK,GAAG;CAIpE,OAAO;AACT;;;;AAKA,SAAS,gBAAgB,EAAE,SAAS,QAAQ,YAA6E;CACvH,IAAI,SAAS,OAAO;CACpB,IAAI,QAAQ,OAAO;CACnB,OAAO;AACT;AAEA,MAAa,WAAA,GAAA,OAAA,OAAA,CAAiB;CAC5B,MAAM;CACN,aACE;CACF,UAAU;EAAC;EAAiB;EAAgC;EAAyC;CAAuB,CAAC,CAAC,KAAK,IAAI;CACvI,MAAM;EACJ,OAAO;GACL,MAAM;GACN,UAAU;GACV,aAAa;EACf;EACA,QAAQ;GACN,MAAM;GACN,aAAa;GACb,OAAO;EACT;EACA,UAAU;GACR,MAAM;GACN,SAAS;IAAC;IAAU;IAAQ;GAAS;GACrC,aAAa;GACb,OAAO;GACP,SAAS;EACX;EACA,OAAO;GACL,MAAM;GACN,aAAa;GACb,OAAO;GACP,SAAS;EACX;EACA,SAAS;GACP,MAAM;GACN,aAAa;GACb,SAAS;EACX;EACA,QAAQ;GACN,MAAM;GACN,aAAa;GACb,OAAO;GACP,SAAS;EACX;EACA,UAAU;GACR,MAAM;GACN,aAAa;GACb,SAAS;GACT,OAAO;EACT;CACF;CACA,MAAM,IAAI,EAAE,UAAU;EACpB,MAAM,WAAW,gBAAgB,MAAM;EACvC,MAAM,EAAE,QAAQ,MAAA,QAAA,QAAA,CAAA,CAAA,WAAA,QAAM,oBAAA,CAAA;EAEtB,MAAM,IAAI;GACR,OAAO,OAAO;GACd,YAAY,OAAO;GACnB;GACA,OAAO,OAAO;GACd,WAAW,OAAO;EACpB,CAAC;CACH;AACF,CAAC"}
|
|
@@ -79,7 +79,7 @@ const command = define({
|
|
|
79
79
|
},
|
|
80
80
|
async run({ values }) {
|
|
81
81
|
const logLevel = resolveLogLevel(values);
|
|
82
|
-
const { run } = await import("./run-
|
|
82
|
+
const { run } = await import("./run-CjYRuPD8.js");
|
|
83
83
|
await run({
|
|
84
84
|
input: values.input,
|
|
85
85
|
configPath: values.config,
|
|
@@ -92,4 +92,4 @@ const command = define({
|
|
|
92
92
|
//#endregion
|
|
93
93
|
export { command };
|
|
94
94
|
|
|
95
|
-
//# sourceMappingURL=generate-
|
|
95
|
+
//# sourceMappingURL=generate-CRpQnPiI.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-
|
|
1
|
+
{"version":3,"file":"generate-CRpQnPiI.js","names":[],"sources":["../src/commands/generate.ts"],"sourcesContent":["import { define } from 'gunshi'\nimport type { ReporterName } from '@kubb/core'\n\nconst REPORTER_NAMES: Array<ReporterName> = ['cli', 'json', 'file']\n\n/**\n * Splits and validates the comma-separated `--reporter` value against the known reporter names.\n */\nfunction parseReporters(value: string): Array<ReporterName> {\n const names = value\n .split(',')\n .map((name) => name.trim())\n .filter(Boolean)\n\n for (const name of names) {\n if (!REPORTER_NAMES.includes(name as ReporterName)) {\n throw new Error(`must be one of cli, json, file (got \"${name}\")`)\n }\n }\n\n return names as Array<ReporterName>\n}\n\n/**\n * Resolves the effective log level, letting the `--verbose` and `--silent` flags win over `--logLevel`.\n */\nfunction resolveLogLevel({ verbose, silent, logLevel }: { verbose: boolean; silent: boolean; logLevel: string }): string {\n if (verbose) return 'verbose'\n if (silent) return 'silent'\n return logLevel\n}\n\nexport const command = define({\n name: 'generate',\n description:\n 'Generate TypeScript types, API clients, React Query hooks, Zod schemas, and more from an OpenAPI specification. Reads kubb.config.ts by default. Pass an OpenAPI file path as the first argument to override the input without editing the config.',\n examples: ['kubb generate', 'kubb generate ./openapi.yaml', 'kubb generate --config kubb.config.ts', 'kubb generate --watch'].join('\\n'),\n args: {\n input: {\n type: 'positional',\n required: false,\n description: 'Path to the OpenAPI specification, overriding the config',\n },\n config: {\n type: 'string',\n description: 'Path to the Kubb config',\n short: 'c',\n },\n logLevel: {\n type: 'enum',\n choices: ['silent', 'info', 'verbose'] as const,\n description: 'Info, silent or verbose',\n short: 'l',\n default: 'info',\n },\n watch: {\n type: 'boolean',\n description: 'Watch mode based on the input file',\n short: 'w',\n default: false,\n },\n verbose: {\n type: 'boolean',\n description: 'Override logLevel to verbose',\n default: false,\n },\n silent: {\n type: 'boolean',\n description: 'Override logLevel to silent',\n short: 's',\n default: false,\n },\n reporter: {\n type: 'custom',\n description: 'Reporters that render the run, comma-separated. Overrides config.reporters',\n metavar: 'cli|json|file',\n parse: parseReporters,\n },\n },\n async run({ values }) {\n const logLevel = resolveLogLevel(values)\n const { run } = await import('../runners/generate/run.ts')\n\n await run({\n input: values.input,\n configPath: values.config,\n logLevel,\n watch: values.watch,\n reporters: values.reporter,\n })\n },\n})\n"],"mappings":";;;AAGA,MAAM,iBAAsC;CAAC;CAAO;CAAQ;AAAM;;;;AAKlE,SAAS,eAAe,OAAoC;CAC1D,MAAM,QAAQ,MACX,MAAM,GAAG,CAAC,CACV,KAAK,SAAS,KAAK,KAAK,CAAC,CAAC,CAC1B,OAAO,OAAO;CAEjB,KAAK,MAAM,QAAQ,OACjB,IAAI,CAAC,eAAe,SAAS,IAAoB,GAC/C,MAAM,IAAI,MAAM,wCAAwC,KAAK,GAAG;CAIpE,OAAO;AACT;;;;AAKA,SAAS,gBAAgB,EAAE,SAAS,QAAQ,YAA6E;CACvH,IAAI,SAAS,OAAO;CACpB,IAAI,QAAQ,OAAO;CACnB,OAAO;AACT;AAEA,MAAa,UAAU,OAAO;CAC5B,MAAM;CACN,aACE;CACF,UAAU;EAAC;EAAiB;EAAgC;EAAyC;CAAuB,CAAC,CAAC,KAAK,IAAI;CACvI,MAAM;EACJ,OAAO;GACL,MAAM;GACN,UAAU;GACV,aAAa;EACf;EACA,QAAQ;GACN,MAAM;GACN,aAAa;GACb,OAAO;EACT;EACA,UAAU;GACR,MAAM;GACN,SAAS;IAAC;IAAU;IAAQ;GAAS;GACrC,aAAa;GACb,OAAO;GACP,SAAS;EACX;EACA,OAAO;GACL,MAAM;GACN,aAAa;GACb,OAAO;GACP,SAAS;EACX;EACA,SAAS;GACP,MAAM;GACN,aAAa;GACb,SAAS;EACX;EACA,QAAQ;GACN,MAAM;GACN,aAAa;GACb,OAAO;GACP,SAAS;EACX;EACA,UAAU;GACR,MAAM;GACN,aAAa;GACb,SAAS;GACT,OAAO;EACT;CACF;CACA,MAAM,IAAI,EAAE,UAAU;EACpB,MAAM,WAAW,gBAAgB,MAAM;EACvC,MAAM,EAAE,QAAQ,MAAM,OAAO;EAE7B,MAAM,IAAI;GACR,OAAO,OAAO;GACd,YAAY,OAAO;GACnB;GACA,OAAO,OAAO;GACd,WAAW,OAAO;EACpB,CAAC;CACH;AACF,CAAC"}
|
package/dist/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
require("./rolldown-runtime-Bx3C2hgW.cjs");
|
|
3
3
|
const require_Telemetry = require("./Telemetry-xcWb-UWT.cjs");
|
|
4
|
-
const require_package = require("./package-
|
|
4
|
+
const require_package = require("./package-DWXAqkLa.cjs");
|
|
5
5
|
let node_util = require("node:util");
|
|
6
6
|
let gunshi = require("gunshi");
|
|
7
7
|
//#region src/index.ts
|
|
@@ -22,10 +22,10 @@ function stripExecArgs(argv) {
|
|
|
22
22
|
async function run(argv = process.argv) {
|
|
23
23
|
const isQuietFlag = argv.some((arg) => require_Telemetry.QUIET_FLAGS.has(arg));
|
|
24
24
|
if (!require_Telemetry.isDisabled() && !isQuietFlag) console.log(`${(0, node_util.styleText)("yellow", "Notice:")} Kubb collects anonymous telemetry data to help improve the tool. No personal data or file contents are collected. \nTo disable, set ${(0, node_util.styleText)("cyan", "KUBB_DISABLE_TELEMETRY=1")}.\n`);
|
|
25
|
-
const { command: generateCommand } = await Promise.resolve().then(() => require("./generate-
|
|
26
|
-
const { command: validateCommand } = await Promise.resolve().then(() => require("./validate-
|
|
27
|
-
const { command: mcpCommand } = await Promise.resolve().then(() => require("./mcp-
|
|
28
|
-
const { command: initCommand } = await Promise.resolve().then(() => require("./init-
|
|
25
|
+
const { command: generateCommand } = await Promise.resolve().then(() => require("./generate-3eLpvt2R.cjs"));
|
|
26
|
+
const { command: validateCommand } = await Promise.resolve().then(() => require("./validate-C7yFncsE.cjs"));
|
|
27
|
+
const { command: mcpCommand } = await Promise.resolve().then(() => require("./mcp-C8Gg_kVF.cjs"));
|
|
28
|
+
const { command: initCommand } = await Promise.resolve().then(() => require("./init-DGydKfFl.cjs"));
|
|
29
29
|
try {
|
|
30
30
|
await (0, gunshi.cli)(stripExecArgs(argv), generateCommand, {
|
|
31
31
|
name: "kubb",
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./rolldown-runtime-C0LytTxp.js";
|
|
2
2
|
import { a as QUIET_FLAGS, n as isDisabled } from "./Telemetry-7z2tIqPm.js";
|
|
3
|
-
import { t as version } from "./package-
|
|
3
|
+
import { t as version } from "./package-KbKWAHe5.js";
|
|
4
4
|
import { styleText } from "node:util";
|
|
5
5
|
import { cli } from "gunshi";
|
|
6
6
|
//#region src/index.ts
|
|
@@ -21,10 +21,10 @@ function stripExecArgs(argv) {
|
|
|
21
21
|
async function run(argv = process.argv) {
|
|
22
22
|
const isQuietFlag = argv.some((arg) => QUIET_FLAGS.has(arg));
|
|
23
23
|
if (!isDisabled() && !isQuietFlag) console.log(`${styleText("yellow", "Notice:")} Kubb collects anonymous telemetry data to help improve the tool. No personal data or file contents are collected. \nTo disable, set ${styleText("cyan", "KUBB_DISABLE_TELEMETRY=1")}.\n`);
|
|
24
|
-
const { command: generateCommand } = await import("./generate-
|
|
25
|
-
const { command: validateCommand } = await import("./validate-
|
|
26
|
-
const { command: mcpCommand } = await import("./mcp-
|
|
27
|
-
const { command: initCommand } = await import("./init-
|
|
24
|
+
const { command: generateCommand } = await import("./generate-CRpQnPiI.js");
|
|
25
|
+
const { command: validateCommand } = await import("./validate-CO3TY48V.js");
|
|
26
|
+
const { command: mcpCommand } = await import("./mcp-DmxvTBCH.js");
|
|
27
|
+
const { command: initCommand } = await import("./init-DKqZXNaK.js");
|
|
28
28
|
try {
|
|
29
29
|
await cli(stripExecArgs(argv), generateCommand, {
|
|
30
30
|
name: "kubb",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
require("./rolldown-runtime-Bx3C2hgW.cjs");
|
|
2
|
-
const require_package = require("./package-
|
|
2
|
+
const require_package = require("./package-DWXAqkLa.cjs");
|
|
3
3
|
//#region src/commands/init.ts
|
|
4
4
|
const command = (0, require("gunshi").define)({
|
|
5
5
|
name: "init",
|
|
@@ -49,4 +49,4 @@ const command = (0, require("gunshi").define)({
|
|
|
49
49
|
//#endregion
|
|
50
50
|
exports.command = command;
|
|
51
51
|
|
|
52
|
-
//# sourceMappingURL=init-
|
|
52
|
+
//# sourceMappingURL=init-DGydKfFl.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init-
|
|
1
|
+
{"version":3,"file":"init-DGydKfFl.cjs","names":[],"sources":["../src/commands/init.ts"],"sourcesContent":["import { define } from 'gunshi'\nimport { version } from '../../package.json'\n\nexport const command = define({\n name: 'init',\n description:\n 'Scaffold a kubb.config.ts and install plugins for code generation from an OpenAPI spec. Run without flags for interactive setup, or pass --input, --output, and --plugins to skip the prompts.',\n examples: [\n 'kubb init',\n 'kubb init --yes',\n 'kubb init --input ./openapi.yaml --output ./src/gen --plugins plugin-ts,plugin-zod',\n 'kubb init --plugins plugin-ts,plugin-axios,plugin-react-query',\n ].join('\\n'),\n args: {\n yes: {\n type: 'boolean',\n description: 'Skip prompts and use default options',\n short: 'y',\n default: false,\n },\n input: {\n type: 'string',\n description: 'Path to the OpenAPI specification',\n short: 'i',\n metavar: 'path',\n },\n output: {\n type: 'string',\n description: 'Output directory for generated files',\n short: 'o',\n metavar: 'path',\n },\n plugins: {\n type: 'string',\n description:\n 'Comma-separated list of plugins to use (plugin-ts, plugin-axios, plugin-fetch, plugin-react-query, plugin-vue-query, plugin-zod, plugin-faker, plugin-msw, plugin-cypress, plugin-mcp, plugin-redoc)',\n metavar: 'plugin-ts,plugin-zod,...',\n },\n },\n async run({ values }) {\n const { run } = await import('../runners/init/run.ts')\n\n await run({\n yes: values.yes,\n version,\n input: values.input,\n output: values.output,\n plugins: values.plugins,\n })\n },\n})\n"],"mappings":";;;AAGA,MAAa,WAAA,mBAAA,CAAA,CAAA,OAAA,CAAiB;CAC5B,MAAM;CACN,aACE;CACF,UAAU;EACR;EACA;EACA;EACA;CACF,CAAC,CAAC,KAAK,IAAI;CACX,MAAM;EACJ,KAAK;GACH,MAAM;GACN,aAAa;GACb,OAAO;GACP,SAAS;EACX;EACA,OAAO;GACL,MAAM;GACN,aAAa;GACb,OAAO;GACP,SAAS;EACX;EACA,QAAQ;GACN,MAAM;GACN,aAAa;GACb,OAAO;GACP,SAAS;EACX;EACA,SAAS;GACP,MAAM;GACN,aACE;GACF,SAAS;EACX;CACF;CACA,MAAM,IAAI,EAAE,UAAU;EACpB,MAAM,EAAE,QAAQ,MAAA,QAAA,QAAA,CAAA,CAAA,WAAA,QAAM,oBAAA,CAAA;EAEtB,MAAM,IAAI;GACR,KAAK,OAAO;GACZ,SAAA,gBAAA;GACA,OAAO,OAAO;GACd,QAAQ,OAAO;GACf,SAAS,OAAO;EAClB,CAAC;CACH;AACF,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./rolldown-runtime-C0LytTxp.js";
|
|
2
|
-
import { t as version } from "./package-
|
|
2
|
+
import { t as version } from "./package-KbKWAHe5.js";
|
|
3
3
|
import { define } from "gunshi";
|
|
4
4
|
//#region src/commands/init.ts
|
|
5
5
|
const command = define({
|
|
@@ -50,4 +50,4 @@ const command = define({
|
|
|
50
50
|
//#endregion
|
|
51
51
|
export { command };
|
|
52
52
|
|
|
53
|
-
//# sourceMappingURL=init-
|
|
53
|
+
//# sourceMappingURL=init-DKqZXNaK.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init-
|
|
1
|
+
{"version":3,"file":"init-DKqZXNaK.js","names":[],"sources":["../src/commands/init.ts"],"sourcesContent":["import { define } from 'gunshi'\nimport { version } from '../../package.json'\n\nexport const command = define({\n name: 'init',\n description:\n 'Scaffold a kubb.config.ts and install plugins for code generation from an OpenAPI spec. Run without flags for interactive setup, or pass --input, --output, and --plugins to skip the prompts.',\n examples: [\n 'kubb init',\n 'kubb init --yes',\n 'kubb init --input ./openapi.yaml --output ./src/gen --plugins plugin-ts,plugin-zod',\n 'kubb init --plugins plugin-ts,plugin-axios,plugin-react-query',\n ].join('\\n'),\n args: {\n yes: {\n type: 'boolean',\n description: 'Skip prompts and use default options',\n short: 'y',\n default: false,\n },\n input: {\n type: 'string',\n description: 'Path to the OpenAPI specification',\n short: 'i',\n metavar: 'path',\n },\n output: {\n type: 'string',\n description: 'Output directory for generated files',\n short: 'o',\n metavar: 'path',\n },\n plugins: {\n type: 'string',\n description:\n 'Comma-separated list of plugins to use (plugin-ts, plugin-axios, plugin-fetch, plugin-react-query, plugin-vue-query, plugin-zod, plugin-faker, plugin-msw, plugin-cypress, plugin-mcp, plugin-redoc)',\n metavar: 'plugin-ts,plugin-zod,...',\n },\n },\n async run({ values }) {\n const { run } = await import('../runners/init/run.ts')\n\n await run({\n yes: values.yes,\n version,\n input: values.input,\n output: values.output,\n plugins: values.plugins,\n })\n },\n})\n"],"mappings":";;;;AAGA,MAAa,UAAU,OAAO;CAC5B,MAAM;CACN,aACE;CACF,UAAU;EACR;EACA;EACA;EACA;CACF,CAAC,CAAC,KAAK,IAAI;CACX,MAAM;EACJ,KAAK;GACH,MAAM;GACN,aAAa;GACb,OAAO;GACP,SAAS;EACX;EACA,OAAO;GACL,MAAM;GACN,aAAa;GACb,OAAO;GACP,SAAS;EACX;EACA,QAAQ;GACN,MAAM;GACN,aAAa;GACb,OAAO;GACP,SAAS;EACX;EACA,SAAS;GACP,MAAM;GACN,aACE;GACF,SAAS;EACX;CACF;CACA,MAAM,IAAI,EAAE,UAAU;EACpB,MAAM,EAAE,QAAQ,MAAM,OAAO;EAE7B,MAAM,IAAI;GACR,KAAK,OAAO;GACZ;GACA,OAAO,OAAO;GACd,QAAQ,OAAO;GACf,SAAS,OAAO;EAClB,CAAC;CACH;AACF,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
require("./rolldown-runtime-Bx3C2hgW.cjs");
|
|
2
|
-
const require_package = require("./package-
|
|
2
|
+
const require_package = require("./package-DWXAqkLa.cjs");
|
|
3
3
|
//#region src/commands/mcp.ts
|
|
4
4
|
const command = (0, require("gunshi").define)({
|
|
5
5
|
name: "mcp",
|
|
@@ -17,4 +17,4 @@ const command = (0, require("gunshi").define)({
|
|
|
17
17
|
//#endregion
|
|
18
18
|
exports.command = command;
|
|
19
19
|
|
|
20
|
-
//# sourceMappingURL=mcp-
|
|
20
|
+
//# sourceMappingURL=mcp-C8Gg_kVF.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-
|
|
1
|
+
{"version":3,"file":"mcp-C8Gg_kVF.cjs","names":[],"sources":["../src/commands/mcp.ts"],"sourcesContent":["import { define } from 'gunshi'\nimport { version } from '../../package.json'\n\nexport const command = define({\n name: 'mcp',\n description:\n 'Start a Model Context Protocol (MCP) server that exposes Kubb code generation as tools for AI assistants. Once running, configure your AI client (Claude, Cursor, Windsurf, etc.) to connect to it — the assistant can then call kubb generate directly without leaving the chat.',\n examples: ['kubb mcp', '# Then add to your MCP client config:', '# { \"mcpServers\": { \"kubb\": { \"command\": \"npx\", \"args\": [\"kubb\", \"mcp\"] } } }'].join('\\n'),\n async run() {\n const { run } = await import('../runners/mcp/run.ts')\n\n await run({ version })\n },\n})\n"],"mappings":";;;AAGA,MAAa,WAAA,mBAAA,CAAA,CAAA,OAAA,CAAiB;CAC5B,MAAM;CACN,aACE;CACF,UAAU;EAAC;EAAY;EAAyC;CAA+E,CAAC,CAAC,KAAK,IAAI;CAC1J,MAAM,MAAM;EACV,MAAM,EAAE,QAAQ,MAAA,QAAA,QAAA,CAAA,CAAA,WAAA,QAAM,oBAAA,CAAA;EAEtB,MAAM,IAAI,EAAE,SAAA,gBAAA,QAAQ,CAAC;CACvB;AACF,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./rolldown-runtime-C0LytTxp.js";
|
|
2
|
-
import { t as version } from "./package-
|
|
2
|
+
import { t as version } from "./package-KbKWAHe5.js";
|
|
3
3
|
import { define } from "gunshi";
|
|
4
4
|
//#region src/commands/mcp.ts
|
|
5
5
|
const command = define({
|
|
@@ -18,4 +18,4 @@ const command = define({
|
|
|
18
18
|
//#endregion
|
|
19
19
|
export { command };
|
|
20
20
|
|
|
21
|
-
//# sourceMappingURL=mcp-
|
|
21
|
+
//# sourceMappingURL=mcp-DmxvTBCH.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-
|
|
1
|
+
{"version":3,"file":"mcp-DmxvTBCH.js","names":[],"sources":["../src/commands/mcp.ts"],"sourcesContent":["import { define } from 'gunshi'\nimport { version } from '../../package.json'\n\nexport const command = define({\n name: 'mcp',\n description:\n 'Start a Model Context Protocol (MCP) server that exposes Kubb code generation as tools for AI assistants. Once running, configure your AI client (Claude, Cursor, Windsurf, etc.) to connect to it — the assistant can then call kubb generate directly without leaving the chat.',\n examples: ['kubb mcp', '# Then add to your MCP client config:', '# { \"mcpServers\": { \"kubb\": { \"command\": \"npx\", \"args\": [\"kubb\", \"mcp\"] } } }'].join('\\n'),\n async run() {\n const { run } = await import('../runners/mcp/run.ts')\n\n await run({ version })\n },\n})\n"],"mappings":";;;;AAGA,MAAa,UAAU,OAAO;CAC5B,MAAM;CACN,aACE;CACF,UAAU;EAAC;EAAY;EAAyC;CAA+E,CAAC,CAAC,KAAK,IAAI;CAC1J,MAAM,MAAM;EACV,MAAM,EAAE,QAAQ,MAAM,OAAO;EAE7B,MAAM,IAAI,EAAE,QAAQ,CAAC;CACvB;AACF,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region package.json
|
|
2
|
-
var version = "5.0.0-beta.
|
|
2
|
+
var version = "5.0.0-beta.102";
|
|
3
3
|
//#endregion
|
|
4
4
|
Object.defineProperty(exports, "version", {
|
|
5
5
|
enumerable: true,
|
|
@@ -8,4 +8,4 @@ Object.defineProperty(exports, "version", {
|
|
|
8
8
|
}
|
|
9
9
|
});
|
|
10
10
|
|
|
11
|
-
//# sourceMappingURL=package-
|
|
11
|
+
//# sourceMappingURL=package-DWXAqkLa.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package-DWXAqkLa.cjs","names":[],"sources":["../package.json"],"sourcesContent":[""],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package-KbKWAHe5.js","names":[],"sources":["../package.json"],"sourcesContent":[""],"mappings":""}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./rolldown-runtime-C0LytTxp.js";
|
|
2
2
|
import { c as canUseTTY, i as KUBB_NPM_PACKAGE_URL, o as UPDATE_CHECK_TIMEOUT_MS, r as sendTelemetry, s as WATCHER_IGNORED_PATHS, t as buildTelemetryEvent } from "./Telemetry-7z2tIqPm.js";
|
|
3
3
|
import { n as toError, t as toCause } from "./errors-CMvLO2NE.js";
|
|
4
|
-
import { t as version } from "./package-
|
|
4
|
+
import { t as version } from "./package-KbKWAHe5.js";
|
|
5
5
|
import { i as linters, n as detectTool, r as formatters } from "./tools-DH1a7ZJH.js";
|
|
6
6
|
import { styleText } from "node:util";
|
|
7
7
|
import { randomUUID } from "node:crypto";
|
|
@@ -334,7 +334,11 @@ Run \`npm install -g @kubb/cli\` to update`, "Update available for `Kubb`", {
|
|
|
334
334
|
reset();
|
|
335
335
|
state.totalPlugins = config.plugins?.length ?? 0;
|
|
336
336
|
if (logLevel$5 <= logLevel.silent) return;
|
|
337
|
-
const text = getMessage([
|
|
337
|
+
const text = getMessage([
|
|
338
|
+
"Generation started",
|
|
339
|
+
config.name ? `for ${styleText("dim", config.name)}` : void 0,
|
|
340
|
+
getInputPath(config)
|
|
341
|
+
].filter(Boolean).join(" "));
|
|
338
342
|
clack.intro(text);
|
|
339
343
|
});
|
|
340
344
|
context.hook("kubb:plugin:start", ({ plugin }) => {
|
|
@@ -514,8 +518,8 @@ const plainLogger = {
|
|
|
514
518
|
context.hook("kubb:lifecycle:start", ({ version }) => {
|
|
515
519
|
console.log(`Kubb CLI v${version}`);
|
|
516
520
|
});
|
|
517
|
-
context.hook("kubb:generation:start", () => {
|
|
518
|
-
const text = getMessage("Generation started");
|
|
521
|
+
context.hook("kubb:generation:start", ({ config }) => {
|
|
522
|
+
const text = getMessage(["Generation started", getInputPath(config)].filter(Boolean).join(" "));
|
|
519
523
|
console.log(text);
|
|
520
524
|
});
|
|
521
525
|
context.hook("kubb:plugin:start", ({ plugin }) => {
|
|
@@ -577,6 +581,15 @@ const plainLogger = {
|
|
|
577
581
|
//#endregion
|
|
578
582
|
//#region src/loggers/utils.ts
|
|
579
583
|
/**
|
|
584
|
+
* Display path for a config's input: the string form, or its `path` field when the input is an
|
|
585
|
+
* object. Loggers show it alongside `Generation started`.
|
|
586
|
+
*/
|
|
587
|
+
function getInputPath(config) {
|
|
588
|
+
const { input } = config;
|
|
589
|
+
if (typeof input === "string") return input;
|
|
590
|
+
return typeof input?.path === "string" ? input.path : void 0;
|
|
591
|
+
}
|
|
592
|
+
/**
|
|
580
593
|
* Optionally prefix a message with a [HH:MM:SS] timestamp when logLevel >= verbose.
|
|
581
594
|
* Shared across all logger adapters to avoid duplication.
|
|
582
595
|
*/
|
|
@@ -978,22 +991,22 @@ async function startWatcher(path, cb, log = {
|
|
|
978
991
|
* throwing, so the caller can turn it into a coded diagnostic. Failures never render here:
|
|
979
992
|
* the caller emits them through `Diagnostics.emit`, like every other diagnostic.
|
|
980
993
|
*/
|
|
981
|
-
async function runToolPass({ toolValue,
|
|
994
|
+
async function runToolPass({ toolValue, tool, outputPath, logLevel: logLevel$1, hooks, onStart, onEnd }) {
|
|
982
995
|
await onStart();
|
|
983
996
|
let resolvedTool = toolValue;
|
|
984
997
|
if (resolvedTool === "auto") {
|
|
985
|
-
const detected = await detect();
|
|
986
|
-
if (!detected) await hooks.callHook("kubb:warn", { message: noToolMessage });
|
|
998
|
+
const detected = await tool.detect();
|
|
999
|
+
if (!detected) await hooks.callHook("kubb:warn", { message: tool.noToolMessage });
|
|
987
1000
|
else {
|
|
988
1001
|
resolvedTool = detected;
|
|
989
|
-
await hooks.callHook("kubb:info", { message: `Auto-detected ${
|
|
1002
|
+
await hooks.callHook("kubb:info", { message: `Auto-detected ${tool.label}: ${styleText("dim", resolvedTool)}` });
|
|
990
1003
|
}
|
|
991
1004
|
}
|
|
992
1005
|
let toolError = null;
|
|
993
|
-
if (resolvedTool && resolvedTool !== "auto" && resolvedTool in
|
|
994
|
-
const toolConfig =
|
|
1006
|
+
if (resolvedTool && resolvedTool !== "auto" && resolvedTool in tool.map && existsSync(outputPath)) {
|
|
1007
|
+
const toolConfig = tool.map[resolvedTool];
|
|
995
1008
|
const successMessage = [
|
|
996
|
-
`${successPrefix} with ${styleText("dim", resolvedTool)}`,
|
|
1009
|
+
`${tool.successPrefix} with ${styleText("dim", resolvedTool)}`,
|
|
997
1010
|
logLevel$1 >= logLevel.info ? `on ${styleText("dim", outputPath)}` : void 0,
|
|
998
1011
|
"successfully"
|
|
999
1012
|
].filter(Boolean).join(" ");
|
|
@@ -1030,123 +1043,93 @@ async function generate(options) {
|
|
|
1030
1043
|
...options.config,
|
|
1031
1044
|
input: input ?? options.config.input
|
|
1032
1045
|
};
|
|
1033
|
-
const
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1046
|
+
const processOutput = async ({ config: resolvedConfig, outputPath }) => {
|
|
1047
|
+
const outputDiagnostics = [];
|
|
1048
|
+
const reportOutputFailure = async (code, label, error) => {
|
|
1049
|
+
const diagnostic = outputDiagnostic(code, label, error);
|
|
1050
|
+
outputDiagnostics.push(diagnostic);
|
|
1051
|
+
await Diagnostics.emit(hooks, diagnostic);
|
|
1052
|
+
};
|
|
1053
|
+
const toolPasses = [{
|
|
1054
|
+
value: resolvedConfig.output.format,
|
|
1055
|
+
code: Diagnostics.code.formatFailed,
|
|
1056
|
+
tool: {
|
|
1057
|
+
label: "formatter",
|
|
1058
|
+
map: formatters,
|
|
1059
|
+
detect: () => detectTool([
|
|
1060
|
+
"oxfmt",
|
|
1061
|
+
"biome",
|
|
1062
|
+
"prettier"
|
|
1063
|
+
]),
|
|
1064
|
+
successPrefix: "Formatting",
|
|
1065
|
+
noToolMessage: "No formatter found (oxfmt, biome, or prettier). Skipping formatting."
|
|
1066
|
+
},
|
|
1067
|
+
onStart: () => hooks.callHook("kubb:format:start"),
|
|
1068
|
+
onEnd: () => hooks.callHook("kubb:format:end")
|
|
1069
|
+
}, {
|
|
1070
|
+
value: resolvedConfig.output.lint,
|
|
1071
|
+
code: Diagnostics.code.lintFailed,
|
|
1072
|
+
tool: {
|
|
1073
|
+
label: "linter",
|
|
1074
|
+
map: linters,
|
|
1075
|
+
detect: () => detectTool([
|
|
1076
|
+
"oxlint",
|
|
1077
|
+
"biome",
|
|
1078
|
+
"eslint"
|
|
1079
|
+
]),
|
|
1080
|
+
successPrefix: "Linting",
|
|
1081
|
+
noToolMessage: "No linter found (oxlint, biome, or eslint). Skipping linting."
|
|
1082
|
+
},
|
|
1083
|
+
onStart: () => hooks.callHook("kubb:lint:start"),
|
|
1084
|
+
onEnd: () => hooks.callHook("kubb:lint:end")
|
|
1085
|
+
}];
|
|
1086
|
+
for (const pass of toolPasses) {
|
|
1087
|
+
if (!pass.value) continue;
|
|
1088
|
+
const error = await runToolPass({
|
|
1089
|
+
toolValue: pass.value,
|
|
1090
|
+
tool: pass.tool,
|
|
1091
|
+
onStart: pass.onStart,
|
|
1092
|
+
onEnd: pass.onEnd,
|
|
1093
|
+
outputPath,
|
|
1094
|
+
logLevel,
|
|
1095
|
+
hooks
|
|
1096
|
+
});
|
|
1097
|
+
if (error) await reportOutputFailure(pass.code, pass.tool.label, error);
|
|
1098
|
+
}
|
|
1099
|
+
if (resolvedConfig.output.postGenerate?.length) {
|
|
1100
|
+
await hooks.callHook("kubb:hooks:start");
|
|
1101
|
+
const hookResults = await runPostGenerate({
|
|
1102
|
+
commands: resolvedConfig.output.postGenerate,
|
|
1103
|
+
hooks
|
|
1104
|
+
});
|
|
1105
|
+
for (const hookResult of hookResults) {
|
|
1106
|
+
if (hookResult.success) continue;
|
|
1107
|
+
await reportOutputFailure(Diagnostics.code.postGenerateFailed, "Post-generate command", hookResult.error ?? /* @__PURE__ */ new Error("Post-generate command failed"));
|
|
1108
|
+
}
|
|
1109
|
+
await hooks.callHook("kubb:hooks:end");
|
|
1110
|
+
}
|
|
1111
|
+
return outputDiagnostics;
|
|
1112
|
+
};
|
|
1113
|
+
hooks.hook("kubb:generation:end", ({ status }) => {
|
|
1114
|
+
if (status === "success") return hooks.callHook("kubb:success", {
|
|
1115
|
+
message: "Generation succeeded",
|
|
1116
|
+
info: inputPath
|
|
1117
|
+
});
|
|
1043
1118
|
});
|
|
1044
|
-
const
|
|
1045
|
-
await
|
|
1046
|
-
|
|
1047
|
-
name: p.name,
|
|
1048
|
-
options: p.options
|
|
1049
|
-
}));
|
|
1050
|
-
const reportTelemetry = (status) => sendTelemetry(buildTelemetryEvent({
|
|
1119
|
+
const kubb = createKubb(config, { hooks });
|
|
1120
|
+
const result = await kubb.generate({ processOutput });
|
|
1121
|
+
await sendTelemetry(buildTelemetryEvent({
|
|
1051
1122
|
command: "generate",
|
|
1052
1123
|
kubbVersion: version,
|
|
1053
|
-
plugins:
|
|
1124
|
+
plugins: Array.from(kubb.driver.plugins.values(), (p) => ({
|
|
1125
|
+
name: p.name,
|
|
1126
|
+
options: p.options
|
|
1127
|
+
})),
|
|
1054
1128
|
hrStart,
|
|
1055
|
-
filesCreated: files.length,
|
|
1056
|
-
status
|
|
1129
|
+
filesCreated: result.files.length,
|
|
1130
|
+
status: result.success ? "success" : "failed"
|
|
1057
1131
|
}));
|
|
1058
|
-
|
|
1059
|
-
if (!Diagnostics.isProblem(diagnostic)) continue;
|
|
1060
|
-
if (diagnostic.code === Diagnostics.code.unknown) await hooks.callHook("kubb:error", { error: diagnostic.cause ?? new Error(diagnostic.message) });
|
|
1061
|
-
else await Diagnostics.emit(hooks, diagnostic);
|
|
1062
|
-
}
|
|
1063
|
-
if (Diagnostics.hasError(diagnostics)) {
|
|
1064
|
-
await hooks.callHook("kubb:generation:end", {
|
|
1065
|
-
config,
|
|
1066
|
-
storage: kubb.storage,
|
|
1067
|
-
diagnostics,
|
|
1068
|
-
filesCreated: files.length,
|
|
1069
|
-
status: "failed",
|
|
1070
|
-
hrStart
|
|
1071
|
-
});
|
|
1072
|
-
await reportTelemetry("failed");
|
|
1073
|
-
return false;
|
|
1074
|
-
}
|
|
1075
|
-
const outputPath = path.resolve(config.root, config.output.path);
|
|
1076
|
-
const outputDiagnostics = [];
|
|
1077
|
-
const reportOutputFailure = async (code, label, error) => {
|
|
1078
|
-
const diagnostic = outputDiagnostic(code, label, error);
|
|
1079
|
-
outputDiagnostics.push(diagnostic);
|
|
1080
|
-
await Diagnostics.emit(hooks, diagnostic);
|
|
1081
|
-
};
|
|
1082
|
-
if (config.output.format) {
|
|
1083
|
-
const error = await runToolPass({
|
|
1084
|
-
toolValue: config.output.format,
|
|
1085
|
-
detect: () => detectTool([
|
|
1086
|
-
"oxfmt",
|
|
1087
|
-
"biome",
|
|
1088
|
-
"prettier"
|
|
1089
|
-
]),
|
|
1090
|
-
toolMap: formatters,
|
|
1091
|
-
toolLabel: "formatter",
|
|
1092
|
-
successPrefix: "Formatting",
|
|
1093
|
-
noToolMessage: "No formatter found (oxfmt, biome, or prettier). Skipping formatting.",
|
|
1094
|
-
onStart: () => hooks.callHook("kubb:format:start"),
|
|
1095
|
-
onEnd: () => hooks.callHook("kubb:format:end"),
|
|
1096
|
-
outputPath,
|
|
1097
|
-
logLevel,
|
|
1098
|
-
hooks
|
|
1099
|
-
});
|
|
1100
|
-
if (error) await reportOutputFailure(Diagnostics.code.formatFailed, "formatter", error);
|
|
1101
|
-
}
|
|
1102
|
-
if (config.output.lint) {
|
|
1103
|
-
const error = await runToolPass({
|
|
1104
|
-
toolValue: config.output.lint,
|
|
1105
|
-
detect: () => detectTool([
|
|
1106
|
-
"oxlint",
|
|
1107
|
-
"biome",
|
|
1108
|
-
"eslint"
|
|
1109
|
-
]),
|
|
1110
|
-
toolMap: linters,
|
|
1111
|
-
toolLabel: "linter",
|
|
1112
|
-
successPrefix: "Linting",
|
|
1113
|
-
noToolMessage: "No linter found (oxlint, biome, or eslint). Skipping linting.",
|
|
1114
|
-
onStart: () => hooks.callHook("kubb:lint:start"),
|
|
1115
|
-
onEnd: () => hooks.callHook("kubb:lint:end"),
|
|
1116
|
-
outputPath,
|
|
1117
|
-
logLevel,
|
|
1118
|
-
hooks
|
|
1119
|
-
});
|
|
1120
|
-
if (error) await reportOutputFailure(Diagnostics.code.lintFailed, "linter", error);
|
|
1121
|
-
}
|
|
1122
|
-
if (config.output.postGenerate?.length) {
|
|
1123
|
-
await hooks.callHook("kubb:hooks:start");
|
|
1124
|
-
const hookResults = await runPostGenerate({
|
|
1125
|
-
commands: config.output.postGenerate,
|
|
1126
|
-
hooks
|
|
1127
|
-
});
|
|
1128
|
-
for (const result of hookResults) {
|
|
1129
|
-
if (result.success) continue;
|
|
1130
|
-
await reportOutputFailure(Diagnostics.code.postGenerateFailed, "Post-generate command", result.error ?? /* @__PURE__ */ new Error("Post-generate command failed"));
|
|
1131
|
-
}
|
|
1132
|
-
await hooks.callHook("kubb:hooks:end");
|
|
1133
|
-
}
|
|
1134
|
-
const finalDiagnostics = [...diagnostics, ...outputDiagnostics];
|
|
1135
|
-
const failed = Diagnostics.hasError(outputDiagnostics);
|
|
1136
|
-
if (!failed) await hooks.callHook("kubb:success", {
|
|
1137
|
-
message: "Generation succeeded",
|
|
1138
|
-
info: inputPath
|
|
1139
|
-
});
|
|
1140
|
-
await hooks.callHook("kubb:generation:end", {
|
|
1141
|
-
config,
|
|
1142
|
-
storage: kubb.storage,
|
|
1143
|
-
diagnostics: finalDiagnostics,
|
|
1144
|
-
filesCreated: files.length,
|
|
1145
|
-
status: failed ? "failed" : "success",
|
|
1146
|
-
hrStart
|
|
1147
|
-
});
|
|
1148
|
-
await reportTelemetry(failed ? "failed" : "success");
|
|
1149
|
-
return !failed;
|
|
1132
|
+
return result.success;
|
|
1150
1133
|
}
|
|
1151
1134
|
/**
|
|
1152
1135
|
* Builds a coded diagnostic for an output-phase failure (formatter, linter, or `done` hook).
|
|
@@ -1261,4 +1244,4 @@ async function run({ input, configPath, logLevel: logLevelKey, watch, reporters:
|
|
|
1261
1244
|
//#endregion
|
|
1262
1245
|
export { run };
|
|
1263
1246
|
|
|
1264
|
-
//# sourceMappingURL=run-
|
|
1247
|
+
//# sourceMappingURL=run-CjYRuPD8.js.map
|