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

@proca/api

Package Overview
Dependencies
Maintainers
3
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@proca/api - npm Package Compare versions

Comparing version 3.3.2 to 3.3.3

6

dist/auth.d.ts

@@ -11,8 +11,4 @@ export declare type BasicAuth = {

};
export declare type AuthHeaderFetcher = () => {
headers: {
authorization: string;
};
};
export declare type AuthHeaderFetcher = (() => string | undefined);
export declare function basicAuth(cred: BasicAuth): AuthHeader;
export declare function tokenAuth(cred: TokenAuth): AuthHeader;

15

dist/client.js

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

const absintheExchange_1 = __importDefault(require("./absintheExchange"));
const auth_1 = require("./auth");
// hasSubscription - helper func to see if we have an operation with subscription

@@ -78,10 +79,16 @@ // taken from @jumpn/utils-graphql which is not really useful as has not types

return {};
let opt;
if (typeof auth === 'function') {
return auth;
return () => {
const token = auth();
if (token !== null) {
return { headers: (0, auth_1.tokenAuth)({ token }) };
}
else {
return {};
}
};
}
else {
opt = { headers: auth || {} };
return { headers: auth || {} };
}
return opt;
}

@@ -88,0 +95,0 @@ function link(url, auth, options) {

{
"name": "@proca/api",
"version": "3.3.2",
"version": "3.3.3",
"description": "Client library for Proca API",

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

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