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

fulcrum-app

Package Overview
Dependencies
Maintainers
3
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fulcrum-app - npm Package Compare versions

Comparing version 2.0.0-alpha.3 to 2.0.0-alpha.4

2

dist/client.js

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

this.version = VERSION;
var options = {

@@ -91,0 +93,0 @@ baseURI: this.baseUrl,

@@ -74,5 +74,20 @@ 'use strict';

formData.append(this.resourceName + '[access_key]', attrs.access_key || _uuid2.default.v4());
formData.append(this.resourceName + '[file]', file);
var accessKey = attrs.hasOwnProperty('accessKey') ? attrs.accessKey : _uuid2.default.v4();
formData.append(this.resourceName + '[access_key]', accessKey);
var fileOptions = null;
// File names from media streams like
// fs.createReadStream('photo.jpg')
// are automatically added. When reading from buffers like
// fs.readFileSync('photo.jpg)
// the file name can't be inferred so it must be supplied like
// photos.create(fs.readFileSync('photo.jpg'), {fileName: 'photo.jpg'})
if (attrs.hasOwnProperty('fileName')) {
fileOptions = { filename: attrs.fileName };
}
formData.append(this.resourceName + '[file]', file, fileOptions);
return {

@@ -79,0 +94,0 @@ body: formData,

2

package.json
{
"name": "fulcrum-app",
"version": "2.0.0-alpha.3",
"version": "2.0.0-alpha.4",
"description": "JavaScript wrapper for the Fulcrum API",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -28,2 +28,4 @@ import Fetcher from './fetcher';

this.version = VERSION;
const options = {

@@ -30,0 +32,0 @@ baseURI: this.baseUrl,

@@ -64,2 +64,3 @@ function getQueryString(params) {

const contentType = resp.headers.get('Content-Type');
if (contentType && contentType.split(';')[0] === 'application/json') {

@@ -66,0 +67,0 @@ return resp.json();

@@ -16,5 +16,20 @@ import uuid from 'uuid';

formData.append(`${this.resourceName}[access_key]`, attrs.access_key || uuid.v4());
formData.append(`${this.resourceName}[file]`, file);
const accessKey = attrs.hasOwnProperty('accessKey') ? attrs.accessKey : uuid.v4();
formData.append(`${this.resourceName}[access_key]`, accessKey);
let fileOptions = null;
// File names from media streams like
// fs.createReadStream('photo.jpg')
// are automatically added. When reading from buffers like
// fs.readFileSync('photo.jpg)
// the file name can't be inferred so it must be supplied like
// photos.create(fs.readFileSync('photo.jpg'), {fileName: 'photo.jpg'})
if (attrs.hasOwnProperty('fileName')) {
fileOptions = { filename: attrs.fileName };
}
formData.append(`${this.resourceName}[file]`, file, fileOptions);
return {

@@ -21,0 +36,0 @@ body: formData,

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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