Comparing version 0.3.9 to 0.3.10
@@ -6,10 +6,7 @@ /** | ||
var Media = require("../media").Media, | ||
filesystem = require("perstore/store/filesystem").FileSystem({dataFolder: "../templates", defaultExtension: "template"}), | ||
transform = require("../html-transform"), | ||
Response=require("../jsgi/response").Response, | ||
resolver = require("templify/lib/templify").Resolver, | ||
toJSON = require("perstore/util/json-ext").stringify, | ||
when = require("promised-io/promise").when, | ||
copy = require("perstore/util/copy").copy; | ||
var templateEngine = require('templify/lib/templify').TemplateEngine({resolver: resolver, store: filesystem}); | ||
@@ -21,3 +18,3 @@ var defaultHandler = { | ||
var contentType = object.getMetadata? object.getMetadata()['content-type'] : object['content-type']; | ||
var contentType = object.getMetadata? object.getMetadata()['content-type'] : object['content-type']; | ||
@@ -57,7 +54,9 @@ if (contentType) { | ||
delete response.headers['content-length']; | ||
if (!this.templateEngine) { | ||
return object.content; | ||
} | ||
if (response.status > 400) { | ||
template = templateEngine.compile("/error/"+response.status); | ||
template = this.templateEngine.compile("/error/"+response.status); | ||
}else{ | ||
template = templateEngine.compile(templateId, (mediaParams && mediaParams.template)); | ||
template = this.templateEngine.compile(templateId, (mediaParams && mediaParams.template)); | ||
} | ||
@@ -64,0 +63,0 @@ |
{ | ||
"name": "pintura", | ||
"version": "0.3.9", | ||
"version": "0.3.10", | ||
"author": "Kris Zyp", | ||
@@ -19,3 +19,2 @@ "email": "kriszyp@gmail.com", | ||
"perstore": "http://github.com/kriszyp/perstore/zipball/v0.2.4", | ||
"templify": "http://github.com/dmachi/templify/zipball/master", | ||
"promised-io": "jar:http://github.com/kriszyp/promised-io/zipball/v0.2.3!/", | ||
@@ -69,3 +68,2 @@ "patr": "jar:http://github.com/kriszyp/patr/zipball/v0.2.6!/", | ||
"rql": ">=0.3.1", | ||
"templify": ">=0.9.0", | ||
"tunguska": ">=0.3.0", | ||
@@ -72,0 +70,0 @@ "ws": "^0.4.32" |
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
7
94
236615
- Removedtemplify@>=0.9.0
- Removedtemplify@0.9.1(transitive)