Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@grpc.ts/core

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@grpc.ts/core - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

13

lib/client.d.ts

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

import type { ServiceClient } from '@grpc/grpc-js/build/src/make-client';
import type { IClientProps } from './interface';
interface IGetServiceOptionsProps {
packageName?: string;
}
type TGetServiceFunc = <T extends ServiceClient = ServiceClient>(serviceName: string, options?: IGetServiceOptionsProps) => T | undefined;
export interface IGrpcClientProps {
getService: TGetServiceFunc;
}
export declare function createClient({ url, options, credentials: creds, package: packageInfo, packageDefinitionOptions, }: IClientProps): Promise<IGrpcClientProps>;
export {};
import type { IClientProps, IGrpcClientWrapperProps } from './interface';
export declare function createClient({ url, options, credentials: creds, package: packageInfo, packageDefinitionOptions, }: IClientProps): Promise<IGrpcClientWrapperProps>;

5

lib/index.d.ts
export { createSecureContext } from 'tls';
export { credentials } from '@grpc/grpc-js';
export { credentials, Metadata, type ServerUnaryCall } from '@grpc/grpc-js';
export type { ServiceClient } from '@grpc/grpc-js/build/src/make-client';
export type { Timestamp } from 'google-protobuf/google/protobuf/timestamp_pb';
export * from './dataType';

@@ -8,2 +9,2 @@ export * from './client';

export * from './utils';
export type { IClientProps, IServerProps } from './interface';
export type { IClientProps, IServerProps, IServerWrapperProps, TAddUnaryHandlerFunc, IAddUnaryHandlerOptionsProps, } from './interface';
import type { Options } from '@grpc/proto-loader';
import type { ServiceClient } from '@grpc/grpc-js/build/src/make-client';
import type { ChannelCredentials, ServerCredentials } from '@grpc/grpc-js';
import type { Server, Metadata, ServerUnaryCall, ServerCredentials, ChannelCredentials } from '@grpc/grpc-js';
export type TCompressionAlgorithms = 'identity' | 'deflate' | 'gzip';

@@ -55,2 +55,32 @@ export interface IChannelOptionsProps {

}
export interface IAddUnaryHandlerOptionsProps {
package?: string;
}
type TUnaryHandlerFunc<TRequest = unknown, TResponse = unknown> = (request: TRequest, metadata: Metadata, call: ServerUnaryCall<TRequest, TResponse>) => TResponse;
export type TAddUnaryHandlerFunc = (serviceName: string, rpcName: string, impl: TUnaryHandlerFunc, options?: IAddUnaryHandlerOptionsProps) => void;
export interface IServerWrapperProps {
server: Server;
addUnaryHandler: TAddUnaryHandlerFunc;
}
interface IGetServiceOptionsProps {
packageName?: string;
}
export type TGetServiceFunc = <T extends ServiceClient = ServiceClient>(serviceName: string, options?: IGetServiceOptionsProps) => T | undefined;
export interface IGrpcClientWrapperProps {
close: () => void;
getService: TGetServiceFunc;
getPackages: () => IClientsProps;
}
export interface IGrpcServerProps extends IServerProps {
serverName?: string;
}
export interface IGrpcServerListProps {
[key: string]: IServerWrapperProps;
}
export interface IGrpcClientProps extends IClientProps {
clientName?: string;
}
export interface IGrpcClientListProps {
[key: string]: IGrpcClientWrapperProps;
}
export {};

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

import { Server, type Metadata, type ServerUnaryCall } from '@grpc/grpc-js';
import type { IServerProps } from './interface';
interface IAddUnaryHandlerOptionsProps {
package?: string;
}
type TUnaryHandlerFunc<TRequest = unknown, TResponse = unknown> = (request: TRequest, metadata: Metadata, call: ServerUnaryCall<TRequest, TResponse>) => TResponse;
type TAddUnaryHandlerFunc = (serviceName: string, rpcName: string, impl: TUnaryHandlerFunc, options?: IAddUnaryHandlerOptionsProps) => void;
export interface IServerObjProps {
server: Server;
addUnaryHandler: TAddUnaryHandlerFunc;
}
export declare function createServer({ url, options, credentials: creds, package: packageInfo, packageDefinitionOptions, }: IServerProps): Promise<IServerObjProps>;
export {};
import type { IServerProps, IServerWrapperProps } from './interface';
export declare function createServer({ url, options, credentials: creds, package: packageInfo, packageDefinitionOptions, }: IServerProps): Promise<IServerWrapperProps>;
{
"name": "@grpc.ts/core",
"version": "1.0.0",
"version": "1.1.0",
"license": "MIT",

@@ -34,3 +34,3 @@ "directories": {

"dependencies": {
"@grpc/grpc-js": "^1.8.13",
"@grpc/grpc-js": "^1.8.14",
"@grpc/proto-loader": "^0.7.6",

@@ -37,0 +37,0 @@ "google-protobuf": "^3.21.2"

@@ -14,3 +14,3 @@ A wrapper of [@grpc/grpc-js](https://github.com/grpc/grpc-node) for Node.JS.

pnpm add @gprc-ts/core
pnpm add @grpc.ts/core
```

@@ -17,0 +17,0 @@

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