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

libskynet

Package Overview
Dependencies
Maintainers
1
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

libskynet - npm Package Compare versions

Comparing version 0.0.20 to 0.0.21

3

dist/downloadverifyresponse.js

@@ -6,2 +6,3 @@ import { verifyDownload } from "./downloadverify.js";

import { verifyResolverLinkProofs } from "./skylinkverifyresolver.js";
import { tryStringify } from "./stringifytry.js";
// Establish the function that verifies the result is correct.

@@ -20,3 +21,3 @@ //

if (response.status !== 200) {
resolve("unrecognized response status " + response.status.toString() + ", expecting 200");
resolve("unrecognized response status " + tryStringify(response.status) + ", expecting 200");
return;

@@ -23,0 +24,0 @@ }

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

import { tryStringify } from "./stringifytry.js";
// progressiveFetchHelper is the full progressiveFetch function, split out into

@@ -7,3 +8,3 @@ // a helper because the inptus/api is more complicated but only necessary for

if (pfm.remainingPortals.length === 0) {
let newLog = "query failed because all portals have been tried\n" + JSON.stringify(pfm);
let newLog = "query failed because all portals have been tried";
pfm.logs.push(newLog);

@@ -16,2 +17,3 @@ resolve({

responsesFailed: pfm.responsesFailed,
messagesFailed: pfm.messagesFailed,
remainingPortals: null,

@@ -52,7 +54,7 @@ logs: pfm.logs,

if (!("status" in response) || typeof response.status !== "number") {
nextPortal(response, "portal has returned invalid response\n" + JSON.stringify({ portal, query }));
nextPortal(response, "portal has returned invalid response\n" + tryStringify({ portal, query }));
return;
}
if (response.status < 200 || response.status >= 300) {
nextPortal(response, "portal has returned error status\n" + JSON.stringify({ portal, query }));
nextPortal(response, "portal has returned error status\n" + tryStringify({ portal, query }));
return;

@@ -81,3 +83,3 @@ }

// This portal failed, try again with the next portal.
nextPortal(null, "fetch returned an error\n" + JSON.stringify(err) + JSON.stringify(pfm.fetchOpts));
nextPortal(null, "fetch returned an error\n" + tryStringify(err) + tryStringify(pfm.fetchOpts));
return;

@@ -84,0 +86,0 @@ });

{
"name": "libskynet",
"version": "0.0.20",
"version": "0.0.21",
"description": "helper library to interact with skynet's low level primitives",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

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