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

@forge/storage

Package Overview
Dependencies
Maintainers
2
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.11 to 1.5.12-next.0

39

out/__test__/global-storage.test.js

@@ -651,2 +651,41 @@ "use strict";

});
describe('listCustomEntities', () => {
it('should use default values', async () => {
const apiClientMock = getApiClientMock({
data: {
appStoredCustomEntities: {
edges: []
}
}
});
const globalStorage = getStorage(apiClientMock);
const response = await globalStorage.listCustomEntities({});
expect(response).toMatchObject({
results: [],
nextCursor: null
});
verifyApiClientCalledWith(apiClientMock, {
contextAri
}, gql_queries_1.CustomEntityQueries.listQuery(contextAri, {}).query);
});
it('should return cursor when results are not present', async () => {
const apiClientMock = getApiClientMock({
data: {
appStoredCustomEntities: {
edges: [],
cursor: 'DUMMY_CURSOR'
}
}
});
const globalStorage = getStorage(apiClientMock);
const response = await globalStorage.listCustomEntities({});
expect(response).toMatchObject({
results: [],
nextCursor: 'DUMMY_CURSOR'
});
verifyApiClientCalledWith(apiClientMock, {
contextAri
}, gql_queries_1.CustomEntityQueries.listQuery(contextAri, {}).query);
});
});
});

4

out/global-storage.js

@@ -58,11 +58,9 @@ "use strict";

async listCustomEntities(options) {
var _a;
const requestBody = gql_queries_1.CustomEntityQueries.listQuery(this.doGetAppContextAri(), options);
const response = await this.query(requestBody);
const edges = response.appStoredCustomEntities.edges;
const nextCursor = (_a = edges === null || edges === void 0 ? void 0 : edges[edges.length - 1]) === null || _a === void 0 ? void 0 : _a.cursor;
const results = edges.map(({ node }) => node);
return {
results,
nextCursor
nextCursor: response.appStoredCustomEntities.cursor || null
};

@@ -69,0 +67,0 @@ }

{
"name": "@forge/storage",
"version": "1.5.11",
"version": "1.5.12-next.0",
"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