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

presto-client-browser

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

presto-client-browser - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

5

package.json
{
"name": "presto-client-browser",
"version": "0.0.4",
"version": "0.0.5",
"description": "GeoSpock Presto REST API client",

@@ -25,3 +25,4 @@ "keywords": [],

"btoa": "^1.2.1",
"humanize-duration": "^3.22.0"
"humanize-duration": "^3.22.0",
"node-fetch": "^2.6.0"
},

@@ -28,0 +29,0 @@ "main": "src/js/prestoClient.js",

2

src/js/prestoClient.js

@@ -36,3 +36,3 @@ import humanizeDuration from "humanize-duration";

async submitQuery(sql) {
return await this.prestoFetch(`${this.prestoURL}/v1/statement`, {
return await this.prestoFetch(`${this.prestoURL}${this.prestoURL.endsWith("/") ? "": "/"}v1/statement`, {
body: sql,

@@ -39,0 +39,0 @@ headers: {

@@ -39,1 +39,12 @@ import PrestoClient from "../../src/js/prestoClient.js";

});
mocha.it("prestoClient URL trailing slash", async function() {
let client = new PrestoClient("https://sqlaccess.example.com/", "username", "password");
let fetch = fetchMock.sandbox();
client.setFetch(fetch);
fetch.post("https://sqlaccess.example.com/v1/statement", {status: 200, body: {nextUri: "https://sqlaccess.example.com/v1/statement/1"}});
let response = await client.submitQuery("SHOW TABLES FROM geospock.default");
chai.expect(response.url).to.deep.equal("https://sqlaccess.example.com/v1/statement");
});

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