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

rsocket-adapter-rxjs

Package Overview
Dependencies
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rsocket-adapter-rxjs - npm Package Compare versions

Comparing version 1.0.0-alpha.2 to 1.0.0-alpha-rxjs-adapter-optional-metadata.0

8

dist/Requesters.d.ts

@@ -6,5 +6,5 @@ /// <reference types="node" />

import { Observable, SchedulerLike } from "rxjs";
export declare function fireAndForget<TData>(data: TData, inputCodec: Codec<TData>): (rsocket: RSocket, metadata: Map<string | number | WellKnownMimeType, Buffer>) => Observable<void>;
export declare function requestResponse<TData, RData>(data: TData, inputCodec: Codec<TData>, outputCodec: Codec<RData>): (rsocket: RSocket, metadata: Map<string | number | WellKnownMimeType, Buffer>) => Observable<RData>;
export declare function requestStream<TData, RData>(data: TData, inputCodec: Codec<TData>, outputCodec: Codec<RData>, prefetch?: number, scheduler?: SchedulerLike): (rsocket: RSocket, metadata: Map<string | number | WellKnownMimeType, Buffer>) => Observable<RData>;
export declare function requestChannel<TData, RData>(datas: Observable<TData>, inputCodec: Codec<TData>, outputCodec: Codec<RData>, prefetch?: number, scheduler?: SchedulerLike): (rsocket: RSocket, metadata: Map<string | number | WellKnownMimeType, Buffer>) => Observable<RData>;
export declare function fireAndForget<TData>(data: TData, inputCodec: Codec<TData>): (rsocket: RSocket, metadata?: Map<string | number | WellKnownMimeType, Buffer>) => Observable<void>;
export declare function requestResponse<TData, RData>(data: TData, inputCodec: Codec<TData>, outputCodec: Codec<RData>): (rsocket: RSocket, metadata?: Map<string | number | WellKnownMimeType, Buffer>) => Observable<RData>;
export declare function requestStream<TData, RData>(data: TData, inputCodec: Codec<TData>, outputCodec: Codec<RData>, prefetch?: number, scheduler?: SchedulerLike): (rsocket: RSocket, metadata?: Map<string | number | WellKnownMimeType, Buffer>) => Observable<RData>;
export declare function requestChannel<TData, RData>(datas: Observable<TData>, inputCodec: Codec<TData>, outputCodec: Codec<RData>, prefetch?: number, scheduler?: SchedulerLike): (rsocket: RSocket, metadata?: Map<string | number | WellKnownMimeType, Buffer>) => Observable<RData>;

@@ -45,6 +45,7 @@ /*

return function (rsocket, metadata) {
var encodedMetadata = metadata ? (0, rsocket_composite_metadata_1.encodeCompositeMetadata)(metadata) : null;
return new RSocketPublisherToObservable_1.default(function (s) {
return rsocket.fireAndForget({
data: data ? inputCodec.encode(data) : Buffer.allocUnsafe(0),
metadata: (0, rsocket_composite_metadata_1.encodeCompositeMetadata)(metadata),
metadata: encodedMetadata,
}, s);

@@ -57,6 +58,7 @@ });

return function (rsocket, metadata) {
var encodedMetadata = metadata ? (0, rsocket_composite_metadata_1.encodeCompositeMetadata)(metadata) : null;
return new RSocketPublisherToObservable_1.default(function (s) {
return rsocket.requestResponse({
data: data ? inputCodec.encode(data) : Buffer.allocUnsafe(0),
metadata: (0, rsocket_composite_metadata_1.encodeCompositeMetadata)(metadata),
metadata: encodedMetadata,
}, s);

@@ -71,6 +73,7 @@ }, outputCodec);

return function (rsocket, metadata) {
var encodedMetadata = metadata ? (0, rsocket_composite_metadata_1.encodeCompositeMetadata)(metadata) : null;
return new RSocketPublisherToPrefetchingObservable_1.default(function (s, n) {
return rsocket.requestStream({
data: data ? inputCodec.encode(data) : Buffer.allocUnsafe(0),
metadata: (0, rsocket_composite_metadata_1.encodeCompositeMetadata)(metadata),
metadata: encodedMetadata,
}, n, s);

@@ -87,4 +90,5 @@ }, prefetch, outputCodec, scheduler);

resetOnRefCountZero: true,
})), function (_value, index) { return index === 0; }), 2), firstValueObservable = _a[0], restValuestObservable = _a[1];
})), function (_value, index) { return index === 0; }), 2), firstValueObservable = _a[0], restValuesObservable = _a[1];
return function (rsocket, metadata) {
var encodedMetadata = metadata ? (0, rsocket_composite_metadata_1.encodeCompositeMetadata)(metadata) : null;
return firstValueObservable.pipe((0, rxjs_1.take)(1), (0, rxjs_1.concatMap)(function (firstValue) {

@@ -94,5 +98,5 @@ return new Observer2BufferingSubscriberToPublisher2PrefetchingObservable_1.default(function (s) {

data: inputCodec.encode(firstValue),
metadata: (0, rsocket_composite_metadata_1.encodeCompositeMetadata)(metadata),
metadata: encodedMetadata,
}, prefetch, false, s);
}, prefetch, restValuestObservable, inputCodec, outputCodec, scheduler);
}, prefetch, restValuesObservable, inputCodec, outputCodec, scheduler);
}));

@@ -99,0 +103,0 @@ };

{
"name": "rsocket-adapter-rxjs",
"version": "1.0.0-alpha.2",
"version": "1.0.0-alpha-rxjs-adapter-optional-metadata.0",
"license": "Apache-2.0",

@@ -22,4 +22,4 @@ "main": "dist/index",

"dependencies": {
"rsocket-core": "^1.0.0-alpha.1",
"rsocket-messaging": "^1.0.0-alpha.2",
"rsocket-core": "^1.0.0-alpha-rxjs-adapter-optional-metadata.0",
"rsocket-messaging": "^1.0.0-alpha-rxjs-adapter-optional-metadata.0",
"rxjs": "^7.4.0"

@@ -31,3 +31,3 @@ },

},
"gitHead": "c5113bbd2ab35ed5aa74d4e7d101aca5e5528ead"
"gitHead": "aa9723e55925f41331685bd93ad538662e68a54d"
}

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