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

netlify

Package Overview
Dependencies
Maintainers
1
Versions
180
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

netlify - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

44

lib/deploy.js

@@ -1,4 +0,5 @@

var when = require("when"),
nodefn = require("when/node"),
model = require("./model");
var when = require("when"),
nodefn = require("when/node"),
semaphore = require("semaphore"),
model = require("./model");

@@ -45,20 +46,25 @@ if (typeof(require) !== 'undefined') {

var self = this;
var sem = semaphore(20);
var results = files.map(function(file) {
return nodefn.call(fs.readFile, file.abs).then(function(data) {
var filePath = file.rel.split("/").map(function(segment) {
return encodeURIComponent(segment);
}).join("/");
sem.take(function() {
return nodefn.call(fs.readFile, file.abs).then(function(data) {
var filePath = file.rel.split("/").map(function(segment) {
return encodeURIComponent(segment);
}).join("/");
return self.client.request({
url: "/deploys/" + self.id + "/files/" + filePath,
type: "put",
body: data,
contentType: "application/octet-stream",
ignoreResponse: true
}).then(function(response) {
progress && progress("upload", {file: file, total: files.length});
return file;
}).catch(function(response) {
progress && progress("uploadError", {file:file, message: response.data});
return when.reject(response.data);
return self.client.request({
url: "/deploys/" + self.id + "/files/" + filePath,
type: "put",
body: data,
contentType: "application/octet-stream",
ignoreResponse: true
}).then(function(response) {
progress && progress("upload", {file: file, total: files.length});
sem.leave();
return file;
}).catch(function(response) {
progress && progress("uploadError", {file:file, message: response.data});
sem.leave();
return when.reject(response.data);
});
});

@@ -65,0 +71,0 @@ });

@@ -5,3 +5,3 @@ {

"description": "Netlify API client",
"version": "1.0.0",
"version": "1.0.1",
"bugs": {

@@ -20,2 +20,3 @@ "url": "https://github.com/netlify/netlify-js/issues"

"graceful-fs": "^3.0.4",
"semaphore": "^1.0.5",
"when": "^3.7.5"

@@ -22,0 +23,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