New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@boundlessgeo/cloud-core

Package Overview
Dependencies
Maintainers
22
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@boundlessgeo/cloud-core - npm Package Compare versions

Comparing version 0.1.2 to 0.2.0

24

entitlements.js

@@ -40,4 +40,8 @@ 'use strict';

return fetch(url, fetch_opts).then(function (r) {
return r.json();
return fetch(url, fetch_opts).then(function (response) {
if (response.ok) {
return response.json();
} else {
throw Error(response.statusText);
}
});

@@ -63,4 +67,8 @@ }

var url = geoServerUrl + '/rest/auth/entitlement/' + identifier + '?' + query_string;
return fetch(url, fetch_opts).then(function (r) {
return r.json();
return fetch(url, fetch_opts).then(function (response) {
if (response.ok) {
return response.json();
} else {
throw Error(response.statusText);
}
});

@@ -97,5 +105,9 @@ }

var url = geoServerUrl + '/rest/auth/entitlement?' + query_string;
return fetch(url, fetch_opts).then(function (r) {
return r.json();
return fetch(url, fetch_opts).then(function (response) {
if (response.ok) {
return response.json();
} else {
throw Error(response.statusText);
}
});
}

@@ -17,2 +17,3 @@ 'use strict';

exports.getWorkspaces = getWorkspaces;
exports.getAvailableStyles = getAvailableStyles;

@@ -324,3 +325,3 @@ var _util = require('./util');

* @param {Array} layers - MapBox style layer definitions.
* @param {object} [options] - Access control options, honors accessToken, headers
* @param {object} [options] - Access control options, honors accessToken, headers, sprite
*

@@ -343,2 +344,5 @@ * @return {Promise} The promise from Fetch.

};
if (options.sprite) {
create_body.style.sprite = options.sprite;
}

@@ -421,3 +425,3 @@ fetch_opts.body = JSON.stringify(create_body);

* @param {Array} layers - MapBox style layer definitions.
* @param {object} [options] - Access control options, honors accessToken, headers
* @param {object} [options] - Access control options, honors accessToken, headers, sprite
*

@@ -441,2 +445,5 @@ * @return {Promise} The promise from Fetch.

};
if (options.sprite) {
body.sprite = options.sprite;
}
fetch_opts.body = JSON.stringify(body);

@@ -505,3 +512,3 @@

* @param {string} geoServerUrl - GeoServer URL
* @param {object} [options] - Access control options, honors accessToken, headers
* @param {object} [options] - Access control options, honors accessToken, headers, isDefault
*

@@ -515,3 +522,4 @@ * @return {Promise} The promise from Fetch.

var fetch_opts = (0, _util.getFetchOptions)(options.headers);
return fetch(geoServerUrl + '/rest/workspaces.json?' + query_string, fetch_opts).then(function (response) {
var url = geoServerUrl + '/rest/workspaces' + (options.isDefault ? '/default' : '') + '.json?' + query_string;
return fetch(url, fetch_opts).then(function (response) {
if (response.ok) {

@@ -525,2 +533,29 @@ return response.json();

});
}
/** Get a list of available styles for a given layer.
*
* @param {string} geoServerUrl - GeoServer URL
* @param {string} layerName - The name of the layer.
* @param {object} [options] - Access control options, honors accessToken, headers
*
* @return {Promise} The promise from Fetch.
*/
function getAvailableStyles(geoServerUrl, layerName) {
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
var query_string = (0, _util.encodeQueryParams)({}, options.accessToken);
var fetch_opts = (0, _util.getFetchOptions)(options.headers);
return fetch(geoServerUrl + '/rest/layers/' + layerName + '/styles.json?' + query_string, fetch_opts).then(function (response) {
if (response.ok) {
return response.json();
} else {
return response.text().then(function (text) {
throw new Error(response.statusText + ': ' + text);
});
}
}).then(function (response) {
return response.styles.style;
});
}
{
"name": "@boundlessgeo/cloud-core",
"author": "Boundless Spatial Inc.",
"version": "0.1.2",
"version": "0.2.0",
"description": "A library for facilitating communication with the Boundless mBSE.",

@@ -6,0 +6,0 @@ "repository": {

# cloud-core
[![Build Status](https://ciapi.boundlessgeo.io/job/cloud-core/job/master/badge/icon)](https://ciapi.boundlessgeo.io/job/cloud-core/job/master/)
A library for facilitating communication with the Boundless mBSE. The goal of this project is to encapsulate all communication patterns with the mBSE API such that downstream projects can use a common set of actions to interact with an mBSE instance without writing boilerplate code.
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