Comparing version 0.5.1 to 0.6.0
{ | ||
"name": "impro", | ||
"version": "0.5.1", | ||
"version": "0.6.0", | ||
"description": "Image processing engine", | ||
@@ -5,0 +5,0 @@ "author": "Andreas Lind <andreaslindpetersen@gmail.com>", |
@@ -124,3 +124,3 @@ # Impro | ||
```js | ||
const pipeline = impro.createPipeline({ type: 'png }, [ | ||
const pipeline = impro.createPipeline({ type: 'png' }, [ | ||
{ name: 'grayscale', args: [] }, | ||
@@ -127,0 +127,0 @@ { name: 'resize', args: [100, 100] }, |
@@ -9,6 +9,7 @@ const requireOr = require('require-or'); | ||
outputTypes: ['png'], | ||
operations: ['brute', 'reduce', 'rem'], | ||
operations: ['brute', 'noreduce', 'reduce', 'rem'], | ||
validateOperation: function(name, args) { | ||
switch (name) { | ||
case 'brute': | ||
case 'noreduce': | ||
case 'reduce': | ||
@@ -15,0 +16,0 @@ return args.length === 0; |
@@ -17,3 +17,5 @@ const requireOr = require('require-or'); | ||
if (pipeline.options.svgAssetPath) { | ||
options.url = `file://${pipeline.options.svgAssetPath}`; | ||
const url = `file://${pipeline.options.svgAssetPath}`; | ||
options.url = url; | ||
options.root = url; // required in SvgFilter for assetgraph | ||
} | ||
@@ -20,0 +22,0 @@ |
@@ -180,2 +180,3 @@ const _ = require('lodash'); | ||
var leftOverQueryStringFragments = []; | ||
var consumedQueryStringFragments = []; | ||
@@ -238,2 +239,3 @@ keyValuePairs.forEach(function(keyValuePair) { | ||
}); | ||
consumedQueryStringFragments.push(keyValuePair); | ||
} | ||
@@ -245,5 +247,6 @@ } | ||
operations: operations, | ||
leftover: leftOverQueryStringFragments.join('&') | ||
leftover: leftOverQueryStringFragments.join('&'), | ||
consumed: consumedQueryStringFragments.join('&') | ||
}; | ||
} | ||
}; |
@@ -60,3 +60,3 @@ const Stream = require('stream'); | ||
this._flushed = true; | ||
this.usedEngines = []; | ||
this.usedEngines = this.usedEngines || []; | ||
var startIndex = 0; | ||
@@ -329,2 +329,5 @@ var lastSelectedEngineName; | ||
} | ||
if (this._preflush) { | ||
throw new Error('Cannot add non-streams after calling addStream()'); | ||
} | ||
if (operation && typeof operation.name === 'string') { | ||
@@ -340,2 +343,10 @@ this._queuedOperations.push(operation); | ||
addStream(stream) { | ||
this._preflush = true; | ||
this._attach(stream); | ||
this.usedEngines = this.usedEngines || []; | ||
this.usedEngines.push({ name: '_stream' }); | ||
return this; | ||
} | ||
type(type) { | ||
@@ -342,0 +353,0 @@ if (typeof type !== 'string') { |
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
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
63923
1686