New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@orpc/client

Package Overview
Dependencies
Maintainers
0
Versions
243
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@orpc/client - npm Package Compare versions

Comparing version 0.0.0-next-20241120100614 to 0.0.0-next-20241122114343

2

dist/src/procedure.d.ts

@@ -0,3 +1,3 @@

import type { Promisable } from '@orpc/shared';
import { type Schema, type SchemaInput, type SchemaOutput } from '@orpc/contract';
import type { Promisable } from '@orpc/shared';
export interface ProcedureClient<TInputSchema extends Schema, TOutputSchema extends Schema, THandlerOutput extends SchemaOutput<TOutputSchema>> {

@@ -4,0 +4,0 @@ (input: SchemaInput<TInputSchema>): Promise<SchemaOutput<TOutputSchema, THandlerOutput>>;

import type { ContractProcedure, ContractRouter, SchemaOutput } from '@orpc/contract';
import type { Procedure, Promisable, Router } from '@orpc/server';
import type { Procedure, Router } from '@orpc/server';
import type { Promisable } from '@orpc/shared';
import { type ProcedureClient } from './procedure';

@@ -4,0 +5,0 @@ export type RouterClientWithContractRouter<TRouter extends ContractRouter> = {

{
"name": "@orpc/client",
"type": "module",
"version": "0.0.0-next-20241120100614",
"version": "0.0.0-next-20241122114343",
"author": {

@@ -37,12 +37,12 @@ "name": "unnoq",

],
"devDependencies": {
"zod": "^3.23.8"
"peerDependencies": {
"@orpc/contract": "0.0.4",
"@orpc/server": "0.0.0-next-20241122114343"
},
"dependencies": {
"@orpc/shared": "0.0.0-next-20241120100614",
"@orpc/transformer": "0.0.0-next-20241120100614"
"@orpc/shared": "0.0.5",
"@orpc/transformer": "0.0.4"
},
"peerDependencies": {
"@orpc/contract": "0.0.0-next-20241120100614",
"@orpc/server": "0.0.0-next-20241120100614"
"devDependencies": {
"zod": "^3.23.8"
},

@@ -49,0 +49,0 @@ "scripts": {

@@ -1,2 +0,2 @@

import { os, ORPCError } from '@orpc/server'
import { ORPCError, os } from '@orpc/server'
import { createFetchHandler } from '@orpc/server/fetch'

@@ -114,3 +114,3 @@ import { z } from 'zod'

.input(z.object({ value: z.date() }))
.handler((input) => input.value),
.handler(input => input.value),
})

@@ -171,3 +171,4 @@

await client(undefined)
} catch (e) {
}
catch (e) {
error = e

@@ -174,0 +175,0 @@ }

/// <reference lib="dom" />
/// <reference lib="dom.iterable" />
import type { Promisable } from '@orpc/shared'
import {

@@ -11,3 +12,2 @@ ORPC_HEADER,

} from '@orpc/contract'
import type { Promisable } from '@orpc/shared'
import { trim } from '@orpc/shared'

@@ -84,3 +84,4 @@ import { ORPCError } from '@orpc/shared/error'

return await deserializer.deserialize(response)
} catch (e) {
}
catch (e) {
throw new ORPCError({

@@ -96,4 +97,4 @@ code: 'INTERNAL_SERVER_ERROR',

throw (
ORPCError.fromJSON(json) ??
new ORPCError({
ORPCError.fromJSON(json)
?? new ORPCError({
status: response.status,

@@ -100,0 +101,0 @@ code: 'INTERNAL_SERVER_ERROR',

@@ -116,3 +116,3 @@ import { oc } from '@orpc/contract'

// @ts-expect-error
// @ts-expect-error - invalid input
expect(client.ping({ value: {} })).rejects.toThrowError(

@@ -127,3 +127,3 @@ 'Validation input failed',

.input(z.object({ value: z.date() }))
.handler((input) => input.value),
.handler(input => input.value),
})

@@ -130,0 +130,0 @@

@@ -8,4 +8,5 @@ /// <reference lib="dom" />

} from '@orpc/contract'
import type { Procedure, Promisable, Router } from '@orpc/server'
import { type ProcedureClient, createProcedureClient } from './procedure'
import type { Procedure, Router } from '@orpc/server'
import type { Promisable } from '@orpc/shared'
import { createProcedureClient, type ProcedureClient } from './procedure'

@@ -68,6 +69,6 @@ export type RouterClientWithContractRouter<TRouter extends ContractRouter> = {

): TRouter extends Router<any>
? RouterClientWithRouter<TRouter>
: TRouter extends ContractRouter
? RouterClientWithContractRouter<TRouter>
: never {
? RouterClientWithRouter<TRouter>
: TRouter extends ContractRouter
? RouterClientWithContractRouter<TRouter>
: never {
const path = options?.path ?? []

@@ -74,0 +75,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc