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

recap

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

recap - npm Package Compare versions

Comparing version 0.1.0-alpha to 0.1.0-alpha2

4

config.json
{
"urls": [
"http://www.audiusa.com/",
"http://nissan.co.th/",
"http://www.footlocker.eu/ns/kdi/gb/en/index.html"
"http://www.agst.co/"
],

@@ -7,0 +5,0 @@ "widths": [

{
"name": "recap",
"preferGlobal": true,
"version": "0.1.0-alpha",
"version": "0.1.0-alpha2",
"author": "aintgoin2goa",

@@ -6,0 +6,0 @@ "description": "creates responsive screenshots using phantomjs",

@@ -7,2 +7,3 @@ /// <reference path="IDestination.ts" />

var DestinationType = require("./DestinationType");
var console = require("../Console");

@@ -27,3 +28,9 @@ var FileSystemDestination = (function () {

// if destination does not exist, create it
fs.mkdir(this.uri, "0777", function () {
console.log("initialising destination");
fs.mkdir(this.uri, "0666", function (err) {
if (err) {
console.error("Failed to create destination directory", err);
process.exit(1);
}
// if we have a data file already, delete the file but store contents in memory

@@ -30,0 +37,0 @@ fs.readFile(_this.dataFilePath, { encoding: "utf8" }, function (err, data) {

@@ -8,2 +8,3 @@ /// <reference path="IDestination.ts" />

var DestinationType: DestinationType = require("./DestinationType");
var console: IConsole = require("../Console");

@@ -41,3 +42,8 @@ class FileSystemDestination implements IFileSystemDestination {

// if destination does not exist, create it
fs.mkdir(this.uri, "0777", () => {
console.log("initialising destination");
fs.mkdir(this.uri, "0666", (err) => {
if (err) {
console.error("Failed to create destination directory", err);
process.exit(1);
}
// if we have a data file already, delete the file but store contents in memory

@@ -44,0 +50,0 @@ fs.readFile(this.dataFilePath, { encoding: "utf8" }, (err: Error, data: string) => {

@@ -9,3 +9,5 @@ /// <reference path="IDestinationType.ts" />

setup(): Q.IPromise<any>;
}

@@ -111,5 +111,9 @@ /// <reference path="./IConfig.ts" />

}
console.log("Copy files to " + destination.uri);
transport(tempDir).to(destination).then(finish, fail);
destination.setup().then(function () {
console.log("Copy files to " + destination.uri);
transport(tempDir).to(destination).then(finish, fail);
}, function () {
console.error("Failed to setup destination");
process.exit();
});
}

@@ -116,0 +120,0 @@

@@ -124,5 +124,13 @@ /// <reference path="./IConfig.ts" />

}
console.log("Copy files to " + destination.uri);
transport(tempDir).to(destination).then(finish, fail);
destination.setup().then(
function () {
console.log("Copy files to " + destination.uri);
transport(tempDir).to(destination).then(finish, fail);
},
function () {
console.error("Failed to setup destination");
process.exit();
}
);
}

@@ -129,0 +137,0 @@

@@ -12,4 +12,6 @@ var FileSystemTransport = require("./transports/FileSystemTransport");

function transport(from) {
console.log("transport from", from);
return {
to: function (to) {
console.log("tranport to", to);
var transport = resolveTransport(to.type);

@@ -16,0 +18,0 @@ transport.from = from;

@@ -14,4 +14,6 @@

function transport(from: ITempDir) {
console.log("transport from", from);
return {
to: function (to: IDestination): Q.IPromise<boolean> {
console.log("tranport to", to);
var transport = resolveTransport(to.type);

@@ -18,0 +20,0 @@ transport.from = from;

@@ -15,2 +15,3 @@ /// <reference path="ITransport.ts" />

FileSystemTransport.prototype.copyFiles = function (dfd) {
console.log("Begin copying files");
if (dfd === undefined) {

@@ -51,2 +52,3 @@ dfd = Q.defer();

this.to.lock().then(function () {
console.log("Destination locked succesfully, proceeding...");
_this.files = _this.from.listFiles();

@@ -53,0 +55,0 @@ _this.nextFile(dfd);

@@ -24,2 +24,3 @@ /// <reference path="ITransport.ts" />

public copyFiles(dfd?: Q.Deferred<boolean>): Q.IPromise<boolean> {
console.log("Begin copying files");
if (dfd === undefined) {

@@ -57,3 +58,4 @@ dfd = Q.defer<boolean>();

private start(dfd: Q.Deferred<boolean>): void {
this.to.lock().then( () => {
this.to.lock().then(() => {
console.log("Destination locked succesfully, proceeding...");
this.files = this.from.listFiles();

@@ -60,0 +62,0 @@ this.nextFile(dfd);

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