chore: knip; remove unused files/deps/exports

pull/715/head
Travis Fischer 2025-05-27 00:43:53 +07:00
rodzic 31c6a54169
commit 795616fab5
8 zmienionych plików z 19 dodań i 103 usunięć

Wyświetl plik

@ -27,7 +27,6 @@
},
"dependencies": {
"@agentic/platform-core": "workspace:*",
"@agentic/platform-openapi": "workspace:*",
"@agentic/platform-schemas": "workspace:*",
"@agentic/platform-validators": "workspace:*",
"@fisch0920/drizzle-orm": "^0.43.7",

Wyświetl plik

@ -1,42 +0,0 @@
import type { OpenAPIHono } from '@hono/zod-openapi'
import { assert } from '@agentic/platform-core'
// TODO: Unused in favor of `better-auth`
export function registerV1OAuthRedirect(app: OpenAPIHono) {
return app.all('oauth', async (ctx) => {
if (ctx.req.query('state')) {
const { state: state64, ...query } = ctx.req.query()
// google oauth + others
const { uri, ...state } = JSON.parse(
Buffer.from(state64!, 'base64').toString()
) as any
assert(
uri,
404,
`Error oauth redirect not found "${new URLSearchParams(ctx.req.query()).toString()}"`
)
const searchParams = new URLSearchParams({
...state,
...query
})
ctx.redirect(`${uri}?${searchParams.toString()}`)
} else {
// github oauth
// https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#redirect-urls
const { uri, ...params } = ctx.req.query()
assert(
uri,
404,
`Error oauth redirect not found "${new URLSearchParams(ctx.req.query()).toString()}"`
)
const searchParams = new URLSearchParams(params)
ctx.redirect(`${uri}?${searchParams.toString()}`)
}
})
}

Wyświetl plik

@ -25,29 +25,29 @@ export type * from './types'
export * from './utils'
export {
and,
arrayContained,
arrayContains,
arrayOverlaps,
// arrayContained,
// arrayContains,
// arrayOverlaps,
asc,
between,
// between,
desc,
eq,
exists,
// exists,
gt,
gte,
ilike,
inArray,
isNotNull,
// gte,
// ilike,
// inArray,
// isNotNull,
isNull,
like,
lt,
lte,
ne,
// lt,
// lte,
// ne,
not,
notBetween,
notExists,
notIlike,
notInArray,
notLike,
// notBetween,
// notExists,
// notIlike,
// notInArray,
// notLike,
or
} from '@fisch0920/drizzle-orm'

Wyświetl plik

@ -1,2 +0,0 @@
export * from './mock-sentry-node'
export * from './setup-mock-logger'

Wyświetl plik

@ -1,25 +0,0 @@
import { vi } from 'vitest'
/**
* Mocks the entire @sentry/node module so that captureException is a spy.
*/
export function mockSentryNode(): void {
vi.mock('@sentry/node', async () => {
const actual = await vi.importActual('@sentry/node')
return {
...actual,
captureException: vi.fn(),
setTags: vi.fn(),
setTag: vi.fn(),
withIsolationScope: vi.fn((fn) => fn()),
startSpan: vi.fn((_, fn) => {
const fakeSpan = {
setAttributes: vi.fn(),
end: vi.fn()
}
const callbackResult = fn(fakeSpan)
return callbackResult
})
}
})
}

Wyświetl plik

@ -1,12 +0,0 @@
import type { Logger } from '@agentic/platform-core'
import { vi } from 'vitest'
export function setupMockLogger() {
return {
trace: vi.fn(),
debug: vi.fn(),
info: vi.fn(),
warn: vi.fn(),
error: vi.fn()
} as Logger
}

Wyświetl plik

@ -27,8 +27,7 @@
"@agentic/platform-schemas": "workspace:*",
"@openauthjs/openauth": "^0.4.3",
"ky": "catalog:",
"type-fest": "catalog:",
"zod": "catalog:"
"type-fest": "catalog:"
},
"devDependencies": {
"openapi-typescript": "^7.8.0"

Wyświetl plik

@ -42,8 +42,7 @@
"open": "^10.1.2",
"ora": "^8.2.0",
"restore-cursor": "catalog:",
"unconfig": "^7.3.2",
"zod": "catalog:"
"unconfig": "^7.3.2"
},
"devDependencies": {
"@agentic/platform-fixtures": "workspace:*",