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

@adobe/fetch

Package Overview
Dependencies
Maintainers
44
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@adobe/fetch - npm Package Compare versions

Comparing version 0.1.2 to 0.1.4

.idea/codeStyles/codeStyleConfig.xml

2

index.js

@@ -70,3 +70,3 @@ /*

*/
function adobefetch(url, options = {}, configOptions, tokenCache) {
function adobefetch(url, options, configOptions, tokenCache) {
return _fetch(url, options, configOptions, tokenCache, false);

@@ -73,0 +73,0 @@ }

{
"name": "@adobe/fetch",
"version": "0.1.2",
"version": "0.1.4",
"description": "Call Adobe APIs",

@@ -23,3 +23,6 @@ "main": "index.js",

"jwt",
"api"
"api",
"fetch",
"adobe",
"adobeio"
],

@@ -26,0 +29,0 @@ "author": "Adobe Inc.",

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

[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![Version](https://img.shields.io/npm/v/@adobe/fetch.svg)](https://npmjs.org/package/@adobe/fetch)

@@ -6,4 +7,5 @@ [![Downloads/week](https://img.shields.io/npm/dw/@adobe/fetch.svg)](https://npmjs.org/package/@adobe/fetch)

[![codecov](https://codecov.io/gh/adobe/adobe-fetch/branch/master/graph/badge.svg)](https://codecov.io/gh/adobe/adobe-fetch)
[![Greenkeeper badge](https://badges.greenkeeper.io/adobe/adobe-fetch.svg)](https://greenkeeper.io/)
# adobeio-fetch
# adobe-fetch

@@ -10,0 +12,0 @@ Call Adobe APIs

@@ -25,8 +25,5 @@ /* eslint-disable require-atomic-updates */

async function readCache(cache) {
if (cache.disableStorage) {
if (cache.tokens === undefined) {
cache.tokens = {};
}
} else {
cache.tokens = (await storage.read()) || {};
if (!cache.disableStorage) {
cache.tokens = await storage.read();
cache.readOnce = true;
}

@@ -80,4 +77,3 @@ }

let cacheRead = false;
if (cache.tokens === undefined) {
cache.tokens = {};
if (!cache.readOnce) {
await readCache(cache);

@@ -97,5 +93,7 @@ cacheRead = true;

function config(options) {
const disableStorage = (options && options.disableStorage) || false;
const cache = {
disableStorage: (options && options.disableStorage) || false,
tokens: undefined
disableStorage: disableStorage,
readOnce: disableStorage,
tokens: {}
};

@@ -102,0 +100,0 @@

@@ -26,8 +26,6 @@ /*

*/
async function _initStorage(options = {}) {
async function _initStorage() {
// Make sure init is only called once.
if (!storagePromise) {
storagePromise = storage
.init(options)
.then(() => (storageInitialized = true));
storagePromise = storage.init().then(() => (storageInitialized = true));
}

@@ -34,0 +32,0 @@ return storagePromise;

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