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

bf-lib

Package Overview
Dependencies
Maintainers
1
Versions
117
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bf-lib - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

2

api/Api.js

@@ -77,3 +77,3 @@ "use strict";

const authHeaders = yield getAuthHeaders();
requestSettings.headers = headers ? Object.assign({}, headers, authHeaders) : authHeaders;
requestSettings.headers = Object.assign({}, system_1.default.getHttpHeaders(), headers, authHeaders);
try {

@@ -80,0 +80,0 @@ const url = `${system_1.default.nexus.getUrl()}/${sanitizeUri(uri)}`;

{
"name": "bf-lib",
"version": "1.0.1",
"version": "1.0.2",
"private": false,

@@ -5,0 +5,0 @@ "description": "the standard client library for block-5 services",

@@ -40,5 +40,12 @@ "use strict";

}
const httpHeaders = {};
const libModuleMap = new Map();
const nexus = yield Nexus_1.default(system, settings.nexus, settings.auth);
const liveSyncConnectionOptions = settings.livesync ? Object.freeze(Object.assign({}, settings.livesync)) : null;
function getHttpHeaders() {
return Object.assign({}, httpHeaders);
}
function setHttpHeader(key, value) {
httpHeaders[key] = value;
}
function getLibModule(type) {

@@ -64,3 +71,3 @@ const libModule = libModuleMap.get(type);

libModuleMap.set(Types_2.LibModule.MODULE, require('../module/Module').default);
const instanceMethods = { getLibModule, liveSyncOptions, nexus };
const instanceMethods = { getHttpHeaders, setHttpHeader, getLibModule, liveSyncOptions, nexus };
Object.assign(instance, instanceMethods);

@@ -67,0 +74,0 @@ Object.freeze(instance);

@@ -17,2 +17,4 @@ import { EnumLiteralsOf, IUserEntity } from 'bf-types';

export interface SystemInstance {
getHttpHeaders(): Record<string, string>;
setHttpHeader(key: string, value: string): void;
getLibModule: <T>(type: LibModule) => T;

@@ -19,0 +21,0 @@ liveSyncOptions: () => Nullable<LiveSyncConnectionOptions>;

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