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

@push-rpc/next

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@push-rpc/next - npm Package Compare versions

Comparing version 2.0.16 to 2.0.17

5

dist/client/index.d.ts
import { RpcContext, Services } from "../rpc.js";
import { ServicesWithSubscriptions } from "./remote.js";
import { Middleware } from "../utils/middleware.js";
import { ClientCache } from "./ClientCache";
export type RpcClient = {

@@ -13,2 +12,6 @@ readonly clientId: string;

};
export type ClientCache = {
put(itemName: string, parameters: unknown[], value: unknown): void;
get(itemName: string, parameters: unknown[]): unknown | undefined;
};
export type ConsumeServicesOptions = {

@@ -15,0 +18,0 @@ callTimeout: number;

1

dist/client/remote.js

@@ -21,2 +21,3 @@ "use strict";

},
itemName: name,
};

@@ -23,0 +24,0 @@ Object.assign(remoteItem, subscription);

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

import { ClientCache } from "./ClientCache";
import { ClientCache } from "./index";
export declare class RemoteSubscriptions {

@@ -3,0 +3,0 @@ private cache;

@@ -9,3 +9,3 @@ export type { RemoteFunction, Services, Consumer, RpcContext, RpcConnectionContext } from "./rpc.js";

export type { ServicesWithTriggers } from "./server/local.js";
export type { RpcClient, ConsumeServicesOptions } from "./client/index.js";
export type { RpcClient, ConsumeServicesOptions, ClientCache } from "./client/index.js";
export { consumeServices } from "./client/index.js";

@@ -12,0 +12,0 @@ export type { ServicesWithSubscriptions } from "./client/remote.js";

{
"name": "@push-rpc/next",
"version": "2.0.16",
"version": "2.0.17",
"main": "dist/index.js",

@@ -5,0 +5,0 @@ "types": "dist/index.d.ts",

@@ -5,3 +5,2 @@ import {RpcContext, Services} from "../rpc.js"

import {Middleware} from "../utils/middleware.js"
import {ClientCache} from "./ClientCache"

@@ -20,2 +19,7 @@ export type RpcClient = {

export type ClientCache = {
put(itemName: string, parameters: unknown[], value: unknown): void
get(itemName: string, parameters: unknown[]): unknown | undefined
}
export type ConsumeServicesOptions = {

@@ -22,0 +26,0 @@ callTimeout: number

@@ -5,3 +5,3 @@ import {CallOptions, Consumer, RemoteFunction, Services} from "../rpc.js"

hooks: RemoteHooks,
name = ""
name = "",
): ServicesWithSubscriptions<S> {

@@ -25,2 +25,3 @@ // start with remote function

},
itemName: name,
}

@@ -88,3 +89,3 @@

consumer: (d: unknown) => void,
callOptions?: CallOptions
callOptions?: CallOptions,
): Promise<void>

@@ -95,3 +96,3 @@ unsubscribe(

consumer: (d: unknown) => void,
callOptions?: CallOptions
callOptions?: CallOptions,
): Promise<void>

@@ -108,11 +109,11 @@ }

? AddParameters<T[K], [CallOptions?]> & {
subscribe(
consumer: Consumer<T[K]>,
...parameters: [...Parameters<T[K]>, CallOptions?]
): Promise<void>
unsubscribe(
consumer: Consumer<T[K]>,
...parameters: [...Parameters<T[K]>, CallOptions?]
): Promise<void>
}
subscribe(
consumer: Consumer<T[K]>,
...parameters: [...Parameters<T[K]>, CallOptions?]
): Promise<void>
unsubscribe(
consumer: Consumer<T[K]>,
...parameters: [...Parameters<T[K]>, CallOptions?]
): Promise<void>
}
: T[K] extends object

@@ -119,0 +120,0 @@ ? ServicesWithSubscriptions<T[K]>

import {safeStringify} from "../utils/json.js"
import {ClientCache} from "./ClientCache"
import {ClientCache} from "./index"
export class RemoteSubscriptions {

@@ -5,0 +6,0 @@ constructor(private cache: ClientCache | null) {

@@ -13,3 +13,3 @@ export type {RemoteFunction, Services, Consumer, RpcContext, RpcConnectionContext} from "./rpc.js"

export type {RpcClient, ConsumeServicesOptions} from "./client/index.js"
export type {RpcClient, ConsumeServicesOptions, ClientCache} from "./client/index.js"
export {consumeServices} from "./client/index.js"

@@ -16,0 +16,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