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

@cumulus/cmr-client

Package Overview
Dependencies
Maintainers
8
Versions
148
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cumulus/cmr-client - npm Package Compare versions

Comparing version 1.18.0 to 1.19.0

4

CMR.js

@@ -239,3 +239,3 @@ 'use strict';

async searchCollections(params, format = 'json') {
const searchParams = Object.assign({}, { provider_short_name: this.provider }, params);
const searchParams = { provider_short_name: this.provider, ...params };
return searchConcept({

@@ -258,3 +258,3 @@ type: 'collections',

async searchGranules(params, format = 'json') {
const searchParams = Object.assign({}, { provider_short_name: this.provider }, params);
const searchParams = { provider_short_name: this.provider, ...params };
return searchConcept({

@@ -261,0 +261,0 @@ type: 'granules',

@@ -30,2 +30,4 @@ 'use strict';

* @param {string} params.type - the type of search 'granule' or 'collection'
* @param {string} params.cmrEnvironment - optional, CMR environment to
* use valid arguments are ['OPS', 'SIT', 'UAT']
* @param {string} [params.searchParams={}] - the search parameters

@@ -38,2 +40,3 @@ * @param {string} params.format - the result format

this.type = params.type;
this.cmrEnvironment = params.cmrEnvironment;
this.params = { provider_short_name: this.provider, ...params.searchParams };

@@ -78,2 +81,3 @@ this.format = params.format;

type: this.type,
cmrEnvironment: this.cmrEnvironment,
searchParams: this.params,

@@ -80,0 +84,0 @@ previousResults: [],

{
"name": "@cumulus/cmr-client",
"version": "1.18.0",
"version": "1.19.0",
"engines": {

@@ -34,3 +34,3 @@ "node": ">=10.16.3"

"dependencies": {
"@cumulus/logger": "1.18.0",
"@cumulus/logger": "1.19.0",
"got": "^9.6.0",

@@ -49,3 +49,3 @@ "lodash.get": "^4.4.2",

},
"gitHead": "f55107a043f48e9d54cfc7050f0dd4cc8c65f649"
"gitHead": "088fc8b860223da51bcd6290cdfcccceaa3328b3"
}

@@ -11,2 +11,4 @@ 'use strict';

* @param {string} params.type - Concept type to search, choices: ['collections', 'granules']
* @param {string} params.cmrEnvironment - optional, CMR environment to
* use valid arguments are ['OPS', 'SIT', 'UAT']
* @param {Object} params.searchParams - CMR search parameters

@@ -25,2 +27,3 @@ * Note initial searchParams.page_num should only be set if recursive is false

type,
cmrEnvironment,
searchParams,

@@ -39,3 +42,3 @@ previousResults = [],

const url = `${getUrl('search')}${type}.${format.toLowerCase()}`;
const url = `${getUrl('search', null, cmrEnvironment)}${type}.${format.toLowerCase()}`;

@@ -45,3 +48,3 @@ const pageNum = (searchParams.page_num) ? searchParams.page_num + 1 : 1;

// if requested, recursively retrieve all the search results for collections or granules
const query = Object.assign({}, defaultParams, searchParams, { page_num: pageNum });
const query = { ...defaultParams, ...searchParams, page_num: pageNum };
const response = await got.get(url, { json: format.endsWith('json'), query, headers });

@@ -48,0 +51,0 @@

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