@hey-api/openapi-ts 0.90.9 → 0.91.0

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.
@@ -1,7 +1,6 @@
1
-
2
- import { n as UserConfig, p as Context, r as Input, t as Config } from "./types-CQTciSfa.mjs";
1
+ import { n as UserConfig, t as Config } from "./types-Ba27ofyy.mjs";
3
2
  import { Logger } from "@hey-api/codegen-core";
4
- import { getResolvedInput } from "@hey-api/json-schema-ref-parser";
3
+ import { ConfigError, getSpec, parseOpenApiSpec } from "@hey-api/shared";
5
4
 
6
5
  //#region src/config/resolve.d.ts
7
6
  type ResolvedJob = {
@@ -30,70 +29,5 @@ declare function resolveJobs({
30
29
  userConfigs: ReadonlyArray<UserConfig>;
31
30
  }): Promise<Configs>;
32
31
  //#endregion
33
- //#region src/types/types.d.ts
34
- interface WatchValues {
35
- /**
36
- * Headers to be sent with each HEAD and/or GET request. This effectively
37
- * serves as a mechanism resolver because setting certain headers will opt
38
- * into comparing the specifications using that method.
39
- */
40
- headers: Headers;
41
- /**
42
- * Can we send a HEAD request instead of fetching the whole specification?
43
- * This value will be set after the first successful fetch.
44
- */
45
- isHeadMethodSupported?: boolean;
46
- /**
47
- * String content of the last successfully fetched specification.
48
- */
49
- lastValue?: string;
50
- }
51
- //#endregion
52
- //#region src/getSpec.d.ts
53
- type SpecResponse = {
54
- arrayBuffer: ArrayBuffer | undefined;
55
- error?: never;
56
- resolvedInput: ReturnType<typeof getResolvedInput>;
57
- response?: never;
58
- };
59
- type SpecError = {
60
- arrayBuffer?: never;
61
- error: 'not-modified' | 'not-ok';
62
- resolvedInput?: never;
63
- response: Response;
64
- };
65
- /**
66
- * @internal
67
- */
68
- declare const getSpec: ({
69
- fetchOptions,
70
- inputPath,
71
- timeout,
72
- watch
73
- }: {
74
- fetchOptions?: RequestInit;
75
- inputPath: Input["path"];
76
- timeout: number | undefined;
77
- watch: WatchValues;
78
- }) => Promise<SpecResponse | SpecError>;
79
- //#endregion
80
- //#region src/openApi/index.d.ts
81
- /**
82
- * @internal
83
- * Parse the resolved OpenAPI specification. This will populate and return
84
- * `context` with intermediate representation obtained from the parsed spec.
85
- */
86
- declare const parseOpenApiSpec: ({
87
- config,
88
- dependencies,
89
- logger,
90
- spec
91
- }: {
92
- config: Config;
93
- dependencies: Record<string, string>;
94
- logger: Logger;
95
- spec: unknown;
96
- }) => Context;
97
- //#endregion
98
32
  export { getSpec, resolveJobs as initConfigs, parseOpenApiSpec };
99
33
  //# sourceMappingURL=internal.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"internal.d.mts","names":[],"sources":["../src/config/resolve.ts","../src/config/init.ts"],"sourcesContent":[],"mappings":";;;;;KAWY,WAAA;UACF;UACA,MAAM;EAFJ,KAAA,EAAA,MAAA;CACF;;;KCFE,OAAA;gBACI;EDAJ,IAAA,ECCJ,aDDe,CCCD,WDDC,CAAA;EACb;;;EACK,OAAA,ECGJ,aDHI,CCGU,WDHV,CAAA;;;;ACHf;AACgB,iBAWM,WAAA,CAXN;EAAA,MAAA;EAAA;CAAA,EAAA;EACM,MAAA,EAcZ,MAdY;EAAd,WAAA,EAeO,aAfP,CAeqB,UAfrB,CAAA;CAIiB,CAAA,EAYrB,OAZqB,CAYb,OAZa,CAAA"}
package/dist/internal.mjs CHANGED
@@ -1,4 +1,4 @@
1
-
2
- import { i as resolveJobs, r as getSpec, t as parseOpenApiSpec } from "./openApi-CE_z8tev.mjs";
1
+ import { t as resolveJobs } from "./init-kvO44gnv.mjs";
2
+ import { getSpec, parseOpenApiSpec } from "@hey-api/shared";
3
3
 
4
4
  export { getSpec, resolveJobs as initConfigs, parseOpenApiSpec };
package/dist/run.d.mts CHANGED
@@ -1,2 +1 @@
1
-
2
1
  export { };
package/dist/run.mjs CHANGED
@@ -1,17 +1,15 @@
1
1
  #!/usr/bin/env node
2
-
3
-
4
- import "./openApi-CE_z8tev.mjs";
5
- import { i as createClient } from "./src-DqFHTOrs.mjs";
2
+ import "./init-kvO44gnv.mjs";
3
+ import { c as createClient } from "./src-Dmlg6WRV.mjs";
6
4
  import { Command, CommanderError } from "commander";
7
5
 
8
6
  //#region package.json
9
- var version = "0.90.9";
7
+ var version = "0.91.0";
10
8
  var bin = { "openapi-ts": "./bin/run.js" };
11
9
 
12
10
  //#endregion
13
11
  //#region src/cli/adapter.ts
14
- const cliToConfig = (cli) => {
12
+ function cliToConfig(cli) {
15
13
  const config = {};
16
14
  if (cli.input) config.input = cli.input;
17
15
  if (cli.output) config.output = cli.output;
@@ -30,7 +28,7 @@ const cliToConfig = (cli) => {
30
28
  if (cli.watch !== void 0) if (typeof cli.watch === "string") config.watch = Number.parseInt(cli.watch, 10);
31
29
  else config.watch = cli.watch;
32
30
  return config;
33
- };
31
+ }
34
32
 
35
33
  //#endregion
36
34
  //#region src/cli/index.ts
package/dist/run.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"run.mjs","names":["config: Partial<UserConfig>","plugins: ToArray<UserConfig['plugins']>","pkg.bin","pkg.version"],"sources":["../package.json","../src/cli/adapter.ts","../src/cli/index.ts","../src/run.ts"],"sourcesContent":["","import type { ToArray } from '@hey-api/types';\n\nimport type { UserConfig } from '~/config/types';\n\nimport type { CliOptions } from './schema';\n\nexport const cliToConfig = (cli: CliOptions): Partial<UserConfig> => {\n const config: Partial<UserConfig> = {};\n\n if (cli.input) config.input = cli.input;\n if (cli.output) config.output = cli.output;\n if (cli.file) config.configFile = cli.file;\n if (cli.dryRun !== undefined) config.dryRun = cli.dryRun;\n\n const plugins: ToArray<UserConfig['plugins']> = [];\n if (cli.plugins instanceof Array && cli.plugins.length > 0) {\n plugins.push(...cli.plugins);\n }\n if (cli.client) plugins.push(cli.client);\n if (plugins.length > 0) config.plugins = plugins;\n\n if (cli.debug || cli.silent || cli.logs || cli.logFile !== undefined) {\n config.logs = {\n ...(cli.logs && { path: cli.logs }),\n ...(cli.debug && { level: 'debug' as const }),\n ...(cli.silent && { level: 'silent' as const }),\n ...(cli.logFile !== undefined && { file: cli.logFile }),\n };\n }\n\n if (cli.watch !== undefined) {\n if (typeof cli.watch === 'string') {\n config.watch = Number.parseInt(cli.watch, 10);\n } else {\n config.watch = cli.watch;\n }\n }\n\n return config;\n};\n","import { Command, CommanderError } from 'commander';\n\nimport { createClient } from '~/index';\n\nimport pkg from '../../package.json' assert { type: 'json' };\nimport { cliToConfig } from './adapter';\n\nconst binName = Object.keys(pkg.bin)[0]!;\n\nconst program = new Command()\n .name(binName)\n .description('Generate TypeScript code from OpenAPI specifications')\n .version(pkg.version);\n\nprogram\n .option(\n '-i, --input <path...>',\n 'OpenAPI specification (path, URL, or string)',\n )\n .option('-o, --output <path...>', 'Output folder(s)')\n .option('-c, --client <name>', 'HTTP client to generate')\n .option('-p, --plugins [names...]', 'Plugins to use')\n .option('-f, --file <path>', 'Path to config file')\n .option('-d, --debug', 'Enable debug logging')\n .option('-s, --silent', 'Suppress all output')\n .option('-l, --logs <path>', 'Logs folder path')\n .option('--no-log-file', 'Disable log file output')\n .option('--dry-run', 'Skip writing files')\n .option('-w, --watch [interval]', 'Watch for changes')\n .action(async (options) => {\n const config = cliToConfig(options);\n\n const context = await createClient(\n config as Parameters<typeof createClient>[0],\n );\n\n const hasActiveWatch = context[0]?.config.input.some(\n (input) => input.watch?.enabled,\n );\n\n if (!hasActiveWatch) {\n process.exit(0);\n }\n });\n\nexport async function runCli(): Promise<void> {\n try {\n await program.parseAsync(process.argv);\n } catch (error) {\n if (error instanceof CommanderError && 'code' in error) {\n if (error.code === 'commander.optionMissingArgument') {\n console.error(\n `\\nMissing required argument. Run '${binName} --help' for usage.\\n`,\n );\n } else if (error.code === 'commander.unknownOption') {\n console.error(\n `\\nUnknown option. Run '${binName} --help' for available options.\\n`,\n );\n }\n\n process.exit(error.exitCode);\n }\n\n console.error('Unexpected error:', error);\n process.exit(1);\n }\n}\n","#!/usr/bin/env node\n\nimport { runCli } from '~/cli';\n\nrunCli();\n"],"mappings":";;;;;;;;;;;;;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B,CAC/C,OAAO,iBAAiB,0BAA0B,CAClD,OAAO,aAAa,qBAAqB,CACzC,OAAO,0BAA0B,oBAAoB,CACrD,OAAO,OAAO,YAAY;AAWzB,KAAI,EARY,MAAM,aAFP,YAAY,QAAQ,CAIlC,EAE8B,IAAI,OAAO,MAAM,MAC7C,UAAU,MAAM,OAAO,QACzB,CAGC,SAAQ,KAAK,EAAE;EAEjB;AAEJ,eAAsB,SAAwB;AAC5C,KAAI;AACF,QAAM,QAAQ,WAAW,QAAQ,KAAK;UAC/B,OAAO;AACd,MAAI,iBAAiB,kBAAkB,UAAU,OAAO;AACtD,OAAI,MAAM,SAAS,kCACjB,SAAQ,MACN,qCAAqC,QAAQ,uBAC9C;YACQ,MAAM,SAAS,0BACxB,SAAQ,MACN,0BAA0B,QAAQ,mCACnC;AAGH,WAAQ,KAAK,MAAM,SAAS;;AAG9B,UAAQ,MAAM,qBAAqB,MAAM;AACzC,UAAQ,KAAK,EAAE;;;;;;AC5DnB,QAAQ"}
1
+ {"version":3,"file":"run.mjs","names":["config: Partial<UserConfig>","plugins: ToArray<UserConfig['plugins']>","pkg.bin","pkg.version"],"sources":["../package.json","../src/cli/adapter.ts","../src/cli/index.ts","../src/run.ts"],"sourcesContent":["","import type { ToArray } from '@hey-api/types';\n\nimport type { UserConfig } from '~/config/types';\n\nimport type { CliOptions } from './schema';\n\nexport function cliToConfig(cli: CliOptions): Partial<UserConfig> {\n const config: Partial<UserConfig> = {};\n\n if (cli.input) config.input = cli.input;\n if (cli.output) config.output = cli.output;\n if (cli.file) config.configFile = cli.file;\n if (cli.dryRun !== undefined) config.dryRun = cli.dryRun;\n\n const plugins: ToArray<UserConfig['plugins']> = [];\n if (cli.plugins instanceof Array && cli.plugins.length > 0) {\n plugins.push(...cli.plugins);\n }\n if (cli.client) plugins.push(cli.client);\n if (plugins.length > 0) config.plugins = plugins;\n\n if (cli.debug || cli.silent || cli.logs || cli.logFile !== undefined) {\n config.logs = {\n ...(cli.logs && { path: cli.logs }),\n ...(cli.debug && { level: 'debug' as const }),\n ...(cli.silent && { level: 'silent' as const }),\n ...(cli.logFile !== undefined && { file: cli.logFile }),\n };\n }\n\n if (cli.watch !== undefined) {\n if (typeof cli.watch === 'string') {\n config.watch = Number.parseInt(cli.watch, 10);\n } else {\n config.watch = cli.watch;\n }\n }\n\n return config;\n}\n","import { Command, CommanderError } from 'commander';\n\nimport { createClient } from '~/index';\n\nimport pkg from '../../package.json';\nimport { cliToConfig } from './adapter';\n\nconst binName = Object.keys(pkg.bin)[0]!;\n\nconst program = new Command()\n .name(binName)\n .description('Generate TypeScript code from OpenAPI specifications')\n .version(pkg.version);\n\nprogram\n .option(\n '-i, --input <path...>',\n 'OpenAPI specification (path, URL, or string)',\n )\n .option('-o, --output <path...>', 'Output folder(s)')\n .option('-c, --client <name>', 'HTTP client to generate')\n .option('-p, --plugins [names...]', 'Plugins to use')\n .option('-f, --file <path>', 'Path to config file')\n .option('-d, --debug', 'Enable debug logging')\n .option('-s, --silent', 'Suppress all output')\n .option('-l, --logs <path>', 'Logs folder path')\n .option('--no-log-file', 'Disable log file output')\n .option('--dry-run', 'Skip writing files')\n .option('-w, --watch [interval]', 'Watch for changes')\n .action(async (options) => {\n const config = cliToConfig(options);\n\n const context = await createClient(\n config as Parameters<typeof createClient>[0],\n );\n\n const hasActiveWatch = context[0]?.config.input.some(\n (input) => input.watch?.enabled,\n );\n\n if (!hasActiveWatch) {\n process.exit(0);\n }\n });\n\nexport async function runCli(): Promise<void> {\n try {\n await program.parseAsync(process.argv);\n } catch (error) {\n if (error instanceof CommanderError && 'code' in error) {\n if (error.code === 'commander.optionMissingArgument') {\n console.error(\n `\\nMissing required argument. Run '${binName} --help' for usage.\\n`,\n );\n } else if (error.code === 'commander.unknownOption') {\n console.error(\n `\\nUnknown option. Run '${binName} --help' for available options.\\n`,\n );\n }\n\n process.exit(error.exitCode);\n }\n\n console.error('Unexpected error:', error);\n process.exit(1);\n }\n}\n","#!/usr/bin/env node\n\nimport { run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O,gBAAgB,sBAAsB,CAC7C,OAAO,qBAAqB,mBAAmB,CAC/C,OAAO,iBAAiB,0BAA0B,CAClD,OAAO,aAAa,qBAAqB,CACzC,OAAO,0BAA0B,oBAAoB,CACrD,OAAO,OAAO,YAAY;AAWzB,KAAI,EARY,MAAM,aAFP,YAAY,QAAQ,CAIlC,EAE8B,IAAI,OAAO,MAAM,MAC7C,UAAU,MAAM,OAAO,QACzB,CAGC,SAAQ,KAAK,EAAE;EAEjB;AAEJ,eAAsB,SAAwB;AAC5C,KAAI;AACF,QAAM,QAAQ,WAAW,QAAQ,KAAK;UAC/B,OAAO;AACd,MAAI,iBAAiB,kBAAkB,UAAU,OAAO;AACtD,OAAI,MAAM,SAAS,kCACjB,SAAQ,MACN,qCAAqC,QAAQ,uBAC9C;YACQ,MAAM,SAAS,0BACxB,SAAQ,MACN,0BAA0B,QAAQ,mCACnC;AAGH,WAAQ,KAAK,MAAM,SAAS;;AAG9B,UAAQ,MAAM,qBAAqB,MAAM;AACzC,UAAQ,KAAK,EAAE;;;;;;AC5DnB,QAAQ"}
@@ -0,0 +1,228 @@
1
+ import { _ as postProcessors, c as TypeScriptRenderer, g as getTypedConfig, h as getClientPlugin, i as generateClientBundle, t as resolveJobs } from "./init-kvO44gnv.mjs";
2
+ import { Logger, Logger as Logger$1, Project } from "@hey-api/codegen-core";
3
+ import { ConfigValidationError, Context, IntentContext, JobError, OperationPath as OperationPath$1, OperationStrategy as OperationStrategy$1, applyNaming, buildGraph, checkNodeVersion, compileInputPath, defaultPaginationKeywords, definePluginConfig as definePluginConfig$1, getLogs, getSpec, logCrashReport, logInputPaths, openGitHubIssueWithCrashReport, parseOpenApiSpec, patchOpenApiSpec, postprocessOutput, printCliIntro, printCrashReport, shouldReportCrash, utils } from "@hey-api/shared";
4
+ import colors from "ansi-colors";
5
+ import colorSupport from "color-support";
6
+ import path from "node:path";
7
+ import { fileURLToPath } from "node:url";
8
+ import fs from "node:fs";
9
+ import { $RefParser } from "@hey-api/json-schema-ref-parser";
10
+
11
+ //#region src/generate/output.ts
12
+ const generateOutput = async ({ context }) => {
13
+ const outputPath = path.resolve(context.config.output.path);
14
+ if (context.config.output.clean) {
15
+ if (fs.existsSync(outputPath)) fs.rmSync(outputPath, {
16
+ force: true,
17
+ recursive: true
18
+ });
19
+ }
20
+ const config = getTypedConfig(context);
21
+ const client = getClientPlugin(config);
22
+ if ("bundle" in client.config && client.config.bundle && !config.dryRun) config._FRAGILE_CLIENT_BUNDLE_RENAMED = generateClientBundle({
23
+ meta: { importFileExtension: config.output.importFileExtension },
24
+ outputPath,
25
+ plugin: client,
26
+ project: context.gen
27
+ });
28
+ for (const plugin of context.registerPlugins()) await plugin.run();
29
+ context.gen.plan();
30
+ const ctx = new IntentContext(context.spec);
31
+ for (const intent of context.intents) await intent.run(ctx);
32
+ for (const file of context.gen.render()) {
33
+ const filePath = path.resolve(outputPath, file.path);
34
+ const dir = path.dirname(filePath);
35
+ if (!context.config.dryRun) {
36
+ fs.mkdirSync(dir, { recursive: true });
37
+ fs.writeFileSync(filePath, file.content, { encoding: "utf8" });
38
+ }
39
+ }
40
+ const { source } = context.config.output;
41
+ if (source.enabled) {
42
+ const sourcePath = source.path === null ? void 0 : path.resolve(outputPath, source.path);
43
+ if (!context.config.dryRun && sourcePath && sourcePath !== outputPath) fs.mkdirSync(sourcePath, { recursive: true });
44
+ const serialized = await source.serialize(context.spec);
45
+ if (!context.config.dryRun && sourcePath) fs.writeFileSync(path.resolve(sourcePath, `${source.fileName}.${source.extension}`), serialized, { encoding: "utf8" });
46
+ if (source.callback) await source.callback(serialized);
47
+ }
48
+ };
49
+
50
+ //#endregion
51
+ //#region src/createClient.ts
52
+ async function createClient$1({ config, dependencies, jobIndex, logger, watches: _watches }) {
53
+ const watches = _watches || Array.from({ length: config.input.length }, () => ({ headers: new Headers() }));
54
+ const inputPaths = config.input.map((input) => compileInputPath(input));
55
+ if (config.logs.level !== "silent" && !_watches) logInputPaths(inputPaths, jobIndex);
56
+ const getSpecData = async (input, index) => {
57
+ const eventSpec = logger.timeEvent("spec");
58
+ const { arrayBuffer, error, resolvedInput, response } = await getSpec({
59
+ fetchOptions: input.fetch,
60
+ inputPath: inputPaths[index].path,
61
+ timeout: input.watch.timeout,
62
+ watch: watches[index]
63
+ });
64
+ eventSpec.timeEnd();
65
+ if (error && !_watches) throw new Error(`Request failed with status ${response.status}: ${response.statusText}`);
66
+ return {
67
+ arrayBuffer,
68
+ resolvedInput
69
+ };
70
+ };
71
+ const specData = (await Promise.all(config.input.map((input, index) => getSpecData(input, index)))).filter((data) => data.arrayBuffer || data.resolvedInput);
72
+ let context;
73
+ if (specData.length) {
74
+ const refParser = new $RefParser();
75
+ const data = specData.length > 1 ? await refParser.bundleMany({
76
+ arrayBuffer: specData.map((data$1) => data$1.arrayBuffer),
77
+ pathOrUrlOrSchemas: [],
78
+ resolvedInputs: specData.map((data$1) => data$1.resolvedInput)
79
+ }) : await refParser.bundle({
80
+ arrayBuffer: specData[0].arrayBuffer,
81
+ pathOrUrlOrSchema: void 0,
82
+ resolvedInput: specData[0].resolvedInput
83
+ });
84
+ if (config.logs.level !== "silent" && _watches) {
85
+ console.clear();
86
+ logInputPaths(inputPaths, jobIndex);
87
+ }
88
+ const eventInputPatch = logger.timeEvent("input.patch");
89
+ patchOpenApiSpec({
90
+ patchOptions: config.parser.patch,
91
+ spec: data
92
+ });
93
+ eventInputPatch.timeEnd();
94
+ const eventParser = logger.timeEvent("parser");
95
+ context = new Context({
96
+ config,
97
+ dependencies,
98
+ logger,
99
+ project: new Project({
100
+ defaultFileName: "index",
101
+ fileName: (base) => {
102
+ const name = applyNaming(base, config.output.fileName);
103
+ const { suffix } = config.output.fileName;
104
+ if (!suffix) return name;
105
+ return name === "index" || name.endsWith(suffix) ? name : `${name}${suffix}`;
106
+ },
107
+ nameConflictResolvers: config.output.nameConflictResolver ? { typescript: config.output.nameConflictResolver } : void 0,
108
+ renderers: [new TypeScriptRenderer({
109
+ header: config.output.header,
110
+ preferExportAll: config.output.preferExportAll,
111
+ preferFileExtension: config.output.importFileExtension || void 0,
112
+ resolveModuleName: config.output.resolveModuleName
113
+ })],
114
+ root: config.output.path
115
+ }),
116
+ spec: data
117
+ });
118
+ parseOpenApiSpec(context);
119
+ context.graph = buildGraph(context.ir, logger).graph;
120
+ eventParser.timeEnd();
121
+ const eventGenerator = logger.timeEvent("generator");
122
+ await generateOutput({ context });
123
+ eventGenerator.timeEnd();
124
+ const eventPostprocess = logger.timeEvent("postprocess");
125
+ if (!config.dryRun) {
126
+ const jobPrefix = colors.gray(`[Job ${jobIndex + 1}] `);
127
+ postprocessOutput(config.output, postProcessors, jobPrefix);
128
+ if (config.logs.level !== "silent") {
129
+ const outputPath = process.env.INIT_CWD ? `./${path.relative(process.env.INIT_CWD, config.output.path)}` : config.output.path;
130
+ console.log(`${jobPrefix}${colors.green("✅ Done!")} Your output is in ${colors.cyanBright(outputPath)}`);
131
+ }
132
+ }
133
+ eventPostprocess.timeEnd();
134
+ }
135
+ const watchedInput = config.input.find((input, index) => input.watch.enabled && typeof inputPaths[index].path === "string");
136
+ if (watchedInput) setTimeout(() => {
137
+ createClient$1({
138
+ config,
139
+ dependencies,
140
+ jobIndex,
141
+ logger,
142
+ watches
143
+ });
144
+ }, watchedInput.watch.interval);
145
+ return context;
146
+ }
147
+
148
+ //#endregion
149
+ //#region src/generate.ts
150
+ const __filename = fileURLToPath(import.meta.url);
151
+ const __dirname = path.dirname(__filename);
152
+ /**
153
+ * Generate a client from the provided configuration.
154
+ *
155
+ * @param userConfig User provided {@link UserConfig} configuration(s).
156
+ */
157
+ async function createClient(userConfig, logger = new Logger()) {
158
+ const resolvedConfig = typeof userConfig === "function" ? await userConfig() : userConfig;
159
+ const userConfigs = resolvedConfig ? resolvedConfig instanceof Array ? resolvedConfig : [resolvedConfig] : [];
160
+ let rawLogs = userConfigs.find((config) => getLogs(config.logs).level !== "silent")?.logs;
161
+ if (typeof rawLogs === "string") rawLogs = getLogs(rawLogs);
162
+ let jobs = [];
163
+ try {
164
+ checkNodeVersion();
165
+ const eventCreateClient = logger.timeEvent("createClient");
166
+ const eventConfig = logger.timeEvent("config");
167
+ const resolved = await resolveJobs({
168
+ logger,
169
+ userConfigs
170
+ });
171
+ const dependencies = resolved.dependencies;
172
+ jobs = resolved.jobs;
173
+ if (jobs.some((job) => job.config.logs.level !== "silent")) printCliIntro(__dirname);
174
+ eventConfig.timeEnd();
175
+ const configErrors = jobs.flatMap((job) => job.errors.map((error) => ({
176
+ error,
177
+ jobIndex: job.index
178
+ })));
179
+ if (configErrors.length > 0) throw new ConfigValidationError(configErrors);
180
+ const contexts = (await Promise.all(jobs.map(async (job) => {
181
+ try {
182
+ return await createClient$1({
183
+ config: job.config,
184
+ dependencies,
185
+ jobIndex: job.index,
186
+ logger
187
+ });
188
+ } catch (error) {
189
+ if (error instanceof Error) throw new JobError("", {
190
+ error,
191
+ jobIndex: job.index
192
+ });
193
+ }
194
+ }))).filter((ctx) => ctx !== void 0);
195
+ eventCreateClient.timeEnd();
196
+ logger.report(jobs.some((job) => job.config.logs.level === "debug"));
197
+ return contexts;
198
+ } catch (error) {
199
+ const logs = jobs.find((job) => job.config.logs.level !== "silent")?.config.logs ?? jobs[0]?.config.logs ?? rawLogs;
200
+ const dryRun = jobs.some((job) => job.config.dryRun) ?? userConfigs.some((config) => config.dryRun) ?? false;
201
+ const logPath = logs?.file && !dryRun ? logCrashReport(error, logs.path ?? "") : void 0;
202
+ if (!logs || logs.level !== "silent") {
203
+ printCrashReport({
204
+ error,
205
+ logPath
206
+ });
207
+ if (await shouldReportCrash({
208
+ error,
209
+ isInteractive: jobs.some((job) => job.config.interactive) ?? userConfigs.some((config) => config.interactive) ?? false
210
+ })) await openGitHubIssueWithCrashReport(error, __dirname);
211
+ }
212
+ throw error;
213
+ }
214
+ }
215
+
216
+ //#endregion
217
+ //#region src/index.ts
218
+ colors.enabled = colorSupport().hasBasic;
219
+ /**
220
+ * Type helper for configuration object, returns {@link MaybeArray<UserConfig>} object(s)
221
+ */
222
+ async function defineConfig(config) {
223
+ return typeof config === "function" ? await config() : config;
224
+ }
225
+
226
+ //#endregion
227
+ export { defineConfig as a, createClient as c, defaultPaginationKeywords as i, OperationPath$1 as n, definePluginConfig$1 as o, OperationStrategy$1 as r, utils as s, Logger$1 as t };
228
+ //# sourceMappingURL=src-Dmlg6WRV.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"src-Dmlg6WRV.mjs","names":["createClient","watches: ReadonlyArray<WatchValues>","context: Context | undefined","data","jobs: Configs['jobs']","pCreateClient"],"sources":["../src/generate/output.ts","../src/createClient.ts","../src/generate.ts","../src/index.ts"],"sourcesContent":["import fs from 'node:fs';\nimport path from 'node:path';\n\nimport type { Context } from '@hey-api/shared';\nimport { IntentContext } from '@hey-api/shared';\n\nimport { getTypedConfig } from '~/config/utils';\nimport { getClientPlugin } from '~/plugins/@hey-api/client-core/utils';\n\nimport { generateClientBundle } from './client';\n\nexport const generateOutput = async ({ context }: { context: Context }) => {\n const outputPath = path.resolve(context.config.output.path);\n\n if (context.config.output.clean) {\n if (fs.existsSync(outputPath)) {\n fs.rmSync(outputPath, { force: true, recursive: true });\n }\n }\n\n const config = getTypedConfig(context);\n\n const client = getClientPlugin(config);\n if ('bundle' in client.config && client.config.bundle && !config.dryRun) {\n // not proud of this one\n // @ts-expect-error\n config._FRAGILE_CLIENT_BUNDLE_RENAMED = generateClientBundle({\n meta: {\n importFileExtension: config.output.importFileExtension,\n },\n outputPath,\n // @ts-expect-error\n plugin: client,\n project: context.gen,\n });\n }\n\n for (const plugin of context.registerPlugins()) {\n await plugin.run();\n }\n\n context.gen.plan();\n\n const ctx = new IntentContext(context.spec);\n for (const intent of context.intents) {\n await intent.run(ctx);\n }\n\n for (const file of context.gen.render()) {\n const filePath = path.resolve(outputPath, file.path);\n const dir = path.dirname(filePath);\n if (!context.config.dryRun) {\n fs.mkdirSync(dir, { recursive: true });\n fs.writeFileSync(filePath, file.content, { encoding: 'utf8' });\n }\n }\n\n const { source } = context.config.output;\n if (source.enabled) {\n const sourcePath =\n source.path === null ? undefined : path.resolve(outputPath, source.path);\n if (!context.config.dryRun && sourcePath && sourcePath !== outputPath) {\n fs.mkdirSync(sourcePath, { recursive: true });\n }\n const serialized = await source.serialize(context.spec);\n // TODO: handle yaml (convert before writing)\n if (!context.config.dryRun && sourcePath) {\n fs.writeFileSync(\n path.resolve(sourcePath, `${source.fileName}.${source.extension}`),\n serialized,\n { encoding: 'utf8' },\n );\n }\n if (source.callback) {\n await source.callback(serialized);\n }\n }\n};\n","import path from 'node:path';\n\nimport { type Logger, Project } from '@hey-api/codegen-core';\nimport { $RefParser } from '@hey-api/json-schema-ref-parser';\nimport {\n applyNaming,\n buildGraph,\n compileInputPath,\n Context,\n getSpec,\n type Input,\n logInputPaths,\n type OpenApi,\n parseOpenApiSpec,\n patchOpenApiSpec,\n postprocessOutput,\n type WatchValues,\n} from '@hey-api/shared';\nimport colors from 'ansi-colors';\n\nimport { postProcessors } from '~/config/output/postprocess';\nimport type { Config } from '~/config/types';\nimport { generateOutput } from '~/generate/output';\nimport { TypeScriptRenderer } from '~/ts-dsl';\n\nexport async function createClient({\n config,\n dependencies,\n jobIndex,\n logger,\n watches: _watches,\n}: {\n config: Config;\n dependencies: Record<string, string>;\n jobIndex: number;\n logger: Logger;\n /**\n * Always undefined on the first run, defined on subsequent runs.\n */\n watches?: ReadonlyArray<WatchValues>;\n}): Promise<Context | undefined> {\n const watches: ReadonlyArray<WatchValues> =\n _watches ||\n Array.from({ length: config.input.length }, () => ({\n headers: new Headers(),\n }));\n\n const inputPaths = config.input.map((input) => compileInputPath(input));\n\n // on first run, print the message as soon as possible\n if (config.logs.level !== 'silent' && !_watches) {\n logInputPaths(inputPaths, jobIndex);\n }\n\n const getSpecData = async (input: Input, index: number) => {\n const eventSpec = logger.timeEvent('spec');\n const { arrayBuffer, error, resolvedInput, response } = await getSpec({\n fetchOptions: input.fetch,\n inputPath: inputPaths[index]!.path,\n timeout: input.watch.timeout,\n watch: watches[index]!,\n });\n eventSpec.timeEnd();\n\n // throw on first run if there's an error to preserve user experience\n // if in watch mode, subsequent errors won't throw to gracefully handle\n // cases where server might be reloading\n if (error && !_watches) {\n throw new Error(\n `Request failed with status ${response.status}: ${response.statusText}`,\n );\n }\n\n return { arrayBuffer, resolvedInput };\n };\n const specData = (\n await Promise.all(\n config.input.map((input, index) => getSpecData(input, index)),\n )\n ).filter((data) => data.arrayBuffer || data.resolvedInput);\n\n let context: Context | undefined;\n\n if (specData.length) {\n const refParser = new $RefParser();\n const data =\n specData.length > 1\n ? await refParser.bundleMany({\n arrayBuffer: specData.map((data) => data.arrayBuffer!),\n pathOrUrlOrSchemas: [],\n resolvedInputs: specData.map((data) => data.resolvedInput!),\n })\n : await refParser.bundle({\n arrayBuffer: specData[0]!.arrayBuffer,\n pathOrUrlOrSchema: undefined,\n resolvedInput: specData[0]!.resolvedInput,\n });\n\n // on subsequent runs in watch mode, print the message only if we know we're\n // generating the output\n if (config.logs.level !== 'silent' && _watches) {\n console.clear();\n logInputPaths(inputPaths, jobIndex);\n }\n\n const eventInputPatch = logger.timeEvent('input.patch');\n patchOpenApiSpec({ patchOptions: config.parser.patch, spec: data });\n eventInputPatch.timeEnd();\n\n const eventParser = logger.timeEvent('parser');\n // TODO: allow overriding via config\n const project = new Project({\n defaultFileName: 'index',\n fileName: (base) => {\n const name = applyNaming(base, config.output.fileName);\n const { suffix } = config.output.fileName;\n if (!suffix) {\n return name;\n }\n return name === 'index' || name.endsWith(suffix)\n ? name\n : `${name}${suffix}`;\n },\n nameConflictResolvers: config.output.nameConflictResolver\n ? {\n typescript: config.output.nameConflictResolver,\n }\n : undefined,\n renderers: [\n new TypeScriptRenderer({\n header: config.output.header,\n preferExportAll: config.output.preferExportAll,\n preferFileExtension: config.output.importFileExtension || undefined,\n resolveModuleName: config.output.resolveModuleName,\n }),\n ],\n root: config.output.path,\n });\n context = new Context<\n OpenApi.V2_0_X | OpenApi.V3_0_X | OpenApi.V3_1_X,\n Config\n >({\n config,\n dependencies,\n logger,\n project,\n spec: data as OpenApi.V2_0_X | OpenApi.V3_0_X | OpenApi.V3_1_X,\n });\n parseOpenApiSpec(context);\n context.graph = buildGraph(context.ir, logger).graph;\n eventParser.timeEnd();\n\n const eventGenerator = logger.timeEvent('generator');\n await generateOutput({ context });\n eventGenerator.timeEnd();\n\n const eventPostprocess = logger.timeEvent('postprocess');\n if (!config.dryRun) {\n const jobPrefix = colors.gray(`[Job ${jobIndex + 1}] `);\n postprocessOutput(config.output, postProcessors, jobPrefix);\n\n if (config.logs.level !== 'silent') {\n const outputPath = process.env.INIT_CWD\n ? `./${path.relative(process.env.INIT_CWD, config.output.path)}`\n : config.output.path;\n console.log(\n `${jobPrefix}${colors.green('✅ Done!')} Your output is in ${colors.cyanBright(outputPath)}`,\n );\n }\n }\n eventPostprocess.timeEnd();\n }\n\n const watchedInput = config.input.find(\n (input, index) =>\n input.watch.enabled && typeof inputPaths[index]!.path === 'string',\n );\n\n if (watchedInput) {\n setTimeout(() => {\n createClient({\n config,\n dependencies,\n jobIndex,\n logger,\n watches,\n });\n }, watchedInput.watch.interval);\n }\n\n return context;\n}\n","import path from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nimport { Logger } from '@hey-api/codegen-core';\nimport type { Context } from '@hey-api/shared';\nimport {\n checkNodeVersion,\n ConfigValidationError,\n getLogs,\n JobError,\n logCrashReport,\n openGitHubIssueWithCrashReport,\n printCliIntro,\n printCrashReport,\n shouldReportCrash,\n} from '@hey-api/shared';\nimport type { LazyOrAsync, MaybeArray } from '@hey-api/types';\n\nimport type { Configs } from '~/config/init';\nimport { resolveJobs } from '~/config/init';\nimport type { UserConfig } from '~/config/types';\nimport { createClient as pCreateClient } from '~/createClient';\n\nconst __filename = fileURLToPath(import.meta.url);\nconst __dirname = path.dirname(__filename);\n\n/**\n * Generate a client from the provided configuration.\n *\n * @param userConfig User provided {@link UserConfig} configuration(s).\n */\nexport async function createClient(\n userConfig?: LazyOrAsync<MaybeArray<UserConfig>>,\n logger = new Logger(),\n): Promise<ReadonlyArray<Context>> {\n const resolvedConfig =\n typeof userConfig === 'function' ? await userConfig() : userConfig;\n const userConfigs = resolvedConfig\n ? resolvedConfig instanceof Array\n ? resolvedConfig\n : [resolvedConfig]\n : [];\n\n let rawLogs = userConfigs.find(\n (config) => getLogs(config.logs).level !== 'silent',\n )?.logs;\n if (typeof rawLogs === 'string') {\n rawLogs = getLogs(rawLogs);\n }\n\n let jobs: Configs['jobs'] = [];\n\n try {\n checkNodeVersion();\n\n const eventCreateClient = logger.timeEvent('createClient');\n\n const eventConfig = logger.timeEvent('config');\n const resolved = await resolveJobs({ logger, userConfigs });\n const dependencies = resolved.dependencies;\n jobs = resolved.jobs;\n const printIntro = jobs.some((job) => job.config.logs.level !== 'silent');\n if (printIntro) printCliIntro(__dirname);\n eventConfig.timeEnd();\n\n const configErrors = jobs.flatMap((job) =>\n job.errors.map((error) => ({ error, jobIndex: job.index })),\n );\n if (configErrors.length > 0) {\n throw new ConfigValidationError(configErrors);\n }\n\n const outputs = await Promise.all(\n jobs.map(async (job) => {\n try {\n return await pCreateClient({\n config: job.config,\n dependencies,\n jobIndex: job.index,\n logger,\n });\n } catch (error) {\n if (error instanceof Error) {\n throw new JobError('', {\n error,\n jobIndex: job.index,\n });\n }\n }\n }),\n );\n const contexts = outputs.filter((ctx): ctx is Context => ctx !== undefined);\n\n eventCreateClient.timeEnd();\n\n logger.report(jobs.some((job) => job.config.logs.level === 'debug'));\n\n return contexts;\n } catch (error) {\n const logs =\n jobs.find((job) => job.config.logs.level !== 'silent')?.config.logs ??\n jobs[0]?.config.logs ??\n rawLogs;\n const dryRun =\n jobs.some((job) => job.config.dryRun) ??\n userConfigs.some((config) => config.dryRun) ??\n false;\n const logPath =\n logs?.file && !dryRun\n ? logCrashReport(error, logs.path ?? '')\n : undefined;\n if (!logs || logs.level !== 'silent') {\n printCrashReport({ error, logPath });\n const isInteractive =\n jobs.some((job) => job.config.interactive) ??\n userConfigs.some((config) => config.interactive) ??\n false;\n if (await shouldReportCrash({ error, isInteractive })) {\n await openGitHubIssueWithCrashReport(error, __dirname);\n }\n }\n\n throw error;\n }\n}\n","// OVERRIDES\n// hard-coded here because build process doesn't pick up overrides from separate files\nimport '@hey-api/codegen-core';\nimport '@hey-api/shared';\n\ndeclare module '@hey-api/codegen-core' {\n interface ProjectRenderMeta {\n /**\n * If specified, this will be the file extension used when importing\n * other modules. By default, we don't add a file extension and let the\n * runtime resolve it.\n *\n * @default null\n */\n importFileExtension?: AnyString | null;\n }\n\n interface SymbolMeta {\n category?:\n | 'client'\n | 'external'\n | 'hook'\n | 'schema'\n | 'sdk'\n | 'transform'\n | 'type'\n | 'utility'\n | AnyString;\n /**\n * Path to the resource this symbol represents.\n */\n path?: ReadonlyArray<string | number>;\n /**\n * Name of the plugin that registered this symbol.\n */\n pluginName?: string;\n resource?: 'client' | 'definition' | 'operation' | 'webhook' | AnyString;\n resourceId?: string;\n role?:\n | 'data'\n | 'error'\n | 'errors'\n | 'options'\n | 'response'\n | 'responses'\n | AnyString;\n /**\n * Tags associated with this symbol.\n */\n tags?: ReadonlyArray<string>;\n tool?:\n | 'angular'\n | 'arktype'\n | 'fastify'\n | 'json-schema'\n | 'sdk'\n | 'typescript'\n | 'valibot'\n | 'zod'\n | AnyString;\n variant?: 'container' | AnyString;\n }\n}\n\ndeclare module '@hey-api/shared' {\n interface PluginConfigMap {\n '@angular/common': AngularCommonPlugin['Types'];\n '@faker-js/faker': FakerJsFakerPlugin['Types'];\n '@hey-api/client-angular': HeyApiClientAngularPlugin['Types'];\n '@hey-api/client-axios': HeyApiClientAxiosPlugin['Types'];\n '@hey-api/client-fetch': HeyApiClientFetchPlugin['Types'];\n '@hey-api/client-ky': HeyApiClientKyPlugin['Types'];\n '@hey-api/client-next': HeyApiClientNextPlugin['Types'];\n '@hey-api/client-nuxt': HeyApiClientNuxtPlugin['Types'];\n '@hey-api/client-ofetch': HeyApiClientOfetchPlugin['Types'];\n '@hey-api/schemas': HeyApiSchemasPlugin['Types'];\n '@hey-api/sdk': HeyApiSdkPlugin['Types'];\n '@hey-api/transformers': HeyApiTransformersPlugin['Types'];\n '@hey-api/typescript': HeyApiTypeScriptPlugin['Types'];\n '@pinia/colada': PiniaColadaPlugin['Types'];\n '@tanstack/angular-query-experimental': TanStackAngularQueryPlugin['Types'];\n '@tanstack/react-query': TanStackReactQueryPlugin['Types'];\n '@tanstack/solid-query': TanStackSolidQueryPlugin['Types'];\n '@tanstack/svelte-query': TanStackSvelteQueryPlugin['Types'];\n '@tanstack/vue-query': TanStackVueQueryPlugin['Types'];\n arktype: ArktypePlugin['Types'];\n fastify: FastifyPlugin['Types'];\n swr: SwrPlugin['Types'];\n valibot: ValibotPlugin['Types'];\n zod: ZodPlugin['Types'];\n }\n\n interface PluginInstanceTypes {\n Node: TsDsl;\n }\n}\n// END OVERRIDES\n\nimport type { AnyString, LazyOrAsync, MaybeArray } from '@hey-api/types';\nimport colors from 'ansi-colors';\n// @ts-expect-error\nimport colorSupport from 'color-support';\n\nimport type { UserConfig } from '~/config/types';\nimport type { AngularCommonPlugin } from '~/plugins/@angular/common';\nimport type { FakerJsFakerPlugin } from '~/plugins/@faker-js/faker';\nimport type { HeyApiClientAngularPlugin } from '~/plugins/@hey-api/client-angular';\nimport type { HeyApiClientAxiosPlugin } from '~/plugins/@hey-api/client-axios';\nimport type { HeyApiClientFetchPlugin } from '~/plugins/@hey-api/client-fetch';\nimport type { HeyApiClientKyPlugin } from '~/plugins/@hey-api/client-ky';\nimport type { HeyApiClientNextPlugin } from '~/plugins/@hey-api/client-next';\nimport type { HeyApiClientNuxtPlugin } from '~/plugins/@hey-api/client-nuxt';\nimport type { HeyApiClientOfetchPlugin } from '~/plugins/@hey-api/client-ofetch';\nimport type { HeyApiSchemasPlugin } from '~/plugins/@hey-api/schemas';\nimport type { HeyApiSdkPlugin } from '~/plugins/@hey-api/sdk';\nimport type { HeyApiTransformersPlugin } from '~/plugins/@hey-api/transformers';\nimport type { HeyApiTypeScriptPlugin } from '~/plugins/@hey-api/typescript';\nimport type { PiniaColadaPlugin } from '~/plugins/@pinia/colada';\nimport type { TanStackAngularQueryPlugin } from '~/plugins/@tanstack/angular-query-experimental';\nimport type { TanStackReactQueryPlugin } from '~/plugins/@tanstack/react-query';\nimport type { TanStackSolidQueryPlugin } from '~/plugins/@tanstack/solid-query';\nimport type { TanStackSvelteQueryPlugin } from '~/plugins/@tanstack/svelte-query';\nimport type { TanStackVueQueryPlugin } from '~/plugins/@tanstack/vue-query';\nimport type { ArktypePlugin } from '~/plugins/arktype';\nimport type { FastifyPlugin } from '~/plugins/fastify';\nimport type { SwrPlugin } from '~/plugins/swr';\nimport type { ValibotPlugin } from '~/plugins/valibot';\nimport type { ZodPlugin } from '~/plugins/zod';\nimport type { TsDsl } from '~/ts-dsl';\n\ncolors.enabled = colorSupport().hasBasic;\n\nexport { createClient } from '~/generate';\n\n/**\n * Type helper for configuration object, returns {@link MaybeArray<UserConfig>} object(s)\n */\nexport async function defineConfig<T extends MaybeArray<UserConfig>>(\n config: LazyOrAsync<T>,\n): Promise<T> {\n return typeof config === 'function' ? await config() : config;\n}\n\nexport { Logger } from '@hey-api/codegen-core';\nexport type {\n DefinePlugin,\n IR,\n OpenApi,\n OpenApiMetaObject,\n OpenApiOperationObject,\n OpenApiParameterObject,\n OpenApiRequestBodyObject,\n OpenApiResponseObject,\n OpenApiSchemaObject,\n Plugin,\n} from '@hey-api/shared';\nexport {\n defaultPaginationKeywords,\n definePluginConfig,\n OperationPath,\n OperationStrategy,\n utils,\n} from '@hey-api/shared';\nexport { defaultPlugins } from '~/config/plugins';\nexport type { UserConfig } from '~/config/types';\nexport type { AngularClient } from '~/plugins/@hey-api/client-angular';\nexport type { AxiosClient } from '~/plugins/@hey-api/client-axios';\nexport {\n clientDefaultConfig,\n clientDefaultMeta,\n} from '~/plugins/@hey-api/client-core/config';\nexport { clientPluginHandler } from '~/plugins/@hey-api/client-core/plugin';\nexport type { Client } from '~/plugins/@hey-api/client-core/types';\nexport type { FetchClient } from '~/plugins/@hey-api/client-fetch';\nexport type { NextClient } from '~/plugins/@hey-api/client-next';\nexport type { NuxtClient } from '~/plugins/@hey-api/client-nuxt';\nexport type { OfetchClient } from '~/plugins/@hey-api/client-ofetch';\nexport type { ExpressionTransformer } from '~/plugins/@hey-api/transformers/expressions';\nexport type { TypeTransformer } from '~/plugins/@hey-api/transformers/types';\nexport * from '~/ts-dsl';\n"],"mappings":";;;;;;;;;;;AAWA,MAAa,iBAAiB,OAAO,EAAE,cAAoC;CACzE,MAAM,aAAa,KAAK,QAAQ,QAAQ,OAAO,OAAO,KAAK;AAE3D,KAAI,QAAQ,OAAO,OAAO,OACxB;MAAI,GAAG,WAAW,WAAW,CAC3B,IAAG,OAAO,YAAY;GAAE,OAAO;GAAM,WAAW;GAAM,CAAC;;CAI3D,MAAM,SAAS,eAAe,QAAQ;CAEtC,MAAM,SAAS,gBAAgB,OAAO;AACtC,KAAI,YAAY,OAAO,UAAU,OAAO,OAAO,UAAU,CAAC,OAAO,OAG/D,QAAO,iCAAiC,qBAAqB;EAC3D,MAAM,EACJ,qBAAqB,OAAO,OAAO,qBACpC;EACD;EAEA,QAAQ;EACR,SAAS,QAAQ;EAClB,CAAC;AAGJ,MAAK,MAAM,UAAU,QAAQ,iBAAiB,CAC5C,OAAM,OAAO,KAAK;AAGpB,SAAQ,IAAI,MAAM;CAElB,MAAM,MAAM,IAAI,cAAc,QAAQ,KAAK;AAC3C,MAAK,MAAM,UAAU,QAAQ,QAC3B,OAAM,OAAO,IAAI,IAAI;AAGvB,MAAK,MAAM,QAAQ,QAAQ,IAAI,QAAQ,EAAE;EACvC,MAAM,WAAW,KAAK,QAAQ,YAAY,KAAK,KAAK;EACpD,MAAM,MAAM,KAAK,QAAQ,SAAS;AAClC,MAAI,CAAC,QAAQ,OAAO,QAAQ;AAC1B,MAAG,UAAU,KAAK,EAAE,WAAW,MAAM,CAAC;AACtC,MAAG,c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ACN,MAAI,CAAC,QAAQ,KAAK,UAAU,UAAU;AACpC,oBAAiB;IAAE;IAAO;IAAS,CAAC;AAKpC,OAAI,MAAM,kBAAkB;IAAE;IAAO,eAHnC,KAAK,MAAM,QAAQ,IAAI,OAAO,YAAY,IAC1C,YAAY,MAAM,WAAW,OAAO,YAAY,IAChD;IACkD,CAAC,CACnD,OAAM,+BAA+B,OAAO,UAAU;;AAI1D,QAAM;;;;;;ACQV,OAAO,UAAU,cAAc,CAAC;;;;AAOhC,eAAsB,aACpB,QACY;AACZ,QAAO,OAAO,WAAW,aAAa,MAAM,QAAQ,GAAG"}
@@ -0,0 +1,157 @@
1
+ import { BaseConfig, BaseOutput, BaseUserConfig, BaseUserOutput, Plugin, PluginConfigMap, PluginNames, UserPostProcessor } from "@hey-api/shared";
2
+ import ts from "typescript";
3
+ import { AnyString } from "@hey-api/types";
4
+
5
+ //#region src/config/output/postprocess.d.ts
6
+ /**
7
+ * @deprecated Use `PostProcessorPreset` instead.
8
+ */
9
+ type Formatters = 'biome' | 'prettier';
10
+ /**
11
+ * @deprecated Use `PostProcessorPreset` instead.
12
+ */
13
+ type Linters = 'biome' | 'eslint' | 'oxlint';
14
+ declare const postProcessors: {
15
+ readonly 'biome:format': {
16
+ readonly args: readonly ["format", "--write", "{{path}}"];
17
+ readonly command: "biome";
18
+ readonly name: "Biome (Format)";
19
+ };
20
+ readonly 'biome:lint': {
21
+ readonly args: readonly ["lint", "--apply", "{{path}}"];
22
+ readonly command: "biome";
23
+ readonly name: "Biome (Lint)";
24
+ };
25
+ readonly eslint: {
26
+ readonly args: readonly ["{{path}}", "--fix"];
27
+ readonly command: "eslint";
28
+ readonly name: "ESLint";
29
+ };
30
+ readonly oxfmt: {
31
+ readonly args: readonly ["{{path}}"];
32
+ readonly command: "oxfmt";
33
+ readonly name: "Oxfmt";
34
+ };
35
+ readonly oxlint: {
36
+ readonly args: readonly ["--fix", "{{path}}"];
37
+ readonly command: "oxlint";
38
+ readonly name: "Oxlint";
39
+ };
40
+ readonly prettier: {
41
+ readonly args: readonly ["--ignore-unknown", "{{path}}", "--write", "--ignore-path", "./.prettierignore"];
42
+ readonly command: "prettier";
43
+ readonly name: "Prettier";
44
+ };
45
+ };
46
+ type PostProcessorPreset = keyof typeof postProcessors;
47
+ //#endregion
48
+ //#region src/config/output/types.d.ts
49
+ type ImportFileExtensions = '.js' | '.ts';
50
+ type UserOutput = BaseUserOutput & {
51
+ /**
52
+ * Which formatter to use to process output folder?
53
+ *
54
+ * @default null
55
+ * @deprecated Use `postProcess` instead.
56
+ */
57
+ format?: Formatters | null;
58
+ /**
59
+ * If specified, this will be the file extension used when importing
60
+ * other modules. By default, we don't add a file extension and let the
61
+ * runtime resolve it. If you're using moduleResolution `nodenext` or
62
+ * `node16`, we default to `.js`.
63
+ *
64
+ * @default undefined
65
+ */
66
+ importFileExtension?: ImportFileExtensions | AnyString | null;
67
+ /**
68
+ * Which linter to use to process output folder?
69
+ *
70
+ * @default null
71
+ * @deprecated Use `postProcess` instead.
72
+ */
73
+ lint?: Linters | null;
74
+ /**
75
+ * Post-processing commands to run on the output folder, executed in order.
76
+ *
77
+ * Use preset strings for common tools, or provide custom configurations.
78
+ *
79
+ * @example ['biome:lint', 'prettier']
80
+ * @example [{ command: 'dprint', args: ['fmt', '{{path}}'] }]
81
+ * @example ['eslint', { command: 'prettier', args: ['{{path}}', '--write'] }]
82
+ *
83
+ * @default []
84
+ */
85
+ postProcess?: ReadonlyArray<PostProcessorPreset | UserPostProcessor>;
86
+ /**
87
+ * Whether `export * from 'module'` should be used when possible
88
+ * instead of named exports.
89
+ *
90
+ * @default false
91
+ */
92
+ preferExportAll?: boolean;
93
+ /**
94
+ * Relative or absolute path to the tsconfig file we should use to
95
+ * generate the output. If a path to tsconfig file is not provided, we
96
+ * attempt to find one starting from the location of the
97
+ * `@hey-api/openapi-ts` configuration file and traversing up.
98
+ *
99
+ * @default undefined
100
+ */
101
+ tsConfigPath?: AnyString | null;
102
+ };
103
+ type Output = BaseOutput & {
104
+ /**
105
+ * Which formatter to use to process output folder?
106
+ */
107
+ format: Formatters | null;
108
+ /**
109
+ * If specified, this will be the file extension used when importing
110
+ * other modules. By default, we don't add a file extension and let the
111
+ * runtime resolve it. If you're using moduleResolution `nodenext` or
112
+ * `node16`, we default to `.js`.
113
+ */
114
+ importFileExtension: ImportFileExtensions | AnyString | null | undefined;
115
+ /**
116
+ * Which linter to use to process output folder?
117
+ */
118
+ lint: Linters | null;
119
+ /**
120
+ * Whether `export * from 'module'` should be used when possible
121
+ * instead of named exports.
122
+ */
123
+ preferExportAll: boolean;
124
+ /**
125
+ * The parsed TypeScript configuration used to generate the output.
126
+ * If no `tsconfig` file path was provided or found, this will be `null`.
127
+ */
128
+ tsConfig: ts.ParsedCommandLine | null;
129
+ /**
130
+ * Relative or absolute path to the tsconfig file we should use to
131
+ * generate the output. If a path to tsconfig file is not provided, we
132
+ * attempt to find one starting from the location of the
133
+ * `@hey-api/openapi-ts` configuration file and traversing up.
134
+ */
135
+ tsConfigPath: AnyString | null | undefined;
136
+ };
137
+ //#endregion
138
+ //#region src/config/types.d.ts
139
+ type UserConfig = BaseUserConfig<UserOutput> & {
140
+ /**
141
+ * Plugins generate artifacts from `input`. By default, we generate SDK
142
+ * functions and TypeScript interfaces. If you manually define `plugins`,
143
+ * you need to include the default plugins if you wish to use them.
144
+ *
145
+ * @default ['@hey-api/typescript', '@hey-api/sdk']
146
+ */
147
+ plugins?: ReadonlyArray<PluginNames | { [K in PluginNames]: PluginConfigMap[K]['config'] & {
148
+ name: K;
149
+ } }[PluginNames]>;
150
+ };
151
+ type Config = BaseConfig<UserConfig, Output> & {
152
+ pluginOrder: ReadonlyArray<keyof PluginConfigMap>;
153
+ plugins: { [K in PluginNames]?: Plugin.Config<PluginConfigMap[K]> };
154
+ };
155
+ //#endregion
156
+ export { UserConfig as n, Config as t };
157
+ //# sourceMappingURL=types-Ba27ofyy.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types-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