asset-pipe-client
Advanced tools
Comparing version 1.0.0-alpha.2 to 1.0.0-beta.1
'use strict'; | ||
const url = require('url'); | ||
const fs = require('fs'); | ||
@@ -35,8 +36,10 @@ const JSONStream = require('JSONStream'); | ||
/** | ||
* Upload asset feed to asset server | ||
*/ | ||
uploadFeed () { | ||
return new Promise((resolve, reject) => { | ||
const writer = new Writer(this.files, this.options); | ||
const writer = new Writer(this.files, this.options, false, true); | ||
@@ -61,3 +64,9 @@ this.transforms.forEach((entry) => { | ||
} | ||
resolve(body); | ||
if (response.statusCode === 200) { | ||
return resolve(body); | ||
} | ||
if (response.statusCode === 400) { | ||
return reject(new Error(body.message)); | ||
} | ||
reject(new Error(`Asset build server responded with unknown error. Http status ${response.statusCode}`)); | ||
})); | ||
@@ -67,5 +76,7 @@ }); | ||
/** | ||
* Make a bundle out of asset feeds on the asset server | ||
*/ | ||
createRemoteBundle (sources) { | ||
@@ -81,3 +92,9 @@ return new Promise((resolve, reject) => { | ||
} | ||
resolve(body); | ||
if (response.statusCode === 200) { | ||
return resolve(body); | ||
} | ||
if (response.statusCode === 400) { | ||
return reject(new Error(body.message)); | ||
} | ||
reject(new Error(`Asset build server responded with unknown error. Http status ${response.statusCode}`)); | ||
}); | ||
@@ -84,0 +101,0 @@ }); |
{ | ||
"name": "asset-pipe-client", | ||
"version": "1.0.0-alpha.2", | ||
"version": "1.0.0-beta.1", | ||
"author": { | ||
@@ -28,5 +28,2 @@ "name": "Trygve Lie", | ||
], | ||
"engines": { | ||
"node": "6.x" | ||
}, | ||
"bugs": { | ||
@@ -38,3 +35,3 @@ "url": "https://github.com/asset-pipe/asset-pipe-cli/issues" | ||
"JSONStream": "^1.3.0", | ||
"asset-pipe-js-writer": "^1.0.0-alpha.7", | ||
"asset-pipe-js-writer": "1.0.0-beta.3", | ||
"commander": "2.9.0", | ||
@@ -44,3 +41,5 @@ "request": "^2.79.0" | ||
"devDependencies": { | ||
"ava": "^0.18.1", | ||
"asset-pipe-test-es5a": "^1.0.0", | ||
"asset-pipe-test-es5b": "^1.0.0", | ||
"tap": "10.3.1", | ||
"eslint": "^3.15.0", | ||
@@ -51,4 +50,4 @@ "eslint-config-finn": "^1.0.1" | ||
"lint": "eslint .", | ||
"test": "ava lib/*.test.js" | ||
"test": "tap test/*.js" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5560
128
5
5
2
1
+ Addedalign-text@0.1.4(transitive)
+ Addedasset-pipe-common@1.0.0-beta.2(transitive)
+ Addedasset-pipe-js-writer@1.0.0-beta.3(transitive)
+ Addedbrowserify@14.1.0(transitive)
+ Addedbuffer-shims@1.0.0(transitive)
+ Addedcamelcase@1.2.1(transitive)
+ Addedcenter-align@0.1.3(transitive)
+ Addedcliui@2.1.0(transitive)
+ Addeddecamelize@1.2.0(transitive)
+ Addedhttps-browserify@0.0.1(transitive)
+ Addedkind-of@3.2.2(transitive)
+ Addedlazy-cache@1.0.4(transitive)
+ Addedlongest@1.0.1(transitive)
+ Addedreadable-stream@2.2.6(transitive)
+ Addedrepeat-string@1.6.1(transitive)
+ Addedright-align@0.1.3(transitive)
+ Addeduglify-js@2.8.21(transitive)
+ Addeduglify-to-browserify@1.0.2(transitive)
+ Addedwindow-size@0.1.0(transitive)
+ Addedwordwrap@0.0.2(transitive)
+ Addedyargs@3.10.0(transitive)
- Removedasset-pipe-common@1.0.0-beta.6(transitive)
- Removedasset-pipe-js-writer@1.0.0-beta.5(transitive)
- Removedbrowserify@14.4.0(transitive)
- Removedhttps-browserify@1.0.0(transitive)
- Removedreadable-stream@2.3.2(transitive)
- Removedstring_decoder@1.0.3(transitive)
- Removeduglify-js@3.0.20(transitive)