This commit is contained in:
Thomas 2026-03-24 19:54:17 +00:00
parent 1fe18a5861
commit 1f582139cb
No known key found for this signature in database
5 changed files with 10 additions and 8 deletions

View file

@ -8,7 +8,7 @@ export default defineConfig({
plugins: [ plugins: [
{ {
name: '@hey-api/client-fetch', name: '@hey-api/client-fetch',
runtimeConfigPath: './src/hey-api.ts', runtimeConfigPath: '../hey-api.ts',
}, },
], ],
}); });

View file

@ -1,6 +1,6 @@
// This file is auto-generated by @hey-api/openapi-ts // This file is auto-generated by @hey-api/openapi-ts
import { createClientConfig } from './src/hey-api.ts'; import { createClientConfig } from '../hey-api.ts';
import { type ClientOptions, type Config, createClient, createConfig } from './client'; import { type ClientOptions, type Config, createClient, createConfig } from './client';
import type { ClientOptions as ClientOptions2 } from './types.gen'; import type { ClientOptions as ClientOptions2 } from './types.gen';

View file

@ -1,6 +1,4 @@
import { PUBLIC_API_BASE_URL } from '$env/static/public' import { PUBLIC_API_BASE_URL } from '$env/static/public'
import { client } from '../client/client.gen.ts' import { createClient } from '../client/client'
client.setConfig({ export const apiClient = createClient({ baseUrl: PUBLIC_API_BASE_URL })
baseUrl: PUBLIC_API_BASE_URL
})

View file

@ -1 +1,5 @@
import { cr } from '@client' import { createClient } from '../../client/client'
import { loginAuthLoginPost } from '../../client/sdk.gen.ts'
const client = createClient({ baseUrl: 'http://localhost:8000' })
loginAuthLoginPost({ client, body: { email: 'test', password: 'test' } })

View file

@ -8,7 +8,7 @@ const config = {
// See https://svelte.dev/docs/kit/adapters for more information about adapters. // See https://svelte.dev/docs/kit/adapters for more information about adapters.
adapter: adapter(), adapter: adapter(),
alias: { alias: {
'@client': 'src/client/index.ts' '@client': 'src/client/client.gen.ts'
} }
}, },
vitePlugin: { vitePlugin: {