Skip to content

Commit

Permalink
chore: Remove offending script and slowly start removing sdks
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyxiao committed Dec 21, 2023
1 parent 92adb15 commit e090fde
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 46 deletions.
18 changes: 9 additions & 9 deletions apps/web/pages/api/v0/[...trpc].ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
import '@usevenice/app-config/register.node'

import type {NextApiHandler} from 'next'

import {createOpenApiNextHandler} from '@usevenice/trpc-openapi'

import {respondToCORS} from '@/lib-server'
import {appRouter} from '@/lib-server/appRouter'

import {createContext, onError} from '../trpc/[...trpc]'

const handler = createOpenApiNextHandler({
Expand All @@ -16,13 +12,17 @@ const handler = createOpenApiNextHandler({
onError,
})

export default (function trpcHandler(req, res) {
export default (function trpcOpenAPIHandler(req, res) {
if (respondToCORS(req, res)) {
return
}
// allow the root document to work.
if (!req.query['trpc']) {
req.query['trpc'] = ''
}
console.log(
'[trpcOpenAPIHandler]',
req.url,
req.method,
req.headers,
req.body,
)

return handler(req, res)
} satisfies NextApiHandler)
34 changes: 0 additions & 34 deletions kits/sdk/bin/jsonToJs.ts

This file was deleted.

4 changes: 1 addition & 3 deletions kits/sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"scripts": {
"build": "tsc -p ./tsconfig.json && run-s build:json build:dts",
"build:dts": "cp ./venice.oas.d.ts ./dist/venice.oas.d.ts",
"build:json": "node --loader tsx ./bin/jsonToJs.ts ./dist/venice.oas.json",
"build": "tsc -p ./tsconfig.json",
"clean": "rm -rf ./dist",
"generate": "pnpm generate:schema && pnpm generate:types",
"generate:schema": "NEXT_PUBLIC_SERVER_URL=https://app.venice.is node --loader tsx ../../apps/web/lib-server/appRouter.ts > ./venice.oas.json",
Expand Down

1 comment on commit e090fde

@vercel
Copy link

@vercel vercel bot commented on e090fde Dec 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

venice – ./

usevenice.vercel.app
venice-venice.vercel.app
app.venice.is
venice-git-production-venice.vercel.app

Please sign in to comment.