feat: add changelog commit schema
This commit is contained in:
parent
106b3c0545
commit
5467e78596
@ -5,7 +5,11 @@ import winston from 'winston'
|
|||||||
// Create a Winston logger - passing in the Logtail transport
|
// Create a Winston logger - passing in the Logtail transport
|
||||||
export const logger = winston.createLogger({
|
export const logger = winston.createLogger({
|
||||||
format: winston.format.json(),
|
format: winston.format.json(),
|
||||||
transports: [],
|
transports: [
|
||||||
|
new winston.transports.Console({
|
||||||
|
format: winston.format.json(),
|
||||||
|
}),
|
||||||
|
],
|
||||||
})
|
})
|
||||||
|
|
||||||
if (import.meta.env.NODE_ENV === 'production') {
|
if (import.meta.env.NODE_ENV === 'production') {
|
||||||
@ -13,11 +17,3 @@ if (import.meta.env.NODE_ENV === 'production') {
|
|||||||
const logtail = new Logtail(process.env.BETTERSTACK_LOG_TOKEN as string)
|
const logtail = new Logtail(process.env.BETTERSTACK_LOG_TOKEN as string)
|
||||||
logger.add(new LogtailTransport(logtail))
|
logger.add(new LogtailTransport(logtail))
|
||||||
}
|
}
|
||||||
|
|
||||||
if (import.meta.env.NODE_ENV === 'development') {
|
|
||||||
logger.add(
|
|
||||||
new winston.transports.Console({
|
|
||||||
format: winston.format.json(),
|
|
||||||
}),
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
@ -30,7 +30,6 @@ export const CommitCreateInput = z
|
|||||||
body: z.string().optional(),
|
body: z.string().optional(),
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
|
|
||||||
.openapi({
|
.openapi({
|
||||||
required: ['changelogId', 'commit', 'subject'],
|
required: ['changelogId', 'commit', 'subject'],
|
||||||
})
|
})
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
export * from './base'
|
export * from './base'
|
||||||
//export * from './byId'
|
//export * from './byId'
|
||||||
export * from './create'
|
export * from './create'
|
||||||
//export * from './list'
|
export * from './list'
|
||||||
//export * from './update'
|
//export * from './update'
|
||||||
|
@ -1,4 +1,19 @@
|
|||||||
import { z } from '@hono/zod-openapi'
|
import { z } from '@hono/zod-openapi'
|
||||||
import { VersionOutput } from './base'
|
import { CommitOutput } from './base'
|
||||||
|
|
||||||
export const VersionListOutput = z.array(VersionOutput)
|
export const CommitListOutput = z.array(CommitOutput)
|
||||||
|
export const CommitListParams = z.object({
|
||||||
|
changelogId: z
|
||||||
|
.string()
|
||||||
|
.uuid()
|
||||||
|
.openapi({
|
||||||
|
param: {
|
||||||
|
name: 'changelogId',
|
||||||
|
in: 'query',
|
||||||
|
},
|
||||||
|
example: 'a5ed5965-0506-44e6-aaec-0465ff9fe092',
|
||||||
|
}),
|
||||||
|
limit: z.number().or(z.string()).optional(),
|
||||||
|
offset: z.number().or(z.string()).optional(),
|
||||||
|
hasVersion: z.boolean().default(false),
|
||||||
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user