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.5 to 2.0.6

13

dist/client/HttpClient.js

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

try {
const { signal, finished } = timeoutSignal(callTimeout);
const response = await fetch(this.getItemUrl(itemName), {

@@ -35,4 +36,5 @@ method,

body: (0, json_js_1.safeStringify)(params),
signal: AbortSignal.timeout(callTimeout),
signal,
});
finished();
if (response.status == 204) {

@@ -71,2 +73,11 @@ return;

exports.HttpClient = HttpClient;
// AbortSignal.timeout polyfill for RN
function timeoutSignal(time) {
const controller = new AbortController();
const timeout = setTimeout(() => controller.abort(new Error("TimeoutError")), time);
return {
signal: controller.signal,
finished: () => clearTimeout(timeout),
};
}
//# sourceMappingURL=HttpClient.js.map

2

package.json
{
"name": "@push-rpc/next",
"version": "2.0.5",
"version": "2.0.6",
"main": "dist/index.js",

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

@@ -35,2 +35,8 @@ ## Glossary

- Supports compressed HTTP requests.
- Developer friendly - everything is plain TypeScript calls, easy call tracing between client and server, good
integration with IDE & Browser DevTools
- Based on HTTP, easy to integrate with existing infrastructure
- Gradually upgradeable - WS is only used when you need subscriptions
- Supports compressed HTTP requests.
- Server runs on Node.JS, client runs in the Node.JS/Browser/ReactNative. Bun/Deno should also work, but not officially
supported.

@@ -35,2 +35,4 @@ import {CLIENT_ID_HEADER, RpcErrors} from "../rpc.js"

try {
const {signal, finished} = timeoutSignal(callTimeout)
const response = await fetch(this.getItemUrl(itemName), {

@@ -44,5 +46,7 @@ method,

body: safeStringify(params),
signal: AbortSignal.timeout(callTimeout),
signal,
})
finished()
if (response.status == 204) {

@@ -86,1 +90,12 @@ return

}
// AbortSignal.timeout polyfill for RN
function timeoutSignal(time: number): {signal: AbortSignal; finished(): void} {
const controller = new AbortController()
const timeout = setTimeout(() => controller.abort(new Error("TimeoutError")), time)
return {
signal: controller.signal,
finished: () => clearTimeout(timeout),
}
}

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