Socket
Socket
Sign inDemoInstall

@bespoken-sdk/store

Package Overview
Dependencies
Maintainers
2
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bespoken-sdk/store - npm Package Compare versions

Comparing version 0.13.2 to 0.13.3

14

lib/client.js

@@ -74,11 +74,13 @@ const _ = require('lodash')

/**
* @param {any} job
* @param {string} key
* @param {any} json
* @returns {Promise<string>} The UUID assigned to the job
*/
async save (job) {
async save (key, json) {
logger.time('SAVE')
const url = `${Client.accessURL()}/save?run=${job.run}`
const url = `${Client.accessURL()}/save?key=${key}`
logger.info('URL for saving: ' + url)
const jsonString = JSON.stringify(json)
// Create a stream from the JSON
const jsonStream = Readable.from(JSON.stringify(job))
const jsonStream = Readable.from(jsonString)
const gzipStream = jsonStream.pipe(zlib.createGzip())

@@ -94,3 +96,2 @@ const response = await axios.post(url, gzipStream, {

logger.timeEnd('SAVE')
job.key = response.data.key
return response.data.key

@@ -105,2 +106,3 @@ }

const url = `${Client.accessURL()}/decrypt?key=${key}`
logger.info('decrypt: ' + url)
const response = await axios.get(url)

@@ -107,0 +109,0 @@ return response.data.decryptedKey

@@ -9,3 +9,3 @@ {

"dependencies": {
"@bespoken-sdk/shared": "^0.13.2",
"@bespoken-sdk/shared": "^0.13.3",
"axios": "^0.21.4",

@@ -21,4 +21,4 @@ "lodash": "^4.17.21"

},
"version": "0.13.2",
"gitHead": "5e4598d24f1444bce2719d46a2354781c985851d",
"version": "0.13.3",
"gitHead": "e9edafbc2fa387c2561cd38bff7c8f8b2e64ff42",
"devDependencies": {

@@ -25,0 +25,0 @@ "@types/node": "^16.10.1"

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