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

@ngx-grpc/common

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ngx-grpc/common - npm Package Compare versions

Comparing version 0.4.3 to 1.0.0

69

bundles/ngx-grpc-common.umd.js
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define('@ngx-grpc/common', ['exports'], factory) :
(global = global || self, factory((global['ngx-grpc'] = global['ngx-grpc'] || {}, global['ngx-grpc'].common = {})));
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define('@ngx-grpc/common', ['exports'], factory) :
(global = global || self, factory((global['ngx-grpc'] = global['ngx-grpc'] || {}, global['ngx-grpc'].common = {})));
}(this, (function (exports) { 'use strict';
(function (GrpcCallType) {
GrpcCallType[GrpcCallType["unary"] = 0] = "unary";
GrpcCallType[GrpcCallType["serverStream"] = 1] = "serverStream";
})(exports.GrpcCallType || (exports.GrpcCallType = {}));
/**
* Type of the RPC
*/
(function (GrpcCallType) {
GrpcCallType[GrpcCallType["unary"] = 0] = "unary";
GrpcCallType[GrpcCallType["serverStream"] = 1] = "serverStream";
})(exports.GrpcCallType || (exports.GrpcCallType = {}));
var GrpcDataEvent = /** @class */ (function () {
function GrpcDataEvent(data) {
this.data = data;
}
return GrpcDataEvent;
}());
var GrpcStatusEvent = /** @class */ (function () {
function GrpcStatusEvent(code, details, metadata) {
this.code = code;
this.details = details;
this.metadata = metadata;
}
return GrpcStatusEvent;
}());
/**
* Data event. This event is emitted when the new message arrives from the server
*/
var GrpcDataEvent = /** @class */ (function () {
function GrpcDataEvent(data) {
this.data = data;
}
return GrpcDataEvent;
}());
/**
* Status event. This event is emitted when the new status and metadata arrives from the server
*/
var GrpcStatusEvent = /** @class */ (function () {
function GrpcStatusEvent(code, details, metadata) {
this.code = code;
this.details = details;
this.metadata = metadata;
}
return GrpcStatusEvent;
}());
exports.GrpcDataEvent = GrpcDataEvent;
exports.GrpcStatusEvent = GrpcStatusEvent;
/*
DOM-free chunk
Object.defineProperty(exports, '__esModule', { value: true });
IMPORTANT: all dependencies must be DOM-references-free because it might breaks Worker environment; in other words
- do not import to @angular/* and other DOM-related packages in any level of import
- do not use Window / Document etc
*/
/**
* Generated bundle index. Do not edit.
*/
exports.GrpcDataEvent = GrpcDataEvent;
exports.GrpcStatusEvent = GrpcStatusEvent;
Object.defineProperty(exports, '__esModule', { value: true });
})));
//# sourceMappingURL=ngx-grpc-common.umd.js.map

@@ -0,1 +1,4 @@

/**
* Type of the RPC
*/
export var GrpcCallType;

@@ -6,2 +9,2 @@ (function (GrpcCallType) {

})(GrpcCallType || (GrpcCallType = {}));
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ3JwYy1jbGllbnQuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9Abmd4LWdycGMvY29tbW9uLyIsInNvdXJjZXMiOlsibGliL2dycGMtY2xpZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW9DQSxNQUFNLENBQU4sSUFBWSxZQUdYO0FBSEQsV0FBWSxZQUFZO0lBQ3RCLGlEQUFLLENBQUE7SUFDTCwrREFBWSxDQUFBO0FBQ2QsQ0FBQyxFQUhXLFlBQVksS0FBWixZQUFZLFFBR3ZCIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgTWV0YWRhdGEgfSBmcm9tICdncnBjLXdlYic7XG5pbXBvcnQgeyBPYnNlcnZhYmxlIH0gZnJvbSAncnhqcyc7XG5pbXBvcnQgeyBHcnBjRXZlbnQgfSBmcm9tICcuL2dycGMtZXZlbnQnO1xuaW1wb3J0IHsgR3JwY01lc3NhZ2UgfSBmcm9tICcuL2dycGMtbWVzc2FnZSc7XG5pbXBvcnQgeyBHcnBjTWVzc2FnZUNs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

@@ -0,1 +1,4 @@

/**
* Data event. This event is emitted when the new message arrives from the server
*/
export class GrpcDataEvent {

@@ -6,2 +9,5 @@ constructor(data) {

}
/**
* Status event. This event is emitted when the new status and metadata arrives from the server
*/
export class GrpcStatusEvent {

@@ -14,2 +20,2 @@ constructor(code, details, metadata) {

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ3JwYy1ldmVudC5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0BuZ3gtZ3JwYy9jb21tb24vIiwic291cmNlcyI6WyJsaWIvZ3JwYy1ldmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFHQSxNQUFNLE9BQU8sYUFBYTtJQUN4QixZQUNTLElBQU87UUFBUCxTQUFJLEdBQUosSUFBSSxDQUFHO0lBQ1osQ0FBQztDQUNOO0FBRUQsTUFBTSxPQUFPLGVBQWU7SUFDMUIsWUFDUyxJQUFZLEVBQ1osT0FBZSxFQUNmLFFBQXFDO1FBRnJDLFNBQUksR0FBSixJQUFJLENBQVE7UUFDWixZQUFPLEdBQVAsT0FBTyxDQUFRO1FBQ2YsYUFBUSxHQUFSLFFBQVEsQ0FBNkI7SUFDMUMsQ0FBQztDQUNOIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgU3RhdHVzIH0gZnJvbSAnZ3JwYy13ZWInO1xuaW1wb3J0IHsgR3JwY01lc3NhZ2UgfSBmcm9tICcuL2dycGMtbWVzc2FnZSc7XG5cbmV4cG9ydCBjbGFzcyBHcnBjRGF0YUV2ZW50PFQgZXh0ZW5kcyBHcnBjTWVzc2FnZT4ge1xuICBjb25zdHJ1Y3RvcihcbiAgICBwdWJsaWMgZGF0YTogVFxuICApIHsgfVxufVxuXG5leHBvcnQgY2xhc3MgR3JwY1N0YXR1c0V2ZW50IGltcGxlbWVudHMgU3RhdHVzIHtcbiAgY29uc3RydWN0b3IoXG4gICAgcHVibGljIGNvZGU6IG51bWJlcixcbi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VFtQXTtcbn07XG4iXX0=

@@ -5,2 +5,2 @@ /**

export * from './public-api';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LWdycGMtY29tbW9uLmpzIiwic291cmNlUm9vdCI6Im5nOi8vQG5neC1ncnBjL2NvbW1vbi8iLCJzb3VyY2VzIjpbIm5neC1ncnBjLWNvbW1vbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsY0FBYyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBHZW5lcmF0ZWQgYnVuZGxlIGluZGV4LiBEbyBub3QgZWRpdC5cbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL3B1YmxpYy1hcGknO1xuIl19
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LWdycGMtY29tbW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vcGFja2FnZXMvY29tbW9uL3NyYy9uZ3gtZ3JwYy1jb21tb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLGNBQWMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9wdWJsaWMtYXBpJztcbiJdfQ==

@@ -10,2 +10,5 @@ /*

export * from './lib/grpc-event';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0BuZ3gtZ3JwYy9jb21tb24vIiwic291cmNlcyI6WyJwdWJsaWMtYXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7RUFNRTtBQUVGLGNBQWMsbUJBQW1CLENBQUM7QUFDbEMsY0FBYyxrQkFBa0IsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qXG4gIERPTS1mcmVlIGNodW5rXG5cbiAgSU1QT1JUQU5UOiBhbGwgZGVwZW5kZW5jaWVzIG11c3QgYmUgRE9NLXJlZmVyZW5jZXMtZnJlZSBiZWNhdXNlIGl0IG1pZ2h0IGJyZWFrcyBXb3JrZXIgZW52aXJvbm1lbnQ7IGluIG90aGVyIHdvcmRzXG4gICAgLSBkbyBub3QgaW1wb3J0IHRvIEBhbmd1bGFyLyogYW5kIG90aGVyIERPTS1yZWxhdGVkIHBhY2thZ2VzIGluIGFueSBsZXZlbCBvZiBpbXBvcnRcbiAgICAtIGRvIG5vdCB1c2UgV2luZG93IC8gRG9jdW1lbnQgZXRjXG4qL1xuXG5leHBvcnQgKiBmcm9tICcuL2xpYi9ncnBjLWNsaWVudCc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9ncnBjLWV2ZW50JztcbmV4cG9ydCAqIGZyb20gJy4vbGliL2dycGMtbWVzc2FnZSc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9ncnBjLW1lc3NhZ2UtY2xhc3MnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvcmVjdXJzaXZlLXBhcnRpYWwnO1xuXG4iXX0=
export * from './lib/grpc-message';
export * from './lib/grpc-message-class';
export * from './lib/recursive-partial';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3BhY2thZ2VzL2NvbW1vbi9zcmMvcHVibGljLWFwaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7O0VBTUU7QUFFRixjQUFjLG1CQUFtQixDQUFDO0FBQ2xDLGNBQWMsa0JBQWtCLENBQUM7QUFDakMsY0FBYyxvQkFBb0IsQ0FBQztBQUNuQyxjQUFjLDBCQUEwQixDQUFDO0FBQ3pDLGNBQWMseUJBQXlCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKlxuICBET00tZnJlZSBjaHVua1xuXG4gIElNUE9SVEFOVDogYWxsIGRlcGVuZGVuY2llcyBtdXN0IGJlIERPTS1yZWZlcmVuY2VzLWZyZWUgYmVjYXVzZSBpdCBtaWdodCBicmVha3MgV29ya2VyIGVudmlyb25tZW50OyBpbiBvdGhlciB3b3Jkc1xuICAgIC0gZG8gbm90IGltcG9ydCB0byBAYW5ndWxhci8qIGFuZCBvdGhlciBET00tcmVsYXRlZCBwYWNrYWdlcyBpbiBhbnkgbGV2ZWwgb2YgaW1wb3J0XG4gICAgLSBkbyBub3QgdXNlIFdpbmRvdyAvIERvY3VtZW50IGV0Y1xuKi9cblxuZXhwb3J0ICogZnJvbSAnLi9saWIvZ3JwYy1jbGllbnQnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvZ3JwYy1ldmVudCc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9ncnBjLW1lc3NhZ2UnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvZ3JwYy1tZXNzYWdlLWNsYXNzJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL3JlY3Vyc2l2ZS1wYXJ0aWFsJztcblxuIl19

@@ -0,1 +1,4 @@

/**
* Type of the RPC
*/
var GrpcCallType;

@@ -7,2 +10,5 @@ (function (GrpcCallType) {

/**
* Data event. This event is emitted when the new message arrives from the server
*/
class GrpcDataEvent {

@@ -13,2 +19,5 @@ constructor(data) {

}
/**
* Status event. This event is emitted when the new status and metadata arrives from the server
*/
class GrpcStatusEvent {

@@ -15,0 +24,0 @@ constructor(code, details, metadata) {

@@ -6,9 +6,43 @@ import { Metadata } from 'grpc-web';

import { GrpcMessageClass } from './grpc-message-class';
/**
* This interface describes transport layer client factory, which is important in instantiating GrpcClient
* because the GrpcClientFactory is bound to the dependency injection (use constructor to inject normal Angular services & config),
* while GrpcClient has none
*/
export interface GrpcClientFactory {
/**
* Create a GrpcClient
* @param serviceId a service type in proto (passed in by generated service client), e.g.
* @param settings settings for underlying grpc client implementation
* @returns new GrpcClient
*/
createClient(serviceId: string, settings: GrpcClientSettings): GrpcClient;
}
/**
* A transport layer client implementation interface
* Instance of GrpcClient is created for every gRPC service client by corresponding GrpcClientFactory
*/
export interface GrpcClient {
/**
* Handle unary RPC
* @param path gRPC method path (rpc path)
* @param req request data
* @param metadata request metadata
* @param reqclss request message class
* @param resclss response message class
*/
unary<Q extends GrpcMessage, S extends GrpcMessage>(path: string, req: Q, metadata: Metadata, reqclss: GrpcMessageClass<Q>, resclss: GrpcMessageClass<S>): Observable<GrpcEvent<S>>;
/**
* Handle server stream RPC
* @param path gRPC method path (rpc path)
* @param req request data
* @param metadata request metadata
* @param reqclss request message class
* @param resclss response message class
*/
serverStream<Q extends GrpcMessage, S extends GrpcMessage>(path: string, req: Q, metadata: Metadata, reqclss: GrpcMessageClass<Q>, resclss: GrpcMessageClass<S>): Observable<GrpcEvent<S>>;
}
/**
* Settings for the chosen implementation of GrpcClient
*/
export interface GrpcClientSettings {

@@ -19,2 +53,5 @@ host: string;

}
/**
* Type of the RPC
*/
export declare enum GrpcCallType {

@@ -24,2 +61,5 @@ unary = 0,

}
/**
* This interface describes the internal gRPC request data structure
*/
export interface GrpcRequest<Q extends GrpcMessage, S extends GrpcMessage> {

@@ -26,0 +66,0 @@ path: string;

import { Status } from 'grpc-web';
import { GrpcMessage } from './grpc-message';
/**
* Data event. This event is emitted when the new message arrives from the server
*/
export declare class GrpcDataEvent<T extends GrpcMessage> {

@@ -7,2 +10,5 @@ data: T;

}
/**
* Status event. This event is emitted when the new status and metadata arrives from the server
*/
export declare class GrpcStatusEvent implements Status {

@@ -18,2 +24,5 @@ code: number;

}
/**
* GrpcEvent can be either data or status event
*/
export declare type GrpcEvent<T extends GrpcMessage> = GrpcDataEvent<T> | GrpcStatusEvent;

@@ -1,8 +0,12 @@

import { ByteSource } from 'google-protobuf';
import { BinaryReader, BinaryWriter, ByteSource } from 'google-protobuf';
import { GrpcMessage } from './grpc-message';
import { RecursivePartial } from './recursive-partial';
/**
* Describes a gRPC message class
*/
export interface GrpcMessageClass<M extends GrpcMessage> {
new (m?: RecursivePartial<M>): M;
fromBinary: (bytes: ByteSource) => M;
toBinary: (instance: M) => ByteSource;
deserializeBinary: (bytes: ByteSource) => M;
deserializeBinaryFromReader: (message: M, reader: BinaryReader) => void;
serializeBinaryToWriter: (message: M, writer: BinaryWriter) => void;
}

@@ -0,4 +1,8 @@

/**
* gRPC message interface
*/
export interface GrpcMessage {
serializeBinary(): Uint8Array;
toObject(): any;
toJSON(): any;
}

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

/**
* Helper type to turn every property and all sub-properties (from sub-objects) the incoming type to be optional
*/
export declare type RecursivePartial<T> = {
[P in keyof T]?: T[P] extends Uint8Array ? T[P] : T[P] extends (infer U)[] ? RecursivePartial<U>[] : T[P];
};

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

{"__symbolic":"module","version":4,"metadata":{"GrpcClientFactory":{"__symbolic":"interface"},"GrpcClient":{"__symbolic":"interface"},"GrpcClientSettings":{"__symbolic":"interface"},"GrpcCallType":{"unary":0,"serverStream":1},"GrpcRequest":{"__symbolic":"interface"},"GrpcDataEvent":{"__symbolic":"class","arity":1,"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"error","message":"Could not resolve type","line":5,"character":17,"context":{"typeName":"T"},"module":"./lib/grpc-event"}]}]}},"GrpcStatusEvent":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"string"},{"__symbolic":"error","message":"Expression form not supported","line":13,"character":21,"module":"./lib/grpc-event"}]}]}},"GrpcEvent":{"__symbolic":"interface"},"GrpcMessage":{"__symbolic":"interface"},"GrpcMessageClass":{"__symbolic":"interface"},"RecursivePartial":{"__symbolic":"interface"}},"origins":{"GrpcClientFactory":"./lib/grpc-client","GrpcClient":"./lib/grpc-client","GrpcClientSettings":"./lib/grpc-client","GrpcCallType":"./lib/grpc-client","GrpcRequest":"./lib/grpc-client","GrpcDataEvent":"./lib/grpc-event","GrpcStatusEvent":"./lib/grpc-event","GrpcEvent":"./lib/grpc-event","GrpcMessage":"./lib/grpc-message","GrpcMessageClass":"./lib/grpc-message-class","RecursivePartial":"./lib/recursive-partial"},"importAs":"@ngx-grpc/common"}
{"__symbolic":"module","version":4,"metadata":{"GrpcClientFactory":{"__symbolic":"interface"},"GrpcClient":{"__symbolic":"interface"},"GrpcClientSettings":{"__symbolic":"interface"},"GrpcCallType":{"unary":0,"serverStream":1},"GrpcRequest":{"__symbolic":"interface"},"GrpcDataEvent":{"__symbolic":"class","arity":1,"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"error","message":"Could not resolve type","line":8,"character":17,"context":{"typeName":"T"},"module":"./lib/grpc-event"}]}]}},"GrpcStatusEvent":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"string"},{"__symbolic":"error","message":"Expression form not supported","line":19,"character":21,"module":"./lib/grpc-event"}]}]}},"GrpcEvent":{"__symbolic":"interface"},"GrpcMessage":{"__symbolic":"interface"},"GrpcMessageClass":{"__symbolic":"interface"},"RecursivePartial":{"__symbolic":"interface"}},"origins":{"GrpcClientFactory":"./lib/grpc-client","GrpcClient":"./lib/grpc-client","GrpcClientSettings":"./lib/grpc-client","GrpcCallType":"./lib/grpc-client","GrpcRequest":"./lib/grpc-client","GrpcDataEvent":"./lib/grpc-event","GrpcStatusEvent":"./lib/grpc-event","GrpcEvent":"./lib/grpc-event","GrpcMessage":"./lib/grpc-message","GrpcMessageClass":"./lib/grpc-message-class","RecursivePartial":"./lib/recursive-partial"},"importAs":"@ngx-grpc/common"}

@@ -13,11 +13,11 @@ {

"grpc-web": "^1.0.0",
"rxjs": "^6.0.0",
"tslib": "^1.10.0"
"rxjs": "^6.0.0"
},
"dependencies": {
"tslib": "^2.0.0"
},
"main": "bundles/ngx-grpc-common.umd.js",
"module": "fesm5/ngx-grpc-common.js",
"module": "fesm2015/ngx-grpc-common.js",
"es2015": "fesm2015/ngx-grpc-common.js",
"esm5": "esm5/ngx-grpc-common.js",
"esm2015": "esm2015/ngx-grpc-common.js",
"fesm5": "fesm5/ngx-grpc-common.js",
"fesm2015": "fesm2015/ngx-grpc-common.js",

@@ -27,3 +27,3 @@ "typings": "ngx-grpc-common.d.ts",

"sideEffects": false,
"version": "0.4.3"
"version": "1.0.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

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