@bigcommerce/stencil-paper
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -157,2 +157,3 @@ 'use strict'; | ||
var configId = this.settings['theme_config_id']; | ||
var sessionId = this.settings['theme_session_id']; | ||
var protocolMatch = /(.*!?:)/; | ||
@@ -199,2 +200,6 @@ | ||
if (sessionId) { | ||
return [cdnUrl, 'stencil', versionId, configId, sessionId, path].join('/'); | ||
} | ||
return [cdnUrl, 'stencil', versionId, configId, path].join('/'); | ||
@@ -201,0 +206,0 @@ }; |
{ | ||
"name": "@bigcommerce/stencil-paper", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "A stencil plugin to register partials and helpers from handlebars and returns the compiled version for the stencil platform.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -63,2 +63,31 @@ var Code = require('code'), | ||
describe('cdnify()', function () { | ||
it('should not include session id', function (done) { | ||
var paper = new Paper({ | ||
cdn_url: 'http://cdn.example.com/foo', | ||
theme_version_id: '123', | ||
theme_config_id: '234', | ||
}); | ||
expect(paper.cdnify('/assets/image.jpg')) | ||
.to.be.equal('http://cdn.example.com/foo/stencil/123/234/image.jpg'); | ||
done(); | ||
}); | ||
it('should use sessionId if available', function (done) { | ||
var paper = new Paper({ | ||
cdn_url: 'http://cdn.example.com/foo', | ||
theme_version_id: '123', | ||
theme_config_id: '234', | ||
theme_session_id: '345', | ||
}); | ||
expect(paper.cdnify('/assets/image.jpg')) | ||
.to.be.equal('http://cdn.example.com/foo/stencil/123/234/345/image.jpg'); | ||
done(); | ||
}); | ||
}); | ||
describe('render()', function() { | ||
@@ -65,0 +94,0 @@ var templates = { |
Sorry, the diff of this file is not supported yet
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
2463
95333
67