@hey-api/openapi-ts 0.98.2 → 0.99.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.
package/dist/internal.mjs CHANGED
@@ -1,3 +1,3 @@
1
- import { t as resolveJobs } from "./init-6HtXdMiq.mjs";
1
+ import { t as resolveJobs } from "./init-D6Y8JFUS.mjs";
2
2
  import { getSpec, parseOpenApiSpec } from "@hey-api/shared";
3
3
  export { getSpec, resolveJobs as initConfigs, parseOpenApiSpec };
@@ -0,0 +1,34 @@
1
+ declare namespace plugins_d_exports {
2
+ export { angularCommon, arktype, clientAngular, clientAxios, clientFetch, clientKy, clientNext, clientNuxt, clientOfetch, faker, fastify, msw, nestjs, orpc, piniaColada, schemas, sdk, swr, tanstackAngularQuery, tanstackPreactQuery, tanstackReactQuery, tanstackSolidQuery, tanstackSvelteQuery, tanstackVueQuery, transformers, typescript, valibot, zod };
3
+ }
4
+ declare const clientAngular: any;
5
+ declare const clientAxios: any;
6
+ declare const clientFetch: any;
7
+ declare const clientKy: any;
8
+ declare const clientNext: any;
9
+ declare const clientNuxt: any;
10
+ declare const clientOfetch: any;
11
+ declare const schemas: any;
12
+ declare const sdk: any;
13
+ declare const transformers: any;
14
+ declare const typescript: any;
15
+ declare const angularCommon: any;
16
+ declare const faker: any;
17
+ declare const piniaColada: any;
18
+ declare const tanstackAngularQuery: any;
19
+ declare const tanstackPreactQuery: any;
20
+ declare const tanstackReactQuery: any;
21
+ declare const tanstackSolidQuery: any;
22
+ declare const tanstackSvelteQuery: any;
23
+ declare const tanstackVueQuery: any;
24
+ declare const arktype: any;
25
+ declare const fastify: any;
26
+ declare const msw: any;
27
+ declare const nestjs: any;
28
+ declare const orpc: any;
29
+ declare const swr: any;
30
+ declare const valibot: any;
31
+ declare const zod: any;
32
+ //#endregion
33
+ export { angularCommon, arktype, clientAngular, clientAxios, clientFetch, clientKy, clientNext, clientNuxt, clientOfetch, faker, fastify, msw, nestjs, orpc, piniaColada, schemas, sdk, swr, plugins_d_exports as t, tanstackAngularQuery, tanstackPreactQuery, tanstackReactQuery, tanstackSolidQuery, tanstackSvelteQuery, tanstackVueQuery, transformers, typescript, valibot, zod };
34
+ //# sourceMappingURL=plugins.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugins.d.mts","names":[],"sources":["../src/plugins.ts"],"mappings":";;;cAGa,aAAA;AAAA,cACA,WAAA;AAAA,cACA,WAAA;AAAA,cACA,QAAA;AAAA,cACA,UAAA;AAAA,cACA,UAAA;AAAA,cACA,YAAA;AAAA,cACA,OAAA;AAAA,cACA,GAAA;AAAA,cACA,YAAA;AAAA,cACA,UAAA;AAAA,cAEA,aAAA;AAAA,cACA,KAAA;AAAA,cACA,WAAA;AAAA,cACA,oBAAA;AAAA,cACA,mBAAA;AAAA,cACA,kBAAA;AAAA,cACA,kBAAA;AAAA,cACA,mBAAA;AAAA,cACA,gBAAA;AAAA,cACA,OAAA;AAAA,cACA,OAAA;AAAA,cACA,GAAA;AAAA,cACA,MAAA;AAAA,cACA,IAAA;AAAA,cACA,GAAA;AAAA,cACA,OAAA;AAAA,cACA,GAAA"}
@@ -0,0 +1,65 @@
1
+ import { t as __exportAll } from "./chunk-z9aeyW2b.mjs";
2
+ import { pluginHelper } from "@hey-api/shared";
3
+ //#region src/plugins.ts
4
+ var plugins_exports = /* @__PURE__ */ __exportAll({
5
+ angularCommon: () => angularCommon,
6
+ arktype: () => arktype,
7
+ clientAngular: () => clientAngular,
8
+ clientAxios: () => clientAxios,
9
+ clientFetch: () => clientFetch,
10
+ clientKy: () => clientKy,
11
+ clientNext: () => clientNext,
12
+ clientNuxt: () => clientNuxt,
13
+ clientOfetch: () => clientOfetch,
14
+ faker: () => faker,
15
+ fastify: () => fastify,
16
+ msw: () => msw,
17
+ nestjs: () => nestjs,
18
+ orpc: () => orpc,
19
+ piniaColada: () => piniaColada,
20
+ schemas: () => schemas,
21
+ sdk: () => sdk,
22
+ swr: () => swr,
23
+ tanstackAngularQuery: () => tanstackAngularQuery,
24
+ tanstackPreactQuery: () => tanstackPreactQuery,
25
+ tanstackReactQuery: () => tanstackReactQuery,
26
+ tanstackSolidQuery: () => tanstackSolidQuery,
27
+ tanstackSvelteQuery: () => tanstackSvelteQuery,
28
+ tanstackVueQuery: () => tanstackVueQuery,
29
+ transformers: () => transformers,
30
+ typescript: () => typescript,
31
+ valibot: () => valibot,
32
+ zod: () => zod
33
+ });
34
+ const clientAngular = pluginHelper("@hey-api/client-angular");
35
+ const clientAxios = pluginHelper("@hey-api/client-axios");
36
+ const clientFetch = pluginHelper("@hey-api/client-fetch");
37
+ const clientKy = pluginHelper("@hey-api/client-ky");
38
+ const clientNext = pluginHelper("@hey-api/client-next");
39
+ const clientNuxt = pluginHelper("@hey-api/client-nuxt");
40
+ const clientOfetch = pluginHelper("@hey-api/client-ofetch");
41
+ const schemas = pluginHelper("@hey-api/schemas");
42
+ const sdk = pluginHelper("@hey-api/sdk");
43
+ const transformers = pluginHelper("@hey-api/transformers");
44
+ const typescript = pluginHelper("@hey-api/typescript");
45
+ const angularCommon = pluginHelper("@angular/common");
46
+ const faker = pluginHelper("@faker-js/faker");
47
+ const piniaColada = pluginHelper("@pinia/colada");
48
+ const tanstackAngularQuery = pluginHelper("@tanstack/angular-query-experimental");
49
+ const tanstackPreactQuery = pluginHelper("@tanstack/preact-query");
50
+ const tanstackReactQuery = pluginHelper("@tanstack/react-query");
51
+ const tanstackSolidQuery = pluginHelper("@tanstack/solid-query");
52
+ const tanstackSvelteQuery = pluginHelper("@tanstack/svelte-query");
53
+ const tanstackVueQuery = pluginHelper("@tanstack/vue-query");
54
+ const arktype = pluginHelper("arktype");
55
+ const fastify = pluginHelper("fastify");
56
+ const msw = pluginHelper("msw");
57
+ const nestjs = pluginHelper("nestjs");
58
+ const orpc = pluginHelper("orpc");
59
+ const swr = pluginHelper("swr");
60
+ const valibot = pluginHelper("valibot");
61
+ const zod = pluginHelper("zod");
62
+ //#endregion
63
+ export { angularCommon, arktype, clientAngular, clientAxios, clientFetch, clientKy, clientNext, clientNuxt, clientOfetch, faker, fastify, msw, nestjs, orpc, piniaColada, schemas, sdk, swr, plugins_exports as t, tanstackAngularQuery, tanstackPreactQuery, tanstackReactQuery, tanstackSolidQuery, tanstackSvelteQuery, tanstackVueQuery, transformers, typescript, valibot, zod };
64
+
65
+ //# sourceMappingURL=plugins.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugins.mjs","names":[],"sources":["../src/plugins.ts"],"sourcesContent":["import { pluginHelper } from '@hey-api/shared';\n\n// Hey API\nexport const clientAngular = pluginHelper('@hey-api/client-angular');\nexport const clientAxios = pluginHelper('@hey-api/client-axios');\nexport const clientFetch = pluginHelper('@hey-api/client-fetch');\nexport const clientKy = pluginHelper('@hey-api/client-ky');\nexport const clientNext = pluginHelper('@hey-api/client-next');\nexport const clientNuxt = pluginHelper('@hey-api/client-nuxt');\nexport const clientOfetch = pluginHelper('@hey-api/client-ofetch');\nexport const schemas = pluginHelper('@hey-api/schemas');\nexport const sdk = pluginHelper('@hey-api/sdk');\nexport const transformers = pluginHelper('@hey-api/transformers');\nexport const typescript = pluginHelper('@hey-api/typescript');\n// Other\nexport const angularCommon = pluginHelper('@angular/common');\nexport const faker = pluginHelper('@faker-js/faker');\nexport const piniaColada = pluginHelper('@pinia/colada');\nexport const tanstackAngularQuery = pluginHelper('@tanstack/angular-query-experimental');\nexport const tanstackPreactQuery = pluginHelper('@tanstack/preact-query');\nexport const tanstackReactQuery = pluginHelper('@tanstack/react-query');\nexport const tanstackSolidQuery = pluginHelper('@tanstack/solid-query');\nexport const tanstackSvelteQuery = pluginHelper('@tanstack/svelte-query');\nexport const tanstackVueQuery = pluginHelper('@tanstack/vue-query');\nexport const arktype = pluginHelper('arktype');\nexport const fastify = pluginHelper('fastify');\nexport const msw = pluginHelper('msw');\nexport const nestjs = pluginHelper('nestjs');\nexport const orpc = pluginHelper('orpc');\nexport const swr = pluginHelper('swr');\nexport const valibot = pluginHelper('valibot');\nexport const zod = pluginHelper('zod');\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,MAAa,gBAAgB,aAAa,yBAAyB;AACnE,MAAa,cAAc,aAAa,uBAAuB;AAC/D,MAAa,cAAc,aAAa,uBAAuB;AAC/D,MAAa,WAAW,aAAa,oBAAoB;AACzD,MAAa,aAAa,aAAa,sBAAsB;AAC7D,MAAa,aAAa,aAAa,sBAAsB;AAC7D,MAAa,eAAe,aAAa,wBAAwB;AACjE,MAAa,UAAU,aAAa,kBAAkB;AACtD,MAAa,MAAM,aAAa,cAAc;AAC9C,MAAa,eAAe,aAAa,uBAAuB;AAChE,MAAa,aAAa,aAAa,qBAAqB;AAE5D,MAAa,gBAAgB,aAAa,iBAAiB;AAC3D,MAAa,QAAQ,aAAa,iBAAiB;AACnD,MAAa,cAAc,aAAa,eAAe;AACvD,MAAa,uBAAuB,aAAa,sCAAsC;AACvF,MAAa,sBAAsB,aAAa,wBAAwB;AACxE,MAAa,qBAAqB,aAAa,uBAAuB;AACtE,MAAa,qBAAqB,aAAa,uBAAuB;AACtE,MAAa,sBAAsB,aAAa,wBAAwB;AACxE,MAAa,mBAAmB,aAAa,qBAAqB;AAClE,MAAa,UAAU,aAAa,SAAS;AAC7C,MAAa,UAAU,aAAa,SAAS;AAC7C,MAAa,MAAM,aAAa,KAAK;AACrC,MAAa,SAAS,aAAa,QAAQ;AAC3C,MAAa,OAAO,aAAa,MAAM;AACvC,MAAa,MAAM,aAAa,KAAK;AACrC,MAAa,UAAU,aAAa,SAAS;AAC7C,MAAa,MAAM,aAAa,KAAK"}
package/dist/run.mjs CHANGED
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
- import { f as createClient } from "./src-CY0O0cwg.mjs";
2
+ import { f as createClient } from "./src-CI9riJdm.mjs";
3
3
  import { isEnvironment } from "@hey-api/shared";
4
4
  import { Command, CommanderError } from "commander";
5
5
  //#region package.json
6
- var version = "0.98.2";
6
+ var version = "0.99.0";
7
7
  var bin = { "openapi-ts": "./bin/run.js" };
8
8
  //#endregion
9
9
  //#region src/cli/adapter.ts
@@ -1,4 +1,5 @@
1
- import { _ as postProcessors, c as TypeScriptRenderer, g as getTypedConfig, h as getClientPlugin, i as generateClientBundle, t as resolveJobs } from "./init-6HtXdMiq.mjs";
1
+ import { _ as getTypedConfig, a as generateClientBundle, c as getClientPlugin, n as postProcessors, t as resolveJobs, u as TypeScriptRenderer } from "./init-D6Y8JFUS.mjs";
2
+ import "./plugins.mjs";
2
3
  import { Logger, Logger as Logger$1, Project } from "@hey-api/codegen-core";
3
4
  import { ConfigValidationError, Context, InputError, IntentContext, JobError, OperationPath as OperationPath$1, OperationStrategy as OperationStrategy$1, applyNaming, applyNaming as applyNaming$1, buildGraph, checkNodeVersion, coerce as coerce$1, compileInputPath, defaultPaginationKeywords, defineConfig as defineConfigTable, definePluginConfig as definePluginConfig$1, getInputError, getLogs, getSpec, logCrashReport, logInputPaths, openGitHubIssueWithCrashReport, parseOpenApiSpec, patchOpenApiSpec, postprocessOutput, printCliIntro, printCrashReport, shouldReportCrash, toCase as toCase$1, utils } from "@hey-api/shared";
4
5
  import colors from "ansi-colors";
@@ -54,7 +55,7 @@ async function generateOutput(context) {
54
55
  return { fileCount };
55
56
  }
56
57
  //#endregion
57
- //#region src/createClient.ts
58
+ //#region src/create-client.ts
58
59
  async function createClient$1({ config, dependencies, jobIndex, logger, watches: _watches }) {
59
60
  const watches = _watches || Array.from({ length: config.input.length }, () => ({ headers: new Headers() }));
60
61
  const jobStart = Date.now();
@@ -254,4 +255,4 @@ async function defineConfig$1(config) {
254
255
  //#endregion
255
256
  export { coerce$1 as a, defineConfigTable as c, utils as d, createClient as f, applyNaming$1 as i, definePluginConfig$1 as l, OperationPath$1 as n, defaultPaginationKeywords as o, OperationStrategy$1 as r, defineConfig$1 as s, Logger$1 as t, toCase$1 as u };
256
257
 
257
- //# sourceMappingURL=src-CY0O0cwg.mjs.map
258
+ //# sourceMappingURL=src-CI9riJdm.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"src-CI9riJdm.mjs","names":["createClient","ms","pCreateClient","defineConfig"],"sources":["../src/generate/output.ts","../src/create-client.ts","../src/generate.ts","../src/index.ts"],"sourcesContent":["import fs from 'node:fs';\nimport fsPromises from 'node:fs/promises';\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';\nimport { generateClientBundle } from './client';\n\nexport async function generateOutput(context: Context): Promise<{ fileCount: number }> {\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 header: config.output.header,\n module: config.output.module,\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 let fileCount = 0;\n const writes: Promise<void>[] = [];\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 writes.push(\n fsPromises\n .mkdir(dir, { recursive: true })\n .then(() => fsPromises.writeFile(filePath, file.content, { encoding: 'utf8' })),\n );\n }\n fileCount++;\n }\n await Promise.all(writes);\n\n const { source } = context.config.output;\n if (source.enabled) {\n const sourcePath = source.path === null ? undefined : path.resolve(outputPath, source.path);\n if (!context.config.dryRun && sourcePath && sourcePath !== outputPath) {\n await fsPromises.mkdir(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 await fsPromises.writeFile(\n path.resolve(sourcePath, `${source.fileName}.${source.extension}`),\n serialized,\n { encoding: 'utf8' },\n );\n fileCount++;\n }\n if (source.callback) {\n await source.callback(serialized);\n }\n }\n\n return { fileCount };\n}\n","import path from 'node:path';\n\nimport { type Logger, Project } from '@hey-api/codegen-core';\nimport { $RefParser, ResolverError } from '@hey-api/json-schema-ref-parser';\nimport type { Input, OpenApi, WatchValues } from '@hey-api/shared';\nimport {\n applyNaming,\n buildGraph,\n compileInputPath,\n Context,\n getSpec,\n InputError,\n logInputPaths,\n parseOpenApiSpec,\n patchOpenApiSpec,\n postprocessOutput,\n} from '@hey-api/shared';\nimport { format as ms } from '@lukeed/ms';\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 jobStart = Date.now();\n const inputPaths = config.input.map((input) => compileInputPath(input));\n\n // on first run, print the message as soon as possible\n if (!_watches) {\n logInputPaths(inputPaths, jobIndex, config.logs.level);\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 const text = await response.text().catch(() => '');\n const message = `Request failed with status ${response.status}: ${text || response.statusText}`;\n // Handle 4xx client errors as input errors (bad URL, bad API key, etc.)\n if (response.status >= 400 && response.status < 500) {\n const statusText = response.statusText || 'Unknown';\n const originalError = new Error(message) as Error & { source?: string };\n originalError.source = String(inputPaths[index]!.path);\n throw new InputError(\n `Input request failed: ${response.status} ${statusText}`,\n originalError,\n );\n }\n // For 5xx server errors, keep the generic error (could be a bug)\n throw new Error(message);\n }\n\n return { arrayBuffer, resolvedInput };\n };\n const specData = (\n await Promise.all(config.input.map((input, index) => getSpecData(input, index)))\n ).filter((data) => data.arrayBuffer || data.resolvedInput);\n\n let context: Context | undefined;\n\n if (specData.length) {\n const refParser = new $RefParser();\n let data: unknown;\n try {\n 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 } catch (err) {\n if (err instanceof ResolverError && err.ioErrorCode === 'ENOENT') {\n throw new InputError('Input file not found', err);\n }\n throw err;\n }\n\n // on subsequent runs in watch mode, print the message only if we know we're\n // generating the output\n if (_watches) {\n console.clear();\n logInputPaths(inputPaths, jobIndex, config.logs.level);\n }\n\n const eventInputPatch = logger.timeEvent('input.patch');\n await patchOpenApiSpec({ patchOptions: config.parser.patch, spec: data });\n eventInputPatch.timeEnd();\n\n const eventParser = logger.timeEvent('parser');\n const header = config.output.header;\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) ? name : `${name}${suffix}`;\n },\n nameConflictResolvers: config.output.nameConflictResolver\n ? {\n typescript: config.output.nameConflictResolver,\n }\n : undefined,\n renderers: [\n new TypeScriptRenderer({\n header: (ctx) => {\n const defaultValue = ['// This file is auto-generated by @hey-api/openapi-ts'];\n const result = typeof header === 'function' ? header({ ...ctx, defaultValue }) : header;\n return result === undefined ? defaultValue : result;\n },\n module: config.output.module,\n preferExportAll: config.output.preferExportAll,\n }),\n ],\n root: config.output.path,\n });\n context = new Context<OpenApi.V2_0_X | OpenApi.V3_0_X | OpenApi.V3_1_X, Config>({\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 const { fileCount } = await generateOutput(context);\n eventGenerator.timeEnd();\n\n const totalMs = Date.now() - jobStart;\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('✓')} ${colors.cyanBright(outputPath)} ${colors.gray(`· ${fileCount} ${fileCount === 1 ? 'file' : 'files'} · ${ms(totalMs)}`)}`,\n );\n }\n }\n eventPostprocess.timeEnd();\n }\n\n const watchedInput = config.input.find(\n (input, index) => 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 getInputError,\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 './create-client';\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 = 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((config) => getLogs(config.logs).level !== 'silent')?.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) {\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) ?? userConfigs.some((config) => config.dryRun) ?? false;\n\n const inputError = getInputError(error);\n const normalizedError = inputError ?? error;\n\n const logPath =\n logs?.file && !dryRun ? logCrashReport(normalizedError, logs.path ?? '') : 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: normalizedError, isInteractive })) {\n await openGitHubIssueWithCrashReport(error, __dirname);\n }\n }\n\n if (inputError) return [];\n\n throw error;\n }\n}\n","/* eslint-disable @typescript-eslint/no-namespace */\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 ProjectMeta {\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 artifact?:\n | 'angular'\n | 'arktype'\n | 'fastify'\n | 'json-schema'\n | 'msw'\n | 'sdk'\n | 'typescript'\n | 'valibot'\n | 'zod'\n | AnyString;\n category?:\n | 'client'\n | 'external'\n | 'hook'\n | 'schema'\n | 'sdk'\n | 'transform'\n | 'type'\n | 'utility'\n | AnyString;\n /** Path to the resource this symbol represents. */\n path?: ReadonlyArray<string | number>;\n /** Name of the plugin that registered this symbol. */\n plugin?: string;\n resource?: 'client' | 'definition' | 'operation' | 'webhook' | AnyString;\n resourceId?: string;\n role?: 'data' | 'error' | 'errors' | 'options' | 'response' | 'responses' | AnyString;\n /** Tags associated with this symbol. */\n tags?: ReadonlyArray<string>;\n variant?: 'container' | AnyString;\n }\n}\n\ndeclare module '@hey-api/shared' {\n interface PluginConfigMap {\n '@angular/common': Plugins.AngularCommon.Types['Types'];\n '@faker-js/faker': Plugins.FakerJsFaker.Types['Types'];\n '@hey-api/client-angular': Plugins.HeyApiClientAngular.Types['Types'];\n '@hey-api/client-axios': Plugins.HeyApiClientAxios.Types['Types'];\n '@hey-api/client-fetch': Plugins.HeyApiClientFetch.Types['Types'];\n '@hey-api/client-ky': Plugins.HeyApiClientKy.Types['Types'];\n '@hey-api/client-next': Plugins.HeyApiClientNext.Types['Types'];\n '@hey-api/client-nuxt': Plugins.HeyApiClientNuxt.Types['Types'];\n '@hey-api/client-ofetch': Plugins.HeyApiClientOfetch.Types['Types'];\n '@hey-api/examples': Plugins.HeyApiExamples.Types['Types'];\n '@hey-api/schemas': Plugins.HeyApiSchemas.Types['Types'];\n '@hey-api/sdk': Plugins.HeyApiSdk.Types['Types'];\n '@hey-api/transformers': Plugins.HeyApiTransformers.Types['Types'];\n '@hey-api/typescript': Plugins.HeyApiTypeScript.Types['Types'];\n '@pinia/colada': Plugins.PiniaColada.Types['Types'];\n '@tanstack/angular-query-experimental': Plugins.TanStackAngularQuery.Types['Types'];\n '@tanstack/preact-query': Plugins.TanStackPreactQuery.Types['Types'];\n '@tanstack/react-query': Plugins.TanStackReactQuery.Types['Types'];\n '@tanstack/solid-query': Plugins.TanStackSolidQuery.Types['Types'];\n '@tanstack/svelte-query': Plugins.TanStackSvelteQuery.Types['Types'];\n '@tanstack/vue-query': Plugins.TanStackVueQuery.Types['Types'];\n arktype: Plugins.Arktype.Types['Types'];\n fastify: Plugins.Fastify.Types['Types'];\n msw: Plugins.Msw.Types['Types'];\n nestjs: Plugins.NestJs.Types['Types'];\n orpc: Plugins.Orpc.Types['Types'];\n swr: Plugins.Swr.Types['Types'];\n valibot: Plugins.Valibot.Types['Types'];\n zod: Plugins.Zod.Types['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, FakerJsFakerResolvers } from './plugins/@faker-js/faker';\nimport type {\n AngularClient as AngularClientImp,\n HeyApiClientAngularPlugin,\n} from './plugins/@hey-api/client-angular';\nimport type {\n AxiosClient as AxiosClientImp,\n HeyApiClientAxiosPlugin,\n} from './plugins/@hey-api/client-axios';\nimport type {\n FetchClient as FetchClientImp,\n HeyApiClientFetchPlugin,\n} from './plugins/@hey-api/client-fetch';\nimport type { HeyApiClientKyPlugin, KyClient as KyClientImp } from './plugins/@hey-api/client-ky';\nimport type {\n HeyApiClientNextPlugin,\n NextClient as NextClientImp,\n} from './plugins/@hey-api/client-next';\nimport type {\n HeyApiClientNuxtPlugin,\n NuxtClient as NuxtClientImp,\n} from './plugins/@hey-api/client-nuxt';\nimport type {\n HeyApiClientOfetchPlugin,\n OfetchClient as OfetchClientImp,\n} from './plugins/@hey-api/client-ofetch';\nimport type { HeyApiExamplesPlugin } from './plugins/@hey-api/examples';\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 {\n HeyApiTypeScriptPlugin,\n HeyApiTypeScriptResolvers,\n} from './plugins/@hey-api/typescript';\nimport type { PiniaColadaPlugin } from './plugins/@pinia/colada';\nimport type { TanStackAngularQueryPlugin } from './plugins/@tanstack/angular-query-experimental';\nimport type { TanStackPreactQueryPlugin } from './plugins/@tanstack/preact-query';\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 { MswPlugin } from './plugins/msw';\nimport type { NestJsPlugin } from './plugins/nestjs';\nimport type { OrpcPlugin } from './plugins/orpc';\nimport type { SwrPlugin } from './plugins/swr';\nimport type { ValibotPlugin, ValibotResolvers } from './plugins/valibot';\nimport type { ZodPlugin, ZodResolvers } 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 function defineConfig(\n config: LazyOrAsync<ReadonlyArray<UserConfig>>,\n): Promise<ReadonlyArray<UserConfig>>;\nexport function defineConfig(config: LazyOrAsync<UserConfig>): Promise<UserConfig>;\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 type { UserConfig } from './config/types';\nexport * as plugins from './plugins';\nexport { clientDefaultConfig, clientDefaultMeta } 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 { ExpressionTransformer, TypeTransformer } from './plugins/@hey-api/transformers/types';\nexport { defaultPlugins } from './plugins/config';\nexport * from './ts-dsl';\nexport { Logger } from '@hey-api/codegen-core';\nexport type {\n AnyPluginName,\n Coercer,\n CoercerMap,\n ConfigTable,\n DefinePlugin,\n IR,\n OpenApi,\n OpenApiMetaObject,\n OpenApiOperationObject,\n OpenApiParameterObject,\n OpenApiRequestBodyObject,\n OpenApiResponseObject,\n OpenApiSchemaObject,\n Plugin,\n PluginContext,\n PluginInstance,\n TableDirectives,\n} from '@hey-api/shared';\nexport {\n applyNaming,\n coerce,\n defaultPaginationKeywords,\n defineConfig as defineConfigTable,\n definePluginConfig,\n OperationPath,\n OperationStrategy,\n toCase,\n utils,\n} from '@hey-api/shared';\n\nexport namespace Plugins {\n export namespace AngularCommon {\n export type Types = AngularCommonPlugin;\n }\n\n export namespace Arktype {\n export type Types = ArktypePlugin;\n }\n\n export namespace FakerJsFaker {\n export type Resolvers = Required<FakerJsFakerResolvers>['$resolvers'];\n export type Types = FakerJsFakerPlugin;\n }\n\n export namespace Fastify {\n export type Types = FastifyPlugin;\n }\n\n export namespace HeyApiClientAngular {\n export type Client = AngularClientImp;\n export type Types = HeyApiClientAngularPlugin;\n }\n\n export namespace HeyApiClientAxios {\n export type Client = AxiosClientImp;\n export type Types = HeyApiClientAxiosPlugin;\n }\n\n export namespace HeyApiClientFetch {\n export type Client = FetchClientImp;\n export type Types = HeyApiClientFetchPlugin;\n }\n\n export namespace HeyApiClientKy {\n export type Client = KyClientImp;\n export type Types = HeyApiClientKyPlugin;\n }\n\n export namespace HeyApiClientNext {\n export type Client = NextClientImp;\n export type Types = HeyApiClientNextPlugin;\n }\n\n export namespace HeyApiClientNuxt {\n export type Client = NuxtClientImp;\n export type Types = HeyApiClientNuxtPlugin;\n }\n\n export namespace HeyApiClientOfetch {\n export type Client = OfetchClientImp;\n export type Types = HeyApiClientOfetchPlugin;\n }\n\n export namespace HeyApiExamples {\n export type Types = HeyApiExamplesPlugin;\n }\n\n export namespace HeyApiSchemas {\n export type Types = HeyApiSchemasPlugin;\n }\n\n export namespace HeyApiSdk {\n export type Types = HeyApiSdkPlugin;\n }\n\n export namespace HeyApiTransformers {\n export type Types = HeyApiTransformersPlugin;\n }\n\n export namespace HeyApiTypeScript {\n export type Resolvers = Required<HeyApiTypeScriptResolvers>['$resolvers'];\n export type Types = HeyApiTypeScriptPlugin;\n }\n\n export namespace Msw {\n export type Types = MswPlugin;\n }\n\n export namespace NestJs {\n export type Types = NestJsPlugin;\n }\n\n export namespace Orpc {\n export type Types = OrpcPlugin;\n }\n\n export namespace PiniaColada {\n export type Types = PiniaColadaPlugin;\n }\n\n export namespace Swr {\n export type Types = SwrPlugin;\n }\n\n export namespace TanStackAngularQuery {\n export type Types = TanStackAngularQueryPlugin;\n }\n\n export namespace TanStackPreactQuery {\n export type Types = TanStackPreactQueryPlugin;\n }\n\n export namespace TanStackReactQuery {\n export type Types = TanStackReactQueryPlugin;\n }\n\n export namespace TanStackSolidQuery {\n export type Types = TanStackSolidQueryPlugin;\n }\n\n export namespace TanStackSvelteQuery {\n export type Types = TanStackSvelteQueryPlugin;\n }\n\n export namespace TanStackVueQuery {\n export type Types = TanStackVueQueryPlugin;\n }\n\n export namespace Valibot {\n export type Resolvers = Required<ValibotResolvers>['$resolvers'];\n export type Types = ValibotPlugin;\n }\n\n export namespace Zod {\n export type Resolvers = Required<ZodResolvers>['$resolvers'];\n export type Types = ZodPlugin;\n }\n}\n\n// DEPRECATED\n/** @deprecated Use `Plugins.HeyApiClientAngular.Client` instead. */\nexport type AngularClient = AngularClientImp;\n/** @deprecated Use `Plugins.HeyApiClientAxios.Client` instead. */\nexport type AxiosClient = AxiosClientImp;\n/** @deprecated Use `Plugins.HeyApiClientFetch.Client` instead. */\nexport type FetchClient = FetchClientImp;\n/** @deprecated Use `Plugins.HeyApiClientKy.Client` instead. */\nexport type KyClient = KyClientImp;\n/** @deprecated Use `Plugins.HeyApiClientNext.Client` instead. */\nexport type NextClient = NextClientImp;\n/** @deprecated Use `Plugins.HeyApiClientNuxt.Client` instead. */\nexport type NuxtClient = NuxtClientImp;\n/** @deprecated Use `Plugins.HeyApiClientOfetch.Client` instead. */\nexport type OfetchClient = OfetchClientImp;\n"],"mappings":";;;;;;;;;;;;;AAWA,eAAsB,eAAe,SAAkD;CACrF,MAAM,aAAa,KAAK,QAAQ,QAAQ,OAAO,OAAO,IAAI;CAE1D,IAAI,QAAQ,OAAO,OAAO;MACpB,GAAG,WAAW,UAAU,GAC1B,GAAG,OAAO,YAAY;GAAE,OAA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,OACnB,MAAM,IAAI,SAAS,IAAI;KACrB;KACA,UAAU,IAAI;IAChB,CAAC;GAEL;EACF,CAAC,CACH,EAAA,CACyB,QAAQ,QAAwB,QAAQ,KAAA,CAAS;EAE1E,kBAAkB,QAAQ;EAE1B,OAAO,OAAO,KAAK,MAAM,QAAQ,IAAI,OAAO,KAAK,UAAU,OAAO,CAAC;EAEnE,OAAO;CACT,SAAS,OAAO;EACd,MAAM,OACJ,KAAK,MAAM,QAAQ,IAAI,OAAO,KAAK,UAAU,QAAQ,CAAC,EAAE,OAAO,QAC/D,KAAK,EAAE,EAAE,OAAO,QAChB;EACF,MAAM,SACJ,KAAK,MAAM,QAAQ,IAAI,OAAO,MAAM,KAAK,YAAY,MAAM,WAAW,OAAO,MAAM,KAAK;EAE1F,MAAM,aAAa,cAAc,KAAK;EACtC,MAAM,kBAAkB,cAAc;EAEtC,MAAM,UACJ,MAAM,QAAQ,CAAC,SAAS,eAAe,iBAAiB,KAAK,QAAQ,EAAE,IAAI,KAAA;EAC7E,IAAI,CAAC,QAAQ,KAAK,UAAU,UAAU;GACpC,iBAAiB;IAAE;IAAO;GAAQ,CAAC;GAKnC,IAAI,MAAM,kBAAkB;IAAE,OAAO;IAAiB,eAHpD,KAAK,MAAM,QAAQ,IAAI,OAAO,WAAW,KACzC,YAAY,MAAM,WAAW,OAAO,WAAW,KAC/C;GACkE,CAAC,GACnE,MAAM,+BAA+B,OAAO,SAAS;EAEzD;EAEA,IAAI,YAAY,OAAO,CAAC;EAExB,MAAM;CACR;AACF;;;AC0BA,OAAO,UAAU,aAAa,CAAC,CAAC;AAWhC,eAAsBC,eACpB,QACY;CACZ,OAAO,OAAO,WAAW,aAAa,MAAM,OAAO,IAAI;AACzD"}
package/package.json CHANGED
@@ -1,31 +1,45 @@
1
1
  {
2
2
  "name": "@hey-api/openapi-ts",
3
- "version": "0.98.2",
4
- "description": "🌀 OpenAPI to TypeScript codegen. Production-grade SDKs, Zod schemas, TanStack Query hooks, and 20+ plugins. Used by Vercel, OpenCode, and PayPal.",
3
+ "version": "0.99.0",
4
+ "description": "🌀 OpenAPI to TypeScript code generator. Production-grade SDKs, Zod schemas, TanStack Query hooks, and 20+ plugins. Used by Vercel, OpenCode, and PayPal.",
5
5
  "keywords": [
6
6
  "angular",
7
+ "api-client",
8
+ "arktype",
7
9
  "axios",
10
+ "code-generation",
8
11
  "codegen",
12
+ "faker",
13
+ "fakerjs",
14
+ "fastify",
9
15
  "fetch",
10
16
  "generator",
11
17
  "http",
12
18
  "javascript",
13
19
  "json",
20
+ "ky",
21
+ "nest.js",
14
22
  "next",
15
23
  "next.js",
16
24
  "node",
17
25
  "nuxt",
18
26
  "ofetch",
19
27
  "openapi",
28
+ "orpc",
29
+ "pinia",
20
30
  "rest",
31
+ "sdk",
21
32
  "swagger",
33
+ "swr",
22
34
  "typescript",
35
+ "valibot",
23
36
  "xhr",
24
- "yaml"
37
+ "yaml",
38
+ "zod"
25
39
  ],
26
- "homepage": "https://heyapi.dev/",
40
+ "homepage": "https://heyapi.dev/docs/openapi/typescript/get-started",
27
41
  "bugs": {
28
- "url": "https://github.com/hey-api/openapi-ts/issues"
42
+ "url": "https://github.com/hey-api/hey-api/issues"
29
43
  },
30
44
  "license": "MIT",
31
45
  "author": {
@@ -35,7 +49,8 @@
35
49
  },
36
50
  "repository": {
37
51
  "type": "git",
38
- "url": "git+https://github.com/hey-api/openapi-ts.git"
52
+ "url": "git+https://github.com/hey-api/hey-api.git",
53
+ "directory": "packages/openapi-ts"
39
54
  },
40
55
  "funding": "https://github.com/sponsors/hey-api",
41
56
  "bin": {
@@ -59,6 +74,10 @@
59
74
  "types": "./dist/internal.d.mts",
60
75
  "import": "./dist/internal.mjs"
61
76
  },
77
+ "./plugins": {
78
+ "types": "./dist/plugins.d.mts",
79
+ "import": "./dist/plugins.mjs"
80
+ },
62
81
  "./package.json": "./package.json"
63
82
  },
64
83
  "dependencies": {
@@ -67,20 +86,20 @@
67
86
  "color-support": "1.1.3",
68
87
  "commander": "15.0.0",
69
88
  "get-tsconfig": "4.14.0",
70
- "@hey-api/codegen-core": "0.9.0",
71
- "@hey-api/shared": "0.4.8",
72
- "@hey-api/json-schema-ref-parser": "1.4.3",
89
+ "@hey-api/codegen-core": "0.9.1",
90
+ "@hey-api/json-schema-ref-parser": "1.4.4",
91
+ "@hey-api/shared": "0.5.0",
73
92
  "@hey-api/spec-types": "0.2.0",
74
93
  "@hey-api/types": "0.1.4"
75
94
  },
76
95
  "devDependencies": {
77
- "@angular/common": "21.2.7",
78
- "@angular/compiler": "21.2.7",
79
- "@angular/compiler-cli": "21.2.7",
80
- "@angular/core": "21.2.7",
81
- "@angular/platform-browser": "21.2.7",
82
- "@angular/platform-browser-dynamic": "21.2.7",
83
- "@angular/router": "21.2.7",
96
+ "@angular/common": "21.2.17",
97
+ "@angular/compiler": "21.2.17",
98
+ "@angular/compiler-cli": "21.2.17",
99
+ "@angular/core": "21.2.17",
100
+ "@angular/platform-browser": "21.2.17",
101
+ "@angular/platform-browser-dynamic": "21.2.17",
102
+ "@angular/router": "21.2.17",
84
103
  "axios": "1.13.4",
85
104
  "eslint": "9.39.4",
86
105
  "ky": "1.14.3",
@@ -89,7 +108,7 @@
89
108
  "rxjs": "7.8.2",
90
109
  "typescript": "6.0.3",
91
110
  "vue": "3.5.25",
92
- "zone.js": "0.16.0"
111
+ "zone.js": "0.16.2"
93
112
  },
94
113
  "peerDependencies": {
95
114
  "typescript": ">=5.5.3 || >=6.0.0 || 6.0.1-rc"