File tree Expand file tree Collapse file tree 3 files changed +8
-14
lines changed Expand file tree Collapse file tree 3 files changed +8
-14
lines changed Original file line number Diff line number Diff line change @@ -9,8 +9,8 @@ function sortByKey(deps: Record<string, string>) {
9
9
10
10
export function dependencies ( { features } : { features : string [ ] } ) {
11
11
const deps = {
12
- '@openapi-typescript-infra/coconfig' : '^4.1 .0' ,
13
- '@openapi-typescript-infra/service' : '^2.7.1 ' ,
12
+ '@openapi-typescript-infra/coconfig' : '^4.2 .0' ,
13
+ '@openapi-typescript-infra/service' : '^2.7.3 ' ,
14
14
} as Record < string , string > ;
15
15
if ( features . includes ( 'db' ) ) {
16
16
Object . assign ( deps , {
Original file line number Diff line number Diff line change @@ -7,12 +7,12 @@ import { Kysely, PostgresDialect } from 'kysely';
7
7
import type { DB } from './generated/database';
8
8
{{ else }}
9
9
{{ /inArray }}
10
- import type { {{ properCase name }} Locals, {{ properCase name }} Service , {{ properCase name }} ConfigSchema } from './types';
10
+ import type { {{ properCase name }} , {{ properCase name }} ConfigSchema } from './types';
11
11
12
12
type Config = {{ properCase name }} ConfigSchema;
13
13
14
- export function service(): {{ properCase name }} Service {
15
- const base = useService<{{properCase name}}Locals >();
14
+ export function service(): {{ properCase name }} [' Service'] {
15
+ const base = useService<{{properCase name}}[ ' ServiceLocals ' ] >();
16
16
return {
17
17
...base,
18
18
async start(app) {
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import type {
6
6
Service,
7
7
ServiceExpress,
8
8
ServiceLocals,
9
+ ServiceTypes,
9
10
} from '@openapi-typescript-infra/service';
10
11
11
12
{{ #inArray features ' db' }}
@@ -19,16 +20,9 @@ export interface {{properCase name}}Locals extends ServiceLocals {
19
20
{{ /inArray }}
20
21
}
21
22
22
- export type {{ properCase name }} RequestLocals = RequestLocals;
23
+ export interface {{ properCase name }} RequestLocals extends RequestLocals {}
23
24
24
- export type {{ properCase name }} Request = RequestWithApp<{{properCase name}}Locals>;
25
-
26
- export type {{ properCase name }} Service = Service<
27
- {{ properCase name }} Locals,
28
- {{ properCase name }} RequestLocals
29
- >;
30
-
31
- export type {{ properCase name }} App = ServiceExpress<{{properCase name}}Locals>;
25
+ export interface {{ properCase name }} extends ServiceTypes<{{properCase name}}Locals, {{ properCase name }} RequestLocals> {}
32
26
33
27
export type {{ properCase name }} Api = operationHandlers<
34
28
{{ properCase name }} Locals,
You can’t perform that action at this time.
0 commit comments