fork of hey-api/openapi-ts because I need some additional things
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge pull request #2365 from hey-api/docs/adonis-effect

docs: add Effect and AdonisJS

authored by

Lubos and committed by
GitHub
b9dc166f 1c32240f

+50 -17
+8
docs/.vitepress/config/en.ts
··· 107 107 text: 'Nuxt', 108 108 }, 109 109 { 110 + link: '/openapi-ts/clients/effect', 111 + text: 'Effect <span data-soon>soon</span>', 112 + }, 113 + { 110 114 link: '/openapi-ts/clients/custom', 111 115 text: 'Custom Client', 112 116 }, ··· 213 217 { 214 218 link: '/openapi-ts/plugins/fastify', 215 219 text: 'Fastify', 220 + }, 221 + { 222 + link: '/openapi-ts/plugins/adonis', 223 + text: 'Adonis <span data-soon>soon</span>', 216 224 }, 217 225 { 218 226 link: '/openapi-ts/plugins/express',
+1
docs/openapi-ts/clients.md
··· 29 29 - [Axios](/openapi-ts/clients/axios) 30 30 - [Next.js](/openapi-ts/clients/next-js) 31 31 - [Nuxt](/openapi-ts/clients/nuxt) 32 + - [Effect](/openapi-ts/clients/effect) <span data-soon>Soon</span> 32 33 - [Legacy](/openapi-ts/clients/legacy) 33 34 34 35 Don't see your client? [Build your own](/openapi-ts/clients/custom) or let us know your interest by [opening an issue](https://github.com/hey-api/openapi-ts/issues).
+14
docs/openapi-ts/clients/effect.md
··· 1 + --- 2 + title: Effect client 3 + description: Effect client for Hey API. Compatible with all our features. 4 + --- 5 + 6 + # Effect <span data-soon>soon</span> 7 + 8 + <FeatureStatus issueNumber=2082 name="Effect" /> 9 + 10 + ### About 11 + 12 + [Effect](https://effect.website/) is a powerful TypeScript library designed to help developers easily create complex, synchronous, and asynchronous programs. 13 + 14 + <!--@include: ../../partials/sponsors.md-->
+1
docs/openapi-ts/plugins.md
··· 33 33 34 34 The following plugins are planned but not in development yet. You can help us prioritize them by voting on [GitHub](https://github.com/hey-api/openapi-ts/labels/RSVP%20%F0%9F%91%8D%F0%9F%91%8E). 35 35 36 + - [Adonis](/openapi-ts/plugins/adonis) <span data-soon>Soon</span> 36 37 - [Ajv](/openapi-ts/plugins/ajv) <span data-soon>Soon</span> 37 38 - [Arktype](/openapi-ts/plugins/arktype) <span data-soon>Soon</span> 38 39 - [Express](/openapi-ts/plugins/express) <span data-soon>Soon</span>
+14
docs/openapi-ts/plugins/adonis.md
··· 1 + --- 2 + title: AdonisJS 3 + description: AdonisJS plugin for Hey API. Compatible with all our features. 4 + --- 5 + 6 + # AdonisJS <span data-soon>soon</span> 7 + 8 + <FeatureStatus issueNumber=2364 name="AdonisJS" /> 9 + 10 + ### About 11 + 12 + [AdonisJS](https://adonisjs.com) is a TypeScript-first web framework for building web apps and API servers. It comes with support for testing, modern tooling, an ecosystem of official packages, and more. 13 + 14 + <!--@include: ../../partials/sponsors.md-->
+1
docs/openapi-ts/web-frameworks.md
··· 12 12 Hey API natively supports the following frameworks. 13 13 14 14 - [Fastify](/openapi-ts/plugins/fastify) 15 + - [Adonis](/openapi-ts/plugins/adonis) <span data-soon>Soon</span> 15 16 - [Express](/openapi-ts/plugins/express) <span data-soon>Soon</span> 16 17 - [Hono](/openapi-ts/plugins/hono) <span data-soon>Soon</span> 17 18 - [Koa](/openapi-ts/plugins/koa) <span data-soon>Soon</span>
+7
packages/openapi-ts/README.md
··· 275 275 - [`@hey-api/client-next`](https://heyapi.dev/openapi-ts/clients/next-js) 276 276 - [`@hey-api/client-nuxt`](https://heyapi.dev/openapi-ts/clients/nuxt) 277 277 278 + ### Planned Clients 279 + 280 + The following clients are planned but not in development yet. You can help us prioritize them by voting on [GitHub](https://github.com/hey-api/openapi-ts/labels/RSVP%20%F0%9F%91%8D%F0%9F%91%8E). 281 + 282 + - [`@hey-api/client-effect`](https://heyapi.dev/openapi-ts/clients/effect) 283 + 278 284 Don't see your client? [Build your own](https://heyapi.dev/openapi-ts/clients/custom) or let us know your interest by [opening an issue](https://github.com/hey-api/openapi-ts/issues). 279 285 280 286 ### Native Plugins ··· 298 304 299 305 The following plugins are planned but not in development yet. You can help us prioritize them by voting on [GitHub](https://github.com/hey-api/openapi-ts/labels/RSVP%20%F0%9F%91%8D%F0%9F%91%8E). 300 306 307 + - [Adonis](https://heyapi.dev/openapi-ts/plugins/adonis) 301 308 - [Ajv](https://heyapi.dev/openapi-ts/plugins/ajv) 302 309 - [Arktype](https://heyapi.dev/openapi-ts/plugins/arktype) 303 310 - [Express](https://heyapi.dev/openapi-ts/plugins/express)
-1
packages/openapi-ts/src/tsc/index.ts
··· 58 58 returnVariable: _return.createReturnVariable, 59 59 safeAccessExpression: transform.createSafeAccessExpression, 60 60 stringLiteral: types.createStringLiteral, 61 - stringToTsNodes: utils.stringToTsNodes, 62 61 templateLiteralType: types.createTemplateLiteralType, 63 62 this: utils.createThis, 64 63 transformArrayMap: transform.createArrayMapTransform,
+4 -16
packages/openapi-ts/src/tsc/utils.ts
··· 19 19 removeComments: false, 20 20 }); 21 21 22 - export const createSourceFile = (sourceText: string) => 22 + export const createSourceFile = (sourceText: string): ts.SourceFile => 23 23 ts.createSourceFile( 24 24 '', 25 25 sourceText, ··· 72 72 } 73 73 } 74 74 75 - /** 76 - * Convert a string to a TypeScript Node 77 - * @param value the string to convert. 78 - * @returns ts.Node 79 - */ 80 - export function stringToTsNodes(value: string): ts.Node { 81 - const file = createSourceFile(value); 82 - return file.statements[0]!; 83 - } 75 + export const createIdentifier = ({ text }: { text: string }): ts.Identifier => 76 + ts.factory.createIdentifier(text); 84 77 85 - export const createIdentifier = ({ text }: { text: string }) => { 86 - const identifier = ts.factory.createIdentifier(text); 87 - return identifier; 88 - }; 89 - 90 - export const createThis = () => ts.factory.createThis(); 78 + export const createThis = (): ts.ThisExpression => ts.factory.createThis(); 91 79 92 80 type Modifier = AccessLevel | 'async' | 'export' | 'readonly' | 'static'; 93 81