-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(server)!: rewrite and tests (#52)
* wip * wip * procedure builder tests * procedure implementer tests * wip * refactor and 100% coverage for procedure caller * fix middleware types * tests for middleware with output is typed * tests for procedure decorated * router * typed for router builder * context restriction for router builder * typesafe and prevent duplicate on unshift method * router builder tests partial * lazy * lazy decorated * improve * sync * improve middleware types * improve merging middleware on unshiftMiddleware * remove lazy method * improve at context * router builder * router caller * router implementer * builder * reindex * separate middleware decorated * procedure can be a router * improve dedupe in unshiftMiddleware * improve * tests for procedure works as a router * safe object callable * group hidden mechanism * router caller now works with procedure as router, and more * fix * fetch - handle request * fetch, and some improvement on caller * rename caller to client, and some improvements * hidden tests * rename client * merge types on client * react-query sync * vue-query sync * sync openapi * sync next * sync react * sync rest * sync playground * fix lazy-decorated tests * sync docs
- Loading branch information
Showing
186 changed files
with
6,476 additions
and
5,811 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import type { RouterClient } from '@orpc/server' | ||
import type { router } from 'examples/server' | ||
import { createORPCReactQueryUtils } from '@orpc/react-query' | ||
|
||
export const orpc = createORPCReactQueryUtils<typeof router /** or contract router */>('fake-client' as any) | ||
export const orpc = createORPCReactQueryUtils({} as RouterClient<typeof router /** or contract router */>) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
import type { RouterClient } from '@orpc/server' | ||
import type { router } from 'examples/server' | ||
import { createORPCReact } from '@orpc/react' | ||
// biome-ignore lint/correctness/noUnusedImports: <explanation> | ||
|
||
export const { orpc, ORPCContext } | ||
= createORPCReact<typeof router /** or contract router */>() | ||
export const { orpc, ORPCContext } = createORPCReact<RouterClient<typeof router /** or contract router */>>() |
Oops, something went wrong.