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

@forge/storage

Package Overview
Dependencies
Maintainers
0
Versions
109
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@forge/storage - npm Package Compare versions

Comparing version 1.5.15-experimental-03ab603 to 1.5.15-experimental-2b4814c

4

out/__test__/global-storage.test.js

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

const globalStorage = getStorage(apiClientMock);
await globalStorage.bulkSet([
const response = await globalStorage.bulkSet([
{

@@ -285,2 +285,4 @@ key: 'testKey',

});
expect(response).toHaveProperty('savedKeys', ['testKey']);
expect(response).toHaveProperty('failedKeys', []);
});

@@ -287,0 +289,0 @@ it('should throw an error if the storage API returns successful = false', async () => {

@@ -79,6 +79,5 @@ "use strict";

const requestBody = gql_queries_1.UntypedQueries.bulkSet(this.doGetAppContextAri(), items, false);
const response = await this.mutation(requestBody, 'appStorage', 'setAppStoredEntities');
const parsedResponse = await getResponseBody(response);
const failedKeys = parsedResponse.appStorage.setAppStoredEntities.failedKeys;
const savedKeys = parsedResponse.appStorage.setAppStoredEntities.savedKeys;
const response = await this.mutation(requestBody, 'appStorage', 'setAppStoredEntities', true);
const failedKeys = response.failedKeys;
const savedKeys = response.savedKeys;
return {

@@ -131,9 +130,12 @@ savedKeys,

}
async mutation(body, namespace, mutationMethod) {
async mutation(body, namespace, mutationMethod, returnResponseBody) {
const response = await this.apiClient(this.endpoint, this.buildRequest(body));
const { [namespace]: { [mutationMethod]: { success, errors } } } = await getResponseBody(response);
assertNoErrors(errors);
if (!success) {
const { [namespace]: { [mutationMethod]: mutationResponse } } = await getResponseBody(response);
assertNoErrors(mutationResponse.errors);
if (!mutationResponse.success) {
throw errors_1.APIError.forStatus(500);
}
if (returnResponseBody) {
return mutationResponse;
}
return response;

@@ -140,0 +142,0 @@ }

{
"name": "@forge/storage",
"version": "1.5.15-experimental-03ab603",
"version": "1.5.15-experimental-2b4814c",
"description": "Forge Storage methods",

@@ -5,0 +5,0 @@ "author": "Atlassian",

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