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

@zum/flash-client

Package Overview
Dependencies
Maintainers
0
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zum/flash-client - npm Package Compare versions

Comparing version 0.0.16 to 0.0.17

test/rideFlashSdk.spec.ts

19

dist/sdk/api/ride.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const rxjs_1 = require("rxjs");
const operators_1 = require("rxjs/operators");

@@ -21,13 +20,9 @@ const initializer_1 = require("../init/initializer");

const subscribeToRides = (topic, rideIds, getRideDetail) => {
const rideObservableArray = [];
const ridesObservable = initializer_1.getSubscriptionManager().subscribe(topic, rideIds);
for (const rideId of rideIds) {
const rideObservable = ridesObservable.pipe(operators_1.filter((event) => event.entityId === rideId), operators_1.throttleTime(DEFAULT_THROTTLE_MS, rxjs_1.asyncScheduler, throttleConfig), operators_1.switchMap((event) => {
return getRideDetail(event.entityId).pipe(operators_1.map((ride) => {
return { rideId: event.entityId, result: ride };
}));
}), operators_1.tap((val) => console.log(`Ride Flash Event ${JSON.stringify(val)}`)));
rideObservableArray.push(rideObservable);
}
return rxjs_1.merge(...rideObservableArray);
return initializer_1.getSubscriptionManager()
.subscribe(topic, rideIds)
.pipe(operators_1.switchMap((event) => {
return getRideDetail(event.entityId).pipe(operators_1.map((ride) => {
return { rideId: event.entityId, result: ride };
}));
}), operators_1.tap((val) => console.log(`Ride Flash Event ${JSON.stringify(val)}`)));
};

@@ -34,0 +29,0 @@ exports.subscribeToRideRouteTrace = (rideId, getRideTraceLastFetchIndex, getActiveRideTrace) => {

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

import { asyncScheduler, merge, Observable } from 'rxjs';
import { filter, map, switchMap, tap, throttleTime } from 'rxjs/operators';
import { Observable } from 'rxjs';
import { map, switchMap, tap } from 'rxjs/operators';
import { FlashEvent } from '../../connect/types/flashEvent';

@@ -36,8 +36,5 @@ import { getSubscriptionManager } from '../init/initializer';

): RideResponseObservable<T> => {
const rideObservableArray: RideResponseObservable<T>[] = [];
const ridesObservable = getSubscriptionManager().subscribe(topic, rideIds);
for (const rideId of rideIds) {
const rideObservable = ridesObservable.pipe(
filter((event) => event.entityId === rideId),
throttleTime(DEFAULT_THROTTLE_MS, asyncScheduler, throttleConfig),
return getSubscriptionManager()
.subscribe(topic, rideIds)
.pipe(
switchMap((event: FlashEvent) => {

@@ -52,6 +49,2 @@ return getRideDetail(event.entityId).pipe(

);
rideObservableArray.push(rideObservable);
}
return merge(...rideObservableArray);
};

@@ -58,0 +51,0 @@

{
"name": "@zum/flash-client",
"version": "0.0.16",
"version": "0.0.17",
"description": "Client for connecting to Zum Flash server",

@@ -5,0 +5,0 @@ "license": "UNLICENSED",

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